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