Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adds stun to exiting maintenance stations #5822

Merged
merged 3 commits into from
Feb 29, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 27 additions & 13 deletions code/game/machinery/rechargestation.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
LOK-1SmartRifleEnjoyer marked this conversation as resolved.
Show resolved Hide resolved
/// 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
LOK-1SmartRifleEnjoyer marked this conversation as resolved.
Show resolved Hide resolved
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
LOK-1SmartRifleEnjoyer marked this conversation as resolved.
Show resolved Hide resolved
/// Used to update icon only once every 10 ticks
var/icon_update_tick = 0
LOK-1SmartRifleEnjoyer marked this conversation as resolved.
Show resolved Hide resolved
/// 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
LOK-1SmartRifleEnjoyer marked this conversation as resolved.
Show resolved Hide resolved


/obj/structure/machinery/recharge_station/Initialize(mapload, ...)
Expand Down Expand Up @@ -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
LOK-1SmartRifleEnjoyer marked this conversation as resolved.
Show resolved Hide resolved

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
LOK-1SmartRifleEnjoyer marked this conversation as resolved.
Show resolved Hide resolved
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
Expand Down
Loading