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)
|
if(icon_update_tick == 0)
|
||||||
build_overlays()
|
build_overlays()
|
||||||
|
|
||||||
/obj/machinery/recharge_station/Bumped(var/mob/AM)
|
/obj/machinery/recharge_station/Bumped(var/mob/living/silicon/robot/R)
|
||||||
move_inside(AM)
|
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()
|
/obj/machinery/recharge_station/proc/go_out()
|
||||||
if(!(occupant))
|
if(!occupant)
|
||||||
return
|
return
|
||||||
occupant.loc = loc
|
|
||||||
|
occupant.forceMove(loc)
|
||||||
occupant.reset_view()
|
occupant.reset_view()
|
||||||
occupant = null
|
occupant = null
|
||||||
update_icon()
|
update_icon()
|
||||||
return
|
|
||||||
|
|
||||||
/obj/machinery/recharge_station/verb/move_eject()
|
/obj/machinery/recharge_station/verb/move_eject()
|
||||||
set category = "Object"
|
set category = "Object"
|
||||||
|
set name = "Eject Recharger"
|
||||||
set src in oview(1)
|
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
|
return
|
||||||
|
|
||||||
go_out()
|
go_out()
|
||||||
add_fingerprint(usr)
|
add_fingerprint(usr)
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/machinery/recharge_station/verb/move_inside()
|
/obj/machinery/recharge_station/verb/move_inside()
|
||||||
set category = "Object"
|
set category = "Object"
|
||||||
|
set name = "Enter Recharger"
|
||||||
set src in oview(1)
|
set src in oview(1)
|
||||||
|
|
||||||
if(usr.stat == DEAD)
|
// TODO : Change to incapacitated() on merge.
|
||||||
return
|
if(usr.stat || usr.lying || usr.resting || usr.buckled)
|
||||||
if(occupant)
|
|
||||||
usr << "<span class='notice'>\The [src] is already occupied!</span>"
|
|
||||||
return
|
return
|
||||||
|
|
||||||
var/mob/living/silicon/robot/R = usr
|
go_in(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
|
|
||||||
add_fingerprint(usr)
|
add_fingerprint(usr)
|
||||||
update_icon()
|
|
||||||
|
|||||||
@@ -394,8 +394,8 @@
|
|||||||
// returns whether this light has power
|
// returns whether this light has power
|
||||||
// true if area has power and lightswitch is on
|
// true if area has power and lightswitch is on
|
||||||
/obj/machinery/light/proc/has_power()
|
/obj/machinery/light/proc/has_power()
|
||||||
var/area/A = src.loc.loc
|
var/area/A = get_area(src)
|
||||||
return A.lightswitch && (!A.requires_power || A.power_light)
|
return A && A.lightswitch && (!A.requires_power || A.power_light)
|
||||||
|
|
||||||
/obj/machinery/light/proc/flicker(var/amount = rand(10, 20))
|
/obj/machinery/light/proc/flicker(var/amount = rand(10, 20))
|
||||||
if(flickering) return
|
if(flickering) return
|
||||||
|
|||||||
Reference in New Issue
Block a user