[TM-joke] Add pony_xeno modular xenos with admin spawn support#85
[TM-joke] Add pony_xeno modular xenos with admin spawn support#85PhantornRU wants to merge 9 commits into
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
Code Review
This pull request introduces the pony_xeno module, adding four equine-themed xenomorph castes along with a data-driven runtime sprite composition system and admin spawn integration. Review feedback identifies a logic bug in client prefix assignment and suggests using the ALL_PONY_XENO_CASTES define in admin menus for better maintainability. Additionally, it was noted that sound metadata keys retain arachnid-specific naming, which should be refactored for clarity.
| var/name_client_prefix = "" | ||
| var/name_client_postfix = "" | ||
| if(client) | ||
| name_client_prefix = "[(client.xeno_prefix || client.xeno_postfix) ? client.xeno_prefix : "XX"]-" |
There was a problem hiding this comment.
There's a logic bug in this line. If client.xeno_prefix is null and client.xeno_postfix has a value, the expression (client.xeno_prefix || client.xeno_postfix) is true, but the ternary operator then returns client.xeno_prefix, which is null. This results in name_client_prefix being assigned the value "-", which is likely not intended. A more direct check would be clearer and avoid this bug.
name_client_prefix = "[(client.xeno_prefix) ? client.xeno_prefix : "XX"]-"
| // Spawn stuff | ||
| #define DEFAULT_SPAWN_XENO_STRING XENO_CASTE_DRONE | ||
| #define GAME_MASTER_AI_XENOS list(XENO_CASTE_DRONE, XENO_CASTE_WARRIOR_DRONE, XENO_CASTE_SOLDIER, XENO_CASTE_RUNNER, RUNNER_ACIDER, XENO_CASTE_LURKER, XENO_CASTE_CRUSHER, XENO_CASTE_DEFENDER, XENO_CASTE_SENTINEL, XENO_CASTE_SPITTER, XENO_CASTE_CARRIER, XENO_CASTE_PRAETORIAN, XENO_CASTE_RAVAGER, XENO_CASTE_PREDALIEN, XENO_CASTE_QUEEN, XENO_CASTE_KING, XENO_CASTE_FACEHUGGER, ARACHNID_CASTE_WARRIOR, ARACHNID_CASTE_BOMBARDIER) // SS220 EDIT - Arachnid | ||
| #define GAME_MASTER_AI_XENOS list(XENO_CASTE_DRONE, XENO_CASTE_WARRIOR_DRONE, XENO_CASTE_SOLDIER, XENO_CASTE_RUNNER, RUNNER_ACIDER, XENO_CASTE_LURKER, XENO_CASTE_CRUSHER, XENO_CASTE_DEFENDER, XENO_CASTE_SENTINEL, XENO_CASTE_SPITTER, XENO_CASTE_CARRIER, XENO_CASTE_PRAETORIAN, XENO_CASTE_RAVAGER, XENO_CASTE_PREDALIEN, XENO_CASTE_QUEEN, XENO_CASTE_KING, XENO_CASTE_FACEHUGGER, ARACHNID_CASTE_WARRIOR, ARACHNID_CASTE_BOMBARDIER, PONY_XENO_CASTE_PEGASUS_SKIRMISHER, PONY_XENO_CASTE_EARTH_BRUISER, PONY_XENO_CASTE_UNICORN_CASTER, PONY_XENO_CASTE_ALICORN_MATRIARCH) // SS220 EDIT - Arachnid, Pony xeno |
There was a problem hiding this comment.
For better maintainability, you could append the ALL_PONY_XENO_CASTES list instead of listing each pony caste individually. This way, any new pony castes added to ALL_PONY_XENO_CASTES will be automatically included here.
#define GAME_MASTER_AI_XENOS (list(XENO_CASTE_DRONE, XENO_CASTE_WARRIOR_DRONE, XENO_CASTE_SOLDIER, XENO_CASTE_RUNNER, RUNNER_ACIDER, XENO_CASTE_LURKER, XENO_CASTE_CRUSHER, XENO_CASTE_DEFENDER, XENO_CASTE_SENTINEL, XENO_CASTE_SPITTER, XENO_CASTE_CARRIER, XENO_CASTE_PRAETORIAN, XENO_CASTE_RAVAGER, XENO_CASTE_PREDALIEN, XENO_CASTE_QUEEN, XENO_CASTE_KING, XENO_CASTE_FACEHUGGER, ARACHNID_CASTE_WARRIOR, ARACHNID_CASTE_BOMBARDIER) + ALL_PONY_XENO_CASTES) // SS220 EDIT - Arachnid, Pony xeno
|
|
||
| #define DEFAULT_SPAWN_XENO_STRING XENO_CASTE_DRONE | ||
| #define GAME_MASTER_AMBUSH_AI_XENOS list(XENO_CASTE_DRONE, XENO_CASTE_WARRIOR_DRONE, XENO_CASTE_SOLDIER, XENO_CASTE_RUNNER, XENO_CASTE_LURKER, XENO_CASTE_FACEHUGGER, XENO_CASTE_SENTINEL, XENO_CASTE_SPITTER, ARACHNID_CASTE_WARRIOR, ARACHNID_CASTE_BOMBARDIER) // SS220 EDIT - Arachnid | ||
| #define GAME_MASTER_AMBUSH_AI_XENOS list(XENO_CASTE_DRONE, XENO_CASTE_WARRIOR_DRONE, XENO_CASTE_SOLDIER, XENO_CASTE_RUNNER, XENO_CASTE_LURKER, XENO_CASTE_FACEHUGGER, XENO_CASTE_SENTINEL, XENO_CASTE_SPITTER, ARACHNID_CASTE_WARRIOR, ARACHNID_CASTE_BOMBARDIER, PONY_XENO_CASTE_PEGASUS_SKIRMISHER, PONY_XENO_CASTE_EARTH_BRUISER, PONY_XENO_CASTE_UNICORN_CASTER, PONY_XENO_CASTE_ALICORN_MATRIARCH) // SS220 EDIT - Arachnid, Pony xeno |
There was a problem hiding this comment.
For better maintainability, you can use ALL_PONY_XENO_CASTES to append the new castes, similar to the pattern in other files. This ensures that the list stays up-to-date automatically if ALL_PONY_XENO_CASTES is ever modified.
#define GAME_MASTER_AMBUSH_AI_XENOS (list(XENO_CASTE_DRONE, XENO_CASTE_WARRIOR_DRONE, XENO_CASTE_SOLDIER, XENO_CASTE_RUNNER, XENO_CASTE_LURKER, XENO_CASTE_FACEHUGGER, XENO_CASTE_SENTINEL, XENO_CASTE_SPITTER, ARACHNID_CASTE_WARRIOR, ARACHNID_CASTE_BOMBARDIER) + ALL_PONY_XENO_CASTES) // SS220 EDIT - Arachnid, Pony xeno
| list(ARACHNID_SOUND_META_PATH = 'modular/pony_xeno/sounds/pony_magic_1.ogg', ARACHNID_SOUND_META_TIER = PONY_XENO_SOUND_TIER_SHORT), | ||
| list(ARACHNID_SOUND_META_PATH = 'modular/pony_xeno/sounds/pony_magic_2.ogg', ARACHNID_SOUND_META_TIER = PONY_XENO_SOUND_TIER_SHORT), | ||
| list(ARACHNID_SOUND_META_PATH = 'modular/pony_xeno/sounds/pony_royal_1.ogg', ARACHNID_SOUND_META_TIER = PONY_XENO_SOUND_TIER_MEDIUM) |
There was a problem hiding this comment.
The keys used for sound metadata, such as ARACHNID_SOUND_META_PATH, appear to be inherited from the arachnid module. This is confusing in the context of the pony module. For better clarity and long-term maintainability, it would be beneficial to refactor these keys to be more generic (e.g., MODULAR_SOUND_META_PATH) if this sound system is intended for use across multiple modules. While changing this might be outside the scope of this PR, it's a valuable consideration for future improvements.
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
|
Conflicts have been resolved. A maintainer will review the pull request shortly. |
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
|
Conflicts have been resolved. A maintainer will review the pull request shortly. |
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Summary
This PR adds a new modular
pony_xenopack that introduces four pony-themed hostile AI xenomorph castes built on top of the existing/mob/living/carbon/xenomorphecosystem.The module keeps pony enemies inside the current xeno lifecycle and infrastructure, including caste datums, hive flow, AI/pathfinding, combat loop, minimap, actions, death/remains, and modular sound hooks.
What Changed
modular/pony_xenoand included it frommodular/modular.dme.Pegasus Skirmisher,Earth Bruiser,Unicorn Caster, andAlicorn Matriarch.RoleAuthority.get_caste_by_text(),Create Xenos, Game Master Panel, and GM ambush submenu parity.bad icon operationduringInsert().Runtime / Tech Notes
Verification
git diff --check./tools/build/build.bat --ci dm -DCIBUILDING -DANSICOLORS -WerrorChangelog
🆑
add: new modular
pony_xenohostile AI xeno pack with four pony-themed castesadd: runtime pony composite sprite generation from separate pony body parts with caching
add: pony-specific sounds, blood, gibs, remains, minimap visuals, naming, and local test spawner
add: pony caste support in
Create Xenos, Game Master Panel, and GM ambush spawningfix: pony runtime icon pack generation no longer throws
bad icon operationon directional state assemblyrefactor: pony render offsets and icon assembly path are now more stable and data-driven
/:cl: