mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Updated subtypes of storage to use the new open() proc
Also got rid of /obj/item/weapon/storage/pill_bottle/MouseDrop(obj/over_object as obj). Not sure what it was doing differently.
This commit is contained in:
@@ -125,29 +125,6 @@
|
||||
use_to_pickup = 1
|
||||
storage_slots = 14
|
||||
|
||||
/obj/item/weapon/storage/pill_bottle/MouseDrop(obj/over_object as obj) //Quick pillbottle fix. -Agouri
|
||||
|
||||
if (ishuman(usr) || ismonkey(usr)) //Can monkeys even place items in the pocket slots? Leaving this in just in case~
|
||||
var/mob/M = usr
|
||||
if (!( istype(over_object, /obj/screen) ))
|
||||
return ..()
|
||||
if ((!( M.restrained() ) && !( M.stat ) /*&& M.pocket == src*/))
|
||||
switch(over_object.name)
|
||||
if("r_hand")
|
||||
M.u_equip(src)
|
||||
M.put_in_r_hand(src)
|
||||
if("l_hand")
|
||||
M.u_equip(src)
|
||||
M.put_in_l_hand(src)
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
if(over_object == usr && in_range(src, usr) || usr.contents.Find(src))
|
||||
if (usr.s_active)
|
||||
usr.s_active.close(usr)
|
||||
src.show_to(usr)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/pill_bottle/kelotane
|
||||
name = "bottle of kelotane pills"
|
||||
desc = "Contains pills used to treat burns."
|
||||
|
||||
@@ -167,16 +167,12 @@
|
||||
if ((src.loc == user) && (src.locked == 1))
|
||||
usr << "\red [src] is locked and cannot be opened!"
|
||||
else if ((src.loc == user) && (!src.locked))
|
||||
playsound(src.loc, "rustle", 50, 1, -5)
|
||||
if (user.s_active)
|
||||
user.s_active.close(user) //Close and re-open
|
||||
src.show_to(user)
|
||||
src.open(usr)
|
||||
else
|
||||
..()
|
||||
for(var/mob/M in range(1))
|
||||
if (M.s_active == src)
|
||||
src.close(M)
|
||||
src.orient2hud(user)
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user