mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Fixes HREF exploit with sleepers (#12947)
* Fixes HREF exploit with sleepers Fixes HREF exploit with sleepers * src.author = "DrCelt"
This commit is contained in:
committed by
Pieter-Jan Briers
parent
efef002c4d
commit
49145337fa
@@ -101,8 +101,7 @@
|
||||
else
|
||||
usr.set_machine(src)
|
||||
if (href_list["chemical"])
|
||||
if (src.connected)
|
||||
if (src.connected.occupant)
|
||||
if (src.connected && src.connected.occupant)
|
||||
if (src.connected.occupant.stat == DEAD)
|
||||
to_chat(usr, "<span class='danger'>This person has no life for to preserve anymore. Take them to a department capable of reanimating them.</span>")
|
||||
else if(href_list["chemical"] == STOXIN && src.connected.sedativeblock)
|
||||
@@ -122,7 +121,10 @@
|
||||
else if(src.connected.occupant.health < 0 && href_list["chemical"] != INAPROVALINE)
|
||||
to_chat(usr, "<span class='danger'>This person is not in good enough condition for sleepers to be effective! Use another means of treatment, such as cryogenics!</span>")
|
||||
else
|
||||
src.connected.inject_chemical(usr,href_list["chemical"],text2num(href_list["amount"]))
|
||||
if(!(href_list["chemical"] in connected.available_options)) //href exploitu go home
|
||||
to_chat(usr,"<span class='warning'>That's odd. You could've sworn the [href_list["chemical"]] button was there just a second ago!")
|
||||
else
|
||||
connected.inject_chemical(usr,href_list["chemical"],text2num(href_list["amount"]))
|
||||
if (href_list["wakeup"])
|
||||
connected.wakeup(usr)
|
||||
if (href_list["toggle_autoeject"])
|
||||
|
||||
Reference in New Issue
Block a user