DarkflameUniverse / DarkflameServer

The main repository for the Darkflame Universe Server Emulator project.
https://www.darkflameuniverse.org/
GNU Affero General Public License v3.0
651 stars 173 forks source link

feat: refactor slash commands system into more scalable system #1510

Closed aronwk-aaron closed 6 months ago

aronwk-aaron commented 7 months ago

Spot checked a several of the commands. Things still work and there is a new help command. A bulk of the changes are breaking up the big if-else-if block into functions and registering each command.

Future PR will break out each set of command into it's own file. (dev, gm zero, and gm greater than zero command)

aronwk-aaron commented 7 months ago

Note to self: fix failing test

aronwk-aaron commented 7 months ago

Note to self: fix failing test

Thanks emo

aronwk-aaron commented 7 months ago

OKAY, this is the final form of this PR, I need to check some things with the help command not displaying correctly in-game that may be due to some char limit of that message, but that's a tangent. General feedback and suggestions welcome. Emo help me with this impl, so I may need to refer to him for some questions

EmosewaMC commented 7 months ago

Declining to review since I contributed to the pr and am biased. I will keep cleaning it up and helping work on it though

EmosewaMC commented 7 months ago

text prints correctly and utilizes the asterisk found in reverse engineering. Its used for denoting where a localized string starts and ends.

Edit: I see the weirdness... not sure why its repeating the last chunk of text for large strings

EmosewaMC commented 7 months ago

afaict, we are sending the correct data, however whats being printed is not correct. Will have to debug further to figure out the issue.

EmosewaMC commented 7 months ago

gmlevel 0, 9, 7, 9, 0 sets my gm level to the correct value makegm and setgmlevel both set the gm level as above togglenameplate is locked out when disabled still, gm bypasses. reloadconfig works toggleskipcinematics is toggleable on and off and the config option still locks it to gms or civilians if enabled for them resetmission still works addmission still works completemission still works setminifig works gminvis works unlockemote works playanim works listspawns works forcesave works kill works speedboost works freecam works setcontrolscheme works setuistate works toggle works setinventorysize works runmacro works setflag and setflag on/off work clearflag works stopeffect and playeffect work setanntitle setannmsg announce all work shutdownuniverse works getnavmeshheight works gmadditem works teleport with 2 and 3 args works tpall works dismount works buffme and buffmed works startcelebration works refillstats works lookup works spawn works spawngroup works giveuscore and setlevel works pos rot locrow works setcurrency freemoney works playlvlfx playrebuild fx works buff works testmap works createprivate works debugui works boost works unboost works activatespawner works spawnphysicsverts works reportproxphys works triggerspawner works reforge works metrics works reloadconfig works rollloot works deleteinven works castskill works setskillslot works setfaction works addfaction works setrewardcode works inspect 2 -s works kick works ban works mailitem works approveproperty works fly works attackimmune works gmimmune works gminvis "works" setname works title works