Merge branch 'master' into cynosure_map

This commit is contained in:
atermonera
2022-01-25 20:17:56 -08:00
541 changed files with 3542 additions and 3828 deletions
+9 -14
View File
@@ -174,7 +174,7 @@
/obj/effect/alien/weeds/Initialize(var/mapload, var/node, var/newcolor)
. = ..()
if(isspace(loc))
if(isspace(loc) || (locate(/obj/effect/alien/weeds) in loc) != src)
return INITIALIZE_HINT_QDEL
linked_node = node
@@ -188,14 +188,11 @@
/obj/effect/alien/weeds/Destroy()
var/turf/T = get_turf(src)
// To not mess up the overlay updates.
loc = null
for (var/obj/effect/alien/weeds/W in range(1,T))
W.updateWeedOverlays()
linked_node = null
return ..()
. = ..()
if(T)
for (var/obj/effect/alien/weeds/W in range(1,T))
W.updateWeedOverlays()
/obj/effect/alien/weeds/node
icon_state = "weednode"
@@ -210,10 +207,10 @@
/obj/effect/alien/weeds/node/Initialize(var/mapload, var/node, var/newcolor)
. = ..()
for(var/obj/effect/alien/weeds/existing in loc)
if(existing == src)
continue
else
if(. != INITIALIZE_HINT_QDEL && !mapload)
for(var/obj/effect/alien/weeds/existing in loc)
if(existing == src)
continue
qdel(existing)
linked_node = src
@@ -256,8 +253,6 @@
for (var/obj/effect/alien/weeds/W in range(1,src))
W.updateWeedOverlays()
return
// NB: This is not actually called by a processing subsystem, it's called by the node processing
/obj/effect/alien/weeds/process()
set background = 1
+20 -20
View File
@@ -1,26 +1,26 @@
/////////////////////////////////////////////
// Chem smoke
/////////////////////////////////////////////
/obj/effect/effect/smoke/chem
/obj/effect/vfx/smoke/chem
icon = 'icons/effects/chemsmoke.dmi'
opacity = TRUE
time_to_live = 300
pass_flags = PASSTABLE | PASSGRILLE | PASSGLASS //PASSGLASS is fine here, it's just so the visual effect can "flow" around glass
/obj/effect/effect/smoke/chem/Initialize()
/obj/effect/vfx/smoke/chem/Initialize()
. = ..()
create_reagents(500)
return
/obj/effect/effect/smoke/chem/Destroy()
/obj/effect/vfx/smoke/chem/Destroy()
walk(src, 0) // Because we might have called walk_to, we must stop the walk loop or BYOND keeps an internal reference to us forever.
return ..()
/obj/effect/effect/smoke/chem/transparent
/obj/effect/vfx/smoke/chem/transparent
opacity = FALSE
/datum/effect/effect/system/smoke_spread/chem
smoke_type = /obj/effect/effect/smoke/chem
/datum/effect_system/smoke_spread/chem
smoke_type = /obj/effect/vfx/smoke/chem
var/obj/chemholder
var/range
var/list/targetTurfs
@@ -28,21 +28,21 @@
var/density
var/show_log = 1
/datum/effect/effect/system/smoke_spread/chem/spores
/datum/effect_system/smoke_spread/chem/spores
show_log = 0
var/datum/seed/seed
/datum/effect/effect/system/smoke_spread/chem/spores/New(_seed)
/datum/effect_system/smoke_spread/chem/spores/New(_seed)
seed = _seed
if(!istype(seed))
CRASH("Invalid seed datum passed! [seed] ([seed?.type])")
..()
/datum/effect/effect/system/smoke_spread/chem/blob
/datum/effect_system/smoke_spread/chem/blob
show_log = 0
smoke_type = /obj/effect/effect/smoke/chem/transparent
smoke_type = /obj/effect/vfx/smoke/chem/transparent
/datum/effect/effect/system/smoke_spread/chem/New()
/datum/effect_system/smoke_spread/chem/New()
..()
chemholder = new/obj()
chemholder.create_reagents(500)
@@ -51,7 +51,7 @@
// Calculates the max range smoke can travel, then gets all turfs in that view range.
// Culls the selected turfs to a (roughly) circle shape, then calls smokeFlow() to make
// sure the smoke can actually path to the turfs. This culls any turfs it can't reach.
/datum/effect/effect/system/smoke_spread/chem/set_up(var/datum/reagents/carry = null, n = 10, c = 0, loca, direct)
/datum/effect_system/smoke_spread/chem/set_up(var/datum/reagents/carry = null, n = 10, c = 0, loca, direct)
range = n * 0.3
cardinals = c
carry.trans_to_obj(chemholder, carry.total_volume, copy = 1)
@@ -102,7 +102,7 @@
// Applies reagents to walls that affect walls (only thermite and plant-b-gone at the moment).
// Also calculates target locations to spawn the visual smoke effect on, so the whole area
// is covered fairly evenly.
/datum/effect/effect/system/smoke_spread/chem/start()
/datum/effect_system/smoke_spread/chem/start()
if(!location)
return
@@ -112,7 +112,7 @@
for(var/turf/T in targetTurfs)
chemholder.reagents.touch_turf(T)
for(var/atom/A in T.contents)
if(istype(A, /obj/effect/effect/smoke/chem) || istype(A, /mob))
if(istype(A, /obj/effect/vfx/smoke/chem) || istype(A, /mob))
continue
else if(isobj(A) && !A.simulated)
chemholder.reagents.touch_obj(A)
@@ -156,9 +156,9 @@
// Randomizes and spawns the smoke effect.
// Also handles deleting the smoke once the effect is finished.
//------------------------------------------
/datum/effect/effect/system/smoke_spread/chem/proc/spawnSmoke(var/turf/T, var/icon/I, var/dist = 1, var/obj/effect/effect/smoke/chem/passed_smoke)
/datum/effect_system/smoke_spread/chem/proc/spawnSmoke(var/turf/T, var/icon/I, var/dist = 1, var/obj/effect/vfx/smoke/chem/passed_smoke)
var/obj/effect/effect/smoke/chem/smoke
var/obj/effect/vfx/smoke/chem/smoke
if(passed_smoke)
smoke = passed_smoke
else
@@ -180,12 +180,12 @@
fadeOut(smoke)
qdel(smoke)
/datum/effect/effect/system/smoke_spread/chem/spores/spawnSmoke(var/turf/T, var/icon/I, var/dist = 1)
var/obj/effect/effect/smoke/chem/spores = new /obj/effect/effect/smoke/chem(location)
/datum/effect_system/smoke_spread/chem/spores/spawnSmoke(var/turf/T, var/icon/I, var/dist = 1)
var/obj/effect/vfx/smoke/chem/spores = new /obj/effect/vfx/smoke/chem(location)
spores.name = "cloud of [seed.seed_name] [seed.seed_noun]"
..(T, I, dist, spores)
/datum/effect/effect/system/smoke_spread/chem/proc/fadeOut(var/atom/A, var/frames = 16) // Fades out the smoke smoothly using it's alpha variable.
/datum/effect_system/smoke_spread/chem/proc/fadeOut(var/atom/A, var/frames = 16) // Fades out the smoke smoothly using it's alpha variable.
if(A.alpha == 0) //Handle already transparent case
return
if(frames == 0)
@@ -197,7 +197,7 @@
return
/datum/effect/effect/system/smoke_spread/chem/proc/smokeFlow() // Smoke pathfinder. Uses a flood fill method based on zones to quickly check what turfs the smoke (airflow) can actually reach.
/datum/effect_system/smoke_spread/chem/proc/smokeFlow() // Smoke pathfinder. Uses a flood fill method based on zones to quickly check what turfs the smoke (airflow) can actually reach.
var/list/pending = new()
var/list/complete = new()
+15 -15
View File
@@ -2,7 +2,7 @@
// Similar to smoke, but spreads out more
// metal foams leave behind a foamed metal wall
/obj/effect/effect/foam
/obj/effect/vfx/foam
name = "foam"
icon_state = "foam"
opacity = 0
@@ -15,7 +15,7 @@
var/expand = 1
var/metal = 0
/obj/effect/effect/foam/Initialize(var/mapload, var/ismetal = 0)
/obj/effect/vfx/foam/Initialize(var/mapload, var/ismetal = 0)
. = ..()
icon_state = "[ismetal? "m" : ""]foam"
metal = ismetal
@@ -25,14 +25,14 @@
addtimer(CALLBACK(src, .proc/pre_harden), 12 SECONDS)
addtimer(CALLBACK(src, .proc/harden), 15 SECONDS)
/obj/effect/effect/foam/proc/post_spread()
/obj/effect/vfx/foam/proc/post_spread()
process()
checkReagents()
/obj/effect/effect/foam/proc/pre_harden()
/obj/effect/vfx/foam/proc/pre_harden()
STOP_PROCESSING(SSobj, src)
/obj/effect/effect/foam/proc/harden()
/obj/effect/vfx/foam/proc/harden()
if(metal)
var/obj/structure/foamedmetal/M = new(src.loc)
M.metal = metal
@@ -40,14 +40,14 @@
flick("[icon_state]-disolve", src)
QDEL_IN(src, 5)
/obj/effect/effect/foam/proc/checkReagents() // transfer any reagents to the floor
/obj/effect/vfx/foam/proc/checkReagents() // transfer any reagents to the floor
if(!metal && reagents)
var/turf/T = get_turf(src)
reagents.touch_turf(T)
for(var/obj/O in T)
reagents.touch_obj(O)
/obj/effect/effect/foam/process()
/obj/effect/vfx/foam/process()
if(--amount < 0)
return
@@ -59,7 +59,7 @@
if(!T.Enter(src))
continue
var/obj/effect/effect/foam/F = locate() in T
var/obj/effect/vfx/foam/F = locate() in T
if(F)
continue
@@ -71,14 +71,14 @@
for(var/datum/reagent/R in reagents.reagent_list)
F.reagents.add_reagent(R.id, 1, safety = 1) //added safety check since reagents in the foam have already had a chance to react
/obj/effect/effect/foam/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) // foam disolves when heated, except metal foams
/obj/effect/vfx/foam/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) // foam disolves when heated, except metal foams
if(!metal && prob(max(0, exposed_temperature - 475)))
flick("[icon_state]-disolve", src)
spawn(5)
qdel(src)
/obj/effect/effect/foam/Crossed(var/atom/movable/AM)
/obj/effect/vfx/foam/Crossed(var/atom/movable/AM)
if(AM.is_incorporeal())
return
if(metal)
@@ -87,12 +87,12 @@
var/mob/living/M = AM
M.slip("the foam", 6)
/datum/effect/effect/system/foam_spread
/datum/effect_system/foam_spread
var/amount = 5 // the size of the foam spread.
var/list/carried_reagents // the IDs of reagents present when the foam was mixed
var/metal = 0 // 0 = foam, 1 = metalfoam, 2 = ironfoam
/datum/effect/effect/system/foam_spread/set_up(amt=5, loca, var/datum/reagents/carry = null, var/metalfoam = 0)
/datum/effect_system/foam_spread/set_up(amt=5, loca, var/datum/reagents/carry = null, var/metalfoam = 0)
amount = round(sqrt(amt / 3), 1)
if(istype(loca, /turf/))
location = loca
@@ -108,14 +108,14 @@
for(var/datum/reagent/R in carry.reagent_list)
carried_reagents += R.id
/datum/effect/effect/system/foam_spread/start()
/datum/effect_system/foam_spread/start()
spawn(0)
var/obj/effect/effect/foam/F = locate() in location
var/obj/effect/vfx/foam/F = locate() in location
if(F)
F.amount += amount
return
F = new /obj/effect/effect/foam(location, metal)
F = new /obj/effect/vfx/foam(location, metal)
F.amount = amount
if(!metal) // don't carry other chemicals if a metal foam
+7 -7
View File
@@ -1,18 +1,18 @@
/obj/effect/effect/water
/obj/effect/vfx/water
name = "water"
icon = 'icons/effects/effects.dmi'
icon_state = "extinguish"
mouse_opacity = 0
pass_flags = PASSTABLE | PASSGRILLE | PASSBLOB
/obj/effect/effect/water/Initialize()
/obj/effect/vfx/water/Initialize()
. = ..()
QDEL_IN(src, 15 SECONDS)
/obj/effect/effect/water/proc/set_color() // Call it after you move reagents to it
/obj/effect/vfx/water/proc/set_color() // Call it after you move reagents to it
icon += reagents.get_color()
/obj/effect/effect/water/proc/set_up(var/turf/target, var/step_count = 5, var/delay = 5)
/obj/effect/vfx/water/proc/set_up(var/turf/target, var/step_count = 5, var/delay = 5)
if(!target)
return
for(var/i = 1 to step_count)
@@ -37,18 +37,18 @@
sleep(10)
qdel(src)
/obj/effect/effect/water/Move(turf/newloc)
/obj/effect/vfx/water/Move(turf/newloc)
if(newloc.density)
return 0
. = ..()
/obj/effect/effect/water/Bump(atom/A)
/obj/effect/vfx/water/Bump(atom/A)
if(reagents)
reagents.touch(A)
return ..()
//Used by spraybottles.
/obj/effect/effect/water/chempuff
/obj/effect/vfx/water/chempuff
name = "chemicals"
icon = 'icons/obj/chempuff.dmi'
icon_state = ""
@@ -24,7 +24,7 @@
var/obj/effect/decal/cleanable/blood/oil/streak = new(src.loc)
streak.update_icon()
else if (prob(10))
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
s.set_up(3, 1, src)
s.start()
if (step_to(src, get_step(src, direction), 0))
@@ -164,7 +164,7 @@
return ..()
/obj/structure/sign/poster/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(W.is_wirecutter())
if(W.get_tool_quality(TOOL_WIRECUTTER))
playsound(src, W.usesound, 100, 1)
if(ruined)
to_chat(user, "<span class='notice'>You remove the remnants of the poster.</span>")
-575
View File
@@ -1,575 +0,0 @@
/* This is an attempt to make some easily reusable "particle" type effect, to stop the code
constantly having to be rewritten. An item like the jetpack that uses the ion_trail_follow system, just has one
defined, then set up when it is created with New(). Then this same system can just be reused each time
it needs to create more trails.A beaker could have a steam_trail_follow system set up, then the steam
would spawn and follow the beaker, even if it is carried or thrown.
*/
/obj/effect/effect
name = "effect"
icon = 'icons/effects/effects.dmi'
mouse_opacity = 0
unacidable = 1//So effect are not targeted by alien acid.
pass_flags = PASSTABLE | PASSGRILLE
/datum/effect/effect/system
var/number = 3
var/cardinals = 0
var/turf/location
var/atom/holder
var/setup = 0
/datum/effect/effect/system/proc/set_up(n = 3, c = 0, turf/loc)
if(n > 10)
n = 10
number = n
cardinals = c
location = loc
setup = 1
/datum/effect/effect/system/proc/attach(atom/atom)
holder = atom
/datum/effect/effect/system/proc/start()
/datum/effect/effect/system/Destroy()
holder = null
return ..()
/////////////////////////////////////////////
// GENERIC STEAM SPREAD SYSTEM
//Usage: set_up(number of bits of steam, use North/South/East/West only, spawn location)
// The attach(atom/atom) proc is optional, and can be called to attach the effect
// to something, like a smoking beaker, so then you can just call start() and the steam
// will always spawn at the items location, even if it's moved.
/* Example:
var/datum/effect/system/steam_spread/steam = new /datum/effect/system/steam_spread() -- creates new system
steam.set_up(5, 0, mob.loc) -- sets up variables
OPTIONAL: steam.attach(mob)
steam.start() -- spawns the effect
*/
/////////////////////////////////////////////
/obj/effect/effect/steam
name = "steam"
icon = 'icons/effects/effects.dmi'
icon_state = "extinguish"
density = 0
/datum/effect/effect/system/steam_spread/set_up(n = 3, c = 0, turf/loc)
if(n > 10)
n = 10
number = n
cardinals = c
location = loc
/datum/effect/effect/system/steam_spread/start()
var/i = 0
for(i=0, i<src.number, i++)
spawn(0)
if(holder)
src.location = get_turf(holder)
var/obj/effect/effect/steam/steam = new /obj/effect/effect/steam(src.location)
var/direction
if(src.cardinals)
direction = pick(cardinal)
else
direction = pick(alldirs)
for(i=0, i<pick(1,2,3), i++)
sleep(5)
step(steam,direction)
spawn(20)
qdel(steam)
/////////////////////////////////////////////
//SPARK SYSTEM (like steam system)
// The attach(atom/atom) proc is optional, and can be called to attach the effect
// to something, like the RCD, so then you can just call start() and the sparks
// will always spawn at the items location.
/////////////////////////////////////////////
/obj/effect/effect/sparks
name = "sparks"
icon_state = "sparks"
var/amount = 6.0
anchored = 1.0
mouse_opacity = 0
/obj/effect/effect/sparks/Initialize()
. = ..()
playsound(src, "sparks", 100, 1)
var/turf/T = src.loc
if (istype(T, /turf))
T.hotspot_expose(1000,100)
QDEL_IN(src, 5 SECONDS)
/obj/effect/effect/sparks/Destroy()
var/turf/T = src.loc
if (istype(T, /turf))
T.hotspot_expose(1000,100)
return ..()
/obj/effect/effect/sparks/Moved(atom/old_loc, direction, forced = FALSE)
. = ..()
if(isturf(loc))
var/turf/T = loc
T.hotspot_expose(1000,100)
/datum/effect/effect/system/spark_spread
var/total_sparks = 0 // To stop it being spammed and lagging!
/datum/effect/effect/system/spark_spread/set_up(n = 3, c = 0, loca)
if(n > 10)
n = 10
number = n
cardinals = c
if(istype(loca, /turf/))
location = loca
else
location = get_turf(loca)
/datum/effect/effect/system/spark_spread/start()
var/i = 0
for(i=0, i<src.number, i++)
if(src.total_sparks > 20)
return
spawn(0)
if(holder)
src.location = get_turf(holder)
var/obj/effect/effect/sparks/sparks = new /obj/effect/effect/sparks(src.location)
src.total_sparks++
var/direction
if(src.cardinals)
direction = pick(cardinal)
else
direction = pick(alldirs)
for(i=0, i<pick(1,2,3), i++)
sleep(5)
step(sparks,direction)
spawn(20)
src.total_sparks--
/////////////////////////////////////////////
//// SMOKE SYSTEMS
// direct can be optinally added when set_up, to make the smoke always travel in one direction
// in case you wanted a vent to always smoke north for example
/////////////////////////////////////////////
/obj/effect/effect/smoke
name = "smoke"
icon_state = "smoke"
opacity = 1
anchored = 0.0
mouse_opacity = 0
var/amount = 6.0
var/time_to_live = 100
//Remove this bit to use the old smoke
icon = 'icons/effects/96x96.dmi'
pixel_x = -32
pixel_y = -32
/obj/effect/effect/smoke/Initialize()
. = ..()
if(time_to_live)
spawn (time_to_live)
if(!QDELETED(src))
qdel(src)
/obj/effect/effect/smoke/Crossed(mob/living/carbon/M as mob )
if(M.is_incorporeal())
return
..()
if(istype(M))
affect(M)
/obj/effect/effect/smoke/proc/affect(var/mob/living/carbon/M)
if (!istype(M))
return 0
if(M.wear_mask && (M.wear_mask.item_flags & AIRTIGHT))
return 0
if(istype(M,/mob/living/carbon/human))
var/mob/living/carbon/human/H = M
if(H.head && (H.head.item_flags & AIRTIGHT))
return 0
return 1
/////////////////////////////////////////////
// Illumination
/////////////////////////////////////////////
/obj/effect/effect/smoke/illumination
name = "illumination"
opacity = 0
icon = 'icons/effects/effects.dmi'
icon_state = "sparks"
/obj/effect/effect/smoke/illumination/Initialize(var/ml, var/lifetime=10, var/range=null, var/power=null, var/color=null)
time_to_live=lifetime
. = ..()
set_light(range, power, color)
/////////////////////////////////////////////
// Bad smoke
/////////////////////////////////////////////
/obj/effect/effect/smoke/bad
time_to_live = 600
//var/list/projectiles
/obj/effect/effect/smoke/bad/Moved(atom/old_loc, direction, forced = FALSE)
. = ..()
for(var/mob/living/L in get_turf(src))
affect(L)
/obj/effect/effect/smoke/bad/affect(var/mob/living/L)
if (!..())
return 0
if(L.needs_to_breathe())
L.adjustOxyLoss(1)
if(prob(25))
L.emote("cough")
/obj/effect/effect/smoke/bad/noxious
opacity = 0
/obj/effect/effect/smoke/bad/noxious/affect(var/mob/living/L)
if (!..())
return 0
if(L.needs_to_breathe())
L.adjustToxLoss(1)
/* Not feasile until a later date
/obj/effect/effect/smoke/bad/Crossed(atom/movable/M as mob|obj)
..()
if(istype(M, /obj/item/projectile/beam))
var/obj/item/projectile/beam/B = M
if(!(B in projectiles))
B.damage = (B.damage/2)
projectiles += B
destroyed_event.register(B, src, /obj/effect/effect/smoke/bad/proc/on_projectile_delete)
to_world("Damage is: [B.damage]")
return 1
/obj/effect/effect/smoke/bad/proc/on_projectile_delete(obj/item/projectile/beam/proj)
projectiles -= proj
*/
// Burnt Food Smoke (Specialty for Cooking Failures)
/obj/effect/effect/smoke/bad/burntfood
color = "#000000"
time_to_live = 600
/obj/effect/effect/smoke/bad/burntfood/process()
for(var/mob/living/L in get_turf(src))
affect(L)
/obj/effect/effect/smoke/bad/burntfood/affect(var/mob/living/L) // This stuff is extra-vile.
if (!..())
return 0
if(L.needs_to_breathe())
L.emote("cough")
/////////////////////////////////////////////
// 'Elemental' smoke
/////////////////////////////////////////////
/obj/effect/effect/smoke/elemental
name = "cloud"
desc = "A cloud of some kind that seems really generic and boring."
opacity = FALSE
var/strength = 5 // How much damage to do inside each affect()
/obj/effect/effect/smoke/elemental/Initialize()
START_PROCESSING(SSobj, src)
return ..()
/obj/effect/effect/smoke/elemental/Destroy()
STOP_PROCESSING(SSobj, src)
return ..()
/obj/effect/effect/smoke/elemental/Moved(atom/old_loc, direction, forced = FALSE)
. = ..()
for(var/mob/living/L in range(1, src))
affect(L)
/obj/effect/effect/smoke/elemental/process()
for(var/mob/living/L in range(1, src))
affect(L)
/obj/effect/effect/smoke/elemental/fire
name = "burning cloud"
desc = "A cloud of something that is on fire."
color = "#FF9933"
light_color = "#FF0000"
light_range = 2
light_power = 5
/obj/effect/effect/smoke/elemental/fire/affect(mob/living/L)
L.inflict_heat_damage(strength)
L.add_modifier(/datum/modifier/fire, 6 SECONDS) // Around 15 damage per stack.
/obj/effect/effect/smoke/elemental/frost
name = "freezing cloud"
desc = "A cloud filled with brutally cold mist."
color = "#00CCFF"
/obj/effect/effect/smoke/elemental/frost/affect(mob/living/L)
L.inflict_cold_damage(strength)
/obj/effect/effect/smoke/elemental/shock
name = "charged cloud"
desc = "A cloud charged with electricity."
color = "#4D4D4D"
/obj/effect/effect/smoke/elemental/shock/affect(mob/living/L)
L.inflict_shock_damage(strength)
/obj/effect/effect/smoke/elemental/mist
name = "misty cloud"
desc = "A cloud filled with water vapor."
color = "#CCFFFF"
alpha = 128
strength = 1
/obj/effect/effect/smoke/elemental/mist/affect(mob/living/L)
L.water_act(strength)
/////////////////////////////////////////////
// Smoke spread
/////////////////////////////////////////////
/datum/effect/effect/system/smoke_spread
var/total_smoke = 0 // To stop it being spammed and lagging!
var/direction
var/smoke_type = /obj/effect/effect/smoke
/datum/effect/effect/system/smoke_spread/set_up(n = 5, c = 0, loca, direct)
if(n > 10)
n = 10
number = n
cardinals = c
if(istype(loca, /turf/))
location = loca
else
location = get_turf(loca)
if(direct)
direction = direct
/datum/effect/effect/system/smoke_spread/start(var/I)
var/i = 0
for(i=0, i<src.number, i++)
if(src.total_smoke > 20)
return
spawn(0)
if(holder)
src.location = get_turf(holder)
var/obj/effect/effect/smoke/smoke = new smoke_type(src.location)
src.total_smoke++
if(I)
smoke.color = I
var/direction = src.direction
if(!direction)
if(src.cardinals)
direction = pick(cardinal)
else
direction = pick(alldirs)
for(i=0, i<pick(0,1,1,1,2,2,2,3), i++)
sleep(10)
step(smoke,direction)
spawn(smoke.time_to_live*0.75+rand(10,30))
if (smoke) qdel(smoke)
src.total_smoke--
/datum/effect/effect/system/smoke_spread/bad
smoke_type = /obj/effect/effect/smoke/bad
/datum/effect/effect/system/smoke_spread/bad/burntfood
smoke_type = /obj/effect/effect/smoke/bad/burntfood
/datum/effect/effect/system/smoke_spread/noxious
smoke_type = /obj/effect/effect/smoke/bad/noxious
/datum/effect/effect/system/smoke_spread/fire
smoke_type = /obj/effect/effect/smoke/elemental/fire
/datum/effect/effect/system/smoke_spread/frost
smoke_type = /obj/effect/effect/smoke/elemental/frost
/datum/effect/effect/system/smoke_spread/shock
smoke_type = /obj/effect/effect/smoke/elemental/shock
/datum/effect/effect/system/smoke_spread/mist
smoke_type = /obj/effect/effect/smoke/elemental/mist
/////////////////////////////////////////////
//////// Attach an Ion trail to any object, that spawns when it moves (like for the jetpack)
/// just pass in the object to attach it to in set_up
/// Then do start() to start it and stop() to stop it, obviously
/// and don't call start() in a loop that will be repeated otherwise it'll get spammed!
/////////////////////////////////////////////
/obj/effect/effect/ion_trails
name = "ion trails"
icon_state = "ion_trails"
anchored = 1.0
/datum/effect/effect/system/ion_trail_follow
var/turf/oldposition
var/processing = 1
var/on = 1
/datum/effect/effect/system/ion_trail_follow/set_up(atom/atom)
attach(atom)
oldposition = get_turf(atom)
/datum/effect/effect/system/ion_trail_follow/start()
if(!src.on)
src.on = 1
src.processing = 1
if(src.processing)
src.processing = 0
spawn(0)
var/turf/T
if(istype(holder, /atom/movable))
var/atom/movable/AM = holder
if(AM.locs && AM.locs.len)
T = get_turf(pick(AM.locs))
else
T = get_turf(AM)
else //when would this ever be attached a non-atom/movable?
T = get_turf(src.holder)
if(T != src.oldposition)
if(isturf(T))
var/obj/effect/effect/ion_trails/I = new /obj/effect/effect/ion_trails(src.oldposition)
src.oldposition = T
I.set_dir(src.holder.dir)
flick("ion_fade", I)
I.icon_state = "blank"
spawn( 20 )
qdel(I)
spawn(2)
if(src.on)
src.processing = 1
src.start()
else
spawn(2)
if(src.on)
src.processing = 1
src.start()
/datum/effect/effect/system/ion_trail_follow/proc/stop()
src.processing = 0
src.on = 0
/////////////////////////////////////////////
//////// Attach a steam trail to an object (eg. a reacting beaker) that will follow it
// even if it's carried of thrown.
/////////////////////////////////////////////
/datum/effect/effect/system/steam_trail_follow
var/turf/oldposition
var/processing = 1
var/on = 1
/datum/effect/effect/system/steam_trail_follow/set_up(atom/atom)
attach(atom)
oldposition = get_turf(atom)
/datum/effect/effect/system/steam_trail_follow/start()
if(!src.on)
src.on = 1
src.processing = 1
if(src.processing)
src.processing = 0
spawn(0)
if(src.number < 3)
var/obj/effect/effect/steam/I = new /obj/effect/effect/steam(src.oldposition)
src.number++
src.oldposition = get_turf(holder)
I.set_dir(src.holder.dir)
spawn(10)
qdel(I)
src.number--
spawn(2)
if(src.on)
src.processing = 1
src.start()
else
spawn(2)
if(src.on)
src.processing = 1
src.start()
/datum/effect/effect/system/steam_trail_follow/proc/stop()
src.processing = 0
src.on = 0
/datum/effect/effect/system/reagents_explosion
var/amount // TNT equivalent
var/flashing = 0 // does explosion creates flash effect?
var/flashing_factor = 0 // factor of how powerful the flash effect relatively to the explosion
/datum/effect/effect/system/reagents_explosion/set_up(amt, loc, flash = 0, flash_fact = 0)
amount = amt
if(istype(loc, /turf/))
location = loc
else
location = get_turf(loc)
flashing = flash
flashing_factor = flash_fact
return
/datum/effect/effect/system/reagents_explosion/start()
if (amount <= 2)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread()
s.set_up(2, 1, location)
s.start()
for(var/mob/M in viewers(5, location))
to_chat(M, "<span class='warning'>The solution violently explodes.</span>")
for(var/mob/M in viewers(1, location))
if (prob (50 * amount))
to_chat(M, "<span class='warning'>The explosion knocks you down.</span>")
M.Weaken(rand(1,5))
return
else
var/devst = -1
var/heavy = -1
var/light = -1
var/flash = -1
// Clamp all values to fractions of max_explosion_range, following the same pattern as for tank transfer bombs
if (round(amount/12) > 0)
devst = devst + amount/12
if (round(amount/6) > 0)
heavy = heavy + amount/6
if (round(amount/3) > 0)
light = light + amount/3
if (flashing && flashing_factor)
flash = (amount/4) * flashing_factor
for(var/mob/M in viewers(8, location))
to_chat(M, "<span class='warning'>The solution violently explodes.</span>")
explosion(
location,
round(min(devst, BOMBCAP_DVSTN_RADIUS)),
round(min(heavy, BOMBCAP_HEAVY_RADIUS)),
round(min(light, BOMBCAP_LIGHT_RADIUS)),
round(min(flash, BOMBCAP_FLASH_RADIUS))
)
@@ -1,68 +0,0 @@
/obj/effect/expl_particles
name = "explosive particles"
icon = 'icons/effects/effects.dmi'
icon_state = "explosion_particle"
opacity = 1
anchored = 1
mouse_opacity = 0
/obj/effect/expl_particles/Initialize()
. = ..()
QDEL_IN(src, 15)
/datum/effect/system/expl_particles
var/number = 10
var/turf/location
var/total_particles = 0
/datum/effect/system/expl_particles/proc/set_up(n = 10, loca)
number = n
if(istype(loca, /turf/)) location = loca
else location = get_turf(loca)
/datum/effect/system/expl_particles/proc/start()
var/i = 0
for(i=0, i<src.number, i++)
spawn(0)
var/obj/effect/expl_particles/expl = new /obj/effect/expl_particles(src.location)
var/direct = pick(alldirs)
for(i=0, i<pick(1;25,2;50,3,4;200), i++)
sleep(1)
step(expl,direct)
/obj/effect/explosion
name = "explosive particles"
icon = 'icons/effects/96x96.dmi'
icon_state = "explosion"
opacity = 1
anchored = 1
mouse_opacity = 0
pixel_x = -32
pixel_y = -32
/obj/effect/explosion/Initialize()
. = ..()
QDEL_IN(src, 10)
/datum/effect/system/explosion
var/turf/location
/datum/effect/system/explosion/proc/set_up(loca)
if(istype(loca, /turf/)) location = loca
else location = get_turf(loca)
/datum/effect/system/explosion/proc/start()
new/obj/effect/explosion( location )
var/datum/effect/system/expl_particles/P = new/datum/effect/system/expl_particles()
P.set_up(10,location)
P.start()
spawn(5)
var/datum/effect/effect/system/smoke_spread/S = new/datum/effect/effect/system/smoke_spread()
S.set_up(5,0,location,null)
S.start()
/datum/effect/system/explosion/smokeless/start()
new/obj/effect/explosion(location)
var/datum/effect/system/expl_particles/P = new/datum/effect/system/expl_particles()
P.set_up(10,location)
P.start()
-55
View File
@@ -1,55 +0,0 @@
/proc/gibs(atom/location, var/datum/dna/MobDNA, gibber_type = /obj/effect/gibspawner/generic, var/fleshcolor, var/bloodcolor)
new gibber_type(location,MobDNA,fleshcolor,bloodcolor)
/obj/effect/gibspawner
var/sparks = 0 //whether sparks spread on Gib()
var/list/gibtypes = list()
var/list/gibamounts = list()
var/list/gibdirections = list() //of lists
var/fleshcolor //Used for gibbed humans.
var/bloodcolor //Used for gibbed humans.
/obj/effect/gibspawner/Initialize(var/ml, var/datum/dna/MobDNA, var/fleshcolor, var/bloodcolor)
. = ..()
if(fleshcolor)
src.fleshcolor = fleshcolor
if(bloodcolor)
src.bloodcolor = bloodcolor
Gib(loc,MobDNA)
return INITIALIZE_HINT_QDEL
/obj/effect/gibspawner/proc/Gib(atom/location, var/datum/dna/MobDNA = null)
if(gibtypes.len != gibamounts.len || gibamounts.len != gibdirections.len)
to_world("<span class='warning'>Gib list length mismatch!</span>")
return
var/obj/effect/decal/cleanable/blood/gibs/gib = null
if(sparks)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread()
s.set_up(2, 1, get_turf(location)) // Not sure if it's safe to pass an arbitrary object to set_up, todo
s.start()
for(var/i = 1, i<= gibtypes.len, i++)
if(gibamounts[i])
for(var/j = 1, j<= gibamounts[i], j++)
var/gibType = gibtypes[i]
gib = new gibType(location)
// Apply human species colouration to masks.
if(fleshcolor)
gib.fleshcolor = fleshcolor
if(bloodcolor)
gib.basecolor = bloodcolor
gib.update_icon()
gib.blood_DNA = list()
if(MobDNA)
gib.blood_DNA[MobDNA.unique_enzymes] = MobDNA.b_type
else if(istype(src, /obj/effect/gibspawner/human)) // Probably a monkey
gib.blood_DNA["Non-human DNA"] = "A+"
if(istype(location,/turf/))
var/list/directions = gibdirections[i]
if(directions.len)
gib.streak(directions)
-19
View File
@@ -1,19 +0,0 @@
/obj/effect/manifest
name = "manifest"
icon = 'icons/mob/screen1.dmi'
icon_state = "x"
unacidable = 1//Just to be sure.
/obj/effect/manifest/Initialize()
. = ..()
invisibility = 101
/obj/effect/manifest/proc/manifest()
var/dat = "<B>Crew Manifest</B>:<BR>"
for(var/mob/living/carbon/human/M in mob_list)
dat += text(" <B>[]</B> - []<BR>", M.name, M.get_assignment())
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( src.loc )
P.info = dat
P.name = "paper- 'Crew Manifest'"
//SN src = null
qdel(src)
@@ -1,6 +1,6 @@
// Creates effects like smoke clouds every so often.
/obj/effect/map_effect/interval/effect_emitter
var/datum/effect/effect/system/effect_system = null
var/datum/effect_system/effect_system = null
var/effect_system_type = null // Which effect system to attach.
var/effect_amount = 10 // How many effect objects to create on each interval. Note that there's a hard cap on certain effect_systems.
@@ -30,7 +30,7 @@
/obj/effect/map_effect/interval/effect_emitter/smoke
name = "smoke emitter"
icon_state = "smoke_emitter"
effect_system_type = /datum/effect/effect/system/smoke_spread
effect_system_type = /datum/effect_system/smoke_spread
interval_lower_bound = 1 SECOND
interval_upper_bound = 1 SECOND
@@ -38,30 +38,30 @@
/obj/effect/map_effect/interval/effect_emitter/smoke/bad
name = "bad smoke emitter"
effect_system_type = /datum/effect/effect/system/smoke_spread/bad
effect_system_type = /datum/effect_system/smoke_spread/bad
/obj/effect/map_effect/interval/effect_emitter/smoke/fire
name = "fire smoke emitter"
effect_system_type = /datum/effect/effect/system/smoke_spread/fire
effect_system_type = /datum/effect_system/smoke_spread/fire
/obj/effect/map_effect/interval/effect_emitter/smoke/frost
name = "frost smoke emitter"
effect_system_type = /datum/effect/effect/system/smoke_spread/frost
effect_system_type = /datum/effect_system/smoke_spread/frost
/obj/effect/map_effect/interval/effect_emitter/smoke/shock
name = "shock smoke emitter"
effect_system_type = /datum/effect/effect/system/smoke_spread/shock
effect_system_type = /datum/effect_system/smoke_spread/shock
/obj/effect/map_effect/interval/effect_emitter/smoke/mist
name = "mist smoke emitter"
effect_system_type = /datum/effect/effect/system/smoke_spread/mist
effect_system_type = /datum/effect_system/smoke_spread/mist
// Makes sparks.
/obj/effect/map_effect/interval/effect_emitter/sparks
name = "spark emitter"
icon_state = "spark_emitter"
effect_system_type = /datum/effect/effect/system/spark_spread
effect_system_type = /datum/effect_system/spark_spread
interval_lower_bound = 3 SECONDS
interval_upper_bound = 7 SECONDS
@@ -75,4 +75,4 @@
/obj/effect/map_effect/interval/effect_emitter/steam
name = "steam emitter"
icon_state = "smoke_emitter"
effect_system_type = /datum/effect/effect/system/steam_spread
effect_system_type = /datum/effect_system/steam_spread
+14 -15
View File
@@ -42,7 +42,7 @@
new_turf.register_dangerous_object(src)
/obj/effect/mine/proc/explode(var/mob/living/M)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread()
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread()
triggered = 1
s.set_up(3, 1, src)
s.start()
@@ -100,7 +100,7 @@
explode(M)
/obj/effect/mine/attackby(obj/item/W as obj, mob/living/user as mob)
if(W.is_screwdriver())
if(W.get_tool_quality(TOOL_SCREWDRIVER))
panel_open = !panel_open
user.visible_message("<span class='warning'>[user] very carefully screws the mine's panel [panel_open ? "open" : "closed"].</span>",
"<span class='notice'>You very carefully screw the mine's panel [panel_open ? "open" : "closed"].</span>")
@@ -109,16 +109,15 @@
// Panel open, stay uncloaked, or uncloak if already cloaked. If you don't cloak on place, ignore it and just be normal alpha.
alpha = camo_net ? (panel_open ? 255 : 50) : 255
else if((W.is_wirecutter() || istype(W, /obj/item/device/multitool)) && panel_open)
else if(panel_open && (W.get_tool_quality(TOOL_WIRECUTTER) || W.get_tool_quality(TOOL_MULTITOOL)))
interact(user)
else
..()
/obj/effect/mine/interact(mob/living/user as mob)
if(!panel_open || istype(user, /mob/living/silicon/ai))
return
user.set_machine(src)
wires.Interact(user)
if(panel_open && !istype(user, /mob/living/silicon/ai))
user.set_machine(src)
wires.Interact(user)
/obj/effect/mine/camo
camo_net = TRUE
@@ -127,7 +126,7 @@
mineitemtype = /obj/item/weapon/mine/dnascramble
/obj/effect/mine/dnascramble/explode(var/mob/living/M)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread()
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread()
triggered = 1
s.set_up(3, 1, src)
s.start()
@@ -145,7 +144,7 @@
/obj/effect/mine/stun/explode(var/mob/living/M)
triggered = 1
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread()
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread()
s.set_up(3, 1, src)
s.start()
if(istype(M))
@@ -184,7 +183,7 @@
mineitemtype = /obj/item/weapon/mine/kick
/obj/effect/mine/kick/explode(var/mob/living/M)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread()
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread()
triggered = 1
s.set_up(3, 1, src)
s.start()
@@ -205,7 +204,7 @@
var/spread_range = 7
/obj/effect/mine/frag/explode(var/mob/living/M)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread()
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread()
triggered = 1
s.set_up(3, 1, src)
s.start()
@@ -234,7 +233,7 @@
mineitemtype = /obj/item/weapon/mine/emp
/obj/effect/mine/emp/explode(var/mob/living/M)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread()
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread()
s.set_up(3, 1, src)
s.start()
visible_message("\The [src.name] flashes violently before disintegrating!")
@@ -250,7 +249,7 @@
/obj/effect/mine/incendiary/explode(var/mob/living/M)
triggered = 1
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread()
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread()
s.set_up(3, 1, src)
s.start()
if(istype(M))
@@ -264,7 +263,7 @@
mineitemtype = /obj/item/weapon/mine/gadget
/obj/effect/mine/gadget/explode(var/mob/living/M)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread()
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread()
triggered = 1
s.set_up(3, 1, src)
s.start()
@@ -308,7 +307,7 @@
return
/obj/item/weapon/mine/attackby(obj/item/W as obj, mob/living/user as mob)
if(W.is_screwdriver() && trap)
if(W.get_tool_quality(TOOL_SCREWDRIVER) && trap)
to_chat(user, "<span class='notice'>You begin removing \the [trap].</span>")
if(do_after(user, 10 SECONDS))
to_chat(user, "<span class='notice'>You finish disconnecting the mine's trigger.</span>")
@@ -27,7 +27,7 @@
/obj/effect/temporary_effect/eruption/testing/on_eruption(var/turf/Target)
if(Target)
new /obj/effect/explosion(Target)
new /obj/effect/vfx/explosion(Target)
return TRUE
/*
@@ -0,0 +1,80 @@
/proc/gibs(atom/location, var/datum/dna/MobDNA, gibber_type = /obj/effect/spawner/gibs/generic, var/fleshcolor, var/bloodcolor)
new gibber_type(location,MobDNA,fleshcolor,bloodcolor)
/obj/effect/spawner/gibs
var/sparks = 0 //whether sparks spread on Gib()
var/list/gibtypes = list()
var/list/gibamounts = list()
var/list/gibdirections = list() //of lists
var/fleshcolor //Used for gibbed humans.
var/bloodcolor //Used for gibbed humans.
/obj/effect/spawner/gibs/New(location, var/datum/dna/MobDNA, var/fleshcolor, var/bloodcolor)
..()
if(fleshcolor) src.fleshcolor = fleshcolor
if(bloodcolor) src.bloodcolor = bloodcolor
if(gibtypes.len != gibamounts.len || gibamounts.len != gibdirections.len)
to_world("<span class='warning'>Gib list length mismatch!</span>")
return
var/obj/effect/decal/cleanable/blood/gibs/gib = null
if(sparks)
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread()
s.set_up(2, 1, get_turf(loc)) // Not sure if it's safe to pass an arbitrary object to set_up, todo
s.start()
for(var/i = 1, i<= gibtypes.len, i++)
if(gibamounts[i])
for(var/j = 1, j<= gibamounts[i], j++)
var/gibType = gibtypes[i]
gib = new gibType(loc)
// Apply human species colouration to masks.
if(fleshcolor)
gib.fleshcolor = fleshcolor
if(bloodcolor)
gib.basecolor = bloodcolor
gib.update_icon()
gib.blood_DNA = list()
if(MobDNA)
gib.blood_DNA[MobDNA.unique_enzymes] = MobDNA.b_type
else if(istype(src, /obj/effect/spawner/gibs/human)) // Probably a monkey
gib.blood_DNA["Non-human DNA"] = "A+"
if(isturf(loc))
var/list/directions = gibdirections[i]
if(directions.len)
gib.streak(directions)
return INITIALIZE_HINT_QDEL
/obj/effect/spawner/gibs/generic
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs/core)
gibamounts = list(2,2,1)
/obj/effect/spawner/gibs/generic/New()
gibdirections = list(list(WEST, NORTHWEST, SOUTHWEST, NORTH),list(EAST, NORTHEAST, SOUTHEAST, SOUTH), list())
..()
/obj/effect/spawner/gibs/human
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs/down,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs/core)
gibamounts = list(1,1,1,1,1,1,1)
/obj/effect/spawner/gibs/human/New()
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs, list())
gibamounts[6] = pick(0,1,2)
..()
/obj/effect/spawner/gibs/robot
sparks = 1
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs/robot/up,/obj/effect/decal/cleanable/blood/gibs/robot/down,/obj/effect/decal/cleanable/blood/gibs/robot,/obj/effect/decal/cleanable/blood/gibs/robot,/obj/effect/decal/cleanable/blood/gibs/robot,/obj/effect/decal/cleanable/blood/gibs/robot/limb)
gibamounts = list(1,1,1,1,1,1)
/obj/effect/spawner/gibs/robot/New()
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs)
gibamounts[6] = pick(0,1,2)
..()
@@ -1,26 +0,0 @@
/obj/effect/gibspawner/generic
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs/core)
gibamounts = list(2,2,1)
/obj/effect/gibspawner/generic/Initialize()
gibdirections = list(list(WEST, NORTHWEST, SOUTHWEST, NORTH),list(EAST, NORTHEAST, SOUTHEAST, SOUTH), list())
. = ..()
/obj/effect/gibspawner/human
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs/down,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs/core)
gibamounts = list(1,1,1,1,1,1,1)
/obj/effect/gibspawner/human/Initialize()
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs, list())
gibamounts[6] = pick(0,1,2)
. = ..()
/obj/effect/gibspawner/robot
sparks = 1
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs/robot/up,/obj/effect/decal/cleanable/blood/gibs/robot/down,/obj/effect/decal/cleanable/blood/gibs/robot,/obj/effect/decal/cleanable/blood/gibs/robot,/obj/effect/decal/cleanable/blood/gibs/robot,/obj/effect/decal/cleanable/blood/gibs/robot/limb)
gibamounts = list(1,1,1,1,1,1)
/obj/effect/gibspawner/robot/Initialize()
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs)
gibamounts[6] = pick(0,1,2)
. = ..()
@@ -1,4 +1,4 @@
/obj/effect/graffitispawner
/obj/effect/spawner/graffiti
name = "old scrawling"
icon = 'icons/effects/map_effects.dmi'
icon_state = "graffiti"
@@ -8,7 +8,7 @@
// If the effect's color is not set, it will be chosen at random.
var/color_secondary // The hexcode for the desired secondary color of your graffiti. If blank, it will inherit this effect's color.
/obj/effect/graffitispawner/Initialize()
/obj/effect/spawner/graffiti/Initialize()
..()
if(!color)
+2 -2
View File
@@ -64,8 +64,8 @@
defer_powernet_rebuild = 1
if(heavy_impact_range > 1)
var/datum/effect/system/explosion/E = new/datum/effect/system/explosion()
E.set_up(epicenter)
var/datum/effect_system/explosion/E = new/datum/effect_system/explosion()
E.set_up(loc=epicenter)
E.start()
var/x0 = epicenter.x
-1
View File
@@ -86,7 +86,6 @@
// Works similarly to worn sprite_sheets, except the alternate sprites are used when the clothing/refit_for_species() proc is called.
var/list/sprite_sheets_obj = list()
var/toolspeed = 1 // This is a multipler on how 'fast' a tool works. e.g. setting this to 0.5 will make the tool work twice as fast.
var/attackspeed = DEFAULT_ATTACK_COOLDOWN // How long click delay will be when using this, in 1/10ths of a second. Checked in the user's get_attack_speed().
var/reach = 1 // Length of tiles it can reach, 1 is adjacent.
var/addblends // Icon overlay for ADD highlights when applicable.
+2 -2
View File
@@ -3,11 +3,11 @@
var/used = 0
var/ghost_query_type = null
var/searching = FALSE
var/datum/effect/effect/system/spark_spread/sparks
var/datum/effect_system/spark_spread/sparks
/obj/item/weapon/antag_spawner/Initialize()
. = ..()
sparks = new /datum/effect/effect/system/spark_spread()
sparks = new /datum/effect_system/spark_spread()
sparks.set_up(5, 0, src)
sparks.attach(loc)
+1 -1
View File
@@ -87,7 +87,7 @@
/obj/item/weapon/deskbell/attackby(obj/item/W, mob/user, params)
if(!istype(W))
return
if(W.is_wrench() && isturf(loc))
if(W.get_tool_quality(TOOL_WRENCH) && isturf(loc))
if(do_after(5))
if(!src) return
to_chat(user, "<span class='notice'>You dissasemble the desk bell</span>")
+2 -2
View File
@@ -48,7 +48,7 @@
src.name = "body bag"
//..() //Doesn't need to run the parent. Since when can fucking bodybags be welded shut? -Agouri
return
else if(W.is_wirecutter())
else if(W.get_tool_quality(TOOL_WIRECUTTER))
to_chat(user, "You cut the tag off the bodybag")
src.name = "body bag"
src.overlays.Cut()
@@ -246,7 +246,7 @@
inject_occupant(H)
break
else if(W.is_screwdriver())
else if(W.get_tool_quality(TOOL_SCREWDRIVER))
if(syringe)
if(used)
to_chat(user,"<span class='warning'>The injector cannot be removed now that the stasis bag has been used!</span>")
@@ -65,7 +65,7 @@
/obj/item/device/chameleon/proc/disrupt(var/delete_dummy = 1)
if(active_dummy)
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread
var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread
spark_system.set_up(5, 0, src)
spark_system.attach(src)
spark_system.start()
+1 -1
View File
@@ -97,7 +97,7 @@
to_chat(user, "<span class='notice'>You install a cell in \the [src].</span>")
update_icon()
else if(W.is_screwdriver())
else if(W.get_tool_quality(TOOL_SCREWDRIVER))
if(bcell)
bcell.update_icon()
bcell.forceMove(get_turf(src.loc))
+2 -2
View File
@@ -37,13 +37,13 @@
power_supply = new cell_type(src)
/obj/item/device/flash/attackby(var/obj/item/W, var/mob/user)
if(W.is_screwdriver() && broken)
if(W.get_tool_quality(TOOL_SCREWDRIVER) && broken)
if(repairing)
to_chat(user, "<span class='notice'>\The [src] is already being repaired!</span>")
return
user.visible_message("<span class='notice'>\The [user] starts trying to repair \the [src]'s bulb.</span>")
repairing = TRUE
if(do_after(user, (40 SECONDS + rand(0, 20 SECONDS)) * W.toolspeed) && can_repair)
if(do_after(user, (40 SECONDS + rand(0, 20 SECONDS)) * W.get_tool_speed(TOOL_SCREWDRIVER)) && can_repair)
if(prob(30))
user.visible_message("<span class='notice'>\The [user] successfully repairs \the [src]!</span>")
broken = FALSE
+1 -1
View File
@@ -24,7 +24,7 @@
return ..()
/obj/item/device/multitool/hacktool/attackby(var/obj/item/W, var/mob/user)
if(W.is_screwdriver())
if(W.get_tool_quality(TOOL_SCREWDRIVER))
in_hack_mode = !in_hack_mode
playsound(src, W.usesound, 50, 1)
else
@@ -54,7 +54,7 @@
else
to_chat(user, "<span class='notice'>[src] already has a diode.</span>")
else if(W.is_screwdriver())
else if(W.get_tool_quality(TOOL_SCREWDRIVER))
if(diode)
to_chat(user, "<span class='notice'>You remove the [diode.name] from the [src].</span>")
diode.loc = get_turf(src.loc)
+1 -1
View File
@@ -153,7 +153,7 @@
else
user.audible_message("<span class='critical'>*BZZZZzzzzzt*</span>")
if(prob(40) && insults <= 0)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
s.set_up(2, 1, get_turf(user))
s.start()
user.visible_message("<span class='warning'>\The [src] sparks violently!</span>")
+4 -9
View File
@@ -28,8 +28,7 @@
var/obj/machinery/clonepod/connecting //same for cryopod linkage
var/obj/machinery/connectable //Used to connect machinery.
var/weakref_wiring //Used to store weak references for integrated circuitry. This is now the Omnitool.
toolspeed = 1
tool_qualities = list(TOOL_MULTITOOL)
tool_qualities = list(TOOL_MULTITOOL = TOOL_QUALITY_STANDARD)
/obj/item/device/multitool/attack_self(mob/living/user)
var/choice = alert("What do you want to do with \the [src]?","Multitool Menu", "Switch Mode", "Clear Buffers", "Cancel")
@@ -63,16 +62,12 @@
to_chat(user,"<span class='notice'>\The [src] is now set to [toolmode].</span>")
accepting_refs = (toolmode == MULTITOOL_MODE_INTCIRCUITS)
return
/obj/item/device/multitool/is_multitool()
return TRUE
n
/obj/item/device/multitool/cyborg
name = "multitool"
desc = "Optimised and stripped-down version of a regular multitool."
toolspeed = 0.5
tool_qualities = list(TOOL_MULTITOOL = TOOL_QUALITY_DECENT)
@@ -94,5 +89,5 @@
catalogue_data = list(/datum/category_item/catalogue/anomalous/precursor_a/alien_multitool)
icon = 'icons/obj/abductor.dmi'
icon_state = "multitool"
toolspeed = 0.1
tool_qualities = list(TOOL_MULTITOOL = TOOL_QUALITY_BEST)
origin_tech = list(TECH_MAGNET = 5, TECH_ENGINEERING = 5)
+1 -1
View File
@@ -328,7 +328,7 @@ GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/device/paicard)
current_emotion = emotion
/obj/item/device/paicard/proc/alertUpdate()
var/turf/T = get_turf_or_move(src.loc)
var/turf/T = get_turf(src.loc)
for (var/mob/M in viewers(T))
M.show_message("<span class='notice'>\The [src] flashes a message across its screen, \"Additional personalities available for download.\"</span>", 3, "<span class='notice'>\The [src] bleeps electronically.</span>", 2)
+1 -1
View File
@@ -29,7 +29,7 @@
..()
/obj/item/device/powersink/attackby(var/obj/item/I, var/mob/user)
if(I.is_screwdriver())
if(I.get_tool_quality(TOOL_SCREWDRIVER))
if(mode == 0)
var/turf/T = loc
if(isturf(T) && !!T.is_plating())
@@ -96,7 +96,7 @@
if(M)
M.moved_recently = 0
to_chat(M, "<span class='danger'>You feel a sharp shock!</span>")
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
s.set_up(3, 1, M)
s.start()
@@ -334,33 +334,20 @@
return ..(freq, level, 1)
/obj/item/device/radio/headset/attackby(obj/item/weapon/W as obj, mob/user as mob)
// ..()
user.set_machine(src)
if(!(W.is_screwdriver() || istype(W, /obj/item/device/encryptionkey)))
return
if(W.is_screwdriver())
if(W.get_tool_quality(TOOL_SCREWDRIVER))
if(keyslot1 || keyslot2)
for(var/ch_name in channels)
radio_controller.remove_object(src, radiochannels[ch_name])
secure_radio_connections[ch_name] = null
if(keyslot1)
var/turf/T = get_turf(user)
if(T)
keyslot1.loc = T
keyslot1 = null
keyslot1.forceMove(get_turf(user))
keyslot1 = null
if(keyslot2)
var/turf/T = get_turf(user)
if(T)
keyslot2.loc = T
keyslot2 = null
keyslot2.forceMove(get_turf(user))
keyslot2 = null
recalculateChannels()
to_chat(user, "You pop out the encryption keys in the headset!")
@@ -368,26 +355,25 @@
else
to_chat(user, "This headset doesn't have any encryption keys! How useless...")
return TRUE
if(istype(W, /obj/item/device/encryptionkey/))
if(keyslot1 && keyslot2)
to_chat(user, "The headset can't hold another key!")
return
else if(istype(W, /obj/item/device/encryptionkey/))
if(!keyslot1)
user.drop_item()
W.loc = src
user.drop_from_inventory(W, src)
keyslot1 = W
else
user.drop_item()
W.loc = src
else if(!keyslot2)
user.drop_from_inventory(W, src)
keyslot2 = W
else
to_chat(user, "The headset can't hold another key!")
recalculateChannels()
return
return TRUE
return ..()
/obj/item/device/radio/headset/recalculateChannels(var/setDescription = 0)
@@ -123,12 +123,12 @@
/obj/item/device/radio/intercom/attackby(obj/item/W as obj, mob/user as mob)
add_fingerprint(user)
if(W.is_screwdriver()) // Opening the intercom up.
if(W.get_tool_quality(TOOL_SCREWDRIVER)) // Opening the intercom up.
wiresexposed = !wiresexposed
to_chat(user, "The wires have been [wiresexposed ? "exposed" : "unexposed"]")
playsound(src, W.usesound, 50, 1)
update_icon()
else if(wiresexposed && W.is_wirecutter())
else if(wiresexposed && W.get_tool_quality(TOOL_WIRECUTTER))
user.visible_message("<span class='warning'>[user] has cut the wires inside \the [src]!</span>", "You have cut the wires inside \the [src].")
playsound(src, W.usesound, 50, 1)
new/obj/item/stack/cable_coil(get_turf(src), 5)
+22 -33
View File
@@ -606,21 +606,18 @@ GLOBAL_DATUM(autospeaker, /mob/living/silicon/ai/announcer)
. += "<span class='notice'>\The [src] can not be modified or attached!</span>"
/obj/item/device/radio/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
user.set_machine(src)
if (!W.is_screwdriver())
return
b_stat = !( b_stat )
if(!istype(src, /obj/item/device/radio/beacon))
if (b_stat)
user.show_message("<span class='notice'>\The [src] can now be attached and modified!</span>")
else
user.show_message("<span class='notice'>\The [src] can no longer be modified or attached!</span>")
updateDialog()
//Foreach goto(83)
add_fingerprint(user)
return
else return
add_fingerprint(user)
if(W.get_tool_quality(TOOL_SCREWDRIVER))
b_stat = !b_stat
if(!istype(src, /obj/item/device/radio/beacon))
updateDialog()
if(b_stat)
to_chat(user, SPAN_NOTICE("\The [src] can now be attached and modified!"))
else
to_chat(user, SPAN_NOTICE("\The [src] can no longer be modified or attached!"))
return TRUE
return ..()
/obj/item/device/radio/emp_act(severity)
broadcasting = 0
@@ -658,25 +655,16 @@ GLOBAL_DATUM(autospeaker, /mob/living/silicon/ai/announcer)
R.cell_use_power(C.active_usage)
/obj/item/device/radio/borg/attackby(obj/item/weapon/W as obj, mob/user as mob)
// ..()
user.set_machine(src)
if (!(W.is_screwdriver() || istype(W, /obj/item/device/encryptionkey)))
return
if(W.is_screwdriver())
if(W.get_tool_quality(TOOL_SCREWDRIVER))
if(keyslot)
for(var/ch_name in channels)
radio_controller.remove_object(src, radiochannels[ch_name])
secure_radio_connections[ch_name] = null
if(keyslot)
var/turf/T = get_turf(user)
if(T)
keyslot.loc = T
keyslot = null
keyslot.forceMove(get_turf(user))
keyslot = null
recalculateChannels()
to_chat(user, "You pop out the encryption key in the radio!")
@@ -685,19 +673,20 @@ GLOBAL_DATUM(autospeaker, /mob/living/silicon/ai/announcer)
else
to_chat(user, "This radio doesn't have any encryption keys!")
if(istype(W, /obj/item/device/encryptionkey/))
return TRUE
else if(istype(W, /obj/item/device/encryptionkey/))
if(keyslot)
to_chat(user, "The radio can't hold another key!")
return
if(!keyslot)
user.drop_item()
W.loc = src
else
user.drop_from_inventory(W, src)
keyslot = W
recalculateChannels()
return TRUE
return
return ..()
/obj/item/device/radio/borg/recalculateChannels()
src.channels = list()
+2 -3
View File
@@ -32,13 +32,12 @@ HALOGEN COUNTER - Radcount on mobs
. = ..()
/obj/item/device/healthanalyzer/do_surgery(mob/living/M, mob/living/user)
if(user.a_intent != I_HELP) //in case it is ever used as a surgery tool
return ..()
scan_mob(M, user) //default surgery behaviour is just to scan as usual
return 1
return TRUE
/obj/item/device/healthanalyzer/attack(mob/living/M, mob/living/user)
scan_mob(M, user)
return TRUE
/obj/item/device/healthanalyzer/proc/scan_mob(mob/living/M, mob/living/user)
var/dat = ""
+1 -1
View File
@@ -110,7 +110,7 @@
else
to_chat(user, "Error: The device is linked to another monitor.")
else if(W.is_wrench() && user.a_intent != I_HURT)
else if(W.get_tool_quality(TOOL_WRENCH) && user.a_intent != I_HURT)
if(isturf(loc))
anchored = !anchored
@@ -144,7 +144,7 @@
to_chat(user, "<span class='notice'>You switch \the [src] [on ? "on" : "off"].</span>")
/obj/item/device/suit_cooling_unit/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (W.is_screwdriver())
if (W.get_tool_quality(TOOL_SCREWDRIVER))
if(cover_open)
cover_open = 0
to_chat(user, "You screw the panel into place.")
@@ -408,10 +408,10 @@
/obj/item/device/tape/attackby(obj/item/I, mob/user, params)
if(ruined && I.is_screwdriver())
if(ruined && I.get_tool_quality(TOOL_SCREWDRIVER))
to_chat(user, "<span class='notice'>You start winding the tape back in...</span>")
playsound(src, I.usesound, 50, 1)
if(do_after(user, 120 * I.toolspeed, target = src))
if(do_after(user, 120 * I.get_tool_speed(TOOL_SCREWDRIVER), target = src))
to_chat(user, "<span class='notice'>You wound the tape back in.</span>")
fix()
return
+2
View File
@@ -66,6 +66,8 @@
catalogue_data = list(/datum/category_item/catalogue/information/objects/oldreactor)
climbable = 0
door_anim_time = 0 //Unsupported
open_sound = 'sound/machines/door/hatchforced.ogg'
close_sound = 'sound/machines/door/hatchclose.ogg'
starts_with = list(
/obj/item/weapon/fuel_assembly/deuterium = 6)
+5 -5
View File
@@ -6,7 +6,7 @@
icon_state = "nanopaste"
origin_tech = list(TECH_MATERIAL = 4, TECH_ENGINEERING = 3)
amount = 10
toolspeed = 0.75 //Used in surgery, shouldn't be the same speed as a normal screwdriver on mechanical organ repair.
tool_qualities = list(TOOL_NANOPASTE = TOOL_QUALITY_STANDARD) //Used in surgery, shouldn't be the same speed as a normal screwdriver on mechanical organ repair.
w_class = ITEMSIZE_SMALL
no_variants = FALSE
@@ -16,7 +16,7 @@
if (istype(M,/mob/living/silicon/robot)) //Repairing cyborgs
var/mob/living/silicon/robot/R = M
if (R.getBruteLoss() || R.getFireLoss())
if(do_after(user,7 * toolspeed))
if(do_after(user,7 * get_tool_speed(TOOL_NANOPASTE)))
R.adjustBruteLoss(-15)
R.adjustFireLoss(-15)
R.updatehealth()
@@ -45,13 +45,13 @@
if (S && (S.robotic >= ORGAN_ROBOT))
if(!S.get_damage())
user << "<span class='notice'>Nothing to fix here.</span>"
to_chat(user, "<span class='notice'>Nothing to fix here.</span>")
else if(can_use(1))
user.setClickCooldown(user.get_attack_speed(src))
if(S.open >= 2)
if(do_after(user,5 * toolspeed))
if(do_after(user,5 * get_tool_speed(TOOL_NANOPASTE)))
S.heal_damage(20, 20, robo_repair = 1)
else if(do_after(user,5 * toolspeed))
else if(do_after(user,5 * get_tool_speed(TOOL_NANOPASTE)))
S.heal_damage(10,10, robo_repair =1)
H.updatehealth()
use(1)
+2 -2
View File
@@ -289,12 +289,12 @@
combat_health--
attacker.combat_health--
// This is sloppy but we don't have do_sparks.
var/datum/effect/effect/system/spark_spread/sparksrc = new(src)
var/datum/effect_system/spark_spread/sparksrc = new(src)
playsound(src, "sparks", 50, 1)
sparksrc.set_up(2, 0, src)
sparksrc.attach(src)
sparksrc.start()
var/datum/effect/effect/system/spark_spread/sparkatk = new(attacker)
var/datum/effect_system/spark_spread/sparkatk = new(attacker)
playsound(attacker, "sparks", 50, 1)
sparkatk.set_up(2, 0, attacker)
sparkatk.attach(attacker)
+4 -4
View File
@@ -246,7 +246,7 @@
/obj/item/toy/snappop/throw_impact(atom/hit_atom)
..()
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
s.set_up(3, 1, src)
s.start()
new /obj/effect/decal/cleanable/ash(src.loc)
@@ -262,7 +262,7 @@
if(M.m_intent == "run")
to_chat(M, "<span class='warning'>You step on the snap pop!</span>")
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
s.set_up(2, 0, src)
s.start()
new /obj/effect/decal/cleanable/ash(src.loc)
@@ -750,7 +750,7 @@
opened = FALSE
return
if(is_sharp(I) && !opened)
if(I.sharp && !opened)
to_chat(user, "You open a small incision in [src]. You can place tiny items inside.")
opened = TRUE
return
@@ -871,7 +871,7 @@
opened = FALSE
return
if(is_sharp(I) && !opened)
if(I.sharp && !opened)
to_chat(user, "You open a small incision in [src]. You can place tiny items inside.")
opened = TRUE
return
+3 -3
View File
@@ -19,7 +19,7 @@
var/power_per_process = 50 // About 6.5 minutes of use on a high-cell (10,000)
var/state = UAV_OFF
var/datum/effect/effect/system/ion_trail_follow/ion_trail
var/datum/effect_system/ion_trail_follow/ion_trail
var/list/mob/living/masters
@@ -47,7 +47,7 @@
if(!cell && cell_type)
cell = new cell_type
ion_trail = new /datum/effect/effect/system/ion_trail_follow()
ion_trail = new /datum/effect_system/ion_trail_follow()
ion_trail.set_up(src)
ion_trail.stop()
@@ -99,7 +99,7 @@
visible_message("<span class='notice'>[user] pairs [I] to [nickname]</span>")
toggle_pairing()
else if(I.is_screwdriver() && cell)
else if(I.get_tool_quality(TOOL_SCREWDRIVER) && cell)
if(do_after(user, 3 SECONDS, src))
to_chat(user, "<span class='notice'>You remove [cell] into [nickname].</span>")
playsound(src, I.usesound, 50, 1)
+3 -2
View File
@@ -16,7 +16,8 @@
origin_tech = list(TECH_ENGINEERING = 4, TECH_MATERIAL = 2)
matter = list(MAT_STEEL = 50000)
preserve_item = TRUE // RCDs are pretty important.
var/datum/effect/effect/system/spark_spread/spark_system
var/datum/effect_system/spark_spread/spark_system
var/toolspeed = 1
var/stored_matter = 0
var/max_stored_matter = RCD_MAX_CAPACITY
var/ranged = FALSE
@@ -31,7 +32,7 @@
var/make_rwalls = FALSE // If true, when building walls, they will be reinforced.
/obj/item/weapon/rcd/Initialize()
src.spark_system = new /datum/effect/effect/system/spark_spread
src.spark_system = new /datum/effect_system/spark_spread
spark_system.set_up(5, 0, src)
spark_system.attach(src)
return ..()
+2 -2
View File
@@ -24,7 +24,7 @@
throw_range = 5
w_class = ITEMSIZE_NORMAL
matter = list(MAT_STEEL = 50000, MAT_GLASS = 25000)
var/datum/effect/effect/system/spark_spread/spark_system
var/datum/effect_system/spark_spread/spark_system
var/p_dir = NORTH // Next pipe will be built with this dir
var/p_flipped = FALSE // If the next pipe should be built flipped
var/paint_color = "grey" // Pipe color index for next pipe painted/built.
@@ -45,7 +45,7 @@
/obj/item/weapon/pipe_dispenser/Initialize()
. = ..()
src.spark_system = new /datum/effect/effect/system/spark_spread
src.spark_system = new /datum/effect_system/spark_spread
spark_system.set_up(5, 0, src)
spark_system.attach(src)
tool = new /obj/item/weapon/tool/wrench/cyborg(src) // RPDs have wrenches inside of them, so that they can wrench down spawned pipes without being used as superior wrenches themselves.
@@ -32,6 +32,6 @@
force = 30
armor_penetration = 15
edge = 1
pry = 1
tool_qualities = list(TOOL_CROWBAR = TOOL_QUALITY_STANDARD)
defend_chance = 40
projectile_parry_chance = 20
@@ -172,13 +172,13 @@ CIGARETTE PACKETS ARE IN FANCY.DM
playsound(src, 'sound/items/cigs_lighters/cig_light.ogg', 75, 1, -1)
damtype = "fire"
if(reagents.get_reagent_amount("phoron")) // the phoron explodes when exposed to fire
var/datum/effect/effect/system/reagents_explosion/e = new()
var/datum/effect_system/reagents_explosion/e = new()
e.set_up(round(reagents.get_reagent_amount("phoron") / 2.5, 1), get_turf(src), 0, 0)
e.start()
qdel(src)
return
if(reagents.get_reagent_amount("fuel")) // the fuel explodes, too, but much less violently
var/datum/effect/effect/system/reagents_explosion/e = new()
var/datum/effect_system/reagents_explosion/e = new()
e.set_up(round(reagents.get_reagent_amount("fuel") / 5, 1), get_turf(src), 0, 0)
e.start()
qdel(src)
@@ -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(I.is_screwdriver())
if(I.get_tool_quality(TOOL_SCREWDRIVER))
playsound(src, I.usesound, 50, 1)
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(build_path == /obj/machinery/computer/rdconsole/core)
@@ -167,6 +167,7 @@
/obj/item/weapon/reagent_containers/glass/beaker/large = 1)
/obj/item/weapon/circuitboard/distiller
name = T_BOARD("distillery")
build_path = /obj/machinery/portable_atmospherics/powered/reagent_distillery
board_type = new /datum/frame/frame_types/reagent_distillery
req_components = list(
@@ -178,7 +179,7 @@
/obj/item/weapon/circuitboard/teleporter_hub
name = T_BOARD("teleporter hub")
build_path = /obj/machinery/teleport/hub
board_type = "teleporter_hub"
board_type = new /datum/frame/frame_types/teleporter_hub
// origin_tech = list(TECH_DATA = 2, TECH_BLUESPACE = 4)
req_components = list(
/obj/item/weapon/stock_parts/scanning_module = 4,
@@ -188,7 +189,7 @@
/obj/item/weapon/circuitboard/teleporter_station
name = T_BOARD("teleporter station")
build_path = /obj/machinery/teleport/station
board_type = "teleporter_station"
board_type = new /datum/frame/frame_types/teleporter_hub
// origin_tech = list(TECH_DATA = 2, TECH_BLUESPACE = 3)
req_components = list(
/obj/item/weapon/stock_parts/console_screen = 1,
@@ -12,7 +12,7 @@
/obj/item/weapon/stock_parts/scanning_module = 1)
/obj/item/weapon/circuitboard/rdserver/attackby(obj/item/I as obj, mob/user as mob)
if(I.is_screwdriver())
if(I.get_tool_quality(TOOL_SCREWDRIVER))
playsound(src, I.usesound, 50, 1)
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(build_path == /obj/machinery/r_n_d/server/core)
@@ -29,14 +29,15 @@
return ..()
/obj/item/weapon/plastique/attackby(var/obj/item/I, var/mob/user)
if(I.is_screwdriver())
if(I.get_tool_quality(TOOL_SCREWDRIVER))
open_panel = !open_panel
to_chat(user, "<span class='notice'>You [open_panel ? "open" : "close"] the wire panel.</span>")
playsound(src, I.usesound, 50, 1)
else if(I.is_wirecutter() || istype(I, /obj/item/device/multitool) || istype(I, /obj/item/device/assembly/signaler ))
return TRUE
else if(I.get_tool_quality(TOOL_WIRECUTTER) || I.get_tool_quality(TOOL_MULTITOOL) || istype(I, /obj/item/device/assembly/signaler ))
wires.Interact(user)
else
..()
return TRUE
return ..()
/obj/item/weapon/plastique/attack_self(mob/user as mob)
var/newtime = input(usr, "Please set the timer.", "Timer", 10) as num
@@ -107,7 +107,7 @@
spawn(0)
if(!src || !reagents.total_volume) return
var/obj/effect/effect/water/W = new /obj/effect/effect/water(get_turf(src))
var/obj/effect/vfx/water/W = new /obj/effect/vfx/water(get_turf(src))
var/turf/my_target
if(a <= the_targets.len)
my_target = the_targets[a]
@@ -69,7 +69,7 @@
/obj/item/weapon/flamethrower/attackby(obj/item/W as obj, mob/user as mob)
if(user.stat || user.restrained() || user.lying) return
if(W.is_wrench() && !status)//Taking this apart
if(W.get_tool_quality(TOOL_WRENCH) && !status)//Taking this apart
var/turf/T = get_turf(src)
if(weldtool)
weldtool.loc = T
@@ -84,7 +84,7 @@
qdel(src)
return
if(W.is_screwdriver() && igniter && !lit)
if(W.get_tool_quality(TOOL_SCREWDRIVER) && igniter && !lit)
status = !status
to_chat(user, "<span class='notice'>[igniter] is now [status ? "secured" : "unsecured"]!</span>")
update_icon()
@@ -49,7 +49,7 @@
/obj/effect/spresent/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if (!W.is_wirecutter())
if (!W.get_tool_quality(TOOL_WIRECUTTER))
to_chat(user, "<span class='warning'>I need wirecutters for that.</span>")
return
@@ -135,7 +135,7 @@
to_chat(user, "<span class='warning'>You MUST put the paper on a table!</span>")
if (W.w_class < ITEMSIZE_LARGE)
var/obj/item/I = user.get_inactive_hand()
if(I.is_wirecutter())
if(I.get_tool_quality(TOOL_WIRECUTTER))
var/a_used = 2 ** (src.w_class - 1)
if (src.amount < a_used)
to_chat(user, "<span class='warning'>You need more paper!</span>")
@@ -76,7 +76,7 @@
icon_state = initial(icon_state) +"_ass"
name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
stage = 1
else if(W.is_screwdriver() && path != 2)
else if(W.get_tool_quality(TOOL_SCREWDRIVER) && path != 2)
if(stage == 1)
path = 1
if(beakers.len)
@@ -170,7 +170,7 @@
G.reagents.trans_to_obj(src, G.reagents.total_volume)
if(src.reagents.total_volume) //The possible reactions didnt use up all reagents.
var/datum/effect/effect/system/steam_spread/steam = new /datum/effect/effect/system/steam_spread()
var/datum/effect_system/steam_spread/steam = new /datum/effect_system/steam_spread()
steam.set_up(10, 0, get_turf(src))
steam.attach(src)
steam.start()
@@ -22,8 +22,8 @@
damage *= B.overmind.blob_type.burn_multiplier
B.adjust_integrity(-damage)
new /obj/effect/effect/sparks(src.loc)
new /obj/effect/effect/smoke/illumination(src.loc, 5, 30, 30, "#FFFFFF")
new /obj/effect/vfx/sparks(src.loc)
new /obj/effect/vfx/smoke/illumination(src.loc, 5, 30, 30, "#FFFFFF")
qdel(src)
@@ -90,7 +90,7 @@
/obj/item/weapon/grenade/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(W.is_screwdriver())
if(W.get_tool_quality(TOOL_SCREWDRIVER))
switch(det_time)
if (1)
det_time = 10
@@ -6,13 +6,13 @@
det_time = 20
item_state = "flashbang"
slot_flags = SLOT_BELT
var/datum/effect/effect/system/smoke_spread/bad/smoke
var/datum/effect_system/smoke_spread/bad/smoke
var/smoke_color
var/smoke_strength = 8
/obj/item/weapon/grenade/smokebomb/Initialize()
. = ..()
src.smoke = new /datum/effect/effect/system/smoke_spread/bad()
src.smoke = new /datum/effect_system/smoke_spread/bad()
src.smoke.attach(src)
/obj/item/weapon/grenade/smokebomb/Destroy()
@@ -39,7 +39,7 @@
return IC.examine(user)
/obj/item/weapon/implant/integrated_circuit/attackby(var/obj/item/O, var/mob/user)
if(O.is_crowbar() || istype(O, /obj/item/device/integrated_electronics) || istype(O, /obj/item/integrated_circuit) || O.is_screwdriver() || istype(O, /obj/item/weapon/cell/device) )
if(O.get_tool_quality(TOOL_CROWBAR) || istype(O, /obj/item/device/integrated_electronics) || istype(O, /obj/item/integrated_circuit) || O.get_tool_quality(TOOL_SCREWDRIVER) || istype(O, /obj/item/weapon/cell/device) )
IC.attackby(O, user)
else
..()
@@ -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(W.is_screwdriver())
if(W.get_tool_quality(TOOL_SCREWDRIVER))
to_chat(user, "You finish the concealed blade weapon.")
playsound(src, W.usesound, 50, 1)
new /obj/item/weapon/material/butterfly(user.loc, material.name)
@@ -12,24 +12,24 @@
var/epitaph = "" //A quick little blurb
/obj/item/weapon/material/gravemarker/attackby(obj/item/weapon/W, mob/user as mob)
if(W.is_screwdriver())
if(W.get_tool_quality(TOOL_SCREWDRIVER))
var/carving_1 = sanitizeSafe(input(user, "Who is \the [src.name] for?", "Gravestone Naming", null) as text, MAX_NAME_LEN)
if(carving_1)
user.visible_message("[user] starts carving \the [src.name].", "You start carving \the [src.name].")
if(do_after(user, material.hardness * W.toolspeed))
if(do_after(user, material.hardness * W.get_tool_speed(TOOL_SCREWDRIVER)))
user.visible_message("[user] carves something into \the [src.name].", "You carve your message into \the [src.name].")
grave_name += carving_1
update_icon()
var/carving_2 = sanitizeSafe(input(user, "What message should \the [src.name] have?", "Epitaph Carving", null) as text, MAX_NAME_LEN)
if(carving_2)
user.visible_message("[user] starts carving \the [src.name].", "You start carving \the [src.name].")
if(do_after(user, material.hardness * W.toolspeed))
if(do_after(user, material.hardness * W.get_tool_speed(TOOL_SCREWDRIVER)))
user.visible_message("[user] carves something into \the [src.name].", "You carve your message into \the [src.name].")
epitaph += carving_2
update_icon()
if(W.is_wrench())
if(W.get_tool_quality(TOOL_WRENCH))
user.visible_message("[user] starts carving \the [src.name].", "You start carving \the [src.name].")
if(do_after(user, material.hardness * W.toolspeed))
if(do_after(user, material.hardness * W.get_tool_speed(TOOL_WRENCH)))
material.place_dismantled_product(get_turf(src))
user.visible_message("[user] dismantles down \the [src.name].", "You dismantle \the [src.name].")
qdel(src)
@@ -97,9 +97,11 @@
icon_state = "fork"
sharp = TRUE
edge = FALSE
tool_qualities = list(TOOL_SCREWDRIVER = TOOL_QUALITY_WORST) // Really bad, but in a pinch...
/obj/item/weapon/material/kitchen/utensil/fork/plastic
default_material = "plastic"
tool_qualities = list()
/obj/item/weapon/material/kitchen/utensil/foon
name = "foon"
@@ -68,6 +68,7 @@
origin_tech = list(TECH_MATERIAL = 1)
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
drop_sound = 'sound/items/drop/knife.ogg'
tool_qualities = list(TOOL_WOODCUT = TOOL_QUALITY_POOR, TOOL_KNIFE = TOOL_QUALITY_STANDARD)
// These no longer inherit from hatchets.
/obj/item/weapon/material/knife/tacknife
@@ -139,6 +140,8 @@
attack_verb = list("slashed", "chopped", "gouged", "ripped", "cut")
can_cleave = TRUE //Now hatchets inherit from the machete, and thus knives. Tables turned.
slot_flags = SLOT_BELT
tool_qualities = list(TOOL_WOODCUT = TOOL_QUALITY_MEDIOCRE, TOOL_KNIFE = TOOL_QUALITY_STANDARD)
/obj/item/weapon/material/knife/machete/cyborg
name = "integrated machete"
@@ -152,4 +155,4 @@
icon_state = "survivalknife"
item_state = "knife"
applies_material_colour = FALSE
toolspeed = 2 // Use a real axe if you want to chop logs.
tool_qualities = list(TOOL_WOODCUT = TOOL_QUALITY_POOR) // Use a real axe if you want to chop logs.
@@ -124,7 +124,7 @@ Protectiveness | Armor %
var/turf/picked = pick(turfs)
if(!isturf(picked)) return
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread()
spark_system.set_up(5, 0, user.loc)
spark_system.start()
playsound(src, 'sound/effects/teleport.ogg', 50, 1)
@@ -119,9 +119,8 @@
T.visible_message("<span class='danger'>\The [src] goes dull!</span>")
playsound(src, "shatter", 70, 1)
dulled = 1
if(is_sharp() || has_edge())
sharp = 0
edge = 0
sharp = 0
edge = 0
/obj/item/weapon/material/proc/repair(var/repair_amount, var/repair_time, mob/living/user)
if(!fragile)
@@ -23,6 +23,7 @@
applies_material_colour = 0
drop_sound = 'sound/items/drop/axe.ogg'
pickup_sound = 'sound/items/pickup/axe.ogg'
tool_qualities = list(TOOL_WOODCUT = TOOL_QUALITY_STANDARD, TOOL_KNIFE = TOOL_QUALITY_STANDARD)
/obj/item/weapon/material/knife/machete/hatchet/stone
name = "sharp rock"
@@ -31,6 +32,7 @@
icon_state = "rock"
item_state = "rock"
attack_verb = list("chopped", "torn", "cut")
tool_qualities = list(TOOL_WOODCUT = TOOL_QUALITY_POOR, TOOL_KNIFE = TOOL_QUALITY_POOR)
/obj/item/weapon/material/knife/machete/hatchet/stone/set_material(var/new_material)
var/old_name = name
@@ -44,6 +46,7 @@
attack_verb = list("ripped", "torn", "cut")
can_cleave = FALSE
var/hits = 0
tool_qualities = list(TOOL_WOODCUT = TOOL_QUALITY_POOR, TOOL_KNIFE = TOOL_QUALITY_POOR)
/obj/item/weapon/material/knife/machete/hatchet/unathiknife/attack(mob/M as mob, mob/user as mob)
if(hits > 0)
@@ -105,13 +105,13 @@
var/mob/living/M = loc
if(istype(M) && !issmall(M) && M.item_is_in_hands(src) && !M.hands_are_full())
wielded = 1
pry = 1
tool_qualities[TOOL_CROWBAR] = TOOL_QUALITY_DECENT
force = force_wielded
name = "[base_name] (wielded)"
update_icon()
else
wielded = 0
pry = 0
tool_qualities[TOOL_CROWBAR] = TOOL_QUALITY_NONE
force = force_unwielded
name = "[base_name]"
update_icon()
@@ -147,7 +147,7 @@
update_icon()
else
to_chat(user, "<span class='notice'>[src] already has a cell.</span>")
else if(W.is_screwdriver() && bcell)
else if(W.get_tool_quality(TOOL_SCREWDRIVER) && bcell)
bcell.update_icon()
bcell.forceMove(get_turf(loc))
bcell = null
@@ -302,7 +302,7 @@
if(active && default_parry_check(user, attacker, damage_source) && prob(60))
user.visible_message("<span class='danger'>\The [user] parries [attack_text] with \the [src]!</span>")
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread()
spark_system.set_up(5, 0, user.loc)
spark_system.start()
playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
@@ -310,7 +310,7 @@
if(active && unique_parry_check(user, attacker, damage_source) && prob(projectile_parry_chance))
user.visible_message("<span class='danger'>\The [user] deflects [attack_text] with \the [src]!</span>")
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread()
spark_system.set_up(5, 0, user.loc)
spark_system.start()
playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
@@ -430,14 +430,14 @@
flags = NOBLOODY
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
var/mob/living/creator
var/datum/effect/effect/system/spark_spread/spark_system
var/datum/effect_system/spark_spread/spark_system
projectile_parry_chance = 60
lcolor = "#00FF00"
/obj/item/weapon/melee/energy/blade/Initialize()
. = ..()
spark_system = new /datum/effect/effect/system/spark_spread()
spark_system = new /datum/effect_system/spark_spread()
spark_system.set_up(5, 0, src)
spark_system.attach(src)
@@ -474,7 +474,7 @@
if(default_parry_check(user, attacker, damage_source) && prob(60))
user.visible_message("<span class='danger'>\The [user] parries [attack_text] with \the [src]!</span>")
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread()
spark_system.set_up(5, 0, user.loc)
spark_system.start()
playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
@@ -482,7 +482,7 @@
if(unique_parry_check(user, attacker, damage_source) && prob(projectile_parry_chance))
user.visible_message("<span class='danger'>\The [user] deflects [attack_text] with \the [src]!</span>")
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread()
spark_system.set_up(5, 0, user.loc)
spark_system.start()
playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
@@ -540,7 +540,7 @@
/obj/item/weapon/melee/energy/spear/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack")
if(active && default_parry_check(user, attacker, damage_source) && prob(50))
user.visible_message("<span class='danger'>\The [user] parries [attack_text] with \the [src]!</span>")
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread()
spark_system.set_up(5, 0, user.loc)
spark_system.start()
playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
@@ -5,8 +5,6 @@
icon_state = "tape"
w_class = ITEMSIZE_SMALL
toolspeed = 3 //You can use it in surgery. It's stupid, but you can.
var/turf/start
var/turf/end
var/tape_type = /obj/item/tape
+1 -1
View File
@@ -57,7 +57,7 @@
if(!((user == loc || (in_range(src, user) && istype(src.loc, /turf)))))
return
var/datum/effect/effect/system/smoke_spread/smoke = new /datum/effect/effect/system/smoke_spread()
var/datum/effect_system/smoke_spread/smoke = new /datum/effect_system/smoke_spread()
smoke.set_up(5, 0, user.loc)
smoke.attach(user)
smoke.start()
+3 -3
View File
@@ -84,7 +84,7 @@
//to strong bullets and lasers. They still do fine to pistol rounds of all kinds, however.
if(istype(damage_source, /obj/item/projectile))
var/obj/item/projectile/P = damage_source
if((is_sharp(P) && P.armor_penetration >= 10) || istype(P, /obj/item/projectile/beam))
if((P.sharp && P.armor_penetration >= 10) || istype(P, /obj/item/projectile/beam))
//If we're at this point, the bullet/beam is going to go through the shield, however it will hit for less damage.
//Bullets get slowed down, while beams are diffused as they hit the shield, so these shields are not /completely/
//useless. Extremely penetrating projectiles will go through the shield without less damage.
@@ -141,7 +141,7 @@
. = ..()
if(.)
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread()
spark_system.set_up(5, 0, user.loc)
spark_system.start()
playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
@@ -149,7 +149,7 @@
/obj/item/weapon/shield/energy/get_block_chance(mob/user, var/damage, atom/damage_source = null, mob/attacker = null)
if(istype(damage_source, /obj/item/projectile))
var/obj/item/projectile/P = damage_source
if((is_sharp(P) && damage > 10) || istype(P, /obj/item/projectile/beam))
if((P.sharp && damage > 10) || istype(P, /obj/item/projectile/beam))
return (base_block_chance - round(damage / 3)) //block bullets and beams using the old block chance
return base_block_chance
@@ -110,8 +110,8 @@
/obj/item/weapon/storage/belt/utility/chief/full
starts_with = list(
/obj/item/weapon/tool/screwdriver/power,
/obj/item/weapon/tool/crowbar/power,
/obj/item/weapon/tool/powerdrill,
/obj/item/weapon/tool/hydraulic_cutter,
/obj/item/weapon/weldingtool/experimental,
/obj/item/device/multitool,
/obj/item/stack/cable_coil/random_belt,
@@ -37,7 +37,7 @@
to_chat(user, "<span class='warning'>Access Denied</span>")
else if(istype(W, /obj/item/weapon/melee/energy/blade))
if(emag_act(INFINITY, user, W, "The locker has been sliced open by [user] with an energy blade!", "You hear metal being sliced and sparks flying."))
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread()
spark_system.set_up(5, 0, src.loc)
spark_system.start()
playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
@@ -36,15 +36,15 @@
/obj/item/weapon/storage/secure/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(locked)
if (istype(W, /obj/item/weapon/melee/energy/blade) && emag_act(INFINITY, user, "You slice through the lock of \the [src]"))
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread()
spark_system.set_up(5, 0, src.loc)
spark_system.start()
playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
playsound(src, "sparks", 50, 1)
return
if (W.is_screwdriver())
if (do_after(user, 20 * W.toolspeed))
if (W.get_tool_quality(TOOL_SCREWDRIVER))
if (do_after(user, 20 * W.get_tool_speed(TOOL_SCREWDRIVER)))
src.open =! src.open
playsound(src, W.usesound, 50, 1)
user.show_message(text("<span class='notice'>You [] the service panel.</span>", (src.open ? "open" : "close")))
@@ -86,9 +86,9 @@
/obj/item/weapon/storage/toolbox/syndicate/powertools
starts_with = list(
/obj/item/clothing/gloves/yellow,
/obj/item/weapon/tool/screwdriver/power,
/obj/item/weapon/tool/powerdrill,
/obj/item/weapon/weldingtool/experimental,
/obj/item/weapon/tool/crowbar/power,
/obj/item/weapon/tool/hydraulic_cutter,
/obj/item/device/multitool,
/obj/item/stack/cable_coil/random_belt,
/obj/item/device/analyzer
@@ -328,7 +328,7 @@
description_antag = "This case will likely contain a charged fuel rod gun, and a few fuel rods to go with it. It can only hold the fuel rod gun, fuel rods, batteries, a screwdriver, and stock machine parts."
force = 12 //Anti-rad lined i.e. Lead, probably gonna hurt a bit if you get bashed with it.
can_hold = list(/obj/item/weapon/gun/magnetic/fuelrod, /obj/item/weapon/fuel_assembly, /obj/item/weapon/cell, /obj/item/weapon/stock_parts, /obj/item/weapon/tool/screwdriver)
cant_hold = list(/obj/item/weapon/tool/screwdriver/power)
cant_hold = list(/obj/item/weapon/tool/powerdrill)
starts_with = list(
/obj/item/weapon/gun/magnetic/fuelrod,
/obj/item/weapon/fuel_assembly/deuterium,
@@ -38,7 +38,7 @@
/obj/item/clothing/accessory/badge,
/obj/item/weapon/makeover
)
cant_hold = list(/obj/item/weapon/tool/screwdriver/power)
cant_hold = list(/obj/item/weapon/tool/powerdrill)
slot_flags = SLOT_ID
var/obj/item/weapon/card/id/front_id = null
@@ -33,6 +33,7 @@
matter = list(MAT_STEEL = 10000, "glass" = 5000)
origin_tech = list(TECH_MATERIAL = 1, TECH_BIO = 1)
drop_sound = 'sound/items/drop/scrap.ogg'
tool_qualities = list(TOOL_RETRACTOR = TOOL_QUALITY_STANDARD)
/*
* Hemostat
@@ -45,6 +46,7 @@
origin_tech = list(TECH_MATERIAL = 1, TECH_BIO = 1)
attack_verb = list("attacked", "pinched")
drop_sound = 'sound/items/drop/scrap.ogg'
tool_qualities = list(TOOL_HEMOSTAT = TOOL_QUALITY_STANDARD)
/*
* Cautery
@@ -57,6 +59,7 @@
origin_tech = list(TECH_MATERIAL = 1, TECH_BIO = 1)
attack_verb = list("burnt")
drop_sound = 'sound/items/drop/scrap.ogg'
tool_qualities = list(TOOL_CAUTERY = TOOL_QUALITY_STANDARD)
/*
* Surgical Drill
@@ -72,6 +75,7 @@
origin_tech = list(TECH_MATERIAL = 1, TECH_BIO = 1)
attack_verb = list("drilled")
drop_sound = 'sound/items/drop/accessory.ogg'
tool_qualities = list(TOOL_SDRILL = TOOL_QUALITY_STANDARD)
/*
* Scalpel
@@ -92,6 +96,7 @@
matter = list(MAT_STEEL = 10000, "glass" = 5000)
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
drop_sound = 'sound/items/drop/knife.ogg'
tool_qualities = list(TOOL_SCALPEL = TOOL_QUALITY_STANDARD)
/*
* Researchable Scalpels
@@ -101,6 +106,7 @@
desc = "A scalpel augmented with a directed laser, for more precise cutting without blood entering the field. This one looks basic and could be improved."
icon_state = "scalpel_laser1_on"
damtype = "fire"
tool_qualities = list(TOOL_SCALPEL = TOOL_QUALITY_DECENT)
/obj/item/weapon/surgical/scalpel/laser2
name = "laser scalpel"
@@ -108,6 +114,7 @@
icon_state = "scalpel_laser2_on"
damtype = "fire"
force = 12.0
tool_qualities = list(TOOL_SCALPEL = TOOL_QUALITY_GOOD)
/obj/item/weapon/surgical/scalpel/laser3
name = "laser scalpel"
@@ -115,12 +122,9 @@
icon_state = "scalpel_laser3_on"
damtype = "fire"
force = 15.0
tool_qualities = list(TOOL_SCALPEL = TOOL_QUALITY_BEST)
/obj/item/weapon/surgical/scalpel/manager
name = "incision management system"
desc = "A true extension of the surgeon's body, this marvel instantly and completely prepares an incision allowing for the immediate commencement of therapeutic steps."
icon_state = "scalpel_manager_on"
force = 7.5
/obj/item/weapon/surgical/scalpel/ripper
name = "organ pincers"
@@ -128,9 +132,25 @@
icon_state = "organ_ripper"
item_state = "bone_setter"
force = 15.0
toolspeed = 0.75
tool_qualities = list(TOOL_SCALPEL = TOOL_QUALITY_DECENT)
origin_tech = list(TECH_MATERIAL = 5, TECH_BIO = 3, TECH_ILLEGAL = 2)
/*
* Incision management:
* Circ saw, scalpel, retractor, and hemostat
*/
/obj/item/weapon/surgical/manager
name = "incision management system"
desc = "A true extension of the surgeon's body, this marvel instantly and completely prepares an incision allowing for the immediate commencement of therapeutic steps."
icon_state = "scalpel_manager_on"
force = 7.5
tool_qualities = list(
TOOL_SCALPEL = TOOL_QUALITY_GOOD,
TOOL_CSAW = TOOL_QUALITY_GOOD,
TOOL_RETRACTOR = TOOL_QUALITY_GOOD,
TOOL_HEMOSTAT = TOOL_QUALITY_GOOD
)
/*
* Circular Saw
*/
@@ -150,6 +170,7 @@
attack_verb = list("attacked", "slashed", "sawed", "cut")
sharp = 1
edge = 1
tool_qualities = list(TOOL_CSAW = TOOL_QUALITY_STANDARD)
/obj/item/weapon/surgical/circular_saw/manager
name = "energetic bone diverter"
@@ -162,7 +183,7 @@
origin_tech = list(TECH_BIO = 4, TECH_MATERIAL = 6, TECH_MAGNET = 6)
matter = list(MAT_STEEL = 12500)
attack_verb = list("attacked", "slashed", "seared", "cut")
toolspeed = 0.75
tool_qualities = list(TOOL_CSAW = TOOL_QUALITY_GOOD)
//misc, formerly from code/defines/weapons.dm
/obj/item/weapon/surgical/bonegel
@@ -172,6 +193,7 @@
force = 0
throwforce = 1.0
drop_sound = 'sound/items/drop/bottle.ogg'
tool_qualities = list(TOOL_BONEGEL = TOOL_QUALITY_STANDARD)
/obj/item/weapon/surgical/FixOVein
name = "FixOVein"
@@ -182,6 +204,7 @@
origin_tech = list(TECH_MATERIAL = 1, TECH_BIO = 3)
var/usage_amount = 10
drop_sound = 'sound/items/drop/accessory.ogg'
tool_qualities = list(TOOL_FIXVEIN = TOOL_QUALITY_STANDARD)
/obj/item/weapon/surgical/bonesetter
name = "bone setter"
@@ -193,6 +216,7 @@
throw_range = 5
attack_verb = list("attacked", "hit", "bludgeoned")
drop_sound = 'sound/items/drop/scrap.ogg'
tool_qualities = list(TOOL_BONESET = TOOL_QUALITY_STANDARD)
/obj/item/weapon/surgical/bone_clamp
name = "bone clamp"
@@ -203,66 +227,68 @@
throw_speed = 3
throw_range = 5
attack_verb = list("attacked", "hit", "bludgeoned")
tool_qualities = list(TOOL_BONECLAMP = TOOL_QUALITY_STANDARD)
// Cyborg Tools
/obj/item/weapon/surgical/retractor/cyborg
toolspeed = 0.5
tool_qualities = list(TOOL_RETRACTOR = TOOL_QUALITY_DECENT)
/obj/item/weapon/surgical/hemostat/cyborg
toolspeed = 0.5
tool_qualities = list(TOOL_HEMOSTAT = TOOL_QUALITY_DECENT)
/obj/item/weapon/surgical/cautery/cyborg
toolspeed = 0.5
tool_qualities = list(TOOL_CAUTERY = TOOL_QUALITY_DECENT)
/obj/item/weapon/surgical/surgicaldrill/cyborg
toolspeed = 0.5
tool_qualities = list(TOOL_SDRILL = TOOL_QUALITY_DECENT)
/obj/item/weapon/surgical/scalpel/cyborg
toolspeed = 0.5
tool_qualities = list(TOOL_SCALPEL = TOOL_QUALITY_DECENT)
/obj/item/weapon/surgical/circular_saw/cyborg
toolspeed = 0.5
tool_qualities = list(TOOL_CSAW = TOOL_QUALITY_DECENT)
/obj/item/weapon/surgical/bonegel/cyborg
toolspeed = 0.5
tool_qualities = list(TOOL_BONEGEL = TOOL_QUALITY_DECENT)
/obj/item/weapon/surgical/FixOVein/cyborg
toolspeed = 0.5
tool_qualities = list(TOOL_FIXVEIN = TOOL_QUALITY_DECENT)
/obj/item/weapon/surgical/bonesetter/cyborg
toolspeed = 0.5
tool_qualities = list(TOOL_BONESET = TOOL_QUALITY_DECENT)
// Alien Tools
/obj/item/weapon/surgical/retractor/alien
icon = 'icons/obj/abductor.dmi'
toolspeed = 0.25
tool_qualities = list(TOOL_RETRACTOR = TOOL_QUALITY_GOOD)
/obj/item/weapon/surgical/hemostat/alien
icon = 'icons/obj/abductor.dmi'
toolspeed = 0.25
tool_qualities = list(TOOL_HEMOSTAT = TOOL_QUALITY_DECENT)
/obj/item/weapon/surgical/cautery/alien
icon = 'icons/obj/abductor.dmi'
toolspeed = 0.25
tool_qualities = list(TOOL_CAUTERY = TOOL_QUALITY_DECENT)
/obj/item/weapon/surgical/surgicaldrill/alien
icon = 'icons/obj/abductor.dmi'
toolspeed = 0.25
tool_qualities = list(TOOL_SDRILL = TOOL_QUALITY_DECENT)
/obj/item/weapon/surgical/scalpel/alien
icon = 'icons/obj/abductor.dmi'
toolspeed = 0.25
tool_qualities = list(TOOL_SCALPEL = TOOL_QUALITY_DECENT)
/obj/item/weapon/surgical/circular_saw/alien
icon = 'icons/obj/abductor.dmi'
toolspeed = 0.25
tool_qualities = list(TOOL_CSAW = TOOL_QUALITY_DECENT)
/obj/item/weapon/surgical/FixOVein/alien
icon = 'icons/obj/abductor.dmi'
toolspeed = 0.25
tool_qualities = list(TOOL_FIXVEIN = TOOL_QUALITY_DECENT)
/obj/item/weapon/surgical/bone_clamp/alien
icon = 'icons/obj/abductor.dmi'
toolspeed = 0.75
tool_qualities = list(TOOL_BONECLAMP = TOOL_QUALITY_DECENT)
+1 -1
View File
@@ -107,7 +107,7 @@
/obj/item/weapon/flame/lighter/zippo/c4detonator/attackby(obj/item/weapon/W, mob/user as mob)
if(W.is_screwdriver())
if(W.get_tool_quality(TOOL_SCREWDRIVER))
detonator_mode = !detonator_mode
playsound(src, W.usesound, 50, 1)
to_chat(user, "<span class='notice'>You unscrew the top panel of \the [src] revealing a button.</span>")
@@ -12,7 +12,7 @@
)
item_state_slots = list(slot_r_hand_str = "jetpack", slot_l_hand_str = "jetpack")
distribute_pressure = ONE_ATMOSPHERE*O2STANDARD
var/datum/effect/effect/system/ion_trail_follow/ion_trail
var/datum/effect_system/ion_trail_follow/ion_trail
var/on = 0.0
var/stabilization_on = 0
var/volume_rate = 500 //Needed for borg jetpack transfer
@@ -20,7 +20,7 @@
/obj/item/weapon/tank/jetpack/Initialize()
. = ..()
ion_trail = new /datum/effect/effect/system/ion_trail_follow()
ion_trail = new /datum/effect_system/ion_trail_follow()
ion_trail.set_up(src)
/obj/item/weapon/tank/jetpack/Destroy()
@@ -133,7 +133,7 @@ var/list/global/tank_gauge_cache = list()
to_chat(user, "<span class='notice'>You attach the wires to the tank.</span>")
src.add_bomb_overlay()
if(W.is_wirecutter())
if(W.get_tool_quality(TOOL_WIRECUTTER))
if(wired && src.proxyassembly.assembly)
to_chat(user, "<span class='notice'>You carefully begin clipping the wires that attach to the tank.</span>")
-3
View File
@@ -7,8 +7,6 @@
drop_sound = 'sound/items/drop/cardboardbox.ogg'
pickup_sound = 'sound/items/pickup/cardboardbox.ogg'
toolspeed = 2 //It is now used in surgery as a not awful, but probably dangerous option, due to speed.
/obj/item/weapon/tape_roll/proc/can_place(var/mob/living/carbon/human/H, var/mob/user)
if(istype(user, /mob/living/silicon/robot) || user == H)
return TRUE
@@ -16,7 +14,6 @@
for (var/obj/item/weapon/grab/G in H.grabbed_by)
if (G.loc == user && G.state >= GRAB_AGGRESSIVE)
return TRUE
return FALSE
/obj/item/weapon/tape_roll/attack(var/mob/living/carbon/human/H, var/mob/user)
@@ -1,65 +0,0 @@
// File is unticked because this is entirely untested old code
/*
* Combitool
*/
/obj/item/weapon/combitool
name = "combi-tool"
desc = "It even has one of those nubbins for doing the thingy."
icon = 'icons/obj/items.dmi'
icon_state = "combitool"
w_class = ITEMSIZE_SMALL
drop_sound = 'sound/items/drop/multitool.ogg'
pickup_sound = 'sound/items/pickup/multitool.ogg'
var/list/spawn_tools = list(
/obj/item/weapon/tool/screwdriver,
/obj/item/weapon/tool/wrench,
/obj/item/weapon/tool/wirecutters,
/obj/item/weapon/material/knife,
/obj/item/weapon/material/kitchen/utensil/fork,
/obj/item/weapon/material/knife/machete/hatchet
)
var/list/tools = list()
var/current_tool = 1
/obj/item/weapon/combitool/examine(mob/user)
. = ..()
if(loc == user && tools.len)
. += "It has the following fittings:"
for(var/obj/item/tool in tools)
. += "[bicon(tool)] - [tool.name][tools[current_tool]==tool?" (selected)":""]")
/obj/item/weapon/combitool/Initialize()
. = ..()
for(var/type in spawn_tools)
tools |= new type(src)
/obj/item/weapon/combitool/attack_self(mob/user as mob)
if(++current_tool > tools.len) current_tool = 1
var/obj/item/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.name] fitting.")
return 1
/obj/item/weapon/combitool/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!M.Adjacent(user))
return 0
var/obj/item/tool = tools[current_tool]
if(!tool) return 0
return (tool ? tool.attack(M,user) : 0)
/obj/item/weapon/combitool/afterattack(var/atom/target, var/mob/living/user, proximity, params)
if(!proximity)
return 0
var/obj/item/tool = tools[current_tool]
if(!tool) return 0
tool.loc = user
var/resolved = target.attackby(tool,user)
if(!resolved && tool && target)
tool.afterattack(target,user,1)
if(tool)
tool.loc = src
@@ -1,101 +0,0 @@
/*
* Crowbar
*/
/obj/item/weapon/tool/crowbar
name = "crowbar"
desc = "Used to remove floors and to pry open doors."
icon = 'icons/obj/tools.dmi'
icon_state = "crowbar"
slot_flags = SLOT_BELT
force = 6
throwforce = 7
pry = 1
item_state = "crowbar"
w_class = ITEMSIZE_SMALL
origin_tech = list(TECH_ENGINEERING = 1)
matter = list(MAT_STEEL = 50)
attack_verb = list("attacked", "bashed", "battered", "bludgeoned", "whacked")
usesound = 'sound/items/crowbar.ogg'
drop_sound = 'sound/items/drop/crowbar.ogg'
pickup_sound = 'sound/items/pickup/crowbar.ogg'
toolspeed = 1
tool_qualities = list(TOOL_CROWBAR)
/obj/item/weapon/tool/crowbar/red
icon = 'icons/obj/tools.dmi'
icon_state = "red_crowbar"
item_state = "crowbar_red"
/datum/category_item/catalogue/anomalous/precursor_a/alien_crowbar
name = "Precursor Alpha Object - Hard Light Pry Tool"
desc = "An object which bears striking resemblence to the common crowbar. \
It appears to also serve a similar purpose, being used for prying. Unlike \
a crowbar, however, this object is made of some form of 'hard light'.\
<br><br>\
There is a visible switch on the base of the tool, which controls the \
hard light side of the tool. When the switch is used, the shape of \
the tool changes, with the hard light moving and making a prying motion. \
This allows the user to pry something with no physical effort beyond keeping \
the tool aligned while in use."
value = CATALOGUER_REWARD_EASY
/obj/item/weapon/tool/crowbar/alien
name = "alien crowbar"
desc = "A hard-light crowbar. It appears to pry by itself, without any effort required."
catalogue_data = list(/datum/category_item/catalogue/anomalous/precursor_a/alien_crowbar)
icon = 'icons/obj/abductor.dmi'
usesound = 'sound/weapons/sonic_jackhammer.ogg'
icon_state = "crowbar"
toolspeed = 0.1
origin_tech = list(TECH_COMBAT = 4, TECH_ENGINEERING = 4)
/obj/item/weapon/tool/crowbar/hybrid
name = "strange crowbar"
desc = "A crowbar whose head seems to phase in and out of view."
catalogue_data = list(/datum/category_item/catalogue/anomalous/precursor_a/alien_crowbar)
icon_state = "hybcrowbar"
usesound = 'sound/weapons/sonic_jackhammer.ogg'
toolspeed = 0.4
origin_tech = list(TECH_COMBAT = 4, TECH_ENGINEERING = 3)
reach = 2
/obj/item/weapon/tool/crowbar/cyborg
name = "hydraulic crowbar"
desc = "A hydraulic prying tool, compact but powerful. Designed to replace crowbars in industrial synthetics."
usesound = 'sound/items/jaws_pry.ogg'
force = 10
toolspeed = 0.5
/obj/item/weapon/tool/crowbar/power
name = "jaws of life"
desc = "A set of jaws of life, compressed through the magic of science. It's fitted with a prying head."
icon_state = "jaws_pry"
item_state = "jawsoflife"
matter = list(MAT_METAL=150, MAT_SILVER=50)
origin_tech = list(TECH_MATERIAL = 2, TECH_ENGINEERING = 2)
usesound = 'sound/items/jaws_pry.ogg'
force = 15
toolspeed = 0.25
var/obj/item/weapon/tool/wirecutters/power/counterpart = null
/obj/item/weapon/tool/crowbar/power/Initialize(var/ml, no_counterpart = TRUE)
. = ..()
if(!counterpart && no_counterpart)
counterpart = new(src, FALSE)
counterpart.counterpart = src
/obj/item/weapon/tool/crowbar/power/Destroy()
if(counterpart)
counterpart.counterpart = null // So it can qdel cleanly.
QDEL_NULL(counterpart)
return ..()
/obj/item/weapon/tool/crowbar/power/attack_self(mob/user)
playsound(src, 'sound/items/change_jaws.ogg', 50, 1)
user.drop_item(src)
counterpart.forceMove(get_turf(src))
src.forceMove(counterpart)
user.put_in_active_hand(counterpart)
to_chat(user, "<span class='notice'>You attach the cutting jaws to [src].</span>")
@@ -1,145 +0,0 @@
/*
* Screwdriver
*/
/obj/item/weapon/tool/screwdriver
name = "screwdriver"
desc = "You can be totally screwwy with this."
icon = 'icons/obj/tools.dmi'
icon_state = "screwdriver"
center_of_mass = list("x" = 13,"y" = 7)
slot_flags = SLOT_BELT | SLOT_EARS
force = 6
w_class = ITEMSIZE_TINY
throwforce = 5
throw_speed = 3
throw_range = 5
hitsound = 'sound/weapons/bladeslice.ogg'
usesound = 'sound/items/screwdriver.ogg'
drop_sound = 'sound/items/drop/screwdriver.ogg'
pickup_sound = 'sound/items/pickup/screwdriver.ogg'
matter = list(MAT_STEEL = 75)
attack_verb = list("stabbed")
sharp = 1
toolspeed = 1
tool_qualities = list(TOOL_SCREWDRIVER)
var/random_color = TRUE
/obj/item/weapon/tool/screwdriver/Initialize()
if(random_color)
switch(pick("red","blue","purple","brown","green","cyan","yellow"))
if ("red")
icon_state = "screwdriver2"
item_state = "screwdriver"
if ("blue")
icon_state = "screwdriver"
item_state = "screwdriver_blue"
if ("purple")
icon_state = "screwdriver3"
item_state = "screwdriver_purple"
if ("brown")
icon_state = "screwdriver4"
item_state = "screwdriver_brown"
if ("green")
icon_state = "screwdriver5"
item_state = "screwdriver_green"
if ("cyan")
icon_state = "screwdriver6"
item_state = "screwdriver_cyan"
if ("yellow")
icon_state = "screwdriver7"
item_state = "screwdriver_yellow"
if (prob(75))
src.pixel_y = rand(0, 16)
. = ..()
/obj/item/weapon/tool/screwdriver/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!istype(M) || user.a_intent == "help")
return ..()
if(user.zone_sel.selecting != O_EYES && user.zone_sel.selecting != BP_HEAD)
return ..()
if((CLUMSY in user.mutations) && prob(50))
M = user
return eyestab(M,user)
/datum/category_item/catalogue/anomalous/precursor_a/alien_screwdriver
name = "Precursor Alpha Object - Hard Light Torgue Tool"
desc = "This appears to be a tool, with a solid handle, and a thin hard light \
shaft, with a tip at the end. On the handle appears to be two mechanisms that \
causes the hard light section to spin at a high speed while held down, in a \
similar fashion as an electric drill. One makes it spin clockwise, the other \
counter-clockwise.\
<br><br>\
The hard light tip is able to shift its shape to a degree when pressed into \
a solid receptacle. This allows it to be able to function on many kinds of \
fastener, which includes the screws."
value = CATALOGUER_REWARD_EASY
/obj/item/weapon/tool/screwdriver/alien
name = "alien screwdriver"
desc = "An ultrasonic screwdriver."
catalogue_data = list(/datum/category_item/catalogue/anomalous/precursor_a/alien_screwdriver)
icon = 'icons/obj/abductor.dmi'
icon_state = "screwdriver_a"
item_state = "screwdriver_black"
usesound = 'sound/items/pshoom.ogg'
toolspeed = 0.1
random_color = FALSE
/obj/item/weapon/tool/screwdriver/hybrid
name = "strange screwdriver"
desc = "A strange conglomerate of a screwdriver."
icon_state = "hybscrewdriver"
item_state = "screwdriver_black"
origin_tech = list(TECH_MATERIAL = 3, TECH_ENGINEERING = 3)
w_class = ITEMSIZE_NORMAL
usesound = 'sound/effects/uncloak.ogg'
toolspeed = 0.4
random_color = FALSE
reach = 2
/obj/item/weapon/tool/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
/obj/item/weapon/tool/screwdriver/power
name = "hand drill"
desc = "A simple powered hand drill. It's fitted with a screw bit."
icon_state = "drill_screw"
item_state = "drill"
matter = list(MAT_STEEL = 150, MAT_SILVER = 50)
origin_tech = list(TECH_MATERIAL = 2, TECH_ENGINEERING = 2)
slot_flags = SLOT_BELT
force = 8
w_class = ITEMSIZE_SMALL
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
var/obj/item/weapon/tool/wrench/power/counterpart = null
/obj/item/weapon/tool/screwdriver/power/Initialize(var/ml, no_counterpart = TRUE)
. = ..()
if(!counterpart && no_counterpart)
counterpart = new(src, FALSE)
counterpart.counterpart = src
/obj/item/weapon/tool/screwdriver/power/Destroy()
if(counterpart)
counterpart.counterpart = null // So it can qdel cleanly.
QDEL_NULL(counterpart)
return ..()
/obj/item/weapon/tool/screwdriver/power/attack_self(mob/user)
playsound(src,'sound/items/change_drill.ogg',50,1)
user.drop_item(src)
counterpart.forceMove(get_turf(src))
src.forceMove(counterpart)
user.put_in_active_hand(counterpart)
to_chat(user, "<span class='notice'>You attach the bolt driver bit to [src].</span>")
@@ -1,683 +0,0 @@
#define WELDER_FUEL_BURN_INTERVAL 13
/*
* Welding Tool
*/
/obj/item/weapon/weldingtool
name = "\improper welding tool"
icon = 'icons/obj/tools.dmi'
icon_state = "welder"
item_state = "welder"
slot_flags = SLOT_BELT
//Amount of OUCH when it's thrown
force = 3.0
throwforce = 5.0
throw_speed = 1
throw_range = 5
w_class = ITEMSIZE_SMALL
//Cost to make in the autolathe
matter = list(MAT_STEEL = 70, "glass" = 30)
//R&D tech level
origin_tech = list(TECH_ENGINEERING = 1)
tool_qualities = list(TOOL_WELDER)
//Welding tool specific stuff
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/acti_sound = 'sound/items/welderactivate.ogg'
var/deac_sound = 'sound/items/welderdeactivate.ogg'
usesound = 'sound/items/Welder2.ogg'
var/change_icons = TRUE
var/flame_intensity = 2 //how powerful the emitted light is when used.
var/flame_color = "#FF9933" // What color the welder light emits when its on. Default is an orange-ish color.
var/eye_safety_modifier = 0 // Increasing this will make less eye protection needed to stop eye damage. IE at 1, sunglasses will fully protect.
var/burned_fuel_for = 0 // Keeps track of how long the welder's been on, used to gradually empty the welder if left one, without RNG.
var/always_process = FALSE // If true, keeps the welder on the process list even if it's off. Used for when it needs to regenerate fuel.
toolspeed = 1
drop_sound = 'sound/items/drop/weldingtool.ogg'
pickup_sound = 'sound/items/pickup/weldingtool.ogg'
/obj/item/weapon/weldingtool/Initialize()
. = ..()
// var/random_fuel = min(rand(10,20),max_fuel)
var/datum/reagents/R = new/datum/reagents(max_fuel)
reagents = R
R.my_atom = src
R.add_reagent("fuel", max_fuel)
update_icon()
if(always_process)
START_PROCESSING(SSobj, src)
/obj/item/weapon/weldingtool/Destroy()
if(welding || always_process)
STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/weapon/weldingtool/examine(mob/user)
. = ..()
if(max_fuel && loc == user)
. += "It contains [get_fuel()]/[src.max_fuel] units of fuel!"
/obj/item/weapon/weldingtool/attack(atom/A, mob/living/user, def_zone)
if(ishuman(A) && user.a_intent == I_HELP)
var/mob/living/carbon/human/H = A
var/obj/item/organ/external/S = H.organs_by_name[user.zone_sel.selecting]
if(!S || S.robotic < ORGAN_ROBOT || S.open == 3)
return ..()
if(S.organ_tag == BP_HEAD)
if(H.head && istype(H.head,/obj/item/clothing/head/helmet/space))
to_chat(user, "<span class='warning'>You can't apply [src] through [H.head]!</span>")
return 1
else
if(H.wear_suit && istype(H.wear_suit,/obj/item/clothing/suit/space))
to_chat(user, "<span class='warning'>You can't apply [src] through [H.wear_suit]!</span>")
return 1
if(!welding)
to_chat(user, "<span class='warning'>You'll need to turn [src] on to patch the damage on [H]'s [S.name]!</span>")
return 1
if(S.robo_repair(15, BRUTE, "some dents", src, user))
remove_fuel(1, user)
return 1
return ..()
/obj/item/weapon/weldingtool/attackby(obj/item/W as obj, mob/living/user as mob)
if(istype(W,/obj/item/weapon/tool/screwdriver))
if(welding)
to_chat(user, "<span class='danger'>Stop welding first!</span>")
return
status = !status
if(status)
to_chat(user, "<span class='notice'>You secure the welder.</span>")
else
to_chat(user, "<span class='notice'>The welder can now be attached and modified.</span>")
src.add_fingerprint(user)
return
if((!status) && (istype(W,/obj/item/stack/rods)))
var/obj/item/stack/rods/R = W
R.use(1)
var/obj/item/weapon/flamethrower/F = new/obj/item/weapon/flamethrower(user.loc)
src.loc = F
F.weldtool = src
if (user.client)
user.client.screen -= src
if (user.r_hand == src)
user.remove_from_mob(src)
else
user.remove_from_mob(src)
src.master = F
src.layer = initial(src.layer)
user.remove_from_mob(src)
if (user.client)
user.client.screen -= src
src.loc = F
src.add_fingerprint(user)
return
..()
return
/obj/item/weapon/weldingtool/process()
if(welding)
++burned_fuel_for
if(burned_fuel_for >= WELDER_FUEL_BURN_INTERVAL)
remove_fuel(1)
if(get_fuel() < 1)
setWelding(0)
else //Only start fires when its on and has enough fuel to actually keep working
var/turf/location = src.loc
if(istype(location, /mob/living))
var/mob/living/M = location
if(M.item_is_in_hands(src))
location = get_turf(M)
if (istype(location, /turf))
location.hotspot_expose(700, 5)
/obj/item/weapon/weldingtool/afterattack(obj/O as obj, mob/user as mob, proximity)
if(!proximity) return
if (istype(O, /obj/structure/reagent_dispensers/fueltank) && get_dist(src,O) <= 1)
if(!welding && max_fuel)
O.reagents.trans_to_obj(src, max_fuel)
to_chat(user, "<span class='notice'>Welder refueled</span>")
playsound(src, 'sound/effects/refill.ogg', 50, 1, -6)
return
else if(!welding)
to_chat(user, "<span class='notice'>[src] doesn't use fuel.</span>")
return
else
message_admins("[key_name_admin(user)] triggered a fueltank explosion with a welding tool.")
log_game("[key_name(user)] triggered a fueltank explosion with a welding tool.")
to_chat(user, "<span class='danger'>You begin welding on the fueltank and with a moment of lucidity you realize, this might not have been the smartest thing you've ever done.</span>")
var/obj/structure/reagent_dispensers/fueltank/tank = O
tank.explode()
return
if (src.welding)
remove_fuel(1)
var/turf/location = get_turf(user)
if(isliving(O))
var/mob/living/L = O
L.IgniteMob()
if (istype(location, /turf))
location.hotspot_expose(700, 50, 1)
/obj/item/weapon/weldingtool/attack_self(mob/user)
setWelding(!welding, user)
//Returns the amount of fuel in the welder
/obj/item/weapon/weldingtool/proc/get_fuel()
return reagents.get_reagent_amount("fuel")
/obj/item/weapon/weldingtool/proc/get_max_fuel()
return max_fuel
//Removes fuel from the welding tool. If a mob is passed, it will perform an eyecheck on the mob. This should probably be renamed to use()
/obj/item/weapon/weldingtool/proc/remove_fuel(var/amount = 1, var/mob/M = null)
if(!welding)
return 0
if(amount)
burned_fuel_for = 0 // Reset the counter since we're removing fuel.
if(get_fuel() >= amount)
reagents.remove_reagent("fuel", amount)
if(M)
eyecheck(M)
update_icon()
return 1
else
if(M)
to_chat(M, "<span class='notice'>You need more welding fuel to complete this task.</span>")
update_icon()
return 0
//Returns whether or not the welding tool is currently on.
/obj/item/weapon/weldingtool/proc/isOn()
return welding
/obj/item/weapon/weldingtool/update_icon()
..()
overlays.Cut()
// Welding overlay.
if(welding)
var/image/I = image(icon, src, "[icon_state]-on")
overlays.Add(I)
item_state = "[initial(item_state)]1"
else
item_state = initial(item_state)
// Fuel counter overlay.
if(change_icons && get_max_fuel())
var/ratio = get_fuel() / get_max_fuel()
ratio = CEILING(ratio * 4, 1) * 25
var/image/I = image(icon, src, "[icon_state][ratio]")
overlays.Add(I)
// Lights
if(welding && flame_intensity)
set_light(flame_intensity, flame_intensity, flame_color)
else
set_light(0)
// icon_state = welding ? "[icon_state]1" : "[initial(icon_state)]"
var/mob/M = loc
if(istype(M))
M.update_inv_l_hand()
M.update_inv_r_hand()
/obj/item/weapon/weldingtool/MouseDrop(obj/over_object as obj)
if(!canremove)
return
if (ishuman(usr) || issmall(usr)) //so monkeys can take off their backpacks -- Urist
if (istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech. why?
return
if (!( istype(over_object, /obj/screen) ))
return ..()
//makes sure that the thing is equipped, so that we can't drag it into our hand from miles away.
//there's got to be a better way of doing this.
if (!(src.loc == usr) || (src.loc && src.loc.loc == usr))
return
if (( usr.restrained() ) || ( usr.stat ))
return
if ((src.loc == usr) && !(istype(over_object, /obj/screen)) && !usr.unEquip(src))
return
switch(over_object.name)
if("r_hand")
usr.u_equip(src)
usr.put_in_r_hand(src)
if("l_hand")
usr.u_equip(src)
usr.put_in_l_hand(src)
src.add_fingerprint(usr)
//Sets the welding state of the welding tool. If you see W.welding = 1 anywhere, please change it to W.setWelding(1)
//so that the welding tool updates accordingly
/obj/item/weapon/weldingtool/proc/setWelding(var/set_welding, var/mob/M)
if(!status) return
var/turf/T = get_turf(src)
//If we're turning it on
if(set_welding && !welding)
if (get_fuel() > 0)
if(M)
to_chat(M, "<span class='notice'>You switch the [src] on.</span>")
else if(T)
T.visible_message("<span class='danger'>\The [src] turns on.</span>")
playsound(src, acti_sound, 50, 1)
src.force = 15
src.damtype = "fire"
src.w_class = ITEMSIZE_LARGE
src.hitsound = 'sound/items/welder.ogg'
welding = 1
update_icon()
if(!always_process)
START_PROCESSING(SSobj, src)
else
if(M)
var/msg = max_fuel ? "welding fuel" : "charge"
to_chat(M, "<span class='notice'>You need more [msg] to complete this task.</span>")
return
//Otherwise
else if(!set_welding && welding)
if(!always_process)
STOP_PROCESSING(SSobj, src)
if(M)
to_chat(M, "<span class='notice'>You switch \the [src] off.</span>")
else if(T)
T.visible_message("<span class='warning'>\The [src] turns off.</span>")
playsound(src, deac_sound, 50, 1)
src.force = 3
src.damtype = "brute"
src.w_class = initial(src.w_class)
src.welding = 0
src.hitsound = initial(src.hitsound)
update_icon()
//Decides whether or not to damage a player's eyes based on what they're wearing as protection
//Note: This should probably be moved to mob
/obj/item/weapon/weldingtool/proc/eyecheck(mob/living/carbon/user)
if(!istype(user))
return 1
var/safety = user.eyecheck()
safety = between(-1, safety + eye_safety_modifier, 2)
if(istype(user, /mob/living/carbon/human))
var/mob/living/carbon/human/H = user
var/obj/item/organ/internal/eyes/E = H.internal_organs_by_name[O_EYES]
if(!E)
return
switch(safety)
if(1)
to_chat(usr, "<span class='warning'>Your eyes sting a little.</span>")
E.damage += rand(1, 2)
if(E.damage > 12)
user.eye_blurry += rand(3,6)
if(0)
to_chat(usr, "<span class='warning'>Your eyes burn.</span>")
E.damage += rand(2, 4)
if(E.damage > 10)
E.damage += rand(4,10)
if(-1)
to_chat(usr, "<span class='danger'>Your thermals intensify the welder's glow. Your eyes itch and burn severely.</span>")
user.eye_blurry += rand(12,20)
E.damage += rand(12, 16)
if(safety<2)
if(E.damage > 10)
to_chat(user, "<span class='warning'>Your eyes are really starting to hurt. This can't be good for you!</span>")
if (E.damage >= E.min_broken_damage)
to_chat(user, "<span class='danger'>You go blind!</span>")
user.sdisabilities |= BLIND
else if (E.damage >= E.min_bruised_damage)
to_chat(user, "<span class='danger'>You go blind!</span>")
user.Blind(5)
user.eye_blurry = 5
// Don't cure being nearsighted
if(!(H.disabilities & NEARSIGHTED))
user.disabilities |= NEARSIGHTED
spawn(100)
user.disabilities &= ~NEARSIGHTED
return
/obj/item/weapon/weldingtool/is_hot()
return isOn()
/obj/item/weapon/weldingtool/largetank
name = "industrial welding tool"
desc = "A slightly larger welder with a larger tank."
icon_state = "indwelder"
max_fuel = 40
origin_tech = list(TECH_ENGINEERING = 2, TECH_PHORON = 2)
matter = list(MAT_STEEL = 70, "glass" = 60)
/obj/item/weapon/weldingtool/largetank/cyborg
name = "integrated welding tool"
desc = "An advanced welder designed to be used in robotic systems."
toolspeed = 0.5
/obj/item/weapon/weldingtool/hugetank
name = "upgraded welding tool"
desc = "A much larger welder with a huge tank."
icon_state = "indwelder"
max_fuel = 80
w_class = ITEMSIZE_NORMAL
origin_tech = list(TECH_ENGINEERING = 3)
matter = list(MAT_STEEL = 70, "glass" = 120)
/obj/item/weapon/weldingtool/mini
name = "emergency welding tool"
desc = "A miniature welder used during emergencies."
icon_state = "miniwelder"
max_fuel = 10
w_class = ITEMSIZE_SMALL
matter = list(MAT_METAL = 30, MAT_GLASS = 10)
change_icons = 0
toolspeed = 2
eye_safety_modifier = 1 // Safer on eyes.
/datum/category_item/catalogue/anomalous/precursor_a/alien_welder
name = "Precursor Alpha Object - Self Refueling Exothermic Tool"
desc = "An unwieldly tool which somewhat resembles a weapon, due to \
having a prominent trigger attached to the part which would presumably \
have been held by whatever had created this object. When the trigger is \
held down, a small but very high temperature flame shoots out from the \
tip of the tool. The grip is able to be held by human hands, however the \
shape makes it somewhat awkward to hold.\
<br><br>\
The tool appears to utilize an unknown fuel to light and maintain the \
flame. What is more unusual, is that the fuel appears to replenish itself. \
How it does this is not known presently, however experimental human-made \
welders have been known to have a similar quality.\
<br><br>\
Interestingly, the flame is able to cut through a wide array of materials, \
such as iron, steel, stone, lead, plasteel, and even durasteel. Yet, it is unable \
to cut the unknown material that itself and many other objects made by this \
precursor civilization have made. This raises questions on the properties of \
that material, and how difficult it would have been to work with. This tool \
does demonstrate, however, that the alien fuel cannot melt precursor beams, walls, \
or other structual elements, making it rather limited for their \
deconstruction purposes."
value = CATALOGUER_REWARD_EASY
/obj/item/weapon/weldingtool/alien
name = "alien welding tool"
desc = "An alien welding tool. Whatever fuel it uses, it never runs out."
catalogue_data = list(/datum/category_item/catalogue/anomalous/precursor_a/alien_welder)
icon = 'icons/obj/abductor.dmi'
icon_state = "welder"
toolspeed = 0.1
flame_color = "#6699FF" // Light bluish.
eye_safety_modifier = 2
change_icons = 0
origin_tech = list(TECH_PHORON = 5 ,TECH_ENGINEERING = 5)
always_process = TRUE
/obj/item/weapon/weldingtool/alien/process()
if(get_fuel() <= get_max_fuel())
reagents.add_reagent("fuel", 1)
..()
/obj/item/weapon/weldingtool/experimental
name = "experimental welding tool"
desc = "An experimental welder capable of synthesizing its own fuel from waste compounds. It can output a flame hotter than regular welders."
icon_state = "exwelder"
max_fuel = 40
w_class = ITEMSIZE_NORMAL
origin_tech = list(TECH_ENGINEERING = 4, TECH_PHORON = 3)
matter = list(MAT_STEEL = 70, "glass" = 120)
toolspeed = 0.5
change_icons = 0
flame_intensity = 3
always_process = TRUE
var/nextrefueltick = 0
/obj/item/weapon/weldingtool/experimental/process()
..()
if(get_fuel() < get_max_fuel() && nextrefueltick < world.time)
nextrefueltick = world.time + 10
reagents.add_reagent("fuel", 1)
/obj/item/weapon/weldingtool/experimental/hybrid
name = "strange welding tool"
desc = "An experimental welder capable of synthesizing its own fuel from spatial waveforms. It's like welding with a star!"
icon_state = "hybwelder"
max_fuel = 80 //more max fuel is better! Even if it doesn't actually use fuel.
eye_safety_modifier = -2 // Brighter than the sun. Literally, you can look at the sun with a welding mask of proper grade, this will burn through that.
toolspeed = 0.25
w_class = ITEMSIZE_NORMAL
flame_intensity = 5
origin_tech = list(TECH_ENGINEERING = 5, TECH_PHORON = 4, TECH_PRECURSOR = 1)
reach = 2
/*
* Backpack Welder.
*/
/obj/item/weapon/weldingtool/tubefed
name = "tube-fed welding tool"
desc = "A bulky, cooler-burning welding tool that draws from a worn welding tank."
icon_state = "tubewelder"
max_fuel = 10
w_class = ITEMSIZE_NO_CONTAINER
matter = null
toolspeed = 1.25
change_icons = 0
flame_intensity = 1
eye_safety_modifier = 1
always_process = TRUE
var/obj/item/weapon/weldpack/mounted_pack = null
/obj/item/weapon/weldingtool/tubefed/Initialize(var/ml)
. = ..()
if(istype(loc, /obj/item/weapon/weldpack))
mounted_pack = loc
else
return INITIALIZE_HINT_QDEL
/obj/item/weapon/weldingtool/tubefed/Destroy()
mounted_pack.nozzle = null
mounted_pack = null
return ..()
/obj/item/weapon/weldingtool/tubefed/process()
if(mounted_pack)
if(!istype(mounted_pack.loc,/mob/living/carbon/human))
mounted_pack.return_nozzle()
else
var/mob/living/carbon/human/H = mounted_pack.loc
if(H.back != mounted_pack)
mounted_pack.return_nozzle()
if(mounted_pack.loc != src.loc && src.loc != mounted_pack)
mounted_pack.return_nozzle()
visible_message("<span class='notice'>\The [src] retracts to its fueltank.</span>")
if(get_fuel() <= get_max_fuel())
mounted_pack.reagents.trans_to_obj(src, 1)
..()
/obj/item/weapon/weldingtool/tubefed/dropped(mob/user)
..()
if(src.loc != user)
mounted_pack.return_nozzle()
to_chat(user, "<span class='notice'>\The [src] retracts to its fueltank.</span>")
/obj/item/weapon/weldingtool/tubefed/survival
name = "tube-fed emergency welding tool"
desc = "A bulky, cooler-burning welding tool that draws from a worn welding tank."
icon_state = "tubewelder"
max_fuel = 5
toolspeed = 1.75
eye_safety_modifier = 2
/*
* Electric/Arc Welder
*/
/obj/item/weapon/weldingtool/electric //AND HIS WELDING WAS ELECTRIC
name = "electric welding tool"
desc = "A welder which runs off of electricity."
icon_state = "arcwelder"
max_fuel = 0 //We'll handle the consumption later.
item_state = "ewelder"
var/obj/item/weapon/cell/power_supply //What type of power cell this uses
var/charge_cost = 24 //The rough equivalent of 1 unit of fuel, based on us wanting 10 welds per battery
var/cell_type = /obj/item/weapon/cell/device
var/use_external_power = 0 //If in a borg or hardsuit, this needs to = 1
flame_color = "#00CCFF" // Blue-ish, to set it apart from the gas flames.
acti_sound = 'sound/effects/sparks4.ogg'
deac_sound = 'sound/effects/sparks4.ogg'
/obj/item/weapon/weldingtool/electric/unloaded
cell_type = null
/obj/item/weapon/weldingtool/electric/Initialize()
. = ..()
if(cell_type == null)
update_icon()
else if(cell_type)
power_supply = new cell_type(src)
else
power_supply = new /obj/item/weapon/cell/device(src)
update_icon()
/obj/item/weapon/weldingtool/electric/get_cell()
return power_supply
/obj/item/weapon/weldingtool/electric/examine(mob/user)
. = ..()
if(Adjacent(user))
if(power_supply)
. += "It [src.name] has [get_fuel()] charge left."
else
. += "It [src.name] has no power cell!"
/obj/item/weapon/weldingtool/electric/get_fuel()
if(use_external_power)
var/obj/item/weapon/cell/external = get_external_power_supply()
if(external)
return external.charge
else if(power_supply)
return power_supply.charge
else
return 0
/obj/item/weapon/weldingtool/electric/get_max_fuel()
if(use_external_power)
var/obj/item/weapon/cell/external = get_external_power_supply()
if(external)
return external.maxcharge
else if(power_supply)
return power_supply.maxcharge
return 0
/obj/item/weapon/weldingtool/electric/remove_fuel(var/amount = 1, var/mob/M = null)
if(!welding)
return 0
if(get_fuel() >= amount)
power_supply.checked_use(charge_cost)
if(use_external_power)
var/obj/item/weapon/cell/external = get_external_power_supply()
if(!external || !external.use(charge_cost)) //Take power from the borg...
power_supply.give(charge_cost) //Give it back to the cell.
if(M)
eyecheck(M)
update_icon()
return 1
else
if(M)
to_chat(M, "<span class='notice'>You need more energy to complete this task.</span>")
update_icon()
return 0
/obj/item/weapon/weldingtool/electric/attack_hand(mob/user as mob)
if(user.get_inactive_hand() == src)
if(power_supply)
power_supply.update_icon()
user.put_in_hands(power_supply)
power_supply = null
to_chat(user, "<span class='notice'>You remove the cell from the [src].</span>")
setWelding(0)
update_icon()
return
..()
else
return ..()
/obj/item/weapon/weldingtool/electric/attackby(obj/item/weapon/W, mob/user as mob)
if(istype(W, /obj/item/weapon/cell))
if(istype(W, /obj/item/weapon/cell/device))
if(!power_supply)
user.drop_item()
W.loc = src
power_supply = W
to_chat(user, "<span class='notice'>You install a cell in \the [src].</span>")
update_icon()
else
to_chat(user, "<span class='notice'>\The [src] already has a cell.</span>")
else
to_chat(user, "<span class='notice'>\The [src] cannot use that type of cell.</span>")
else
..()
/obj/item/weapon/weldingtool/electric/proc/get_external_power_supply()
if(isrobot(src.loc))
var/mob/living/silicon/robot/R = src.loc
return R.cell
if(istype(src.loc, /obj/item/rig_module))
var/obj/item/rig_module/module = src.loc
if(module.holder && module.holder.wearer)
var/mob/living/carbon/human/H = module.holder.wearer
if(istype(H) && H.back)
var/obj/item/weapon/rig/suit = H.back
if(istype(suit))
return suit.cell
if(istype(src.loc, /obj/item/mecha_parts/mecha_equipment))
var/obj/item/mecha_parts/mecha_equipment/mounting = src.loc
if(mounting.chassis && mounting.chassis.cell)
return mounting.chassis.cell
return null
/obj/item/weapon/weldingtool/electric/mounted
use_external_power = 1
/obj/item/weapon/weldingtool/electric/mounted/cyborg
toolspeed = 0.5
/obj/item/weapon/weldingtool/electric/mounted/exosuit
var/obj/item/mecha_parts/mecha_equipment/equip_mount = null
flame_intensity = 1
eye_safety_modifier = 2
always_process = TRUE
/obj/item/weapon/weldingtool/electric/mounted/exosuit/Initialize()
. = ..()
if(istype(loc, /obj/item/mecha_parts/mecha_equipment))
equip_mount = loc
/obj/item/weapon/weldingtool/electric/mounted/exosuit/process()
..()
if(equip_mount && equip_mount.chassis)
var/obj/mecha/M = equip_mount.chassis
if(M.selected == equip_mount && get_fuel())
setWelding(TRUE, M.occupant)
else
setWelding(FALSE, M.occupant)
#undef WELDER_FUEL_BURN_INTERVAL
@@ -1,118 +0,0 @@
/*
* Wirecutters
*/
/obj/item/weapon/tool/wirecutters
name = "wirecutters"
desc = "This cuts wires."
icon = 'icons/obj/tools.dmi'
icon_state = "cutters"
center_of_mass = list("x" = 18,"y" = 10)
slot_flags = SLOT_BELT
force = 6
throw_speed = 2
throw_range = 9
w_class = ITEMSIZE_SMALL
origin_tech = list(TECH_MATERIAL = 1, TECH_ENGINEERING = 1)
matter = list(MAT_STEEL = 80)
attack_verb = list("pinched", "nipped")
hitsound = 'sound/items/wirecutter.ogg'
usesound = 'sound/items/wirecutter.ogg'
drop_sound = 'sound/items/drop/wirecutter.ogg'
pickup_sound = 'sound/items/pickup/wirecutter.ogg'
sharp = 1
edge = 1
toolspeed = 1
tool_qualities = list(TOOL_WIRECUTTER)
var/random_color = TRUE
/obj/item/weapon/tool/wirecutters/Initialize()
if(random_color && prob(50))
icon_state = "cutters-y"
item_state = "cutters_yellow"
. = ..()
/obj/item/weapon/tool/wirecutters/attack(mob/living/carbon/C as mob, mob/user as mob)
if(istype(C) && user.a_intent == I_HELP && (C.handcuffed) && (istype(C.handcuffed, /obj/item/weapon/handcuffs/cable)))
usr.visible_message("\The [usr] cuts \the [C]'s restraints with \the [src]!",\
"You cut \the [C]'s restraints with \the [src]!",\
"You hear cable being cut.")
C.handcuffed = null
if(C.buckled && C.buckled.buckle_require_restraints)
C.buckled.unbuckle_mob()
C.update_handcuffed()
return
else
..()
/datum/category_item/catalogue/anomalous/precursor_a/alien_wirecutters
name = "Precursor Alpha Object - Wire Seperator"
desc = "An object appearing to have a tool shape. It has two handles, and two \
sides which are attached to each other in the center. At the end on each side \
is a sharp cutting edge, made from a seperate material than the rest of the \
tool.\
<br><br>\
This tool appears to serve the same purpose as conventional wirecutters, due \
to how similar the shapes are. If so, this implies that the creators of this \
object also may utilize flexible cylindrical strands of metal to transmit \
energy and signals, just as humans do."
value = CATALOGUER_REWARD_EASY
/obj/item/weapon/tool/wirecutters/alien
name = "alien wirecutters"
desc = "Extremely sharp wirecutters, made out of a silvery-green metal."
catalogue_data = list(/datum/category_item/catalogue/anomalous/precursor_a/alien_wirecutters)
icon = 'icons/obj/abductor.dmi'
icon_state = "cutters"
toolspeed = 0.1
origin_tech = list(TECH_MATERIAL = 5, TECH_ENGINEERING = 4)
random_color = FALSE
/obj/item/weapon/tool/wirecutters/cyborg
name = "wirecutters"
desc = "This cuts wires. With science."
usesound = 'sound/items/jaws_cut.ogg'
toolspeed = 0.5
/obj/item/weapon/tool/wirecutters/hybrid
name = "strange wirecutters"
desc = "This cuts wires. With <span class='alien'>Science!</span>"
icon_state = "hybcutters"
w_class = ITEMSIZE_NORMAL
origin_tech = list(TECH_MATERIAL = 3, TECH_ENGINEERING = 3, TECH_PHORON = 2)
attack_verb = list("pinched", "nipped", "warped", "blasted")
usesound = 'sound/effects/stealthoff.ogg'
toolspeed = 0.4
reach = 2
/obj/item/weapon/tool/wirecutters/power
name = "jaws of life"
desc = "A set of jaws of life, compressed through the magic of science. It's fitted with a cutting head."
icon_state = "jaws_cutter"
item_state = "jawsoflife"
origin_tech = list(TECH_MATERIAL = 2, TECH_ENGINEERING = 2)
matter = list(MAT_METAL=150, MAT_SILVER=50)
usesound = 'sound/items/jaws_cut.ogg'
force = 15
toolspeed = 0.25
random_color = FALSE
var/obj/item/weapon/tool/crowbar/power/counterpart = null
/obj/item/weapon/tool/wirecutters/power/Initialize(var/ml, no_counterpart = TRUE)
. = ..(ml)
if(!counterpart && no_counterpart)
counterpart = new(src, FALSE)
counterpart.counterpart = src
/obj/item/weapon/tool/wirecutters/power/Destroy()
if(counterpart)
counterpart.counterpart = null // So it can qdel cleanly.
QDEL_NULL(counterpart)
return ..()
/obj/item/weapon/tool/wirecutters/power/attack_self(mob/user)
playsound(src, 'sound/items/change_jaws.ogg', 50, 1)
user.drop_item(src)
counterpart.forceMove(get_turf(src))
src.forceMove(counterpart)
user.put_in_active_hand(counterpart)
to_chat(user, "<span class='notice'>You attach the pry jaws to [src].</span>")
@@ -1,102 +0,0 @@
/*
* Wrench
*/
/obj/item/weapon/tool/wrench
name = "wrench"
desc = "A wrench with many common uses. Can be usually found in your hand."
icon = 'icons/obj/tools.dmi'
icon_state = "wrench"
slot_flags = SLOT_BELT
force = 6
throwforce = 7
w_class = ITEMSIZE_SMALL
origin_tech = list(TECH_MATERIAL = 1, TECH_ENGINEERING = 1)
matter = list(MAT_STEEL = 150)
attack_verb = list("bashed", "battered", "bludgeoned", "whacked")
usesound = 'sound/items/ratchet.ogg'
toolspeed = 1
drop_sound = 'sound/items/drop/wrench.ogg'
pickup_sound = 'sound/items/pickup/wrench.ogg'
tool_qualities = list(TOOL_WRENCH)
/obj/item/weapon/tool/wrench/cyborg
name = "automatic wrench"
desc = "An advanced robotic wrench. Can be found in industrial synthetic shells."
usesound = 'sound/items/drill_use.ogg'
toolspeed = 0.5
/obj/item/weapon/tool/wrench/hybrid // Slower and bulkier than normal power tools, but it has the power of reach. If reach even worked half the time.
name = "strange wrench"
desc = "A wrench with many common uses. Can be usually found in your hand."
icon = 'icons/obj/tools.dmi'
icon_state = "hybwrench"
slot_flags = SLOT_BELT
force = 8
throwforce = 10
w_class = ITEMSIZE_NORMAL
origin_tech = list(TECH_MATERIAL = 3, TECH_ENGINEERING = 3, TECH_PHORON = 2)
attack_verb = list("bashed", "battered", "bludgeoned", "whacked", "warped", "blasted")
usesound = 'sound/effects/stealthoff.ogg'
toolspeed = 0.5
reach = 2
/datum/category_item/catalogue/anomalous/precursor_a/alien_wrench
name = "Precursor Alpha Object - Fastener Torque Tool"
desc = "This is an object that has a distinctive tool shape. \
It has a handle on one end, with a simple mechanism attached to it. \
On the other end is the head of the tool, with two sides each glowing \
a different color. The head opens up towards the top, in a similar shape \
as a conventional wrench.\
<br><br>\
When an object is placed into the head section of the tool, the tool appears \
to force the object to be turned in a specific direction. The direction can be \
inverted by pressing down on the mechanism on the handle. It is not known if \
this tool was intended by its creators to tighten fasteners or if it has a less obvious \
purpose, however it is very well suited to act in a wrench's capacity regardless."
value = CATALOGUER_REWARD_EASY
/obj/item/weapon/tool/wrench/alien
name = "alien wrench"
desc = "A polarized wrench. It causes anything placed between the jaws to turn."
catalogue_data = list(/datum/category_item/catalogue/anomalous/precursor_a/alien_wrench)
icon = 'icons/obj/abductor.dmi'
icon_state = "wrench"
usesound = 'sound/effects/empulse.ogg'
toolspeed = 0.1
origin_tech = list(TECH_MATERIAL = 5, TECH_ENGINEERING = 5)
/obj/item/weapon/tool/wrench/power
name = "hand drill"
desc = "A simple powered hand drill. It's fitted with a bolt bit."
icon_state = "drill_bolt"
item_state = "drill"
usesound = 'sound/items/drill_use.ogg'
matter = list(MAT_STEEL = 150, MAT_SILVER = 50)
origin_tech = list(TECH_MATERIAL = 2, TECH_ENGINEERING = 2)
force = 8
w_class = ITEMSIZE_SMALL
throwforce = 8
attack_verb = list("drilled", "screwed", "jabbed")
toolspeed = 0.25
var/obj/item/weapon/tool/screwdriver/power/counterpart = null
/obj/item/weapon/tool/wrench/power/Initialize(var/ml, no_counterpart = TRUE)
. = ..()
if(!counterpart && no_counterpart)
counterpart = new(src, FALSE)
counterpart.counterpart = src
/obj/item/weapon/tool/wrench/power/Destroy()
if(counterpart)
counterpart.counterpart = null // So it can qdel cleanly.
QDEL_NULL(counterpart)
return ..()
/obj/item/weapon/tool/wrench/power/attack_self(mob/user)
playsound(src,'sound/items/change_drill.ogg',50,1)
user.drop_item(src)
counterpart.forceMove(get_turf(src))
src.forceMove(counterpart)
user.put_in_active_hand(counterpart)
to_chat(user, "<span class='notice'>You attach the screw driver bit to [src].</span>")
+2 -2
View File
@@ -244,7 +244,7 @@
var/inc_damage = W.force
if(W.is_wirecutter())
if(W.get_tool_quality(TOOL_WIRECUTTER))
if(!shock(user, 100, pick(BP_L_HAND, BP_R_HAND)))
playsound(src, W.usesound, 100, 1)
inc_damage *= 3
@@ -317,7 +317,7 @@
var/mob/living/L = user
L.electrocute_act(PN_damage, src, 0.8)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
s.set_up(3, 1, src)
s.start()
if(user.stunned)
-1
View File
@@ -10,7 +10,6 @@
var/catchable = 1 // can it be caught on throws/flying?
var/sharp = 0 // whether this object cuts
var/edge = 0 // whether this object is more likely to dismember
var/pry = 0 //Used in attackby() to open doors
var/in_use = 0 // If we have a user using us, this will be set on. We will check if the user has stopped using us, and thus stop updating and LAGGING EVERYTHING!
var/damtype = "brute"
var/armor_penetration = 0
+4 -4
View File
@@ -25,8 +25,8 @@
/obj/random/tool/powermaint/item_to_spawn()
return pick(prob(320);/obj/random/tool,
prob(1);/obj/item/weapon/tool/screwdriver/power,
prob(1);/obj/item/weapon/tool/wirecutters/power,
prob(1);/obj/item/weapon/tool/powerdrill,
prob(1);/obj/item/weapon/tool/hydraulic_cutter,
prob(15);/obj/item/weapon/weldingtool/electric,
prob(5);/obj/item/weapon/weldingtool/experimental)
@@ -36,8 +36,8 @@
icon_state = "tool_2"
/obj/random/tool/power/item_to_spawn()
return pick(/obj/item/weapon/tool/screwdriver/power,
/obj/item/weapon/tool/wirecutters/power,
return pick(/obj/item/weapon/tool/powerdrill,
/obj/item/weapon/tool/hydraulic_cutter,
/obj/item/weapon/weldingtool/electric,
/obj/item/weapon/weldingtool/experimental)
+1 -1
View File
@@ -29,7 +29,7 @@ LINEN BINS
return
/obj/item/weapon/bedsheet/attackby(obj/item/I, mob/user)
if(is_sharp(I))
if(I.sharp)
user.visible_message("<span class='notice'>\The [user] begins cutting up [src] with [I].</span>", "<span class='notice'>You begin cutting up [src] with [I].</span>")
if(do_after(user, 50))
to_chat(user, "<span class='notice'>You cut [src] into pieces!</span>")
+1 -1
View File
@@ -83,7 +83,7 @@
if(WT.isOn() && WT.remove_fuel(0, user))
deconstruct(user)
return
if(C.is_crowbar() && plated_tile)
if(C.get_tool_quality(TOOL_CROWBAR) && plated_tile)
hatch_open = !hatch_open
if(hatch_open)
playsound(src, 'sound/items/Crowbar.ogg', 100, 2)
@@ -23,8 +23,8 @@
//then open it in a populated area to crash clients.
var/storage_cost = 40 //How much space this closet takes up if it's stuffed in another closet
var/open_sound = 'sound/machines/click.ogg'
var/close_sound = 'sound/machines/click.ogg'
var/open_sound = 'sound/machines/closet/closet_open.ogg'
var/close_sound = 'sound/machines/closet/closet_close.ogg'
var/store_misc = 1 //Chameleon item check
var/store_items = 1 //Will the closet store items?
@@ -277,13 +277,13 @@
return
/obj/structure/closet/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(W.is_wrench())
if(W.get_tool_quality(TOOL_WRENCH))
if(opened)
if(anchored)
user.visible_message("\The [user] begins unsecuring \the [src] from the floor.", "You start unsecuring \the [src] from the floor.")
else
user.visible_message("\The [user] begins securing \the [src] to the floor.", "You start securing \the [src] to the floor.")
if(do_after(user, 20 * W.toolspeed))
if(do_after(user, 20 * W.get_tool_speed(TOOL_WRENCH)))
if(!src) return
to_chat(user, "<span class='notice'>You [anchored? "un" : ""]secured \the [src]!</span>")
anchored = !anchored
@@ -332,7 +332,7 @@
else if(seal_tool)
if(istype(W, seal_tool))
var/obj/item/weapon/S = W
if(istype(S, /obj/item/weapon/weldingtool))
if(S.get_tool_quality(TOOL_WELDER))
var/obj/item/weapon/weldingtool/WT = S
if(!WT.remove_fuel(0,user))
if(!WT.isOn())
@@ -340,7 +340,7 @@
else
to_chat(user, "<span class='notice'>You need more welding fuel to complete this task.</span>")
return
if(do_after(user, 20 * S.toolspeed))
if(do_after(user, 20 * S.get_tool_speed(TOOL_WELDER)))
playsound(src, S.usesound, 50)
sealed = !sealed
update_icon()
@@ -6,6 +6,8 @@
icon_state = "closed_unlocked"
seal_tool = /obj/item/weapon/tool/screwdriver
breakout_sound = 'sound/weapons/tablehit1.ogg'
open_sound = 'sound/machines/closet/crate_open.ogg'
close_sound = 'sound/machines/closet/crate_close.ogg'
closet_appearance = null // Special icon for us
door_anim_time = 0 //Unsupported
@@ -68,11 +70,11 @@
/obj/structure/closet/grave/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(src.opened)
if(istype(W, /obj/item/weapon/shovel))
if(W.get_tool_quality(TOOL_SHOVEL))
user.visible_message("<span class='notice'>[user] piles dirt into \the [src.name].</span>", \
"<span class='notice'>You start to pile dirt into \the [src.name].</span>", \
"<span class='notice'>You hear dirt being moved.</span>")
if(do_after(user, 40 * W.toolspeed))
if(do_after(user, 40 * W.get_tool_speed(TOOL_SHOVEL)))
user.visible_message("<span class='notice'>[user] pats down the dirt on top of \the [src.name].</span>", \
"<span class='notice'>You finish filling in \the [src.name].</span>")
close()
@@ -104,12 +106,12 @@
if(W)
W.forceMove(src.loc)
else
if(istype(W, /obj/item/weapon/shovel))
if(W.get_tool_quality(TOOL_SHOVEL))
if(user.a_intent == I_HURT) // Hurt intent means you're trying to kill someone, or just get rid of the grave
user.visible_message("<span class='notice'>[user] begins to smoothe out the dirt of \the [src.name].</span>", \
"<span class='notice'>You start to smoothe out the dirt of \the [src.name].</span>", \
"<span class='notice'>You hear dirt being moved.</span>")
if(do_after(user, 40 * W.toolspeed))
if(do_after(user, 40 * W.get_tool_speed(TOOL_SHOVEL)))
user.visible_message("<span class='notice'>[user] finishes smoothing out \the [src.name].</span>", \
"<span class='notice'>You finish smoothing out \the [src.name].</span>")
if(LAZYLEN(contents))
@@ -125,7 +127,7 @@
user.visible_message("<span class='notice'>[user] begins to unearth \the [src.name].</span>", \
"<span class='notice'>You start to unearth \the [src.name].</span>", \
"<span class='notice'>You hear dirt being moved.</span>")
if(do_after(user, 40 * W.toolspeed))
if(do_after(user, 40 * W.get_tool_speed(TOOL_SHOVEL)))
user.visible_message("<span class='notice'>[user] reaches the bottom of \the [src.name].</span>", \
"<span class='notice'>You finish digging out \the [src.name].</span>")
break_open()
@@ -2,6 +2,8 @@
name = "booze closet"
req_access = list(access_bar)
closet_appearance = /decl/closet_appearance/cabinet/secure
open_sound = 'sound/machines/closet/closet_wood_open.ogg'
close_sound = 'sound/machines/closet/closet_wood_close.ogg'
starts_with = list(
/obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer = 10)
@@ -200,6 +200,8 @@
desc = "Store psychology tools and medicines in here."
req_access = list(access_psychiatrist)
closet_appearance = /decl/closet_appearance/cabinet/secure
open_sound = 'sound/machines/closet/closet_wood_open.ogg'
close_sound = 'sound/machines/closet/closet_wood_close.ogg'
starts_with = list(
/obj/item/clothing/under/rank/psych,
@@ -27,6 +27,8 @@
/obj/structure/closet/secure_closet/personal/cabinet
closet_appearance = /decl/closet_appearance/cabinet/secure
door_anim_time = 0 //Unsupported
open_sound = 'sound/machines/closet/closet_wood_open.ogg'
close_sound = 'sound/machines/closet/closet_wood_close.ogg'
starts_with = list(
/obj/item/weapon/storage/backpack/satchel/withwallet,
@@ -58,7 +60,7 @@
to_chat(user, "<span class='warning'>Access Denied</span>")
else if(istype(W, /obj/item/weapon/melee/energy/blade))
if(emag_act(INFINITY, user, "The locker has been sliced open by [user] with \an [W]!", "You hear metal being sliced and sparks flying."))
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread()
spark_system.set_up(5, 0, src.loc)
spark_system.start()
playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
@@ -54,13 +54,13 @@
to_chat(user, "<span class='notice'>Access Denied</span>")
/obj/structure/closet/secure_closet/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(W.is_wrench())
if(W.get_tool_quality(TOOL_WRENCH))
if(opened)
if(anchored)
user.visible_message("\The [user] begins unsecuring \the [src] from the floor.", "You start unsecuring \the [src] from the floor.")
else
user.visible_message("\The [user] begins securing \the [src] to the floor.", "You start securing \the [src] to the floor.")
if(do_after(user, 20 * W.toolspeed))
if(do_after(user, 20 * W.get_tool_speed(TOOL_WRENCH)))
if(!src) return
to_chat(user, "<span class='notice'>You [anchored? "un" : ""]secured \the [src]!</span>")
anchored = !anchored
@@ -85,7 +85,7 @@
W.forceMove(loc)
else if(istype(W, /obj/item/weapon/melee/energy/blade))
if(emag_act(INFINITY, user, "<span class='danger'>The locker has been sliced open by [user] with \an [W]</span>!", "<span class='danger'>You hear metal being sliced and sparks flying.</span>"))
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread()
spark_system.set_up(5, 0, loc)
spark_system.start()
playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
@@ -224,6 +224,8 @@
req_access = list(access_forensics_lockers)
closet_appearance = /decl/closet_appearance/cabinet/secure
door_anim_time = 0 //Unsupported
open_sound = 'sound/machines/closet/closet_wood_open.ogg'
close_sound = 'sound/machines/closet/closet_wood_close.ogg'
starts_with = list(
/obj/item/clothing/accessory/badge/holo/detective,

Some files were not shown because too many files have changed in this diff Show More