upload files

This commit is contained in:
SandPoot
2021-03-31 12:35:43 -03:00
parent 31fb065c2a
commit 2381db5f53
2 changed files with 38 additions and 30 deletions

View File

@@ -275,16 +275,15 @@
/obj/structure/closet/proc/tool_interact(obj/item/W, mob/living/user)//returns TRUE if attackBy call shouldn't be continued (because tool was used/closet was of wrong type), FALSE if otherwise
. = TRUE
if(opened)
if(istype(W, /obj/item/weldingtool))
if(W.tool_behaviour == TOOL_WELDER)
// eigen check
if(eigen_teleport)
to_chat(user, "<span class='notice'>The unstable nature of \the [src] makes it impossible to deconstruct!</span>")
return
if(W.tool_behaviour == cutting_tool)
// eigen check
if(eigen_teleport)
to_chat(user, "<span class='notice'>The unstable nature of \the [src] makes it impossible to deconstruct!</span>")
return
if(W.tool_behaviour == TOOL_WELDER)
if(!W.tool_start_check(user, amount=0))
return
to_chat(user, "<span class='notice'>You begin cutting \the [src] apart...</span>")
if(W.use_tool(src, user, 40, volume=50))
if(!opened)
@@ -294,13 +293,27 @@
"<span class='hear'>You hear welding.</span>")
deconstruct(TRUE)
return
else // for example cardboard box is cut with wirecutters
else if(W.tool_behaviour == TOOL_WIRECUTTER)
W.use_tool(src, user, 40, volume=50)
user.visible_message("<span class='notice'>[user] cut apart \the [src].</span>", \
"<span class='notice'>You cut \the [src] apart with \the [W].</span>")
deconstruct(TRUE)
return
W.use_tool(src, user, 40, volume=50)
user.visible_message("<span class='notice'>[user] deconstructed \the [src].</span>", \
"<span class='notice'>You deconstructed \the [src] with \the [W].</span>")
deconstruct(TRUE) //Honestly by this point, if all checks were right and this is the cutting tool, just cut it
return
if(user.transferItemToLoc(W, drop_location())) // so we put in unlit welder too
return
else if(!opened && user.a_intent == INTENT_HELP && !W.tool_behaviour)
var/item_is_id = W.GetID()
if(!item_is_id)
open(user)
return
if(item_is_id || !toggle(user))
togglelock(user)
return
else if(W.tool_behaviour == TOOL_WELDER && can_weld_shut)
// eigen check
if(eigen_teleport)
@@ -328,12 +341,6 @@
user.visible_message("<span class='notice'>[user] [anchored ? "anchored" : "unanchored"] \the [src] [anchored ? "to" : "from"] the ground.</span>", \
"<span class='notice'>You [anchored ? "anchored" : "unanchored"] \the [src] [anchored ? "to" : "from"] the ground.</span>", \
"<span class='hear'>You hear a ratchet.</span>")
else if(user.a_intent != INTENT_HARM && !(W.item_flags & NOBLUDGEON))
var/item_is_id = W.GetID()
if(!item_is_id)
return FALSE
if(item_is_id || !toggle(user))
togglelock(user)
// cit addons
else if(istype(W, /obj/item/electronics/airlock))
handle_lock_addition(user, W)

View File

@@ -25,9 +25,15 @@
/obj/item/modular_computer/laptop/examine(mob/user)
. = ..()
. += "<span class='notice'>Drag it in your hand to pick it up.</span>"
if(screen_on)
. += "<span class='notice'>Alt-click to close it.</span>"
. += "<span class='notice'>Drag it in your hand or on yourself to pick it up.</span>"
. += "<span class='notice'>Ctrl+Shift-click to [screen_on ? "close" : "open"] it.</span>"
var/obj/item/computer_hardware/card_slot/card_slot = all_components[MC_CARD]
var/obj/item/computer_hardware/card_slot/card_slot2 = all_components[MC_CARD2]
if(card_slot || card_slot2)
if(card_slot.stored_card)
. += "<span class='notice'>\The [src] has \a [card_slot] with an id inside, Alt-click to remove the id.</span>"
if(card_slot2.stored_card)
. += "<span class='notice'>\The [src] has \a [card_slot2] with an id inside, Alt-click to remove the id.</span>"
/obj/item/modular_computer/laptop/Initialize()
. = ..()
@@ -62,14 +68,14 @@
try_toggle_open(usr)
/obj/item/modular_computer/laptop/MouseDrop(obj/over_object, src_location, over_location)
. = ..()
if(over_object == usr || over_object == src)
try_toggle_open(usr)
return
if(istype(over_object, /obj/screen/inventory/hand))
if(istype(over_object, /obj/screen/inventory/hand) || over_object == usr)
var/obj/screen/inventory/hand/H = over_object
var/mob/M = usr
if(!istype(over_object, /obj/screen/inventory/hand))
M.put_in_active_hand(src)
return
if(M.stat != CONSCIOUS || M.restrained())
return
if(!isturf(loc) || !Adjacent(M))
@@ -77,11 +83,9 @@
M.put_in_hand(src, H.held_index)
/obj/item/modular_computer/laptop/on_attack_hand(mob/user)
. = ..()
if(!.)
return
if(screen_on && isturf(loc))
return attack_self(user)
..()
/obj/item/modular_computer/laptop/proc/try_toggle_open(mob/living/user)
if(issilicon(user))
@@ -94,11 +98,8 @@
toggle_open(user)
/obj/item/modular_computer/laptop/AltClick(mob/user)
if(screen_on) // Close it.
try_toggle_open(user)
else
return ..()
/obj/item/modular_computer/laptop/CtrlShiftClick(mob/user)
try_toggle_open(user)
/obj/item/modular_computer/laptop/proc/toggle_open(mob/living/user=null)
if(screen_on)