mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-14 08:34:16 +01:00
Merge remote-tracking branch 'ParadiseSS13/master' into depot_loot_fix
This commit is contained in:
@@ -14,16 +14,16 @@
|
||||
if(buckled_mobs.len > 1)
|
||||
var/unbuckled = input(user, "Who do you wish to unbuckle?", "Unbuckle Who?") as null|mob in buckled_mobs
|
||||
if(user_unbuckle_mob(unbuckled,user))
|
||||
return 1
|
||||
return TRUE
|
||||
else
|
||||
if(user_unbuckle_mob(buckled_mobs[1], user))
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/atom/movable/MouseDrop_T(mob/living/M, mob/living/user)
|
||||
. = ..()
|
||||
if(can_buckle && istype(M) && istype(user))
|
||||
if(user_buckle_mob(M, user))
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/atom/movable/proc/has_buckled_mobs()
|
||||
if(!buckled_mobs)
|
||||
@@ -31,6 +31,18 @@
|
||||
if(buckled_mobs.len)
|
||||
return TRUE
|
||||
|
||||
/atom/movable/attack_robot(mob/living/user)
|
||||
. = ..()
|
||||
if(can_buckle && has_buckled_mobs() && Adjacent(user)) // attack_robot is called on all ranges, so the Adjacent check is needed
|
||||
if(buckled_mobs.len > 1)
|
||||
var/unbuckled = input(user, "Who do you wish to unbuckle?", "Unbuckle Who?") as null|mob in buckled_mobs
|
||||
if(user_unbuckle_mob(unbuckled,user))
|
||||
return TRUE
|
||||
else
|
||||
if(user_unbuckle_mob(buckled_mobs[1], user))
|
||||
return TRUE
|
||||
|
||||
|
||||
//procs that handle the actual buckling and unbuckling
|
||||
/atom/movable/proc/buckle_mob(mob/living/M, force = FALSE, check_loc = TRUE)
|
||||
if(!buckled_mobs)
|
||||
|
||||
@@ -85,17 +85,16 @@
|
||||
poster_item_icon_state = initial(selected.poster_item_icon_state)
|
||||
ruined = initial(selected.ruined)
|
||||
|
||||
/obj/structure/sign/poster/attackby(obj/item/I, mob/user, params)
|
||||
if(iswirecutter(I))
|
||||
playsound(loc, I.usesound, 100, 1)
|
||||
if(ruined)
|
||||
to_chat(user, "<span class='notice'>You remove the remnants of the poster.</span>")
|
||||
qdel(src)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You carefully remove the poster from the wall.</span>")
|
||||
roll_and_drop(user.loc)
|
||||
/obj/structure/sign/poster/wirecutter_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
return
|
||||
return ..()
|
||||
if(ruined)
|
||||
to_chat(user, "<span class='notice'>You remove the remnants of the poster.</span>")
|
||||
qdel(src)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You carefully remove the poster from the wall.</span>")
|
||||
roll_and_drop(user.loc)
|
||||
|
||||
/obj/structure/sign/poster/attack_hand(mob/user)
|
||||
if(ruined)
|
||||
|
||||
@@ -1181,7 +1181,7 @@ steam.start() -- spawns the effect
|
||||
|
||||
// Clamp all values to MAX_EXPLOSION_RANGE
|
||||
if(round(amount/12) > 0)
|
||||
devastation = min (MAX_EX_DEVESTATION_RANGE, devastation + round(amount/12))
|
||||
devastation = min (MAX_EX_DEVASTATION_RANGE, devastation + round(amount/12))
|
||||
|
||||
if(round(amount/6) > 0)
|
||||
heavy = min (MAX_EX_HEAVY_RANGE, heavy + round(amount/6))
|
||||
|
||||
@@ -172,7 +172,7 @@
|
||||
|
||||
// Clamp all values to MAX_EXPLOSION_RANGE
|
||||
if(round(amount/12) > 0)
|
||||
devastation = min (MAX_EX_DEVESTATION_RANGE, devastation + round(amount/12))
|
||||
devastation = min (MAX_EX_DEVASTATION_RANGE, devastation + round(amount/12))
|
||||
|
||||
if(round(amount/6) > 0)
|
||||
heavy = min (MAX_EX_HEAVY_RANGE, heavy + round(amount/6))
|
||||
|
||||
@@ -70,12 +70,14 @@
|
||||
if(target)
|
||||
O.forceMove(target)
|
||||
|
||||
/obj/effect/portal/attackby(obj/item/A, mob/user)
|
||||
if(ismultitool(A) && can_multitool_to_remove)
|
||||
/obj/effect/portal/multitool_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
return
|
||||
if(can_multitool_to_remove)
|
||||
qdel(src)
|
||||
else if(user && Adjacent(user))
|
||||
else
|
||||
user.forceMove(get_turf(src))
|
||||
return TRUE
|
||||
|
||||
/obj/effect/portal/proc/can_teleport(atom/movable/M)
|
||||
. = TRUE
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
if(!ignorecap)
|
||||
// Clamp all values to MAX_EXPLOSION_RANGE
|
||||
devastation_range = min (MAX_EX_DEVESTATION_RANGE, devastation_range)
|
||||
devastation_range = min (MAX_EX_DEVASTATION_RANGE, devastation_range)
|
||||
heavy_impact_range = min (MAX_EX_HEAVY_RANGE, heavy_impact_range)
|
||||
light_impact_range = min (MAX_EX_LIGHT_RANGE, light_impact_range)
|
||||
flash_range = min (MAX_EX_FLASH_RANGE, flash_range)
|
||||
|
||||
@@ -83,6 +83,9 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d
|
||||
var/embedded_unsafe_removal_time = EMBEDDED_UNSAFE_REMOVAL_TIME //A time in ticks, multiplied by the w_class.
|
||||
var/embedded_ignore_throwspeed_threshold = FALSE
|
||||
|
||||
var/tool_behaviour = NONE //What kind of tool are we?
|
||||
var/tool_enabled = TRUE //If we can turn on or off, are we currently active? Mostly for welders and this will normally be TRUE
|
||||
var/tool_volume = 50 //How loud are we when we use our tool?
|
||||
var/toolspeed = 1 // If this item is a tool, the speed multiplier
|
||||
|
||||
/* Species-specific sprites, concept stolen from Paradise//vg/.
|
||||
@@ -351,6 +354,16 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d
|
||||
return 1
|
||||
return 0
|
||||
|
||||
// Generic use proc. Depending on the item, it uses up fuel, charges, sheets, etc.
|
||||
// Returns TRUE on success, FALSE on failure.
|
||||
/obj/item/proc/use(used)
|
||||
return !used
|
||||
|
||||
//Generic refill proc. Transfers something (e.g. fuel, charge) from an atom to our tool. returns TRUE if it was successful, FALSE otherwise
|
||||
//Not sure if there should be an argument that indicates what exactly is being refilled
|
||||
/obj/item/proc/refill(mob/user, atom/A, amount)
|
||||
return FALSE
|
||||
|
||||
/obj/item/proc/talk_into(mob/M, var/text, var/channel=null)
|
||||
return
|
||||
|
||||
|
||||
@@ -32,28 +32,15 @@
|
||||
|
||||
|
||||
/obj/item/candle/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if(WT.isOn()) //Badasses dont get blinded by lighting their candle with a welding tool
|
||||
light("<span class='notice'>[user] casually lights [src] with [WT], what a badass.")
|
||||
return
|
||||
if(istype(W, /obj/item/lighter))
|
||||
var/obj/item/lighter/L = W
|
||||
if(L.lit)
|
||||
light("<span class='notice'>After some fiddling, [user] manages to light [src] with [L].</span>")
|
||||
return
|
||||
if(istype(W, /obj/item/match))
|
||||
var/obj/item/match/M = W
|
||||
if(M.lit)
|
||||
light("<span class='notice'>[user] lights [src] with [M]</span>")
|
||||
return
|
||||
if(istype(W, /obj/item/candle))
|
||||
var/obj/item/candle/C = W
|
||||
if(C.lit)
|
||||
light("<span class='notice'>[user] tilts [C] and lights [src] with it.</span>")
|
||||
if(is_hot(W))
|
||||
light("<span class='notice'>[user] lights [src] with [W].</span>")
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/candle/welder_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(I.tool_use_check(user, 0)) //Don't need to flash eyes because you are a badass
|
||||
light("<span class='notice'>[user] casually lights the [name] with [I], what a badass.</span>")
|
||||
|
||||
/obj/item/candle/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE)
|
||||
if(!lit)
|
||||
|
||||
@@ -326,6 +326,7 @@
|
||||
on = TRUE //Bio-luminesence has one setting, on.
|
||||
|
||||
/obj/item/flashlight/slime/New()
|
||||
..()
|
||||
set_light(brightness_on)
|
||||
spawn(1) //Might be sloppy, but seems to be necessary to prevent further runtimes and make these work as intended... don't judge me!
|
||||
update_brightness()
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
reqs = list(/obj/item/stack/sheet/wood = 5,
|
||||
/obj/item/stack/cable_coil = 6,
|
||||
/obj/item/stack/tape_roll = 5)
|
||||
tools = list(/obj/item/screwdriver, /obj/item/wirecutters)
|
||||
tools = list(TOOL_SCREWDRIVER, TOOL_WIRECUTTER)
|
||||
time = 80
|
||||
category = CAT_MISC
|
||||
|
||||
@@ -177,7 +177,7 @@
|
||||
reqs = list(/obj/item/stack/sheet/wood = 5,
|
||||
/obj/item/stack/cable_coil = 6,
|
||||
/obj/item/stack/tape_roll = 5)
|
||||
tools = list(/obj/item/screwdriver, /obj/item/wirecutters)
|
||||
tools = list(TOOL_SCREWDRIVER, TOOL_WIRECUTTER)
|
||||
time = 80
|
||||
category = CAT_MISC
|
||||
|
||||
@@ -187,6 +187,6 @@
|
||||
reqs = list(/obj/item/stack/sheet/metal = 5,
|
||||
/obj/item/stack/cable_coil = 6,
|
||||
/obj/item/stack/tape_roll = 5)
|
||||
tools = list(/obj/item/screwdriver, /obj/item/wirecutters)
|
||||
tools = list(TOOL_SCREWDRIVER, TOOL_WIRECUTTER)
|
||||
time = 80
|
||||
category = CAT_MISC
|
||||
@@ -63,27 +63,27 @@
|
||||
update_icon()
|
||||
set_light(0)
|
||||
|
||||
/obj/item/powersink/attackby(obj/item/I, mob/user)
|
||||
if(isscrewdriver(I))
|
||||
if(mode == DISCONNECTED)
|
||||
var/turf/T = loc
|
||||
if(isturf(T) && !T.intact)
|
||||
attached = locate() in T
|
||||
if(!attached)
|
||||
to_chat(user, "No exposed cable here to attach to.")
|
||||
return
|
||||
else
|
||||
set_mode(CLAMPED_OFF)
|
||||
visible_message("<span class='notice'>[user] attaches [src] to the cable!</span>")
|
||||
message_admins("Power sink activated by [key_name_admin(user)] at ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)")
|
||||
log_game("Power sink activated by [key_name(user)] at ([x],[y],[z])")
|
||||
/obj/item/powersink/screwdriver_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
return
|
||||
if(mode == DISCONNECTED)
|
||||
var/turf/T = loc
|
||||
if(isturf(T) && !T.intact)
|
||||
attached = locate() in T
|
||||
if(!attached)
|
||||
to_chat(user, "No exposed cable here to attach to.")
|
||||
return
|
||||
else
|
||||
to_chat(user, "Device must be placed over an exposed cable to attach to it.")
|
||||
set_mode(CLAMPED_OFF)
|
||||
visible_message("<span class='notice'>[user] attaches [src] to the cable!</span>")
|
||||
message_admins("Power sink activated by [key_name_admin(user)] at ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)")
|
||||
log_game("Power sink activated by [key_name(user)] at ([x],[y],[z])")
|
||||
else
|
||||
set_mode(DISCONNECTED)
|
||||
src.visible_message("<span class='notice'>[user] detaches [src] from the cable!</span>")
|
||||
to_chat(user, "Device must be placed over an exposed cable to attach to it.")
|
||||
else
|
||||
return ..()
|
||||
set_mode(DISCONNECTED)
|
||||
src.visible_message("<span class='notice'>[user] detaches [src] from the cable!</span>")
|
||||
|
||||
/obj/item/powersink/attack_ai()
|
||||
return
|
||||
|
||||
@@ -311,34 +311,8 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/radio/headset/attackby(obj/item/W as obj, mob/user as mob)
|
||||
user.set_machine(src)
|
||||
if(!( istype(W, /obj/item/screwdriver) || (istype(W, /obj/item/encryptionkey/ ))))
|
||||
return ..()
|
||||
|
||||
if(istype(W, /obj/item/screwdriver))
|
||||
if(keyslot1 || keyslot2)
|
||||
|
||||
for(var/ch_name in channels)
|
||||
SSradio.remove_object(src, SSradio.radiochannels[ch_name])
|
||||
secure_radio_connections[ch_name] = null
|
||||
|
||||
if(keyslot1)
|
||||
var/turf/T = get_turf(user)
|
||||
if(T)
|
||||
keyslot1.loc = T
|
||||
keyslot1 = null
|
||||
if(keyslot2)
|
||||
var/turf/T = get_turf(user)
|
||||
if(T)
|
||||
keyslot2.loc = T
|
||||
keyslot2 = null
|
||||
|
||||
recalculateChannels()
|
||||
to_chat(user, "You pop out the encryption keys in the headset!")
|
||||
else
|
||||
to_chat(user, "This headset doesn't have any encryption keys! How useless...")
|
||||
|
||||
if(istype(W, /obj/item/encryptionkey/))
|
||||
user.set_machine(src)
|
||||
if(keyslot1 && keyslot2)
|
||||
to_chat(user, "The headset can't hold another key!")
|
||||
return
|
||||
@@ -351,10 +325,37 @@
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
keyslot2 = W
|
||||
recalculateChannels()
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/radio/headset/screwdriver_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, 0, volume = 0))
|
||||
return
|
||||
user.set_machine(src)
|
||||
if(keyslot1 || keyslot2)
|
||||
|
||||
for(var/ch_name in channels)
|
||||
SSradio.remove_object(src, SSradio.radiochannels[ch_name])
|
||||
secure_radio_connections[ch_name] = null
|
||||
|
||||
if(keyslot1)
|
||||
var/turf/T = get_turf(user)
|
||||
if(T)
|
||||
keyslot1.loc = T
|
||||
keyslot1 = null
|
||||
if(keyslot2)
|
||||
var/turf/T = get_turf(user)
|
||||
if(T)
|
||||
keyslot2.loc = T
|
||||
keyslot2 = null
|
||||
|
||||
recalculateChannels()
|
||||
return
|
||||
|
||||
to_chat(user, "You pop out the encryption keys in the headset!")
|
||||
I.play_tool_sound(user, I.tool_volume)
|
||||
else
|
||||
to_chat(user, "This headset doesn't have any encryption keys! How useless...")
|
||||
|
||||
/obj/item/radio/headset/proc/recalculateChannels(var/setDescription = FALSE)
|
||||
channels = list()
|
||||
|
||||
@@ -138,76 +138,82 @@
|
||||
/obj/item/radio/intercom/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/stack/tape_roll)) //eww
|
||||
return
|
||||
switch(buildstage)
|
||||
if(3)
|
||||
if(iswirecutter(W) && b_stat && wires.IsAllCut())
|
||||
to_chat(user, "<span class='notice'>You cut out the intercoms wiring and disconnect its electronics.</span>")
|
||||
playsound(get_turf(src), W.usesound, 50, 1)
|
||||
if(do_after(user, 10 * W.toolspeed, target = src))
|
||||
if(buildstage != 3)
|
||||
return
|
||||
new /obj/item/stack/cable_coil(get_turf(src),5)
|
||||
on = 0
|
||||
b_stat = 1
|
||||
buildstage = 1
|
||||
update_icon()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return 1
|
||||
else return ..()
|
||||
if(2)
|
||||
if(isscrewdriver(W))
|
||||
playsound(get_turf(src), W.usesound, 50, 1)
|
||||
if(do_after(user, 10 * W.toolspeed, target = src))
|
||||
update_icon()
|
||||
on = 1
|
||||
b_stat = 0
|
||||
buildstage = 3
|
||||
to_chat(user, "<span class='notice'>You secure the electronics!</span>")
|
||||
update_icon()
|
||||
START_PROCESSING(SSobj, src)
|
||||
for(var/i, i<= 5, i++)
|
||||
wires.UpdateCut(i,1)
|
||||
return 1
|
||||
if(1)
|
||||
if(iscoil(W))
|
||||
var/obj/item/stack/cable_coil/coil = W
|
||||
if(coil.amount < 5)
|
||||
to_chat(user, "<span class='warning'>You need more cable for this!</span>")
|
||||
return
|
||||
if(do_after(user, 10 * coil.toolspeed, target = src))
|
||||
coil.use(5)
|
||||
to_chat(user, "<span class='notice'>You wire \the [src]!</span>")
|
||||
buildstage = 2
|
||||
return 1
|
||||
if(iscrowbar(W))
|
||||
to_chat(user, "<span class='notice'>You begin removing the electronics...</span>")
|
||||
playsound(get_turf(src), W.usesound, 50, 1)
|
||||
if(do_after(user, 10 * W.toolspeed, target = src))
|
||||
if(buildstage != 1)
|
||||
return
|
||||
new /obj/item/intercom_electronics(get_turf(src))
|
||||
to_chat(user, "<span class='notice'>The circuitboard pops out!</span>")
|
||||
buildstage = 0
|
||||
return 1
|
||||
if(0)
|
||||
if(istype(W,/obj/item/intercom_electronics))
|
||||
playsound(get_turf(src), W.usesound, 50, 1)
|
||||
if(do_after(user, 10 * W.toolspeed, target = src))
|
||||
qdel(W)
|
||||
to_chat(user, "<span class='notice'>You insert \the [W] into \the [src]!</span>")
|
||||
buildstage = 1
|
||||
return 1
|
||||
if(iswelder(W))
|
||||
var/obj/item/weldingtool/WT=W
|
||||
playsound(get_turf(src), WT.usesound, 50, 1)
|
||||
if(!WT.remove_fuel(3, user))
|
||||
to_chat(user, "<span class='warning'>You're out of welding fuel.</span>")
|
||||
return 1
|
||||
if(do_after(user, 10 * WT.toolspeed, target = src))
|
||||
to_chat(user, "<span class='notice'>You cut the intercom frame from the wall!</span>")
|
||||
new /obj/item/mounted/frame/intercom(get_turf(src))
|
||||
qdel(src)
|
||||
return 1
|
||||
else if(iscoil(W) && buildstage == 1)
|
||||
var/obj/item/stack/cable_coil/coil = W
|
||||
if(coil.amount < 5)
|
||||
to_chat(user, "<span class='warning'>You need more cable for this!</span>")
|
||||
return
|
||||
if(do_after(user, 10 * coil.toolspeed, target = src) && buildstage == 1)
|
||||
coil.use(5)
|
||||
to_chat(user, "<span class='notice'>You wire \the [src]!</span>")
|
||||
buildstage = 2
|
||||
return 1
|
||||
else if(istype(W,/obj/item/intercom_electronics) && buildstage == 0)
|
||||
playsound(get_turf(src), W.usesound, 50, 1)
|
||||
if(do_after(user, 10 * W.toolspeed, target = src) && buildstage == 0)
|
||||
qdel(W)
|
||||
to_chat(user, "<span class='notice'>You insert \the [W] into \the [src]!</span>")
|
||||
buildstage = 1
|
||||
return 1
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/radio/intercom/crowbar_act(mob/user, obj/item/I)
|
||||
if(buildstage != 1)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You begin removing the electronics...</span>")
|
||||
if(!I.use_tool(src, user, 10, volume = I.tool_volume) || buildstage != 1)
|
||||
return
|
||||
new /obj/item/intercom_electronics(get_turf(src))
|
||||
to_chat(user, "<span class='notice'>The circuit board pops out!</span>")
|
||||
buildstage = 0
|
||||
|
||||
/obj/item/radio/intercom/screwdriver_act(mob/user, obj/item/I)
|
||||
if(buildstage != 2)
|
||||
return ..()
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
if(!I.use_tool(src, user, 10, volume = I.tool_volume) || buildstage != 2)
|
||||
return
|
||||
update_icon()
|
||||
on = 1
|
||||
b_stat = 0
|
||||
buildstage = 3
|
||||
to_chat(user, "<span class='notice'>You secure the electronics!</span>")
|
||||
update_icon()
|
||||
START_PROCESSING(SSobj, src)
|
||||
for(var/i, i<= 5, i++)
|
||||
wires.UpdateCut(i,1)
|
||||
|
||||
/obj/item/radio/intercom/wirecutter_act(mob/user, obj/item/I)
|
||||
if(!(buildstage == 3 && b_stat && wires.IsAllCut()))
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
return
|
||||
WIRECUTTER_SNIP_MESSAGE
|
||||
new /obj/item/stack/cable_coil(get_turf(src),5)
|
||||
on = 0
|
||||
b_stat = 1
|
||||
buildstage = 1
|
||||
update_icon()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/radio/intercom/welder_act(mob/user, obj/item/I)
|
||||
if(!buildstage)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 3))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start slicing [src] from the wall...</span>")
|
||||
if(I.use_tool(src, user, 10, amount = 3, volume = I.tool_volume))
|
||||
to_chat(user, "<span class='notice'>You cut [src] free from the wall!</span>")
|
||||
new /obj/item/mounted/frame/intercom(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/item/radio/intercom/update_icon()
|
||||
if(!circuitry_installed)
|
||||
|
||||
@@ -603,22 +603,30 @@ var/global/list/default_medbay_channels = list(
|
||||
else
|
||||
. += "<span class='notice'>\the [src] can not be modified or attached!</span>"
|
||||
|
||||
/obj/item/radio/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
..()
|
||||
user.set_machine(src)
|
||||
if(!( istype(W, /obj/item/screwdriver) ))
|
||||
/obj/item/radio/screwdriver_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
return
|
||||
b_stat = !( b_stat )
|
||||
user.set_machine(src)
|
||||
b_stat = !b_stat
|
||||
if(!istype(src, /obj/item/radio/beacon))
|
||||
if(b_stat)
|
||||
user.show_message("<span class='notice'>The radio can now be attached and modified!</span>")
|
||||
else
|
||||
user.show_message("<span class='notice'>The radio can no longer be modified or attached!</span>")
|
||||
updateDialog()
|
||||
//Foreach goto(83)
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/radio/wirecutter_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
return
|
||||
else return
|
||||
interact(user)
|
||||
|
||||
/obj/item/radio/multitool_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
return
|
||||
interact(user)
|
||||
|
||||
/obj/item/radio/emp_act(severity)
|
||||
on = 0
|
||||
@@ -689,33 +697,8 @@ var/global/list/default_medbay_channels = list(
|
||||
set_frequency(ERT_FREQ)
|
||||
|
||||
/obj/item/radio/borg/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
// ..()
|
||||
user.set_machine(src)
|
||||
if(!( istype(W, /obj/item/screwdriver) || (istype(W, /obj/item/encryptionkey/ ))))
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/screwdriver))
|
||||
if(keyslot)
|
||||
|
||||
|
||||
for(var/ch_name in channels)
|
||||
SSradio.remove_object(src, SSradio.radiochannels[ch_name])
|
||||
secure_radio_connections[ch_name] = null
|
||||
|
||||
|
||||
if(keyslot)
|
||||
var/turf/T = get_turf(user)
|
||||
if(T)
|
||||
keyslot.loc = T
|
||||
keyslot = null
|
||||
|
||||
recalculateChannels()
|
||||
to_chat(user, "You pop out the encryption key in the radio!")
|
||||
|
||||
else
|
||||
to_chat(user, "This radio doesn't have any encryption keys!")
|
||||
|
||||
if(istype(W, /obj/item/encryptionkey/))
|
||||
user.set_machine(src)
|
||||
if(keyslot)
|
||||
to_chat(user, "The radio can't hold another key!")
|
||||
return
|
||||
@@ -726,8 +709,32 @@ var/global/list/default_medbay_channels = list(
|
||||
keyslot = W
|
||||
|
||||
recalculateChannels()
|
||||
else
|
||||
return ..()
|
||||
|
||||
return
|
||||
/obj/item/radio/borg/screwdriver_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, 0, volume = 0))
|
||||
return
|
||||
user.set_machine(src)
|
||||
if(keyslot)
|
||||
for(var/ch_name in channels)
|
||||
SSradio.remove_object(src, SSradio.radiochannels[ch_name])
|
||||
secure_radio_connections[ch_name] = null
|
||||
|
||||
|
||||
if(keyslot)
|
||||
var/turf/T = get_turf(user)
|
||||
if(T)
|
||||
keyslot.loc = T
|
||||
keyslot = null
|
||||
|
||||
recalculateChannels()
|
||||
to_chat(user, "You pop out the encryption key in the radio!")
|
||||
I.play_tool_sound(user, I.tool_volume)
|
||||
|
||||
else
|
||||
to_chat(user, "This radio doesn't have any encryption keys!")
|
||||
|
||||
/obj/item/radio/borg/proc/recalculateChannels()
|
||||
channels = list()
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
var/datum/nano_module/crew_monitor/crew_monitor
|
||||
|
||||
/obj/item/sensor_device/New()
|
||||
..()
|
||||
crew_monitor = new(src)
|
||||
|
||||
/obj/item/sensor_device/Destroy()
|
||||
|
||||
@@ -15,11 +15,14 @@
|
||||
var/obj/item/tape/mytape
|
||||
var/open_panel = 0
|
||||
var/canprint = 1
|
||||
var/starts_with_tape = TRUE
|
||||
|
||||
|
||||
/obj/item/taperecorder/New()
|
||||
mytape = new /obj/item/tape/random(src)
|
||||
update_icon()
|
||||
..()
|
||||
if(starts_with_tape)
|
||||
mytape = new /obj/item/tape/random(src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/taperecorder/Destroy()
|
||||
QDEL_NULL(mytape)
|
||||
@@ -243,8 +246,8 @@
|
||||
canprint = 1
|
||||
|
||||
//empty tape recorders
|
||||
/obj/item/taperecorder/empty/New()
|
||||
return
|
||||
/obj/item/taperecorder/empty
|
||||
starts_with_tape = FALSE
|
||||
|
||||
|
||||
/obj/item/tape
|
||||
@@ -317,4 +320,5 @@
|
||||
|
||||
//Random colour tapes
|
||||
/obj/item/tape/random/New()
|
||||
..()
|
||||
icon_state = "tape_[pick("white", "blue", "red", "yellow", "purple")]"
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
var/datum/effect_system/spark_spread/spark_system
|
||||
|
||||
/obj/item/thermal_drill/New()
|
||||
..()
|
||||
soundloop = new(list(src), FALSE)
|
||||
spark_system = new /datum/effect_system/spark_spread()
|
||||
spark_system.set_up(1, 0, src)
|
||||
|
||||
@@ -316,6 +316,7 @@ var/list/world_uplinks = list()
|
||||
// implant uplink (not the implant tool) and a preset headset uplink.
|
||||
|
||||
/obj/item/radio/uplink/New()
|
||||
..()
|
||||
hidden_uplink = new(src)
|
||||
icon_state = "radio"
|
||||
|
||||
@@ -339,6 +340,7 @@ var/list/world_uplinks = list()
|
||||
hidden_uplink.uplink_type = "sst"
|
||||
|
||||
/obj/item/multitool/uplink/New()
|
||||
..()
|
||||
hidden_uplink = new(src)
|
||||
|
||||
/obj/item/multitool/uplink/attack_self(mob/user as mob)
|
||||
|
||||
@@ -245,22 +245,25 @@
|
||||
message_admins("[key_name_admin(user)] has hidden [I] in the [src] ready for detonation at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>.")
|
||||
log_game("[key_name(user)] has hidden [I] in the [src] ready for detonation at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]).")
|
||||
investigate_log("[key_name(user)] has hidden [I] in the [src] ready for detonation at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]).", INVESTIGATE_BOMB)
|
||||
else if(isscrewdriver(I) && boobytrap && user == trapper)
|
||||
to_chat(user, "<span class='notice'>You remove [boobytrap] from the [src].</span>")
|
||||
boobytrap.forceMove(get_turf(src))
|
||||
boobytrap = null
|
||||
trapper = null
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/flag/chameleon/attackby(obj/item/W, mob/user, params)
|
||||
if(is_hot(W) && !(resistance_flags & ON_FIRE) && boobytrap && trapper)
|
||||
else if(is_hot(I) && !(resistance_flags & ON_FIRE) && boobytrap && trapper)
|
||||
var/turf/bombturf = get_turf(src)
|
||||
var/area/A = get_area(bombturf)
|
||||
message_admins("[key_name_admin(user)] has lit the [src] trapped with [boobytrap] by [key_name_admin(trapper)] at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>.")
|
||||
log_game("[key_name_admin(user)] has lit the [src] trapped with [boobytrap] by [key_name_admin(trapper)] at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]).")
|
||||
investigate_log("[key_name_admin(user)] has lit the [src] trapped with [boobytrap] by [key_name_admin(trapper)] at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]).", INVESTIGATE_BOMB)
|
||||
return ..()
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/flag/chameleon/screwdriver_act(mob/user, obj/item/I)
|
||||
if(!boobytrap || user != trapper)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You remove [boobytrap] from [src].</span>")
|
||||
boobytrap.forceMove(get_turf(src))
|
||||
boobytrap = null
|
||||
trapper = null
|
||||
|
||||
/obj/item/flag/chameleon/burn()
|
||||
if(boobytrap)
|
||||
|
||||
@@ -31,15 +31,12 @@
|
||||
// the stake now, we have to push the target.
|
||||
|
||||
|
||||
|
||||
/obj/item/target/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0, user))
|
||||
overlays.Cut()
|
||||
to_chat(usr, "You slice off [src]'s uneven chunks of aluminum and scorch marks.")
|
||||
return
|
||||
|
||||
/obj/item/target/welder_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!use_tool(src, user, 0,, volume = I.tool_volume))
|
||||
return
|
||||
overlays.Cut()
|
||||
to_chat(usr, "You slice off [src]'s uneven chunks of aluminum and scorch marks.")
|
||||
|
||||
/obj/item/target/attack_hand(mob/user as mob)
|
||||
// taking pinned targets off!
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
var/heal_brute = 0
|
||||
var/heal_burn = 0
|
||||
var/self_delay = 20
|
||||
var/unique_handling = 0 //some things give a special prompt, do we want to bypass some checks in parent?
|
||||
var/unique_handling = FALSE //some things give a special prompt, do we want to bypass some checks in parent?
|
||||
var/stop_bleeding = 0
|
||||
var/healverb = "bandage"
|
||||
|
||||
@@ -31,28 +31,20 @@
|
||||
var/obj/item/organ/external/affecting = H.get_organ(user.zone_selected)
|
||||
|
||||
if(!H.can_inject(user, TRUE))
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
if(!affecting)
|
||||
to_chat(user, "<span class='danger'>That limb is missing!</span>")
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
if(affecting.is_robotic())
|
||||
to_chat(user, "<span class='danger'>This can't be used on a robotic limb.</span>")
|
||||
return 1
|
||||
|
||||
if(stop_bleeding)
|
||||
if(H.bleedsuppress)
|
||||
to_chat(user, "<span class='warning'>[H]'s bleeding is already bandaged!</span>")
|
||||
return 1
|
||||
else if(!H.bleed_rate)
|
||||
to_chat(user, "<span class='warning'>[H] isn't bleeding!</span>")
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
if(M == user && !unique_handling)
|
||||
user.visible_message("<span class='notice'>[user] starts to apply [src] on [H]...</span>")
|
||||
if(!do_mob(user, H, self_delay))
|
||||
return 1
|
||||
return TRUE
|
||||
return
|
||||
|
||||
if(isanimal(M))
|
||||
@@ -123,6 +115,7 @@
|
||||
desc = "Some sterile gauze to wrap around bloody stumps."
|
||||
icon_state = "gauze"
|
||||
origin_tech = "biotech=2"
|
||||
heal_brute = 10
|
||||
stop_bleeding = 1800
|
||||
|
||||
/obj/item/stack/medical/bruise_pack/attackby(obj/item/I, mob/user, params)
|
||||
@@ -140,13 +133,13 @@
|
||||
|
||||
/obj/item/stack/medical/bruise_pack/attack(mob/living/M, mob/user)
|
||||
if(..())
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/external/affecting = H.get_organ(user.zone_selected)
|
||||
|
||||
if(affecting.open == 0)
|
||||
if(affecting.open == FALSE)
|
||||
affecting.germ_level = 0
|
||||
|
||||
if(stop_bleeding)
|
||||
@@ -187,6 +180,7 @@
|
||||
icon_state = "ointment"
|
||||
origin_tech = "biotech=2"
|
||||
healverb = "salve"
|
||||
heal_burn = 10
|
||||
|
||||
/obj/item/stack/medical/ointment/attack(mob/living/M, mob/user)
|
||||
if(..())
|
||||
@@ -196,7 +190,7 @@
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/external/affecting = H.get_organ(user.zone_selected)
|
||||
|
||||
if(affecting.open == 0)
|
||||
if(affecting.open == FALSE)
|
||||
affecting.germ_level = 0
|
||||
|
||||
heal(H, user)
|
||||
|
||||
@@ -46,29 +46,23 @@ var/global/list/datum/stack_recipe/rod_recipes = list ( \
|
||||
else
|
||||
icon_state = "rods"
|
||||
|
||||
/obj/item/stack/rods/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/WT = W
|
||||
|
||||
if(get_amount() < 2)
|
||||
to_chat(user, "<span class='warning'>You need at least two rods to do this!</span>")
|
||||
return
|
||||
|
||||
if(WT.remove_fuel(0,user))
|
||||
var/obj/item/stack/sheet/metal/new_item = new(user.loc)
|
||||
if(new_item.get_amount() <= 0)
|
||||
// stack was moved into another one on the pile
|
||||
new_item = locate() in user.loc
|
||||
|
||||
user.visible_message("[user.name] shape [src] into metal with the welding tool.", \
|
||||
"<span class='notice'>You shape [src] into metal with the welding tool.</span>", \
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
|
||||
var/replace = user.is_in_inactive_hand(src)
|
||||
use(2)
|
||||
if(get_amount() <= 0 && replace)
|
||||
user.unEquip(src, 1)
|
||||
if(new_item)
|
||||
user.put_in_hands(new_item)
|
||||
/obj/item/stack/rods/welder_act(mob/user, obj/item/I)
|
||||
if(get_amount() < 2)
|
||||
to_chat(user, "<span class='warning'>You need at least two rods to do this!</span>")
|
||||
return
|
||||
..()
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
return
|
||||
var/obj/item/stack/sheet/metal/new_item = new(drop_location())
|
||||
if(new_item.get_amount() <= 0)
|
||||
// stack was moved into another one on the pile
|
||||
new_item = locate() in user.loc
|
||||
visible_message("<span class='notice'>[user.name] shapes [src] into metal with [I]!</span>", \
|
||||
"<span class='notice'>You shape [src] into metal with [I]!</span>", \
|
||||
"<span class='warning'>You hear welding.</span>")
|
||||
var/replace = user.is_in_inactive_hand(src)
|
||||
use(2)
|
||||
if(get_amount() <= 0 && replace)
|
||||
user.unEquip(src, 1)
|
||||
if(new_item)
|
||||
user.put_in_hands(new_item)
|
||||
|
||||
@@ -216,14 +216,12 @@ GLOBAL_LIST_INIT(sandbag_recipes, list ( \
|
||||
..()
|
||||
recipes = plasma_recipes
|
||||
|
||||
/obj/item/stack/sheet/mineral/plasma/attackby(obj/item/W, mob/user, params)
|
||||
if(is_hot(W) > 300)//If the temperature of the object is over 300, then ignite
|
||||
/obj/item/stack/sheet/mineral/plasma/welder_act(mob/user, obj/item/I)
|
||||
if(I.use_tool(src, user, volume = I.tool_volume))
|
||||
message_admins("Plasma sheets ignited by [key_name_admin(user)]([ADMIN_QUE(user,"?")]) ([ADMIN_FLW(user,"FLW")]) in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||
log_game("Plasma sheets ignited by [key_name(user)] in ([x],[y],[z])")
|
||||
investigate_log("was <font color='red'><b>ignited</b></font> by [key_name(user)]","atmos")
|
||||
fire_act()
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/stack/sheet/mineral/plasma/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE)
|
||||
..()
|
||||
|
||||
@@ -222,7 +222,7 @@
|
||||
interact(usr)
|
||||
return
|
||||
|
||||
/obj/item/stack/proc/use(used, check = TRUE)
|
||||
/obj/item/stack/use(used, check = TRUE)
|
||||
if(check && zero_amount())
|
||||
return FALSE
|
||||
if(amount < used)
|
||||
@@ -296,6 +296,8 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
// Returns TRUE if the stack amount is zero.
|
||||
// Also qdels the stack gracefully if it is.
|
||||
/obj/item/stack/proc/zero_amount()
|
||||
if(amount < 1)
|
||||
if(isrobot(loc))
|
||||
@@ -305,7 +307,11 @@
|
||||
if(ismob(loc))
|
||||
var/mob/living/L = loc // At this stage, stack code is so horrible and atrocious, I wouldn't be all surprised ghosts can somehow have stacks. If this happens, then the world deserves to burn.
|
||||
L.unEquip(src, TRUE)
|
||||
qdel(src)
|
||||
if(amount < 1)
|
||||
// If you stand on top of a stack, and drop a - different - 0-amount stack on the floor,
|
||||
// the two get merged, so the amount of items in the stack can increase from the 0 that it had before.
|
||||
// Check the amount again, to be sure we're not qdeling healthy stacks.
|
||||
qdel(src)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -8,6 +8,16 @@
|
||||
mineralType = "plasma"
|
||||
materials = list(MAT_PLASMA=500)
|
||||
|
||||
/obj/item/stack/tile/mineral/plasma/welder_act(mob/user, obj/item/I)
|
||||
if(I.use_tool(src, user, volume = I.tool_volume))
|
||||
atmos_spawn_air(SPAWN_HEAT | SPAWN_TOXINS, 5)
|
||||
user.visible_message("<span class='warning'>[user.name] sets the plasma tiles on fire!</span>", \
|
||||
"<span class='warning'>You set the plasma tiles on fire!</span>")
|
||||
message_admins("Plasma tiles ignited by [key_name_admin(user)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</A>) in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||
log_game("Plasma tiles ignited by [key_name(user)] in ([x],[y],[z])")
|
||||
investigate_log("was <font color='red'><b>ignited</b></font> by [key_name(user)]","atmos")
|
||||
qdel(src)
|
||||
|
||||
/obj/item/stack/tile/mineral/uranium
|
||||
name = "uranium tile"
|
||||
singular_name = "uranium floor tile"
|
||||
|
||||
@@ -21,56 +21,38 @@
|
||||
pixel_x = rand(-3, 3)
|
||||
pixel_y = rand(-3, 3) //randomize a little
|
||||
|
||||
/obj/item/stack/tile/attackby(obj/item/W, mob/user, params)
|
||||
if(iswelder(W))
|
||||
var/obj/item/weldingtool/WT = W
|
||||
/obj/item/stack/tile/welder_act(mob/user, obj/item/I)
|
||||
if(get_amount() < 4)
|
||||
to_chat(user, "<span class='warning'>You need at least four tiles to do this!</span>")
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, volume = I.tool_volume))
|
||||
to_chat(user, "<span class='warning'>You can not reform this!</span>")
|
||||
return
|
||||
if (mineralType == "metal")
|
||||
var/obj/item/stack/sheet/metal/new_item = new(user.loc)
|
||||
user.visible_message("[user.name] shaped [src] into metal with the welding tool.", \
|
||||
"<span class='notice'>You shaped [src] into metal with the welding tool.</span>", \
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
var/obj/item/stack/rods/R = src
|
||||
src = null
|
||||
var/replace = (user.get_inactive_hand()==R)
|
||||
R.use(4)
|
||||
if(!R && replace)
|
||||
user.put_in_hands(new_item)
|
||||
|
||||
if(is_hot(W) && !mineralType)
|
||||
to_chat(user, "<span class='warning'>You can not reform this!</span>")
|
||||
return
|
||||
|
||||
if(get_amount() < 4)
|
||||
to_chat(user, "<span class='warning'>You need at least four tiles to do this!</span>")
|
||||
return
|
||||
|
||||
if(WT.remove_fuel(0,user))
|
||||
|
||||
if(mineralType == "plasma")
|
||||
atmos_spawn_air(SPAWN_HEAT | SPAWN_TOXINS, 5)
|
||||
user.visible_message("<span class='warning'>[user.name] sets the plasma tiles on fire!</span>", \
|
||||
"<span class='warning'>You set the plasma tiles on fire!</span>")
|
||||
message_admins("Plasma tiles ignited by [key_name_admin(user)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</A>) in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||
log_game("Plasma tiles ignited by [key_name(user)] in ([x],[y],[z])")
|
||||
investigate_log("was <font color='red'><b>ignited</b></font> by [key_name(user)]","atmos")
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
if (mineralType == "metal")
|
||||
var/obj/item/stack/sheet/metal/new_item = new(user.loc)
|
||||
user.visible_message("[user.name] shaped [src] into metal with the welding tool.", \
|
||||
"<span class='notice'>You shaped [src] into metal with the welding tool.</span>", \
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
var/obj/item/stack/rods/R = src
|
||||
src = null
|
||||
var/replace = (user.get_inactive_hand()==R)
|
||||
R.use(4)
|
||||
if(!R && replace)
|
||||
user.put_in_hands(new_item)
|
||||
|
||||
else
|
||||
var/sheet_type = text2path("/obj/item/stack/sheet/mineral/[mineralType]")
|
||||
var/obj/item/stack/sheet/mineral/new_item = new sheet_type(user.loc)
|
||||
user.visible_message("[user.name] shaped [src] into a sheet with the welding tool.", \
|
||||
"<span class='notice'>You shaped [src] into a sheet with the welding tool.</span>", \
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
var/obj/item/stack/rods/R = src
|
||||
src = null
|
||||
var/replace = (user.get_inactive_hand()==R)
|
||||
R.use(4)
|
||||
if (!R && replace)
|
||||
user.put_in_hands(new_item)
|
||||
else
|
||||
return ..()
|
||||
var/sheet_type = text2path("/obj/item/stack/sheet/mineral/[mineralType]")
|
||||
var/obj/item/stack/sheet/mineral/new_item = new sheet_type(user.loc)
|
||||
user.visible_message("[user.name] shaped [src] into a sheet with the welding tool.", \
|
||||
"<span class='notice'>You shaped [src] into a sheet with the welding tool.</span>", \
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
var/obj/item/stack/rods/R = src
|
||||
src = null
|
||||
var/replace = (user.get_inactive_hand()==R)
|
||||
R.use(4)
|
||||
if (!R && replace)
|
||||
user.put_in_hands(new_item)
|
||||
|
||||
//Grass
|
||||
/obj/item/stack/tile/grass
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
/obj/item/crowbar
|
||||
name = "pocket crowbar"
|
||||
desc = "A small crowbar. This handy tool is useful for lots of things, such as prying floor tiles or opening unpowered doors."
|
||||
icon = 'icons/obj/tools.dmi'
|
||||
icon_state = "crowbar"
|
||||
item_state = "crowbar"
|
||||
usesound = 'sound/items/crowbar.ogg'
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
force = 5
|
||||
throwforce = 7
|
||||
item_state = "crowbar"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
materials = list(MAT_METAL=50)
|
||||
origin_tech = "engineering=1;combat=1"
|
||||
attack_verb = list("attacked", "bashed", "battered", "bludgeoned", "whacked")
|
||||
toolspeed = 1
|
||||
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30)
|
||||
tool_behaviour = TOOL_CROWBAR
|
||||
|
||||
/obj/item/crowbar/red
|
||||
icon_state = "crowbar_red"
|
||||
item_state = "crowbar_red"
|
||||
force = 8
|
||||
|
||||
/obj/item/crowbar/brass
|
||||
name = "brass crowbar"
|
||||
desc = "A brass crowbar. It feels faintly warm to the touch."
|
||||
icon_state = "crowbar_brass"
|
||||
item_state = "crowbar_brass"
|
||||
toolspeed = 0.5
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
|
||||
/obj/item/crowbar/abductor
|
||||
name = "alien crowbar"
|
||||
desc = "A hard-light crowbar. It appears to pry by itself, without any effort required."
|
||||
icon = 'icons/obj/abductor.dmi'
|
||||
usesound = 'sound/weapons/sonic_jackhammer.ogg'
|
||||
icon_state = "crowbar"
|
||||
toolspeed = 0.1
|
||||
origin_tech = "combat=4;engineering=4;abductor=3"
|
||||
|
||||
/obj/item/crowbar/large
|
||||
name = "crowbar"
|
||||
desc = "It's a big crowbar. It doesn't fit in your pockets, because its too big."
|
||||
force = 12
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
throw_speed = 3
|
||||
throw_range = 3
|
||||
materials = list(MAT_METAL=70)
|
||||
icon_state = "crowbar_large"
|
||||
item_state = "crowbar_large"
|
||||
toolspeed = 0.5
|
||||
|
||||
/obj/item/crowbar/cyborg
|
||||
name = "hydraulic crowbar"
|
||||
desc = "A hydraulic prying tool, compact but powerful. Designed to replace crowbar in construction cyborgs."
|
||||
usesound = 'sound/items/jaws_pry.ogg'
|
||||
force = 10
|
||||
toolspeed = 0.5
|
||||
|
||||
/obj/item/crowbar/power
|
||||
name = "jaws of life"
|
||||
desc = "A set of jaws of life, the magic of science has managed to fit it down into a device small enough to fit in a tool belt. It's fitted with a prying head."
|
||||
icon_state = "jaws_pry"
|
||||
item_state = "jawsoflife"
|
||||
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25)
|
||||
origin_tech = "materials=2;engineering=2"
|
||||
usesound = 'sound/items/jaws_pry.ogg'
|
||||
force = 15
|
||||
toolspeed = 0.25
|
||||
var/airlock_open_time = 100 // Time required to open powered airlocks
|
||||
|
||||
/obj/item/crowbar/power/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is putting [user.p_their()] head in [src]. It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
playsound(loc, 'sound/items/jaws_pry.ogg', 50, 1, -1)
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/crowbar/power/attack_self(mob/user)
|
||||
playsound(get_turf(user), 'sound/items/change_jaws.ogg', 50, 1)
|
||||
var/obj/item/wirecutters/power/cutjaws = new /obj/item/wirecutters/power
|
||||
to_chat(user, "<span class='notice'>You attach the cutting jaws to [src].</span>")
|
||||
qdel(src)
|
||||
user.put_in_active_hand(cutjaws)
|
||||
+121
-111
@@ -1,111 +1,121 @@
|
||||
#define PROXIMITY_NONE ""
|
||||
#define PROXIMITY_ON_SCREEN "_red"
|
||||
#define PROXIMITY_NEAR "_yellow"
|
||||
|
||||
/**
|
||||
* Multitool -- A multitool is used for hacking electronic devices.
|
||||
* TO-DO -- Using it as a power measurement tool for cables etc. Nannek.
|
||||
*
|
||||
*/
|
||||
|
||||
/obj/item/multitool
|
||||
name = "multitool"
|
||||
desc = "Used for pulsing wires to test which to cut. Not recommended by doctors."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "multitool"
|
||||
flags = CONDUCT
|
||||
force = 5.0
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
throwforce = 0
|
||||
throw_range = 7
|
||||
throw_speed = 3
|
||||
materials = list(MAT_METAL=50, MAT_GLASS=20)
|
||||
origin_tech = "magnets=1;engineering=2"
|
||||
toolspeed = 1
|
||||
hitsound = 'sound/weapons/tap.ogg'
|
||||
var/shows_wire_information = FALSE // shows what a wire does if set to TRUE
|
||||
var/obj/machinery/buffer // simple machine buffer for device linkage
|
||||
|
||||
/obj/item/multitool/proc/IsBufferA(var/typepath)
|
||||
if(!buffer)
|
||||
return 0
|
||||
return istype(buffer,typepath)
|
||||
|
||||
// Syndicate device disguised as a multitool; it will turn red when an AI camera is nearby.
|
||||
|
||||
/obj/item/multitool/Destroy()
|
||||
buffer = null
|
||||
return ..()
|
||||
|
||||
/obj/item/multitool/ai_detect
|
||||
var/track_cooldown = 0
|
||||
var/track_delay = 10 //How often it checks for proximity
|
||||
var/detect_state = PROXIMITY_NONE
|
||||
var/rangealert = 8 //Glows red when inside
|
||||
var/rangewarning = 20 //Glows yellow when inside
|
||||
origin_tech = "magnets=1;engineering=2;syndicate=1"
|
||||
|
||||
/obj/item/multitool/ai_detect/New()
|
||||
..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/multitool/ai_detect/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/multitool/ai_detect/process()
|
||||
if(track_cooldown > world.time)
|
||||
return
|
||||
detect_state = PROXIMITY_NONE
|
||||
multitool_detect()
|
||||
icon_state = "[initial(icon_state)][detect_state]"
|
||||
track_cooldown = world.time + track_delay
|
||||
|
||||
/obj/item/multitool/ai_detect/proc/multitool_detect()
|
||||
var/turf/our_turf = get_turf(src)
|
||||
for(var/mob/living/silicon/ai/AI in ai_list)
|
||||
if(AI.cameraFollow == src)
|
||||
detect_state = PROXIMITY_ON_SCREEN
|
||||
break
|
||||
|
||||
if(!detect_state && cameranet.chunkGenerated(our_turf.x, our_turf.y, our_turf.z))
|
||||
var/datum/camerachunk/chunk = cameranet.getCameraChunk(our_turf.x, our_turf.y, our_turf.z)
|
||||
if(chunk)
|
||||
if(chunk.seenby.len)
|
||||
for(var/mob/camera/aiEye/A in chunk.seenby)
|
||||
var/turf/detect_turf = get_turf(A)
|
||||
if(get_dist(our_turf, detect_turf) < rangealert)
|
||||
detect_state = PROXIMITY_ON_SCREEN
|
||||
break
|
||||
if(get_dist(our_turf, detect_turf) < rangewarning)
|
||||
detect_state = PROXIMITY_NEAR
|
||||
break
|
||||
|
||||
/obj/item/multitool/ai_detect/admin
|
||||
desc = "Used for pulsing wires to test which to cut. Not recommended by doctors. Has a strange tag that says 'Grief in Safety'" //What else should I say for a meme item?
|
||||
track_delay = 5
|
||||
shows_wire_information = TRUE
|
||||
|
||||
/obj/item/multitool/ai_detect/admin/multitool_detect()
|
||||
var/turf/our_turf = get_turf(src)
|
||||
for(var/mob/J in urange(rangewarning,our_turf))
|
||||
if(check_rights(R_ADMIN, 0, J))
|
||||
detect_state = PROXIMITY_NEAR
|
||||
var/turf/detect_turf = get_turf(J)
|
||||
if(get_dist(our_turf, detect_turf) < rangealert)
|
||||
detect_state = PROXIMITY_ON_SCREEN
|
||||
break
|
||||
|
||||
/obj/item/multitool/cyborg
|
||||
name = "multitool"
|
||||
desc = "Optimised and stripped-down version of a regular multitool."
|
||||
toolspeed = 0.5
|
||||
|
||||
/obj/item/multitool/abductor
|
||||
name = "alien multitool"
|
||||
desc = "An omni-technological interface."
|
||||
icon = 'icons/obj/abductor.dmi'
|
||||
icon_state = "multitool"
|
||||
toolspeed = 0.1
|
||||
origin_tech = "magnets=5;engineering=5;abductor=3"
|
||||
shows_wire_information = TRUE
|
||||
#define PROXIMITY_NONE ""
|
||||
#define PROXIMITY_ON_SCREEN "_red"
|
||||
#define PROXIMITY_NEAR "_yellow"
|
||||
|
||||
/**
|
||||
* Multitool -- A multitool is used for hacking electronic devices.
|
||||
*/
|
||||
|
||||
/obj/item/multitool
|
||||
name = "multitool"
|
||||
desc = "Used for pulsing wires to test which to cut. Not recommended by doctors."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "multitool"
|
||||
flags = CONDUCT
|
||||
force = 5.0
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
throwforce = 0
|
||||
throw_range = 7
|
||||
throw_speed = 3
|
||||
materials = list(MAT_METAL=50, MAT_GLASS=20)
|
||||
origin_tech = "magnets=1;engineering=2"
|
||||
toolspeed = 1
|
||||
tool_behaviour = TOOL_MULTITOOL
|
||||
hitsound = 'sound/weapons/tap.ogg'
|
||||
var/shows_wire_information = FALSE // shows what a wire does if set to TRUE
|
||||
var/obj/machinery/buffer // simple machine buffer for device linkage
|
||||
|
||||
/obj/item/multitool/proc/IsBufferA(var/typepath)
|
||||
if(!buffer)
|
||||
return 0
|
||||
return istype(buffer,typepath)
|
||||
|
||||
/obj/item/multitool/multitool_check_buffer(user, silent = FALSE)
|
||||
return TRUE
|
||||
|
||||
/obj/item/multitool/proc/set_multitool_buffer(mob/user, obj/machinery/M) //Loads a machine into memory, returns TRUE if it does
|
||||
if(!ismachinery(M))
|
||||
to_chat(user, "<span class='warning'>That's not a machine!</span>")
|
||||
return
|
||||
buffer = M
|
||||
to_chat(user, "<span class='notice'>You load [M] into [src]'s internal buffer.</span>")
|
||||
return TRUE
|
||||
|
||||
// Syndicate device disguised as a multitool; it will turn red when an AI camera is nearby.
|
||||
|
||||
/obj/item/multitool/Destroy()
|
||||
buffer = null
|
||||
return ..()
|
||||
|
||||
/obj/item/multitool/ai_detect
|
||||
var/track_cooldown = 0
|
||||
var/track_delay = 10 //How often it checks for proximity
|
||||
var/detect_state = PROXIMITY_NONE
|
||||
var/rangealert = 8 //Glows red when inside
|
||||
var/rangewarning = 20 //Glows yellow when inside
|
||||
origin_tech = "magnets=1;engineering=2;syndicate=1"
|
||||
|
||||
/obj/item/multitool/ai_detect/New()
|
||||
..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/multitool/ai_detect/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/multitool/ai_detect/process()
|
||||
if(track_cooldown > world.time)
|
||||
return
|
||||
detect_state = PROXIMITY_NONE
|
||||
multitool_detect()
|
||||
icon_state = "[initial(icon_state)][detect_state]"
|
||||
track_cooldown = world.time + track_delay
|
||||
|
||||
/obj/item/multitool/ai_detect/proc/multitool_detect()
|
||||
var/turf/our_turf = get_turf(src)
|
||||
for(var/mob/living/silicon/ai/AI in ai_list)
|
||||
if(AI.cameraFollow == src)
|
||||
detect_state = PROXIMITY_ON_SCREEN
|
||||
break
|
||||
|
||||
if(!detect_state && cameranet.chunkGenerated(our_turf.x, our_turf.y, our_turf.z))
|
||||
var/datum/camerachunk/chunk = cameranet.getCameraChunk(our_turf.x, our_turf.y, our_turf.z)
|
||||
if(chunk)
|
||||
if(chunk.seenby.len)
|
||||
for(var/mob/camera/aiEye/A in chunk.seenby)
|
||||
var/turf/detect_turf = get_turf(A)
|
||||
if(get_dist(our_turf, detect_turf) < rangealert)
|
||||
detect_state = PROXIMITY_ON_SCREEN
|
||||
break
|
||||
if(get_dist(our_turf, detect_turf) < rangewarning)
|
||||
detect_state = PROXIMITY_NEAR
|
||||
break
|
||||
|
||||
/obj/item/multitool/ai_detect/admin
|
||||
desc = "Used for pulsing wires to test which to cut. Not recommended by doctors. Has a strange tag that says 'Grief in Safety'" //What else should I say for a meme item?
|
||||
track_delay = 5
|
||||
shows_wire_information = TRUE
|
||||
|
||||
/obj/item/multitool/ai_detect/admin/multitool_detect()
|
||||
var/turf/our_turf = get_turf(src)
|
||||
for(var/mob/J in urange(rangewarning,our_turf))
|
||||
if(check_rights(R_ADMIN, 0, J))
|
||||
detect_state = PROXIMITY_NEAR
|
||||
var/turf/detect_turf = get_turf(J)
|
||||
if(get_dist(our_turf, detect_turf) < rangealert)
|
||||
detect_state = PROXIMITY_ON_SCREEN
|
||||
break
|
||||
|
||||
/obj/item/multitool/cyborg
|
||||
name = "multitool"
|
||||
desc = "Optimised and stripped-down version of a regular multitool."
|
||||
toolspeed = 0.5
|
||||
|
||||
/obj/item/multitool/abductor
|
||||
name = "alien multitool"
|
||||
desc = "An omni-technological interface."
|
||||
icon = 'icons/obj/abductor.dmi'
|
||||
icon_state = "multitool"
|
||||
toolspeed = 0.1
|
||||
origin_tech = "magnets=5;engineering=5;abductor=3"
|
||||
shows_wire_information = TRUE
|
||||
@@ -0,0 +1,101 @@
|
||||
//Screwdriver
|
||||
/obj/item/screwdriver
|
||||
name = "screwdriver"
|
||||
desc = "You can be totally screwy with this."
|
||||
icon = 'icons/obj/tools.dmi'
|
||||
icon_state = "screwdriver_map"
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
force = 5
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
throwforce = 5
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
materials = list(MAT_METAL=75)
|
||||
attack_verb = list("stabbed")
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
usesound = 'sound/items/screwdriver.ogg'
|
||||
toolspeed = 1
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30)
|
||||
tool_behaviour = TOOL_SCREWDRIVER
|
||||
var/random_color = TRUE //if the screwdriver uses random coloring
|
||||
|
||||
/obj/item/screwdriver/nuke
|
||||
name = "screwdriver"
|
||||
desc = "A screwdriver with an ultra thin tip."
|
||||
icon_state = "screwdriver_nuke"
|
||||
toolspeed = 0.5
|
||||
|
||||
/obj/item/screwdriver/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is stabbing [src] into [user.p_their()] [pick("temple", "heart")]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/screwdriver/New(loc, var/param_color = null)
|
||||
..()
|
||||
if(random_color)
|
||||
if(!param_color)
|
||||
param_color = pick("red","blue","pink","brown","green","cyan","yellow")
|
||||
icon_state = "screwdriver_[param_color]"
|
||||
|
||||
if (prob(75))
|
||||
src.pixel_y = rand(0, 16)
|
||||
|
||||
/obj/item/screwdriver/attack(mob/living/carbon/M, mob/living/carbon/user)
|
||||
if(!istype(M) || user.a_intent == INTENT_HELP)
|
||||
return ..()
|
||||
if(user.zone_selected != "eyes" && user.zone_selected != "head")
|
||||
return ..()
|
||||
if((CLUMSY in user.mutations) && prob(50))
|
||||
M = user
|
||||
return eyestab(M,user)
|
||||
|
||||
/obj/item/screwdriver/brass
|
||||
name = "brass screwdriver"
|
||||
desc = "A screwdriver made of brass. The handle feels freezing cold."
|
||||
icon_state = "screwdriver_brass"
|
||||
toolspeed = 0.5
|
||||
random_color = FALSE
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
|
||||
/obj/item/screwdriver/abductor
|
||||
name = "alien screwdriver"
|
||||
desc = "An ultrasonic screwdriver."
|
||||
icon = 'icons/obj/abductor.dmi'
|
||||
icon_state = "screwdriver"
|
||||
usesound = 'sound/items/pshoom.ogg'
|
||||
toolspeed = 0.1
|
||||
random_color = FALSE
|
||||
|
||||
/obj/item/screwdriver/power
|
||||
name = "hand drill"
|
||||
desc = "A simple hand drill with a screwdriver bit attached."
|
||||
icon_state = "drill_screw"
|
||||
item_state = "drill"
|
||||
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25)
|
||||
origin_tech = "materials=2;engineering=2" //done for balance reasons, making them high value for research, but harder to get
|
||||
force = 8 //might or might not be too high, subject to change
|
||||
throwforce = 8
|
||||
throw_speed = 2
|
||||
throw_range = 3//it's heavier than a screw driver/wrench, so it does more damage, but can't be thrown as far
|
||||
attack_verb = list("drilled", "screwed", "jabbed","whacked")
|
||||
hitsound = 'sound/items/drill_hit.ogg'
|
||||
usesound = 'sound/items/drill_use.ogg'
|
||||
toolspeed = 0.25
|
||||
random_color = FALSE
|
||||
|
||||
/obj/item/screwdriver/power/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is putting [src] to [user.p_their()] temple. It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/screwdriver/power/attack_self(mob/user)
|
||||
playsound(get_turf(user), 'sound/items/change_drill.ogg', 50, 1)
|
||||
var/obj/item/wrench/power/b_drill = new /obj/item/wrench/power
|
||||
to_chat(user, "<span class='notice'>You attach the bolt driver bit to [src].</span>")
|
||||
qdel(src)
|
||||
user.put_in_active_hand(b_drill)
|
||||
|
||||
/obj/item/screwdriver/cyborg
|
||||
name = "powered screwdriver"
|
||||
desc = "An electrical screwdriver, designed to be both precise and quick."
|
||||
usesound = 'sound/items/drill_use.ogg'
|
||||
toolspeed = 0.5
|
||||
@@ -0,0 +1,60 @@
|
||||
// Called when a mob tries to use the item as a tool.
|
||||
// Handles most checks.
|
||||
/obj/item/proc/use_tool(atom/target, mob/living/user, delay, amount=0, volume=0, datum/callback/extra_checks)
|
||||
// No delay means there is no start message, and no reason to call tool_start_check before use_tool.
|
||||
// Run the start check here so we wouldn't have to call it manually.
|
||||
target.add_fingerprint(user)
|
||||
if(!tool_start_check(user, amount) && !delay)
|
||||
return
|
||||
delay *= toolspeed
|
||||
|
||||
// Play tool sound at the beginning of tool usage.
|
||||
play_tool_sound(target, volume)
|
||||
|
||||
if(delay)
|
||||
// Create a callback with checks that would be called every tick by do_after.
|
||||
var/datum/callback/tool_check = CALLBACK(src, .proc/tool_check_callback, user, target, amount, extra_checks)
|
||||
|
||||
if(ismob(target))
|
||||
if(!do_mob(user, target, delay, extra_checks=tool_check))
|
||||
return
|
||||
|
||||
else
|
||||
if(!do_after(user, delay, target=target, extra_checks=tool_check))
|
||||
return
|
||||
else
|
||||
// Invoke the extra checks once, just in case.
|
||||
if(extra_checks && !extra_checks.Invoke())
|
||||
return
|
||||
|
||||
// Use tool's fuel, stack sheets or charges if amount is set.
|
||||
if(amount && !use(amount))
|
||||
return
|
||||
|
||||
// Play tool sound at the end of tool usage,
|
||||
// but only if the delay between the beginning and the end is not too small
|
||||
if(delay >= MIN_TOOL_SOUND_DELAY)
|
||||
play_tool_sound(target, volume)
|
||||
return TRUE
|
||||
|
||||
// Called before use_tool if there is a delay, or by use_tool if there isn't.
|
||||
// Only ever used by welding tools and stacks, so it's not added on any other use_tool checks.
|
||||
/obj/item/proc/tool_start_check(mob/living/user, amount=0)
|
||||
return tool_use_check(user, amount)
|
||||
|
||||
// A check called by tool_start_check once, and by use_tool on every tick of delay.
|
||||
/obj/item/proc/tool_use_check(mob/living/user, amount)
|
||||
return !amount
|
||||
|
||||
/obj/item/proc/play_tool_sound(atom/target, volume = tool_volume)
|
||||
if(target && usesound && volume)
|
||||
var/played_sound = usesound
|
||||
|
||||
if(islist(usesound))
|
||||
played_sound = pick(usesound)
|
||||
|
||||
playsound(target, played_sound, volume, 1)
|
||||
|
||||
// Used in a callback that is passed by use_tool into do_after call. Do not override, do not call manually.
|
||||
/obj/item/proc/tool_check_callback(mob/living/user, atom/target, amount, datum/callback/extra_checks)
|
||||
return tool_use_check(user, amount) && (!extra_checks || extra_checks.Invoke())
|
||||
@@ -0,0 +1,232 @@
|
||||
#define GET_FUEL reagents.get_reagent_amount("fuel")
|
||||
|
||||
/obj/item/weldingtool
|
||||
name = "welding tool"
|
||||
desc = "A standard edition welder provided by Nanotrasen."
|
||||
icon = 'icons/obj/tools.dmi'
|
||||
icon_state = "welder"
|
||||
item_state = "welder"
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
force = 3
|
||||
throwforce = 5
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
hitsound = "swing_hit"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 30)
|
||||
resistance_flags = FIRE_PROOF
|
||||
materials = list(MAT_METAL=70, MAT_GLASS=30)
|
||||
origin_tech = "engineering=1;plasmatech=1"
|
||||
tool_behaviour = TOOL_WELDER
|
||||
toolspeed = 1
|
||||
tool_enabled = FALSE
|
||||
usesound = 'sound/items/welder.ogg'
|
||||
var/maximum_fuel = 20
|
||||
var/requires_fuel = TRUE //Set to FALSE if it doesn't need fuel, but serves equally well as a cost modifier
|
||||
var/refills_over_time = FALSE //Do we regenerate fuel?
|
||||
var/activation_sound = 'sound/items/welderactivate.ogg'
|
||||
var/deactivation_sound = 'sound/items/welderdeactivate.ogg'
|
||||
var/light_intensity = 2
|
||||
var/low_fuel_changes_icon = TRUE//More than one icon_state due to low fuel?
|
||||
var/progress_flash_divisor = 10 //Length of time between each "eye flash"
|
||||
|
||||
/obj/item/weldingtool/Initialize(mapload)
|
||||
..()
|
||||
create_reagents(maximum_fuel)
|
||||
reagents.add_reagent("fuel", maximum_fuel)
|
||||
if(refills_over_time)
|
||||
reagents.reagents_generated_per_cycle += list("fuel" = 1)
|
||||
update_icon()
|
||||
|
||||
/obj/item/weldingtool/examine(mob/user)
|
||||
. = ..()
|
||||
if(get_dist(user, src) <= 0)
|
||||
. += "It contains [GET_FUEL] unit\s of fuel out of [maximum_fuel]."
|
||||
|
||||
/obj/item/weldingtool/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] welds [user.p_their()] every orifice closed! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return FIRELOSS
|
||||
|
||||
/obj/item/weldingtool/process()
|
||||
var/turf/T = get_turf(src)
|
||||
T.hotspot_expose(2500, 5)
|
||||
if(prob(5))
|
||||
remove_fuel(1)
|
||||
..()
|
||||
|
||||
/obj/item/weldingtool/attack_self(mob/user)
|
||||
if(tool_enabled) //Turn off the welder if it's on
|
||||
to_chat(user, "<span class='notice'>You switch off [src].</span>")
|
||||
toggle_welder()
|
||||
return
|
||||
else if(GET_FUEL) //The welder is off, but we need to check if there is fuel in the tank
|
||||
to_chat(user, "<span class='notice'>You switch on [src].</span>")
|
||||
toggle_welder()
|
||||
else //The welder is off and unfuelled
|
||||
to_chat(user, "<span class='notice'>[src] is out of fuel!</span>")
|
||||
|
||||
/obj/item/weldingtool/proc/toggle_welder(turn_off = FALSE) //Turn it on or off, forces it to deactivate
|
||||
tool_enabled = turn_off ? FALSE : !tool_enabled
|
||||
if(tool_enabled)
|
||||
START_PROCESSING(SSobj, src)
|
||||
damtype = BURN
|
||||
force = 15
|
||||
hitsound = 'sound/items/welder.ogg'
|
||||
playsound(loc, activation_sound, 50, 1)
|
||||
set_light(light_intensity)
|
||||
else
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
damtype = BRUTE
|
||||
force = 3
|
||||
hitsound = "swing_hit"
|
||||
playsound(loc, deactivation_sound, 50, 1)
|
||||
set_light(0)
|
||||
update_icon()
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
M.update_inv_r_hand()
|
||||
M.update_inv_l_hand()
|
||||
|
||||
// If welding tool ran out of fuel during a construction task, construction fails.
|
||||
/obj/item/weldingtool/tool_use_check(mob/living/user, amount)
|
||||
if(!tool_enabled)
|
||||
to_chat(user, "<span class='notice'>[src] has to be on to complete this task!</span>")
|
||||
return FALSE
|
||||
if(GET_FUEL >= amount * requires_fuel)
|
||||
return TRUE
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need more welding fuel to complete this task!</span>")
|
||||
return FALSE
|
||||
|
||||
// When welding is about to start, run a normal tool_use_check, then flash a mob if it succeeds.
|
||||
/obj/item/weldingtool/tool_start_check(mob/living/user, amount=0)
|
||||
. = tool_use_check(user, amount)
|
||||
if(. && user)
|
||||
user.flash_eyes(light_intensity)
|
||||
|
||||
/obj/item/weldingtool/use(amount)
|
||||
if(GET_FUEL < amount * requires_fuel)
|
||||
return
|
||||
remove_fuel(amount)
|
||||
return TRUE
|
||||
|
||||
/obj/item/weldingtool/use_tool(target, user, delay, amount, volume, datum/callback/extra_checks)
|
||||
var/did_thing = ..()
|
||||
if(did_thing)
|
||||
remove_fuel(1) //Consume some fuel after we do a welding action
|
||||
if(delay)
|
||||
progress_flash_divisor = initial(progress_flash_divisor)
|
||||
return did_thing
|
||||
|
||||
/obj/item/weldingtool/tool_check_callback(mob/living/user, amount, datum/callback/extra_checks)
|
||||
. = ..()
|
||||
if(. && user)
|
||||
if(progress_flash_divisor == 0)
|
||||
user.flash_eyes(min(light_intensity, 1))
|
||||
progress_flash_divisor = initial(progress_flash_divisor)
|
||||
else
|
||||
progress_flash_divisor--
|
||||
|
||||
/obj/item/weldingtool/proc/remove_fuel(amount) //NB: doesn't check if we have enough fuel, it just removes however much is left if there's not enough
|
||||
reagents.remove_reagent("fuel", amount * requires_fuel)
|
||||
if(!GET_FUEL)
|
||||
toggle_welder(TRUE)
|
||||
|
||||
/obj/item/weldingtool/refill(mob/user, atom/A, amount)
|
||||
if(!A.reagents)
|
||||
return
|
||||
if(GET_FUEL >= maximum_fuel)
|
||||
to_chat(user, "<span class='notice'>[src] is already full!</span>")
|
||||
return
|
||||
var/amount_transferred = A.reagents.trans_id_to(src, "fuel", amount)
|
||||
if(amount_transferred)
|
||||
to_chat(user, "<span class='notice'>You refuel [src] by [amount_transferred] unit\s.</span>")
|
||||
playsound(src, 'sound/effects/refill.ogg', 50, 1)
|
||||
update_icon()
|
||||
return amount_transferred
|
||||
else
|
||||
to_chat(user, "<span class='warning'>There's not enough fuel in [A] to refuel [src]!</span>")
|
||||
|
||||
/obj/item/weldingtool/proc/update_torch()
|
||||
overlays.Cut()
|
||||
if(tool_enabled)
|
||||
overlays += "[initial(icon_state)]-on"
|
||||
item_state = "[initial(item_state)]1"
|
||||
else
|
||||
item_state = "[initial(item_state)]"
|
||||
|
||||
/obj/item/weldingtool/update_icon()
|
||||
if(low_fuel_changes_icon)
|
||||
var/ratio = GET_FUEL / maximum_fuel
|
||||
ratio = Ceiling(ratio*4) * 25
|
||||
if(ratio == 100)
|
||||
icon_state = initial(icon_state)
|
||||
else
|
||||
icon_state = "[initial(icon_state)][ratio]"
|
||||
update_torch()
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/weldingtool/largetank
|
||||
name = "industrial welding tool"
|
||||
desc = "A slightly larger welder with a larger tank."
|
||||
icon_state = "indwelder"
|
||||
maximum_fuel = 40
|
||||
materials = list(MAT_METAL=70, MAT_GLASS=60)
|
||||
origin_tech = "engineering=2;plasmatech=2"
|
||||
|
||||
/obj/item/weldingtool/largetank/cyborg
|
||||
name = "integrated welding tool"
|
||||
desc = "An advanced welder designed to be used in robotic systems."
|
||||
toolspeed = 0.5
|
||||
|
||||
/obj/item/weldingtool/mini
|
||||
name = "emergency welding tool"
|
||||
desc = "A miniature welder used during emergencies."
|
||||
icon_state = "miniwelder"
|
||||
maximum_fuel = 10
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
materials = list(MAT_METAL=30, MAT_GLASS=10)
|
||||
low_fuel_changes_icon = FALSE
|
||||
|
||||
/obj/item/weldingtool/abductor
|
||||
name = "alien welding tool"
|
||||
desc = "An alien welding tool. Whatever fuel it uses, it never runs out."
|
||||
icon = 'icons/obj/abductor.dmi'
|
||||
icon_state = "welder"
|
||||
toolspeed = 0.1
|
||||
light_intensity = 0
|
||||
origin_tech = "plasmatech=5;engineering=5;abductor=3"
|
||||
requires_fuel = FALSE
|
||||
refills_over_time = TRUE
|
||||
low_fuel_changes_icon = FALSE
|
||||
|
||||
/obj/item/weldingtool/hugetank
|
||||
name = "upgraded welding tool"
|
||||
desc = "An upgraded welder based off the industrial welder."
|
||||
icon_state = "upindwelder"
|
||||
item_state = "upindwelder"
|
||||
maximum_fuel = 80
|
||||
materials = list(MAT_METAL=70, MAT_GLASS=120)
|
||||
origin_tech = "engineering=3;plasmatech=2"
|
||||
|
||||
/obj/item/weldingtool/experimental
|
||||
name = "experimental welding tool"
|
||||
desc = "An experimental welder capable of self-fuel generation and less harmful to the eyes."
|
||||
icon_state = "exwelder"
|
||||
item_state = "exwelder"
|
||||
maximum_fuel = 40
|
||||
materials = list(MAT_METAL=70, MAT_GLASS=120)
|
||||
origin_tech = "materials=4;engineering=4;bluespace=3;plasmatech=4"
|
||||
light_intensity = 1
|
||||
toolspeed = 0.5
|
||||
refills_over_time = TRUE
|
||||
low_fuel_changes_icon = FALSE
|
||||
|
||||
/obj/item/weldingtool/experimental/brass
|
||||
name = "brass welding tool"
|
||||
desc = "A brass welder that seems to constantly refuel itself. It is faintly warm to the touch."
|
||||
icon_state = "brasswelder"
|
||||
item_state = "brasswelder"
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
@@ -0,0 +1,95 @@
|
||||
/obj/item/wirecutters
|
||||
name = "wirecutters"
|
||||
desc = "This cuts wires."
|
||||
icon = 'icons/obj/tools.dmi'
|
||||
icon_state = "cutters"
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
force = 6
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
materials = list(MAT_METAL=80)
|
||||
origin_tech = "materials=1;engineering=1"
|
||||
attack_verb = list("pinched", "nipped")
|
||||
hitsound = 'sound/items/wirecutter.ogg'
|
||||
usesound = 'sound/items/wirecutter.ogg'
|
||||
sharp = 1
|
||||
toolspeed = 1
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30)
|
||||
tool_behaviour = TOOL_WIRECUTTER
|
||||
var/random_color = TRUE
|
||||
|
||||
/obj/item/wirecutters/New(loc, param_color = null)
|
||||
..()
|
||||
if(random_color)
|
||||
if(!param_color)
|
||||
param_color = pick("yellow", "red")
|
||||
icon_state = "cutters_[param_color]"
|
||||
|
||||
/obj/item/wirecutters/attack(mob/living/carbon/C, mob/user)
|
||||
if(istype(C) && C.handcuffed && istype(C.handcuffed, /obj/item/restraints/handcuffs/cable))
|
||||
user.visible_message("<span class='notice'>[user] cuts [C]'s restraints with [src]!</span>")
|
||||
QDEL_NULL(C.handcuffed)
|
||||
if(C.buckled && C.buckled.buckle_requires_restraints)
|
||||
C.buckled.unbuckle_mob(C)
|
||||
C.update_handcuffed()
|
||||
return
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/wirecutters/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is cutting at [user.p_their()] arteries with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
playsound(loc, usesound, 50, 1, -1)
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/wirecutters/brass
|
||||
name = "brass wirecutters"
|
||||
desc = "A pair of wirecutters made of brass. The handle feels freezing cold to the touch."
|
||||
icon_state = "cutters_brass"
|
||||
toolspeed = 0.5
|
||||
random_color = FALSE
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
|
||||
/obj/item/wirecutters/abductor
|
||||
name = "alien wirecutters"
|
||||
desc = "Extremely sharp wirecutters, made out of a silvery-green metal."
|
||||
icon = 'icons/obj/abductor.dmi'
|
||||
icon_state = "cutters"
|
||||
toolspeed = 0.1
|
||||
origin_tech = "materials=5;engineering=4;abductor=3"
|
||||
random_color = FALSE
|
||||
|
||||
/obj/item/wirecutters/cyborg
|
||||
name = "wirecutters"
|
||||
desc = "This cuts wires."
|
||||
toolspeed = 0.5
|
||||
|
||||
/obj/item/wirecutters/power
|
||||
name = "jaws of life"
|
||||
desc = "A set of jaws of life, the magic of science has managed to fit it down into a device small enough to fit in a tool belt. It's fitted with a cutting head."
|
||||
icon_state = "jaws_cutter"
|
||||
item_state = "jawsoflife"
|
||||
origin_tech = "materials=2;engineering=2"
|
||||
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25)
|
||||
usesound = 'sound/items/jaws_cut.ogg'
|
||||
toolspeed = 0.25
|
||||
random_color = FALSE
|
||||
|
||||
/obj/item/wirecutters/power/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is wrapping \the [src] around [user.p_their()] neck. It looks like [user.p_theyre()] trying to rip [user.p_their()] head off!</span>")
|
||||
playsound(loc, 'sound/items/jaws_cut.ogg', 50, 1, -1)
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
var/obj/item/organ/external/head/head = H.bodyparts_by_name["head"]
|
||||
if(head)
|
||||
head.droplimb(0, DROPLIMB_BLUNT, FALSE, TRUE)
|
||||
playsound(loc,pick('sound/misc/desceration-01.ogg','sound/misc/desceration-02.ogg','sound/misc/desceration-01.ogg') ,50, 1, -1)
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/wirecutters/power/attack_self(mob/user)
|
||||
playsound(get_turf(user), 'sound/items/change_jaws.ogg', 50, 1)
|
||||
var/obj/item/crowbar/power/pryjaws = new /obj/item/crowbar/power
|
||||
to_chat(user, "<span class='notice'>You attach the pry jaws to [src].</span>")
|
||||
qdel(src)
|
||||
user.put_in_active_hand(pryjaws)
|
||||
@@ -0,0 +1,105 @@
|
||||
//Wrench
|
||||
/obj/item/wrench
|
||||
name = "wrench"
|
||||
desc = "A wrench with common uses. Can be found in your hand."
|
||||
icon = 'icons/obj/tools.dmi'
|
||||
icon_state = "wrench"
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
force = 5
|
||||
throwforce = 7
|
||||
usesound = 'sound/items/ratchet.ogg'
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
materials = list(MAT_METAL=150)
|
||||
origin_tech = "materials=1;engineering=1"
|
||||
attack_verb = list("bashed", "battered", "bludgeoned", "whacked")
|
||||
toolspeed = 1
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30)
|
||||
tool_behaviour = TOOL_WRENCH
|
||||
|
||||
/obj/item/wrench/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is beating [user.p_them()]self to death with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
playsound(loc, 'sound/weapons/genhit.ogg', 50, 1, -1)
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/wrench/cyborg
|
||||
name = "automatic wrench"
|
||||
desc = "An advanced robotic wrench. Can be found in construction cyborgs."
|
||||
toolspeed = 0.5
|
||||
|
||||
/obj/item/wrench/brass
|
||||
name = "brass wrench"
|
||||
desc = "A brass wrench. It's faintly warm to the touch."
|
||||
icon_state = "wrench_brass"
|
||||
toolspeed = 0.5
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
|
||||
/obj/item/wrench/abductor
|
||||
name = "alien wrench"
|
||||
desc = "A polarized wrench. It causes anything placed between the jaws to turn."
|
||||
icon = 'icons/obj/abductor.dmi'
|
||||
icon_state = "wrench"
|
||||
usesound = 'sound/effects/empulse.ogg'
|
||||
toolspeed = 0.1
|
||||
origin_tech = "materials=5;engineering=5;abductor=3"
|
||||
|
||||
/obj/item/wrench/power
|
||||
name = "hand drill"
|
||||
desc = "A simple powered drill with a bolt bit."
|
||||
icon_state = "drill_bolt"
|
||||
item_state = "drill"
|
||||
usesound = 'sound/items/drill_use.ogg'
|
||||
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25)
|
||||
origin_tech = "materials=2;engineering=2" //done for balance reasons, making them high value for research, but harder to get
|
||||
force = 8 //might or might not be too high, subject to change
|
||||
throwforce = 8
|
||||
attack_verb = list("drilled", "screwed", "jabbed")
|
||||
toolspeed = 0.25
|
||||
|
||||
/obj/item/wrench/power/attack_self(mob/user)
|
||||
playsound(get_turf(user),'sound/items/change_drill.ogg', 50, 1)
|
||||
var/obj/item/wirecutters/power/s_drill = new /obj/item/screwdriver/power
|
||||
to_chat(user, "<span class='notice'>You attach the screwdriver bit to [src].</span>")
|
||||
qdel(src)
|
||||
user.put_in_active_hand(s_drill)
|
||||
|
||||
/obj/item/wrench/power/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is pressing [src] against [user.p_their()] head! It looks like [user.p_theyre()] trying to commit suicide!")
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/wrench/medical
|
||||
name = "medical wrench"
|
||||
desc = "A medical wrench with common (medical?) uses. Can be found in your hand."
|
||||
icon_state = "wrench_medical"
|
||||
force = 2 //MEDICAL
|
||||
throwforce = 4
|
||||
origin_tech = "materials=1;engineering=1;biotech=3"
|
||||
attack_verb = list("wrenched", "medicaled", "tapped", "jabbed", "whacked")
|
||||
|
||||
/obj/item/wrench/medical/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is praying to the medical wrench to take [user.p_their()] soul. It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
// TODO Make them glow with the power of the M E D I C A L W R E N C H
|
||||
// during their ascension
|
||||
|
||||
// Stun stops them from wandering off
|
||||
user.Stun(5)
|
||||
playsound(loc, 'sound/effects/pray.ogg', 50, 1, -1)
|
||||
|
||||
// Let the sound effect finish playing
|
||||
sleep(20)
|
||||
|
||||
if(!user)
|
||||
return
|
||||
|
||||
for(var/obj/item/W in user)
|
||||
user.unEquip(W)
|
||||
|
||||
var/obj/item/wrench/medical/W = new /obj/item/wrench/medical(loc)
|
||||
W.add_fingerprint(user)
|
||||
W.desc += " For some reason, it reminds you of [user.name]."
|
||||
|
||||
if(!user)
|
||||
return
|
||||
|
||||
user.dust()
|
||||
return OBLITERATION
|
||||
@@ -38,6 +38,7 @@
|
||||
item_state = "balloon-empty"
|
||||
|
||||
/obj/item/toy/balloon/New()
|
||||
..()
|
||||
create_reagents(10)
|
||||
|
||||
/obj/item/toy/balloon/attack(mob/living/carbon/human/M as mob, mob/user as mob)
|
||||
@@ -799,6 +800,7 @@ obj/item/toy/cards/deck/syndicate/black
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
/obj/item/toy/therapy/New()
|
||||
..()
|
||||
if(item_color)
|
||||
name = "[item_color] therapy doll"
|
||||
desc += " This one is [item_color]."
|
||||
@@ -1069,6 +1071,22 @@ obj/item/toy/cards/deck/syndicate/black
|
||||
name = "tuxedo cat plushie"
|
||||
icon_state = "tuxedocat"
|
||||
|
||||
/obj/item/toy/plushie/voxplushie
|
||||
name = "vox plushie"
|
||||
desc = "A stitched-together vox, fresh from the skipjack. Press its belly to hear it skree!"
|
||||
icon_state = "plushie_vox"
|
||||
item_state = "plushie_vox"
|
||||
var/cooldown = 0
|
||||
|
||||
/obj/item/toy/plushie/voxplushie/attack_self(mob/user)
|
||||
if(!cooldown)
|
||||
playsound(user, 'sound/voice/shriek1.ogg', 10, 0)
|
||||
visible_message("<span class='danger'>Skreee!</span>")
|
||||
cooldown = 1
|
||||
spawn(30) cooldown = 0
|
||||
return
|
||||
..()
|
||||
|
||||
//New generation TG plushies
|
||||
|
||||
/obj/item/toy/plushie/lizardplushie
|
||||
|
||||
@@ -36,26 +36,30 @@
|
||||
return
|
||||
update_icon()
|
||||
to_chat(user, "<span class='notice'>You add the cables to the [src]. It now contains [loaded.amount].</span>")
|
||||
else if(isscrewdriver(W))
|
||||
if(!loaded)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You loosen the securing screws on the side, allowing you to lower the guiding edge and retrieve the wires.</span>")
|
||||
while(loaded.amount > 30) //There are only two kinds of situations: "nodiff" (60,90), or "diff" (31-59, 61-89)
|
||||
var/diff = loaded.amount % 30
|
||||
if(diff)
|
||||
loaded.use(diff)
|
||||
new /obj/item/stack/cable_coil(user.loc, diff)
|
||||
else
|
||||
loaded.use(30)
|
||||
new /obj/item/stack/cable_coil(user.loc, 30)
|
||||
loaded.max_amount = initial(loaded.max_amount)
|
||||
loaded.forceMove(user.loc)
|
||||
user.put_in_hands(loaded)
|
||||
loaded = null
|
||||
update_icon()
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/twohanded/rcl/screwdriver_act(mob/user, obj/item/I)
|
||||
if(!loaded)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You loosen the securing screws on the side, allowing you to lower the guiding edge and retrieve the wires.</span>")
|
||||
while(loaded.amount > 30) //There are only two kinds of situations: "nodiff" (60,90), or "diff" (31-59, 61-89)
|
||||
var/diff = loaded.amount % 30
|
||||
if(diff)
|
||||
loaded.use(diff)
|
||||
new /obj/item/stack/cable_coil(user.loc, diff)
|
||||
else
|
||||
loaded.use(30)
|
||||
new /obj/item/stack/cable_coil(user.loc, 30)
|
||||
loaded.max_amount = initial(loaded.max_amount)
|
||||
loaded.forceMove(user.loc)
|
||||
user.put_in_hands(loaded)
|
||||
loaded = null
|
||||
update_icon()
|
||||
|
||||
/obj/item/twohanded/rcl/examine(mob/user)
|
||||
. = ..()
|
||||
if(loaded)
|
||||
|
||||
@@ -18,6 +18,7 @@ RSF
|
||||
var/list/configured_items = list()
|
||||
|
||||
/obj/item/rsf/New()
|
||||
..()
|
||||
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
|
||||
// configured_items[ID_NUMBER] = list("Human-readable name", price in energy, /type/path)
|
||||
configured_items[++configured_items.len] = list("Dosh", 50, /obj/item/stack/spacecash/c10)
|
||||
@@ -30,7 +31,6 @@ RSF
|
||||
configured_items[++configured_items.len] = list("Snack - Donut", 4000, /obj/item/reagent_containers/food/snacks/donut)
|
||||
configured_items[++configured_items.len] = list("Snack - Chicken Soup", 4000, /obj/item/reagent_containers/food/drinks/chicken_soup)
|
||||
configured_items[++configured_items.len] = list("Snack - Turkey Burger", 4000, /obj/item/reagent_containers/food/snacks/tofuburger)
|
||||
return
|
||||
|
||||
/obj/item/rsf/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
..()
|
||||
|
||||
@@ -681,6 +681,7 @@
|
||||
|
||||
/obj/item/card/id/prisoner/random
|
||||
/obj/item/card/id/prisoner/random/New()
|
||||
..()
|
||||
var/random_number = "#[rand(0, 99)]-[rand(0, 999)]"
|
||||
name = "Prisoner [random_number]"
|
||||
registered_name = name
|
||||
|
||||
@@ -64,14 +64,14 @@ LIGHTERS ARE IN LIGHTERS.DM
|
||||
..()
|
||||
light()
|
||||
|
||||
/obj/item/clothing/mask/cigarette/welder_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(I.tool_use_check(user, 0)) //Don't need to flash eyes because you are a badass
|
||||
light("<span class='notice'>[user] casually lights the [name] with [I], what a badass.</span>")
|
||||
|
||||
/obj/item/clothing/mask/cigarette/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
..()
|
||||
if(istype(W, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if(WT.isOn())//Badasses dont get blinded while lighting their cig with a welding tool
|
||||
light("<span class='notice'>[user] casually lights the [name] with [W], what a badass.</span>")
|
||||
|
||||
else if(istype(W, /obj/item/lighter/zippo))
|
||||
if(istype(W, /obj/item/lighter/zippo))
|
||||
var/obj/item/lighter/zippo/Z = W
|
||||
if(Z.lit)
|
||||
light("<span class='rose'>With a single flick of [user.p_their()] wrist, [user] smoothly lights [user.p_their()] [name] with [user.p_their()] [W]. Damn [user.p_theyre()] cool.</span>")
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
// Conversion kit
|
||||
/obj/item/conversion_kit
|
||||
name = "\improper Revolver Conversion Kit"
|
||||
desc = "A professional conversion kit used to convert any knock off revolver into the real deal capable of shooting lethal .357 rounds without the possibility of catastrophic failure."
|
||||
icon_state = "kit"
|
||||
flags = CONDUCT
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
origin_tech = "combat=2"
|
||||
var/open = 0
|
||||
|
||||
/obj/item/conversion_kit/New()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/conversion_kit/update_icon()
|
||||
icon_state = "[initial(icon_state)]_[open]"
|
||||
|
||||
/obj/item/conversion_kit/attack_self(mob/user)
|
||||
open = !open
|
||||
to_chat(user, "<span class='notice'>You [open ? "open" : "close"] the conversion kit.</span>")
|
||||
update_icon()
|
||||
@@ -48,6 +48,7 @@
|
||||
name = "lipstick"
|
||||
|
||||
/obj/item/lipstick/random/New()
|
||||
..()
|
||||
var/lscolor = pick(lipstick_colors)//A random color is picked from the var defined initially in a new var.
|
||||
colour = lipstick_colors[lscolor]//The color of the lipstick is pulled from the new variable (right hand side, HTML & Hex RGB)
|
||||
name = "[lscolor] lipstick"//The new variable is also used to match the name to the color of the lipstick. Kudos to Desolate & Lemon
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
|
||||
|
||||
/obj/item/extinguisher/New()
|
||||
..()
|
||||
create_reagents(max_water)
|
||||
reagents.add_reagent("water", max_water)
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ obj/item/firework
|
||||
obj/item/firework/attackby(obj/item/W,mob/user, params)
|
||||
if(litzor)
|
||||
return
|
||||
if(istype(W, /obj/item/weldingtool) && W:welding || istype(W,/obj/item/lighter) && W:lit)
|
||||
if(is_hot(W))
|
||||
for(var/mob/M in viewers(user))
|
||||
to_chat(M, "[user] lits \the [src]")
|
||||
litzor = 1
|
||||
@@ -29,7 +29,7 @@ obj/item/sparkler
|
||||
obj/item/sparkler/attackby(obj/item/W,mob/user, params)
|
||||
if(litzor)
|
||||
return
|
||||
if(istype(W, /obj/item/weldingtool) && W:welding || istype(W,/obj/item/lighter) && W:lit)
|
||||
if(is_hot(W))
|
||||
for(var/mob/M in viewers(user))
|
||||
to_chat(M, "[user] lits \the [src]")
|
||||
litzor = 1
|
||||
|
||||
@@ -76,28 +76,7 @@
|
||||
flame_turf(turflist)
|
||||
|
||||
/obj/item/flamethrower/attackby(obj/item/I, mob/user, params)
|
||||
if(iswrench(I) && !status)//Taking this apart
|
||||
var/turf/T = get_turf(src)
|
||||
if(weldtool)
|
||||
weldtool.forceMove(T)
|
||||
weldtool = null
|
||||
if(igniter)
|
||||
igniter.forceMove(T)
|
||||
igniter = null
|
||||
if(ptank)
|
||||
ptank.forceMove(T)
|
||||
ptank = null
|
||||
new /obj/item/stack/rods(T)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
else if(isscrewdriver(I) && igniter && !lit)
|
||||
status = !status
|
||||
to_chat(user, "<span class='notice'>[igniter] is now [status ? "secured" : "unsecured"]!</span>")
|
||||
update_icon()
|
||||
return
|
||||
|
||||
else if(isigniter(I))
|
||||
if(isigniter(I))
|
||||
var/obj/item/assembly/igniter/IG = I
|
||||
if(IG.secured)
|
||||
return
|
||||
@@ -130,6 +109,34 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/flamethrower/wrench_act(mob/user, obj/item/I)
|
||||
if(status)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
return
|
||||
var/turf/T = get_turf(src)
|
||||
if(weldtool)
|
||||
weldtool.forceMove(T)
|
||||
weldtool = null
|
||||
if(igniter)
|
||||
igniter.forceMove(T)
|
||||
igniter = null
|
||||
if(ptank)
|
||||
ptank.forceMove(T)
|
||||
ptank = null
|
||||
new /obj/item/stack/rods(T)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/flamethrower/screwdriver_act(mob/user, obj/item/I)
|
||||
if(!igniter || lit)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
return
|
||||
status = !status
|
||||
to_chat(user, "<span class='notice'>[igniter] is now [status ? "secured" : "unsecured"]!</span>")
|
||||
update_icon()
|
||||
|
||||
/obj/item/flamethrower/attack_self(mob/user)
|
||||
toggle_igniter(user)
|
||||
@@ -168,7 +175,6 @@
|
||||
..()
|
||||
weldtool = locate(/obj/item/weldingtool) in contents
|
||||
igniter = locate(/obj/item/assembly/igniter) in contents
|
||||
weldtool.status = FALSE
|
||||
igniter.secured = FALSE
|
||||
status = TRUE
|
||||
update_icon()
|
||||
@@ -216,7 +222,6 @@
|
||||
if(create_full)
|
||||
if(!weldtool)
|
||||
weldtool = new /obj/item/weldingtool(src)
|
||||
weldtool.status = FALSE
|
||||
if(!igniter)
|
||||
igniter = new igniter_type(src)
|
||||
igniter.secured = FALSE
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
var/cores = "" // Also for logging
|
||||
|
||||
/obj/item/grenade/chem_grenade/New()
|
||||
..()
|
||||
create_reagents(1000)
|
||||
if(payload_name)
|
||||
payload_name += " " // formatting, ignore me
|
||||
@@ -387,18 +388,18 @@
|
||||
origin_tech = "combat=3;engineering=4"
|
||||
var/unit_spread = 10 // Amount of units per repeat. Can be altered with a multitool.
|
||||
|
||||
/obj/item/grenade/chem_grenade/adv_release/attackby(obj/item/I, mob/user, params)
|
||||
if(ismultitool(I))
|
||||
switch(unit_spread)
|
||||
if(0 to 24)
|
||||
unit_spread += 5
|
||||
if(25 to 99)
|
||||
unit_spread += 25
|
||||
else
|
||||
unit_spread = 5
|
||||
to_chat(user, "<span class='notice'> You set the time release to [unit_spread] units per detonation.</span>")
|
||||
/obj/item/grenade/chem_grenade/adv_release/multitool_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
return
|
||||
..()
|
||||
switch(unit_spread)
|
||||
if(0 to 24)
|
||||
unit_spread += 5
|
||||
if(25 to 99)
|
||||
unit_spread += 25
|
||||
else
|
||||
unit_spread = 5
|
||||
to_chat(user, "<span class='notice'> You set the time release to [unit_spread] units per detonation.</span>")
|
||||
|
||||
/obj/item/grenade/chem_grenade/adv_release/prime()
|
||||
if(stage != READY)
|
||||
|
||||
@@ -47,4 +47,5 @@
|
||||
hitsound = 'sound/weapons/pierce.ogg'
|
||||
|
||||
/obj/item/embedded/shrapnel/New()
|
||||
..()
|
||||
icon_state = pick("shrapnel1", "shrapnel2", "shrapnel3")
|
||||
|
||||
@@ -556,6 +556,7 @@
|
||||
var/faith = 99 //a conversion requires 100 faith to attempt. faith recharges over time while you are wearing missionary robes that have been linked to the staff.
|
||||
|
||||
/obj/item/nullrod/missionary_staff/New()
|
||||
..()
|
||||
team_color = pick("red", "blue")
|
||||
icon_state = "godstaff-[team_color]"
|
||||
item_state = "godstaff-[team_color]"
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
return -1
|
||||
|
||||
mindslave_target.implanting = 1
|
||||
to_chat(mindslave_target, "<span class='notice'>You feel completely loyal to [user.name].</span>")
|
||||
to_chat(mindslave_target, "<span class='danger'>You feel completely loyal to [user.name].</span>")
|
||||
if(!(user.mind in SSticker.mode.implanter))
|
||||
SSticker.mode.implanter[user.mind] = list()
|
||||
implanters = SSticker.mode.implanter[user.mind]
|
||||
@@ -57,7 +57,7 @@
|
||||
SSticker.mode.implanted[mindslave_target.mind] = user.mind
|
||||
SSticker.mode.implanter[user.mind] = implanters
|
||||
|
||||
to_chat(mindslave_target, "<span class='warning'><B>You're now completely loyal to [user.name]!</B> You now must lay down your life to protect [user.p_them()] and assist in [user.p_their()] goals at any cost.</span>")
|
||||
to_chat(mindslave_target, "<span class='danger'><B>You're now completely loyal to [user.name]!</B> You now must lay down your life to protect [user.p_them()] and assist in [user.p_their()] goals at any cost.</span>")
|
||||
|
||||
var/datum/objective/protect/mindslave/MS = new
|
||||
MS.owner = mindslave_target.mind
|
||||
|
||||
@@ -36,11 +36,11 @@
|
||||
var/max_contents = 1
|
||||
|
||||
/obj/item/kitchen/utensil/New()
|
||||
..()
|
||||
if(prob(60))
|
||||
src.pixel_y = rand(0, 4)
|
||||
|
||||
create_reagents(5)
|
||||
return
|
||||
|
||||
/obj/item/kitchen/utensil/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
if(!istype(M))
|
||||
|
||||
@@ -26,10 +26,11 @@
|
||||
icon_off = "zippo"
|
||||
|
||||
/obj/item/lighter/random/New()
|
||||
var/color = pick("r","c","y","g")
|
||||
icon_on = "lighter-[color]-on"
|
||||
icon_off = "lighter-[color]"
|
||||
icon_state = icon_off
|
||||
..()
|
||||
var/color = pick("r","c","y","g")
|
||||
icon_on = "lighter-[color]-on"
|
||||
icon_off = "lighter-[color]"
|
||||
icon_state = icon_off
|
||||
|
||||
/obj/item/lighter/attack_self(mob/living/user)
|
||||
if(user.r_hand == src || user.l_hand == src || isrobot(user))
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<iframe width='100%' height='97%' src="https://Nanotrasen.se/wiki/index.php?title=Guide_to_Construction&printable=yes&remove_links=1" frameborder="0" id="main_frame"></iframe>
|
||||
<iframe width='100%' height='97%' src="https://www.paradisestation.org/wiki/index.php?title=Guide_to_Construction&printable=yes&remove_links=1" frameborder="0" id="main_frame"></iframe>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -164,7 +164,7 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<iframe width='100%' height='97%' src="https://Nanotrasen.se/wiki/index.php?title=Hacking&printable=yes&remove_links=1" frameborder="0" id="main_frame"></iframe>
|
||||
<iframe width='100%' height='97%' src="https://www.paradisestation.org/wiki/index.php?title=Hacking&printable=yes&remove_links=1" frameborder="0" id="main_frame"></iframe>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -805,7 +805,7 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<iframe width='100%' height='97%' src="https://Nanotrasen.se/wiki/index.php?title=Space_law&printable=yes&remove_links=1" frameborder="0" id="main_frame"></iframe> </body>
|
||||
<iframe width='100%' height='97%' src="https://www.paradisestation.org/wiki/index.php?title=Space_law&printable=yes&remove_links=1" frameborder="0" id="main_frame"></iframe> </body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -828,7 +828,7 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<iframe width='100%' height='97%' src="https://Nanotrasen.se/wiki/index.php?title=Guide_to_Engineering&printable=yes&remove_links=1" frameborder="0" id="main_frame"></iframe> </body>
|
||||
<iframe width='100%' height='97%' src="https://www.paradisestation.org/wiki/index.php?title=Guide_to_Engineering&printable=yes&remove_links=1" frameborder="0" id="main_frame"></iframe> </body>
|
||||
|
||||
</html>
|
||||
|
||||
|
||||
@@ -119,6 +119,7 @@
|
||||
var/hacked = 0
|
||||
|
||||
/obj/item/melee/energy/sword/New()
|
||||
..()
|
||||
if(item_color == null)
|
||||
item_color = pick("red", "blue", "green", "purple")
|
||||
|
||||
@@ -219,9 +220,6 @@
|
||||
icon_state_on = "cutlass1"
|
||||
light_color = LIGHT_COLOR_RED
|
||||
|
||||
/obj/item/melee/energy/sword/pirate/New()
|
||||
return
|
||||
|
||||
/obj/item/melee/energy/blade
|
||||
name = "energy blade"
|
||||
desc = "A concentrated beam of energy in the shape of a blade. Very stylish... and lethal."
|
||||
|
||||
@@ -90,7 +90,8 @@
|
||||
desc = "test lightning"
|
||||
|
||||
/obj/item/lightning/New()
|
||||
icon_state = "1"
|
||||
..()
|
||||
icon_state = "1"
|
||||
|
||||
/obj/item/lightning/afterattack(atom/A as mob|obj|turf|area, mob/living/user as mob|obj, flag, params)
|
||||
var/angle = get_angle(A, user)
|
||||
|
||||
@@ -138,8 +138,7 @@
|
||||
/datum/crafting_recipe/improvised_pneumatic_cannon //Pretty easy to obtain but
|
||||
name = "Pneumatic Cannon"
|
||||
result = /obj/item/pneumatic_cannon/ghetto
|
||||
tools = list(/obj/item/weldingtool,
|
||||
/obj/item/wrench)
|
||||
tools = list(TOOL_WELDER, TOOL_WRENCH)
|
||||
reqs = list(/obj/item/stack/sheet/metal = 4,
|
||||
/obj/item/stack/packageWrap = 8,
|
||||
/obj/item/pipe = 2)
|
||||
|
||||
@@ -37,20 +37,29 @@
|
||||
to_chat(user, "<span class='warning'>[IT] is too small for [src].</span>")
|
||||
return
|
||||
updateTank(W, 0, user)
|
||||
else if(iswrench(W))
|
||||
switch(fisto_setting)
|
||||
if(1)
|
||||
fisto_setting = 2
|
||||
if(2)
|
||||
fisto_setting = 3
|
||||
if(3)
|
||||
fisto_setting = 1
|
||||
playsound(loc, W.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You tweak [src]'s piston valve to [fisto_setting].</span>")
|
||||
else if(isscrewdriver(W))
|
||||
if(tank)
|
||||
updateTank(tank, 1, user)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/melee/powerfist/wrench_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
return
|
||||
switch(fisto_setting)
|
||||
if(1)
|
||||
fisto_setting = 2
|
||||
if(2)
|
||||
fisto_setting = 3
|
||||
if(3)
|
||||
fisto_setting = 1
|
||||
to_chat(user, "<span class='notice'>You tweak [src]'s piston valve to [fisto_setting].</span>")
|
||||
|
||||
/obj/item/melee/powerfist/screwdriver_act(mob/user, obj/item/I)
|
||||
if(!tank)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
return
|
||||
updateTank(tank, 1, user)
|
||||
|
||||
/obj/item/melee/powerfist/proc/updateTank(obj/item/tank/thetank, removing = 0, mob/living/carbon/human/user)
|
||||
if(removing)
|
||||
|
||||
@@ -27,57 +27,11 @@
|
||||
return
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
//see code/modules/mob/new_player/preferences.dm at approx line 545 for comments!
|
||||
//this is largely copypasted from there.
|
||||
//handle facial hair (if necessary)
|
||||
var/list/species_facial_hair = list()
|
||||
var/obj/item/organ/external/head/C = H.get_organ("head")
|
||||
var/datum/robolimb/robohead = all_robolimbs[C.model]
|
||||
if(H.gender == MALE || isvulpkanin(H))
|
||||
if(C.dna.species)
|
||||
for(var/i in GLOB.facial_hair_styles_list)
|
||||
var/datum/sprite_accessory/facial_hair/tmp_facial = GLOB.facial_hair_styles_list[i]
|
||||
if(C.dna.species.name in tmp_facial.species_allowed) //If the species is allowed to have the style, add the style to the list. Or, if the character has a prosthetic head, give them the human hair styles.
|
||||
if(C.dna.species.bodyflags & ALL_RPARTS) //If the character is of a species that can have full body prosthetics and their head doesn't suport human hair 'wigs', don't add the style to the list.
|
||||
if(robohead.is_monitor)
|
||||
to_chat(user, "<span class='warning'>You are unable to find anything on [H]'s face worth cutting. How disappointing.</span>")
|
||||
return
|
||||
continue //If the head DOES support human hair wigs, make sure they don't get monitor-oriented styles.
|
||||
species_facial_hair += i
|
||||
else
|
||||
if(C.dna.species.bodyflags & ALL_RPARTS) //If the target is of a species that can have prosthetic heads, and the head supports human hair 'wigs' AND the hair-style is human-suitable, add it to the list.
|
||||
if(!robohead.is_monitor)
|
||||
if("Human" in tmp_facial.species_allowed)
|
||||
species_facial_hair += i
|
||||
else //Otherwise, they won't be getting any hairstyles.
|
||||
to_chat(user, "<span class='warning'>You are unable to find anything on [H]'s face worth cutting. How disappointing.</span>")
|
||||
return
|
||||
else
|
||||
species_facial_hair = GLOB.facial_hair_styles_list
|
||||
var/f_new_style = input(user, "Select a facial hair style", "Grooming") as null|anything in species_facial_hair
|
||||
//facial hair
|
||||
var/f_new_style = input(user, "Select a facial hair style", "Grooming") as null|anything in H.generate_valid_facial_hairstyles()
|
||||
//handle normal hair
|
||||
var/list/species_hair = list()
|
||||
if(C.dna.species)
|
||||
for(var/i in GLOB.hair_styles_public_list)
|
||||
var/datum/sprite_accessory/hair/tmp_hair = GLOB.hair_styles_public_list[i]
|
||||
if(C.dna.species.name in tmp_hair.species_allowed) //If the species is allowed to have the style, add the style to the list. Or, if the character has a prosthetic head, give them the human facial hair styles.
|
||||
if(C.dna.species.bodyflags & ALL_RPARTS) //If the character is of a species that can have full body prosthetics and their head doesn't suport human hair 'wigs', don't add the style to the list.
|
||||
if(robohead.is_monitor)
|
||||
to_chat(user, "<span class='warning'>You are unable to find anything on [H]'s head worth cutting. How disappointing.</span>")
|
||||
return
|
||||
continue //If the head DOES support human hair wigs, make sure they don't get monitor-oriented styles.
|
||||
species_hair += i
|
||||
else
|
||||
if(C.dna.species.bodyflags & ALL_RPARTS) //If the target is of a species that can have prosthetic heads, and the head supports human hair 'wigs' AND the hair-style is human-suitable, add it to the list.
|
||||
if(!robohead.is_monitor)
|
||||
if("Human" in tmp_hair.species_allowed)
|
||||
species_hair += i
|
||||
else //Otherwise, they won't be getting any hairstyles.
|
||||
to_chat(user, "<span class='warning'>You are unable to find anything on [H]'s head worth cutting. How disappointing.</span>")
|
||||
return
|
||||
else
|
||||
species_hair = GLOB.hair_styles_public_list
|
||||
var/h_new_style = input(user, "Select a hair style", "Grooming") as null|anything in species_hair
|
||||
var/h_new_style = input(user, "Select a hair style", "Grooming") as null|anything in H.generate_valid_hairstyles()
|
||||
user.visible_message("<span class='notice'>[user] starts cutting [M]'s hair!</span>", "<span class='notice'>You start cutting [M]'s hair!</span>") //arguments for this are: 1. what others see 2. what the user sees. --Fixed grammar, (TGameCo)
|
||||
playsound(loc, 'sound/goonstation/misc/scissor.ogg', 100, 1)
|
||||
if(do_after(user, 50 * toolspeed, target = H)) //this is the part that adds a delay. delay is in deciseconds. --Made it 5 seconds, because hair isn't cut in one second in real life, and I want at least a little bit longer time, (TGameCo)
|
||||
|
||||
@@ -60,26 +60,27 @@
|
||||
H.UpdateDamageIcon()
|
||||
|
||||
/obj/item/shard/attackby(obj/item/I, mob/user, params)
|
||||
if(iswelder(I))
|
||||
var/obj/item/weldingtool/WT = I
|
||||
if(WT.remove_fuel(0, user))
|
||||
var/obj/item/stack/sheet/NG = new welded_type(user.loc)
|
||||
for(var/obj/item/stack/sheet/G in user.loc)
|
||||
if(!istype(G, welded_type))
|
||||
continue
|
||||
if(G == NG)
|
||||
continue
|
||||
if(G.amount >= G.max_amount)
|
||||
continue
|
||||
G.attackby(NG, user)
|
||||
to_chat(user, "<span class='notice'>You add the newly-formed glass to the stack. It now contains [NG.amount] sheet\s.</span>")
|
||||
qdel(src)
|
||||
return
|
||||
if(istype(I, /obj/item/lightreplacer))
|
||||
I.attackby(src, user)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/shard/welder_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, volume = I.tool_volume))
|
||||
return
|
||||
var/obj/item/stack/sheet/NG = new welded_type(user.loc)
|
||||
for(var/obj/item/stack/sheet/G in user.loc)
|
||||
if(!istype(G, welded_type))
|
||||
continue
|
||||
if(G == NG)
|
||||
continue
|
||||
if(G.amount >= G.max_amount)
|
||||
continue
|
||||
G.attackby(NG, user)
|
||||
to_chat(user, "<span class='notice'>You add the newly-formed glass to the stack. It now contains [NG.amount] sheet\s.</span>")
|
||||
qdel(src)
|
||||
|
||||
/obj/item/shard/Crossed(mob/living/L, oldloc)
|
||||
if(istype(L) && has_gravity(loc))
|
||||
if(L.incorporeal_move || L.flying)
|
||||
@@ -95,4 +96,4 @@
|
||||
icon_state = "plasmalarge"
|
||||
materials = list(MAT_PLASMA = MINERAL_MATERIAL_AMOUNT * 0.5, MAT_GLASS = MINERAL_MATERIAL_AMOUNT)
|
||||
icon_prefix = "plasma"
|
||||
welded_type = /obj/item/stack/sheet/plasmaglass
|
||||
welded_type = /obj/item/stack/sheet/plasmaglass
|
||||
|
||||
@@ -68,6 +68,7 @@
|
||||
usesound = 'sound/items/deconstruct.ogg'
|
||||
|
||||
/obj/item/stock_parts/New()
|
||||
..()
|
||||
src.pixel_x = rand(-5.0, 5)
|
||||
src.pixel_y = rand(-5.0, 5)
|
||||
|
||||
|
||||
@@ -61,10 +61,6 @@
|
||||
cant_hold = list(/obj/item/storage/backpack/holding)
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 60, "acid" = 50)
|
||||
|
||||
/obj/item/storage/backpack/holding/New()
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/storage/backpack/holding/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/storage/backpack/holding))
|
||||
var/response = alert(user, "This creates a singularity, destroying you and much of the station. Are you SURE?","IMMINENT DEATH!", "No", "Yes")
|
||||
@@ -373,6 +369,10 @@
|
||||
new /obj/item/clothing/under/rank/miner/lavaland(src)
|
||||
new /obj/item/encryptionkey/headset_cargo(src)
|
||||
new /obj/item/clothing/mask/gas/explorer(src)
|
||||
new /obj/item/gun/energy/kinetic_accelerator(src)
|
||||
new /obj/item/kitchen/knife/combat/survival(src)
|
||||
new /obj/item/flashlight/seclite(src)
|
||||
new /obj/item/clothing/suit/hooded/explorer(src)
|
||||
|
||||
|
||||
/obj/item/storage/backpack/duffel/syndie/ammo/smg
|
||||
|
||||
@@ -396,7 +396,7 @@
|
||||
..()
|
||||
new /obj/item/lightreplacer(src)
|
||||
new /obj/item/holosign_creator(src)
|
||||
new /obj/item/reagent_containers/spray(src)
|
||||
new /obj/item/reagent_containers/spray/cleaner(src)
|
||||
new /obj/item/soap(src)
|
||||
new /obj/item/grenade/chem_grenade/cleaner(src)
|
||||
new /obj/item/grenade/chem_grenade/cleaner(src)
|
||||
|
||||
@@ -1099,6 +1099,7 @@
|
||||
desc = "Contains a variety of deluxe stock parts."
|
||||
|
||||
/obj/item/storage/box/stockparts/deluxe/New()
|
||||
..()
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/stock_parts/capacitor/quadratic(src)
|
||||
new /obj/item/stock_parts/scanning_module/triphasic(src)
|
||||
|
||||
@@ -48,19 +48,7 @@
|
||||
stored_gun.afterattack(A, user, flag, params)
|
||||
|
||||
/obj/item/storage/briefcase/false_bottomed/attackby(var/obj/item/I, mob/user)
|
||||
if(isscrewdriver(I))
|
||||
if(!bottom_open && !busy_hunting)
|
||||
to_chat(user, "You begin to hunt around the rim of the [src]...")
|
||||
busy_hunting = TRUE
|
||||
if(do_after(user, 20, target = src))
|
||||
if(user)
|
||||
to_chat(user, "You pry open the false bottom!")
|
||||
bottom_open = TRUE
|
||||
busy_hunting = FALSE
|
||||
else if(bottom_open)
|
||||
to_chat(user, "You push the false bottom down and close it with a click[stored_item ? ", with the [stored_item] snugly inside." : "."]")
|
||||
bottom_open = FALSE
|
||||
else if(bottom_open)
|
||||
if(bottom_open)
|
||||
if(stored_item)
|
||||
to_chat(user, "<span class='warning'>There's already something in the false bottom!</span>")
|
||||
return
|
||||
@@ -78,6 +66,24 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/briefcase/false_bottomed/screwdriver_act(mob/user, obj/item/I)
|
||||
if(!bottom_open && busy_hunting)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
return
|
||||
if(!bottom_open)
|
||||
to_chat(user, "You begin to hunt around the rim of the [src]...")
|
||||
busy_hunting = TRUE
|
||||
if(do_after(user, 20, target = src))
|
||||
if(user)
|
||||
to_chat(user, "You pry open the false bottom!")
|
||||
bottom_open = TRUE
|
||||
busy_hunting = FALSE
|
||||
else
|
||||
to_chat(user, "You push the false bottom down and close it with a click[stored_item ? ", with the [stored_item] snugly inside." : "."]")
|
||||
bottom_open = FALSE
|
||||
|
||||
/obj/item/storage/briefcase/false_bottomed/attack_hand(mob/user)
|
||||
if(bottom_open && stored_item)
|
||||
user.put_in_hands(stored_item)
|
||||
|
||||
@@ -70,9 +70,10 @@ Frequency:
|
||||
for(var/obj/item/implant/tracking/T in GLOB.tracked_implants)
|
||||
if(!T.implanted || !T.imp_in)
|
||||
continue
|
||||
var/turf/Tr = get_turf(T)
|
||||
|
||||
if(T && T.z == z)
|
||||
temp += "[T.id]: [T.imp_in.x], [T.imp_in.y], [T.imp_in.z]<BR>"
|
||||
if(Tr && Tr.z == sr.z)
|
||||
temp += "[T.id]: [Tr.x], [Tr.y], [Tr.z]<BR>"
|
||||
|
||||
temp += "<B>You are at \[[sr.x],[sr.y],[sr.z]\]</B>."
|
||||
temp += "<BR><BR><A href='byond://?src=[UID()];refresh=1'>Refresh</A><BR>"
|
||||
|
||||
@@ -240,6 +240,7 @@
|
||||
var/colormap = list(red=LIGHT_COLOR_RED, blue=LIGHT_COLOR_LIGHTBLUE, green=LIGHT_COLOR_GREEN, purple=LIGHT_COLOR_PURPLE, rainbow=LIGHT_COLOR_WHITE)
|
||||
|
||||
/obj/item/twohanded/dualsaber/New()
|
||||
..()
|
||||
if(!blade_color)
|
||||
blade_color = pick("red", "blue", "green", "purple")
|
||||
|
||||
@@ -311,17 +312,17 @@
|
||||
hitsound = 'sound/weapons/blade1.ogg'
|
||||
w_class = w_class_on
|
||||
|
||||
/obj/item/twohanded/dualsaber/attackby(obj/item/W, mob/user, params)
|
||||
if(ismultitool(W))
|
||||
if(!hacked)
|
||||
hacked = TRUE
|
||||
to_chat(user, "<span class='warning'>2XRNBW_ENGAGE</span>")
|
||||
blade_color = "rainbow"
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>It's starting to look like a triple rainbow - no, nevermind.</span>")
|
||||
/obj/item/twohanded/dualsaber/multitool_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
return
|
||||
if(!hacked)
|
||||
hacked = TRUE
|
||||
to_chat(user, "<span class='warning'>2XRNBW_ENGAGE</span>")
|
||||
blade_color = "rainbow"
|
||||
update_icon()
|
||||
else
|
||||
return ..()
|
||||
to_chat(user, "<span class='warning'>It's starting to look like a triple rainbow - no, nevermind.</span>")
|
||||
|
||||
//spears
|
||||
/obj/item/twohanded/spear
|
||||
|
||||
@@ -271,6 +271,38 @@ a {
|
||||
user.set_machine(src)
|
||||
onclose(user, "mtcomputer")
|
||||
|
||||
/obj/proc/default_welder_repair(mob/user, obj/item/I) //Returns TRUE if the object was successfully repaired. Fully repairs an object (setting BROKEN to FALSE), default repair time = 40
|
||||
if(obj_integrity >= max_integrity)
|
||||
to_chat(user, "<span class='notice'>[src] does not need repairs.</span>")
|
||||
return
|
||||
if(I.tool_behaviour != TOOL_WELDER)
|
||||
return
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
var/time = max(50 * (1 - obj_integrity / max_integrity), 5)
|
||||
WELDER_ATTEMPT_REPAIR_MESSAGE
|
||||
if(I.use_tool(src, user, time, volume = I.tool_volume))
|
||||
WELDER_REPAIR_SUCCESS_MESSAGE
|
||||
obj_integrity = max_integrity
|
||||
update_icon()
|
||||
return TRUE
|
||||
|
||||
/obj/proc/default_unfasten_wrench(mob/user, obj/item/I, time = 20)
|
||||
if(!anchored && !isfloorturf(loc))
|
||||
user.visible_message("<span class='warning'>A floor must be present to secure [src]!</span>")
|
||||
return FALSE
|
||||
if(I.tool_behaviour != TOOL_WRENCH)
|
||||
return FALSE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return FALSE
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
to_chat(user, "<span class='notice'>Now [anchored ? "un" : ""]securing [name].</span>")
|
||||
if(I.use_tool(src, user, time, volume = I.tool_volume))
|
||||
to_chat(user, "<span class='notice'>You've [anchored ? "un" : ""]secured [name].</span>")
|
||||
anchored = !anchored
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/water_act(volume, temperature, source, method = TOUCH)
|
||||
. = ..()
|
||||
extinguish()
|
||||
|
||||
@@ -14,9 +14,7 @@
|
||||
var/locked = FALSE
|
||||
var/wall_mounted = 0 //never solid (You can always pass over it)
|
||||
var/lastbang
|
||||
var/cutting_tool = /obj/item/weldingtool
|
||||
var/sound = 'sound/machines/click.ogg'
|
||||
var/cutting_sound
|
||||
var/storage_capacity = 30 //This is so that someone can't pack hundreds of items in a locker/crate then open it in a populated area to crash clients.
|
||||
var/material_drop = /obj/item/stack/sheet/metal
|
||||
var/material_drop_amount = 2
|
||||
@@ -220,22 +218,6 @@
|
||||
MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
|
||||
if(istype(W,/obj/item/tk_grab))
|
||||
return FALSE
|
||||
if(istype(W, cutting_tool))
|
||||
if(istype(W, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if(!WT.remove_fuel(0, user))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You begin cutting \the [src] apart...</span>")
|
||||
playsound(loc, cutting_sound ? cutting_sound : WT.usesound, 40, 1)
|
||||
if(do_after(user, 40 * WT.toolspeed, 1, target = src))
|
||||
if(!opened || !WT.isOn())
|
||||
return
|
||||
playsound(loc, cutting_sound ? cutting_sound : WT.usesound, 50, 1)
|
||||
visible_message("<span class='notice'>[user] slices apart \the [src].</span>",
|
||||
"<span class='notice'>You cut \the [src] apart with \the [WT].</span>",
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
deconstruct(TRUE)
|
||||
return
|
||||
if(isrobot(user))
|
||||
return
|
||||
if(!user.drop_item()) //couldn't drop the item
|
||||
@@ -245,25 +227,36 @@
|
||||
W.forceMove(loc)
|
||||
else if(istype(W, /obj/item/stack/packageWrap))
|
||||
return
|
||||
else if(istype(W, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if(src == user.loc)
|
||||
to_chat(user, "<span class='notice'>You can not [welded?"unweld":"weld"] the locker from inside.</span>")
|
||||
return
|
||||
if(!WT.remove_fuel(0, user))
|
||||
to_chat(user, "<span class='notice'>You need more welding fuel to complete this task.</span>")
|
||||
return
|
||||
if(!do_after_once(user, 15, target = src))
|
||||
return
|
||||
welded = !welded
|
||||
update_icon()
|
||||
for(var/mob/M in viewers(src))
|
||||
M.show_message("<span class='warning'>[src] has been [welded?"welded shut":"unwelded"] by [user.name].</span>", 3, "You hear welding.", 2)
|
||||
else if(user.a_intent != INTENT_HARM)
|
||||
attack_hand(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/welder_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!opened && user.loc == src)
|
||||
to_chat(user, "<span class='warning'>You can't weld [src] from inside!</span>")
|
||||
return
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
if(opened)
|
||||
WELDER_ATTEMPT_SLICING_MESSAGE
|
||||
if(I.use_tool(src, user, 40, volume = I.tool_volume))
|
||||
WELDER_SLICING_SUCCESS_MESSAGE
|
||||
deconstruct(TRUE)
|
||||
return
|
||||
else
|
||||
var/adjective = welded ? "open" : "shut"
|
||||
user.visible_message("<span class='notice'>[user] begins welding [src] [adjective]...</span>", "<span class='notice'>You begin welding [src] [adjective]...</span>", "<span class='warning'>You hear welding.</span>")
|
||||
if(I.use_tool(src, user, 15, volume = I.tool_volume))
|
||||
if(opened)
|
||||
to_chat(user, "<span class='notice'>Keep [src] shut while doing that!</span>")
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] welds [src] [adjective]!</span>", "<span class='notice'>You weld [src] [adjective]!</span>")
|
||||
welded = !welded
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/structure/closet/MouseDrop_T(atom/movable/O, mob/user)
|
||||
..()
|
||||
if(istype(O, /obj/screen)) //fix for HUD elements making their way into the world -Pete
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
sound = 'sound/effects/rustle2.ogg'
|
||||
material_drop = /obj/item/stack/sheet/cardboard
|
||||
var/amt = 4
|
||||
cutting_sound = 'sound/items/poster_ripped.ogg'
|
||||
var/move_delay = 0
|
||||
var/egged = 0
|
||||
|
||||
@@ -58,11 +57,11 @@
|
||||
I.alpha = 0
|
||||
animate(I, pixel_z = 32, alpha = 255, time = 5, easing = ELASTIC_EASING)
|
||||
|
||||
/obj/structure/closet/cardboard/welder_act()
|
||||
return
|
||||
|
||||
/obj/structure/closet/cardboard/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(src.opened)
|
||||
if(istype(W, /obj/item/weldingtool))
|
||||
return
|
||||
if(istype(W, /obj/item/wirecutters))
|
||||
var/obj/item/wirecutters/WC = W
|
||||
new /obj/item/stack/sheet/cardboard(src.loc, amt)
|
||||
|
||||
@@ -196,4 +196,7 @@
|
||||
return
|
||||
|
||||
/obj/structure/closet/fireaxecabinet/close()
|
||||
return
|
||||
return
|
||||
|
||||
/obj/structure/closet/fireaxecabinet/welder_act(mob/user, obj/item/I) //A bastion of sanity in a sea of madness
|
||||
return
|
||||
|
||||
@@ -92,6 +92,9 @@
|
||||
shatter(M)
|
||||
..()
|
||||
|
||||
/obj/structure/closet/statue/welder_act()
|
||||
return
|
||||
|
||||
/obj/structure/closet/statue/MouseDrop_T()
|
||||
return
|
||||
|
||||
|
||||
@@ -104,6 +104,7 @@
|
||||
icon_opened = "toolclosetopen"
|
||||
|
||||
/obj/structure/closet/toolcloset/New()
|
||||
..()
|
||||
if(prob(40))
|
||||
new /obj/item/clothing/suit/storage/hazardvest(src)
|
||||
if(prob(70))
|
||||
|
||||
@@ -185,6 +185,9 @@
|
||||
dump_contents()
|
||||
..()
|
||||
|
||||
/obj/structure/closet/crate/welder_act()
|
||||
return
|
||||
|
||||
/obj/structure/closet/crate/attack_hand(mob/user)
|
||||
if(manifest)
|
||||
to_chat(user, "<span class='notice'>You tear the manifest off of the crate.</span>")
|
||||
@@ -439,35 +442,11 @@
|
||||
icon_closed = "largebin"
|
||||
anchored = TRUE
|
||||
|
||||
/obj/structure/closet/crate/can/attackby(obj/item/W, mob/living/user, params)
|
||||
if(iswrench(W))
|
||||
add_fingerprint(user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if(anchored)
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] starts loosening [src]'s floor casters.", \
|
||||
"<span class='notice'>You start loosening [src]'s floor casters...</span>")
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
if(!loc || !anchored)
|
||||
return
|
||||
user.visible_message("[user] loosened [src]'s floor casters.", \
|
||||
"<span class='notice'>You loosen [src]'s floor casters.</span>")
|
||||
anchored = FALSE
|
||||
else
|
||||
if(!isfloorturf(loc))
|
||||
user.visible_message("<span class='warning'>A floor must be present to secure [src]!</span>")
|
||||
return
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] start securing [src]'s floor casters...", \
|
||||
"<span class='notice'>You start securing [src]'s floor casters...</span>")
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
if(!loc || anchored)
|
||||
return
|
||||
user.visible_message("[user] has secured [src]'s floor casters.", \
|
||||
"<span class='notice'>You have secured [src]'s floor casters.</span>")
|
||||
anchored = TRUE
|
||||
else
|
||||
return ..()
|
||||
/obj/structure/closet/crate/can/wrench_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
default_unfasten_wrench(user, I, 40)
|
||||
|
||||
/obj/structure/closet/crate/radiation
|
||||
desc = "A crate with a radiation sign on it."
|
||||
|
||||
@@ -41,34 +41,36 @@
|
||||
/obj/structure/curtain/attackby(obj/item/W, mob/user)
|
||||
if(istype(W, /obj/item/toy/crayon))
|
||||
color = input(user, "Choose Color") as color
|
||||
else if(isscrewdriver(W))
|
||||
if(anchored)
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("<span class='warning'>[user] unscrews [src] from the floor.</span>", "<span class='notice'>You start to unscrew [src] from the floor...</span>", "You hear rustling noises.")
|
||||
if(do_after(user, 50 * W.toolspeed, target = src))
|
||||
if(!anchored)
|
||||
return
|
||||
anchored = FALSE
|
||||
to_chat(user, "<span class='notice'>You unscrew [src] from the floor.</span>")
|
||||
else
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("<span class='warning'>[user] screws [src] to the floor.</span>", "<span class='notice'>You start to screw [src] to the floor...</span>", "You hear rustling noises.")
|
||||
if(do_after(user, 50 * W.toolspeed, target = src))
|
||||
if(anchored)
|
||||
return
|
||||
anchored = TRUE
|
||||
to_chat(user, "<span class='notice'>You screw [src] to the floor.</span>")
|
||||
else if(istype(W, /obj/item/wirecutters))
|
||||
if(!anchored)
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("<span class='warning'>[user] cuts apart [src].</span>", "<span class='notice'>You start to cut apart [src].</span>", "You hear cutting.")
|
||||
if(do_after(user, 50 * W.toolspeed, target = src))
|
||||
if(anchored)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You cut apart [src].</span>")
|
||||
deconstruct()
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/curtain/screwdriver_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.tool_start_check(user, 0))
|
||||
return
|
||||
if(anchored)
|
||||
user.visible_message("<span class='warning'>[user] unscrews [src] from the floor.</span>", "<span class='notice'>You start to unscrew [src] from the floor...</span>", "You hear rustling noises.")
|
||||
if(I.use_tool(src, user, 50, volume = I.tool_volume) && anchored)
|
||||
anchored = FALSE
|
||||
to_chat(user, "<span class='notice'>You unscrew [src] from the floor.</span>")
|
||||
else
|
||||
return ..()
|
||||
user.visible_message("<span class='warning'>[user] screws [src] to the floor.</span>", "<span class='notice'>You start to screw [src] to the floor...</span>", "You hear rustling noises.")
|
||||
if(I.use_tool(src, user, 50, volume = I.tool_volume) && !anchored)
|
||||
anchored = TRUE
|
||||
to_chat(user, "<span class='notice'>You screw [src] to the floor.</span>")
|
||||
|
||||
|
||||
|
||||
/obj/structure/curtain/wirecutter_act(mob/user, obj/item/I)
|
||||
if(anchored)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.tool_start_check(user, 0))
|
||||
return
|
||||
WIRECUTTER_ATTEMPT_DISMANTLE_MESSAGE
|
||||
if(I.use_tool(src, user, 50, volume = I.tool_volume))
|
||||
WIRECUTTER_DISMANTLE_SUCCESS_MESSAGE
|
||||
deconstruct()
|
||||
|
||||
/obj/structure/curtain/deconstruct(disassembled = TRUE)
|
||||
new /obj/item/stack/sheet/cloth(loc, 2)
|
||||
|
||||
@@ -37,21 +37,22 @@
|
||||
if(obj_integrity <= 0 && istype(depotarea))
|
||||
overload(TRUE)
|
||||
|
||||
/obj/structure/fusionreactor/attackby(obj/item/I, mob/user, params)
|
||||
if(iswrench(I))
|
||||
playsound(loc, I.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>The [src] is too well secured to the floor.</span>")
|
||||
return
|
||||
if(isscrewdriver(I))
|
||||
to_chat(user, "<span class='notice'>You try to screwdriver open [src], but accidentally release some radiation!</span>")
|
||||
if(prob(50))
|
||||
empulse(src, 4, 10)
|
||||
else
|
||||
for(var/mob/living/M in range(10, loc))
|
||||
M.apply_effect(rand(5, 25), IRRADIATE)
|
||||
/obj/structure/fusionreactor/screwdriver_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
return
|
||||
to_chat(user, "<span class='danger'>You try to screwdriver open [src], but accidentally release some radiation!</span>")
|
||||
if(prob(50))
|
||||
empulse(src, 4, 10)
|
||||
else
|
||||
return ..()
|
||||
for(var/mob/living/M in range(10, loc))
|
||||
M.apply_effect(rand(5, 25), IRRADIATE)
|
||||
|
||||
/obj/structure/fusionreactor/wrench_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>The [src] is too well secured to the floor.</span>")
|
||||
|
||||
/obj/structure/fusionreactor/proc/overload(containment_failure = FALSE, skip_qdel = FALSE)
|
||||
if(has_overloaded)
|
||||
|
||||
@@ -105,31 +105,6 @@
|
||||
toggle_lock(user)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Access denied.</span>")
|
||||
else if(iswelder(I) && user.a_intent == INTENT_HELP && !broken)
|
||||
var/obj/item/weldingtool/WT = I
|
||||
if(obj_integrity < max_integrity && WT.remove_fuel(5, user))
|
||||
to_chat(user, "<span class='notice'>You begin repairing [src].</span>")
|
||||
playsound(loc, WT.usesound, 40, 1)
|
||||
if(do_after(user, 40 * WT.toolspeed, target = src))
|
||||
obj_integrity = max_integrity
|
||||
playsound(loc, 'sound/items/welder2.ogg', 50, 1)
|
||||
update_icon()
|
||||
to_chat(user, "<span class='notice'>You repair [src].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] is already in good condition!</span>")
|
||||
return
|
||||
else if(!alert && iscrowbar(I) && openable) //Only applies to the lab cage and player made display cases
|
||||
if(broken)
|
||||
if(showpiece)
|
||||
to_chat(user, "<span class='notice'>Remove the displayed object first.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You remove the destroyed case</span>")
|
||||
qdel(src)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You start to [open ? "close":"open"] [src].</span>")
|
||||
if(do_after(user, 20 * I.toolspeed, target = src))
|
||||
to_chat(user, "<span class='notice'>You [open ? "close":"open"] [src].</span>")
|
||||
toggle_lock(user)
|
||||
else if(open && !showpiece)
|
||||
if(user.drop_item())
|
||||
I.forceMove(src)
|
||||
@@ -150,6 +125,30 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/displaycase/crowbar_act(mob/user, obj/item/I) //Only applies to the lab cage and player made display cases
|
||||
if(alert || !openable)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
if(broken)
|
||||
if(showpiece)
|
||||
to_chat(user, "<span class='notice'>Remove the displayed object first.</span>")
|
||||
if(I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
to_chat(user, "<span class='notice'>You remove the destroyed case</span>")
|
||||
qdel(src)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You start to [open ? "close":"open"] [src].</span>")
|
||||
if(!I.use_tool(src, user, 20, volume = I.tool_volume))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You [open ? "close":"open"] [src].</span>")
|
||||
toggle_lock(user)
|
||||
|
||||
obj/structure/displaycase/welder_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(default_welder_repair(user, I))
|
||||
broken = FALSE
|
||||
|
||||
/obj/structure/displaycase/proc/toggle_lock(mob/user)
|
||||
open = !open
|
||||
update_icon()
|
||||
@@ -180,15 +179,7 @@
|
||||
var/obj/item/airlock_electronics/electronics
|
||||
|
||||
/obj/structure/displaycase_chassis/attackby(obj/item/I, mob/user, params)
|
||||
if(iswrench(I)) //The player can only deconstruct the wooden frame
|
||||
to_chat(user, "<span class='notice'>You start disassembling [src]...</span>")
|
||||
playsound(src.loc, I.usesound, 50, 1)
|
||||
if(do_after(user, 30 * I.toolspeed, target = src))
|
||||
playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
new /obj/item/stack/sheet/wood(get_turf(src), 5)
|
||||
qdel(src)
|
||||
|
||||
else if(istype(I, /obj/item/airlock_electronics))
|
||||
if(istype(I, /obj/item/airlock_electronics))
|
||||
to_chat(user, "<span class='notice'>You start installing the electronics into [src]...</span>")
|
||||
playsound(src.loc, I.usesound, 50, 1)
|
||||
if(do_after(user, 30, target = src))
|
||||
@@ -217,6 +208,16 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/displaycase_chassis/wrench_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
TOOL_ATTEMPT_DISMANTLE_MESSAGE
|
||||
if(!I.use_tool(src, user, 30, volume = I.tool_volume))
|
||||
return
|
||||
TOOL_DISMANTLE_SUCCESS_MESSAGE
|
||||
new /obj/item/stack/sheet/wood(get_turf(src), 5)
|
||||
qdel(src)
|
||||
|
||||
//The lab cage and captains display case do not spawn with electronics, which is why req_access is needed.
|
||||
/obj/structure/displaycase/captain
|
||||
|
||||
@@ -63,58 +63,6 @@
|
||||
created_name = t
|
||||
return
|
||||
|
||||
else if(iswelder(W) && (mineral || glass || !anchored ))
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0, user))
|
||||
playsound(loc, WT.usesound, 50, 1)
|
||||
if(mineral)
|
||||
var/obj/item/stack/sheet/mineral/mineral_path = text2path("/obj/item/stack/sheet/mineral/[mineral]")
|
||||
user.visible_message("[user] welds the [mineral] plating off the airlock assembly.", "You start to weld the [mineral] plating off the airlock assembly...")
|
||||
if(do_after(user, 40 * WT.toolspeed, target = src))
|
||||
if(!src || !WT.isOn())
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You weld the [mineral] plating off.</span>")
|
||||
new mineral_path(loc, 2)
|
||||
var/obj/structure/door_assembly/PA = new previous_assembly(loc)
|
||||
transfer_assembly_vars(src, PA)
|
||||
|
||||
else if(glass)
|
||||
user.visible_message("[user] welds the glass panel out of the airlock assembly.", "You start to weld the glass panel out of the airlock assembly...")
|
||||
if(do_after(user, 40 * WT.toolspeed, target = src))
|
||||
if(!src || !WT.isOn())
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You weld the glass panel out.</span>")
|
||||
if(heat_proof_finished)
|
||||
new /obj/item/stack/sheet/rglass(get_turf(src))
|
||||
heat_proof_finished = FALSE
|
||||
else
|
||||
new /obj/item/stack/sheet/glass(get_turf(src))
|
||||
glass = FALSE
|
||||
else if(!anchored)
|
||||
user.visible_message("<span class='warning'>[user] disassembles the airlock assembly.</span>", \
|
||||
"You start to disassemble the airlock assembly...")
|
||||
if(do_after(user, 40 * WT.toolspeed, target = src))
|
||||
if(!src || !WT.isOn())
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You disassemble the airlock assembly.</span>")
|
||||
deconstruct(TRUE)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You need more welding fuel.</span>")
|
||||
return
|
||||
|
||||
else if(iswrench(W) && state == AIRLOCK_ASSEMBLY_NEEDS_WIRES)
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
if(anchored)
|
||||
user.visible_message("[user] unsecures the airlock assembly from the floor.", "You start to unsecure the airlock assembly from the floor...")
|
||||
else
|
||||
user.visible_message("[user] secures the airlock assembly to the floor.", "You start to secure the airlock assembly to the floor...")
|
||||
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
if(!src)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "un" : ""]secure the airlock assembly.</span>")
|
||||
anchored = !anchored
|
||||
|
||||
else if(iscoil(W) && state == AIRLOCK_ASSEMBLY_NEEDS_WIRES && anchored)
|
||||
var/obj/item/stack/cable_coil/coil = W
|
||||
if(coil.get_amount() < 1)
|
||||
@@ -128,17 +76,6 @@
|
||||
state = AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS
|
||||
to_chat(user, "<span class='notice'>You wire the airlock assembly.</span>")
|
||||
|
||||
else if(iswirecutter(W) && state == AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS)
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] cuts the wires from the airlock assembly.", "You start to cut the wires from airlock assembly...")
|
||||
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
if(state != AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You cut the wires from the airlock assembly.</span>")
|
||||
new/obj/item/stack/cable_coil(get_turf(user), 1)
|
||||
state = AIRLOCK_ASSEMBLY_NEEDS_WIRES
|
||||
|
||||
else if(istype(W, /obj/item/airlock_electronics) && state == AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS && W.icon_state != "door_electronics_smoked")
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] installs the electronics into the airlock assembly.", "You start to install electronics into the airlock assembly...")
|
||||
@@ -153,24 +90,6 @@
|
||||
name = "near finished airlock assembly"
|
||||
electronics = W
|
||||
|
||||
else if(iscrowbar(W) && state == AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER )
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to remove electronics from the airlock assembly...")
|
||||
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
if(state != AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You remove the airlock electronics.</span>")
|
||||
state = AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS
|
||||
name = "wired airlock assembly"
|
||||
var/obj/item/airlock_electronics/ae
|
||||
if(!electronics)
|
||||
ae = new/obj/item/airlock_electronics(loc)
|
||||
else
|
||||
ae = electronics
|
||||
electronics = null
|
||||
ae.forceMove(loc)
|
||||
|
||||
else if(istype(W, /obj/item/stack/sheet) && (!glass || !mineral))
|
||||
var/obj/item/stack/sheet/S = W
|
||||
if(S)
|
||||
@@ -210,41 +129,135 @@
|
||||
to_chat(user, "<span class='warning'>You cannot add [S] to [src]!</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You cannot add [S] to [src]!</span>")
|
||||
|
||||
else if(isscrewdriver(W) && state == AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER )
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] finishes the airlock.", \
|
||||
"<span class='notice'>You start finishing the airlock...</span>")
|
||||
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
if(loc && state == AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER)
|
||||
to_chat(user, "<span class='notice'>You finish the airlock.</span>")
|
||||
var/obj/machinery/door/airlock/door
|
||||
if(glass)
|
||||
door = new glass_type(loc)
|
||||
else
|
||||
door = new airlock_type(loc)
|
||||
door.setDir(dir)
|
||||
door.electronics = electronics
|
||||
door.unres_sides = electronics.unres_sides
|
||||
door.heat_proof = heat_proof_finished
|
||||
if(electronics.one_access)
|
||||
door.req_access = null
|
||||
door.req_one_access = electronics.conf_access
|
||||
else
|
||||
door.req_access = electronics.conf_access
|
||||
if(created_name)
|
||||
door.name = created_name
|
||||
else
|
||||
door.name = base_name
|
||||
door.previous_airlock = previous_assembly
|
||||
electronics.forceMove(door)
|
||||
qdel(src)
|
||||
else
|
||||
return ..()
|
||||
update_name()
|
||||
update_icon()
|
||||
|
||||
/obj/structure/door_assembly/crowbar_act(mob/user, obj/item/I)
|
||||
if(state != AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER )
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
user.visible_message("[user] is removing the electronics from the airlock assembly...", "You start to remove electronics from the airlock assembly...")
|
||||
if(!I.use_tool(src, user, 40, volume = I.tool_volume) || state != AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You remove the airlock electronics.</span>")
|
||||
state = AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS
|
||||
name = "wired airlock assembly"
|
||||
var/obj/item/airlock_electronics/ae
|
||||
if(!electronics)
|
||||
ae = new/obj/item/airlock_electronics(loc)
|
||||
else
|
||||
ae = electronics
|
||||
electronics = null
|
||||
ae.forceMove(loc)
|
||||
update_icon()
|
||||
update_name()
|
||||
|
||||
/obj/structure/door_assembly/screwdriver_act(mob/user, obj/item/I)
|
||||
if(state != AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER )
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
user.visible_message("[user] is finishing the airlock...", \
|
||||
"<span class='notice'>You start finishing the airlock...</span>")
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, 40, volume = I.tool_volume) || state != AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You finish the airlock.</span>")
|
||||
var/obj/machinery/door/airlock/door
|
||||
if(glass)
|
||||
door = new glass_type(loc)
|
||||
else
|
||||
door = new airlock_type(loc)
|
||||
door.setDir(dir)
|
||||
door.electronics = electronics
|
||||
door.unres_sides = electronics.unres_sides
|
||||
door.heat_proof = heat_proof_finished
|
||||
if(electronics.one_access)
|
||||
door.req_access = null
|
||||
door.req_one_access = electronics.conf_access
|
||||
else
|
||||
door.req_access = electronics.conf_access
|
||||
if(created_name)
|
||||
door.name = created_name
|
||||
else
|
||||
door.name = base_name
|
||||
door.previous_airlock = previous_assembly
|
||||
electronics.forceMove(door)
|
||||
qdel(src)
|
||||
update_icon()
|
||||
|
||||
/obj/structure/door_assembly/wirecutter_act(mob/user, obj/item/I)
|
||||
if(state != AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
user.visible_message("[user] is cutting the wires from the airlock assembly...", "You start to cut the wires from airlock assembly...")
|
||||
if(!I.use_tool(src, user, 40, volume = I.tool_volume) || state != AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You cut the wires from the airlock assembly.</span>")
|
||||
new/obj/item/stack/cable_coil(get_turf(user), 1)
|
||||
state = AIRLOCK_ASSEMBLY_NEEDS_WIRES
|
||||
update_icon()
|
||||
|
||||
/obj/structure/door_assembly/wrench_act(mob/user, obj/item/I)
|
||||
if(state != AIRLOCK_ASSEMBLY_NEEDS_WIRES)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
if(anchored)
|
||||
user.visible_message("[user] is unsecuring the airlock assembly from the floor...", "You start to unsecure the airlock assembly from the floor...")
|
||||
else
|
||||
user.visible_message("[user] is securing the airlock assembly to the floor...", "You start to secure the airlock assembly to the floor...")
|
||||
if(!I.use_tool(src, user, 40, volume = I.tool_volume) || state != AIRLOCK_ASSEMBLY_NEEDS_WIRES)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "un" : ""]secure the airlock assembly.</span>")
|
||||
anchored = !anchored
|
||||
|
||||
/obj/structure/door_assembly/welder_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
if(mineral)
|
||||
var/obj/item/stack/sheet/mineral/mineral_path = text2path("/obj/item/stack/sheet/mineral/[mineral]")
|
||||
visible_message("<span class='notice'>[user] welds the [mineral] plating off [src].</span>",\
|
||||
"<span class='notice'>You start to weld the [mineral] plating off [src]...</span>",\
|
||||
"<span class='warning'>You hear welding.</span>")
|
||||
if(!I.use_tool(src, user, 40, volume = I.tool_volume))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You weld the [mineral] plating off.</span>")
|
||||
new mineral_path(loc, 2)
|
||||
var/obj/structure/door_assembly/PA = new previous_assembly(loc)
|
||||
transfer_assembly_vars(src, PA)
|
||||
else if(glass)
|
||||
visible_message("<span class='notice'>[user] welds the glass panel out of [src].</span>",\
|
||||
"<span class='notice'>You start to weld the glass panel out of the [src]...</span>",\
|
||||
"<span class='warning'>You hear welding.</span>")
|
||||
if(!I.use_tool(src, user, 40, volume = I.tool_volume))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You weld the glass panel out.</span>")
|
||||
if(heat_proof_finished)
|
||||
new /obj/item/stack/sheet/rglass(get_turf(src))
|
||||
heat_proof_finished = FALSE
|
||||
else
|
||||
new /obj/item/stack/sheet/glass(get_turf(src))
|
||||
glass = FALSE
|
||||
else if(!anchored)
|
||||
visible_message("<span class='warning'>[user] disassembles [src].</span>", \
|
||||
"<span class='notice'>You start to disassemble [src]...</span>",\
|
||||
"<span class='warning'>You hear welding.</span>")
|
||||
if(!I.use_tool(src, user, 40, volume = I.tool_volume))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You disassemble the airlock assembly.</span>")
|
||||
deconstruct(TRUE)
|
||||
update_icon()
|
||||
|
||||
/obj/structure/door_assembly/update_icon()
|
||||
overlays.Cut()
|
||||
if(!glass)
|
||||
|
||||
@@ -53,41 +53,29 @@
|
||||
add_fingerprint(H)
|
||||
H.update_body()
|
||||
|
||||
/obj/structure/dresser/attackby(obj/item/W, mob/living/user, params)
|
||||
add_fingerprint(user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if(iswrench(W))
|
||||
if(anchored)
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] is loosening [src]'s bolts.", \
|
||||
"<span class='notice'>You are loosening [src]'s bolts...</span>")
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
if(!loc || !anchored)
|
||||
return
|
||||
user.visible_message("[user] loosened [src]'s bolts!", \
|
||||
"<span class='notice'>You loosen [src]'s bolts!</span>")
|
||||
anchored = 0
|
||||
else
|
||||
if(!isfloorturf(loc))
|
||||
user.visible_message("<span class='warning'>A floor must be present to secure [src]!</span>")
|
||||
return
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] is securing [src]'s bolts...", \
|
||||
"<span class='notice'>You are securing [src]'s bolts...</span>")
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
if(!loc || anchored)
|
||||
return
|
||||
user.visible_message("[user] has secured [src]'s bolts.", \
|
||||
"<span class='notice'>You have secured [src]'s bolts.</span>")
|
||||
anchored = 1
|
||||
|
||||
/obj/structure/dresser/crowbar_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.tool_start_check(user, 0))
|
||||
return
|
||||
if(iscrowbar(W) && !anchored)
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] is attempting to dismantle [src].", "<span class='notice'>You begin to dismantle [src]...</span>")
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
deconstruct()
|
||||
TOOL_ATTEMPT_DISMANTLE_MESSAGE
|
||||
if(I.use_tool(src, user, 50, volume = I.tool_volume))
|
||||
TOOL_DISMANTLE_SUCCESS_MESSAGE
|
||||
|
||||
|
||||
/obj/structure/dresser/wrench_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
return
|
||||
return ..()
|
||||
if(anchored)
|
||||
WRENCH_UNANCHOR_MESSAGE
|
||||
anchored = FALSE
|
||||
else
|
||||
if(!isfloorturf(loc))
|
||||
user.visible_message("<span class='warning'>A floor must be present to secure [src]!</span>")
|
||||
return
|
||||
WRENCH_ANCHOR_MESSAGE
|
||||
anchored = TRUE
|
||||
|
||||
/obj/structure/dresser/deconstruct(disassembled = TRUE)
|
||||
new /obj/item/stack/sheet/wood(drop_location(), 30)
|
||||
|
||||
@@ -77,25 +77,6 @@
|
||||
playsound(loc, 'sound/machines/click.ogg', 15, TRUE, -3)
|
||||
opened = !opened
|
||||
update_icon()
|
||||
else if(istype(O, /obj/item/weldingtool))
|
||||
if(has_extinguisher)
|
||||
to_chat(user, "<span class='warning'>You need to remove the extinguisher before deconstructing the cabinet!</span>")
|
||||
return
|
||||
if(!opened)
|
||||
to_chat(user, "<span class='warning'>Open the cabinet before cutting it apart!</span>")
|
||||
return
|
||||
var/obj/item/weldingtool/WT = O
|
||||
if(!WT.remove_fuel(0, user))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You begin cutting [src] apart...</span>")
|
||||
playsound(loc, WT.usesound, 40, 1)
|
||||
if(do_after(user, 40 * WT.toolspeed, 1, target = src))
|
||||
if(!src ||!opened || !WT.isOn()) // !src to prevent it being duped
|
||||
return
|
||||
visible_message("<span class='notice'>[user] slices apart [src].</span>",
|
||||
"<span class='notice'>You cut [src] apart with [WT].</span>",
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
deconstruct(TRUE)
|
||||
else if(user.a_intent != INTENT_HARM)
|
||||
playsound(loc, 'sound/machines/click.ogg', 15, TRUE, -3)
|
||||
opened = !opened
|
||||
@@ -103,6 +84,20 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/extinguisher_cabinet/welder_act(mob/user, obj/item/I)
|
||||
if(has_extinguisher)
|
||||
to_chat(user, "<span class='warning'>You need to remove the extinguisher before deconstructing [src]!</span>")
|
||||
return
|
||||
if(!opened)
|
||||
to_chat(user, "<span class='warning'>Open the cabinet before cutting it apart!</span>")
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
WELDER_ATTEMPT_SLICING_MESSAGE
|
||||
if(I.use_tool(src, user, 40, volume = I.tool_volume))
|
||||
WELDER_SLICING_SUCCESS_MESSAGE
|
||||
deconstruct(TRUE)
|
||||
|
||||
/obj/structure/extinguisher_cabinet/attack_hand(mob/user)
|
||||
if(isrobot(user) || isalien(user))
|
||||
|
||||
@@ -119,16 +119,20 @@
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] tightens some bolts on the wall.</span>", "<span class='warning'>You tighten the bolts on the wall.</span>")
|
||||
ChangeToWall()
|
||||
if(istype(W, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0,user))
|
||||
dismantle(user, TRUE)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You can't reach, close it first!</span>")
|
||||
|
||||
if(istype(W, /obj/item/gun/energy/plasmacutter) || istype(W, /obj/item/pickaxe/drill/diamonddrill) || istype(W, /obj/item/pickaxe/drill/jackhammer) || istype(W, /obj/item/melee/energy/blade))
|
||||
dismantle(user, TRUE)
|
||||
|
||||
/obj/structure/falsewall/welder_act(mob/user, obj/item/I)
|
||||
if(!density)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, volume = I.tool_volume))
|
||||
return
|
||||
dismantle(user, TRUE)
|
||||
|
||||
/obj/structure/falsewall/proc/dismantle(mob/user, disassembled = TRUE)
|
||||
user.visible_message("<span class='notice'>[user] dismantles the false wall.</span>", "<span class='warning'>You dismantle the false wall.</span>")
|
||||
playsound(src, 'sound/items/welder.ogg', 100, TRUE)
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
max_integrity = 200
|
||||
var/can_displace = TRUE //If the girder can be moved around by crowbarring it
|
||||
var/metalUsed = 2 //used to determine amount returned in deconstruction
|
||||
var/metal_type = /obj/item/stack/sheet/metal
|
||||
|
||||
/obj/structure/girder/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -27,7 +28,7 @@
|
||||
|
||||
/obj/structure/girder/proc/refundMetal(metalAmount) //refunds metal used in construction when deconstructed
|
||||
for(var/i=0;i < metalAmount;i++)
|
||||
new /obj/item/stack/sheet/metal(get_turf(src))
|
||||
new metal_type(get_turf(src))
|
||||
|
||||
/obj/structure/girder/temperature_expose(datum/gas_mixture/air, exposed_temperature)
|
||||
..()
|
||||
@@ -37,62 +38,7 @@
|
||||
|
||||
/obj/structure/girder/attackby(obj/item/W, mob/user, params)
|
||||
add_fingerprint(user)
|
||||
if(isscrewdriver(W))
|
||||
if(state == GIRDER_DISPLACED)
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("<span class='warning'>[user] disassembles the girder.</span>", \
|
||||
"<span class='notice'>You start to disassemble the girder...</span>", "You hear clanking and banging noises.")
|
||||
if(do_after(user, 40*W.toolspeed, target = src))
|
||||
if(state != GIRDER_DISPLACED)
|
||||
return
|
||||
state = GIRDER_DISASSEMBLED
|
||||
to_chat(user, "<span class='notice'>You disassemble the girder.</span>")
|
||||
var/obj/item/stack/sheet/metal/M = new(loc, 2)
|
||||
M.add_fingerprint(user)
|
||||
qdel(src)
|
||||
else if(state == GIRDER_REINF)
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
to_chat(user, "<span class='notice'>You start unsecuring support struts...</span>")
|
||||
if(do_after(user, 40*W.toolspeed, target = src))
|
||||
if(state != GIRDER_REINF)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You unsecure the support struts.</span>")
|
||||
state = GIRDER_REINF_STRUTS
|
||||
else if(state == GIRDER_REINF_STRUTS)
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
to_chat(user, "<span class='notice'>You start securing support struts...</span>")
|
||||
if(do_after(user, 40*W.toolspeed, target = src))
|
||||
if(state != GIRDER_REINF_STRUTS)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You secure the support struts.</span>")
|
||||
state = GIRDER_REINF
|
||||
|
||||
else if(iswrench(W))
|
||||
if(state == GIRDER_NORMAL)
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("<span class='warning'>[user] disassembles the girder.</span>", \
|
||||
"<span class='notice'>You start to disassemble the girder...</span>", "You hear clanking and banging noises.")
|
||||
if(do_after(user, 40*W.toolspeed, target = src))
|
||||
if(state != GIRDER_NORMAL)
|
||||
return
|
||||
state = GIRDER_DISASSEMBLED
|
||||
to_chat(user, "<span class='notice'>You disassemble the girder.</span>")
|
||||
var/obj/item/stack/sheet/metal/M = new(loc, 2)
|
||||
M.add_fingerprint(user)
|
||||
qdel(src)
|
||||
else if(state == GIRDER_DISPLACED)
|
||||
if(!isfloorturf(loc))
|
||||
to_chat(user, "<span class='warning'>A floor must be present to secure the girder!</span>")
|
||||
return
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
to_chat(user, "<span class='notice'>You start securing the girder...</span>")
|
||||
if(do_after(user, 40*W.toolspeed, target = src))
|
||||
to_chat(user, "<span class='notice'>You secure the girder.</span>")
|
||||
var/obj/structure/girder/G = new(loc)
|
||||
transfer_fingerprints_to(G)
|
||||
qdel(src)
|
||||
|
||||
else if(istype(W, /obj/item/gun/energy/plasmacutter))
|
||||
if(istype(W, /obj/item/gun/energy/plasmacutter))
|
||||
to_chat(user, "<span class='notice'>You start slicing apart the girder...</span>")
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
if(!src)
|
||||
@@ -113,28 +59,6 @@
|
||||
refundMetal(metalUsed)
|
||||
qdel(src)
|
||||
|
||||
else if(iswirecutter(W) && state == GIRDER_REINF_STRUTS)
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
to_chat(user, "<span class='notice'>You start removing the inner grille...</span>")
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
if(!src)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You remove the inner grille.</span>")
|
||||
new /obj/item/stack/sheet/plasteel(get_turf(src))
|
||||
var/obj/structure/girder/G = new (loc)
|
||||
transfer_fingerprints_to(G)
|
||||
qdel(src)
|
||||
|
||||
else if(iscrowbar(W))
|
||||
if(state == GIRDER_NORMAL && can_displace)
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
to_chat(user, "<span class='notice'>You start dislodging the girder...</span>")
|
||||
if(do_after(user, 40*W.toolspeed, target = src))
|
||||
to_chat(user, "<span class='notice'>You dislodge the girder.</span>")
|
||||
var/obj/structure/girder/displaced/D = new (loc)
|
||||
transfer_fingerprints_to(D)
|
||||
qdel(src)
|
||||
|
||||
else if(istype(W, /obj/item/stack))
|
||||
if(iswallturf(loc))
|
||||
to_chat(user, "<span class='warning'>There is already a wall present!</span>")
|
||||
@@ -342,6 +266,101 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/girder/crowbar_act(mob/user, obj/item/I)
|
||||
if(!can_displace || state != GIRDER_NORMAL)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start dislodging the girder...</span>")
|
||||
if(!I.use_tool(src, user, 40, volume = I.tool_volume) || state != GIRDER_NORMAL)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You dislodge the girder.</span>")
|
||||
var/obj/structure/girder/displaced/D = new (loc)
|
||||
transfer_fingerprints_to(D)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/girder/screwdriver_act(mob/user, obj/item/I)
|
||||
if(state != GIRDER_DISPLACED && state != GIRDER_REINF && state != GIRDER_REINF_STRUTS)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
switch(state)
|
||||
if(GIRDER_DISPLACED)
|
||||
TOOL_ATTEMPT_DISMANTLE_MESSAGE
|
||||
if(!I.use_tool(src, user, 40, volume = I.tool_volume) || state != GIRDER_DISPLACED)
|
||||
return
|
||||
state = GIRDER_DISASSEMBLED
|
||||
TOOL_DISMANTLE_SUCCESS_MESSAGE
|
||||
var/obj/item/stack/sheet/metal/M = new(loc, 2)
|
||||
M.add_fingerprint(user)
|
||||
qdel(src)
|
||||
if(GIRDER_REINF)
|
||||
to_chat(user, "<span class='notice'>You start unsecuring support struts...</span>")
|
||||
if(!I.use_tool(src, user, 40, volume = I.tool_volume) || state != GIRDER_REINF)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You unsecure the support struts.</span>")
|
||||
state = GIRDER_REINF_STRUTS
|
||||
if(GIRDER_REINF_STRUTS)
|
||||
to_chat(user, "<span class='notice'>You start securing support struts...</span>")
|
||||
if(!I.use_tool(src, user, 40, volume = I.tool_volume) || state != GIRDER_REINF_STRUTS)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You secure the support struts.</span>")
|
||||
state = GIRDER_REINF
|
||||
|
||||
/obj/structure/girder/wirecutter_act(mob/user, obj/item/I)
|
||||
if(state != GIRDER_REINF_STRUTS)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start removing the inner grille...</span>")
|
||||
if(!I.use_tool(src, user, 40, volume = I.tool_volume) || state != GIRDER_REINF_STRUTS)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You remove the inner grille.</span>")
|
||||
new /obj/item/stack/sheet/plasteel(get_turf(src))
|
||||
var/obj/structure/girder/G = new (loc)
|
||||
transfer_fingerprints_to(G)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/girder/wrench_act(mob/user, obj/item/I)
|
||||
if(state != GIRDER_NORMAL && state != GIRDER_DISPLACED)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
if(state == GIRDER_NORMAL)
|
||||
TOOL_ATTEMPT_DISMANTLE_MESSAGE
|
||||
if(!I.use_tool(src, user, 40, volume = I.tool_volume) || state != GIRDER_NORMAL)
|
||||
return
|
||||
state = GIRDER_DISASSEMBLED
|
||||
TOOL_DISMANTLE_SUCCESS_MESSAGE
|
||||
var/obj/item/stack/sheet/metal/M = new(loc, 2)
|
||||
M.add_fingerprint(user)
|
||||
qdel(src)
|
||||
else
|
||||
if(!isfloorturf(loc))
|
||||
to_chat(user, "<span class='warning'>A floor must be present to secure the girder!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start securing the girder...</span>")
|
||||
if(!I.use_tool(src, user, 40, volume = I.tool_volume) || state != GIRDER_DISPLACED)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You secure the girder.</span>")
|
||||
var/obj/structure/girder/G = new(loc)
|
||||
transfer_fingerprints_to(G)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/girder/welder_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
WELDER_ATTEMPT_SLICING_MESSAGE
|
||||
if(I.use_tool(src, user, 40, volume = I.tool_volume))
|
||||
WELDER_SLICING_SUCCESS_MESSAGE
|
||||
refundMetal(metalUsed)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/girder/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
if(height==0)
|
||||
return 1
|
||||
@@ -392,6 +411,7 @@
|
||||
icon_state = "cultgirder"
|
||||
can_displace = FALSE
|
||||
metalUsed = 1
|
||||
metal_type = /obj/item/stack/sheet/runed_metal
|
||||
|
||||
/obj/structure/girder/cult/New()
|
||||
. = ..()
|
||||
@@ -407,21 +427,6 @@
|
||||
user.visible_message("<span class='warning'>[user] strikes [src] with [W]!</span>", "<span class='notice'>You demolish [src].</span>")
|
||||
refundMetal(metalUsed)
|
||||
qdel(src)
|
||||
|
||||
else if(iswelder(W))
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0,user))
|
||||
playsound(loc, W.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You start slicing apart the girder...</span>")
|
||||
if(do_after(user, 40*W.toolspeed, target = src))
|
||||
if(!WT.isOn())
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You slice apart the girder.</span>")
|
||||
var/obj/item/stack/sheet/runed_metal/R = new(get_turf(src))
|
||||
R.amount = 1
|
||||
transfer_fingerprints_to(R)
|
||||
qdel(src)
|
||||
|
||||
else if(istype(W, /obj/item/gun/energy/plasmacutter))
|
||||
to_chat(user, "<span class='notice'>You start slicing apart the girder...</span>")
|
||||
if(do_after(user, 40* W.toolspeed, target = src))
|
||||
@@ -431,7 +436,6 @@
|
||||
R.amount = 1
|
||||
transfer_fingerprints_to(R)
|
||||
qdel(src)
|
||||
|
||||
else if(istype(W, /obj/item/pickaxe/drill/jackhammer))
|
||||
var/obj/item/pickaxe/drill/jackhammer/D = W
|
||||
to_chat(user, "<span class='notice'>Your jackhammer smashes through the girder!</span>")
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
|
||||
/obj/structure/grille/attack_animal(mob/user)
|
||||
. = ..()
|
||||
if(!shock(user, 70))
|
||||
if(. && !QDELETED(src) && !shock(user, 70))
|
||||
take_damage(rand(5,10), BRUTE, "melee", 1)
|
||||
|
||||
/obj/structure/grille/hulk_damage()
|
||||
@@ -118,18 +118,7 @@
|
||||
/obj/structure/grille/attackby(obj/item/W, mob/user, params)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
add_fingerprint(user)
|
||||
if(iswirecutter(W))
|
||||
if(!shock(user, 100))
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
deconstruct()
|
||||
else if((isscrewdriver(W)) && (istype(loc, /turf/simulated) || anchored))
|
||||
if(!shock(user, 90))
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
anchored = !anchored
|
||||
user.visible_message("<span class='notice'>[user] [anchored ? "fastens" : "unfastens"] [src].</span>", \
|
||||
"<span class='notice'>You [anchored ? "fasten [src] to" : "unfasten [src] from"] the floor.</span>")
|
||||
return
|
||||
else if(istype(W, /obj/item/stack/rods) && broken)
|
||||
if(istype(W, /obj/item/stack/rods) && broken)
|
||||
var/obj/item/stack/rods/R = W
|
||||
if(!shock(user, 90))
|
||||
user.visible_message("<span class='notice'>[user] rebuilds the broken grille.</span>", \
|
||||
@@ -148,6 +137,26 @@
|
||||
else if(istype(W, /obj/item/shard) || !shock(user, 70))
|
||||
return ..()
|
||||
|
||||
/obj/structure/grille/wirecutter_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(shock(user, 100))
|
||||
return
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
return
|
||||
deconstruct()
|
||||
|
||||
/obj/structure/grille/screwdriver_act(mob/user, obj/item/I)
|
||||
if(!(istype(loc, /turf/simulated) || anchored))
|
||||
return
|
||||
. = TRUE
|
||||
if(shock(user, 90))
|
||||
return
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
return
|
||||
anchored = !anchored
|
||||
user.visible_message("<span class='notice'>[user] [anchored ? "fastens" : "unfastens"] [src].</span>", \
|
||||
"<span class='notice'>You [anchored ? "fasten [src] to" : "unfasten [src] from"] the floor.</span>")
|
||||
|
||||
/obj/structure/grille/proc/build_window(obj/item/stack/sheet/S, mob/user)
|
||||
var/dir_to_set = NORTH
|
||||
if(!istype(S) || !user)
|
||||
|
||||
@@ -175,52 +175,45 @@
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need to raise the blade in order to sharpen it!</span>")
|
||||
return
|
||||
if(iswrench(W))
|
||||
if(current_action)
|
||||
return
|
||||
|
||||
current_action = GUILLOTINE_ACTION_WRENCH
|
||||
|
||||
if(do_after(user, GUILLOTINE_WRENCH_DELAY, target = src))
|
||||
current_action = 0
|
||||
if(has_buckled_mobs())
|
||||
to_chat(user, "<span class='warning'>Can't unfasten, someone's strapped in!</span>")
|
||||
return
|
||||
|
||||
if(current_action)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "un" : ""]secure [src].</span>")
|
||||
anchored = !anchored
|
||||
playsound(src, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
dir = SOUTH
|
||||
return TRUE
|
||||
else
|
||||
current_action = 0
|
||||
if(iswelder(W))
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if(!WT.remove_fuel(0, user))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You begin cutting [src] apart...</span>")
|
||||
playsound(loc, WT.usesound, 40, 1)
|
||||
if(do_after(user, 150 * WT.toolspeed, 1, target = src))
|
||||
if(!WT.isOn())
|
||||
return
|
||||
playsound(loc, WT.usesound, 50, 1)
|
||||
visible_message("<span class='notice'>[user] slices apart [src].</span>",
|
||||
"<span class='notice'>You cut [src] apart with [WT].</span>",
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
var/turf/T = get_turf(src)
|
||||
if(blade_sharpness == GUILLOTINE_BLADE_MAX_SHARP)
|
||||
new /obj/item/stack/sheet/plasteel(T, 3)
|
||||
else
|
||||
new /obj/item/stack/sheet/plasteel(T, 2) //prevents reconstructing to sharpen the guillotine without additional plasteel
|
||||
new /obj/item/stack/sheet/wood(T, 20)
|
||||
new /obj/item/stack/cable_coil(T, 10)
|
||||
qdel(src)
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/guillotine/wrench_act(mob/user, obj/item/I)
|
||||
if(current_action)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
current_action = GUILLOTINE_ACTION_WRENCH
|
||||
if(!I.use_tool(src, user, GUILLOTINE_WRENCH_DELAY, volume = I.tool_volume))
|
||||
current_action = 0
|
||||
return
|
||||
if(has_buckled_mobs())
|
||||
to_chat(user, "<span class='warning'>Can't unfasten, someone's strapped in!</span>")
|
||||
return
|
||||
|
||||
current_action = 0
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "un" : ""]secure [src].</span>")
|
||||
anchored = !anchored
|
||||
playsound(src, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
dir = SOUTH
|
||||
|
||||
/obj/structure/guillotine/welder_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
WELDER_ATTEMPT_SLICING_MESSAGE
|
||||
if(I.use_tool(src, user, 40, volume = I.tool_volume))
|
||||
WELDER_SLICING_SUCCESS_MESSAGE
|
||||
var/turf/T = get_turf(src)
|
||||
if(blade_sharpness == GUILLOTINE_BLADE_MAX_SHARP)
|
||||
new /obj/item/stack/sheet/plasteel(T, 3)
|
||||
else
|
||||
new /obj/item/stack/sheet/plasteel(T, 2) //prevents reconstructing to sharpen the guillotine without additional plasteel
|
||||
new /obj/item/stack/sheet/wood(T, 20)
|
||||
new /obj/item/stack/cable_coil(T, 10)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/guillotine/buckle_mob(mob/living/M, force = FALSE, check_loc = TRUE)
|
||||
if(!anchored)
|
||||
to_chat(usr, "<span class='warning'>The [src] needs to be wrenched to the floor!</span>")
|
||||
|
||||
@@ -45,19 +45,20 @@
|
||||
desc = "Oh no, seven years of bad luck!"
|
||||
broken = TRUE
|
||||
|
||||
/obj/structure/mirror/attackby(obj/item/I, mob/living/user, params)
|
||||
if(isscrewdriver(I))
|
||||
user.visible_message("<span class='notice'>[user] begins to unfasten [src].</span>", "<span class='notice'>You begin to unfasten [src].</span>")
|
||||
if(do_after(user, 30 * I.toolspeed, target = src))
|
||||
if(broken)
|
||||
user.visible_message("<span class='notice'>[user] drops the broken shards to the floor.</span>", "<span class='notice'>You drop the broken shards on the floor.</span>")
|
||||
new /obj/item/shard(get_turf(user))
|
||||
else
|
||||
user.visible_message("<span class='notice'>[user] carefully places [src] on the floor.</span>", "<span class='notice'>You carefully place [src] on the floor.</span>")
|
||||
new /obj/item/mounted/mirror(get_turf(user))
|
||||
qdel(src)
|
||||
/obj/structure/mirror/screwdriver_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
return ..()
|
||||
user.visible_message("<span class='notice'>[user] begins to unfasten [src].</span>", "<span class='notice'>You begin to unfasten [src].</span>")
|
||||
if(!I.use_tool(src, user, 30, volume = I.tool_volume))
|
||||
return
|
||||
if(broken)
|
||||
user.visible_message("<span class='notice'>[user] drops the broken shards to the floor.</span>", "<span class='notice'>You drop the broken shards on the floor.</span>")
|
||||
new /obj/item/shard(get_turf(user))
|
||||
else
|
||||
user.visible_message("<span class='notice'>[user] carefully places [src] on the floor.</span>", "<span class='notice'>You carefully place [src] on the floor.</span>")
|
||||
new /obj/item/mounted/mirror(get_turf(user))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/mirror/deconstruct(disassembled = TRUE)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
|
||||
@@ -88,12 +88,12 @@
|
||||
if(!playing || shouldStopPlaying(user)) //If the instrument is playing, or special case
|
||||
playing = 0
|
||||
return
|
||||
if(lentext(note) == 0)
|
||||
if(length(note) == 0)
|
||||
continue
|
||||
var/cur_note = text2ascii(note) - 96
|
||||
if(cur_note < 1 || cur_note > 7)
|
||||
continue
|
||||
for(var/i=2 to lentext(note))
|
||||
for(var/i=2 to length(note))
|
||||
var/ni = copytext(note,i,i+1)
|
||||
if(!text2num(ni))
|
||||
if(ni == "#" || ni == "b" || ni == "n")
|
||||
@@ -159,11 +159,11 @@
|
||||
if(!in_range(instrumentObj, usr))
|
||||
return
|
||||
|
||||
if(lentext(t) >= 12000)
|
||||
if(length(t) >= 12000)
|
||||
var/cont = input(usr, "Your message is too long! Would you like to continue editing it?", "", "yes") in list("yes", "no")
|
||||
if(cont == "no")
|
||||
break
|
||||
while(lentext(t) > 12000)
|
||||
while(length(t) > 12000)
|
||||
|
||||
//split into lines
|
||||
spawn()
|
||||
@@ -180,7 +180,7 @@
|
||||
lines.Cut(201)
|
||||
var/linenum = 1
|
||||
for(var/l in lines)
|
||||
if(lentext(l) > 200)
|
||||
if(length(l) > 200)
|
||||
to_chat(usr, "Line [linenum] too long!")
|
||||
lines.Remove(l)
|
||||
else
|
||||
@@ -223,7 +223,7 @@
|
||||
return
|
||||
if(lines.len > 200)
|
||||
return
|
||||
if(lentext(newline) > 200)
|
||||
if(length(newline) > 200)
|
||||
newline = copytext(newline, 1, 200)
|
||||
|
||||
lines.Insert(num, newline)
|
||||
@@ -241,7 +241,7 @@
|
||||
var/content = html_encode(input("Enter your line: ", instrumentObj.name, lines[num]) as text|null)
|
||||
if(!content || !in_range(instrumentObj, usr))
|
||||
return
|
||||
if(lentext(content) > 200)
|
||||
if(length(content) > 200)
|
||||
content = copytext(content, 1, 200)
|
||||
if(num > lines.len || num < 1)
|
||||
return
|
||||
@@ -315,25 +315,27 @@
|
||||
/obj/structure/piano/Topic(href, href_list)
|
||||
song.Topic(href, href_list)
|
||||
|
||||
/obj/structure/piano/attackby(obj/item/O as obj, mob/user as mob, params)
|
||||
if(iswrench(O))
|
||||
if(!anchored && !isinspace())
|
||||
playsound(src.loc, O.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'> You begin to tighten \the [src] to the floor...</span>")
|
||||
if(do_after(user, 20 * O.toolspeed, target = src))
|
||||
user.visible_message( \
|
||||
"[user] tightens \the [src]'s casters.", \
|
||||
"<span class='notice'> You have tightened \the [src]'s casters. Now it can be played again.</span>", \
|
||||
"You hear ratchet.")
|
||||
anchored = 1
|
||||
else if(anchored)
|
||||
playsound(src.loc, O.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'> You begin to loosen \the [src]'s casters...</span>")
|
||||
if(do_after(user, 40 * O.toolspeed, target = src))
|
||||
user.visible_message( \
|
||||
"[user] loosens \the [src]'s casters.", \
|
||||
"<span class='notice'> You have loosened \the [src]. Now it can be pulled somewhere else.</span>", \
|
||||
"You hear ratchet.")
|
||||
anchored = 0
|
||||
/obj/structure/piano/wrench_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
if(!anchored && !isinspace())
|
||||
WRENCH_ANCHOR_MESSAGE
|
||||
if(!I.use_tool(src, user, 20, volume = I.tool_volume))
|
||||
return
|
||||
user.visible_message( \
|
||||
"[user] tightens [src]'s casters.", \
|
||||
"<span class='notice'> You have tightened [src]'s casters. Now it can be played again.</span>", \
|
||||
"You hear ratchet.")
|
||||
anchored = TRUE
|
||||
else if(anchored)
|
||||
to_chat(user, "<span class='notice'> You begin to loosen [src]'s casters...</span>")
|
||||
if(!I.use_tool(src, user, 40, volume = I.tool_volume))
|
||||
return
|
||||
user.visible_message( \
|
||||
"[user] loosens [src]'s casters.", \
|
||||
"<span class='notice'> You have loosened [src]. Now it can be pulled somewhere else.</span>", \
|
||||
"You hear ratchet.")
|
||||
anchored = FALSE
|
||||
else
|
||||
return ..()
|
||||
to_chat(user, "<span class='warning'>[src] needs to be bolted to the floor!</span>")
|
||||
|
||||
@@ -78,10 +78,5 @@
|
||||
if(href_list["read"])
|
||||
var/obj/item/paper/P = locate(href_list["read"])
|
||||
if((P && P.loc == src))
|
||||
if(!( istype(usr, /mob/living/carbon/human) ))
|
||||
usr << browse("<HTML><HEAD><TITLE>[P.name]</TITLE></HEAD><BODY><TT>[stars(P.info)]</TT></BODY></HTML>", "window=[P.name]")
|
||||
onclose(usr, "[P.name]")
|
||||
else
|
||||
usr << browse("<HTML><HEAD><TITLE>[P.name]</TITLE></HEAD><BODY><TT>[P.info]</TT></BODY></HTML>", "window=[P.name]")
|
||||
onclose(usr, "[P.name]")
|
||||
P.show_content(usr)
|
||||
return
|
||||
|
||||
@@ -17,43 +17,37 @@
|
||||
if(PLASTIC_FLAPS_DETACHED)
|
||||
. += "<span class='notice'>[src] are no longer <i>screwed</i> to the floor, and the flaps can be <b>sliced</b> apart.</span>"
|
||||
|
||||
/obj/structure/plasticflaps/attackby(obj/item/W, mob/user, params)
|
||||
add_fingerprint(user)
|
||||
if(isscrewdriver(W))
|
||||
if(state == PLASTIC_FLAPS_NORMAL)
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("<span class='warning'>[user] unscrews [src] from the floor.</span>", "<span class='notice'>You start to unscrew [src] from the floor...</span>", "You hear rustling noises.")
|
||||
if(do_after(user, 180*W.toolspeed, target = src))
|
||||
if(state != PLASTIC_FLAPS_NORMAL)
|
||||
return
|
||||
state = PLASTIC_FLAPS_DETACHED
|
||||
anchored = FALSE
|
||||
to_chat(user, "<span class='notice'>You unscrew [src] from the floor.</span>")
|
||||
else if(state == PLASTIC_FLAPS_DETACHED)
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("<span class='warning'>[user] screws [src] to the floor.</span>", "<span class='notice'>You start to screw [src] to the floor...</span>", "You hear rustling noises.")
|
||||
if(do_after(user, 40*W.toolspeed, target = src))
|
||||
if(state != PLASTIC_FLAPS_DETACHED)
|
||||
return
|
||||
state = PLASTIC_FLAPS_NORMAL
|
||||
anchored = TRUE
|
||||
to_chat(user, "<span class='notice'>You screw [src] to the floor.</span>")
|
||||
else if(iswelder(W))
|
||||
if(state == PLASTIC_FLAPS_DETACHED)
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if(!WT.remove_fuel(0, user))
|
||||
return
|
||||
playsound(loc, WT.usesound, 100, 1)
|
||||
user.visible_message("<span class='warning'>[user] slices apart [src].</span>", "<span class='notice'>You start to slice apart [src].</span>", "You hear welding.")
|
||||
if(do_after(user, 120*WT.toolspeed, target = src))
|
||||
if(state != PLASTIC_FLAPS_DETACHED)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You slice apart [src].</span>")
|
||||
var/obj/item/stack/sheet/plastic/five/P = new(loc)
|
||||
P.add_fingerprint(user)
|
||||
qdel(src)
|
||||
else
|
||||
return ..()
|
||||
/obj/structure/plasticflaps/screwdriver_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
if(state == PLASTIC_FLAPS_NORMAL)
|
||||
user.visible_message("<span class='warning'>[user] starts unscrewing [src] from the floor...</span>", "<span class='notice'>You start to unscrew [src] from the floor...</span>", "You hear rustling noises.")
|
||||
if(!I.use_tool(src, user, 180, volume = I.tool_volume) || state != PLASTIC_FLAPS_NORMAL)
|
||||
return
|
||||
state = PLASTIC_FLAPS_DETACHED
|
||||
anchored = FALSE
|
||||
to_chat(user, "<span class='notice'>You unscrew [src] from the floor.</span>")
|
||||
else if(state == PLASTIC_FLAPS_DETACHED)
|
||||
user.visible_message("<span class='warning'>[user] starts screwing [src] to the floor.</span>", "<span class='notice'>You start to screw [src] to the floor...</span>", "You hear rustling noises.")
|
||||
if(!I.use_tool(src, user, 40, volume = I.tool_volume) || state != PLASTIC_FLAPS_DETACHED)
|
||||
return
|
||||
state = PLASTIC_FLAPS_NORMAL
|
||||
anchored = TRUE
|
||||
to_chat(user, "<span class='notice'>You screw [src] to the floor.</span>")
|
||||
|
||||
/obj/structure/plasticflaps/welder_act(mob/user, obj/item/I)
|
||||
if(state != PLASTIC_FLAPS_DETACHED)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
WELDER_ATTEMPT_SLICING_MESSAGE
|
||||
if(I.use_tool(src, user, 120, volume = I.tool_volume))
|
||||
WELDER_SLICING_SUCCESS_MESSAGE
|
||||
var/obj/item/stack/sheet/plastic/five/P = new(drop_location())
|
||||
P.add_fingerprint(user)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/plasticflaps/CanPass(atom/A, turf/T)
|
||||
if(istype(A) && A.checkpass(PASSGLASS))
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
/obj/structure/reflector/bullet_act(obj/item/projectile/P)
|
||||
var/turf/reflector_turf = get_turf(src)
|
||||
var/turf/reflect_turf
|
||||
var/new_dir = get_reflection(dir, P.dir)
|
||||
if(!istype(P, /obj/item/projectile/beam))
|
||||
return ..()
|
||||
var/new_dir = get_reflection(dir, P.dir)
|
||||
if(new_dir)
|
||||
reflect_turf = get_step(reflect_turf, new_dir)
|
||||
else
|
||||
@@ -30,48 +30,15 @@
|
||||
P.current = reflector_turf
|
||||
P.yo = reflect_turf.y - reflector_turf.y
|
||||
P.xo = reflect_turf.x - reflector_turf.x
|
||||
P.ignore_source_check = TRUE //If shot by a laser, will now hit the mob that fired it
|
||||
var/reflect_angle = dir2angle(new_dir)
|
||||
P.setAngle(reflect_angle)
|
||||
|
||||
new_dir = 0
|
||||
return -1
|
||||
|
||||
|
||||
/obj/structure/reflector/attackby(obj/item/W, mob/user, params)
|
||||
if(iswrench(W))
|
||||
if(anchored)
|
||||
to_chat(user, "Unweld [src] first!")
|
||||
return
|
||||
playsound(user, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
to_chat(user, "You begin to dismantle [src].")
|
||||
if(do_after(user, 80, target = src))
|
||||
playsound(user, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
to_chat(user, "You dismantle [src].")
|
||||
new /obj/item/stack/sheet/metal(src.loc, 5)
|
||||
qdel(src)
|
||||
return
|
||||
if(istype(W, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if(!anchored)
|
||||
if(WT.remove_fuel(0,user))
|
||||
playsound(user, 'sound/items/Welder2.ogg', 50, 1)
|
||||
user.visible_message("[user.name] starts to weld [src.name] to the floor.", \
|
||||
"<span class='notice'>You start to weld [src] to the floor...</span>", \
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
if(do_after(user,20, target = src))
|
||||
if(!src || !WT.isOn())
|
||||
return
|
||||
anchored = 1
|
||||
to_chat(user, "<span class='notice'>You weld [src] to the floor.</span>")
|
||||
else
|
||||
if(WT.remove_fuel(0,user))
|
||||
playsound(user, 'sound/items/Welder2.ogg', 50, 1)
|
||||
user.visible_message("[user] starts to cut [src] free from the floor.", \
|
||||
"<span class='notice'>You start to cut [src] free from the floor...</span>", \
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
if(do_after(user,20, target = src))
|
||||
if(!src || !WT.isOn())
|
||||
return
|
||||
anchored = 0
|
||||
to_chat(user, "<span class='notice'>You cut [src] free from the floor.</span>")
|
||||
return
|
||||
//Finishing the frame
|
||||
if(istype(W,/obj/item/stack/sheet))
|
||||
if(finished)
|
||||
@@ -101,6 +68,38 @@
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/reflector/wrench_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(anchored)
|
||||
to_chat(user, "Unweld [src] first!")
|
||||
return
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
TOOL_ATTEMPT_DISMANTLE_MESSAGE
|
||||
if(!I.use_tool(src, user, 80, volume = I.tool_volume))
|
||||
return
|
||||
playsound(user, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
TOOL_DISMANTLE_SUCCESS_MESSAGE
|
||||
new /obj/item/stack/sheet/metal(src.loc, 5)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/reflector/welder_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
if(anchored)
|
||||
WELDER_ATTEMPT_FLOOR_SLICE_MESSAGE
|
||||
if(!I.use_tool(src, user, 20, volume = I.tool_volume))
|
||||
return
|
||||
WELDER_FLOOR_SLICE_SUCCESS_MESSAGE
|
||||
anchored = FALSE
|
||||
else
|
||||
WELDER_ATTEMPT_FLOOR_WELD_MESSAGE
|
||||
if(!I.use_tool(src, user, 20, volume = I.tool_volume))
|
||||
return
|
||||
WELDER_FLOOR_WELD_SUCCESS_MESSAGE
|
||||
anchored = TRUE
|
||||
|
||||
/obj/structure/reflector/proc/get_reflection(srcdir,pdir)
|
||||
return 0
|
||||
|
||||
|
||||
@@ -17,19 +17,22 @@
|
||||
if(BURN)
|
||||
playsound(loc, 'sound/items/welder.ogg', 80, TRUE)
|
||||
|
||||
/obj/structure/sign/attackby(obj/item/tool as obj, mob/user as mob) //deconstruction
|
||||
if(istype(tool, /obj/item/screwdriver) && !istype(src, /obj/structure/sign/double))
|
||||
to_chat(user, "You unfasten the sign with your [tool].")
|
||||
var/obj/item/sign/S = new(src.loc)
|
||||
S.name = name
|
||||
S.desc = desc
|
||||
S.icon_state = icon_state
|
||||
//var/icon/I = icon('icons/obj/decals.dmi', icon_state)
|
||||
//S.icon = I.Scale(24, 24)
|
||||
S.sign_state = icon_state
|
||||
qdel(src)
|
||||
else
|
||||
return ..()
|
||||
/obj/structure/sign/screwdriver_act(mob/user, obj/item/I)
|
||||
if(istype(src, /obj/structure/sign/double))
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
return
|
||||
to_chat(user, "You unfasten the sign with [I].")
|
||||
var/obj/item/sign/S = new(src.loc)
|
||||
S.name = name
|
||||
S.desc = desc
|
||||
S.icon_state = icon_state
|
||||
//var/icon/I = icon('icons/obj/decals.dmi', icon_state)
|
||||
//S.icon = I.Scale(24, 24)
|
||||
S.sign_state = icon_state
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/item/sign
|
||||
name = "sign"
|
||||
|
||||
@@ -25,23 +25,21 @@
|
||||
"<span class='notice'>You slice apart the [name].</span>")
|
||||
deconstruct(TRUE)
|
||||
return
|
||||
|
||||
else if(iswelder(W))
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0, user))
|
||||
playsound(loc, W.usesound, 40, 1)
|
||||
user.visible_message("[user] is slicing apart the [name].", \
|
||||
"<span class='notice'>You are slicing apart the [name]...</span>")
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
if(!loc)
|
||||
return
|
||||
playsound(loc, W.usesound, 50, 1)
|
||||
user.visible_message("[user] slices apart the [name].", \
|
||||
"<span class='notice'>You slice apart the [name]!</span>")
|
||||
deconstruct(TRUE)
|
||||
return
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/statue/welder_act(mob/user, obj/item/I)
|
||||
if(anchored)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
WELDER_ATTEMPT_SLICING_MESSAGE
|
||||
if(I.use_tool(src, user, 40, volume = I.tool_volume))
|
||||
WELDER_SLICING_SUCCESS_MESSAGE
|
||||
deconstruct(TRUE)
|
||||
|
||||
|
||||
/obj/structure/statue/attack_hand(mob/living/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
add_fingerprint(user)
|
||||
@@ -139,6 +137,18 @@
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/statue/plasma/welder_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, volume = I.tool_volume))
|
||||
return
|
||||
user.visible_message("<span class='danger'>[user] sets [src] on fire!</span>",\
|
||||
"<span class='danger'>[src] disintegrates into a cloud of plasma!</span>",\
|
||||
"<span class='warning'>You hear a 'whoompf' and a roar.</span>")
|
||||
message_admins("[key_name_admin(user)] ignited a plasma statue at [COORD(loc)]")
|
||||
log_game("[key_name(user)] ignited plasma a statue at [COORD(loc)]")
|
||||
investigate_log("[key_name(user)] ignited a plasma statue at [COORD(loc)]", "atmos")
|
||||
ignite(2500)
|
||||
|
||||
/obj/structure/statue/plasma/proc/PlasmaBurn()
|
||||
atmos_spawn_air(SPAWN_HEAT | SPAWN_TOXINS, 160)
|
||||
deconstruct(FALSE)
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
max_integrity = 120
|
||||
var/image/nest_overlay
|
||||
comfort = 0
|
||||
flags = NODECONSTRUCT
|
||||
|
||||
/obj/structure/bed/nest/New()
|
||||
nest_overlay = image('icons/mob/alien.dmi', "nestoverlay", layer=MOB_LAYER - 0.2)
|
||||
|
||||
@@ -40,12 +40,14 @@
|
||||
/obj/structure/bed/proc/handle_rotation()
|
||||
return
|
||||
|
||||
/obj/structure/bed/attackby(obj/item/W, mob/user, params)
|
||||
if(iswrench(W) && !(flags & NODECONSTRUCT))
|
||||
playsound(loc, W.usesound, 50, TRUE)
|
||||
deconstruct(TRUE)
|
||||
else
|
||||
return ..()
|
||||
/obj/structure/bed/wrench_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(flags & NODECONSTRUCT)
|
||||
to_chat(user, "<span class='warning'>You can't figure out how to deconstruct [src]!</span>")
|
||||
return
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
return
|
||||
deconstruct(TRUE)
|
||||
|
||||
/obj/structure/bed/deconstruct(disassembled = TRUE)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
|
||||
@@ -54,12 +54,17 @@
|
||||
SK.master = E
|
||||
qdel(src)
|
||||
return
|
||||
if(iswrench(W) && !(flags & NODECONSTRUCT))
|
||||
playsound(loc, W.usesound, 50, 1)
|
||||
deconstruct(TRUE)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/chair/wrench_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(flags & NODECONSTRUCT)
|
||||
to_chat(user, "<span class='warning'>Try as you might, you can't figure out how to deconstruct [src].</span>")
|
||||
return
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
return
|
||||
deconstruct(TRUE)
|
||||
|
||||
/obj/structure/chair/deconstruct()
|
||||
// If we have materials, and don't have the NOCONSTRUCT flag
|
||||
if(buildstacktype && (!(flags & NODECONSTRUCT)))
|
||||
|
||||
@@ -22,13 +22,7 @@
|
||||
var/framestackamount = 2
|
||||
|
||||
/obj/structure/table_frame/attackby(obj/item/I, mob/user, params)
|
||||
if(iswrench(I))
|
||||
to_chat(user, "<span class='notice'>You start disassembling [src]...</span>")
|
||||
playsound(loc, I.usesound, 50, 1)
|
||||
if(do_after(user, 30*I.toolspeed, target = src))
|
||||
playsound(loc, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
deconstruct(TRUE)
|
||||
else if(istype(I, /obj/item/stack/sheet/plasteel))
|
||||
if(istype(I, /obj/item/stack/sheet/plasteel))
|
||||
var/obj/item/stack/sheet/plasteel/P = I
|
||||
if(P.get_amount() < 1)
|
||||
to_chat(user, "<span class='warning'>You need one plasteel sheet to do this!</span>")
|
||||
@@ -71,6 +65,17 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/table_frame/wrench_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
return
|
||||
TOOL_ATTEMPT_DISMANTLE_MESSAGE
|
||||
if(I.use_tool(src, user, 30, volume = I.tool_volume))
|
||||
TOOL_DISMANTLE_SUCCESS_MESSAGE
|
||||
for(var/i = 1, i <= framestackamount, i++)
|
||||
new framestack(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/table_frame/proc/make_new_table(table_type) //makes sure the new table made retains what we had as a frame
|
||||
var/obj/structure/table/T = new table_type(loc)
|
||||
T.frame = type
|
||||
|
||||
@@ -212,21 +212,6 @@
|
||||
if(istype(I, /obj/item/grab))
|
||||
tablepush(I, user)
|
||||
return
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
if(isscrewdriver(I) && deconstruction_ready)
|
||||
to_chat(user, "<span class='notice'>You start disassembling [src]...</span>")
|
||||
playsound(loc, I.usesound, 50, 1)
|
||||
if(do_after(user, 20*I.toolspeed, target = src))
|
||||
deconstruct(TRUE)
|
||||
return
|
||||
|
||||
if(iswrench(I) && deconstruction_ready)
|
||||
to_chat(user, "<span class='notice'>You start deconstructing [src]...</span>")
|
||||
playsound(loc, I.usesound, 50, 1)
|
||||
if(do_after(user, 40*I.toolspeed, target = src))
|
||||
playsound(loc, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
deconstruct(TRUE, 1)
|
||||
return
|
||||
|
||||
if(isrobot(user))
|
||||
return
|
||||
@@ -245,6 +230,33 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/table/screwdriver_act(mob/user, obj/item/I)
|
||||
if(flags & NODECONSTRUCT)
|
||||
return
|
||||
if(!deconstruction_ready)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
TOOL_ATTEMPT_DISMANTLE_MESSAGE
|
||||
if(I.use_tool(src, user, 20, volume = I.tool_volume) && deconstruction_ready)
|
||||
deconstruct(TRUE)
|
||||
TOOL_DISMANTLE_SUCCESS_MESSAGE
|
||||
|
||||
/obj/structure/table/wrench_act(mob/user, obj/item/I)
|
||||
if(flags & NODECONSTRUCT)
|
||||
return
|
||||
if(!deconstruction_ready)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
TOOL_ATTEMPT_DISMANTLE_MESSAGE
|
||||
if(I.use_tool(src, user, 40, volume = I.tool_volume) && deconstruction_ready)
|
||||
deconstruct(TRUE, 1)
|
||||
TOOL_DISMANTLE_SUCCESS_MESSAGE
|
||||
|
||||
/obj/structure/table/deconstruct(disassembled = TRUE, wrench_disassembly = 0)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
var/turf/T = get_turf(src)
|
||||
@@ -524,27 +536,14 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/table/reinforced/attackby(obj/item/W, mob/user, params)
|
||||
if(iswelder(W))
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0, user))
|
||||
playsound(loc, W.usesound, 50, 1)
|
||||
if(deconstruction_ready)
|
||||
to_chat(user, "<span class='notice'>You start strengthening the reinforced table...</span>")
|
||||
if (do_after(user, 50*W.toolspeed, target = src))
|
||||
if(!src || !WT.isOn())
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You strengthen the table.</span>")
|
||||
deconstruction_ready = FALSE
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You start weakening the reinforced table...</span>")
|
||||
if (do_after(user, 50*W.toolspeed, target = src))
|
||||
if(!src || !WT.isOn())
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You weaken the table.</span>")
|
||||
deconstruction_ready = TRUE
|
||||
else
|
||||
return ..()
|
||||
/obj/structure/table/reinforced/welder_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start [deconstruction_ready ? "strengthening" : "weakening"] the reinforced table...</span>")
|
||||
if(I.use_tool(src, user, 50, volume = I.tool_volume))
|
||||
to_chat(user, "<span class='notice'>You [deconstruction_ready ? "strengthen" : "weaken"] the table.</span>")
|
||||
deconstruction_ready = !deconstruction_ready
|
||||
|
||||
/obj/structure/table/reinforced/brass
|
||||
name = "brass table"
|
||||
@@ -682,10 +681,6 @@
|
||||
step(O, get_dir(O, src))
|
||||
|
||||
/obj/structure/rack/attackby(obj/item/W, mob/user, params)
|
||||
if(iswrench(W) && !(flags & NODECONSTRUCT) && user.a_intent != INTENT_HELP)
|
||||
playsound(loc, W.usesound, 50, 1)
|
||||
deconstruct(TRUE)
|
||||
return
|
||||
if(isrobot(user))
|
||||
return
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
@@ -695,6 +690,15 @@
|
||||
W.Move(loc)
|
||||
return
|
||||
|
||||
/obj/structure/rack/wrench_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(flags & NODECONSTRUCT)
|
||||
to_chat(user, "<span class='warning'>Try as you might, you can't figure out how to deconstruct this.</span>")
|
||||
return
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
return
|
||||
deconstruct(TRUE)
|
||||
|
||||
/obj/structure/rack/attack_hand(mob/living/user)
|
||||
if(user.IsWeakened() || user.resting || user.lying)
|
||||
return
|
||||
@@ -750,12 +754,12 @@
|
||||
materials = list(MAT_METAL=2000)
|
||||
var/building = FALSE
|
||||
|
||||
/obj/item/rack_parts/attackby(obj/item/W, mob/user, params)
|
||||
if(iswrench(W))
|
||||
new /obj/item/stack/sheet/metal(user.loc)
|
||||
qdel(src)
|
||||
else
|
||||
return ..()
|
||||
/obj/item/rack_parts/wrench_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
return
|
||||
new /obj/item/stack/sheet/metal(user.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/rack_parts/attack_self(mob/user)
|
||||
if(building)
|
||||
|
||||
@@ -63,54 +63,6 @@
|
||||
layer = FLY_LAYER
|
||||
|
||||
/obj/structure/toilet/attackby(obj/item/I, mob/living/user, params)
|
||||
if(iswrench(I))
|
||||
var/choices = list()
|
||||
if(cistern)
|
||||
choices += "Stash"
|
||||
if(anchored)
|
||||
choices += "Disconnect"
|
||||
else
|
||||
choices += "Connect"
|
||||
choices += "Rotate"
|
||||
|
||||
var/response = input(user, "What do you want to do?", "[src]") as null|anything in choices
|
||||
if(!Adjacent(user) || !response) //moved away or cancelled
|
||||
return
|
||||
switch(response)
|
||||
if("Stash")
|
||||
stash_goods(I, user)
|
||||
if("Disconnect")
|
||||
user.visible_message("<span class='notice'>[user] starts disconnecting [src].</span>", "<span class='notice'>You begin disconnecting [src]...</span>")
|
||||
if(do_after(user, 40 * I.toolspeed, target = src))
|
||||
if(!loc || !anchored)
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] disconnects [src]!</span>", "<span class='notice'>You disconnect [src]!</span>")
|
||||
anchored = 0
|
||||
update_icon()
|
||||
if("Connect")
|
||||
user.visible_message("<span class='notice'>[user] starts connecting [src].</span>", "<span class='notice'>You begin connecting [src]...</span>")
|
||||
if(do_after(user, 40 * I.toolspeed, target = src))
|
||||
if(!loc || anchored)
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] connects [src]!</span>", "<span class='notice'>You connect [src]!</span>")
|
||||
anchored = 1
|
||||
update_icon()
|
||||
if("Rotate")
|
||||
var/list/dir_choices = list("North" = NORTH, "East" = EAST, "South" = SOUTH, "West" = WEST)
|
||||
var/selected = input(user,"Select a direction for the connector.", "Connector Direction") in dir_choices
|
||||
dir = dir_choices[selected]
|
||||
update_icon() //is this necessary? probably not
|
||||
return
|
||||
|
||||
if(istype(I, /obj/item/crowbar))
|
||||
to_chat(user, "<span class='notice'>You start to [cistern ? "replace the lid on the cistern" : "lift the lid off the cistern"]...</span>")
|
||||
playsound(loc, 'sound/effects/stonedoor_openclose.ogg', 50, 1)
|
||||
if(do_after(user, 30 * I.toolspeed, target = src))
|
||||
user.visible_message("[user] [cistern ? "replaces the lid on the cistern" : "lifts the lid off the cistern"]!", "<span class='notice'>You [cistern ? "replace the lid on the cistern" : "lift the lid off the cistern"]!</span>", "<span class='italics'>You hear grinding porcelain.</span>")
|
||||
cistern = !cistern
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if(istype(I, /obj/item/reagent_containers))
|
||||
if(!open)
|
||||
return
|
||||
@@ -158,6 +110,58 @@
|
||||
stash_goods(I, user)
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/toilet/crowbar_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start to [cistern ? "replace the lid on the cistern" : "lift the lid off the cistern"]...</span>")
|
||||
playsound(loc, 'sound/effects/stonedoor_openclose.ogg', 50, 1)
|
||||
if(I.use_tool(src, user, 30, volume = I.tool_volume))
|
||||
user.visible_message("[user] [cistern ? "replaces the lid on the cistern" : "lifts the lid off the cistern"]!", "<span class='notice'>You [cistern ? "replace the lid on the cistern" : "lift the lid off the cistern"]!</span>", "<span class='italics'>You hear grinding porcelain.</span>")
|
||||
cistern = !cistern
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/structure/toilet/wrench_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
var/choices = list()
|
||||
if(cistern)
|
||||
choices += "Stash"
|
||||
if(anchored)
|
||||
choices += "Disconnect"
|
||||
else
|
||||
choices += "Connect"
|
||||
choices += "Rotate"
|
||||
|
||||
var/response = input(user, "What do you want to do?", "[src]") as null|anything in choices
|
||||
if(!Adjacent(user) || !response) //moved away or cancelled
|
||||
return
|
||||
switch(response)
|
||||
if("Stash")
|
||||
stash_goods(I, user)
|
||||
if("Disconnect")
|
||||
user.visible_message("<span class='notice'>[user] starts disconnecting [src].</span>", "<span class='notice'>You begin disconnecting [src]...</span>")
|
||||
if(I.use_tool(src, user, 40, volume = I.tool_volume))
|
||||
if(!loc || !anchored)
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] disconnects [src]!</span>", "<span class='notice'>You disconnect [src]!</span>")
|
||||
anchored = 0
|
||||
if("Connect")
|
||||
user.visible_message("<span class='notice'>[user] starts connecting [src].</span>", "<span class='notice'>You begin connecting [src]...</span>")
|
||||
if(I.use_tool(src, user, 40, volume = I.tool_volume))
|
||||
if(!loc || anchored)
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] connects [src]!</span>", "<span class='notice'>You connect [src]!</span>")
|
||||
anchored = 1
|
||||
if("Rotate")
|
||||
var/list/dir_choices = list("North" = NORTH, "East" = EAST, "South" = SOUTH, "West" = WEST)
|
||||
var/selected = input(user,"Select a direction for the connector.", "Connector Direction") in dir_choices
|
||||
dir = dir_choices[selected]
|
||||
update_icon() //is this necessary? probably not
|
||||
|
||||
/obj/structure/toilet/proc/stash_goods(obj/item/I, mob/user)
|
||||
if(!I)
|
||||
return
|
||||
@@ -196,27 +200,6 @@
|
||||
|
||||
|
||||
/obj/structure/urinal/attackby(obj/item/I, mob/user, params)
|
||||
if(iswrench(I))
|
||||
if(anchored)
|
||||
user.visible_message("<span class='notice'>[user] begins disconnecting [src]...</span>", "<span class='notice'>You begin to disconnect [src]...</span>")
|
||||
if(do_after(user, 40 * I.toolspeed, target = src))
|
||||
if(!loc || !anchored)
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] disconnects [src]!</span>", "<span class='notice'>You disconnect [src]!</span>")
|
||||
anchored = 0
|
||||
pixel_x = 0
|
||||
pixel_y = 0
|
||||
else
|
||||
user.visible_message("<span class='notice'>[user] begins connecting [src]...</span>", "<span class='notice'>You begin to connect [src]...</span>")
|
||||
if(do_after(user, 40 * I.toolspeed, target = src))
|
||||
if(!loc || anchored)
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] connects [src]!</span>", "<span class='notice'>You connect [src]!</span>")
|
||||
anchored = 1
|
||||
pixel_x = 0
|
||||
pixel_y = 32
|
||||
return
|
||||
|
||||
if(istype(I, /obj/item/grab))
|
||||
var/obj/item/grab/G = I
|
||||
if(!G.confirm())
|
||||
@@ -234,7 +217,28 @@
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need a tighter grip!</span>")
|
||||
|
||||
|
||||
/obj/structure/urinal/wrench_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
if(anchored)
|
||||
user.visible_message("<span class='notice'>[user] begins disconnecting [src]...</span>", "<span class='notice'>You begin to disconnect [src]...</span>")
|
||||
if(I.use_tool(src, user, 40, volume = I.tool_volume))
|
||||
if(!loc || !anchored)
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] disconnects [src]!</span>", "<span class='notice'>You disconnect [src]!</span>")
|
||||
anchored = 0
|
||||
pixel_x = 0
|
||||
pixel_y = 0
|
||||
else
|
||||
user.visible_message("<span class='notice'>[user] begins connecting [src]...</span>", "<span class='notice'>You begin to connect [src]...</span>")
|
||||
if(I.use_tool(src, user, 40, volume = I.tool_volume))
|
||||
if(!loc || anchored)
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] connects [src]!</span>", "<span class='notice'>You connect [src]!</span>")
|
||||
anchored = 1
|
||||
pixel_x = 0
|
||||
pixel_y = 32
|
||||
|
||||
/obj/machinery/shower
|
||||
name = "shower"
|
||||
@@ -298,41 +302,41 @@
|
||||
/obj/machinery/shower/attackby(obj/item/I as obj, mob/user as mob, params)
|
||||
if(I.type == /obj/item/analyzer)
|
||||
to_chat(user, "<span class='notice'>The water temperature seems to be [watertemp].</span>")
|
||||
if(iswrench(I))
|
||||
to_chat(user, "<span class='notice'>You begin to adjust the temperature valve with the [I].</span>")
|
||||
if(do_after(user, 50 * I.toolspeed, target = src))
|
||||
switch(watertemp)
|
||||
if("normal")
|
||||
watertemp = "freezing"
|
||||
if("freezing")
|
||||
watertemp = "boiling"
|
||||
if("boiling")
|
||||
watertemp = "normal"
|
||||
user.visible_message("<span class='notice'>[user] adjusts the shower with the [I].</span>", "<span class='notice'>You adjust the shower with the [I].</span>")
|
||||
update_icon() //letsa update whenever we change the temperature, since the mist might need to change
|
||||
if(iswelder(I))
|
||||
if(on)
|
||||
to_chat(user, "<span class='warning'>Turn [src] off before you attempt to cut it loose.</span>")
|
||||
return
|
||||
var/obj/item/weldingtool/WT = I
|
||||
if(WT.isOn())
|
||||
user.visible_message("<span class='notice'>[user] begins to cut [src] loose.</span>", "<span class='notice'>You begin to cut [src] loose.</span>")
|
||||
if(do_after(user, 40 * WT.toolspeed, target = src))
|
||||
if(!src || !WT.remove_fuel(0, user))
|
||||
return
|
||||
if(on) //in case someone turned it back on while you were working, make sure we shut that all down
|
||||
on = 0
|
||||
if(mymist)
|
||||
qdel(mymist)
|
||||
ismist = 0
|
||||
user.visible_message("<span class='notice'>[user] cuts [src] loose!</span>", "<span class='notice'>You cut [src] loose!</span>")
|
||||
var/obj/item/mounted/shower/S = new /obj/item/mounted/shower(get_turf(user))
|
||||
transfer_prints_to(S, TRUE)
|
||||
qdel(src)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[WT] must be on for this task.</span>")
|
||||
if(on)
|
||||
I.water_act(100, convertHeat(), src)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/shower/wrench_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You begin to adjust the temperature valve with the [I].</span>")
|
||||
if(I.use_tool(src, user, 50, volume = I.tool_volume))
|
||||
switch(watertemp)
|
||||
if("normal")
|
||||
watertemp = "freezing"
|
||||
if("freezing")
|
||||
watertemp = "boiling"
|
||||
if("boiling")
|
||||
watertemp = "normal"
|
||||
user.visible_message("<span class='notice'>[user] adjusts the shower with the [I].</span>", "<span class='notice'>You adjust [src] to [watertemp].</span>")
|
||||
update_icon() //letsa update whenever we change the temperature, since the mist might need to change
|
||||
|
||||
/obj/machinery/shower/welder_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(on)
|
||||
to_chat(user, "<span class='warning'>Turn [src] off before you attempt to cut it loose.</span>")
|
||||
return
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
visible_message("<span class='notice'>[user] begins slicing [src] free...</span>", "<span class='notice'>You begin slicing [src] free...</span>", "<span class='warning'>You hear welding.</span>")
|
||||
if(I.use_tool(src, user, 40, volume = I.tool_volume))
|
||||
if(mymist)
|
||||
qdel(mymist)
|
||||
user.visible_message("<span class='notice'>[user] cuts [src] loose!</span>", "<span class='notice'>You cut [src] loose!</span>")
|
||||
var/obj/item/mounted/shower/S = new /obj/item/mounted/shower(get_turf(user))
|
||||
transfer_prints_to(S, TRUE)
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/shower/update_icon() //this makes the shower mist up or clear mist (depending on water temperature)
|
||||
overlays.Cut() //once it's been on for a while, in addition to handling the water overlay.
|
||||
@@ -577,53 +581,6 @@
|
||||
if(!(istype(O)))
|
||||
return
|
||||
|
||||
if(iswrench(O))
|
||||
var/obj/item/wrench/W = O
|
||||
|
||||
var/choices = list()
|
||||
if(anchored)
|
||||
choices += "Wash"
|
||||
if(can_move)
|
||||
choices += "Disconnect"
|
||||
else
|
||||
choices += "Connect"
|
||||
if(can_rotate)
|
||||
choices += "Rotate"
|
||||
|
||||
var/response = input(user, "What do you want to do?", "[src]") as null|anything in choices
|
||||
if(!Adjacent(user) || !response) //moved away or cancelled
|
||||
return
|
||||
switch(response)
|
||||
if("Wash")
|
||||
busy = 1
|
||||
var/wateract = 0
|
||||
wateract = (W.wash(user, src))
|
||||
busy = 0
|
||||
if(wateract)
|
||||
W.water_act(20, COLD_WATER_TEMPERATURE, src)
|
||||
if("Disconnect")
|
||||
user.visible_message("<span class='notice'>[user] starts disconnecting [src].</span>", "<span class='notice'>You begin disconnecting [src]...</span>")
|
||||
if(do_after(user, 40 * O.toolspeed, target = src))
|
||||
if(!loc || !anchored)
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] disconnects [src]!</span>", "<span class='notice'>You disconnect [src]!</span>")
|
||||
anchored = 0
|
||||
update_icon()
|
||||
if("Connect")
|
||||
user.visible_message("<span class='notice'>[user] starts connecting [src].</span>", "<span class='notice'>You begin connecting [src]...</span>")
|
||||
if(do_after(user, 40 * O.toolspeed, target = src))
|
||||
if(!loc || anchored)
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] connects [src]!</span>", "<span class='notice'>You connect [src]!</span>")
|
||||
anchored = 1
|
||||
update_icon()
|
||||
if("Rotate")
|
||||
var/list/dir_choices = list("North" = NORTH, "East" = EAST, "South" = SOUTH, "West" = WEST)
|
||||
var/selected = input(user, "Select a direction for the connector.", "Connector Direction") in dir_choices
|
||||
dir = dir_choices[selected]
|
||||
update_icon() //is this necessary? probably not
|
||||
return
|
||||
|
||||
if(!anchored)
|
||||
to_chat(user, "<span class='warning'>[src] isn't connected, wrench it into position first!</span>")
|
||||
return
|
||||
@@ -635,6 +592,51 @@
|
||||
if(wateract)
|
||||
O.water_act(20, COLD_WATER_TEMPERATURE, src)
|
||||
|
||||
/obj/structure/sink/wrench_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
var/choices = list()
|
||||
if(anchored)
|
||||
choices += "Wash"
|
||||
if(can_move)
|
||||
choices += "Disconnect"
|
||||
else
|
||||
choices += "Connect"
|
||||
if(can_rotate)
|
||||
choices += "Rotate"
|
||||
|
||||
var/response = input(user, "What do you want to do?", "[src]") as null|anything in choices
|
||||
if(!Adjacent(user) || !response) //moved away or cancelled
|
||||
return
|
||||
switch(response)
|
||||
if("Wash")
|
||||
busy = 1
|
||||
var/wateract = 0
|
||||
wateract = (I.wash(user, src))
|
||||
busy = 0
|
||||
if(wateract)
|
||||
I.water_act(20, COLD_WATER_TEMPERATURE, src)
|
||||
if("Disconnect")
|
||||
user.visible_message("<span class='notice'>[user] starts disconnecting [src].</span>", "<span class='notice'>You begin disconnecting [src]...</span>")
|
||||
if(I.use_tool(src, user, 40, volume = I.tool_volume))
|
||||
if(!loc || !anchored)
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] disconnects [src]!</span>", "<span class='notice'>You disconnect [src]!</span>")
|
||||
anchored = FALSE
|
||||
if("Connect")
|
||||
user.visible_message("<span class='notice'>[user] starts connecting [src].</span>", "<span class='notice'>You begin connecting [src]...</span>")
|
||||
if(I.use_tool(src, user, 40, volume = I.tool_volume))
|
||||
if(!loc || anchored)
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] connects [src]!</span>", "<span class='notice'>You connect [src]!</span>")
|
||||
anchored = TRUE
|
||||
if("Rotate")
|
||||
var/list/dir_choices = list("North" = NORTH, "East" = EAST, "South" = SOUTH, "West" = WEST)
|
||||
var/selected = input(user, "Select a direction for the connector.", "Connector Direction") in dir_choices
|
||||
dir = dir_choices[selected]
|
||||
update_icon() //is this necessary? probably not
|
||||
|
||||
/obj/structure/sink/update_icon()
|
||||
..()
|
||||
layer = OBJ_LAYER
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Windoor (window door) assembly -Nodrak
|
||||
/* Windoor (window door) assembly -Nodrak //I hope you step on a plug
|
||||
* Step 1: Create a windoor out of rglass
|
||||
* Step 2: Add plasteel to the assembly to make a secure windoor (Optional)
|
||||
* Step 3: Rotate or Flip the assembly to face and open the way you want
|
||||
@@ -84,70 +84,13 @@ obj/structure/windoor_assembly/Destroy()
|
||||
else
|
||||
return 1
|
||||
|
||||
|
||||
/obj/structure/windoor_assembly/attackby(obj/item/W, mob/user, params)
|
||||
//I really should have spread this out across more states but thin little windoors are hard to sprite.
|
||||
add_fingerprint(user)
|
||||
switch(state)
|
||||
if("01")
|
||||
if(iswelder(W) && !anchored)
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0,user))
|
||||
user.visible_message("<span class='warning'>[user] disassembles the windoor assembly.</span>", "<span class='notice'>You start to disassemble the windoor assembly...</span>")
|
||||
playsound(loc, 'sound/items/welder2.ogg', 50, 1)
|
||||
|
||||
if(do_after(user, 40 * WT.toolspeed, target = src))
|
||||
if(!src || !WT.isOn())
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You disassemble the windoor assembly.</span>")
|
||||
var/obj/item/stack/sheet/rglass/RG = new (get_turf(src), 5)
|
||||
RG.add_fingerprint(user)
|
||||
if(secure)
|
||||
var/obj/item/stack/rods/R = new (get_turf(src), 4)
|
||||
R.add_fingerprint(user)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
//Wrenching an unsecure assembly anchors it in place. Step 4 complete
|
||||
if(iswrench(W) && !anchored)
|
||||
for(var/obj/machinery/door/window/WD in loc)
|
||||
if(WD.dir == dir)
|
||||
to_chat(user, "<span class='warning'>There is already a windoor in that location!</span>")
|
||||
return
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] secures the windoor assembly to the floor.", "You start to secure the windoor assembly to the floor...")
|
||||
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
if(!src || anchored)
|
||||
return
|
||||
for(var/obj/machinery/door/window/WD in loc)
|
||||
if(WD.dir == dir)
|
||||
to_chat(user, "<span class='warning'>There is already a windoor in that location!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You secure the windoor assembly.</span>")
|
||||
anchored = TRUE
|
||||
if(secure)
|
||||
name = "secure anchored windoor assembly"
|
||||
else
|
||||
name = "anchored windoor assembly"
|
||||
|
||||
//Unwrenching an unsecure assembly un-anchors it. Step 4 undone
|
||||
else if(iswrench(W) && anchored)
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] unsecures the windoor assembly from the floor.", "You start to unsecure the windoor assembly from the floor...")
|
||||
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
if(!src || !anchored)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You unsecure the windoor assembly.</span>")
|
||||
anchored = FALSE
|
||||
if(secure)
|
||||
name = "secure windoor assembly"
|
||||
else
|
||||
name = "windoor assembly"
|
||||
|
||||
//Adding plasteel makes the assembly a secure windoor assembly. Step 2 (optional) complete.
|
||||
else if(istype(W, /obj/item/stack/sheet/plasteel) && !secure)
|
||||
if(istype(W, /obj/item/stack/sheet/plasteel) && !secure)
|
||||
var/obj/item/stack/sheet/plasteel/P = W
|
||||
if(P.get_amount() < 2)
|
||||
to_chat(user, "<span class='warning'>You need more plasteel to do this!</span>")
|
||||
@@ -187,26 +130,8 @@ obj/structure/windoor_assembly/Destroy()
|
||||
return ..()
|
||||
|
||||
if("02")
|
||||
|
||||
//Removing wire from the assembly. Step 5 undone.
|
||||
if(iswirecutter(W))
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] cuts the wires from the airlock assembly.", "You start to cut the wires from airlock assembly...")
|
||||
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
if(!src || state != "02")
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You cut the windoor wires.</span>")
|
||||
new/obj/item/stack/cable_coil(get_turf(user), 1)
|
||||
state = "01"
|
||||
if(secure)
|
||||
name = "secure anchored windoor assembly"
|
||||
else
|
||||
name = "anchored windoor assembly"
|
||||
|
||||
//Adding airlock electronics for access. Step 6 complete.
|
||||
else if(istype(W, /obj/item/airlock_electronics))
|
||||
if(istype(W, /obj/item/airlock_electronics))
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] installs the electronics into the airlock assembly.", "You start to install electronics into the airlock assembly...")
|
||||
user.drop_item()
|
||||
@@ -222,24 +147,6 @@ obj/structure/windoor_assembly/Destroy()
|
||||
else
|
||||
W.forceMove(loc)
|
||||
|
||||
//Screwdriver to remove airlock electronics. Step 6 undone.
|
||||
else if(isscrewdriver(W))
|
||||
if(!electronics)
|
||||
return
|
||||
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to uninstall electronics from the airlock assembly...")
|
||||
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
if(!src || !electronics)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You remove the airlock electronics.</span>")
|
||||
name = "wired windoor assembly"
|
||||
var/obj/item/airlock_electronics/ae
|
||||
ae = electronics
|
||||
electronics = null
|
||||
ae.forceMove(loc)
|
||||
|
||||
else if(istype(W, /obj/item/pen))
|
||||
var/t = stripped_input(user, "Enter the name for the door.", name, created_name,MAX_NAME_LEN)
|
||||
if(!t)
|
||||
@@ -248,65 +155,153 @@ obj/structure/windoor_assembly/Destroy()
|
||||
return
|
||||
created_name = t
|
||||
return
|
||||
|
||||
|
||||
|
||||
//Crowbar to complete the assembly, Step 7 complete.
|
||||
else if(iscrowbar(W))
|
||||
if(!electronics)
|
||||
to_chat(usr, "<span class='warning'>The assembly is missing electronics!</span>")
|
||||
return
|
||||
usr << browse(null, "window=windoor_access")
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] pries the windoor into the frame.", "You start prying the windoor into the frame...")
|
||||
|
||||
if(do_after(user, 40 * W.toolspeed, target = src))
|
||||
|
||||
if(loc && electronics)
|
||||
for(var/obj/machinery/door/window/WD in loc)
|
||||
if(WD.dir == dir)
|
||||
return
|
||||
|
||||
density = TRUE //Shouldn't matter but just incase
|
||||
to_chat(user, "<span class='notice'>You finish the windoor.</span>")
|
||||
var/obj/machinery/door/window/windoor
|
||||
if(secure)
|
||||
windoor = new /obj/machinery/door/window/brigdoor(src.loc)
|
||||
if(facing == "l")
|
||||
windoor.icon_state = "leftsecureopen"
|
||||
windoor.base_state = "leftsecure"
|
||||
else
|
||||
windoor.icon_state = "rightsecureopen"
|
||||
windoor.base_state = "rightsecure"
|
||||
else
|
||||
windoor = new /obj/machinery/door/window(loc)
|
||||
if(facing == "l")
|
||||
windoor.icon_state = "leftopen"
|
||||
windoor.base_state = "left"
|
||||
else
|
||||
windoor.icon_state = "rightopen"
|
||||
windoor.base_state = "right"
|
||||
windoor.setDir(dir)
|
||||
windoor.density = FALSE
|
||||
|
||||
if(electronics.one_access)
|
||||
windoor.req_one_access = electronics.conf_access
|
||||
else
|
||||
windoor.req_access = electronics.conf_access
|
||||
windoor.electronics = src.electronics
|
||||
electronics.forceMove(windoor)
|
||||
electronics = null
|
||||
if(created_name)
|
||||
windoor.name = created_name
|
||||
qdel(src)
|
||||
windoor.close()
|
||||
|
||||
else
|
||||
return ..()
|
||||
|
||||
//Update to reflect changes(if applicable)
|
||||
update_icon()
|
||||
|
||||
/obj/structure/windoor_assembly/crowbar_act(mob/user, obj/item/I) //Crowbar to complete the assembly, Step 7 complete.
|
||||
if(state != "02")
|
||||
return
|
||||
. = TRUE
|
||||
if(!electronics)
|
||||
to_chat(user, "<span class='warning'>[src] is missing electronics!</span>")
|
||||
return
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
user << browse(null, "window=windoor_access")
|
||||
user.visible_message("[user] pries the windoor into the frame.", "You start prying the windoor into the frame...")
|
||||
|
||||
if(!I.use_tool(src, user, 40, volume = I.tool_volume))
|
||||
return
|
||||
if(loc && electronics)
|
||||
for(var/obj/machinery/door/window/WD in loc)
|
||||
if(WD.dir == dir)
|
||||
return
|
||||
|
||||
density = TRUE //Shouldn't matter but just incase
|
||||
to_chat(user, "<span class='notice'>You finish the windoor.</span>")
|
||||
var/obj/machinery/door/window/windoor
|
||||
if(secure)
|
||||
windoor = new /obj/machinery/door/window/brigdoor(src.loc)
|
||||
if(facing == "l")
|
||||
windoor.icon_state = "leftsecureopen"
|
||||
windoor.base_state = "leftsecure"
|
||||
else
|
||||
windoor.icon_state = "rightsecureopen"
|
||||
windoor.base_state = "rightsecure"
|
||||
else
|
||||
windoor = new /obj/machinery/door/window(loc)
|
||||
if(facing == "l")
|
||||
windoor.icon_state = "leftopen"
|
||||
windoor.base_state = "left"
|
||||
else
|
||||
windoor.icon_state = "rightopen"
|
||||
windoor.base_state = "right"
|
||||
windoor.setDir(dir)
|
||||
windoor.density = FALSE
|
||||
|
||||
if(electronics.one_access)
|
||||
windoor.req_one_access = electronics.conf_access
|
||||
else
|
||||
windoor.req_access = electronics.conf_access
|
||||
windoor.electronics = src.electronics
|
||||
electronics.forceMove(windoor)
|
||||
electronics = null
|
||||
if(created_name)
|
||||
windoor.name = created_name
|
||||
qdel(src)
|
||||
windoor.close()
|
||||
|
||||
/obj/structure/windoor_assembly/screwdriver_act(mob/user, obj/item/I)
|
||||
if(state != "02" || electronics)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to uninstall electronics from the airlock assembly...")
|
||||
if(!I.use_tool(src, user, 40, volume = I.tool_volume) || electronics)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You remove the airlock electronics.</span>")
|
||||
name = "wired windoor assembly"
|
||||
var/obj/item/airlock_electronics/ae
|
||||
ae = electronics
|
||||
electronics = null
|
||||
ae.forceMove(loc)
|
||||
|
||||
/obj/structure/windoor_assembly/wirecutter_act(mob/user, obj/item/I)
|
||||
if(state != "02")
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
user.visible_message("[user] cuts the wires from the airlock assembly.", "You start to cut the wires from airlock assembly...")
|
||||
if(!I.use_tool(src, user, 40, volume = I.tool_volume) || state != "02")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You cut the windoor wires.</span>")
|
||||
new/obj/item/stack/cable_coil(get_turf(user), 1)
|
||||
state = "01"
|
||||
if(secure)
|
||||
name = "secure anchored windoor assembly"
|
||||
else
|
||||
name = "anchored windoor assembly"
|
||||
update_icon()
|
||||
|
||||
/obj/structure/windoor_assembly/wrench_act(mob/user, obj/item/I)
|
||||
if(state != "01")
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
if(!anchored) //Wrenching an unsecure assembly anchors it in place. Step 4 complete
|
||||
for(var/obj/machinery/door/window/WD in loc)
|
||||
if(WD.dir == dir)
|
||||
to_chat(user, "<span class='warning'>There is already a windoor in that location!</span>")
|
||||
return
|
||||
user.visible_message("[user] secures the windoor assembly to the floor.", "You start to secure the windoor assembly to the floor...")
|
||||
|
||||
if(!I.use_tool(src, user, 40, volume = I.tool_volume) || anchored || state != "01")
|
||||
return
|
||||
for(var/obj/machinery/door/window/WD in loc)
|
||||
if(WD.dir == dir)
|
||||
to_chat(user, "<span class='warning'>There is already a windoor in that location!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You secure the windoor assembly.</span>")
|
||||
anchored = TRUE
|
||||
if(secure)
|
||||
name = "secure anchored windoor assembly"
|
||||
else
|
||||
name = "anchored windoor assembly"
|
||||
|
||||
else //Unwrenching an unsecure assembly un-anchors it. Step 4 undone
|
||||
user.visible_message("[user] unsecures the windoor assembly from the floor.", "You start to unsecure the windoor assembly from the floor...")
|
||||
if(!I.use_tool(src, user, 40, volume = I.tool_volume) || !anchored || state != "01")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You unsecure the windoor assembly.</span>")
|
||||
anchored = FALSE
|
||||
if(secure)
|
||||
name = "secure windoor assembly"
|
||||
else
|
||||
name = "windoor assembly"
|
||||
update_icon()
|
||||
|
||||
/obj/structure/windoor_assembly/welder_act(mob/user, obj/item/I)
|
||||
if(state != "01")
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
WELDER_ATTEMPT_SLICING_MESSAGE
|
||||
if(I.use_tool(src, user, 40, volume = I.tool_volume) && state == "01")
|
||||
WELDER_FLOOR_SLICE_SUCCESS_MESSAGE
|
||||
var/obj/item/stack/sheet/rglass/RG = new (get_turf(src), 5)
|
||||
RG.add_fingerprint(user)
|
||||
if(secure)
|
||||
var/obj/item/stack/rods/R = new (get_turf(src), 4)
|
||||
R.add_fingerprint(user)
|
||||
qdel(src)
|
||||
|
||||
|
||||
//Rotates the windoor assembly clockwise
|
||||
/obj/structure/windoor_assembly/verb/revrotate()
|
||||
|
||||
@@ -212,22 +212,6 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
|
||||
return 1 //skip the afterattack
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
if(iswelder(I) && user.a_intent == INTENT_HELP)
|
||||
var/obj/item/weldingtool/WT = I
|
||||
if(obj_integrity < max_integrity)
|
||||
if(WT.remove_fuel(0,user))
|
||||
to_chat(user, "<span class='notice'>You begin repairing [src]...</span>")
|
||||
playsound(src, WT.usesound, 40, 1)
|
||||
if(do_after(user, 40*I.toolspeed, target = src))
|
||||
obj_integrity = max_integrity
|
||||
playsound(src, 'sound/items/welder2.ogg', 50, 1)
|
||||
update_nearby_icons()
|
||||
to_chat(user, "<span class='notice'>You repair [src].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] is already in good condition!</span>")
|
||||
return
|
||||
|
||||
if(istype(I, /obj/item/grab) && get_dist(src, user) < 2)
|
||||
var/obj/item/grab/G = I
|
||||
if(isliving(G.affecting))
|
||||
@@ -256,51 +240,87 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
|
||||
M.apply_damage(30)
|
||||
take_damage(75)
|
||||
return
|
||||
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
if(isscrewdriver(I))
|
||||
playsound(src, I.usesound, 75, 1)
|
||||
if(reinf)
|
||||
if(state == WINDOW_SCREWED_TO_FRAME || state == WINDOW_IN_FRAME)
|
||||
to_chat(user, "<span class='notice'>You begin to [state == WINDOW_SCREWED_TO_FRAME ? "unscrew the window from":"screw the window to"] the frame...</span>")
|
||||
if(do_after(user, decon_speed*I.toolspeed, target = src, extra_checks = CALLBACK(src, .proc/check_state_and_anchored, state, anchored)))
|
||||
state = (state == WINDOW_IN_FRAME ? WINDOW_SCREWED_TO_FRAME : WINDOW_IN_FRAME)
|
||||
to_chat(user, "<span class='notice'>You [state == WINDOW_IN_FRAME ? "unfasten the window from":"fasten the window to"] the frame.</span>")
|
||||
else if(state == WINDOW_OUT_OF_FRAME)
|
||||
to_chat(user, "<span class='notice'>You begin to [anchored ? "unscrew the frame from":"screw the frame to"] the floor...</span>")
|
||||
if(do_after(user, decon_speed*I.toolspeed, target = src, extra_checks = CALLBACK(src, .proc/check_state_and_anchored, state, anchored)))
|
||||
anchored = !anchored
|
||||
update_nearby_icons()
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "fasten the frame to":"unfasten the frame from"] the floor.</span>")
|
||||
else //if we're not reinforced, we don't need to check or update state
|
||||
to_chat(user, "<span class='notice'>You begin to [anchored ? "unscrew the window from":"screw the window to"] the floor...</span>")
|
||||
if(do_after(user, decon_speed*I.toolspeed, target = src, extra_checks = CALLBACK(src, .proc/check_anchored, anchored)))
|
||||
anchored = !anchored
|
||||
air_update_turf(TRUE)
|
||||
update_nearby_icons()
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "fasten the window to":"unfasten the window from"] the floor.</span>")
|
||||
return
|
||||
|
||||
else if(iscrowbar(I) && reinf && (state == WINDOW_OUT_OF_FRAME || state == WINDOW_IN_FRAME))
|
||||
to_chat(user, "<span class='notice'>You begin to lever the window [state == WINDOW_OUT_OF_FRAME ? "into":"out of"] the frame...</span>")
|
||||
playsound(src, I.usesound, 75, 1)
|
||||
if(do_after(user, decon_speed*I.toolspeed, target = src, extra_checks = CALLBACK(src, .proc/check_state_and_anchored, state, anchored)))
|
||||
state = (state == WINDOW_OUT_OF_FRAME ? WINDOW_IN_FRAME : WINDOW_OUT_OF_FRAME)
|
||||
to_chat(user, "<span class='notice'>You pry the window [state == WINDOW_IN_FRAME ? "into":"out of"] the frame.</span>")
|
||||
return
|
||||
|
||||
else if(iswrench(I) && !anchored)
|
||||
playsound(src, I.usesound, 75, 1)
|
||||
to_chat(user, "<span class='notice'> You begin to disassemble [src]...</span>")
|
||||
if(do_after(user, decon_speed*I.toolspeed, target = src, extra_checks = CALLBACK(src, .proc/check_state_and_anchored, state, anchored)))
|
||||
var/obj/item/stack/sheet/G = new glass_type(user.loc, glass_amount)
|
||||
G.add_fingerprint(user)
|
||||
playsound(src, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>You successfully disassemble [src].</span>")
|
||||
qdel(src)
|
||||
return
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/window/crowbar_act(mob/user, obj/item/I)
|
||||
if(!reinf)
|
||||
return
|
||||
if(state != WINDOW_OUT_OF_FRAME && state != WINDOW_IN_FRAME)
|
||||
return
|
||||
if(flags & NODECONSTRUCT)
|
||||
return
|
||||
. = TRUE
|
||||
if(!can_be_reached(user))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You begin to lever the window [state == WINDOW_OUT_OF_FRAME ? "into":"out of"] the frame...</span>")
|
||||
if(!I.use_tool(src, user, decon_speed, volume = I.tool_volume, extra_checks = CALLBACK(src, .proc/check_state_and_anchored, state, anchored)))
|
||||
return
|
||||
state = (state == WINDOW_OUT_OF_FRAME ? WINDOW_IN_FRAME : WINDOW_OUT_OF_FRAME)
|
||||
to_chat(user, "<span class='notice'>You pry the window [state == WINDOW_IN_FRAME ? "into":"out of"] the frame.</span>")
|
||||
|
||||
/obj/structure/window/screwdriver_act(mob/user, obj/item/I)
|
||||
if(flags & NODECONSTRUCT)
|
||||
return
|
||||
. = TRUE
|
||||
if(!can_be_reached(user))
|
||||
return
|
||||
if(reinf)
|
||||
if(state == WINDOW_SCREWED_TO_FRAME || state == WINDOW_IN_FRAME)
|
||||
to_chat(user, "<span class='notice'>You begin to [state == WINDOW_SCREWED_TO_FRAME ? "unscrew the window from":"screw the window to"] the frame...</span>")
|
||||
if(!I.use_tool(src, user, decon_speed, volume = I.tool_volume, extra_checks = CALLBACK(src, .proc/check_state_and_anchored, state, anchored)))
|
||||
return
|
||||
state = (state == WINDOW_IN_FRAME ? WINDOW_SCREWED_TO_FRAME : WINDOW_IN_FRAME)
|
||||
to_chat(user, "<span class='notice'>You [state == WINDOW_IN_FRAME ? "unfasten the window from":"fasten the window to"] the frame.</span>")
|
||||
else if(state == WINDOW_OUT_OF_FRAME)
|
||||
to_chat(user, "<span class='notice'>You begin to [anchored ? "unscrew the frame from":"screw the frame to"] the floor...</span>")
|
||||
if(!I.use_tool(src, user, decon_speed, volume = I.tool_volume, extra_checks = CALLBACK(src, .proc/check_state_and_anchored, state, anchored)))
|
||||
return
|
||||
anchored = !anchored
|
||||
update_nearby_icons()
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "fasten the frame to":"unfasten the frame from"] the floor.</span>")
|
||||
else //if we're not reinforced, we don't need to check or update state
|
||||
to_chat(user, "<span class='notice'>You begin to [anchored ? "unscrew the window from":"screw the window to"] the floor...</span>")
|
||||
if(!I.use_tool(src, user, decon_speed, volume = I.tool_volume, extra_checks = CALLBACK(src, .proc/check_anchored, anchored)))
|
||||
return
|
||||
anchored = !anchored
|
||||
air_update_turf(TRUE)
|
||||
update_nearby_icons()
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "fasten the window to":"unfasten the window from"] the floor.</span>")
|
||||
|
||||
/obj/structure/window/wrench_act(mob/user, obj/item/I)
|
||||
if(flags & NODECONSTRUCT)
|
||||
return
|
||||
if(anchored)
|
||||
return
|
||||
. = TRUE
|
||||
if(!can_be_reached(user))
|
||||
return
|
||||
TOOL_ATTEMPT_DISMANTLE_MESSAGE
|
||||
if(!I.use_tool(src, user, decon_speed, volume = I.tool_volume, extra_checks = CALLBACK(src, .proc/check_state_and_anchored, state, anchored)))
|
||||
return
|
||||
var/obj/item/stack/sheet/G = new glass_type(user.loc, glass_amount)
|
||||
G.add_fingerprint(user)
|
||||
playsound(src, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>You successfully disassemble [src].</span>")
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/window/welder_act(mob/user, obj/item/I)
|
||||
if(user.a_intent != INTENT_HELP)
|
||||
return
|
||||
. = TRUE
|
||||
if(!can_be_reached(user))
|
||||
return
|
||||
if(obj_integrity >= max_integrity)
|
||||
to_chat(user, "<span class='warning'>[src] is already in good condition!</span>")
|
||||
return
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
WELDER_ATTEMPT_REPAIR_MESSAGE
|
||||
if(I.use_tool(src, user, 40, volume = I.tool_volume))
|
||||
obj_integrity = max_integrity
|
||||
WELDER_REPAIR_SUCCESS_MESSAGE
|
||||
|
||||
/obj/structure/window/proc/check_state(checked_state)
|
||||
if(state == checked_state)
|
||||
return TRUE
|
||||
|
||||
Reference in New Issue
Block a user