Merge branch 'master' into feet

This commit is contained in:
CornMyCob
2020-06-25 13:53:54 +01:00
273 changed files with 2536 additions and 6004 deletions
+1
View File
@@ -98,6 +98,7 @@
pixel_x = rand(6,-6)
pixel_y = rand(6,-6)
START_PROCESSING(SSobj, src)
AddComponent(/datum/component/swarming)
/obj/structure/spider/spiderling/Destroy()
STOP_PROCESSING(SSobj, src)
@@ -131,7 +131,6 @@ GLOBAL_LIST_EMPTY(world_uplinks)
else
var/datum/uplink_item/UI = ItemsReference[href_list["buy_item"]]
return buy(UI, UI ? UI.reference : "")
return 0
/obj/item/uplink/proc/buy(var/datum/uplink_item/UI, var/reference)
if(!UI)
+1 -1
View File
@@ -118,7 +118,7 @@
/obj/item/mixing_bowl/Topic(href, href_list)
if(..())
return
if("dispose")
if(href_list["dispose"])
dispose()
return
+34 -99
View File
@@ -4,24 +4,23 @@
desc = "A shooting target."
icon = 'icons/obj/objects.dmi'
icon_state = "target_h"
density = 0
density = FALSE
var/hp = 1800
var/icon/virtualIcon
var/list/bulletholes = list()
/obj/item/target/Destroy()
cut_overlays()
// if a target is deleted and associated with a stake, force stake to forget
for(var/obj/structure/target_stake/T in view(3,src))
for(var/obj/structure/target_stake/T in view(3, src))
if(T.pinned_target == src)
T.pinned_target = null
T.density = 1
T.density = TRUE
break
return ..() // delete target
/obj/item/target/Move()
..()
// After target moves, check for nearby stakes. If associated, move to target
for(var/obj/structure/target_stake/M in view(3,src))
for(var/obj/structure/target_stake/M in view(3, src))
if(M.density == 0 && M.pinned_target == src)
M.loc = loc
@@ -33,12 +32,12 @@
/obj/item/target/welder_act(mob/user, obj/item/I)
. = TRUE
if(!use_tool(src, user, 0,, volume = I.tool_volume))
if(!use_tool(src, user, 0, volume = I.tool_volume))
return
overlays.Cut()
to_chat(usr, "You slice off [src]'s uneven chunks of aluminum and scorch marks.")
to_chat(user, "<span class='notice'>You slice off [src]'s uneven chunks of aluminium and scorch marks.</span>")
/obj/item/target/attack_hand(mob/user as mob)
/obj/item/target/attack_hand(mob/user)
// taking pinned targets off!
var/obj/structure/target_stake/stake
for(var/obj/structure/target_stake/T in view(3,src))
@@ -48,8 +47,8 @@
if(stake)
if(stake.pinned_target)
stake.density = 1
density = 0
stake.density = TRUE
density = FALSE
layer = OBJ_LAYER
loc = user.loc
@@ -77,101 +76,37 @@
desc = "A shooting target that looks like a xenomorphic alien."
hp = 2350 // alium onest too kinda
/obj/item/target/bullet_act(var/obj/item/projectile/Proj)
var/p_x = Proj.p_x + pick(0,0,0,0,0,-1,1) // really ugly way of coding "sometimes offset Proj.p_x!"
var/p_y = Proj.p_y + pick(0,0,0,0,0,-1,1)
var/decaltype = 1 // 1 - scorch, 2 - bullet
#define DECALTYPE_SCORCH 1
#define DECALTYPE_BULLET 2
if(istype(/obj/item/projectile/bullet, Proj))
decaltype = 2
/obj/item/target/bullet_act(obj/item/projectile/P)
var/p_x = P.p_x + pick(0,0,0,0,0,-1,1) // really ugly way of coding "sometimes offset P.p_x!"
var/p_y = P.p_y + pick(0,0,0,0,0,-1,1)
var/decaltype = DECALTYPE_SCORCH
if(istype(P, /obj/item/projectile/bullet))
decaltype = DECALTYPE_BULLET
virtualIcon = new(icon, icon_state)
if( virtualIcon.GetPixel(p_x, p_y) ) // if the located pixel isn't blank (null)
hp -= Proj.damage
var/icon/C = icon(icon, icon_state)
if(LAZYLEN(overlays) <= 35 && C.GetPixel(p_x, p_y)) // if the located pixel isn't blank (null)
hp -= P.damage
if(hp <= 0)
visible_message("<span class='warning'>[src] breaks into tiny pieces and collapses!</span>")
visible_message("<span class='danger'>[src] breaks into tiny pieces and collapses!</span>")
qdel(src)
// Create a temporary object to represent the damage
var/obj/bmark = new
bmark.pixel_x = p_x
bmark.pixel_y = p_y
bmark.icon = 'icons/effects/effects.dmi'
bmark.layer = 3.5
bmark.icon_state = "scorch"
if(decaltype == 1)
// Energy weapons are hot. they scorch!
// offset correction
bmark.pixel_x--
bmark.pixel_y--
if(Proj.damage >= 20 || istype(Proj, /obj/item/projectile/beam/practice))
bmark.icon_state = "scorch"
bmark.dir = pick(NORTH,SOUTH,EAST,WEST) // random scorch design
return
var/image/bullet_hole = image('icons/effects/effects.dmi', "scorch", OBJ_LAYER + 0.5)
bullet_hole.pixel_x = p_x - 1 //offset correction
bullet_hole.pixel_y = p_y - 1
if(decaltype == DECALTYPE_SCORCH)
if(P.damage >= 20 || istype(P, /obj/item/projectile/beam/practice))
bullet_hole.setDir(pick(NORTH,SOUTH,EAST,WEST))// random scorch design. light_scorch does not have different directions
else
bmark.icon_state = "light_scorch"
bullet_hole.icon_state = "light_scorch"
else
// Bullets are hard. They make dents!
bmark.icon_state = "dent"
if(Proj.damage >= 10 && bulletholes.len <= 35) // maximum of 35 bullet holes
if(decaltype == 2) // bullet
if(prob(Proj.damage+30)) // bullets make holes more commonly!
new/datum/bullethole(src, bmark.pixel_x, bmark.pixel_y) // create new bullet hole
else // Lasers!
if(prob(Proj.damage-10)) // lasers make holes less commonly
new/datum/bullethole(src, bmark.pixel_x, bmark.pixel_y) // create new bullet hole
// draw bullet holes
for(var/datum/bullethole/B in bulletholes)
virtualIcon.DrawBox(null, B.b1x1, B.b1y, B.b1x2, B.b1y) // horizontal line, left to right
virtualIcon.DrawBox(null, B.b2x, B.b2y1, B.b2x, B.b2y2) // vertical line, top to bottom
overlays += bmark // add the decal
icon = virtualIcon // apply bulletholes over decals
bullet_hole.icon_state = "dent"
add_overlay(bullet_hole)
return
return -1 // the bullet/projectile goes through the target! Ie, you missed
// Small memory holder entity for transparent bullet holes
/datum/bullethole
// First box
var/b1x1 = 0
var/b1x2 = 0
var/b1y = 0
// Second box
var/b2x = 0
var/b2y1 = 0
var/b2y2 = 0
/datum/bullethole/New(obj/item/target/Target, pixel_x = 0, pixel_y = 0)
if(!Target) return
// Randomize the first box
b1x1 = pixel_x - pick(1,1,1,1,2,2,3,3,4)
b1x2 = pixel_x + pick(1,1,1,1,2,2,3,3,4)
b1y = pixel_y
if(prob(35))
b1y += rand(-4,4)
// Randomize the second box
b2x = pixel_x
if(prob(35))
b2x += rand(-4,4)
b2y1 = pixel_y + pick(1,1,1,1,2,2,3,3,4)
b2y2 = pixel_y - pick(1,1,1,1,2,2,3,3,4)
Target.bulletholes.Add(src)
#undef DECALTYPE_SCORCH
#undef DECALTYPE_BULLET
+36 -10
View File
@@ -1023,6 +1023,18 @@ obj/item/toy/cards/deck/syndicate/black
name = "orange fox plushie"
icon_state = "orangefox"
/obj/item/toy/plushie/orange_fox/grump
name = "grumpy fox"
desc = "An ancient plushie that seems particularly grumpy."
/obj/item/toy/plushie/orange_fox/grump/ComponentInitialize()
. = ..()
var/static/list/grumps = list("Ahh, yes, you're so clever, var editing that.", "Really?", "If you make a runtime with var edits, it's your own damn fault.",
"Don't you dare post issues on the git when you don't even know how this works.", "Was that necessary?", "Ohhh, setting admin edited var must be your favorite pastime!",
"Oh, so you have time to var edit, but you don't have time to ban that greytider?", "Oh boy, is this another one of those 'events'?", "Seriously, just stop.", "You do realize this is incurring proc call overhead.",
"Congrats, you just left a reference with your dirty client and now that thing you edited will never garbage collect properly.", "Is it that time of day, again, for unecessary adminbus?")
AddComponent(/datum/component/edit_complainer, grumps)
/obj/item/toy/plushie/coffee_fox
name = "coffee fox plushie"
icon_state = "coffeefox"
@@ -1087,6 +1099,21 @@ obj/item/toy/cards/deck/syndicate/black
return
..()
/obj/item/toy/plushie/ipcplushie
name = "IPC plushie"
desc = "An adorable IPC plushie, straight from New Canaan. Arguably more durable than the real deal. Toaster functionality included."
icon_state = "plushie_ipc"
item_state = "plushie_ipc"
/obj/item/toy/plushie/ipcplushie/attackby(obj/item/B, mob/user, params)
if(istype(B, /obj/item/reagent_containers/food/snacks/breadslice))
new /obj/item/reagent_containers/food/snacks/toast(get_turf(loc))
to_chat(user, "<span class='notice'> You insert bread into the toaster. </span>")
playsound(loc, 'sound/machines/ding.ogg', 50, 1)
qdel(B)
else
return ..()
//New generation TG plushies
/obj/item/toy/plushie/lizardplushie
@@ -1117,15 +1144,15 @@ obj/item/toy/cards/deck/syndicate/black
* Foam Armblade
*/
/obj/item/toy/foamblade
name = "foam armblade"
desc = "it says \"Sternside Changs #1 fan\" on it. "
icon = 'icons/obj/toy.dmi'
icon_state = "foamblade"
item_state = "arm_blade"
attack_verb = list("pricked", "absorbed", "gored")
w_class = WEIGHT_CLASS_SMALL
resistance_flags = FLAMMABLE
/obj/item/toy/foamblade
name = "foam armblade"
desc = "it says \"Sternside Changs #1 fan\" on it. "
icon = 'icons/obj/toy.dmi'
icon_state = "foamblade"
item_state = "arm_blade"
attack_verb = list("pricked", "absorbed", "gored")
w_class = WEIGHT_CLASS_SMALL
resistance_flags = FLAMMABLE
/*
* Toy/fake flash
@@ -1220,7 +1247,6 @@ obj/item/toy/cards/deck/syndicate/black
spawn(20)
cooldown = FALSE
return
..()
/obj/item/toy/owl
name = "owl action figure"
+12 -13
View File
@@ -33,9 +33,11 @@
icon_state = "trashbag"
item_state = "trashbag"
w_class = WEIGHT_CLASS_TINY
w_class = WEIGHT_CLASS_BULKY
max_w_class = WEIGHT_CLASS_SMALL
slot_flags = null
storage_slots = 30
max_combined_w_class = 30
can_hold = list() // any
cant_hold = list(/obj/item/disk/nuclear)
@@ -45,18 +47,15 @@
return TOXLOSS
/obj/item/storage/bag/trash/update_icon()
if(contents.len == 0)
w_class = WEIGHT_CLASS_TINY
icon_state = "[initial(icon_state)]"
else if(contents.len < 12)
w_class = WEIGHT_CLASS_BULKY
icon_state = "[initial(icon_state)]1"
else if(contents.len < 21)
w_class = WEIGHT_CLASS_BULKY
icon_state = "[initial(icon_state)]2"
else
w_class = WEIGHT_CLASS_BULKY
icon_state = "[initial(icon_state)]3"
switch(contents.len)
if(20 to INFINITY)
icon_state = "[initial(icon_state)]3"
if(11 to 20)
icon_state = "[initial(icon_state)]2"
if(1 to 11)
icon_state = "[initial(icon_state)]1"
else
icon_state = "[initial(icon_state)]"
/obj/item/storage/bag/trash/cyborg
@@ -53,13 +53,8 @@ obj/item/tank/oxygen/empty/New()
/obj/item/tank/anesthetic/New()
..()
air_contents.oxygen = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
var/datum/gas/sleeping_agent/trace_gas = new()
trace_gas.moles = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
air_contents.trace_gases += trace_gas
air_contents.oxygen = (3 * ONE_ATMOSPHERE) * 70 / (R_IDEAL_GAS_EQUATION * T20C) * O2STANDARD
air_contents.sleeping_agent = (3 * ONE_ATMOSPHERE) * 70 / (R_IDEAL_GAS_EQUATION * T20C) * N2STANDARD
/*
* Air
@@ -115,7 +115,7 @@ Frequency:
to_chat(user, "<span class='notice'>\The [src] is malfunctioning.</span>")
return
var/list/L = list( )
for(var/obj/machinery/computer/teleporter/com in world)
for(var/obj/machinery/computer/teleporter/com in GLOB.machines)
if(com.target)
if(com.power_station && com.power_station.teleporter_hub && com.power_station.engaged)
L["[com.id] (Active)"] = com.target
-785
View File
@@ -1,785 +0,0 @@
#define HEALPERWELD 15
/* Tools!
* Note: Multitools are in devices
*
* Contains:
* Wrench
* Screwdriver
* Wirecutters
* Welding Tool
* Crowbar
* Revolver Conversion Kit
*/
//Wrench
/obj/item/wrench
name = "wrench"
desc = "A wrench with common uses. Can be found in your hand."
icon = 'icons/obj/tools.dmi'
icon_state = "wrench"
flags = CONDUCT
slot_flags = SLOT_BELT
force = 5
throwforce = 7
usesound = 'sound/items/ratchet.ogg'
w_class = WEIGHT_CLASS_SMALL
materials = list(MAT_METAL=150)
origin_tech = "materials=1;engineering=1"
attack_verb = list("bashed", "battered", "bludgeoned", "whacked")
toolspeed = 1
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30)
/obj/item/wrench/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is beating [user.p_them()]self to death with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
playsound(loc, 'sound/weapons/genhit.ogg', 50, 1, -1)
return BRUTELOSS
/obj/item/wrench/cyborg
name = "automatic wrench"
desc = "An advanced robotic wrench. Can be found in construction cyborgs."
toolspeed = 0.5
/obj/item/wrench/brass
name = "brass wrench"
desc = "A brass wrench. It's faintly warm to the touch."
icon_state = "wrench_brass"
toolspeed = 0.5
resistance_flags = FIRE_PROOF | ACID_PROOF
/obj/item/wrench/abductor
name = "alien wrench"
desc = "A polarized wrench. It causes anything placed between the jaws to turn."
icon = 'icons/obj/abductor.dmi'
icon_state = "wrench"
usesound = 'sound/effects/empulse.ogg'
toolspeed = 0.1
origin_tech = "materials=5;engineering=5;abductor=3"
/obj/item/wrench/power
name = "hand drill"
desc = "A simple powered drill with a bolt bit."
icon_state = "drill_bolt"
item_state = "drill"
usesound = 'sound/items/drill_use.ogg'
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25)
origin_tech = "materials=2;engineering=2" //done for balance reasons, making them high value for research, but harder to get
force = 8 //might or might not be too high, subject to change
throwforce = 8
attack_verb = list("drilled", "screwed", "jabbed")
toolspeed = 0.25
/obj/item/wrench/power/attack_self(mob/user)
playsound(get_turf(user),'sound/items/change_drill.ogg', 50, 1)
var/obj/item/wirecutters/power/s_drill = new /obj/item/screwdriver/power
to_chat(user, "<span class='notice'>You attach the screwdriver bit to [src].</span>")
qdel(src)
user.put_in_active_hand(s_drill)
/obj/item/wrench/power/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is pressing [src] against [user.p_their()] head! It looks like [user.p_theyre()] trying to commit suicide!")
return BRUTELOSS
/obj/item/wrench/medical
name = "medical wrench"
desc = "A medical wrench with common (medical?) uses. Can be found in your hand."
icon_state = "wrench_medical"
force = 2 //MEDICAL
throwforce = 4
origin_tech = "materials=1;engineering=1;biotech=3"
attack_verb = list("wrenched", "medicaled", "tapped", "jabbed", "whacked")
/obj/item/wrench/medical/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is praying to the medical wrench to take [user.p_their()] soul. It looks like [user.p_theyre()] trying to commit suicide!</span>")
// TODO Make them glow with the power of the M E D I C A L W R E N C H
// during their ascension
// Stun stops them from wandering off
user.Stun(5)
playsound(loc, 'sound/effects/pray.ogg', 50, 1, -1)
// Let the sound effect finish playing
sleep(20)
if(!user)
return
for(var/obj/item/W in user)
user.unEquip(W)
var/obj/item/wrench/medical/W = new /obj/item/wrench/medical(loc)
W.add_fingerprint(user)
W.desc += " For some reason, it reminds you of [user.name]."
if(!user)
return
user.dust()
return OBLITERATION
//Screwdriver
/obj/item/screwdriver
name = "screwdriver"
desc = "You can be totally screwy with this."
icon = 'icons/obj/tools.dmi'
icon_state = "screwdriver_map"
flags = CONDUCT
slot_flags = SLOT_BELT
force = 5
w_class = WEIGHT_CLASS_TINY
throwforce = 5
throw_speed = 3
throw_range = 5
materials = list(MAT_METAL=75)
attack_verb = list("stabbed")
hitsound = 'sound/weapons/bladeslice.ogg'
usesound = 'sound/items/screwdriver.ogg'
toolspeed = 1
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30)
var/random_color = TRUE //if the screwdriver uses random coloring
/obj/item/screwdriver/nuke
name = "screwdriver"
desc = "A screwdriver with an ultra thin tip."
icon_state = "screwdriver_nuke"
toolspeed = 0.5
/obj/item/screwdriver/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is stabbing [src] into [user.p_their()] [pick("temple", "heart")]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return BRUTELOSS
/obj/item/screwdriver/New(loc, var/param_color = null)
..()
if(random_color)
if(!param_color)
param_color = pick("red","blue","pink","brown","green","cyan","yellow")
icon_state = "screwdriver_[param_color]"
if (prob(75))
src.pixel_y = rand(0, 16)
/obj/item/screwdriver/attack(mob/living/carbon/M, mob/living/carbon/user)
if(!istype(M) || user.a_intent == INTENT_HELP)
return ..()
if(user.zone_selected != "eyes" && user.zone_selected != "head")
return ..()
if(HAS_TRAIT(user, TRAIT_PACIFISM))
to_chat(user, "<span class='warning'>You don't want to harm [M]!</span>")
return
if((CLUMSY in user.mutations) && prob(50))
M = user
return eyestab(M,user)
/obj/item/screwdriver/brass
name = "brass screwdriver"
desc = "A screwdriver made of brass. The handle feels freezing cold."
icon_state = "screwdriver_brass"
toolspeed = 0.5
random_color = FALSE
resistance_flags = FIRE_PROOF | ACID_PROOF
/obj/item/screwdriver/abductor
name = "alien screwdriver"
desc = "An ultrasonic screwdriver."
icon = 'icons/obj/abductor.dmi'
icon_state = "screwdriver"
usesound = 'sound/items/pshoom.ogg'
toolspeed = 0.1
random_color = FALSE
/obj/item/screwdriver/power
name = "hand drill"
desc = "A simple hand drill with a screwdriver bit attached."
icon_state = "drill_screw"
item_state = "drill"
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25)
origin_tech = "materials=2;engineering=2" //done for balance reasons, making them high value for research, but harder to get
force = 8 //might or might not be too high, subject to change
throwforce = 8
throw_speed = 2
throw_range = 3//it's heavier than a screw driver/wrench, so it does more damage, but can't be thrown as far
attack_verb = list("drilled", "screwed", "jabbed","whacked")
hitsound = 'sound/items/drill_hit.ogg'
usesound = 'sound/items/drill_use.ogg'
toolspeed = 0.25
random_color = FALSE
/obj/item/screwdriver/power/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is putting [src] to [user.p_their()] temple. It looks like [user.p_theyre()] trying to commit suicide!</span>")
return BRUTELOSS
/obj/item/screwdriver/power/attack_self(mob/user)
playsound(get_turf(user), 'sound/items/change_drill.ogg', 50, 1)
var/obj/item/wrench/power/b_drill = new /obj/item/wrench/power
to_chat(user, "<span class='notice'>You attach the bolt driver bit to [src].</span>")
qdel(src)
user.put_in_active_hand(b_drill)
/obj/item/screwdriver/cyborg
name = "powered screwdriver"
desc = "An electrical screwdriver, designed to be both precise and quick."
usesound = 'sound/items/drill_use.ogg'
toolspeed = 0.5
//Wirecutters
/obj/item/wirecutters
name = "wirecutters"
desc = "This cuts wires."
icon = 'icons/obj/tools.dmi'
icon_state = "cutters"
flags = CONDUCT
slot_flags = SLOT_BELT
force = 6
throw_speed = 3
throw_range = 7
w_class = WEIGHT_CLASS_SMALL
materials = list(MAT_METAL=80)
origin_tech = "materials=1;engineering=1"
attack_verb = list("pinched", "nipped")
hitsound = 'sound/items/wirecutter.ogg'
usesound = 'sound/items/wirecutter.ogg'
sharp = 1
toolspeed = 1
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30)
var/random_color = TRUE
/obj/item/wirecutters/New(loc, param_color = null)
..()
if(random_color)
if(!param_color)
param_color = pick("yellow", "red")
icon_state = "cutters_[param_color]"
/obj/item/wirecutters/attack(mob/living/carbon/C, mob/user)
if(istype(C) && C.handcuffed && istype(C.handcuffed, /obj/item/restraints/handcuffs/cable))
user.visible_message("<span class='notice'>[user] cuts [C]'s restraints with [src]!</span>")
QDEL_NULL(C.handcuffed)
if(C.buckled && C.buckled.buckle_requires_restraints)
C.buckled.unbuckle_mob(C)
C.update_handcuffed()
return
else
..()
/obj/item/wirecutters/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is cutting at [user.p_their()] arteries with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
playsound(loc, usesound, 50, 1, -1)
return BRUTELOSS
/obj/item/wirecutters/brass
name = "brass wirecutters"
desc = "A pair of wirecutters made of brass. The handle feels freezing cold to the touch."
icon_state = "cutters_brass"
toolspeed = 0.5
random_color = FALSE
resistance_flags = FIRE_PROOF | ACID_PROOF
/obj/item/wirecutters/abductor
name = "alien wirecutters"
desc = "Extremely sharp wirecutters, made out of a silvery-green metal."
icon = 'icons/obj/abductor.dmi'
icon_state = "cutters"
toolspeed = 0.1
origin_tech = "materials=5;engineering=4;abductor=3"
random_color = FALSE
/obj/item/wirecutters/cyborg
name = "wirecutters"
desc = "This cuts wires."
toolspeed = 0.5
/obj/item/wirecutters/power
name = "jaws of life"
desc = "A set of jaws of life, the magic of science has managed to fit it down into a device small enough to fit in a tool belt. It's fitted with a cutting head."
icon_state = "jaws_cutter"
item_state = "jawsoflife"
origin_tech = "materials=2;engineering=2"
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25)
usesound = 'sound/items/jaws_cut.ogg'
toolspeed = 0.25
random_color = FALSE
/obj/item/wirecutters/power/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is wrapping \the [src] around [user.p_their()] neck. It looks like [user.p_theyre()] trying to rip [user.p_their()] head off!</span>")
playsound(loc, 'sound/items/jaws_cut.ogg', 50, 1, -1)
if(ishuman(user))
var/mob/living/carbon/human/H = user
var/obj/item/organ/external/head/head = H.bodyparts_by_name["head"]
if(head)
head.droplimb(0, DROPLIMB_BLUNT, FALSE, TRUE)
playsound(loc,pick('sound/misc/desceration-01.ogg','sound/misc/desceration-02.ogg','sound/misc/desceration-01.ogg') ,50, 1, -1)
return BRUTELOSS
/obj/item/wirecutters/power/attack_self(mob/user)
playsound(get_turf(user), 'sound/items/change_jaws.ogg', 50, 1)
var/obj/item/crowbar/power/pryjaws = new /obj/item/crowbar/power
to_chat(user, "<span class='notice'>You attach the pry jaws to [src].</span>")
qdel(src)
user.put_in_active_hand(pryjaws)
//Welding Tool
/obj/item/weldingtool
name = "welding tool"
desc = "A standard edition welder provided by Nanotrasen."
icon = 'icons/obj/tools.dmi'
icon_state = "welder"
item_state = "welder"
flags = CONDUCT
slot_flags = SLOT_BELT
force = 3
throwforce = 5
throw_speed = 3
throw_range = 5
hitsound = "swing_hit"
usesound = 'sound/items/welder.ogg'
var/acti_sound = 'sound/items/welderactivate.ogg'
var/deac_sound = 'sound/items/welderdeactivate.ogg'
w_class = WEIGHT_CLASS_SMALL
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 30)
resistance_flags = FIRE_PROOF
materials = list(MAT_METAL=70, MAT_GLASS=30)
origin_tech = "engineering=1;plasmatech=1"
toolspeed = 1
var/welding = 0 //Whether or not the welding tool is off(0), on(1) or currently welding(2)
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
var/change_icons = 1
var/can_off_process = 0
var/light_intensity = 2 //how powerful the emitted light is when used.
var/nextrefueltick = 0
/obj/item/weldingtool/New()
..()
create_reagents(max_fuel)
reagents.add_reagent("fuel", max_fuel)
update_icon()
/obj/item/weldingtool/examine(mob/user)
. = ..()
if(get_dist(user, src) <= 0)
. += "It contains [get_fuel()] unit\s of fuel out of [max_fuel]."
/obj/item/weldingtool/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] welds [user.p_their()] every orifice closed! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return FIRELOSS
/obj/item/weldingtool/proc/update_torch()
overlays.Cut()
if(welding)
overlays += "[initial(icon_state)]-on"
item_state = "[initial(item_state)]1"
else
item_state = "[initial(item_state)]"
/obj/item/weldingtool/update_icon()
if(change_icons)
var/ratio = get_fuel() / max_fuel
ratio = Ceiling(ratio*4) * 25
if(ratio == 100)
icon_state = initial(icon_state)
else
icon_state = "[initial(icon_state)][ratio]"
update_torch()
..()
/obj/item/weldingtool/process()
switch(welding)
if(0)
force = 3
damtype = "brute"
update_icon()
if(!can_off_process)
STOP_PROCESSING(SSobj, src)
return
//Welders left on now use up fuel, but lets not have them run out quite that fast
if(1)
force = 15
damtype = "fire"
if(prob(5))
remove_fuel(1)
update_icon()
//This is to start fires. process() is only called if the welder is on.
var/turf/location = loc
if(ismob(location))
var/mob/M = location
if(M.l_hand == src || M.r_hand == src)
location = get_turf(M)
if(isturf(location))
location.hotspot_expose(700, 5)
/obj/item/weldingtool/attackby(obj/item/I, mob/user, params)
if(isscrewdriver(I))
flamethrower_screwdriver(I, user)
else if(istype(I, /obj/item/stack/rods))
flamethrower_rods(I, user)
else
..()
/obj/item/weldingtool/attack(mob/M, mob/user)
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/S = H.bodyparts_by_name[user.zone_selected]
if(!S)
return
if(!S.is_robotic() || user.a_intent != INTENT_HELP || S.open == 2)
return ..()
if(!isOn()) //why wasn't this being checked already?
to_chat(user, "<span class='warning'>Turn on [src] before attempting repairs!</span>")
return 1
if(S.brute_dam > ROBOLIMB_SELF_REPAIR_CAP)
to_chat(user, "<span class='danger'>The damage is far too severe to patch over externally.</span>")
return
if(!S.brute_dam)
to_chat(user, "<span class='notice'>Nothing to fix!</span>")
return
if(get_fuel() >= 1)
if(H == user)
if(!do_mob(user, H, 10))
return 1
if(!remove_fuel(1,null))
to_chat(user, "<span class='warning'>Need more welding fuel!</span>")
var/rembrute = HEALPERWELD
var/nrembrute = 0
var/childlist
if(!isnull(S.children))
childlist = S.children.Copy()
var/parenthealed = FALSE
while(rembrute > 0)
var/obj/item/organ/external/E
if(S.brute_dam)
E = S
else if(LAZYLEN(childlist))
E = pick_n_take(childlist)
if(!E.brute_dam || !E.is_robotic())
continue
else if(S.parent && !parenthealed)
E = S.parent
parenthealed = TRUE
if(!E.brute_dam || !E.is_robotic())
break
else
break
playsound(src.loc, usesound, 50, 1)
nrembrute = max(rembrute - E.brute_dam, 0)
E.heal_damage(rembrute,0,0,1)
rembrute = nrembrute
user.visible_message("<span class='alert'>\The [user] patches some dents on \the [M]'s [E.name] with \the [src].</span>")
if(H.bleed_rate && H.isSynthetic())
H.bleed_rate = 0
user.visible_message("<span class='alert'>\The [user] patches some leaks on [M] with \the [src].</span>")
return 1
else
return ..()
/obj/item/weldingtool/afterattack(atom/O, mob/user, proximity)
if(!proximity)
return
if(welding)
remove_fuel(1)
var/turf/location = get_turf(user)
location.hotspot_expose(700, 50, 1)
if(get_fuel() <= 0)
set_light(0)
if(isliving(O))
var/mob/living/L = O
if(L.IgniteMob())
message_admins("[key_name_admin(user)] set [key_name_admin(L)] on fire")
log_game("[key_name(user)] set [key_name(L)] on fire")
/obj/item/weldingtool/attack_self(mob/user)
switched_on(user)
if(welding)
set_light(light_intensity)
update_icon()
//Returns the amount of fuel in the welder
/obj/item/weldingtool/proc/get_fuel()
return reagents.get_reagent_amount("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 FALSE
if(get_fuel() >= amount)
reagents.remove_reagent("fuel", amount)
check_fuel()
if(M)
M.flash_eyes(light_intensity)
return TRUE
else
if(M)
to_chat(M, "<span class='notice'>You need more welding fuel to complete this task.</span>")
return FALSE
//Returns whether or not the welding tool is currently on.
/obj/item/weldingtool/proc/isOn()
return welding
//Turns off the welder if there is no more fuel (does this really need to be its own proc?)
/obj/item/weldingtool/proc/check_fuel(mob/user)
if(get_fuel() <= 0 && welding)
switched_on(user)
update_icon()
//mob icon update
if(ismob(loc))
var/mob/M = loc
M.update_inv_r_hand(0)
M.update_inv_l_hand(0)
return 0
return 1
//Switches the welder on
/obj/item/weldingtool/proc/switched_on(mob/user)
if(!status)
to_chat(user, "<span class='warning'>[src] can't be turned on while unsecured!</span>")
return
welding = !welding
if(welding)
if(get_fuel() >= 1)
to_chat(user, "<span class='notice'>You switch [src] on.</span>")
playsound(loc, acti_sound, 50, 1)
force = 15
damtype = "fire"
hitsound = 'sound/items/welder.ogg'
update_icon()
START_PROCESSING(SSobj, src)
else
to_chat(user, "<span class='warning'>You need more fuel!</span>")
switched_off(user)
else
if(user)
to_chat(user, "<span class='notice'>You switch [src] off.</span>")
playsound(loc, deac_sound, 50, 1)
switched_off(user)
//Switches the welder off
/obj/item/weldingtool/proc/switched_off(mob/user)
welding = 0
set_light(0)
force = 3
damtype = "brute"
hitsound = "swing_hit"
update_icon()
/obj/item/weldingtool/proc/flamethrower_screwdriver(obj/item/I, mob/user)
if(welding)
to_chat(user, "<span class='warning'>Turn it off first!</span>")
return
status = !status
if(status)
to_chat(user, "<span class='notice'>You resecure [src].</span>")
else
to_chat(user, "<span class='notice'>[src] can now be attached and modified.</span>")
add_fingerprint(user)
/obj/item/weldingtool/proc/flamethrower_rods(obj/item/I, mob/user)
if(!status)
var/obj/item/stack/rods/R = I
if(R.use(1))
var/obj/item/flamethrower/F = new /obj/item/flamethrower(user.loc)
if(!remove_item_from_storage(F))
user.unEquip(src)
loc = F
F.weldtool = src
add_fingerprint(user)
to_chat(user, "<span class='notice'>You add a rod to a welder, starting to build a flamethrower.</span>")
user.put_in_hands(F)
else
to_chat(user, "<span class='warning'>You need one rod to start building a flamethrower!</span>")
/obj/item/weldingtool/largetank
name = "Industrial Welding Tool"
desc = "A slightly larger welder with a larger tank."
icon_state = "indwelder"
max_fuel = 40
materials = list(MAT_METAL=70, MAT_GLASS=60)
origin_tech = "engineering=2;plasmatech=2"
/obj/item/weldingtool/largetank/cyborg
name = "integrated welding tool"
desc = "An advanced welder designed to be used in robotic systems."
toolspeed = 0.5
/obj/item/weldingtool/largetank/flamethrower_screwdriver()
return
/obj/item/weldingtool/mini
name = "emergency welding tool"
desc = "A miniature welder used during emergencies."
icon_state = "miniwelder"
max_fuel = 10
w_class = WEIGHT_CLASS_TINY
materials = list(MAT_METAL=30, MAT_GLASS=10)
change_icons = 0
/obj/item/weldingtool/mini/flamethrower_screwdriver()
return
/obj/item/weldingtool/abductor
name = "alien welding tool"
desc = "An alien welding tool. Whatever fuel it uses, it never runs out."
icon = 'icons/obj/abductor.dmi'
icon_state = "welder"
toolspeed = 0.1
light_intensity = 0
change_icons = 0
origin_tech = "plasmatech=5;engineering=5;abductor=3"
can_off_process = 1
/obj/item/weldingtool/abductor/process()
if(get_fuel() <= max_fuel)
reagents.add_reagent("fuel", 1)
..()
/obj/item/weldingtool/hugetank
name = "Upgraded Welding Tool"
desc = "An upgraded welder based off the industrial welder."
icon_state = "upindwelder"
item_state = "upindwelder"
max_fuel = 80
materials = list(MAT_METAL=70, MAT_GLASS=120)
origin_tech = "engineering=3;plasmatech=2"
/obj/item/weldingtool/experimental
name = "Experimental Welding Tool"
desc = "An experimental welder capable of self-fuel generation and less harmful to the eyes."
icon_state = "exwelder"
item_state = "exwelder"
max_fuel = 40
materials = list(MAT_METAL=70, MAT_GLASS=120)
origin_tech = "materials=4;engineering=4;bluespace=3;plasmatech=4"
change_icons = 0
can_off_process = 1
light_intensity = 1
toolspeed = 0.5
var/last_gen = 0
/obj/item/weldingtool/experimental/brass
name = "brass welding tool"
desc = "A brass welder that seems to constantly refuel itself. It is faintly warm to the touch."
icon_state = "brasswelder"
item_state = "brasswelder"
resistance_flags = FIRE_PROOF | ACID_PROOF
obj/item/weldingtool/experimental/process()
..()
if(get_fuel() < max_fuel && nextrefueltick < world.time)
nextrefueltick = world.time + 10
reagents.add_reagent("fuel", 1)
//Crowbar
/obj/item/crowbar
name = "pocket crowbar"
desc = "A small crowbar. This handy tool is useful for lots of things, such as prying floor tiles or opening unpowered doors."
icon = 'icons/obj/tools.dmi'
icon_state = "crowbar"
item_state = "crowbar"
usesound = 'sound/items/crowbar.ogg'
flags = CONDUCT
slot_flags = SLOT_BELT
force = 5
throwforce = 7
item_state = "crowbar"
w_class = WEIGHT_CLASS_SMALL
materials = list(MAT_METAL=50)
origin_tech = "engineering=1;combat=1"
attack_verb = list("attacked", "bashed", "battered", "bludgeoned", "whacked")
toolspeed = 1
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30)
/obj/item/crowbar/red
icon_state = "crowbar_red"
item_state = "crowbar_red"
force = 8
/obj/item/crowbar/brass
name = "brass crowbar"
desc = "A brass crowbar. It feels faintly warm to the touch."
icon_state = "crowbar_brass"
item_state = "crowbar_brass"
toolspeed = 0.5
resistance_flags = FIRE_PROOF | ACID_PROOF
/obj/item/crowbar/abductor
name = "alien crowbar"
desc = "A hard-light crowbar. It appears to pry by itself, without any effort required."
icon = 'icons/obj/abductor.dmi'
usesound = 'sound/weapons/sonic_jackhammer.ogg'
icon_state = "crowbar"
toolspeed = 0.1
origin_tech = "combat=4;engineering=4;abductor=3"
/obj/item/crowbar/large
name = "crowbar"
desc = "It's a big crowbar. It doesn't fit in your pockets, because its too big."
force = 12
w_class = WEIGHT_CLASS_NORMAL
throw_speed = 3
throw_range = 3
materials = list(MAT_METAL=70)
icon_state = "crowbar_large"
item_state = "crowbar_large"
toolspeed = 0.5
/obj/item/crowbar/cyborg
name = "hydraulic crowbar"
desc = "A hydraulic prying tool, compact but powerful. Designed to replace crowbar in construction cyborgs."
usesound = 'sound/items/jaws_pry.ogg'
force = 10
toolspeed = 0.5
/obj/item/crowbar/power
name = "jaws of life"
desc = "A set of jaws of life, the magic of science has managed to fit it down into a device small enough to fit in a tool belt. It's fitted with a prying head."
icon_state = "jaws_pry"
item_state = "jawsoflife"
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25)
origin_tech = "materials=2;engineering=2"
usesound = 'sound/items/jaws_pry.ogg'
force = 15
toolspeed = 0.25
var/airlock_open_time = 100 // Time required to open powered airlocks
/obj/item/crowbar/power/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is putting [user.p_their()] head in [src]. It looks like [user.p_theyre()] trying to commit suicide!</span>")
playsound(loc, 'sound/items/jaws_pry.ogg', 50, 1, -1)
return BRUTELOSS
/obj/item/crowbar/power/attack_self(mob/user)
playsound(get_turf(user), 'sound/items/change_jaws.ogg', 50, 1)
var/obj/item/wirecutters/power/cutjaws = new /obj/item/wirecutters/power
to_chat(user, "<span class='notice'>You attach the cutting jaws to [src].</span>")
qdel(src)
user.put_in_active_hand(cutjaws)
// Conversion kit
/obj/item/conversion_kit
name = "\improper Revolver Conversion Kit"
desc = "A professional conversion kit used to convert any knock off revolver into the real deal capable of shooting lethal .357 rounds without the possibility of catastrophic failure."
icon_state = "kit"
flags = CONDUCT
w_class = WEIGHT_CLASS_SMALL
origin_tech = "combat=2"
var/open = 0
/obj/item/conversion_kit/New()
..()
update_icon()
/obj/item/conversion_kit/update_icon()
icon_state = "[initial(icon_state)]_[open]"
/obj/item/conversion_kit/attack_self(mob/user)
open = !open
to_chat(user, "<span class='notice'>You [open ? "open" : "close"] the conversion kit.</span>")
update_icon()
-1
View File
@@ -141,7 +141,6 @@
return ..()
/obj/structure/alien/weeds/proc/Life()
set background = BACKGROUND_ENABLED
var/turf/U = get_turf(src)
if(istype(U, /turf/space))
@@ -154,7 +154,7 @@
if(!E.teleporting)
var/list/L = list()
var/list/areaindex = list()
for(var/obj/machinery/telepad_cargo/R in world)
for(var/obj/machinery/telepad_cargo/R in GLOB.machines)
if(R.stage == 0)
var/turf/T = get_turf(R)
var/tmpname = T.loc.name
@@ -89,7 +89,7 @@
if(!E.teleporting)
var/list/L = list()
var/list/areaindex = list()
for(var/obj/machinery/telepad_cargo/R in world)
for(var/obj/machinery/telepad_cargo/R in GLOB.machines)
if(R.stage == 0)
var/turf/T = get_turf(R)
var/tmpname = T.loc.name