initial commit - cross reference with 5th port - obviously has compile errors
This commit is contained in:
@@ -0,0 +1,87 @@
|
||||
/* Alien shit!
|
||||
* Contains:
|
||||
* effect/acid
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Acid
|
||||
*/
|
||||
/obj/effect/acid
|
||||
gender = PLURAL
|
||||
name = "acid"
|
||||
desc = "Burbling corrossive stuff."
|
||||
icon_state = "acid"
|
||||
density = 0
|
||||
opacity = 0
|
||||
anchored = 1
|
||||
unacidable = 1
|
||||
var/atom/target
|
||||
var/ticks = 0
|
||||
var/target_strength = 0
|
||||
|
||||
|
||||
/obj/effect/acid/New(loc, targ)
|
||||
..(loc)
|
||||
target = targ
|
||||
|
||||
//handle APCs and newscasters and stuff nicely
|
||||
pixel_x = target.pixel_x
|
||||
pixel_y = target.pixel_y
|
||||
|
||||
if(isturf(target)) //Turfs take twice as long to take down.
|
||||
target_strength = 640
|
||||
else
|
||||
target_strength = 320
|
||||
tick()
|
||||
|
||||
|
||||
/obj/effect/acid/proc/tick()
|
||||
if(!target)
|
||||
qdel(src)
|
||||
|
||||
ticks++
|
||||
|
||||
if(ticks >= target_strength)
|
||||
target.visible_message("<span class='warning'>[target] collapses under its own weight into a puddle of goop and undigested debris!</span>")
|
||||
|
||||
if(istype(target, /obj/structure/closet))
|
||||
var/obj/structure/closet/T = target
|
||||
T.dump_contents()
|
||||
qdel(target)
|
||||
|
||||
if(istype(target, /turf/closed/mineral))
|
||||
var/turf/closed/mineral/M = target
|
||||
M.ChangeTurf(M.baseturf)
|
||||
|
||||
if(istype(target, /turf/open/floor))
|
||||
var/turf/open/floor/F = target
|
||||
F.ChangeTurf(F.baseturf)
|
||||
|
||||
if(istype(target, /turf/closed/wall))
|
||||
var/turf/closed/wall/W = target
|
||||
W.dismantle_wall(1)
|
||||
|
||||
else
|
||||
qdel(target)
|
||||
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
x = target.x
|
||||
y = target.y
|
||||
z = target.z
|
||||
|
||||
switch(target_strength - ticks)
|
||||
if(480)
|
||||
visible_message("<span class='warning'>[target] is holding up against the acid!</span>")
|
||||
if(320)
|
||||
visible_message("<span class='warning'>[target] is being melted by the acid!</span>")
|
||||
if(160)
|
||||
visible_message("<span class='warning'>[target] is struggling to withstand the acid!</span>")
|
||||
if(80)
|
||||
visible_message("<span class='warning'>[target] begins to crumble under the acid!</span>")
|
||||
|
||||
spawn(1)
|
||||
if(src)
|
||||
tick()
|
||||
@@ -0,0 +1,230 @@
|
||||
//Anomalies, used for events. Note that these DO NOT work by themselves; their procs are called by the event datum.
|
||||
|
||||
/obj/effect/anomaly
|
||||
name = "anomaly"
|
||||
desc = "A mysterious anomaly, seen commonly only in the region of space that the station orbits..."
|
||||
icon_state = "bhole3"
|
||||
unacidable = 1
|
||||
density = 0
|
||||
anchored = 1
|
||||
luminosity = 3
|
||||
var/movechance = 70
|
||||
var/obj/item/device/assembly/signaler/anomaly/aSignal = null
|
||||
|
||||
/obj/effect/anomaly/New()
|
||||
..()
|
||||
poi_list |= src
|
||||
SetLuminosity(initial(luminosity))
|
||||
aSignal = new(src)
|
||||
aSignal.code = rand(1,100)
|
||||
|
||||
aSignal.frequency = rand(1200, 1599)
|
||||
if(IsMultiple(aSignal.frequency, 2))//signaller frequencies are always uneven!
|
||||
aSignal.frequency++
|
||||
|
||||
/obj/effect/anomaly/Destroy()
|
||||
poi_list.Remove(src)
|
||||
return ..()
|
||||
|
||||
/obj/effect/anomaly/proc/anomalyEffect()
|
||||
if(prob(movechance))
|
||||
step(src,pick(alldirs))
|
||||
|
||||
|
||||
/obj/effect/anomaly/ex_act(severity, target)
|
||||
if(severity == 1)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/anomaly/proc/anomalyNeutralize()
|
||||
PoolOrNew(/obj/effect/particle_effect/smoke/bad, loc)
|
||||
|
||||
for(var/atom/movable/O in src)
|
||||
O.loc = src.loc
|
||||
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/effect/anomaly/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/device/analyzer))
|
||||
user << "<span class='notice'>Analyzing... [src]'s unstable field is fluctuating along frequency [format_frequency(aSignal.frequency)], code [aSignal.code].</span>"
|
||||
|
||||
///////////////////////
|
||||
|
||||
/obj/effect/anomaly/grav
|
||||
name = "gravitational anomaly"
|
||||
icon_state = "shield2"
|
||||
density = 0
|
||||
var/boing = 0
|
||||
|
||||
/obj/effect/anomaly/grav/New()
|
||||
..()
|
||||
aSignal.origin_tech = "magnets=7"
|
||||
|
||||
/obj/effect/anomaly/grav/anomalyEffect()
|
||||
..()
|
||||
boing = 1
|
||||
for(var/obj/O in orange(4, src))
|
||||
if(!O.anchored)
|
||||
step_towards(O,src)
|
||||
for(var/mob/living/M in range(0, src))
|
||||
gravShock(M)
|
||||
for(var/mob/living/M in orange(4, src))
|
||||
step_towards(M,src)
|
||||
for(var/obj/O in range(0,src))
|
||||
if(!O.anchored)
|
||||
var/mob/living/target = locate() in view(4,src)
|
||||
if(target && !target.stat)
|
||||
O.throw_at(target, 5, 10)
|
||||
|
||||
/obj/effect/anomaly/grav/Crossed(mob/A)
|
||||
gravShock(A)
|
||||
|
||||
/obj/effect/anomaly/grav/Bump(mob/A)
|
||||
gravShock(A)
|
||||
|
||||
/obj/effect/anomaly/grav/Bumped(mob/A)
|
||||
gravShock(A)
|
||||
|
||||
/obj/effect/anomaly/grav/proc/gravShock(mob/A)
|
||||
if(boing && isliving(A) && !A.stat)
|
||||
A.Weaken(2)
|
||||
var/atom/target = get_edge_target_turf(A, get_dir(src, get_step_away(A, src)))
|
||||
A.throw_at(target, 5, 1)
|
||||
boing = 0
|
||||
|
||||
/////////////////////
|
||||
|
||||
/obj/effect/anomaly/flux
|
||||
name = "flux wave anomaly"
|
||||
icon_state = "electricity2"
|
||||
density = 1
|
||||
var/canshock = 0
|
||||
var/shockdamage = 20
|
||||
|
||||
/obj/effect/anomaly/flux/New()
|
||||
..()
|
||||
aSignal.origin_tech = "powerstorage=7"
|
||||
|
||||
/obj/effect/anomaly/flux/anomalyEffect()
|
||||
..()
|
||||
canshock = 1
|
||||
for(var/mob/living/M in range(0, src))
|
||||
mobShock(M)
|
||||
|
||||
/obj/effect/anomaly/flux/Crossed(mob/living/M)
|
||||
mobShock(M)
|
||||
|
||||
/obj/effect/anomaly/flux/Bump(mob/living/M)
|
||||
mobShock(M)
|
||||
|
||||
/obj/effect/anomaly/flux/Bumped(mob/living/M)
|
||||
mobShock(M)
|
||||
|
||||
/obj/effect/anomaly/flux/proc/mobShock(mob/living/M)
|
||||
if(canshock && istype(M))
|
||||
canshock = 0 //Just so you don't instakill yourself if you slam into the anomaly five times in a second.
|
||||
if(iscarbon(M))
|
||||
if(ishuman(M))
|
||||
M.electrocute_act(shockdamage, "[name]", safety=1)
|
||||
return
|
||||
M.electrocute_act(shockdamage, "[name]")
|
||||
return
|
||||
else
|
||||
M.adjustFireLoss(shockdamage)
|
||||
M.visible_message("<span class='danger'>[M] was shocked by \the [name]!</span>", \
|
||||
"<span class='userdanger'>You feel a powerful shock coursing through your body!</span>", \
|
||||
"<span class='italics'>You hear a heavy electrical crack.</span>")
|
||||
|
||||
/////////////////////
|
||||
|
||||
/obj/effect/anomaly/bluespace
|
||||
name = "bluespace anomaly"
|
||||
icon = 'icons/obj/projectiles.dmi'
|
||||
icon_state = "bluespace"
|
||||
density = 1
|
||||
|
||||
/obj/effect/anomaly/bluespace/New()
|
||||
..()
|
||||
aSignal.origin_tech = "bluespace=7"
|
||||
|
||||
/obj/effect/anomaly/bluespace/anomalyEffect()
|
||||
..()
|
||||
for(var/mob/living/M in range(1,src))
|
||||
do_teleport(M, locate(M.x, M.y, M.z), 4)
|
||||
|
||||
/obj/effect/anomaly/bluespace/Bumped(atom/A)
|
||||
if(isliving(A))
|
||||
do_teleport(A, locate(A.x, A.y, A.z), 8)
|
||||
|
||||
/////////////////////
|
||||
|
||||
/obj/effect/anomaly/pyro
|
||||
name = "pyroclastic anomaly"
|
||||
icon_state = "mustard"
|
||||
|
||||
/obj/effect/anomaly/pyro/New()
|
||||
..()
|
||||
aSignal.origin_tech = "plasmatech=7"
|
||||
|
||||
/obj/effect/anomaly/pyro/anomalyEffect()
|
||||
..()
|
||||
var/turf/open/T = get_turf(src)
|
||||
if(istype(T))
|
||||
T.atmos_spawn_air("o2=5;plasma=5;TEMP=1000")
|
||||
|
||||
/////////////////////
|
||||
|
||||
/obj/effect/anomaly/bhole
|
||||
name = "vortex anomaly"
|
||||
icon_state = "bhole3"
|
||||
desc = "That's a nice station you have there. It'd be a shame if something happened to it."
|
||||
|
||||
/obj/effect/anomaly/bhole/New()
|
||||
..()
|
||||
aSignal.origin_tech = "engineering=7"
|
||||
|
||||
/obj/effect/anomaly/bhole/anomalyEffect()
|
||||
..()
|
||||
if(!isturf(loc)) //blackhole cannot be contained inside anything. Weird stuff might happen
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
grav(rand(0,3), rand(2,3), 50, 25)
|
||||
|
||||
//Throwing stuff around!
|
||||
for(var/obj/O in range(2,src))
|
||||
if(O == src)
|
||||
return //DON'T DELETE YOURSELF GOD DAMN
|
||||
if(!O.anchored)
|
||||
var/mob/living/target = locate() in view(4,src)
|
||||
if(target && !target.stat)
|
||||
O.throw_at(target, 7, 5)
|
||||
else
|
||||
O.ex_act(2)
|
||||
|
||||
/obj/effect/anomaly/bhole/proc/grav(r, ex_act_force, pull_chance, turf_removal_chance)
|
||||
for(var/t = -r, t < r, t++)
|
||||
affect_coord(x+t, y-r, ex_act_force, pull_chance, turf_removal_chance)
|
||||
affect_coord(x-t, y+r, ex_act_force, pull_chance, turf_removal_chance)
|
||||
affect_coord(x+r, y+t, ex_act_force, pull_chance, turf_removal_chance)
|
||||
affect_coord(x-r, y-t, ex_act_force, pull_chance, turf_removal_chance)
|
||||
|
||||
/obj/effect/anomaly/bhole/proc/affect_coord(x, y, ex_act_force, pull_chance, turf_removal_chance)
|
||||
//Get turf at coordinate
|
||||
var/turf/T = locate(x, y, z)
|
||||
if(isnull(T))
|
||||
return
|
||||
|
||||
//Pulling and/or ex_act-ing movable atoms in that turf
|
||||
if(prob(pull_chance))
|
||||
for(var/obj/O in T.contents)
|
||||
if(O.anchored)
|
||||
O.ex_act(ex_act_force)
|
||||
else
|
||||
step_towards(O,src)
|
||||
for(var/mob/living/M in T.contents)
|
||||
step_towards(M,src)
|
||||
|
||||
//Damaging the turf
|
||||
if( T && prob(turf_removal_chance) )
|
||||
T.ex_act(ex_act_force)
|
||||
@@ -0,0 +1,34 @@
|
||||
var/list/obj/effect/bump_teleporter/BUMP_TELEPORTERS = list()
|
||||
|
||||
/obj/effect/bump_teleporter
|
||||
name = "bump-teleporter"
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
icon_state = "x2"
|
||||
var/id = null //id of this bump_teleporter.
|
||||
var/id_target = null //id of bump_teleporter which this moves you to.
|
||||
invisibility = INVISIBILITY_ABSTRACT //nope, can't see this
|
||||
anchored = 1
|
||||
density = 1
|
||||
opacity = 0
|
||||
|
||||
/obj/effect/bump_teleporter/New()
|
||||
..()
|
||||
BUMP_TELEPORTERS += src
|
||||
|
||||
/obj/effect/bump_teleporter/Destroy()
|
||||
BUMP_TELEPORTERS -= src
|
||||
return ..()
|
||||
|
||||
/obj/effect/bump_teleporter/Bumped(atom/user)
|
||||
if(!ismob(user))
|
||||
//user.loc = src.loc //Stop at teleporter location
|
||||
return
|
||||
|
||||
if(!id_target)
|
||||
//user.loc = src.loc //Stop at teleporter location, there is nowhere to teleport to.
|
||||
return
|
||||
|
||||
for(var/obj/effect/bump_teleporter/BT in BUMP_TELEPORTERS)
|
||||
if(BT.id == src.id_target)
|
||||
usr.loc = BT.loc //Teleport to location with correct id.
|
||||
return
|
||||
@@ -0,0 +1,278 @@
|
||||
|
||||
//########################## POSTERS ##################################
|
||||
|
||||
#define NUM_OF_POSTER_DESIGNS 36 // contraband posters
|
||||
|
||||
#define NUM_OF_POSTER_DESIGNS_LEGIT 35 // corporate approved posters
|
||||
|
||||
#define POSTERNAME "name"
|
||||
|
||||
#define POSTERDESC "desc"
|
||||
|
||||
|
||||
//########################## LISTS OF POSTERS AND DESCS #####################
|
||||
|
||||
// please add new posters and names to their respective lists and update constant(s) above
|
||||
// use the format below, including punctuation, this will become important later
|
||||
|
||||
// CONTRABAND
|
||||
|
||||
var/global/list/contrabandposters = list(
|
||||
|
||||
list(name = "- Free Tonto", desc = " A salvaged shred of a much larger flag, colors bled together and faded from age."),
|
||||
list(name = "- Atmosia Declaration of Independence", desc = " A relic of a failed rebellion."),
|
||||
list(name = "- Fun Police", desc = " A poster condemning the station's security forces."),
|
||||
list(name = "- Lusty Xenomorph", desc = " A heretical poster depicting the titular star of an equally heretical book."),
|
||||
list(name = "- Syndicate Recruitment", desc = " See the galaxy! Shatter corrupt megacorporations! Join today!"),
|
||||
list(name = "- Clown", desc = " Honk."),
|
||||
list(name = "- Smoke", desc = " A poster advertising a rival corporate brand of cigarettes."),
|
||||
list(name = "- Grey Tide", desc = " A rebellious poster symbolizing assistant solidarity."),
|
||||
list(name = "- Missing Gloves", desc = " This poster references the uproar that followed Nanotrasen's financial cuts toward insulated-glove purchases."),
|
||||
list(name = "- Hacking Guide", desc = " This poster details the internal workings of the common Nanotrasen airlock. Sadly, it appears out of date."),
|
||||
list(name = "- RIP Badger", desc = " This seditious poster references Nanotrasen's genocide of a space station full of badgers."),
|
||||
list(name = "- Ambrosia Vulgaris", desc = " This poster is lookin' pretty trippy man."),
|
||||
list(name = "- Donut Corp.", desc = " This poster is an unauthorized advertisement for Donut Corp."),
|
||||
list(name = "- EAT.", desc = " This poster promotes rank gluttony."),
|
||||
list(name = "- Tools", desc = " This poster looks like an advertisement for tools, but is in fact a subliminal jab at the tools at CentComm."),
|
||||
list(name = "- Power", desc = " A poster that positions the seat of power outside Nanotrasen."),
|
||||
list(name = "- Space Cube", desc = " Ignorant of Nature's Harmonic 6 Side Space Cube Creation, the Spacemen are Dumb, Educated Singularity Stupid and Evil."),
|
||||
list(name = "- Communist State", desc = " All hail the Communist party!"),
|
||||
list(name = "- Lamarr", desc = " This poster depicts Lamarr. Probably made by a traitorous Research Director."),
|
||||
list(name = "- Borg Fancy", desc = " Being fancy can be for any borg, just need a suit."),
|
||||
list(name = "- Borg Fancy v2", desc = " Borg Fancy, Now only taking the most fancy."),
|
||||
list(name = "- Kosmicheskaya Stantsiya 13 Does Not Exist", desc = " A poster mocking CentComm's denial of the existence of the derelict station near Space Station 13."),
|
||||
list(name = "- Rebels Unite", desc = " A poster urging the viewer to rebel against Nanotrasen."),
|
||||
list(name = "- C-20r", desc = " A poster advertising the Scarborough Arms C-20r."),
|
||||
list(name = "- Have a Puff", desc = " Who cares about lung cancer when you're high as a kite?"),
|
||||
list(name = "- Revolver", desc = " Because seven shots are all you need."),
|
||||
list(name = "- D-Day Promo", desc = " A promotional poster for some rapper."),
|
||||
list(name = "- Syndicate Pistol", desc = " A poster advertising syndicate pistols as being 'classy as fuck'. It is covered in faded gang tags."),
|
||||
list(name = "- Energy Swords", desc = " All the colors of the bloody murder rainbow."),
|
||||
list(name = "- Red Rum", desc = " Looking at this poster makes you want to kill."),
|
||||
list(name = "- CC 64K Ad", desc = " The latest portable computer from Comrade Computing, with a whole 64kB of ram!"),
|
||||
list(name = "- Punch Shit", desc = " Fight things for no reason, like a man!"),
|
||||
list(name = "- The Griffin", desc = " The Griffin commands you to be the worst you can be. Will you?"),
|
||||
list(name = "- Lizard", desc = " This lewd poster depicts a lizard preparing to mate."),
|
||||
list(name = "- Free Drone", desc = " This poster commemorates the bravery of the rogue drone banned by CentComm."),
|
||||
list(name = "- Busty Backdoor Xeno Babes 6", desc = " Get a load, or give, of these all natural Xenos!") )
|
||||
|
||||
// LEGIT
|
||||
|
||||
var/global/list/legitposters = list(
|
||||
|
||||
list(name = "- Here For Your Safety", desc = " A poster glorifying the station's security force."),
|
||||
list(name = "- Nanotrasen Logo", desc = " A poster depicting the Nanotrasen logo."),
|
||||
list(name = "- Cleanliness", desc = " A poster warning of the dangers of poor hygiene."),
|
||||
list(name = "- Help Others", desc = " A poster encouraging you to help fellow crewmembers."),
|
||||
list(name = "- Build", desc = " A poster glorifying the engineering team."),
|
||||
list(name = "- Bless This Spess", desc = " A poster blessing this area."),
|
||||
list(name = "- Science", desc = " A poster depicting an atom."),
|
||||
list(name = "- Ian", desc = " Arf arf. Yap."),
|
||||
list(name = "- Obey", desc = " A poster instructing the viewer to obey authority."),
|
||||
list(name = "- Walk", desc = " A poster instructing the viewer to walk instead of running."),
|
||||
list(name = "- State Laws", desc = " A poster instructing cyborgs to state their laws."),
|
||||
list(name = "- Love Ian", desc = " Ian is love, Ian is life."),
|
||||
list(name = "- Space Cops.", desc = " A poster advertising the television show Space Cops."),
|
||||
list(name = "- Ue No.", desc = " This thing is all in Japanese."),
|
||||
list(name = "- Get Your LEGS", desc = " LEGS: Leadership, Experience, Genius, Subordination."),
|
||||
list(name = "- Do Not Question", desc = " A poster instructing the viewer not to ask about things they aren't meant to know."),
|
||||
list(name = "- Work For A Future", desc = " A poster encouraging you to work for your future."),
|
||||
list(name = "- Soft Cap Pop Art", desc = " A poster reprint of some cheap pop art."),
|
||||
list(name = "- Safety: Internals", desc = " A poster instructing the viewer to wear internals in the rare environments where there is no oxygen or the air has been rendered toxic."),
|
||||
list(name = "- Safety: Eye Protection", desc = " A poster instructing the viewer to wear eye protection when dealing with chemicals, smoke, or bright lights."),
|
||||
list(name = "- Safety: Report", desc = " A poster instructing the viewer to report suspicious activity to the security force."),
|
||||
list(name = "- Report Crimes", desc = " A poster encouraging the swift reporting of crime or seditious behavior to station security."),
|
||||
list(name = "- Ion Rifle", desc = " A poster displaying an Ion Rifle."),
|
||||
list(name = "- Foam Force Ad", desc = " Foam Force, it's Foam or be Foamed!"),
|
||||
list(name = "- Cohiba Robusto Ad", desc = " Cohiba Robusto, the classy cigar."),
|
||||
list(name = "- 50th Anniversary Vintage Reprint", desc = " A reprint of a poster from 2505, commemorating the 50th Aniversery of Nanoposters Manufacturing, a subsidary of Nanotrasen."),
|
||||
list(name = "- Fruit Bowl", desc = " Simple, yet awe-inspiring."),
|
||||
list(name = "- PDA Ad", desc = " A poster advertising the latest PDA from Nanotrasen suppliers."),
|
||||
list(name = "- Enlist", desc = " Enlist in the Nanotrasen Deathsquadron reserves today!"),
|
||||
list(name = "- Nanomichi Ad", desc = " A poster advertising Nanomichi brand audio cassettes."),
|
||||
list(name = "- 12 Gauge", desc = " A poster boasting about the superiority of 12 gauge shotgun shells."),
|
||||
list(name = "- High-Class Martini", desc = " I told you to shake it, no stirring."),
|
||||
list(name = "- The Owl", desc = " The Owl would do his best to protect the station. Will you?"),
|
||||
list(name = "- No ERP", desc = " This poster reminds the crew that Eroticism, Rape and Pornography are banned on Nanotrasen stations."),
|
||||
list(name = "- Carbon Dioxide", desc = " This informational poster teaches the viewer what carbon dioxide is.") )
|
||||
|
||||
//########################## THE ACTUAL POSTER CODE ###########################
|
||||
|
||||
/obj/item/weapon/poster
|
||||
name = "poster"
|
||||
desc = "You probably shouldn't be holding this."
|
||||
icon = 'icons/obj/contraband.dmi'
|
||||
force = 0
|
||||
burn_state = FLAMMABLE
|
||||
var/serial_number = 0
|
||||
var/obj/structure/sign/poster/resulting_poster = null //The poster that will be created is initialised and stored through contraband/poster's constructor
|
||||
var/official = 0
|
||||
|
||||
|
||||
/obj/item/weapon/poster/contraband
|
||||
name = "contraband poster"
|
||||
desc = "This poster comes with its own automatic adhesive mechanism, for easy pinning to any vertical surface. Its vulgar themes have marked it as contraband aboard Nanotrasen space facilities."
|
||||
icon_state = "rolled_poster"
|
||||
|
||||
/obj/item/weapon/poster/legit
|
||||
name = "motivational poster"
|
||||
icon_state = "rolled_legit"
|
||||
desc = "An official Nanotrasen-issued poster to foster a compliant and obedient workforce. It comes with state-of-the-art adhesive backing, for easy pinning to any vertical surface."
|
||||
official = 1
|
||||
|
||||
/obj/item/weapon/poster/New(turf/loc, given_serial = 0)
|
||||
if(given_serial == 0)
|
||||
if(!official)
|
||||
serial_number = rand(1, NUM_OF_POSTER_DESIGNS)
|
||||
resulting_poster = new(serial_number,official)
|
||||
else
|
||||
serial_number = rand(1, NUM_OF_POSTER_DESIGNS_LEGIT)
|
||||
resulting_poster = new(serial_number,official)
|
||||
else
|
||||
serial_number = given_serial
|
||||
//We don't give it a resulting_poster because if we called it with a given_serial it means that we're rerolling an already used poster.
|
||||
name += " - No. [serial_number]"
|
||||
..(loc)
|
||||
|
||||
|
||||
/*/obj/item/weapon/contraband/poster/attack(mob/M as mob, mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
if(resulting_poster)
|
||||
resulting_poster.add_fingerprint(user)
|
||||
..()*/
|
||||
|
||||
/*/obj/item/weapon/contraband/poster/attack(atom/A, mob/user as mob) //This shit is handled through the wall's attackby()
|
||||
if(istype(A, /turf/closed/wall))
|
||||
if(resulting_poster == null)
|
||||
return
|
||||
else
|
||||
var/turf/closed/wall/W = A
|
||||
var/check = 0
|
||||
var/stuff_on_wall = 0
|
||||
for(var/obj/O in W.contents) //Let's see if it already has a poster on it or too much stuff
|
||||
if(istype(O,/obj/structure/sign/poster))
|
||||
check = 1
|
||||
break
|
||||
stuff_on_wall++
|
||||
if(stuff_on_wall == 3)
|
||||
check = 1
|
||||
break
|
||||
|
||||
if(check)
|
||||
user << "<span class='notice'>The wall is far too cluttered to place a poster!</span>"
|
||||
return
|
||||
|
||||
resulting_poster.loc = W //Looks like it's uncluttered enough. Place the poster
|
||||
W.contents += resulting_poster
|
||||
|
||||
qdel(src)*/
|
||||
|
||||
|
||||
|
||||
//############################## THE ACTUAL DECALS ###########################
|
||||
|
||||
/obj/structure/sign/poster
|
||||
name = "poster"
|
||||
desc = "A large piece of space-resistant printed paper."
|
||||
icon = 'icons/obj/contraband.dmi'
|
||||
anchored = 1
|
||||
var/serial_number //Will hold the value of src.loc if nobody initialises it
|
||||
var/ruined = 0
|
||||
var/official = 0
|
||||
var/placespeed = 37 // don't change this, otherwise the animation will not sync to the progress bar
|
||||
|
||||
/obj/structure/sign/poster/New(serial,rolled_official)
|
||||
serial_number = serial
|
||||
official = rolled_official
|
||||
if(serial_number == loc)
|
||||
if(!official)
|
||||
serial_number = rand(1, NUM_OF_POSTER_DESIGNS) //This is for the mappers that want individual posters without having to use rolled posters.
|
||||
if(official)
|
||||
serial_number = rand(1, NUM_OF_POSTER_DESIGNS_LEGIT)
|
||||
if(!official)
|
||||
icon_state = "poster[serial_number]"
|
||||
name += contrabandposters[serial_number][POSTERNAME]
|
||||
desc += contrabandposters[serial_number][POSTERDESC]
|
||||
else if (official)
|
||||
icon_state = "poster[serial_number]_legit"
|
||||
name += legitposters[serial_number][POSTERNAME]
|
||||
desc += legitposters[serial_number][POSTERDESC]
|
||||
..()
|
||||
|
||||
/obj/structure/sign/poster/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/wirecutters))
|
||||
playsound(loc, 'sound/items/Wirecutter.ogg', 100, 1)
|
||||
if(ruined)
|
||||
user << "<span class='notice'>You remove the remnants of the poster.</span>"
|
||||
qdel(src)
|
||||
else
|
||||
user << "<span class='notice'>You carefully remove the poster from the wall.</span>"
|
||||
roll_and_drop(user.loc, official)
|
||||
|
||||
|
||||
/obj/structure/sign/poster/attack_hand(mob/user)
|
||||
if(ruined)
|
||||
return
|
||||
var/temp_loc = user.loc
|
||||
if((user.loc != temp_loc) || ruined )
|
||||
return
|
||||
visible_message("[user] rips [src] in a single, decisive motion!" )
|
||||
playsound(src.loc, 'sound/items/poster_ripped.ogg', 100, 1)
|
||||
ruined = 1
|
||||
icon_state = "poster_ripped"
|
||||
name = "ripped poster"
|
||||
desc = "You can't make out anything from the poster's original print. It's ruined."
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/structure/sign/poster/proc/roll_and_drop(turf/location, official)
|
||||
if (!official)
|
||||
var/obj/item/weapon/poster/contraband/P = new(src, serial_number)
|
||||
P.resulting_poster = src
|
||||
P.loc = location
|
||||
P.pixel_x = 0
|
||||
P.pixel_y = 0
|
||||
loc = P
|
||||
else
|
||||
var/obj/item/weapon/poster/legit/P = new(src, serial_number)
|
||||
P.resulting_poster = src
|
||||
P.loc = location
|
||||
P.pixel_x = 0
|
||||
P.pixel_y = 0
|
||||
loc = P
|
||||
|
||||
|
||||
//seperated to reduce code duplication. Moved here for ease of reference and to unclutter r_wall/attackby()
|
||||
/turf/closed/wall/proc/place_poster(obj/item/weapon/poster/P, mob/user)
|
||||
if(!P.resulting_poster)
|
||||
return
|
||||
|
||||
var/stuff_on_wall = 0
|
||||
for(var/obj/O in contents) //Let's see if it already has a poster on it or too much stuff
|
||||
if(istype(O,/obj/structure/sign/poster))
|
||||
user << "<span class='warning'>The wall is far too cluttered to place a poster!</span>"
|
||||
return
|
||||
stuff_on_wall++
|
||||
if(stuff_on_wall == 3)
|
||||
user << "<span class='warning'>The wall is far too cluttered to place a poster!</span>"
|
||||
return
|
||||
|
||||
user << "<span class='notice'>You start placing the poster on the wall...</span>" //Looks like it's uncluttered enough. Place the poster.
|
||||
|
||||
//declaring D because otherwise if P gets 'deconstructed' we lose our reference to P.resulting_poster
|
||||
var/obj/structure/sign/poster/D = P.resulting_poster
|
||||
|
||||
var/temp_loc = user.loc
|
||||
flick("poster_being_set",D)
|
||||
D.loc = src
|
||||
D.official = P.official
|
||||
qdel(P) //delete it now to cut down on sanity checks afterwards. Agouri's code supports rerolling it anyway
|
||||
playsound(D.loc, 'sound/items/poster_being_created.ogg', 100, 1)
|
||||
|
||||
if(do_after(user,D.placespeed,target=src))
|
||||
if(!D)
|
||||
return
|
||||
|
||||
if(istype(src,/turf/closed/wall) && user && user.loc == temp_loc) //Let's check if everything is still there
|
||||
user << "<span class='notice'>You place the poster!</span>"
|
||||
else
|
||||
D.roll_and_drop(temp_loc,D.official)
|
||||
@@ -0,0 +1,69 @@
|
||||
// Note: BYOND is object oriented. There is no reason for this to be copy/pasted blood code.
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood
|
||||
name = "xeno blood"
|
||||
desc = "It's green and acidic. It looks like... <i>blood?</i>"
|
||||
gender = PLURAL
|
||||
density = 0
|
||||
layer = ABOVE_OPEN_TURF_LAYER
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
icon_state = "xfloor1"
|
||||
random_icon_states = list("xfloor1", "xfloor2", "xfloor3", "xfloor4", "xfloor5", "xfloor6", "xfloor7")
|
||||
var/list/viruses = list()
|
||||
blood_DNA = list("UNKNOWN DNA" = "X*")
|
||||
bloodiness = MAX_SHOE_BLOODINESS
|
||||
blood_state = BLOOD_STATE_XENO
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/Destroy()
|
||||
for(var/datum/disease/D in viruses)
|
||||
D.cure(0)
|
||||
viruses = null
|
||||
return ..()
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xgibs/proc/streak(list/directions)
|
||||
spawn (0)
|
||||
var/direction = pick(directions)
|
||||
for (var/i = 0, i < pick(1, 200; 2, 150; 3, 50; 4), i++)
|
||||
sleep(3)
|
||||
if (i > 0)
|
||||
var/obj/effect/decal/cleanable/xenoblood/b = new /obj/effect/decal/cleanable/xenoblood/xsplatter(src.loc)
|
||||
for(var/datum/disease/D in src.viruses)
|
||||
var/datum/disease/ND = D.Copy(1)
|
||||
b.viruses += ND
|
||||
ND.holder = b
|
||||
if (step_to(src, get_step(src, direction), 0))
|
||||
break
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xsplatter
|
||||
random_icon_states = list("xgibbl1", "xgibbl2", "xgibbl3", "xgibbl4", "xgibbl5")
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xgibs
|
||||
name = "xeno gibs"
|
||||
desc = "Gnarly..."
|
||||
gender = PLURAL
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
icon_state = "xgib1"
|
||||
random_icon_states = list("xgib1", "xgib2", "xgib3", "xgib4", "xgib5", "xgib6")
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xgibs/ex_act()
|
||||
return
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xgibs/up
|
||||
random_icon_states = list("xgib1", "xgib2", "xgib3", "xgib4", "xgib5", "xgib6","xgibup1","xgibup1","xgibup1")
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xgibs/down
|
||||
random_icon_states = list("xgib1", "xgib2", "xgib3", "xgib4", "xgib5", "xgib6","xgibdown1","xgibdown1","xgibdown1")
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xgibs/body
|
||||
random_icon_states = list("xgibhead", "xgibtorso")
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xgibs/limb
|
||||
random_icon_states = list("xgibleg", "xgibarm")
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xgibs/core
|
||||
random_icon_states = list("xgibmid1", "xgibmid2", "xgibmid3")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/xtracks
|
||||
icon_state = "xtracks"
|
||||
random_icon_states = null
|
||||
blood_DNA = list("UNKNOWN DNA" = "X*")
|
||||
@@ -0,0 +1,193 @@
|
||||
/obj/effect/decal/cleanable/blood
|
||||
name = "blood"
|
||||
desc = "It's red and gooey. Perhaps it's the chef's cooking?"
|
||||
gender = PLURAL
|
||||
density = 0
|
||||
layer = ABOVE_NORMAL_TURF_LAYER
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
icon_state = "floor1"
|
||||
random_icon_states = list("floor1", "floor2", "floor3", "floor4", "floor5", "floor6", "floor7")
|
||||
var/list/viruses = list()
|
||||
blood_DNA = list()
|
||||
blood_state = BLOOD_STATE_HUMAN
|
||||
bloodiness = MAX_SHOE_BLOODINESS
|
||||
|
||||
/obj/effect/decal/cleanable/blood/Destroy()
|
||||
for(var/datum/disease/D in viruses)
|
||||
D.cure(0)
|
||||
viruses = null
|
||||
return ..()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/replace_decal(obj/effect/decal/cleanable/blood/C)
|
||||
if (C.blood_DNA)
|
||||
blood_DNA |= C.blood_DNA.Copy()
|
||||
..()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/splatter
|
||||
random_icon_states = list("gibbl1", "gibbl2", "gibbl3", "gibbl4", "gibbl5")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/tracks
|
||||
icon_state = "tracks"
|
||||
desc = "They look like tracks left by wheels."
|
||||
gender = PLURAL
|
||||
random_icon_states = null
|
||||
|
||||
/obj/effect/decal/cleanable/trail_holder //not a child of blood on purpose
|
||||
name = "blood"
|
||||
icon_state = "ltrails_1"
|
||||
desc = "Your instincts say you shouldn't be following these."
|
||||
gender = PLURAL
|
||||
density = 0
|
||||
layer = ABOVE_OPEN_TURF_LAYER
|
||||
random_icon_states = null
|
||||
var/list/existing_dirs = list()
|
||||
blood_DNA = list()
|
||||
|
||||
|
||||
/obj/effect/decal/cleanable/trail_holder/can_bloodcrawl_in()
|
||||
return 1
|
||||
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs
|
||||
name = "gibs"
|
||||
desc = "They look bloody and gruesome."
|
||||
gender = PLURAL
|
||||
density = 0
|
||||
layer = ABOVE_OPEN_TURF_LAYER
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
icon_state = "gibbl5"
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/New()
|
||||
..()
|
||||
reagents.add_reagent("liquidgibs", 5)
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/replace_decal(obj/effect/decal/cleanable/C)
|
||||
return
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/ex_act(severity, target)
|
||||
return
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/up
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6","gibup1","gibup1","gibup1")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/down
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6","gibdown1","gibdown1","gibdown1")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/body
|
||||
random_icon_states = list("gibhead", "gibtorso")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/limb
|
||||
random_icon_states = list("gibleg", "gibarm")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/core
|
||||
random_icon_states = list("gibmid1", "gibmid2", "gibmid3")
|
||||
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/proc/streak(list/directions)
|
||||
set waitfor = 0
|
||||
var/direction = pick(directions)
|
||||
for (var/i = 0, i < pick(1, 200; 2, 150; 3, 50; 4), i++)
|
||||
sleep(3)
|
||||
if (i > 0)
|
||||
var/obj/effect/decal/cleanable/blood/b = new /obj/effect/decal/cleanable/blood/splatter(src.loc)
|
||||
for(var/datum/disease/D in src.viruses)
|
||||
var/datum/disease/ND = D.Copy(1)
|
||||
b.viruses += ND
|
||||
ND.holder = b
|
||||
if (step_to(src, get_step(src, direction), 0))
|
||||
break
|
||||
|
||||
/obj/effect/decal/cleanable/blood/drip
|
||||
name = "drips of blood"
|
||||
desc = "It's red."
|
||||
gender = PLURAL
|
||||
icon_state = "1"
|
||||
random_icon_states = list("drip1","drip2","drip3","drip4","drip5")
|
||||
bloodiness = 0
|
||||
var/drips = 1
|
||||
|
||||
|
||||
/obj/effect/decal/cleanable/blood/drip/can_bloodcrawl_in()
|
||||
return 1
|
||||
|
||||
|
||||
//BLOODY FOOTPRINTS
|
||||
/obj/effect/decal/cleanable/blood/footprints
|
||||
name = "footprints"
|
||||
icon = 'icons/effects/footprints.dmi'
|
||||
icon_state = "nothingwhatsoever"
|
||||
desc = "where might they lead?"
|
||||
gender = PLURAL
|
||||
random_icon_states = null
|
||||
var/entered_dirs = 0
|
||||
var/exited_dirs = 0
|
||||
blood_state = BLOOD_STATE_HUMAN //the icon state to load images from
|
||||
var/list/shoe_types = list()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/footprints/Crossed(atom/movable/O)
|
||||
if(ishuman(O))
|
||||
var/mob/living/carbon/human/H = O
|
||||
var/obj/item/clothing/shoes/S = H.shoes
|
||||
if(S && S.bloody_shoes[blood_state])
|
||||
S.bloody_shoes[blood_state] = max(S.bloody_shoes[blood_state] - BLOOD_LOSS_PER_STEP, 0)
|
||||
entered_dirs|= H.dir
|
||||
shoe_types |= H.shoes.type
|
||||
update_icon()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/footprints/Uncrossed(atom/movable/O)
|
||||
if(ishuman(O))
|
||||
var/mob/living/carbon/human/H = O
|
||||
var/obj/item/clothing/shoes/S = H.shoes
|
||||
if(S && S.bloody_shoes[blood_state])
|
||||
S.bloody_shoes[blood_state] = max(S.bloody_shoes[blood_state] - BLOOD_LOSS_PER_STEP, 0)
|
||||
exited_dirs|= H.dir
|
||||
shoe_types |= H.shoes.type
|
||||
update_icon()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/footprints/update_icon()
|
||||
cut_overlays()
|
||||
|
||||
for(var/Ddir in cardinal)
|
||||
if(entered_dirs & Ddir)
|
||||
var/image/I
|
||||
if(bloody_footprints_cache["entered-[blood_state]-[Ddir]"])
|
||||
I = bloody_footprints_cache["entered-[blood_state]-[Ddir]"]
|
||||
else
|
||||
I = image(icon,"[blood_state]1",dir = Ddir)
|
||||
bloody_footprints_cache["entered-[blood_state]-[Ddir]"] = I
|
||||
if(I)
|
||||
add_overlay(I)
|
||||
if(exited_dirs & Ddir)
|
||||
var/image/I
|
||||
if(bloody_footprints_cache["exited-[blood_state]-[Ddir]"])
|
||||
I = bloody_footprints_cache["exited-[blood_state]-[Ddir]"]
|
||||
else
|
||||
I = image(icon,"[blood_state]2",dir = Ddir)
|
||||
bloody_footprints_cache["exited-[blood_state]-[Ddir]"] = I
|
||||
if(I)
|
||||
add_overlay(I)
|
||||
|
||||
alpha = BLOODY_FOOTPRINT_BASE_ALPHA+bloodiness
|
||||
|
||||
|
||||
/obj/effect/decal/cleanable/blood/footprints/examine(mob/user)
|
||||
. = ..()
|
||||
if(shoe_types.len)
|
||||
. += "You recognise the footprints as belonging to:\n"
|
||||
for(var/shoe in shoe_types)
|
||||
var/obj/item/clothing/shoes/S = shoe
|
||||
. += "some <B>[initial(S.name)]</B> \icon[S]\n"
|
||||
|
||||
user << .
|
||||
|
||||
/obj/effect/decal/cleanable/blood/footprints/replace_decal(obj/effect/decal/cleanable/C)
|
||||
if(blood_state != C.blood_state) //We only replace footprints of the same type as us
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/footprints/can_bloodcrawl_in()
|
||||
if((blood_state != BLOOD_STATE_OIL) && (blood_state != BLOOD_STATE_NOT_BLOODY))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -0,0 +1,167 @@
|
||||
/obj/effect/decal/cleanable/generic
|
||||
name = "clutter"
|
||||
desc = "Someone should clean that up."
|
||||
gender = PLURAL
|
||||
density = 0
|
||||
layer = ABOVE_OPEN_TURF_LAYER
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "shards"
|
||||
|
||||
/obj/effect/decal/cleanable/ash
|
||||
name = "ashes"
|
||||
desc = "Ashes to ashes, dust to dust, and into space."
|
||||
gender = PLURAL
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "ash"
|
||||
|
||||
/obj/effect/decal/cleanable/ash/New()
|
||||
..()
|
||||
reagents.add_reagent("ash", 30)
|
||||
pixel_x = rand(-5, 5)
|
||||
pixel_y = rand(-5, 5)
|
||||
|
||||
/obj/effect/decal/cleanable/dirt
|
||||
name = "dirt"
|
||||
desc = "Someone should clean that up."
|
||||
icon_state = "dirt"
|
||||
gender = PLURAL
|
||||
density = 0
|
||||
layer = ABOVE_OPEN_TURF_LAYER
|
||||
mouse_opacity = 0
|
||||
|
||||
/obj/effect/decal/cleanable/flour
|
||||
name = "flour"
|
||||
desc = "It's still good. Four second rule!"
|
||||
gender = PLURAL
|
||||
density = 0
|
||||
layer = ABOVE_OPEN_TURF_LAYER
|
||||
icon_state = "flour"
|
||||
|
||||
/obj/effect/decal/cleanable/greenglow
|
||||
name = "glowing goo"
|
||||
desc = "Jeez. I hope that's not for lunch."
|
||||
gender = PLURAL
|
||||
density = 0
|
||||
layer = ABOVE_OPEN_TURF_LAYER
|
||||
luminosity = 1
|
||||
icon_state = "greenglow"
|
||||
|
||||
/obj/effect/decal/cleanable/greenglow/ex_act()
|
||||
return
|
||||
|
||||
/obj/effect/decal/cleanable/cobweb
|
||||
name = "cobweb"
|
||||
desc = "Somebody should remove that."
|
||||
density = 0
|
||||
layer = OBJ_LAYER
|
||||
icon_state = "cobweb1"
|
||||
burntime = 1
|
||||
|
||||
/obj/effect/decal/cleanable/cobweb/fire_act()
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/decal/cleanable/molten_item
|
||||
name = "gooey grey mass"
|
||||
desc = "It looks like a melted... something."
|
||||
density = 0
|
||||
layer = OBJ_LAYER
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "molten"
|
||||
|
||||
/obj/effect/decal/cleanable/cobweb2
|
||||
name = "cobweb"
|
||||
desc = "Somebody should remove that."
|
||||
density = 0
|
||||
layer = OBJ_LAYER
|
||||
icon_state = "cobweb2"
|
||||
|
||||
//Vomit (sorry)
|
||||
/obj/effect/decal/cleanable/vomit
|
||||
name = "vomit"
|
||||
desc = "Gosh, how unpleasant."
|
||||
gender = PLURAL
|
||||
density = 0
|
||||
layer = ABOVE_OPEN_TURF_LAYER
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
icon_state = "vomit_1"
|
||||
random_icon_states = list("vomit_1", "vomit_2", "vomit_3", "vomit_4")
|
||||
var/list/viruses = list()
|
||||
|
||||
/obj/effect/decal/cleanable/vomit/attack_hand(var/mob/user)
|
||||
if(istype(user,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.dna.species.id == "fly")
|
||||
playsound(get_turf(src), 'sound/items/drink.ogg', 50, 1) //slurp
|
||||
H.visible_message("<span class='alert'>[H] extends a small proboscis into the vomit pool, sucking it with a slurping sound.</span>")
|
||||
if(reagents)
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
if (istype(R, /datum/reagent/consumable))
|
||||
var/datum/reagent/consumable/nutri_check = R
|
||||
if(nutri_check.nutriment_factor >0)
|
||||
H.nutrition += nutri_check.nutriment_factor * nutri_check.volume
|
||||
reagents.remove_reagent(nutri_check.id,nutri_check.volume)
|
||||
reagents.trans_to(H, reagents.total_volume)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/decal/cleanable/vomit/Destroy()
|
||||
for(var/datum/disease/D in viruses)
|
||||
D.cure(0)
|
||||
viruses = null
|
||||
return ..()
|
||||
|
||||
/obj/effect/decal/cleanable/tomato_smudge
|
||||
name = "tomato smudge"
|
||||
desc = "It's red."
|
||||
density = 0
|
||||
layer = ABOVE_OPEN_TURF_LAYER
|
||||
icon = 'icons/effects/tomatodecal.dmi'
|
||||
random_icon_states = list("tomato_floor1", "tomato_floor2", "tomato_floor3")
|
||||
|
||||
/obj/effect/decal/cleanable/plant_smudge
|
||||
name = "plant smudge"
|
||||
density = 0
|
||||
layer = ABOVE_OPEN_TURF_LAYER
|
||||
icon = 'icons/effects/tomatodecal.dmi'
|
||||
random_icon_states = list("smashed_plant")
|
||||
|
||||
/obj/effect/decal/cleanable/egg_smudge
|
||||
name = "smashed egg"
|
||||
desc = "Seems like this one won't hatch."
|
||||
density = 0
|
||||
layer = ABOVE_OPEN_TURF_LAYER
|
||||
icon = 'icons/effects/tomatodecal.dmi'
|
||||
random_icon_states = list("smashed_egg1", "smashed_egg2", "smashed_egg3")
|
||||
|
||||
/obj/effect/decal/cleanable/pie_smudge //honk
|
||||
name = "smashed pie"
|
||||
desc = "It's pie cream from a cream pie."
|
||||
density = 0
|
||||
layer = ABOVE_OPEN_TURF_LAYER
|
||||
icon = 'icons/effects/tomatodecal.dmi'
|
||||
random_icon_states = list("smashed_pie")
|
||||
|
||||
/obj/effect/decal/cleanable/chem_pile
|
||||
name = "chemical pile"
|
||||
desc = "A pile of chemicals. You can't quite tell what's inside it."
|
||||
gender = PLURAL
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "ash"
|
||||
|
||||
/obj/effect/decal/cleanable/shreds
|
||||
name = "shreds"
|
||||
desc = "The shredded remains of what appears to be clothing."
|
||||
icon_state = "shreds"
|
||||
gender = PLURAL
|
||||
density = 0
|
||||
layer = ABOVE_OPEN_TURF_LAYER
|
||||
|
||||
/obj/effect/decal/cleanable/shreds/New()
|
||||
pixel_x = rand(-5, 5)
|
||||
pixel_y = rand(-5, 5)
|
||||
..()
|
||||
|
||||
/obj/effect/decal/cleanable/salt
|
||||
name = "salt pile"
|
||||
desc = "A sizable pile of table salt. Someone must be upset."
|
||||
icon = 'icons/effects/tomatodecal.dmi'
|
||||
icon_state = "salt_pile"
|
||||
@@ -0,0 +1,66 @@
|
||||
// Note: BYOND is object oriented. There is no reason for this to be copy/pasted blood code.
|
||||
|
||||
/obj/effect/decal/cleanable/robot_debris
|
||||
name = "robot debris"
|
||||
desc = "It's a useless heap of junk... <i>or is it?</i>"
|
||||
gender = PLURAL
|
||||
density = 0
|
||||
layer = ABOVE_OPEN_TURF_LAYER
|
||||
icon = 'icons/mob/robots.dmi'
|
||||
icon_state = "gib1"
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6", "gib7")
|
||||
blood_state = BLOOD_STATE_OIL
|
||||
bloodiness = MAX_SHOE_BLOODINESS
|
||||
|
||||
/obj/effect/decal/cleanable/robot_debris/proc/streak(list/directions)
|
||||
set waitfor = 0
|
||||
var/direction = pick(directions)
|
||||
for (var/i = 0, i < pick(1, 200; 2, 150; 3, 50; 4), i++)
|
||||
sleep(3)
|
||||
if (i > 0)
|
||||
if (prob(40))
|
||||
new /obj/effect/decal/cleanable/oil/streak(src.loc)
|
||||
else if (prob(10))
|
||||
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))
|
||||
break
|
||||
|
||||
/obj/effect/decal/cleanable/robot_debris/ex_act()
|
||||
return
|
||||
|
||||
/obj/effect/decal/cleanable/robot_debris/limb
|
||||
random_icon_states = list("gibarm", "gibleg")
|
||||
|
||||
/obj/effect/decal/cleanable/robot_debris/up
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6", "gib7","gibup1","gibup1")
|
||||
|
||||
/obj/effect/decal/cleanable/robot_debris/down
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6", "gib7","gibdown1","gibdown1")
|
||||
|
||||
/obj/effect/decal/cleanable/oil
|
||||
name = "motor oil"
|
||||
desc = "It's black and greasy. Looks like Beepsky made another mess."
|
||||
gender = PLURAL
|
||||
density = 0
|
||||
layer = ABOVE_OPEN_TURF_LAYER
|
||||
icon = 'icons/mob/robots.dmi'
|
||||
icon_state = "floor1"
|
||||
var/viruses = list()
|
||||
random_icon_states = list("floor1", "floor2", "floor3", "floor4", "floor5", "floor6", "floor7")
|
||||
blood_state = BLOOD_STATE_OIL
|
||||
bloodiness = MAX_SHOE_BLOODINESS
|
||||
|
||||
/obj/effect/decal/cleanable/oil/New()
|
||||
..()
|
||||
reagents.add_reagent("oil", 30)
|
||||
|
||||
/obj/effect/decal/cleanable/oil/Destroy()
|
||||
for(var/datum/disease/D in viruses)
|
||||
D.cure(0)
|
||||
viruses = null
|
||||
return ..()
|
||||
|
||||
/obj/effect/decal/cleanable/oil/streak
|
||||
random_icon_states = list("streak1", "streak2", "streak3", "streak4", "streak5")
|
||||
@@ -0,0 +1,85 @@
|
||||
/obj/effect/decal/cleanable
|
||||
var/list/random_icon_states = list()
|
||||
var/blood_state = "" //I'm sorry but cleanable/blood code is ass, and so is blood_DNA
|
||||
var/bloodiness = 0 //0-100, amount of blood in this decal, used for making footprints and affecting the alpha of bloody footprints
|
||||
|
||||
/obj/effect/decal/cleanable/New()
|
||||
if (random_icon_states && length(src.random_icon_states) > 0)
|
||||
src.icon_state = pick(src.random_icon_states)
|
||||
create_reagents(300)
|
||||
if(src.loc && isturf(src.loc))
|
||||
for(var/obj/effect/decal/cleanable/C in src.loc)
|
||||
if(C != src && C.type == src.type)
|
||||
replace_decal(C)
|
||||
..()
|
||||
|
||||
|
||||
|
||||
/obj/effect/decal/cleanable/proc/replace_decal(obj/effect/decal/cleanable/C)
|
||||
qdel(C)
|
||||
|
||||
/obj/effect/decal/cleanable/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weapon/reagent_containers/glass) || istype(W, /obj/item/weapon/reagent_containers/food/drinks))
|
||||
if(src.reagents && W.reagents)
|
||||
. = 1 //so the containers don't splash their content on the src while scooping.
|
||||
if(!src.reagents.total_volume)
|
||||
user << "<span class='notice'>[src] isn't thick enough to scoop up!</span>"
|
||||
return
|
||||
if(W.reagents.total_volume >= W.reagents.maximum_volume)
|
||||
user << "<span class='notice'>[W] is full!</span>"
|
||||
return
|
||||
user << "<span class='notice'>You scoop up [src] into [W]!</span>"
|
||||
reagents.trans_to(W, reagents.total_volume)
|
||||
if(!reagents.total_volume) //scooped up all of it
|
||||
qdel(src)
|
||||
return
|
||||
if(W.is_hot()) //todo: make heating a reagent holder proc
|
||||
if(istype(W, /obj/item/clothing/mask/cigarette))
|
||||
return
|
||||
else
|
||||
var/hotness = W.is_hot()
|
||||
var/added_heat = (hotness / 100)
|
||||
src.reagents.chem_temp = min(src.reagents.chem_temp + added_heat, hotness)
|
||||
src.reagents.handle_reactions()
|
||||
user << "<span class='notice'>You heat [src] with [W]!</span>"
|
||||
|
||||
/obj/effect/decal/cleanable/ex_act()
|
||||
if(reagents)
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
R.on_ex_act()
|
||||
..()
|
||||
|
||||
/obj/effect/decal/cleanable/fire_act()
|
||||
if(reagents)
|
||||
reagents.chem_temp += 30
|
||||
reagents.handle_reactions()
|
||||
..()
|
||||
|
||||
|
||||
//Add "bloodiness" of this blood's type, to the human's shoes
|
||||
//This is on /cleanable because fuck this ancient mess
|
||||
/obj/effect/decal/cleanable/Crossed(atom/movable/O)
|
||||
if(ishuman(O))
|
||||
var/mob/living/carbon/human/H = O
|
||||
if(H.shoes && blood_state && bloodiness)
|
||||
var/obj/item/clothing/shoes/S = H.shoes
|
||||
var/add_blood = 0
|
||||
if(bloodiness >= BLOOD_GAIN_PER_STEP)
|
||||
add_blood = BLOOD_GAIN_PER_STEP
|
||||
else
|
||||
add_blood = bloodiness
|
||||
bloodiness -= add_blood
|
||||
S.bloody_shoes[blood_state] = min(MAX_SHOE_BLOODINESS,S.bloody_shoes[blood_state]+add_blood)
|
||||
if(blood_DNA && blood_DNA.len)
|
||||
S.add_blood(blood_DNA)
|
||||
S.blood_state = blood_state
|
||||
update_icon()
|
||||
H.update_inv_shoes()
|
||||
|
||||
|
||||
|
||||
/obj/effect/decal/cleanable/proc/can_bloodcrawl_in()
|
||||
if((blood_state != BLOOD_STATE_OIL) && (blood_state != BLOOD_STATE_NOT_BLOODY))
|
||||
return bloodiness
|
||||
else
|
||||
return 0
|
||||
@@ -0,0 +1,62 @@
|
||||
/obj/effect/decal/cleanable/crayon
|
||||
name = "rune"
|
||||
desc = "Graffiti. Damn kids."
|
||||
icon = 'icons/effects/crayondecal.dmi'
|
||||
icon_state = "rune1"
|
||||
layer = ABOVE_NORMAL_TURF_LAYER
|
||||
var/do_icon_rotate = TRUE
|
||||
|
||||
/obj/effect/decal/cleanable/crayon/examine()
|
||||
set src in view(2)
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
/obj/effect/decal/cleanable/crayon/New(location, main = "#FFFFFF", var/type = "rune1", var/e_name = "rune", var/rotation = 0, var/alt_icon = null)
|
||||
..()
|
||||
loc = location
|
||||
|
||||
name = e_name
|
||||
desc = "A [name] vandalizing the station."
|
||||
if(type == "poseur tag")
|
||||
type = pick(gang_name_pool)
|
||||
|
||||
if(alt_icon)
|
||||
icon = alt_icon
|
||||
icon_state = type
|
||||
|
||||
if(rotation && do_icon_rotate)
|
||||
var/matrix/M = matrix()
|
||||
M.Turn(rotation)
|
||||
src.transform = M
|
||||
|
||||
color = main
|
||||
|
||||
|
||||
/obj/effect/decal/cleanable/crayon/gang
|
||||
layer = HIGH_OBJ_LAYER //Harder to hide
|
||||
do_icon_rotate = FALSE //These are designed to always face south, so no rotation please.
|
||||
var/datum/gang/gang
|
||||
|
||||
/obj/effect/decal/cleanable/crayon/gang/New(location, var/datum/gang/G, var/e_name = "gang tag", var/rotation = 0)
|
||||
if(!type || !G)
|
||||
qdel(src)
|
||||
|
||||
var/area/territory = get_area(location)
|
||||
var/color
|
||||
|
||||
gang = G
|
||||
color = G.color_hex
|
||||
icon_state = G.name
|
||||
G.territory_new |= list(territory.type = territory.name)
|
||||
|
||||
..(location, color, icon_state, e_name, rotation)
|
||||
|
||||
/obj/effect/decal/cleanable/crayon/gang/Destroy()
|
||||
var/area/territory = get_area(src)
|
||||
|
||||
if(gang)
|
||||
gang.territory -= territory.type
|
||||
gang.territory_new -= territory.type
|
||||
gang.territory_lost |= list(territory.type = territory.name)
|
||||
return ..()
|
||||
@@ -0,0 +1,6 @@
|
||||
/obj/effect/decal
|
||||
name = "decal"
|
||||
anchored = 1
|
||||
|
||||
/obj/effect/decal/ex_act(severity, target)
|
||||
qdel(src)
|
||||
@@ -0,0 +1,33 @@
|
||||
/obj/effect/overlay/temp/point
|
||||
name = "pointer"
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
icon_state = "arrow"
|
||||
layer = POINT_LAYER
|
||||
duration = 25
|
||||
|
||||
/obj/effect/overlay/temp/point/New(atom/target, set_invis = 0)
|
||||
..()
|
||||
loc = get_turf(target)
|
||||
pixel_x = target.pixel_x
|
||||
pixel_y = target.pixel_y
|
||||
invisibility = set_invis
|
||||
|
||||
//Used by spraybottles.
|
||||
/obj/effect/decal/chempuff
|
||||
name = "chemicals"
|
||||
icon = 'icons/obj/chempuff.dmi'
|
||||
pass_flags = PASSTABLE | PASSGRILLE
|
||||
layer = FLY_LAYER
|
||||
|
||||
/obj/effect/decal/sandeffect
|
||||
name = "sandy tile"
|
||||
icon = 'icons/turf/floors.dmi'
|
||||
icon_state = "sandeffect"
|
||||
layer = ABOVE_OPEN_TURF_LAYER
|
||||
|
||||
/obj/effect/decal/fakelattice
|
||||
name = "lattice"
|
||||
desc = "A lightweight support lattice."
|
||||
icon = 'icons/obj/smooth_structures/lattice.dmi'
|
||||
icon_state = "lattice"
|
||||
density = 1
|
||||
@@ -0,0 +1,17 @@
|
||||
/obj/effect/decal/remains
|
||||
name = "remains"
|
||||
gender = PLURAL
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
|
||||
/obj/effect/decal/remains/human
|
||||
desc = "They look like human remains. They have a strange aura about them."
|
||||
icon_state = "remains"
|
||||
|
||||
/obj/effect/decal/remains/xeno
|
||||
desc = "They look like the remains of something... alien. They have a strange aura about them."
|
||||
icon_state = "remainsxeno"
|
||||
|
||||
/obj/effect/decal/remains/robot
|
||||
desc = "They look like the remains of something mechanical. They have a strange aura about them."
|
||||
icon = 'icons/mob/robots.dmi'
|
||||
icon_state = "remainsrobot"
|
||||
@@ -0,0 +1,75 @@
|
||||
/* 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/particle_effect
|
||||
name = "particle effect"
|
||||
mouse_opacity = 0
|
||||
unacidable = 1//So effects are not targeted by alien acid.
|
||||
pass_flags = PASSTABLE | PASSGRILLE
|
||||
|
||||
/obj/effect/particle_effect/New()
|
||||
..()
|
||||
if(ticker)
|
||||
cameranet.updateVisibility(src)
|
||||
|
||||
/obj/effect/particle_effect/Destroy()
|
||||
if(ticker)
|
||||
cameranet.updateVisibility(src)
|
||||
..()
|
||||
return QDEL_HINT_PUTINPOOL
|
||||
|
||||
/datum/effect_system
|
||||
var/number = 3
|
||||
var/cardinals = 0
|
||||
var/turf/location
|
||||
var/atom/holder
|
||||
var/effect_type
|
||||
var/total_effects = 0
|
||||
|
||||
/datum/effect_system/Destroy()
|
||||
holder = null
|
||||
location = null
|
||||
return ..()
|
||||
|
||||
/datum/effect_system/proc/set_up(n = 3, c = 0, loca)
|
||||
if(n > 10)
|
||||
n = 10
|
||||
number = n
|
||||
cardinals = c
|
||||
if(isturf(loca))
|
||||
location = loca
|
||||
else
|
||||
location = get_turf(loca)
|
||||
|
||||
/datum/effect_system/proc/attach(atom/atom)
|
||||
holder = atom
|
||||
|
||||
/datum/effect_system/proc/start()
|
||||
for(var/i in 1 to number)
|
||||
if(total_effects > 20)
|
||||
return
|
||||
addtimer(src, "generate_effect", 0)
|
||||
|
||||
/datum/effect_system/proc/generate_effect()
|
||||
if(holder)
|
||||
location = get_turf(holder)
|
||||
var/obj/effect/E = PoolOrNew(effect_type, location)
|
||||
total_effects++
|
||||
var/direction
|
||||
if(cardinals)
|
||||
direction = pick(cardinal)
|
||||
else
|
||||
direction = pick(alldirs)
|
||||
var/steps_amt = pick(1,2,3)
|
||||
for(var/j in 1 to steps_amt)
|
||||
sleep(5)
|
||||
step(E,direction)
|
||||
addtimer(src, "decrement_total_effect", 20)
|
||||
|
||||
/datum/effect_system/proc/decrement_total_effect()
|
||||
total_effects--
|
||||
@@ -0,0 +1,54 @@
|
||||
/obj/effect/particle_effect/expl_particles
|
||||
name = "fire"
|
||||
icon_state = "explosion_particle"
|
||||
opacity = 1
|
||||
anchored = 1
|
||||
|
||||
/obj/effect/particle_effect/expl_particles/New()
|
||||
..()
|
||||
QDEL_IN(src, 15)
|
||||
|
||||
/datum/effect_system/expl_particles
|
||||
number = 10
|
||||
|
||||
/datum/effect_system/expl_particles/start()
|
||||
for(var/i in 1 to number)
|
||||
spawn(0)
|
||||
var/obj/effect/particle_effect/expl_particles/expl = new /obj/effect/particle_effect/expl_particles(location)
|
||||
var/direct = pick(alldirs)
|
||||
var/steps_amt = pick(1;25,2;50,3,4;200)
|
||||
for(var/j in 1 to steps_amt)
|
||||
sleep(1)
|
||||
step(expl,direct)
|
||||
|
||||
/obj/effect/explosion
|
||||
name = "fire"
|
||||
icon = 'icons/effects/96x96.dmi'
|
||||
icon_state = "explosion"
|
||||
opacity = 1
|
||||
anchored = 1
|
||||
mouse_opacity = 0
|
||||
pixel_x = -32
|
||||
pixel_y = -32
|
||||
|
||||
/obj/effect/explosion/New()
|
||||
..()
|
||||
QDEL_IN(src, 10)
|
||||
|
||||
/datum/effect_system/explosion
|
||||
|
||||
/datum/effect_system/explosion/set_up(loca)
|
||||
if(isturf(loca))
|
||||
location = loca
|
||||
else
|
||||
location = get_turf(loca)
|
||||
|
||||
/datum/effect_system/explosion/start()
|
||||
new/obj/effect/explosion( location )
|
||||
var/datum/effect_system/expl_particles/P = new/datum/effect_system/expl_particles()
|
||||
P.set_up(10, 0, location)
|
||||
P.start()
|
||||
spawn(5)
|
||||
var/datum/effect_system/smoke_spread/S = new
|
||||
S.set_up(2, location)
|
||||
S.start()
|
||||
@@ -0,0 +1,283 @@
|
||||
// Foam
|
||||
// Similar to smoke, but slower and mobs absorb its reagent through their exposed skin.
|
||||
|
||||
/obj/effect/particle_effect/foam
|
||||
name = "foam"
|
||||
icon_state = "foam"
|
||||
opacity = 0
|
||||
anchored = 1
|
||||
density = 0
|
||||
layer = ABOVE_ALL_MOB_LAYER
|
||||
mouse_opacity = 0
|
||||
var/amount = 3
|
||||
animate_movement = 0
|
||||
var/metal = 0
|
||||
var/lifetime = 40
|
||||
|
||||
|
||||
/obj/effect/particle_effect/foam/metal
|
||||
name = "aluminium foam"
|
||||
metal = 1
|
||||
icon_state = "mfoam"
|
||||
|
||||
|
||||
/obj/effect/particle_effect/foam/metal/iron
|
||||
name = "iron foam"
|
||||
metal = 2
|
||||
|
||||
|
||||
/obj/effect/particle_effect/foam/New(loc)
|
||||
..(loc)
|
||||
create_reagents(1000) //limited by the size of the reagent holder anyway.
|
||||
START_PROCESSING(SSfastprocess, src)
|
||||
playsound(src, 'sound/effects/bubbles2.ogg', 80, 1, -3)
|
||||
|
||||
/obj/effect/particle_effect/foam/Destroy()
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/effect/particle_effect/foam/proc/kill_foam()
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
if(metal)
|
||||
var/obj/structure/foamedmetal/M = new(src.loc)
|
||||
M.metal = metal
|
||||
M.updateicon()
|
||||
flick("[icon_state]-disolve", src)
|
||||
QDEL_IN(src, 5)
|
||||
|
||||
/obj/effect/particle_effect/foam/process()
|
||||
lifetime--
|
||||
if(lifetime < 1)
|
||||
kill_foam()
|
||||
return
|
||||
|
||||
var/fraction = 1/initial(lifetime)
|
||||
for(var/obj/O in range(0,src))
|
||||
if(O.type == src.type)
|
||||
continue
|
||||
reagents.reaction(O, VAPOR, fraction)
|
||||
var/hit = 0
|
||||
for(var/mob/living/L in range(0,src))
|
||||
hit += foam_mob(L)
|
||||
if(hit)
|
||||
lifetime++ //this is so the decrease from mobs hit and the natural decrease don't cumulate.
|
||||
var/T = get_turf(src)
|
||||
reagents.reaction(T, VAPOR, fraction)
|
||||
|
||||
if(--amount < 0)
|
||||
return
|
||||
spread_foam()
|
||||
|
||||
/obj/effect/particle_effect/foam/proc/foam_mob(mob/living/L)
|
||||
if(lifetime<1)
|
||||
return 0
|
||||
if(!istype(L))
|
||||
return 0
|
||||
var/fraction = 1/initial(lifetime)
|
||||
reagents.reaction(L, VAPOR, fraction)
|
||||
lifetime--
|
||||
return 1
|
||||
|
||||
/obj/effect/particle_effect/foam/Crossed(atom/movable/AM)
|
||||
if(istype(AM, /mob/living/carbon))
|
||||
var/mob/living/carbon/M = AM
|
||||
M.slip(5, 2, src)
|
||||
|
||||
/obj/effect/particle_effect/foam/metal/Crossed(atom/movable/AM)
|
||||
return
|
||||
|
||||
|
||||
/obj/effect/particle_effect/foam/proc/spread_foam()
|
||||
var/turf/t_loc = get_turf(src)
|
||||
for(var/turf/T in t_loc.GetAtmosAdjacentTurfs())
|
||||
var/obj/effect/particle_effect/foam/foundfoam = locate() in T //Don't spread foam where there's already foam!
|
||||
if(foundfoam)
|
||||
continue
|
||||
|
||||
for(var/mob/living/L in T)
|
||||
foam_mob(L)
|
||||
var/obj/effect/particle_effect/foam/F = PoolOrNew(src.type, T)
|
||||
F.amount = amount
|
||||
reagents.copy_to(F, (reagents.total_volume))
|
||||
F.color = color
|
||||
F.metal = metal
|
||||
|
||||
|
||||
/obj/effect/particle_effect/foam/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(prob(max(0, exposed_temperature - 475))) //foam dissolves when heated
|
||||
kill_foam()
|
||||
|
||||
|
||||
/obj/effect/particle_effect/foam/metal/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
return
|
||||
|
||||
|
||||
///////////////////////////////////////////////
|
||||
//FOAM EFFECT DATUM
|
||||
/datum/effect_system/foam_spread
|
||||
var/amount = 10 // the size of the foam spread.
|
||||
var/obj/chemholder
|
||||
effect_type = /obj/effect/particle_effect/foam
|
||||
var/metal = 0
|
||||
|
||||
|
||||
/datum/effect_system/foam_spread/metal
|
||||
effect_type = /obj/effect/particle_effect/foam/metal
|
||||
|
||||
|
||||
/datum/effect_system/foam_spread/New()
|
||||
..()
|
||||
chemholder = PoolOrNew(/obj)
|
||||
var/datum/reagents/R = new/datum/reagents(1000)
|
||||
chemholder.reagents = R
|
||||
R.my_atom = chemholder
|
||||
|
||||
/datum/effect_system/foam_spread/Destroy()
|
||||
qdel(chemholder)
|
||||
chemholder = null
|
||||
return ..()
|
||||
|
||||
/datum/effect_system/foam_spread/set_up(amt=5, loca, datum/reagents/carry = null)
|
||||
if(istype(loca, /turf/))
|
||||
location = loca
|
||||
else
|
||||
location = get_turf(loca)
|
||||
|
||||
amount = round(sqrt(amt / 2), 1)
|
||||
carry.copy_to(chemholder, 4*carry.total_volume) //The foam holds 4 times the total reagents volume for balance purposes.
|
||||
|
||||
/datum/effect_system/foam_spread/metal/set_up(amt=5, loca, datum/reagents/carry = null, metaltype)
|
||||
..()
|
||||
metal = metaltype
|
||||
|
||||
/datum/effect_system/foam_spread/start()
|
||||
var/obj/effect/particle_effect/foam/foundfoam = locate() in location
|
||||
if(foundfoam)//If there was already foam where we start, we add our foaminess to it.
|
||||
foundfoam.amount += amount
|
||||
else
|
||||
var/obj/effect/particle_effect/foam/F = PoolOrNew(effect_type, location)
|
||||
var/foamcolor = mix_color_from_reagents(chemholder.reagents.reagent_list)
|
||||
chemholder.reagents.copy_to(F, chemholder.reagents.total_volume/amount)
|
||||
F.color = foamcolor
|
||||
F.amount = amount
|
||||
F.metal = metal
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////
|
||||
// FOAM STRUCTURE. Formed by metal foams. Dense and opaque, but easy to break
|
||||
/obj/structure/foamedmetal
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "metalfoam"
|
||||
density = 1
|
||||
opacity = 1 // changed in New()
|
||||
anchored = 1
|
||||
unacidable = 1
|
||||
name = "foamed metal"
|
||||
desc = "A lightweight foamed metal wall."
|
||||
gender = PLURAL
|
||||
var/metal = 1 // 1=aluminium, 2=iron
|
||||
|
||||
/obj/structure/foamedmetal/New()
|
||||
..()
|
||||
air_update_turf(1)
|
||||
|
||||
|
||||
/obj/structure/foamedmetal/Destroy()
|
||||
density = 0
|
||||
air_update_turf(1)
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/structure/foamedmetal/Move()
|
||||
var/turf/T = loc
|
||||
..()
|
||||
move_update_air(T)
|
||||
|
||||
|
||||
/obj/structure/foamedmetal/proc/updateicon()
|
||||
if(metal == 1)
|
||||
icon_state = "metalfoam"
|
||||
else
|
||||
icon_state = "ironfoam"
|
||||
|
||||
|
||||
/obj/structure/foamedmetal/ex_act(severity, target)
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/structure/foamedmetal/blob_act(obj/effect/blob/B)
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/structure/foamedmetal/bullet_act()
|
||||
..()
|
||||
if(metal==1 || prob(50))
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/structure/foamedmetal/attack_paw(mob/user)
|
||||
attack_hand(user)
|
||||
|
||||
|
||||
/obj/structure/foamedmetal/attack_animal(mob/living/simple_animal/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
playsound(src.loc, 'sound/weapons/tap.ogg', 100, 1)
|
||||
if(user.environment_smash >= 1)
|
||||
user.do_attack_animation(src)
|
||||
user << "<span class='notice'>You smash apart the foam wall.</span>"
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/foamedmetal/attack_hulk(mob/living/carbon/human/user)
|
||||
..(user, 1)
|
||||
playsound(src.loc, 'sound/weapons/tap.ogg', 100, 1)
|
||||
if(prob(75 - metal*25))
|
||||
user.visible_message("<span class='danger'>[user] smashes through the foamed metal!</span>", \
|
||||
"<span class='danger'>You smash through the metal foam wall!</span>")
|
||||
qdel(src)
|
||||
return 1
|
||||
|
||||
/obj/structure/foamedmetal/attack_alien(mob/living/carbon/alien/humanoid/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
playsound(src.loc, 'sound/weapons/tap.ogg', 100, 1)
|
||||
if(prob(75 - metal*25))
|
||||
user.visible_message("<span class='danger'>[user] smashes through the foamed metal!</span>", \
|
||||
"<span class='danger'>You smash through the metal foam wall!</span>")
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/foamedmetal/attack_slime(mob/living/simple_animal/slime/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
playsound(src.loc, 'sound/weapons/tap.ogg', 100, 1)
|
||||
if(!user.is_adult)
|
||||
attack_hand(user)
|
||||
return
|
||||
if(prob(75 - metal*25))
|
||||
user.visible_message("<span class='danger'>[user] smashes through the foamed metal!</span>", \
|
||||
"<span class='danger'>You smash through the metal foam wall!</span>")
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/foamedmetal/attack_hand(mob/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
user << "<span class='warning'>You hit the metal foam but bounce off it!</span>"
|
||||
playsound(src.loc, 'sound/weapons/tap.ogg', 100, 1)
|
||||
|
||||
|
||||
/obj/structure/foamedmetal/attacked_by(obj/item/I, mob/living/user)
|
||||
playsound(src.loc, 'sound/weapons/tap.ogg', 100, 1) //the item attack sound is muffled by the foam.
|
||||
if(prob(I.force*20 - metal*25))
|
||||
user.visible_message("<span class='danger'>[user] smashes through the foamed metal!</span>", \
|
||||
"<span class='danger'>You smash through the foamed metal with \the [I]!</span>")
|
||||
qdel(src)
|
||||
else
|
||||
user << "<span class='warning'>You hit the metal foam to no effect!</span>"
|
||||
|
||||
/obj/structure/foamedmetal/CanPass(atom/movable/mover, turf/target, height=1.5)
|
||||
return !density
|
||||
|
||||
|
||||
/obj/structure/foamedmetal/CanAtmosPass()
|
||||
return !density
|
||||
@@ -0,0 +1,137 @@
|
||||
|
||||
/////////////////////////////////////////////
|
||||
//////// Attach a 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!
|
||||
/////////////////////////////////////////////
|
||||
|
||||
/datum/effect_system/trail_follow
|
||||
var/turf/oldposition
|
||||
var/processing = 1
|
||||
var/on = 1
|
||||
|
||||
/datum/effect_system/trail_follow/set_up(atom/atom)
|
||||
attach(atom)
|
||||
oldposition = get_turf(atom)
|
||||
|
||||
/datum/effect_system/trail_follow/Destroy()
|
||||
oldposition = null
|
||||
return ..()
|
||||
|
||||
/datum/effect_system/trail_follow/proc/stop()
|
||||
processing = 0
|
||||
on = 0
|
||||
oldposition = null
|
||||
|
||||
/datum/effect_system/trail_follow/steam
|
||||
effect_type = /obj/effect/particle_effect/steam
|
||||
|
||||
/datum/effect_system/trail_follow/steam/start()
|
||||
if(!on)
|
||||
on = 1
|
||||
processing = 1
|
||||
if(!oldposition)
|
||||
oldposition = get_turf(holder)
|
||||
if(processing)
|
||||
processing = 0
|
||||
if(number < 3)
|
||||
var/obj/effect/particle_effect/steam/I = PoolOrNew(/obj/effect/particle_effect/steam, oldposition)
|
||||
number++
|
||||
I.setDir(holder.dir)
|
||||
oldposition = get_turf(holder)
|
||||
spawn(10)
|
||||
qdel(I)
|
||||
number--
|
||||
spawn(2)
|
||||
if(on)
|
||||
processing = 1
|
||||
start()
|
||||
|
||||
/obj/effect/particle_effect/ion_trails
|
||||
name = "ion trails"
|
||||
icon_state = "ion_trails"
|
||||
anchored = 1
|
||||
|
||||
/datum/effect_system/trail_follow/ion
|
||||
effect_type = /obj/effect/particle_effect/ion_trails
|
||||
|
||||
/datum/effect_system/trail_follow/ion/start() //Whoever is responsible for this abomination of code should become an hero
|
||||
if(!on)
|
||||
on = 1
|
||||
processing = 1
|
||||
if(!oldposition)
|
||||
oldposition = get_turf(holder)
|
||||
if(processing)
|
||||
processing = 0
|
||||
var/turf/T = get_turf(holder)
|
||||
if(T != oldposition)
|
||||
if(!has_gravity(T))
|
||||
var/obj/effect/particle_effect/ion_trails/I = PoolOrNew(effect_type, oldposition)
|
||||
I.setDir(holder.dir)
|
||||
flick("ion_fade", I)
|
||||
I.icon_state = ""
|
||||
spawn(20)
|
||||
qdel(I)
|
||||
oldposition = T
|
||||
spawn(2)
|
||||
if(on)
|
||||
processing = 1
|
||||
start()
|
||||
|
||||
|
||||
|
||||
|
||||
//Reagent-based explosion effect
|
||||
|
||||
/datum/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
|
||||
var/explosion_message = 1 //whether we show a message to mobs.
|
||||
|
||||
/datum/effect_system/reagents_explosion/set_up(amt, loca, flash = 0, flash_fact = 0, message = 1)
|
||||
amount = amt
|
||||
explosion_message = message
|
||||
if(isturf(loca))
|
||||
location = loca
|
||||
else
|
||||
location = get_turf(loca)
|
||||
|
||||
flashing = flash
|
||||
flashing_factor = flash_fact
|
||||
|
||||
/datum/effect_system/reagents_explosion/start()
|
||||
if(explosion_message)
|
||||
location.visible_message("<span class='danger'>The solution violently explodes!</span>", \
|
||||
"<span class='italics'>You hear an explosion!</span>")
|
||||
if (amount <= 2)
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(2, 1, location)
|
||||
s.start()
|
||||
|
||||
for(var/mob/M in viewers(1, location))
|
||||
if (prob (50 * amount))
|
||||
M << "<span class='danger'>The explosion knocks you down.</span>"
|
||||
M.Weaken(rand(1,5))
|
||||
return
|
||||
else
|
||||
var/devastation = -1
|
||||
var/heavy = -1
|
||||
var/light = -1
|
||||
var/flash = -1
|
||||
|
||||
// Clamp all values to MAX_EXPLOSION_RANGE
|
||||
if (round(amount/12) > 0)
|
||||
devastation = min (MAX_EX_DEVESTATION_RANGE, devastation + round(amount/12))
|
||||
|
||||
if (round(amount/6) > 0)
|
||||
heavy = min (MAX_EX_HEAVY_RANGE, heavy + round(amount/6))
|
||||
|
||||
if (round(amount/3) > 0)
|
||||
light = min (MAX_EX_LIGHT_RANGE, light + round(amount/3))
|
||||
|
||||
if (flashing && flashing_factor)
|
||||
flash += (round(amount/4) * flashing_factor)
|
||||
|
||||
explosion(location, devastation, heavy, light, flash)
|
||||
@@ -0,0 +1,308 @@
|
||||
/////////////////////////////////////////////
|
||||
//// SMOKE SYSTEMS
|
||||
/////////////////////////////////////////////
|
||||
|
||||
/obj/effect/particle_effect/smoke
|
||||
name = "smoke"
|
||||
icon = 'icons/effects/96x96.dmi'
|
||||
icon_state = "smoke"
|
||||
pixel_x = -32
|
||||
pixel_y = -32
|
||||
opacity = 0
|
||||
anchored = 1
|
||||
mouse_opacity = 0
|
||||
animate_movement = 0
|
||||
var/amount = 4
|
||||
var/lifetime = 5
|
||||
var/opaque = 1 //whether the smoke can block the view when in enough amount
|
||||
|
||||
|
||||
/obj/effect/particle_effect/smoke/proc/fade_out(frames = 16)
|
||||
if(alpha == 0) //Handle already transparent case
|
||||
return
|
||||
if(frames == 0)
|
||||
frames = 1 //We will just assume that by 0 frames, the coder meant "during one frame".
|
||||
var/step = alpha / frames
|
||||
for(var/i = 0, i < frames, i++)
|
||||
alpha -= step
|
||||
stoplag()
|
||||
|
||||
/obj/effect/particle_effect/smoke/New()
|
||||
..()
|
||||
create_reagents(500)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
|
||||
/obj/effect/particle_effect/smoke/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/effect/particle_effect/smoke/proc/kill_smoke()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
addtimer(src, "fade_out", 0)
|
||||
QDEL_IN(src, 10)
|
||||
|
||||
/obj/effect/particle_effect/smoke/process()
|
||||
lifetime--
|
||||
if(lifetime < 1)
|
||||
kill_smoke()
|
||||
return 0
|
||||
for(var/mob/living/L in range(0,src))
|
||||
smoke_mob(L)
|
||||
return 1
|
||||
|
||||
/obj/effect/particle_effect/smoke/proc/smoke_mob(mob/living/carbon/C)
|
||||
if(!istype(C))
|
||||
return 0
|
||||
if(lifetime<1)
|
||||
return 0
|
||||
if(C.internal != null || C.has_smoke_protection())
|
||||
return 0
|
||||
if(C.smoke_delay)
|
||||
return 0
|
||||
C.smoke_delay++
|
||||
addtimer(src, "remove_smoke_delay", 10, FALSE, C)
|
||||
return 1
|
||||
|
||||
/obj/effect/particle_effect/smoke/proc/remove_smoke_delay(mob/living/carbon/C)
|
||||
if(C)
|
||||
C.smoke_delay = 0
|
||||
|
||||
/obj/effect/particle_effect/smoke/proc/spread_smoke()
|
||||
var/turf/t_loc = get_turf(src)
|
||||
var/list/newsmokes = list()
|
||||
for(var/turf/T in t_loc.GetAtmosAdjacentTurfs())
|
||||
var/obj/effect/particle_effect/smoke/foundsmoke = locate() in T //Don't spread smoke where there's already smoke!
|
||||
if(foundsmoke)
|
||||
continue
|
||||
for(var/mob/living/L in T)
|
||||
smoke_mob(L)
|
||||
var/obj/effect/particle_effect/smoke/S = new type(T)
|
||||
reagents.copy_to(S, reagents.total_volume)
|
||||
S.setDir(pick(cardinal))
|
||||
S.amount = amount-1
|
||||
S.color = color
|
||||
S.lifetime = lifetime
|
||||
if(S.amount>0)
|
||||
if(opaque)
|
||||
S.opacity = 1
|
||||
newsmokes.Add(S)
|
||||
|
||||
if(newsmokes.len)
|
||||
spawn(1) //the smoke spreads rapidly but not instantly
|
||||
for(var/obj/effect/particle_effect/smoke/SM in newsmokes)
|
||||
SM.spread_smoke()
|
||||
|
||||
|
||||
/datum/effect_system/smoke_spread
|
||||
var/amount = 10
|
||||
effect_type = /obj/effect/particle_effect/smoke
|
||||
|
||||
/datum/effect_system/smoke_spread/set_up(radius = 5, loca)
|
||||
if(isturf(loca))
|
||||
location = loca
|
||||
else
|
||||
location = get_turf(loca)
|
||||
amount = radius
|
||||
|
||||
/datum/effect_system/smoke_spread/start()
|
||||
if(holder)
|
||||
location = get_turf(holder)
|
||||
var/obj/effect/particle_effect/smoke/S = new effect_type(location)
|
||||
S.amount = amount
|
||||
if(S.amount)
|
||||
S.spread_smoke()
|
||||
|
||||
|
||||
/////////////////////////////////////////////
|
||||
// Bad smoke
|
||||
/////////////////////////////////////////////
|
||||
|
||||
/obj/effect/particle_effect/smoke/bad
|
||||
lifetime = 8
|
||||
|
||||
/obj/effect/particle_effect/smoke/bad/smoke_mob(mob/living/carbon/M)
|
||||
if(..())
|
||||
M.drop_item()
|
||||
M.adjustOxyLoss(1)
|
||||
M.emote("cough")
|
||||
return 1
|
||||
|
||||
/obj/effect/particle_effect/smoke/bad/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
if(height==0) return 1
|
||||
if(istype(mover, /obj/item/projectile/beam))
|
||||
var/obj/item/projectile/beam/B = mover
|
||||
B.damage = (B.damage/2)
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
/datum/effect_system/smoke_spread/bad
|
||||
effect_type = /obj/effect/particle_effect/smoke/bad
|
||||
|
||||
/////////////////////////////////////////////
|
||||
// Nanofrost smoke
|
||||
/////////////////////////////////////////////
|
||||
|
||||
/obj/effect/particle_effect/smoke/freezing
|
||||
name = "nanofrost smoke"
|
||||
color = "#B2FFFF"
|
||||
opaque = 0
|
||||
|
||||
/datum/effect_system/smoke_spread/freezing
|
||||
effect_type = /obj/effect/particle_effect/smoke/freezing
|
||||
var/blast = 0
|
||||
|
||||
/datum/effect_system/smoke_spread/freezing/proc/Chilled(atom/A)
|
||||
if(istype(A,/turf/open))
|
||||
var/turf/open/T = A
|
||||
if(T.air)
|
||||
var/datum/gas_mixture/G = T.air
|
||||
if(get_dist(T, location) < 2) // Otherwise we'll get silliness like people using Nanofrost to kill people through walls with cold air
|
||||
G.temperature = 2
|
||||
T.air_update_turf()
|
||||
for(var/obj/effect/hotspot/H in T)
|
||||
qdel(H)
|
||||
var/list/G_gases = G.gases
|
||||
if(G_gases["plasma"])
|
||||
G.assert_gas("n2")
|
||||
G_gases["n2"][MOLES] += (G_gases["plasma"][MOLES])
|
||||
G_gases["plasma"][MOLES] = 0
|
||||
G.garbage_collect()
|
||||
for(var/obj/machinery/atmospherics/components/unary/U in T)
|
||||
if(!isnull(U.welded) && !U.welded) //must be an unwelded vent pump or vent scrubber.
|
||||
U.welded = 1
|
||||
U.update_icon()
|
||||
U.visible_message("<span class='danger'>[U] was frozen shut!</span>")
|
||||
for(var/mob/living/L in T)
|
||||
L.ExtinguishMob()
|
||||
for(var/obj/item/Item in T)
|
||||
Item.extinguish()
|
||||
|
||||
/datum/effect_system/smoke_spread/freezing/set_up(radius = 5, loca, blasting = 0)
|
||||
..()
|
||||
blast = blasting
|
||||
|
||||
/datum/effect_system/smoke_spread/freezing/start()
|
||||
if(blast)
|
||||
for(var/turf/T in RANGE_TURFS(2, location))
|
||||
Chilled(T)
|
||||
..()
|
||||
|
||||
|
||||
|
||||
/////////////////////////////////////////////
|
||||
// Sleep smoke
|
||||
/////////////////////////////////////////////
|
||||
|
||||
/obj/effect/particle_effect/smoke/sleeping
|
||||
color = "#9C3636"
|
||||
lifetime = 10
|
||||
|
||||
/obj/effect/particle_effect/smoke/sleeping/smoke_mob(mob/living/carbon/M)
|
||||
if(..())
|
||||
M.drop_item()
|
||||
M.Sleeping(max(M.sleeping,10))
|
||||
M.emote("cough")
|
||||
return 1
|
||||
|
||||
/datum/effect_system/smoke_spread/sleeping
|
||||
effect_type = /obj/effect/particle_effect/smoke/sleeping
|
||||
|
||||
/////////////////////////////////////////////
|
||||
// Chem smoke
|
||||
/////////////////////////////////////////////
|
||||
|
||||
/obj/effect/particle_effect/smoke/chem
|
||||
lifetime = 10
|
||||
|
||||
|
||||
/obj/effect/particle_effect/smoke/chem/process()
|
||||
if(..())
|
||||
var/turf/T = get_turf(src)
|
||||
var/fraction = 1/initial(lifetime)
|
||||
for(var/atom/movable/AM in T)
|
||||
if(AM.type == src.type)
|
||||
continue
|
||||
reagents.reaction(AM, TOUCH, fraction)
|
||||
|
||||
reagents.reaction(T, TOUCH, fraction)
|
||||
return 1
|
||||
|
||||
/obj/effect/particle_effect/smoke/chem/smoke_mob(mob/living/carbon/M)
|
||||
if(lifetime<1)
|
||||
return 0
|
||||
if(!istype(M))
|
||||
return 0
|
||||
var/mob/living/carbon/C = M
|
||||
if(C.internal != null || C.has_smoke_protection())
|
||||
return 0
|
||||
var/fraction = 1/initial(lifetime)
|
||||
reagents.copy_to(C, fraction*reagents.total_volume)
|
||||
reagents.reaction(M, INGEST, fraction)
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
/datum/effect_system/smoke_spread/chem
|
||||
var/obj/chemholder
|
||||
effect_type = /obj/effect/particle_effect/smoke/chem
|
||||
|
||||
/datum/effect_system/smoke_spread/chem/New()
|
||||
..()
|
||||
chemholder = PoolOrNew(/obj)
|
||||
var/datum/reagents/R = new/datum/reagents(500)
|
||||
chemholder.reagents = R
|
||||
R.my_atom = chemholder
|
||||
|
||||
/datum/effect_system/smoke_spread/chem/Destroy()
|
||||
qdel(chemholder)
|
||||
chemholder = null
|
||||
return ..()
|
||||
|
||||
/datum/effect_system/smoke_spread/chem/set_up(datum/reagents/carry = null, radius = 1, loca, silent = 0)
|
||||
if(istype(loca, /turf/))
|
||||
location = loca
|
||||
else
|
||||
location = get_turf(loca)
|
||||
amount = radius
|
||||
carry.copy_to(chemholder, 4*carry.total_volume) //The smoke holds 4 times the total reagents volume for balance purposes.
|
||||
|
||||
if(!silent)
|
||||
var/contained = ""
|
||||
for(var/reagent in carry.reagent_list)
|
||||
contained += " [reagent] "
|
||||
if(contained)
|
||||
contained = "\[[contained]\]"
|
||||
var/area/A = get_area(location)
|
||||
|
||||
var/where = "[A.name] | [location.x], [location.y]"
|
||||
var/whereLink = "<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[location.x];Y=[location.y];Z=[location.z]'>[where]</a>"
|
||||
|
||||
if(carry.my_atom.fingerprintslast)
|
||||
var/mob/M = get_mob_by_key(carry.my_atom.fingerprintslast)
|
||||
var/more = ""
|
||||
if(M)
|
||||
more = "(<A HREF='?_src_=holder;adminmoreinfo=\ref[M]'>?</a>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[M]'>FLW</A>) "
|
||||
message_admins("A chemical smoke reaction has taken place in ([whereLink])[contained]. Last associated key is [carry.my_atom.fingerprintslast][more].", 0, 1)
|
||||
log_game("A chemical smoke reaction has taken place in ([where])[contained]. Last associated key is [carry.my_atom.fingerprintslast].")
|
||||
else
|
||||
message_admins("A chemical smoke reaction has taken place in ([whereLink]). No associated key.", 0, 1)
|
||||
log_game("A chemical smoke reaction has taken place in ([where])[contained]. No associated key.")
|
||||
|
||||
|
||||
/datum/effect_system/smoke_spread/chem/start()
|
||||
var/color = mix_color_from_reagents(chemholder.reagents.reagent_list)
|
||||
if(holder)
|
||||
location = get_turf(holder)
|
||||
var/obj/effect/particle_effect/smoke/chem/S = new effect_type(location)
|
||||
|
||||
if(chemholder.reagents.total_volume > 1) // can't split 1 very well
|
||||
chemholder.reagents.copy_to(S, chemholder.reagents.total_volume)
|
||||
|
||||
if(color)
|
||||
S.color = color // give the smoke color, if it has any to begin with
|
||||
S.amount = amount
|
||||
if(S.amount)
|
||||
S.spread_smoke() //calling process right now so the smoke immediately attacks mobs.
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
/////////////////////////////////////////////
|
||||
//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/particle_effect/sparks
|
||||
name = "sparks"
|
||||
icon_state = "sparks"
|
||||
anchored = 1
|
||||
luminosity = 1
|
||||
|
||||
/obj/effect/particle_effect/sparks/New()
|
||||
..()
|
||||
flick("sparks", src) // replay the animation
|
||||
playsound(src.loc, "sparks", 100, 1)
|
||||
var/turf/T = src.loc
|
||||
if (istype(T, /turf))
|
||||
T.hotspot_expose(1000,100)
|
||||
QDEL_IN(src, 20)
|
||||
|
||||
/obj/effect/particle_effect/sparks/Destroy()
|
||||
var/turf/T = src.loc
|
||||
if (istype(T, /turf))
|
||||
T.hotspot_expose(1000,100)
|
||||
return ..()
|
||||
|
||||
/obj/effect/particle_effect/sparks/Move()
|
||||
..()
|
||||
var/turf/T = src.loc
|
||||
if(isturf(T))
|
||||
T.hotspot_expose(1000,100)
|
||||
|
||||
/datum/effect_system/spark_spread
|
||||
effect_type = /obj/effect/particle_effect/sparks
|
||||
|
||||
|
||||
//electricity
|
||||
|
||||
/obj/effect/particle_effect/sparks/electricity
|
||||
name = "lightning"
|
||||
icon_state = "electricity"
|
||||
|
||||
/datum/effect_system/lightning_spread
|
||||
effect_type = /obj/effect/particle_effect/sparks/electricity
|
||||
@@ -0,0 +1,53 @@
|
||||
//WATER EFFECTS
|
||||
|
||||
/obj/effect/particle_effect/water
|
||||
name = "water"
|
||||
icon_state = "extinguish"
|
||||
var/life = 15
|
||||
mouse_opacity = 0
|
||||
|
||||
|
||||
/obj/effect/particle_effect/water/New()
|
||||
..()
|
||||
QDEL_IN(src, 70)
|
||||
|
||||
/obj/effect/particle_effect/water/Move(turf/newloc)
|
||||
if (--src.life < 1)
|
||||
qdel(src)
|
||||
return 0
|
||||
if(newloc.density)
|
||||
return 0
|
||||
.=..()
|
||||
|
||||
/obj/effect/particle_effect/water/Bump(atom/A)
|
||||
if(reagents)
|
||||
reagents.reaction(A)
|
||||
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/particle_effect/steam
|
||||
name = "steam"
|
||||
icon_state = "extinguish"
|
||||
density = 0
|
||||
|
||||
/obj/effect/particle_effect/steam/New()
|
||||
..()
|
||||
QDEL_IN(src, 20)
|
||||
|
||||
/datum/effect_system/steam_spread
|
||||
effect_type = /obj/effect/particle_effect/steam
|
||||
@@ -0,0 +1,28 @@
|
||||
/obj/effect/forcefield
|
||||
desc = "A space wizard's magic wall."
|
||||
name = "FORCEWALL"
|
||||
icon_state = "m_shield"
|
||||
anchored = 1
|
||||
opacity = 0
|
||||
density = 1
|
||||
unacidable = 1
|
||||
|
||||
/obj/effect/forcefield/CanAtmosPass(turf/T)
|
||||
return !density
|
||||
|
||||
/obj/effect/forcefield/cult
|
||||
desc = "An unholy shield that blocks all attacks."
|
||||
name = "glowing wall"
|
||||
icon_state = "cultshield"
|
||||
|
||||
///////////Mimewalls///////////
|
||||
|
||||
/obj/effect/forcefield/mime
|
||||
icon_state = "empty"
|
||||
name = "invisible wall"
|
||||
desc = "You have a bad feeling about this."
|
||||
var/timeleft = 300
|
||||
|
||||
/obj/effect/forcefield/mime/New()
|
||||
..()
|
||||
QDEL_IN(src, timeleft)
|
||||
@@ -0,0 +1,62 @@
|
||||
/proc/gibs(atom/location, list/viruses, datum/dna/MobDNA)
|
||||
new /obj/effect/gibspawner/generic(location,viruses,MobDNA)
|
||||
|
||||
/proc/hgibs(atom/location, list/viruses, datum/dna/MobDNA)
|
||||
new /obj/effect/gibspawner/human(location,viruses,MobDNA)
|
||||
|
||||
/proc/xgibs(atom/location, list/viruses)
|
||||
new /obj/effect/gibspawner/xeno(location,viruses)
|
||||
|
||||
/proc/robogibs(atom/location, list/viruses)
|
||||
new /obj/effect/gibspawner/robot(location,viruses)
|
||||
|
||||
/obj/effect/gibspawner
|
||||
var/sparks = 0 //whether sparks spread on Gib()
|
||||
var/virusProb = 20 //the chance for viruses to spread on the gibs
|
||||
var/list/gibtypes = list()
|
||||
var/list/gibamounts = list()
|
||||
var/list/gibdirections = list() //of lists
|
||||
|
||||
/obj/effect/gibspawner/New(location, var/list/viruses, var/datum/dna/MobDNA)
|
||||
..()
|
||||
|
||||
Gib(loc,viruses,MobDNA)
|
||||
|
||||
/obj/effect/gibspawner/proc/Gib(atom/location, list/viruses = list(), datum/dna/MobDNA = null)
|
||||
if(gibtypes.len != gibamounts.len || gibamounts.len != gibdirections.len)
|
||||
world << "<span class='danger'>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, location)
|
||||
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)
|
||||
if(istype(location,/mob/living/carbon))
|
||||
var/mob/living/carbon/digester = location
|
||||
digester.stomach_contents += gib
|
||||
|
||||
if(viruses.len > 0)
|
||||
for(var/datum/disease/D in viruses)
|
||||
if(prob(virusProb))
|
||||
var/datum/disease/viruus = D.Copy(1)
|
||||
gib.viruses += viruus
|
||||
viruus.holder = gib
|
||||
|
||||
if(MobDNA)
|
||||
gib.blood_DNA[MobDNA.unique_enzymes] = MobDNA.blood_type
|
||||
else if(istype(src, /obj/effect/gibspawner/generic)) // Probably a monkey
|
||||
gib.blood_DNA["Non-human DNA"] = "A+"
|
||||
var/list/directions = gibdirections[i]
|
||||
if(istype(loc,/turf))
|
||||
if(directions.len)
|
||||
gib.streak(directions)
|
||||
|
||||
qdel(src)
|
||||
@@ -0,0 +1,159 @@
|
||||
//separate dm since hydro is getting bloated already
|
||||
|
||||
var/list/blacklisted_glowshroom_turfs = typecacheof(list(
|
||||
/turf/open/floor/plating/lava,
|
||||
/turf/open/floor/plating/beach/water))
|
||||
|
||||
/obj/effect/glowshroom
|
||||
name = "glowshroom"
|
||||
desc = "Mycena Bregprox, a species of mushroom that glows in the dark."
|
||||
anchored = 1
|
||||
opacity = 0
|
||||
density = 0
|
||||
icon = 'icons/obj/lighting.dmi'
|
||||
icon_state = "glowshroom" //replaced in New
|
||||
layer = ABOVE_NORMAL_TURF_LAYER
|
||||
var/endurance = 30
|
||||
var/potency = 30
|
||||
var/delay = 1200
|
||||
var/floor = 0
|
||||
var/yield = 3
|
||||
var/generation = 1
|
||||
var/spreadIntoAdjacentChance = 60
|
||||
|
||||
obj/effect/glowshroom/glowcap
|
||||
name = "glowcap"
|
||||
icon_state = "glowcap"
|
||||
|
||||
/obj/effect/glowshroom/single
|
||||
yield = 0
|
||||
|
||||
/obj/effect/glowshroom/examine(mob/user)
|
||||
. = ..()
|
||||
user << "This is a [generation]\th generation [name]!"
|
||||
|
||||
/obj/effect/glowshroom/New()
|
||||
..()
|
||||
SetLuminosity(round(potency/10))
|
||||
setDir(CalcDir())
|
||||
var/base_icon_state = initial(icon_state)
|
||||
if(!floor)
|
||||
switch(dir) //offset to make it be on the wall rather than on the floor
|
||||
if(NORTH)
|
||||
pixel_y = 32
|
||||
if(SOUTH)
|
||||
pixel_y = -32
|
||||
if(EAST)
|
||||
pixel_x = 32
|
||||
if(WEST)
|
||||
pixel_x = -32
|
||||
icon_state = "[base_icon_state][rand(1,3)]"
|
||||
else //if on the floor, glowshroom on-floor sprite
|
||||
icon_state = "[base_icon_state]f"
|
||||
|
||||
addtimer(src, "Spread", delay)
|
||||
|
||||
/obj/effect/glowshroom/proc/Spread()
|
||||
for(var/i = 1 to yield)
|
||||
if(prob(1/(generation * generation) * 100))//This formula gives you diminishing returns based on generation. 100% with 1st gen, decreasing to 25%, 11%, 6, 4, 2...
|
||||
var/list/possibleLocs = list()
|
||||
var/spreadsIntoAdjacent = FALSE
|
||||
|
||||
if(prob(spreadIntoAdjacentChance))
|
||||
spreadsIntoAdjacent = TRUE
|
||||
|
||||
for(var/turf/open/floor/earth in view(3,src))
|
||||
if(is_type_in_typecache(earth, blacklisted_glowshroom_turfs))
|
||||
continue
|
||||
if(spreadsIntoAdjacent || !locate(/obj/effect/glowshroom) in view(1,earth))
|
||||
possibleLocs += earth
|
||||
CHECK_TICK
|
||||
|
||||
if(!possibleLocs.len)
|
||||
break
|
||||
|
||||
var/turf/newLoc = pick(possibleLocs)
|
||||
|
||||
var/shroomCount = 0 //hacky
|
||||
var/placeCount = 1
|
||||
for(var/obj/effect/glowshroom/shroom in newLoc)
|
||||
shroomCount++
|
||||
for(var/wallDir in cardinal)
|
||||
var/turf/isWall = get_step(newLoc,wallDir)
|
||||
if(isWall.density)
|
||||
placeCount++
|
||||
if(shroomCount >= placeCount)
|
||||
continue
|
||||
|
||||
var/obj/effect/glowshroom/child = new type(newLoc)//The baby mushrooms have different stats :3
|
||||
child.potency = max(potency + rand(-3,6), 0)
|
||||
child.yield = max(yield + rand(-1,2), 0)
|
||||
child.delay = max(delay + rand(-30,60), 0)
|
||||
child.endurance = max(endurance + rand(-3,6), 1)
|
||||
child.generation = generation + 1
|
||||
|
||||
CHECK_TICK
|
||||
|
||||
/obj/effect/glowshroom/proc/CalcDir(turf/location = loc)
|
||||
var/direction = 16
|
||||
|
||||
for(var/wallDir in cardinal)
|
||||
var/turf/newTurf = get_step(location,wallDir)
|
||||
if(newTurf.density)
|
||||
direction |= wallDir
|
||||
|
||||
for(var/obj/effect/glowshroom/shroom in location)
|
||||
if(shroom == src)
|
||||
continue
|
||||
if(shroom.floor) //special
|
||||
direction &= ~16
|
||||
else
|
||||
direction &= ~shroom.dir
|
||||
|
||||
var/list/dirList = list()
|
||||
|
||||
for(var/i=1,i<=16,i <<= 1)
|
||||
if(direction & i)
|
||||
dirList += i
|
||||
|
||||
if(dirList.len)
|
||||
var/newDir = pick(dirList)
|
||||
if(newDir == 16)
|
||||
floor = 1
|
||||
newDir = 1
|
||||
return newDir
|
||||
|
||||
floor = 1
|
||||
return 1
|
||||
|
||||
/obj/effect/glowshroom/attacked_by(obj/item/I, mob/user)
|
||||
..()
|
||||
if(I.damtype != STAMINA)
|
||||
endurance -= I.force
|
||||
CheckEndurance()
|
||||
|
||||
/obj/effect/glowshroom/ex_act(severity, target)
|
||||
switch(severity)
|
||||
if(1)
|
||||
qdel(src)
|
||||
if(2)
|
||||
if(prob(50))
|
||||
qdel(src)
|
||||
if(3)
|
||||
if(prob(5))
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/glowshroom/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > 300)
|
||||
endurance -= 5
|
||||
CheckEndurance()
|
||||
|
||||
/obj/effect/glowshroom/proc/CheckEndurance()
|
||||
if(endurance <= 0)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/glowshroom/acid_act(acidpwr, toxpwr, acid_volume)
|
||||
visible_message("<span class='danger'>[src] melts away!</span>")
|
||||
var/obj/effect/decal/cleanable/molten_item/I = new (get_turf(src))
|
||||
I.desc = "Looks like this was \an [src] some time ago."
|
||||
qdel(src)
|
||||
@@ -0,0 +1,288 @@
|
||||
/obj/effect/landmark
|
||||
name = "landmark"
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
icon_state = "x2"
|
||||
anchored = 1
|
||||
unacidable = 1
|
||||
invisibility = INVISIBILITY_ABSTRACT
|
||||
|
||||
/obj/effect/landmark/New()
|
||||
..()
|
||||
tag = text("landmark*[]", name)
|
||||
landmarks_list += src
|
||||
|
||||
switch(name) //some of these are probably obsolete
|
||||
if("monkey")
|
||||
monkeystart += loc
|
||||
qdel(src)
|
||||
return
|
||||
if("start")
|
||||
newplayer_start += loc
|
||||
qdel(src)
|
||||
return
|
||||
if("wizard")
|
||||
wizardstart += loc
|
||||
qdel(src)
|
||||
return
|
||||
if("JoinLate")
|
||||
latejoin += loc
|
||||
qdel(src)
|
||||
return
|
||||
if("prisonwarp")
|
||||
prisonwarp += loc
|
||||
qdel(src)
|
||||
return
|
||||
if("Holding Facility")
|
||||
holdingfacility += loc
|
||||
if("tdome1")
|
||||
tdome1 += loc
|
||||
if("tdome2")
|
||||
tdome2 += loc
|
||||
if("tdomeadmin")
|
||||
tdomeadmin += loc
|
||||
if("tdomeobserve")
|
||||
tdomeobserve += loc
|
||||
if("prisonsecuritywarp")
|
||||
prisonsecuritywarp += loc
|
||||
qdel(src)
|
||||
return
|
||||
if("blobstart")
|
||||
blobstart += loc
|
||||
qdel(src)
|
||||
return
|
||||
if("secequipment")
|
||||
secequipment += loc
|
||||
qdel(src)
|
||||
return
|
||||
if("Emergencyresponseteam")
|
||||
emergencyresponseteamspawn += loc
|
||||
qdel(src)
|
||||
return
|
||||
if("xeno_spawn")
|
||||
xeno_spawn += loc
|
||||
qdel(src)
|
||||
return
|
||||
return 1
|
||||
|
||||
/obj/effect/landmark/Destroy()
|
||||
landmarks_list -= src
|
||||
return ..()
|
||||
|
||||
/obj/effect/landmark/start
|
||||
name = "start"
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
icon_state = "x"
|
||||
anchored = 1
|
||||
|
||||
/obj/effect/landmark/start/New()
|
||||
..()
|
||||
tag = "start*[name]"
|
||||
start_landmarks_list += src
|
||||
return 1
|
||||
|
||||
/obj/effect/landmark/start/Destroy()
|
||||
start_landmarks_list -= src
|
||||
return ..()
|
||||
|
||||
//Costume spawner landmarks
|
||||
|
||||
/obj/effect/landmark/costume/New() //costume spawner, selects a random subclass and disappears
|
||||
|
||||
var/list/options = typesof(/obj/effect/landmark/costume)
|
||||
var/PICK= options[rand(1,options.len)]
|
||||
new PICK(src.loc)
|
||||
qdel(src)
|
||||
|
||||
//SUBCLASSES. Spawn a bunch of items and disappear likewise
|
||||
/obj/effect/landmark/costume/chicken/New()
|
||||
new /obj/item/clothing/suit/chickensuit(src.loc)
|
||||
new /obj/item/clothing/head/chicken(src.loc)
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/egg(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/costume/gladiator/New()
|
||||
new /obj/item/clothing/under/gladiator(src.loc)
|
||||
new /obj/item/clothing/head/helmet/gladiator(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/costume/madscientist/New()
|
||||
new /obj/item/clothing/under/gimmick/rank/captain/suit(src.loc)
|
||||
new /obj/item/clothing/head/flatcap(src.loc)
|
||||
new /obj/item/clothing/suit/toggle/labcoat/mad(src.loc)
|
||||
new /obj/item/clothing/glasses/gglasses(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/costume/elpresidente/New()
|
||||
new /obj/item/clothing/under/gimmick/rank/captain/suit(src.loc)
|
||||
new /obj/item/clothing/head/flatcap(src.loc)
|
||||
new /obj/item/clothing/mask/cigarette/cigar/havana(src.loc)
|
||||
new /obj/item/clothing/shoes/jackboots(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/costume/nyangirl/New()
|
||||
new /obj/item/clothing/under/schoolgirl(src.loc)
|
||||
new /obj/item/clothing/head/kitty(src.loc)
|
||||
new /obj/item/clothing/glasses/sunglasses/blindfold(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/costume/maid/New()
|
||||
new /obj/item/clothing/under/blackskirt(src.loc)
|
||||
var/CHOICE = pick( /obj/item/clothing/head/beret , /obj/item/clothing/head/rabbitears )
|
||||
new CHOICE(src.loc)
|
||||
new /obj/item/clothing/glasses/sunglasses/blindfold(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/costume/butler/New()
|
||||
new /obj/item/clothing/tie/waistcoat(src.loc)
|
||||
new /obj/item/clothing/under/suit_jacket(src.loc)
|
||||
new /obj/item/clothing/head/that(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/costume/highlander/New()
|
||||
new /obj/item/clothing/under/kilt(src.loc)
|
||||
new /obj/item/clothing/head/beret(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/costume/prig/New()
|
||||
new /obj/item/clothing/tie/waistcoat(src.loc)
|
||||
new /obj/item/clothing/glasses/monocle(src.loc)
|
||||
var/CHOICE= pick( /obj/item/clothing/head/bowler, /obj/item/clothing/head/that)
|
||||
new CHOICE(src.loc)
|
||||
new /obj/item/clothing/shoes/sneakers/black(src.loc)
|
||||
new /obj/item/weapon/cane(src.loc)
|
||||
new /obj/item/clothing/under/sl_suit(src.loc)
|
||||
new /obj/item/clothing/mask/fakemoustache(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/costume/plaguedoctor/New()
|
||||
new /obj/item/clothing/suit/bio_suit/plaguedoctorsuit(src.loc)
|
||||
new /obj/item/clothing/head/plaguedoctorhat(src.loc)
|
||||
new /obj/item/clothing/mask/gas/plaguedoctor(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/costume/nightowl/New()
|
||||
new /obj/item/clothing/suit/toggle/owlwings(src.loc)
|
||||
new /obj/item/clothing/under/owl(src.loc)
|
||||
new /obj/item/clothing/mask/gas/owl_mask(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/costume/thegriffin/New()
|
||||
new /obj/item/clothing/suit/toggle/owlwings/griffinwings(src.loc)
|
||||
new /obj/item/clothing/shoes/griffin(src.loc)
|
||||
new /obj/item/clothing/under/griffin(src.loc)
|
||||
new /obj/item/clothing/head/griffin(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/costume/waiter/New()
|
||||
new /obj/item/clothing/under/waiter(src.loc)
|
||||
var/CHOICE= pick( /obj/item/clothing/head/kitty, /obj/item/clothing/head/rabbitears)
|
||||
new CHOICE(src.loc)
|
||||
new /obj/item/clothing/suit/apron(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/costume/pirate/New()
|
||||
new /obj/item/clothing/under/pirate(src.loc)
|
||||
new /obj/item/clothing/suit/pirate(src.loc)
|
||||
var/CHOICE = pick( /obj/item/clothing/head/pirate , /obj/item/clothing/head/bandana )
|
||||
new CHOICE(src.loc)
|
||||
new /obj/item/clothing/glasses/eyepatch(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/costume/commie/New()
|
||||
new /obj/item/clothing/under/soviet(src.loc)
|
||||
new /obj/item/clothing/head/ushanka(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/costume/imperium_monk/New()
|
||||
new /obj/item/clothing/suit/imperium_monk(src.loc)
|
||||
if (prob(25))
|
||||
new /obj/item/clothing/mask/gas/cyborg(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/costume/holiday_priest/New()
|
||||
new /obj/item/clothing/suit/holidaypriest(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/costume/marisawizard/fake/New()
|
||||
new /obj/item/clothing/shoes/sandal/marisa(src.loc)
|
||||
new /obj/item/clothing/head/wizard/marisa/fake(src.loc)
|
||||
new/obj/item/clothing/suit/wizrobe/marisa/fake(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/costume/cutewitch/New()
|
||||
new /obj/item/clothing/under/sundress(src.loc)
|
||||
new /obj/item/clothing/head/witchwig(src.loc)
|
||||
new /obj/item/weapon/staff/broom(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/costume/fakewizard/New()
|
||||
new /obj/item/clothing/shoes/sandal(src.loc)
|
||||
new /obj/item/clothing/suit/wizrobe/fake(src.loc)
|
||||
new /obj/item/clothing/head/wizard/fake(src.loc)
|
||||
new /obj/item/weapon/staff/(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/costume/sexyclown/New()
|
||||
new /obj/item/clothing/mask/gas/sexyclown(src.loc)
|
||||
new /obj/item/clothing/under/rank/clown/sexy(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/costume/sexymime/New()
|
||||
new /obj/item/clothing/mask/gas/sexymime(src.loc)
|
||||
new /obj/item/clothing/under/sexymime(src.loc)
|
||||
qdel(src)
|
||||
|
||||
//Department Security spawns
|
||||
|
||||
/obj/effect/landmark/start/depsec
|
||||
name = "department_sec"
|
||||
|
||||
/obj/effect/landmark/start/depsec/New()
|
||||
..()
|
||||
department_security_spawns += src
|
||||
|
||||
/obj/effect/landmark/start/depsec/Destroy()
|
||||
department_security_spawns -= src
|
||||
return ..()
|
||||
|
||||
/obj/effect/landmark/start/depsec/supply
|
||||
name = "supply_sec"
|
||||
|
||||
/obj/effect/landmark/start/depsec/medical
|
||||
name = "medical_sec"
|
||||
|
||||
/obj/effect/landmark/start/depsec/engineering
|
||||
name = "engineering_sec"
|
||||
|
||||
/obj/effect/landmark/start/depsec/science
|
||||
name = "science_sec"
|
||||
|
||||
/obj/effect/landmark/latejoin
|
||||
name = "JoinLate"
|
||||
|
||||
//generic event spawns
|
||||
/obj/effect/landmark/event_spawn
|
||||
name = "generic event spawn"
|
||||
icon_state = "x4"
|
||||
|
||||
/obj/effect/landmark/event_spawn/New()
|
||||
..()
|
||||
generic_event_spawns += src
|
||||
|
||||
/obj/effect/landmark/event_spawn/Destroy()
|
||||
generic_event_spawns -= src
|
||||
return ..()
|
||||
|
||||
/obj/effect/landmark/ruin
|
||||
var/datum/map_template/ruin/ruin_template
|
||||
|
||||
/obj/effect/landmark/ruin/New(loc, my_ruin_template)
|
||||
name = "ruin_[ruin_landmarks.len + 1]"
|
||||
..(loc)
|
||||
ruin_template = my_ruin_template
|
||||
ruin_landmarks |= src
|
||||
|
||||
/obj/effect/landmark/ruin/Destroy()
|
||||
ruin_landmarks -= src
|
||||
ruin_template = null
|
||||
. = ..()
|
||||
@@ -0,0 +1,18 @@
|
||||
/obj/effect/manifest
|
||||
name = "manifest"
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
icon_state = "x"
|
||||
unacidable = 1//Just to be sure.
|
||||
|
||||
/obj/effect/manifest/New()
|
||||
src.invisibility = INVISIBILITY_ABSTRACT
|
||||
|
||||
/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)
|
||||
@@ -0,0 +1,172 @@
|
||||
/obj/effect/mine
|
||||
name = "dummy mine"
|
||||
desc = "Better stay away from that thing."
|
||||
density = 0
|
||||
anchored = 1
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "uglymine"
|
||||
var/triggered = 0
|
||||
|
||||
/obj/effect/mine/proc/mineEffect(mob/victim)
|
||||
victim << "<span class='danger'>*click*</span>"
|
||||
|
||||
/obj/effect/mine/Crossed(AM as mob|obj)
|
||||
if(isanimal(AM))
|
||||
var/mob/living/simple_animal/SA = AM
|
||||
if(!SA.flying)
|
||||
triggermine(SA)
|
||||
else
|
||||
triggermine(AM)
|
||||
|
||||
/obj/effect/mine/proc/triggermine(mob/victim)
|
||||
if(triggered)
|
||||
return
|
||||
visible_message("<span class='danger'>[victim] sets off \icon[src] [src]!</span>")
|
||||
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
mineEffect(victim)
|
||||
triggered = 1
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/effect/mine/explosive
|
||||
name = "explosive mine"
|
||||
var/range_devastation = 0
|
||||
var/range_heavy = 1
|
||||
var/range_light = 2
|
||||
var/range_flash = 3
|
||||
|
||||
/obj/effect/mine/explosive/mineEffect(mob/victim)
|
||||
explosion(loc, range_devastation, range_heavy, range_light, range_flash)
|
||||
|
||||
|
||||
/obj/effect/mine/stun
|
||||
name = "stun mine"
|
||||
var/stun_time = 8
|
||||
|
||||
/obj/effect/mine/stun/mineEffect(mob/victim)
|
||||
if(isliving(victim))
|
||||
victim.Weaken(stun_time)
|
||||
|
||||
/obj/effect/mine/kickmine
|
||||
name = "kick mine"
|
||||
|
||||
/obj/effect/mine/kickmine/mineEffect(mob/victim)
|
||||
if(isliving(victim) && victim.client)
|
||||
victim << "<span class='userdanger'>You have been kicked FOR NO REISIN!</span>"
|
||||
del(victim.client)
|
||||
|
||||
|
||||
/obj/effect/mine/gas
|
||||
name = "oxygen mine"
|
||||
var/gas_amount = 360
|
||||
var/gas_type = "o2"
|
||||
|
||||
/obj/effect/mine/gas/mineEffect(mob/victim)
|
||||
atmos_spawn_air("[gas_type]=[gas_amount]")
|
||||
|
||||
|
||||
/obj/effect/mine/gas/plasma
|
||||
name = "plasma mine"
|
||||
gas_type = "plasma"
|
||||
|
||||
|
||||
/obj/effect/mine/gas/n2o
|
||||
name = "\improper N2O mine"
|
||||
gas_type = "n2o"
|
||||
|
||||
|
||||
/obj/effect/mine/sound
|
||||
name = "honkblaster 1000"
|
||||
var/sound = 'sound/items/bikehorn.ogg'
|
||||
|
||||
/obj/effect/mine/sound/mineEffect(mob/victim)
|
||||
playsound(loc, sound, 100, 1)
|
||||
|
||||
|
||||
/obj/effect/mine/sound/bwoink
|
||||
name = "bwoink mine"
|
||||
sound = 'sound/effects/adminhelp.ogg'
|
||||
|
||||
/obj/effect/mine/pickup
|
||||
name = "pickup"
|
||||
desc = "pick me up"
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "electricity2"
|
||||
density = 0
|
||||
var/duration = 0
|
||||
|
||||
/obj/effect/mine/pickup/New()
|
||||
..()
|
||||
animate(src, pixel_y = 4, time = 20, loop = -1)
|
||||
|
||||
/obj/effect/mine/pickup/triggermine(mob/victim)
|
||||
if(triggered)
|
||||
return
|
||||
triggered = 1
|
||||
invisibility = INVISIBILITY_ABSTRACT
|
||||
mineEffect(victim)
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/effect/mine/pickup/bloodbath
|
||||
name = "Red Orb"
|
||||
desc = "You feel angry just looking at it."
|
||||
duration = 1200 //2min
|
||||
color = "red"
|
||||
|
||||
/obj/effect/mine/pickup/bloodbath/mineEffect(mob/living/carbon/victim)
|
||||
if(!victim.client || !istype(victim))
|
||||
return
|
||||
victim << "<span class='reallybig redtext'>RIP AND TEAR</span>"
|
||||
victim << 'sound/misc/e1m1.ogg'
|
||||
var/old_color = victim.client.color
|
||||
var/red_splash = list(1,0,0,0.8,0.2,0, 0.8,0,0.2,0.1,0,0)
|
||||
var/pure_red = list(0,0,0,0,0,0,0,0,0,1,0,0)
|
||||
|
||||
spawn(0)
|
||||
new /obj/effect/hallucination/delusion(victim.loc,victim,force_kind="demon",duration=duration,skip_nearby=0)
|
||||
|
||||
var/obj/item/weapon/twohanded/required/chainsaw/doomslayer/chainsaw = new(victim.loc)
|
||||
chainsaw.flags |= NODROP
|
||||
victim.drop_r_hand()
|
||||
victim.drop_l_hand()
|
||||
victim.put_in_hands(chainsaw)
|
||||
|
||||
victim.reagents.add_reagent("adminordrazine",25)
|
||||
|
||||
victim.client.color = pure_red
|
||||
animate(victim.client,color = red_splash, time = 10, easing = SINE_EASING|EASE_OUT)
|
||||
sleep(10)
|
||||
animate(victim.client,color = old_color, time = duration)//, easing = SINE_EASING|EASE_OUT)
|
||||
sleep(duration)
|
||||
victim << "<span class='notice'>Your bloodlust seeps back into the bog of your subconscious and you regain self control.<span>"
|
||||
qdel(chainsaw)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/mine/pickup/healing
|
||||
name = "Blue Orb"
|
||||
desc = "You feel better just looking at it."
|
||||
color = "blue"
|
||||
|
||||
/obj/effect/mine/pickup/healing/mineEffect(mob/living/carbon/victim)
|
||||
if(!victim.client || !istype(victim))
|
||||
return
|
||||
victim << "<span class='notice'>You feel great!</span>"
|
||||
victim.revive(full_heal = 1, admin_revive = 1)
|
||||
|
||||
/obj/effect/mine/pickup/speed
|
||||
name = "Yellow Orb"
|
||||
desc = "You feel faster just looking at it."
|
||||
color = "yellow"
|
||||
duration = 300
|
||||
|
||||
/obj/effect/mine/pickup/speed/mineEffect(mob/living/carbon/victim)
|
||||
if(!victim.client || !istype(victim))
|
||||
return
|
||||
victim << "<span class='notice'>You feel fast!</span>"
|
||||
victim.status_flags |= GOTTAGOREALLYFAST
|
||||
sleep(duration)
|
||||
victim.status_flags &= ~GOTTAGOREALLYFAST
|
||||
victim << "<span class='notice'>You slow down.</span>"
|
||||
@@ -0,0 +1,26 @@
|
||||
//The effect when you wrap a dead body in gift wrap
|
||||
/obj/effect/spresent
|
||||
name = "strange present"
|
||||
desc = "It's a ... present?"
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "strangepresent"
|
||||
density = 1
|
||||
anchored = 0
|
||||
|
||||
/obj/effect/beam
|
||||
name = "beam"
|
||||
unacidable = 1//Just to be sure.
|
||||
var/def_zone
|
||||
pass_flags = PASSTABLE
|
||||
|
||||
/obj/effect/spawner
|
||||
name = "object spawner"
|
||||
|
||||
/obj/effect/list_container
|
||||
name = "list container"
|
||||
|
||||
/obj/effect/list_container/mobl
|
||||
name = "mobl"
|
||||
var/master = null
|
||||
|
||||
var/list/container = list( )
|
||||
@@ -0,0 +1,345 @@
|
||||
/obj/effect/overlay
|
||||
name = "overlay"
|
||||
unacidable = 1
|
||||
var/i_attached//Added for possible image attachments to objects. For hallucinations and the like.
|
||||
|
||||
/obj/effect/overlay/singularity_act()
|
||||
return
|
||||
|
||||
/obj/effect/overlay/singularity_pull()
|
||||
return
|
||||
|
||||
/obj/effect/overlay/beam//Not actually a projectile, just an effect.
|
||||
name="beam"
|
||||
icon='icons/effects/beam.dmi'
|
||||
icon_state="b_beam"
|
||||
var/atom/BeamSource
|
||||
|
||||
/obj/effect/overlay/beam/New()
|
||||
..()
|
||||
QDEL_IN(src, 10)
|
||||
|
||||
/obj/effect/overlay/temp
|
||||
icon_state = "nothing"
|
||||
anchored = 1
|
||||
layer = ABOVE_MOB_LAYER
|
||||
mouse_opacity = 0
|
||||
var/duration = 10 //in deciseconds
|
||||
var/randomdir = TRUE
|
||||
var/timerid
|
||||
|
||||
/obj/effect/overlay/temp/Destroy()
|
||||
..()
|
||||
deltimer(timerid)
|
||||
return QDEL_HINT_PUTINPOOL
|
||||
|
||||
/obj/effect/overlay/temp/New()
|
||||
..()
|
||||
if(randomdir)
|
||||
setDir(pick(cardinal))
|
||||
flick("[icon_state]", src) //Because we might be pulling it from a pool, flick whatever icon it uses so it starts at the start of the icon's animation.
|
||||
|
||||
timerid = QDEL_IN(src, duration)
|
||||
|
||||
/obj/effect/overlay/temp/bloodsplatter
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
duration = 5
|
||||
randomdir = FALSE
|
||||
layer = BELOW_MOB_LAYER
|
||||
|
||||
/obj/effect/overlay/temp/bloodsplatter/New(loc, set_dir)
|
||||
if(set_dir in diagonals)
|
||||
icon_state = "splatter[pick(1, 2, 6)]"
|
||||
else
|
||||
icon_state = "splatter[pick(3, 4, 5)]"
|
||||
..()
|
||||
var/target_pixel_x = 0
|
||||
var/target_pixel_y = 0
|
||||
switch(set_dir)
|
||||
if(NORTH)
|
||||
target_pixel_y = 16
|
||||
if(SOUTH)
|
||||
target_pixel_y = -16
|
||||
layer = ABOVE_MOB_LAYER
|
||||
if(EAST)
|
||||
target_pixel_x = 16
|
||||
if(WEST)
|
||||
target_pixel_x = -16
|
||||
if(NORTHEAST)
|
||||
target_pixel_x = 16
|
||||
target_pixel_y = 16
|
||||
if(NORTHWEST)
|
||||
target_pixel_x = -16
|
||||
target_pixel_y = 16
|
||||
if(SOUTHEAST)
|
||||
target_pixel_x = 16
|
||||
target_pixel_y = -16
|
||||
layer = ABOVE_MOB_LAYER
|
||||
if(SOUTHWEST)
|
||||
target_pixel_x = -16
|
||||
target_pixel_y = -16
|
||||
layer = ABOVE_MOB_LAYER
|
||||
setDir(set_dir)
|
||||
animate(src, pixel_x = target_pixel_x, pixel_y = target_pixel_y, alpha = 0, time = duration)
|
||||
|
||||
|
||||
/obj/effect/overlay/temp/heal //color is white by default, set to whatever is needed
|
||||
name = "healing glow"
|
||||
icon_state = "heal"
|
||||
duration = 15
|
||||
|
||||
/obj/effect/overlay/temp/heal/New(loc, colour)
|
||||
..()
|
||||
pixel_x = rand(-12, 12)
|
||||
pixel_y = rand(-9, 0)
|
||||
if(colour)
|
||||
color = colour
|
||||
|
||||
/obj/effect/overlay/temp/explosion
|
||||
name = "explosion"
|
||||
icon = 'icons/effects/96x96.dmi'
|
||||
icon_state = "explosion"
|
||||
pixel_x = -32
|
||||
pixel_y = -32
|
||||
duration = 8
|
||||
|
||||
/obj/effect/overlay/temp/blob
|
||||
name = "blob"
|
||||
icon_state = "blob_attack"
|
||||
alpha = 140
|
||||
randomdir = 0
|
||||
duration = 6
|
||||
|
||||
/obj/effect/overlay/temp/guardian
|
||||
randomdir = 0
|
||||
|
||||
/obj/effect/overlay/temp/guardian/phase
|
||||
duration = 5
|
||||
icon_state = "phasein"
|
||||
|
||||
/obj/effect/overlay/temp/guardian/phase/out
|
||||
icon_state = "phaseout"
|
||||
|
||||
/obj/effect/overlay/temp/decoy
|
||||
desc = "It's a decoy!"
|
||||
duration = 15
|
||||
|
||||
/obj/effect/overlay/temp/decoy/New(loc, atom/mimiced_atom)
|
||||
..()
|
||||
alpha = initial(alpha)
|
||||
if(mimiced_atom)
|
||||
name = mimiced_atom.name
|
||||
appearance = mimiced_atom.appearance
|
||||
setDir(mimiced_atom.dir)
|
||||
animate(src, alpha = 0, time = duration)
|
||||
|
||||
/obj/effect/overlay/temp/cult
|
||||
randomdir = 0
|
||||
duration = 10
|
||||
|
||||
/obj/effect/overlay/temp/cult/sparks
|
||||
randomdir = 1
|
||||
name = "blood sparks"
|
||||
icon_state = "bloodsparkles"
|
||||
|
||||
/obj/effect/overlay/temp/cult/phase
|
||||
name = "phase glow"
|
||||
duration = 7
|
||||
icon_state = "cultin"
|
||||
|
||||
/obj/effect/overlay/temp/cult/phase/New(loc, set_dir)
|
||||
..()
|
||||
if(set_dir)
|
||||
setDir(set_dir)
|
||||
|
||||
/obj/effect/overlay/temp/cult/phase/out
|
||||
icon_state = "cultout"
|
||||
|
||||
/obj/effect/overlay/temp/cult/sac
|
||||
name = "maw of Nar-Sie"
|
||||
icon_state = "sacconsume"
|
||||
|
||||
/obj/effect/overlay/temp/cult/door
|
||||
name = "unholy glow"
|
||||
icon_state = "doorglow"
|
||||
layer = CLOSED_FIREDOOR_LAYER //above closed doors
|
||||
|
||||
/obj/effect/overlay/temp/cult/door/unruned
|
||||
icon_state = "unruneddoorglow"
|
||||
|
||||
/obj/effect/overlay/temp/cult/turf
|
||||
name = "unholy glow"
|
||||
icon_state = "wallglow"
|
||||
layer = ABOVE_NORMAL_TURF_LAYER
|
||||
|
||||
/obj/effect/overlay/temp/cult/turf/open/floor
|
||||
icon_state = "floorglow"
|
||||
duration = 5
|
||||
|
||||
|
||||
/obj/effect/overlay/temp/ratvar
|
||||
name = "ratvar's light"
|
||||
duration = 8
|
||||
randomdir = 0
|
||||
layer = ABOVE_NORMAL_TURF_LAYER
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/door
|
||||
icon_state = "ratvardoorglow"
|
||||
layer = CLOSED_FIREDOOR_LAYER //above closed doors
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/door/window
|
||||
icon_state = "ratvarwindoorglow"
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/beam
|
||||
icon_state = "ratvarbeamglow"
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/beam/door
|
||||
layer = CLOSED_FIREDOOR_LAYER //above closed doors
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/beam/grille
|
||||
layer = LOW_ITEM_LAYER //above grilles
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/beam/itemconsume
|
||||
layer = HIGH_OBJ_LAYER
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/wall
|
||||
icon_state = "ratvarwallglow"
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/floor
|
||||
icon_state = "ratvarfloorglow"
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/window
|
||||
icon_state = "ratvarwindowglow"
|
||||
layer = ABOVE_WINDOW_LAYER //above windows
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/grille
|
||||
icon_state = "ratvargrilleglow"
|
||||
layer = LOW_ITEM_LAYER //above grilles
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/grille/broken
|
||||
icon_state = "ratvarbrokengrilleglow"
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/window/single
|
||||
icon_state = "ratvarwindowglow_s"
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/spearbreak
|
||||
icon = 'icons/effects/64x64.dmi'
|
||||
icon_state = "ratvarspearbreak"
|
||||
layer = BELOW_MOB_LAYER
|
||||
pixel_y = -16
|
||||
pixel_x = -16
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/sigil
|
||||
name = "glowing circle"
|
||||
icon = 'icons/effects/clockwork_effects.dmi'
|
||||
icon_state = "sigildull"
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/sigil/transgression
|
||||
color = "#FAE48C"
|
||||
layer = ABOVE_MOB_LAYER
|
||||
duration = 50
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/sigil/transgression/New()
|
||||
..()
|
||||
var/oldtransform = transform
|
||||
animate(src, transform = matrix()*2, time = 5)
|
||||
animate(transform = oldtransform, alpha = 0, time = 45)
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/sigil/vitality
|
||||
color = "#1E8CE1"
|
||||
icon_state = "sigilactivepulse"
|
||||
layer = BELOW_MOB_LAYER
|
||||
|
||||
/obj/effect/overlay/temp/ratvar/sigil/accession
|
||||
color = "#AF0AAF"
|
||||
layer = ABOVE_MOB_LAYER
|
||||
duration = 50
|
||||
icon_state = "sigilactiveoverlay"
|
||||
alpha = 0
|
||||
|
||||
|
||||
/obj/effect/overlay/temp/revenant
|
||||
name = "spooky lights"
|
||||
icon_state = "purplesparkles"
|
||||
|
||||
/obj/effect/overlay/temp/revenant/cracks
|
||||
name = "glowing cracks"
|
||||
icon_state = "purplecrack"
|
||||
duration = 6
|
||||
|
||||
|
||||
/obj/effect/overlay/temp/emp
|
||||
name = "emp sparks"
|
||||
icon_state = "empdisable"
|
||||
|
||||
/obj/effect/overlay/temp/emp/pulse
|
||||
name = "emp pulse"
|
||||
icon_state = "emp pulse"
|
||||
duration = 8
|
||||
randomdir = 0
|
||||
|
||||
/obj/effect/overlay/temp/gib_animation
|
||||
icon = 'icons/mob/mob.dmi'
|
||||
duration = 15
|
||||
|
||||
/obj/effect/overlay/temp/gib_animation/New(loc, gib_icon)
|
||||
icon_state = gib_icon // Needs to be before ..() so icon is correct
|
||||
..()
|
||||
|
||||
/obj/effect/overlay/temp/gib_animation/ex_act(severity)
|
||||
return //so the overlay isn't deleted by the explosion that gibbed the mob.
|
||||
|
||||
/obj/effect/overlay/temp/gib_animation/animal
|
||||
icon = 'icons/mob/animal.dmi'
|
||||
|
||||
/obj/effect/overlay/temp/dust_animation
|
||||
icon = 'icons/mob/mob.dmi'
|
||||
duration = 15
|
||||
|
||||
/obj/effect/overlay/temp/dust_animation/New(loc, dust_icon)
|
||||
icon_state = dust_icon // Before ..() so the correct icon is flick()'d
|
||||
..()
|
||||
|
||||
/obj/effect/overlay/temp/sparkle
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "shieldsparkles"
|
||||
mouse_opacity = 0
|
||||
density = 0
|
||||
duration = 10
|
||||
var/atom/movable/attached_to
|
||||
|
||||
/obj/effect/overlay/temp/sparkle/New(atom/movable/AM)
|
||||
..()
|
||||
if(istype(AM))
|
||||
attached_to = AM
|
||||
attached_to.overlays += src
|
||||
|
||||
/obj/effect/overlay/temp/sparkle/Destroy()
|
||||
if(attached_to)
|
||||
attached_to.overlays -= src
|
||||
attached_to = null
|
||||
. = ..()
|
||||
|
||||
/obj/effect/overlay/temp/sparkle/tailsweep
|
||||
icon_state = "tailsweep"
|
||||
|
||||
/obj/effect/overlay/palmtree_r
|
||||
name = "Palm tree"
|
||||
icon = 'icons/misc/beach2.dmi'
|
||||
icon_state = "palm1"
|
||||
density = 1
|
||||
layer = WALL_OBJ_LAYER
|
||||
anchored = 1
|
||||
|
||||
/obj/effect/overlay/palmtree_l
|
||||
name = "Palm tree"
|
||||
icon = 'icons/misc/beach2.dmi'
|
||||
icon_state = "palm2"
|
||||
density = 1
|
||||
layer = WALL_OBJ_LAYER
|
||||
anchored = 1
|
||||
|
||||
/obj/effect/overlay/coconut
|
||||
name = "Coconuts"
|
||||
icon = 'icons/misc/beach.dmi'
|
||||
icon_state = "coconuts"
|
||||
@@ -0,0 +1,68 @@
|
||||
|
||||
/obj/effect
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
|
||||
/obj/effect/portal
|
||||
name = "portal"
|
||||
desc = "Looks unstable. Best to test it with the clown."
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "portal"
|
||||
density = 1
|
||||
unacidable = 1//Can't destroy energy portals.
|
||||
var/obj/item/target = null
|
||||
var/creator = null
|
||||
anchored = 1
|
||||
var/precision = 1 // how close to the portal you will teleport. 0 = on the portal, 1 = adjacent
|
||||
|
||||
/obj/effect/portal/Bumped(mob/M as mob|obj)
|
||||
teleport(M)
|
||||
|
||||
/obj/effect/portal/attack_hand(mob/user)
|
||||
if(Adjacent(user))
|
||||
teleport(user)
|
||||
|
||||
/obj/effect/portal/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(user && Adjacent(user))
|
||||
teleport(user)
|
||||
|
||||
|
||||
|
||||
/obj/effect/portal/New(loc, turf/target, creator=null, lifespan=300)
|
||||
..()
|
||||
portals += src
|
||||
src.target = target
|
||||
src.creator = creator
|
||||
|
||||
var/area/A = get_area(target)
|
||||
if(A && A.noteleport) // No point in persisting if the target is unreachable.
|
||||
qdel(src)
|
||||
return
|
||||
if(lifespan > 0)
|
||||
spawn(lifespan)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/portal/Destroy()
|
||||
portals -= src
|
||||
if(istype(creator, /obj/item/weapon/hand_tele))
|
||||
var/obj/item/weapon/hand_tele/O = creator
|
||||
O.active_portals--
|
||||
else if(istype(creator, /obj/item/weapon/gun/energy/wormhole_projector))
|
||||
var/obj/item/weapon/gun/energy/wormhole_projector/P = creator
|
||||
P.portal_destroyed(src)
|
||||
creator = null
|
||||
return ..()
|
||||
|
||||
/obj/effect/portal/proc/teleport(atom/movable/M as mob|obj)
|
||||
if(istype(M, /obj/effect)) //sparks don't teleport
|
||||
return
|
||||
if(M.anchored&&istype(M, /obj/mecha))
|
||||
return
|
||||
if (!( target ))
|
||||
qdel(src)
|
||||
return
|
||||
if (istype(M, /atom/movable))
|
||||
if(istype(M, /mob/living/simple_animal/hostile/megafauna))
|
||||
message_admins("[M] (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[M]'>FLW</A>) has teleported through [src].")
|
||||
do_teleport(M, target, precision) ///You will appear adjacent to the beacon
|
||||
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
/obj/effect/spawner/newbomb
|
||||
name = "bomb"
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
icon_state = "x"
|
||||
var/btype = 0 // 0=radio, 1=prox, 2=time
|
||||
var/btemp1 = 1500
|
||||
var/btemp2 = 1000 // tank temperatures
|
||||
|
||||
/obj/effect/spawner/newbomb/timer
|
||||
btype = 2
|
||||
|
||||
syndicate
|
||||
btemp1 = 150
|
||||
btemp2 = 20
|
||||
|
||||
/obj/effect/spawner/newbomb/proximity
|
||||
btype = 1
|
||||
|
||||
/obj/effect/spawner/newbomb/radio
|
||||
btype = 0
|
||||
|
||||
|
||||
/obj/effect/spawner/newbomb/New()
|
||||
..()
|
||||
|
||||
switch (src.btype)
|
||||
// radio
|
||||
if (0)
|
||||
|
||||
var/obj/item/device/transfer_valve/V = new(src.loc)
|
||||
var/obj/item/weapon/tank/internals/plasma/PT = new(V)
|
||||
var/obj/item/weapon/tank/internals/oxygen/OT = new(V)
|
||||
|
||||
var/obj/item/device/assembly/signaler/S = new(V)
|
||||
|
||||
V.tank_one = PT
|
||||
V.tank_two = OT
|
||||
V.attached_device = S
|
||||
|
||||
S.holder = V
|
||||
S.toggle_secure()
|
||||
PT.master = V
|
||||
OT.master = V
|
||||
|
||||
PT.air_contents.temperature = btemp1 + T0C
|
||||
OT.air_contents.temperature = btemp2 + T0C
|
||||
|
||||
V.update_icon()
|
||||
|
||||
// proximity
|
||||
if (1)
|
||||
|
||||
var/obj/item/device/transfer_valve/V = new(src.loc)
|
||||
var/obj/item/weapon/tank/internals/plasma/PT = new(V)
|
||||
var/obj/item/weapon/tank/internals/oxygen/OT = new(V)
|
||||
|
||||
var/obj/item/device/assembly/prox_sensor/P = new(V)
|
||||
|
||||
V.tank_one = PT
|
||||
V.tank_two = OT
|
||||
V.attached_device = P
|
||||
|
||||
P.holder = V
|
||||
P.toggle_secure()
|
||||
PT.master = V
|
||||
OT.master = V
|
||||
|
||||
|
||||
PT.air_contents.temperature = btemp1 + T0C
|
||||
OT.air_contents.temperature = btemp2 + T0C
|
||||
|
||||
V.update_icon()
|
||||
|
||||
|
||||
// timer
|
||||
if (2)
|
||||
var/obj/item/device/transfer_valve/V = new(src.loc)
|
||||
var/obj/item/weapon/tank/internals/plasma/PT = new(V)
|
||||
var/obj/item/weapon/tank/internals/oxygen/OT = new(V)
|
||||
|
||||
var/obj/item/device/assembly/timer/T = new(V)
|
||||
|
||||
V.tank_one = PT
|
||||
V.tank_two = OT
|
||||
V.attached_device = T
|
||||
|
||||
T.holder = V
|
||||
T.toggle_secure()
|
||||
PT.master = V
|
||||
OT.master = V
|
||||
T.time = 30
|
||||
|
||||
PT.air_contents.temperature = btemp1 + T0C
|
||||
OT.air_contents.temperature = btemp2 + T0C
|
||||
|
||||
V.update_icon()
|
||||
qdel(src)
|
||||
@@ -0,0 +1,40 @@
|
||||
/obj/effect/gibspawner
|
||||
|
||||
/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/New()
|
||||
playsound(src, 'sound/effects/blobattack.ogg', 40, 1)
|
||||
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/up,/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/body,/obj/effect/decal/cleanable/blood/gibs/limb,/obj/effect/decal/cleanable/blood/gibs/core)
|
||||
gibamounts = list(1,1,1,1,1,1,1)
|
||||
|
||||
/obj/effect/gibspawner/human/New()
|
||||
playsound(src, 'sound/effects/blobattack.ogg', 50, 1)
|
||||
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/xeno
|
||||
gibtypes = list(/obj/effect/decal/cleanable/xenoblood/xgibs/up,/obj/effect/decal/cleanable/xenoblood/xgibs/down,/obj/effect/decal/cleanable/xenoblood/xgibs,/obj/effect/decal/cleanable/xenoblood/xgibs,/obj/effect/decal/cleanable/xenoblood/xgibs/body,/obj/effect/decal/cleanable/xenoblood/xgibs/limb,/obj/effect/decal/cleanable/xenoblood/xgibs/core)
|
||||
gibamounts = list(1,1,1,1,1,1,1)
|
||||
|
||||
/obj/effect/gibspawner/xeno/New()
|
||||
playsound(src, 'sound/effects/blobattack.ogg', 60, 1)
|
||||
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/robot_debris/up,/obj/effect/decal/cleanable/robot_debris/down,/obj/effect/decal/cleanable/robot_debris,/obj/effect/decal/cleanable/robot_debris,/obj/effect/decal/cleanable/robot_debris,/obj/effect/decal/cleanable/robot_debris/limb)
|
||||
gibamounts = list(1,1,1,1,1,1)
|
||||
|
||||
/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)
|
||||
..()
|
||||
@@ -0,0 +1,170 @@
|
||||
/obj/effect/spawner/lootdrop
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
icon_state = "x2"
|
||||
color = "#00FF00"
|
||||
var/lootcount = 1 //how many items will be spawned
|
||||
var/lootdoubles = 1 //if the same item can be spawned twice
|
||||
var/list/loot //a list of possible items to spawn e.g. list(/obj/item, /obj/structure, /obj/effect)
|
||||
|
||||
/obj/effect/spawner/lootdrop/New()
|
||||
if(loot && loot.len)
|
||||
for(var/i = lootcount, i > 0, i--)
|
||||
if(!loot.len) break
|
||||
var/lootspawn = pickweight(loot)
|
||||
if(!lootdoubles)
|
||||
loot.Remove(lootspawn)
|
||||
|
||||
if(lootspawn)
|
||||
new lootspawn(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/spawner/lootdrop/armory_contraband
|
||||
name = "armory contraband gun spawner"
|
||||
lootdoubles = 0
|
||||
|
||||
loot = list(
|
||||
/obj/item/weapon/gun/projectile/automatic/pistol = 8,
|
||||
/obj/item/weapon/gun/projectile/shotgun/automatic/combat = 5,
|
||||
/obj/item/weapon/gun/projectile/revolver/mateba,
|
||||
/obj/item/weapon/gun/projectile/automatic/pistol/deagle
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/gambling
|
||||
name = "gambling valuables spawner"
|
||||
loot = list(
|
||||
/obj/item/weapon/gun/projectile/revolver/russian = 5,
|
||||
/obj/item/weapon/storage/box/syndie_kit/throwing_weapons = 1,
|
||||
/obj/item/toy/cards/deck/syndicate = 2
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/grille_or_trash
|
||||
name = "maint grille or trash spawner"
|
||||
loot = list(/obj/structure/grille = 5,
|
||||
/obj/item/weapon/cigbutt = 1,
|
||||
/obj/item/trash/cheesie = 1,
|
||||
/obj/item/trash/candy = 1,
|
||||
/obj/item/trash/chips = 1,
|
||||
/obj/item/trash/deadmouse = 1,
|
||||
/obj/item/trash/pistachios = 1,
|
||||
/obj/item/trash/plate = 1,
|
||||
/obj/item/trash/popcorn = 1,
|
||||
/obj/item/trash/raisins = 1,
|
||||
/obj/item/trash/sosjerky = 1,
|
||||
/obj/item/trash/syndi_cakes = 1)
|
||||
|
||||
/obj/effect/spawner/lootdrop/maintenance
|
||||
name = "maintenance loot spawner"
|
||||
|
||||
//How to balance this table
|
||||
//-------------------------
|
||||
//The total added weight of all the entries should be (roughly) equal to the total number of lootdrops
|
||||
//(take in account those that spawn more than one object!)
|
||||
//
|
||||
//While this is random, probabilities tells us that item distribution will have a tendency to look like
|
||||
//the content of the weighted table that created them.
|
||||
//The less lootdrops, the less even the distribution.
|
||||
//
|
||||
//If you want to give items a weight <1 you can multiply all the weights by 10
|
||||
//
|
||||
//the "" entry will spawn nothing, if you increase this value,
|
||||
//ensure that you balance it with more spawn points
|
||||
|
||||
//table data:
|
||||
//-----------
|
||||
//aft maintenance: 24 items, 18 spots 2 extra (28/08/2014)
|
||||
//asmaint: 16 items, 11 spots 0 extra (08/08/2014)
|
||||
//asmaint2: 36 items, 26 spots 2 extra (28/08/2014)
|
||||
//fpmaint: 5 items, 4 spots 0 extra (08/08/2014)
|
||||
//fpmaint2: 12 items, 11 spots 2 extra (28/08/2014)
|
||||
//fsmaint: 0 items, 0 spots 0 extra (08/08/2014)
|
||||
//fsmaint2: 40 items, 27 spots 5 extra (28/08/2014)
|
||||
//maintcentral: 2 items, 2 spots 0 extra (08/08/2014)
|
||||
//port: 5 items, 5 spots 0 extra (08/08/2014)
|
||||
loot = list(
|
||||
/obj/item/bodybag = 1,
|
||||
/obj/item/clothing/glasses/meson = 2,
|
||||
/obj/item/clothing/glasses/sunglasses = 1,
|
||||
/obj/item/clothing/gloves/color/fyellow = 1,
|
||||
/obj/item/clothing/head/hardhat = 1,
|
||||
/obj/item/clothing/head/hardhat/red = 1,
|
||||
/obj/item/clothing/head/that{throwforce = 1; throwing = 1} = 1,
|
||||
/obj/item/clothing/head/ushanka = 1,
|
||||
/obj/item/clothing/head/welding = 1,
|
||||
/obj/item/clothing/mask/gas = 15,
|
||||
/obj/item/clothing/suit/hazardvest = 1,
|
||||
/obj/item/clothing/under/rank/vice = 1,
|
||||
/obj/item/device/assembly/prox_sensor = 4,
|
||||
/obj/item/device/assembly/timer = 3,
|
||||
/obj/item/device/flashlight = 4,
|
||||
/obj/item/device/flashlight/pen = 1,
|
||||
/obj/item/device/multitool = 2,
|
||||
/obj/item/device/radio/off = 2,
|
||||
/obj/item/device/t_scanner = 5,
|
||||
/obj/item/weapon/airlock_painter = 1,
|
||||
/obj/item/stack/cable_coil = 4,
|
||||
/obj/item/stack/cable_coil{amount = 5} = 6,
|
||||
/obj/item/stack/medical/bruise_pack = 1,
|
||||
/obj/item/stack/rods{amount = 10} = 9,
|
||||
/obj/item/stack/rods{amount = 23} = 1,
|
||||
/obj/item/stack/rods{amount = 50} = 1,
|
||||
/obj/item/stack/sheet/cardboard = 2,
|
||||
/obj/item/stack/sheet/metal{amount = 20} = 1,
|
||||
/obj/item/stack/sheet/mineral/plasma = 1,
|
||||
/obj/item/stack/sheet/rglass = 1,
|
||||
/obj/item/weapon/book/manual/wiki/engineering_construction = 1,
|
||||
/obj/item/weapon/book/manual/wiki/engineering_hacking = 1,
|
||||
/obj/item/clothing/head/cone = 1,
|
||||
/obj/item/weapon/coin/silver = 1,
|
||||
/obj/item/weapon/coin/twoheaded = 1,
|
||||
/obj/item/weapon/poster/contraband = 1,
|
||||
/obj/item/weapon/poster/legit = 1,
|
||||
/obj/item/weapon/crowbar = 1,
|
||||
/obj/item/weapon/crowbar/red = 1,
|
||||
/obj/item/weapon/extinguisher = 11,
|
||||
//obj/item/weapon/gun/projectile/revolver/russian = 1, //disabled until lootdrop is a proper world proc.
|
||||
/obj/item/weapon/hand_labeler = 1,
|
||||
/obj/item/weapon/paper/crumpled = 1,
|
||||
/obj/item/weapon/pen = 1,
|
||||
/obj/item/weapon/reagent_containers/spray/pestspray = 1,
|
||||
/obj/item/weapon/reagent_containers/glass/rag = 3,
|
||||
/obj/item/weapon/stock_parts/cell = 3,
|
||||
/obj/item/weapon/storage/belt/utility = 2,
|
||||
/obj/item/weapon/storage/box = 2,
|
||||
/obj/item/weapon/storage/box/cups = 1,
|
||||
/obj/item/weapon/storage/box/donkpockets = 1,
|
||||
/obj/item/weapon/storage/box/lights/mixed = 3,
|
||||
/obj/item/weapon/storage/box/hug/medical = 1,
|
||||
/obj/item/weapon/storage/fancy/cigarettes/dromedaryco = 1,
|
||||
/obj/item/weapon/storage/toolbox/mechanical = 1,
|
||||
/obj/item/weapon/screwdriver = 3,
|
||||
/obj/item/weapon/tank/internals/emergency_oxygen = 2,
|
||||
/obj/item/weapon/vending_refill/cola = 1,
|
||||
/obj/item/weapon/weldingtool = 3,
|
||||
/obj/item/weapon/wirecutters = 1,
|
||||
/obj/item/weapon/wrench = 4,
|
||||
/obj/item/weapon/relic = 3,
|
||||
/obj/item/weaponcrafting/reciever = 1,
|
||||
/obj/item/clothing/head/cone = 2,
|
||||
/obj/item/weapon/grenade/smokebomb = 2,
|
||||
/obj/item/device/geiger_counter = 3,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/citrus/orange = 1,
|
||||
/obj/item/device/radio/headset = 1,
|
||||
/obj/item/device/assembly/infra = 1,
|
||||
/obj/item/device/assembly/igniter = 2,
|
||||
/obj/item/device/assembly/signaler = 2,
|
||||
/obj/item/device/assembly/mousetrap = 2,
|
||||
/obj/item/weapon/reagent_containers/syringe = 2,
|
||||
/obj/item/clothing/gloves/color/random = 8,
|
||||
/obj/item/clothing/shoes/laceup = 1,
|
||||
/obj/item/weapon/storage/secure/briefcase = 3,
|
||||
"" = 4
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/crate_spawner
|
||||
name = "lootcrate spawner"
|
||||
lootdoubles = 0
|
||||
|
||||
loot = list(
|
||||
/obj/structure/closet/crate/secure/loot = 20,
|
||||
"" = 80
|
||||
)
|
||||
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
Because mapping is already tedious enough this spawner let you spawn generic
|
||||
"sets" of objects rather than having to make the same object stack again and
|
||||
again.
|
||||
*/
|
||||
|
||||
/obj/effect/spawner/structure
|
||||
name = "map structure spawner"
|
||||
var/list/spawn_list
|
||||
|
||||
/obj/effect/spawner/structure/New()
|
||||
if(spawn_list && spawn_list.len)
|
||||
for(var/i = 1, i <= spawn_list.len, i++)
|
||||
var/to_spawn = spawn_list[i]
|
||||
new to_spawn(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/spawner/structure/window
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
icon_state = "window_spawner"
|
||||
name = "window spawner"
|
||||
spawn_list = list(
|
||||
/obj/structure/grille,
|
||||
/obj/structure/window/fulltile
|
||||
)
|
||||
|
||||
/obj/effect/spawner/structure/window/reinforced
|
||||
name = "reinforced window spawner"
|
||||
icon_state = "rwindow_spawner"
|
||||
spawn_list = list(
|
||||
/obj/structure/grille,
|
||||
/obj/structure/window/reinforced/fulltile
|
||||
)
|
||||
@@ -0,0 +1,28 @@
|
||||
/obj/effect/vaultspawner
|
||||
var/maxX = 6
|
||||
var/maxY = 6
|
||||
var/minX = 2
|
||||
var/minY = 2
|
||||
|
||||
/obj/effect/vaultspawner/New(turf/location,lX = minX,uX = maxX,lY = minY,uY = maxY,type = null)
|
||||
if(!type)
|
||||
type = pick("sandstone","rock","alien")
|
||||
|
||||
var/lowBoundX = location.x
|
||||
var/lowBoundY = location.y
|
||||
|
||||
var/hiBoundX = location.x + rand(lX,uX)
|
||||
var/hiBoundY = location.y + rand(lY,uY)
|
||||
|
||||
var/z = location.z
|
||||
|
||||
for(var/i = lowBoundX,i<=hiBoundX,i++)
|
||||
for(var/j = lowBoundY,j<=hiBoundY,j++)
|
||||
var/turf/T = locate(i,j,z)
|
||||
if(i == lowBoundX || i == hiBoundX || j == lowBoundY || j == hiBoundY)
|
||||
T.ChangeTurf(/turf/closed/wall/vault)
|
||||
else
|
||||
T.ChangeTurf(/turf/open/floor/vault)
|
||||
T.icon_state = "[type]vault"
|
||||
|
||||
qdel(src)
|
||||
@@ -0,0 +1,223 @@
|
||||
//generic procs copied from obj/effect/alien
|
||||
/obj/effect/spider
|
||||
name = "web"
|
||||
desc = "it's stringy and sticky"
|
||||
anchored = 1
|
||||
density = 0
|
||||
var/health = 15
|
||||
|
||||
//similar to weeds, but only barfed out by nurses manually
|
||||
/obj/effect/spider/ex_act(severity, target)
|
||||
switch(severity)
|
||||
if(1)
|
||||
qdel(src)
|
||||
if(2)
|
||||
if (prob(50))
|
||||
qdel(src)
|
||||
if(3)
|
||||
if (prob(5))
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/spider/attacked_by(obj/item/I, mob/user)
|
||||
..()
|
||||
var/damage = I.force
|
||||
take_damage(damage, I.damtype, 1)
|
||||
|
||||
/obj/effect/spider/bullet_act(obj/item/projectile/P)
|
||||
. = ..()
|
||||
take_damage(P.damage, P.damage_type, 0)
|
||||
|
||||
/obj/effect/spider/proc/take_damage(damage, damage_type = BRUTE, sound_effect = 1)
|
||||
switch(damage_type)
|
||||
if(BURN)
|
||||
damage *= 2
|
||||
if(sound_effect)
|
||||
playsound(loc, 'sound/items/Welder.ogg', 100, 1)
|
||||
if(BRUTE)//the stickiness of the web mutes all attack sounds except fire damage type
|
||||
damage *= 0.25
|
||||
else
|
||||
return
|
||||
health -= damage
|
||||
if(health <= 0)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/spider/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > 300)
|
||||
take_damage(5, BURN, 0)
|
||||
|
||||
/obj/effect/spider/stickyweb
|
||||
icon_state = "stickyweb1"
|
||||
|
||||
/obj/effect/spider/stickyweb/New()
|
||||
if(prob(50))
|
||||
icon_state = "stickyweb2"
|
||||
|
||||
/obj/effect/spider/stickyweb/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
if(height==0) return 1
|
||||
if(istype(mover, /mob/living/simple_animal/hostile/poison/giant_spider))
|
||||
return 1
|
||||
else if(istype(mover, /mob/living))
|
||||
if(prob(50))
|
||||
mover << "<span class='danger'>You get stuck in \the [src] for a moment.</span>"
|
||||
return 0
|
||||
else if(istype(mover, /obj/item/projectile))
|
||||
return prob(30)
|
||||
return 1
|
||||
|
||||
/obj/effect/spider/eggcluster
|
||||
name = "egg cluster"
|
||||
desc = "They seem to pulse slightly with an inner life"
|
||||
icon_state = "eggs"
|
||||
var/amount_grown = 0
|
||||
var/player_spiders = 0
|
||||
var/poison_type = "toxin"
|
||||
var/poison_per_bite = 5
|
||||
var/list/faction = list("spiders")
|
||||
|
||||
/obj/effect/spider/eggcluster/New()
|
||||
pixel_x = rand(3,-3)
|
||||
pixel_y = rand(3,-3)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/effect/spider/eggcluster/process()
|
||||
amount_grown += rand(0,2)
|
||||
if(amount_grown >= 100)
|
||||
var/num = rand(3,12)
|
||||
for(var/i=0, i<num, i++)
|
||||
var/obj/effect/spider/spiderling/S = new /obj/effect/spider/spiderling(src.loc)
|
||||
S.poison_type = poison_type
|
||||
S.poison_per_bite = poison_per_bite
|
||||
S.faction = faction.Copy()
|
||||
if(player_spiders)
|
||||
S.player_spiders = 1
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/spider/spiderling
|
||||
name = "spiderling"
|
||||
desc = "It never stays still for long."
|
||||
icon_state = "spiderling"
|
||||
anchored = 0
|
||||
layer = PROJECTILE_HIT_THRESHHOLD_LAYER
|
||||
health = 3
|
||||
var/amount_grown = 0
|
||||
var/grow_as = null
|
||||
var/obj/machinery/atmospherics/components/unary/vent_pump/entry_vent
|
||||
var/travelling_in_vent = 0
|
||||
var/player_spiders = 0
|
||||
var/poison_type = "toxin"
|
||||
var/poison_per_bite = 5
|
||||
var/list/faction = list("spiders")
|
||||
|
||||
/obj/effect/spider/spiderling/New()
|
||||
pixel_x = rand(6,-6)
|
||||
pixel_y = rand(6,-6)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/effect/spider/spiderling/Bump(atom/user)
|
||||
if(istype(user, /obj/structure/table))
|
||||
src.loc = user.loc
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/effect/spider/spiderling/process()
|
||||
if(travelling_in_vent)
|
||||
if(istype(src.loc, /turf))
|
||||
travelling_in_vent = 0
|
||||
entry_vent = null
|
||||
else if(entry_vent)
|
||||
if(get_dist(src, entry_vent) <= 1)
|
||||
var/list/vents = list()
|
||||
var/datum/pipeline/entry_vent_parent = entry_vent.PARENT1
|
||||
for(var/obj/machinery/atmospherics/components/unary/vent_pump/temp_vent in entry_vent_parent.other_atmosmch)
|
||||
vents.Add(temp_vent)
|
||||
if(!vents.len)
|
||||
entry_vent = null
|
||||
return
|
||||
var/obj/machinery/atmospherics/components/unary/vent_pump/exit_vent = pick(vents)
|
||||
if(prob(50))
|
||||
visible_message("<B>[src] scrambles into the ventillation ducts!</B>", \
|
||||
"<span class='italics'>You hear something scampering through the ventilation ducts.</span>")
|
||||
|
||||
spawn(rand(20,60))
|
||||
loc = exit_vent
|
||||
var/travel_time = round(get_dist(loc, exit_vent.loc) / 2)
|
||||
spawn(travel_time)
|
||||
|
||||
if(!exit_vent || exit_vent.welded)
|
||||
loc = entry_vent
|
||||
entry_vent = null
|
||||
return
|
||||
|
||||
if(prob(50))
|
||||
audible_message("<span class='italics'>You hear something scampering through the ventilation ducts.</span>")
|
||||
sleep(travel_time)
|
||||
|
||||
if(!exit_vent || exit_vent.welded)
|
||||
loc = entry_vent
|
||||
entry_vent = null
|
||||
return
|
||||
loc = exit_vent.loc
|
||||
entry_vent = null
|
||||
var/area/new_area = get_area(loc)
|
||||
if(new_area)
|
||||
new_area.Entered(src)
|
||||
//=================
|
||||
|
||||
else if(prob(33))
|
||||
var/list/nearby = oview(10, src)
|
||||
if(nearby.len)
|
||||
var/target_atom = pick(nearby)
|
||||
walk_to(src, target_atom)
|
||||
if(prob(40))
|
||||
src.visible_message("<span class='notice'>\The [src] skitters[pick(" away"," around","")].</span>")
|
||||
else if(prob(10))
|
||||
//ventcrawl!
|
||||
for(var/obj/machinery/atmospherics/components/unary/vent_pump/v in view(7,src))
|
||||
if(!v.welded)
|
||||
entry_vent = v
|
||||
walk_to(src, entry_vent, 1)
|
||||
break
|
||||
if(isturf(loc))
|
||||
amount_grown += rand(0,2)
|
||||
if(amount_grown >= 100)
|
||||
if(!grow_as)
|
||||
grow_as = pick(typesof(/mob/living/simple_animal/hostile/poison/giant_spider))
|
||||
var/mob/living/simple_animal/hostile/poison/giant_spider/S = new grow_as(src.loc)
|
||||
S.poison_per_bite = poison_per_bite
|
||||
S.poison_type = poison_type
|
||||
S.faction = faction.Copy()
|
||||
if(player_spiders)
|
||||
S.playable_spider = TRUE
|
||||
notify_ghosts("Spider [S.name] can be controlled", null, enter_link="<a href=?src=\ref[S];activate=1>(Click to play)</a>", source=S, action=NOTIFY_ATTACK)
|
||||
qdel(src)
|
||||
|
||||
|
||||
|
||||
/obj/effect/spider/cocoon
|
||||
name = "cocoon"
|
||||
desc = "Something wrapped in silky spider web"
|
||||
icon_state = "cocoon1"
|
||||
health = 60
|
||||
|
||||
/obj/effect/spider/cocoon/New()
|
||||
icon_state = pick("cocoon1","cocoon2","cocoon3")
|
||||
|
||||
/obj/effect/spider/cocoon/container_resist()
|
||||
var/mob/living/user = usr
|
||||
var/breakout_time = 2
|
||||
user.changeNext_move(CLICK_CD_BREAKOUT)
|
||||
user.last_special = world.time + CLICK_CD_BREAKOUT
|
||||
user << "<span class='notice'>You struggle against the tight bonds... (This will take about [breakout_time] minutes.)</span>"
|
||||
visible_message("You see something struggling and writhing in \the [src]!")
|
||||
if(do_after(user,(breakout_time*60*10), target = src))
|
||||
if(!user || user.stat != CONSCIOUS || user.loc != src)
|
||||
return
|
||||
qdel(src)
|
||||
|
||||
|
||||
|
||||
/obj/effect/spider/cocoon/Destroy()
|
||||
src.visible_message("<span class='warning'>\The [src] splits open.</span>")
|
||||
for(var/atom/movable/A in contents)
|
||||
A.loc = src.loc
|
||||
return ..()
|
||||
@@ -0,0 +1,192 @@
|
||||
/* Simple object type, calls a proc when "stepped" on by something */
|
||||
|
||||
/obj/effect/step_trigger
|
||||
var/affect_ghosts = 0
|
||||
var/stopper = 1 // stops throwers
|
||||
var/mobs_only = 0
|
||||
invisibility = INVISIBILITY_ABSTRACT // nope cant see this shit
|
||||
anchored = 1
|
||||
|
||||
/obj/effect/step_trigger/proc/Trigger(atom/movable/A)
|
||||
return 0
|
||||
|
||||
/obj/effect/step_trigger/Crossed(H as mob|obj)
|
||||
..()
|
||||
if(!H)
|
||||
return
|
||||
if(istype(H, /mob/dead/observer) && !affect_ghosts)
|
||||
return
|
||||
if(!istype(H, /mob) && mobs_only)
|
||||
return
|
||||
Trigger(H)
|
||||
|
||||
/* Sends a message to mob when triggered*/
|
||||
|
||||
/obj/effect/step_trigger/message
|
||||
var/message //the message to give to the mob
|
||||
var/once = 1
|
||||
|
||||
/obj/effect/step_trigger/message/Trigger(mob/M)
|
||||
if(M.client)
|
||||
M << "<span class='info'>[message]</span>"
|
||||
if(once)
|
||||
qdel(src)
|
||||
|
||||
/* Tosses things in a certain direction */
|
||||
|
||||
/obj/effect/step_trigger/thrower
|
||||
var/direction = SOUTH // the direction of throw
|
||||
var/tiles = 3 // if 0: forever until atom hits a stopper
|
||||
var/immobilize = 1 // if nonzero: prevents mobs from moving while they're being flung
|
||||
var/speed = 1 // delay of movement
|
||||
var/facedir = 0 // if 1: atom faces the direction of movement
|
||||
var/nostop = 0 // if 1: will only be stopped by teleporters
|
||||
var/list/affecting = list()
|
||||
|
||||
/obj/effect/step_trigger/thrower/Trigger(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
|
||||
|
||||
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)
|
||||
break
|
||||
|
||||
curtiles++
|
||||
|
||||
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
|
||||
|
||||
if(AM)
|
||||
var/predir = AM.dir
|
||||
step(AM, direction)
|
||||
if(!facedir)
|
||||
AM.setDir(predir)
|
||||
|
||||
|
||||
|
||||
affecting.Remove(AM)
|
||||
|
||||
if(ismob(AM))
|
||||
var/mob/M = AM
|
||||
if(immobilize)
|
||||
M.canmove = 1
|
||||
|
||||
/* Stops things thrown by a thrower, doesn't do anything */
|
||||
|
||||
/obj/effect/step_trigger/stopper
|
||||
|
||||
/* Instant teleporter */
|
||||
|
||||
/obj/effect/step_trigger/teleporter
|
||||
var/teleport_x = 0 // teleportation coordinates (if one is null, then no teleport!)
|
||||
var/teleport_y = 0
|
||||
var/teleport_z = 0
|
||||
|
||||
/obj/effect/step_trigger/teleporter/Trigger(atom/movable/A)
|
||||
if(teleport_x && teleport_y && teleport_z)
|
||||
|
||||
A.x = teleport_x
|
||||
A.y = teleport_y
|
||||
A.z = teleport_z
|
||||
|
||||
/* Random teleporter, teleports atoms to locations ranging from teleport_x - teleport_x_offset, etc */
|
||||
|
||||
/obj/effect/step_trigger/teleporter/random
|
||||
var/teleport_x_offset = 0
|
||||
var/teleport_y_offset = 0
|
||||
var/teleport_z_offset = 0
|
||||
|
||||
/obj/effect/step_trigger/teleporter/random/Trigger(atom/movable/A)
|
||||
if(teleport_x && teleport_y && teleport_z)
|
||||
if(teleport_x_offset && teleport_y_offset && teleport_z_offset)
|
||||
|
||||
A.x = rand(teleport_x, teleport_x_offset)
|
||||
A.y = rand(teleport_y, teleport_y_offset)
|
||||
A.z = rand(teleport_z, teleport_z_offset)
|
||||
|
||||
/* Fancy teleporter, creates sparks and smokes when used */
|
||||
|
||||
/obj/effect/step_trigger/teleport_fancy
|
||||
var/locationx
|
||||
var/locationy
|
||||
var/uses = 1 //0 for infinite uses
|
||||
var/entersparks = 0
|
||||
var/exitsparks = 0
|
||||
var/entersmoke = 0
|
||||
var/exitsmoke = 0
|
||||
|
||||
/obj/effect/step_trigger/teleport_fancy/Trigger(mob/M)
|
||||
var/dest = locate(locationx, locationy, z)
|
||||
M.Move(dest)
|
||||
|
||||
if(entersparks)
|
||||
var/datum/effect_system/spark_spread/s = new
|
||||
s.set_up(4, 1, src)
|
||||
s.start()
|
||||
if(exitsparks)
|
||||
var/datum/effect_system/spark_spread/s = new
|
||||
s.set_up(4, 1, dest)
|
||||
s.start()
|
||||
|
||||
if(entersmoke)
|
||||
var/datum/effect_system/smoke_spread/s = new
|
||||
s.set_up(4, 1, src, 0)
|
||||
s.start()
|
||||
if(exitsmoke)
|
||||
var/datum/effect_system/smoke_spread/s = new
|
||||
s.set_up(4, 1, dest, 0)
|
||||
s.start()
|
||||
|
||||
uses--
|
||||
if(uses == 0)
|
||||
qdel(src)
|
||||
|
||||
/* Simple sound player, Mapper friendly! */
|
||||
|
||||
/obj/effect/step_trigger/sound_effect
|
||||
var/sound //eg. path to the sound, inside '' eg: 'growl.ogg'
|
||||
var/volume = 100
|
||||
var/freq_vary = 1 //Should the frequency of the sound vary?
|
||||
var/extra_range = 0 // eg World.view = 7, extra_range = 1, 7+1 = 8, 8 turfs radius
|
||||
var/happens_once = 0
|
||||
var/triggerer_only = 0 //Whether the triggerer is the only person who hears this
|
||||
|
||||
|
||||
/obj/effect/step_trigger/sound_effect/Trigger(atom/movable/A)
|
||||
var/turf/T = get_turf(A)
|
||||
|
||||
if(!T)
|
||||
return
|
||||
|
||||
if(triggerer_only)
|
||||
A.playsound_local(T, sound, volume, freq_vary)
|
||||
else
|
||||
playsound(T, sound, volume, freq_vary, extra_range)
|
||||
|
||||
if(happens_once)
|
||||
qdel(src)
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
/obj/item/weapon/poster/legit/wanted
|
||||
var/poster_desc
|
||||
icon_state = "rolled_poster"
|
||||
|
||||
/obj/item/weapon/poster/legit/wanted/New(turf/loc, icon/person_icon, wanted_name, description)
|
||||
..(loc)
|
||||
name = "wanted poster ([wanted_name])"
|
||||
desc = "A wanted poster for [wanted_name]."
|
||||
poster_desc = description
|
||||
qdel(resulting_poster)
|
||||
resulting_poster = new /obj/structure/sign/poster/wanted(person_icon, wanted_name, poster_desc)
|
||||
|
||||
/obj/structure/sign/poster/wanted
|
||||
var/wanted_name
|
||||
|
||||
/obj/structure/sign/poster/wanted/New(var/icon/person_icon, var/person_name, var/description)
|
||||
if(!person_icon)
|
||||
qdel(src)
|
||||
return
|
||||
name = "wanted poster ([person_name])"
|
||||
wanted_name = person_name
|
||||
desc = description
|
||||
|
||||
person_icon = icon(person_icon, dir = SOUTH)//copy the image so we don't mess with the one in the record.
|
||||
var/icon/the_icon = icon("icon" = 'icons/obj/poster_wanted.dmi', "icon_state" = "wanted_background")
|
||||
var/icon/icon_foreground = icon("icon" = 'icons/obj/poster_wanted.dmi', "icon_state" = "wanted_foreground")
|
||||
person_icon.Shift(SOUTH, 7)
|
||||
person_icon.Crop(7,4,26,30)
|
||||
person_icon.Crop(-5,-2,26,29)
|
||||
the_icon.Blend(person_icon, ICON_OVERLAY)
|
||||
the_icon.Blend(icon_foreground, ICON_OVERLAY)
|
||||
|
||||
the_icon.Insert(the_icon, "wanted")
|
||||
the_icon.Insert(icon('icons/obj/contraband.dmi', "poster_being_set"), "poster_being_set")
|
||||
the_icon.Insert(icon('icons/obj/contraband.dmi', "poster_ripped"), "poster_ripped")
|
||||
icon = the_icon
|
||||
|
||||
/obj/structure/sign/poster/wanted/attack_hand(mob/user)
|
||||
..()
|
||||
|
||||
/obj/structure/sign/poster/wanted/attackby()
|
||||
..()
|
||||
|
||||
/obj/structure/sign/poster/wanted/roll_and_drop(turf/location)
|
||||
var/obj/item/weapon/poster/legit/wanted/P = new(src, null, wanted_name, desc)
|
||||
P.resulting_poster = src
|
||||
P.loc = location
|
||||
loc = P
|
||||
Reference in New Issue
Block a user