feat: implement CH5 cube renewal, SQL fence routing, and transactional crafting

This commit is contained in:
shen
2026-10-23 20:17:22 -07:00
parent 6924dc9b49
commit b5e06c9a43
135 changed files with 8493 additions and 56 deletions
+2
View File
@@ -26,6 +26,7 @@ struct Character {int64_t balance=1000,delta=0;unsigned charges=0,rewards=0;Item
Item* AutoGiveItem(unsigned,unsigned){++rewards;return &item;}
unsigned GetPlayerID(){return 1;}int GetX(){return 0;}int GetY(){return 0;}};
CUBE_DATA* FN_find_cube(LPITEM*,unsigned){return &proto;}
bool held=false;bool PortCubeActorHeld(LPCHARACTER){return held;}
constexpr int POINT_GOLD=11,CHAT_TYPE_INFO=1,CHAT_TYPE_COMMAND=2;
#define LC_TEXT(s) "notice"
int roll=1;int number(int,int){return roll;}
@@ -33,6 +34,7 @@ struct LogManager{static LogManager& instance(){static LogManager m;return m;}vo
'''
main=r'''
int main(){
{Character ch;held=true;assert(!Cube_make(&ch)&&ch.charges==0&&proto.removed==0&&ch.rewards==0);held=false;}
for(uint32_t fee:{uint32_t(50),uint32_t(INT32_MAX)+1u,UINT32_MAX}) {
proto.gold=fee;proto.removed=0;Character ch;ch.balance=int64_t(fee)+123;
assert(Cube_make(&ch));assert(ch.balance==123 && ch.delta==-int64_t(fee) && ch.charges==1 && proto.removed==1 && ch.rewards==1);