From 155f8df49bbfdd066ee872ef8f38c2a319e1cab5 Mon Sep 17 00:00:00 2001 From: Geeves Date: Sat, 20 Jan 2024 19:28:40 +0200 Subject: [PATCH 1/6] Exosuit Nuclear Power Cores --- aurorastation.dme | 1 + .../signals_atom/signals_power_cell.dm | 4 + .../objects/items/devices/suit_cooling.dm | 3 + .../game/objects/items/weapons/power_cells.dm | 60 ++++++++-- code/game/objects/items/weapons/stunbaton.dm | 3 + code/game/objects/random/tech.dm | 4 +- code/modules/heavy_vehicle/components/body.dm | 8 +- .../heavy_vehicle/interface/_interface.dm | 29 ++--- .../modules/heavy_vehicle/mech_interaction.dm | 86 ++++++++------ code/modules/heavy_vehicle/mecha.dm | 2 + .../modules/heavy_vehicle/premade/_premade.dm | 2 + code/modules/heavy_vehicle/premade/heavy.dm | 2 + code/modules/heavy_vehicle/premade/light.dm | 9 +- .../modules/heavy_vehicle/premade/military.dm | 4 +- code/modules/heavy_vehicle/premade/pra.dm | 2 + code/modules/power/cell.dm | 4 + .../designs/protolathe/power_designs.dm | 21 +++- html/changelogs/geeves-power_core_online.yml | 10 ++ icons/obj/machinery/cell_charger.dmi | Bin 2844 -> 3192 bytes maps/sccv_horizon/sccv_horizon-2_deck_2.dmm | 110 ++++++++++-------- maps/sccv_horizon/sccv_horizon-4_centcomm.dmm | 32 +++-- 21 files changed, 259 insertions(+), 137 deletions(-) create mode 100644 code/__DEFINES/dcs/signals/signals_atom/signals_power_cell.dm create mode 100644 html/changelogs/geeves-power_core_online.yml diff --git a/aurorastation.dme b/aurorastation.dme index e625857c634..61e2b687519 100644 --- a/aurorastation.dme +++ b/aurorastation.dme @@ -139,6 +139,7 @@ #include "code\__DEFINES\dcs\signals\signals_subsystem.dm" #include "code\__DEFINES\dcs\signals\signals_atom\signals_atom_main.dm" #include "code\__DEFINES\dcs\signals\signals_atom\signals_atom_x_act.dm" +#include "code\__DEFINES\dcs\signals\signals_atom\signals_power_cell.dm" #include "code\__HELPERS\_global_objects.dm" #include "code\__HELPERS\_lists.dm" #include "code\__HELPERS\_string_lists.dm" diff --git a/code/__DEFINES/dcs/signals/signals_atom/signals_power_cell.dm b/code/__DEFINES/dcs/signals/signals_atom/signals_power_cell.dm new file mode 100644 index 00000000000..1ccf7af7a3a --- /dev/null +++ b/code/__DEFINES/dcs/signals/signals_atom/signals_power_cell.dm @@ -0,0 +1,4 @@ +// Signals related to charge level of power cells +// Sent from cell.dm + +#define COMSIG_CELL_CHARGE "cell_charge" diff --git a/code/game/objects/items/devices/suit_cooling.dm b/code/game/objects/items/devices/suit_cooling.dm index f7809efd6a6..ff9d6b8e7c1 100644 --- a/code/game/objects/items/devices/suit_cooling.dm +++ b/code/game/objects/items/devices/suit_cooling.dm @@ -166,6 +166,9 @@ if(cell) to_chat(user, SPAN_WARNING("There is \a [cell] already installed here.")) else + if(W.w_class != ITEMSIZE_NORMAL) + to_chat(user, "\The [W] is too [W.w_class < ITEMSIZE_NORMAL ? "small" : "large"] to fit here.") + return user.drop_from_inventory(W,src) cell = W to_chat(user, SPAN_NOTICE("You insert \the [cell].")) diff --git a/code/game/objects/items/weapons/power_cells.dm b/code/game/objects/items/weapons/power_cells.dm index 5b721d6e8cb..8c8c5491cb2 100644 --- a/code/game/objects/items/weapons/power_cells.dm +++ b/code/game/objects/items/weapons/power_cells.dm @@ -82,13 +82,6 @@ maxcharge = 10000 matter = list(DEFAULT_WALL_MATERIAL = 700, MATERIAL_GLASS = 60) -/obj/item/cell/mecha - name = "exosuit-grade power cell" - origin_tech = list(TECH_POWER = 3) - icon_state = "hcell" - maxcharge = 15000 - matter = list(DEFAULT_WALL_MATERIAL = 700, MATERIAL_GLASS = 70) - /obj/item/cell/high/empty/Initialize() . = ..() charge = 0 @@ -163,12 +156,12 @@ /obj/item/cell/slime/process() if(next_recharge < world.time) - charge = min(charge + (maxcharge / 10), maxcharge) + give(charge + (maxcharge / 10)) next_recharge = world.time + 1 MINUTE /obj/item/cell/nuclear - name = "miniaturized nuclear power core" - desc = "A small self-charging thorium core that can store an immense amount of charge." + name = "miniaturized nuclear power cell" + desc = "A small self-charging cell with a thorium core that can store an immense amount of charge." origin_tech = list(TECH_POWER = 8, TECH_ILLEGAL = 4) icon_state = "icell" maxcharge = 50000 @@ -185,7 +178,7 @@ /obj/item/cell/nuclear/process() if(next_recharge < world.time) - charge = min(charge + (maxcharge / 10), maxcharge) + give(charge + (maxcharge / 10)) next_recharge = world.time + 30 SECONDS /obj/item/cell/device/emergency_light @@ -211,3 +204,48 @@ . = ..() charge = 0 update_icon() + +/obj/item/cell/mecha + name = "power core" + origin_tech = list(TECH_POWER = 2) + icon_state = "core" + w_class = ITEMSIZE_LARGE + maxcharge = 20000 + matter = list(DEFAULT_WALL_MATERIAL = 20000, MATERIAL_GLASS = 10000) + + /// When the cell will next recharge (once every minute) + var/next_recharge + + /// Percentage of maxcharge to recharge every minute, leave null for no self-recharge + var/self_charge_percentage + +/obj/item/cell/mecha/Initialize() + . = ..() + if(self_charge_percentage) + START_PROCESSING(SSprocessing, src) + +/obj/item/cell/mecha/Destroy() + if(self_charge_percentage) + STOP_PROCESSING(SSprocessing, src) + return ..() + +/obj/item/cell/mecha/process() + if(self_charge_percentage && next_recharge < world.time) + give((maxcharge / 100) *self_charge_percentage) + next_recharge = world.time + 1 MINUTE + +/obj/item/cell/mecha/nuclear + name = "nuclear power core" + origin_tech = list(TECH_POWER = 3, TECH_MATERIAL = 3) + icon_state = "nuclear_core" + maxcharge = 30000 + matter = list(DEFAULT_WALL_MATERIAL = 20000, MATERIAL_GLASS = 10000, MATERIAL_URANIUM = 10000) + self_charge_percentage = 5 + +/obj/item/cell/mecha/phoron + name = "phoron power core" + origin_tech = list(TECH_POWER = 5, TECH_MATERIAL = 5) + icon_state = "phoron_core" + maxcharge = 50000 + matter = list(DEFAULT_WALL_MATERIAL = 20000, MATERIAL_GLASS = 10000, MATERIAL_PHORON = 5000) + self_charge_percentage = 10 diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm index b38d2188077..e00607630d0 100644 --- a/code/game/objects/items/weapons/stunbaton.dm +++ b/code/game/objects/items/weapons/stunbaton.dm @@ -70,6 +70,9 @@ /obj/item/melee/baton/attackby(obj/item/W, mob/user) if(istype(W, /obj/item/cell)) + if(W.w_class != ITEMSIZE_NORMAL) + to_chat(user, "\The [W] is too [W.w_class < ITEMSIZE_NORMAL ? "small" : "large"] to fit here.") + return if(!bcell) user.drop_from_inventory(W,src) bcell = W diff --git a/code/game/objects/random/tech.dm b/code/game/objects/random/tech.dm index 2aa370bddf4..6db7875c047 100644 --- a/code/game/objects/random/tech.dm +++ b/code/game/objects/random/tech.dm @@ -30,10 +30,12 @@ icon = 'icons/obj/random.dmi' icon_state = "cell" problist = list( - /obj/item/cell/crap = 10, /obj/item/cell = 40, /obj/item/cell/high = 40, + /obj/item/cell/crap = 10, + /obj/item/cell/mecha = 10, /obj/item/cell/super = 9, + /obj/item/cell/mecha/nuclear = 5, /obj/item/cell/hyper = 1 ) diff --git a/code/modules/heavy_vehicle/components/body.dm b/code/modules/heavy_vehicle/components/body.dm index 7f4d52372c9..941bea975db 100644 --- a/code/modules/heavy_vehicle/components/body.dm +++ b/code/modules/heavy_vehicle/components/body.dm @@ -17,7 +17,8 @@ var/mech_health = 600 var/obj/item/robot_parts/robot_component/diagnosis_unit/diagnostics - var/obj/item/cell/cell + var/obj/item/cell/mecha/cell + var/cell_type = /obj/item/cell/mecha var/obj/item/robot_parts/robot_component/armor/mech_armor var/obj/machinery/portable_atmospherics/canister/air_supply var/datum/gas_mixture/cockpit @@ -120,8 +121,9 @@ /obj/item/mech_component/chassis/prebuild() diagnostics = new(src) - cell = new /obj/item/cell/mecha(src) - cell.charge = cell.maxcharge + if(cell_type) + cell = new cell_type(src) + cell.charge = cell.maxcharge /obj/item/mech_component/chassis/attackby(var/obj/item/thing, var/mob/user) if(istype(thing,/obj/item/robot_parts/robot_component/diagnosis_unit)) diff --git a/code/modules/heavy_vehicle/interface/_interface.dm b/code/modules/heavy_vehicle/interface/_interface.dm index ee79b9b87c6..1c0f7ab93a6 100644 --- a/code/modules/heavy_vehicle/interface/_interface.dm +++ b/code/modules/heavy_vehicle/interface/_interface.dm @@ -65,19 +65,7 @@ var/obj/screen/mecha/hardpoint/H = hardpoint_hud_elements[hardpoint] if(H) H.update_system_info() handle_hud_icons_health() - var/obj/item/cell/C = get_cell() - if(istype(C)) - var/power_percentage = round((get_cell()?.charge / get_cell()?.maxcharge) * 100) - if(power_percentage >= 100) - hud_power?.maptext_x = 21 - else if(power_percentage < 10) - hud_power?.maptext_x = 25 - else if(power_percentage < 100) - hud_power?.maptext_x = 22 - hud_power.maptext = "[power_percentage]%" - else - hud_power?.maptext_x = 13 - hud_power?.maptext = "NO CELL" + handle_power_hud() refresh_hud() @@ -120,3 +108,18 @@ GLOB.mecha_damage_overlay_cache["[part]-[state]"] = I hud_health?.overlays |= GLOB.mecha_damage_overlay_cache["[part]-[state]"] + +/mob/living/heavy_vehicle/proc/handle_power_hud() + var/obj/item/cell/C = get_cell() + if(istype(C)) + var/power_percentage = round((get_cell()?.charge / get_cell()?.maxcharge) * 100) + if(power_percentage >= 100) + hud_power?.maptext_x = 21 + else if(power_percentage < 10) + hud_power?.maptext_x = 25 + else if(power_percentage < 100) + hud_power?.maptext_x = 22 + hud_power.maptext = "[power_percentage]%" + else + hud_power?.maptext_x = 13 + hud_power?.maptext = "NO CELL" diff --git a/code/modules/heavy_vehicle/mech_interaction.dm b/code/modules/heavy_vehicle/mech_interaction.dm index 0d3074b9502..86116c1e809 100644 --- a/code/modules/heavy_vehicle/mech_interaction.dm +++ b/code/modules/heavy_vehicle/mech_interaction.dm @@ -6,7 +6,7 @@ if(M.enter(src)) return else - to_chat(usr, "You cannot pilot a mech of this size.") + to_chat(usr, SPAN_WARNING("You cannot pilot a mech of this size.")) return return ..() @@ -66,12 +66,12 @@ return if(!arms) - to_chat(user, "\The [src] has no manipulators!") + to_chat(user, SPAN_WARNING("\The [src] has no manipulators!")) setClickCooldown(3) return if(!arms.motivator || !arms.motivator.is_functional()) - to_chat(user, "Your motivators are damaged! You can't use your manipulators!") + to_chat(user, SPAN_WARNING("Your motivators are damaged! You can't use your manipulators!")) setClickCooldown(15) return @@ -89,7 +89,7 @@ // You may attack the target with your exosuit FIST if you're malfunctioning. var/failed = FALSE if(emp_damage > EMP_ATTACK_DISRUPT && prob(emp_damage*2)) - to_chat(user, "The wiring sparks as you attempt to control the exosuit!") + to_chat(user, SPAN_WARNING("The wiring sparks as you attempt to control the exosuit!")) failed = TRUE if(!failed) @@ -213,30 +213,30 @@ if(!user.Adjacent(src)) return if(hatch_locked) - to_chat(user, "The [body.hatch_descriptor] is locked.") + to_chat(user, SPAN_WARNING("The [body.hatch_descriptor] is locked.")) return if(hatch_closed) - to_chat(user, "The [body.hatch_descriptor] is closed.") + to_chat(user, SPAN_WARNING("The [body.hatch_descriptor] is closed.")) return if(LAZYLEN(pilots) >= LAZYLEN(body.pilot_positions)) - to_chat(user, "\The [src] is occupied.") + to_chat(user, SPAN_WARNING("\The [src] is occupied.")) return if(!instant) - to_chat(user, "You start climbing into \the [src]...") + to_chat(user, SPAN_NOTICE("You start climbing into \the [src]...")) if(!do_after(user, entry_speed)) return if(!user || user.incapacitated()) return if(hatch_locked) - to_chat(user, "The [body.hatch_descriptor] is locked.") + to_chat(user, SPAN_WARNING("The [body.hatch_descriptor] is locked.")) return if(hatch_closed) - to_chat(user, "The [body.hatch_descriptor] is closed.") + to_chat(user, SPAN_WARNING("The [body.hatch_descriptor] is closed.")) return if(LAZYLEN(pilots) >= LAZYLEN(body.pilot_positions)) - to_chat(user, "\The [src] is occupied.") + to_chat(user, SPAN_WARNING("\The [src] is occupied.")) return - to_chat(user, "You climb into \the [src].") + to_chat(user, SPAN_NOTICE("You climb into \the [src].")) user.forceMove(src) LAZYDISTINCTADD(pilots, user) RegisterSignal(user, COMSIG_MOB_FACEDIR, PROC_REF(handle_user_turn)) @@ -252,14 +252,14 @@ return if(hatch_closed) if(hatch_locked) - if(!silent) to_chat(user, "The [body.hatch_descriptor] is locked.") + if(!silent) to_chat(user, SPAN_WARNING("The [body.hatch_descriptor] is locked.")) return hud_open.toggled(FALSE) if(!silent) - to_chat(user, "You open the hatch and climb out of \the [src].") + to_chat(user, SPAN_NOTICE("You open the hatch and climb out of \the [src].")) else if(!silent) - to_chat(user, "You climb out of \the [src].") + to_chat(user, SPAN_NOTICE("You climb out of \the [src].")) user.forceMove(get_turf(src)) LAZYREMOVE(user.additional_vision_handlers, src) @@ -332,7 +332,7 @@ /mob/living/heavy_vehicle/attackby(var/obj/item/thing, var/mob/user) if(user.a_intent != I_HURT && istype(thing, /obj/item/mecha_equipment)) if(hardpoints_locked) - to_chat(user, "Hardpoint system access is disabled.") + to_chat(user, SPAN_WARNING("Hardpoint system access is disabled.")) return var/obj/item/mecha_equipment/realThing = thing @@ -346,7 +346,7 @@ var/to_place = tgui_input_list(user, "Where would you like to install it?", "Install Hardpoint", (realThing.restricted_hardpoints & free_hardpoints)) if(install_system(thing, to_place, user)) return - to_chat(user, "\The [thing] could not be installed in that hardpoint.") + to_chat(user, SPAN_WARNING("\The [thing] could not be installed in that hardpoint.")) return else @@ -376,7 +376,7 @@ qdel(thing) else if(thing.ismultitool()) if(hardpoints_locked) - to_chat(user, "Hardpoint system access is disabled.") + to_chat(user, SPAN_WARNING("Hardpoint system access is disabled.")) return var/list/parts = list() @@ -388,7 +388,7 @@ if(remove_system_interact(to_remove, user)) return - to_chat(user, "\The [src] has no hardpoint systems to remove.") + to_chat(user, SPAN_WARNING("\The [src] has no hardpoint systems to remove.")) return else if(thing.iswrench()) @@ -441,37 +441,42 @@ return else if(thing.iscrowbar()) if(!maintenance_protocols) - to_chat(user, "The cell compartment remains locked while maintenance protocols are disabled.") + to_chat(user, SPAN_WARNING("The cell compartment remains locked while maintenance protocols are disabled.")) return if(!body || !body.cell) - to_chat(user, "There is no cell here for you to remove!") + to_chat(user, SPAN_WARNING("There is no cell here for you to remove!")) return var/delay = 10 if(!do_after(user, delay) || !maintenance_protocols || !body || !body.cell) return user.put_in_hands(body.cell) - to_chat(user, "You remove \the [body.cell] from \the [src].") + to_chat(user, SPAN_NOTICE("You remove \the [body.cell] from \the [src].")) playsound(user.loc, thing.usesound, 50, 1) - visible_message("\The [user] pries out \the [body.cell] using the \the [thing].") + visible_message(SPAN_NOTICE("\The [user] pries out \the [body.cell] using the \the [thing].")) power = MECH_POWER_OFF hud_power_control.update_icon() + UnregisterSignal(body.cell, COMSIG_CELL_CHARGE) body.cell = null return else if(istype(thing, /obj/item/cell)) + if(!istype(thing, /obj/item/cell/mecha)) + to_chat(user, SPAN_WARNING("You can only use power cores in \the [src]!")) + return if(!maintenance_protocols) - to_chat(user, "The cell compartment remains locked while maintenance protocols are disabled.") + to_chat(user, SPAN_WARNING("The cell compartment remains locked while maintenance protocols are disabled.")) return if(!body || body.cell) - to_chat(user, "There is already a cell in there!") + to_chat(user, SPAN_WARNING("There is already a cell in there!")) return if(user.unEquip(thing)) thing.forceMove(body) body.cell = thing - to_chat(user, "You install \the [body.cell] into \the [src].") - playsound(user.loc, 'sound/items/Screwdriver.ogg', 50, 1) - visible_message("\The [user] installs \the [body.cell] into \the [src].") + RegisterSignal(body.cell, COMSIG_CELL_CHARGE, PROC_REF(handle_cell_charge)) + to_chat(user, SPAN_NOTICE("You install \the [body.cell] into \the [src].")) + playsound(user.loc, 'sound/weapons/reloads/hmg_reload1.ogg', 50, 1) + visible_message(SPAN_NOTICE("\The [user] installs \the [body.cell] into \the [src].")) return else if(istype(thing, /obj/item/device/robotanalyzer)) to_chat(user, SPAN_NOTICE("Diagnostic Report for \the [src]:")) @@ -486,12 +491,12 @@ // Drag the pilot out if possible. if(user.a_intent == I_GRAB) if(!LAZYLEN(pilots)) - to_chat(user, "There is nobody inside \the [src].") + to_chat(user, SPAN_WARNING("There is nobody inside \the [src].")) else if(!hatch_closed) var/mob/pilot = pick(pilots) - user.visible_message("\The [user] is trying to pull \the [pilot] out of \the [src]!") + user.visible_message(SPAN_DANGER("\The [user] is trying to pull \the [pilot] out of \the [src]!")) if(do_after(user, 30) && user.Adjacent(src) && (pilot in pilots) && !hatch_closed) - user.visible_message("\The [user] drags \the [pilot] out of \the [src]!") + user.visible_message(SPAN_DANGER("\The [user] drags \the [pilot] out of \the [src]!")) eject(pilot, silent=1) return @@ -502,10 +507,10 @@ // Otherwise toggle the hatch. if(hatch_locked) - to_chat(user, "The [body.hatch_descriptor] is locked.") + to_chat(user, SPAN_WARNING("The [body.hatch_descriptor] is locked.")) return hatch_closed = !hatch_closed - to_chat(user, "You [hatch_closed ? "close" : "open"] the [body.hatch_descriptor].") + to_chat(user, SPAN_NOTICE("You [hatch_closed ? "close" : "open"] the [body.hatch_descriptor].")) hud_open.update_icon() update_icon() return @@ -556,7 +561,7 @@ if(!new_name || new_name == name || (user != src && !(user in pilots))) return name = new_name - to_chat(user, "You have redesignated this exosuit as \the [name].") + to_chat(user, SPAN_NOTICE("You have redesignated this exosuit as \the [name].")) /mob/living/heavy_vehicle/proc/trample(var/mob/living/H) if(!LAZYLEN(pilots)) @@ -571,13 +576,13 @@ D.attack_log += "\[[time_stamp()]\] Was trampled by [src]" attack_log += text("\[[time_stamp()]\] trampled [D.name] ([D.ckey]) with \the [src].") msg_admin_attack("[src] trampled [key_name(D)] at (JMP)" ) - src.visible_message("\The [src] runs over \the [D]!") + src.visible_message(SPAN_DANGER("\The [src] runs over \the [D]!")) D.apply_damage(legs.trample_damage, DAMAGE_BRUTE) return TRUE else var/mob/living/L = H - src.visible_message("\The [src] runs over \the [L]!") + src.visible_message(SPAN_DANGER("\The [src] runs over \the [L]!")) if(isanimal(L)) if(issmall(L) && (L.stat == DEAD)) L.gib() @@ -588,9 +593,9 @@ /mob/living/heavy_vehicle/proc/ToggleLockdown() lockdown = !lockdown if(lockdown) - src.visible_message("\The [src] beeps loudly as its servos sieze up, and it enters lockdown mode!") + src.visible_message(SPAN_WARNING("\The [src] beeps loudly as its servos sieze up, and it enters lockdown mode!")) else - src.visible_message("\The [src] hums with life as it is released from its lockdown mode!") + src.visible_message(SPAN_WARNING("\The [src] hums with life as it is released from its lockdown mode!")) /mob/living/heavy_vehicle/get_floating_chat_x_offset() return -offset_x // reverse the offset @@ -747,3 +752,8 @@ say("Following [ID.registered_name].") break return + +/mob/living/heavy_vehicle/proc/handle_cell_charge(var/obj/item/cell/cell, var/new_charge) + SIGNAL_HANDLER + + handle_power_hud() diff --git a/code/modules/heavy_vehicle/mecha.dm b/code/modules/heavy_vehicle/mecha.dm index 055afc12f63..208422e9b2c 100644 --- a/code/modules/heavy_vehicle/mecha.dm +++ b/code/modules/heavy_vehicle/mecha.dm @@ -206,6 +206,8 @@ if(source_frame.body) source_frame.body.forceMove(src) body = source_frame.body + if(body.cell) + RegisterSignal(body.cell, COMSIG_CELL_CHARGE, PROC_REF(handle_cell_charge)) updatehealth() diff --git a/code/modules/heavy_vehicle/premade/_premade.dm b/code/modules/heavy_vehicle/premade/_premade.dm index 73078e35946..8e9e5991b4f 100644 --- a/code/modules/heavy_vehicle/premade/_premade.dm +++ b/code/modules/heavy_vehicle/premade/_premade.dm @@ -41,6 +41,8 @@ head.color = e_color if(!body && e_body) body = new e_body(src) + if(body.cell) + RegisterSignal(body.cell, COMSIG_CELL_CHARGE, PROC_REF(handle_cell_charge)) if(e_color) body.color = e_color if(!arms && e_arms) diff --git a/code/modules/heavy_vehicle/premade/heavy.dm b/code/modules/heavy_vehicle/premade/heavy.dm index 991c5313b50..85f92f5d8c1 100644 --- a/code/modules/heavy_vehicle/premade/heavy.dm +++ b/code/modules/heavy_vehicle/premade/heavy.dm @@ -59,6 +59,8 @@ has_hardpoints = list(HARDPOINT_BACK) power_use = 500 + cell_type = /obj/item/cell/mecha/nuclear + /obj/item/mech_component/chassis/heavy/prebuild() . = ..() mech_armor = new /obj/item/robot_parts/robot_component/armor/mech/combat(src) diff --git a/code/modules/heavy_vehicle/premade/light.dm b/code/modules/heavy_vehicle/premade/light.dm index c46431b9c91..bdb05ea436a 100644 --- a/code/modules/heavy_vehicle/premade/light.dm +++ b/code/modules/heavy_vehicle/premade/light.dm @@ -76,12 +76,16 @@ ) . = ..() +/obj/item/mech_component/chassis/light/nuclear + cell_type = /obj/item/cell/mecha/nuclear + /mob/living/heavy_vehicle/premade/light/legion name = "legion support exosuit" desc = "A light and agile exosuit painted in the colours of the Tau Ceti Foreign Legion." icon_state = "odysseus" e_color = COLOR_TCFL + e_body = /obj/item/mech_component/chassis/light/nuclear h_head = /obj/item/mecha_equipment/light h_back = /obj/item/mecha_equipment/sleeper @@ -96,6 +100,7 @@ icon_state = "odysseus" e_color = COLOR_IAC + e_body = /obj/item/mech_component/chassis/light/nuclear h_head = /obj/item/mecha_equipment/light h_back = /obj/item/mecha_equipment/sleeper @@ -109,6 +114,7 @@ desc = "A light and nimble exosuit, bearing the colour scheme of the Unathi Kataphracts." e_color = COLOR_CHESTNUT + e_body = /obj/item/mech_component/chassis/light/nuclear h_back = /obj/item/mecha_equipment/quick_enter h_l_hand = /obj/item/mecha_equipment/clamp @@ -120,8 +126,9 @@ desc = "A light and nimble recon exosuit, bearing the colour scheme of the Solarian Armed Forces." e_color = COLOR_DARK_GREEN_GRAY - e_arms = /obj/item/mech_component/manipulators/combat e_head = /obj/item/mech_component/sensors/combat + e_body = /obj/item/mech_component/chassis/light/nuclear + e_arms = /obj/item/mech_component/manipulators/combat e_legs = /obj/item/mech_component/propulsion/hover/light h_back = /obj/item/mecha_equipment/quick_enter diff --git a/code/modules/heavy_vehicle/premade/military.dm b/code/modules/heavy_vehicle/premade/military.dm index 81daf24db2c..4964d6f16c3 100644 --- a/code/modules/heavy_vehicle/premade/military.dm +++ b/code/modules/heavy_vehicle/premade/military.dm @@ -44,10 +44,10 @@ mech_health = 3500 power_use = 1500 + cell_type = /obj/item/cell/mecha/nuclear + /obj/item/mech_component/chassis/superheavy/prebuild() . = ..() - QDEL_NULL(cell) - cell = new /obj/item/cell/super(src) mech_armor = new /obj/item/robot_parts/robot_component/armor/mech/combat(src) /mob/living/heavy_vehicle/premade/superheavy diff --git a/code/modules/heavy_vehicle/premade/pra.dm b/code/modules/heavy_vehicle/premade/pra.dm index 95667d15ff5..ce004453762 100644 --- a/code/modules/heavy_vehicle/premade/pra.dm +++ b/code/modules/heavy_vehicle/premade/pra.dm @@ -94,6 +94,8 @@ max_damage = 150 power_use = 250 + cell_type = /obj/item/cell/mecha/nuclear + /obj/item/mech_component/chassis/pra_egg/armored/prebuild() . = ..() mech_armor = new /obj/item/robot_parts/robot_component/armor/mech/combat(src) diff --git a/code/modules/power/cell.dm b/code/modules/power/cell.dm index a15af386222..e9153f0ba45 100644 --- a/code/modules/power/cell.dm +++ b/code/modules/power/cell.dm @@ -59,6 +59,7 @@ return 0 var/used = min(charge, amount) charge -= used + SEND_SIGNAL(src, COMSIG_CELL_CHARGE, charge) return used // Checks if the specified amount can be provided. If it can, it removes the amount @@ -78,6 +79,7 @@ var/amount_used = min(maxcharge-charge,amount) charge += amount_used + SEND_SIGNAL(src, COMSIG_CELL_CHARGE, charge) return amount_used @@ -178,6 +180,7 @@ charge -= maxcharge / severity if (charge < 0) charge = 0 + SEND_SIGNAL(src, COMSIG_CELL_CHARGE, charge) /** * Drains a percentage of the power from the battery @@ -194,6 +197,7 @@ charge -= maxcharge / divisor if (charge < 0) charge = 0 + SEND_SIGNAL(src, COMSIG_CELL_CHARGE, charge) /obj/item/cell/ex_act(severity) diff --git a/code/modules/research/designs/protolathe/power_designs.dm b/code/modules/research/designs/protolathe/power_designs.dm index 15e579f74e8..1c15e966bc2 100644 --- a/code/modules/research/designs/protolathe/power_designs.dm +++ b/code/modules/research/designs/protolathe/power_designs.dm @@ -1,5 +1,5 @@ /datum/design/item/powercell - build_type = PROTOLATHE | MECHFAB + build_type = PROTOLATHE category = "Misc" // For the mechfab p_category = "Power Cell Designs" @@ -48,3 +48,22 @@ req_tech = list(TECH_POWER = 2) materials = list(DEFAULT_WALL_MATERIAL = 150, MATERIAL_GLASS = 10) build_path = /obj/item/cell/device/high + +/datum/design/item/powercell/mecha + name = "Power Core" + build_type = MECHFAB + req_tech = list(TECH_POWER = 2) + materials = list(DEFAULT_WALL_MATERIAL = 20000, MATERIAL_GLASS = 10000) + build_path = /obj/item/cell/mecha + +/datum/design/item/powercell/mecha/nuclear + name = "Nuclear Power Core" + req_tech = list(TECH_POWER = 3, TECH_MATERIAL = 3) + materials = list(DEFAULT_WALL_MATERIAL = 20000, MATERIAL_GLASS = 10000, MATERIAL_URANIUM = 10000) + build_path = /obj/item/cell/mecha/nuclear + +/datum/design/item/powercell/mecha/phoron + name = "Phoron Power Core" + req_tech = list(TECH_POWER = 5, TECH_MATERIAL = 5) + materials = list(DEFAULT_WALL_MATERIAL = 20000, MATERIAL_GLASS = 10000, MATERIAL_PHORON = 5000) + build_path = /obj/item/cell/mecha/phoron diff --git a/html/changelogs/geeves-power_core_online.yml b/html/changelogs/geeves-power_core_online.yml new file mode 100644 index 00000000000..bb72c2e4d71 --- /dev/null +++ b/html/changelogs/geeves-power_core_online.yml @@ -0,0 +1,10 @@ +author: Geeves + +delete-after: True + +changes: + - rscadd: "Added power cores, a type of large battery cell that get used by exosuits. The nuclear and phoron variants are self-charging." + - tweak: "Combat mechs now start with nuclear power cores, allowing them to sustain themselves indefinitely, so long as they stay out of the action for a bit." + - rscdel: "Removed basic power cells from the mechfab, replaced with the mech powercores." + - rscadd: "Mech cell statuses now instantly update as soon as the cell charges or discharges." + - rscadd: "Added a stack of 10 uranium to the machinist's workshop, which can print two nuclear power cores." \ No newline at end of file diff --git a/icons/obj/machinery/cell_charger.dmi b/icons/obj/machinery/cell_charger.dmi index fdf0f20ba6ccbdab43ff8f323fd724ceb31fd3fd..3300080b2db1c33a5add76ee5bd5e688f40d32ff 100644 GIT binary patch literal 3192 zcmb`KXHXMd7KU#q0g<8<2|+0;DxwIYAT^*U3JTJO5UQ{c5R-t4fD(d4jZ{%V5UC;^ z35XIpR!~7gZxJK#Q3GOvF_4h3nVtQy^L_hcXLo1Lz0aNV&1m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ca<7Z_m4fL4Xo~CLJPG-C`8L%Rx|V0mVncm64$y`s zkl9^JZ0;GS^dL2ry4~J$xa+hbD|ccO!`4-b^iD*X!MEn7hc1Xb%|5B@iX^65egc?= z=(faU$X_Tuo#*07M99TB*)}IjdV&?w67%(>($M-#U)So3?-G3&t0AFWq+Hfk zRrPwBPq;qgSt-~n?xK5!nEK^?D~x6BBbzOFY+_c{Fu)Osesc>oUcS4@4|;-`$Rl8U zYcnm)l<|B+@fjh^wrV0UdM423r+TcheYXf{HE7C*7QD?oXwuzSf6|4I>rTHyCFQ16eX)Vp<(6q(Yb{5 z!+-?cjW|vxBFZ2}=6%ZX5+RrBFVD N>xO2qqRVa%{|#0$Rj2>} diff --git a/maps/sccv_horizon/sccv_horizon-2_deck_2.dmm b/maps/sccv_horizon/sccv_horizon-2_deck_2.dmm index d69f4a6f573..685b3657bd8 100644 --- a/maps/sccv_horizon/sccv_horizon-2_deck_2.dmm +++ b/maps/sccv_horizon/sccv_horizon-2_deck_2.dmm @@ -1213,9 +1213,9 @@ /obj/effect/floor_decal/industrial/hatch/yellow, /obj/machinery/door/airlock/glass_research{ dir = 1; + id_tag = "xeno_entrance_ext"; name = "Xenobiology"; - req_access = list(55); - id_tag = "xeno_entrance_ext" + req_access = list(55) }, /turf/simulated/floor/tiled/dark/full, /area/rnd/xenobiology) @@ -5208,12 +5208,12 @@ }, /obj/effect/floor_decal/industrial/outline/yellow, /obj/machinery/button/remote/airlock{ + dir = 4; id = "xeno_entrance_int"; name = "Xenobiology Internal Access Bolts"; + pixel_x = 21; req_access = list(55); - specialfunctions = 4; - dir = 4; - pixel_x = 21 + specialfunctions = 4 }, /turf/simulated/floor/tiled/white, /area/rnd/xenobiology) @@ -5774,15 +5774,15 @@ /obj/machinery/power/apc/low/north, /obj/structure/table/standard, /obj/item/device/flashlight/lamp{ - pixel_y = 12; - pixel_x = 6 + pixel_x = 6; + pixel_y = 12 }, /obj/effect/floor_decal/corner/mauve/full{ dir = 8 }, /obj/machinery/reagentgrinder{ - pixel_y = 7; - pixel_x = -6 + pixel_x = -6; + pixel_y = 7 }, /obj/item/stack/material/phoron{ pixel_y = 8 @@ -6818,12 +6818,12 @@ /area/rnd/telesci) "dfP" = ( /obj/machinery/button/remote/airlock{ + dir = 8; id = "xeno_entrance_int"; name = "Xenobiology Internal Access Bolts"; + pixel_x = -21; req_access = list(55); - specialfunctions = 4; - dir = 8; - pixel_x = -21 + specialfunctions = 4 }, /obj/effect/floor_decal/corner/mauve{ dir = 9 @@ -7883,13 +7883,13 @@ "dHO" = ( /obj/effect/floor_decal/industrial/warning/full, /obj/structure/plasticflaps/airtight{ - layer = 2.5; - dir = 8 + dir = 8; + layer = 2.5 }, /obj/machinery/door/airlock/glass_research{ - req_access = list(55); + dir = 8; name = "Cell"; - dir = 8 + req_access = list(55) }, /obj/machinery/door/blast/regular/open{ fail_secure = 1; @@ -14119,8 +14119,8 @@ /area/hallway/primary/central_one) "gzU" = ( /obj/machinery/computer/operating{ - name = "Xenobiology Operating Computer"; - dir = 8 + dir = 8; + name = "Xenobiology Operating Computer" }, /obj/effect/floor_decal/corner/mauve{ dir = 6 @@ -22547,9 +22547,9 @@ dir = 8; id = "xeno_entrance_ext"; name = "Xenobiology External Access Bolts"; + pixel_x = -21; req_access = list(55); - specialfunctions = 4; - pixel_x = -21 + specialfunctions = 4 }, /turf/simulated/floor/tiled/white, /area/rnd/xenobiology) @@ -29997,10 +29997,10 @@ }, /obj/effect/map_effect/window_spawner/full/reinforced, /obj/machinery/door/blast/regular/open{ + dir = 2; fail_secure = 1; id = "xenobio"; - name = "Cell Containment Blast Door"; - dir = 2 + name = "Cell Containment Blast Door" }, /turf/simulated/floor/tiled/dark/full, /area/rnd/xenobiology) @@ -30096,8 +30096,8 @@ "ocU" = ( /obj/structure/table/standard, /obj/item/paper_bin{ - pixel_y = 1; - pixel_x = 6 + pixel_x = 6; + pixel_y = 1 }, /obj/item/pen{ pixel_x = 6; @@ -33845,8 +33845,8 @@ dir = 5 }, /obj/machinery/smartfridge/secure/extract{ - pixel_y = 32; - density = 0 + density = 0; + pixel_y = 32 }, /obj/effect/floor_decal/industrial/hatch/yellow, /turf/simulated/floor/tiled/white, @@ -38693,19 +38693,19 @@ "sjV" = ( /obj/effect/floor_decal/industrial/warning/full, /obj/structure/plasticflaps/airtight{ - layer = 2.5; - dir = 4 + dir = 4; + layer = 2.5 }, /obj/machinery/door/airlock/glass_research{ - req_access = list(55); + dir = 4; name = "Cell"; - dir = 4 + req_access = list(55) }, /obj/machinery/door/blast/regular/open{ + dir = 2; fail_secure = 1; id = "xenobio"; - name = "Cell Containment Blast Door"; - dir = 2 + name = "Cell Containment Blast Door" }, /turf/simulated/floor/tiled/dark/full, /area/rnd/xenobiology) @@ -39718,8 +39718,8 @@ dir = 4 }, /obj/item/reagent_containers/spray/cleaner{ - pixel_y = 14; - pixel_x = -9 + pixel_x = -9; + pixel_y = 14 }, /turf/simulated/floor/tiled/dark/full, /area/horizon/kitchen) @@ -39913,8 +39913,8 @@ "sVf" = ( /obj/structure/table/standard, /obj/item/folder/yellow{ - pixel_y = 3; - pixel_x = 3 + pixel_x = 3; + pixel_y = 3 }, /obj/item/device/hand_labeler{ pixel_y = -5 @@ -41336,9 +41336,9 @@ /obj/effect/floor_decal/industrial/hatch/yellow, /obj/machinery/door/airlock/glass_research{ dir = 4; + id_tag = "xeno_entrance_int"; name = "Xenobiology"; - req_access = list(55); - id_tag = "xeno_entrance_int" + req_access = list(55) }, /turf/simulated/floor/tiled/dark/full, /area/rnd/xenobiology) @@ -42694,24 +42694,24 @@ req_one_access = list(24,11,55) }, /obj/item/storage/box/lights/colored/blue{ - pixel_y = 10; - pixel_x = 6 + pixel_x = 6; + pixel_y = 10 }, /obj/item/storage/box/lights/colored/cyan{ - pixel_y = 10; - pixel_x = -6 + pixel_x = -6; + pixel_y = 10 }, /obj/item/storage/box/lights/colored/green{ - pixel_y = 6; - pixel_x = 6 + pixel_x = 6; + pixel_y = 6 }, /obj/item/storage/box/lights/colored/magenta{ pixel_x = -6; pixel_y = 6 }, /obj/item/storage/box/lights/colored/red{ - pixel_y = 2; - pixel_x = 6 + pixel_x = 6; + pixel_y = 2 }, /obj/item/storage/box/lights/colored/yellow{ pixel_x = -6; @@ -49151,6 +49151,10 @@ /area/horizon/security/head_of_security) "wZw" = ( /obj/structure/table/rack, +/obj/item/stack/material/uranium{ + amount = 10; + randpixel = 0 + }, /obj/item/stack/material/plasteel{ amount = 20; pixel_y = 4; @@ -49162,6 +49166,12 @@ pixel_y = 2; randpixel = 0 }, +/obj/item/stack/material/glass{ + amount = 50; + pixel_x = -1; + pixel_y = 2; + randpixel = 0 + }, /obj/item/stack/material/steel{ amount = 50; pixel_x = 1; @@ -51486,12 +51496,12 @@ pixel_y = 1 }, /obj/item/device/slime_scanner{ - pixel_y = 4; - pixel_x = -11 + pixel_x = -11; + pixel_y = 4 }, /obj/item/device/slime_scanner{ - pixel_y = 4; - pixel_x = -11 + pixel_x = -11; + pixel_y = 4 }, /obj/effect/floor_decal/corner/mauve{ dir = 6 diff --git a/maps/sccv_horizon/sccv_horizon-4_centcomm.dmm b/maps/sccv_horizon/sccv_horizon-4_centcomm.dmm index aa9fc159391..049e7cf9956 100644 --- a/maps/sccv_horizon/sccv_horizon-4_centcomm.dmm +++ b/maps/sccv_horizon/sccv_horizon-4_centcomm.dmm @@ -24368,7 +24368,6 @@ req_access = list(150) }, /obj/machinery/button/remote/blast_door{ - dir = 2; id = "burglar_blast"; layer = 3; name = "blast door"; @@ -27245,11 +27244,11 @@ }, /obj/effect/floor_decal/industrial/hatch/yellow, /obj/machinery/button/remote/blast_door{ + dir = 1; id = "smindicate2"; name = "internal blast door"; pixel_y = 26; - req_access = list(150); - dir = 1 + req_access = list(150) }, /obj/machinery/door/blast/regular{ density = 0; @@ -27319,11 +27318,11 @@ }, /obj/effect/floor_decal/industrial/hatch/yellow, /obj/machinery/button/remote/blast_door{ + dir = 1; id = "smindicate"; name = "external blast door"; pixel_y = 26; - req_access = list(150); - dir = 1 + req_access = list(150) }, /turf/simulated/floor/tiled/dark, /area/shuttle/mercenary) @@ -30334,12 +30333,12 @@ }, /obj/machinery/access_button{ command = "cycle_exterior"; + dir = 1; frequency = 1380; master_tag = "raider_east_control"; pixel_x = -26; pixel_y = 12; - req_access = list(150); - dir = 1 + req_access = list(150) }, /obj/machinery/door/blast/regular/open{ dir = 2; @@ -30347,12 +30346,11 @@ name = "blast door" }, /obj/machinery/button/remote/blast_door{ - dir = 2; id = "raiderblastdoor"; name = "blast door"; pixel_x = 25; - req_access = list(150); - pixel_y = 13 + pixel_y = 13; + req_access = list(150) }, /turf/simulated/floor/plating, /area/shuttle/skipjack) @@ -30433,10 +30431,10 @@ /area/shuttle/skipjack) "bwc" = ( /obj/machinery/airlock_sensor{ + dir = 4; frequency = 1380; id_tag = "raider_east_sensor"; - pixel_x = -25; - dir = 4 + pixel_x = -25 }, /obj/effect/decal/cleanable/dirt, /obj/machinery/light/small{ @@ -30679,14 +30677,14 @@ }, /obj/effect/decal/cleanable/dirt, /obj/machinery/embedded_controller/radio/airlock/docking_port{ + dir = 4; frequency = 1380; id_tag = "raider_east_control"; pixel_x = -24; tag_airpump = "raider_east_vent"; tag_chamber_sensor = "raider_east_sensor"; tag_exterior_door = "raider_northeast_lock"; - tag_interior_door = "raider_southeast_lock"; - dir = 4 + tag_interior_door = "raider_southeast_lock" }, /obj/vehicle/bike{ dir = 4 @@ -36010,7 +36008,7 @@ /obj/item/wirecutters, /obj/item/weldingtool, /obj/item/device/hand_labeler, -/obj/item/cell/nuclear, +/obj/item/cell/mecha/phoron, /turf/simulated/floor/carpet/rubber, /area/antag/jockey) "eWy" = ( @@ -38731,7 +38729,7 @@ /obj/item/wirecutters, /obj/item/weldingtool, /obj/item/device/hand_labeler, -/obj/item/cell/nuclear, +/obj/item/cell/mecha/phoron, /turf/simulated/floor/carpet/rubber, /area/antag/jockey) "oyi" = ( @@ -39090,7 +39088,7 @@ dir = 8 }, /obj/item/device/hand_labeler, -/obj/item/cell/nuclear, +/obj/item/cell/mecha/phoron, /turf/simulated/floor/carpet/rubber, /area/antag/jockey) "pEO" = ( From ee90f534d215cb0d78733b1dedeaa07db0134bd8 Mon Sep 17 00:00:00 2001 From: Geeves Date: Sat, 20 Apr 2024 16:10:52 +0200 Subject: [PATCH 2/6] readd uranium --- maps/sccv_horizon/sccv_horizon-2_deck_2.dmm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/maps/sccv_horizon/sccv_horizon-2_deck_2.dmm b/maps/sccv_horizon/sccv_horizon-2_deck_2.dmm index bc932e028dc..49c670af3a8 100644 --- a/maps/sccv_horizon/sccv_horizon-2_deck_2.dmm +++ b/maps/sccv_horizon/sccv_horizon-2_deck_2.dmm @@ -10428,6 +10428,9 @@ /obj/item/stack/material/phoron{ amount = 20 }, +/obj/item/stack/material/uranium{ + amount = 10 + }, /turf/simulated/floor/tiled/dark/full, /area/operations/lower/machinist) "eTf" = ( From 15ccd17ba22c7d78823976977c6ade85d8bc4fa4 Mon Sep 17 00:00:00 2001 From: Geeves Date: Sat, 20 Apr 2024 17:09:20 +0200 Subject: [PATCH 3/6] fluffy changes --- .../signals_atom/signals_power_cell.dm | 1 + .../objects/items/devices/suit_cooling.dm | 2 +- .../game/objects/items/weapons/power_cells.dm | 79 ++++++++----------- code/game/objects/items/weapons/stunbaton.dm | 36 ++++----- .../heavy_vehicle/interface/_interface.dm | 4 +- .../heavy_vehicle/mech_construction.dm | 4 +- .../modules/heavy_vehicle/mech_interaction.dm | 3 +- 7 files changed, 58 insertions(+), 71 deletions(-) diff --git a/code/__DEFINES/dcs/signals/signals_atom/signals_power_cell.dm b/code/__DEFINES/dcs/signals/signals_atom/signals_power_cell.dm index 1ccf7af7a3a..7e950de28a3 100644 --- a/code/__DEFINES/dcs/signals/signals_atom/signals_power_cell.dm +++ b/code/__DEFINES/dcs/signals/signals_atom/signals_power_cell.dm @@ -1,4 +1,5 @@ // Signals related to charge level of power cells // Sent from cell.dm +/// This is fired whenever a cell's charge changes. The data attached is the integer value of the cell's charge #define COMSIG_CELL_CHARGE "cell_charge" diff --git a/code/game/objects/items/devices/suit_cooling.dm b/code/game/objects/items/devices/suit_cooling.dm index b08a0ae8fbf..bb76ef79c3f 100644 --- a/code/game/objects/items/devices/suit_cooling.dm +++ b/code/game/objects/items/devices/suit_cooling.dm @@ -167,7 +167,7 @@ to_chat(user, SPAN_WARNING("There is \a [cell] already installed here.")) else if(attacking_item.w_class != ITEMSIZE_NORMAL) - to_chat(user, "\The [attacking_item] is too [attacking_item.w_class < ITEMSIZE_NORMAL ? "small" : "large"] to fit here.") + to_chat(user, SPAN_WARNING("\The [attacking_item] is too [attacking_item.w_class < ITEMSIZE_NORMAL ? "small" : "large"] to fit here.")) return user.drop_from_inventory(attacking_item,src) cell = attacking_item diff --git a/code/game/objects/items/weapons/power_cells.dm b/code/game/objects/items/weapons/power_cells.dm index cddca5ef196..37ff827d4ed 100644 --- a/code/game/objects/items/weapons/power_cells.dm +++ b/code/game/objects/items/weapons/power_cells.dm @@ -17,6 +17,30 @@ matter = list(DEFAULT_WALL_MATERIAL = 700, MATERIAL_GLASS = 50) recyclable = TRUE + /// Percentage of maxcharge to recharge per minute, though it will trickle charge every process tick (every ~2 seconds), leave null for no self-recharge + var/self_charge_percentage + +/obj/item/cell/Initialize() + . = ..() + if(self_charge_percentage) + START_PROCESSING(SSprocessing, src) + +/obj/item/cell/Destroy() + if(self_charge_percentage) + STOP_PROCESSING(SSprocessing, src) + return ..() + +/obj/item/cell/process(seconds_per_tick) + if(self_charge_percentage) + // we wanna recharge [self_charge_percentage% of the max charge] amount every 60 seconds + var/recharge_amount_per_minute = (maxcharge / 100) * self_charge_percentage + // since process fires every ~2 seconds, we wanna get the recharge amount per second + var/recharge_amount_per_second = recharge_amount_per_minute / 60 + // multiply the amount per second with how many seconds this tick took, then round it to prevent float errors + var/recharge_for_this_process = round(recharge_amount_per_second * (seconds_per_tick / 10)) // divides seconds_per_tick by 10 to turn deciseconds into seconds + // finally, charge the cell + give(recharge_for_this_process) + /// Smaller variant, used by energy guns and similar small devices /obj/item/cell/device name = "device power cell" @@ -144,20 +168,9 @@ icon_state = "yellow slime extract" maxcharge = 15000 matter = null - var/next_recharge - -/obj/item/cell/slime/Initialize() - . = ..() - START_PROCESSING(SSprocessing, src) -/obj/item/cell/slime/Destroy() - STOP_PROCESSING(SSprocessing, src) - return ..() - -/obj/item/cell/slime/process() - if(next_recharge < world.time) - give(charge + (maxcharge / 10)) - next_recharge = world.time + 1 MINUTE + // slime cores recharges 10% every one minute + self_charge_percentage = 10 /obj/item/cell/nuclear name = "miniaturized nuclear power cell" @@ -166,20 +179,9 @@ icon_state = "icell" maxcharge = 50000 matter = null - var/next_recharge - -/obj/item/cell/nuclear/Initialize() - . = ..() - START_PROCESSING(SSprocessing, src) - -/obj/item/cell/nuclear/Destroy() - STOP_PROCESSING(SSprocessing, src) - return ..() -/obj/item/cell/nuclear/process() - if(next_recharge < world.time) - give(charge + (maxcharge / 10)) - next_recharge = world.time + 30 SECONDS + // nuclear cores recharges 20% every one minute + self_charge_percentage = 10 /obj/item/cell/device/emergency_light name = "miniature power cell" @@ -213,33 +215,14 @@ maxcharge = 20000 matter = list(DEFAULT_WALL_MATERIAL = 20000, MATERIAL_GLASS = 10000) - /// When the cell will next recharge (once every minute) - var/next_recharge - - /// Percentage of maxcharge to recharge every minute, leave null for no self-recharge - var/self_charge_percentage - -/obj/item/cell/mecha/Initialize() - . = ..() - if(self_charge_percentage) - START_PROCESSING(SSprocessing, src) - -/obj/item/cell/mecha/Destroy() - if(self_charge_percentage) - STOP_PROCESSING(SSprocessing, src) - return ..() - -/obj/item/cell/mecha/process() - if(self_charge_percentage && next_recharge < world.time) - give((maxcharge / 100) *self_charge_percentage) - next_recharge = world.time + 1 MINUTE - /obj/item/cell/mecha/nuclear name = "nuclear power core" origin_tech = list(TECH_POWER = 3, TECH_MATERIAL = 3) icon_state = "nuclear_core" maxcharge = 30000 matter = list(DEFAULT_WALL_MATERIAL = 20000, MATERIAL_GLASS = 10000, MATERIAL_URANIUM = 10000) + + // nuclear mecha cores recharges 5% every one minute self_charge_percentage = 5 /obj/item/cell/mecha/phoron @@ -248,4 +231,6 @@ icon_state = "phoron_core" maxcharge = 50000 matter = list(DEFAULT_WALL_MATERIAL = 20000, MATERIAL_GLASS = 10000, MATERIAL_PHORON = 5000) + + // nuclear mecha cores recharges 10% every one minute self_charge_percentage = 10 diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm index 94954b27a2e..145c0457be6 100644 --- a/code/game/objects/items/weapons/stunbaton.dm +++ b/code/game/objects/items/weapons/stunbaton.dm @@ -64,29 +64,29 @@ if(!distance <= 1) return if(bcell) - . += "The baton is [round(bcell.percent())]% charged." + . += SPAN_NOTICE("The baton is [round(bcell.percent())]% charged.") else - . += "The baton does not have a power source installed." + . += SPAN_WARNING("The baton does not have a power source installed.") /obj/item/melee/baton/attackby(obj/item/attacking_item, mob/user) if(istype(attacking_item, /obj/item/cell)) if(attacking_item.w_class != ITEMSIZE_NORMAL) - to_chat(user, "\The [attacking_item] is too [attacking_item.w_class < ITEMSIZE_NORMAL ? "small" : "large"] to fit here.") + to_chat(user, SPAN_WARNING("\The [attacking_item] is too [attacking_item.w_class < ITEMSIZE_NORMAL ? "small" : "large"] to fit here.")) return if(!bcell) user.drop_from_inventory(attacking_item, src) bcell = attacking_item - to_chat(user, "You install a cell in [src].") + to_chat(user, SPAN_NOTICE("You install a cell in [src].")) update_icon() else - to_chat(user, "[src] already has a cell.") + to_chat(user, SPAN_NOTICE("[src] already has a cell.")) else if(attacking_item.isscrewdriver()) if(bcell) bcell.update_icon() bcell.forceMove(get_turf(src)) bcell = null - to_chat(user, "You remove the cell from the [src].") + to_chat(user, SPAN_NOTICE("You remove the cell from the [src].")) status = 0 update_icon() return @@ -96,22 +96,22 @@ /obj/item/melee/baton/attack_self(mob/user) if(bcell && bcell.charge > hitcost) status = !status - to_chat(user, "[src] is now [status ? "on" : "off"].") + to_chat(user, SPAN_NOTICE("[src] is now [status ? "on" : "off"].")) playsound(loc, /singleton/sound_category/spark_sound, 75, 1, -1) update_icon() else status = 0 if(!bcell) - to_chat(user, "[src] does not have a power source!") + to_chat(user, SPAN_WARNING("[src] does not have a power source!")) else - to_chat(user, "[src] is out of charge.") + to_chat(user, SPAN_WARNING("[src] is out of charge.")) add_fingerprint(user) /obj/item/melee/baton/attack(mob/living/L, mob/user, var/hit_zone) if(!L) return if(status && (user.is_clumsy()) && prob(50)) - to_chat(user, "You accidentally hit yourself with the [src]!") + to_chat(user, SPAN_DANGER("You accidentally hit yourself with the [src]!")) user.Weaken(30) deductcharge(hitcost) return @@ -124,7 +124,7 @@ var/stun = stunforce if(user.is_pacified()) - to_chat(user, "You don't want to risk hurting [L]!") + to_chat(user, SPAN_NOTICE("You don't want to risk hurting [L]!")) return 0 var/target_zone = check_zone(hit_zone) @@ -155,17 +155,17 @@ target_zone = get_zone_with_miss_chance(user.zone_sel.selecting, L) if(!target_zone) - L.visible_message("[user] misses [L] with \the [src]!") + L.visible_message(SPAN_WARNING("[user] misses [L] with \the [src]!")) return 0 var/mob/living/carbon/human/H = L var/obj/item/organ/external/affecting = H.get_organ(target_zone) if (affecting) if(!status) - L.visible_message("[L] has been prodded in the [affecting.name] with \the [src] by [user]. Luckily it was off.") + L.visible_message(SPAN_WARNING("[L] has been prodded in the [affecting.name] with \the [src] by [user]. Luckily it was off.")) return 1 else - H.visible_message("[L] has been prodded in the [affecting.name] with \the [src] by [user]!") + H.visible_message(SPAN_DANGER("[L] has been prodded in the [affecting.name] with \the [src] by [user]!")) var/intent = "(INTENT: [user? uppertext(user.a_intent) : "N/A"])" admin_attack_log(user, L, "was stunned by this mob with [src] [intent]", "stunned this mob with [src] [intent]", "stunned with [src]") if(!sheathed) @@ -173,10 +173,10 @@ if(isslime(L)) var/mob/living/carbon/slime/S = L if(!status) - L.visible_message("[S] has been prodded with \the [src] by [user]. Too bad it was off.") + L.visible_message(SPAN_WARNING("[S] has been prodded with \the [src] by [user]. Too bad it was off.")) return TRUE else - L.visible_message("[S] has been prodded with \the [src] by [user]!") + L.visible_message(SPAN_DANGER("[S] has been prodded with \the [src] by [user]!")) S.discipline++ if(prob(1)) @@ -185,10 +185,10 @@ else if(!status) - L.visible_message("[L] has been prodded with \the [src] by [user]. Luckily it was off.") + L.visible_message(SPAN_WARNING("[L] has been prodded with \the [src] by [user]. Luckily it was off.")) return TRUE else - L.visible_message("[L] has been prodded with \the [src] by [user]!") + L.visible_message(SPAN_DANGER("[L] has been prodded with \the [src] by [user]!")) //stun effects L.stun_effect_act(stun, agony, target_zone, src) diff --git a/code/modules/heavy_vehicle/interface/_interface.dm b/code/modules/heavy_vehicle/interface/_interface.dm index 1c0f7ab93a6..2e2fbc70a1f 100644 --- a/code/modules/heavy_vehicle/interface/_interface.dm +++ b/code/modules/heavy_vehicle/interface/_interface.dm @@ -117,9 +117,9 @@ hud_power?.maptext_x = 21 else if(power_percentage < 10) hud_power?.maptext_x = 25 - else if(power_percentage < 100) + else hud_power?.maptext_x = 22 - hud_power.maptext = "[power_percentage]%" + hud_power?.maptext = "[power_percentage]%" else hud_power?.maptext_x = 13 hud_power?.maptext = "NO CELL" diff --git a/code/modules/heavy_vehicle/mech_construction.dm b/code/modules/heavy_vehicle/mech_construction.dm index f86d23156e8..6144d4443d7 100644 --- a/code/modules/heavy_vehicle/mech_construction.dm +++ b/code/modules/heavy_vehicle/mech_construction.dm @@ -65,10 +65,12 @@ return var/obj/structure/heavy_vehicle_frame/frame = dest - if(istype(frame)) frame.body = body + if(body.cell) + UnregisterSignal(body.cell, COMSIG_CELL_CHARGE) + body.forceMove(dest) body = null diff --git a/code/modules/heavy_vehicle/mech_interaction.dm b/code/modules/heavy_vehicle/mech_interaction.dm index 07712a68c48..591f20649db 100644 --- a/code/modules/heavy_vehicle/mech_interaction.dm +++ b/code/modules/heavy_vehicle/mech_interaction.dm @@ -475,9 +475,8 @@ attacking_item.forceMove(body) body.cell = attacking_item RegisterSignal(body.cell, COMSIG_CELL_CHARGE, PROC_REF(handle_cell_charge)) - to_chat(user, attacking_item"You install \the [body.cell] into \the [src].")) playsound(user.loc, 'sound/items/Screwdriver.ogg', 50, 1) - visible_message(attacking_item"\The [user] installs \the [body.cell] into \the [src].")) + user.visible_message(SPAN_NOTICE("\The [user] installs \the [body.cell] into \the [src]."), SPAN_NOTICE("You install \the [body.cell] into \the [src].")) return else if(istype(attacking_item, /obj/item/device/robotanalyzer)) to_chat(user, SPAN_NOTICE("Diagnostic Report for \the [src]:")) From 484f6f34238961a2d4f7d9b0276a20ad5f5aa47c Mon Sep 17 00:00:00 2001 From: Geeves Date: Sat, 20 Apr 2024 17:12:27 +0200 Subject: [PATCH 4/6] cl update --- html/changelogs/geeves-power_core_online.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/changelogs/geeves-power_core_online.yml b/html/changelogs/geeves-power_core_online.yml index bb72c2e4d71..6688d499bb6 100644 --- a/html/changelogs/geeves-power_core_online.yml +++ b/html/changelogs/geeves-power_core_online.yml @@ -4,7 +4,7 @@ delete-after: True changes: - rscadd: "Added power cores, a type of large battery cell that get used by exosuits. The nuclear and phoron variants are self-charging." - - tweak: "Combat mechs now start with nuclear power cores, allowing them to sustain themselves indefinitely, so long as they stay out of the action for a bit." + - balance: "Combat mechs now start with nuclear power cores, allowing them to sustain themselves indefinitely, so long as they stay out of the action for a bit." - rscdel: "Removed basic power cells from the mechfab, replaced with the mech powercores." - rscadd: "Mech cell statuses now instantly update as soon as the cell charges or discharges." - rscadd: "Added a stack of 10 uranium to the machinist's workshop, which can print two nuclear power cores." \ No newline at end of file From 501ba2605da9f307d1fbb684df23c75e8f566530 Mon Sep 17 00:00:00 2001 From: Geeves Date: Sat, 20 Apr 2024 17:24:22 +0200 Subject: [PATCH 5/6] move functions --- .../game/objects/items/weapons/power_cells.dm | 21 ------------------- code/modules/power/cell.dm | 21 +++++++++++++++++++ 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/code/game/objects/items/weapons/power_cells.dm b/code/game/objects/items/weapons/power_cells.dm index 37ff827d4ed..0ff5eb91e5f 100644 --- a/code/game/objects/items/weapons/power_cells.dm +++ b/code/game/objects/items/weapons/power_cells.dm @@ -20,27 +20,6 @@ /// Percentage of maxcharge to recharge per minute, though it will trickle charge every process tick (every ~2 seconds), leave null for no self-recharge var/self_charge_percentage -/obj/item/cell/Initialize() - . = ..() - if(self_charge_percentage) - START_PROCESSING(SSprocessing, src) - -/obj/item/cell/Destroy() - if(self_charge_percentage) - STOP_PROCESSING(SSprocessing, src) - return ..() - -/obj/item/cell/process(seconds_per_tick) - if(self_charge_percentage) - // we wanna recharge [self_charge_percentage% of the max charge] amount every 60 seconds - var/recharge_amount_per_minute = (maxcharge / 100) * self_charge_percentage - // since process fires every ~2 seconds, we wanna get the recharge amount per second - var/recharge_amount_per_second = recharge_amount_per_minute / 60 - // multiply the amount per second with how many seconds this tick took, then round it to prevent float errors - var/recharge_for_this_process = round(recharge_amount_per_second * (seconds_per_tick / 10)) // divides seconds_per_tick by 10 to turn deciseconds into seconds - // finally, charge the cell - give(recharge_for_this_process) - /// Smaller variant, used by energy guns and similar small devices /obj/item/cell/device name = "device power cell" diff --git a/code/modules/power/cell.dm b/code/modules/power/cell.dm index 73990851147..aca4de8faf3 100644 --- a/code/modules/power/cell.dm +++ b/code/modules/power/cell.dm @@ -4,9 +4,30 @@ /obj/item/cell/Initialize() . = ..() + charge = maxcharge + + if(self_charge_percentage) + START_PROCESSING(SSprocessing, src) + update_icon() +/obj/item/cell/Destroy() + if(self_charge_percentage) + STOP_PROCESSING(SSprocessing, src) + return ..() + +/obj/item/cell/process(seconds_per_tick) + if(self_charge_percentage) + // we wanna recharge [self_charge_percentage% of the max charge] amount every 60 seconds + var/recharge_amount_per_minute = (maxcharge / 100) * self_charge_percentage + // since process fires every ~2 seconds, we wanna get the recharge amount per second + var/recharge_amount_per_second = recharge_amount_per_minute / 60 + // multiply the amount per second with how many seconds this tick took, then round it to prevent float errors + var/recharge_for_this_process = round(recharge_amount_per_second * (seconds_per_tick / 10)) // divides seconds_per_tick by 10 to turn deciseconds into seconds + // finally, charge the cell + give(recharge_for_this_process) + /obj/item/cell/Created() //Newly built cells spawn with no charge to prevent power exploits charge = 0 From 8d1ea51c72d90b962a30249a32e2d090c6582ddf Mon Sep 17 00:00:00 2001 From: Geeves Date: Sun, 5 May 2024 18:52:36 +0200 Subject: [PATCH 6/6] readd sprite after merge --- icons/obj/machinery/cell_charger.dmi | Bin 3281 -> 3687 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/icons/obj/machinery/cell_charger.dmi b/icons/obj/machinery/cell_charger.dmi index fcc612b43920c2934f662622c6a14385abe56b71..f817928308993a1c160e45c20cdd24a7c4a4dd91 100644 GIT binary patch literal 3687 zcmb_fXHb*f5`Gh^R6&Y@5IZWpC_MxP5$V++9i)jg!GK916qP0-h!Q#q(v+?s0Ro7E z(h^0QKmrIxKnM^ZgqE9c?)~@O`F`BFKhAm1?3p>U`^@e>XA>>Wjre&acmM$4H@<3M z&BFG-7B?qrx1PAo#exN-Ej-M?E7bFjUvQXTP#^$At5EPCc`A5WK$!;*4QRN>psDhXYzz=EKKNiD4ljv}!CyEZM5>`F!w| z)~;sN!>$qv^jw!5G~b$7XGD^EP*91!nT*(kg9U!CXTUvN?uCx+8b=LHF_6!~@H>kQ z4Pyg++lbtyNzCnx2U46Xr2=X(UHk^fhVS3Z&w90&sT;=pB9+O?@;{HRG&d|dhSNAc zYmo4|50D^=e6Kn1AtTZEVW;I)$1>mL+wQwao8ouxYM%~EzDm&E?U2`~pV)toA~bJS ztw*&|$9JFw_ao?}jr_(HD0L@)B#NvS-w8TVUZsTONO<%S{KQudNbLF>2=UfL8l{Bq zJeH`=m%UuvSi>=jFY401TPJEGM|(K|DPk_)p6-YN!3?LrgH78u^vm|=vPM!a(Z{NZVRil5dbxv{umz@6q`Fd>mBvIZs94buT$)!8Kp|qIjvch37aIH9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