mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 04:51:32 +01:00
Adds the Aut'akh unathi (#5919)
* Base work for the unathi robot subspecies. * Adds metabolism species, kidney vars, and the robot unathi organs. * Moves some action buttons to organs, pretty much a bay port right now. Todo: the unathi and alien stuff should also go here. * First autakh implant power. * Fixes the organs action button this time. * Finishes more implants, and interactions with flashs and vaurca. * Prepare for great changes. * Drops the real bomb, boss. * He who fights with monsters. * Far more work into augments and limb removing powers. * Limb verbs should be good now. * A LOT of work into the assited organ, allowing it to bleed and etc, as well adding a new chem that will stop bleeding in their case. * Probably the last work on implants. * Some extra touches. * Some tweaks to the species. * More fixes and adds kyre's sprites. * More runtime fixes. * Fixes the species name too. * Fixes travis. * Updates this file too to work with the new tools procs. * Adds changelog * Fixed changelog. * Unathi hair and lore description. * Some tweaks to this too. * Locks away them for now, they will be released after we got all the events and etc done. * Changes this chemical. * Fixes an airlock runtime. * Adds the non scan flag to the autakh, mostly due to some bizzare interactions with changelings and cloning. * Organs removal changes; can't take out the organ if it is too damage. * Restricts them back again. * Robotic organs now have the proper icons and names. * Adds sprites for their organs and some extra tweaks. * Fixes this missing icon. * emp should also now hurt assited organs. * Tweaks more organ related things. * Fixes the head not being properly set as well. * Fixes their flags. * fixes the flag for real this time. * Poze's review. * Changes the au'takh organ buttons to don't be animated. * Helps with adminbus or something. * Fowl's requested changes. * Fixes a typo. * Robotic limb's brute and burn mods are now controlled by the limb model. * Fowl's changes once more. * Stops some spam. * More grammar. * No eal. * Skull's review.
This commit is contained in:
@@ -91,7 +91,7 @@
|
||||
|
||||
if(!serial)
|
||||
serial = rand(1, poster_designs.len) //use a random serial if none is given
|
||||
|
||||
|
||||
serial_number = serial
|
||||
|
||||
var/datum/poster/design
|
||||
@@ -100,7 +100,7 @@
|
||||
design = new path
|
||||
else
|
||||
design = poster_designs[serial_number]
|
||||
|
||||
|
||||
set_poster(design)
|
||||
|
||||
switch (placement_dir)
|
||||
@@ -124,7 +124,7 @@
|
||||
icon_state = design.icon_state // poster[serial_number]
|
||||
|
||||
/obj/structure/sign/poster/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(iswirecutter(W))
|
||||
if(W.iswirecutter())
|
||||
playsound(loc, 'sound/items/Wirecutter.ogg', 100, 1)
|
||||
if(ruined)
|
||||
user << "<span class='notice'>You remove the remnants of the poster.</span>"
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
var/damage = W.force / 4.0
|
||||
|
||||
if(iswelder(W))
|
||||
if(W.iswelder())
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
|
||||
if(WT.remove_fuel(0, user))
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
var/datum/action/item_action/action
|
||||
var/action_button_name //It is also the text which gets displayed on the action button. If not set it defaults to 'Use [name]'. If it's not set, there'll be no button.
|
||||
var/action_button_is_hands_free = 0 //If 1, bypass the restrained, lying, and stunned checks action buttons normally test for
|
||||
var/default_action_type = /datum/action/item_action // Specify the default type and behavior of the action button for this atom.
|
||||
|
||||
//This flag is used to determine when items in someone's inventory cover others. IE helmets making it so you can't see glasses, etc.
|
||||
//It should be used purely for appearance. For gameplay effects caused by items covering body parts, use body_parts_covered.
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
/obj/item/frame/apc/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if (iswrench(W))
|
||||
if (W.iswrench())
|
||||
new /obj/item/stack/material/steel( get_turf(src.loc), 2 )
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
storage_capacity = 30
|
||||
var/contains_body = 0
|
||||
|
||||
/obj/structure/closet/body_bag/attackby(W as obj, mob/user as mob)
|
||||
/obj/structure/closet/body_bag/attackby(var/obj/item/W, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/pen))
|
||||
var/t = input(user, "What would you like the label to be?", text("[]", src.name), null) as text
|
||||
if (user.get_active_hand() != W)
|
||||
@@ -58,7 +58,7 @@
|
||||
src.name = "body bag"
|
||||
//..() //Doesn't need to run the parent. Since when can fucking bodybags be welded shut? -Agouri
|
||||
return
|
||||
else if(iswirecutter(W))
|
||||
else if(W.iswirecutter())
|
||||
user << "You cut the tag off the bodybag"
|
||||
src.name = "body bag"
|
||||
cut_overlays()
|
||||
|
||||
@@ -79,42 +79,13 @@
|
||||
var/safety = M:eyecheck(TRUE)
|
||||
if(safety <= 0)
|
||||
flick("e_flash", M.flash)
|
||||
//Vaurca damage 15/01/16
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(isvaurca(H))
|
||||
var/obj/item/organ/eyes/E = H.get_eyes()
|
||||
if(!E)
|
||||
return
|
||||
user << span("alert", "Your eyes burn with the intense light of the flash!")
|
||||
M.Weaken(10)
|
||||
E.damage += rand(10, 11)
|
||||
if(E.damage > 12)
|
||||
M.eye_blurry += rand(3,6)
|
||||
if (E.damage >= E.min_broken_damage)
|
||||
M.sdisabilities |= BLIND
|
||||
else if (E.damage >= E.min_bruised_damage)
|
||||
M.eye_blind = 5
|
||||
M.eye_blurry = 5
|
||||
M.disabilities |= NEARSIGHTED
|
||||
addtimer(CALLBACK(M, /mob/.proc/reset_nearsighted), 100)
|
||||
var/obj/item/organ/eyes/E = H.get_eyes()
|
||||
if(!E)
|
||||
return
|
||||
|
||||
E.flash_act()
|
||||
|
||||
/* if(ishuman(M) && ishuman(user) && M.stat!=DEAD) //why is this even a thing
|
||||
if(user.mind && user.mind in revs.current_antagonists)
|
||||
var/revsafe = 0
|
||||
for(var/obj/item/weapon/implant/loyalty/L in M)
|
||||
if(L && L.implanted)
|
||||
revsafe = 1
|
||||
break
|
||||
M.mind_initialize() //give them a mind datum if they don't have one.
|
||||
if(M.mind.has_been_rev)
|
||||
revsafe = 2
|
||||
if(!revsafe)
|
||||
M.mind.has_been_rev = 1
|
||||
revs.add_antagonist(M.mind)
|
||||
else if(revsafe == 1)
|
||||
user << "<span class='warning'>Something seems to be blocking the flash!</span>"
|
||||
else
|
||||
user << "<span class='warning'>This mind seems resistant to the flash!</span>" */
|
||||
else
|
||||
flashfail = 1
|
||||
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
hack_state = null
|
||||
return ..()
|
||||
|
||||
/obj/item/device/multitool/hacktool/attackby(var/obj/W, var/mob/user)
|
||||
if(isscrewdriver(W))
|
||||
/obj/item/device/multitool/hacktool/attackby(var/obj/item/W, var/mob/user)
|
||||
if(W.isscrewdriver())
|
||||
in_hack_mode = !in_hack_mode
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
else
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if (iswelder(I))
|
||||
if (I.iswelder())
|
||||
var/obj/item/weapon/weldingtool/WT = I
|
||||
if (WT.remove_fuel(2, user))
|
||||
user.visible_message(span("notice", "[user] starts welding the metal shell of [src]."), span("notice", "You start [hacked ? "repairing" : "welding open"] the metal covering of [src]."))
|
||||
@@ -149,7 +149,7 @@
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if (iscrowbar(I))
|
||||
if (I.iscrowbar())
|
||||
if (!locked)
|
||||
user << span("notice", "You pry the cover off [src].")
|
||||
setconstructionstate(1)
|
||||
@@ -163,19 +163,19 @@
|
||||
user << span("notice","There's already a powercell in \the [src].")
|
||||
return
|
||||
|
||||
if (iscrowbar(I))
|
||||
if (I.iscrowbar())
|
||||
user << span("notice", "You wedge the cover back in place.")
|
||||
setconstructionstate(0)
|
||||
return
|
||||
|
||||
if (2)
|
||||
if (isscrewdriver(I))
|
||||
if (I.isscrewdriver())
|
||||
user << span("notice", "You unscrew and remove the wiring cover from \the [src].")
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
setconstructionstate(3)
|
||||
return
|
||||
|
||||
if (iscrowbar(I))
|
||||
if (I.iscrowbar())
|
||||
user << span("notice", "You wedge the cover back in place.")
|
||||
setconstructionstate(0)
|
||||
return
|
||||
@@ -189,20 +189,20 @@
|
||||
return
|
||||
|
||||
if (3)
|
||||
if (iswirecutter(I))
|
||||
if (I.iswirecutter())
|
||||
user << span("notice", "You cut the wires connecting the [src]'s magnets to their internal powersupply, [target ? "making the device fall off [target] and rendering it unusable." : "rendering the device unusable."]")
|
||||
playsound(loc, 'sound/items/Wirecutter.ogg', 50, 1)
|
||||
setconstructionstate(4)
|
||||
return
|
||||
|
||||
if (isscrewdriver(I))
|
||||
if (I.isscrewdriver())
|
||||
user << span("notice", "You replace and screw tight the wiring cover from \the [src].")
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
setconstructionstate(2)
|
||||
return
|
||||
|
||||
if (4)
|
||||
if (iswirecutter(I))
|
||||
if (I.iswirecutter())
|
||||
user << span("notice", "You repair the wires connecting the [src]'s magnets to their internal powersupply")
|
||||
setconstructionstate(3)
|
||||
return
|
||||
|
||||
@@ -29,6 +29,9 @@
|
||||
unregister_buffer(buffer_object)
|
||||
return ..()
|
||||
|
||||
/obj/item/device/multitool/ismultitool()
|
||||
return TRUE
|
||||
|
||||
/obj/item/device/multitool/proc/get_buffer(var/typepath)
|
||||
// Only allow clearing the buffer name when someone fetches the buffer.
|
||||
// Means you cannot be sure the source hasn't been destroyed until the very moment it's needed.
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/device/powersink/attackby(var/obj/item/I, var/mob/user)
|
||||
if(isscrewdriver(I))
|
||||
if(I.isscrewdriver())
|
||||
if(mode == 0)
|
||||
var/turf/T = loc
|
||||
if(isturf(T) && !!T.is_plating())
|
||||
|
||||
@@ -236,10 +236,10 @@
|
||||
/obj/item/device/radio/headset/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
// ..()
|
||||
user.set_machine(src)
|
||||
if (!( isscrewdriver(W) || (istype(W, /obj/item/device/encryptionkey/ ))))
|
||||
if (!( W.isscrewdriver() || (istype(W, /obj/item/device/encryptionkey/ ))))
|
||||
return
|
||||
|
||||
if(isscrewdriver(W))
|
||||
if(W.isscrewdriver())
|
||||
if(keyslot1 || keyslot2)
|
||||
|
||||
|
||||
|
||||
@@ -545,7 +545,7 @@ var/global/list/default_medbay_channels = list(
|
||||
/obj/item/device/radio/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
user.set_machine(src)
|
||||
if (!( isscrewdriver(W) ))
|
||||
if (!( W.isscrewdriver() ))
|
||||
return
|
||||
b_stat = !( b_stat )
|
||||
if(!istype(src, /obj/item/device/radio/beacon))
|
||||
@@ -598,10 +598,10 @@ var/global/list/default_medbay_channels = list(
|
||||
/obj/item/device/radio/borg/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
// ..()
|
||||
user.set_machine(src)
|
||||
if (!( isscrewdriver(W) || (istype(W, /obj/item/device/encryptionkey/ ))))
|
||||
if (!( W.isscrewdriver() || (istype(W, /obj/item/device/encryptionkey/ ))))
|
||||
return
|
||||
|
||||
if(isscrewdriver(W))
|
||||
if(W.isscrewdriver())
|
||||
if(keyslot)
|
||||
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ proc/within_jamming_range(var/atom/test) // tests if an object is near a radio j
|
||||
|
||||
|
||||
/obj/item/device/radiojammer/improvised/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (isscrewdriver(W))
|
||||
if (W.isscrewdriver())
|
||||
user << "<span class='notice'>You disassemble the improvised signal jammer.</span>"
|
||||
user.put_in_hands(assembly_holder)
|
||||
user.put_in_hands(cell)
|
||||
|
||||
@@ -23,6 +23,11 @@ BREATH ANALYZER
|
||||
var/mode = 1
|
||||
|
||||
/obj/item/device/healthanalyzer/attack(mob/living/M as mob, mob/living/user as mob)
|
||||
health_scan_mob(M, user)
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
/proc/health_scan_mob(var/mob/living/M, var/mob/living/user, var/visible_msg, var/ignore_clumsiness, var/show_limb_damage = TRUE)
|
||||
if ( ((CLUMSY in user.mutations) || (DUMB in user.mutations)) && prob(50))
|
||||
user << text("<span class='warning'>You try to analyze the floor's vitals!</span>")
|
||||
for(var/mob/O in viewers(M, null))
|
||||
@@ -64,7 +69,7 @@ BREATH ANALYZER
|
||||
user.show_message("<span class='notice'>Body Temperature: [M.bodytemperature-T0C]°C ([M.bodytemperature*1.8-459.67]°F)</span>", 1)
|
||||
if(M.tod && (M.stat == DEAD || (M.status_flags & FAKEDEATH)))
|
||||
user.show_message("<span class='notice'>Time of Death: [M.tod]</span>")
|
||||
if(istype(M, /mob/living/carbon/human) && mode == 1)
|
||||
if(istype(M, /mob/living/carbon/human) && show_limb_damage)
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/list/damaged = H.get_damaged_organs(1,1)
|
||||
user.show_message("<span class='notice'>Localized Damage, Brute/Burn:</span>",1)
|
||||
@@ -117,17 +122,13 @@ BREATH ANALYZER
|
||||
if (ID in virusDB)
|
||||
var/datum/data/record/V = virusDB[ID]
|
||||
user.show_message("<span class='warning'>Warning: Pathogen [V.fields["name"]] detected in subject's blood. Known antigen : [V.fields["antigen"]]</span>")
|
||||
// user.show_message(text("<span class='warning'>Warning: Unknown pathogen detected in subject's blood.</span>"))
|
||||
|
||||
if (M.getCloneLoss())
|
||||
user.show_message("<span class='warning'>Subject appears to have been imperfectly cloned.</span>")
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
if(!D.hidden[SCANNER])
|
||||
user.show_message(text("<span class='danger'>Warning: [D.form] Detected</span><span class='warning'>\nName: [D.name].\nType: [D.spread].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure]</span>"))
|
||||
// if (M.reagents && M.reagents.get_reagent_amount("inaprovaline"))
|
||||
// user.show_message("<span class='notice'>Bloodstream Analysis located [M.reagents:get_reagent_amount("inaprovaline")] units of rejuvenation chemicals.</span>")
|
||||
// Remove brain worm scans. Bad.
|
||||
// if (M.has_brain_worms())
|
||||
// user.show_message("<span class='warning'>Subject suffering from aberrant brain activity. Recommend further scanning.</span>")
|
||||
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if (H.getBrainLoss() >= config.default_brain_health || !H.has_brain())
|
||||
@@ -172,19 +173,17 @@ BREATH ANALYZER
|
||||
else
|
||||
user.show_message("<span class='notice'>Blood Level Normal: [blood_percent]% [blood_volume]cl. Type: [blood_type]</span>")
|
||||
user.show_message("<span class='notice'>Subject's pulse: <font color='[H.pulse == PULSE_THREADY || H.pulse == PULSE_NONE ? "red" : "blue"]'>[H.get_pulse(GETPULSE_TOOL)] bpm.</font></span>")
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/item/device/healthanalyzer/verb/toggle_mode()
|
||||
set name = "Switch Verbosity"
|
||||
set category = "Object"
|
||||
|
||||
mode = !mode
|
||||
switch (mode)
|
||||
if(1)
|
||||
usr << "The scanner now shows specific limb damage."
|
||||
if(0)
|
||||
usr << "The scanner no longer shows limb damage."
|
||||
|
||||
if(mode)
|
||||
usr << "The scanner now shows specific limb damage."
|
||||
else
|
||||
usr << "The scanner no longer shows limb damage."
|
||||
|
||||
|
||||
/obj/item/device/analyzer
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
. = ..()
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
cell = new celltype(src)
|
||||
|
||||
|
||||
/obj/item/device/suit_cooling_unit/Destroy()
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
QDEL_NULL(cell)
|
||||
@@ -72,7 +72,7 @@
|
||||
|
||||
if(cell.charge <= 0)
|
||||
turn_off()
|
||||
|
||||
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/suit_cooling_unit/proc/get_environment_temperature()
|
||||
@@ -146,7 +146,7 @@
|
||||
user << "You switch on the [src]."
|
||||
|
||||
/obj/item/device/suit_cooling_unit/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (isscrewdriver(W))
|
||||
if (W.isscrewdriver())
|
||||
if(cover_open)
|
||||
cover_open = 0
|
||||
user << "You screw the panel into place."
|
||||
|
||||
@@ -276,7 +276,7 @@
|
||||
user.drop_from_inventory(W,src)
|
||||
src.cell = W
|
||||
user << "<span class='notice'>You insert the cell!</span>"
|
||||
if(iscoil(W))
|
||||
if(W.iscoil())
|
||||
if(src.wires)
|
||||
user << "<span class='warning'>You have already inserted wire!</span>"
|
||||
return
|
||||
@@ -289,7 +289,7 @@
|
||||
|
||||
/obj/item/robot_parts/head/attackby(obj/item/W as obj, mob/user as mob)
|
||||
..()
|
||||
if(ismultitool(W))
|
||||
if(W.ismultitool())
|
||||
if(law_manager)
|
||||
user << "<span class='notice'>You disable the lawing circuits on \the [src].</span>"
|
||||
law_manager = FALSE
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
|
||||
attackby(obj/item/W as obj, mob/user as mob)
|
||||
if (iswelder(W))
|
||||
if (W.iswelder())
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0, user))
|
||||
cut_overlays()
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
user << "<span class='warning'>You can't apply [src] through [H.wear_suit]!</span>"
|
||||
return 1
|
||||
|
||||
if(affecting.status & ORGAN_ROBOT)
|
||||
if(affecting.status & ORGAN_ASSISTED)
|
||||
user << "<span class='warning'>This isn't useful at all on a robotic limb..</span>"
|
||||
return 1
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/external/S = H.get_organ(target_zone)
|
||||
|
||||
if (S && (S.status & ORGAN_ROBOT))
|
||||
if (S && (S.status & ORGAN_ASSISTED))
|
||||
if(S.get_damage())
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ var/global/list/datum/stack_recipe/rod_recipes = list(
|
||||
|
||||
/obj/item/stack/rods/attackby(obj/item/W as obj, mob/user as mob)
|
||||
..()
|
||||
if (iswelder(W))
|
||||
if (W.iswelder())
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
|
||||
if(get_amount() < 2)
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/obj/item/stack/material/glass/attackby(obj/item/W, mob/user)
|
||||
..()
|
||||
if(!is_reinforced)
|
||||
if(iscoil(W))
|
||||
if(W.iscoil())
|
||||
var/obj/item/stack/cable_coil/CC = W
|
||||
if (get_amount() < 1 || CC.get_amount() < 5)
|
||||
user << "<span class='warning'>You need five lengths of coil and one sheet of glass to make wired glass.</span>"
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
/obj/item/weapon/flame/candle/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
if(iswelder(W))
|
||||
if(W.iswelder())
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.isOn()) //Badasses dont get blinded by lighting their candle with a welding tool
|
||||
light("<span class='notice'>\The [user] casually lights the [name] with [W].</span>")
|
||||
|
||||
@@ -17,16 +17,17 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
var/lit = 0
|
||||
|
||||
/proc/isflamesource(A)
|
||||
if(iswelder(A))
|
||||
var/obj/item/I = A
|
||||
if(I.iswelder())
|
||||
var/obj/item/weapon/weldingtool/WT = A
|
||||
return (WT.isOn())
|
||||
else if(istype(A, /obj/item/weapon/flame))
|
||||
var/obj/item/weapon/flame/F = A
|
||||
else if(istype(I, /obj/item/weapon/flame))
|
||||
var/obj/item/weapon/flame/F = I
|
||||
return (F.lit)
|
||||
else if(istype(A, /obj/item/device/assembly/igniter))
|
||||
else if(istype(I, /obj/item/device/assembly/igniter))
|
||||
return 1
|
||||
else if(istype(A, /obj/item/clothing/gloves/fluff/lunea_gloves))
|
||||
var/obj/item/clothing/gloves/fluff/lunea_gloves/F = A
|
||||
else if(istype(I, /obj/item/clothing/gloves/fluff/lunea_gloves))
|
||||
var/obj/item/clothing/gloves/fluff/lunea_gloves/F = I
|
||||
return (F.lit)
|
||||
return 0
|
||||
|
||||
@@ -195,7 +196,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
text = zippomes
|
||||
else if(istype(W, /obj/item/weapon/flame/lighter))
|
||||
text = lightermes
|
||||
else if(iswelder(W))
|
||||
else if(W.iswelder())
|
||||
text = weldermes
|
||||
else if(istype(W, /obj/item/device/assembly/igniter))
|
||||
text = ignitermes
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
user << "<span class='notice'>You [locked ? "" : "un"]lock the circuit controls.</span>"
|
||||
else
|
||||
user << "<span class='warning'>Access denied.</span>"
|
||||
else if(ismultitool(I))
|
||||
else if(I.ismultitool())
|
||||
if(locked)
|
||||
user << "<span class='warning'>Circuit controls are locked.</span>"
|
||||
return
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef T_BOARD
|
||||
#error T_BOARD macro is not defined but we need it!
|
||||
#error T_BOARD macro is not defined but we need it!
|
||||
#endif
|
||||
|
||||
/obj/item/weapon/circuitboard/rdconsole
|
||||
@@ -7,7 +7,7 @@
|
||||
build_path = /obj/machinery/computer/rdconsole/core
|
||||
|
||||
/obj/item/weapon/circuitboard/rdconsole/attackby(obj/item/I as obj, mob/user as mob)
|
||||
if(isscrewdriver(I))
|
||||
if(I.isscrewdriver())
|
||||
user.visible_message("<span class='notice'>\The [user] adjusts the jumper on \the [src]'s access protocol pins.</span>", "<span class='notice'>You adjust the jumper on the access protocol pins.</span>")
|
||||
if(src.build_path == /obj/machinery/computer/rdconsole/core)
|
||||
src.name = T_BOARD("RD Console - Robotics")
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
var/init_dirs = SOUTH
|
||||
|
||||
/obj/item/weapon/circuitboard/unary_atmos/attackby(obj/item/I as obj, mob/user as mob)
|
||||
if(isscrewdriver(I))
|
||||
if(I.isscrewdriver())
|
||||
machine_dir = turn(machine_dir, 90)
|
||||
init_dirs = machine_dir
|
||||
user.visible_message("<span class='notice'>\The [user] adjusts the jumper on the [src]'s port configuration pins.</span>", "<span class='notice'>You adjust the jumper on the port configuration pins. Now set to [dir2text(machine_dir)].</span>")
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
else
|
||||
user << "<span class='notice'>[src] already has a cell.</span>"
|
||||
|
||||
else if(isscrewdriver(W))
|
||||
else if(W.isscrewdriver())
|
||||
if(cell)
|
||||
cell.update_icon()
|
||||
cell.forceMove(get_turf(src.loc))
|
||||
|
||||
@@ -25,10 +25,10 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/plastique/attackby(var/obj/item/I, var/mob/user)
|
||||
if(isscrewdriver(I))
|
||||
if(I.isscrewdriver())
|
||||
open_panel = !open_panel
|
||||
user << "<span class='notice'>You [open_panel ? "open" : "close"] the wire panel.</span>"
|
||||
else if(iswirecutter(I) || ismultitool(I) || istype(I, /obj/item/device/assembly/signaler ))
|
||||
else if(I.iswirecutter() || I.ismultitool() || istype(I, /obj/item/device/assembly/signaler ))
|
||||
wires.Interact(user)
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
qdel(igniter)
|
||||
if(ptank)
|
||||
qdel(ptank)
|
||||
|
||||
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
|
||||
/obj/item/weapon/flamethrower/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(user.stat || user.restrained() || user.lying) return
|
||||
if(iswrench(W) && !status)//Taking this apart
|
||||
if(W.iswrench() && !status)//Taking this apart
|
||||
var/turf/T = get_turf(src)
|
||||
if(weldtool)
|
||||
weldtool.forceMove(T)
|
||||
@@ -86,7 +86,7 @@
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
if(isscrewdriver(W) && igniter && !lit)
|
||||
if(W.isscrewdriver() && igniter && !lit)
|
||||
status = !status
|
||||
user << "<span class='notice'>[igniter] is now [status ? "secured" : "unsecured"]!</span>"
|
||||
update_icon()
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
/obj/effect/spresent/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
|
||||
if (!iswirecutter(W))
|
||||
if (!W.iswirecutter())
|
||||
user << "<span class='warning'>I need wirecutters for that.</span>"
|
||||
return
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
icon_state = initial(icon_state) +"_ass"
|
||||
name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
|
||||
stage = 1
|
||||
else if(isscrewdriver(W) && path != 2)
|
||||
else if(W.isscrewdriver() && path != 2)
|
||||
if(stage == 1)
|
||||
path = 1
|
||||
if(beakers.len)
|
||||
|
||||
@@ -59,18 +59,8 @@
|
||||
var/obj/item/organ/eyes/E = H.get_eyes()
|
||||
if(!E)
|
||||
return
|
||||
H << span("alert", "Your eyes burn with the intense light of the flash!.")
|
||||
E.damage += rand(10, 11)
|
||||
if(E.damage > 12)
|
||||
M.eye_blurry += rand(3,6)
|
||||
if (E.damage >= E.min_broken_damage)
|
||||
M.sdisabilities |= BLIND
|
||||
else if (E.damage >= E.min_bruised_damage)
|
||||
M.eye_blind = 5
|
||||
M.eye_blurry = 5
|
||||
M.disabilities |= NEARSIGHTED
|
||||
spawn(100)
|
||||
M.disabilities &= ~NEARSIGHTED
|
||||
|
||||
E.flash_act()
|
||||
|
||||
//Now applying sound
|
||||
if((get_dist(M, T) <= 2 || src.loc == M.loc || src.loc == M))
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
thrown_force_divisor = 0.1
|
||||
|
||||
/obj/item/weapon/material/butterflyconstruction/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(isscrewdriver(W))
|
||||
if(W.isscrewdriver())
|
||||
user << "You finish the concealed blade weapon."
|
||||
new /obj/item/weapon/material/knife/butterfly(user.loc, material.name)
|
||||
qdel(src)
|
||||
@@ -59,7 +59,7 @@
|
||||
var/obj/item/weapon/material/tmp_shard = I
|
||||
finished = new /obj/item/weapon/material/twohanded/spear(get_turf(user), tmp_shard.material.name)
|
||||
user << "<span class='notice'>You fasten \the [I] to the top of the rod with the cable.</span>"
|
||||
else if(iswirecutter(I))
|
||||
else if(I.iswirecutter())
|
||||
finished = new /obj/item/weapon/melee/baton/cattleprod(get_turf(user))
|
||||
user << "<span class='notice'>You fasten the wirecutters to the top of the rod with the cable, prongs outward.</span>"
|
||||
if(finished)
|
||||
|
||||
@@ -84,30 +84,4 @@
|
||||
playsound(src, "shatter", 70, 1)
|
||||
if(!consumed && drops_debris) material.place_shard(T)
|
||||
qdel(src)
|
||||
/*
|
||||
Commenting this out pending rebalancing of radiation based on small objects.
|
||||
/obj/item/weapon/material/process()
|
||||
if(!material.radioactivity)
|
||||
return
|
||||
for(var/mob/living/L in range(1,src))
|
||||
L.apply_effect(round(material.radioactivity/30),IRRADIATE, blocked = L.getarmor(null, "rad"))
|
||||
*/
|
||||
|
||||
/*
|
||||
// Commenting this out while fires are so spectacularly lethal, as I can't seem to get this balanced appropriately.
|
||||
/obj/item/weapon/material/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
TemperatureAct(exposed_temperature)
|
||||
|
||||
// This might need adjustment. Will work that out later.
|
||||
/obj/item/weapon/material/proc/TemperatureAct(temperature)
|
||||
health -= material.combustion_effect(get_turf(src), temperature, 0.1)
|
||||
check_health(1)
|
||||
|
||||
/obj/item/weapon/material/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(iswelder(W))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(material.ignition_point && WT.remove_fuel(0, user))
|
||||
TemperatureAct(150)
|
||||
else
|
||||
return ..()
|
||||
*/
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
alpha = 255
|
||||
|
||||
/obj/item/weapon/material/shard/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(iswelder(W) && material.shard_can_repair)
|
||||
if(W.iswelder() && material.shard_can_repair)
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0, user))
|
||||
material.place_sheet(user.loc)
|
||||
|
||||
@@ -40,12 +40,12 @@
|
||||
playsound(src.loc, "sparks", 50, 1)
|
||||
return
|
||||
|
||||
if (isscrewdriver(W))
|
||||
if (W.isscrewdriver())
|
||||
if (do_after(user, 20))
|
||||
src.open =! src.open
|
||||
user.show_message(text("<span class='notice'>You [] the service panel.</span>", (src.open ? "open" : "close")))
|
||||
return
|
||||
if ((ismultitool(W)) && (src.open == 1)&& (!src.l_hacking))
|
||||
if ((W.ismultitool()) && (src.open == 1)&& (!src.l_hacking))
|
||||
user.show_message("<span class='notice'>Now attempting to reset internal memory, please hold.</span>", 1)
|
||||
src.l_hacking = 1
|
||||
if (do_after(usr, 100))
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
else
|
||||
user << "<span class='notice'>[src] already has a cell.</span>"
|
||||
|
||||
else if(isscrewdriver(W))
|
||||
else if(W.isscrewdriver())
|
||||
if(bcell)
|
||||
bcell.update_icon()
|
||||
bcell.forceMove(get_turf(src))
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 150)
|
||||
attack_verb = list("bashed", "battered", "bludgeoned", "whacked")
|
||||
|
||||
/obj/item/weapon/wrench/iswrench()
|
||||
return TRUE
|
||||
|
||||
/*
|
||||
* Screwdriver
|
||||
@@ -50,6 +52,7 @@
|
||||
lock_picking_level = 5
|
||||
var/random_icon = TRUE
|
||||
|
||||
|
||||
/obj/item/weapon/screwdriver/Initialize()
|
||||
. = ..()
|
||||
if(!random_icon)
|
||||
@@ -90,6 +93,9 @@
|
||||
M = user
|
||||
return eyestab(M,user)
|
||||
|
||||
/obj/item/weapon/screwdriver/isscrewdriver()
|
||||
return TRUE
|
||||
|
||||
/*
|
||||
* Wirecutters
|
||||
*/
|
||||
@@ -129,6 +135,9 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/weapon/wirecutters/iswirecutter()
|
||||
return TRUE
|
||||
|
||||
/*
|
||||
* Welding Tool
|
||||
*/
|
||||
@@ -161,6 +170,8 @@
|
||||
var/status = 1 //Whether the welder is secured or unsecured (able to attach rods to it to make a flamethrower)
|
||||
var/max_fuel = 20 //The max amount of fuel the welder can hold
|
||||
|
||||
/obj/item/weapon/weldingtool/iswelder()
|
||||
return TRUE
|
||||
|
||||
/obj/item/weapon/weldingtool/largetank
|
||||
name = "industrial welding tool"
|
||||
@@ -225,7 +236,7 @@
|
||||
user << text("\icon[] [] contains []/[] units of fuel!", src, src.name, get_fuel(),src.max_fuel )
|
||||
|
||||
/obj/item/weapon/weldingtool/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(isscrewdriver(W))
|
||||
if(W.isscrewdriver())
|
||||
if (isrobot(loc))
|
||||
user << span("alert", "You cannot modify your own welder!")
|
||||
return
|
||||
@@ -289,7 +300,7 @@
|
||||
var/obj/item/organ/external/S = M:organs_by_name[target_zone]
|
||||
|
||||
if (!S) return
|
||||
if(!(S.status & ORGAN_ROBOT) || user.a_intent != I_HELP)
|
||||
if(!(S.status & ORGAN_ASSISTED) || user.a_intent != I_HELP)
|
||||
return ..()
|
||||
|
||||
if(M.isSynthetic() && M == user && !(M.get_species() == "Hunter-Killer"))
|
||||
@@ -527,6 +538,9 @@
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 50)
|
||||
attack_verb = list("attacked", "bashed", "battered", "bludgeoned", "whacked")
|
||||
|
||||
/obj/item/weapon/crowbar/iscrowbar()
|
||||
return TRUE
|
||||
|
||||
/obj/item/weapon/crowbar/red
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "red_crowbar"
|
||||
@@ -546,3 +560,59 @@
|
||||
origin_tech = list(TECH_MATERIAL = 1, TECH_ENGINEERING = 2)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 150)
|
||||
attack_verb = list("bashed", "battered", "bludgeoned", "whacked")
|
||||
|
||||
//combitool
|
||||
|
||||
/obj/item/combitool
|
||||
name = "combi-tool"
|
||||
desc = "It even has one of those nubbins for doing the thingy."
|
||||
icon = 'icons/obj/combitool.dmi'
|
||||
icon_state = "combitool"
|
||||
force = 3
|
||||
w_class = 2
|
||||
|
||||
var/list/tools = list(
|
||||
"crowbar",
|
||||
"screwdriver",
|
||||
"wrench",
|
||||
"wirecutters"
|
||||
)
|
||||
var/current_tool = 1
|
||||
|
||||
/obj/item/combitool/Initialize()
|
||||
desc = "[initial(desc)] ([tools.len]. [tools.len] possibilit[tools.len == 1 ? "y" : "ies"])"
|
||||
. = ..()
|
||||
|
||||
/obj/item/combitool/examine(var/mob/user)
|
||||
. = ..()
|
||||
if(. && tools.len)
|
||||
to_chat(user, "It has the following fittings:")
|
||||
for(var/tool in tools)
|
||||
to_chat(user, "- [tool][tools[current_tool] == tool ? " (selected)" : ""]")
|
||||
|
||||
/obj/item/combitool/iswrench()
|
||||
return tools[current_tool] == "wrench"
|
||||
|
||||
/obj/item/combitool/isscrewdriver()
|
||||
return tools[current_tool] == "screwdriver"
|
||||
|
||||
/obj/item/combitool/iswirecutter()
|
||||
return tools[current_tool] == "wirecutters"
|
||||
|
||||
/obj/item/combitool/iscrowbar()
|
||||
return tools[current_tool] == "crowbar"
|
||||
|
||||
/obj/item/combitool/proc/update_tool()
|
||||
icon_state = "[initial(icon_state)]-[tools[current_tool]]"
|
||||
|
||||
/obj/item/combitool/attack_self(var/mob/user)
|
||||
if(++current_tool > tools.len)
|
||||
current_tool = 1
|
||||
var/tool = tools[current_tool]
|
||||
if(!tool)
|
||||
to_chat(user, "You can't seem to find any fittings in \the [src].")
|
||||
else
|
||||
to_chat(user, "You switch \the [src] to the [tool] fitting.")
|
||||
update_tool()
|
||||
return 1
|
||||
|
||||
|
||||
@@ -373,7 +373,7 @@
|
||||
if(istype(W, /obj/item/weapon/reagent_containers) && contents.len)
|
||||
var/mob/living/L = pick(contents)
|
||||
W.afterattack(L, user, TRUE)
|
||||
else if(iswelder(W))
|
||||
else if(W.iswelder())
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
user.visible_message("<span class='notice'>[user] is trying to slice \the [src]!</span>",
|
||||
"You are trying to slice \the [src]!")
|
||||
@@ -388,7 +388,7 @@
|
||||
new /obj/item/stack/material/steel(src.loc, resources["metal"])
|
||||
qdel(src)
|
||||
|
||||
else if(istype(W, /obj/item/weapon/screwdriver))
|
||||
else if(W.isscrewdriver())
|
||||
var/turf/T = get_turf(src)
|
||||
if(!T)
|
||||
to_chat(user, "<span class='warning'>There is nothing to secure [src] to!</span>")
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
R.add_reagent("fuel", max_fuel)
|
||||
|
||||
/obj/item/weapon/weldpack/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(iswelder(W))
|
||||
if(W.iswelder())
|
||||
var/obj/item/weapon/weldingtool/T = W
|
||||
if(T.welding & prob(50))
|
||||
message_admins("[key_name_admin(user)] triggered a fueltank explosion.")
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
|
||||
var/damage = W.force / 4.0
|
||||
|
||||
if(iswelder(W))
|
||||
if(W.iswelder())
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
|
||||
if(WT.remove_fuel(0, user))
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
src.update_icon()
|
||||
|
||||
/obj/structure/banner/attackby(obj/item/W, mob/user)
|
||||
if(iswrench(W))
|
||||
if(W.iswrench())
|
||||
switch(anchored)
|
||||
if(0)
|
||||
anchored = 1
|
||||
|
||||
@@ -221,7 +221,7 @@
|
||||
return 0
|
||||
if(istype(W,/obj/item/tk_grab))
|
||||
return 0
|
||||
if(iswelder(W))
|
||||
if(W.iswelder())
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.isOn())
|
||||
user.visible_message(
|
||||
@@ -262,7 +262,7 @@
|
||||
user.drop_item()
|
||||
else if(istype(W, /obj/item/weapon/packageWrap))
|
||||
return
|
||||
else if(iswelder(W))
|
||||
else if(W.iswelder())
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.isOn())
|
||||
user.visible_message(
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
MouseDrop_T(G.affecting, user) //act like they were dragged onto the closet
|
||||
else
|
||||
to_chat(user, "<span class='notice'>The locker is too small to stuff [G.affecting] into!</span>")
|
||||
if(iswelder(W))
|
||||
if(W.iswelder())
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.isOn())
|
||||
user.visible_message(
|
||||
@@ -108,7 +108,7 @@
|
||||
user.drop_from_inventory(W,loc)
|
||||
else
|
||||
user.drop_item()
|
||||
else if(isscrewdriver(W) && canbemoved)
|
||||
else if(W.isscrewdriver() && canbemoved)
|
||||
if(screwed)
|
||||
to_chat(user, "<span class='notice'>You start to unscrew the locker from the floor...</span>")
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
@@ -123,7 +123,7 @@
|
||||
to_chat(user, "<span class='notice'>You screw the locker!</span>")
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
screwed = 1
|
||||
else if(iswrench(W) && canbemoved)
|
||||
else if(W.iswrench() && canbemoved)
|
||||
if(wrenched && !screwed)
|
||||
to_chat(user, "<span class='notice'>You start to unfasten the bolts holding the locker in place...</span>")
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
@@ -163,7 +163,7 @@
|
||||
spark(src, 5)
|
||||
playsound(loc, 'sound/weapons/blade1.ogg', 50, 1)
|
||||
playsound(loc, "sparks", 50, 1)
|
||||
else if(iswelder(W))
|
||||
else if(W.iswelder())
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.isOn())
|
||||
user.visible_message(
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
return ..()
|
||||
else if(istype(W, /obj/item/weapon/packageWrap))
|
||||
return
|
||||
else if(iscoil(W))
|
||||
else if(W.iscoil())
|
||||
var/obj/item/stack/cable_coil/C = W
|
||||
if(rigged)
|
||||
user << "<span class='notice'>[src] is already rigged!</span>"
|
||||
@@ -107,7 +107,7 @@
|
||||
user << "<span class='notice'>You attach [W] to [src].</span>"
|
||||
user.drop_from_inventory(W,src)
|
||||
return
|
||||
else if(iswirecutter(W))
|
||||
else if(W.iswirecutter())
|
||||
if(rigged)
|
||||
user << "<span class='notice'>You cut away the wiring.</span>"
|
||||
playsound(loc, 'sound/items/Wirecutter.ogg', 100, 1)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
return
|
||||
|
||||
/obj/structure/largecrate/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(iscrowbar(W))
|
||||
if(W.iscrowbar())
|
||||
new /obj/item/stack/material/wood(src)
|
||||
var/turf/T = get_turf(src)
|
||||
for(var/atom/movable/AM in contents)
|
||||
@@ -34,7 +34,7 @@
|
||||
icon_state = "mulecrate"
|
||||
|
||||
/obj/structure/largecrate/hoverpod/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(iscrowbar(W))
|
||||
if(W.iscrowbar())
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME
|
||||
var/obj/mecha/working/hoverpod/H = new (loc)
|
||||
|
||||
@@ -77,13 +77,13 @@
|
||||
name = "chicken crate"
|
||||
held_count = 5
|
||||
held_type = /mob/living/simple_animal/chick
|
||||
|
||||
|
||||
/obj/structure/largecrate/animal/dog
|
||||
name = "dog carrier"
|
||||
held_type = /mob/living/simple_animal/hostile/commanded/dog
|
||||
|
||||
|
||||
/obj/structure/largecrate/animal/dog/amaskan
|
||||
held_type = /mob/living/simple_animal/hostile/commanded/dog/amaskan
|
||||
|
||||
|
||||
/obj/structure/largecrate/animal/dog/pug
|
||||
held_type = /mob/living/simple_animal/hostile/commanded/dog/pug
|
||||
|
||||
@@ -160,7 +160,7 @@
|
||||
created_name = t
|
||||
return
|
||||
|
||||
if(iswelder(W) && ( (istext(glass)) || (glass == 1) || (!anchored) ))
|
||||
if(W.iswelder() && ( (istext(glass)) || (glass == 1) || (!anchored) ))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if (WT.remove_fuel(0, user))
|
||||
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
|
||||
@@ -190,7 +190,7 @@
|
||||
user << "<span class='notice'>You need more welding fuel.</span>"
|
||||
return
|
||||
|
||||
else if(iswrench(W) && state == 0)
|
||||
else if(W.iswrench() && state == 0)
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
if(anchored)
|
||||
user.visible_message("[user] begins unsecuring the airlock assembly from the floor.", "You starts unsecuring the airlock assembly from the floor.")
|
||||
@@ -202,7 +202,7 @@
|
||||
user << "<span class='notice'>You [anchored? "un" : ""]secured the airlock assembly!</span>"
|
||||
anchored = !anchored
|
||||
|
||||
else if(iscoil(W) && state == 0 && anchored)
|
||||
else if(W.iscoil() && state == 0 && anchored)
|
||||
var/obj/item/stack/cable_coil/C = W
|
||||
if (C.get_amount() < 1)
|
||||
user << "<span class='warning'>You need one length of coil to wire the airlock assembly.</span>"
|
||||
@@ -213,7 +213,7 @@
|
||||
src.state = 1
|
||||
user << "<span class='notice'>You wire the airlock.</span>"
|
||||
|
||||
else if(iswirecutter(W) && state == 1 )
|
||||
else if(W.iswirecutter() && state == 1 )
|
||||
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
|
||||
user.visible_message("[user] cuts the wires from the airlock assembly.", "You start to cut the wires from airlock assembly.")
|
||||
|
||||
@@ -240,7 +240,7 @@
|
||||
else
|
||||
EL.inuse = 0
|
||||
|
||||
else if(iscrowbar(W) && state == 2 )
|
||||
else if(W.iscrowbar() && state == 2 )
|
||||
//This should never happen, but just in case I guess
|
||||
if (!electronics)
|
||||
user << "<span class='notice'>There was nothing to remove.</span>"
|
||||
@@ -283,7 +283,7 @@
|
||||
user << "<span class='notice'>You installed [material_display_name(material_name)] plating into the airlock assembly.</span>"
|
||||
glass = material_name
|
||||
|
||||
else if(isscrewdriver(W) && state == 2 )
|
||||
else if(W.isscrewdriver() && state == 2 )
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
user << "<span class='notice'>Now finishing the airlock.</span>"
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
|
||||
/obj/structure/fireaxecabinet/attackby(var/obj/item/O, var/mob/user)
|
||||
|
||||
if(ismultitool(O))
|
||||
if(O.ismultitool())
|
||||
toggle_lock(user)
|
||||
return
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
reinforce_girder()
|
||||
|
||||
/obj/structure/girder/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(iswrench(W) && state == 0)
|
||||
if(W.iswrench() && state == 0)
|
||||
if(anchored && !reinf_material)
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
user << "<span class='notice'>Now disassembling the girder...</span>"
|
||||
@@ -111,7 +111,7 @@
|
||||
user << "<span class='notice'>You drill through the girder!</span>"
|
||||
dismantle()
|
||||
|
||||
else if(isscrewdriver(W))
|
||||
else if(W.isscrewdriver())
|
||||
if(state == 2)
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
user << "<span class='notice'>Now unsecuring support struts...</span>"
|
||||
@@ -124,7 +124,7 @@
|
||||
reinforcing = !reinforcing
|
||||
user << "<span class='notice'>\The [src] can now be [reinforcing? "reinforced" : "constructed"]!</span>"
|
||||
|
||||
else if(iswirecutter(W) && state == 1)
|
||||
else if(W.iswirecutter() && state == 1)
|
||||
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
|
||||
user << "<span class='notice'>Now removing support struts...</span>"
|
||||
if(do_after(user,40))
|
||||
@@ -134,7 +134,7 @@
|
||||
reinf_material = null
|
||||
reset_girder()
|
||||
|
||||
else if(iscrowbar(W) && state == 0 && anchored)
|
||||
else if(W.iscrowbar() && state == 0 && anchored)
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
|
||||
user << "<span class='notice'>Now dislodging the girder...</span>"
|
||||
if(do_after(user, 40))
|
||||
@@ -272,7 +272,7 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/girder/cult/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(iswrench(W))
|
||||
if(W.iswrench())
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
user << "<span class='notice'>Now disassembling the girder...</span>"
|
||||
if(do_after(user,40))
|
||||
|
||||
@@ -93,12 +93,12 @@
|
||||
spawn(0) healthcheck() //spawn to make sure we return properly if the grille is deleted
|
||||
|
||||
/obj/structure/grille/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(iswirecutter(W))
|
||||
if(W.iswirecutter())
|
||||
if(!shock(user, 100))
|
||||
playsound(loc, 'sound/items/Wirecutter.ogg', 100, 1)
|
||||
new /obj/item/stack/rods(get_turf(src), destroyed ? 1 : 2)
|
||||
qdel(src)
|
||||
else if((isscrewdriver(W)) && (istype(loc, /turf/simulated) || anchored))
|
||||
else if((W.isscrewdriver()) && (istype(loc, /turf/simulated) || anchored))
|
||||
if(!shock(user, 90))
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
anchored = !anchored
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
//This return will prevent afterattack from executing if the object goes into the trashbag,
|
||||
//This prevents dumb stuff like splashing the cart with the contents of a container, after putting said container into trash
|
||||
|
||||
else if (!has_items && (iswrench(I) || iswelder(I) || istype(I, /obj/item/weapon/gun/energy/plasmacutter)))
|
||||
else if (!has_items && (I.iswrench() || I.iswelder() || istype(I, /obj/item/weapon/gun/energy/plasmacutter)))
|
||||
dismantle(user)
|
||||
return
|
||||
..()
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
var/turf/T = get_turf(src)
|
||||
T.attackby(C, user) //BubbleWrap - hand this off to the underlying turf instead
|
||||
return
|
||||
if (iswelder(C))
|
||||
if (C.iswelder())
|
||||
var/obj/item/weapon/weldingtool/WT = C
|
||||
if(WT.remove_fuel(0, user))
|
||||
user << "<span class='notice'>Slicing lattice joints ...</span>"
|
||||
@@ -73,7 +73,7 @@
|
||||
layer = 2.7 // Above wires.
|
||||
|
||||
/obj/structure/lattice/catwalk/attackby(obj/item/C, mob/user)
|
||||
if (iswelder(C))
|
||||
if (C.iswelder())
|
||||
var/obj/item/weapon/weldingtool/WT = C
|
||||
if (do_after(user, 5, act_target = src) && WT.remove_fuel(1, user))
|
||||
user << "<span class='notice'>You slice apart [src].</span>"
|
||||
@@ -82,7 +82,7 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/lattice/catwalk/indoor/attackby(obj/item/C, mob/user)
|
||||
if (isscrewdriver(C))
|
||||
if (C.isscrewdriver())
|
||||
anchored = !anchored
|
||||
user << "<span class='notice'>You [anchored ? "" : "un"]anchor [src].</span>"
|
||||
playsound(src, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
|
||||
@@ -414,7 +414,7 @@
|
||||
return
|
||||
|
||||
/obj/structure/device/piano/attackby(obj/item/O as obj, mob/user as mob)
|
||||
if (iswrench(O))
|
||||
if (O.iswrench())
|
||||
if (anchored)
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
user << "<span class='notice'>You begin to loosen \the [src]'s casters...</span>"
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
return
|
||||
|
||||
/obj/structure/sign/attackby(obj/item/tool as obj, mob/user as mob) //deconstruction
|
||||
if(isscrewdriver(tool) && !istype(src, /obj/structure/sign/double))
|
||||
if(tool.isscrewdriver() && !istype(src, /obj/structure/sign/double))
|
||||
user << "You unfasten the sign with your [tool]."
|
||||
unfasten()
|
||||
else ..()
|
||||
@@ -44,7 +44,7 @@
|
||||
var/sign_state = ""
|
||||
|
||||
/obj/item/sign/attackby(obj/item/tool as obj, mob/user as mob) //construction
|
||||
if(isscrewdriver(tool) && isturf(user.loc))
|
||||
if(tool.isscrewdriver() && isturf(user.loc))
|
||||
var/direction = input("In which direction?", "Select direction.") in list("North", "East", "South", "West", "Cancel")
|
||||
if(direction == "Cancel") return
|
||||
var/obj/structure/sign/S = new(user.loc)
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
return
|
||||
|
||||
/obj/structure/bed/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(iswrench(W))
|
||||
if(W.iswrench())
|
||||
if(can_dismantle)
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
dismantle()
|
||||
@@ -121,7 +121,7 @@
|
||||
add_padding(padding_type)
|
||||
return
|
||||
|
||||
else if (iswirecutter(W))
|
||||
else if (W.iswirecutter())
|
||||
if(!padding_material)
|
||||
user << "\The [src] has no padding to remove."
|
||||
return
|
||||
@@ -192,7 +192,7 @@
|
||||
return // Doesn't care about material or anything else.
|
||||
|
||||
/obj/structure/bed/roller/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(iswrench(W) || istype(W,/obj/item/stack) || iswirecutter(W))
|
||||
if(W.iswrench() || istype(W,/obj/item/stack) || W.iswirecutter())
|
||||
return
|
||||
else if(istype(W,/obj/item/roller_holder))
|
||||
if(buckled_mob)
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
return
|
||||
|
||||
/obj/structure/bed/chair/office/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/stack) || iswirecutter(W))
|
||||
if(istype(W,/obj/item/stack) || W.iswirecutter())
|
||||
return
|
||||
..()
|
||||
|
||||
@@ -201,7 +201,7 @@
|
||||
return
|
||||
|
||||
/obj/structure/bed/chair/wood/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/stack) || iswirecutter(W))
|
||||
if(istype(W,/obj/item/stack) || W.iswirecutter())
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/stool/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(iswrench(W))
|
||||
if(W.iswrench())
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
dismantle()
|
||||
qdel(src)
|
||||
@@ -141,7 +141,7 @@
|
||||
user << "You add padding to \the [src]."
|
||||
add_padding(padding_type)
|
||||
return
|
||||
else if (iswirecutter(W))
|
||||
else if (W.iswirecutter())
|
||||
if(!padding_material)
|
||||
user << "\The [src] has no padding to remove."
|
||||
return
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
buckled_mob.set_dir(dir)
|
||||
|
||||
/obj/structure/bed/chair/wheelchair/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(iswrench(W) || istype(W,/obj/item/stack) || iswirecutter(W))
|
||||
if(W.iswrench() || istype(W,/obj/item/stack) || W.iswirecutter())
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
user << "<span class='notice'>[src] is full.</span>"
|
||||
updateUsrDialog()
|
||||
return
|
||||
if(iswrench(I))
|
||||
if(I.iswrench())
|
||||
if(anchored)
|
||||
user << "<span class='notice'>You lean down and unwrench [src].</span>"
|
||||
anchored = 0
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
. = ..()
|
||||
|
||||
/obj/structure/bed/chair/e_chair/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(iswrench(W))
|
||||
if(W.iswrench())
|
||||
var/obj/structure/bed/chair/C = new /obj/structure/bed/chair(loc)
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
C.set_dir(dir)
|
||||
@@ -186,7 +186,7 @@
|
||||
START_PROCESSING(SSfast_process, src)
|
||||
|
||||
/obj/structure/metronome/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(iswrench(W))
|
||||
if(W.iswrench())
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(anchored)
|
||||
user << "<span class='notice'>You unanchor \the [src] and it destabilizes.</span>"
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
icon_state = "toilet[open][cistern]"
|
||||
|
||||
/obj/structure/toilet/attackby(obj/item/I as obj, mob/living/user as mob)
|
||||
if(iscrowbar(I))
|
||||
if(I.iscrowbar())
|
||||
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))
|
||||
@@ -169,7 +169,7 @@
|
||||
/obj/machinery/shower/attackby(obj/item/I as obj, mob/user as mob)
|
||||
if(I.type == /obj/item/device/analyzer)
|
||||
user << "<span class='notice'>The water temperature seems to be [watertemp].</span>"
|
||||
if(iswrench(I))
|
||||
if(I.iswrench())
|
||||
var/newtemp = input(user, "What setting would you like to set the temperature valve to?", "Water Temperature Valve") in temperature_settings
|
||||
user << "<span class='notice'>You begin to adjust the temperature valve with \the [I].</span>"
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
|
||||
@@ -69,7 +69,7 @@ obj/structure/windoor_assembly/Destroy()
|
||||
//I really should have spread this out across more states but thin little windoors are hard to sprite.
|
||||
switch(state)
|
||||
if("01")
|
||||
if(iswelder(W) && !anchored )
|
||||
if(W.iswelder() && !anchored )
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if (WT.remove_fuel(0,user))
|
||||
user.visible_message("[user] dissassembles the windoor assembly.", "You start to dissassemble the windoor assembly.")
|
||||
@@ -87,7 +87,7 @@ obj/structure/windoor_assembly/Destroy()
|
||||
return
|
||||
|
||||
//Wrenching an unsecure assembly anchors it in place. Step 4 complete
|
||||
if(iswrench(W) && !anchored)
|
||||
if(W.iswrench() && !anchored)
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
user.visible_message("[user] secures the windoor assembly to the floor.", "You start to secure the windoor assembly to the floor.")
|
||||
|
||||
@@ -101,7 +101,7 @@ obj/structure/windoor_assembly/Destroy()
|
||||
src.name = "Anchored Windoor Assembly"
|
||||
|
||||
//Unwrenching an unsecure assembly un-anchors it. Step 4 undone
|
||||
else if(iswrench(W) && anchored)
|
||||
else if(W.iswrench() && anchored)
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
user.visible_message("[user] unsecures the windoor assembly to the floor.", "You start to unsecure the windoor assembly to the floor.")
|
||||
|
||||
@@ -132,7 +132,7 @@ obj/structure/windoor_assembly/Destroy()
|
||||
src.name = "Secure Windoor Assembly"
|
||||
|
||||
//Adding cable to the assembly. Step 5 complete.
|
||||
else if(iscoil(W) && anchored)
|
||||
else if(W.iscoil() && anchored)
|
||||
user.visible_message("[user] wires the windoor assembly.", "You start to wire the windoor assembly.")
|
||||
|
||||
var/obj/item/stack/cable_coil/CC = W
|
||||
@@ -150,7 +150,7 @@ obj/structure/windoor_assembly/Destroy()
|
||||
if("02")
|
||||
|
||||
//Removing wire from the assembly. Step 5 undone.
|
||||
if(iswirecutter(W) && !src.electronics)
|
||||
if(W.iswirecutter() && !src.electronics)
|
||||
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
|
||||
user.visible_message("[user] cuts the wires from the airlock assembly.", "You start to cut the wires from airlock assembly.")
|
||||
|
||||
@@ -183,7 +183,7 @@ obj/structure/windoor_assembly/Destroy()
|
||||
EL.inuse = 0
|
||||
|
||||
//Screwdriver to remove airlock electronics. Step 6 undone.
|
||||
else if(isscrewdriver(W) && src.electronics)
|
||||
else if(W.isscrewdriver() && src.electronics)
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to uninstall electronics from the airlock assembly.")
|
||||
|
||||
@@ -199,7 +199,7 @@ obj/structure/windoor_assembly/Destroy()
|
||||
ae.forceMove(src.loc)
|
||||
|
||||
//Crowbar to complete the assembly, Step 7 complete.
|
||||
else if(iscrowbar(W))
|
||||
else if(W.iscrowbar())
|
||||
if(!src.electronics)
|
||||
usr << "<span class='warning'>The assembly is missing electronics.</span>"
|
||||
return
|
||||
|
||||
@@ -221,7 +221,7 @@
|
||||
|
||||
if(W.flags & NOBLUDGEON) return
|
||||
|
||||
if(isscrewdriver(W))
|
||||
if(W.isscrewdriver())
|
||||
if(reinf && state >= 1)
|
||||
state = 3 - state
|
||||
update_nearby_icons()
|
||||
@@ -237,11 +237,11 @@
|
||||
update_nearby_icons()
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 75, 1)
|
||||
user << (anchored ? "<span class='notice'>You have fastened the window to the floor.</span>" : "<span class='notice'>You have unfastened the window.</span>")
|
||||
else if(iscrowbar(W) && reinf && state <= 1)
|
||||
else if(W.iscrowbar() && reinf && state <= 1)
|
||||
state = 1 - state
|
||||
playsound(loc, 'sound/items/Crowbar.ogg', 75, 1)
|
||||
user << (state ? "<span class='notice'>You have pried the window into the frame.</span>" : "<span class='notice'>You have pried the window out of the frame.</span>")
|
||||
else if(iswrench(W) && !anchored && (!state || !reinf))
|
||||
else if(W.iswrench() && !anchored && (!state || !reinf))
|
||||
if(!glasstype)
|
||||
user << "<span class='notice'>You're not sure how to dismantle \the [src] properly.</span>"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user