Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
forceMove()
Browse files Browse the repository at this point in the history
Birdtalon committed Nov 22, 2023
1 parent 111230c commit 3093d41
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions code/game/objects/structures/extinguisher.dm
Original file line number Diff line number Diff line change
@@ -13,6 +13,7 @@
. = ..()
base_icon = initial(icon_state)
has_extinguisher = new /obj/item/tool/extinguisher()
has_extinguisher.forceMove(src)

/obj/structure/extinguisher_cabinet/lifeboat
name = "extinguisher cabinet"
@@ -22,15 +23,15 @@
/obj/structure/extinguisher_cabinet/alt
icon_state = "extinguisher_alt"

/obj/structure/extinguisher_cabinet/attackby(obj/item/O, mob/user)
/obj/structure/extinguisher_cabinet/attackby(obj/item/item, mob/user)
if(isrobot(user))
return
if(istype(O, /obj/item/tool/extinguisher))
if(istype(item, /obj/item/tool/extinguisher))
if(!has_extinguisher && opened)
user.drop_held_item()
contents += O
has_extinguisher = O
to_chat(user, SPAN_NOTICE("You place [O] in [src]."))
item.forceMove(src)
has_extinguisher = item
to_chat(user, SPAN_NOTICE("You place [item] in [src]."))
else
opened = !opened
else
@@ -46,7 +47,7 @@
user.put_in_hands(has_extinguisher)
to_chat(user, SPAN_NOTICE("You take [has_extinguisher] from [src]."))
has_extinguisher = null
opened = 1
opened = TRUE
else
opened = !opened
update_icon()

0 comments on commit 3093d41

Please sign in to comment.