Linter diagnostics + bans non-var relative pathing

This commit is contained in:
MarinaGryphon
2021-06-20 18:16:45 -04:00
committed by VirgoBot
parent 79eefa9f83
commit 385fa640af
311 changed files with 11232 additions and 8984 deletions
@@ -24,10 +24,9 @@
/obj/effect/decal/cleanable/greenglow
New()
..()
spawn(1200)// 2 minutes
qdel(src)
/obj/effect/decal/cleanable/greenglow/New()
..()
QDEL_IN(src, 2 MINUTES)
/obj/effect/decal/cleanable/dirt
name = "dirt"
@@ -24,10 +24,10 @@ var/global/list/image/fluidtrack_cache=list()
var/crusty=0
var/image/overlay
New(_direction,_color,_wet)
src.direction=_direction
src.basecolor=_color
src.wet=_wet
/datum/fluidtrack/New(_direction,_color,_wet)
src.direction=_direction
src.basecolor=_color
src.wet=_wet
/obj/effect/decal/cleanable/blood/tracks/reveal_blood()
if(!fluorescent)
@@ -72,6 +72,7 @@ var/global/list/image/fluidtrack_cache=list()
* @param goingdir Direction tracks are going to (or 0).
* @param bloodcolor Color of the blood when wet.
*/
<<<<<<< HEAD
proc/AddTracks(var/list/DNA, var/comingdir, var/goingdir, var/bloodcolor="#A10808")
var/updated=0
// Shift our goingdir 4 spaces to the left so it's in the GOING bitblock.
@@ -152,6 +153,88 @@ var/global/list/image/fluidtrack_cache=list()
stack[stack_idx]=track
add_overlay(I)
updatedtracks=0 // Clear our memory of updated tracks.
=======
/obj/effect/decal/cleanable/blood/tracks/proc/AddTracks(var/list/DNA, var/comingdir, var/goingdir, var/bloodcolor="#A10808")
var/updated=0
// Shift our goingdir 4 spaces to the left so it's in the GOING bitblock.
var/realgoing=goingdir<<4
// Current bit
var/b=0
// When tracks will start to dry out
var/t=world.time + TRACKS_CRUSTIFY_TIME
var/datum/fluidtrack/track
// Process 4 bits
for(var/bi=0;bi<4;bi++)
b=1<<bi
// COMING BIT
// If setting
if(comingdir&b)
// If not wet or not set
if(dirs&b)
var/sid=setdirs["[b]"]
track=stack[sid]
if(track.wet==t && track.basecolor==bloodcolor)
continue
// Remove existing stack entry
stack.Remove(track)
track=new /datum/fluidtrack(b,bloodcolor,t)
stack.Add(track)
setdirs["[b]"]=stack.Find(track)
updatedtracks |= b
updated=1
// GOING BIT (shift up 4)
b=b<<4
if(realgoing&b)
// If not wet or not set
if(dirs&b)
var/sid=setdirs["[b]"]
track=stack[sid]
if(track.wet==t && track.basecolor==bloodcolor)
continue
// Remove existing stack entry
stack.Remove(track)
track=new /datum/fluidtrack(b,bloodcolor,t)
stack.Add(track)
setdirs["[b]"]=stack.Find(track)
updatedtracks |= b
updated=1
dirs |= comingdir|realgoing
if(islist(blood_DNA))
blood_DNA |= DNA.Copy()
if(updated)
update_icon()
/obj/effect/decal/cleanable/blood/tracks/update_icon()
overlays.Cut()
color = "#FFFFFF"
var/truedir=0
// Update ONLY the overlays that have changed.
for(var/datum/fluidtrack/track in stack)
var/stack_idx=setdirs["[track.direction]"]
var/state=coming_state
truedir=track.direction
if(truedir&240) // Check if we're in the GOING block
state=going_state
truedir=truedir>>4
if(track.overlay)
track.overlay=null
var/image/I = image(icon, icon_state=state, dir=num2dir(truedir))
I.color = track.basecolor
track.fresh=0
track.overlay=I
stack[stack_idx]=track
overlays += I
updatedtracks=0 // Clear our memory of updated tracks.
>>>>>>> 593246b... Linter diagnostics + bans non-var relative pathing (#8150)
/obj/effect/decal/cleanable/blood/tracks/footprints
name = "wet footprints"
+20 -15
View File
@@ -5,26 +5,31 @@
plane = DIRTY_PLANE
anchored = 1
New(location,main = "#FFFFFF",shade = "#000000",var/type = "rune")
..()
loc = location
/obj/effect/decal/cleanable/crayon/New(location,main = "#FFFFFF",shade = "#000000",var/type = "rune")
..()
loc = location
name = type
desc = "A [type] drawn in crayon."
name = type
desc = "A [type] drawn in crayon."
switch(type)
if("rune")
type = "rune[rand(1,6)]"
if("graffiti")
type = pick("amyjon","face","matt","revolution","engie","guy","end","dwarf","uboa")
switch(type)
if("rune")
type = "rune[rand(1,6)]"
if("graffiti")
type = pick("amyjon","face","matt","revolution","engie","guy","end","dwarf","uboa")
var/icon/mainOverlay = new/icon('icons/effects/crayondecal.dmi',"[type]",2.1)
var/icon/shadeOverlay = new/icon('icons/effects/crayondecal.dmi',"[type]s",2.1)
var/icon/mainOverlay = new/icon('icons/effects/crayondecal.dmi',"[type]",2.1)
var/icon/shadeOverlay = new/icon('icons/effects/crayondecal.dmi',"[type]s",2.1)
mainOverlay.Blend(main,ICON_ADD)
shadeOverlay.Blend(shade,ICON_ADD)
mainOverlay.Blend(main,ICON_ADD)
shadeOverlay.Blend(shade,ICON_ADD)
<<<<<<< HEAD
add_overlay(mainOverlay)
add_overlay(shadeOverlay)
=======
overlays += mainOverlay
overlays += shadeOverlay
>>>>>>> 593246b... Linter diagnostics + bans non-var relative pathing (#8150)
add_hiddenprint(usr)
add_hiddenprint(usr)
+177 -179
View File
@@ -23,22 +23,22 @@ would spawn and follow the beaker, even if it is carried or thrown.
var/atom/holder
var/setup = 0
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/set_up(n = 3, c = 0, turf/loc)
if(n > 10)
n = 10
number = n
cardinals = c
location = loc
setup = 1
proc/attach(atom/atom)
holder = atom
/datum/effect/effect/system/proc/attach(atom/atom)
holder = atom
proc/start()
/datum/effect/effect/system/proc/start()
Destroy()
holder = null
return ..()
/datum/effect/effect/system/Destroy()
holder = null
return ..()
/////////////////////////////////////////////
// GENERIC STEAM SPREAD SYSTEM
@@ -61,32 +61,30 @@ steam.start() -- spawns the effect
icon_state = "extinguish"
density = 0
/datum/effect/effect/system/steam_spread
/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
set_up(n = 3, c = 0, turf/loc)
if(n > 10)
n = 10
number = n
cardinals = c
location = loc
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)
/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)
@@ -125,36 +123,36 @@ steam.start() -- spawns the effect
/datum/effect/effect/system/spark_spread
var/total_sparks = 0 // To stop it being spammed and lagging!
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/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)
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--
/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--
@@ -430,46 +428,46 @@ steam.start() -- spawns the effect
var/processing = 1
var/on = 1
set_up(atom/atom)
attach(atom)
oldposition = get_turf(atom)
/datum/effect/effect/system/ion_trail_follow/set_up(atom/atom)
attach(atom)
oldposition = get_turf(atom)
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()
/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
spawn(2)
if(src.on)
src.processing = 1
src.start()
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()
proc/stop()
/datum/effect/effect/system/ion_trail_follow/proc/stop()
src.processing = 0
src.on = 0
@@ -486,95 +484,95 @@ steam.start() -- spawns the effect
var/processing = 1
var/on = 1
set_up(atom/atom)
attach(atom)
oldposition = get_turf(atom)
/datum/effect/effect/system/steam_trail_follow/set_up(atom/atom)
attach(atom)
oldposition = get_turf(atom)
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()
proc/stop()
/datum/effect/effect/system/steam_trail_follow/start()
if(!src.on)
src.on = 1
src.processing = 1
if(src.processing)
src.processing = 0
src.on = 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
set_up (amt, loc, flash = 0, flash_fact = 0)
amount = amt
if(istype(loc, /turf/))
location = loc
else
location = get_turf(loc)
/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
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
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()
// 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
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
if (round(amount/6) > 0)
heavy = heavy + amount/6
// 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/3) > 0)
light = light + amount/3
if (round(amount/6) > 0)
heavy = heavy + amount/6
if (flashing && flashing_factor)
flash = (amount/4) * flashing_factor
if (round(amount/3) > 0)
light = light + amount/3
for(var/mob/M in viewers(8, location))
to_chat(M, "<span class='warning'>The solution violently explodes.</span>")
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))
)
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))
)
+35 -35
View File
@@ -9,47 +9,47 @@
var/fleshcolor //Used for gibbed humans.
var/bloodcolor //Used for gibbed humans.
New(location, var/datum/dna/MobDNA, var/fleshcolor, var/bloodcolor)
..()
/obj/effect/gibspawner/New(location, var/datum/dna/MobDNA, var/fleshcolor, var/bloodcolor)
..()
if(fleshcolor) src.fleshcolor = fleshcolor
if(bloodcolor) src.bloodcolor = bloodcolor
Gib(loc,MobDNA)
if(fleshcolor) src.fleshcolor = fleshcolor
if(bloodcolor) src.bloodcolor = bloodcolor
Gib(loc,MobDNA)
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
/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
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()
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)
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
// Apply human species colouration to masks.
if(fleshcolor)
gib.fleshcolor = fleshcolor
if(bloodcolor)
gib.basecolor = bloodcolor
gib.update_icon()
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)
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)
qdel(src)
qdel(src)
+4 -3
View File
@@ -8,9 +8,10 @@
icon='icons/effects/beam.dmi'
icon_state="b_beam"
var/tmp/atom/BeamSource
New()
..()
spawn(10) qdel(src)
/obj/effect/overlay/beam/New()
..()
spawn(10) qdel(src)
/obj/effect/overlay/palmtree_r
name = "Palm tree"
@@ -1,27 +1,26 @@
/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
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)
New()
gibdirections = list(list(WEST, NORTHWEST, SOUTHWEST, NORTH),list(EAST, NORTHEAST, SOUTHEAST, SOUTH), list())
..()
/obj/effect/gibspawner/generic/New()
gibdirections = list(list(WEST, NORTHWEST, SOUTHWEST, NORTH),list(EAST, NORTHEAST, SOUTHEAST, SOUTH), list())
..()
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
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)
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/gibspawner/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)
..()
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
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)
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)
..()
/obj/effect/gibspawner/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)
..()
+44 -44
View File
@@ -35,57 +35,57 @@
var/nostop = 0 // if 1: will only be stopped by teleporters
var/list/affecting = list()
Trigger(var/atom/A)
if(!A || !istype(A, /atom/movable))
/obj/effect/step_trigger/thrower/Trigger(var/atom/A)
if(!A || !istype(A, /atom/movable))
return
var/atom/movable/AM = A
var/curtiles = 0
var/stopthrow = 0
for(var/obj/effect/step_trigger/thrower/T in orange(2, src))
if(AM in T.affecting)
return
var/atom/movable/AM = A
var/curtiles = 0
var/stopthrow = 0
for(var/obj/effect/step_trigger/thrower/T in orange(2, src))
if(AM in T.affecting)
return
if(ismob(AM))
var/mob/M = AM
if(immobilize)
M.canmove = 0
if(ismob(AM))
var/mob/M = AM
if(immobilize)
M.canmove = 0
affecting.Add(AM)
while(AM && !stopthrow)
if(tiles)
if(curtiles >= tiles)
break
if(AM.z != src.z)
affecting.Add(AM)
while(AM && !stopthrow)
if(tiles)
if(curtiles >= tiles)
break
if(AM.z != src.z)
break
curtiles++
curtiles++
sleep(speed)
sleep(speed)
// Calculate if we should stop the process
if(!nostop)
for(var/obj/effect/step_trigger/T in get_step(AM, direction))
if(T.stopper && T != src)
stopthrow = 1
else
for(var/obj/effect/step_trigger/teleporter/T in get_step(AM, direction))
if(T.stopper)
stopthrow = 1
// Calculate if we should stop the process
if(!nostop)
for(var/obj/effect/step_trigger/T in get_step(AM, direction))
if(T.stopper && T != src)
stopthrow = 1
else
for(var/obj/effect/step_trigger/teleporter/T in get_step(AM, direction))
if(T.stopper)
stopthrow = 1
if(AM)
var/predir = AM.dir
step(AM, direction)
if(!facedir)
AM.set_dir(predir)
if(AM)
var/predir = AM.dir
step(AM, direction)
if(!facedir)
AM.set_dir(predir)
affecting.Remove(AM)
affecting.Remove(AM)
if(ismob(AM))
var/mob/M = AM
if(immobilize)
M.canmove = 1
if(ismob(AM))
var/mob/M = AM
if(immobilize)
M.canmove = 1
/* Stops things thrown by a thrower, doesn't do anything */
@@ -156,11 +156,11 @@
var/teleport_y_offset = 0
var/teleport_z_offset = 0
Trigger(var/atom/movable/A)
if(teleport_x && teleport_y && teleport_z)
if(teleport_x_offset && teleport_y_offset && teleport_z_offset)
var/turf/T = locate(rand(teleport_x, teleport_x_offset), rand(teleport_y, teleport_y_offset), rand(teleport_z, teleport_z_offset))
A.forceMove(T)
/obj/effect/step_trigger/teleporter/random/Trigger(var/atom/movable/A)
if(teleport_x && teleport_y && teleport_z)
if(teleport_x_offset && teleport_y_offset && teleport_z_offset)
var/turf/T = locate(rand(teleport_x, teleport_x_offset), rand(teleport_y, teleport_y_offset), rand(teleport_z, teleport_z_offset))
A.forceMove(T)
/* Teleporter that sends objects stepping on it to a specific landmark. */
+1 -1
View File
@@ -4,7 +4,7 @@
// #define EMPDEBUG 10
proc/empulse(turf/epicenter, first_range, second_range, third_range, fourth_range, log=0)
/proc/empulse(turf/epicenter, first_range, second_range, third_range, fourth_range, log=0)
if(!epicenter) return
if(!istype(epicenter, /turf))
+2 -2
View File
@@ -1,6 +1,6 @@
//TODO: Flash range does nothing currently
proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = 1, z_transfer = UP|DOWN, shaped)
/proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = 1, z_transfer = UP|DOWN, shaped)
var/multi_z_scalar = config.multi_z_explosion_scalar
spawn(0)
var/start = world.timeofday
@@ -107,6 +107,6 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
defer_powernet_rebuild = 0
return 1
proc/secondaryexplosion(turf/epicenter, range)
/proc/secondaryexplosion(turf/epicenter, range)
for(var/turf/tile in range(range, epicenter))
tile.ex_act(2)
+1 -1
View File
@@ -13,7 +13,7 @@ var/list/explosion_turfs = list()
var/explosion_in_progress = 0
proc/explosion_rec(turf/epicenter, power)
/proc/explosion_rec(turf/epicenter, power)
var/loopbreak = 0
while(explosion_in_progress)
+5 -14
View File
@@ -7,26 +7,17 @@
icon_state = "bodybag_folded"
w_class = ITEMSIZE_SMALL
attack_self(mob/user)
var/obj/structure/closet/body_bag/R = new /obj/structure/closet/body_bag(user.loc)
R.add_fingerprint(user)
qdel(src)
/obj/item/bodybag/attack_self(mob/user)
var/obj/structure/closet/body_bag/R = new /obj/structure/closet/body_bag(user.loc)
R.add_fingerprint(user)
qdel(src)
/obj/item/weapon/storage/box/bodybags
name = "body bags"
desc = "This box contains body bags."
icon_state = "bodybags"
New()
..()
new /obj/item/bodybag(src)
new /obj/item/bodybag(src)
new /obj/item/bodybag(src)
new /obj/item/bodybag(src)
new /obj/item/bodybag(src)
new /obj/item/bodybag(src)
new /obj/item/bodybag(src)
starts_with = list(/obj/item/bodybag = 7)
/obj/structure/closet/body_bag
name = "body bag"
@@ -134,7 +134,7 @@
if(choice)
var/obj/item/device/communicator/chosen_communicator = choice
var/mob/observer/dead/O = src
var/text_message = sanitize(input(src, "What do you want the message to say?")) as message
var/text_message = sanitize(input(src, "What do you want the message to say?") as message)
if(text_message && O.exonet)
O.exonet.send_message(chosen_communicator.exonet.address, "text", text_message)
@@ -28,13 +28,6 @@ GLOBAL_LIST_BOILERPLATE(all_beacons, /obj/item/device/radio/beacon)
src.add_fingerprint(usr)
return
/obj/item/device/radio/beacon/bacon //Probably a better way of doing this, I'm lazy.
proc/digest_delay()
spawn(600)
qdel(src)
// SINGULO BEACON SPAWNER
/obj/item/device/radio/beacon/syndicate
+8 -8
View File
@@ -67,10 +67,10 @@
icon_state = "healthhud"
icon = 'icons/obj/clothing/glasses.dmi'
New()
..()
hud = new /obj/item/clothing/glasses/hud/health(src)
return
/obj/item/borg/sight/hud/med/New()
..()
hud = new /obj/item/clothing/glasses/hud/health(src)
return
/obj/item/borg/sight/hud/sec
@@ -78,7 +78,7 @@
icon_state = "securityhud"
icon = 'icons/obj/clothing/glasses.dmi'
New()
..()
hud = new /obj/item/clothing/glasses/hud/security(src)
return
/obj/item/borg/sight/hud/sec/New()
..()
hud = new /obj/item/clothing/glasses/hud/security(src)
return
+83 -27
View File
@@ -9,6 +9,7 @@
var/icon/virtualIcon
var/list/bulletholes = list()
<<<<<<< HEAD
Destroy()
// if a target is deleted and associated with a stake, force stake to forget
for(var/obj/structure/target_stake/T in view(3,src))
@@ -62,22 +63,77 @@
to_chat(user, "You take the target out of the stake.")
else
src.loc = get_turf(user)
=======
/obj/item/target/Destroy()
// if a target is deleted and associated with a stake, force stake to forget
for(var/obj/structure/target_stake/T in view(3,src))
if(T.pinned_target == src)
T.pinned_target = null
T.density = 1
break
..() // delete target
/obj/item/target/Moved(atom/old_loc, direction, forced = FALSE)
. = ..()
// After target moves, check for nearby stakes. If associated, move to target
for(var/obj/structure/target_stake/M in view(3,src))
if(M.density == 0 && M.pinned_target == src)
M.forceMove(loc)
// This may seem a little counter-intuitive but I assure you that's for a purpose.
// Stakes are the ones that carry targets, yes, but in the stake code we set
// a stake's density to 0 meaning it can't be pushed anymore. Instead of pushing
// the stake now, we have to push the target.
/obj/item/target/attackby(obj/item/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0, user))
overlays.Cut()
to_chat(usr, "You slice off [src]'s uneven chunks of aluminum and scorch marks.")
return
/obj/item/target/attack_hand(mob/user as mob)
// taking pinned targets off!
var/obj/structure/target_stake/stake
for(var/obj/structure/target_stake/T in view(3,src))
if(T.pinned_target == src)
stake = T
break
if(stake)
if(stake.pinned_target)
stake.density = 1
density = 0
layer = OBJ_LAYER
loc = user.loc
if(ishuman(user))
if(!user.get_active_hand())
user.put_in_hands(src)
>>>>>>> 593246b... Linter diagnostics + bans non-var relative pathing (#8150)
to_chat(user, "You take the target out of the stake.")
else
src.loc = get_turf(user)
to_chat(user, "You take the target out of the stake.")
stake.pinned_target = null
return
stake.pinned_target = null
return
else
..()
else
..()
syndicate
icon_state = "target_s"
desc = "A shooting target that looks like a hostile agent."
hp = 2600 // i guess syndie targets are sturdier?
alien
icon_state = "target_q"
desc = "A shooting target with a threatening silhouette."
hp = 2350 // alium onest too kinda
/obj/item/target/syndicate
icon_state = "target_s"
desc = "A shooting target that looks like a hostile agent."
hp = 2600 // i guess syndie targets are sturdier?
/obj/item/target/alien
icon_state = "target_q"
desc = "A shooting target with a threatening silhouette."
hp = 2350 // alium onest too kinda
/obj/item/target/bullet_act(var/obj/item/projectile/Proj)
var/p_x = Proj.p_x + pick(0,0,0,0,0,-1,1) // really ugly way of coding "sometimes offset Proj.p_x!"
@@ -160,21 +216,21 @@
var/b2y1 = 0
var/b2y2 = 0
New(var/obj/item/target/Target, var/pixel_x = 0, var/pixel_y = 0)
if(!Target) return
/datum/bullethole/New(var/obj/item/target/Target, var/pixel_x = 0, var/pixel_y = 0)
if(!Target) return
// Randomize the first box
b1x1 = pixel_x - pick(1,1,1,1,2,2,3,3,4)
b1x2 = pixel_x + pick(1,1,1,1,2,2,3,3,4)
b1y = pixel_y
if(prob(35))
b1y += rand(-4,4)
// Randomize the first box
b1x1 = pixel_x - pick(1,1,1,1,2,2,3,3,4)
b1x2 = pixel_x + pick(1,1,1,1,2,2,3,3,4)
b1y = pixel_y
if(prob(35))
b1y += rand(-4,4)
// Randomize the second box
b2x = pixel_x
if(prob(35))
b2x += rand(-4,4)
b2y1 = pixel_y + pick(1,1,1,1,2,2,3,3,4)
b2y2 = pixel_y - pick(1,1,1,1,2,2,3,3,4)
// Randomize the second box
b2x = pixel_x
if(prob(35))
b2x += rand(-4,4)
b2y1 = pixel_y + pick(1,1,1,1,2,2,3,3,4)
b2y2 = pixel_y - pick(1,1,1,1,2,2,3,3,4)
Target.bulletholes.Add(src)
Target.bulletholes.Add(src)
+93 -93
View File
@@ -164,90 +164,90 @@
var/bullets = 5
drop_sound = 'sound/items/drop/gun.ogg'
examine(mob/user)
. = ..()
if(bullets && get_dist(user, src) <= 2)
. += "<span class='notice'>It is loaded with [bullets] foam darts!</span>"
/obj/item/toy/crossbow/examine(mob/user)
. = ..()
if(bullets && get_dist(user, src) <= 2)
. += "<span class='notice'>It is loaded with [bullets] foam darts!</span>"
attackby(obj/item/I as obj, mob/user as mob)
if(istype(I, /obj/item/toy/ammo/crossbow))
if(bullets <= 4)
user.drop_item()
qdel(I)
bullets++
to_chat(user, "<span class='notice'>You load the foam dart into the crossbow.</span>")
else
to_chat(usr, "<span class='warning'>It's already fully loaded.</span>")
/obj/item/toy/crossbow/attackby(obj/item/I as obj, mob/user as mob)
if(istype(I, /obj/item/toy/ammo/crossbow))
if(bullets <= 4)
user.drop_item()
qdel(I)
bullets++
to_chat(user, "<span class='notice'>You load the foam dart into the crossbow.</span>")
else
to_chat(usr, "<span class='warning'>It's already fully loaded.</span>")
afterattack(atom/target as mob|obj|turf|area, mob/user as mob, flag)
if(!isturf(target.loc) || target == user) return
if(flag) return
/obj/item/toy/crossbow/afterattack(atom/target as mob|obj|turf|area, mob/user as mob, flag)
if(!isturf(target.loc) || target == user) return
if(flag) return
if (locate (/obj/structure/table, src.loc))
return
else if (bullets)
var/turf/trg = get_turf(target)
var/obj/effect/foam_dart_dummy/D = new/obj/effect/foam_dart_dummy(get_turf(src))
bullets--
D.icon_state = "foamdart"
D.name = "foam dart"
playsound(src, 'sound/items/syringeproj.ogg', 50, 1)
if (locate (/obj/structure/table, src.loc))
return
else if (bullets)
var/turf/trg = get_turf(target)
var/obj/effect/foam_dart_dummy/D = new/obj/effect/foam_dart_dummy(get_turf(src))
bullets--
D.icon_state = "foamdart"
D.name = "foam dart"
playsound(src, 'sound/items/syringeproj.ogg', 50, 1)
for(var/i=0, i<6, i++)
if (D)
if(D.loc == trg) break
step_towards(D,trg)
for(var/i=0, i<6, i++)
if (D)
if(D.loc == trg) break
step_towards(D,trg)
for(var/mob/living/M in D.loc)
if(!istype(M,/mob/living)) continue
if(M == user) continue
for(var/mob/O in viewers(world.view, D))
O.show_message(text("<span class='warning'>\The [] was hit by the foam dart!</span>", M), 1)
new /obj/item/toy/ammo/crossbow(M.loc)
qdel(D)
return
for(var/atom/A in D.loc)
if(A == user) continue
if(A.density)
new /obj/item/toy/ammo/crossbow(A.loc)
qdel(D)
sleep(1)
spawn(10)
if(D)
new /obj/item/toy/ammo/crossbow(D.loc)
for(var/mob/living/M in D.loc)
if(!istype(M,/mob/living)) continue
if(M == user) continue
for(var/mob/O in viewers(world.view, D))
O.show_message(text("<span class='warning'>\The [] was hit by the foam dart!</span>", M), 1)
new /obj/item/toy/ammo/crossbow(M.loc)
qdel(D)
return
return
else if (bullets == 0)
user.Weaken(5)
for(var/mob/O in viewers(world.view, user))
O.show_message(text("<span class='warning'>\The [] realized they were out of ammo and starting scrounging for some!</span>", user), 1)
for(var/atom/A in D.loc)
if(A == user) continue
if(A.density)
new /obj/item/toy/ammo/crossbow(A.loc)
qdel(D)
sleep(1)
spawn(10)
if(D)
new /obj/item/toy/ammo/crossbow(D.loc)
qdel(D)
return
else if (bullets == 0)
user.Weaken(5)
for(var/mob/O in viewers(world.view, user))
O.show_message(text("<span class='warning'>\The [] realized they were out of ammo and starting scrounging for some!</span>", user), 1)
attack(mob/M as mob, mob/user as mob)
src.add_fingerprint(user)
/obj/item/toy/crossbow/attack(mob/M as mob, mob/user as mob)
src.add_fingerprint(user)
// ******* Check
if (src.bullets > 0 && M.lying)
if (src.bullets > 0 && M.lying)
for(var/mob/O in viewers(M, null))
if(O.client)
O.show_message(text("<span class='danger'>\The [] casually lines up a shot with []'s head and pulls the trigger!</span>", user, M), 1, "<span class='warning'>You hear the sound of foam against skull</span>", 2)
O.show_message(text("<span class='warning'>\The [] was hit in the head by the foam dart!</span>", M), 1)
for(var/mob/O in viewers(M, null))
if(O.client)
O.show_message(text("<span class='danger'>\The [] casually lines up a shot with []'s head and pulls the trigger!</span>", user, M), 1, "<span class='warning'>You hear the sound of foam against skull</span>", 2)
O.show_message(text("<span class='warning'>\The [] was hit in the head by the foam dart!</span>", M), 1)
playsound(src, 'sound/items/syringeproj.ogg', 50, 1)
new /obj/item/toy/ammo/crossbow(M.loc)
src.bullets--
else if (M.lying && src.bullets == 0)
for(var/mob/O in viewers(M, null))
if (O.client) O.show_message(text("<span class='danger'>\The [] casually lines up a shot with []'s head, pulls the trigger, then realizes they are out of ammo and drops to the floor in search of some!</span>", user, M), 1, "<span class='warning'>You hear someone fall</span>", 2)
user.Weaken(5)
return
playsound(src, 'sound/items/syringeproj.ogg', 50, 1)
new /obj/item/toy/ammo/crossbow(M.loc)
src.bullets--
else if (M.lying && src.bullets == 0)
for(var/mob/O in viewers(M, null))
if (O.client) O.show_message(text("<span class='danger'>\The [] casually lines up a shot with []'s head, pulls the trigger, then realizes they are out of ammo and drops to the floor in search of some!</span>", user, M), 1, "<span class='warning'>You hear someone fall</span>", 2)
user.Weaken(5)
return
/obj/item/toy/ammo/crossbow
name = "foam dart"
@@ -285,21 +285,21 @@
w_class = ITEMSIZE_SMALL
attack_verb = list("attacked", "struck", "hit")
attack_self(mob/user as mob)
src.active = !( src.active )
if (src.active)
to_chat(user, "<span class='notice'>You extend the plastic blade with a quick flick of your wrist.</span>")
playsound(src, 'sound/weapons/saberon.ogg', 50, 1)
src.item_state = "[icon_state]_blade"
src.w_class = ITEMSIZE_LARGE
else
to_chat(user, "<span class='notice'>You push the plastic blade back down into the handle.</span>")
playsound(src, 'sound/weapons/saberoff.ogg', 50, 1)
src.item_state = "[icon_state]"
src.w_class = ITEMSIZE_SMALL
update_icon()
src.add_fingerprint(user)
return
/obj/item/toy/sword/attack_self(mob/user as mob)
src.active = !( src.active )
if (src.active)
to_chat(user, "<span class='notice'>You extend the plastic blade with a quick flick of your wrist.</span>")
playsound(src, 'sound/weapons/saberon.ogg', 50, 1)
src.item_state = "[icon_state]_blade"
src.w_class = ITEMSIZE_LARGE
else
to_chat(user, "<span class='notice'>You push the plastic blade back down into the handle.</span>")
playsound(src, 'sound/weapons/saberoff.ogg', 50, 1)
src.item_state = "[icon_state]"
src.w_class = ITEMSIZE_SMALL
update_icon()
src.add_fingerprint(user)
return
/obj/item/toy/sword/update_icon()
. = ..()
@@ -365,15 +365,15 @@
w_class = ITEMSIZE_TINY
drop_sound = null
throw_impact(atom/hit_atom)
..()
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
new /obj/effect/decal/cleanable/ash(src.loc)
src.visible_message("<span class='warning'>The [src.name] explodes!</span>","<span class='warning'>You hear a snap!</span>")
playsound(src, 'sound/effects/snap.ogg', 50, 1)
qdel(src)
/obj/item/toy/snappop/throw_impact(atom/hit_atom)
..()
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
new /obj/effect/decal/cleanable/ash(src.loc)
src.visible_message("<span class='warning'>The [src.name] explodes!</span>","<span class='warning'>You hear a snap!</span>")
playsound(src, 'sound/effects/snap.ogg', 50, 1)
qdel(src)
/obj/item/toy/snappop/Crossed(atom/movable/H as mob|obj)
if(H.is_incorporeal())
+8 -8
View File
@@ -30,14 +30,14 @@
var/hits = 0
var/time_inflicted = 0
proc/copy()
var/datum/autopsy_data/W = new()
W.weapon = weapon
W.pretend_weapon = pretend_weapon
W.damage = damage
W.hits = hits
W.time_inflicted = time_inflicted
return W
/datum/autopsy_data/proc/copy()
var/datum/autopsy_data/W = new()
W.weapon = weapon
W.pretend_weapon = pretend_weapon
W.damage = damage
W.hits = hits
W.time_inflicted = time_inflicted
return W
/obj/item/weapon/autopsy_scanner/proc/add_data(var/obj/item/organ/external/O)
if(!O.autopsy_data.len && !O.trace_chemicals.len) return
+5 -2
View File
@@ -25,7 +25,7 @@
if(wrapped)
add_overlay("[initial(icon_state)]_wrapper")
obj/item/clothing/mask/chewable/Initialize()
/obj/item/clothing/mask/chewable/Initialize()
. = ..()
flags |= NOREACT // so it doesn't react until you light it
create_reagents(chem_volume) // making the cigarrete a chemical holder with a maximum volume of 15
@@ -47,7 +47,7 @@ obj/item/clothing/mask/chewable/Initialize()
STOP_PROCESSING(SSprocessing, src)
..()
obj/item/clothing/mask/chewable/Destroy()
/obj/item/clothing/mask/chewable/Destroy()
. = ..()
STOP_PROCESSING(SSprocessing, src)
@@ -135,6 +135,9 @@ obj/item/clothing/mask/chewable/Destroy()
throwforce = 2
slot_flags = SLOT_BELT
starts_with = list(/obj/item/clothing/mask/chewable/tobacco = 6)
/obj/item/weapon/storage/chewables/Initialize()
. = ..()
make_exact_fit()
//Tobacco Tins
@@ -578,10 +578,10 @@ CIGARETTE PACKETS ARE IN FANCY.DM
deactivation_sound = 'sound/items/zippo_off.ogg'
/obj/item/weapon/flame/lighter/random
New()
icon_state = "lighter-[pick("r","c","y","g")]"
item_state = icon_state
base_state = icon_state
/obj/item/weapon/flame/lighter/random/New()
icon_state = "lighter-[pick("r","c","y","g")]"
item_state = icon_state
base_state = icon_state
/obj/item/weapon/flame/lighter/attack_self(mob/living/user)
if(!base_state)
@@ -2,7 +2,7 @@
#error T_BOARD macro is not defined but we need it!
#endif
obj/item/weapon/circuitboard/rdserver
/obj/item/weapon/circuitboard/rdserver
name = T_BOARD("R&D server")
build_path = /obj/machinery/r_n_d/server/core
board_type = new /datum/frame/frame_types/machine
@@ -11,7 +11,7 @@ obj/item/weapon/circuitboard/rdserver
/obj/item/stack/cable_coil = 2,
/obj/item/weapon/stock_parts/scanning_module = 1)
obj/item/weapon/circuitboard/rdserver/attackby(obj/item/I as obj, mob/user as mob)
/obj/item/weapon/circuitboard/rdserver/attackby(obj/item/I as obj, mob/user as mob)
if(I.is_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>")
+175 -197
View File
@@ -141,262 +141,240 @@
desc = "This will make you big and strong, but give you a bad skin condition."
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 2
New()
block = HULKBLOCK
..()
/obj/item/weapon/dnainjector/hulkmut/New()
block = HULKBLOCK
..()
/obj/item/weapon/dnainjector/antihulk
name = "\improper DNA injector (Anti-Hulk)"
desc = "Cures green skin."
datatype = DNA2_BUF_SE
value = 0x001
//block = 2
New()
block = HULKBLOCK
..()
/obj/item/weapon/dnainjector/antihulk/New()
block = HULKBLOCK
..()
/obj/item/weapon/dnainjector/xraymut
name = "\improper DNA injector (Xray)"
desc = "Finally you can see what the Site Manager does."
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 8
New()
block = XRAYBLOCK
..()
/obj/item/weapon/dnainjector/xraymut/New()
block = XRAYBLOCK
..()
/obj/item/weapon/dnainjector/antixray
name = "\improper DNA injector (Anti-Xray)"
desc = "It will make you see harder."
datatype = DNA2_BUF_SE
value = 0x001
//block = 8
New()
block = XRAYBLOCK
..()
/obj/item/weapon/dnainjector/antixray/New()
block = XRAYBLOCK
..()
/obj/item/weapon/dnainjector/firemut
name = "\improper DNA injector (Fire)"
desc = "Gives you fire."
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 10
New()
block = FIREBLOCK
..()
/obj/item/weapon/dnainjector/firemut/New()
block = FIREBLOCK
..()
/obj/item/weapon/dnainjector/antifire
name = "\improper DNA injector (Anti-Fire)"
desc = "Cures fire."
datatype = DNA2_BUF_SE
value = 0x001
//block = 10
New()
block = FIREBLOCK
..()
/obj/item/weapon/dnainjector/antifire/New()
block = FIREBLOCK
..()
/obj/item/weapon/dnainjector/telemut
name = "\improper DNA injector (Tele.)"
desc = "Super brain man!"
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 12
New()
block = TELEBLOCK
..()
/obj/item/weapon/dnainjector/telemut/New()
block = TELEBLOCK
..()
/obj/item/weapon/dnainjector/antitele
name = "\improper DNA injector (Anti-Tele.)"
desc = "Will make you not able to control your mind."
datatype = DNA2_BUF_SE
value = 0x001
//block = 12
New()
block = TELEBLOCK
..()
/obj/item/weapon/dnainjector/antitele/New()
block = TELEBLOCK
..()
/obj/item/weapon/dnainjector/nobreath
name = "\improper DNA injector (No Breath)"
desc = "Hold your breath and count to infinity."
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 2
New()
block = NOBREATHBLOCK
..()
/obj/item/weapon/dnainjector/nobreath/New()
block = NOBREATHBLOCK
..()
/obj/item/weapon/dnainjector/antinobreath
name = "\improper DNA injector (Anti-No Breath)"
desc = "Hold your breath and count to 100."
datatype = DNA2_BUF_SE
value = 0x001
//block = 2
New()
block = NOBREATHBLOCK
..()
/obj/item/weapon/dnainjector/antinobreath/New()
block = NOBREATHBLOCK
..()
/obj/item/weapon/dnainjector/remoteview
name = "\improper DNA injector (Remote View)"
desc = "Stare into the distance for a reason."
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 2
New()
block = REMOTEVIEWBLOCK
..()
/obj/item/weapon/dnainjector/remoteview/New()
block = REMOTEVIEWBLOCK
..()
/obj/item/weapon/dnainjector/antiremoteview
name = "\improper DNA injector (Anti-Remote View)"
desc = "Cures green skin."
datatype = DNA2_BUF_SE
value = 0x001
//block = 2
New()
block = REMOTEVIEWBLOCK
..()
/obj/item/weapon/dnainjector/antiremoteview/New()
block = REMOTEVIEWBLOCK
..()
/obj/item/weapon/dnainjector/regenerate
name = "\improper DNA injector (Regeneration)"
desc = "Healthy but hungry."
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 2
New()
block = REGENERATEBLOCK
..()
/obj/item/weapon/dnainjector/regenerate/New()
block = REGENERATEBLOCK
..()
/obj/item/weapon/dnainjector/antiregenerate
name = "\improper DNA injector (Anti-Regeneration)"
desc = "Sickly but sated."
datatype = DNA2_BUF_SE
value = 0x001
//block = 2
New()
block = REGENERATEBLOCK
..()
/obj/item/weapon/dnainjector/antiregenerate/New()
block = REGENERATEBLOCK
..()
/obj/item/weapon/dnainjector/runfast
name = "\improper DNA injector (Increase Run)"
desc = "Running Man."
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 2
New()
block = INCREASERUNBLOCK
..()
/obj/item/weapon/dnainjector/runfast/New()
block = INCREASERUNBLOCK
..()
/obj/item/weapon/dnainjector/antirunfast
name = "\improper DNA injector (Anti-Increase Run)"
desc = "Walking Man."
datatype = DNA2_BUF_SE
value = 0x001
//block = 2
New()
block = INCREASERUNBLOCK
..()
/obj/item/weapon/dnainjector/antirunfast/New()
block = INCREASERUNBLOCK
..()
/obj/item/weapon/dnainjector/morph
name = "\improper DNA injector (Morph)"
desc = "A total makeover."
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 2
New()
block = MORPHBLOCK
..()
/obj/item/weapon/dnainjector/morph/New()
block = MORPHBLOCK
..()
/obj/item/weapon/dnainjector/antimorph
name = "\improper DNA injector (Anti-Morph)"
desc = "Cures identity crisis."
datatype = DNA2_BUF_SE
value = 0x001
//block = 2
New()
block = MORPHBLOCK
..()
/* No COLDBLOCK on bay
/obj/item/weapon/dnainjector/cold
name = "\improper DNA injector (Cold)"
desc = "Feels a bit chilly."
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 2
New()
block = COLDBLOCK
..()
/obj/item/weapon/dnainjector/anticold
name = "\improper DNA injector (Anti-Cold)"
desc = "Feels room-temperature."
datatype = DNA2_BUF_SE
value = 0x001
//block = 2
New()
block = COLDBLOCK
..()
*/
/obj/item/weapon/dnainjector/antimorph/New()
block = MORPHBLOCK
..()
/obj/item/weapon/dnainjector/noprints
name = "\improper DNA injector (No Prints)"
desc = "Better than a pair of budget insulated gloves."
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 2
New()
block = NOPRINTSBLOCK
..()
/obj/item/weapon/dnainjector/noprints/New()
block = NOPRINTSBLOCK
..()
/obj/item/weapon/dnainjector/antinoprints
name = "\improper DNA injector (Anti-No Prints)"
desc = "Not quite as good as a pair of budget insulated gloves."
datatype = DNA2_BUF_SE
value = 0x001
//block = 2
New()
block = NOPRINTSBLOCK
..()
/obj/item/weapon/dnainjector/antinoprints/New()
block = NOPRINTSBLOCK
..()
/obj/item/weapon/dnainjector/insulation
name = "\improper DNA injector (Shock Immunity)"
desc = "Better than a pair of real insulated gloves."
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 2
New()
block = SHOCKIMMUNITYBLOCK
..()
/obj/item/weapon/dnainjector/insulation/New()
block = SHOCKIMMUNITYBLOCK
..()
/obj/item/weapon/dnainjector/antiinsulation
name = "\improper DNA injector (Anti-Shock Immunity)"
desc = "Not quite as good as a pair of real insulated gloves."
datatype = DNA2_BUF_SE
value = 0x001
//block = 2
New()
block = SHOCKIMMUNITYBLOCK
..()
/obj/item/weapon/dnainjector/antiinsulation/New()
block = SHOCKIMMUNITYBLOCK
..()
/obj/item/weapon/dnainjector/midgit
name = "\improper DNA injector (Small Size)"
desc = "Makes you shrink."
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 2
New()
block = SMALLSIZEBLOCK
..()
/obj/item/weapon/dnainjector/midgit/New()
block = SMALLSIZEBLOCK
..()
/obj/item/weapon/dnainjector/antimidgit
name = "\improper DNA injector (Anti-Small Size)"
desc = "Makes you grow. But not too much."
datatype = DNA2_BUF_SE
value = 0x001
//block = 2
New()
block = SMALLSIZEBLOCK
..()
/obj/item/weapon/dnainjector/antimidgit/New()
block = SMALLSIZEBLOCK
..()
/////////////////////////////////////
/obj/item/weapon/dnainjector/antiglasses
@@ -404,197 +382,197 @@
desc = "Toss away those glasses!"
datatype = DNA2_BUF_SE
value = 0x001
//block = 1
New()
block = GLASSESBLOCK
..()
/obj/item/weapon/dnainjector/antiglasses/New()
block = GLASSESBLOCK
..()
/obj/item/weapon/dnainjector/glassesmut
name = "\improper DNA injector (Glasses)"
desc = "Will make you need dorkish glasses."
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 1
New()
block = GLASSESBLOCK
..()
/obj/item/weapon/dnainjector/glassesmut/New()
block = GLASSESBLOCK
..()
/obj/item/weapon/dnainjector/epimut
name = "\improper DNA injector (Epi.)"
desc = "Shake shake shake the room!"
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 3
New()
block = HEADACHEBLOCK
..()
/obj/item/weapon/dnainjector/epimut/New()
block = HEADACHEBLOCK
..()
/obj/item/weapon/dnainjector/antiepi
name = "\improper DNA injector (Anti-Epi.)"
desc = "Will fix you up from shaking the room."
datatype = DNA2_BUF_SE
value = 0x001
//block = 3
New()
block = HEADACHEBLOCK
..()
/obj/item/weapon/dnainjector/antiepi/New()
block = HEADACHEBLOCK
..()
/obj/item/weapon/dnainjector/anticough
name = "\improper DNA injector (Anti-Cough)"
desc = "Will stop that awful noise."
datatype = DNA2_BUF_SE
value = 0x001
//block = 5
New()
block = COUGHBLOCK
..()
/obj/item/weapon/dnainjector/anticough/New()
block = COUGHBLOCK
..()
/obj/item/weapon/dnainjector/coughmut
name = "\improper DNA injector (Cough)"
desc = "Will bring forth a sound of horror from your throat."
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 5
New()
block = COUGHBLOCK
..()
/obj/item/weapon/dnainjector/coughmut/New()
block = COUGHBLOCK
..()
/obj/item/weapon/dnainjector/clumsymut
name = "\improper DNA injector (Clumsy)"
desc = "Makes clumsy minions."
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 6
New()
block = CLUMSYBLOCK
..()
/obj/item/weapon/dnainjector/clumsymut/New()
block = CLUMSYBLOCK
..()
/obj/item/weapon/dnainjector/anticlumsy
name = "\improper DNA injector (Anti-Clumy)"
desc = "Cleans up confusion."
datatype = DNA2_BUF_SE
value = 0x001
//block = 6
New()
block = CLUMSYBLOCK
..()
/obj/item/weapon/dnainjector/anticlumsy/New()
block = CLUMSYBLOCK
..()
/obj/item/weapon/dnainjector/antitour
name = "\improper DNA injector (Anti-Tour.)"
desc = "Will cure tourrets."
datatype = DNA2_BUF_SE
value = 0x001
//block = 7
New()
block = TWITCHBLOCK
..()
/obj/item/weapon/dnainjector/antitour/New()
block = TWITCHBLOCK
..()
/obj/item/weapon/dnainjector/tourmut
name = "\improper DNA injector (Tour.)"
desc = "Gives you a nasty case off tourrets."
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 7
New()
block = TWITCHBLOCK
..()
/obj/item/weapon/dnainjector/tourmut/New()
block = TWITCHBLOCK
..()
/obj/item/weapon/dnainjector/stuttmut
name = "\improper DNA injector (Stutt.)"
desc = "Makes you s-s-stuttterrr"
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 9
New()
block = NERVOUSBLOCK
..()
/obj/item/weapon/dnainjector/stuttmut/New()
block = NERVOUSBLOCK
..()
/obj/item/weapon/dnainjector/antistutt
name = "\improper DNA injector (Anti-Stutt.)"
desc = "Fixes that speaking impairment."
datatype = DNA2_BUF_SE
value = 0x001
//block = 9
New()
block = NERVOUSBLOCK
..()
/obj/item/weapon/dnainjector/antistutt/New()
block = NERVOUSBLOCK
..()
/obj/item/weapon/dnainjector/blindmut
name = "\improper DNA injector (Blind)"
desc = "Makes you not see anything."
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 11
New()
block = BLINDBLOCK
..()
/obj/item/weapon/dnainjector/blindmut/New()
block = BLINDBLOCK
..()
/obj/item/weapon/dnainjector/antiblind
name = "\improper DNA injector (Anti-Blind)"
desc = "ITS A MIRACLE!!!"
datatype = DNA2_BUF_SE
value = 0x001
//block = 11
New()
block = BLINDBLOCK
..()
/obj/item/weapon/dnainjector/antiblind/New()
block = BLINDBLOCK
..()
/obj/item/weapon/dnainjector/deafmut
name = "\improper DNA injector (Deaf)"
desc = "Sorry, what did you say?"
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 13
New()
block = DEAFBLOCK
..()
/obj/item/weapon/dnainjector/deafmut/New()
block = DEAFBLOCK
..()
/obj/item/weapon/dnainjector/antideaf
name = "\improper DNA injector (Anti-Deaf)"
desc = "Will make you hear once more."
datatype = DNA2_BUF_SE
value = 0x001
//block = 13
New()
block = DEAFBLOCK
..()
/obj/item/weapon/dnainjector/antideaf/New()
block = DEAFBLOCK
..()
/obj/item/weapon/dnainjector/hallucination
name = "\improper DNA injector (Halluctination)"
desc = "What you see isn't always what you get."
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 2
New()
block = HALLUCINATIONBLOCK
..()
/obj/item/weapon/dnainjector/hallucination/New()
block = HALLUCINATIONBLOCK
..()
/obj/item/weapon/dnainjector/antihallucination
name = "\improper DNA injector (Anti-Hallucination)"
desc = "What you see is what you get."
datatype = DNA2_BUF_SE
value = 0x001
//block = 2
New()
block = HALLUCINATIONBLOCK
..()
/obj/item/weapon/dnainjector/antihallucination/New()
block = HALLUCINATIONBLOCK
..()
/obj/item/weapon/dnainjector/h2m
name = "\improper DNA injector (Human > Monkey)"
desc = "Will make you a flea bag."
datatype = DNA2_BUF_SE
value = 0xFFF
//block = 14
New()
block = MONKEYBLOCK
..()
/obj/item/weapon/dnainjector/h2m/New()
block = MONKEYBLOCK
..()
/obj/item/weapon/dnainjector/m2h
name = "\improper DNA injector (Monkey > Human)"
desc = "Will make you...less hairy."
datatype = DNA2_BUF_SE
value = 0x001
//block = 14
New()
block = MONKEYBLOCK
..()
/obj/item/weapon/dnainjector/m2h/New()
block = MONKEYBLOCK
..()
@@ -19,152 +19,144 @@
var/mob/living/carbon/occupant = null
var/injecting = 0
proc
go_out()
put_mob(mob/living/carbon/M as mob)
implant(var/mob/M)
add_implants()
/obj/machinery/implantchair/New()
..()
add_implants()
New()
..()
add_implants()
/obj/machinery/implantchair/attack_hand(mob/user as mob)
user.set_machine(src)
var/health_text = ""
if(src.occupant)
if(src.occupant.health <= -100)
health_text = "<FONT color=red>Dead</FONT>"
else if(src.occupant.health < 0)
health_text = "<FONT color=red>[round(src.occupant.health,0.1)]</FONT>"
else
health_text = "[round(src.occupant.health,0.1)]"
var/dat ="<B>Implanter Status</B><BR>"
dat +="<B>Current occupant:</B> [src.occupant ? "<BR>Name: [src.occupant]<BR>Health: [health_text]<BR>" : "<FONT color=red>None</FONT>"]<BR>"
dat += "<B>Implants:</B> [src.implant_list.len ? "[implant_list.len]" : "<A href='?src=\ref[src];replenish=1'>Replenish</A>"]<BR>"
if(src.occupant)
dat += "[src.ready ? "<A href='?src=\ref[src];implant=1'>Implant</A>" : "Recharging"]<BR>"
user.set_machine(src)
user << browse(dat, "window=implant")
onclose(user, "implant")
attack_hand(mob/user as mob)
user.set_machine(src)
var/health_text = ""
if(src.occupant)
if(src.occupant.health <= -100)
health_text = "<FONT color=red>Dead</FONT>"
else if(src.occupant.health < 0)
health_text = "<FONT color=red>[round(src.occupant.health,0.1)]</FONT>"
else
health_text = "[round(src.occupant.health,0.1)]"
var/dat ="<B>Implanter Status</B><BR>"
dat +="<B>Current occupant:</B> [src.occupant ? "<BR>Name: [src.occupant]<BR>Health: [health_text]<BR>" : "<FONT color=red>None</FONT>"]<BR>"
dat += "<B>Implants:</B> [src.implant_list.len ? "[implant_list.len]" : "<A href='?src=\ref[src];replenish=1'>Replenish</A>"]<BR>"
if(src.occupant)
dat += "[src.ready ? "<A href='?src=\ref[src];implant=1'>Implant</A>" : "Recharging"]<BR>"
user.set_machine(src)
user << browse(dat, "window=implant")
onclose(user, "implant")
Topic(href, href_list)
if((get_dist(src, usr) <= 1) || istype(usr, /mob/living/silicon/ai))
if(href_list["implant"])
if(src.occupant)
injecting = 1
go_out()
ready = 0
spawn(injection_cooldown)
ready = 1
if(href_list["replenish"])
/obj/machinery/implantchair/Topic(href, href_list)
if((get_dist(src, usr) <= 1) || istype(usr, /mob/living/silicon/ai))
if(href_list["implant"])
if(src.occupant)
injecting = 1
go_out()
ready = 0
spawn(replenish_cooldown)
add_implants()
spawn(injection_cooldown)
ready = 1
src.updateUsrDialog()
src.add_fingerprint(usr)
return
if(href_list["replenish"])
ready = 0
spawn(replenish_cooldown)
add_implants()
ready = 1
attackby(var/obj/item/weapon/G as obj, var/mob/user as mob)
if(istype(G, /obj/item/weapon/grab))
var/obj/item/weapon/grab/grab = G
if(!ismob(grab.affecting))
return
if(grab.affecting.has_buckled_mobs())
to_chat(user, span("warning", "\The [grab.affecting] has other entities attached to them. Remove them first."))
return
var/mob/M = grab.affecting
if(put_mob(M))
qdel(G)
src.updateUsrDialog()
return
go_out(var/mob/M)
if(!( src.occupant ))
return
if(M == occupant) // so that the guy inside can't eject himself -Agouri
return
if (src.occupant.client)
src.occupant.client.eye = src.occupant.client.mob
src.occupant.client.perspective = MOB_PERSPECTIVE
src.occupant.loc = src.loc
if(injecting)
implant(src.occupant)
injecting = 0
src.occupant = null
icon_state = "implantchair"
return
put_mob(mob/living/carbon/M as mob)
if(!iscarbon(M))
to_chat(usr, "<span class='warning'>\The [src] cannot hold this!</span>")
return
if(src.occupant)
to_chat(usr, "<span class='warning'>\The [src] is already occupied!</span>")
return
if(M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.stop_pulling()
M.loc = src
src.occupant = M
src.add_fingerprint(usr)
icon_state = "implantchair_on"
return 1
implant(var/mob/M)
if (!istype(M, /mob/living/carbon))
return
if(!implant_list.len) return
for(var/obj/item/weapon/implant/loyalty/imp in implant_list)
if(!imp) continue
if(istype(imp, /obj/item/weapon/implant/loyalty))
for (var/mob/O in viewers(M, null))
O.show_message("<span class='warning'>\The [M] has been implanted by \the [src].</span>", 1)
if(imp.handle_implant(M, BP_TORSO))
imp.post_implant(M)
implant_list -= imp
break
return
add_implants()
for(var/i=0, i<src.max_implants, i++)
var/obj/item/weapon/implant/loyalty/I = new /obj/item/weapon/implant/loyalty(src)
implant_list += I
/obj/machinery/implantchair/attackby(var/obj/item/weapon/G as obj, var/mob/user as mob)
if(istype(G, /obj/item/weapon/grab))
var/obj/item/weapon/grab/grab = G
if(!ismob(grab.affecting))
return
if(grab.affecting.has_buckled_mobs())
to_chat(user, span("warning", "\The [grab.affecting] has other entities attached to them. Remove them first."))
return
var/mob/M = grab.affecting
if(put_mob(M))
qdel(G)
src.updateUsrDialog()
return
/obj/machinery/implantchair/proc/go_out(var/mob/M)
if(!( src.occupant ))
return
verb
get_out()
set name = "Eject occupant"
set category = "Object"
set src in oview(1)
if(usr.stat != 0)
return
src.go_out(usr)
add_fingerprint(usr)
return
if(M == occupant) // so that the guy inside can't eject himself -Agouri
return
if (src.occupant.client)
src.occupant.client.eye = src.occupant.client.mob
src.occupant.client.perspective = MOB_PERSPECTIVE
src.occupant.loc = src.loc
if(injecting)
implant(src.occupant)
injecting = 0
src.occupant = null
icon_state = "implantchair"
return
move_inside()
set name = "Move Inside"
set category = "Object"
set src in oview(1)
if(usr.stat != 0 || stat & (NOPOWER|BROKEN))
return
put_mob(usr)
return
/obj/machinery/implantchair/proc/put_mob(mob/living/carbon/M as mob)
if(!iscarbon(M))
to_chat(usr, "<span class='warning'>\The [src] cannot hold this!</span>")
return
if(src.occupant)
to_chat(usr, "<span class='warning'>\The [src] is already occupied!</span>")
return
if(M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.stop_pulling()
M.loc = src
src.occupant = M
src.add_fingerprint(usr)
icon_state = "implantchair_on"
return 1
/obj/machinery/implantchair/proc/implant(var/mob/M)
if (!istype(M, /mob/living/carbon))
return
if(!implant_list.len) return
for(var/obj/item/weapon/implant/loyalty/imp in implant_list)
if(!imp) continue
if(istype(imp, /obj/item/weapon/implant/loyalty))
for (var/mob/O in viewers(M, null))
O.show_message("<span class='warning'>\The [M] has been implanted by \the [src].</span>", 1)
if(imp.handle_implant(M, BP_TORSO))
imp.post_implant(M)
implant_list -= imp
break
return
/obj/machinery/implantchair/proc/add_implants()
for(var/i=0, i<src.max_implants, i++)
var/obj/item/weapon/implant/loyalty/I = new /obj/item/weapon/implant/loyalty(src)
implant_list += I
return
/obj/machinery/implantchair/verb/get_out()
set name = "Eject occupant"
set category = "Object"
set src in oview(1)
if(usr.stat != 0)
return
src.go_out(usr)
add_fingerprint(usr)
return
/obj/machinery/implantchair/verb/move_inside()
set name = "Move Inside"
set category = "Object"
set src in oview(1)
if(usr.stat != 0 || stat & (NOPOWER|BROKEN))
return
put_mob(usr)
return
@@ -12,87 +12,83 @@
var/obj/item/weapon/implantcase/case = null
var/broadcasting = null
var/listening = 1.0
proc
/obj/item/weapon/implantpad/proc/update()
if (src.case)
src.icon_state = "implantpad-1"
else
src.icon_state = "implantpad-0"
return
/obj/item/weapon/implantpad/attack_hand(mob/living/user as mob)
if ((src.case && user.item_is_in_hands(src)))
user.put_in_active_hand(case)
src.case.add_fingerprint(user)
src.case = null
src.add_fingerprint(user)
update()
else
return ..()
return
update()
if (src.case)
src.icon_state = "implantpad-1"
else
src.icon_state = "implantpad-0"
/obj/item/weapon/implantpad/attackby(obj/item/weapon/implantcase/C as obj, mob/user as mob)
..()
if(istype(C, /obj/item/weapon/implantcase))
if(!( src.case ))
user.drop_item()
C.loc = src
src.case = C
else
return
src.update()
return
attack_hand(mob/living/user as mob)
if ((src.case && user.item_is_in_hands(src)))
user.put_in_active_hand(case)
src.case.add_fingerprint(user)
src.case = null
src.add_fingerprint(user)
update()
/obj/item/weapon/implantpad/attack_self(mob/user as mob)
user.set_machine(src)
var/dat = "<B>Implant Mini-Computer:</B><HR>"
if (src.case)
if(src.case.imp)
if(istype(src.case.imp, /obj/item/weapon/implant))
dat += src.case.imp.get_data()
if(istype(src.case.imp, /obj/item/weapon/implant/tracking))
dat += {"ID (1-100):
<A href='byond://?src=\ref[src];tracking_id=-10'>-</A>
<A href='byond://?src=\ref[src];tracking_id=-1'>-</A> [case.imp:id]
<A href='byond://?src=\ref[src];tracking_id=1'>+</A>
<A href='byond://?src=\ref[src];tracking_id=10'>+</A><BR>"}
else
return ..()
dat += "The implant casing is empty."
else
dat += "Please insert an implant casing!"
user << browse(dat, "window=implantpad")
onclose(user, "implantpad")
return
/obj/item/weapon/implantpad/Topic(href, href_list)
..()
if (usr.stat)
return
if ((usr.contents.Find(src)) || ((in_range(src, usr) && istype(src.loc, /turf))))
usr.set_machine(src)
if (href_list["tracking_id"])
var/obj/item/weapon/implant/tracking/T = src.case.imp
T.id += text2num(href_list["tracking_id"])
T.id = min(1000, T.id)
T.id = max(1, T.id)
attackby(obj/item/weapon/implantcase/C as obj, mob/user as mob)
..()
if(istype(C, /obj/item/weapon/implantcase))
if(!( src.case ))
user.drop_item()
C.loc = src
src.case = C
if (istype(src.loc, /mob))
attack_self(src.loc)
else
return
src.update()
return
attack_self(mob/user as mob)
user.set_machine(src)
var/dat = "<B>Implant Mini-Computer:</B><HR>"
if (src.case)
if(src.case.imp)
if(istype(src.case.imp, /obj/item/weapon/implant))
dat += src.case.imp.get_data()
if(istype(src.case.imp, /obj/item/weapon/implant/tracking))
dat += {"ID (1-100):
<A href='byond://?src=\ref[src];tracking_id=-10'>-</A>
<A href='byond://?src=\ref[src];tracking_id=-1'>-</A> [case.imp:id]
<A href='byond://?src=\ref[src];tracking_id=1'>+</A>
<A href='byond://?src=\ref[src];tracking_id=10'>+</A><BR>"}
else
dat += "The implant casing is empty."
else
dat += "Please insert an implant casing!"
user << browse(dat, "window=implantpad")
onclose(user, "implantpad")
return
Topic(href, href_list)
..()
if (usr.stat)
return
if ((usr.contents.Find(src)) || ((in_range(src, usr) && istype(src.loc, /turf))))
usr.set_machine(src)
if (href_list["tracking_id"])
var/obj/item/weapon/implant/tracking/T = src.case.imp
T.id += text2num(href_list["tracking_id"])
T.id = min(1000, T.id)
T.id = max(1, T.id)
if (istype(src.loc, /mob))
attack_self(src.loc)
else
for(var/mob/M in viewers(1, src))
if (M.client)
src.attack_self(M)
src.add_fingerprint(usr)
else
usr << browse(null, "window=implantpad")
return
for(var/mob/M in viewers(1, src))
if (M.client)
src.attack_self(M)
src.add_fingerprint(usr)
else
usr << browse(null, "window=implantpad")
return
return
@@ -1,4 +1,4 @@
obj/item/weapon/chainsaw
/obj/item/weapon/chainsaw
name = "chainsaw"
desc = "Vroom vroom."
icon_state = "chainsaw0"
@@ -12,7 +12,7 @@ obj/item/weapon/chainsaw
var/active_force = 55
var/inactive_force = 10
obj/item/weapon/chainsaw/New()
/obj/item/weapon/chainsaw/New()
var/datum/reagents/R = new/datum/reagents(max_fuel)
reagents = R
R.my_atom = src
@@ -20,13 +20,13 @@ obj/item/weapon/chainsaw/New()
START_PROCESSING(SSobj, src)
..()
obj/item/weapon/chainsaw/Destroy()
/obj/item/weapon/chainsaw/Destroy()
STOP_PROCESSING(SSobj, src)
if(reagents)
qdel(reagents)
..()
obj/item/weapon/chainsaw/proc/turnOn(mob/user as mob)
/obj/item/weapon/chainsaw/proc/turnOn(mob/user as mob)
if(on) return
visible_message("You start pulling the string on \the [src].", "[usr] starts pulling the string on the [src].")
@@ -49,7 +49,7 @@ obj/item/weapon/chainsaw/proc/turnOn(mob/user as mob)
else
to_chat(user, "You fumble with the string.")
obj/item/weapon/chainsaw/proc/turnOff(mob/user as mob)
/obj/item/weapon/chainsaw/proc/turnOff(mob/user as mob)
if(!on) return
to_chat(user, "You switch the gas nozzle on the chainsaw, turning it off.")
attack_verb = list("bluntly hit", "beat", "knocked")
@@ -60,13 +60,13 @@ obj/item/weapon/chainsaw/proc/turnOff(mob/user as mob)
on = 0
update_icon()
obj/item/weapon/chainsaw/attack_self(mob/user as mob)
/obj/item/weapon/chainsaw/attack_self(mob/user as mob)
if(!on)
turnOn(user)
else
turnOff(user)
obj/item/weapon/chainsaw/afterattack(atom/A as mob|obj|turf|area, mob/user as mob, proximity)
/obj/item/weapon/chainsaw/afterattack(atom/A as mob|obj|turf|area, mob/user as mob, proximity)
if(!proximity) return
..()
if(on)
@@ -98,7 +98,7 @@ obj/item/weapon/chainsaw/afterattack(atom/A as mob|obj|turf|area, mob/user as mo
else
to_chat(user, "<span class='notice'>Don't move while you're refilling the chainsaw.</span>")
obj/item/weapon/chainsaw/process()
/obj/item/weapon/chainsaw/process()
if(!on) return
if(on)
@@ -109,20 +109,20 @@ obj/item/weapon/chainsaw/process()
to_chat(usr, "\The [src] sputters to a stop!")
turnOff()
obj/item/weapon/chainsaw/proc/get_fuel()
/obj/item/weapon/chainsaw/proc/get_fuel()
return reagents.get_reagent_amount("fuel")
obj/item/weapon/chainsaw/examine(mob/user)
/obj/item/weapon/chainsaw/examine(mob/user)
. = ..()
if(max_fuel && get_dist(user, src) == 0)
. += "<span class = 'notice'>The [src] feels like it contains roughtly [get_fuel()] units of fuel left.</span>"
obj/item/weapon/chainsaw/suicide_act(mob/user)
/obj/item/weapon/chainsaw/suicide_act(mob/user)
var/datum/gender/TU = gender_datums[user.get_visible_gender()]
to_chat(viewers(user), "<span class='danger'>[user] is lying down and pulling the chainsaw into [TU.him], it looks like [TU.he] [TU.is] trying to commit suicide!</span>")
return(BRUTELOSS)
obj/item/weapon/chainsaw/update_icon()
/obj/item/weapon/chainsaw/update_icon()
if(on)
icon_state = "chainsaw1"
item_state = "chainsaw1"
+41 -41
View File
@@ -18,53 +18,53 @@ var/global/list/cached_icons = list()
flags = OPENCONTAINER
var/paint_type = "red"
afterattack(turf/simulated/target, mob/user, proximity)
if(!proximity) return
if(istype(target) && reagents.total_volume > 5)
user.visible_message("<span class='warning'>\The [target] has been splashed with something by [user]!</span>")
reagents.trans_to_turf(target, 5)
else
return ..()
/obj/item/weapon/reagent_containers/glass/paint/afterattack(turf/simulated/target, mob/user, proximity)
if(!proximity) return
if(istype(target) && reagents.total_volume > 5)
user.visible_message("<span class='warning'>\The [target] has been splashed with something by [user]!</span>")
reagents.trans_to_turf(target, 5)
else
return ..()
New()
if(paint_type && length(paint_type) > 0)
name = paint_type + " " + name
..()
reagents.add_reagent("water", volume*3/5)
reagents.add_reagent("plasticide", volume/5)
if(paint_type == "white") //why don't white crayons exist
reagents.add_reagent("aluminum", volume/5)
else if (paint_type == "black")
reagents.add_reagent("carbon", volume/5)
else
reagents.add_reagent("marker_ink_[paint_type]", volume/5)
reagents.handle_reactions()
/obj/item/weapon/reagent_containers/glass/paint/New()
if(paint_type && length(paint_type) > 0)
name = paint_type + " " + name
..()
reagents.add_reagent("water", volume*3/5)
reagents.add_reagent("plasticide", volume/5)
if(paint_type == "white") //why don't white crayons exist
reagents.add_reagent("aluminum", volume/5)
else if (paint_type == "black")
reagents.add_reagent("carbon", volume/5)
else
reagents.add_reagent("marker_ink_[paint_type]", volume/5)
reagents.handle_reactions()
red
icon_state = "paint_red"
paint_type = "red"
/obj/item/weapon/reagent_containers/glass/paint/red
icon_state = "paint_red"
paint_type = "red"
yellow
icon_state = "paint_yellow"
paint_type = "yellow"
/obj/item/weapon/reagent_containers/glass/paint/yellow
icon_state = "paint_yellow"
paint_type = "yellow"
green
icon_state = "paint_green"
paint_type = "green"
/obj/item/weapon/reagent_containers/glass/paint/green
icon_state = "paint_green"
paint_type = "green"
blue
icon_state = "paint_blue"
paint_type = "blue"
/obj/item/weapon/reagent_containers/glass/paint/blue
icon_state = "paint_blue"
paint_type = "blue"
purple
icon_state = "paint_violet"
paint_type = "purple"
/obj/item/weapon/reagent_containers/glass/paint/purple
icon_state = "paint_violet"
paint_type = "purple"
black
icon_state = "paint_black"
paint_type = "black"
/obj/item/weapon/reagent_containers/glass/paint/black
icon_state = "paint_black"
paint_type = "black"
white
icon_state = "paint_white"
paint_type = "white"
/obj/item/weapon/reagent_containers/glass/paint/white
icon_state = "paint_white"
paint_type = "white"
@@ -17,44 +17,44 @@
var/icon_broken = "lockbox+b"
attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/card/id))
if(src.broken)
to_chat(user, "<span class='warning'>It appears to be broken.</span>")
/obj/item/weapon/storage/lockbox/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/card/id))
if(src.broken)
to_chat(user, "<span class='warning'>It appears to be broken.</span>")
return
if(src.allowed(user))
src.locked = !( src.locked )
if(src.locked)
src.icon_state = src.icon_locked
to_chat(user, "<span class='notice'>You lock \the [src]!</span>")
close_all()
return
if(src.allowed(user))
src.locked = !( src.locked )
if(src.locked)
src.icon_state = src.icon_locked
to_chat(user, "<span class='notice'>You lock \the [src]!</span>")
close_all()
return
else
src.icon_state = src.icon_closed
to_chat(user, "<span class='notice'>You unlock \the [src]!</span>")
return
else
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()
spark_system.set_up(5, 0, src.loc)
spark_system.start()
playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
playsound(src, "sparks", 50, 1)
if(!locked)
..()
src.icon_state = src.icon_closed
to_chat(user, "<span class='notice'>You unlock \the [src]!</span>")
return
else
to_chat(user, "<span class='warning'>It's locked!</span>")
return
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()
spark_system.set_up(5, 0, src.loc)
spark_system.start()
playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
playsound(src, "sparks", 50, 1)
if(!locked)
..()
else
to_chat(user, "<span class='warning'>It's locked!</span>")
return
show_to(mob/user as mob)
if(locked)
to_chat(user, "<span class='warning'>It's locked!</span>")
else
..()
return
/obj/item/weapon/storage/lockbox/show_to(mob/user as mob)
if(locked)
to_chat(user, "<span class='warning'>It's locked!</span>")
else
..()
return
/obj/item/weapon/storage/lockbox/emag_act(var/remaining_charges, var/mob/user, var/emag_source, var/visual_feedback = "", var/audible_feedback = "")
if(!broken)
@@ -269,11 +269,11 @@
var/obj/item/sample_object
var/number
New(obj/item/sample as obj)
if(!istype(sample))
qdel(src)
sample_object = sample
number = 1
/datum/numbered_display/New(obj/item/sample as obj)
if(!istype(sample))
qdel(src)
sample_object = sample
number = 1
//This proc determins the size of the inventory to be displayed. Please touch it only if you know what you're doing.
/obj/item/weapon/storage/proc/orient2hud(mob/user as mob)
@@ -84,11 +84,11 @@
attack_verb = list("drilled")
drop_sound = 'sound/items/drop/accessory.ogg'
suicide_act(mob/user)
var/datum/gender/TU = gender_datums[user.get_visible_gender()]
to_chat(viewers(user),pick("<span class='danger'>\The [user] is pressing \the [src] to [TU.his] temple and activating it! It looks like [TU.hes] trying to commit suicide.</span>",
"<span class='danger'>\The [user] is pressing \the [src] to [TU.his] chest and activating it! It looks like [TU.hes] trying to commit suicide.</span>"))
return (BRUTELOSS)
/obj/item/weapon/surgical/surgicaldrill/suicide_act(mob/user)
var/datum/gender/TU = gender_datums[user.get_visible_gender()]
to_chat(viewers(user),pick("<span class='danger'>\The [user] is pressing \the [src] to [TU.his] temple and activating it! It looks like [TU.hes] trying to commit suicide.</span>",
"<span class='danger'>\The [user] is pressing \the [src] to [TU.his] chest and activating it! It looks like [TU.hes] trying to commit suicide.</span>"))
return (BRUTELOSS)
/*
* Scalpel
@@ -110,12 +110,12 @@
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
drop_sound = 'sound/items/drop/knife.ogg'
suicide_act(mob/user)
var/datum/gender/TU = gender_datums[user.get_visible_gender()]
to_chat(viewers(user),pick("<span class='danger'>\The [user] is slitting [TU.his] wrists with the [src.name]! It looks like [TU.hes] trying to commit suicide.</span>", \
"<span class='danger'>\The [user] is slitting [TU.his] throat with the [src.name]! It looks like [TU.hes] trying to commit suicide.</span>", \
"<span class='danger'>\The [user] is slitting [TU.his] stomach open with the [src.name]! It looks like [TU.hes] trying to commit seppuku.</span>"))
return (BRUTELOSS)
/obj/item/weapon/surgical/scalpel/suicide_act(mob/user)
var/datum/gender/TU = gender_datums[user.get_visible_gender()]
to_chat(viewers(user),pick("<span class='danger'>\The [user] is slitting [TU.his] wrists with the [src.name]! It looks like [TU.hes] trying to commit suicide.</span>", \
"<span class='danger'>\The [user] is slitting [TU.his] throat with the [src.name]! It looks like [TU.hes] trying to commit suicide.</span>", \
"<span class='danger'>\The [user] is slitting [TU.his] stomach open with the [src.name]! It looks like [TU.hes] trying to commit seppuku.</span>"))
return (BRUTELOSS)
/*
* Researchable Scalpels
@@ -1,5 +1,3 @@
#define TANK_MAX_RELEASE_PRESSURE (3*ONE_ATMOSPHERE)
#define TANK_DEFAULT_RELEASE_PRESSURE 21
#define TANK_IDEAL_PRESSURE 1015 //Arbitrary.
var/list/global/tank_gauge_cache = list()
+4 -4
View File
@@ -12,10 +12,10 @@
drop_sound = 'sound/items/drop/sword.ogg'
pickup_sound = 'sound/items/pickup/sword.ogg'
suicide_act(mob/user)
var/datum/gender/T = gender_datums[user.get_visible_gender()]
to_chat(viewers(user),"<span class='danger'>[user] is impaling [T.himself] with the [src.name]! It looks like [T.he] [T.is] trying to commit suicide.</span>")
return (BRUTELOSS|FIRELOSS)
/obj/item/weapon/nullrod/suicide_act(mob/user)
var/datum/gender/T = gender_datums[user.get_visible_gender()]
to_chat(viewers(user),"<span class='danger'>[user] is impaling [T.himself] with the [src.name]! It looks like [T.he] [T.is] trying to commit suicide.</span>")
return (BRUTELOSS|FIRELOSS)
/obj/item/weapon/nullrod/attack(mob/M as mob, mob/living/user as mob) //Paste from old-code to decult with a null rod.
+5 -4
View File
@@ -224,10 +224,11 @@
destroyed = 1
icon_state = "grille-b"
density = 0
New()
..()
health = rand(-5, -1) //In the destroyed but not utterly threshold.
healthcheck() //Send this to healthcheck just in case we want to do something else with it.
/obj/structure/grille/broken/New()
..()
health = rand(-5, -1) //In the destroyed but not utterly threshold.
healthcheck() //Send this to healthcheck just in case we want to do something else with it.
/obj/structure/grille/cult
name = "cult grille"
+7 -16
View File
@@ -247,9 +247,9 @@
icon = 'icons/obj/inflatable.dmi'
icon_state = "folded_wall_torn"
attack_self(mob/user)
to_chat(user, "<span class='notice'>The inflatable wall is too torn to be inflated!</span>")
add_fingerprint(user)
/obj/item/inflatable/torn/attack_self(mob/user)
to_chat(user, "<span class='notice'>The inflatable wall is too torn to be inflated!</span>")
add_fingerprint(user)
/obj/item/inflatable/door/torn
name = "torn inflatable door"
@@ -257,9 +257,9 @@
icon = 'icons/obj/inflatable.dmi'
icon_state = "folded_door_torn"
attack_self(mob/user)
to_chat(user, "<span class='notice'>The inflatable door is too torn to be inflated!</span>")
add_fingerprint(user)
/obj/item/inflatable/door/torn/attack_self(mob/user)
to_chat(user, "<span class='notice'>The inflatable door is too torn to be inflated!</span>")
add_fingerprint(user)
/obj/item/weapon/storage/briefcase/inflatable
name = "inflatable barrier box"
@@ -268,13 +268,4 @@
w_class = ITEMSIZE_NORMAL
max_storage_space = ITEMSIZE_COST_NORMAL * 7
can_hold = list(/obj/item/inflatable)
New()
..()
new /obj/item/inflatable/door(src)
new /obj/item/inflatable/door(src)
new /obj/item/inflatable/door(src)
new /obj/item/inflatable(src)
new /obj/item/inflatable(src)
new /obj/item/inflatable(src)
new /obj/item/inflatable(src)
starts_with = list(/obj/item/inflatable/door = 3, /obj/item/inflatable = 4)
+1 -1
View File
@@ -163,7 +163,7 @@ FLOOR SAFES
return
obj/structure/safe/ex_act(severity)
/obj/structure/safe/ex_act(severity)
return
//FLOOR SAFES
+6 -6
View File
@@ -80,7 +80,7 @@
/obj/item/weapon/stock_parts/capacitor/adv = 30,
/obj/item/weapon/computer_hardware/network_card/advanced = 20
)
obj/structure/salvageable/computer/Initialize()
/obj/structure/salvageable/computer/Initialize()
. = ..()
icon_state = "computer[rand(0,7)]"
@@ -136,7 +136,7 @@ obj/structure/salvageable/computer/Initialize()
/obj/item/stack/material/silver{amount = 10} = 30
)
obj/structure/salvageable/implant_container/Initialize()
/obj/structure/salvageable/implant_container/Initialize()
. = ..()
icon_state = "implant_container[rand(0,1)]"
@@ -164,7 +164,7 @@ obj/structure/salvageable/implant_container/Initialize()
/obj/item/weapon/computer_hardware/network_card/advanced = 20
)
obj/structure/salvageable/data/Initialize()
/obj/structure/salvageable/data/Initialize()
. = ..()
icon_state = "data[rand(0,1)]"
@@ -194,7 +194,7 @@ obj/structure/salvageable/data/Initialize()
/obj/item/weapon/computer_hardware/network_card/advanced = 20
)
obj/structure/salvageable/server/Initialize()
/obj/structure/salvageable/server/Initialize()
. = ..()
icon_state = "server[rand(0,1)]"
@@ -219,7 +219,7 @@ obj/structure/salvageable/server/Initialize()
/obj/item/weapon/computer_hardware/hard_drive/advanced = 40
)
obj/structure/salvageable/personal/Initialize()
/obj/structure/salvageable/personal/Initialize()
. = ..()
icon_state = "personal[rand(0,12)]"
new /obj/structure/table/reinforced (loc)
@@ -234,7 +234,7 @@ obj/structure/salvageable/personal/Initialize()
/obj/item/weapon/computer_hardware/hard_drive/cluster = 50
)
obj/structure/salvageable/bliss/Initialize()
/obj/structure/salvageable/bliss/Initialize()
. = ..()
icon_state = "bliss[rand(0,1)]"
@@ -56,7 +56,7 @@
// When destroyed by explosions, properly handle contents.
obj/structure/ex_act(severity)
/obj/structure/ex_act(severity)
switch(severity)
if(1.0)
for(var/atom/movable/AM in contents)
@@ -9,7 +9,7 @@
*/
obj/structure/windoor_assembly
/obj/structure/windoor_assembly
name = "windoor assembly"
icon = 'icons/obj/doors/windoor.dmi'
icon_state = "l_windoor_assembly01"
@@ -27,12 +27,12 @@ obj/structure/windoor_assembly
var/state = "01" //How far the door assembly has progressed in terms of sprites
var/step = null //How far the door assembly has progressed in terms of steps
obj/structure/windoor_assembly/secure
/obj/structure/windoor_assembly/secure
name = "secure windoor assembly"
secure = "secure_"
icon_state = "l_secure_windoor_assembly01"
obj/structure/windoor_assembly/New(Loc, start_dir=NORTH, constructed=0)
/obj/structure/windoor_assembly/New(Loc, start_dir=NORTH, constructed=0)
..()
if(constructed)
state = "01"
@@ -46,7 +46,7 @@ obj/structure/windoor_assembly/New(Loc, start_dir=NORTH, constructed=0)
update_nearby_tiles(need_rebuild=1)
obj/structure/windoor_assembly/Destroy()
/obj/structure/windoor_assembly/Destroy()
density = 0
update_nearby_tiles()
..()