Update bin.dm
This commit is contained in:
@@ -79,12 +79,12 @@
|
||||
/obj/machinery/disposal/attackby(obj/item/I, mob/user, params)
|
||||
add_fingerprint(user)
|
||||
if(!pressure_charging && !full_pressure && !flush)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
panel_open = !panel_open
|
||||
I.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You [panel_open ? "remove":"attach"] the screws around the power connection.</span>")
|
||||
return
|
||||
else if(istype(I, /obj/item/weldingtool) && panel_open)
|
||||
else if(I.tool_behaviour == TOOL_WELDER && panel_open)
|
||||
if(!I.tool_start_check(user, amount=0))
|
||||
return
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
return
|
||||
place_item_in_disposal(I, user)
|
||||
update_icon()
|
||||
return 1 //no afterattack
|
||||
return TRUE //no afterattack
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -288,32 +288,16 @@
|
||||
var/datum/oracle_ui/themed/nano/ui
|
||||
obj_flags = CAN_BE_HIT | USES_TGUI | SHOVABLE_ONTO
|
||||
|
||||
|
||||
// attack by item places it in to disposal
|
||||
/obj/machinery/disposal/bin/attackby(obj/item/I, mob/user, params)
|
||||
add_fingerprint(user)
|
||||
if(!pressure_charging && !full_pressure && !flush)
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
panel_open = !panel_open
|
||||
I.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You [panel_open ? "remove":"attach"] the screws around the power connection.</span>")
|
||||
return
|
||||
else if(I.tool_behaviour == TOOL_WELDER && panel_open)
|
||||
if(!I.tool_start_check(user, amount=0))
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You start slicing the floorweld off \the [src]...</span>")
|
||||
if(I.use_tool(src, user, 20, volume=100) && panel_open)
|
||||
to_chat(user, "<span class='notice'>You slice the floorweld off \the [src].</span>")
|
||||
deconstruct()
|
||||
return
|
||||
|
||||
if(user.a_intent != INTENT_HARM)
|
||||
if((I.item_flags & ABSTRACT) || !user.temporarilyRemoveItemFromInventory(I))
|
||||
return
|
||||
place_item_in_disposal(I, user)
|
||||
if(istype(I, /obj/item/storage/bag/trash)) //Not doing component overrides because this is a specific type.
|
||||
var/obj/item/storage/bag/trash/T = I
|
||||
var/datum/component/storage/STR = T.GetComponent(/datum/component/storage)
|
||||
to_chat(user, "<span class='warning'>You empty the bag.</span>")
|
||||
for(var/obj/item/O in T.contents)
|
||||
STR.remove_from_storage(O,src)
|
||||
T.update_icon()
|
||||
update_icon()
|
||||
return TRUE //no afterattack
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user