diff --git a/_maps/map_files/Deltastation/DeltaStation2.dmm b/_maps/map_files/Deltastation/DeltaStation2.dmm index 831533dec81..f9443c9c35d 100644 --- a/_maps/map_files/Deltastation/DeltaStation2.dmm +++ b/_maps/map_files/Deltastation/DeltaStation2.dmm @@ -25385,13 +25385,13 @@ }, /obj/structure/table/reinforced, /obj/effect/turf_decal/bot, -/obj/item/mod/construction/core{ +/obj/item/mod/core/standard{ pixel_x = -4 }, -/obj/item/mod/construction/core{ +/obj/item/mod/core/standard{ pixel_x = 4 }, -/obj/item/mod/construction/core{ +/obj/item/mod/core/standard{ pixel_y = 4 }, /turf/open/floor/iron, diff --git a/_maps/map_files/IceBoxStation/IceBoxStation.dmm b/_maps/map_files/IceBoxStation/IceBoxStation.dmm index b585a71fd19..cba03f56cc5 100644 --- a/_maps/map_files/IceBoxStation/IceBoxStation.dmm +++ b/_maps/map_files/IceBoxStation/IceBoxStation.dmm @@ -6856,13 +6856,13 @@ /obj/effect/turf_decal/tile/red{ dir = 4 }, -/obj/item/mod/construction/core{ +/obj/item/mod/core/standard{ pixel_x = -4 }, -/obj/item/mod/construction/core{ +/obj/item/mod/core/standard{ pixel_x = 4 }, -/obj/item/mod/construction/core{ +/obj/item/mod/core/standard{ pixel_y = 4 }, /obj/structure/table, diff --git a/_maps/map_files/KiloStation/KiloStation.dmm b/_maps/map_files/KiloStation/KiloStation.dmm index a3a6514b031..624c368a087 100644 --- a/_maps/map_files/KiloStation/KiloStation.dmm +++ b/_maps/map_files/KiloStation/KiloStation.dmm @@ -9649,10 +9649,10 @@ /obj/machinery/ecto_sniffer{ pixel_x = -6 }, -/obj/item/mod/construction/core{ +/obj/item/mod/core/standard{ pixel_x = -4 }, -/obj/item/mod/construction/core{ +/obj/item/mod/core/standard{ pixel_x = 4 }, /turf/open/floor/iron/dark, diff --git a/_maps/map_files/MetaStation/MetaStation.dmm b/_maps/map_files/MetaStation/MetaStation.dmm index 28367a9bf23..6c821d3b611 100644 --- a/_maps/map_files/MetaStation/MetaStation.dmm +++ b/_maps/map_files/MetaStation/MetaStation.dmm @@ -29160,13 +29160,13 @@ name = "Robotics Privacy Control"; req_access_txt = "29" }, -/obj/item/mod/construction/core{ +/obj/item/mod/core/standard{ pixel_x = -4 }, -/obj/item/mod/construction/core{ +/obj/item/mod/core/standard{ pixel_x = 4 }, -/obj/item/mod/construction/core{ +/obj/item/mod/core/standard{ pixel_y = 4 }, /obj/structure/closet/crate/science{ diff --git a/code/__DEFINES/actions.dm b/code/__DEFINES/actions.dm new file mode 100644 index 00000000000..b4ee3d76e2c --- /dev/null +++ b/code/__DEFINES/actions.dm @@ -0,0 +1,11 @@ +///Action button checks if hands are unusable +#define AB_CHECK_HANDS_BLOCKED (1<<0) +///Action button checks if user is immobile +#define AB_CHECK_IMMOBILE (1<<1) +///Action button checks if user is resting +#define AB_CHECK_LYING (1<<2) +///Action button checks if user is conscious +#define AB_CHECK_CONSCIOUS (1<<3) + +///Action button triggered with right click +#define TRIGGER_SECONDARY_ACTION (1<<0) diff --git a/code/__DEFINES/dcs/signals/signals_mod.dm b/code/__DEFINES/dcs/signals/signals_mod.dm index ff60666a157..26a8f2b80c0 100644 --- a/code/__DEFINES/dcs/signals/signals_mod.dm +++ b/code/__DEFINES/dcs/signals/signals_mod.dm @@ -10,6 +10,12 @@ /// 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_MOD_MODULE_TRIGGERED "mod_module_triggered" +#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" diff --git a/code/__DEFINES/mod.dm b/code/__DEFINES/mod.dm index d92cfdc212e..1ffc12d601f 100644 --- a/code/__DEFINES/mod.dm +++ b/code/__DEFINES/mod.dm @@ -2,7 +2,7 @@ #define DEFAULT_MAX_COMPLEXITY 15 /// Default cell drain per process on MODsuits -#define DEFAULT_CELL_DRAIN 5 +#define DEFAULT_CHARGE_DRAIN 5 /// Default time for a part to seal #define MOD_ACTIVATION_STEP_TIME 2 SECONDS diff --git a/code/__HELPERS/roundend.dm b/code/__HELPERS/roundend.dm index 6486ebe619a..dab964915bd 100644 --- a/code/__HELPERS/roundend.dm +++ b/code/__HELPERS/roundend.dm @@ -643,7 +643,7 @@ name = "Show roundend report" button_icon_state = "round_end" -/datum/action/report/Trigger() +/datum/action/report/Trigger(trigger_flags) if(owner && GLOB.common_report && SSticker.current_state == GAME_STATE_FINISHED) SSticker.show_roundend_report(owner.client) diff --git a/code/_onclick/hud/action_button.dm b/code/_onclick/hud/action_button.dm index 94c8c461997..ffd1a480b12 100644 --- a/code/_onclick/hud/action_button.dm +++ b/code/_onclick/hud/action_button.dm @@ -64,7 +64,10 @@ if(usr.next_click > world.time) return usr.next_click = world.time + 1 - linked_action.Trigger() + var/trigger_flags + if(LAZYACCESS(modifiers, RIGHT_CLICK)) + trigger_flags |= TRIGGER_SECONDARY_ACTION + linked_action.Trigger(trigger_flags = trigger_flags) return TRUE //Hide/Show Action Buttons ... Button diff --git a/code/_onclick/hud/alert.dm b/code/_onclick/hud/alert.dm index 07e044ecd3a..b1f5e3be100 100644 --- a/code/_onclick/hud/alert.dm +++ b/code/_onclick/hud/alert.dm @@ -629,6 +629,12 @@ Recharging stations are available in robotics, the dormitory bathrooms, and the desc = "Your charge is running dangerously high, find an outlet for your energy! Right click an APC while not in combat mode." icon_state = "cell_overcharge" +//MODsuit unique +/atom/movable/screen/alert/nocore + name = "Missing Core" + desc = "Unit has no core. No modules available until a core is reinstalled. Robotics may provide assistance." + icon_state = "no_cell" + //Need to cover all use cases - emag, illegal upgrade module, malf AI hack, traitor cyborg /atom/movable/screen/alert/hacked name = "Hacked" diff --git a/code/controllers/subsystem/vote.dm b/code/controllers/subsystem/vote.dm index 4e649795ab8..250479d85d7 100644 --- a/code/controllers/subsystem/vote.dm +++ b/code/controllers/subsystem/vote.dm @@ -313,7 +313,7 @@ SUBSYSTEM_DEF(vote) name = "Vote!" button_icon_state = "vote" -/datum/action/vote/Trigger() +/datum/action/vote/Trigger(trigger_flags) if(owner) owner.vote() remove_from_client() diff --git a/code/datums/action.dm b/code/datums/action.dm index ec8c09b0970..caa0b66d967 100644 --- a/code/datums/action.dm +++ b/code/datums/action.dm @@ -1,8 +1,3 @@ -#define AB_CHECK_HANDS_BLOCKED (1<<0) -#define AB_CHECK_IMMOBILE (1<<1) -#define AB_CHECK_LYING (1<<2) -#define AB_CHECK_CONSCIOUS (1<<3) - /datum/action var/name = "Generic Action" var/desc @@ -105,7 +100,7 @@ button.locked = FALSE button.id = null -/datum/action/proc/Trigger() +/datum/action/proc/Trigger(trigger_flags) if(!IsAvailable()) return FALSE if(SEND_SIGNAL(src, COMSIG_ACTION_TRIGGER, src) & COMPONENT_ACTION_BLOCK_TRIGGER) @@ -204,7 +199,7 @@ UNSETEMPTY(I.actions) return ..() -/datum/action/item_action/Trigger() +/datum/action/item_action/Trigger(trigger_flags) . = ..() if(!.) return FALSE @@ -233,7 +228,7 @@ /datum/action/item_action/toggle_light name = "Toggle Light" -/datum/action/item_action/toggle_light/Trigger() +/datum/action/item_action/toggle_light/Trigger(trigger_flags) if(istype(target, /obj/item/pda)) var/obj/item/pda/P = target P.toggle_light(owner) @@ -299,7 +294,7 @@ /datum/action/item_action/toggle_welding_screen name = "Toggle Welding Screen" -/datum/action/item_action/toggle_welding_screen/Trigger() +/datum/action/item_action/toggle_welding_screen/Trigger(trigger_flags) var/obj/item/clothing/head/hardhat/weldhat/H = target if(istype(H)) H.toggle_welding_screen(owner) @@ -307,7 +302,7 @@ /datum/action/item_action/toggle_welding_screen/plasmaman name = "Toggle Welding Screen" -/datum/action/item_action/toggle_welding_screen/plasmaman/Trigger() +/datum/action/item_action/toggle_welding_screen/plasmaman/Trigger(trigger_flags) var/obj/item/clothing/head/helmet/space/plasmaman/H = target if(istype(H)) H.toggle_welding_screen(owner) @@ -325,7 +320,7 @@ UnregisterSignal(target, COMSIG_SUIT_SPACE_TOGGLE) return ..() -/datum/action/item_action/toggle_spacesuit/Trigger() +/datum/action/item_action/toggle_spacesuit/Trigger(trigger_flags) var/obj/item/clothing/suit/space/suit = target if(!istype(suit)) return @@ -362,7 +357,7 @@ button_icon_state = "berserk_mode" background_icon_state = "bg_demon" -/datum/action/item_action/berserk_mode/Trigger() +/datum/action/item_action/berserk_mode/Trigger(trigger_flags) if(istype(target, /obj/item/clothing/head/hooded/berserker)) var/obj/item/clothing/head/hooded/berserker/berzerk = target if(berzerk.berserk_active) @@ -410,7 +405,7 @@ if(istype(Target, /obj/item/picket_sign)) S = Target -/datum/action/item_action/nano_picket_sign/Trigger() +/datum/action/item_action/nano_picket_sign/Trigger(trigger_flags) if(istype(S)) S.retext(owner) @@ -462,7 +457,7 @@ button_icon_state = "scan_mode" var/active = FALSE -/datum/action/item_action/toggle_research_scanner/Trigger() +/datum/action/item_action/toggle_research_scanner/Trigger(trigger_flags) if(IsAvailable()) active = !active if(active) @@ -482,7 +477,7 @@ name = "Use Instrument" desc = "Use the instrument specified" -/datum/action/item_action/instrument/Trigger() +/datum/action/item_action/instrument/Trigger(trigger_flags) if(istype(target, /obj/item/instrument)) var/obj/item/instrument/I = target I.interact(usr) @@ -531,7 +526,7 @@ button.screen_loc = "6:157,4:-2" button.moved = "6:157,4:-2" -/datum/action/item_action/cult_dagger/Trigger() +/datum/action/item_action/cult_dagger/Trigger(trigger_flags) for(var/obj/item/held_item as anything in owner.held_items) // In case we were already holding a dagger if(istype(held_item, /obj/item/melee/cultblade/dagger)) held_item.attack_self(owner) @@ -567,7 +562,7 @@ COOLDOWN_DECLARE(box_cooldown) ///Handles opening and closing the box. -/datum/action/item_action/agent_box/Trigger() +/datum/action/item_action/agent_box/Trigger(trigger_flags) . = ..() if(!.) return FALSE @@ -631,7 +626,7 @@ S.action = null return ..() -/datum/action/spell_action/Trigger() +/datum/action/spell_action/Trigger(trigger_flags) if(!..()) return FALSE if(target) @@ -671,7 +666,7 @@ check_flags = NONE var/active = 0 -/datum/action/innate/Trigger() +/datum/action/innate/Trigger(trigger_flags) if(!..()) return FALSE if(!active) @@ -733,7 +728,7 @@ UpdateButtonIcon() START_PROCESSING(SSfastprocess, src) -/datum/action/cooldown/Trigger(atom/target) +/datum/action/cooldown/Trigger(trigger_flags, atom/target) . = ..() if(!.) return @@ -845,7 +840,7 @@ button_icon_state = "language_menu" check_flags = NONE -/datum/action/language_menu/Trigger() +/datum/action/language_menu/Trigger(trigger_flags) if(!..()) return FALSE if(ismob(owner)) @@ -903,7 +898,7 @@ small_icon_state = "arachnid_mini" background_icon_state = "bg_demon" -/datum/action/small_sprite/Trigger() +/datum/action/small_sprite/Trigger(trigger_flags) ..() if(!small) var/image/I = image(icon = small_icon, icon_state = small_icon_state, loc = owner) diff --git a/code/datums/components/crafting/recipes.dm b/code/datums/components/crafting/recipes.dm index ba0b15a4ac8..f889933fb83 100644 --- a/code/datums/components/crafting/recipes.dm +++ b/code/datums/components/crafting/recipes.dm @@ -1216,14 +1216,27 @@ category = CAT_MISC /datum/crafting_recipe/mod_core - name = "MOD core" - result = /obj/item/mod/construction/core + name = "MOD core (Standard)" + result = /obj/item/mod/core/standard tool_behaviors = list(TOOL_SCREWDRIVER) time = 10 SECONDS reqs = list(/obj/item/stack/cable_coil = 5, /obj/item/stack/rods = 2, /obj/item/stack/sheet/glass = 1, - /obj/item/organ/heart/ethereal = 1 + /obj/item/organ/heart/ethereal = 1, + ) + category = CAT_MISC + +/datum/crafting_recipe/mod_core + name = "MOD core (Ethereal)" + result = /obj/item/mod/core/ethereal + tool_behaviors = list(TOOL_SCREWDRIVER) + time = 10 SECONDS + reqs = list(/datum/reagent/consumable/liquidelectricity = 5, + /obj/item/stack/cable_coil = 5, + /obj/item/stack/rods = 2, + /obj/item/stack/sheet/glass = 1, + /obj/item/reagent_containers/syringe = 1, ) category = CAT_MISC diff --git a/code/datums/martial/krav_maga.dm b/code/datums/martial/krav_maga.dm index beee30a9074..df491f5a0f7 100644 --- a/code/datums/martial/krav_maga.dm +++ b/code/datums/martial/krav_maga.dm @@ -10,7 +10,7 @@ icon_icon = 'icons/mob/actions/actions_items.dmi' button_icon_state = "neckchop" -/datum/action/neck_chop/Trigger() +/datum/action/neck_chop/Trigger(trigger_flags) if(owner.incapacitated()) to_chat(owner, span_warning("You can't use [name] while you're incapacitated.")) return @@ -26,7 +26,7 @@ icon_icon = 'icons/mob/actions/actions_items.dmi' button_icon_state = "legsweep" -/datum/action/leg_sweep/Trigger() +/datum/action/leg_sweep/Trigger(trigger_flags) if(owner.incapacitated()) to_chat(owner, span_warning("You can't use [name] while you're incapacitated.")) return @@ -42,7 +42,7 @@ icon_icon = 'icons/mob/actions/actions_items.dmi' button_icon_state = "lungpunch" -/datum/action/lung_punch/Trigger() +/datum/action/lung_punch/Trigger(trigger_flags) if(owner.incapacitated()) to_chat(owner, span_warning("You can't use [name] while you're incapacitated.")) return diff --git a/code/datums/martial/wrestling.dm b/code/datums/martial/wrestling.dm index d8c4d2b3063..2ebece40d3b 100644 --- a/code/datums/martial/wrestling.dm +++ b/code/datums/martial/wrestling.dm @@ -52,7 +52,7 @@ If you make a derivative work from this code, you must include this notification name = "Slam (Cinch) - Slam a grappled opponent into the floor." button_icon_state = "wrassle_slam" -/datum/action/slam/Trigger() +/datum/action/slam/Trigger(trigger_flags) if(owner.incapacitated()) to_chat(owner, span_warning("You can't WRESTLE while you're OUT FOR THE COUNT.")) return @@ -63,7 +63,7 @@ If you make a derivative work from this code, you must include this notification name = "Throw (Cinch) - Spin a cinched opponent around and throw them." button_icon_state = "wrassle_throw" -/datum/action/throw_wrassle/Trigger() +/datum/action/throw_wrassle/Trigger(trigger_flags) if(owner.incapacitated()) to_chat(owner, span_warning("You can't WRESTLE while you're OUT FOR THE COUNT.")) return @@ -74,7 +74,7 @@ If you make a derivative work from this code, you must include this notification name = "Kick - A powerful kick, sends people flying away from you. Also useful for escaping from bad situations." button_icon_state = "wrassle_kick" -/datum/action/kick/Trigger() +/datum/action/kick/Trigger(trigger_flags) if(owner.incapacitated()) to_chat(owner, span_warning("You can't WRESTLE while you're OUT FOR THE COUNT.")) return @@ -85,7 +85,7 @@ If you make a derivative work from this code, you must include this notification name = "Strike - Hit a neaby opponent with a quick attack." button_icon_state = "wrassle_strike" -/datum/action/strike/Trigger() +/datum/action/strike/Trigger(trigger_flags) if(owner.incapacitated()) to_chat(owner, span_warning("You can't WRESTLE while you're OUT FOR THE COUNT.")) return @@ -96,7 +96,7 @@ If you make a derivative work from this code, you must include this notification name = "Drop - Smash down onto an opponent." button_icon_state = "wrassle_drop" -/datum/action/drop/Trigger() +/datum/action/drop/Trigger(trigger_flags) if(owner.incapacitated()) to_chat(owner, span_warning("You can't WRESTLE while you're OUT FOR THE COUNT.")) return diff --git a/code/game/machinery/porta_turret/portable_turret.dm b/code/game/machinery/porta_turret/portable_turret.dm index 2f4c7aa70c2..840e40c3d9a 100644 --- a/code/game/machinery/porta_turret/portable_turret.dm +++ b/code/game/machinery/porta_turret/portable_turret.dm @@ -645,7 +645,7 @@ DEFINE_BITFIELD(turret_flags, list( icon_icon = 'icons/mob/actions/actions_mecha.dmi' button_icon_state = "mech_cycle_equip_off" -/datum/action/turret_toggle/Trigger() +/datum/action/turret_toggle/Trigger(trigger_flags) var/obj/machinery/porta_turret/P = target if(!istype(P)) return @@ -656,7 +656,7 @@ DEFINE_BITFIELD(turret_flags, list( icon_icon = 'icons/mob/actions/actions_mecha.dmi' button_icon_state = "mech_eject" -/datum/action/turret_quit/Trigger() +/datum/action/turret_quit/Trigger(trigger_flags) var/obj/machinery/porta_turret/P = target if(!istype(P)) return diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index 46151d3194e..eeee11af9d2 100644 --- a/code/game/machinery/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage_unit.dm @@ -431,11 +431,9 @@ return cell = suit.cell else if(mod) - if(!istype(mod)) + cell = mod.get_charge_source() + if(!istype(cell)) return - if(!mod.cell) - return - cell = mod.cell else return use_power(charge_rate * delta_time) diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm index 5fc5cd2d37f..d6fe09c8088 100644 --- a/code/game/objects/items/crayons.dm +++ b/code/game/objects/items/crayons.dm @@ -817,6 +817,9 @@ return SECONDARY_ATTACK_CONTINUE_CHAIN +/obj/item/toy/crayon/spraycan/attackby_storage_insert(datum/component/storage, atom/storage_holder, mob/user) + return is_capped + /obj/item/toy/crayon/spraycan/update_icon_state() icon_state = is_capped ? icon_capped : icon_uncapped return ..() diff --git a/code/game/objects/items/devices/multitool.dm b/code/game/objects/items/devices/multitool.dm index 3ec5a92c6f9..7aa675e3cde 100644 --- a/code/game/objects/items/devices/multitool.dm +++ b/code/game/objects/items/devices/multitool.dm @@ -154,7 +154,7 @@ name = "Toggle AI detector HUD" check_flags = NONE -/datum/action/item_action/toggle_multitool/Trigger() +/datum/action/item_action/toggle_multitool/Trigger(trigger_flags) if(!..()) return FALSE if(target) diff --git a/code/modules/antagonists/_common/antag_datum.dm b/code/modules/antagonists/_common/antag_datum.dm index d7fb789734a..19b5aca1f33 100644 --- a/code/modules/antagonists/_common/antag_datum.dm +++ b/code/modules/antagonists/_common/antag_datum.dm @@ -488,7 +488,7 @@ GLOBAL_LIST_EMPTY(antagonists) . = ..() name += " [target]" -/datum/action/antag_info/Trigger() +/datum/action/antag_info/Trigger(trigger_flags) . = ..() if(!.) return diff --git a/code/modules/antagonists/changeling/changeling_power.dm b/code/modules/antagonists/changeling/changeling_power.dm index cb35f799ef8..dd9ca14309b 100644 --- a/code/modules/antagonists/changeling/changeling_power.dm +++ b/code/modules/antagonists/changeling/changeling_power.dm @@ -30,7 +30,7 @@ the same goes for Remove(). if you override Remove(), call parent or else your p if(needs_button) Grant(user)//how powers are added rather than the checks in mob.dm -/datum/action/changeling/Trigger() +/datum/action/changeling/Trigger(trigger_flags) var/mob/user = owner if(!user || !user.mind || !user.mind.has_antag_datum(/datum/antagonist/changeling)) return diff --git a/code/modules/antagonists/changeling/powers/tiny_prick.dm b/code/modules/antagonists/changeling/powers/tiny_prick.dm index effb2b645d1..3841e2ae6d9 100644 --- a/code/modules/antagonists/changeling/powers/tiny_prick.dm +++ b/code/modules/antagonists/changeling/powers/tiny_prick.dm @@ -2,7 +2,7 @@ name = "Tiny Prick" desc = "Stabby stabby" -/datum/action/changeling/sting/Trigger() +/datum/action/changeling/sting/Trigger(trigger_flags) var/mob/user = owner if(!user || !user.mind) return @@ -72,7 +72,7 @@ dna_cost = 3 var/datum/changeling_profile/selected_dna = null -/datum/action/changeling/sting/transformation/Trigger() +/datum/action/changeling/sting/transformation/Trigger(trigger_flags) var/mob/user = usr var/datum/antagonist/changeling/changeling = user.mind.has_antag_datum(/datum/antagonist/changeling) if(changeling.chosen_sting) diff --git a/code/modules/antagonists/traitor/equipment/Malf_Modules.dm b/code/modules/antagonists/traitor/equipment/Malf_Modules.dm index 4857b371825..88fbc34a969 100644 --- a/code/modules/antagonists/traitor/equipment/Malf_Modules.dm +++ b/code/modules/antagonists/traitor/equipment/Malf_Modules.dm @@ -69,7 +69,7 @@ GLOBAL_LIST_INIT(malf_modules, subtypesof(/datum/ai_module)) if(owner_AI && owner_AI.malf_cooldown > world.time) return -/datum/action/innate/ai/Trigger() +/datum/action/innate/ai/Trigger(trigger_flags) . = ..() if(auto_use_uses) adjust_uses(-1) diff --git a/code/modules/cargo/packs.dm b/code/modules/cargo/packs.dm index 30f3af6af5b..65e6ceb4133 100644 --- a/code/modules/cargo/packs.dm +++ b/code/modules/cargo/packs.dm @@ -1462,9 +1462,9 @@ cost = CARGO_CRATE_VALUE * 3 access = ACCESS_ROBOTICS access_view = ACCESS_ROBOTICS - contains = list(/obj/item/mod/construction/core, - /obj/item/mod/construction/core, - /obj/item/mod/construction/core) + contains = list(/obj/item/mod/core/standard, + /obj/item/mod/core/standard, + /obj/item/mod/core/standard) crate_name = "MOD core crate" crate_type = /obj/structure/closet/crate/secure/science diff --git a/code/modules/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm index 3c5f7c6b62e..419603d2720 100644 --- a/code/modules/clothing/chameleon.dm +++ b/code/modules/clothing/chameleon.dm @@ -5,7 +5,7 @@ icon_icon = 'icons/mob/actions/actions_items.dmi' button_icon_state = "random" -/datum/action/item_action/chameleon/drone/randomise/Trigger() +/datum/action/item_action/chameleon/drone/randomise/Trigger(trigger_flags) if(!IsAvailable()) return @@ -32,7 +32,7 @@ if (istype(target, /obj/item/clothing/mask/chameleon/drone)) button_icon_state = "drone_camogear_mask" -/datum/action/item_action/chameleon/drone/togglehatmask/Trigger() +/datum/action/item_action/chameleon/drone/togglehatmask/Trigger(trigger_flags) if(!IsAvailable()) return @@ -87,7 +87,7 @@ sortTim(standard_outfit_options, /proc/cmp_text_asc) outfit_options = standard_outfit_options -/datum/action/chameleon_outfit/Trigger() +/datum/action/chameleon_outfit/Trigger(trigger_flags) return select_outfit(owner) /datum/action/chameleon_outfit/proc/select_outfit(mob/user) @@ -240,7 +240,7 @@ else atom_target.icon = initial(picked_item.icon) -/datum/action/item_action/chameleon/change/Trigger() +/datum/action/item_action/chameleon/change/Trigger(trigger_flags) if(!IsAvailable()) return diff --git a/code/modules/clothing/outfits/standard.dm b/code/modules/clothing/outfits/standard.dm index 9d7f28167e5..8d2b1734b34 100644 --- a/code/modules/clothing/outfits/standard.dm +++ b/code/modules/clothing/outfits/standard.dm @@ -402,12 +402,12 @@ uniform = /obj/item/clothing/under/color/white suit_store = /obj/item/tank/internals/oxygen mask = /obj/item/clothing/mask/breath - back = /obj/item/mod/control/pre_equipped/timeline + back = /obj/item/mod/control/pre_equipped/chrono /datum/outfit/chrono_agent/post_equip(mob/living/carbon/human/agent, visualsOnly) . = ..() - var/obj/item/mod/control/pre_equipped/timeline = agent.back - var/obj/item/mod/module/eradication_lock/lock = locate(/obj/item/mod/module/eradication_lock) in timeline.modules + var/obj/item/mod/control/mod = agent.back + var/obj/item/mod/module/eradication_lock/lock = locate(/obj/item/mod/module/eradication_lock) in mod.modules lock.true_owner_ckey = agent.ckey /datum/outfit/debug //Debug objs plus MODsuit diff --git a/code/modules/detectivework/scanner.dm b/code/modules/detectivework/scanner.dm index 04d92cfb662..f3af29917d6 100644 --- a/code/modules/detectivework/scanner.dm +++ b/code/modules/detectivework/scanner.dm @@ -25,7 +25,7 @@ /datum/action/item_action/display_detective_scan_results name = "Display Forensic Scanner Results" -/datum/action/item_action/display_detective_scan_results/Trigger() +/datum/action/item_action/display_detective_scan_results/Trigger(trigger_flags) var/obj/item/detective_scanner/scanner = target if(istype(scanner)) scanner.displayDetectiveScanResults(usr) diff --git a/code/modules/mining/lavaland/tendril_loot.dm b/code/modules/mining/lavaland/tendril_loot.dm index ccc5be638fd..8738b7d7ac6 100644 --- a/code/modules/mining/lavaland/tendril_loot.dm +++ b/code/modules/mining/lavaland/tendril_loot.dm @@ -200,7 +200,7 @@ name = "Memento Mori" desc = "Bind your life to the pendant." -/datum/action/item_action/hands_free/memento_mori/Trigger() +/datum/action/item_action/hands_free/memento_mori/Trigger(trigger_flags) var/obj/item/clothing/neck/necklace/memento_mori/MM = target if(!MM.active_owner) if(ishuman(owner)) @@ -633,7 +633,6 @@ . += span_notice("Berserk mode is [berserk_charge]% charged.") /obj/item/clothing/head/hooded/berserker/process(delta_time) - . = ..() if(berserk_active) berserk_charge = clamp(berserk_charge - CHARGE_DRAINED_PER_SECOND * delta_time, 0, MAX_BERSERK_CHARGE) if(!berserk_charge) diff --git a/code/modules/mob/living/carbon/human/species_types/dullahan.dm b/code/modules/mob/living/carbon/human/species_types/dullahan.dm index bccbfb9d153..fa138083f80 100644 --- a/code/modules/mob/living/carbon/human/species_types/dullahan.dm +++ b/code/modules/mob/living/carbon/human/species_types/dullahan.dm @@ -143,7 +143,7 @@ name = "Toggle Perspective" desc = "Switch between seeing normally from your head, or blindly from your body." -/datum/action/item_action/organ_action/dullahan/Trigger() +/datum/action/item_action/organ_action/dullahan/Trigger(trigger_flags) . = ..() var/obj/item/organ/eyes/dullahan/dullahan_eyes = target dullahan_eyes.tint = dullahan_eyes.tint ? NONE : INFINITY diff --git a/code/modules/mob/living/carbon/human/species_types/vampire.dm b/code/modules/mob/living/carbon/human/species_types/vampire.dm index 48b8e6758cb..d981c6f0425 100644 --- a/code/modules/mob/living/carbon/human/species_types/vampire.dm +++ b/code/modules/mob/living/carbon/human/species_types/vampire.dm @@ -85,7 +85,7 @@ name = "Drain Victim" desc = "Leech blood from any carbon victim you are passively grabbing." -/datum/action/item_action/organ_action/vampire/Trigger() +/datum/action/item_action/organ_action/vampire/Trigger(trigger_flags) . = ..() if(iscarbon(owner)) var/mob/living/carbon/H = owner diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index bad54cf1681..d6b98ecd04b 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -961,7 +961,7 @@ icon_icon = 'icons/mob/actions/actions_AI.dmi' button_icon_state = "ai_shell" -/datum/action/innate/deploy_shell/Trigger() +/datum/action/innate/deploy_shell/Trigger(trigger_flags) var/mob/living/silicon/ai/AI = owner if(!AI) return @@ -974,7 +974,7 @@ button_icon_state = "ai_last_shell" var/mob/living/silicon/robot/last_used_shell -/datum/action/innate/deploy_last_shell/Trigger() +/datum/action/innate/deploy_last_shell/Trigger(trigger_flags) if(!owner) return if(last_used_shell) diff --git a/code/modules/mob/living/silicon/pai/pai_actions.dm b/code/modules/mob/living/silicon/pai/pai_actions.dm index c6e92cea578..cd1015d2506 100644 --- a/code/modules/mob/living/silicon/pai/pai_actions.dm +++ b/code/modules/mob/living/silicon/pai/pai_actions.dm @@ -3,7 +3,7 @@ icon_icon = 'icons/mob/actions/actions_silicon.dmi' var/mob/living/silicon/pai/pai_owner -/datum/action/innate/pai/Trigger() +/datum/action/innate/pai/Trigger(trigger_flags) if(!ispAI(owner)) return FALSE pai_owner = owner @@ -13,7 +13,7 @@ button_icon_state = "pai" background_icon_state = "bg_tech" -/datum/action/innate/pai/software/Trigger() +/datum/action/innate/pai/software/Trigger(trigger_flags) ..() pai_owner.ui_act() @@ -22,7 +22,7 @@ button_icon_state = "pai_holoform" background_icon_state = "bg_tech" -/datum/action/innate/pai/shell/Trigger() +/datum/action/innate/pai/shell/Trigger(trigger_flags) ..() if(pai_owner.holoform) pai_owner.fold_in(0) @@ -34,7 +34,7 @@ button_icon_state = "pai_chassis" background_icon_state = "bg_tech" -/datum/action/innate/pai/chassis/Trigger() +/datum/action/innate/pai/chassis/Trigger(trigger_flags) ..() pai_owner.choose_chassis() @@ -43,7 +43,7 @@ button_icon_state = "pai_rest" background_icon_state = "bg_tech" -/datum/action/innate/pai/rest/Trigger() +/datum/action/innate/pai/rest/Trigger(trigger_flags) ..() pai_owner.toggle_resting() @@ -53,6 +53,6 @@ button_icon_state = "emp" background_icon_state = "bg_tech" -/datum/action/innate/pai/light/Trigger() +/datum/action/innate/pai/light/Trigger(trigger_flags) ..() pai_owner.toggle_integrated_light() diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 5462e589087..439cc41c2b6 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -854,7 +854,7 @@ icon_icon = 'icons/mob/actions/actions_AI.dmi' button_icon_state = "ai_core" -/datum/action/innate/undeployment/Trigger() +/datum/action/innate/undeployment/Trigger(trigger_flags) if(!..()) return FALSE var/mob/living/silicon/robot/R = owner diff --git a/code/modules/mob/living/simple_animal/hostile/bosses/boss.dm b/code/modules/mob/living/simple_animal/hostile/bosses/boss.dm index 9dfeb167a7f..5ecdf09d6ec 100644 --- a/code/modules/mob/living/simple_animal/hostile/bosses/boss.dm +++ b/code/modules/mob/living/simple_animal/hostile/bosses/boss.dm @@ -52,7 +52,7 @@ var/needs_target = TRUE //Does the boss need to have a target? (Only matters for the AI) var/say_when_triggered = "" //What does the boss Say() when the ability triggers? -/datum/action/boss/Trigger() +/datum/action/boss/Trigger(trigger_flags) . = ..() if(!.) return @@ -73,7 +73,7 @@ //Example: /* -/datum/action/boss/selfgib/Trigger() +/datum/action/boss/selfgib/Trigger(trigger_flags) if(..()) boss.gib() */ diff --git a/code/modules/mob/living/simple_animal/hostile/bosses/paperwizard.dm b/code/modules/mob/living/simple_animal/hostile/bosses/paperwizard.dm index 5067643bc37..9c33f8ba0be 100644 --- a/code/modules/mob/living/simple_animal/hostile/bosses/paperwizard.dm +++ b/code/modules/mob/living/simple_animal/hostile/bosses/paperwizard.dm @@ -55,7 +55,7 @@ return FALSE return TRUE -/datum/action/boss/wizard_summon_minions/Trigger() +/datum/action/boss/wizard_summon_minions/Trigger(trigger_flags) . = ..() if(!.) return @@ -91,7 +91,7 @@ boss_type = /mob/living/simple_animal/hostile/boss/paper_wizard say_when_triggered = "" -/datum/action/boss/wizard_mimic/Trigger() +/datum/action/boss/wizard_mimic/Trigger(trigger_flags) if(..()) var/mob/living/target if(!boss.client) //AI's target diff --git a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm index 6caf0506c71..880c6691f98 100644 --- a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm +++ b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm @@ -211,7 +211,7 @@ /mob/living/simple_animal/hostile/giant_spider/tarantula/OpenFire() if(client) return - charge.Trigger(target) + charge.Trigger(target = target) /mob/living/simple_animal/hostile/giant_spider/tarantula/Moved(atom/oldloc, dir) . = ..() @@ -530,7 +530,7 @@ return FALSE return TRUE -/datum/action/innate/spider/comm/Trigger() +/datum/action/innate/spider/comm/Trigger(trigger_flags) var/input = tgui_input_text(owner, "Input a command for your legions to follow.", "Command") if(QDELETED(src) || !input || !IsAvailable()) return FALSE diff --git a/code/modules/mob/living/simple_animal/hostile/mecha_pilot.dm b/code/modules/mob/living/simple_animal/hostile/mecha_pilot.dm index 1fbc7cd6471..2b653064b79 100644 --- a/code/modules/mob/living/simple_animal/hostile/mecha_pilot.dm +++ b/code/modules/mob/living/simple_animal/hostile/mecha_pilot.dm @@ -88,8 +88,8 @@ wanted_objects = list() search_objects = 0 if(LAZYACCESSASSOC(mecha.occupant_actions, src, /datum/action/vehicle/sealed/mecha/mech_defense_mode) && !mecha.defense_mode) - var/datum/action/action = mecha.occupant_actions[src][/datum/action/vehicle/sealed/mecha/mech_defense_mode] - action.Trigger(TRUE) + var/datum/action/vehicle/sealed/mecha/mech_defense_mode/action = mecha.occupant_actions[src][/datum/action/vehicle/sealed/mecha/mech_defense_mode] + action.Trigger(forced_state = TRUE) /mob/living/simple_animal/hostile/syndicate/mecha_pilot/proc/exit_mecha(obj/vehicle/sealed/mecha/M) if(!M) @@ -229,16 +229,16 @@ if(mecha.get_integrity() < mecha.max_integrity*0.25) if(prob(defense_mode_chance)) if(LAZYACCESSASSOC(mecha.occupant_actions, src, /datum/action/vehicle/sealed/mecha/mech_defense_mode) && !mecha.defense_mode) - var/datum/action/action = mecha.occupant_actions[src][/datum/action/vehicle/sealed/mecha/mech_defense_mode] - action.Trigger(TRUE) + var/datum/action/vehicle/sealed/mecha/mech_defense_mode/action = mecha.occupant_actions[src][/datum/action/vehicle/sealed/mecha/mech_defense_mode] + action.Trigger(forced_state = TRUE) addtimer(CALLBACK(action, /datum/action/vehicle/sealed/mecha/mech_defense_mode.proc/Trigger, FALSE), 100) //10 seconds of defense, then toggle off else if(prob(retreat_chance)) //Speed boost if possible if(LAZYACCESSASSOC(mecha.occupant_actions, src, /datum/action/vehicle/sealed/mecha/mech_overload_mode) && !mecha.leg_overload_mode) - var/datum/action/action = mecha.occupant_actions[src][/datum/action/vehicle/sealed/mecha/mech_overload_mode] + var/datum/action/vehicle/sealed/mecha/mech_overload_mode/action = mecha.occupant_actions[src][/datum/action/vehicle/sealed/mecha/mech_overload_mode] mecha.leg_overload_mode = FALSE - action.Trigger(TRUE) + action.Trigger(forced_state = TRUE) addtimer(CALLBACK(action, /datum/action/vehicle/sealed/mecha/mech_overload_mode.proc/Trigger, FALSE), 100) //10 seconds of speeeeed, then toggle off retreat_distance = 50 diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm index 7bb0e4abc13..a48d9c4c617 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm @@ -82,12 +82,12 @@ Difficulty: Medium Goto(target, move_to_delay, minimum_distance) if(get_dist(src, target) > 4) - if(dash.Trigger(target)) + if(dash.Trigger(target = target)) kinetic_accelerator.StartCooldown(0) - kinetic_accelerator.Trigger(target) + kinetic_accelerator.Trigger(target = target) else - kinetic_accelerator.Trigger(target) - transform_weapon.Trigger(target) + kinetic_accelerator.Trigger(target = target) + transform_weapon.Trigger(target = target) /obj/item/melee/cleaving_saw/miner //nerfed saw because it is very murdery force = 6 @@ -121,7 +121,7 @@ Difficulty: Medium return ..() /mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/ex_act(severity, target) - if(dash.Trigger(target)) + if(dash.Trigger(target = target)) return FALSE return ..() diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm index 463199a684c..9a7d253e03c 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm @@ -119,15 +119,15 @@ Difficulty: Hard return if(!try_bloodattack() || prob(25 + anger_modifier)) - blood_warp.Trigger(target) + blood_warp.Trigger(target = target) if(!BUBBLEGUM_SMASH) - triple_charge.Trigger(target) + triple_charge.Trigger(target = target) else if(prob(50 + anger_modifier)) - hallucination_charge.Trigger(target) + hallucination_charge.Trigger(target = target) else - hallucination_charge_surround.Trigger(target) + hallucination_charge_surround.Trigger(target = target) /mob/living/simple_animal/hostile/megafauna/bubblegum/proc/get_mobs_on_blood(mob/target) var/list/targets = list(target) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm index d706eaa40a1..90312136a16 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm @@ -104,14 +104,14 @@ move_to_delay = initial(move_to_delay) if(prob(20+anger_modifier)) //Major attack - spiral_shots.Trigger(target) + spiral_shots.Trigger(target = target) else if(prob(20)) - random_shots.Trigger(target) + random_shots.Trigger(target = target) else if(prob(70)) - shotgun_blast.Trigger(target) + shotgun_blast.Trigger(target = target) else - dir_shots.Trigger(target) + dir_shots.Trigger(target = target) /mob/living/simple_animal/hostile/megafauna/colossus/proc/telegraph() for(var/mob/M in range(10,src)) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/demonic_frost_miner.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/demonic_frost_miner.dm index 80381f13ae9..f4eb72fb123 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/demonic_frost_miner.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/demonic_frost_miner.dm @@ -86,31 +86,31 @@ Difficulty: Extremely Hard if(easy_attack) frost_orbs.shot_count = 8 frost_orbs.shot_delay = 10 - frost_orbs.Trigger(target) + frost_orbs.Trigger(target = target) else frost_orbs.shot_count = 16 frost_orbs.shot_delay = 5 - frost_orbs.Trigger(target) + frost_orbs.Trigger(target = target) if(2) if(easy_attack) snowball_machine_gun.shot_count = 60 snowball_machine_gun.default_projectile_spread = 45 - snowball_machine_gun.Trigger(target) + snowball_machine_gun.Trigger(target = target) else if(ice_shotgun.IsAvailable()) ice_shotgun.shot_angles = list(list(-180, -140, -100, -60, -20, 20, 60, 100, 140), list(-160, -120, -80, -40, 0, 40, 80, 120, 160)) INVOKE_ASYNC(ice_shotgun, /datum/action/proc/Trigger, target) snowball_machine_gun.shot_count = 5 * 8 snowball_machine_gun.default_projectile_spread = 5 snowball_machine_gun.StartCooldown(0) - snowball_machine_gun.Trigger(target) + snowball_machine_gun.Trigger(target = target) if(3) if(easy_attack) // static lists? remind me later ice_shotgun.shot_angles = list(list(-40, -20, 0, 20, 40), list(-30, -10, 10, 30)) - ice_shotgun.Trigger(target) + ice_shotgun.Trigger(target = target) else ice_shotgun.shot_angles = list(list(0, 30, 60, 90, 120, 150, 180, 210, 240, 270, 300, 330), list(-30, -15, 0, 15, 30)) - ice_shotgun.Trigger(target) + ice_shotgun.Trigger(target = target) /// Pre-ability usage stuff /mob/living/simple_animal/hostile/megafauna/demonic_frost_miner/proc/start_attack(mob/living/owner, datum/action/cooldown/activated) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm index 36497589b8f..1b38d1dc68b 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm @@ -115,23 +115,23 @@ if(prob(15 + anger_modifier)) if(DRAKE_ENRAGED) // Lava Arena - lava_swoop.Trigger(target) + lava_swoop.Trigger(target = target) return // Lava Pools - if(lava_swoop.Trigger(target)) + if(lava_swoop.Trigger(target = target)) SLEEP_CHECK_DEATH(0, src) fire_cone.StartCooldown(0) - fire_cone.Trigger(target) + fire_cone.Trigger(target = target) meteors.StartCooldown(0) INVOKE_ASYNC(meteors, /datum/action/proc/Trigger, target) return else if(prob(10+anger_modifier) && DRAKE_ENRAGED) - mass_fire.Trigger(target) + mass_fire.Trigger(target = target) return - if(fire_cone.Trigger(target)) + if(fire_cone.Trigger(target = target)) if(prob(50)) meteors.StartCooldown(0) - meteors.Trigger(target) + meteors.Trigger(target = target) /mob/living/simple_animal/hostile/megafauna/dragon/proc/start_attack(mob/living/owner, datum/action/cooldown/activated) SIGNAL_HANDLER diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/lobstrosity.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/lobstrosity.dm index e4ac66719e9..d5ae726e6d0 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/lobstrosity.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/lobstrosity.dm @@ -47,7 +47,7 @@ /mob/living/simple_animal/hostile/asteroid/lobstrosity/OpenFire() if(client) return - charge.Trigger(target) + charge.Trigger(target = target) /mob/living/simple_animal/hostile/asteroid/lobstrosity/lava name = "tropical lobstrosity" diff --git a/code/modules/mob/living/simple_animal/hostile/ooze.dm b/code/modules/mob/living/simple_animal/hostile/ooze.dm index e09cc78a17e..82f2cde55aa 100644 --- a/code/modules/mob/living/simple_animal/hostile/ooze.dm +++ b/code/modules/mob/living/simple_animal/hostile/ooze.dm @@ -208,7 +208,7 @@ stop_consuming() //Shit out the vored mob before u go go ///Try to consume the pulled mob -/datum/action/consume/Trigger() +/datum/action/consume/Trigger(trigger_flags) . = ..() if(!.) return diff --git a/code/modules/mod/adding_new_mod.md b/code/modules/mod/adding_new_mod.md new file mode 100644 index 00000000000..657e3d8d52a --- /dev/null +++ b/code/modules/mod/adding_new_mod.md @@ -0,0 +1,323 @@ +## Introduction + +This is a step by step guide for creating a MODsuit theme, skin and module. + +## Theme + +This is pretty simple, we go [here](./mod_theme.dm) and add a new definition, let's go with a Psychologist theme as an example. \ +Their names should be like model names or use similar adjectives, like "magnate" or simply "engineering", so we'll go with "psychological". \ +After that, it's good to decide what company is manufacturing the suit, and a basic description of what it offers, we'll write that down in the desc. \ +So, let's our suit should be a low-power usage with lowered module capacity. We'd go with something like this. + +```dm +/datum/mod_theme/psychological + name = "psychological" + desc = "A DeForest Medical Corporation power-saving psychological suit, limiting its' module capacity." +``` + +For people that want to see additional stuff, we add an extended description with some more insight into what the suit does. We also set the default skin to usually the theme name, like so. + +```dm +/datum/mod_theme/psychological + name = "psychological" + desc = "A DeForest Medical Corporation power-saving psychological suit, limiting its' module capacity." + extended_desc = "DeForest Medical Corporation's prototype suit, based off the work of \ + Nakamura Engineering. The suit has been modified to save power compared to regular suits, \ + for operating at lower power levels, keeping people sane. As consequence, the capacity \ + of the suit has decreased, not being able to fit many modules at all." + default_skin = "psychological" +``` + +Next we want to set the statistics, you can view them all in the theme file, so let's just grab our relevant ones, armor, charge and capacity and set them to what we establilished. \ +Currently crew MODsuits should be unarmored in combat relevant stats. + +```dm +/datum/mod_theme/psychological + name = "psychological" + desc = "A DeForest Medical Corporation power-saving psychological suit, limiting its' module capacity." + extended_desc = "DeForest Medical Corporation's prototype suit, based off the work of \ + Nakamura Engineering. The suit has been modified to save power compared to regular suits, \ + for operating at lower power levels, keeping people sane. As consequence, the capacity \ + of the suit has decreased, not being able to fit many modules at all." + default_skin = "psychological" + armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 100, FIRE = 10, ACID = 75, WOUND = 5) + complexity_max = DEFAULT_MAX_COMPLEXITY - 7 + charge_drain = DEFAULT_CHARGE_DRAIN * 0.5 +``` + +Now we have a basic theme, it lacks a skin which will be covered in the next section, and an item, which we will add right now. \ +Let's go into [here](./mod_types.dm). It's as simple as adding a new suit type with the appropriate modules you want. + +```dm +/obj/item/mod/control/pre_equipped/psychological + theme = /datum/mod_theme/psychological + initial_modules = list( + /obj/item/mod/module/storage, + /obj/item/mod/module/flashlight, + ) +``` + +This will create our psychological suit, equipped with a storage and flashlight modules by default. We might also want to make it craftable, in which case we go [here](./mod_construction.dm) and set this. + +```dm +/obj/item/mod/construction/armor/psychological + theme = /datum/mod_theme/psychological +``` + +After that we put it in the techweb or whatever other source we want. Now our suit is almost ready, it just needs a skin. + +## Skin + +So, now that we have our theme, we want to add a skin to it (or another theme of our choosing). Let's start with a basis. + +```dm +/datum/mod_theme/psychological + name = "psychological" + desc = "A DeForest Medical Corporation power-saving psychological suit, limiting its' module capacity." + extended_desc = "DeForest Medical Corporation's prototype suit, based off the work of \ + Nakamura Engineering. The suit has been modified to save power compared to regular suits, \ + for operating at lower power levels, keeping people sane. As consequence, the capacity \ + of the suit has decreased, not being able to fit many modules at all." + default_skin = "psychological" + armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 100, FIRE = 10, ACID = 75, WOUND = 5) + complexity_max = DEFAULT_MAX_COMPLEXITY - 7 + charge_drain = DEFAULT_CHARGE_DRAIN * 0.5 + skins = list( + "psychological" = list( + HELMET_LAYER = null, + HELMET_FLAGS = list( + ), + CHESTPLATE_FLAGS = list( + ), + GAUNTLETS_FLAGS = list( + ), + BOOTS_FLAGS = list( + ), + ), + ) +``` + +We now have a psychological skin, this will apply the psychological icons to every part of the suit. Next we'll be looking at the flags. Boots, gauntlets and the chestplate are usually very standard, we set their thickmaterial and pressureproofness while hiding the jumpsuit on the chestplate. On the helmet however, we'll actually look at its' icon. \ +For example, if our helmet's icon covers the full head (like the research skin), we want to do something like this. + +```dm + HELMET_LAYER = null, + HELMET_FLAGS = list( + UNSEALED_CLOTHING = SNUG_FIT|THICKMATERIAL, + SEALED_CLOTHING = STOPSPRESSUREDAMAGE|BLOCK_GAS_SMOKE_EFFECT, + UNSEALED_INVISIBILITY = HIDEFACIALHAIR|HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDESNOUT, + UNSEALED_COVER = HEADCOVERSMOUTH|HEADCOVERSEYES|PEPPERPROOF, + ), +``` + +Otherwise, with an open helmet that becomes closed (like the engineering skin), we'd do this. + +```dm + HELMET_LAYER = NECK_LAYER, + HELMET_FLAGS = list( + UNSEALED_CLOTHING = SNUG_FIT, + SEALED_CLOTHING = THICKMATERIAL|STOPSPRESSUREDAMAGE, + UNSEALED_INVISIBILITY = HIDEFACIALHAIR, + SEALED_INVISIBILITY = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDESNOUT, + SEALED_COVER = HEADCOVERSMOUTH|HEADCOVERSEYES|PEPPERPROOF, + ), +``` + +There are specific cases of helmets that semi-cover the head, like the cosmohonk, apocryphal and whatnot. You can look at these for more specific suits. So let's say our suit is an open helmet design, and also add an alternate skin with a closed helmet called psychotherapeutic. It'd look something like this. + +```dm +/datum/mod_theme/psychological + name = "psychological" + desc = "A DeForest Medical Corporation power-saving psychological suit, limiting its' module capacity." + extended_desc = "DeForest Medical Corporation's prototype suit, based off the work of \ + Nakamura Engineering. The suit has been modified to save power compared to regular suits, \ + for operating at lower power levels, keeping people sane. As consequence, the capacity \ + of the suit has decreased, not being able to fit many modules at all." + default_skin = "psychological" + armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 100, FIRE = 10, ACID = 75, WOUND = 5) + complexity_max = DEFAULT_MAX_COMPLEXITY - 7 + charge_drain = DEFAULT_CHARGE_DRAIN * 0.5 + skins = list( + "psychological" = list( + HELMET_LAYER = NECK_LAYER, + HELMET_FLAGS = list( + UNSEALED_CLOTHING = SNUG_FIT, + SEALED_CLOTHING = THICKMATERIAL|STOPSPRESSUREDAMAGE, + UNSEALED_INVISIBILITY = HIDEFACIALHAIR, + SEALED_INVISIBILITY = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDESNOUT, + SEALED_COVER = HEADCOVERSMOUTH|HEADCOVERSEYES|PEPPERPROOF, + ), + CHESTPLATE_FLAGS = list( + UNSEALED_CLOTHING = THICKMATERIAL, + SEALED_CLOTHING = STOPSPRESSUREDAMAGE, + SEALED_INVISIBILITY = HIDEJUMPSUIT, + ), + GAUNTLETS_FLAGS = list( + UNSEALED_CLOTHING = THICKMATERIAL, + SEALED_CLOTHING = STOPSPRESSUREDAMAGE, + ), + BOOTS_FLAGS = list( + UNSEALED_CLOTHING = THICKMATERIAL, + SEALED_CLOTHING = STOPSPRESSUREDAMAGE, + ), + "psychotherapeutic" = list( + HELMET_LAYER = null, + HELMET_FLAGS = list( + UNSEALED_CLOTHING = SNUG_FIT|THICKMATERIAL, + SEALED_CLOTHING = STOPSPRESSUREDAMAGE, + UNSEALED_INVISIBILITY = HIDEFACIALHAIR|HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDESNOUT, + UNSEALED_COVER = HEADCOVERSMOUTH|HEADCOVERSEYES|PEPPERPROOF, + ), + CHESTPLATE_FLAGS = list( + UNSEALED_CLOTHING = THICKMATERIAL, + SEALED_CLOTHING = STOPSPRESSUREDAMAGE, + SEALED_INVISIBILITY = HIDEJUMPSUIT, + ), + GAUNTLETS_FLAGS = list( + UNSEALED_CLOTHING = THICKMATERIAL, + SEALED_CLOTHING = STOPSPRESSUREDAMAGE, + ), + BOOTS_FLAGS = list( + UNSEALED_CLOTHING = THICKMATERIAL, + SEALED_CLOTHING = STOPSPRESSUREDAMAGE, + ), + ), + ) +``` + +Thus we finished our codeside. Now we go to the icon files for the suits and simply add our new skin's icons. \ +Now our suit is finished. But let's say we want to give it an unique module. + +## Module + +So, for our psychological suit, let's say we want a module that heals the brain damage of everyone in range. \ +As it's a medical module, we'll put it [here](modules/modules_medical.dm). Let's start with the object definition. + +```dm +/obj/item/mod/module/neuron_healer + name = "MOD neuron healer module" + desc = "A module made experimentally by DeForest Medical Corporation. On demand it releases waves \ + that heal neuron damage of everyone nearby, getting their brains to a better state." + icon_state = "neuron_healer" +``` + +As we want this effect to be on demand, we probably want this to be an usable module. There are four types of modules: +- Passive: These have a passive effect. +- Togglable: You can turn these on and off. +- Usable: You can use these for a one time effect. +- Active: You can only have one selected at a time. It gives you a special click effect. +As we have an usable module, we want to set a cooldown time. All modules are also incompatible with themselves, have a specific power cost and complexity varying on how powerful they are, so let's update our definition, and also add a new variable for how much brain damage we'll heal. + +```dm +/obj/item/mod/module/neuron_healer + name = "MOD neuron healer module" + desc = "A module made experimentally by DeForest Medical Corporation. On demand it releases waves \ + that heal neuron damage of everyone nearby, getting their brains to a better state." + icon_state = "neuron_healer" + module_type = MODULE_USABLE + complexity = 3 + use_power_cost = DEFAULT_CHARGE_DRAIN + incompatible_modules = list(/obj/item/mod/module/neuron_healer) + cooldown_time = 15 SECONDS + var/brain_damage_healed = 25 +``` + +Now, we want to override the on_use proc for our new effect. We want to make sure the use checks passed from parent. You can read about most procs and variables by reading [this](modules/_module.dm) + +```dm +/obj/item/mod/module/neuron_healer/on_use() + . = ..() + if(!.) + return +``` + +After this, we want to put our special code, a basic effect of healing all mobs nearby for their brain damage and creating a beam to them. + +```dm +/obj/item/mod/module/neuron_healer/on_use() + . = ..() + if(!.) + return + for(var/mob/living/carbon/carbon_mob in range(5, src)) + if(carbon_mob == mod.wearer) + continue + carbon_mob.adjustOrganLoss(ORGAN_SLOT_BRAIN, -brain_damage_healed) + mod.wearer.Beam(carbon_mob, icon_state = "plasmabeam", time = 1.5 SECONDS) + playsound(src, 'sound/effects/magic.ogg', 100, TRUE) + drain_power(use_power_cost) +``` + +We now have a basic module, we can add it to the techwebs to make it printable ingame, and we can add an inbuilt, advanced version of it for our psychological suit. We'll give it more healing power, no complexity and make it unremovable. + +```dm +/obj/item/mod/module/neuron_healer/advanced + name = "MOD advanced neuron healer module" + complexity = 0 + brain_damage_healed = 50 +``` + +Now we want to add it to the psychological theme, which is very simple, finishing with this: + +```dm +/datum/mod_theme/psychological + name = "psychological" + desc = "A DeForest Medical Corporation power-saving psychological suit, limiting its' module capacity." + extended_desc = "DeForest Medical Corporation's prototype suit, based off the work of \ + Nakamura Engineering. The suit has been modified to save power compared to regular suits, \ + for operating at lower power levels, keeping people sane. As consequence, the capacity \ + of the suit has decreased, not being able to fit many modules at all." + default_skin = "psychological" + armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 100, FIRE = 10, ACID = 75, WOUND = 5) + complexity_max = DEFAULT_MAX_COMPLEXITY - 7 + charge_drain = DEFAULT_CHARGE_DRAIN * 0.5 + inbuilt_modules = list(/obj/item/mod/module/neuron_healer/advanced) + skins = list( + "psychological" = list( + HELMET_LAYER = NECK_LAYER, + HELMET_FLAGS = list( + UNSEALED_CLOTHING = SNUG_FIT, + SEALED_CLOTHING = THICKMATERIAL|STOPSPRESSUREDAMAGE, + UNSEALED_INVISIBILITY = HIDEFACIALHAIR, + SEALED_INVISIBILITY = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDESNOUT, + SEALED_COVER = HEADCOVERSMOUTH|HEADCOVERSEYES|PEPPERPROOF, + ), + CHESTPLATE_FLAGS = list( + UNSEALED_CLOTHING = THICKMATERIAL, + SEALED_CLOTHING = STOPSPRESSUREDAMAGE, + SEALED_INVISIBILITY = HIDEJUMPSUIT, + ), + GAUNTLETS_FLAGS = list( + UNSEALED_CLOTHING = THICKMATERIAL, + SEALED_CLOTHING = STOPSPRESSUREDAMAGE, + ), + BOOTS_FLAGS = list( + UNSEALED_CLOTHING = THICKMATERIAL, + SEALED_CLOTHING = STOPSPRESSUREDAMAGE, + ), + "psychotherapeutic" = list( + HELMET_LAYER = null, + HELMET_FLAGS = list( + UNSEALED_CLOTHING = SNUG_FIT|THICKMATERIAL, + SEALED_CLOTHING = STOPSPRESSUREDAMAGE, + UNSEALED_INVISIBILITY = HIDEFACIALHAIR|HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDESNOUT, + UNSEALED_COVER = HEADCOVERSMOUTH|HEADCOVERSEYES|PEPPERPROOF, + ), + CHESTPLATE_FLAGS = list( + UNSEALED_CLOTHING = THICKMATERIAL, + SEALED_CLOTHING = STOPSPRESSUREDAMAGE, + SEALED_INVISIBILITY = HIDEJUMPSUIT, + ), + GAUNTLETS_FLAGS = list( + UNSEALED_CLOTHING = THICKMATERIAL, + SEALED_CLOTHING = STOPSPRESSUREDAMAGE, + ), + BOOTS_FLAGS = list( + UNSEALED_CLOTHING = THICKMATERIAL, + SEALED_CLOTHING = STOPSPRESSUREDAMAGE, + ), + ), + ) +``` + +## Ending +This finishes this hopefully easy to follow along tutorial. You should now know how to make a basic theme a skin for it and a module. diff --git a/code/modules/mod/mod_actions.dm b/code/modules/mod/mod_actions.dm index d6bb55ef31f..fa5caec72f8 100644 --- a/code/modules/mod/mod_actions.dm +++ b/code/modules/mod/mod_actions.dm @@ -27,7 +27,7 @@ return return ..() -/datum/action/item_action/mod/Trigger() +/datum/action/item_action/mod/Trigger(trigger_flags) if(!IsAvailable()) return FALSE if(mod.malfunctioning && prob(75)) @@ -37,30 +37,33 @@ /datum/action/item_action/mod/deploy name = "Deploy MODsuit" - desc = "Deploy/Conceal a part of the MODsuit." + desc = "LMB: Deploy/Undeploy part. RMB: Deploy/Undeploy full suit." button_icon_state = "deploy" -/datum/action/item_action/mod/deploy/Trigger() +/datum/action/item_action/mod/deploy/Trigger(trigger_flags) . = ..() if(!.) return - mod.choose_deploy(usr) + if(trigger_flags & TRIGGER_SECONDARY_ACTION) + mod.quick_deploy(usr) + else + mod.choose_deploy(usr) /datum/action/item_action/mod/deploy/ai ai_action = TRUE /datum/action/item_action/mod/activate name = "Activate MODsuit" - desc = "Activate/Deactivate the MODsuit." + desc = "LMB: Activate/Deactivate suit with prompt. RMB: Activate/Deactivate suit skipping prompt." button_icon_state = "activate" /// First time clicking this will set it to TRUE, second time will activate it. var/ready = FALSE -/datum/action/item_action/mod/activate/Trigger() +/datum/action/item_action/mod/activate/Trigger(trigger_flags) . = ..() if(!.) return - if(!ready) + if(!(trigger_flags & TRIGGER_SECONDARY_ACTION) && !ready) ready = TRUE button_icon_state = "activate-ready" if(!ai_action) @@ -87,7 +90,7 @@ desc = "Toggle a MODsuit module." button_icon_state = "module" -/datum/action/item_action/mod/module/Trigger() +/datum/action/item_action/mod/module/Trigger(trigger_flags) . = ..() if(!.) return @@ -101,7 +104,7 @@ desc = "Open the MODsuit's panel." button_icon_state = "panel" -/datum/action/item_action/mod/panel/Trigger() +/datum/action/item_action/mod/panel/Trigger(trigger_flags) . = ..() if(!.) return @@ -112,7 +115,11 @@ /datum/action/item_action/mod/pinned_module desc = "Activate the module." + /// Overrides the icon applications. + var/override = FALSE + /// Module we are linked to. var/obj/item/mod/module/module + /// Mob we are pinned to. var/mob/pinner /datum/action/item_action/mod/pinned_module/New(Target, obj/item/mod/module/linked_module, mob/user) @@ -121,40 +128,52 @@ ..() module = linked_module name = "Activate [capitalize(linked_module.name)]" + desc = "Quickly activate [linked_module]." icon_icon = linked_module.icon button_icon_state = linked_module.icon_state pinner = user - RegisterSignal(mod, COMSIG_MOD_MODULE_SELECTED, .proc/on_module_select) - RegisterSignal(mod, COMSIG_MOD_ACTIVATE, .proc/on_mod_activation) + RegisterSignal(linked_module, COMSIG_MODULE_ACTIVATED, .proc/on_module_activate) + RegisterSignal(linked_module, COMSIG_MODULE_DEACTIVATED, .proc/on_module_deactivate) + RegisterSignal(linked_module, COMSIG_MODULE_USED, .proc/on_module_use) /datum/action/item_action/mod/pinned_module/Grant(mob/user) if(user != pinner) return return ..() -/datum/action/item_action/mod/pinned_module/Trigger() +/datum/action/item_action/mod/pinned_module/Trigger(trigger_flags) . = ..() if(!.) return + if(!mod.active) + mod.balloon_alert(usr, "suit not on!") module.on_select() /datum/action/item_action/mod/pinned_module/ApplyIcon(atom/movable/screen/movable/action_button/current_button, force) . = ..(current_button, force = TRUE) + if(override) + return if(module == mod.selected_module) current_button.add_overlay(image(icon = 'icons/hud/radial.dmi', icon_state = "module_selected", layer = FLOAT_LAYER-0.1)) else if(module.active) current_button.add_overlay(image(icon = 'icons/hud/radial.dmi', icon_state = "module_active", layer = FLOAT_LAYER-0.1)) + if(!COOLDOWN_FINISHED(module, cooldown_timer)) + var/image/cooldown_image = image(icon = 'icons/hud/radial.dmi', icon_state = "module_cooldown") + current_button.add_overlay(cooldown_image) + addtimer(CALLBACK(current_button, /image.proc/cut_overlay, cooldown_image), COOLDOWN_TIMELEFT(module, cooldown_timer)) -/// When the module is selected, we update the icon. -/datum/action/item_action/mod/pinned_module/proc/on_module_select(datum/source, obj/item/mod/module/selected_module) - SIGNAL_HANDLER - if(selected_module != mod.selected_module && selected_module != module) - return - UpdateButtonIcon() - -/// When the suit is being activated, we update the icon. -/datum/action/item_action/mod/pinned_module/proc/on_mod_activation(datum/source, mob/user) +/datum/action/item_action/mod/pinned_module/proc/on_module_activate(datum/source) + SIGNAL_HANDLER + + UpdateButtonIcon() + +/datum/action/item_action/mod/pinned_module/proc/on_module_deactivate(datum/source) + SIGNAL_HANDLER + + UpdateButtonIcon() + +/datum/action/item_action/mod/pinned_module/proc/on_module_use(datum/source) SIGNAL_HANDLER UpdateButtonIcon() diff --git a/code/modules/mod/mod_activation.dm b/code/modules/mod/mod_activation.dm index 52a6897fec2..d3da5d9e2d9 100644 --- a/code/modules/mod/mod_activation.dm +++ b/code/modules/mod/mod_activation.dm @@ -37,6 +37,28 @@ choose_deploy(user) break +/// Quickly deploys all parts (or retracts if all are on the wearer) +/obj/item/mod/control/proc/quick_deploy(mob/user) + if(active || activating) + balloon_alert(user, "deactivate the suit first!") + playsound(src, 'sound/machines/scanbuzz.ogg', 25, TRUE, SILENCED_SOUND_EXTRARANGE) + return FALSE + var/deploy = FALSE + for(var/obj/item/part as anything in mod_parts) + if(part.loc != src) + continue + deploy = TRUE + for(var/obj/item/part as anything in mod_parts) + if(deploy && part.loc == src) + deploy(null, part) + else if(!deploy && part.loc != src) + conceal(null, part) + wearer.visible_message(span_notice("[wearer]'s [src] [deploy ? "deploys" : "retracts"] its' pieces with a mechanical hiss."), + span_notice("[src] [deploy ? "deploys" : "retracts"] its' pieces with a mechanical hiss."), + span_hear("You hear a mechanical hiss.")) + playsound(src, 'sound/mecha/mechmove03.ogg', 25, TRUE, SHORT_RANGE_SOUND_EXTRARANGE) + return TRUE + /// Deploys a part of the suit onto the user. /obj/item/mod/control/proc/deploy(mob/user, part) var/obj/item/piece = part @@ -102,7 +124,7 @@ balloon_alert(user, "access insufficient!") playsound(src, 'sound/machines/scanbuzz.ogg', 25, TRUE, SILENCED_SOUND_EXTRARANGE) return FALSE - if(!cell?.charge && !force_deactivate) + if(!get_charge() && !force_deactivate) balloon_alert(user, "suit not powered!") playsound(src, 'sound/machines/scanbuzz.ogg', 25, TRUE, SILENCED_SOUND_EXTRARANGE) return FALSE diff --git a/code/modules/mod/mod_ai.dm b/code/modules/mod/mod_ai.dm index 700fce07333..58cd73fafcf 100644 --- a/code/modules/mod/mod_ai.dm +++ b/code/modules/mod/mod_ai.dm @@ -63,11 +63,11 @@ #define MOVE_DELAY 2 #define WEARER_DELAY 1 #define LONE_DELAY 5 -#define CELL_PER_STEP DEFAULT_CELL_DRAIN * 2.5 +#define CHARGE_PER_STEP DEFAULT_CHARGE_DRAIN * 2.5 #define AI_FALL_TIME 1 SECONDS /obj/item/mod/control/relaymove(mob/user, direction) - if((!active && wearer) || !cell || cell.charge < CELL_PER_STEP || user != ai || !COOLDOWN_FINISHED(src, cooldown_mod_move) || (wearer?.pulledby?.grab_state > GRAB_PASSIVE)) + if((!active && wearer) || get_charge() < CHARGE_PER_STEP || user != ai || !COOLDOWN_FINISHED(src, cooldown_mod_move) || (wearer?.pulledby?.grab_state > GRAB_PASSIVE)) return FALSE var/timemodifier = MOVE_DELAY * (ISDIAGONALDIR(direction) ? SQRT_2 : 1) * (wearer ? WEARER_DELAY : LONE_DELAY) if(wearer && !wearer.Process_Spacemove(direction)) @@ -75,7 +75,7 @@ else if(!wearer && (!has_gravity() || !isturf(loc))) return FALSE COOLDOWN_START(src, cooldown_mod_move, movedelay * timemodifier + slowdown_active) - cell.charge = max(0, cell.charge - CELL_PER_STEP) + subtract_charge(CHARGE_PER_STEP) playsound(src, 'sound/mecha/mechmove01.ogg', 25, TRUE) if(ismovable(wearer?.loc)) return wearer.loc.relaymove(wearer, direction) @@ -88,7 +88,7 @@ #undef MOVE_DELAY #undef WEARER_DELAY #undef LONE_DELAY -#undef CELL_PER_STEP +#undef CHARGE_PER_STEP /obj/item/mod/control/proc/ai_fall() if(!wearer) diff --git a/code/modules/mod/mod_clothes.dm b/code/modules/mod/mod_clothes.dm index 594c705101b..2fac5bc629d 100644 --- a/code/modules/mod/mod_clothes.dm +++ b/code/modules/mod/mod_clothes.dm @@ -4,23 +4,12 @@ icon = 'icons/obj/clothing/modsuit/mod_clothing.dmi' icon_state = "helmet" worn_icon = 'icons/mob/clothing/mod.dmi' - armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 100, FIRE = 25, ACID = 25, WOUND = 10) + armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, FIRE = 0, ACID = 0, WOUND = 0) body_parts_covered = HEAD heat_protection = HEAD cold_protection = HEAD - max_heat_protection_temperature = SPACE_SUIT_MAX_TEMP_PROTECT - min_cold_protection_temperature = SPACE_SUIT_MIN_TEMP_PROTECT - clothing_flags = THICKMATERIAL|SNUG_FIT - resistance_flags = NONE - flash_protect = FLASH_PROTECTION_NONE dynamic_hair_suffix = "" - dynamic_fhair_suffix = "" - flags_inv = HIDEFACIALHAIR - flags_cover = NONE - visor_flags = THICKMATERIAL|STOPSPRESSUREDAMAGE - visor_flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDESNOUT - visor_flags_cover = HEADCOVERSMOUTH|HEADCOVERSEYES|PEPPERPROOF - item_flags = IMMUTABLE_SLOW + obj_flags = IMMUTABLE_SLOW var/alternate_layer = NECK_LAYER var/obj/item/mod/control/mod @@ -41,18 +30,11 @@ icon_state = "chestplate" worn_icon = 'icons/mob/clothing/mod.dmi' blood_overlay_type = "armor" - armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 100, FIRE = 25, ACID = 25, WOUND = 10) + armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, FIRE = 0, ACID = 0, WOUND = 0) body_parts_covered = CHEST|GROIN heat_protection = CHEST|GROIN cold_protection = CHEST|GROIN - max_heat_protection_temperature = SPACE_SUIT_MAX_TEMP_PROTECT - min_cold_protection_temperature = SPACE_SUIT_MIN_TEMP_PROTECT - clothing_flags = THICKMATERIAL - visor_flags = STOPSPRESSUREDAMAGE - visor_flags_inv = HIDEJUMPSUIT - resistance_flags = NONE - item_flags = IMMUTABLE_SLOW - allowed = list(/obj/item/flashlight, /obj/item/tank/internals) + obj_flags = IMMUTABLE_SLOW var/obj/item/mod/control/mod /obj/item/clothing/suit/mod/Destroy() @@ -71,15 +53,11 @@ icon = 'icons/obj/clothing/modsuit/mod_clothing.dmi' icon_state = "gauntlets" worn_icon = 'icons/mob/clothing/mod.dmi' - armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 100, FIRE = 25, ACID = 25, WOUND = 10) + armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, FIRE = 0, ACID = 0, WOUND = 0) body_parts_covered = HANDS|ARMS heat_protection = HANDS|ARMS cold_protection = HANDS|ARMS - max_heat_protection_temperature = SPACE_SUIT_MAX_TEMP_PROTECT - min_cold_protection_temperature = SPACE_SUIT_MIN_TEMP_PROTECT - clothing_flags = THICKMATERIAL - resistance_flags = NONE - item_flags = IMMUTABLE_SLOW + obj_flags = IMMUTABLE_SLOW var/obj/item/mod/control/mod var/obj/item/clothing/overslot @@ -109,15 +87,13 @@ icon = 'icons/obj/clothing/modsuit/mod_clothing.dmi' icon_state = "boots" worn_icon = 'icons/mob/clothing/mod.dmi' - armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 100, FIRE = 25, ACID = 25, WOUND = 10) + armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, FIRE = 0, ACID = 0, WOUND = 0) body_parts_covered = FEET|LEGS heat_protection = FEET|LEGS cold_protection = FEET|LEGS - max_heat_protection_temperature = SPACE_SUIT_MAX_TEMP_PROTECT - min_cold_protection_temperature = SPACE_SUIT_MIN_TEMP_PROTECT - clothing_flags = THICKMATERIAL - resistance_flags = NONE - item_flags = IMMUTABLE_SLOW|IGNORE_DIGITIGRADE + obj_flags = IMMUTABLE_SLOW + item_flags = IGNORE_DIGITIGRADE + can_be_tied = FALSE var/obj/item/mod/control/mod var/obj/item/clothing/overslot diff --git a/code/modules/mod/mod_construction.dm b/code/modules/mod/mod_construction.dm index a730916629f..99b7bf61f44 100644 --- a/code/modules/mod/mod_construction.dm +++ b/code/modules/mod/mod_construction.dm @@ -35,18 +35,9 @@ . = ..() . += span_notice("You could insert these into a MOD shell...") -/obj/item/mod/construction/core - name = "MOD core" - icon_state = "mod-core" - desc = "Growing in the most lush, fertile areas of the planet Sprout, there is a crystal known as the Heartbloom. \ - These rare, organic piezoelectric crystals are of incredible cultural significance to the artist castes of the Ethereals, \ - owing to their appearance; which is exactly similar to that of an Ethereal's heart. \n\ - Which one you have in your suit is unclear, but either way, \ - it's been repurposed to be an internal power source for a Modular Outerwear Device." - /obj/item/mod/construction/broken_core name = "broken MOD core" - icon_state = "mod-core-broken" + icon_state = "mod-core" desc = "An internal power source for a Modular Outerwear Device. You don't seem to be able to source any power from this one, though." /obj/item/mod/construction/broken_core/examine(mob/user) @@ -57,7 +48,7 @@ . = ..() if(!tool.use_tool(src, user, 5 SECONDS, volume = 30)) return - new /obj/item/mod/construction/core(drop_location()) + new /obj/item/mod/core/standard(drop_location()) qdel(src) /obj/item/mod/construction/armor @@ -146,7 +137,7 @@ . = ..() switch(step) if(START_STEP) - if(!istype(part, /obj/item/mod/construction/core)) + if(!istype(part, /obj/item/mod/core)) return if(!user.transferItemToLoc(part, src)) balloon_alert(user, "core stuck to your hand!") @@ -250,9 +241,9 @@ return playsound(src, 'sound/machines/click.ogg', 30, TRUE) balloon_alert(user, "suit finished") - var/obj/item/modsuit = new /obj/item/mod/control(drop_location(), external_armor.theme) + var/obj/item/mod = new /obj/item/mod/control(drop_location(), external_armor.theme, null, core) qdel(src) - user.put_in_hands(modsuit) + user.put_in_hands(mod) else if(part.tool_behaviour == TOOL_SCREWDRIVER) //Construct if(part.use_tool(src, user, 0, volume=30)) balloon_alert(user, "assembly unscrewed") diff --git a/code/modules/mod/mod_control.dm b/code/modules/mod/mod_control.dm index a4787f9e079..3f3b3390ccd 100644 --- a/code/modules/mod/mod_control.dm +++ b/code/modules/mod/mod_control.dm @@ -14,7 +14,7 @@ w_class = WEIGHT_CLASS_BULKY slot_flags = ITEM_SLOT_BACK strip_delay = 10 SECONDS - armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 100, FIRE = 25, ACID = 25, WOUND = 10) + armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, FIRE = 0, ACID = 0, WOUND = 0) actions_types = list( /datum/action/item_action/mod/deploy, /datum/action/item_action/mod/activate, @@ -56,7 +56,7 @@ /// How much module complexity this MOD is carrying. var/complexity = 0 /// Power usage of the MOD. - var/cell_drain = DEFAULT_CELL_DRAIN + var/charge_drain = DEFAULT_CHARGE_DRAIN /// Slowdown of the MOD when not active. var/slowdown_inactive = 1.25 /// Slowdown of the MOD when active. @@ -65,8 +65,6 @@ var/activation_step_time = MOD_ACTIVATION_STEP_TIME /// Extended description of the theme. var/extended_desc - /// MOD cell. - var/obj/item/stock_parts/cell/cell /// MOD helmet. var/obj/item/clothing/head/mod/helmet /// MOD chestplate. @@ -75,6 +73,8 @@ var/obj/item/clothing/gloves/mod/gauntlets /// MOD boots. var/obj/item/clothing/shoes/mod/boots + /// MOD core. + var/obj/item/mod/core/core /// List of parts (helmet, chestplate, gauntlets, boots). var/list/mod_parts = list() /// Modules the MOD should spawn with. @@ -92,7 +92,7 @@ /// Person wearing the MODsuit. var/mob/living/carbon/human/wearer -/obj/item/mod/control/Initialize(mapload, new_theme, new_skin) +/obj/item/mod/control/Initialize(mapload, datum/mod_theme/new_theme, new_skin, obj/item/mod/core/new_core) . = ..() if(new_theme) theme = new_theme @@ -103,13 +103,12 @@ complexity_max = theme.complexity_max skin = new_skin || theme.default_skin ui_theme = theme.ui_theme - cell_drain = theme.cell_drain + charge_drain = theme.charge_drain initial_modules += theme.inbuilt_modules wires = new /datum/wires/mod(src) if(length(req_access)) locked = TRUE - if(ispath(cell)) - cell = new cell(src) + new_core?.install(src) helmet = new /obj/item/clothing/head/mod(src) helmet.mod = src mod_parts += helmet @@ -129,6 +128,7 @@ piece.desc = "[piece.desc] [theme.desc]" piece.armor = getArmor(arglist(theme.armor)) piece.resistance_flags = theme.resistance_flags + piece.flags_1 |= theme.atom_flags //flags like initialization or admin spawning are here, so we cant set, have to add piece.heat_protection = NONE piece.cold_protection = NONE piece.max_heat_protection_temperature = theme.max_heat_protection_temperature @@ -148,6 +148,9 @@ /obj/item/mod/control/Destroy() if(active) STOP_PROCESSING(SSobj, src) + for(var/obj/item/mod/module/module as anything in modules) + module.mod = null + modules -= module var/atom/deleting_atom if(!QDELETED(helmet)) deleting_atom = helmet @@ -173,11 +176,9 @@ boots = null mod_parts -= deleting_atom qdel(deleting_atom) - for(var/obj/item/mod/module/module as anything in modules) - module.mod = null - modules -= module + if(core) + QDEL_NULL(core) QDEL_NULL(wires) - QDEL_NULL(cell) return ..() /obj/item/mod/control/atom_destruction(damage_flag) @@ -196,7 +197,7 @@ /obj/item/mod/control/examine(mob/user) . = ..() if(active) - . += span_notice("Cell power: [cell ? "[round(cell.percent(), 1)]%" : "No cell"].") + . += span_notice("Charge: [core ? "[get_charge_percent()]%" : "No core"].") . += span_notice("Selected module: [selected_module || "None"].") if(!open && !active) . += span_notice("You could put it on your back to turn it on.") @@ -206,11 +207,11 @@ . += span_notice("You could use modules on it to install them.") . += span_notice("You could remove modules with a crowbar.") . += span_notice("You could update the access with an ID.") - . += span_notice("You could access the wire panel with a wire configuring tool.") - if(cell) - . += span_notice("You could remove the cell with an empty hand.") + . += span_notice("You could access the wire panel with a wire tool.") + if(core) + . += span_notice("You could remove [core] with a wrench.") else - . += span_notice("You could use a cell on it to install one.") + . += span_notice("You could use a MOD core on it to install one.") if(ai) . += span_notice("You could remove [ai] with an intellicard.") else @@ -223,14 +224,14 @@ /obj/item/mod/control/process(delta_time) if(seconds_electrified > MACHINE_NOT_ELECTRIFIED) seconds_electrified-- - if((!cell || !cell.charge) && active && !activating) + if(!get_charge() && active && !activating) power_off() return PROCESS_KILL var/malfunctioning_charge_drain = 0 if(malfunctioning) malfunctioning_charge_drain = rand(1,20) - cell.charge = max(0, cell.charge - (cell_drain + malfunctioning_charge_drain)*delta_time) - update_cell_alert() + subtract_charge((charge_drain + malfunctioning_charge_drain)*delta_time) + update_charge_alert() for(var/obj/item/mod/module/module as anything in modules) if(malfunctioning && module.active && DT_PROB(5, delta_time)) module.on_deactivation() @@ -255,7 +256,7 @@ /obj/item/mod/control/allow_attack_hand_drop(mob/user) if(user != wearer) return ..() - for(var/obj/item/part in mod_parts) + for(var/obj/item/part as anything in mod_parts) if(part.loc != src) balloon_alert(user, "retract parts first!") playsound(src, 'sound/machines/scanbuzz.ogg', 25, FALSE, SILENCED_SOUND_EXTRARANGE) @@ -264,7 +265,7 @@ /obj/item/mod/control/MouseDrop(atom/over_object) if(usr != wearer || !istype(over_object, /atom/movable/screen/inventory/hand)) return ..() - for(var/obj/item/part in mod_parts) + for(var/obj/item/part as anything in mod_parts) if(part.loc != src) balloon_alert(wearer, "retract parts first!") playsound(src, 'sound/machines/scanbuzz.ogg', 25, FALSE, SILENCED_SOUND_EXTRARANGE) @@ -275,24 +276,25 @@ add_fingerprint(usr) return ..() -/obj/item/mod/control/attack_hand(mob/user) - if(seconds_electrified && cell?.charge) - if(shock(user)) - return - if(open && loc == user) - if(!cell) - balloon_alert(user, "no cell!") - return - balloon_alert(user, "removing cell...") - if(!do_after(user, 1.5 SECONDS, target = src)) +/obj/item/mod/control/wrench_act(mob/living/user, obj/item/wrench) + if(..()) + return TRUE + if(seconds_electrified && get_charge() && shock(user)) + return TRUE + if(open) + if(!core) + balloon_alert(user, "no core!") + return TRUE + balloon_alert(user, "removing core...") + wrench.play_tool_sound(src, 100) + if(!wrench.use_tool(src, user, 3 SECONDS) || !open) balloon_alert(user, "interrupted!") - return - balloon_alert(user, "cell removed") - playsound(src, 'sound/machines/click.ogg', 50, TRUE, SILENCED_SOUND_EXTRARANGE) - if(!user.put_in_hands(cell)) - cell.forceMove(drop_location()) - update_cell_alert() - return + return TRUE + wrench.play_tool_sound(src, 100) + balloon_alert(user, "core removed") + core.forceMove(drop_location()) + update_charge_alert() + return TRUE return ..() /obj/item/mod/control/screwdriver_act(mob/living/user, obj/item/screwdriver) @@ -352,20 +354,20 @@ return FALSE install(attacking_item, user) return TRUE - else if(istype(attacking_item, /obj/item/stock_parts/cell)) + else if(istype(attacking_item, /obj/item/mod/core)) if(!open) balloon_alert(user, "open the cover first!") playsound(src, 'sound/machines/scanbuzz.ogg', 25, TRUE, SILENCED_SOUND_EXTRARANGE) return FALSE - if(cell) - balloon_alert(user, "cell already installed!") + if(core) + balloon_alert(user, "core already installed!") playsound(src, 'sound/machines/scanbuzz.ogg', 25, TRUE, SILENCED_SOUND_EXTRARANGE) return FALSE - attacking_item.forceMove(src) - cell = attacking_item - balloon_alert(user, "cell installed") + var/obj/item/mod/core/attacking_core = attacking_item + attacking_core.install(src) + balloon_alert(user, "core installed") playsound(src, 'sound/machines/click.ogg', 50, TRUE, SILENCED_SOUND_EXTRARANGE) - update_cell_alert() + update_charge_alert() return TRUE else if(is_wire_tool(attacking_item) && open) wires.interact(user) @@ -384,8 +386,12 @@ return ..() /obj/item/mod/control/get_cell() - if(open) - return cell + if(!open) + return + var/obj/item/stock_parts/cell/cell = get_charge_source() + if(!istype(cell)) + return + return cell /obj/item/mod/control/GetAccess() if(ai_controller) @@ -418,7 +424,7 @@ /obj/item/mod/control/doStrip(mob/stripper, mob/owner) if(active && !toggle_activate(stripper, force_deactivate = TRUE)) return - for(var/obj/item/part in mod_parts) + for(var/obj/item/part as anything in mod_parts) if(part.loc == src) continue conceal(null, part) @@ -437,7 +443,7 @@ RegisterSignal(wearer, COMSIG_ATOM_EXITED, .proc/on_exit) RegisterSignal(wearer, COMSIG_PROCESS_BORGCHARGER_OCCUPANT, .proc/on_borg_charge) RegisterSignal(src, COMSIG_ITEM_PRE_UNEQUIP, .proc/on_unequip) - update_cell_alert() + update_charge_alert() for(var/obj/item/mod/module/module as anything in modules) module.on_equip() @@ -452,7 +458,7 @@ /obj/item/mod/control/proc/on_unequip() SIGNAL_HANDLER - for(var/obj/item/part in mod_parts) + for(var/obj/item/part as anything in mod_parts) if(part.loc != src) return COMPONENT_ITEM_BLOCK_UNEQUIP @@ -492,6 +498,8 @@ module_image.underlays += image(icon = 'icons/hud/radial.dmi', icon_state = "module_selected") else if(module.active) module_image.underlays += image(icon = 'icons/hud/radial.dmi', icon_state = "module_active") + if(!COOLDOWN_FINISHED(module, cooldown_timer)) + module_image.add_overlay(image(icon = 'icons/hud/radial.dmi', icon_state = "module_cooldown")) items += list(module.name = module_image) if(!length(items)) return @@ -525,11 +533,11 @@ return TRUE /obj/item/mod/control/proc/shock(mob/living/user) - if(!istype(user) || cell?.charge < 1) + if(!istype(user) || get_charge() < 1) return FALSE do_sparks(5, TRUE, src) var/check_range = TRUE - return electrocute_mob(user, cell, src, 0.7, check_range) + return electrocute_mob(user, get_charge_source(), src, 0.7, check_range) /obj/item/mod/control/proc/install(module, mob/user) var/obj/item/mod/module/new_module = module @@ -558,6 +566,13 @@ new_module.on_install() if(wearer) new_module.on_equip() + var/datum/action/item_action/mod/pinned_module/action = new_module.pinned_to[wearer] + if(action) + action.Grant(wearer) + if(ai) + var/datum/action/item_action/mod/pinned_module/action = new_module.pinned_to[ai] + if(action) + action.Grant(ai) if(user) balloon_alert(user, "[new_module] added") playsound(src, 'sound/machines/click.ogg', 50, TRUE, SILENCED_SOUND_EXTRARANGE) @@ -572,6 +587,7 @@ old_module.on_deactivation() if(wearer) old_module.on_unequip() + old_module.pinned_to.Cut() old_module.on_uninstall() old_module.mod = null @@ -583,28 +599,36 @@ req_access = card.access.Copy() balloon_alert(user, "access updated") -/obj/item/mod/control/proc/update_cell_alert() +/obj/item/mod/control/proc/get_charge_source() + return core?.charge_source() + +/obj/item/mod/control/proc/get_charge() + return core?.charge_amount() || 0 + +/obj/item/mod/control/proc/get_max_charge() + return core?.max_charge_amount() || 1 //avoid dividing by 0 + +/obj/item/mod/control/proc/get_charge_percent() + return ROUND_UP((get_charge() / get_max_charge()) * 100) + +/obj/item/mod/control/proc/add_charge(amount) + return core?.add_charge(amount) || FALSE + +/obj/item/mod/control/proc/subtract_charge(amount) + return core?.subtract_charge(amount) || FALSE + +/obj/item/mod/control/proc/update_charge_alert() if(!wearer) return - if(!cell) - wearer.throw_alert("mod_charge", /atom/movable/screen/alert/nocell) + if(!core) + wearer.throw_alert("mod_charge", /atom/movable/screen/alert/nocore) return - var/remaining_cell = cell.charge/cell.maxcharge - switch(remaining_cell) - if(0.75 to INFINITY) - wearer.clear_alert("mod_charge") - if(0.5 to 0.75) - wearer.throw_alert("mod_charge", /atom/movable/screen/alert/lowcell, 1) - if(0.25 to 0.5) - wearer.throw_alert("mod_charge", /atom/movable/screen/alert/lowcell, 2) - if(0.01 to 0.25) - wearer.throw_alert("mod_charge", /atom/movable/screen/alert/lowcell, 3) - else - wearer.throw_alert("mod_charge", /atom/movable/screen/alert/emptycell) + core.update_charge_alert() /obj/item/mod/control/proc/update_speed() - for(var/obj/item/part as anything in mod_parts) - part.slowdown = (active ? slowdown_active : slowdown_inactive) / length(mod_parts) + var/list/all_parts = mod_parts + src + for(var/obj/item/part as anything in all_parts) + part.slowdown = (active ? slowdown_active : slowdown_inactive) / length(all_parts) wearer?.update_equipment_speed_mods() /obj/item/mod/control/proc/power_off() @@ -616,9 +640,9 @@ if(part.loc == src) return - if(part == cell) - cell = null - update_cell_alert() + if(part == core) + core.uninstall() + update_charge_alert() return if(part.loc == wearer) return @@ -634,10 +658,11 @@ /obj/item/mod/control/proc/on_borg_charge(datum/source, amount) SIGNAL_HANDLER - if(!cell) + update_charge_alert() + var/obj/item/stock_parts/cell/cell = get_charge_source() + if(!istype(cell)) return cell.give(amount) - update_cell_alert() /obj/item/mod/control/proc/on_potion(atom/movable/source, obj/item/slimepotion/speed/speed_potion, mob/living/user) SIGNAL_HANDLER diff --git a/code/modules/mod/mod_core.dm b/code/modules/mod/mod_core.dm new file mode 100644 index 00000000000..60bc33fb77a --- /dev/null +++ b/code/modules/mod/mod_core.dm @@ -0,0 +1,246 @@ +/obj/item/mod/core + name = "MOD core" + desc = "A non-functional MOD core. Inform the admins if you see this." + icon = 'icons/obj/clothing/modsuit/mod_construction.dmi' + icon_state = "mod-core" + inhand_icon_state = "electronic" + lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi' + righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi' + /// MOD unit we are powering. + var/obj/item/mod/control/mod + +/obj/item/mod/core/Destroy() + if(mod) + uninstall() + return ..() + +/obj/item/mod/core/proc/install(obj/item/mod/control/mod_unit) + mod = mod_unit + mod.core = src + forceMove(mod) + +/obj/item/mod/core/proc/uninstall() + mod.core = null + mod = null + +/obj/item/mod/core/proc/charge_source() + return + +/obj/item/mod/core/proc/charge_amount() + return 0 + +/obj/item/mod/core/proc/max_charge_amount() + return 1 + +/obj/item/mod/core/proc/add_charge(amount) + return FALSE + +/obj/item/mod/core/proc/subtract_charge(amount) + return FALSE + +/obj/item/mod/core/proc/update_charge_alert() + mod.wearer.clear_alert("mod_charge") + +/obj/item/mod/core/standard + name = "MOD standard core" + icon_state = "mod-core-standard" + desc = "Growing in the most lush, fertile areas of the planet Sprout, there is a crystal known as the Heartbloom. \ + These rare, organic piezoelectric crystals are of incredible cultural significance to the artist castes of the \ + Ethereals, owing to their appearance; which is exactly similar to that of an Ethereal's heart.\n\ + Which one you have in your suit is unclear, but either way, \ + it's been repurposed to be an internal power source for a Modular Outerwear Device." + /// Installed cell. + var/obj/item/stock_parts/cell/cell + +/obj/item/mod/core/standard/Destroy() + if(cell) + QDEL_NULL(cell) + return ..() + +/obj/item/mod/core/standard/install(obj/item/mod/control/mod_unit) + . = ..() + if(cell) + install_cell(cell) + RegisterSignal(mod, COMSIG_PARENT_EXAMINE, .proc/on_examine) + RegisterSignal(mod, COMSIG_ATOM_ATTACK_HAND, .proc/on_attack_hand) + RegisterSignal(mod, COMSIG_PARENT_ATTACKBY, .proc/on_attackby) + +/obj/item/mod/core/standard/uninstall() + if(!QDELETED(cell)) + cell.forceMove(drop_location()) + uninstall_cell() + UnregisterSignal(mod, list(COMSIG_PARENT_EXAMINE, COMSIG_ATOM_ATTACK_HAND, COMSIG_PARENT_ATTACKBY)) + return ..() + +/obj/item/mod/core/standard/charge_source() + return cell + +/obj/item/mod/core/standard/charge_amount() + var/obj/item/stock_parts/cell/charge_source = charge_source() + return charge_source?.charge || 0 + +/obj/item/mod/core/standard/max_charge_amount(amount) + var/obj/item/stock_parts/cell/charge_source = charge_source() + return charge_source?.maxcharge || 1 + +/obj/item/mod/core/standard/add_charge(amount) + var/obj/item/stock_parts/cell/charge_source = charge_source() + if(!charge_source) + return FALSE + return charge_source.give(amount) + +/obj/item/mod/core/standard/subtract_charge(amount) + var/obj/item/stock_parts/cell/charge_source = charge_source() + if(!charge_source) + return FALSE + return charge_source.use(amount) + +/obj/item/mod/core/standard/update_charge_alert() + var/obj/item/stock_parts/cell/charge_source = charge_source() + if(!charge_source) + mod.wearer.throw_alert("mod_charge", /atom/movable/screen/alert/nocell) + return + var/remaining_cell = charge_amount() / max_charge_amount() + switch(remaining_cell) + if(0.75 to INFINITY) + mod.wearer.clear_alert("mod_charge") + if(0.5 to 0.75) + mod.wearer.throw_alert("mod_charge", /atom/movable/screen/alert/lowcell, 1) + if(0.25 to 0.5) + mod.wearer.throw_alert("mod_charge", /atom/movable/screen/alert/lowcell, 2) + if(0.01 to 0.25) + mod.wearer.throw_alert("mod_charge", /atom/movable/screen/alert/lowcell, 3) + else + mod.wearer.throw_alert("mod_charge", /atom/movable/screen/alert/emptycell) + +/obj/item/mod/core/standard/proc/install_cell(new_cell) + cell = new_cell + cell.forceMove(src) + RegisterSignal(src, COMSIG_ATOM_EXITED, .proc/on_exit) + +/obj/item/mod/core/standard/proc/uninstall_cell() + if(!cell) + return + cell = null + UnregisterSignal(src, COMSIG_ATOM_EXITED) + +/obj/item/mod/core/standard/proc/on_exit(datum/source, obj/item/stock_parts/cell, direction) + SIGNAL_HANDLER + + if(!istype(cell) || cell.loc == src) + return + uninstall_cell() + +/obj/item/mod/core/standard/proc/on_examine(datum/source, mob/examiner, list/examine_text) + SIGNAL_HANDLER + + if(!mod.open) + return + examine_text += cell ? "You could remove the cell with an empty hand." : "You could use a cell on it to install one." + +/obj/item/mod/core/standard/proc/on_attack_hand(datum/source, mob/living/user) + SIGNAL_HANDLER + + if(mod.seconds_electrified && charge_amount() && mod.shock(user)) + return COMPONENT_CANCEL_ATTACK_CHAIN + if(mod.open && mod.loc == user) + INVOKE_ASYNC(src, .proc/mod_uninstall_cell, user) + return COMPONENT_CANCEL_ATTACK_CHAIN + return NONE + +/obj/item/mod/core/standard/proc/mod_uninstall_cell(mob/living/user) + if(!cell) + mod.balloon_alert(user, "no cell!") + return + mod.balloon_alert(user, "removing cell...") + if(!do_after(user, 1.5 SECONDS, target = mod)) + mod.balloon_alert(user, "interrupted!") + return + mod.balloon_alert(user, "cell removed") + playsound(mod, 'sound/machines/click.ogg', 50, TRUE, SILENCED_SOUND_EXTRARANGE) + uninstall_cell() + cell.forceMove(drop_location()) + user.put_in_hands(cell) + mod.update_charge_alert() + +/obj/item/mod/core/standard/proc/on_attackby(datum/source, obj/item/attacking_item, mob/user) + SIGNAL_HANDLER + + if(istype(attacking_item, /obj/item/stock_parts/cell)) + if(!mod.open) + mod.balloon_alert(user, "open the cover first!") + playsound(mod, 'sound/machines/scanbuzz.ogg', 25, TRUE, SILENCED_SOUND_EXTRARANGE) + return NONE + if(cell) + mod.balloon_alert(user, "cell already installed!") + playsound(mod, 'sound/machines/scanbuzz.ogg', 25, TRUE, SILENCED_SOUND_EXTRARANGE) + return COMPONENT_NO_AFTERATTACK + install_cell(attacking_item) + mod.balloon_alert(user, "cell installed") + playsound(mod, 'sound/machines/click.ogg', 50, TRUE, SILENCED_SOUND_EXTRARANGE) + mod.update_charge_alert() + return COMPONENT_NO_AFTERATTACK + return NONE + +/obj/item/mod/core/ethereal + name = "MOD ethereal core" + icon_state = "mod-core-ethereal" + desc = "A reverse engineered core of a Modular Outerwear Device. Using natural liquid electricity from Ethereals, \ + preventing the need to use external sources to convert electric charge." + /// A modifier to all charge we use, ethereals don't need to spend as much energy as normal suits. + var/charge_modifier = 0.1 + +/obj/item/mod/core/ethereal/charge_source() + var/obj/item/organ/stomach/ethereal/ethereal_stomach = mod.wearer.getorganslot(ORGAN_SLOT_STOMACH) + if(!istype(ethereal_stomach)) + return + return ethereal_stomach + +/obj/item/mod/core/ethereal/charge_amount() + var/obj/item/organ/stomach/ethereal/charge_source = charge_source() + return charge_source?.crystal_charge || ETHEREAL_CHARGE_NONE + +/obj/item/mod/core/ethereal/max_charge_amount() + return ETHEREAL_CHARGE_FULL + +/obj/item/mod/core/ethereal/add_charge(amount) + var/obj/item/organ/stomach/ethereal/charge_source = charge_source() + if(!charge_source) + return FALSE + charge_source.adjust_charge(amount*charge_modifier) + return TRUE + +/obj/item/mod/core/ethereal/subtract_charge(amount) + var/obj/item/organ/stomach/ethereal/charge_source = charge_source() + if(!charge_source) + return FALSE + charge_source.adjust_charge(-amount*charge_modifier) + return TRUE + +/obj/item/mod/core/ethereal/update_charge_alert() + var/obj/item/organ/stomach/ethereal/charge_source = charge_source() + if(charge_source) + mod.wearer.clear_alert("mod_charge") + return + mod.wearer.throw_alert("mod_charge", /atom/movable/screen/alert/nocell) + +/obj/item/mod/core/infinite + name = "MOD infinite core" + icon_state = "mod-core-infinite" + desc = "A fusion core using the rare palladium to sustain enough energy for the lifetime of the MOD's user. \ + This might be because of the slowly killing poison inside, but those are just rumors." + +/obj/item/mod/core/infinite/charge_source() + return src + +/obj/item/mod/core/infinite/charge_amount() + return INFINITY + +/obj/item/mod/core/infinite/max_charge_amount() + return INFINITY + +/obj/item/mod/core/infinite/add_charge(amount) + return TRUE + +/obj/item/mod/core/infinite/subtract_charge(amount) + return TRUE diff --git a/code/modules/mod/mod_theme.dm b/code/modules/mod/mod_theme.dm index 535e2ec2677..645d0493cd0 100644 --- a/code/modules/mod/mod_theme.dm +++ b/code/modules/mod/mod_theme.dm @@ -23,6 +23,8 @@ var/armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 100, FIRE = 25, ACID = 25, WOUND = 10) /// Resistance flags shared across the MOD pieces. var/resistance_flags = NONE + /// Atom flags shared across the MOD pieces. + var/atom_flags = NONE /// Max heat protection shared across the MOD pieces. var/max_heat_protection_temperature = SPACE_SUIT_MAX_TEMP_PROTECT /// Max cold protection shared across the MOD pieces. @@ -34,7 +36,7 @@ /// How much modules can the MOD carry without malfunctioning. var/complexity_max = DEFAULT_MAX_COMPLEXITY /// How much battery power the MOD uses by just being on - var/cell_drain = DEFAULT_CELL_DRAIN + var/charge_drain = DEFAULT_CHARGE_DRAIN /// Slowdown of the MOD when not active. var/slowdown_inactive = 1.25 /// Slowdown of the MOD when active. @@ -228,14 +230,14 @@ mining teams have since heavily tweaked the suit themselves. Aftermarket armor plating has been added, \ giving way to incredible protection against corrosives and thermal protection good enough for volcanic environments. \ The systems have been upgraded as well, giving space for further modification down the line. \ - However, all of this has proven to be straining on the cell and the actuators of the suit, \ + However, all of this has proven to be straining on the power and the actuators of the suit, \ making it demand more power in exchange." default_skin = "mining" armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 50, BIO = 100, FIRE = 100, ACID = 75, WOUND = 15) resistance_flags = FIRE_PROOF max_heat_protection_temperature = FIRE_SUIT_MAX_TEMP_PROTECT complexity_max = DEFAULT_MAX_COMPLEXITY + 5 - cell_drain = DEFAULT_CELL_DRAIN * 2 + charge_drain = DEFAULT_CHARGE_DRAIN * 2 skins = list( "mining" = list( HELMET_LAYER = null, @@ -273,7 +275,7 @@ and weak against fingers tapping the glass." default_skin = "medical" armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 10, BIO = 100, FIRE = 60, ACID = 75, WOUND = 10) - cell_drain = DEFAULT_CELL_DRAIN * 1.5 + charge_drain = DEFAULT_CHARGE_DRAIN * 1.5 slowdown_inactive = 1 slowdown_active = 0.5 skins = list( @@ -338,7 +340,7 @@ armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 10, BIO = 100, FIRE = 100, ACID = 100, WOUND = 10) resistance_flags = FIRE_PROOF|ACID_PROOF max_heat_protection_temperature = FIRE_SUIT_MAX_TEMP_PROTECT - cell_drain = DEFAULT_CELL_DRAIN * 1.5 + charge_drain = DEFAULT_CHARGE_DRAIN * 1.5 slowdown_inactive = 0.75 slowdown_active = 0.25 inbuilt_modules = list(/obj/item/mod/module/quick_carry/advanced) @@ -382,6 +384,7 @@ default_skin = "research" armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 100, BIO = 100, FIRE = 100, ACID = 100, WOUND = 15) resistance_flags = FIRE_PROOF|ACID_PROOF + atom_flags = PREVENT_CONTENTS_EXPLOSION_1 max_heat_protection_temperature = FIRE_SUIT_MAX_TEMP_PROTECT complexity_max = DEFAULT_MAX_COMPLEXITY + 5 slowdown_inactive = 1.75 @@ -424,7 +427,7 @@ However, the systems used in these suits are more than a few years out of date, \ leading to an overall lower capacity for modules." default_skin = "security" - armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 10, BIO = 100, FIRE = 75, ACID = 75, WOUND = 20) + armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 25, BIO = 100, FIRE = 75, ACID = 75, WOUND = 20) siemens_coefficient = 0 complexity_max = DEFAULT_MAX_COMPLEXITY - 5 slowdown_inactive = 1 @@ -466,7 +469,7 @@ Heatsinks line the sides of the suit, and greater technology has been used in insulating it against \ both corrosive environments and sudden impacts to the user's joints." default_skin = "safeguard" - armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 25, BIO = 100, FIRE = 100, ACID = 95, WOUND = 25) + armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 40, BIO = 100, FIRE = 100, ACID = 95, WOUND = 25) resistance_flags = FIRE_PROOF max_heat_protection_temperature = FIRE_SUIT_MAX_TEMP_PROTECT siemens_coefficient = 0 @@ -513,6 +516,7 @@ default_skin = "magnate" armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 50, BIO = 100, FIRE = 100, ACID = 100, WOUND = 20) resistance_flags = FIRE_PROOF|ACID_PROOF + atom_flags = PREVENT_CONTENTS_EXPLOSION_1 max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT siemens_coefficient = 0 complexity_max = DEFAULT_MAX_COMPLEXITY + 5 @@ -555,10 +559,9 @@ All you know is that this suit is mysteriously power-efficient, and far too colorful for the Mime to steal." default_skin = "cosmohonk" armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 10, BIO = 100, FIRE = 60, ACID = 30, WOUND = 5) - cell_drain = DEFAULT_CELL_DRAIN * 0.25 + charge_drain = DEFAULT_CHARGE_DRAIN * 0.25 slowdown_inactive = 1.75 slowdown_active = 1.25 - inbuilt_modules = list(/obj/item/mod/module/waddle) skins = list( "cosmohonk" = list( HELMET_LAYER = NECK_LAYER, @@ -591,12 +594,13 @@ extended_desc = "An advanced combat suit adorned in a sinister crimson red color scheme, produced and manufactured \ for special mercenary operations. The build is a streamlined layering consisting of shaped Plasteel, \ and composite ceramic, while the under suit is lined with a lightweight Kevlar and durathread hybrid weave \ - to provide ample protection to the user where the plating doesn't, with an illegal onboard cell powered \ + to provide ample protection to the user where the plating doesn't, with an illegal onboard electric powered \ ablative shield module to provide resistance against conventional energy firearms. \ A small tag hangs off of it reading; 'Property of the Gorlex Marauders, with assistance from Cybersun Industries. \ All rights reserved, tampering with suit will void warranty." default_skin = "syndicate" armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 35, BIO = 100, FIRE = 50, ACID = 90, WOUND = 25) + atom_flags = PREVENT_CONTENTS_EXPLOSION_1 max_heat_protection_temperature = FIRE_SUIT_MAX_TEMP_PROTECT siemens_coefficient = 0 slowdown_inactive = 1 @@ -662,6 +666,7 @@ default_skin = "elite" armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 55, BIO = 100, FIRE = 100, ACID = 100, WOUND = 25) resistance_flags = FIRE_PROOF|ACID_PROOF + atom_flags = PREVENT_CONTENTS_EXPLOSION_1 max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT siemens_coefficient = 0 slowdown_inactive = 0.75 @@ -700,9 +705,9 @@ extended_desc = "The Wizard Federation's relatively low-tech MODsuit. This armor employs not \ plasteel or carbon fibre, but space dragon scales for its protection. Recruits are expected to \ gather these themselves, but the effort is well worth it, the suit being well-armored against threats \ - both mundane and mystic. Rather than wholly relying on the suit's cell, which would surely perish \ + both mundane and mystic. Rather than wholly relying on a cell, which would surely perish \ under the load, several naturally-occurring bluespace gemstones have been utilized as \ - supplementary means of power. The hood and platform boots are of unknown usage, but it's speculated that \ + default means of power. The hood and platform boots are of unknown usage, but it's speculated that \ wizards trend towards the dramatic." default_skin = "enchanted" armor = list(MELEE = 40, BULLET = 40, LASER = 40, ENERGY = 50, BOMB = 35, BIO = 100, FIRE = 100, ACID = 100, WOUND = 30) @@ -755,7 +760,7 @@ armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 50, BIO = 100, FIRE = 100, ACID = 75, WOUND = 5) resistance_flags = FIRE_PROOF complexity_max = DEFAULT_MAX_COMPLEXITY + 5 - cell_drain = DEFAULT_CELL_DRAIN * 2 + charge_drain = DEFAULT_CHARGE_DRAIN * 2 slowdown_inactive = 2 slowdown_active = 1.5 ui_theme = "hackerman" @@ -795,6 +800,7 @@ While wearing it you feel an extreme deference to darkness. " default_skin = "responsory" armor = list(MELEE = 35, BULLET = 30, LASER = 30, ENERGY = 40, BOMB = 50, BIO = 100, FIRE = 100, ACID = 90, WOUND = 15) + atom_flags = PREVENT_CONTENTS_EXPLOSION_1 resistance_flags = FIRE_PROOF max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT siemens_coefficient = 0 @@ -860,6 +866,7 @@ default_skin = "apocryphal" armor = list(MELEE = 80, BULLET = 80, LASER = 50, ENERGY = 60, BOMB = 100, BIO = 100, FIRE = 100, ACID = 100, WOUND = 25) resistance_flags = FIRE_PROOF|ACID_PROOF + atom_flags = PREVENT_CONTENTS_EXPLOSION_1 max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT siemens_coefficient = 0 complexity_max = DEFAULT_MAX_COMPLEXITY + 10 @@ -900,6 +907,7 @@ default_skin = "corporate" armor = list(MELEE = 35, BULLET = 40, LASER = 40, ENERGY = 50, BOMB = 50, BIO = 100, FIRE = 100, ACID = 100, WOUND = 15) resistance_flags = FIRE_PROOF|ACID_PROOF + atom_flags = PREVENT_CONTENTS_EXPLOSION_1 max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT siemens_coefficient = 0 slowdown_inactive = 0.5 @@ -931,6 +939,46 @@ ), ) +/datum/mod_theme/chrono + name = "chrono" + desc = "A suit beyond our time, beyond time itself. Used to traverse timelines and \"correct their course\"." + extended_desc = "A suit whose tech goes beyond this era's understanding. The internal mechanisms are all but \ + completely alien, but the purpose is quite simple. The suit protects the user from the many incredibly lethal \ + and sometimes hilariously painful side effects of jumping timelines, while providing inbuilt equipment for \ + making timeline adjustments to correct a bad course." + default_skin = "chrono" + armor = list(MELEE = 60, BULLET = 60, LASER = 60, ENERGY = 60, BOMB = 30, BIO = 100, FIRE = 100, ACID = 100) + resistance_flags = FIRE_PROOF|ACID_PROOF + max_heat_protection_temperature = FIRE_SUIT_MAX_TEMP_PROTECT + complexity_max = DEFAULT_MAX_COMPLEXITY - 10 + slowdown_inactive = 0 + slowdown_active = 0 + skins = list( + "chrono" = list( + HELMET_LAYER = NECK_LAYER, + HELMET_FLAGS = list( + UNSEALED_CLOTHING = SNUG_FIT, + SEALED_CLOTHING = THICKMATERIAL|STOPSPRESSUREDAMAGE|BLOCK_GAS_SMOKE_EFFECT, + UNSEALED_INVISIBILITY = HIDEFACIALHAIR, + SEALED_INVISIBILITY = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR|HIDESNOUT, + SEALED_COVER = HEADCOVERSMOUTH|HEADCOVERSEYES|PEPPERPROOF, + ), + CHESTPLATE_FLAGS = list( + UNSEALED_CLOTHING = THICKMATERIAL, + SEALED_CLOTHING = STOPSPRESSUREDAMAGE, + SEALED_INVISIBILITY = HIDEJUMPSUIT, + ), + GAUNTLETS_FLAGS = list( + UNSEALED_CLOTHING = THICKMATERIAL, + SEALED_CLOTHING = STOPSPRESSUREDAMAGE, + ), + BOOTS_FLAGS = list( + UNSEALED_CLOTHING = THICKMATERIAL, + SEALED_CLOTHING = STOPSPRESSUREDAMAGE, + ), + ), + ) + /datum/mod_theme/debug name = "debug" desc = "Strangely nostalgic." @@ -940,6 +988,7 @@ default_skin = "debug" armor = list(MELEE = 50, BULLET = 50, LASER = 50, ENERGY = 50, BOMB = 100, BIO = 100, FIRE = 100, ACID = 100, WOUND = 0) resistance_flags = FIRE_PROOF|ACID_PROOF + atom_flags = PREVENT_CONTENTS_EXPLOSION_1 max_heat_protection_temperature = FIRE_SUIT_MAX_TEMP_PROTECT complexity_max = 50 slowdown_inactive = 0.5 @@ -981,9 +1030,10 @@ default_skin = "debug" armor = list(MELEE = 100, BULLET = 100, LASER = 100, ENERGY = 100, BOMB = 100, BIO = 100, FIRE = 100, ACID = 100, WOUND = 100) resistance_flags = INDESTRUCTIBLE|LAVA_PROOF|FIRE_PROOF|UNACIDABLE|ACID_PROOF + atom_flags = PREVENT_CONTENTS_EXPLOSION_1 max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT complexity_max = 1000 - cell_drain = DEFAULT_CELL_DRAIN * 0 + charge_drain = DEFAULT_CHARGE_DRAIN * 0 slowdown_inactive = 0 slowdown_active = 0 skins = list( @@ -1007,44 +1057,3 @@ ), ), ) - -/datum/mod_theme/timeline - name = "chrono" - desc = "A suit beyond our time, beyond time itself. Used to traverse timelines and \"correct their course\"." - extended_desc = "A suit whose tech goes beyond this era's understanding. The internal mechanisms are all but \ - completely alien, but the purpose is quite simple. The suit protects the user from the many incredibly lethal \ - and sometimes hilariously painful side effects of jumping timelines, while providing inbuilt equipment for \ - making timeline adjustments to correct a bad course." - default_skin = "timeline" - armor = list(MELEE = 60, BULLET = 60, LASER = 60, ENERGY = 60, BOMB = 30, BIO = 90, FIRE = 100, ACID = 100) - resistance_flags = FIRE_PROOF|ACID_PROOF - max_heat_protection_temperature = FIRE_SUIT_MAX_TEMP_PROTECT - complexity_max = 15 - slowdown_inactive = 0 - slowdown_active = 0 - skins = list( - "timeline" = list( - HELMET_LAYER = null, - HELMET_FLAGS = list( - UNSEALED_CLOTHING = SNUG_FIT|THICKMATERIAL, - SEALED_CLOTHING = STOPSPRESSUREDAMAGE|BLOCK_GAS_SMOKE_EFFECT, - UNSEALED_INVISIBILITY = HIDEFACIALHAIR|HIDEEARS|HIDEHAIR|HIDESNOUT, - SEALED_INVISIBILITY = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE, - UNSEALED_COVER = HEADCOVERSMOUTH, - SEALED_COVER = HEADCOVERSEYES|PEPPERPROOF, - ), - CHESTPLATE_FLAGS = list( - UNSEALED_CLOTHING = THICKMATERIAL, - SEALED_CLOTHING = STOPSPRESSUREDAMAGE, - SEALED_INVISIBILITY = HIDEJUMPSUIT, - ), - GAUNTLETS_FLAGS = list( - UNSEALED_CLOTHING = THICKMATERIAL, - SEALED_CLOTHING = STOPSPRESSUREDAMAGE, - ), - BOOTS_FLAGS = list( - UNSEALED_CLOTHING = THICKMATERIAL, - SEALED_CLOTHING = STOPSPRESSUREDAMAGE, - ), - ), - ) diff --git a/code/modules/mod/mod_types.dm b/code/modules/mod/mod_types.dm index 03c75646cd5..e6af768f845 100644 --- a/code/modules/mod/mod_types.dm +++ b/code/modules/mod/mod_types.dm @@ -1,9 +1,17 @@ /obj/item/mod/control/pre_equipped - cell = /obj/item/stock_parts/cell/high + /// The skin we apply to the suit, defaults to the default_skin of the theme. var/applied_skin + /// The MOD core we apply to the suit. + var/applied_core = /obj/item/mod/core/standard + /// The cell we apply to the core. Only applies to standard core suits. + var/applied_cell = /obj/item/stock_parts/cell/high -/obj/item/mod/control/pre_equipped/Initialize(mapload, new_theme, new_skin) +/obj/item/mod/control/pre_equipped/Initialize(mapload, new_theme, new_skin, new_core) new_skin = applied_skin + new_core = new applied_core(src) + if(istype(new_core, /obj/item/mod/core/standard)) + var/obj/item/mod/core/standard/cell_core = new_core + cell_core.cell = new applied_cell() return ..() /obj/item/mod/control/pre_equipped/standard @@ -11,7 +19,7 @@ /obj/item/mod/module/storage, /obj/item/mod/module/welding, /obj/item/mod/module/flashlight, - ) + ) /obj/item/mod/control/pre_equipped/engineering theme = /datum/mod_theme/engineering @@ -21,7 +29,7 @@ /obj/item/mod/module/rad_protection, /obj/item/mod/module/flashlight, /obj/item/mod/module/magboot, - ) + ) /obj/item/mod/control/pre_equipped/atmospheric theme = /datum/mod_theme/atmospheric @@ -31,22 +39,22 @@ /obj/item/mod/module/rad_protection, /obj/item/mod/module/flashlight, /obj/item/mod/module/t_ray, - ) + ) /obj/item/mod/control/pre_equipped/advanced theme = /datum/mod_theme/advanced - cell = /obj/item/stock_parts/cell/super + applied_cell = /obj/item/stock_parts/cell/super initial_modules = list( /obj/item/mod/module/storage/large_capacity, /obj/item/mod/module/welding, /obj/item/mod/module/rad_protection, /obj/item/mod/module/flashlight, /obj/item/mod/module/jetpack, - ) + ) /obj/item/mod/control/pre_equipped/mining theme = /datum/mod_theme/mining - cell = /obj/item/stock_parts/cell/high/plus + applied_cell = /obj/item/stock_parts/cell/high/plus initial_modules = list( /obj/item/mod/module/storage/large_capacity, /obj/item/mod/module/welding, @@ -54,7 +62,7 @@ /obj/item/mod/module/flashlight, /obj/item/mod/module/magboot, /obj/item/mod/module/drill, - ) + ) /obj/item/mod/control/pre_equipped/medical theme = /datum/mod_theme/medical @@ -63,69 +71,68 @@ /obj/item/mod/module/flashlight, /obj/item/mod/module/health_analyzer, /obj/item/mod/module/quick_carry, - ) + ) /obj/item/mod/control/pre_equipped/rescue theme = /datum/mod_theme/rescue - cell = /obj/item/stock_parts/cell/super + applied_cell = /obj/item/stock_parts/cell/super initial_modules = list( /obj/item/mod/module/storage/large_capacity, /obj/item/mod/module/flashlight, /obj/item/mod/module/health_analyzer, /obj/item/mod/module/injector, - ) + ) /obj/item/mod/control/pre_equipped/research theme = /datum/mod_theme/research - cell = /obj/item/stock_parts/cell/super + applied_cell = /obj/item/stock_parts/cell/super initial_modules = list( /obj/item/mod/module/storage/large_capacity, /obj/item/mod/module/welding, /obj/item/mod/module/flashlight, /obj/item/mod/module/circuit, /obj/item/mod/module/t_ray, - ) + ) /obj/item/mod/control/pre_equipped/security theme = /datum/mod_theme/security + applied_cell = /obj/item/stock_parts/cell/high/plus initial_modules = list( /obj/item/mod/module/storage, - /obj/item/mod/module/welding, /obj/item/mod/module/flashlight, /obj/item/mod/module/holster, - ) + ) /obj/item/mod/control/pre_equipped/safeguard theme = /datum/mod_theme/safeguard - cell = /obj/item/stock_parts/cell/super + applied_cell = /obj/item/stock_parts/cell/super initial_modules = list( /obj/item/mod/module/storage/large_capacity, - /obj/item/mod/module/welding, /obj/item/mod/module/flashlight, /obj/item/mod/module/jetpack, /obj/item/mod/module/holster, - ) + ) /obj/item/mod/control/pre_equipped/magnate theme = /datum/mod_theme/magnate - cell = /obj/item/stock_parts/cell/hyper + applied_cell = /obj/item/stock_parts/cell/hyper initial_modules = list( /obj/item/mod/module/storage/large_capacity, - /obj/item/mod/module/welding, + /obj/item/mod/module/jetpack, /obj/item/mod/module/holster, /obj/item/mod/module/pathfinder, - ) + ) /obj/item/mod/control/pre_equipped/cosmohonk theme = /datum/mod_theme/cosmohonk initial_modules = list( /obj/item/mod/module/storage, /obj/item/mod/module/bikehorn, - ) + ) /obj/item/mod/control/pre_equipped/traitor theme = /datum/mod_theme/syndicate - cell = /obj/item/stock_parts/cell/super + applied_cell = /obj/item/stock_parts/cell/super initial_modules = list( /obj/item/mod/module/storage/syndicate, /obj/item/mod/module/welding, @@ -133,22 +140,23 @@ /obj/item/mod/module/pathfinder, /obj/item/mod/module/flashlight, /obj/item/mod/module/dna_lock, - ) + ) /obj/item/mod/control/pre_equipped/nuclear theme = /datum/mod_theme/syndicate - cell = /obj/item/stock_parts/cell/hyper + applied_cell = /obj/item/stock_parts/cell/hyper initial_modules = list( /obj/item/mod/module/storage/syndicate, /obj/item/mod/module/welding, /obj/item/mod/module/jetpack, /obj/item/mod/module/flashlight, /obj/item/mod/module/holster, - ) + /obj/item/mod/module/injector, + ) /obj/item/mod/control/pre_equipped/elite theme = /datum/mod_theme/elite - cell = /obj/item/stock_parts/cell/bluespace + applied_cell = /obj/item/stock_parts/cell/bluespace initial_modules = list( /obj/item/mod/module/storage/syndicate, /obj/item/mod/module/welding, @@ -156,42 +164,45 @@ /obj/item/mod/module/jetpack, /obj/item/mod/module/flashlight, /obj/item/mod/module/holster, - ) + /obj/item/mod/module/injector, + ) /obj/item/mod/control/pre_equipped/enchanted theme = /datum/mod_theme/enchanted - cell = /obj/item/stock_parts/cell/crystal_cell/wizard + applied_core = /obj/item/mod/core/infinite initial_modules = list( /obj/item/mod/module/storage/large_capacity, /obj/item/mod/module/energy_shield/wizard, /obj/item/mod/module/emp_shield, - ) + ) /obj/item/mod/control/pre_equipped/prototype theme = /datum/mod_theme/prototype - cell = /obj/item/stock_parts/cell/high/plus + applied_cell = /obj/item/stock_parts/cell/upgraded initial_modules = list( /obj/item/mod/module/storage, /obj/item/mod/module/welding, /obj/item/mod/module/rad_protection, /obj/item/mod/module/flashlight, /obj/item/mod/module/tether, - ) + ) /obj/item/mod/control/pre_equipped/responsory theme = /datum/mod_theme/responsory - cell = /obj/item/stock_parts/cell/hyper + applied_cell = /obj/item/stock_parts/cell/hyper initial_modules = list( /obj/item/mod/module/storage/large_capacity, /obj/item/mod/module/welding, /obj/item/mod/module/emp_shield, /obj/item/mod/module/flashlight, /obj/item/mod/module/holster, - ) + ) + /// The insignia type, insignias show what sort of member of the ERT you're dealing with. var/insignia_type = /obj/item/mod/module/insignia + /// Additional module we add, as a treat. var/additional_module = /obj/item/mod/module -/obj/item/mod/control/pre_equipped/responsory/Initialize(mapload, new_theme, new_skin) +/obj/item/mod/control/pre_equipped/responsory/Initialize(mapload, new_theme, new_skin, new_core) initial_modules.Insert(1, insignia_type) initial_modules.Add(additional_module) return ..() @@ -233,7 +244,7 @@ /obj/item/mod/module/emp_shield, /obj/item/mod/module/flashlight, /obj/item/mod/module/holster, - ) + ) /obj/item/mod/control/pre_equipped/responsory/inquisitory/commander insignia_type = /obj/item/mod/module/insignia/commander @@ -253,26 +264,38 @@ /obj/item/mod/control/pre_equipped/apocryphal theme = /datum/mod_theme/apocryphal - cell = /obj/item/stock_parts/cell/bluespace + applied_cell = /obj/item/stock_parts/cell/bluespace initial_modules = list( /obj/item/mod/module/storage/bluespace, /obj/item/mod/module/welding, /obj/item/mod/module/emp_shield, /obj/item/mod/module/jetpack, /obj/item/mod/module/holster, - ) + ) /obj/item/mod/control/pre_equipped/corporate theme = /datum/mod_theme/corporate - cell = /obj/item/stock_parts/cell/bluespace + applied_core = /obj/item/mod/core/infinite initial_modules = list( /obj/item/mod/module/storage/bluespace, /obj/item/mod/module/holster, - ) + ) + +/obj/item/mod/control/pre_equipped/chrono + theme = /datum/mod_theme/chrono + applied_core = /obj/item/mod/core/infinite + initial_modules = list( + /obj/item/mod/module/eradication_lock, + /obj/item/mod/module/emp_shield, + /obj/item/mod/module/timeline_jumper, + /obj/item/mod/module/timestopper, + /obj/item/mod/module/rewinder, + /obj/item/mod/module/tem, + ) /obj/item/mod/control/pre_equipped/debug theme = /datum/mod_theme/debug - cell = /obj/item/stock_parts/cell/bluespace + applied_core = /obj/item/mod/core/infinite initial_modules = list( //one of every type of module, for testing if they all work correctly /obj/item/mod/module/storage/bluespace, /obj/item/mod/module/welding, @@ -281,11 +304,11 @@ /obj/item/mod/module/rad_protection, /obj/item/mod/module/tether, /obj/item/mod/module/injector, - ) + ) /obj/item/mod/control/pre_equipped/administrative theme = /datum/mod_theme/administrative - cell = /obj/item/stock_parts/cell/infinite/abductor + applied_core = /obj/item/mod/core/infinite initial_modules = list( /obj/item/mod/module/storage/bluespace, /obj/item/mod/module/welding, @@ -293,18 +316,6 @@ /obj/item/mod/module/quick_carry/advanced, /obj/item/mod/module/magboot/advanced, /obj/item/mod/module/jetpack, - ) - -/obj/item/mod/control/pre_equipped/timeline - theme = /datum/mod_theme/timeline - cell = /obj/item/stock_parts/cell/bluespace - initial_modules = list( - /obj/item/mod/module/eradication_lock, - /obj/item/mod/module/emp_shield, - /obj/item/mod/module/timeline_jumper, - /obj/item/mod/module/timestopper, - /obj/item/mod/module/rewinder, - /obj/item/mod/module/tem, ) //these exist for the prefs menu diff --git a/code/modules/mod/mod_ui.dm b/code/modules/mod/mod_ui.dm index 9a5eb6ec13d..4cfa09f5fb1 100644 --- a/code/modules/mod/mod_ui.dm +++ b/code/modules/mod/mod_ui.dm @@ -16,8 +16,8 @@ data["wearer_name"] = wearer ? (wearer.get_authentification_name("Unknown") || "Unknown") : "No Occupant" data["wearer_job"] = wearer ? wearer.get_assignment("Unknown", "Unknown", FALSE) : "No Job" data["AI"] = ai?.name - data["cell"] = cell?.name - data["charge"] = cell ? round(cell.percent(), 1) : 0 + data["core"] = core?.name + data["charge"] = get_charge_percent() data["modules"] = list() for(var/obj/item/mod/module/module as anything in modules) var/list/module_data = list( diff --git a/code/modules/mod/modules/_module.dm b/code/modules/mod/modules/_module.dm index 77121478cfe..4525f9d0028 100644 --- a/code/modules/mod/modules/_module.dm +++ b/code/modules/mod/modules/_module.dm @@ -12,11 +12,11 @@ /// How much space it takes up in the MOD var/complexity = 0 /// Power use when idle - var/idle_power_cost = DEFAULT_CELL_DRAIN * 0 + var/idle_power_cost = DEFAULT_CHARGE_DRAIN * 0 /// Power use when active - var/active_power_cost = DEFAULT_CELL_DRAIN * 0 + var/active_power_cost = DEFAULT_CHARGE_DRAIN * 0 /// Power use when used, we call it manually - var/use_power_cost = DEFAULT_CELL_DRAIN * 0 + var/use_power_cost = DEFAULT_CHARGE_DRAIN * 0 /// ID used by their TGUI var/tgui_id /// Linked MODsuit @@ -106,14 +106,14 @@ if(!COOLDOWN_FINISHED(src, cooldown_timer)) balloon_alert(mod.wearer, "on cooldown!") return FALSE - if(!mod.active || mod.activating || !mod.cell?.charge) + if(!mod.active || mod.activating || !mod.get_charge()) balloon_alert(mod.wearer, "unpowered!") return FALSE if(!allowed_in_phaseout && istype(mod.wearer.loc, /obj/effect/dummy/phased_mob)) //specifically a to_chat because the user is phased out. to_chat(mod.wearer, span_warning("You cannot activate this right now.")) return FALSE - if(SEND_SIGNAL(src, COMSIG_MOD_MODULE_TRIGGERED) & MOD_ABORT_USE) + if(SEND_SIGNAL(src, COMSIG_MODULE_TRIGGERED) & MOD_ABORT_USE) return FALSE if(module_type == MODULE_ACTIVE) if(mod.selected_module && !mod.selected_module.on_deactivation()) @@ -133,6 +133,7 @@ active = TRUE COOLDOWN_START(src, cooldown_timer, cooldown_time) mod.wearer.update_inv_back() + SEND_SIGNAL(src, COMSIG_MODULE_ACTIVATED) return TRUE /// Called when the module is deactivated @@ -149,6 +150,7 @@ UnregisterSignal(mod.wearer, used_signal) used_signal = null mod.wearer.update_inv_back() + SEND_SIGNAL(src, COMSIG_MODULE_DEACTIVATED) return TRUE /// Called when the module is used @@ -162,15 +164,18 @@ //specifically a to_chat because the user is phased out. to_chat(mod.wearer, span_warning("You cannot activate this right now.")) return FALSE - if(SEND_SIGNAL(src, COMSIG_MOD_MODULE_TRIGGERED) & MOD_ABORT_USE) + if(SEND_SIGNAL(src, COMSIG_MODULE_TRIGGERED) & MOD_ABORT_USE) return FALSE COOLDOWN_START(src, cooldown_timer, cooldown_time) addtimer(CALLBACK(mod.wearer, /mob.proc/update_inv_back), cooldown_time) mod.wearer.update_inv_back() + SEND_SIGNAL(src, COMSIG_MODULE_USED) return TRUE /// Called when an activated module without a device is used /obj/item/mod/module/proc/on_select_use(atom/target) + if(mod.wearer.incapacitated(ignore_grab = TRUE)) + return FALSE mod.wearer.face_atom(target) if(!on_use()) return FALSE @@ -197,15 +202,16 @@ /obj/item/mod/module/proc/on_active_process(delta_time) return -/// Drains power from the suit cell +/// Drains power from the suit charge /obj/item/mod/module/proc/drain_power(amount) if(!check_power(amount)) return FALSE - mod.cell.charge = max(0, mod.cell.charge - amount) + mod.subtract_charge(amount) return TRUE +/// Checks if there is enough power in the suit /obj/item/mod/module/proc/check_power(amount) - if(!mod.cell || (mod.cell.charge < amount)) + if(mod.get_charge() < amount) return FALSE return TRUE diff --git a/code/modules/mod/modules/modules_antag.dm b/code/modules/mod/modules/modules_antag.dm index 870b13bf465..c1e93709b65 100644 --- a/code/modules/mod/modules/modules_antag.dm +++ b/code/modules/mod/modules/modules_antag.dm @@ -9,7 +9,7 @@ so this extra armor provides zero ability for extravehicular activity while deployed." icon_state = "armor_booster" module_type = MODULE_TOGGLE - active_power_cost = DEFAULT_CELL_DRAIN * 0.3 + active_power_cost = DEFAULT_CHARGE_DRAIN * 0.3 removable = FALSE incompatible_modules = list(/obj/item/mod/module/armor_booster) cooldown_time = 0.5 SECONDS @@ -44,8 +44,6 @@ var/obj/item/clothing/clothing_part = part if(clothing_part.clothing_flags & STOPSPRESSUREDAMAGE) clothing_part.clothing_flags &= ~STOPSPRESSUREDAMAGE - clothing_part.heat_protection = NONE - clothing_part.cold_protection = NONE spaceproofed[clothing_part] = TRUE /obj/item/mod/module/armor_booster/on_deactivation() @@ -66,8 +64,6 @@ var/obj/item/clothing/clothing_part = part if(spaceproofed[clothing_part]) clothing_part.clothing_flags |= STOPSPRESSUREDAMAGE - clothing_part.heat_protection = initial(clothing_part.heat_protection) - clothing_part.cold_protection = initial(clothing_part.cold_protection) spaceproofed = list() /obj/item/mod/module/armor_booster/elite @@ -84,8 +80,8 @@ though with its' low amount of separate charges, the user remains mortal." icon_state = "energy_shield" complexity = 3 - idle_power_cost = DEFAULT_CELL_DRAIN * 0.5 - use_power_cost = DEFAULT_CELL_DRAIN * 2 + idle_power_cost = DEFAULT_CHARGE_DRAIN * 0.5 + use_power_cost = DEFAULT_CHARGE_DRAIN * 2 incompatible_modules = list(/obj/item/mod/module/energy_shield) /// Max charges of the shield. var/max_charges = 3 @@ -134,8 +130,8 @@ This shield can perfectly nullify attacks ranging from high-caliber rifles to magic missiles, \ though can also be drained by more mundane attacks. It will not protect the caster from social ridicule." icon_state = "battlemage_shield" - idle_power_cost = DEFAULT_CELL_DRAIN * 0 //magic - use_power_cost = DEFAULT_CELL_DRAIN * 0 //magic too + idle_power_cost = DEFAULT_CHARGE_DRAIN * 0 //magic + use_power_cost = DEFAULT_CHARGE_DRAIN * 0 //magic too max_charges = 15 recharge_start_delay = 0 SECONDS charge_recovery = 8 @@ -226,7 +222,7 @@ in protest of these modules being legal." icon_state = "noslip" complexity = 1 - idle_power_cost = DEFAULT_CELL_DRAIN * 0.1 + idle_power_cost = DEFAULT_CHARGE_DRAIN * 0.1 incompatible_modules = list(/obj/item/mod/module/noslip) /obj/item/mod/module/noslip/on_suit_activation() diff --git a/code/modules/mod/modules/modules_engineering.dm b/code/modules/mod/modules/modules_engineering.dm index 9f1e5871553..4910611c51e 100644 --- a/code/modules/mod/modules/modules_engineering.dm +++ b/code/modules/mod/modules/modules_engineering.dm @@ -26,7 +26,7 @@ icon_state = "tray" module_type = MODULE_TOGGLE complexity = 1 - active_power_cost = DEFAULT_CELL_DRAIN * 0.2 + active_power_cost = DEFAULT_CHARGE_DRAIN * 0.2 incompatible_modules = list(/obj/item/mod/module/t_ray) cooldown_time = 0.5 SECONDS /// T-ray scan range. @@ -45,7 +45,7 @@ icon_state = "magnet" module_type = MODULE_TOGGLE complexity = 2 - active_power_cost = DEFAULT_CELL_DRAIN * 0.5 + active_power_cost = DEFAULT_CHARGE_DRAIN * 0.5 incompatible_modules = list(/obj/item/mod/module/magboot, /obj/item/mod/module/atrocinator) cooldown_time = 0.5 SECONDS /// Slowdown added onto the suit. @@ -86,7 +86,7 @@ icon_state = "tether" module_type = MODULE_ACTIVE complexity = 3 - use_power_cost = DEFAULT_CELL_DRAIN + use_power_cost = DEFAULT_CHARGE_DRAIN incompatible_modules = list(/obj/item/mod/module/tether) cooldown_time = 1.5 SECONDS @@ -144,7 +144,7 @@ giving a voice to an otherwise silent killer." icon_state = "radshield" complexity = 2 - idle_power_cost = DEFAULT_CELL_DRAIN * 0.3 + idle_power_cost = DEFAULT_CHARGE_DRAIN * 0.3 incompatible_modules = list(/obj/item/mod/module/rad_protection) tgui_id = "rad_counter" /// Radiation threat level being perceived. @@ -187,8 +187,8 @@ icon_state = "constructor" module_type = MODULE_USABLE complexity = 2 - idle_power_cost = DEFAULT_CELL_DRAIN * 0.2 - use_power_cost = DEFAULT_CELL_DRAIN * 2 + idle_power_cost = DEFAULT_CHARGE_DRAIN * 0.2 + use_power_cost = DEFAULT_CHARGE_DRAIN * 2 incompatible_modules = list(/obj/item/mod/module/constructor, /obj/item/mod/module/quick_carry) cooldown_time = 11 SECONDS @@ -218,8 +218,8 @@ module_type = MODULE_TOGGLE // complexity = 3 complexity = 0 - active_power_cost = DEFAULT_CELL_DRAIN*0.75 -// use_power_cost = DEFAULT_CELL_DRAIN*3 + active_power_cost = DEFAULT_CHARGE_DRAIN*0.75 +// use_power_cost = DEFAULT_CHARGE_DRAIN*3 removable = FALSE incompatible_modules = list(/obj/item/mod/module/kinesis) cooldown_time = 0.5 SECONDS diff --git a/code/modules/mod/modules/modules_general.dm b/code/modules/mod/modules/modules_general.dm index 15858af1b1e..9f13e61b659 100644 --- a/code/modules/mod/modules/modules_general.dm +++ b/code/modules/mod/modules/modules_general.dm @@ -32,12 +32,20 @@ modstorage.max_combined_w_class = max_combined_w_class modstorage.max_items = max_items SEND_SIGNAL(src, COMSIG_TRY_STORAGE_SET_LOCKSTATE, FALSE) + RegisterSignal(mod.chestplate, COMSIG_ITEM_PRE_UNEQUIP, .proc/on_chestplate_unequip) /obj/item/mod/module/storage/on_uninstall() var/datum/component/storage/modstorage = mod.GetComponent(/datum/component/storage) storage.slaves -= modstorage qdel(modstorage) SEND_SIGNAL(src, COMSIG_TRY_STORAGE_SET_LOCKSTATE, TRUE) + UnregisterSignal(mod.chestplate, COMSIG_ITEM_PRE_UNEQUIP) + +/obj/item/mod/module/storage/proc/on_chestplate_unequip(obj/item/source, force, atom/newloc, no_move, invdrop, silent) + if(QDELETED(source) || newloc == mod.wearer || !mod.wearer.s_store) + return + to_chat(mod.wearer, span_notice("[src] tries to store [mod.wearer.s_store] inside itself.")) + SEND_SIGNAL(src, COMSIG_TRY_STORAGE_INSERT, mod.wearer.s_store, mod.wearer, TRUE) /obj/item/mod/module/storage/large_capacity name = "MOD expanded storage module" @@ -72,12 +80,12 @@ name = "MOD ion jetpack module" desc = "A series of electric thrusters installed across the suit, this is a module highly anticipated by trainee Engineers. \ Rather than using gasses for combustion thrust, these jets are capable of accelerating ions using \ - charge from the suit's cell. Some say this isn't Nakamura Engineering's first foray into jet-enabled suits." + charge from the suit's charge. Some say this isn't Nakamura Engineering's first foray into jet-enabled suits." icon_state = "jetpack" module_type = MODULE_TOGGLE complexity = 3 - active_power_cost = DEFAULT_CELL_DRAIN * 0.5 - use_power_cost = DEFAULT_CELL_DRAIN + active_power_cost = DEFAULT_CHARGE_DRAIN * 0.5 + use_power_cost = DEFAULT_CHARGE_DRAIN incompatible_modules = list(/obj/item/mod/module/jetpack) cooldown_time = 0.5 SECONDS overlay_state_inactive = "module_jetpack" @@ -200,7 +208,7 @@ However, it will take from the suit's power to do so. Luckily, your PDA already has one of these." icon_state = "empshield" complexity = 1 - idle_power_cost = DEFAULT_CELL_DRAIN * 0.3 + idle_power_cost = DEFAULT_CHARGE_DRAIN * 0.3 incompatible_modules = list(/obj/item/mod/module/emp_shield) /obj/item/mod/module/emp_shield/on_install() @@ -218,7 +226,7 @@ icon_state = "flashlight" module_type = MODULE_TOGGLE complexity = 1 - active_power_cost = DEFAULT_CELL_DRAIN * 0.3 + active_power_cost = DEFAULT_CHARGE_DRAIN * 0.3 incompatible_modules = list(/obj/item/mod/module/flashlight) cooldown_time = 0.5 SECONDS overlay_state_inactive = "module_light" @@ -227,8 +235,8 @@ light_range = 3 light_power = 1 light_on = FALSE - /// Cell drain per range amount. - var/base_power = DEFAULT_CELL_DRAIN * 0.1 + /// Charge drain per range amount. + var/base_power = DEFAULT_CHARGE_DRAIN * 0.1 /// Minimum range we can set. var/min_range = 2 /// Maximum range we can set. @@ -287,13 +295,13 @@ /obj/item/mod/module/dispenser name = "MOD burger dispenser module" desc = "A rare piece of technology reverse-engineered from a prototype found in a Donk Corporation vessel. \ - This can draw incredible amounts of power from the suit's cell to create edible organic matter in the \ + This can draw incredible amounts of power from the suit's charge to create edible organic matter in the \ palm of the wearer's glove; however, research seemed to have entirely stopped at burgers. \ Notably, all attempts to get it to dispense Earl Grey tea have failed." icon_state = "dispenser" module_type = MODULE_USABLE complexity = 3 - use_power_cost = DEFAULT_CELL_DRAIN * 2 + use_power_cost = DEFAULT_CHARGE_DRAIN * 2 incompatible_modules = list(/obj/item/mod/module/dispenser) cooldown_time = 5 SECONDS /// Path we dispense. @@ -323,7 +331,7 @@ Useful for mining, monorail tracks, or even skydiving!" icon_state = "longfall" complexity = 1 - use_power_cost = DEFAULT_CELL_DRAIN * 5 + use_power_cost = DEFAULT_CHARGE_DRAIN * 5 incompatible_modules = list(/obj/item/mod/module/longfall) /obj/item/mod/module/longfall/on_suit_activation() @@ -349,7 +357,7 @@ icon_state = "regulator" module_type = MODULE_TOGGLE complexity = 2 - active_power_cost = DEFAULT_CELL_DRAIN * 0.3 + active_power_cost = DEFAULT_CHARGE_DRAIN * 0.3 incompatible_modules = list(/obj/item/mod/module/thermal_regulator) cooldown_time = 0.5 SECONDS /// The temperature we are regulating to. @@ -384,7 +392,7 @@ Nakamura Engineering swears up and down there's airbrakes." icon_state = "pathfinder" complexity = 2 - use_power_cost = DEFAULT_CELL_DRAIN * 10 + use_power_cost = DEFAULT_CHARGE_DRAIN * 10 incompatible_modules = list(/obj/item/mod/module/pathfinder) /// The pathfinding implant. var/obj/item/implant/mod/implant @@ -425,12 +433,11 @@ if(!ishuman(user)) return var/mob/living/carbon/human/human_user = user - if(human_user.back && !human_user.dropItemToGround(human_user.back)) + if(human_user.get_item_by_slot(mod.slot_flags) && !human_user.dropItemToGround(human_user.get_item_by_slot(mod.slot_flags))) return if(!human_user.equip_to_slot_if_possible(mod, mod.slot_flags, qdel_on_fail = FALSE, disable_warning = TRUE)) return - for(var/obj/item/part as anything in mod.mod_parts) - mod.deploy(null, part) + mod.quick_deploy(user) human_user.update_action_buttons(TRUE) balloon_alert(human_user, "[mod] attached") playsound(mod, 'sound/machines/ping.ogg', 50, TRUE) @@ -531,7 +538,7 @@ ..() implant = Target -/datum/action/item_action/mod_recall/Trigger() +/datum/action/item_action/mod_recall/Trigger(trigger_flags) . = ..() if(!.) return @@ -550,7 +557,7 @@ icon_state = "dnalock" module_type = MODULE_USABLE complexity = 2 - use_power_cost = DEFAULT_CELL_DRAIN * 3 + use_power_cost = DEFAULT_CHARGE_DRAIN * 3 incompatible_modules = list(/obj/item/mod/module/dna_lock, /obj/item/mod/module/eradication_lock) cooldown_time = 0.5 SECONDS /// The DNA we lock with. @@ -627,7 +634,7 @@ The purple glass of the visor seems to be constructed for nostalgic purposes." icon_state = "plasma_stabilizer" complexity = 1 - idle_power_cost = DEFAULT_CELL_DRAIN * 0.3 + idle_power_cost = DEFAULT_CHARGE_DRAIN * 0.3 incompatible_modules = list(/obj/item/mod/module/plasma_stabilizer) overlay_state_inactive = "module_plasma" diff --git a/code/modules/mod/modules/modules_maint.dm b/code/modules/mod/modules/modules_maint.dm index 6a844525031..90fe9ac5ca8 100644 --- a/code/modules/mod/modules/modules_maint.dm +++ b/code/modules/mod/modules/modules_maint.dm @@ -12,10 +12,10 @@ incompatible_modules = list(/obj/item/mod/module/springlock) /obj/item/mod/module/springlock/on_install() - mod.activation_step_time *= 0.75 + mod.activation_step_time *= 0.5 /obj/item/mod/module/springlock/on_uninstall() - mod.activation_step_time /= 0.75 + mod.activation_step_time *= 2 /obj/item/mod/module/springlock/on_suit_activation() RegisterSignal(mod.wearer, COMSIG_ATOM_EXPOSE_REAGENTS, .proc/on_wearer_exposed) @@ -26,6 +26,7 @@ ///Signal fired when wearer is exposed to reagents /obj/item/mod/module/springlock/proc/on_wearer_exposed(atom/source, list/reagents, datum/reagents/source_reagents, methods, volume_modifier, show_message) SIGNAL_HANDLER + if(!(methods & (VAPOR|PATCH|TOUCH))) return //remove non-touch reagent exposure to_chat(mod.wearer, span_danger("[src] makes an ominous click sound...")) @@ -36,6 +37,7 @@ ///Signal fired when wearer attempts to activate/deactivate suits /obj/item/mod/module/springlock/proc/on_activate_spring_block(datum/source, user) SIGNAL_HANDLER + balloon_alert(user, "springlocks aren't responding...?") return MOD_CANCEL_ACTIVATE @@ -49,7 +51,7 @@ playsound(mod.wearer, 'sound/effects/snap.ogg', 75, TRUE, frequency = 0.5) playsound(mod.wearer, 'sound/effects/splat.ogg', 50, TRUE, frequency = 0.5) mod.wearer.client?.give_award(/datum/award/achievement/misc/springlock, mod.wearer) - mod.wearer.apply_damage(500, BRUTE, forced = TRUE, sharpness = SHARP_POINTY, def_zone = BODY_ZONE_CHEST) //boggers, bogchamp, etc + mod.wearer.apply_damage(500, BRUTE, forced = TRUE, spread_damage = TRUE, sharpness = SHARP_POINTY) //boggers, bogchamp, etc mod.wearer.death() //just in case, for some reason, they're still alive flash_color(mod.wearer, flash_color = "#FF0000", flash_time = 10 SECONDS) @@ -70,13 +72,13 @@ var/list/songs = list() /// A list of the colors the module can take. var/static/list/rainbow_order = list( - "#FF6666", - "#FFAA66", - "#FFFF66", - "#66FF66", - "#66AAFF", - "#AA66FF", - ) + list(1,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,1, 0,0,0,0), + list(1,0,0,0, 0,0.5,0,0, 0,0,0,0, 0,0,0,1, 0,0,0,0), + list(1,0,0,0, 0,1,0,0, 0,0,0,0, 0,0,0,1, 0,0,0,0), + list(0,0,0,0, 0,1,0,0, 0,0,0,0, 0,0,0,1, 0,0,0,0), + list(0,0,0,0, 0,0.5,0,0, 0,0,1,0, 0,0,0,1, 0,0,0,0), + list(1,0,0,0, 0,0,0,0, 0,0,1,0, 0,0,0,1, 0,0,0,0), + ) /obj/item/mod/module/visor/rave/Initialize(mapload) . = ..() @@ -102,7 +104,7 @@ rave_screen = mod.wearer.add_client_colour(/datum/client_colour/rave) rave_screen.update_colour(rainbow_order[rave_number]) if(selection) - mod.wearer.playsound_local(get_turf(src), null, 50, channel = CHANNEL_JUKEBOX, S = sound(selection.song_path), use_reverb = FALSE) + SEND_SOUND(mod.wearer, sound(selection.song_path, volume = 50, channel = CHANNEL_JUKEBOX)) /obj/item/mod/module/visor/rave/on_deactivation() . = ..() @@ -111,6 +113,7 @@ QDEL_NULL(rave_screen) if(selection) mod.wearer.stop_sound_channel(CHANNEL_JUKEBOX) + SEND_SOUND(mod.wearer, sound('sound/machines/terminal_off.ogg', volume = 50, channel = CHANNEL_JUKEBOX)) /obj/item/mod/module/visor/rave/generate_worn_overlay(mutable_appearance/standing) . = ..() @@ -127,7 +130,7 @@ /obj/item/mod/module/visor/rave/get_configuration() . = ..() if(length(songs)) - .["selection"] = add_ui_configuration("Song", "list", selection.song_name, songs) + .["selection"] = add_ui_configuration("Song", "list", selection.song_name, clean_songs()) /obj/item/mod/module/visor/rave/configure_edit(key, value) switch(key) @@ -136,6 +139,11 @@ return selection = songs[value] +/obj/item/mod/module/visor/rave/proc/clean_songs() + . = list() + for(var/track in songs) + . += track + ///Tanner - Tans you with spraytan. /obj/item/mod/module/tanner name = "MOD tanning module" @@ -144,7 +152,7 @@ icon_state = "tanning" module_type = MODULE_USABLE complexity = 1 - use_power_cost = DEFAULT_CELL_DRAIN * 5 + use_power_cost = DEFAULT_CHARGE_DRAIN * 5 incompatible_modules = list(/obj/item/mod/module/tanner) cooldown_time = 30 SECONDS @@ -167,7 +175,7 @@ icon_state = "bloon" module_type = MODULE_USABLE complexity = 1 - use_power_cost = DEFAULT_CELL_DRAIN*0.5 + use_power_cost = DEFAULT_CHARGE_DRAIN*0.5 incompatible_modules = list(/obj/item/mod/module/balloon) cooldown_time = 15 SECONDS @@ -183,7 +191,7 @@ mod.wearer.put_in_hands(balloon) drain_power(use_power_cost) -/// Paper Dispenser - Dispenses (sometimes burning) paper sheets. +///Paper Dispenser - Dispenses (sometimes burning) paper sheets. /obj/item/mod/module/paper_dispenser name = "MOD paper dispenser module" desc = "A simple module designed by the bureaucrats of Torch Bay. \ @@ -191,7 +199,7 @@ icon_state = "paper_maker" module_type = MODULE_USABLE complexity = 1 - use_power_cost = DEFAULT_CELL_DRAIN * 0.5 + use_power_cost = DEFAULT_CHARGE_DRAIN * 0.5 incompatible_modules = list(/obj/item/mod/module/paper_dispenser) cooldown_time = 5 SECONDS /// The total number of sheets created by this MOD. The more sheets, them more likely they set on fire. @@ -233,8 +241,8 @@ icon_state = "atrocinator" module_type = MODULE_TOGGLE complexity = 2 - active_power_cost = DEFAULT_CELL_DRAIN - incompatible_modules = list(/obj/item/mod/module/atrocinator, /obj/item/mod/module/magboot) + active_power_cost = DEFAULT_CHARGE_DRAIN + incompatible_modules = list(/obj/item/mod/module/atrocinator, /obj/item/mod/module/magboot, /obj/item/mod/module/anomaly_locked/antigrav) cooldown_time = 0.5 SECONDS overlay_state_inactive = "module_atrocinator" /// How many steps the user has taken since turning the suit on, used for footsteps. diff --git a/code/modules/mod/modules/modules_medical.dm b/code/modules/mod/modules/modules_medical.dm index e32d5ed0f4f..9f42354b48f 100644 --- a/code/modules/mod/modules/modules_medical.dm +++ b/code/modules/mod/modules/modules_medical.dm @@ -14,7 +14,7 @@ icon_state = "health" module_type = MODULE_ACTIVE complexity = 2 - use_power_cost = DEFAULT_CELL_DRAIN + use_power_cost = DEFAULT_CHARGE_DRAIN incompatible_modules = list(/obj/item/mod/module/health_analyzer) cooldown_time = 0.5 SECONDS tgui_id = "health_analyzer" @@ -67,7 +67,7 @@ or simply for fun. However, Nanotrasen has locked the module's ability to assist in hand-to-hand combat." icon_state = "carry" complexity = 1 - idle_power_cost = DEFAULT_CELL_DRAIN * 0.3 + idle_power_cost = DEFAULT_CHARGE_DRAIN * 0.3 incompatible_modules = list(/obj/item/mod/module/quick_carry, /obj/item/mod/module/constructor) /obj/item/mod/module/quick_carry/on_suit_activation() @@ -98,7 +98,7 @@ icon_state = "injector" module_type = MODULE_ACTIVE complexity = 1 - active_power_cost = DEFAULT_CELL_DRAIN * 0.3 + active_power_cost = DEFAULT_CHARGE_DRAIN * 0.3 device = /obj/item/reagent_containers/syringe/mod incompatible_modules = list(/obj/item/mod/module/injector) cooldown_time = 0.5 SECONDS @@ -125,7 +125,7 @@ icon_state = "organ_thrower" module_type = MODULE_ACTIVE complexity = 2 - use_power_cost = DEFAULT_CELL_DRAIN + use_power_cost = DEFAULT_CHARGE_DRAIN incompatible_modules = list(/obj/item/mod/module/organ_thrower, /obj/item/mod/module/microwave_beam) cooldown_time = 0.5 SECONDS var/max_organs = 5 diff --git a/code/modules/mod/modules/modules_science.dm b/code/modules/mod/modules/modules_science.dm index f44661f66da..fa179feca9b 100644 --- a/code/modules/mod/modules/modules_science.dm +++ b/code/modules/mod/modules/modules_science.dm @@ -9,7 +9,7 @@ icon_state = "scanner" module_type = MODULE_TOGGLE complexity = 1 - active_power_cost = DEFAULT_CELL_DRAIN * 0.2 + active_power_cost = DEFAULT_CHARGE_DRAIN * 0.2 incompatible_modules = list(/obj/item/mod/module/reagent_scanner) cooldown_time = 0.5 SECONDS @@ -64,7 +64,7 @@ to the HUD. Useful for universal translation, or perhaps as a calculator." module_type = MODULE_USABLE complexity = 3 - idle_power_cost = DEFAULT_CELL_DRAIN * 0.5 + idle_power_cost = DEFAULT_CHARGE_DRAIN * 0.5 incompatible_modules = list(/obj/item/mod/module/circuit) cooldown_time = 0.5 SECONDS var/obj/item/integrated_circuit/circuit @@ -79,11 +79,11 @@ starting_circuit = circuit, \ ) -/obj/item/mod/module/circuit/on_install() +/*/obj/item/mod/module/circuit/on_install() circuit.set_cell(mod.cell) /obj/item/mod/module/circuit/on_uninstall() - circuit.set_cell(mod.cell) + circuit.set_cell(mod.cell)*/ /obj/item/mod/module/circuit/on_suit_activation() circuit.set_on(TRUE) @@ -254,7 +254,8 @@ icon_state = "antigrav" module_type = MODULE_TOGGLE complexity = 3 - active_power_cost = DEFAULT_CELL_DRAIN * 0.7 + active_power_cost = DEFAULT_CHARGE_DRAIN * 0.7 + incompatible_modules = list(/obj/item/mod/module/anomaly_locked, /obj/item/mod/module/atrocinator) cooldown_time = 0.5 SECONDS accepted_anomalies = list(/obj/item/assembly/signaler/anomaly/grav) @@ -288,7 +289,7 @@ icon_state = "teleporter" module_type = MODULE_ACTIVE complexity = 3 - use_power_cost = DEFAULT_CELL_DRAIN * 5 + use_power_cost = DEFAULT_CHARGE_DRAIN * 5 cooldown_time = 5 SECONDS accepted_anomalies = list(/obj/item/assembly/signaler/anomaly/bluespace) /// Time it takes to teleport @@ -307,9 +308,11 @@ animate(mod.wearer, teleport_time, color = COLOR_CYAN, transform = user_matrix.Scale(4, 0.25), easing = EASE_OUT) if(!do_after(mod.wearer, teleport_time, target = mod)) balloon_alert(mod.wearer, "interrupted!") - animate(mod.wearer, teleport_time, color = null, transform = user_matrix.Scale(0.25, 4), easing = EASE_IN) + var/matrix/post_matrix = matrix(mod.wearer.transform) + animate(mod.wearer, teleport_time, color = null, transform = post_matrix.Scale(0.25, 4), easing = EASE_IN) return - animate(mod.wearer, teleport_time*0.1, color = null, transform = user_matrix.Scale(0.25, 4), easing = EASE_IN) + var/matrix/post_matrix = matrix(mod.wearer.transform) + animate(mod.wearer, teleport_time*0.1, color = null, transform = post_matrix.Scale(0.25, 4), easing = EASE_IN) if(!do_teleport(mod.wearer, target_turf, asoundin = 'sound/effects/phasein.ogg')) return drain_power(use_power_cost) diff --git a/code/modules/mod/modules/modules_security.dm b/code/modules/mod/modules/modules_security.dm index b44a2857412..4e7b1bb671c 100644 --- a/code/modules/mod/modules/modules_security.dm +++ b/code/modules/mod/modules/modules_security.dm @@ -9,8 +9,8 @@ icon_state = "cloak" module_type = MODULE_TOGGLE complexity = 4 - active_power_cost = DEFAULT_CELL_DRAIN * 2 - use_power_cost = DEFAULT_CELL_DRAIN * 10 + active_power_cost = DEFAULT_CHARGE_DRAIN * 2 + use_power_cost = DEFAULT_CHARGE_DRAIN * 10 incompatible_modules = list(/obj/item/mod/module/stealth) cooldown_time = 5 SECONDS /// Whether or not the cloak turns off on bumping. @@ -26,7 +26,7 @@ RegisterSignal(mod.wearer, COMSIG_LIVING_MOB_BUMP, .proc/unstealth) RegisterSignal(mod.wearer, COMSIG_HUMAN_MELEE_UNARMED_ATTACK, .proc/on_unarmed_attack) RegisterSignal(mod.wearer, COMSIG_ATOM_BULLET_ACT, .proc/on_bullet_act) - RegisterSignal(mod.wearer, list(COMSIG_ITEM_ATTACK, COMSIG_PARENT_ATTACKBY, COMSIG_ATOM_ATTACK_HAND, COMSIG_ATOM_ATTACK_PAW, COMSIG_ATOM_HITBY, COMSIG_ATOM_HULK_ATTACK, COMSIG_ATOM_ATTACK_PAW, COMSIG_CARBON_CUFF_ATTEMPTED), .proc/unstealth) + RegisterSignal(mod.wearer, list(COMSIG_ITEM_ATTACK, COMSIG_PARENT_ATTACKBY, COMSIG_ATOM_ATTACK_HAND, COMSIG_ATOM_HITBY, COMSIG_ATOM_HULK_ATTACK, COMSIG_ATOM_ATTACK_PAW, COMSIG_CARBON_CUFF_ATTEMPTED), .proc/unstealth) animate(mod.wearer, alpha = stealth_alpha, time = 1.5 SECONDS) drain_power(use_power_cost) @@ -66,13 +66,13 @@ desc = "The latest in stealth technology, this module is a definite upgrade over previous versions. \ The field has been tuned to be even more responsive and fast-acting, with enough stability to \ continue operation of the field even if the user bumps into others. \ - The draw on the power cell has been reduced drastically, \ - making this perfect for activities like standing near sentry turrets for extended periods of time." + The power draw has been reduced drastically, making this perfect for activities like \ + standing near sentry turrets for extended periods of time." icon_state = "cloak_ninja" bumpoff = FALSE stealth_alpha = 20 - active_power_cost = DEFAULT_CELL_DRAIN - use_power_cost = DEFAULT_CELL_DRAIN * 5 + active_power_cost = DEFAULT_CHARGE_DRAIN + use_power_cost = DEFAULT_CHARGE_DRAIN * 5 cooldown_time = 3 SECONDS ///Holster - Instantly holsters any not huge gun. @@ -85,7 +85,7 @@ icon_state = "holster" module_type = MODULE_USABLE complexity = 2 - use_power_cost = DEFAULT_CELL_DRAIN * 0.5 + use_power_cost = DEFAULT_CHARGE_DRAIN * 0.5 incompatible_modules = list(/obj/item/mod/module/holster) cooldown_time = 0.5 SECONDS /// Gun we have holstered. diff --git a/code/modules/mod/modules/modules_service.dm b/code/modules/mod/modules/modules_service.dm index 86b7a704294..3c5526232b6 100644 --- a/code/modules/mod/modules/modules_service.dm +++ b/code/modules/mod/modules/modules_service.dm @@ -8,7 +8,7 @@ icon_state = "bikehorn" module_type = MODULE_USABLE complexity = 1 - use_power_cost = DEFAULT_CELL_DRAIN + use_power_cost = DEFAULT_CHARGE_DRAIN incompatible_modules = list(/obj/item/mod/module/bikehorn) cooldown_time = 1 SECONDS @@ -28,7 +28,7 @@ icon_state = "microwave_beam" module_type = MODULE_ACTIVE complexity = 2 - use_power_cost = DEFAULT_CELL_DRAIN * 5 + use_power_cost = DEFAULT_CHARGE_DRAIN * 5 incompatible_modules = list(/obj/item/mod/module/microwave_beam, /obj/item/mod/module/organ_thrower) cooldown_time = 10 SECONDS @@ -64,8 +64,8 @@ miniaturized etheric blasts of space-time beneath the user's feet, this enables them to... \ to waddle around, bouncing to and fro with a pep in their step." icon_state = "waddle" - idle_power_cost = DEFAULT_CELL_DRAIN * 0.2 - removable = FALSE + complexity = 1 + idle_power_cost = DEFAULT_CHARGE_DRAIN * 0.2 incompatible_modules = list(/obj/item/mod/module/waddle) /obj/item/mod/module/waddle/on_suit_activation() diff --git a/code/modules/mod/modules/modules_supply.dm b/code/modules/mod/modules/modules_supply.dm index b97be7ab5e2..1a2d69e8989 100644 --- a/code/modules/mod/modules/modules_supply.dm +++ b/code/modules/mod/modules/modules_supply.dm @@ -9,7 +9,7 @@ icon_state = "gps" module_type = MODULE_ACTIVE complexity = 1 - active_power_cost = DEFAULT_CELL_DRAIN * 0.3 + active_power_cost = DEFAULT_CHARGE_DRAIN * 0.3 device = /obj/item/gps/mod incompatible_modules = list(/obj/item/mod/module/gps) cooldown_time = 0.5 SECONDS @@ -29,7 +29,7 @@ icon_state = "clamp" module_type = MODULE_ACTIVE complexity = 3 - use_power_cost = DEFAULT_CELL_DRAIN + use_power_cost = DEFAULT_CHARGE_DRAIN incompatible_modules = list(/obj/item/mod/module/clamp) cooldown_time = 0.5 SECONDS overlay_state_inactive = "module_clamp" @@ -73,7 +73,7 @@ playsound(src, 'sound/mecha/hydraulic.ogg', 25, TRUE) drain_power(use_power_cost) -/obj/item/mod/module/clamp/on_uninstall() +/obj/item/mod/module/clamp/on_suit_deactivation() for(var/atom/movable/crate as anything in stored_crates) crate.forceMove(drop_location()) stored_crates -= crate @@ -86,7 +86,7 @@ icon_state = "drill" module_type = MODULE_ACTIVE complexity = 2 - use_power_cost = DEFAULT_CELL_DRAIN + use_power_cost = DEFAULT_CHARGE_DRAIN incompatible_modules = list(/obj/item/mod/module/drill) cooldown_time = 0.5 SECONDS @@ -136,7 +136,7 @@ icon_state = "ore" module_type = MODULE_USABLE complexity = 2 - use_power_cost = DEFAULT_CELL_DRAIN * 0.2 + use_power_cost = DEFAULT_CHARGE_DRAIN * 0.2 incompatible_modules = list(/obj/item/mod/module/orebag) cooldown_time = 0.5 SECONDS /// The ores stored in the bag. diff --git a/code/modules/mod/modules/modules_timeline.dm b/code/modules/mod/modules/modules_timeline.dm index 078fedd2290..69bcbe667c2 100644 --- a/code/modules/mod/modules/modules_timeline.dm +++ b/code/modules/mod/modules/modules_timeline.dm @@ -12,11 +12,10 @@ out to be a good deterrent." icon_state = "eradicationlock" module_type = MODULE_USABLE - complexity = 2 - use_power_cost = DEFAULT_CELL_DRAIN * 3 + removable = FALSE + use_power_cost = DEFAULT_CHARGE_DRAIN * 3 incompatible_modules = list(/obj/item/mod/module/eradication_lock, /obj/item/mod/module/dna_lock) cooldown_time = 0.5 SECONDS - removable = FALSE //copy paste this comment - no timeline modules should be removable /// The ckey we lock with, to allow all alternate versions of the user, huhehuehe var/true_owner_ckey @@ -62,11 +61,10 @@ safety reasons while preparing a rewind." icon_state = "rewinder" module_type = MODULE_USABLE - complexity = 1 - use_power_cost = DEFAULT_CELL_DRAIN * 5 + removable = FALSE + use_power_cost = DEFAULT_CHARGE_DRAIN * 5 incompatible_modules = list(/obj/item/mod/module/rewinder) cooldown_time = 20 SECONDS - removable = FALSE //copy paste this comment - no timeline modules should be removable /obj/item/mod/module/rewinder/on_use() . = ..() @@ -76,15 +74,15 @@ playsound(src, 'sound/items/modsuit/time_anchor_set.ogg', 50, TRUE) //stops all mods from triggering during rewinding for(var/obj/item/mod/module/module as anything in mod.modules) - RegisterSignal(module, COMSIG_MOD_MODULE_TRIGGERED, .proc/on_module_triggered) + RegisterSignal(module, COMSIG_MODULE_TRIGGERED, .proc/on_module_triggered) mod.wearer.AddComponent(/datum/component/dejavu/timeline, 1, 10 SECONDS) RegisterSignal(mod, COMSIG_MOD_ACTIVATE, .proc/on_activate_block) addtimer(CALLBACK(src, .proc/unblock_suit_activation), 10 SECONDS) -///unregisters the modsuit deactivation blocking signal, after dejavu functionality finishes. +///Unregisters the modsuit deactivation blocking signal, after dejavu functionality finishes. /obj/item/mod/module/rewinder/proc/unblock_suit_activation() for(var/obj/item/mod/module/module as anything in mod.modules) - UnregisterSignal(module, COMSIG_MOD_MODULE_TRIGGERED) + UnregisterSignal(module, COMSIG_MODULE_TRIGGERED) UnregisterSignal(mod, COMSIG_MOD_ACTIVATE) ///Signal fired when wearer attempts to activate/deactivate suits @@ -99,7 +97,7 @@ balloon_alert(mod.wearer, "not while rewinding!") return MOD_ABORT_USE -///timestopper - Need I really explain? It's the wizard's time stop, but the user channels it by not moving instead of a duration. +///Timestopper - Need I really explain? It's the wizard's time stop, but the user channels it by not moving instead of a duration. /obj/item/mod/module/timestopper name = "MOD timestopper module" desc = "A module that can halt time in a small radius around the user... for as long as they \ @@ -107,11 +105,10 @@ module has a hefty cooldown period to avoid reality errors." icon_state = "timestop" module_type = MODULE_USABLE - complexity = 3 - use_power_cost = DEFAULT_CELL_DRAIN * 5 + removable = FALSE + use_power_cost = DEFAULT_CHARGE_DRAIN * 5 incompatible_modules = list(/obj/item/mod/module/timestopper) cooldown_time = 60 SECONDS - removable = FALSE //copy paste this comment - no timeline modules should be removable ///the current timestop in progress var/obj/effect/timestop/channelled/timestop @@ -124,15 +121,15 @@ return //stops all mods from triggering during timestop- including timestop itself for(var/obj/item/mod/module/module as anything in mod.modules) - RegisterSignal(module, COMSIG_MOD_MODULE_TRIGGERED, .proc/on_module_triggered) + RegisterSignal(module, COMSIG_MODULE_TRIGGERED, .proc/on_module_triggered) timestop = new /obj/effect/timestop/channelled(get_turf(mod.wearer), 2, INFINITY, list(mod.wearer)) RegisterSignal(timestop, COMSIG_PARENT_QDELETING, .proc/unblock_suit_activation) -///unregisters the modsuit deactivation blocking signal, after timestop functionality finishes. +///Unregisters the modsuit deactivation blocking signal, after timestop functionality finishes. /obj/item/mod/module/timestopper/proc/unblock_suit_activation(datum/source) SIGNAL_HANDLER for(var/obj/item/mod/module/module as anything in mod.modules) - UnregisterSignal(module, COMSIG_MOD_MODULE_TRIGGERED) + UnregisterSignal(module, COMSIG_MODULE_TRIGGERED) UnregisterSignal(source, COMSIG_PARENT_QDELETING) UnregisterSignal(mod, COMSIG_MOD_ACTIVATE) timestop = null @@ -149,18 +146,17 @@ balloon_alert(user, "not while channelling timestop!") return MOD_CANCEL_ACTIVATE -///timeline jumper - Infinite phasing. needs some special effects +///Timeline Jumper - Infinite phasing. needs some special effects /obj/item/mod/module/timeline_jumper name = "MOD timeline jumper module" desc = "A module used to traverse timelines, phasing the user in and out of the stream of events." icon_state = "timeline_jumper" module_type = MODULE_USABLE - complexity = 2 - use_power_cost = DEFAULT_CELL_DRAIN * 5 + removable = FALSE + use_power_cost = DEFAULT_CHARGE_DRAIN * 5 incompatible_modules = list(/obj/item/mod/module/timeline_jumper) cooldown_time = 5 SECONDS allowed_in_phaseout = TRUE - removable = FALSE //copy paste this comment - no timeline modules should be removable ///the dummy for phasing from this module, the wearer is phased out while this exists. var/obj/effect/dummy/phased_mob/chrono/phased_mob @@ -210,11 +206,10 @@ timestream. They never are, they never were, they never will be." icon_state = "chronogun" module_type = MODULE_ACTIVE - complexity = 3 - use_power_cost = DEFAULT_CELL_DRAIN * 5 + removable = FALSE + use_power_cost = DEFAULT_CHARGE_DRAIN * 5 incompatible_modules = list(/obj/item/mod/module/tem) cooldown_time = 0.5 SECONDS - removable = FALSE //copy paste this comment - no timeline modules should be removable ///reference to the chrono field being controlled by this module var/obj/structure/chrono_field/field = null ///where the chronofield maker was when the field went up diff --git a/code/modules/mod/modules/modules_visor.dm b/code/modules/mod/modules/modules_visor.dm index 99069f8d093..59473ae691b 100644 --- a/code/modules/mod/modules/modules_visor.dm +++ b/code/modules/mod/modules/modules_visor.dm @@ -6,7 +6,7 @@ desc = "A heads-up display installed into the visor of the suit. They say these also let you see behind you." module_type = MODULE_TOGGLE complexity = 2 - active_power_cost = DEFAULT_CELL_DRAIN * 0.3 + active_power_cost = DEFAULT_CHARGE_DRAIN * 0.3 incompatible_modules = list(/obj/item/mod/module/visor) cooldown_time = 0.5 SECONDS /// The HUD type given by the visor. diff --git a/code/modules/power/cell.dm b/code/modules/power/cell.dm index 27bd102d790..f192dedc27a 100644 --- a/code/modules/power/cell.dm +++ b/code/modules/power/cell.dm @@ -426,10 +426,6 @@ . = ..() charge = 50000 -/obj/item/stock_parts/cell/crystal_cell/wizard - desc = "A very high power cell made from crystallized magic." - chargerate = 5000 - /obj/item/stock_parts/cell/inducer_supply maxcharge = 5000 charge = 5000 diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 0fd0066a794..a330e0c47db 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -687,7 +687,7 @@ button_icon_state = "sniper_zoom" var/obj/item/gun/gun = null -/datum/action/toggle_scope_zoom/Trigger() +/datum/action/toggle_scope_zoom/Trigger(trigger_flags) . = ..() if(!.) return diff --git a/code/modules/research/designs/mechfabricator_designs.dm b/code/modules/research/designs/mechfabricator_designs.dm index f353be2442f..48f2a525ca3 100644 --- a/code/modules/research/designs/mechfabricator_designs.dm +++ b/code/modules/research/designs/mechfabricator_designs.dm @@ -1106,6 +1106,12 @@ materials = list(/datum/material/iron = 2500, /datum/material/glass = 500) build_path = /obj/item/mod/module/storage +/datum/design/module/mod_storage_expanded + name = "MOD Module: Expanded Storage" + id = "mod_storage_expanded" + materials = list(/datum/material/iron = 5000, /datum/material/uranium = 2000) + build_path = /obj/item/mod/module/storage/large_capacity + /datum/design/module/mod_visor_medhud name = "MOD Module: Medical Visor" id = "mod_visor_medhud" @@ -1137,7 +1143,7 @@ /datum/design/module/mod_visor_welding name = "MOD Module: Welding Protection" id = "mod_welding" - materials = list(/datum/material/iron = 500, /datum/material/glass = 500) + materials = list(/datum/material/iron = 500, /datum/material/glass = 1000) build_path = /obj/item/mod/module/welding department_type = MODULE_ENGINEERING @@ -1261,6 +1267,13 @@ build_path = /obj/item/mod/module/injector department_type = MODULE_MEDICAL +/datum/design/module/mod_bikehorn + name = "MOD Module: Bike Horn" + id = "mod_bikehorn" + materials = list(/datum/material/plastic = 500, /datum/material/iron = 500) + build_path = /obj/item/mod/module/bikehorn + department_type = MODULE_SERVICE + /datum/design/module/mod_microwave_beam name = "MOD Module: Microwave Beam" id = "mod_microwave_beam" @@ -1268,11 +1281,11 @@ build_path = /obj/item/mod/module/microwave_beam department_type = MODULE_SERVICE -/datum/design/module/mod_bikehorn - name = "MOD Module: Bike Horn" - id = "mod_bikehorn" - materials = list(/datum/material/plastic = 500, /datum/material/iron = 500) - build_path = /obj/item/mod/module/bikehorn +/datum/design/module/mod_waddle + name = "MOD Module: Waddle" + id = "mod_waddle" + materials = list(/datum/material/plastic = 1000, /datum/material/iron = 1000) + build_path = /obj/item/mod/module/waddle department_type = MODULE_SERVICE /datum/design/module/mod_clamp diff --git a/code/modules/research/techweb/all_nodes.dm b/code/modules/research/techweb/all_nodes.dm index 387f0c0e98c..e13f518c443 100644 --- a/code/modules/research/techweb/all_nodes.dm +++ b/code/modules/research/techweb/all_nodes.dm @@ -1490,6 +1490,7 @@ "mod_jetpack", "mod_rad_protection", "mod_emp_shield", + "mod_storage_expanded", ) research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 3500) @@ -1532,6 +1533,7 @@ "mod_armor_cosmohonk", "mod_bikehorn", "mod_microwave_beam", + "mod_waddle", ) research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500) diff --git a/code/modules/research/xenobiology/crossbreeding/_clothing.dm b/code/modules/research/xenobiology/crossbreeding/_clothing.dm index 7fe659016b4..20a6236e7c5 100644 --- a/code/modules/research/xenobiology/crossbreeding/_clothing.dm +++ b/code/modules/research/xenobiology/crossbreeding/_clothing.dm @@ -64,7 +64,7 @@ Slimecrossing Armor icon_icon = 'icons/obj/slimecrossing.dmi' button_icon_state = "prismcolor" -/datum/action/item_action/change_prism_colour/Trigger() +/datum/action/item_action/change_prism_colour/Trigger(trigger_flags) if(!IsAvailable()) return var/obj/item/clothing/glasses/prism_glasses/glasses = target @@ -78,7 +78,7 @@ Slimecrossing Armor icon_icon = 'icons/obj/slimecrossing.dmi' button_icon_state = "lightprism" -/datum/action/item_action/place_light_prism/Trigger() +/datum/action/item_action/place_light_prism/Trigger(trigger_flags) if(!IsAvailable()) return var/obj/item/clothing/glasses/prism_glasses/glasses = target diff --git a/code/modules/ruins/spaceruin_code/hilbertshotel.dm b/code/modules/ruins/spaceruin_code/hilbertshotel.dm index a6c07c4a4ac..8faf880d2a1 100644 --- a/code/modules/ruins/spaceruin_code/hilbertshotel.dm +++ b/code/modules/ruins/spaceruin_code/hilbertshotel.dm @@ -337,7 +337,7 @@ GLOBAL_VAR_INIT(hhMysteryRoomNumber, rand(1, 999999)) desc = "Stop looking through the bluespace peephole." button_icon_state = "cancel_peephole" -/datum/action/peephole_cancel/Trigger() +/datum/action/peephole_cancel/Trigger(trigger_flags) . = ..() to_chat(owner, span_warning("You move away from the peephole.")) owner.reset_perspective() diff --git a/code/modules/surgery/dental_implant.dm b/code/modules/surgery/dental_implant.dm index a7326ea0973..1fef114b341 100644 --- a/code/modules/surgery/dental_implant.dm +++ b/code/modules/surgery/dental_implant.dm @@ -35,7 +35,7 @@ /datum/action/item_action/hands_free/activate_pill name = "Activate Pill" -/datum/action/item_action/hands_free/activate_pill/Trigger() +/datum/action/item_action/hands_free/activate_pill/Trigger(trigger_flags) if(!..()) return FALSE var/obj/item/item_target = target diff --git a/code/modules/surgery/organs/heart.dm b/code/modules/surgery/organs/heart.dm index f1cbb1220f8..ef98d9c876a 100644 --- a/code/modules/surgery/organs/heart.dm +++ b/code/modules/surgery/organs/heart.dm @@ -149,7 +149,7 @@ name = "Pump your blood" //You are now brea- pumping blood manually -/datum/action/item_action/organ_action/cursed_heart/Trigger() +/datum/action/item_action/organ_action/cursed_heart/Trigger(trigger_flags) . = ..() if(. && istype(target, /obj/item/organ/heart/cursed)) var/obj/item/organ/heart/cursed/cursed_heart = target diff --git a/code/modules/surgery/organs/tongue.dm b/code/modules/surgery/organs/tongue.dm index 7561be778c3..e80535477b7 100644 --- a/code/modules/surgery/organs/tongue.dm +++ b/code/modules/surgery/organs/tongue.dm @@ -125,7 +125,7 @@ QDEL_NULL(statue) . = ..() -/datum/action/item_action/organ_action/statue/Trigger() +/datum/action/item_action/organ_action/statue/Trigger(trigger_flags) . = ..() if(!iscarbon(owner)) to_chat(owner, span_warning("Your body rejects the powers of the tongue!")) diff --git a/code/modules/surgery/organs/vocal_cords.dm b/code/modules/surgery/organs/vocal_cords.dm index 430d5467f49..95a1d7557a3 100644 --- a/code/modules/surgery/organs/vocal_cords.dm +++ b/code/modules/surgery/organs/vocal_cords.dm @@ -32,7 +32,7 @@ actions_types = list(/datum/action/item_action/organ_action/use/adamantine_vocal_cords) icon_state = "adamantine_cords" -/datum/action/item_action/organ_action/use/adamantine_vocal_cords/Trigger() +/datum/action/item_action/organ_action/use/adamantine_vocal_cords/Trigger(trigger_flags) if(!IsAvailable()) return var/message = tgui_input_text(owner, "Resonate a message to all nearby golems", "Resonate") @@ -86,7 +86,7 @@ return FALSE return TRUE -/datum/action/item_action/organ_action/colossus/Trigger() +/datum/action/item_action/organ_action/colossus/Trigger(trigger_flags) . = ..() if(!IsAvailable()) if(world.time < cords.next_command) diff --git a/code/modules/vehicles/mecha/combat/durand.dm b/code/modules/vehicles/mecha/combat/durand.dm index a472fe9820d..54548cca0bf 100644 --- a/code/modules/vehicles/mecha/combat/durand.dm +++ b/code/modules/vehicles/mecha/combat/durand.dm @@ -238,7 +238,7 @@ own integrity back to max. Shield is automatically dropped if we run out of powe for(var/O in chassis.occupants) var/mob/living/occupant = O var/datum/action/action = LAZYACCESSASSOC(chassis.occupant_actions, occupant, /datum/action/vehicle/sealed/mecha/mech_defense_mode) - action.Trigger(FALSE) + action.Trigger() atom_integrity = 10000 /obj/durand_shield/play_attack_sound() diff --git a/code/modules/vehicles/mecha/combat/savannah_ivanov.dm b/code/modules/vehicles/mecha/combat/savannah_ivanov.dm index 50ecda7b040..eb03af7b1f2 100644 --- a/code/modules/vehicles/mecha/combat/savannah_ivanov.dm +++ b/code/modules/vehicles/mecha/combat/savannah_ivanov.dm @@ -304,7 +304,7 @@ name = "Savannah Skyfall" button_icon_state = "mech_savannah" -/datum/action/vehicle/sealed/mecha/skyfall/Trigger() +/datum/action/vehicle/sealed/mecha/skyfall/Trigger(trigger_flags) if(!owner || !chassis || !(owner in chassis.occupants)) return var/obj/vehicle/sealed/mecha/combat/savannah_ivanov/savannah_mecha = chassis @@ -333,7 +333,7 @@ name = "Ivanov Strike" button_icon_state = "mech_ivanov" -/datum/action/vehicle/sealed/mecha/ivanov_strike/Trigger() +/datum/action/vehicle/sealed/mecha/ivanov_strike/Trigger(trigger_flags) if(!owner || !chassis || !(owner in chassis.occupants)) return var/obj/vehicle/sealed/mecha/combat/savannah_ivanov/ivanov_mecha = chassis diff --git a/code/modules/vehicles/mecha/mecha_actions.dm b/code/modules/vehicles/mecha/mecha_actions.dm index 25bd29178c3..744897f891a 100644 --- a/code/modules/vehicles/mecha/mecha_actions.dm +++ b/code/modules/vehicles/mecha/mecha_actions.dm @@ -19,7 +19,7 @@ name = "Eject From Mech" button_icon_state = "mech_eject" -/datum/action/vehicle/sealed/mecha/mech_eject/Trigger() +/datum/action/vehicle/sealed/mecha/mech_eject/Trigger(trigger_flags) if(!owner) return if(!chassis || !(owner in chassis.occupants)) @@ -30,7 +30,7 @@ name = "Toggle Internal Airtank Usage" button_icon_state = "mech_internals_off" -/datum/action/vehicle/sealed/mecha/mech_toggle_internals/Trigger() +/datum/action/vehicle/sealed/mecha/mech_toggle_internals/Trigger(trigger_flags) if(!owner || !chassis || !(owner in chassis.occupants)) return @@ -44,7 +44,7 @@ name = "Cycle Equipment" button_icon_state = "mech_cycle_equip_off" -/datum/action/vehicle/sealed/mecha/mech_cycle_equip/Trigger() +/datum/action/vehicle/sealed/mecha/mech_cycle_equip/Trigger(trigger_flags) if(!owner || !chassis || !(owner in chassis.occupants)) return @@ -90,7 +90,7 @@ name = "Toggle Lights" button_icon_state = "mech_lights_off" -/datum/action/vehicle/sealed/mecha/mech_toggle_lights/Trigger() +/datum/action/vehicle/sealed/mecha/mech_toggle_lights/Trigger(trigger_flags) if(!owner || !chassis || !(owner in chassis.occupants)) return @@ -112,7 +112,7 @@ name = "View Stats" button_icon_state = "mech_view_stats" -/datum/action/vehicle/sealed/mecha/mech_view_stats/Trigger() +/datum/action/vehicle/sealed/mecha/mech_view_stats/Trigger(trigger_flags) if(!owner || !chassis || !(owner in chassis.occupants)) return @@ -125,7 +125,7 @@ name = "Toggle Strafing. Disabled when Alt is held." button_icon_state = "strafe" -/datum/action/vehicle/sealed/mecha/strafe/Trigger() +/datum/action/vehicle/sealed/mecha/strafe/Trigger(trigger_flags) if(!owner || !chassis || !(owner in chassis.occupants)) return @@ -161,14 +161,14 @@ name = "Toggle an energy shield that blocks all attacks from the faced direction at a heavy power cost." button_icon_state = "mech_defense_mode_off" -/datum/action/vehicle/sealed/mecha/mech_defense_mode/Trigger(forced_state = FALSE) +/datum/action/vehicle/sealed/mecha/mech_defense_mode/Trigger(trigger_flags, forced_state = FALSE) SEND_SIGNAL(chassis, COMSIG_MECHA_ACTION_TRIGGER, owner, args) //Signal sent to the mech, to be handed to the shield. See durand.dm for more details /datum/action/vehicle/sealed/mecha/mech_overload_mode name = "Toggle leg actuators overload" button_icon_state = "mech_overload_off" -/datum/action/vehicle/sealed/mecha/mech_overload_mode/Trigger(forced_state = null) +/datum/action/vehicle/sealed/mecha/mech_overload_mode/Trigger(trigger_flags, forced_state = null) if(!owner || !chassis || !(owner in chassis.occupants)) return if(!isnull(forced_state)) @@ -191,7 +191,7 @@ name = "Smoke" button_icon_state = "mech_smoke" -/datum/action/vehicle/sealed/mecha/mech_smoke/Trigger() +/datum/action/vehicle/sealed/mecha/mech_smoke/Trigger(trigger_flags) if(!owner || !chassis || !(owner in chassis.occupants)) return if(!TIMER_COOLDOWN_CHECK(src, COOLDOWN_MECHA_SMOKE) && chassis.smoke_charges>0) @@ -204,7 +204,7 @@ name = "Zoom" button_icon_state = "mech_zoom_off" -/datum/action/vehicle/sealed/mecha/mech_zoom/Trigger() +/datum/action/vehicle/sealed/mecha/mech_zoom/Trigger(trigger_flags) if(!owner || !chassis || !(owner in chassis.occupants)) return if(owner.client) @@ -223,7 +223,7 @@ name = "Reconfigure arm microtool arrays" button_icon_state = "mech_damtype_brute" -/datum/action/vehicle/sealed/mecha/mech_switch_damtype/Trigger() +/datum/action/vehicle/sealed/mecha/mech_switch_damtype/Trigger(trigger_flags) if(!owner || !chassis || !(owner in chassis.occupants)) return var/new_damtype @@ -246,7 +246,7 @@ name = "Toggle Phasing" button_icon_state = "mech_phasing_off" -/datum/action/vehicle/sealed/mecha/mech_toggle_phasing/Trigger() +/datum/action/vehicle/sealed/mecha/mech_toggle_phasing/Trigger(trigger_flags) if(!owner || !chassis || !(owner in chassis.occupants)) return chassis.phasing = chassis.phasing ? "" : "phasing" @@ -259,7 +259,7 @@ name = "Switch Seats" button_icon_state = "mech_seat_swap" -/datum/action/vehicle/sealed/mecha/swap_seat/Trigger() +/datum/action/vehicle/sealed/mecha/swap_seat/Trigger(trigger_flags) if(!owner || !chassis || !(owner in chassis.occupants)) return @@ -291,7 +291,7 @@ button_icon_state = "mech_search_ruins" COOLDOWN_DECLARE(search_cooldown) -/datum/action/vehicle/sealed/mecha/mech_search_ruins/Trigger() +/datum/action/vehicle/sealed/mecha/mech_search_ruins/Trigger(trigger_flags) if(!owner || !chassis || !(owner in chassis.occupants)) return if(!COOLDOWN_FINISHED(src, search_cooldown)) diff --git a/code/modules/vehicles/vehicle_actions.dm b/code/modules/vehicles/vehicle_actions.dm index 055d81afc19..aab97e75025 100644 --- a/code/modules/vehicles/vehicle_actions.dm +++ b/code/modules/vehicles/vehicle_actions.dm @@ -184,7 +184,7 @@ desc = "Climb out of your vehicle!" button_icon_state = "car_eject" -/datum/action/vehicle/sealed/climb_out/Trigger() +/datum/action/vehicle/sealed/climb_out/Trigger(trigger_flags) if(..() && istype(vehicle_entered_target)) vehicle_entered_target.mob_try_exit(owner, owner) @@ -196,7 +196,7 @@ desc = "Take your key out of the vehicle's ignition." button_icon_state = "car_removekey" -/datum/action/vehicle/sealed/remove_key/Trigger() +/datum/action/vehicle/sealed/remove_key/Trigger(trigger_flags) vehicle_entered_target.remove_key(owner) //CLOWN CAR ACTION DATUMS @@ -206,7 +206,7 @@ button_icon_state = "car_horn" var/hornsound = 'sound/items/carhorn.ogg' -/datum/action/vehicle/sealed/horn/Trigger() +/datum/action/vehicle/sealed/horn/Trigger(trigger_flags) if(TIMER_COOLDOWN_CHECK(src, COOLDOWN_CAR_HONK)) return TIMER_COOLDOWN_START(src, COOLDOWN_CAR_HONK, 2 SECONDS) @@ -222,7 +222,7 @@ desc = "Turn on your brights!" button_icon_state = "car_headlights" -/datum/action/vehicle/sealed/headlights/Trigger() +/datum/action/vehicle/sealed/headlights/Trigger(trigger_flags) to_chat(owner, span_notice("You flip the switch for the vehicle's headlights.")) vehicle_entered_target.headlights_toggle = !vehicle_entered_target.headlights_toggle vehicle_entered_target.set_light_on(vehicle_entered_target.headlights_toggle) @@ -234,7 +234,7 @@ desc = "Dump all objects and people in your car on the floor." button_icon_state = "car_dump" -/datum/action/vehicle/sealed/dump_kidnapped_mobs/Trigger() +/datum/action/vehicle/sealed/dump_kidnapped_mobs/Trigger(trigger_flags) vehicle_entered_target.visible_message(span_danger("[vehicle_entered_target] starts dumping the people inside of it.")) vehicle_entered_target.dump_specific_mobs(VEHICLE_CONTROL_KIDNAPPED) @@ -244,7 +244,7 @@ desc = "Press one of those colorful buttons on your display panel!" button_icon_state = "car_rtd" -/datum/action/vehicle/sealed/roll_the_dice/Trigger() +/datum/action/vehicle/sealed/roll_the_dice/Trigger(trigger_flags) if(!istype(vehicle_entered_target, /obj/vehicle/sealed/car/clowncar)) return var/obj/vehicle/sealed/car/clowncar/C = vehicle_entered_target @@ -255,7 +255,7 @@ desc = "Destroy them with their own fodder!" button_icon_state = "car_cannon" -/datum/action/vehicle/sealed/cannon/Trigger() +/datum/action/vehicle/sealed/cannon/Trigger(trigger_flags) if(!istype(vehicle_entered_target, /obj/vehicle/sealed/car/clowncar)) return var/obj/vehicle/sealed/car/clowncar/C = vehicle_entered_target @@ -269,7 +269,7 @@ COOLDOWN_DECLARE(thank_time_cooldown) -/datum/action/vehicle/sealed/thank/Trigger() +/datum/action/vehicle/sealed/thank/Trigger(trigger_flags) if(!istype(vehicle_entered_target, /obj/vehicle/sealed/car/clowncar)) return if(!COOLDOWN_FINISHED(src, thank_time_cooldown)) @@ -290,7 +290,7 @@ ///Cooldown to next jump var/next_ollie -/datum/action/vehicle/ridden/scooter/skateboard/ollie/Trigger() +/datum/action/vehicle/ridden/scooter/skateboard/ollie/Trigger(trigger_flags) if(world.time > next_ollie) var/obj/vehicle/ridden/scooter/skateboard/vehicle = vehicle_target vehicle.obj_flags |= BLOCK_Z_OUT_DOWN @@ -334,7 +334,7 @@ var/sound_path = 'sound/items/carhorn.ogg' var/sound_message = "makes a sound." -/datum/action/vehicle/sealed/noise/Trigger() +/datum/action/vehicle/sealed/noise/Trigger(trigger_flags) var/obj/vehicle/sealed/car/vim/vim_mecha = vehicle_entered_target if(!COOLDOWN_FINISHED(vim_mecha, sound_cooldown)) vim_mecha.balloon_alert(owner, "on cooldown!") diff --git a/code/modules/wiremod/shell/brain_computer_interface.dm b/code/modules/wiremod/shell/brain_computer_interface.dm index 853c9ba9857..91c745db74f 100644 --- a/code/modules/wiremod/shell/brain_computer_interface.dm +++ b/code/modules/wiremod/shell/brain_computer_interface.dm @@ -297,7 +297,7 @@ return ..() -/datum/action/innate/bci_charge_action/Trigger() +/datum/action/innate/bci_charge_action/Trigger(trigger_flags) var/obj/item/stock_parts/cell/cell = circuit_component.parent.cell if (isnull(cell)) diff --git a/icons/hud/radial.dmi b/icons/hud/radial.dmi index 35311aa29e6..2fe8d9c66e2 100644 Binary files a/icons/hud/radial.dmi and b/icons/hud/radial.dmi differ diff --git a/icons/mob/clothing/mod.dmi b/icons/mob/clothing/mod.dmi index d2a95e2366a..e5bf9111f72 100644 Binary files a/icons/mob/clothing/mod.dmi and b/icons/mob/clothing/mod.dmi differ diff --git a/icons/obj/clothing/modsuit/mod_clothing.dmi b/icons/obj/clothing/modsuit/mod_clothing.dmi index aff5fa6fb0e..6945f481349 100644 Binary files a/icons/obj/clothing/modsuit/mod_clothing.dmi and b/icons/obj/clothing/modsuit/mod_clothing.dmi differ diff --git a/icons/obj/clothing/modsuit/mod_construction.dmi b/icons/obj/clothing/modsuit/mod_construction.dmi index 7642a6f2298..4bd8de5ad3b 100644 Binary files a/icons/obj/clothing/modsuit/mod_construction.dmi and b/icons/obj/clothing/modsuit/mod_construction.dmi differ diff --git a/icons/obj/clothing/modsuit/mod_modules.dmi b/icons/obj/clothing/modsuit/mod_modules.dmi index 50798f4845d..f95d869bff1 100644 Binary files a/icons/obj/clothing/modsuit/mod_modules.dmi and b/icons/obj/clothing/modsuit/mod_modules.dmi differ diff --git a/tgstation.dme b/tgstation.dme index e0a777f2ea4..b77b8393cfb 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -26,6 +26,7 @@ #include "code\__DEFINES\access.dm" #include "code\__DEFINES\achievements.dm" #include "code\__DEFINES\acid.dm" +#include "code\__DEFINES\actions.dm" #include "code\__DEFINES\actionspeed_modification.dm" #include "code\__DEFINES\admin.dm" #include "code\__DEFINES\adventure.dm" @@ -3283,6 +3284,7 @@ #include "code\modules\mod\mod_clothes.dm" #include "code\modules\mod\mod_construction.dm" #include "code\modules\mod\mod_control.dm" +#include "code\modules\mod\mod_core.dm" #include "code\modules\mod\mod_theme.dm" #include "code\modules\mod\mod_types.dm" #include "code\modules\mod\mod_ui.dm" diff --git a/tgui/packages/tgui/interfaces/MODsuit.js b/tgui/packages/tgui/interfaces/MODsuit.js index 6224b0e7aa3..4275d052bcd 100644 --- a/tgui/packages/tgui/interfaces/MODsuit.js +++ b/tgui/packages/tgui/interfaces/MODsuit.js @@ -349,7 +349,7 @@ const HardwareSection = (props, context) => { chestplate, gauntlets, boots, - cell, + core, charge, } = data; return ( @@ -373,13 +373,13 @@ const HardwareSection = (props, context) => { - - {cell && ( + + {core && ( - - {cell} + + {core} - + { ) || ( - No Cell Detected + No Core Detected )}