mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 19:22:56 +00:00
Updates cryopod to have nicer code
no message
This commit is contained in:
@@ -487,32 +487,33 @@
|
|||||||
|
|
||||||
if(istype(G, /obj/item/weapon/grab))
|
if(istype(G, /obj/item/weapon/grab))
|
||||||
|
|
||||||
|
var/obj/item/weapon/grab/grab = G
|
||||||
if(occupant)
|
if(occupant)
|
||||||
user << "<span class='notice'>\The [src] is in use.</span>"
|
user << "<span class='notice'>\The [src] is in use.</span>"
|
||||||
return
|
return
|
||||||
|
|
||||||
if(!ismob(G:affecting))
|
if(!ismob(grab.affecting))
|
||||||
return
|
return
|
||||||
|
|
||||||
if(!check_occupant_allowed(G:affecting))
|
if(!check_occupant_allowed(grab.affecting))
|
||||||
return
|
return
|
||||||
|
|
||||||
var/willing = null //We don't want to allow people to be forced into despawning.
|
var/willing = null //We don't want to allow people to be forced into despawning.
|
||||||
var/mob/M = G:affecting
|
var/mob/M = grab.affecting
|
||||||
|
|
||||||
if(M.client)
|
if(M.client)
|
||||||
if(alert(M,"Would you like to enter long-term storage?",,"Yes","No") == "Yes")
|
if(alert(M,"Would you like to enter long-term storage?",,"Yes","No") == "Yes")
|
||||||
if(!M || !G || !G:affecting) return
|
if(!M || !grab || !grab:affecting) return
|
||||||
willing = 1
|
willing = 1
|
||||||
else
|
else
|
||||||
willing = 1
|
willing = 1
|
||||||
|
|
||||||
if(willing)
|
if(willing)
|
||||||
|
|
||||||
visible_message("[user] starts putting [G:affecting:name] into \the [src].", 3)
|
visible_message("\The [user] starts putting [grab:affecting:name] into \the [src].", 3)
|
||||||
|
|
||||||
if(do_after(user, 20))
|
if(do_after(user, 20))
|
||||||
if(!M || !G || !G:affecting) return
|
if(!M || !grab || !grab:affecting) return
|
||||||
|
|
||||||
M.forceMove(src)
|
M.forceMove(src)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user