mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Merge remote-tracking branch 'upstream/master' into dev-freeze
This commit is contained in:
@@ -196,47 +196,51 @@
|
||||
if(icon_update_tick == 0)
|
||||
build_overlays()
|
||||
|
||||
/obj/machinery/recharge_station/Bumped(var/mob/AM)
|
||||
move_inside(AM)
|
||||
/obj/machinery/recharge_station/Bumped(var/mob/living/silicon/robot/R)
|
||||
if(istype(R))
|
||||
go_in(R)
|
||||
|
||||
/obj/machinery/recharge_station/proc/go_in(var/mob/living/silicon/robot/R)
|
||||
if(!istype(R))
|
||||
return
|
||||
if(occupant)
|
||||
return
|
||||
|
||||
R.reset_view(src)
|
||||
R.forceMove(src)
|
||||
occupant = R
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/recharge_station/proc/go_out()
|
||||
if(!(occupant))
|
||||
if(!occupant)
|
||||
return
|
||||
occupant.loc = loc
|
||||
|
||||
occupant.forceMove(loc)
|
||||
occupant.reset_view()
|
||||
occupant = null
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/machinery/recharge_station/verb/move_eject()
|
||||
set category = "Object"
|
||||
set name = "Eject Recharger"
|
||||
set src in oview(1)
|
||||
if(usr.stat != 0)
|
||||
|
||||
// TODO : Change to incapacitated() on merge.
|
||||
if(usr.stat || usr.lying || usr.resting || usr.buckled)
|
||||
return
|
||||
|
||||
go_out()
|
||||
add_fingerprint(usr)
|
||||
return
|
||||
|
||||
/obj/machinery/recharge_station/verb/move_inside()
|
||||
set category = "Object"
|
||||
set name = "Enter Recharger"
|
||||
set src in oview(1)
|
||||
|
||||
if(usr.stat == DEAD)
|
||||
return
|
||||
if(occupant)
|
||||
usr << "<span class='notice'>\The [src] is already occupied!</span>"
|
||||
// TODO : Change to incapacitated() on merge.
|
||||
if(usr.stat || usr.lying || usr.resting || usr.buckled)
|
||||
return
|
||||
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
if(!istype(R))
|
||||
usr << "<span class='notice'>Only synthetics may enter the recharger!</span>"
|
||||
return
|
||||
if(!R.cell)
|
||||
usr << "<span class='notice'>Without a powercell, you can't be recharged.</span>"
|
||||
return
|
||||
|
||||
usr.reset_view(src)
|
||||
usr.loc = src
|
||||
occupant = usr
|
||||
go_in(usr)
|
||||
add_fingerprint(usr)
|
||||
update_icon()
|
||||
|
||||
@@ -394,8 +394,8 @@
|
||||
// returns whether this light has power
|
||||
// true if area has power and lightswitch is on
|
||||
/obj/machinery/light/proc/has_power()
|
||||
var/area/A = src.loc.loc
|
||||
return A.lightswitch && (!A.requires_power || A.power_light)
|
||||
var/area/A = get_area(src)
|
||||
return A && A.lightswitch && (!A.requires_power || A.power_light)
|
||||
|
||||
/obj/machinery/light/proc/flicker(var/amount = rand(10, 20))
|
||||
if(flickering) return
|
||||
|
||||
Reference in New Issue
Block a user