From 0e17c7469f7bc6bed48409811e722d68cdad45d3 Mon Sep 17 00:00:00 2001 From: LOK-1SmartRifleEnjoyer <159070101+LOK-1SmartRifleEnjoyer@users.noreply.github.com> Date: Mon, 26 Feb 2024 14:21:12 -0500 Subject: [PATCH 1/3] Update rechargestation.dm --- code/game/machinery/rechargestation.dm | 40 +++++++++++++++++--------- 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm index e87bb56da489..4e6534bce8aa 100644 --- a/code/game/machinery/rechargestation.dm +++ b/code/game/machinery/rechargestation.dm @@ -8,14 +8,22 @@ use_power = USE_POWER_IDLE idle_power_usage = 50 active_power_usage = 50 + can_buckle = TRUE + /// the borg inside var/mob/living/occupant = null - var/max_internal_charge = 15000 // Two charged borgs in a row with default cell - var/current_internal_charge = 15000 // Starts charged, to prevent power surges on round start + /// Two charged borgs in a row with default cell + var/max_internal_charge = 15000 + /// Starts charged, to prevent power surges on round start + var/current_internal_charge = 15000 var/charging_cap_active = 25000 // Active Cap - When cyborg is inside - var/charging_cap_passive = 2500 // Passive Cap - Recharging internal capacitor when no cyborg is inside - var/icon_update_tick = 0 // Used to update icon only once every 10 ticks + /// Passive Cap - Recharging internal capacitor when no cyborg is inside + var/charging_cap_passive = 2500 + /// Used to update icon only once every 10 ticks + var/icon_update_tick = 0 + /// implants to not remove var/known_implants = list(/obj/item/implant/chem, /obj/item/implant/death_alarm, /obj/item/implant/loyalty, /obj/item/implant/tracking, /obj/item/implant/neurostim) - can_buckle = TRUE + ///stun time upon exiting, if at all + var/exit_stun = 2 /obj/structure/machinery/recharge_station/Initialize(mapload, ...) @@ -183,15 +191,21 @@ /obj/structure/machinery/recharge_station/proc/go_out() - if(!( src.occupant )) + if(!occupant) return - //for(var/obj/O in src) - // O.forceMove(src.loc) - if (src.occupant.client) - src.occupant.client.eye = src.occupant.client.mob - src.occupant.client.perspective = MOB_PERSPECTIVE - src.occupant.forceMove(loc) - src.occupant = null + var/mob/living/cyborg = occupant + + if(cyborg.client) + cyborg.client.eye = cyborg.client.mob + cyborg.client.perspective = MOB_PERSPECTIVE + + cyborg.forceMove(loc) + if(exit_stun) + cyborg.apply_effect(exit_stun, STUN) //Action delay when going out of a closet + if(cyborg.mobility_flags & MOBILITY_MOVE) + cyborg.visible_message(SPAN_WARNING("[cyborg] suddenly gets out of [src]!"), SPAN_WARNING("You get out of [src] and get your bearings!")) + + occupant = null update_icon() update_use_power(USE_POWER_IDLE) return From 78e5f8932ba93d8642e70e1d02949e22b3e06b0a Mon Sep 17 00:00:00 2001 From: LOK-1SmartRifleEnjoyer <159070101+LOK-1SmartRifleEnjoyer@users.noreply.github.com> Date: Thu, 29 Feb 2024 13:48:17 -0500 Subject: [PATCH 2/3] Apply suggestions from code review Co-authored-by: SabreML <57483089+SabreML@users.noreply.github.com> --- code/game/machinery/rechargestation.dm | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm index 4e6534bce8aa..64f8c76a087b 100644 --- a/code/game/machinery/rechargestation.dm +++ b/code/game/machinery/rechargestation.dm @@ -12,18 +12,19 @@ /// the borg inside var/mob/living/occupant = null /// Two charged borgs in a row with default cell - var/max_internal_charge = 15000 + var/max_internal_charge = 15000 /// Starts charged, to prevent power surges on round start - var/current_internal_charge = 15000 - var/charging_cap_active = 25000 // Active Cap - When cyborg is inside + var/current_internal_charge = 15000 + /// Active Cap - When cyborg is inside + var/charging_cap_active = 25000 /// Passive Cap - Recharging internal capacitor when no cyborg is inside - var/charging_cap_passive = 2500 + var/charging_cap_passive = 2500 /// Used to update icon only once every 10 ticks - var/icon_update_tick = 0 + var/icon_update_tick = 0 /// implants to not remove var/known_implants = list(/obj/item/implant/chem, /obj/item/implant/death_alarm, /obj/item/implant/loyalty, /obj/item/implant/tracking, /obj/item/implant/neurostim) - ///stun time upon exiting, if at all - var/exit_stun = 2 + ///stun time upon exiting, if at all + var/exit_stun = 2 /obj/structure/machinery/recharge_station/Initialize(mapload, ...) @@ -201,7 +202,7 @@ cyborg.forceMove(loc) if(exit_stun) - cyborg.apply_effect(exit_stun, STUN) //Action delay when going out of a closet + cyborg.Stun(exit_stun) //Action delay when going out of a closet if(cyborg.mobility_flags & MOBILITY_MOVE) cyborg.visible_message(SPAN_WARNING("[cyborg] suddenly gets out of [src]!"), SPAN_WARNING("You get out of [src] and get your bearings!")) From 325c0168cac8be560f031ca954d08972fe6bbd61 Mon Sep 17 00:00:00 2001 From: LOK-1SmartRifleEnjoyer <159070101+LOK-1SmartRifleEnjoyer@users.noreply.github.com> Date: Thu, 29 Feb 2024 13:50:32 -0500 Subject: [PATCH 3/3] Update rechargestation.dm --- code/game/machinery/rechargestation.dm | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm index 64f8c76a087b..d86a5c0e30d0 100644 --- a/code/game/machinery/rechargestation.dm +++ b/code/game/machinery/rechargestation.dm @@ -194,22 +194,21 @@ /obj/structure/machinery/recharge_station/proc/go_out() if(!occupant) return - var/mob/living/cyborg = occupant + var/mob/living/synth = occupant - if(cyborg.client) - cyborg.client.eye = cyborg.client.mob - cyborg.client.perspective = MOB_PERSPECTIVE + if(synth.client) + synth.client.eye = synth.client.mob + synth.client.perspective = MOB_PERSPECTIVE - cyborg.forceMove(loc) + synth.forceMove(loc) if(exit_stun) - cyborg.Stun(exit_stun) //Action delay when going out of a closet - if(cyborg.mobility_flags & MOBILITY_MOVE) - cyborg.visible_message(SPAN_WARNING("[cyborg] suddenly gets out of [src]!"), SPAN_WARNING("You get out of [src] and get your bearings!")) + synth.Stun(exit_stun) //Action delay when going out of a closet + if(synth.mobility_flags & MOBILITY_MOVE) + synth.visible_message(SPAN_WARNING("[synth] suddenly gets out of [src]!"), SPAN_WARNING("You get out of [src] and get your bearings!")) occupant = null update_icon() update_use_power(USE_POWER_IDLE) - return /obj/structure/machinery/recharge_station/verb/move_eject() set category = "Object"