mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 21:48:39 +01:00
adds a safety check to prevent runtimes
if the dummy parent item somehow gets spawned and an idiot player tries to use it, this stops them from runtiming/crashing the server. written in my free time so i may have done the "holder == null" part wrong, if it breaks ill fix it in a bit.
This commit is contained in:
@@ -269,6 +269,9 @@
|
||||
if(overloaded)//ensure the implant isn't broken
|
||||
owner << "<span class='warning'>The implant doesn't respond. It seems to be broken...</span>"
|
||||
return
|
||||
if(holder == null)
|
||||
owner << "<span class='warning'>You should not be attempting to use this implant, as it is a dummy item that should never appear. Please adminhelp and report this as an issue on github.</span>"
|
||||
return
|
||||
if(out)//check if the owner has the item out already
|
||||
owner.unEquip(holder, 1)//if he does, take it away. then,
|
||||
holder.loc = null//stash it in nullspace
|
||||
|
||||
Reference in New Issue
Block a user