mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
Modsuits. Ready for review, sorry for the ammount of files changed 👉 👈 (#21147)
* biting off more than I can chew, but I feel like hurting myself * more shit * progress continues, moral stays sameish * bite of 2587 * mod_theme down, but probably broken * 385 errors, 16 warnings, zero tgui interactions * 292 19 * final strech to buggy mess, break time * it compiles. It almost fucking certainly doesnt work, but it compiles * fudhsciffubgsbgpgb actions not working as should for modules * fuck it we'll just open the pr as we work on it * icons work now * tgui stuff * more progress * JUDGEMENT * IT LIVES. TGUI LIVES. Special thanks to Sirryan and my brother. * jetpacks, gps, and go do what exo-suits yourself * almost ready * sorry to whoever has to review this * should work™️ * should be good now * pushing changes so I can do reviews next * Apply suggestions from code review Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * lore™️ Adds illegals level to modsuit parts from syndicate. * early returns * and these illegals * no uplink reference idiot * mod inhands are a good idea * this is needed for inhands nerd * Bomb detector working, modsutis cover ears. skin things * overslotting removal, cyborg charging, ert loadout for gamma * duplicated signal * modsuit themes, removes broken mister / bad base type module, 2 cores in robotics. * tether module, orb module, holster stuff * built in no slip, cheaper 87 * removes modules already installed, engineer ert get jetpack, equip into modsuit storage * comments spaces and duplicate flags * Some adjustments and thoughts on armor, heads get guns because they are cool like that / looting command members armor * Apply suggestions from code review Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> * Compile TGUI, slowdown adjustment, Modsuit to MODsuit * sonar, do after, more equipment, acid handling * overlay bugs / ERT / DS suits autodeploy * middle click action buttons * traders, sec modsuit energy nerf * surplus weighting * Kinesis module. * Pathfinder module, kinesis balance, blueprint for pathfinder and kinesis * more power / unused module removed * name, ds fix, pre equipped to cc suit * depot / grammer * ok should be good™️ * overslot, dupe gun, missing suit storage * stealth nerf, new kit * gun stuff / ds theme * bio armor is gone * let me push changes please thank you * makes shocks work right * copies over some changes TG made to module prices after porting * Merge remote-tracking branch 'upstream/master' into Because-I-hate-myself-and-someone-has-to-try-it- * sirryans changes Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> * Update code/modules/telesci/gps.dm Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> * Update code/modules/telesci/gps.dm Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> * Control define, ERT / DS have gloves / boots again. * Apply suggestions from code review Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> * More changes * god I hate tgui. Why do all the bundles live underground, instead of in my basement? * she updates my master till I testmerge * modsuits can recharge again * fixes a lot of shit * Ready for TM probably * sure fuck it whatever that makes sense I guess * the pinpointer works better™️ * Another storage module bug fix * hair and medical stuff * fuck fuck fuck * fixes sonar * Bag exploit fixes / plasma runtimes / ear nerf * dna lock improvement / cryostorage * whoops * Ball form second cooldown wasn't helping, no more infinite cores * she springs my lock till I ***SNAP*** * plasmaman no longer die * fixes modsuit emp issues * atmos no longer fucking dies * Fixes, module printing, and a restriction on newly constructed modsuits * Inventory code my hated * WOOO PREFERENCE CODE WOOOOO * icons my hated * fix for mods / spaceproof shit * holy shit whhhyyyyy * backpack first * Update mod_theme.dm * prevent infinite gun arms / infinite modsuit cores / syndicate modules * fixes tm error * scream loudly if species sprites break. They shouldn't, but, you know. * deconflicted with luck * converts to refit for species * fix pathfinder * fixes modsuits being funky power wise * lockboxes :gatto: , as well as DN-MP shield lock, and slight nerf to atmos modsuit * nerfs the atmos modsuit * magboots for ds / CC modsuit * downside of autosave: typing in wrong window saves bad stuff * Gamma ERT have internal cameras again. * spellcheck when * ah fuck * yes delete the null that works * whoops * fixes error / description * un vulps your cannon * fixes tails disapeering on base modsuits * space to underscore * tgui fix / tajaran * springlock buff, cryopod fix * u helps * WHO PUTS A GUN IN ITEMS * tgui moment * mining modsuit nerf / hidden holster module * PAIN * UNATHI TIDE STATION WIDE * I love special code * slightly dense * shark jumpscare * fixes ghost item, fixes springlock being bad * YIPPEEEE IT WORKED * she decons my flict * pain * ebbas days are numbered :^) * hidden * r-r-r-ebuild * fixes more bugs * qwerty, you are dense * fixes gps * fix mulebot crate * level fix * adds back icon * moving storage, fix bug, modules activate / deactivate message * yeah * yeah * yeah™️ * steels requests * windoors no longer make pathfinder module explode * chat spam * oil slicks + modsuits * whoops * bag check * ofc * Update code/modules/mod/mod_control.dm Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * Update code/datums/uplink_items/uplink_nuclear.dm Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * Update code/modules/mod/mod_control.dm Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * Update code/modules/mod/modules/module_pathfinder.dm Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com> --------- Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com> Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com>
This commit is contained in:
co-authored by
Henri215
Ryan
S34N
SteelSlayer
parent
9108007709
commit
76a845d380
@@ -534,6 +534,10 @@
|
||||
///from base of obj/item/attack_qdeleted(): (atom/target, mob/user, params)
|
||||
#define COMSIG_ITEM_ATTACK_QDELETED "item_attack_qdeleted"
|
||||
///from base of obj/item/equipped(): (/mob/equipper, slot)
|
||||
///called on [/obj/item] before unequip from base of [mob/proc/doUnEquip]: (force, atom/newloc, no_move, invdrop, silent)
|
||||
#define COMSIG_ITEM_PRE_UNEQUIP "item_pre_unequip"
|
||||
///only the pre unequip can be cancelled
|
||||
#define COMPONENT_ITEM_BLOCK_UNEQUIP (1<<0)
|
||||
#define COMSIG_ITEM_EQUIPPED "item_equip"
|
||||
///from base of obj/item/dropped(): (mob/user)
|
||||
#define COMSIG_ITEM_DROPPED "item_drop"
|
||||
@@ -571,6 +575,8 @@
|
||||
#define COMSIG_ITEM_DISABLE_EMBED "item_disable_embed"
|
||||
///from [/obj/effect/mine/proc/triggermine]:
|
||||
#define COMSIG_MINE_TRIGGERED "minegoboom"
|
||||
/// Called by /obj/item/proc/worn_overlays(list/overlays, mutable_appearance/standing, isinhands, icon_file)
|
||||
#define COMSIG_ITEM_GET_WORN_OVERLAYS "item_get_worn_overlays"
|
||||
|
||||
/// Defib-specific signals
|
||||
|
||||
@@ -696,6 +702,8 @@
|
||||
#define COMSIG_HUMAN_CHANGE_HEAD_ACCESSORY "human_change_head_accessory"
|
||||
//sent from living mobs when they parry
|
||||
#define COMSIG_HUMAN_PARRY "human_parry"
|
||||
///From base of mob/living/MobBump() (mob/living)
|
||||
#define COMSIG_LIVING_MOB_BUMP "living_mob_bump"
|
||||
///From mob/living/carbon/human/do_suicide()
|
||||
#define COMSIG_HUMAN_SUICIDE_ACT "human_suicide_act"
|
||||
///From mob/living/carbon/human/attackedby(): (mob/living/carbon/human/attacker). Also found on species/disarm and species/harm
|
||||
@@ -735,6 +743,10 @@
|
||||
///from base of obj/item/reagent_containers/food/snacks/attack(): (mob/living/eater, mob/feeder)
|
||||
#define COMSIG_FOOD_EATEN "food_eaten"
|
||||
|
||||
//Reagent
|
||||
///from base of atom/expose_reagents(): (/list, /datum/reagents, chemholder, volume_modifier)
|
||||
#define COMSIG_ATOM_EXPOSE_REAGENTS "atom_expose_reagents"
|
||||
|
||||
//Gibs
|
||||
|
||||
///from base of /obj/effect/decal/cleanable/blood/gibs/streak(): (list/directions, list/diseases)
|
||||
@@ -876,3 +888,41 @@
|
||||
#define OBJECTIVE_INVALID_TARGET (1<<1)
|
||||
|
||||
#define COMSIG_LIVING_CLEAR_STUNS "living_clear_stuns"
|
||||
|
||||
//MODsuit signals
|
||||
/// Called when a module is selected to be the active one from on_select(obj/item/mod/module/module)
|
||||
#define COMSIG_MOD_MODULE_SELECTED "mod_module_selected"
|
||||
/// Called when a MOD deploys one or more of its parts.
|
||||
#define COMSIG_MOD_DEPLOYED "mod_deployed"
|
||||
/// Called when a MOD retracts one or more of its parts.
|
||||
#define COMSIG_MOD_RETRACTED "mod_retracted"
|
||||
/// Called when a MOD is finished toggling itself.
|
||||
#define COMSIG_MOD_TOGGLED "mod_toggled"
|
||||
/// Called when a MOD activation is called from toggle_activate(mob/user)
|
||||
#define COMSIG_MOD_ACTIVATE "mod_activate"
|
||||
/// Cancels the suit's activation
|
||||
#define MOD_CANCEL_ACTIVATE (1 << 0)
|
||||
/// Called when a MOD finishes having a module removed from it.
|
||||
#define COMSIG_MOD_MODULE_REMOVED "mod_module_removed"
|
||||
/// Called when a MOD finishes having a module added to it.
|
||||
#define COMSIG_MOD_MODULE_ADDED "mod_module_added"
|
||||
/// Called when a MOD is having modules removed from crowbar_act(mob/user, obj/crowbar)
|
||||
#define COMSIG_MOD_MODULE_REMOVAL "mod_module_removal"
|
||||
/// Cancels the removal of modules
|
||||
#define MOD_CANCEL_REMOVAL (1 << 0)
|
||||
/// Called when a module attempts to activate, however it does. At the end of checks so you can add some yourself, or work on trigger behavior (mob/user)
|
||||
#define COMSIG_MODULE_TRIGGERED "mod_module_triggered"
|
||||
/// Cancels activation, with no message. Include feedback on your cancel.
|
||||
#define MOD_ABORT_USE (1<<0)
|
||||
/// Called when a module activates, after all checks have passed and cooldown started.
|
||||
#define COMSIG_MODULE_ACTIVATED "mod_module_activated"
|
||||
/// Called when a module deactivates, after all checks have passed.
|
||||
#define COMSIG_MODULE_DEACTIVATED "mod_module_deactivated"
|
||||
/// Called when a module is used, after all checks have passed and cooldown started.
|
||||
#define COMSIG_MODULE_USED "mod_module_used"
|
||||
/// Called when the MODsuit wearer is set.
|
||||
#define COMSIG_MOD_WEARER_SET "mod_wearer_set"
|
||||
/// Called when the MODsuit wearer is unset.
|
||||
#define COMSIG_MOD_WEARER_UNSET "mod_wearer_unset"
|
||||
|
||||
|
||||
|
||||
@@ -112,3 +112,5 @@ GLOBAL_LIST_INIT(glass_sheet_types, typecacheof(list(
|
||||
#define isradio(A) istype(A, /obj/item/radio)
|
||||
#define ispill(A) istype(A, /obj/item/reagent_containers/food/pill)
|
||||
|
||||
// Modsuits
|
||||
#define ismodcontrol(A) istype(A, /obj/item/mod/control)
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
/// Default value for the max_complexity var on MODsuits
|
||||
#define DEFAULT_MAX_COMPLEXITY 15
|
||||
|
||||
/// Default cell drain per process on MODsuits
|
||||
#define DEFAULT_CHARGE_DRAIN 5
|
||||
|
||||
/// Default time for a part to seal
|
||||
#define MOD_ACTIVATION_STEP_TIME (2 SECONDS)
|
||||
|
||||
/// Passive module, just acts when put in naturally.
|
||||
#define MODULE_PASSIVE 0
|
||||
/// Usable module, does something when you press a button.
|
||||
#define MODULE_USABLE 1
|
||||
/// Toggle module, you turn it on/off and it does stuff.
|
||||
#define MODULE_TOGGLE 2
|
||||
/// Actively usable module, you may only have one selected at a time.
|
||||
#define MODULE_ACTIVE 3
|
||||
|
||||
/// This module can be used while incapacitated
|
||||
#define MODULE_ALLOW_INCAPACITATED (1<<1)
|
||||
/// This module can be used while the suit is off
|
||||
#define MODULE_ALLOW_INACTIVE (1<<2)
|
||||
|
||||
//Defines used by the theme for clothing flags and similar
|
||||
#define CONTROL_LAYER "control_layer"
|
||||
#define HELMET_FLAGS "helmet_flags"
|
||||
#define CHESTPLATE_FLAGS "chestplate_flags"
|
||||
#define GAUNTLETS_FLAGS "gauntlets_flags"
|
||||
#define BOOTS_FLAGS "boots_flags"
|
||||
|
||||
#define UNSEALED_LAYER "unsealed_layer"
|
||||
#define UNSEALED_CLOTHING "unsealed_clothing"
|
||||
#define SEALED_CLOTHING "sealed_clothing"
|
||||
#define UNSEALED_INVISIBILITY "unsealed_invisibility"
|
||||
#define SEALED_INVISIBILITY "sealed_invisibility"
|
||||
#define UNSEALED_COVER "unsealed_cover"
|
||||
#define SEALED_COVER "sealed_cover"
|
||||
#define CAN_OVERSLOT "can_overslot"
|
||||
|
||||
//Defines used to override MOD clothing's icon and worn icon files in the skin.
|
||||
#define MOD_ICON_OVERRIDE "mod_icon_override"
|
||||
|
||||
@@ -61,10 +61,11 @@
|
||||
#define PREFTOGGLE_2_THOUGHT_BUBBLE (1<<14) // 16384
|
||||
#define PREFTOGGLE_2_MC_TABS (1<<15) // 32768
|
||||
#define PREFTOGGLE_2_DANCE_DISCO (1<<16) // 65536
|
||||
#define PREFTOGGLE_2_MOD_ACTIVATION_METHOD (1<<17) // 131072
|
||||
|
||||
#define TOGGLES_2_TOTAL 131072 // If you add or remove a preference toggle above, make sure you update this define with the total value of the toggles combined.
|
||||
#define TOGGLES_2_TOTAL 262144 // If you add or remove a preference toggle above, make sure you update this define with the total value of the toggles combined.
|
||||
|
||||
#define TOGGLES_2_DEFAULT (PREFTOGGLE_2_FANCYUI|PREFTOGGLE_2_ITEMATTACK|PREFTOGGLE_2_WINDOWFLASHING|PREFTOGGLE_2_RUNECHAT|PREFTOGGLE_2_DEATHMESSAGE|PREFTOGGLE_2_EMOTE_BUBBLE|PREFTOGGLE_2_SEE_ITEM_OUTLINES|PREFTOGGLE_2_THOUGHT_BUBBLE|PREFTOGGLE_2_DANCE_DISCO)
|
||||
#define TOGGLES_2_DEFAULT (PREFTOGGLE_2_FANCYUI|PREFTOGGLE_2_ITEMATTACK|PREFTOGGLE_2_WINDOWFLASHING|PREFTOGGLE_2_RUNECHAT|PREFTOGGLE_2_DEATHMESSAGE|PREFTOGGLE_2_EMOTE_BUBBLE|PREFTOGGLE_2_SEE_ITEM_OUTLINES|PREFTOGGLE_2_THOUGHT_BUBBLE|PREFTOGGLE_2_DANCE_DISCO|PREFTOGGLE_2_MOD_ACTIVATION_METHOD)
|
||||
|
||||
// Sanity checks
|
||||
#if TOGGLES_TOTAL > 16777215
|
||||
|
||||
@@ -155,6 +155,8 @@
|
||||
|
||||
#define STATUS_EFFECT_CHARGING /datum/status_effect/charging
|
||||
|
||||
#define STATUS_EFFECT_IMPACT_IMMUNE /datum/status_effect/impact_immune
|
||||
|
||||
//#define STATUS_EFFECT_SIGILMARK /datum/status_effect/sigil_mark
|
||||
|
||||
#define STATUS_EFFECT_CRUSHERDAMAGETRACKING /datum/status_effect/crusher_damage //tracks total kinetic crusher damage on a target
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
|
||||
//// COOLDOWN SYSTEMS
|
||||
/*
|
||||
* We have 2 cooldown systems: timer cooldowns (divided between stoppable and regular) and world.time cooldowns.
|
||||
*
|
||||
* When to use each?
|
||||
*
|
||||
* * Adding a commonly-checked cooldown, like on a subsystem to check for processing
|
||||
* * * Use the world.time ones, as they are cheaper.
|
||||
*
|
||||
* * Adding a rarely-used one for special situations, such as giving an uncommon item a cooldown on a target.
|
||||
* * * Timer cooldown, as adding a new variable on each mob to track the cooldown of said uncommon item is going too far.
|
||||
*
|
||||
* * Triggering events at the end of a cooldown.
|
||||
* * * Timer cooldown, registering to its signal.
|
||||
*
|
||||
* * Being able to check how long left for the cooldown to end.
|
||||
* * * Either world.time or stoppable timer cooldowns, depending on the other factors. Regular timer cooldowns do not support this.
|
||||
*
|
||||
* * Being able to stop the timer before it ends.
|
||||
* * * Either world.time or stoppable timer cooldowns, depending on the other factors. Regular timer cooldowns do not support this.
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Cooldown system based on an datum-level associative lazylist using timers.
|
||||
*/
|
||||
|
||||
|
||||
//Shared cooldowns for actions
|
||||
#define MOB_SHARED_COOLDOWN_1 (1<<0)
|
||||
#define MOB_SHARED_COOLDOWN_2 (1<<1)
|
||||
#define MOB_SHARED_COOLDOWN_3 (1<<2)
|
||||
|
||||
//TIMER COOLDOWN MACROS
|
||||
|
||||
#define COMSIG_CD_STOP(cd_index) "cooldown_[cd_index]"
|
||||
#define COMSIG_CD_RESET(cd_index) "cd_reset_[cd_index]"
|
||||
|
||||
#define TIMER_COOLDOWN_START(cd_source, cd_index, cd_time) LAZYSET(cd_source.cooldowns, cd_index, addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(end_cooldown), cd_source, cd_index), cd_time))
|
||||
|
||||
#define TIMER_COOLDOWN_CHECK(cd_source, cd_index) LAZYACCESS(cd_source.cooldowns, cd_index)
|
||||
|
||||
#define TIMER_COOLDOWN_END(cd_source, cd_index) LAZYREMOVE(cd_source.cooldowns, cd_index)
|
||||
|
||||
/*
|
||||
* Stoppable timer cooldowns.
|
||||
* Use indexes the same as the regular tiemr cooldowns.
|
||||
* They make use of the TIMER_COOLDOWN_CHECK() and TIMER_COOLDOWN_END() macros the same, just not the TIMER_COOLDOWN_START() one.
|
||||
* A bit more expensive than the regular timers, but can be reset before they end and the time left can be checked.
|
||||
*/
|
||||
|
||||
#define S_TIMER_COOLDOWN_START(cd_source, cd_index, cd_time) LAZYSET(cd_source.cooldowns, cd_index, addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(end_cooldown), cd_source, cd_index), cd_time, TIMER_STOPPABLE))
|
||||
|
||||
#define S_TIMER_COOLDOWN_RESET(cd_source, cd_index) reset_cooldown(cd_source, cd_index)
|
||||
|
||||
#define S_TIMER_COOLDOWN_TIMELEFT(cd_source, cd_index) (timeleft(TIMER_COOLDOWN_CHECK(cd_source, cd_index)))
|
||||
|
||||
|
||||
/*
|
||||
* Cooldown system based on storing world.time on a variable, plus the cooldown time.
|
||||
* Better performance over timer cooldowns, lower control. Same functionality.
|
||||
*/
|
||||
|
||||
#define COOLDOWN_DECLARE(cd_index) var/##cd_index = 0
|
||||
|
||||
#define STATIC_COOLDOWN_DECLARE(cd_index) var/static/##cd_index = 0
|
||||
|
||||
#define COOLDOWN_START(cd_source, cd_index, cd_time) (cd_source.cd_index = world.time + (cd_time))
|
||||
|
||||
//Returns true if the cooldown has run its course, false otherwise
|
||||
#define COOLDOWN_FINISHED(cd_source, cd_index) (cd_source.cd_index < world.time)
|
||||
|
||||
#define COOLDOWN_RESET(cd_source, cd_index) cd_source.cd_index = 0
|
||||
|
||||
#define COOLDOWN_TIMELEFT(cd_source, cd_index) (max(0, cd_source.cd_index - world.time))
|
||||
@@ -75,3 +75,9 @@
|
||||
|
||||
// Tesla coil
|
||||
#define WIRE_TESLACOIL_ZAP "Zap"
|
||||
|
||||
// MODsuits
|
||||
#define WIRE_HACK "Hack"
|
||||
#define WIRE_DISABLE "Disable"
|
||||
#define WIRE_INTERFACE "Interface"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user