Merge branch 'master' into QM-as-Head
This commit is contained in:
@@ -88,7 +88,7 @@
|
||||
|
||||
/obj/structure/sign/poster/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/wirecutters))
|
||||
playsound(loc, I.usesound, 100, 1)
|
||||
I.play_tool_sound(src, 100)
|
||||
if(ruined)
|
||||
to_chat(user, "<span class='notice'>You remove the remnants of the poster.</span>")
|
||||
qdel(src)
|
||||
|
||||
@@ -30,4 +30,4 @@
|
||||
|
||||
/obj/effect/decal/cleanable/robot_debris/old
|
||||
name = "dusty robot debris"
|
||||
desc = "Looks like nobody has touched this in a while."
|
||||
desc = "Looks like nobody has touched this in a while."
|
||||
@@ -265,7 +265,7 @@
|
||||
chemholder = null
|
||||
return ..()
|
||||
|
||||
/datum/effect_system/smoke_spread/chem/set_up(datum/reagents/carry = null, radius = 1, loca, silent = 0)
|
||||
/datum/effect_system/smoke_spread/chem/set_up(datum/reagents/carry = null, radius = 1, loca, silent = FALSE)
|
||||
if(isturf(loca))
|
||||
location = loca
|
||||
else
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
var/turf/real_target = get_link_target_turf()
|
||||
if(!istype(real_target))
|
||||
return FALSE
|
||||
if(!ismecha(M) && M.anchored && !allow_anchored)
|
||||
if(!ismecha(M) && !istype(M, /obj/item/projectile) && M.anchored && !allow_anchored)
|
||||
return
|
||||
if(ismegafauna(M))
|
||||
message_admins("[M] has used a portal at [ADMIN_COORDJMP(src)] made by [usr].")
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
/obj/effect/spawner/trap
|
||||
name = "random trap"
|
||||
icon = 'icons/obj/hand_of_god_structures.dmi'
|
||||
icon_state = "trap_rand"
|
||||
|
||||
/obj/effect/spawner/trap/Initialize(mapload)
|
||||
..()
|
||||
var/new_type = pick(subtypesof(/obj/structure/trap) - typesof(/obj/structure/trap/ctf))
|
||||
new new_type(get_turf(src))
|
||||
return INITIALIZE_HINT_QDEL
|
||||
@@ -126,12 +126,12 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
if(damtype == "brute")
|
||||
hitsound = "swing_hit"
|
||||
|
||||
if (!embedding)
|
||||
embedding = getEmbeddingBehavior()
|
||||
else if (islist(embedding))
|
||||
embedding = getEmbeddingBehavior(arglist(embedding))
|
||||
else if (!istype(embedding, /datum/embedding_behavior))
|
||||
stack_trace("Invalid type [embedding.type] found in .embedding during /obj/item Initialize()")
|
||||
if (!embedding)
|
||||
embedding = getEmbeddingBehavior()
|
||||
else if (islist(embedding))
|
||||
embedding = getEmbeddingBehavior(arglist(embedding))
|
||||
else if (!istype(embedding, /datum/embedding_behavior))
|
||||
stack_trace("Invalid type [embedding.type] found in .embedding during /obj/item Initialize()")
|
||||
|
||||
/obj/item/Destroy()
|
||||
flags_1 &= ~DROPDEL_1 //prevent reqdels
|
||||
@@ -735,7 +735,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
openToolTip(user,src,params,title = name,content = "[desc]<br><b>Force:</b> [force_string]",theme = "")
|
||||
|
||||
/obj/item/MouseEntered(location, control, params)
|
||||
if((item_flags & IN_INVENTORY) && usr.client.prefs.enable_tips)
|
||||
if((item_flags & IN_INVENTORY) && usr.client.prefs.enable_tips && !QDELETED(src))
|
||||
var/timedelay = usr.client.prefs.tip_delay/100
|
||||
var/user = usr
|
||||
tip_timer = addtimer(CALLBACK(src, .proc/openTip, location, control, params, user), timedelay, TIMER_STOPPABLE)//timer takes delay in deciseconds, but the pref is in milliseconds. dividing by 100 converts it.
|
||||
@@ -743,3 +743,72 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
/obj/item/MouseExited()
|
||||
deltimer(tip_timer)//delete any in-progress timer if the mouse is moved off the item before it finishes
|
||||
closeToolTip(usr)
|
||||
|
||||
|
||||
// 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.
|
||||
if(!delay && !tool_start_check(user, amount))
|
||||
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, 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
|
||||
|
||||
// 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
|
||||
|
||||
// Plays item's usesound, if any.
|
||||
/obj/item/proc/play_tool_sound(atom/target, volume=50)
|
||||
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, amount, datum/callback/extra_checks)
|
||||
return tool_use_check(user, amount) && (!extra_checks || extra_checks.Invoke())
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
flags_1 = CONDUCT_1 | NOBLUDGEON_1
|
||||
slot_flags = SLOT_BELT
|
||||
usesound = 'sound/effects/spray2.ogg'
|
||||
|
||||
var/obj/item/device/toner/ink = null
|
||||
|
||||
@@ -20,7 +21,7 @@
|
||||
|
||||
//This proc doesn't just check if the painter can be used, but also uses it.
|
||||
//Only call this if you are certain that the painter will be used right after this check!
|
||||
/obj/item/airlock_painter/proc/use(mob/user)
|
||||
/obj/item/airlock_painter/proc/use_paint(mob/user)
|
||||
if(can_use(user))
|
||||
ink.charges--
|
||||
playsound(src.loc, 'sound/effects/spray2.ogg', 50, 1)
|
||||
|
||||
@@ -191,6 +191,7 @@
|
||||
var/obj/machinery/door/firedoor/FD = D
|
||||
FD.CalculateAffectingAreas()
|
||||
to_chat(usr, "<span class='notice'>You rename the '[prevname]' to '[str]'.</span>")
|
||||
log_game("[key_name(usr)] has renamed [prevname] to [str]")
|
||||
interact()
|
||||
return 1
|
||||
|
||||
|
||||
@@ -78,6 +78,18 @@
|
||||
return
|
||||
A.emag_act(user)
|
||||
|
||||
/obj/item/card/emagfake
|
||||
desc = "It's a card with a magnetic strip attached to some circuitry."
|
||||
name = "cryptographic sequencer"
|
||||
icon_state = "emag"
|
||||
item_state = "card-id"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/idcards_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/idcards_righthand.dmi'
|
||||
|
||||
/obj/item/card/emagfake/afterattack()
|
||||
. = ..()
|
||||
playsound(src, 'sound/items/bikehorn.ogg', 50, 1)
|
||||
|
||||
/obj/item/card/id
|
||||
name = "identification card"
|
||||
desc = "A card used to provide ID and determine access across the station."
|
||||
@@ -109,10 +121,11 @@
|
||||
update_label()
|
||||
|
||||
/obj/item/card/id/attack_self(mob/user)
|
||||
user.visible_message("<span class='notice'>[user] shows you: [icon2html(src, viewers(user))] [src.name].</span>", \
|
||||
if(Adjacent(user))
|
||||
user.visible_message("<span class='notice'>[user] shows you: [icon2html(src, viewers(user))] [src.name].</span>", \
|
||||
"<span class='notice'>You show \the [src.name].</span>")
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/item/card/id/examine(mob/user)
|
||||
..()
|
||||
@@ -148,6 +161,12 @@ update_label("John Doe", "Clowny")
|
||||
lefthand_file = 'icons/mob/inhands/equipment/idcards_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/idcards_righthand.dmi'
|
||||
|
||||
/obj/item/card/id/silver/reaper
|
||||
name = "Thirteen's ID Card (Reaper)"
|
||||
access = list(ACCESS_MAINT_TUNNELS)
|
||||
assignment = "Reaper"
|
||||
registered_name = "Thirteen"
|
||||
|
||||
/obj/item/card/id/gold
|
||||
name = "gold identification card"
|
||||
desc = "A golden card which shows power and might."
|
||||
|
||||
@@ -807,4 +807,4 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
return
|
||||
|
||||
if(reagents && reagents.total_volume)
|
||||
hand_reagents()
|
||||
hand_reagents()
|
||||
|
||||
@@ -85,6 +85,11 @@
|
||||
build_path = /obj/machinery/recharger
|
||||
req_components = list(/obj/item/stock_parts/capacitor = 1)
|
||||
|
||||
/obj/item/circuitboard/machine/cell_charger
|
||||
name = "Cell Charger (Machine Board)"
|
||||
build_path = /obj/machinery/cell_charger
|
||||
req_components = list(/obj/item/stock_parts/capacitor = 1)
|
||||
|
||||
/obj/item/circuitboard/machine/cyborgrecharger
|
||||
name = "Cyborg Recharger (Machine Board)"
|
||||
build_path = /obj/machinery/recharge_station
|
||||
@@ -287,7 +292,7 @@
|
||||
new_setting = "Freezer"
|
||||
name = initial(new_type.name)
|
||||
build_path = initial(new_type.build_path)
|
||||
playsound(user, I.usesound, 50, 1)
|
||||
I.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You change the circuitboard setting to \"[new_setting]\".</span>")
|
||||
else
|
||||
return ..()
|
||||
@@ -584,6 +589,12 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/circuitboard/machine/reagentgrinder
|
||||
name = "Machine Design (All-In-One Grinder)"
|
||||
build_path = /obj/machinery/reagentgrinder/constructed
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/manipulator = 1)
|
||||
|
||||
/obj/item/circuitboard/machine/chem_master/condi
|
||||
name = "CondiMaster 3000 (Machine Board)"
|
||||
build_path = /obj/machinery/chem_master/condimaster
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
ui.open()
|
||||
|
||||
/obj/item/toy/crayon/spraycan/AltClick(mob/user)
|
||||
if(user.canUseTopic(src, be_close=TRUE))
|
||||
if(user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
if(has_cap)
|
||||
is_capped = !is_capped
|
||||
to_chat(user, "<span class='notice'>The cap on [src] is now [is_capped ? "on" : "off"].</span>")
|
||||
|
||||
@@ -3,6 +3,12 @@
|
||||
|
||||
GLOBAL_LIST_EMPTY(PDAs)
|
||||
|
||||
#define PDA_SCANNER_NONE 0
|
||||
#define PDA_SCANNER_MEDICAL 1
|
||||
#define PDA_SCANNER_FORENSICS 2 //unused
|
||||
#define PDA_SCANNER_REAGENT 3
|
||||
#define PDA_SCANNER_HALOGEN 4
|
||||
#define PDA_SCANNER_GAS 5
|
||||
|
||||
/obj/item/device/pda
|
||||
name = "\improper PDA"
|
||||
@@ -39,11 +45,11 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
#define MODE_VT 3
|
||||
|
||||
//Secondary variables
|
||||
var/scanmode = 0 //1 is medical scanner, 2 is forensics, 3 is reagent scanner.
|
||||
var/fon = 0 //Is the flashlight function on?
|
||||
var/scanmode = PDA_SCANNER_NONE
|
||||
var/fon = FALSE //Is the flashlight function on?
|
||||
var/f_lum = 2.3 //Luminosity for the flashlight function
|
||||
var/silent = 0 //To beep or not to beep, that is the question
|
||||
var/toff = 0 //If 1, messenger disabled
|
||||
var/silent = FALSE //To beep or not to beep, that is the question
|
||||
var/toff = FALSE //If TRUE, messenger disabled
|
||||
var/tnote = null //Current Texts
|
||||
var/last_text //No text spamming
|
||||
var/last_noise //Also no honk spamming that's bad too
|
||||
@@ -53,10 +59,10 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
var/mimeamt = 0 //How many silence left when infected with mime.exe
|
||||
var/note = "Congratulations, your station has chosen the Thinktronic 5230 Personal Data Assistant!" //Current note in the notepad function
|
||||
var/notehtml = ""
|
||||
var/notescanned = 0 // True if what is in the notekeeper was from a paper.
|
||||
var/notescanned = FALSE // True if what is in the notekeeper was from a paper.
|
||||
var/detonatable = TRUE // Can the PDA be blown up?
|
||||
var/hidden = 0 // Is the PDA hidden from the PDA list?
|
||||
var/emped = 0
|
||||
var/hidden = FALSE // Is the PDA hidden from the PDA list?
|
||||
var/emped = FALSE
|
||||
var/equipped = FALSE //used here to determine if this is the first time its been picked up
|
||||
|
||||
var/obj/item/card/id/id = null //Making it possible to slot an ID card into the PDA so it can function as both.
|
||||
@@ -415,7 +421,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
if (!isnull(cartridge))
|
||||
U.put_in_hands(cartridge)
|
||||
to_chat(U, "<span class='notice'>You remove [cartridge] from [src].</span>")
|
||||
scanmode = 0
|
||||
scanmode = PDA_SCANNER_NONE
|
||||
cartridge.host_pda = null
|
||||
cartridge = null
|
||||
update_icon()
|
||||
@@ -440,40 +446,40 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
|
||||
if("Light")
|
||||
if(fon)
|
||||
fon = 0
|
||||
fon = FALSE
|
||||
set_light(0)
|
||||
else if(f_lum)
|
||||
fon = 1
|
||||
fon = TRUE
|
||||
set_light(f_lum)
|
||||
update_icon()
|
||||
if("Medical Scan")
|
||||
if(scanmode == 1)
|
||||
scanmode = 0
|
||||
if(scanmode == PDA_SCANNER_MEDICAL)
|
||||
scanmode = PDA_SCANNER_NONE
|
||||
else if((!isnull(cartridge)) && (cartridge.access & CART_MEDICAL))
|
||||
scanmode = 1
|
||||
scanmode = PDA_SCANNER_MEDICAL
|
||||
if("Reagent Scan")
|
||||
if(scanmode == 3)
|
||||
scanmode = 0
|
||||
if(scanmode == PDA_SCANNER_REAGENT)
|
||||
scanmode = PDA_SCANNER_NONE
|
||||
else if((!isnull(cartridge)) && (cartridge.access & CART_REAGENT_SCANNER))
|
||||
scanmode = 3
|
||||
scanmode = PDA_SCANNER_REAGENT
|
||||
if("Halogen Counter")
|
||||
if(scanmode == 4)
|
||||
scanmode = 0
|
||||
if(scanmode == PDA_SCANNER_HALOGEN)
|
||||
scanmode = PDA_SCANNER_NONE
|
||||
else if((!isnull(cartridge)) && (cartridge.access & CART_ENGINE))
|
||||
scanmode = 4
|
||||
scanmode = PDA_SCANNER_HALOGEN
|
||||
if("Honk")
|
||||
if ( !(last_noise && world.time < last_noise + 20) )
|
||||
playsound(loc, 'sound/items/bikehorn.ogg', 50, 1)
|
||||
playsound(src, 'sound/items/bikehorn.ogg', 50, 1)
|
||||
last_noise = world.time
|
||||
if("Trombone")
|
||||
if ( !(last_noise && world.time < last_noise + 20) )
|
||||
playsound(loc, 'sound/misc/sadtrombone.ogg', 50, 1)
|
||||
playsound(src, 'sound/misc/sadtrombone.ogg', 50, 1)
|
||||
last_noise = world.time
|
||||
if("Gas Scan")
|
||||
if(scanmode == 5)
|
||||
scanmode = 0
|
||||
if(scanmode == PDA_SCANNER_GAS)
|
||||
scanmode = PDA_SCANNER_NONE
|
||||
else if((!isnull(cartridge)) && (cartridge.access & CART_ATMOS))
|
||||
scanmode = 5
|
||||
scanmode = PDA_SCANNER_GAS
|
||||
if("Drone Phone")
|
||||
var/alert_s = input(U,"Alert severity level","Ping Drones",null) as null|anything in list("Low","Medium","High","Critical")
|
||||
var/area/A = get_area(U)
|
||||
@@ -491,7 +497,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
if (mode == 1 && n)
|
||||
note = n
|
||||
notehtml = parsemarkdown(n, U)
|
||||
notescanned = 0
|
||||
notescanned = FALSE
|
||||
else
|
||||
U << browse(null, "window=pda")
|
||||
return
|
||||
@@ -571,7 +577,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
|
||||
if ((honkamt > 0) && (prob(60)))//For clown virus.
|
||||
honkamt--
|
||||
playsound(loc, 'sound/items/bikehorn.ogg', 30, 1)
|
||||
playsound(src, 'sound/items/bikehorn.ogg', 30, 1)
|
||||
|
||||
if(U.machine == src && href_list["skiprefresh"]!="1")//Final safety.
|
||||
attack_self(U)//It auto-closes the menu prior if the user is not in range and so on.
|
||||
@@ -656,7 +662,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
tnote += "<i><b>← From <a href='byond://?src=[REF(src)];choice=Message;target=[REF(signal.source)]'>[signal.data["name"]]</a> ([signal.data["job"]]):</b></i><br>[signal.format_message()]<br>"
|
||||
|
||||
if (!silent)
|
||||
playsound(loc, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
playsound(src, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
audible_message("[icon2html(src, hearers(src))] *[ttone]*", null, 3)
|
||||
//Search for holder of the PDA.
|
||||
var/mob/living/L = null
|
||||
@@ -816,9 +822,6 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
healthscan(user, C, 1)
|
||||
add_fingerprint(user)
|
||||
|
||||
if(2)
|
||||
// Unused
|
||||
|
||||
if(4)
|
||||
C.visible_message("<span class='warning'>[user] has analyzed [C]'s radiation levels!</span>")
|
||||
|
||||
@@ -875,7 +878,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
note = replacetext(note, "<ul>", "\[list\]")
|
||||
note = replacetext(note, "</ul>", "\[/list\]")
|
||||
note = html_encode(note)
|
||||
notescanned = 1
|
||||
notescanned = TRUE
|
||||
to_chat(user, "<span class='notice'>Paper scanned. Saved to PDA's notekeeper.</span>" )
|
||||
|
||||
|
||||
@@ -996,3 +999,9 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
if(!P.owner || P.toff || P.hidden)
|
||||
continue
|
||||
. += P
|
||||
|
||||
#undef PDA_SCANNER_NONE
|
||||
#undef PDA_SCANNER_MEDICAL
|
||||
#undef PDA_SCANNER_REAGENT
|
||||
#undef PDA_SCANNER_HALOGEN
|
||||
#undef PDA_SCANNER_GAS
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
/obj/item/device/pda/ai
|
||||
icon_state = "NONE"
|
||||
ttone = "data"
|
||||
fon = 0
|
||||
fon = FALSE
|
||||
detonatable = FALSE
|
||||
|
||||
/obj/item/device/pda/ai/attack_self(mob/user)
|
||||
@@ -84,7 +84,7 @@
|
||||
default_cartridge = /obj/item/cartridge/virus/mime
|
||||
inserted_item = /obj/item/toy/crayon/mime
|
||||
icon_state = "pda-mime"
|
||||
silent = 1
|
||||
silent = TRUE
|
||||
ttone = "silence"
|
||||
|
||||
/obj/item/device/pda/heads
|
||||
@@ -176,7 +176,7 @@
|
||||
inserted_item = /obj/item/pen/fountain
|
||||
desc = "A portable microcomputer by Thinktronic Systems, LTD. This model is a WGW-11 series e-reader."
|
||||
note = "Congratulations, your station has chosen the Thinktronic 5290 WGW-11 Series E-reader and Personal Data Assistant!"
|
||||
silent = 1 //Quiet in the library!
|
||||
silent = TRUE //Quiet in the library!
|
||||
overlays_x_offset = -3
|
||||
|
||||
/obj/item/device/pda/clear
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
if(!isnull(target) && !target.toff)
|
||||
charges--
|
||||
to_chat(U, "<span class='notice'>Virus Sent!</span>")
|
||||
target.silent = 1
|
||||
target.silent = TRUE
|
||||
target.ttone = "silence"
|
||||
else
|
||||
to_chat(U, "PDA not found.")
|
||||
@@ -67,10 +67,10 @@
|
||||
var/difficulty = 0
|
||||
if(target.cartridge)
|
||||
difficulty += BitCount(target.cartridge.access&(CART_MEDICAL | CART_SECURITY | CART_ENGINE | CART_CLOWN | CART_JANITOR | CART_MANIFEST))
|
||||
if(target.cartridge.access & CART_MANIFEST)
|
||||
difficulty++ //if cartridge has manifest access it has extra snowflake difficulty
|
||||
else
|
||||
difficulty += 2
|
||||
if(target.cartridge.access & CART_MANIFEST)
|
||||
difficulty++ //if cartridge has manifest access it has extra snowflake difficulty
|
||||
else
|
||||
difficulty += 2
|
||||
GET_COMPONENT_FROM(hidden_uplink, /datum/component/uplink, target)
|
||||
if(!target.detonatable || prob(difficulty * 15) || (hidden_uplink))
|
||||
U.show_message("<span class='danger'>An error flashes on your [src].</span>", 1)
|
||||
|
||||
@@ -119,6 +119,7 @@
|
||||
loop.start()
|
||||
|
||||
/obj/item/device/geiger_counter/rad_act(amount)
|
||||
. = ..()
|
||||
if(amount <= RAD_BACKGROUND_RADIATION || !scanning)
|
||||
return
|
||||
current_tick_amount += amount
|
||||
@@ -169,11 +170,9 @@
|
||||
to_chat(user, "<span class='warning'>Turn off [src] before you perform this action!</span>")
|
||||
return 0
|
||||
user.visible_message("<span class='notice'>[user] unscrews [src]'s maintenance panel and begins fiddling with its innards...</span>", "<span class='notice'>You begin resetting [src]...</span>")
|
||||
playsound(user, I.usesound, 50, 1)
|
||||
if(!do_after(user, 40*I.toolspeed, target = user))
|
||||
if(!I.use_tool(src, user, 40, volume=50))
|
||||
return 0
|
||||
user.visible_message("<span class='notice'>[user] refastens [src]'s maintenance panel!</span>", "<span class='notice'>You reset [src] to its factory settings!</span>")
|
||||
playsound(user, 'sound/items/screwdriver2.ogg', 50, 1)
|
||||
obj_flags &= ~EMAGGED
|
||||
radiation_count = 0
|
||||
update_icon()
|
||||
@@ -182,7 +181,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/device/geiger_counter/AltClick(mob/living/user)
|
||||
if(!istype(user) || user.incapacitated())
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE))
|
||||
return ..()
|
||||
if(!scanning)
|
||||
to_chat(usr, "<span class='warning'>[src] must be on to reset its radiation level!</span>")
|
||||
@@ -200,6 +199,20 @@
|
||||
to_chat(user, "<span class='warning'>You override [src]'s radiation storing protocols. It will now generate small doses of radiation, and stored rads are now projected into creatures you scan.</span>")
|
||||
obj_flags |= EMAGGED
|
||||
|
||||
/obj/item/device/geiger_counter/cyborg
|
||||
var/datum/component/mobhook
|
||||
|
||||
/obj/item/device/geiger_counter/cyborg/equipped(mob/user)
|
||||
. = ..()
|
||||
if (mobhook && mobhook.parent != user)
|
||||
QDEL_NULL(mobhook)
|
||||
if (!mobhook)
|
||||
mobhook = user.AddComponent(/datum/component/redirect, list(COMSIG_ATOM_RAD_ACT), CALLBACK(src, /atom.proc/rad_act))
|
||||
|
||||
/obj/item/device/geiger_counter/cyborg/dropped()
|
||||
. = ..()
|
||||
QDEL_NULL(mobhook)
|
||||
|
||||
#undef RAD_LEVEL_NORMAL
|
||||
#undef RAD_LEVEL_MODERATE
|
||||
#undef RAD_LEVEL_HIGH
|
||||
|
||||
@@ -41,10 +41,12 @@ GLOBAL_LIST_EMPTY(GPS_list)
|
||||
add_overlay("working")
|
||||
|
||||
/obj/item/device/gps/AltClick(mob/user)
|
||||
if(!user.canUseTopic(src, BE_CLOSE))
|
||||
return
|
||||
toggletracking(user)
|
||||
|
||||
/obj/item/device/gps/proc/toggletracking(mob/user)
|
||||
if(!user.canUseTopic(src, be_close=TRUE))
|
||||
if(!user.canUseTopic(src, BE_CLOSE))
|
||||
return //user not valid to use gps
|
||||
if(emped)
|
||||
to_chat(user, "It's busted!")
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
hitsound = 'sound/weapons/tap.ogg'
|
||||
toolspeed = 1
|
||||
tool_behaviour = TOOL_MULTITOOL
|
||||
usesound = 'sound/weapons/empty.ogg'
|
||||
var/datum/integrated_io/selected_io = null //functional for integrated circuits.
|
||||
var/mode = 0
|
||||
|
||||
|
||||
@@ -57,37 +57,28 @@
|
||||
|
||||
/obj/item/device/radio/intercom/attackby(obj/item/I, mob/living/user, params)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
var/obj/item/screwdriver/S = I
|
||||
if(unfastened)
|
||||
user.visible_message("<span class='notice'>[user] starts tightening [src]'s screws...</span>", "<span class='notice'>You start screwing in [src]...</span>")
|
||||
playsound(src, S.usesound, 50, 1)
|
||||
if(!do_after(user, 30 * S.toolspeed, target = src))
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] tightens [src]'s screws!</span>", "<span class='notice'>You tighten [src]'s screws.</span>")
|
||||
playsound(src, 'sound/items/screwdriver2.ogg', 50, 1)
|
||||
unfastened = FALSE
|
||||
if(I.use_tool(src, user, 30, volume=50))
|
||||
user.visible_message("<span class='notice'>[user] tightens [src]'s screws!</span>", "<span class='notice'>You tighten [src]'s screws.</span>")
|
||||
unfastened = FALSE
|
||||
else
|
||||
user.visible_message("<span class='notice'>[user] starts loosening [src]'s screws...</span>", "<span class='notice'>You start unscrewing [src]...</span>")
|
||||
playsound(src, S.usesound, 50, 1)
|
||||
if(!do_after(user, 60 * S.toolspeed, target = src))
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] loosens [src]'s screws!</span>", "<span class='notice'>You unscrew [src], loosening it from the wall.</span>")
|
||||
playsound(src, 'sound/items/screwdriver2.ogg', 50, 1)
|
||||
unfastened = TRUE
|
||||
if(I.use_tool(src, user, 40, volume=50))
|
||||
user.visible_message("<span class='notice'>[user] loosens [src]'s screws!</span>", "<span class='notice'>You unscrew [src], loosening it from the wall.</span>")
|
||||
unfastened = TRUE
|
||||
return
|
||||
else if(istype(I, /obj/item/wrench))
|
||||
if(!unfastened)
|
||||
to_chat(user, "<span class='warning'>You need to unscrew [src] from the wall first!</span>")
|
||||
return
|
||||
var/obj/item/wrench/W = I
|
||||
user.visible_message("<span class='notice'>[user] starts unsecuring [src]...</span>", "<span class='notice'>You start unsecuring [src]...</span>")
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
if(!do_after(user, 80 * W.toolspeed, target = src))
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] unsecures [src]!</span>", "<span class='notice'>You detach [src] from the wall.</span>")
|
||||
playsound(src, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
new/obj/item/wallframe/intercom(get_turf(src))
|
||||
qdel(src)
|
||||
I.play_tool_sound(src)
|
||||
if(I.use_tool(src, user, 80))
|
||||
user.visible_message("<span class='notice'>[user] unsecures [src]!</span>", "<span class='notice'>You detach [src] from the wall.</span>")
|
||||
playsound(src, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
new/obj/item/wallframe/intercom(get_turf(src))
|
||||
qdel(src)
|
||||
return
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -276,17 +276,11 @@
|
||||
|
||||
|
||||
/obj/item/device/tape/attackby(obj/item/I, mob/user, params)
|
||||
if(ruined)
|
||||
var/delay = -1
|
||||
if (istype(I, /obj/item/screwdriver))
|
||||
delay = 120*I.toolspeed
|
||||
else if(istype(I, /obj/item/pen))
|
||||
delay = 120*1.5
|
||||
if (delay != -1)
|
||||
to_chat(user, "<span class='notice'>You start winding the tape back in...</span>")
|
||||
if(do_after(user, delay, target = src))
|
||||
to_chat(user, "<span class='notice'>You wound the tape back in.</span>")
|
||||
fix()
|
||||
if(ruined && istype(I, /obj/item/screwdriver) || istype(I, /obj/item/pen))
|
||||
to_chat(user, "<span class='notice'>You start winding the tape back in...</span>")
|
||||
if(I.use_tool(src, user, 120))
|
||||
to_chat(user, "<span class='notice'>You wound the tape back in.</span>")
|
||||
fix()
|
||||
|
||||
//Random colour tapes
|
||||
/obj/item/device/tape/random
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
icon = 'icons/obj/dice.dmi'
|
||||
icon_state = "dicebag"
|
||||
|
||||
/obj/item/storage/pill_bottle/dice/New()
|
||||
..()
|
||||
/obj/item/storage/pill_bottle/dice/Initialize()
|
||||
. = ..()
|
||||
var/special_die = pick("1","2","fudge","space","00","8bd20","4dd6","100")
|
||||
if(special_die == "1")
|
||||
new /obj/item/dice/d1(src)
|
||||
@@ -46,10 +46,10 @@
|
||||
var/can_be_rigged = TRUE
|
||||
var/rigged = FALSE
|
||||
|
||||
/obj/item/dice/New()
|
||||
result = rand(1, sides)
|
||||
/obj/item/dice/Initialize()
|
||||
. = ..()
|
||||
result = roll(sides)
|
||||
update_icon()
|
||||
..()
|
||||
|
||||
/obj/item/dice/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is gambling with death! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
@@ -85,8 +85,8 @@
|
||||
desc = "A die with six sides. 6 TIMES 255 TIMES 255 TILE TOTAL EXISTENCE, SQUARE YOUR MIND OF EDUCATED STUPID: 2 DOES NOT EXIST."
|
||||
icon_state = "spaced6"
|
||||
|
||||
/obj/item/dice/d6/space/New()
|
||||
..()
|
||||
/obj/item/dice/d6/space/Initialize()
|
||||
. = ..()
|
||||
if(prob(10))
|
||||
name = "spess cube"
|
||||
|
||||
@@ -131,6 +131,7 @@
|
||||
name = "d100"
|
||||
desc = "A die with one hundred sides! Probably not fairly weighted..."
|
||||
icon_state = "d100"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
sides = 100
|
||||
|
||||
/obj/item/dice/d100/update_icon()
|
||||
@@ -164,14 +165,14 @@
|
||||
. = ..()
|
||||
|
||||
/obj/item/dice/proc/diceroll(mob/user)
|
||||
result = rand(1, sides)
|
||||
result = roll(sides)
|
||||
if(rigged && result != rigged)
|
||||
if(prob(CLAMP(1/(sides - 1) * 100, 25, 80)))
|
||||
result = rigged
|
||||
var/fake_result = rand(1, sides)//Daredevil isn't as good as he used to be
|
||||
var/fake_result = roll(sides)//Daredevil isn't as good as he used to be
|
||||
var/comment = ""
|
||||
if(sides == 20 && result == 20)
|
||||
comment = "Nat 20!"
|
||||
comment = "NAT 20!"
|
||||
else if(sides == 20 && result == 1)
|
||||
comment = "Ouch, bad luck."
|
||||
update_icon()
|
||||
|
||||
@@ -191,6 +191,8 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/extinguisher/AltClick(mob/user)
|
||||
if(!user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
return
|
||||
EmptyExtinguisher(user)
|
||||
|
||||
/obj/item/extinguisher/proc/EmptyExtinguisher(var/mob/user)
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
toggle_igniter(user)
|
||||
|
||||
/obj/item/flamethrower/AltClick(mob/user)
|
||||
if(ptank && isliving(user) && !user.incapacitated() && Adjacent(user))
|
||||
if(ptank && isliving(user) && user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
user.put_in_hands(ptank)
|
||||
ptank = null
|
||||
to_chat(user, "<span class='notice'>You remove the plasma tank from [src]!</span>")
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
if(beakers.len)
|
||||
stage_change(READY)
|
||||
to_chat(user, "<span class='notice'>You lock the [initial(name)] assembly.</span>")
|
||||
playsound(loc, I.usesound, 25, -3)
|
||||
I.play_tool_sound(src, 25)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need to add at least one beaker before locking the [initial(name)] assembly!</span>")
|
||||
else if(stage == READY && !nadeassembly)
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
update_icon()
|
||||
return
|
||||
if(nadeassembly && istype(I, /obj/item/wirecutters))
|
||||
playsound(src, I.usesound, 20, 1)
|
||||
I.play_tool_sound(src, 20)
|
||||
nadeassembly.forceMove(get_turf(src))
|
||||
nadeassembly.master = null
|
||||
nadeassembly = null
|
||||
|
||||
@@ -40,10 +40,11 @@
|
||||
var/cuffsound = 'sound/weapons/handcuffs.ogg'
|
||||
var/trashtype = null //for disposable cuffs
|
||||
|
||||
/obj/item/restraints/handcuffs/attack(mob/living/carbon/C, mob/living/carbon/human/user)
|
||||
/obj/item/restraints/handcuffs/attack(mob/living/carbon/C, mob/living/user)
|
||||
if(!istype(C))
|
||||
return
|
||||
if(user.has_trait(TRAIT_CLUMSY) && prob(50))
|
||||
|
||||
if(iscarbon(user) && (user.has_trait(TRAIT_CLUMSY) && prob(50)))
|
||||
to_chat(user, "<span class='warning'>Uh... how do those things work?!</span>")
|
||||
apply_cuffs(user,user)
|
||||
return
|
||||
@@ -61,7 +62,10 @@
|
||||
|
||||
playsound(loc, cuffsound, 30, 1, -2)
|
||||
if(do_mob(user, C, 30) && (C.get_num_arms() >= 2 || C.get_arm_ignore()))
|
||||
apply_cuffs(C,user)
|
||||
if(iscyborg(user))
|
||||
apply_cuffs(C, user, TRUE)
|
||||
else
|
||||
apply_cuffs(C, user)
|
||||
to_chat(user, "<span class='notice'>You handcuff [C].</span>")
|
||||
SSblackbox.record_feedback("tally", "handcuffs", 1, type)
|
||||
|
||||
@@ -113,7 +117,6 @@
|
||||
materials = list(MAT_METAL=150, MAT_GLASS=75)
|
||||
breakouttime = 300 //Deciseconds = 30s
|
||||
cuffsound = 'sound/weapons/cablecuff.ogg'
|
||||
var/datum/robot_energy_storage/wirestorage = null
|
||||
|
||||
/obj/item/restraints/handcuffs/cable/Initialize(mapload, param_color)
|
||||
. = ..()
|
||||
@@ -128,23 +131,6 @@
|
||||
color = null
|
||||
add_atom_colour(item_color, FIXED_COLOUR_PRIORITY)
|
||||
|
||||
/obj/item/restraints/handcuffs/cable/attack(mob/living/carbon/C, mob/living/carbon/human/user)
|
||||
if(!istype(C))
|
||||
return
|
||||
if(wirestorage && wirestorage.energy < 15)
|
||||
to_chat(user, "<span class='warning'>You need at least 15 wire to restrain [C]!</span>")
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/restraints/handcuffs/cable/apply_cuffs(mob/living/carbon/target, mob/user, var/dispense = 0)
|
||||
if(wirestorage)
|
||||
if(!wirestorage.use_charge(15))
|
||||
to_chat(user, "<span class='warning'>You need at least 15 wire to restrain [target]!</span>")
|
||||
return
|
||||
return ..(target, user, 1)
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/item/restraints/handcuffs/cable/red
|
||||
item_color = "red"
|
||||
color = "#ff0000"
|
||||
@@ -215,21 +201,6 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/restraints/handcuffs/cable/zipties/cyborg/attack(mob/living/carbon/C, mob/user)
|
||||
if(iscyborg(user))
|
||||
if(!C.handcuffed)
|
||||
playsound(loc, 'sound/weapons/cablecuff.ogg', 30, 1, -2)
|
||||
C.visible_message("<span class='danger'>[user] is trying to put zipties on [C]!</span>", \
|
||||
"<span class='userdanger'>[user] is trying to put zipties on [C]!</span>")
|
||||
if(do_mob(user, C, 30))
|
||||
if(!C.handcuffed)
|
||||
C.handcuffed = new /obj/item/restraints/handcuffs/cable/zipties/used(C)
|
||||
C.update_handcuffed()
|
||||
to_chat(user, "<span class='notice'>You handcuff [C].</span>")
|
||||
add_logs(user, C, "handcuffed")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You fail to handcuff [C]!</span>")
|
||||
|
||||
/obj/item/restraints/handcuffs/cable/zipties
|
||||
name = "zipties"
|
||||
desc = "Plastic, disposable zipties that can be used to restrain temporarily but are destroyed after use."
|
||||
@@ -249,7 +220,6 @@
|
||||
/obj/item/restraints/handcuffs/cable/zipties/used/attack()
|
||||
return
|
||||
|
||||
|
||||
//Legcuffs
|
||||
|
||||
/obj/item/restraints/legcuffs
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
//CREATOR'S NOTE: DO NOT FUCKING GIVE THIS TO BOTANY!
|
||||
/obj/item/hot_potato
|
||||
name = "hot potato"
|
||||
desc = "A label on the side of this potato reads \"Product of DonkCo Service Wing. Activate far away from populated areas. Device will only attach to sapient creatures.\" <span class='boldnotice'>You can attack anyone with it to force it on them instead of yourself!</span>"
|
||||
icon = 'icons/obj/hydroponics/harvest.dmi'
|
||||
icon_state = "potato"
|
||||
flags_1 = NOBLUDGEON_1
|
||||
force = 0
|
||||
var/icon_off = "potato"
|
||||
var/icon_on = "potato_active"
|
||||
var/detonation_timerid
|
||||
var/activation_time = 0
|
||||
var/timer = 600 //deciseconds
|
||||
var/show_timer = FALSE
|
||||
var/reusable = FALSE //absolute madman
|
||||
var/sticky = TRUE
|
||||
var/forceful_attachment = TRUE
|
||||
var/stimulant = TRUE
|
||||
var/detonate_explosion = TRUE
|
||||
var/detonate_dev_range = 0
|
||||
var/detonate_heavy_range = 0
|
||||
var/detonate_light_range = 2
|
||||
var/detonate_flash_range = 5
|
||||
var/detonate_fire_range = 5
|
||||
|
||||
var/color_val = FALSE
|
||||
|
||||
/obj/item/hot_potato/proc/detonate()
|
||||
var/atom/location = loc
|
||||
location.visible_message("<span class='userdanger'>[src] [detonate_explosion? "explodes" : "activates"]!</span>", "<span class='userdanger'>[src] activates! You've ran out of time!</span>")
|
||||
if(detonate_explosion)
|
||||
explosion(src, detonate_dev_range, detonate_heavy_range, detonate_light_range, detonate_flash_range, flame_range = detonate_fire_range)
|
||||
deactivate()
|
||||
if(!reusable)
|
||||
var/mob/M = loc
|
||||
if(istype(M))
|
||||
M.dropItemToGround(src, TRUE)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/hot_potato/proc/is_active()
|
||||
return isnull(detonation_timerid)? FALSE : TRUE
|
||||
|
||||
/obj/item/hot_potato/attack_self(mob/user)
|
||||
if(activate(timer, user))
|
||||
user.visible_message("<span class='boldwarning'>[user] squeezes [src], which promptly starts to flash red-hot colors!</span>", "<span class='boldwarning'>You squeeze [src], activating its countdown and attachment mechanism!</span>",
|
||||
"<span class='boldwarning'>You hear a mechanical click and a loud beeping!</span>")
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/hot_potato/process()
|
||||
if(stimulant)
|
||||
if(isliving(loc))
|
||||
var/mob/living/L = loc
|
||||
L.SetStun(0)
|
||||
L.SetKnockdown(0)
|
||||
L.SetSleeping(0)
|
||||
L.SetUnconscious(0)
|
||||
L.reagents.add_reagent("muscle_stimulant", CLAMP(5 - L.reagents.get_reagent_amount("muscle_stimulant"), 0, 5)) //If you don't have legs or get bola'd, tough luck!
|
||||
color_val = !color_val
|
||||
L.add_atom_colour(color_val? "#ffff00" : "#00ffff", FIXED_COLOUR_PRIORITY)
|
||||
|
||||
/obj/item/hot_potato/examine(mob/user)
|
||||
. = ..()
|
||||
if(is_active())
|
||||
to_chat(user, "<span class='warning'>[src] is flashing red-hot! You should probably get rid of it!</span>")
|
||||
if(show_timer)
|
||||
to_chat(user, "<span class='warning'>[src]'s timer looks to be at [(activation_time - world.time) / 10] seconds!</span>")
|
||||
|
||||
/obj/item/hot_potato/equipped(mob/user)
|
||||
. = ..()
|
||||
if(is_active())
|
||||
to_chat(user, "<span class='userdanger'>You have a really bad feeling about [src]!</span>")
|
||||
|
||||
/obj/item/hot_potato/afterattack(atom/target, mob/user, adjacent, params)
|
||||
if(!adjacent || !ismob(target))
|
||||
return ..()
|
||||
force_onto(target, user)
|
||||
|
||||
/obj/item/hot_potato/proc/force_onto(mob/living/victim, mob/user)
|
||||
if(!istype(victim) || user != loc || victim == user)
|
||||
return FALSE
|
||||
if(!victim.client)
|
||||
to_chat(user, "<span class='boldwarning'>[src] refuses to attach to a non-sapient creature!</span>")
|
||||
if(victim.stat != CONSCIOUS || !victim.get_num_legs())
|
||||
to_chat(user, "<span class='boldwarning'>[src] refuses to attach to someone incapable of using it!</span>")
|
||||
user.temporarilyRemoveItemFromInventory(src, TRUE)
|
||||
. = FALSE
|
||||
if(!victim.put_in_hands(src))
|
||||
if(forceful_attachment)
|
||||
victim.dropItemToGround(victim.get_inactive_held_item())
|
||||
if(!victim.put_in_hands(src))
|
||||
victim.dropItemToGround(victim.get_active_held_item())
|
||||
if(victim.put_in_hands(src))
|
||||
. = TRUE
|
||||
else
|
||||
. = TRUE
|
||||
else
|
||||
. = TRUE
|
||||
if(.)
|
||||
add_logs(user, victim, "forced a hot potato with explosive variables ([detonate_explosion]-[detonate_dev_range]/[detonate_heavy_range]/[detonate_light_range]/[detonate_flash_range]/[detonate_fire_range]) onto")
|
||||
user.visible_message("<span class='userdanger'>[user] forces [src] onto [victim]!</span>", "<span class='userdanger'>You force [src] onto [victim]!</span>", "<span class='boldwarning'>You hear a mechanical click and a beep.</span>")
|
||||
user.remove_atom_colour(TEMPORARY_COLOUR_PRIORITY)
|
||||
else
|
||||
add_logs(user, victim, "tried to force a hot potato with explosive variables ([detonate_explosion]-[detonate_dev_range]/[detonate_heavy_range]/[detonate_light_range]/[detonate_flash_range]/[detonate_fire_range]) onto")
|
||||
user.visible_message("<span class='boldwarning'>[user] tried to force [src] onto [victim], but it could not attach!</span>", "<span class='boldwarning'>You try to force [src] onto [victim], but it is unable to attach!</span>", "<span class='boldwarning'>You hear a mechanical click and two buzzes.</span>")
|
||||
user.put_in_hands(src)
|
||||
|
||||
/obj/item/hot_potato/dropped(mob/user)
|
||||
. = ..()
|
||||
user.remove_atom_colour(TEMPORARY_COLOUR_PRIORITY)
|
||||
|
||||
/obj/item/hot_potato/proc/activate(delay, mob/user)
|
||||
if(is_active())
|
||||
return
|
||||
update_icon()
|
||||
if(sticky)
|
||||
flags_1 |= NODROP_1
|
||||
name = "primed [name]"
|
||||
activation_time = timer + world.time
|
||||
detonation_timerid = addtimer(CALLBACK(src, .proc/detonate), delay, TIMER_STOPPABLE)
|
||||
START_PROCESSING(SSfastprocess, src)
|
||||
var/turf/T = get_turf(src)
|
||||
message_admins("[user? "[ADMIN_LOOKUPFLW(user)] has primed [src]" : "A [src] has been primed"] (Timer:[delay],Explosive:[detonate_explosion],Range:[detonate_dev_range]/[detonate_heavy_range]/[detonate_light_range]/[detonate_fire_range]) for detonation at [COORD(T)]([T.loc])")
|
||||
log_game("[user? "[user] has primed [src]" : "A [src] has been primed"] ([detonate_dev_range]/[detonate_heavy_range]/[detonate_light_range]/[detonate_fire_range]) for detonation at [COORD(T)]([T.loc])")
|
||||
|
||||
/obj/item/hot_potato/proc/deactivate()
|
||||
update_icon()
|
||||
name = initial(name)
|
||||
flags_1 &= ~NODROP_1
|
||||
deltimer(detonation_timerid)
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
detonation_timerid = null
|
||||
if(ismob(loc))
|
||||
var/mob/user = loc
|
||||
user.remove_atom_colour(TEMPORARY_COLOUR_PRIORITY)
|
||||
|
||||
/obj/item/hot_potato/update_icon()
|
||||
icon_state = is_active()? icon_on : icon_off
|
||||
|
||||
/obj/item/hot_potato/syndicate
|
||||
detonate_light_range = 4
|
||||
detonate_fire_range = 5
|
||||
|
||||
/obj/item/hot_potato/harmless
|
||||
detonate_explosion = FALSE
|
||||
|
||||
/obj/item/hot_potato/harmless/toy
|
||||
desc = "A label on the side of this potato reads \"Product of DonkCo Toys and Recreation department.\" <span class='boldnotice'>You can attack anyone with it to put it on them instead, if they have a free hand to take it!</span>"
|
||||
sticky = FALSE
|
||||
reusable = TRUE
|
||||
forceful_attachment = FALSE
|
||||
@@ -40,7 +40,7 @@
|
||||
//What does the implant do upon injection?
|
||||
//return 1 if the implant injects
|
||||
//return 0 if there is no room for implant / it fails
|
||||
/obj/item/implant/proc/implant(mob/living/target, mob/user, silent = 0)
|
||||
/obj/item/implant/proc/implant(mob/living/target, mob/user, silent = FALSE)
|
||||
LAZYINITLIST(target.implants)
|
||||
if(!target.can_be_implanted() || !can_be_implanted_in(target))
|
||||
return 0
|
||||
@@ -74,7 +74,7 @@
|
||||
|
||||
return 1
|
||||
|
||||
/obj/item/implant/proc/removed(mob/living/source, silent = 0, special = 0)
|
||||
/obj/item/implant/proc/removed(mob/living/source, silent = FALSE, special = 0)
|
||||
moveToNullspace()
|
||||
imp_in = null
|
||||
source.implants -= src
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
return dat
|
||||
|
||||
|
||||
/obj/item/implant/mindshield/implant(mob/living/target, mob/user, silent = 0)
|
||||
/obj/item/implant/mindshield/implant(mob/living/target, mob/user, silent = FALSE)
|
||||
if(..())
|
||||
if(!target.mind)
|
||||
return TRUE
|
||||
@@ -38,7 +38,7 @@
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/implant/mindshield/removed(mob/target, silent = 0, special = 0)
|
||||
/obj/item/implant/mindshield/removed(mob/target, silent = FALSE, special = 0)
|
||||
if(..())
|
||||
if(target.stat != DEAD && !silent)
|
||||
to_chat(target, "<span class='boldnotice'>Your mind suddenly feels terribly vulnerable. You are no longer safe from brainwashing.</span>")
|
||||
|
||||
@@ -80,10 +80,10 @@
|
||||
|
||||
/obj/item/implant/radio
|
||||
name = "internal radio implant"
|
||||
desc = "Are you there God? It's me, Syndicate Comms Agent."
|
||||
activated = TRUE
|
||||
var/obj/item/device/radio/radio
|
||||
var/radio_key = /obj/item/device/encryptionkey/syndicate
|
||||
var/radio_key
|
||||
var/subspace_transmission = FALSE
|
||||
icon = 'icons/obj/radio.dmi'
|
||||
icon_state = "walkietalkie"
|
||||
|
||||
@@ -98,11 +98,26 @@
|
||||
// almost like an internal headset, but without the
|
||||
// "must be in ears to hear" restriction.
|
||||
radio.name = "internal radio"
|
||||
radio.subspace_transmission = TRUE
|
||||
radio.subspace_transmission = subspace_transmission
|
||||
radio.canhear_range = 0
|
||||
radio.keyslot = new radio_key
|
||||
if(radio_key)
|
||||
radio.keyslot = new radio_key
|
||||
radio.recalculateChannels()
|
||||
|
||||
/obj/item/implant/radio/mining
|
||||
radio_key = /obj/item/device/encryptionkey/headset_cargo
|
||||
|
||||
/obj/item/implant/radio/syndicate
|
||||
desc = "Are you there God? It's me, Syndicate Comms Agent."
|
||||
radio_key = /obj/item/device/encryptionkey/syndicate
|
||||
subspace_transmission = TRUE
|
||||
|
||||
/obj/item/implant/radio/slime
|
||||
name = "slime radio"
|
||||
icon = 'icons/obj/surgery.dmi'
|
||||
icon_state = "adamantine_resonator"
|
||||
radio_key = /obj/item/device/encryptionkey/headset_sci
|
||||
subspace_transmission = TRUE
|
||||
|
||||
/obj/item/implant/radio/get_data()
|
||||
var/dat = {"<b>Implant Specifications:</b><BR>
|
||||
@@ -114,3 +129,8 @@
|
||||
/obj/item/implanter/radio
|
||||
name = "implanter (internal radio)"
|
||||
imp_type = /obj/item/implant/radio
|
||||
|
||||
/obj/item/implanter/radio/syndicate
|
||||
name = "implanter (internal syndicate radio)"
|
||||
imp_type = /obj/item/implant/radio/syndicate
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
max_w_class = WEIGHT_CLASS_NORMAL
|
||||
max_combined_w_class = 6
|
||||
cant_hold = list(/obj/item/disk/nuclear)
|
||||
silent = 1
|
||||
silent = TRUE
|
||||
|
||||
|
||||
/obj/item/implant/storage
|
||||
@@ -20,7 +20,7 @@
|
||||
/obj/item/implant/storage/activate()
|
||||
storage.MouseDrop(imp_in)
|
||||
|
||||
/obj/item/implant/storage/removed(source, silent = 0, special = 0)
|
||||
/obj/item/implant/storage/removed(source, silent = FALSE, special = 0)
|
||||
if(..())
|
||||
if(!special)
|
||||
storage.close_all()
|
||||
@@ -28,7 +28,7 @@
|
||||
storage.remove_from_storage(I, get_turf(source))
|
||||
return 1
|
||||
|
||||
/obj/item/implant/storage/implant(mob/living/target, mob/user, silent = 0)
|
||||
/obj/item/implant/storage/implant(mob/living/target, mob/user, silent = FALSE)
|
||||
for(var/X in target.implants)
|
||||
if(istype(X, type))
|
||||
var/obj/item/implant/storage/imp_e = X
|
||||
|
||||
@@ -25,10 +25,13 @@
|
||||
|
||||
/obj/item/implantcase/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/pen))
|
||||
if(!user.is_literate())
|
||||
to_chat(user, "<span class='notice'>You scribble illegibly on the side of [src]!</span>")
|
||||
return
|
||||
var/t = stripped_input(user, "What would you like the label to be?", name, null)
|
||||
if(user.get_active_held_item() != W)
|
||||
return
|
||||
if(!in_range(src, user) && loc != user)
|
||||
if(!user.canUseTopic(src, BE_CLOSE))
|
||||
return
|
||||
if(t)
|
||||
name = "implant case - '[t]'"
|
||||
|
||||
@@ -1,70 +1,73 @@
|
||||
/obj/item/implanter
|
||||
name = "implanter"
|
||||
desc = "A sterile automatic implant injector."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "implanter0"
|
||||
item_state = "syringe_0"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
materials = list(MAT_METAL=600, MAT_GLASS=200)
|
||||
var/obj/item/implant/imp = null
|
||||
var/imp_type = null
|
||||
|
||||
|
||||
/obj/item/implanter/update_icon()
|
||||
if(imp)
|
||||
icon_state = "implanter1"
|
||||
else
|
||||
icon_state = "implanter0"
|
||||
|
||||
|
||||
/obj/item/implanter/attack(mob/living/M, mob/user)
|
||||
if(!istype(M))
|
||||
return
|
||||
if(user && imp)
|
||||
if(M != user)
|
||||
M.visible_message("<span class='warning'>[user] is attempting to implant [M].</span>")
|
||||
|
||||
var/turf/T = get_turf(M)
|
||||
if(T && (M == user || do_mob(user, M, 50)))
|
||||
if(src && imp)
|
||||
if(imp.implant(M, user))
|
||||
if (M == user)
|
||||
to_chat(user, "<span class='notice'>You implant yourself.</span>")
|
||||
else
|
||||
M.visible_message("[user] has implanted [M].", "<span class='notice'>[user] implants you.</span>")
|
||||
imp = null
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] fails to implant [M].</span>")
|
||||
|
||||
/obj/item/implanter/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/pen))
|
||||
var/t = stripped_input(user, "What would you like the label to be?", name, null)
|
||||
if(user.get_active_held_item() != W)
|
||||
return
|
||||
if(!in_range(src, user) && loc != user)
|
||||
return
|
||||
if(t)
|
||||
name = "implanter ([t])"
|
||||
else
|
||||
name = "implanter"
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/implanter/Initialize(mapload)
|
||||
. = ..()
|
||||
if(imp_type)
|
||||
imp = new imp_type(src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/implanter/adrenalin
|
||||
name = "implanter (adrenalin)"
|
||||
imp_type = /obj/item/implant/adrenalin
|
||||
|
||||
/obj/item/implanter/emp
|
||||
name = "implanter (EMP)"
|
||||
imp_type = /obj/item/implant/emp
|
||||
/obj/item/implanter
|
||||
name = "implanter"
|
||||
desc = "A sterile automatic implant injector."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "implanter0"
|
||||
item_state = "syringe_0"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
materials = list(MAT_METAL=600, MAT_GLASS=200)
|
||||
var/obj/item/implant/imp = null
|
||||
var/imp_type = null
|
||||
|
||||
|
||||
/obj/item/implanter/update_icon()
|
||||
if(imp)
|
||||
icon_state = "implanter1"
|
||||
else
|
||||
icon_state = "implanter0"
|
||||
|
||||
|
||||
/obj/item/implanter/attack(mob/living/M, mob/user)
|
||||
if(!istype(M))
|
||||
return
|
||||
if(user && imp)
|
||||
if(M != user)
|
||||
M.visible_message("<span class='warning'>[user] is attempting to implant [M].</span>")
|
||||
|
||||
var/turf/T = get_turf(M)
|
||||
if(T && (M == user || do_mob(user, M, 50)))
|
||||
if(src && imp)
|
||||
if(imp.implant(M, user))
|
||||
if (M == user)
|
||||
to_chat(user, "<span class='notice'>You implant yourself.</span>")
|
||||
else
|
||||
M.visible_message("[user] has implanted [M].", "<span class='notice'>[user] implants you.</span>")
|
||||
imp = null
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] fails to implant [M].</span>")
|
||||
|
||||
/obj/item/implanter/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/pen))
|
||||
if(!user.is_literate())
|
||||
to_chat(user, "<span class='notice'>You prod at [src] with [W]!</span>")
|
||||
return
|
||||
var/t = stripped_input(user, "What would you like the label to be?", name, null)
|
||||
if(user.get_active_held_item() != W)
|
||||
return
|
||||
if(!user.canUseTopic(src, BE_CLOSE))
|
||||
return
|
||||
if(t)
|
||||
name = "implanter ([t])"
|
||||
else
|
||||
name = "implanter"
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/implanter/Initialize(mapload)
|
||||
. = ..()
|
||||
if(imp_type)
|
||||
imp = new imp_type(src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/implanter/adrenalin
|
||||
name = "implanter (adrenalin)"
|
||||
imp_type = /obj/item/implant/adrenalin
|
||||
|
||||
/obj/item/implanter/emp
|
||||
name = "implanter (EMP)"
|
||||
imp_type = /obj/item/implant/emp
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
. = ..()
|
||||
AddComponent(/datum/component/uplink, _owner, TRUE, FALSE, null, starting_tc)
|
||||
|
||||
/obj/item/implant/uplink/implant(mob/living/target, mob/user, silent = 0)
|
||||
/obj/item/implant/uplink/implant(mob/living/target, mob/user, silent = FALSE)
|
||||
GET_COMPONENT(hidden_uplink, /datum/component/uplink)
|
||||
if(hidden_uplink)
|
||||
for(var/X in target.implants)
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
|
||||
/obj/item/inducer/attackby(obj/item/W, mob/user)
|
||||
if(istype(W, /obj/item/screwdriver))
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
W.play_tool_sound(src)
|
||||
if(!opened)
|
||||
to_chat(user, "<span class='notice'>You unscrew the battery compartment.</span>")
|
||||
opened = TRUE
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
update_icon()
|
||||
|
||||
/obj/item/pet_carrier/AltClick(mob/living/user)
|
||||
if(open || !user.canUseTopic(src, be_close=TRUE))
|
||||
if(open || !user.canUseTopic(src, BE_CLOSE))
|
||||
return
|
||||
locked = !locked
|
||||
to_chat(user, "<span class='notice'>You flip the lock switch [locked ? "down" : "up"].</span>")
|
||||
@@ -151,7 +151,7 @@
|
||||
add_overlay("[locked ? "" : "un"]locked")
|
||||
|
||||
/obj/item/pet_carrier/MouseDrop(atom/over_atom)
|
||||
if(isopenturf(over_atom) && usr.Adjacent(over_atom) && open && occupants.len)
|
||||
if(isopenturf(over_atom) && usr.canUseTopic(src, BE_CLOSE, ismonkey(usr)) && usr.Adjacent(over_atom) && open && occupants.len)
|
||||
usr.visible_message("<span class='notice'>[usr] unloads [src].</span>", \
|
||||
"<span class='notice'>You unload [src] onto [over_atom].</span>")
|
||||
for(var/V in occupants)
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
to_chat(user, "<span class='warning'>You already murdered it!</span>")
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] tears out the stuffing from [src]!</span>", "<span class='notice'>You rip a bunch of the stuffing from [src]. Murderer.</span>")
|
||||
playsound(I, I.usesound, 50, TRUE)
|
||||
I.play_tool_sound(src)
|
||||
stuffed = FALSE
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You remove the grenade from [src].</span>")
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
fisto_setting = 3
|
||||
if(3)
|
||||
fisto_setting = 1
|
||||
playsound(loc, W.usesound, 50, 1)
|
||||
W.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You tweak \the [src]'s piston valve to [fisto_setting].</span>")
|
||||
else if(istype(W, /obj/item/screwdriver))
|
||||
if(tank)
|
||||
|
||||
@@ -25,14 +25,11 @@
|
||||
if(pinnedLoc)
|
||||
pinnedLoc.forceMove(loc)
|
||||
|
||||
/obj/item/target/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0, user))
|
||||
removeOverlays()
|
||||
to_chat(user, "<span class='notice'>You slice off [src]'s uneven chunks of aluminium and scorch marks.</span>")
|
||||
else
|
||||
return ..()
|
||||
/obj/item/target/welder_act(mob/living/user, obj/item/I)
|
||||
if(I.use_tool(src, user, 0, volume=40))
|
||||
removeOverlays()
|
||||
to_chat(user, "<span class='notice'>You slice off [src]'s uneven chunks of aluminium and scorch marks.</span>")
|
||||
return TRUE
|
||||
|
||||
/obj/item/target/attack_hand(mob/user)
|
||||
if(pinnedLoc)
|
||||
|
||||
@@ -18,8 +18,11 @@
|
||||
actions_types = list(/datum/action/item_action/nano_picket_sign)
|
||||
|
||||
/obj/item/picket_sign/proc/retext(mob/user)
|
||||
if(!user.is_literate())
|
||||
to_chat(user, "<span class='notice'>You scribble illegibly on [src]!</span>")
|
||||
return
|
||||
var/txt = stripped_input(user, "What would you like to write on the sign?", "Sign Label", null , 30)
|
||||
if(txt && Adjacent(user))
|
||||
if(txt && user.canUseTopic(src, BE_CLOSE))
|
||||
label = txt
|
||||
name = "[label] sign"
|
||||
desc = "It reads: [label]"
|
||||
|
||||
@@ -40,17 +40,15 @@ GLOBAL_LIST_INIT(rod_recipes, list ( \
|
||||
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(istype(W, /obj/item/weldingtool))
|
||||
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))
|
||||
if(W.use_tool(src, user, 0, volume=40))
|
||||
var/obj/item/stack/sheet/metal/new_item = new(usr.loc)
|
||||
user.visible_message("[user.name] shaped [src] into metal with the welding tool.", \
|
||||
"<span class='notice'>You shape [src] into metal with the welding tool.</span>", \
|
||||
user.visible_message("[user.name] shaped [src] into metal with [W].", \
|
||||
"<span class='notice'>You shape [src] into metal with [W].</span>", \
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
var/obj/item/stack/rods/R = src
|
||||
src = null
|
||||
|
||||
@@ -181,6 +181,41 @@ GLOBAL_LIST_INIT(prglass_recipes, list ( \
|
||||
recipes = GLOB.prglass_recipes
|
||||
return ..()
|
||||
|
||||
GLOBAL_LIST_INIT(titaniumglass_recipes, list(
|
||||
new/datum/stack_recipe("shuttle window", /obj/structure/window/shuttle/unanchored, 2, time = 0, on_floor = TRUE, window_checks = TRUE)
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/titaniumglass
|
||||
name = "titanium glass"
|
||||
desc = "A glass sheet made out of a titanium-silicate alloy."
|
||||
singular_name = "titanium glass sheet"
|
||||
icon_state = "sheet-titaniumglass"
|
||||
materials = list(MAT_TITANIUM=MINERAL_MATERIAL_AMOUNT, MAT_GLASS=MINERAL_MATERIAL_AMOUNT)
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 100)
|
||||
resistance_flags = ACID_PROOF
|
||||
merge_type = /obj/item/stack/sheet/titaniumglass
|
||||
|
||||
/obj/item/stack/sheet/titaniumglass/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.titaniumglass_recipes
|
||||
return ..()
|
||||
|
||||
GLOBAL_LIST_INIT(plastitaniumglass_recipes, list(
|
||||
new/datum/stack_recipe("plastitanium window", /obj/structure/window/plastitanium/unanchored, 2, time = 0, on_floor = TRUE, window_checks = TRUE)
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/plastitaniumglass
|
||||
name = "plastitanium glass"
|
||||
desc = "A glass sheet made out of a plasma-titanium-silicate alloy."
|
||||
singular_name = "plastitanium glass sheet"
|
||||
icon_state = "sheet-plastitaniumglass"
|
||||
materials = list(MAT_TITANIUM=MINERAL_MATERIAL_AMOUNT, MAT_PLASMA=MINERAL_MATERIAL_AMOUNT, MAT_GLASS=MINERAL_MATERIAL_AMOUNT)
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 100)
|
||||
resistance_flags = ACID_PROOF
|
||||
merge_type = /obj/item/stack/sheet/plastitaniumglass
|
||||
|
||||
/obj/item/stack/sheet/plastitaniumglass/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.plastitaniumglass_recipes
|
||||
return ..()
|
||||
|
||||
/obj/item/shard
|
||||
name = "shard"
|
||||
@@ -244,21 +279,22 @@ GLOBAL_LIST_INIT(prglass_recipes, list ( \
|
||||
/obj/item/shard/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/device/lightreplacer))
|
||||
I.attackby(src, user)
|
||||
else if(istype(I, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/WT = I
|
||||
if(WT.remove_fuel(0, user))
|
||||
var/obj/item/stack/sheet/glass/NG = new (user.loc)
|
||||
for(var/obj/item/stack/sheet/glass/G in user.loc)
|
||||
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)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/shard/welder_act(mob/living/user, obj/item/I)
|
||||
if(I.use_tool(src, user, 0, volume=50))
|
||||
var/obj/item/stack/sheet/glass/NG = new (user.loc)
|
||||
for(var/obj/item/stack/sheet/glass/G in user.loc)
|
||||
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 TRUE
|
||||
|
||||
/obj/item/shard/Crossed(mob/living/L)
|
||||
if(istype(L) && has_gravity(loc))
|
||||
playsound(loc, 'sound/effects/glass_step.ogg', 50, 1)
|
||||
|
||||
@@ -292,7 +292,7 @@ GLOBAL_LIST_INIT(titanium_recipes, list ( \
|
||||
throw_speed = 1
|
||||
throw_range = 3
|
||||
sheettype = "plastitanium"
|
||||
materials = list(MAT_TITANIUM=2000, MAT_PLASMA=2000)
|
||||
materials = list(MAT_TITANIUM=MINERAL_MATERIAL_AMOUNT, MAT_PLASMA=MINERAL_MATERIAL_AMOUNT)
|
||||
|
||||
GLOBAL_LIST_INIT(plastitanium_recipes, list ( \
|
||||
new/datum/stack_recipe("plas-titanium tile", /obj/item/stack/tile/mineral/plastitanium, 1, 4, 20), \
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
/obj/item/stack/on_grind()
|
||||
for(var/i in 1 to grind_results.len) //This should only call if it's ground, so no need to check if grind_results exists
|
||||
grind_results[grind_results[i]] *= amount //Gets the key at position i, then the reagent amount of that key, then multiplies it by stack size
|
||||
grind_results[grind_results[i]] *= get_amount() //Gets the key at position i, then the reagent amount of that key, then multiplies it by stack size
|
||||
|
||||
/obj/item/stack/grind_requirements()
|
||||
if(is_cyborg)
|
||||
@@ -247,7 +247,7 @@
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/item/stack/proc/use(used, transfer = FALSE) // return 0 = borked; return 1 = had enough
|
||||
/obj/item/stack/use(used, transfer = FALSE) // return 0 = borked; return 1 = had enough
|
||||
if(zero_amount())
|
||||
return 0
|
||||
if (is_cyborg)
|
||||
@@ -260,6 +260,20 @@
|
||||
update_weight()
|
||||
return 1
|
||||
|
||||
/obj/item/stack/tool_use_check(mob/living/user, amount)
|
||||
if(get_amount() < amount)
|
||||
if(singular_name)
|
||||
if(amount > 1)
|
||||
to_chat(user, "<span class='warning'>You need at least [amount] [singular_name]\s to do this!</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need at least [amount] [singular_name] to do this!</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need at least [amount] to do this!</span>")
|
||||
|
||||
return FALSE
|
||||
|
||||
return TRUE
|
||||
|
||||
/obj/item/stack/proc/zero_amount()
|
||||
if(is_cyborg)
|
||||
return source.energy < cost
|
||||
@@ -310,10 +324,7 @@
|
||||
..()
|
||||
|
||||
/obj/item/stack/AltClick(mob/living/user)
|
||||
if(!istype(user) || !user.canUseTopic(src))
|
||||
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
|
||||
return
|
||||
if(!in_range(src, user))
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
return
|
||||
if(is_cyborg)
|
||||
return
|
||||
@@ -324,7 +335,7 @@
|
||||
var/min = 0
|
||||
var/max = get_amount()
|
||||
var/stackmaterial = round(input(user,"How many sheets do you wish to take out of this stack? (Maximum [max])") as num)
|
||||
if(stackmaterial == null || stackmaterial <= min || stackmaterial >= get_amount() || !user.canUseTopic(src))
|
||||
if(stackmaterial == null || stackmaterial <= min || stackmaterial >= get_amount() || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
return
|
||||
else
|
||||
change_stack(user,stackmaterial)
|
||||
|
||||
@@ -21,18 +21,15 @@
|
||||
/obj/item/stack/tile/attackby(obj/item/W, mob/user, params)
|
||||
|
||||
if (istype(W, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/WT = W
|
||||
|
||||
if(get_amount() < 4)
|
||||
to_chat(user, "<span class='warning'>You need at least four tiles to do this!</span>")
|
||||
return
|
||||
|
||||
if(WT.is_hot() && !mineralType)
|
||||
if(!mineralType)
|
||||
to_chat(user, "<span class='warning'>You can not reform this!</span>")
|
||||
return
|
||||
|
||||
if(WT.remove_fuel(0,user))
|
||||
|
||||
if(W.use_tool(src, user, 0, volume=40))
|
||||
if(mineralType == "plasma")
|
||||
atmos_spawn_air("plasma=5;TEMP=1000")
|
||||
user.visible_message("<span class='warning'>[user.name] sets the plasma tiles on fire!</span>", \
|
||||
|
||||
@@ -404,7 +404,6 @@
|
||||
storage_slots = 50
|
||||
max_combined_w_class = 200
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
preposition = "in"
|
||||
can_hold = list(/obj/item/reagent_containers/pill, /obj/item/reagent_containers/glass/beaker, /obj/item/reagent_containers/glass/bottle)
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
@@ -420,6 +419,5 @@
|
||||
storage_slots = 25
|
||||
max_combined_w_class = 200
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
preposition = "in"
|
||||
can_hold = list(/obj/item/slime_extract, /obj/item/reagent_containers/syringe, /obj/item/reagent_containers/glass/beaker, /obj/item/reagent_containers/glass/bottle, /obj/item/reagent_containers/blood, /obj/item/reagent_containers/hypospray/medipen, /obj/item/reagent_containers/food/snacks/deadmouse, /obj/item/reagent_containers/food/snacks/monkeycube)
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
icon = 'icons/obj/clothing/belts.dmi'
|
||||
icon_state = "utilitybelt"
|
||||
item_state = "utility"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/belt_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/belt_righthand.dmi'
|
||||
slot_flags = SLOT_BELT
|
||||
attack_verb = list("whipped", "lashed", "disciplined")
|
||||
max_integrity = 300
|
||||
@@ -509,7 +511,7 @@
|
||||
to_chat(user, "<span class='notice'>Alt-click it to quickly draw the blade.</span>")
|
||||
|
||||
/obj/item/storage/belt/sabre/AltClick(mob/user)
|
||||
if(!ishuman(user) || !user.canUseTopic(src, be_close=TRUE))
|
||||
if(!iscarbon(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
return
|
||||
if(contents.len)
|
||||
var/obj/item/I = contents[1]
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
* Candle Box
|
||||
* Cigarette Box
|
||||
* Cigar Case
|
||||
* Heart Shaped Box w/ Chocolates
|
||||
*/
|
||||
|
||||
/obj/item/storage/fancy
|
||||
@@ -79,11 +80,13 @@
|
||||
|
||||
/obj/item/storage/fancy/egg_box
|
||||
icon = 'icons/obj/food/containers.dmi'
|
||||
item_state = "eggbox"
|
||||
icon_state = "eggbox"
|
||||
icon_type = "egg"
|
||||
lefthand_file = 'icons/mob/inhands/misc/food_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/food_righthand.dmi'
|
||||
name = "egg box"
|
||||
desc = "A carton for containing eggs."
|
||||
storage_slots = 12
|
||||
can_hold = list(/obj/item/reagent_containers/food/snacks/egg)
|
||||
spawn_type = /obj/item/reagent_containers/food/snacks/egg
|
||||
@@ -129,8 +132,8 @@
|
||||
..()
|
||||
to_chat(user, "<span class='notice'>Alt-click to extract contents.</span>")
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/AltClick(mob/user)
|
||||
if(user.stat || user.restrained())
|
||||
/obj/item/storage/fancy/cigarettes/AltClick(mob/living/carbon/user)
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
return
|
||||
var/obj/item/clothing/mask/cigarette/W = locate(/obj/item/clothing/mask/cigarette) in contents
|
||||
if(W && contents.len > 0)
|
||||
@@ -279,3 +282,20 @@
|
||||
name = "\improper premium havanian cigar case"
|
||||
desc = "A case of classy Havanian cigars."
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/cigar/havana
|
||||
|
||||
/*
|
||||
* Heart Shaped Box w/ Chocolates
|
||||
*/
|
||||
|
||||
/obj/item/storage/fancy/heart_box
|
||||
name = "heart-shaped box"
|
||||
desc = "A heart-shaped box for holding tiny chocolates."
|
||||
icon = 'icons/obj/food/containers.dmi'
|
||||
item_state = "chocolatebox"
|
||||
icon_state = "chocolatebox"
|
||||
icon_type = "chocolate"
|
||||
lefthand_file = 'icons/mob/inhands/misc/food_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/food_righthand.dmi'
|
||||
storage_slots = 8
|
||||
can_hold = list(/obj/item/reagent_containers/food/snacks/tinychocolate)
|
||||
spawn_type = /obj/item/reagent_containers/food/snacks/tinychocolate
|
||||
|
||||
@@ -129,7 +129,7 @@
|
||||
to_chat(user, "<span class='notice'>Alt-click to [open ? "close":"open"] it.</span>")
|
||||
|
||||
/obj/item/storage/lockbox/medal/AltClick(mob/user)
|
||||
if(user.canUseTopic(src, be_close=TRUE))
|
||||
if(user.canUseTopic(src, BE_CLOSE))
|
||||
if(!locked)
|
||||
open = (open ? FALSE : TRUE)
|
||||
update_icon()
|
||||
|
||||
@@ -34,17 +34,17 @@
|
||||
/obj/item/storage/secure/attackby(obj/item/W, mob/user, params)
|
||||
if(locked)
|
||||
if (istype(W, /obj/item/screwdriver))
|
||||
if (do_after(user, 20*W.toolspeed, target = user))
|
||||
if (W.use_tool(src, user, 20))
|
||||
open =! open
|
||||
to_chat(user, "<span class='notice'>You [open ? "open" : "close"] the service panel.</span>")
|
||||
return
|
||||
if (istype(W, /obj/item/wirecutters) || istype(W, /obj/item/card/emag))
|
||||
if (istype(W, /obj/item/wirecutters))
|
||||
to_chat(user, "<span class='danger'>[src] is protected from this sort of tampering, yet it appears the internal memory wires can still be <b>pulsed</b>.</span>")
|
||||
if ((istype(W, /obj/item/device/multitool)) && (!l_hacking))
|
||||
if(src.open == 1)
|
||||
to_chat(user, "<span class='danger'>Now attempting to reset internal memory, please hold.</span>")
|
||||
src.l_hacking = 1
|
||||
if (do_after(usr, 400*W.toolspeed, target = user))
|
||||
if (W.use_tool(src, user, 400))
|
||||
to_chat(user, "<span class='danger'>Internal memory reset - lock has been disengaged.</span>")
|
||||
src.l_set = 0
|
||||
src.l_hacking = 0
|
||||
|
||||
@@ -307,7 +307,7 @@
|
||||
new /obj/item/spellbook/oneuse/mimery_guns(src)
|
||||
|
||||
/obj/item/storage/box/syndie_kit/imp_radio/PopulateContents()
|
||||
new /obj/item/implanter/radio(src)
|
||||
new /obj/item/implanter/radio/syndicate(src)
|
||||
|
||||
/obj/item/storage/box/syndie_kit/centcom_costume/PopulateContents()
|
||||
new /obj/item/clothing/under/rank/centcom_officer(src)
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
materials = list(MAT_METAL=75)
|
||||
attack_verb = list("stabbed")
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
usesound = 'sound/items/screwdriver.ogg'
|
||||
usesound = list('sound/items/screwdriver.ogg', 'sound/items/screwdriver2.ogg')
|
||||
tool_behaviour = TOOL_SCREWDRIVER
|
||||
toolspeed = 1
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 30)
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
force = 3
|
||||
throwforce = 5
|
||||
hitsound = "swing_hit"
|
||||
usesound = 'sound/items/welder.ogg'
|
||||
usesound = list('sound/items/welder.ogg', 'sound/items/welder2.ogg')
|
||||
var/acti_sound = 'sound/items/welderactivate.ogg'
|
||||
var/deac_sound = 'sound/items/welderdeactivate.ogg'
|
||||
throw_speed = 3
|
||||
@@ -73,7 +73,7 @@
|
||||
damtype = "fire"
|
||||
++burned_fuel_for
|
||||
if(burned_fuel_for >= WELDER_FUEL_BURN_INTERVAL)
|
||||
remove_fuel(1)
|
||||
use(1)
|
||||
update_icon()
|
||||
|
||||
//This is to start fires. process() is only called if the welder is on.
|
||||
@@ -107,10 +107,10 @@
|
||||
var/obj/item/bodypart/affecting = H.get_bodypart(check_zone(user.zone_selected))
|
||||
|
||||
if(affecting && affecting.status == BODYPART_ROBOTIC && user.a_intent != INTENT_HARM)
|
||||
if(src.remove_fuel(1))
|
||||
playsound(loc, usesound, 50, 1)
|
||||
if(src.use_tool(H, user, 0, volume=50, amount=1))
|
||||
if(user == H)
|
||||
user.visible_message("<span class='notice'>[user] starts to fix some of the dents on [H]'s [affecting.name].</span>", "<span class='notice'>You start fixing some of the dents on [H]'s [affecting.name].</span>")
|
||||
user.visible_message("<span class='notice'>[user] starts to fix some of the dents on [H]'s [affecting.name].</span>",
|
||||
"<span class='notice'>You start fixing some of the dents on [H]'s [affecting.name].</span>")
|
||||
if(!do_mob(user, H, 50))
|
||||
return
|
||||
item_heal_robotic(H, user, 15, 0)
|
||||
@@ -125,8 +125,8 @@
|
||||
reagents.trans_to(O, reagents.total_volume)
|
||||
to_chat(user, "<span class='notice'>You empty [src]'s fuel tank into [O].</span>")
|
||||
update_icon()
|
||||
if(welding)
|
||||
remove_fuel(1)
|
||||
if(isOn())
|
||||
use(1)
|
||||
var/turf/location = get_turf(user)
|
||||
location.hotspot_expose(700, 50, 1)
|
||||
if(get_fuel() <= 0)
|
||||
@@ -150,26 +150,23 @@
|
||||
update_icon()
|
||||
|
||||
|
||||
//Returns the amount of fuel in the welder
|
||||
// Returns the amount of fuel in the welder
|
||||
/obj/item/weldingtool/proc/get_fuel()
|
||||
return reagents.get_reagent_amount("welding_fuel")
|
||||
|
||||
|
||||
//Removes fuel from the welding tool. If a mob is passed, it will try to flash the mob's eyes. This should probably be renamed to use()
|
||||
/obj/item/weldingtool/proc/remove_fuel(amount = 1, mob/living/M = null)
|
||||
if(!welding || !check_fuel())
|
||||
return 0
|
||||
if(amount)
|
||||
// Uses fuel from the welding tool.
|
||||
/obj/item/weldingtool/use(used = 0)
|
||||
if(!isOn() || !check_fuel())
|
||||
return FALSE
|
||||
|
||||
if(used)
|
||||
burned_fuel_for = 0
|
||||
if(get_fuel() >= amount)
|
||||
reagents.remove_reagent("welding_fuel", amount)
|
||||
if(get_fuel() >= used)
|
||||
reagents.remove_reagent("welding_fuel", used)
|
||||
check_fuel()
|
||||
if(M)
|
||||
M.flash_act(light_intensity)
|
||||
return TRUE
|
||||
else
|
||||
if(M)
|
||||
to_chat(M, "<span class='warning'>You need more welding fuel to complete this task!</span>")
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -231,6 +228,24 @@
|
||||
/obj/item/weldingtool/proc/isOn()
|
||||
return welding
|
||||
|
||||
// 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_act(light_intensity)
|
||||
|
||||
// If welding tool ran out of fuel during a construction task, construction fails.
|
||||
/obj/item/weldingtool/tool_use_check(mob/living/user, amount)
|
||||
if(!isOn() || !check_fuel())
|
||||
to_chat(user, "<span class='warning'>[src] has to be on to complete this task!</span>")
|
||||
return FALSE
|
||||
|
||||
if(get_fuel() >= amount)
|
||||
return TRUE
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need more welding fuel to complete this task!</span>")
|
||||
return FALSE
|
||||
|
||||
|
||||
/obj/item/weldingtool/proc/flamethrower_screwdriver(obj/item/I, mob/user)
|
||||
if(welding)
|
||||
@@ -260,10 +275,10 @@
|
||||
to_chat(user, "<span class='warning'>You need one rod to start building a flamethrower!</span>")
|
||||
|
||||
/obj/item/weldingtool/ignition_effect(atom/A, mob/user)
|
||||
if(welding && remove_fuel(1, user))
|
||||
. = "<span class='notice'>[user] casually lights [A] with [src], what a badass.</span>"
|
||||
if(use_tool(A, user, 0, amount=1))
|
||||
return "<span class='notice'>[user] casually lights [A] with [src], what a badass.</span>"
|
||||
else
|
||||
. = ""
|
||||
return ""
|
||||
|
||||
/obj/item/weldingtool/largetank
|
||||
name = "industrial welding tool"
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
* Kitty toys!
|
||||
* Snowballs
|
||||
* Clockwork Watches
|
||||
* Toy Daggers
|
||||
*/
|
||||
|
||||
|
||||
@@ -855,7 +856,7 @@
|
||||
set name = "Flip Card"
|
||||
set category = "Object"
|
||||
set src in range(1)
|
||||
if(usr.stat || !ishuman(usr) || !usr.canmove || usr.restrained())
|
||||
if(!ishuman(usr) || !usr.canUseTopic(src, BE_CLOSE))
|
||||
return
|
||||
if(!flipped)
|
||||
src.flipped = 1
|
||||
@@ -1075,6 +1076,20 @@
|
||||
..()
|
||||
to_chat(user, "<span class='info'>Station Time: [worldtime2text()]")
|
||||
|
||||
/*
|
||||
* Toy Dagger
|
||||
*/
|
||||
|
||||
/obj/item/toy/toy_dagger
|
||||
name = "toy dagger"
|
||||
desc = "A cheap plastic replica of a dagger. Produced by THE ARM Toys, Inc."
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state = "render"
|
||||
item_state = "cultdagger"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
|
||||
/*
|
||||
* Xenomorph action figure
|
||||
*/
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
name = "crushed can"
|
||||
icon_state = "cola"
|
||||
resistance_flags = NONE
|
||||
grind_results = list("aluminum" = 10)
|
||||
grind_results = list("aluminium" = 10)
|
||||
|
||||
/obj/item/trash/attack(mob/M, mob/living/user)
|
||||
return
|
||||
@@ -81,4 +81,4 @@
|
||||
/obj/item/trash/coal/burn()
|
||||
visible_message("[src] fuses into a diamond! Someone wasn't so naughty after all...")
|
||||
new /obj/item/stack/ore/diamond(loc)
|
||||
qdel(src)
|
||||
qdel(src)
|
||||
|
||||
@@ -516,7 +516,7 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/item/twohanded/spear/AltClick(mob/user)
|
||||
if(user.canUseTopic(src, be_close=TRUE))
|
||||
if(user.canUseTopic(src, BE_CLOSE))
|
||||
..()
|
||||
if(!explosive)
|
||||
return
|
||||
|
||||
@@ -109,7 +109,8 @@
|
||||
|
||||
/obj/item/claymore/highlander/dropped(mob/living/user)
|
||||
user.remove_trait(TRAIT_IGNORESLOWDOWN, HIGHLANDER)
|
||||
qdel(src) //If this ever happens, it's because you lost an arm
|
||||
if(!QDELETED(src))
|
||||
qdel(src) //If this ever happens, it's because you lost an arm
|
||||
|
||||
/obj/item/claymore/highlander/examine(mob/user)
|
||||
..()
|
||||
|
||||
@@ -226,10 +226,7 @@
|
||||
|
||||
/obj/AltClick(mob/user)
|
||||
. = ..()
|
||||
if(unique_reskin && !current_skin && in_range(user,src))
|
||||
if(user.incapacitated())
|
||||
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
|
||||
return
|
||||
if(unique_reskin && !current_skin && user.canUseTopic(src, BE_CLOSE, NO_DEXTERY))
|
||||
reskin_obj(user)
|
||||
|
||||
/obj/proc/reskin_obj(mob/M)
|
||||
|
||||
@@ -32,13 +32,12 @@
|
||||
if(state != EMPTY_CORE)
|
||||
to_chat(user, "<span class='warning'>The core must be empty to deconstruct it!</span>")
|
||||
return
|
||||
var/obj/item/weldingtool/WT = P
|
||||
if(!WT.isOn())
|
||||
to_chat(user, "<span class='warning'>The welder must be on for this task!</span>")
|
||||
|
||||
if(!P.tool_start_check(user, amount=0))
|
||||
return
|
||||
playsound(loc, WT.usesound, 50, 1)
|
||||
|
||||
to_chat(user, "<span class='notice'>You start to deconstruct the frame...</span>")
|
||||
if(do_after(user, 20*P.toolspeed, target = src) && src && state == EMPTY_CORE && WT && WT.remove_fuel(0, user))
|
||||
if(P.use_tool(src, user, 20, volume=50) && state == EMPTY_CORE)
|
||||
to_chat(user, "<span class='notice'>You deconstruct the frame.</span>")
|
||||
deconstruct(TRUE)
|
||||
return
|
||||
@@ -56,13 +55,13 @@
|
||||
return
|
||||
if(CIRCUIT_CORE)
|
||||
if(istype(P, /obj/item/screwdriver))
|
||||
playsound(loc, P.usesound, 50, 1)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You screw the circuit board into place.</span>")
|
||||
state = SCREWED_CORE
|
||||
update_icon()
|
||||
return
|
||||
if(istype(P, /obj/item/crowbar))
|
||||
playsound(loc, P.usesound, 50, 1)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You remove the circuit board.</span>")
|
||||
state = EMPTY_CORE
|
||||
update_icon()
|
||||
@@ -71,7 +70,7 @@
|
||||
return
|
||||
if(SCREWED_CORE)
|
||||
if(istype(P, /obj/item/screwdriver) && circuit)
|
||||
playsound(loc, P.usesound, 50, 1)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You unfasten the circuit board.</span>")
|
||||
state = CIRCUIT_CORE
|
||||
update_icon()
|
||||
@@ -93,7 +92,7 @@
|
||||
if(brain)
|
||||
to_chat(user, "<span class='warning'>Get that [brain.name] out of there first!</span>")
|
||||
else
|
||||
playsound(loc, P.usesound, 50, 1)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You remove the cables.</span>")
|
||||
state = SCREWED_CORE
|
||||
update_icon()
|
||||
@@ -152,7 +151,7 @@
|
||||
return
|
||||
|
||||
if(istype(P, /obj/item/crowbar) && brain)
|
||||
playsound(loc, P.usesound, 50, 1)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You remove the brain.</span>")
|
||||
brain.forceMove(loc)
|
||||
brain = null
|
||||
@@ -161,7 +160,7 @@
|
||||
|
||||
if(GLASS_CORE)
|
||||
if(istype(P, /obj/item/crowbar))
|
||||
playsound(loc, P.usesound, 50, 1)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You remove the glass panel.</span>")
|
||||
state = CABLED_CORE
|
||||
update_icon()
|
||||
@@ -169,7 +168,7 @@
|
||||
return
|
||||
|
||||
if(istype(P, /obj/item/screwdriver))
|
||||
playsound(loc, P.usesound, 50, 1)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You connect the monitor.</span>")
|
||||
if(brain)
|
||||
SSticker.mode.remove_antag_for_borging(brain.brainmob.mind)
|
||||
@@ -198,7 +197,7 @@
|
||||
return
|
||||
|
||||
if(istype(P, /obj/item/screwdriver))
|
||||
playsound(loc, P.usesound, 50, 1)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You disconnect the monitor.</span>")
|
||||
state = GLASS_CORE
|
||||
update_icon()
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
/obj/structure/bed/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/wrench) && !(flags_1&NODECONSTRUCT_1))
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
W.play_tool_sound(src)
|
||||
deconstruct(TRUE)
|
||||
else
|
||||
return ..()
|
||||
@@ -78,13 +78,10 @@
|
||||
/obj/structure/bed/roller/MouseDrop(over_object, src_location, over_location)
|
||||
. = ..()
|
||||
if(over_object == usr && Adjacent(usr))
|
||||
if(!ishuman(usr))
|
||||
if(!ishuman(usr) || !usr.canUseTopic(src, BE_CLOSE))
|
||||
return 0
|
||||
if(has_buckled_mobs())
|
||||
return 0
|
||||
if(usr.incapacitated())
|
||||
to_chat(usr, "<span class='warning'>You can't do that right now!</span>")
|
||||
return 0
|
||||
usr.visible_message("[usr] collapses \the [src.name].", "<span class='notice'>You collapse \the [src.name].</span>")
|
||||
var/obj/structure/bed/roller/B = new foldabletype(get_turf(src))
|
||||
usr.put_in_hands(B)
|
||||
|
||||
@@ -36,8 +36,7 @@
|
||||
var/mob/living/L = user
|
||||
|
||||
if(istype(L))
|
||||
if(!user.Adjacent(src) || user.incapacitated())
|
||||
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
|
||||
if(!user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
return FALSE
|
||||
else
|
||||
return TRUE
|
||||
@@ -73,7 +72,7 @@
|
||||
|
||||
/obj/structure/chair/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/wrench) && !(flags_1&NODECONSTRUCT_1))
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
W.play_tool_sound(src)
|
||||
deconstruct()
|
||||
else if(istype(W, /obj/item/assembly/shock_kit))
|
||||
if(!user.temporarilyRemoveItemFromInventory(W))
|
||||
@@ -225,8 +224,7 @@
|
||||
if(over_object == usr && Adjacent(usr))
|
||||
if(!item_chair || !usr.can_hold_items() || has_buckled_mobs() || src.flags_1 & NODECONSTRUCT_1)
|
||||
return
|
||||
if(usr.incapacitated())
|
||||
to_chat(usr, "<span class='warning'>You can't do that right now!</span>")
|
||||
if(!usr.canUseTopic(src, BE_CLOSE, ismonkey(usr)))
|
||||
return
|
||||
usr.visible_message("<span class='notice'>[usr] grabs \the [src.name].</span>", "<span class='notice'>You grab \the [src.name].</span>")
|
||||
var/C = new item_chair(loc)
|
||||
@@ -365,6 +363,7 @@
|
||||
buildstacktype = /obj/item/stack/tile/brass
|
||||
buildstackamount = 1
|
||||
item_chair = null
|
||||
var/turns = 0
|
||||
|
||||
/obj/structure/chair/brass/Destroy()
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
@@ -373,12 +372,16 @@
|
||||
/obj/structure/chair/brass/process()
|
||||
setDir(turn(dir,-90))
|
||||
playsound(src, 'sound/effects/servostep.ogg', 50, FALSE)
|
||||
turns++
|
||||
if(turns >= 8)
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
|
||||
/obj/structure/chair/brass/ratvar_act()
|
||||
return
|
||||
|
||||
/obj/structure/chair/brass/AltClick(mob/living/user)
|
||||
if(!user.canUseTopic(src, be_close = TRUE))
|
||||
turns = 0
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
return
|
||||
if(!isprocessing)
|
||||
user.visible_message("<span class='notice'>[user] spins [src] around, and Ratvarian technology keeps it spinning FOREVER.</span>", \
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
var/cutting_tool = /obj/item/weldingtool
|
||||
var/open_sound = 'sound/machines/click.ogg'
|
||||
var/close_sound = 'sound/machines/click.ogg'
|
||||
var/cutting_sound = 'sound/items/welder.ogg'
|
||||
var/material_drop = /obj/item/stack/sheet/metal
|
||||
var/material_drop_amount = 2
|
||||
var/delivery_icon = "deliverycloset" //which icon to use when packagewrapped. null to be unwrappable.
|
||||
@@ -216,19 +215,18 @@
|
||||
if(opened)
|
||||
if(istype(W, cutting_tool))
|
||||
if(istype(W, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0, user))
|
||||
to_chat(user, "<span class='notice'>You begin cutting \the [src] apart...</span>")
|
||||
playsound(loc, cutting_sound, 40, 1)
|
||||
if(do_after(user, 40*WT.toolspeed, 1, target = src))
|
||||
if(!opened || !WT.isOn())
|
||||
return
|
||||
playsound(loc, cutting_sound, 50, 1)
|
||||
user.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)
|
||||
if(!W.tool_start_check(user, amount=0))
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You begin cutting \the [src] apart...</span>")
|
||||
if(W.use_tool(src, user, 40, volume=50))
|
||||
if(!opened)
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] slices apart \the [src].</span>",
|
||||
"<span class='notice'>You cut \the [src] apart with \the [W].</span>",
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
deconstruct(TRUE)
|
||||
return
|
||||
else // for example cardboard box is cut with wirecutters
|
||||
user.visible_message("<span class='notice'>[user] cut apart \the [src].</span>", \
|
||||
"<span class='notice'>You cut \the [src] apart with \the [W].</span>")
|
||||
@@ -237,25 +235,23 @@
|
||||
if(user.transferItemToLoc(W, drop_location())) // so we put in unlit welder too
|
||||
return
|
||||
else if(istype(W, /obj/item/weldingtool) && can_weld_shut)
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if(!WT.remove_fuel(0, user))
|
||||
if(!W.tool_start_check(user, amount=0))
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You begin [welded ? "unwelding":"welding"] \the [src]...</span>")
|
||||
playsound(loc, 'sound/items/welder2.ogg', 40, 1)
|
||||
if(do_after(user, 40*WT.toolspeed, 1, target = src))
|
||||
if(opened || !WT.isOn())
|
||||
if(W.use_tool(src, user, 40, volume=50))
|
||||
if(opened)
|
||||
return
|
||||
playsound(loc, WT.usesound, 50, 1)
|
||||
welded = !welded
|
||||
user.visible_message("<span class='notice'>[user] [welded ? "welds shut" : "unweldeds"] \the [src].</span>",
|
||||
"<span class='notice'>You [welded ? "weld" : "unwelded"] \the [src] with \the [WT].</span>",
|
||||
"<span class='notice'>You [welded ? "weld" : "unwelded"] \the [src] with \the [W].</span>",
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
update_icon()
|
||||
else if(istype(W, /obj/item/wrench) && anchorable)
|
||||
if(isinspace() && !anchored)
|
||||
return
|
||||
anchored = !anchored
|
||||
playsound(src.loc, W.usesound, 75, 1)
|
||||
W.play_tool_sound(src, 75)
|
||||
user.visible_message("<span class='notice'>[user] [anchored ? "anchored" : "unanchored"] \the [src] [anchored ? "to" : "from"] the ground.</span>", \
|
||||
"<span class='notice'>You [anchored ? "anchored" : "unanchored"] \the [src] [anchored ? "to" : "from"] the ground.</span>", \
|
||||
"<span class='italics'>You hear a ratchet.</span>")
|
||||
@@ -394,8 +390,7 @@
|
||||
|
||||
/obj/structure/closet/AltClick(mob/user)
|
||||
..()
|
||||
if(!user.canUseTopic(src, be_close=TRUE) || !isturf(loc))
|
||||
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
|
||||
if(!user.canUseTopic(src, BE_CLOSE) || !isturf(loc))
|
||||
return
|
||||
if(opened || !secure)
|
||||
return
|
||||
|
||||
@@ -17,10 +17,13 @@
|
||||
|
||||
/obj/structure/closet/body_bag/attackby(obj/item/I, mob/user, params)
|
||||
if (istype(I, /obj/item/pen) || istype(I, /obj/item/toy/crayon))
|
||||
if(!user.is_literate())
|
||||
to_chat(user, "<span class='notice'>You scribble illegibly on [src]!</span>")
|
||||
return
|
||||
var/t = stripped_input(user, "What would you like the label to be?", name, null, 53)
|
||||
if(user.get_active_held_item() != I)
|
||||
return
|
||||
if(!in_range(src, user) && loc != user)
|
||||
if(!user.canUseTopic(src, BE_CLOSE))
|
||||
return
|
||||
if(t)
|
||||
name = "body bag - [t]"
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
can_weld_shut = 0
|
||||
cutting_tool = /obj/item/wirecutters
|
||||
open_sound = "rustle"
|
||||
cutting_sound = 'sound/items/poster_ripped.ogg'
|
||||
material_drop = /obj/item/stack/sheet/cardboard
|
||||
delivery_icon = "deliverybox"
|
||||
anchorable = FALSE
|
||||
@@ -68,6 +67,5 @@
|
||||
move_speed_multiplier = 2
|
||||
cutting_tool = /obj/item/weldingtool
|
||||
open_sound = 'sound/machines/click.ogg'
|
||||
cutting_sound = 'sound/items/welder.ogg'
|
||||
material_drop = /obj/item/stack/sheet/plasteel
|
||||
#undef SNAKE_SPAM_TICKS
|
||||
|
||||
@@ -105,6 +105,7 @@
|
||||
icon_door = "black"
|
||||
|
||||
/obj/structure/closet/wardrobe/chaplain_black/PopulateContents()
|
||||
new /obj/item/clothing/accessory/pocketprotector/cosmetology(src)
|
||||
new /obj/item/clothing/under/rank/chaplain(src)
|
||||
new /obj/item/clothing/shoes/sneakers/black(src)
|
||||
new /obj/item/clothing/suit/nun(src)
|
||||
@@ -177,6 +178,7 @@
|
||||
icon_door = "atmos_wardrobe"
|
||||
|
||||
/obj/structure/closet/wardrobe/atmospherics_yellow/PopulateContents()
|
||||
new /obj/item/clothing/accessory/pocketprotector(src)
|
||||
new /obj/item/storage/backpack/duffelbag/engineering(src)
|
||||
new /obj/item/storage/backpack/satchel/eng(src)
|
||||
new /obj/item/storage/backpack/industrial(src)
|
||||
@@ -193,6 +195,7 @@
|
||||
icon_door = "yellow"
|
||||
|
||||
/obj/structure/closet/wardrobe/engineering_yellow/PopulateContents()
|
||||
new /obj/item/clothing/accessory/pocketprotector(src)
|
||||
new /obj/item/storage/backpack/duffelbag/engineering(src)
|
||||
new /obj/item/storage/backpack/industrial(src)
|
||||
new /obj/item/storage/backpack/satchel/eng(src)
|
||||
@@ -211,6 +214,7 @@
|
||||
name = "medical doctor's wardrobe"
|
||||
|
||||
/obj/structure/closet/wardrobe/white/medical/PopulateContents()
|
||||
new /obj/item/clothing/accessory/pocketprotector(src)
|
||||
new /obj/item/storage/backpack/duffelbag/med(src)
|
||||
new /obj/item/storage/backpack/medic(src)
|
||||
new /obj/item/storage/backpack/satchel/med(src)
|
||||
@@ -318,6 +322,7 @@
|
||||
icon_door = "white"
|
||||
|
||||
/obj/structure/closet/wardrobe/science_white/PopulateContents()
|
||||
new /obj/item/clothing/accessory/pocketprotector(src)
|
||||
new /obj/item/storage/backpack/science(src)
|
||||
new /obj/item/storage/backpack/science(src)
|
||||
new /obj/item/storage/backpack/satchel/tox(src)
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
|
||||
/obj/structure/closet/crate/New()
|
||||
..()
|
||||
if(icon_state == "[initial(icon_state)]open")
|
||||
opened = TRUE
|
||||
update_icon()
|
||||
|
||||
/obj/structure/closet/crate/CanPass(atom/movable/mover, turf/target)
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
do_animate()
|
||||
else if(istype(W, /obj/item/wrench))
|
||||
anchored = !anchored
|
||||
playsound(src.loc, W.usesound, 75, 1)
|
||||
W.play_tool_sound(src, 75)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -96,13 +96,13 @@
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Access denied.</span>")
|
||||
else if(istype(W, /obj/item/weldingtool) && user.a_intent == INTENT_HELP && !broken)
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if(obj_integrity < max_integrity && WT.remove_fuel(5, user))
|
||||
if(obj_integrity < max_integrity)
|
||||
if(!W.tool_start_check(user, amount=5))
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You begin repairing [src].</span>")
|
||||
playsound(loc, WT.usesound, 40, 1)
|
||||
if(do_after(user, 40*W.toolspeed, target = src))
|
||||
if(W.use_tool(src, user, 40, amount=5, volume=50))
|
||||
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
|
||||
@@ -117,7 +117,7 @@
|
||||
qdel(src)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You start to [open ? "close":"open"] [src].</span>")
|
||||
if(do_after(user, 20*W.toolspeed, target = src))
|
||||
if(W.use_tool(src, user, 20))
|
||||
to_chat(user, "<span class='notice'>You [open ? "close":"open"] [src].</span>")
|
||||
toggle_lock(user)
|
||||
else if(open && !showpiece)
|
||||
@@ -177,15 +177,15 @@
|
||||
/obj/structure/displaycase_chassis/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/wrench)) //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))
|
||||
I.play_tool_sound(src)
|
||||
if(I.use_tool(src, user, 30))
|
||||
playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
new /obj/item/stack/sheet/mineral/wood(get_turf(src), 5)
|
||||
qdel(src)
|
||||
|
||||
else if(istype(I, /obj/item/electronics/airlock))
|
||||
to_chat(user, "<span class='notice'>You start installing the electronics into [src]...</span>")
|
||||
playsound(src.loc, I.usesound, 50, 1)
|
||||
I.play_tool_sound(src)
|
||||
if(do_after(user, 30, target = src) && user.transferItemToLoc(I,src))
|
||||
electronics = I
|
||||
to_chat(user, "<span class='notice'>You install the airlock electronics.</span>")
|
||||
|
||||
@@ -59,40 +59,34 @@
|
||||
created_name = t
|
||||
|
||||
else if(istype(W, /obj/item/weldingtool) && (mineral || glass || !anchored ))
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0,user))
|
||||
playsound(src, 'sound/items/welder2.ogg', 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)
|
||||
if(!W.tool_start_check(user, amount=0))
|
||||
return
|
||||
|
||||
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 = 0
|
||||
else
|
||||
new /obj/item/stack/sheet/glass(get_turf(src))
|
||||
glass = 0
|
||||
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*W.toolspeed, target = src))
|
||||
if(!WT.isOn())
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You disassemble the airlock assembly.</span>")
|
||||
deconstruct(TRUE)
|
||||
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(W.use_tool(src, user, 40, volume=50))
|
||||
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(W.use_tool(src, user, 40, volume=50))
|
||||
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 = 0
|
||||
else
|
||||
new /obj/item/stack/sheet/glass(get_turf(src))
|
||||
glass = 0
|
||||
else if(!anchored)
|
||||
user.visible_message("<span class='warning'>[user] disassembles the airlock assembly.</span>", \
|
||||
"You start to disassemble the airlock assembly...")
|
||||
if(W.use_tool(src, user, 40, volume=50))
|
||||
to_chat(user, "<span class='notice'>You disassemble the airlock assembly.</span>")
|
||||
deconstruct(TRUE)
|
||||
|
||||
else if(istype(W, /obj/item/wrench))
|
||||
if(!anchored )
|
||||
@@ -103,12 +97,11 @@
|
||||
break
|
||||
|
||||
if(door_check)
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
user.visible_message("[user] secures the airlock assembly to the floor.", \
|
||||
"<span class='notice'>You start to secure the airlock assembly to the floor...</span>", \
|
||||
"<span class='italics'>You hear wrenching.</span>")
|
||||
|
||||
if(do_after(user, 40*W.toolspeed, target = src))
|
||||
if(W.use_tool(src, user, 40, volume=100))
|
||||
if(anchored)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You secure the airlock assembly.</span>")
|
||||
@@ -118,38 +111,34 @@
|
||||
to_chat(user, "There is another door here!")
|
||||
|
||||
else
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
user.visible_message("[user] unsecures the airlock assembly from the floor.", \
|
||||
"<span class='notice'>You start to unsecure the airlock assembly from the floor...</span>", \
|
||||
"<span class='italics'>You hear wrenching.</span>")
|
||||
if(do_after(user, 40*W.toolspeed, target = src))
|
||||
if(!anchored )
|
||||
if(W.use_tool(src, user, 40, volume=100))
|
||||
if(!anchored)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You unsecure the airlock assembly.</span>")
|
||||
name = "airlock assembly"
|
||||
anchored = FALSE
|
||||
|
||||
else if(istype(W, /obj/item/stack/cable_coil) && state == AIRLOCK_ASSEMBLY_NEEDS_WIRES && anchored )
|
||||
var/obj/item/stack/cable_coil/C = W
|
||||
if (C.get_amount() < 1)
|
||||
to_chat(user, "<span class='warning'>You need one length of cable to wire the airlock assembly!</span>")
|
||||
if(!W.tool_start_check(user, amount=1))
|
||||
return
|
||||
|
||||
user.visible_message("[user] wires the airlock assembly.", \
|
||||
"<span class='notice'>You start to wire the airlock assembly...</span>")
|
||||
if(do_after(user, 40, target = src))
|
||||
if(C.get_amount() < 1 || state != AIRLOCK_ASSEMBLY_NEEDS_WIRES)
|
||||
if(W.use_tool(src, user, 40, amount=1))
|
||||
if(state != AIRLOCK_ASSEMBLY_NEEDS_WIRES)
|
||||
return
|
||||
C.use(1)
|
||||
state = AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS
|
||||
to_chat(user, "<span class='notice'>You wire the airlock assembly.</span>")
|
||||
name = "wired airlock assembly"
|
||||
|
||||
else if(istype(W, /obj/item/wirecutters) && state == AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS )
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
user.visible_message("[user] cuts the wires from the airlock assembly.", \
|
||||
"<span class='notice'>You start to cut the wires from the airlock assembly...</span>")
|
||||
|
||||
if(do_after(user, 40*W.toolspeed, target = src))
|
||||
if(W.use_tool(src, user, 40, volume=100))
|
||||
if(state != AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You cut the wires from the airlock assembly.</span>")
|
||||
@@ -158,7 +147,7 @@
|
||||
name = "secured airlock assembly"
|
||||
|
||||
else if(istype(W, /obj/item/electronics/airlock) && state == AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS )
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
W.play_tool_sound(src, 100)
|
||||
user.visible_message("[user] installs the electronics into the airlock assembly.", \
|
||||
"<span class='notice'>You start to install electronics into the airlock assembly...</span>")
|
||||
if(do_after(user, 40, target = src))
|
||||
@@ -174,11 +163,10 @@
|
||||
|
||||
|
||||
else if(istype(W, /obj/item/crowbar) && state == AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER )
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
user.visible_message("[user] removes the electronics from the airlock assembly.", \
|
||||
"<span class='notice'>You start to remove electronics from the airlock assembly...</span>")
|
||||
|
||||
if(do_after(user, 40*W.toolspeed, target = src))
|
||||
if(W.use_tool(src, user, 40, volume=100))
|
||||
if(state != AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You remove the airlock electronics.</span>")
|
||||
@@ -237,11 +225,10 @@
|
||||
to_chat(user, "<span class='warning'>You cannot add [G] to [src]!</span>")
|
||||
|
||||
else if(istype(W, /obj/item/screwdriver) && state == AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER )
|
||||
playsound(src, 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(W.use_tool(src, user, 40, volume=100))
|
||||
if(loc && state == AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER)
|
||||
to_chat(user, "<span class='notice'>You finish the airlock.</span>")
|
||||
var/obj/machinery/door/airlock/door
|
||||
|
||||
@@ -6,18 +6,17 @@
|
||||
density = TRUE
|
||||
anchored = TRUE
|
||||
|
||||
/obj/structure/dresser/attackby(obj/item/P, mob/user, params)
|
||||
if(istype(P, /obj/item/wrench))
|
||||
/obj/structure/dresser/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/wrench))
|
||||
to_chat(user, "<span class='notice'>You begin to [anchored ? "unwrench" : "wrench"] [src].</span>")
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
if(do_after(user, 20, target = src))
|
||||
if(I.use_tool(src, user, 20, volume=50))
|
||||
to_chat(user, "<span class='notice'>You successfully [anchored ? "unwrench" : "wrench"] [src].</span>")
|
||||
anchored = !anchored
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/dresser/deconstruct(disassembled = TRUE)
|
||||
new /obj/item/stack/sheet/mineral/wood (get_turf(src), 10)
|
||||
new /obj/item/stack/sheet/mineral/wood(drop_location(), 10)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/dresser/attack_hand(mob/user)
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
/obj/structure/chair/e_chair/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/wrench))
|
||||
var/obj/structure/chair/C = new /obj/structure/chair(loc)
|
||||
playsound(loc, W.usesound, 50, 1)
|
||||
W.play_tool_sound(src)
|
||||
C.setDir(dir)
|
||||
part.forceMove(loc)
|
||||
part.master = null
|
||||
|
||||
@@ -43,8 +43,8 @@
|
||||
/obj/structure/extinguisher_cabinet/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/wrench) && !stored_extinguisher)
|
||||
to_chat(user, "<span class='notice'>You start unsecuring [name]...</span>")
|
||||
playsound(loc, I.usesound, 50, 1)
|
||||
if(do_after(user, 60*I.toolspeed, target = src))
|
||||
I.play_tool_sound(src)
|
||||
if(I.use_tool(src, user, 60))
|
||||
playsound(loc, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>You unsecure [name].</span>")
|
||||
deconstruct(TRUE)
|
||||
@@ -98,7 +98,7 @@
|
||||
attack_hand(user)
|
||||
|
||||
/obj/structure/extinguisher_cabinet/AltClick(mob/living/user)
|
||||
if(user.incapacitated() || !Adjacent(user) || !istype(user))
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
return
|
||||
toggle_cabinet(user)
|
||||
|
||||
|
||||
@@ -109,15 +109,11 @@
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You can't reach, close it first!</span>")
|
||||
|
||||
else if(istype(W, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0,user))
|
||||
else if(istype(W, /obj/item/weldingtool) || istype(W, /obj/item/gun/energy/plasmacutter))
|
||||
if(W.use_tool(src, user, 0, volume=50))
|
||||
dismantle(user, TRUE)
|
||||
else if(istype(W, /obj/item/gun/energy/plasmacutter))
|
||||
dismantle(user, TRUE)
|
||||
else if(istype(W, /obj/item/pickaxe/drill/jackhammer))
|
||||
var/obj/item/pickaxe/drill/jackhammer/D = W
|
||||
D.playDigSound()
|
||||
W.play_tool_sound(src)
|
||||
dismantle(user, TRUE)
|
||||
else
|
||||
return ..()
|
||||
@@ -125,7 +121,7 @@
|
||||
/obj/structure/falsewall/proc/dismantle(mob/user, disassembled=TRUE, obj/item/tool = null)
|
||||
user.visible_message("[user] dismantles the false wall.", "<span class='notice'>You dismantle the false wall.</span>")
|
||||
if(tool)
|
||||
playsound(src, tool.usesound, 100, 1)
|
||||
tool.play_tool_sound(src, 100)
|
||||
else
|
||||
playsound(src, 'sound/items/welder.ogg', 100, 1)
|
||||
deconstruct(disassembled)
|
||||
|
||||
@@ -25,13 +25,13 @@
|
||||
if(iscyborg(user) || istype(I, /obj/item/device/multitool))
|
||||
toggle_lock(user)
|
||||
else if(istype(I, /obj/item/weldingtool) && user.a_intent == INTENT_HELP && !broken)
|
||||
var/obj/item/weldingtool/WT = I
|
||||
if(obj_integrity < max_integrity && WT.remove_fuel(2, user))
|
||||
if(obj_integrity < max_integrity)
|
||||
if(!I.tool_start_check(user, amount=2))
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You begin repairing [src].</span>")
|
||||
playsound(loc, WT.usesound, 40, 1)
|
||||
if(do_after(user, 40*I.toolspeed, target = src))
|
||||
if(I.use_tool(src, user, 40, volume=50, amount=2))
|
||||
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
|
||||
|
||||
@@ -13,13 +13,12 @@
|
||||
/obj/structure/fluff/attackby(obj/item/I, mob/living/user, params)
|
||||
if(istype(I, /obj/item/wrench) && deconstructible)
|
||||
user.visible_message("<span class='notice'>[user] starts disassembling [src]...</span>", "<span class='notice'>You start disassembling [src]...</span>")
|
||||
playsound(user, I.usesound, 50, 1)
|
||||
if(!do_after(user, 50, target = src))
|
||||
return 0
|
||||
user.visible_message("<span class='notice'>[user] disassembles [src]!</span>", "<span class='notice'>You break down [src] into scrap metal.</span>")
|
||||
playsound(user, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
new/obj/item/stack/sheet/metal(get_turf(src))
|
||||
qdel(src)
|
||||
I.play_tool_sound(src)
|
||||
if(I.use_tool(src, user, 50))
|
||||
user.visible_message("<span class='notice'>[user] disassembles [src]!</span>", "<span class='notice'>You break down [src] into scrap metal.</span>")
|
||||
playsound(user, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
new/obj/item/stack/sheet/metal(drop_location())
|
||||
qdel(src)
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
@@ -396,7 +396,6 @@
|
||||
death = FALSE
|
||||
icon = 'icons/obj/machines/sleeper.dmi'
|
||||
icon_state = "sleeper_s"
|
||||
id_access_list = list(ACCESS_SYNDICATE)
|
||||
outfit = /datum/outfit/syndicate_empty
|
||||
assignedrole = "Space Syndicate" //I know this is really dumb, but Syndicate operative is nuke ops
|
||||
|
||||
@@ -408,7 +407,7 @@
|
||||
ears = /obj/item/device/radio/headset/syndicate/alt
|
||||
back = /obj/item/storage/backpack
|
||||
implants = list(/obj/item/implant/weapons_auth)
|
||||
id = /obj/item/card/id
|
||||
id = /obj/item/card/id/syndicate
|
||||
|
||||
/datum/outfit/syndicate_empty/post_equip(mob/living/carbon/human/H)
|
||||
H.faction |= ROLE_SYNDICATE
|
||||
|
||||
@@ -34,18 +34,16 @@
|
||||
|
||||
if(istype(W, /obj/item/gun/energy/plasmacutter))
|
||||
to_chat(user, "<span class='notice'>You start slicing apart the girder...</span>")
|
||||
playsound(src, 'sound/items/welder.ogg', 100, 1)
|
||||
if(do_after(user, 40*W.toolspeed, target = src))
|
||||
if(W.use_tool(src, user, 40, volume=100))
|
||||
to_chat(user, "<span class='notice'>You slice apart the girder.</span>")
|
||||
var/obj/item/stack/sheet/metal/M = new (loc, 2)
|
||||
M.add_fingerprint(user)
|
||||
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'>You smash through the girder!</span>")
|
||||
new /obj/item/stack/sheet/metal(get_turf(src))
|
||||
D.playDigSound()
|
||||
W.play_tool_sound(src)
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -68,7 +66,7 @@
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start building a reinforced false wall...</span>")
|
||||
if(do_after(user, 20, target = src))
|
||||
if(!src.loc || !S || S.get_amount() < 2)
|
||||
if(S.get_amount() < 2)
|
||||
return
|
||||
S.use(2)
|
||||
to_chat(user, "<span class='notice'>You create a false wall. Push on it to open or close the passage.</span>")
|
||||
@@ -80,8 +78,8 @@
|
||||
to_chat(user, "<span class='warning'>You need at least five rods to add plating!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start adding plating...</span>")
|
||||
if (do_after(user, 40, target = src))
|
||||
if(!src.loc || !S || S.get_amount() < 5)
|
||||
if(do_after(user, 40, target = src))
|
||||
if(S.get_amount() < 5)
|
||||
return
|
||||
S.use(5)
|
||||
to_chat(user, "<span class='notice'>You add the plating.</span>")
|
||||
@@ -102,7 +100,7 @@
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start building a false wall...</span>")
|
||||
if(do_after(user, 20, target = src))
|
||||
if(!src.loc || !S || S.get_amount() < 2)
|
||||
if(S.get_amount() < 2)
|
||||
return
|
||||
S.use(2)
|
||||
to_chat(user, "<span class='notice'>You create a false wall. Push on it to open or close the passage.</span>")
|
||||
@@ -115,7 +113,7 @@
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start adding plating...</span>")
|
||||
if (do_after(user, 40, target = src))
|
||||
if(loc == null || S.get_amount() < 2)
|
||||
if(S.get_amount() < 2)
|
||||
return
|
||||
S.use(2)
|
||||
to_chat(user, "<span class='notice'>You add the plating.</span>")
|
||||
@@ -132,7 +130,7 @@
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start building a reinforced false wall...</span>")
|
||||
if(do_after(user, 20, target = src))
|
||||
if(!src.loc || !S || S.get_amount() < 2)
|
||||
if(S.get_amount() < 2)
|
||||
return
|
||||
S.use(2)
|
||||
to_chat(user, "<span class='notice'>You create a reinforced false wall. Push on it to open or close the passage.</span>")
|
||||
@@ -145,7 +143,7 @@
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start finalizing the reinforced wall...</span>")
|
||||
if(do_after(user, 50, target = src))
|
||||
if(!src.loc || !S || S.get_amount() < 1)
|
||||
if(S.get_amount() < 1)
|
||||
return
|
||||
S.use(1)
|
||||
to_chat(user, "<span class='notice'>You fully reinforce the wall.</span>")
|
||||
@@ -158,8 +156,8 @@
|
||||
if(S.get_amount() < 1)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start reinforcing the girder...</span>")
|
||||
if (do_after(user, 60, target = src))
|
||||
if(!src.loc || !S || S.get_amount() < 1)
|
||||
if(do_after(user, 60, target = src))
|
||||
if(S.get_amount() < 1)
|
||||
return
|
||||
S.use(1)
|
||||
to_chat(user, "<span class='notice'>You reinforce the girder.</span>")
|
||||
@@ -168,14 +166,14 @@
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
if(S.sheettype)
|
||||
if(S.sheettype && S.sheettype != "runed")
|
||||
var/M = S.sheettype
|
||||
if(state == GIRDER_DISPLACED)
|
||||
if(S.get_amount() < 2)
|
||||
to_chat(user, "<span class='warning'>You need at least two sheets to create a false wall!</span>")
|
||||
return
|
||||
if(do_after(user, 20, target = src))
|
||||
if(!src.loc || !S || S.get_amount() < 2)
|
||||
if(S.get_amount() < 2)
|
||||
return
|
||||
S.use(2)
|
||||
to_chat(user, "<span class='notice'>You create a false wall. Push on it to open or close the passage.</span>")
|
||||
@@ -189,7 +187,7 @@
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start adding plating...</span>")
|
||||
if (do_after(user, 40, target = src))
|
||||
if(!src.loc || !S || S.get_amount() < 2)
|
||||
if(S.get_amount() < 2)
|
||||
return
|
||||
S.use(2)
|
||||
to_chat(user, "<span class='notice'>You add the plating.</span>")
|
||||
@@ -214,11 +212,10 @@
|
||||
/obj/structure/girder/screwdriver_act(mob/user, obj/item/tool)
|
||||
. = FALSE
|
||||
if(state == GIRDER_DISPLACED)
|
||||
playsound(src, tool.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 * tool.toolspeed, target = src))
|
||||
if(tool.use_tool(src, user, 40, volume=100))
|
||||
if(state != GIRDER_DISPLACED)
|
||||
return
|
||||
state = GIRDER_DISASSEMBLED
|
||||
@@ -226,65 +223,60 @@
|
||||
var/obj/item/stack/sheet/metal/M = new (loc, 2)
|
||||
M.add_fingerprint(user)
|
||||
qdel(src)
|
||||
return TRUE
|
||||
return TRUE
|
||||
|
||||
else if(state == GIRDER_REINF)
|
||||
playsound(src, tool.usesound, 100, 1)
|
||||
to_chat(user, "<span class='notice'>You start unsecuring support struts...</span>")
|
||||
if(do_after(user, 40 * tool.toolspeed, target = src))
|
||||
if(tool.use_tool(src, user, 40, volume=100))
|
||||
if(state != GIRDER_REINF)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You unsecure the support struts.</span>")
|
||||
state = GIRDER_REINF_STRUTS
|
||||
return TRUE
|
||||
return TRUE
|
||||
|
||||
else if(state == GIRDER_REINF_STRUTS)
|
||||
playsound(src, tool.usesound, 100, 1)
|
||||
to_chat(user, "<span class='notice'>You start securing support struts...</span>")
|
||||
if(do_after(user, 40 * tool.toolspeed, target = src))
|
||||
if(tool.use_tool(src, user, 40, volume=100))
|
||||
if(state != GIRDER_REINF_STRUTS)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You secure the support struts.</span>")
|
||||
state = GIRDER_REINF
|
||||
return TRUE
|
||||
return TRUE
|
||||
|
||||
// Wirecutter behavior for girders
|
||||
/obj/structure/girder/wirecutter_act(mob/user, obj/item/tool)
|
||||
. = FALSE
|
||||
if(state == GIRDER_REINF_STRUTS)
|
||||
playsound(src.loc, tool.usesound, 100, 1)
|
||||
to_chat(user, "<span class='notice'>You start removing the inner grille...</span>")
|
||||
if(do_after(user, 40 * tool.toolspeed, target = src))
|
||||
if(tool.use_tool(src, user, 40, volume=100))
|
||||
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)
|
||||
return TRUE
|
||||
return TRUE
|
||||
|
||||
/obj/structure/girder/wrench_act(mob/user, obj/item/tool)
|
||||
. = FALSE
|
||||
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(src, tool.usesound, 100, 1)
|
||||
|
||||
to_chat(user, "<span class='notice'>You start securing the girder...</span>")
|
||||
if(do_after(user, 40 * tool.toolspeed, target = src))
|
||||
if(tool.use_tool(src, user, 40, volume=100))
|
||||
to_chat(user, "<span class='notice'>You secure the girder.</span>")
|
||||
var/obj/structure/girder/G = new (loc)
|
||||
transfer_fingerprints_to(G)
|
||||
qdel(src)
|
||||
return TRUE
|
||||
return TRUE
|
||||
else if(state == GIRDER_NORMAL && can_displace)
|
||||
playsound(src, tool.usesound, 100, 1)
|
||||
to_chat(user, "<span class='notice'>You start unsecuring the girder...</span>")
|
||||
if(do_after(user, 40 * tool.toolspeed, target = src))
|
||||
if(tool.use_tool(src, user, 40, volume=100))
|
||||
to_chat(user, "<span class='notice'>You unsecure the girder.</span>")
|
||||
var/obj/structure/girder/displaced/D = new (loc)
|
||||
transfer_fingerprints_to(D)
|
||||
qdel(src)
|
||||
return TRUE
|
||||
return TRUE
|
||||
|
||||
/obj/structure/girder/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && (mover.pass_flags & PASSGRILLE))
|
||||
@@ -348,41 +340,25 @@
|
||||
add_fingerprint(user)
|
||||
if(istype(W, /obj/item/melee/cultblade/dagger) && iscultist(user)) //Cultists can demolish cult girders instantly with their tomes
|
||||
user.visible_message("<span class='warning'>[user] strikes [src] with [W]!</span>", "<span class='notice'>You demolish [src].</span>")
|
||||
var/obj/item/stack/sheet/runed_metal/R = new(get_turf(src))
|
||||
R.amount = 1
|
||||
new /obj/item/stack/sheet/runed_metal(drop_location(), 1)
|
||||
qdel(src)
|
||||
|
||||
else if(istype(W, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0,user))
|
||||
playsound(src.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/weldingtool) || istype(W, /obj/item/gun/energy/plasmacutter))
|
||||
if(!W.tool_start_check(user, amount=0))
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/gun/energy/plasmacutter))
|
||||
to_chat(user, "<span class='notice'>You start slicing apart the girder...</span>")
|
||||
playsound(src, 'sound/items/welder.ogg', 100, 1)
|
||||
if(do_after(user, 40*W.toolspeed, target = src))
|
||||
if(W.use_tool(src, user, 40, volume=50))
|
||||
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
|
||||
var/obj/item/stack/sheet/runed_metal/R = new(drop_location(), 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>")
|
||||
var/obj/item/stack/sheet/runed_metal/R = new(get_turf(src))
|
||||
R.amount = 2
|
||||
var/obj/item/stack/sheet/runed_metal/R = new(drop_location(), 2)
|
||||
transfer_fingerprints_to(R)
|
||||
D.playDigSound()
|
||||
W.play_tool_sound(src)
|
||||
qdel(src)
|
||||
|
||||
else if(istype(W, /obj/item/stack/sheet/runed_metal))
|
||||
@@ -392,7 +368,7 @@
|
||||
return 0
|
||||
user.visible_message("<span class='notice'>[user] begins laying runed metal on [src]...</span>", "<span class='notice'>You begin constructing a runed wall...</span>")
|
||||
if(do_after(user, 50, target = src))
|
||||
if(R.get_amount() < 1 || !R)
|
||||
if(R.get_amount() < 1)
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] plates [src] with runed metal.</span>", "<span class='notice'>You construct a runed wall.</span>")
|
||||
R.use(1)
|
||||
|
||||
@@ -137,11 +137,11 @@
|
||||
add_fingerprint(user)
|
||||
if(istype(W, /obj/item/wirecutters))
|
||||
if(!shock(user, 100))
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
W.play_tool_sound(src, 100)
|
||||
deconstruct()
|
||||
else if((istype(W, /obj/item/screwdriver)) && (isturf(loc) || anchored))
|
||||
if(!shock(user, 90))
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
W.play_tool_sound(src, 100)
|
||||
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>")
|
||||
@@ -183,6 +183,10 @@
|
||||
WD = new/obj/structure/window/plasma/fulltile(drop_location()) //plasma window
|
||||
else if(istype(W, /obj/item/stack/sheet/rglass))
|
||||
WD = new/obj/structure/window/reinforced/fulltile(drop_location()) //reinforced window
|
||||
else if(istype(W, /obj/item/stack/sheet/titaniumglass))
|
||||
WD = new/obj/structure/window/shuttle(drop_location())
|
||||
else if(istype(W, /obj/item/stack/sheet/plastitaniumglass))
|
||||
WD = new/obj/structure/window/plastitanium(drop_location())
|
||||
else
|
||||
WD = new/obj/structure/window/fulltile(drop_location()) //normal window
|
||||
WD.setDir(dir_to_set)
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
var/obj/item/O = locate(href_list["retrieve"]) in contents
|
||||
if(!O || !istype(O))
|
||||
return
|
||||
if(!usr.canUseTopic(src) || !open)
|
||||
if(!usr.canUseTopic(src, BE_CLOSE) || !open)
|
||||
return
|
||||
if(ishuman(usr))
|
||||
if(!usr.put_in_hands(O))
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
mybag.attackby(I, user)
|
||||
else if(istype(I, /obj/item/crowbar))
|
||||
user.visible_message("[user] begins to empty the contents of [src].", "<span class='notice'>You begin to empty the contents of [src]...</span>")
|
||||
if(do_after(user, 30*I.toolspeed, target = src))
|
||||
if(I.use_tool(src, user, 30))
|
||||
to_chat(usr, "<span class='notice'>You empty the contents of [src]'s bucket onto the floor.</span>")
|
||||
reagents.reaction(src.loc)
|
||||
src.reagents.clear_reagents()
|
||||
|
||||
@@ -23,18 +23,13 @@
|
||||
transfer_fingerprints_to(F)
|
||||
qdel(src)
|
||||
else if(istype(I, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/WT = I
|
||||
if(!WT.remove_fuel(0, user))
|
||||
if(!I.tool_start_check(user, amount=0))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You begin cutting \the [src] apart...</span>")
|
||||
playsound(src.loc, WT.usesound, 40, 1)
|
||||
if(do_after(user, 40*WT.toolspeed, 1, target = src))
|
||||
if(!WT.isOn())
|
||||
return
|
||||
playsound(src.loc, WT.usesound, 50, 1)
|
||||
if(I.use_tool(src, user, 50, volume=50))
|
||||
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>")
|
||||
"<span class='notice'>You cut \the [src] apart with \the [I].</span>",
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
new /obj/item/stack/sheet/metal(src.loc, 4)
|
||||
qdel(src)
|
||||
return
|
||||
@@ -56,18 +51,15 @@
|
||||
/obj/structure/kitchenspike/attack_paw(mob/user)
|
||||
return src.attack_hand(usr)
|
||||
|
||||
/obj/structure/kitchenspike/crowbar_act(mob/living/user, obj/item/I)
|
||||
if(has_buckled_mobs())
|
||||
to_chat(user, "<span class='notice'>You can't do that while something's on the spike!</span>")
|
||||
return TRUE
|
||||
|
||||
/obj/structure/kitchenspike/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/crowbar))
|
||||
if(!has_buckled_mobs())
|
||||
playsound(loc, I.usesound, 100, 1)
|
||||
if(do_after(user, 20*I.toolspeed, target = src))
|
||||
to_chat(user, "<span class='notice'>You pry the spikes out of the frame.</span>")
|
||||
deconstruct(TRUE)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You can't do that while something's on the spike!</span>")
|
||||
else
|
||||
return ..()
|
||||
if(I.use_tool(src, user, 20, volume=100))
|
||||
to_chat(user, "<span class='notice'>You pry the spikes out of the frame.</span>")
|
||||
deconstruct(TRUE)
|
||||
return TRUE
|
||||
|
||||
/obj/structure/kitchenspike/attack_hand(mob/user)
|
||||
if(VIABLE_MOB_CHECK(user.pulling) && user.a_intent == INTENT_GRAB && !has_buckled_mobs())
|
||||
|
||||
@@ -124,11 +124,10 @@
|
||||
else
|
||||
icon_state = initial_state
|
||||
|
||||
/obj/structure/mineral_door/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/pickaxe))
|
||||
var/obj/item/pickaxe/digTool = W
|
||||
/obj/structure/mineral_door/attackby(obj/item/I, mob/user, params)
|
||||
if(I.tool_behaviour == TOOL_MINING)
|
||||
to_chat(user, "<span class='notice'>You start digging the [name]...</span>")
|
||||
if(do_after(user,digTool.digspeed*(1+round(max_integrity*0.01)), target = src) && src)
|
||||
if(I.use_tool(src, user, 40, volume=50))
|
||||
to_chat(user, "<span class='notice'>You finish digging.</span>")
|
||||
deconstruct(TRUE)
|
||||
else if(user.a_intent != INTENT_HARM)
|
||||
|
||||
@@ -59,23 +59,24 @@
|
||||
new /obj/item/shard( src.loc )
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/mirror/attackby(obj/item/I, mob/living/user, params)
|
||||
if(istype(I, /obj/item/weldingtool) && user.a_intent != INTENT_HARM)
|
||||
var/obj/item/weldingtool/WT = I
|
||||
if(broken)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if(WT.remove_fuel(0, user))
|
||||
to_chat(user, "<span class='notice'>You begin repairing [src]...</span>")
|
||||
playsound(src, 'sound/items/welder.ogg', 100, 1)
|
||||
if(do_after(user, 10*I.toolspeed, target = src))
|
||||
if(!user || !WT || !WT.isOn())
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You repair [src].</span>")
|
||||
broken = 0
|
||||
icon_state = initial(icon_state)
|
||||
desc = initial(desc)
|
||||
else
|
||||
return ..()
|
||||
/obj/structure/mirror/welder_act(mob/living/user, obj/item/I)
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
return FALSE
|
||||
|
||||
if(!broken)
|
||||
return TRUE
|
||||
|
||||
if(!I.tool_start_check(user, amount=0))
|
||||
return TRUE
|
||||
|
||||
to_chat(user, "<span class='notice'>You begin repairing [src]...</span>")
|
||||
if(I.use_tool(src, user, 10, volume=50))
|
||||
to_chat(user, "<span class='notice'>You repair [src].</span>")
|
||||
broken = 0
|
||||
icon_state = initial(icon_state)
|
||||
desc = initial(desc)
|
||||
|
||||
return TRUE
|
||||
|
||||
/obj/structure/mirror/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
switch(damage_type)
|
||||
@@ -89,7 +90,7 @@
|
||||
name = "magic mirror"
|
||||
desc = "Turn and face the strange... face."
|
||||
icon_state = "magic_mirror"
|
||||
var/list/races_blacklist = list("skeleton", "agent", "angel", "military_synth", "memezombies", "clockwork golem servant")
|
||||
var/list/races_blacklist = list("skeleton", "agent", "angel", "military_synth", "memezombies", "clockwork golem servant", "android", "synth")
|
||||
var/list/choosable_races = list()
|
||||
|
||||
/obj/structure/mirror/magic/New()
|
||||
|
||||
@@ -81,10 +81,13 @@ GLOBAL_LIST_EMPTY(bodycontainers) //Let them act as spawnpoints for revenants an
|
||||
/obj/structure/bodycontainer/attackby(obj/P, mob/user, params)
|
||||
add_fingerprint(user)
|
||||
if(istype(P, /obj/item/pen))
|
||||
if(!user.is_literate())
|
||||
to_chat(user, "<span class='notice'>You scribble illegibly on the side of [src]!</span>")
|
||||
return
|
||||
var/t = stripped_input(user, "What would you like the label to be?", text("[]", name), null)
|
||||
if (user.get_active_held_item() != P)
|
||||
return
|
||||
if ((!in_range(src, usr) && src.loc != user))
|
||||
if(!user.canUseTopic(src, BE_CLOSE))
|
||||
return
|
||||
if (t)
|
||||
name = text("[]- '[]'", initial(name), t)
|
||||
@@ -150,8 +153,7 @@ GLOBAL_LIST_EMPTY(bodycontainers) //Let them act as spawnpoints for revenants an
|
||||
|
||||
/obj/structure/bodycontainer/morgue/AltClick(mob/user)
|
||||
..()
|
||||
if(user.incapacitated())
|
||||
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
|
||||
if(!user.canUseTopic(src, BE_CLOSE))
|
||||
return
|
||||
beeper = !beeper
|
||||
to_chat(user, "<span class='notice'>You turn the speaker function [beeper ? "off" : "on"].</span>")
|
||||
@@ -360,4 +362,4 @@ GLOBAL_LIST_EMPTY(crematoriums)
|
||||
. = !density
|
||||
if(ismovableatom(caller))
|
||||
var/atom/movable/mover = caller
|
||||
. = . || (mover.pass_flags & PASSTABLE)
|
||||
. = . || (mover.pass_flags & PASSTABLE)
|
||||
|
||||
@@ -370,25 +370,6 @@
|
||||
user.set_machine(src)
|
||||
song.interact(user)
|
||||
|
||||
/obj/structure/piano/attackby(obj/item/O, mob/user, params)
|
||||
if (istype(O, /obj/item/wrench))
|
||||
if (!anchored && !isinspace())
|
||||
playsound(src, 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 tighten \the [src]'s casters. Now it can be played again.</span>", \
|
||||
"<span class='italics'>You hear ratchet.</span>")
|
||||
anchored = TRUE
|
||||
else if(anchored)
|
||||
playsound(src, 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 loosen \the [src]. Now it can be pulled somewhere else.</span>", \
|
||||
"<span class='italics'>You hear ratchet.</span>")
|
||||
anchored = FALSE
|
||||
else
|
||||
return ..()
|
||||
/obj/structure/piano/wrench_act(mob/living/user, obj/item/I)
|
||||
default_unfasten_wrench(user, I, 40)
|
||||
return TRUE
|
||||
|
||||
@@ -21,18 +21,16 @@
|
||||
add_fingerprint(user)
|
||||
if(istype(W, /obj/item/screwdriver))
|
||||
if(state == PLASTIC_FLAPS_NORMAL)
|
||||
playsound(src.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, 100*W.toolspeed, target = src))
|
||||
if(W.use_tool(src, user, 100, volume=100))
|
||||
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(src.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(W.use_tool(src, user, 40, volume=100))
|
||||
if(state != PLASTIC_FLAPS_DETACHED)
|
||||
return
|
||||
state = PLASTIC_FLAPS_NORMAL
|
||||
@@ -40,9 +38,8 @@
|
||||
to_chat(user, "<span class='notice'>You screw [src] from the floor.</span>")
|
||||
else if(istype(W, /obj/item/wirecutters))
|
||||
if(state == PLASTIC_FLAPS_DETACHED)
|
||||
playsound(src.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(W.use_tool(src, user, 50, volume=100))
|
||||
if(state != PLASTIC_FLAPS_DETACHED)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You cut apart [src].</span>")
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
if(istype(W, /obj/item/screwdriver))
|
||||
can_rotate = !can_rotate
|
||||
to_chat(user, "<span class='notice'>You [can_rotate ? "unlock" : "lock"] [src]'s rotation.</span>")
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
W.play_tool_sound(src)
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/wrench))
|
||||
@@ -89,47 +89,46 @@
|
||||
to_chat(user, "<span class='warning'>Unweld [src] from the floor first!</span>")
|
||||
return
|
||||
user.visible_message("[user] starts to dismantle [src].", "<span class='notice'>You start to dismantle [src]...</span>")
|
||||
if(do_after(user, 80*W.toolspeed, target = src))
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
if(W.use_tool(src, user, 80, volume=50))
|
||||
to_chat(user, "<span class='notice'>You dismantle [src].</span>")
|
||||
new framebuildstacktype(drop_location(), framebuildstackamount)
|
||||
if(buildstackamount)
|
||||
new buildstacktype(drop_location(), buildstackamount)
|
||||
qdel(src)
|
||||
else if(istype(W, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/WT = W
|
||||
|
||||
if(obj_integrity < max_integrity)
|
||||
if(WT.remove_fuel(0,user))
|
||||
user.visible_message("[user] starts to repair [src].",
|
||||
"<span class='notice'>You begin repairing [src]...</span>",
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
playsound(src, W.usesound, 40, 1)
|
||||
if(do_after(user,40*WT.toolspeed, target = src))
|
||||
obj_integrity = max_integrity
|
||||
user.visible_message("[user] has repaired [src].", \
|
||||
"<span class='notice'>You finish repairing [src].</span>")
|
||||
if(!W.tool_start_check(user, amount=0))
|
||||
return
|
||||
|
||||
user.visible_message("[user] starts to repair [src].",
|
||||
"<span class='notice'>You begin repairing [src]...</span>",
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
if(W.use_tool(src, user, 40, volume=40))
|
||||
obj_integrity = max_integrity
|
||||
user.visible_message("[user] has repaired [src].", \
|
||||
"<span class='notice'>You finish repairing [src].</span>")
|
||||
|
||||
else if(!anchored)
|
||||
if (WT.remove_fuel(0,user))
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
user.visible_message("[user] starts to weld [src] 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*W.toolspeed, target = src))
|
||||
if(!WT.isOn())
|
||||
return
|
||||
anchored = TRUE
|
||||
to_chat(user, "<span class='notice'>You weld [src] to the floor.</span>")
|
||||
if(!W.tool_start_check(user, amount=0))
|
||||
return
|
||||
|
||||
user.visible_message("[user] starts to weld [src] to the floor.",
|
||||
"<span class='notice'>You start to weld [src] to the floor...</span>",
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
if (W.use_tool(src, user, 20, volume=50))
|
||||
anchored = TRUE
|
||||
to_chat(user, "<span class='notice'>You weld [src] to the floor.</span>")
|
||||
else
|
||||
if (WT.remove_fuel(0,user))
|
||||
playsound(src, W.usesound, 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*W.toolspeed, target = src))
|
||||
if(!WT.isOn())
|
||||
return
|
||||
anchored = FALSE
|
||||
to_chat(user, "<span class='notice'>You cut [src] free from the floor.</span>")
|
||||
if(!W.tool_start_check(user, amount=0))
|
||||
return
|
||||
|
||||
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 (W.use_tool(src, user, 20, volume=50))
|
||||
anchored = FALSE
|
||||
to_chat(user, "<span class='notice'>You cut [src] free from the floor.</span>")
|
||||
|
||||
//Finishing the frame
|
||||
else if(istype(W, /obj/item/stack/sheet))
|
||||
if(finished)
|
||||
@@ -161,16 +160,14 @@
|
||||
to_chat(user, "<span class='warning'>The rotation is locked!</span>")
|
||||
return FALSE
|
||||
var/new_angle = input(user, "Input a new angle for primary reflection face.", "Reflector Angle", rotation_angle) as null|num
|
||||
if(!user.canUseTopic(src, be_close=TRUE))
|
||||
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
|
||||
if(!user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
return
|
||||
if(!isnull(new_angle))
|
||||
setAngle(SIMPLIFY_DEGREES(new_angle))
|
||||
return TRUE
|
||||
|
||||
/obj/structure/reflector/AltClick(mob/user)
|
||||
if(!user.canUseTopic(src, be_close=TRUE))
|
||||
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
|
||||
if(!user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
return
|
||||
else if(finished)
|
||||
rotate(user)
|
||||
|
||||
@@ -112,18 +112,17 @@
|
||||
if(istype(W, /obj/item/screwdriver) && !anchored)
|
||||
if(deconstruction_state == SHOWCASE_SCREWDRIVERED)
|
||||
to_chat(user, "<span class='notice'>You screw the screws back into the showcase.</span>")
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
W.play_tool_sound(src, 100)
|
||||
deconstruction_state = SHOWCASE_CONSTRUCTED
|
||||
else if (deconstruction_state == SHOWCASE_CONSTRUCTED)
|
||||
to_chat(user, "<span class='notice'>You unscrew the screws.</span>")
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
W.play_tool_sound(src, 100)
|
||||
deconstruction_state = SHOWCASE_SCREWDRIVERED
|
||||
|
||||
if(istype(W, /obj/item/crowbar) && deconstruction_state == SHOWCASE_SCREWDRIVERED)
|
||||
if(do_after(user, 20*W.toolspeed, target = src))
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
if(W.use_tool(src, user, 20, volume=100))
|
||||
to_chat(user, "<span class='notice'>You start to crowbar the showcase apart...</span>")
|
||||
new /obj/item/stack/sheet/metal (get_turf(src), 4)
|
||||
new /obj/item/stack/sheet/metal(drop_location(), 4)
|
||||
qdel(src)
|
||||
|
||||
if(deconstruction_state == SHOWCASE_CONSTRUCTED && default_unfasten_wrench(user, W))
|
||||
|
||||
@@ -27,21 +27,21 @@
|
||||
if(BURN)
|
||||
playsound(loc, 'sound/items/welder.ogg', 80, 1)
|
||||
|
||||
/obj/structure/sign/attackby(obj/item/O, mob/user, params)
|
||||
if(istype(O, /obj/item/wrench) && buildable_sign)
|
||||
/obj/structure/sign/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/wrench) && buildable_sign)
|
||||
user.visible_message("<span class='notice'>[user] starts removing [src]...</span>", \
|
||||
"<span class='notice'>You start unfastening [src].</span>")
|
||||
playsound(src, O.usesound, 50, 1)
|
||||
if(!do_after(user, 30*O.toolspeed, target = src))
|
||||
return
|
||||
playsound(src, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
user.visible_message("<span class='notice'>[user] unfastens [src].</span>", \
|
||||
"<span class='notice'>You unfasten [src].</span>")
|
||||
var/obj/item/sign_backing/SB = new (get_turf(user))
|
||||
SB.icon_state = icon_state
|
||||
SB.sign_path = type
|
||||
qdel(src)
|
||||
else if(istype(O, /obj/item/pen) && buildable_sign)
|
||||
I.play_tool_sound(src)
|
||||
if(I.use_tool(src, user, 40))
|
||||
playsound(src, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
user.visible_message("<span class='notice'>[user] unfastens [src].</span>", \
|
||||
"<span class='notice'>You unfasten [src].</span>")
|
||||
var/obj/item/sign_backing/SB = new (get_turf(user))
|
||||
SB.icon_state = icon_state
|
||||
SB.sign_path = type
|
||||
qdel(src)
|
||||
return
|
||||
else if(istype(I, /obj/item/pen) && buildable_sign)
|
||||
var/list/sign_types = list("Secure Area", "Biohazard", "High Voltage", "Radiation", "Hard Vacuum Ahead", "Disposal: Leads To Space", "Danger: Fire", "No Smoking", "Medbay", "Science", "Chemistry", \
|
||||
"Hydroponics", "Xenobiology")
|
||||
var/obj/structure/sign/sign_type
|
||||
|
||||
@@ -18,11 +18,10 @@
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if(istype(W, /obj/item/wrench))
|
||||
if(anchored)
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] is loosening the [name]'s bolts.", \
|
||||
"<span class='notice'>You are loosening the [name]'s bolts...</span>")
|
||||
if(do_after(user,40*W.toolspeed, target = src))
|
||||
if(!src.loc || !anchored)
|
||||
if(W.use_tool(src, user, 40, volume=100))
|
||||
if(!anchored)
|
||||
return
|
||||
user.visible_message("[user] loosened the [name]'s bolts!", \
|
||||
"<span class='notice'>You loosen the [name]'s bolts!</span>")
|
||||
@@ -31,44 +30,28 @@
|
||||
if(!isfloorturf(src.loc))
|
||||
user.visible_message("<span class='warning'>A floor must be present to secure the [name]!</span>")
|
||||
return
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] is securing the [name]'s bolts...", \
|
||||
"<span class='notice'>You are securing the [name]'s bolts...</span>")
|
||||
if(do_after(user, 40*W.toolspeed, target = src))
|
||||
if(!src.loc || anchored)
|
||||
if(W.use_tool(src, user, 40, volume=100))
|
||||
if(anchored)
|
||||
return
|
||||
user.visible_message("[user] has secured the [name]'s bolts.", \
|
||||
"<span class='notice'>You have secured the [name]'s bolts.</span>")
|
||||
anchored = TRUE
|
||||
|
||||
else if(istype(W, /obj/item/gun/energy/plasmacutter))
|
||||
playsound(src, 'sound/items/welder.ogg', 100, 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(!src.loc)
|
||||
return
|
||||
user.visible_message("[user] slices apart the [name].", \
|
||||
"<span class='notice'>You slice apart the [name].</span>")
|
||||
deconstruct(TRUE)
|
||||
|
||||
else if(istype(W, /obj/item/pickaxe/drill/jackhammer))
|
||||
var/obj/item/pickaxe/drill/jackhammer/D = W
|
||||
if(!src.loc)
|
||||
return
|
||||
user.visible_message("[user] destroys the [name]!", \
|
||||
user.visible_message("[user] destroys the [name]!",
|
||||
"<span class='notice'>You destroy the [name].</span>")
|
||||
D.playDigSound()
|
||||
W.play_tool_sound(src)
|
||||
qdel(src)
|
||||
|
||||
else if(istype(W, /obj/item/weldingtool) && !anchored)
|
||||
playsound(loc, W.usesound, 40, 1)
|
||||
else if(istype(W, /obj/item/weldingtool) || istype(W, /obj/item/gun/energy/plasmacutter))
|
||||
if(!W.tool_start_check(user, amount=0))
|
||||
return FALSE
|
||||
|
||||
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(!src.loc)
|
||||
return
|
||||
playsound(loc, 'sound/items/welder2.ogg', 50, 1)
|
||||
if(W.use_tool(src, user, 40, volume=50))
|
||||
user.visible_message("[user] slices apart the [name].", \
|
||||
"<span class='notice'>You slice apart the [name]!</span>")
|
||||
deconstruct(TRUE)
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
/obj/structure/table_frame/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/wrench))
|
||||
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))
|
||||
I.play_tool_sound(src)
|
||||
if(I.use_tool(src, user, 30))
|
||||
playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
deconstruct(TRUE)
|
||||
else if(istype(I, /obj/item/stack/sheet/plasteel))
|
||||
|
||||
@@ -65,9 +65,6 @@
|
||||
if(pushed_mob.buckled)
|
||||
to_chat(user, "<span class='warning'>[pushed_mob] is buckled to [pushed_mob.buckled]!</span>")
|
||||
return
|
||||
if(user.grab_state < GRAB_AGGRESSIVE)
|
||||
to_chat(user, "<span class='warning'>You need a better grip to do that!</span>")
|
||||
return
|
||||
tablepush(user, pushed_mob)
|
||||
user.stop_pulling()
|
||||
else
|
||||
@@ -95,23 +92,19 @@
|
||||
pushed_mob.visible_message("<span class='danger'>[user] pushes [pushed_mob] onto [src].</span>", \
|
||||
"<span class='userdanger'>[user] pushes [pushed_mob] onto [src].</span>")
|
||||
add_logs(user, pushed_mob, "pushed")
|
||||
var/mob/living/carbon/human/H = pushed_mob
|
||||
if(istype(H) && H.ckey == "kevinz000")
|
||||
H.forcesay("*moan")
|
||||
|
||||
|
||||
/obj/structure/table/attackby(obj/item/I, mob/user, params)
|
||||
if(!(flags_1 & NODECONSTRUCT_1))
|
||||
if(istype(I, /obj/item/screwdriver) && deconstruction_ready)
|
||||
to_chat(user, "<span class='notice'>You start disassembling [src]...</span>")
|
||||
playsound(src.loc, I.usesound, 50, 1)
|
||||
if(do_after(user, 20*I.toolspeed, target = src))
|
||||
if(I.use_tool(src, user, 20, volume=50))
|
||||
deconstruct(TRUE)
|
||||
return
|
||||
|
||||
if(istype(I, /obj/item/wrench) && deconstruction_ready)
|
||||
to_chat(user, "<span class='notice'>You start deconstructing [src]...</span>")
|
||||
playsound(src.loc, I.usesound, 50, 1)
|
||||
if(do_after(user, 40*I.toolspeed, target = src))
|
||||
if(I.use_tool(src, user, 40, volume=50))
|
||||
playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1)
|
||||
deconstruct(TRUE, 1)
|
||||
return
|
||||
@@ -309,23 +302,19 @@
|
||||
|
||||
/obj/structure/table/reinforced/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0, user))
|
||||
playsound(src.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 = 0
|
||||
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 = 1
|
||||
if(!W.tool_start_check(user, amount=0))
|
||||
return
|
||||
|
||||
if(deconstruction_ready)
|
||||
to_chat(user, "<span class='notice'>You start strengthening the reinforced table...</span>")
|
||||
if (W.use_tool(src, user, 50, volume=50))
|
||||
to_chat(user, "<span class='notice'>You strengthen the table.</span>")
|
||||
deconstruction_ready = 0
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You start weakening the reinforced table...</span>")
|
||||
if (W.use_tool(src, user, 50, volume=50))
|
||||
to_chat(user, "<span class='notice'>You weaken the table.</span>")
|
||||
deconstruction_ready = 1
|
||||
else
|
||||
. = ..()
|
||||
|
||||
@@ -449,7 +438,7 @@
|
||||
|
||||
/obj/structure/rack/attackby(obj/item/W, mob/user, params)
|
||||
if (istype(W, /obj/item/wrench) && !(flags_1&NODECONSTRUCT_1))
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
W.play_tool_sound(src)
|
||||
deconstruct(TRUE)
|
||||
return
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
|
||||
@@ -42,8 +42,7 @@
|
||||
to_chat(user, "<span class='warning'>Remove the pod first!</span>")
|
||||
return
|
||||
user.visible_message("[user] starts to deattach \the [src].", "<span class='notice'>You start to deattach the [name]...</span>")
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
if(do_after(user, 35*W.toolspeed, target = src))
|
||||
if(W.use_tool(src, user, 40, volume=50))
|
||||
to_chat(user, "<span class='notice'>You deattach the [name].</span>")
|
||||
var/obj/structure/c_transit_tube/R = new tube_construction(loc)
|
||||
R.setDir(dir)
|
||||
|
||||
@@ -28,22 +28,17 @@
|
||||
build_type = flipped_build_type
|
||||
else
|
||||
build_type = initial(build_type)
|
||||
icon_state = "[base_icon][flipped]"
|
||||
icon_state = "[base_icon][flipped]"
|
||||
|
||||
/obj/structure/c_transit_tube/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/wrench))
|
||||
to_chat(user, "<span class='notice'>You start attaching the [name]...</span>")
|
||||
add_fingerprint(user)
|
||||
playsound(src.loc, I.usesound, 50, 1)
|
||||
if(do_after(user, 40*I.toolspeed, target = src))
|
||||
if(QDELETED(src))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You attach the [name].</span>")
|
||||
var/obj/structure/transit_tube/R = new build_type(loc, dir)
|
||||
transfer_fingerprints_to(R)
|
||||
qdel(src)
|
||||
else
|
||||
return ..()
|
||||
/obj/structure/c_transit_tube/wrench_act(mob/living/user, obj/item/I)
|
||||
to_chat(user, "<span class='notice'>You start attaching the [name]...</span>")
|
||||
add_fingerprint(user)
|
||||
if(I.use_tool(src, user, 40, volume=50))
|
||||
to_chat(user, "<span class='notice'>You attach the [name].</span>")
|
||||
var/obj/structure/transit_tube/R = new build_type(loc, dir)
|
||||
transfer_fingerprints_to(R)
|
||||
qdel(src)
|
||||
return TRUE
|
||||
|
||||
// transit tube station
|
||||
/obj/structure/c_transit_tube/station
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
/obj/structure/transit_tube_pod/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/crowbar))
|
||||
if(!moving)
|
||||
playsound(src.loc, I.usesound, 50, 1)
|
||||
I.play_tool_sound(src)
|
||||
if(contents.len)
|
||||
user.visible_message("[user] empties \the [src].", "<span class='notice'>You empty \the [src].</span>")
|
||||
empty_pod()
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
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))
|
||||
if(I.use_tool(src, user, 30))
|
||||
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()
|
||||
@@ -159,13 +159,7 @@
|
||||
..()
|
||||
|
||||
/obj/structure/urinal/attackby(obj/item/I, mob/living/user, params)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
to_chat(user, "<span class='notice'>You start to [exposed ? "screw the cap back into place" : "unscrew the cap to the drain protector"]...</span>")
|
||||
playsound(loc, 'sound/effects/stonedoor_openclose.ogg', 50, 1)
|
||||
if(do_after(user, 20*I.toolspeed, target = src))
|
||||
user.visible_message("[user] [exposed ? "screws the cap back into place" : "unscrew the cap to the drain protector"]!", "<span class='notice'>You [exposed ? "screw the cap back into place" : "unscrew the cap on the drain"]!</span>", "<span class='italics'>You hear metal and squishing noises.</span>")
|
||||
exposed = !exposed
|
||||
else if(exposed)
|
||||
if(exposed)
|
||||
if (hiddenitem)
|
||||
to_chat(user, "<span class='warning'>There is already something in the drain enclosure.</span>")
|
||||
return
|
||||
@@ -177,6 +171,18 @@
|
||||
return
|
||||
hiddenitem = I
|
||||
to_chat(user, "<span class='notice'>You place [I] into the drain enclosure.</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/urinal/screwdriver_act(mob/living/user, obj/item/I)
|
||||
to_chat(user, "<span class='notice'>You start to [exposed ? "screw the cap back into place" : "unscrew the cap to the drain protector"]...</span>")
|
||||
playsound(loc, 'sound/effects/stonedoor_openclose.ogg', 50, 1)
|
||||
if(I.use_tool(src, user, 20))
|
||||
user.visible_message("[user] [exposed ? "screws the cap back into place" : "unscrew the cap to the drain protector"]!",
|
||||
"<span class='notice'>You [exposed ? "screw the cap back into place" : "unscrew the cap on the drain"]!</span>",
|
||||
"<span class='italics'>You hear metal and squishing noises.</span>")
|
||||
exposed = !exposed
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/item/reagent_containers/food/urinalcake
|
||||
@@ -187,6 +193,11 @@
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
list_reagents = list("chlorine" = 3, "ammonia" = 1)
|
||||
|
||||
/obj/item/reagent_containers/food/urinalcake/attack_self(mob/living/user)
|
||||
user.visible_message("<span class='notice'>[user] squishes [src]!</span>", "<span class='notice'>You squish [src].</span>", "<i>You hear a squish.</i>")
|
||||
icon_state = "urinalcake_squish"
|
||||
addtimer(VARSET_CALLBACK(src, icon_state, "urinalcake"), 8)
|
||||
|
||||
/obj/machinery/shower
|
||||
name = "shower"
|
||||
desc = "The HS-451. Installed in the 2550s by the Nanotrasen Hygiene Division."
|
||||
@@ -242,19 +253,23 @@
|
||||
/obj/machinery/shower/attackby(obj/item/I, mob/user, params)
|
||||
if(I.type == /obj/item/device/analyzer)
|
||||
to_chat(user, "<span class='notice'>The water temperature seems to be [watertemp].</span>")
|
||||
if(istype(I, /obj/item/wrench))
|
||||
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] to [watertemp] temperature.</span>")
|
||||
log_game("[key_name(user)] has wrenched a shower to [watertemp] at ([x],[y],[z])")
|
||||
add_hiddenprint(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/machinery/shower/wrench_act(mob/living/user, obj/item/I)
|
||||
to_chat(user, "<span class='notice'>You begin to adjust the temperature valve with \the [I]...</span>")
|
||||
if(I.use_tool(src, user, 50))
|
||||
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] to [watertemp] temperature.</span>")
|
||||
log_game("[key_name(user)] has wrenched a shower to [watertemp] at ([x],[y],[z])")
|
||||
add_hiddenprint(user)
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/machinery/shower/update_icon() //this is terribly unreadable, but basically it makes the shower mist up
|
||||
@@ -606,34 +621,24 @@
|
||||
/obj/structure/curtain/attackby(obj/item/W, mob/user)
|
||||
if (istype(W, /obj/item/toy/crayon))
|
||||
color = input(user,"","Choose Color",color) as color
|
||||
else if(istype(W, /obj/item/screwdriver))
|
||||
if(anchored)
|
||||
playsound(src.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(src.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(src.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()
|
||||
else
|
||||
. = ..()
|
||||
return ..()
|
||||
|
||||
/obj/structure/curtain/wrench_act(mob/living/user, obj/item/I)
|
||||
default_unfasten_wrench(user, I, 50)
|
||||
return TRUE
|
||||
|
||||
/obj/structure/curtain/wirecutter_act(mob/living/user, obj/item/I)
|
||||
if(anchored)
|
||||
return TRUE
|
||||
|
||||
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(I.use_tool(src, user, 50, volume=100) && !anchored)
|
||||
to_chat(user, "<span class='notice'>You cut apart [src].</span>")
|
||||
deconstruct()
|
||||
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/structure/curtain/attack_hand(mob/user)
|
||||
|
||||
@@ -87,36 +87,34 @@
|
||||
add_fingerprint(user)
|
||||
switch(state)
|
||||
if("01")
|
||||
if(istype(W, /obj/item/weldingtool) && !anchored )
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if (WT.remove_fuel(0,user))
|
||||
user.visible_message("[user] disassembles the windoor assembly.", "<span class='notice'>You start to disassemble the windoor assembly...</span>")
|
||||
playsound(loc, 'sound/items/welder2.ogg', 50, 1)
|
||||
|
||||
if(do_after(user, 40*W.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)
|
||||
else
|
||||
if(istype(W, /obj/item/weldingtool) && !anchored)
|
||||
if(!W.tool_start_check(user, amount=0))
|
||||
return
|
||||
|
||||
user.visible_message("[user] disassembles the windoor assembly.",
|
||||
"<span class='notice'>You start to disassemble the windoor assembly...</span>")
|
||||
|
||||
if(W.use_tool(src, user, 40, volume=50))
|
||||
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(istype(W, /obj/item/wrench) && !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.", "<span class='notice'>You start to secure the windoor assembly to the floor...</span>")
|
||||
user.visible_message("[user] secures the windoor assembly to the floor.",
|
||||
"<span class='notice'>You start to secure the windoor assembly to the floor...</span>")
|
||||
|
||||
if(do_after(user, 40*W.toolspeed, target = src))
|
||||
if(!src || anchored)
|
||||
if(W.use_tool(src, user, 40, volume=100))
|
||||
if(anchored)
|
||||
return
|
||||
for(var/obj/machinery/door/window/WD in loc)
|
||||
if(WD.dir == dir)
|
||||
@@ -131,11 +129,11 @@
|
||||
|
||||
//Unwrenching an unsecure assembly un-anchors it. Step 4 undone
|
||||
else if(istype(W, /obj/item/wrench) && anchored)
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] unsecures the windoor assembly to the floor.", "<span class='notice'>You start to unsecure the windoor assembly to the floor...</span>")
|
||||
user.visible_message("[user] unsecures the windoor assembly to the floor.",
|
||||
"<span class='notice'>You start to unsecure the windoor assembly to the floor...</span>")
|
||||
|
||||
if(do_after(user, 40*W.toolspeed, target = src))
|
||||
if(!src || !anchored)
|
||||
if(W.use_tool(src, user, 40, volume=100))
|
||||
if(!anchored)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You unsecure the windoor assembly.</span>")
|
||||
anchored = FALSE
|
||||
@@ -188,11 +186,10 @@
|
||||
|
||||
//Removing wire from the assembly. Step 5 undone.
|
||||
if(istype(W, /obj/item/wirecutters))
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] cuts the wires from the airlock assembly.", "<span class='notice'>You start to cut the wires from airlock assembly...</span>")
|
||||
|
||||
if(do_after(user, 40*W.toolspeed, target = src))
|
||||
if(!src || state != "02")
|
||||
if(W.use_tool(src, user, 40, volume=100))
|
||||
if(state != "02")
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You cut the windoor wires.</span>")
|
||||
@@ -207,8 +204,9 @@
|
||||
else if(istype(W, /obj/item/electronics/airlock))
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
return
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] installs the electronics into the airlock assembly.", "<span class='notice'>You start to install electronics into the airlock assembly...</span>")
|
||||
W.play_tool_sound(src, 100)
|
||||
user.visible_message("[user] installs the electronics into the airlock assembly.",
|
||||
"<span class='notice'>You start to install electronics into the airlock assembly...</span>")
|
||||
|
||||
if(do_after(user, 40, target = src))
|
||||
if(!src || electronics)
|
||||
@@ -225,12 +223,10 @@
|
||||
if(!electronics)
|
||||
return
|
||||
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
user.visible_message("[user] removes the electronics from the airlock assembly.", "<span class='notice'>You start to uninstall electronics from the airlock assembly...</span>")
|
||||
user.visible_message("[user] removes the electronics from the airlock assembly.",
|
||||
"<span class='notice'>You start to uninstall electronics from the airlock assembly...</span>")
|
||||
|
||||
if(do_after(user, 40*W.toolspeed, target = src))
|
||||
if(!src || !electronics)
|
||||
return
|
||||
if(W.use_tool(src, user, 40, volume=100) && electronics)
|
||||
to_chat(user, "<span class='notice'>You remove the airlock electronics.</span>")
|
||||
name = "wired windoor assembly"
|
||||
var/obj/item/electronics/airlock/ae
|
||||
@@ -254,58 +250,56 @@
|
||||
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.", "<span class='notice'>You start prying the windoor into the frame...</span>")
|
||||
user << browse(null, "window=windoor_access")
|
||||
user.visible_message("[user] pries the windoor into the frame.",
|
||||
"<span class='notice'>You start prying the windoor into the frame...</span>")
|
||||
|
||||
if(do_after(user, 40*W.toolspeed, target = src))
|
||||
|
||||
if(loc && electronics)
|
||||
|
||||
density = TRUE //Shouldn't matter but just incase
|
||||
to_chat(user, "<span class='notice'>You finish the windoor.</span>")
|
||||
|
||||
if(secure)
|
||||
var/obj/machinery/door/window/brigdoor/windoor = new /obj/machinery/door/window/brigdoor(loc)
|
||||
if(facing == "l")
|
||||
windoor.icon_state = "leftsecureopen"
|
||||
windoor.base_state = "leftsecure"
|
||||
else
|
||||
windoor.icon_state = "rightsecureopen"
|
||||
windoor.base_state = "rightsecure"
|
||||
windoor.setDir(dir)
|
||||
windoor.density = FALSE
|
||||
|
||||
if(electronics.one_access)
|
||||
windoor.req_one_access = electronics.accesses
|
||||
else
|
||||
windoor.req_access = electronics.accesses
|
||||
windoor.electronics = electronics
|
||||
electronics.forceMove(windoor)
|
||||
if(created_name)
|
||||
windoor.name = created_name
|
||||
qdel(src)
|
||||
windoor.close()
|
||||
if(W.use_tool(src, user, 40, volume=100) && electronics)
|
||||
|
||||
density = TRUE //Shouldn't matter but just incase
|
||||
to_chat(user, "<span class='notice'>You finish the windoor.</span>")
|
||||
|
||||
if(secure)
|
||||
var/obj/machinery/door/window/brigdoor/windoor = new /obj/machinery/door/window/brigdoor(loc)
|
||||
if(facing == "l")
|
||||
windoor.icon_state = "leftsecureopen"
|
||||
windoor.base_state = "leftsecure"
|
||||
else
|
||||
var/obj/machinery/door/window/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
|
||||
windoor.icon_state = "rightsecureopen"
|
||||
windoor.base_state = "rightsecure"
|
||||
windoor.setDir(dir)
|
||||
windoor.density = FALSE
|
||||
|
||||
if(electronics.one_access)
|
||||
windoor.req_one_access = electronics.accesses
|
||||
else
|
||||
windoor.req_access = electronics.accesses
|
||||
windoor.electronics = electronics
|
||||
electronics.loc = windoor
|
||||
if(created_name)
|
||||
windoor.name = created_name
|
||||
qdel(src)
|
||||
windoor.close()
|
||||
windoor.electronics = electronics
|
||||
electronics.forceMove(windoor)
|
||||
if(created_name)
|
||||
windoor.name = created_name
|
||||
qdel(src)
|
||||
windoor.close()
|
||||
|
||||
|
||||
else
|
||||
var/obj/machinery/door/window/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
|
||||
|
||||
windoor.req_access = electronics.accesses
|
||||
windoor.electronics = electronics
|
||||
electronics.loc = windoor
|
||||
if(created_name)
|
||||
windoor.name = created_name
|
||||
qdel(src)
|
||||
windoor.close()
|
||||
|
||||
|
||||
else
|
||||
@@ -318,7 +312,13 @@
|
||||
|
||||
/obj/structure/windoor_assembly/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/simple_rotation,ROTATION_ALTCLICK | ROTATION_CLOCKWISE | ROTATION_COUNTERCLOCKWISE | ROTATION_VERBS,null,CALLBACK(src, .proc/can_be_rotated),CALLBACK(src,.proc/after_rotation))
|
||||
AddComponent(
|
||||
/datum/component/simple_rotation,
|
||||
ROTATION_ALTCLICK | ROTATION_CLOCKWISE | ROTATION_COUNTERCLOCKWISE | ROTATION_VERBS,
|
||||
null,
|
||||
CALLBACK(src, .proc/can_be_rotated),
|
||||
CALLBACK(src,.proc/after_rotation)
|
||||
)
|
||||
|
||||
/obj/structure/windoor_assembly/proc/can_be_rotated(mob/user,rotation_type)
|
||||
if(anchored)
|
||||
|
||||
@@ -178,39 +178,39 @@
|
||||
return 1 //skip the afterattack
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
if(istype(I, /obj/item/weldingtool) && 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>")
|
||||
if(!I.tool_start_check(user, amount=0))
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You begin repairing [src]...</span>")
|
||||
if(I.use_tool(src, user, 40, volume=50))
|
||||
obj_integrity = max_integrity
|
||||
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(!(flags_1&NODECONSTRUCT_1))
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
playsound(src, I.usesound, 75, 1)
|
||||
I.play_tool_sound(src, 75)
|
||||
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)))
|
||||
if(I.use_tool(src, user, decon_speed, 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)))
|
||||
if(I.use_tool(src, user, decon_speed, 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)))
|
||||
if(I.use_tool(src, user, decon_speed, extra_checks = CALLBACK(src, .proc/check_anchored, anchored)))
|
||||
anchored = !anchored
|
||||
air_update_turf(TRUE)
|
||||
update_nearby_icons()
|
||||
@@ -220,16 +220,16 @@
|
||||
|
||||
else if (istype(I, /obj/item/crowbar) && 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)))
|
||||
I.play_tool_sound(src, 75)
|
||||
if(I.use_tool(src, user, decon_speed, 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(istype(I, /obj/item/wrench) && !anchored)
|
||||
playsound(src, I.usesound, 75, 1)
|
||||
I.play_tool_sound(src, 75)
|
||||
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)))
|
||||
if(I.use_tool(src, user, decon_speed, 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)
|
||||
@@ -560,7 +560,7 @@
|
||||
canSmoothWith = null
|
||||
explosion_block = 3
|
||||
level = 3
|
||||
glass_type = /obj/item/stack/sheet/rglass
|
||||
glass_type = /obj/item/stack/sheet/titaniumglass
|
||||
glass_amount = 2
|
||||
|
||||
/obj/structure/window/shuttle/narsie_act()
|
||||
@@ -569,6 +569,9 @@
|
||||
/obj/structure/window/shuttle/tinted
|
||||
opacity = TRUE
|
||||
|
||||
/obj/structure/window/shuttle/unanchored
|
||||
anchored = FALSE
|
||||
|
||||
/obj/structure/window/plastitanium
|
||||
name = "plastitanium window"
|
||||
desc = "An evil looking window of plasma and titanium."
|
||||
@@ -586,9 +589,12 @@
|
||||
canSmoothWith = null
|
||||
explosion_block = 3
|
||||
level = 3
|
||||
glass_type = /obj/item/stack/sheet/rglass
|
||||
glass_type = /obj/item/stack/sheet/plastitaniumglass
|
||||
glass_amount = 2
|
||||
|
||||
/obj/structure/window/plastitanium/unanchored
|
||||
anchored = FALSE
|
||||
|
||||
/obj/structure/window/reinforced/clockwork
|
||||
name = "brass window"
|
||||
desc = "A paper-thin pane of translucent yet reinforced brass."
|
||||
|
||||
Reference in New Issue
Block a user