mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +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
|
use_to_pickup = 1
|
||||||
storage_slots = 14
|
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
|
/obj/item/weapon/storage/pill_bottle/kelotane
|
||||||
name = "bottle of kelotane pills"
|
name = "bottle of kelotane pills"
|
||||||
desc = "Contains pills used to treat burns."
|
desc = "Contains pills used to treat burns."
|
||||||
|
|||||||
@@ -167,16 +167,12 @@
|
|||||||
if ((src.loc == user) && (src.locked == 1))
|
if ((src.loc == user) && (src.locked == 1))
|
||||||
usr << "\red [src] is locked and cannot be opened!"
|
usr << "\red [src] is locked and cannot be opened!"
|
||||||
else if ((src.loc == user) && (!src.locked))
|
else if ((src.loc == user) && (!src.locked))
|
||||||
playsound(src.loc, "rustle", 50, 1, -5)
|
src.open(usr)
|
||||||
if (user.s_active)
|
|
||||||
user.s_active.close(user) //Close and re-open
|
|
||||||
src.show_to(user)
|
|
||||||
else
|
else
|
||||||
..()
|
..()
|
||||||
for(var/mob/M in range(1))
|
for(var/mob/M in range(1))
|
||||||
if (M.s_active == src)
|
if (M.s_active == src)
|
||||||
src.close(M)
|
src.close(M)
|
||||||
src.orient2hud(user)
|
|
||||||
src.add_fingerprint(user)
|
src.add_fingerprint(user)
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -245,4 +241,4 @@
|
|||||||
|
|
||||||
/obj/item/weapon/storage/secure/safe/HoS/New()
|
/obj/item/weapon/storage/secure/safe/HoS/New()
|
||||||
..()
|
..()
|
||||||
//new /obj/item/weapon/storage/lockbox/clusterbang(src) This item is currently broken... and probably shouldnt exist to begin with (even though it's cool)
|
//new /obj/item/weapon/storage/lockbox/clusterbang(src) This item is currently broken... and probably shouldnt exist to begin with (even though it's cool)
|
||||||
|
|||||||
Reference in New Issue
Block a user