mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 11:43:31 +00:00
Merge pull request #901 from CHOMPStationBot/upstream-merge-9342
[MIRROR] Removes prompt for ID restoration if no ID
This commit is contained in:
@@ -30,14 +30,15 @@
|
|||||||
if(..()) return
|
if(..()) return
|
||||||
if(stat & (NOPOWER|BROKEN)) return
|
if(stat & (NOPOWER|BROKEN)) return
|
||||||
|
|
||||||
|
if(!inserted) // No point in giving you an option what to do if there's no ID to do things with.
|
||||||
|
to_chat(user, "<span class='notice'>No ID is inserted.</span>")
|
||||||
|
return
|
||||||
|
|
||||||
var/choice = alert(user,"What do you want to do?","[src]","Restore ID access","Eject ID","Cancel")
|
var/choice = alert(user,"What do you want to do?","[src]","Restore ID access","Eject ID","Cancel")
|
||||||
if(user.incapacitated() || (get_dist(src, user) > 1))
|
if(user.incapacitated() || (get_dist(src, user) > 1))
|
||||||
return
|
return
|
||||||
switch(choice)
|
switch(choice)
|
||||||
if("Restore ID access")
|
if("Restore ID access")
|
||||||
if(!inserted)
|
|
||||||
to_chat(user, "<span class='notice'>No ID is inserted.</span>")
|
|
||||||
return
|
|
||||||
var/mob/living/carbon/human/H = user
|
var/mob/living/carbon/human/H = user
|
||||||
if(!(istype(H)))
|
if(!(istype(H)))
|
||||||
to_chat(user, "<span class='warning'>Invalid user detected. Access denied.</span>")
|
to_chat(user, "<span class='warning'>Invalid user detected. Access denied.</span>")
|
||||||
@@ -66,9 +67,6 @@
|
|||||||
flick(icon_fail, src)
|
flick(icon_fail, src)
|
||||||
return
|
return
|
||||||
if("Eject ID")
|
if("Eject ID")
|
||||||
if(!inserted)
|
|
||||||
to_chat(user, "<span class='notice'>No ID is inserted.</span>")
|
|
||||||
return
|
|
||||||
if(ishuman(user))
|
if(ishuman(user))
|
||||||
inserted.forceMove(get_turf(src))
|
inserted.forceMove(get_turf(src))
|
||||||
if(!user.get_active_hand())
|
if(!user.get_active_hand())
|
||||||
|
|||||||
Reference in New Issue
Block a user