mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
Merge remote-tracking branch 'remotes/git-svn' (r4527) into bs12_with_tgport
Conflicts: baystation12.dme code/game/gamemodes/cult/runes.dm code/game/gamemodes/events.dm code/game/machinery/telecomms/broadcaster.dm code/game/machinery/telecomms/machine_interactions.dm code/game/objects/devices/uplinks.dm code/game/objects/weapons.dm code/modules/mining/mine_items.dm html/changelog.html icons/obj/chemical.dmi maps/tgstation.2.0.9.dmm Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
@@ -0,0 +1,421 @@
|
||||
/* Alien Effects!
|
||||
* Contains:
|
||||
* effect/alien
|
||||
* Resin
|
||||
* Weeds
|
||||
* Acid
|
||||
* Egg
|
||||
*/
|
||||
|
||||
/*
|
||||
* effect/alien
|
||||
*/
|
||||
/obj/effect/alien
|
||||
name = "alien thing"
|
||||
desc = "theres something alien about this"
|
||||
icon = 'icons/mob/alien.dmi'
|
||||
// unacidable = 1 //Aliens won't ment their own.
|
||||
|
||||
|
||||
/*
|
||||
* Resin
|
||||
*/
|
||||
/obj/effect/alien/resin
|
||||
name = "resin"
|
||||
desc = "Looks like some kind of slimy growth."
|
||||
icon_state = "resin"
|
||||
|
||||
density = 1
|
||||
opacity = 1
|
||||
anchored = 1
|
||||
var/health = 50
|
||||
//var/mob/living/affecting = null
|
||||
|
||||
wall
|
||||
name = "resin wall"
|
||||
desc = "Purple slime solidified into a wall."
|
||||
icon_state = "resinwall" //same as resin, but consistency ho!
|
||||
|
||||
membrane
|
||||
name = "resin membrane"
|
||||
desc = "Purple slime just thin enough to let light pass through."
|
||||
icon_state = "resinmembrane"
|
||||
opacity = 0
|
||||
health = 20
|
||||
|
||||
/obj/effect/alien/resin/proc/healthcheck()
|
||||
if(health <=0)
|
||||
density = 0
|
||||
del(src)
|
||||
return
|
||||
|
||||
/obj/effect/alien/resin/bullet_act(var/obj/item/projectile/Proj)
|
||||
health -= Proj.damage
|
||||
..()
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
/obj/effect/alien/resin/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
health-=50
|
||||
if(2.0)
|
||||
health-=50
|
||||
if(3.0)
|
||||
if (prob(50))
|
||||
health-=50
|
||||
else
|
||||
health-=25
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
/obj/effect/alien/resin/blob_act()
|
||||
health-=50
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
/obj/effect/alien/resin/meteorhit()
|
||||
health-=50
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
/obj/effect/alien/resin/hitby(AM as mob|obj)
|
||||
..()
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[src] was hit by [AM].</B>", 1)
|
||||
var/tforce = 0
|
||||
if(ismob(AM))
|
||||
tforce = 10
|
||||
else
|
||||
tforce = AM:throwforce
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
|
||||
health = max(0, health - tforce)
|
||||
healthcheck()
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/effect/alien/resin/attack_hand()
|
||||
if ((HULK in usr.mutations) || (SUPRSTR in usr.augmentations))
|
||||
usr << "\blue You easily destroy the [name]."
|
||||
for(var/mob/O in oviewers(src))
|
||||
O.show_message("\red [usr] destroys the [name]!", 1)
|
||||
health = 0
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
/obj/effect/alien/resin/attack_paw()
|
||||
return attack_hand()
|
||||
|
||||
/obj/effect/alien/resin/attack_alien()
|
||||
if (islarva(usr))//Safety check for larva. /N
|
||||
return
|
||||
usr << "\green You claw at the [name]."
|
||||
for(var/mob/O in oviewers(src))
|
||||
O.show_message("\red [usr] claws at the resin!", 1)
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
|
||||
health -= rand(10, 20)
|
||||
if(health <= 0)
|
||||
usr << "\green You slice the [name] to pieces."
|
||||
for(var/mob/O in oviewers(src))
|
||||
O.show_message("\red [usr] slices the [name] apart!", 1)
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
/obj/effect/alien/resin/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
/*if (istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2)
|
||||
var/obj/item/weapon/grab/G = W
|
||||
if(isalien(user)&&(ishuman(G.affecting)||ismonkey(G.affecting)))
|
||||
//Only aliens can stick humans and monkeys into resin walls. Also, the wall must not have a person inside already.
|
||||
if(!affecting)
|
||||
if(G.state<2)
|
||||
user << "\red You need a better grip to do that!"
|
||||
return
|
||||
G.affecting.loc = src
|
||||
G.affecting.paralysis = 10
|
||||
for(var/mob/O in viewers(world.view, src))
|
||||
if (O.client)
|
||||
O << text("\green [] places [] in the resin wall!", G.assailant, G.affecting)
|
||||
affecting=G.affecting
|
||||
del(W)
|
||||
spawn(0)
|
||||
process()
|
||||
else
|
||||
user << "\red This wall is already occupied."
|
||||
return */
|
||||
|
||||
var/aforce = W.force
|
||||
health = max(0, health - aforce)
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
|
||||
healthcheck()
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/effect/alien/resin/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(air_group) return 0
|
||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||
return !opacity
|
||||
return !density
|
||||
|
||||
|
||||
/*
|
||||
* Weeds
|
||||
*/
|
||||
#define NODERANGE 3
|
||||
|
||||
/obj/effect/alien/weeds
|
||||
name = "weeds"
|
||||
desc = "Weird purple weeds."
|
||||
icon_state = "weeds"
|
||||
|
||||
anchored = 1
|
||||
density = 0
|
||||
var/health = 50
|
||||
|
||||
node
|
||||
icon_state = "weednode"
|
||||
name = "purple sac"
|
||||
desc = "Weird purple octopus-like thing."
|
||||
|
||||
/obj/effect/alien/weeds/New()
|
||||
..()
|
||||
if(istype(loc, /turf/space))
|
||||
del(src)
|
||||
return
|
||||
if(icon_state == "weeds")icon_state = pick("weeds", "weeds1", "weeds2")
|
||||
spawn(rand(150,300))
|
||||
if(src)
|
||||
Life()
|
||||
return
|
||||
|
||||
/obj/effect/alien/weeds/node/New()
|
||||
..()
|
||||
sd_SetLuminosity(NODERANGE)
|
||||
return
|
||||
|
||||
/obj/effect/alien/weeds/proc/Life()
|
||||
set background = 1
|
||||
var/turf/U = get_turf(src)
|
||||
/*
|
||||
if (locate(/obj/movable, U))
|
||||
U = locate(/obj/movable, U)
|
||||
if(U.density == 1)
|
||||
del(src)
|
||||
return
|
||||
|
||||
Alien plants should do something if theres a lot of poison
|
||||
if(U.poison> 200000)
|
||||
health -= round(U.poison/200000)
|
||||
update()
|
||||
return
|
||||
*/
|
||||
if (istype(U, /turf/space))
|
||||
del(src)
|
||||
return
|
||||
|
||||
direction_loop:
|
||||
for(var/dirn in cardinal)
|
||||
var/turf/T = get_step(src, dirn)
|
||||
|
||||
if (!istype(T) || T.density || locate(/obj/effect/alien/weeds) in T || istype(T.loc, /area/arrival) || istype(T, /turf/space))
|
||||
continue
|
||||
|
||||
if(!(locate(/obj/effect/alien/weeds/node) in view(NODERANGE,T)))
|
||||
continue
|
||||
|
||||
// if (locate(/obj/movable, T)) // don't propogate into movables
|
||||
// continue
|
||||
|
||||
for(var/obj/O in T)
|
||||
if(O.density)
|
||||
continue direction_loop
|
||||
|
||||
new /obj/effect/alien/weeds(T)
|
||||
|
||||
|
||||
/obj/effect/alien/weeds/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
del(src)
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
del(src)
|
||||
if(3.0)
|
||||
if (prob(5))
|
||||
del(src)
|
||||
return
|
||||
|
||||
/obj/effect/alien/weeds/attackby(var/obj/item/weapon/W, var/mob/user)
|
||||
if(W.attack_verb.len)
|
||||
visible_message("\red <B>\The [src] have been [pick(W.attack_verb)] with \the [W][(user ? " by [user]." : ".")]")
|
||||
else
|
||||
visible_message("\red <B>\The [src] have been attacked with \the [W][(user ? " by [user]." : ".")]")
|
||||
|
||||
var/damage = W.force / 4.0
|
||||
|
||||
if(istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
|
||||
if(WT.remove_fuel(0, user))
|
||||
damage = 15
|
||||
playsound(loc, 'sound/items/Welder.ogg', 100, 1)
|
||||
|
||||
health -= damage
|
||||
healthcheck()
|
||||
|
||||
/obj/effect/alien/weeds/proc/healthcheck()
|
||||
if(health <= 0)
|
||||
del(src)
|
||||
|
||||
|
||||
/obj/effect/alien/weeds/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > 300)
|
||||
health -= 5
|
||||
healthcheck()
|
||||
|
||||
/*/obj/effect/alien/weeds/burn(fi_amount)
|
||||
if (fi_amount > 18000)
|
||||
spawn( 0 )
|
||||
del(src)
|
||||
return
|
||||
return 0
|
||||
return 1
|
||||
*/
|
||||
|
||||
#undef NODERANGE
|
||||
|
||||
|
||||
/*
|
||||
* Acid
|
||||
*/
|
||||
/obj/effect/alien/acid
|
||||
name = "acid"
|
||||
desc = "Burbling corrossive stuff. I wouldn't want to touch it."
|
||||
icon_state = "acid"
|
||||
|
||||
density = 0
|
||||
opacity = 0
|
||||
anchored = 1
|
||||
|
||||
var/obj/target
|
||||
var/ticks = 0
|
||||
|
||||
/obj/effect/alien/acid/proc/tick()
|
||||
ticks += 1
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message("\green <B>[src.target] sizzles and begins to melt under the bubbling mess of acid!</B>", 1)
|
||||
if(prob(ticks*10))
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message("\green <B>[src.target] collapses under its own weight into a puddle of goop and undigested debris!</B>", 1)
|
||||
// if(target.occupant) //I tried to fix mechas-with-humans-getting-deleted. Made them unacidable for now.
|
||||
// target.ex_act(1)
|
||||
del(target)
|
||||
del(src)
|
||||
return
|
||||
spawn(rand(200, 600)) tick()
|
||||
|
||||
/*
|
||||
* Egg
|
||||
*/
|
||||
/var/const //for the status var
|
||||
BURST = 0
|
||||
GROWING = 1
|
||||
GROWN = 2
|
||||
|
||||
MIN_GROWTH_TIME = 1800 //time it takes to grow a hugger
|
||||
MAX_GROWTH_TIME = 3000
|
||||
|
||||
/obj/effect/alien/egg
|
||||
desc = "It looks like a weird egg"
|
||||
name = "egg"
|
||||
icon_state = "egg_growing"
|
||||
density = 0
|
||||
anchored = 1
|
||||
|
||||
var/health = 100
|
||||
var/status = GROWING //can be GROWING, GROWN or BURST; all mutually exclusive
|
||||
|
||||
New()
|
||||
if(aliens_allowed)
|
||||
..()
|
||||
spawn(rand(MIN_GROWTH_TIME,MAX_GROWTH_TIME))
|
||||
Grow()
|
||||
else
|
||||
del(src)
|
||||
|
||||
attack_paw(user as mob)
|
||||
if(isalien(user))
|
||||
switch(status)
|
||||
if(BURST)
|
||||
user << "\red The child is already gone."
|
||||
return
|
||||
if(GROWING)
|
||||
user << "\red The child is not developed yet."
|
||||
return
|
||||
if(GROWN)
|
||||
user << "\red You retrieve the child."
|
||||
loc.contents += GetFacehugger()//need to write the code for giving it to the alien later
|
||||
Burst()
|
||||
return
|
||||
else
|
||||
return attack_hand(user)
|
||||
|
||||
attack_hand(user as mob)
|
||||
user << "It feels slimy."
|
||||
return
|
||||
|
||||
proc/GetFacehugger()
|
||||
return locate(/obj/item/clothing/mask/facehugger) in contents
|
||||
|
||||
proc/Grow()
|
||||
icon_state = "egg"
|
||||
status = GROWN
|
||||
new /obj/item/clothing/mask/facehugger(src)
|
||||
return
|
||||
|
||||
proc/Burst() //drops and kills the hugger if any is remaining
|
||||
var/obj/item/clothing/mask/facehugger/child = GetFacehugger()
|
||||
|
||||
if(child)
|
||||
loc.contents += child
|
||||
child.Die()
|
||||
|
||||
icon_state = "egg_hatched"
|
||||
status = BURST
|
||||
return
|
||||
|
||||
/obj/effect/alien/egg/bullet_act(var/obj/item/projectile/Proj)
|
||||
health -= Proj.damage
|
||||
..()
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/effect/alien/egg/attackby(var/obj/item/weapon/W, var/mob/user)
|
||||
if(health <= 0)
|
||||
return
|
||||
if(W.attack_verb.len)
|
||||
src.visible_message("\red <B>\The [src] has been [pick(W.attack_verb)] with \the [W][(user ? " by [user]." : ".")]")
|
||||
else
|
||||
src.visible_message("\red <B>\The [src] has been attacked with \the [W][(user ? " by [user]." : ".")]")
|
||||
var/damage = W.force / 4.0
|
||||
|
||||
if(istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
|
||||
if(WT.remove_fuel(0, user))
|
||||
damage = 15
|
||||
playsound(src.loc, 'sound/items/Welder.ogg', 100, 1)
|
||||
|
||||
src.health -= damage
|
||||
src.healthcheck()
|
||||
|
||||
|
||||
/obj/effect/alien/egg/proc/healthcheck()
|
||||
if(health <= 0)
|
||||
Burst()
|
||||
|
||||
/obj/effect/alien/egg/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > 500)
|
||||
health -= 5
|
||||
healthcheck()
|
||||
@@ -0,0 +1,124 @@
|
||||
/obj/effect/biomass
|
||||
icon = 'icons/obj/biomass.dmi'
|
||||
icon_state = "stage1"
|
||||
opacity = 0
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 20 //DEBUG
|
||||
var/health = 10
|
||||
var/stage = 1
|
||||
var/obj/effect/rift/originalRift = null //the originating rift of that biomass
|
||||
var/maxDistance = 15 //the maximum length of a thread
|
||||
var/newSpreadDistance = 10 //the length of a thread at which new ones are created
|
||||
var/curDistance = 1 //the current length of a thread
|
||||
var/continueChance = 3 //weighed chance of continuing in the same direction. turning left or right has 1 weight both
|
||||
var/spreadDelay = 1 //will change to something bigger later, but right now I want it to spread as fast as possible for testing
|
||||
|
||||
/obj/effect/rift
|
||||
icon = 'icons/obj/biomass.dmi'
|
||||
icon_state = "rift"
|
||||
var/list/obj/effect/biomass/linkedBiomass = list() //all the biomass patches that have spread from it
|
||||
var/newicon = 1 //DEBUG
|
||||
|
||||
/obj/effect/rift/New()
|
||||
set background = 1
|
||||
|
||||
..()
|
||||
|
||||
for(var/turf/T in orange(1,src))
|
||||
if(!IsValidBiomassLoc(T))
|
||||
continue
|
||||
var/obj/effect/biomass/starting = new /obj/effect/biomass(T)
|
||||
starting.dir = get_dir(src,starting)
|
||||
starting.originalRift = src
|
||||
linkedBiomass += starting
|
||||
spawn(1) //DEBUG
|
||||
starting.icon_state = "[newicon]"
|
||||
|
||||
/obj/effect/rift/Del()
|
||||
for(var/obj/effect/biomass/biomass in linkedBiomass)
|
||||
del(biomass)
|
||||
..()
|
||||
|
||||
/obj/effect/biomass/New()
|
||||
set background = 1
|
||||
|
||||
..()
|
||||
if(!IsValidBiomassLoc(loc,src))
|
||||
del(src)
|
||||
return
|
||||
spawn(1) //so that the dir and stuff can be set by the source first
|
||||
if(curDistance >= maxDistance)
|
||||
return
|
||||
switch(dir)
|
||||
if(NORTHWEST)
|
||||
dir = NORTH
|
||||
if(NORTHEAST)
|
||||
dir = EAST
|
||||
if(SOUTHWEST)
|
||||
dir = WEST
|
||||
if(SOUTHEAST)
|
||||
dir = SOUTH
|
||||
sleep(spreadDelay)
|
||||
Spread()
|
||||
|
||||
/obj/effect/biomass/proc/Spread(var/direction = dir)
|
||||
set background = 1
|
||||
var/possibleDirsInt = 0
|
||||
|
||||
for(var/newDirection in cardinal)
|
||||
if(newDirection == turn(direction,180)) //can't go backwards
|
||||
continue
|
||||
var/turf/T = get_step(loc,newDirection)
|
||||
if(!IsValidBiomassLoc(T,src))
|
||||
continue
|
||||
possibleDirsInt |= newDirection
|
||||
|
||||
var/list/possibleDirs = list()
|
||||
|
||||
if(possibleDirsInt & direction)
|
||||
for(var/i=0 , i<continueChance , i++)
|
||||
possibleDirs += direction
|
||||
if(possibleDirsInt & turn(direction,90))
|
||||
possibleDirs += turn(direction,90)
|
||||
if(possibleDirsInt & turn(direction,-90))
|
||||
possibleDirs += turn(direction,-90)
|
||||
|
||||
if(!possibleDirs.len)
|
||||
return
|
||||
|
||||
direction = pick(possibleDirs)
|
||||
|
||||
var/obj/effect/biomass/newBiomass = new /obj/effect/biomass(get_step(src,direction))
|
||||
newBiomass.curDistance = curDistance + 1
|
||||
newBiomass.maxDistance = maxDistance
|
||||
newBiomass.dir = direction
|
||||
newBiomass.originalRift = originalRift
|
||||
newBiomass.icon_state = "[originalRift.newicon]" //DEBUG
|
||||
originalRift.linkedBiomass += newBiomass
|
||||
|
||||
if(!(curDistance%newSpreadDistance))
|
||||
var/obj/effect/rift/newrift = new /obj/effect/rift(loc)
|
||||
if(originalRift.newicon <= 3)
|
||||
newrift.newicon = originalRift.newicon + 1
|
||||
// NewSpread()
|
||||
|
||||
/obj/effect/biomass/proc/NewSpread(maxDistance = 15)
|
||||
set background = 1
|
||||
for(var/turf/T in orange(1,src))
|
||||
if(!IsValidBiomassLoc(T,src))
|
||||
continue
|
||||
var/obj/effect/biomass/starting = new /obj/effect/biomass(T)
|
||||
starting.dir = get_dir(src,starting)
|
||||
starting.maxDistance = maxDistance
|
||||
|
||||
/proc/IsValidBiomassLoc(turf/location,obj/effect/biomass/source = null)
|
||||
set background = 1
|
||||
for(var/obj/effect/biomass/biomass in location)
|
||||
if(biomass != source)
|
||||
return 0
|
||||
if(istype(location,/turf/space))
|
||||
return 0
|
||||
if(location.density)
|
||||
return 0
|
||||
return 1
|
||||
@@ -0,0 +1,66 @@
|
||||
/obj/effect/decal/cleanable/New()
|
||||
if (random_icon_states && length(src.random_icon_states) > 0)
|
||||
src.icon_state = pick(src.random_icon_states)
|
||||
..()
|
||||
/*
|
||||
/obj/effect/decal/cleanable/blood/burn(fi_amount)
|
||||
if(fi_amount > 900000.0)
|
||||
src.virus = null
|
||||
sleep(11)
|
||||
del(src)
|
||||
return
|
||||
*/
|
||||
|
||||
//Gibs.spread proc in gibs.dm
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/proc/streak(var/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/blood/b = new /obj/effect/decal/cleanable/blood/splatter(src.loc)
|
||||
for(var/datum/disease/D in src.viruses)
|
||||
b.viruses += D
|
||||
if (step_to(src, get_step(src, direction), 0))
|
||||
break
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xgibs/proc/streak(var/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)
|
||||
b.viruses += D
|
||||
if (step_to(src, get_step(src, direction), 0))
|
||||
break
|
||||
|
||||
/obj/effect/decal/cleanable/robot_debris/proc/streak(var/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)
|
||||
if (prob(40))
|
||||
/*var/obj/effect/decal/cleanable/oil/o =*/
|
||||
new /obj/effect/decal/cleanable/oil/streak(src.loc)
|
||||
else if (prob(10))
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
if (step_to(src, get_step(src, direction), 0))
|
||||
break
|
||||
|
||||
|
||||
// not a great place for it, but as good as any
|
||||
|
||||
/obj/effect/decal/cleanable/greenglow
|
||||
|
||||
New()
|
||||
..()
|
||||
sd_SetLuminosity(1)
|
||||
|
||||
spawn(1200) // 2 minutes
|
||||
del(src)
|
||||
@@ -0,0 +1,212 @@
|
||||
|
||||
//########################## CONTRABAND ;3333333333333333333 -Agouri ###################################################
|
||||
|
||||
#define NUM_OF_POSTER_DESIGNS 17
|
||||
|
||||
/obj/item/weapon/contraband
|
||||
name = "contraband item"
|
||||
desc = "You probably shouldn't be holding this."
|
||||
icon = 'icons/obj/contraband.dmi'
|
||||
force = 0
|
||||
|
||||
|
||||
/obj/item/weapon/contraband/poster
|
||||
name = "rolled-up poster"
|
||||
desc = "The 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"
|
||||
var/serial_number = 0
|
||||
var/obj/effect/decal/poster/resulting_poster = null //The poster that will be created is initialised and stored through contraband/poster's constructor
|
||||
|
||||
|
||||
/obj/item/weapon/contraband/poster/New(turf/loc,var/given_serial=0)
|
||||
if(given_serial==0)
|
||||
serial_number = rand(1,NUM_OF_POSTER_DESIGNS)
|
||||
src.resulting_poster = new(serial_number)
|
||||
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.
|
||||
src.name += " - No. [serial_number]"
|
||||
..(loc)
|
||||
|
||||
|
||||
/*/obj/item/weapon/contraband/poster/attack(mob/M as mob, mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
if(src.resulting_poster)
|
||||
src.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/simulated/wall))
|
||||
if(src.resulting_poster == null)
|
||||
return
|
||||
else
|
||||
var/turf/simulated/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/effect/decal/poster))
|
||||
check = 1
|
||||
break
|
||||
stuff_on_wall++
|
||||
if(stuff_on_wall==3)
|
||||
check = 1
|
||||
break
|
||||
|
||||
if(check)
|
||||
user << "<FONT COLOR='RED'>The wall is far too cluttered to place a poster!</FONT>"
|
||||
return
|
||||
|
||||
src.resulting_poster.loc = W //Looks like it's uncluttered enough. Place the poster
|
||||
W.contents += src.resulting_poster
|
||||
|
||||
del(src)*/
|
||||
|
||||
|
||||
|
||||
//############################## THE ACTUAL DECALS ###########################
|
||||
|
||||
obj/effect/decal/poster
|
||||
name = "poster"
|
||||
desc = "A large piece of space-resistant printed paper. It's considered contraband."
|
||||
icon = 'icons/obj/contraband.dmi'
|
||||
anchored = 1
|
||||
var/serial_number //Will hold the value of src.loc if nobody initialises it
|
||||
var/ruined = 0
|
||||
|
||||
|
||||
obj/effect/decal/poster/New(var/serial)
|
||||
|
||||
src.serial_number = serial
|
||||
|
||||
if(serial_number==src.loc){serial_number = rand(1,NUM_OF_POSTER_DESIGNS);} //This is for the mappers that want individual posters without having to use rolled posters.
|
||||
|
||||
icon_state = "poster[serial_number]"
|
||||
|
||||
switch(serial_number)
|
||||
if(1)
|
||||
name += " - Unlucky Space Explorer"
|
||||
desc += " This particular one depicts a skeletal form within a space suit."
|
||||
if(2)
|
||||
name += " - Positronic Logic Conflicts"
|
||||
desc += " This particular one depicts the cold, unmoving stare of a particular advanced AI."
|
||||
if(3)
|
||||
name += " - Paranoia"
|
||||
desc += " This particular one warns of the dangers of trusting your co-workers too much."
|
||||
if(4)
|
||||
name += " - Keep Calm"
|
||||
desc += " This particular one is of a famous New Earth design, although a bit modified."
|
||||
if(5)
|
||||
name += " - Martian Warlord"
|
||||
desc += " This particular one depicts the cartoony mug of a certain Martial Warmonger."
|
||||
if(6)
|
||||
name += " - Technological Singularity"
|
||||
desc += " This particular one is of the blood-curdling symbol of a long-since defeated enemy of humanity."
|
||||
if(7)
|
||||
name += " - Wasteland"
|
||||
desc += " This particular one is of a couple of ragged gunmen, one male and one female, on top of a mound of rubble. The number \"13\" is visible on their blue jumpsuits."
|
||||
if(8)
|
||||
name += " - Pinup Girl Cindy"
|
||||
desc += " This particular one is of Nanotrasen's PR girl, Cindy, in a particularly feminine pose."
|
||||
if(9)
|
||||
name += " - Pinup Girl Amy"
|
||||
desc += " This particular one is of Amy, the nymphomaniac Urban Legend of Nanotrasen Space Stations. How this photograph came to be is not known."
|
||||
if(10)
|
||||
name += " - Don't Panic"
|
||||
desc += " This particular one depicts some sort of star in a grimace. The \"Don't Panic\" is written in big, friendly letters."
|
||||
if(11)
|
||||
name += " - Underwater Laboratory"
|
||||
desc += " This particular one is of the fabled last crew of Nanotrasen's previous project before going big on Asteroid mining, Sealab."
|
||||
if(12)
|
||||
name += " - Missing Gloves"
|
||||
desc += " This particular one is about the uproar that followed Nanotrasen's financial cuts towards insulated-glove purchases."
|
||||
if(13)
|
||||
name += " - Rogue AI"
|
||||
desc += " This particular one depicts the shell of the infamous AI that catastropically comandeered one of Nanotrasen's earliest space stations. Back then, the corporation was just known as TriOptimum."
|
||||
if(14)
|
||||
name += " - User of the Arcane Arts"
|
||||
desc += " This particular one depicts a wizard, casting a spell. You can't really make out if it's an actial photograph or a computer-generated image."
|
||||
if(15)
|
||||
name += " - Levitating Skull"
|
||||
desc += " This particular one is the portrait of a certain flying, friendly and somewhat sex-crazed enchanted skull. Its adventures along with its fabled companion are now fading through history..."
|
||||
if(16)
|
||||
name += " - Augmented Legend"
|
||||
desc += " This particular one is of an obviously augmented individual, gazing towards the sky. The cyber-city in the backround is rather punkish."
|
||||
if(17)
|
||||
name += " - Dangerous Static"
|
||||
desc += " This particular one depicts nothing remarkable other than a rather mesmerising pattern of monitor static. There's a tag on the sides of the poster, urging you to \"tear this poster in half to receive your free sample\"."
|
||||
else
|
||||
name = "This shit just bugged. Report it to Agouri - polyxenitopalidou@gmail.com"
|
||||
desc = "Why are you still here?"
|
||||
..()
|
||||
|
||||
obj/effect/decal/poster/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if( istype(W, /obj/item/weapon/wirecutters) )
|
||||
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
|
||||
if(src.ruined)
|
||||
user << "<FONT COLOR='BLUE'>You remove the remnants of the poster.</FONT>"
|
||||
del(src)
|
||||
else
|
||||
user << "<FONT COLOR='BLUE'>You carefully remove the poster from the wall.</FONT>"
|
||||
src.roll_and_drop(user.loc)
|
||||
return
|
||||
|
||||
|
||||
/obj/effect/decal/poster/attack_hand(mob/user as mob)
|
||||
if(src.ruined)
|
||||
return
|
||||
var/temp_loc = user.loc
|
||||
switch(alert("Do I want to rip the poster from the wall?","You think...","Yes","No"))
|
||||
if("Yes")
|
||||
if(user.loc != temp_loc)
|
||||
return
|
||||
for (var/mob/O in hearers(5, src.loc))
|
||||
O.show_message("<FONT COLOR='RED'>[user.name] rips the [src.name] in a single, decisive motion!</FONT>" )
|
||||
playsound(src.loc, 'sound/items/poster_ripped.ogg', 100, 1)
|
||||
src.ruined = 1
|
||||
src.icon_state = "poster_ripped"
|
||||
src.name = "Ripped poster"
|
||||
src.desc = "You can't make out anything from the poster's original print. It's ruined."
|
||||
src.add_fingerprint(user)
|
||||
if("No")
|
||||
return
|
||||
|
||||
/obj/effect/decal/poster/proc/roll_and_drop(turf/loc)
|
||||
var/obj/item/weapon/contraband/poster/P = new(src,src.serial_number)
|
||||
P.resulting_poster = src
|
||||
P.loc = loc
|
||||
src.loc = P
|
||||
|
||||
|
||||
//seperated to reduce code duplication. Moved here for ease of reference and to unclutter r_wall/attackby()
|
||||
/turf/simulated/wall/proc/place_poster(var/obj/item/weapon/contraband/poster/P, var/mob/user)
|
||||
if(!P.resulting_poster) return
|
||||
|
||||
var/stuff_on_wall = 0
|
||||
for( var/obj/O in src.contents) //Let's see if it already has a poster on it or too much stuff
|
||||
if(istype(O,/obj/effect/decal/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/effect/decal/poster/D = P.resulting_poster
|
||||
|
||||
var/temp_loc = user.loc
|
||||
flick("poster_being_set",D)
|
||||
D.loc = src
|
||||
del(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)
|
||||
|
||||
sleep(17)
|
||||
if(!D) return
|
||||
|
||||
if(istype(src,/turf/simulated/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)
|
||||
return
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,102 @@
|
||||
/proc/gibs(atom/location, var/list/viruses, var/datum/dna/MobDNA) //CARN MARKER
|
||||
new /obj/effect/gibspawner/generic(get_turf(location),viruses,MobDNA)
|
||||
|
||||
/proc/hgibs(atom/location, var/list/viruses, var/datum/dna/MobDNA)
|
||||
new /obj/effect/gibspawner/human(get_turf(location),viruses,MobDNA)
|
||||
|
||||
/proc/xgibs(atom/location, var/list/viruses)
|
||||
new /obj/effect/gibspawner/xeno(get_turf(location),viruses)
|
||||
|
||||
/proc/robogibs(atom/location, var/list/viruses)
|
||||
new /obj/effect/gibspawner/robot(get_turf(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
|
||||
|
||||
New(location, var/list/viruses, var/datum/dna/MobDNA)
|
||||
..()
|
||||
|
||||
if(istype(loc,/turf)) //basically if a badmin spawns it
|
||||
Gib(loc,viruses,MobDNA)
|
||||
|
||||
proc/Gib(atom/location, var/list/viruses = list(), var/datum/dna/MobDNA = null)
|
||||
if(gibtypes.len != gibamounts.len || gibamounts.len != gibdirections.len)
|
||||
world << "\red Gib list length mismatch!"
|
||||
return
|
||||
|
||||
var/obj/effect/decal/cleanable/blood/gibs/gib = null
|
||||
for(var/datum/disease/D in viruses)
|
||||
if(D.spread_type == SPECIAL)
|
||||
del(D)
|
||||
|
||||
if(sparks)
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(2, 1, location)
|
||||
s.start()
|
||||
|
||||
for(var/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(viruses.len > 0)
|
||||
for(var/datum/disease/D in viruses)
|
||||
if(prob(virusProb))
|
||||
var/datum/disease/viruus = new D.type
|
||||
gib.viruses += viruus
|
||||
viruus.holder = gib
|
||||
viruus.spread_type = CONTACT_FEET
|
||||
gib.blood_DNA = list()
|
||||
if(MobDNA)
|
||||
gib.blood_DNA[MobDNA.unique_enzymes] = MobDNA.b_type
|
||||
else if(istype(src, /obj/effect/gibspawner/xeno))
|
||||
gib.blood_DNA["UNKNOWN DNA"] = "X*"
|
||||
else if(istype(src, /obj/effect/gibspawner/human)) // Probably a monkey
|
||||
gib.blood_DNA["Non-human DNA"] = "A+"
|
||||
var/list/directions = gibdirections[i]
|
||||
if(directions.len)
|
||||
gib.streak(directions)
|
||||
|
||||
del(src)
|
||||
|
||||
/obj/effect/gibspawner
|
||||
generic
|
||||
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs/core)
|
||||
gibamounts = list(2,2,1)
|
||||
|
||||
New()
|
||||
gibdirections = list(list(WEST, NORTHWEST, SOUTHWEST, NORTH),list(EAST, NORTHEAST, SOUTHEAST, SOUTH), list())
|
||||
..()
|
||||
|
||||
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)
|
||||
|
||||
New()
|
||||
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs, list())
|
||||
gibamounts[6] = pick(0,1,2)
|
||||
..()
|
||||
|
||||
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)
|
||||
|
||||
New()
|
||||
gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs, list())
|
||||
gibamounts[6] = pick(0,1,2)
|
||||
..()
|
||||
|
||||
robot
|
||||
sparks = 1
|
||||
gibtypes = list(/obj/effect/decal/cleanable/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)
|
||||
|
||||
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,160 @@
|
||||
//separate dm since hydro is getting bloated already
|
||||
|
||||
/obj/effect/glowshroom
|
||||
name = "glowshroom"
|
||||
anchored = 1
|
||||
opacity = 0
|
||||
density = 0
|
||||
icon = 'icons/obj/lighting.dmi'
|
||||
icon_state = "glowshroomf"
|
||||
layer = 2.1
|
||||
var/endurance = 30
|
||||
var/potency = 30
|
||||
var/delay = 1200
|
||||
var/floor = 0
|
||||
var/yield = 3
|
||||
var/spreadChance = 40
|
||||
var/spreadIntoAdjacentChance = 60
|
||||
var/evolveChance = 2
|
||||
|
||||
/obj/effect/glowshroom/single
|
||||
spreadChance = 0
|
||||
|
||||
/obj/effect/glowshroom/New()
|
||||
set background = 1
|
||||
..()
|
||||
|
||||
dir = CalcDir()
|
||||
|
||||
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 = "glowshroom[rand(1,3)]"
|
||||
else //if on the floor, glowshroom on-floor sprite
|
||||
icon_state = "glowshroomf"
|
||||
|
||||
spawn(2) //allows the luminosity and spread rate to be affected by potency at the moment of creation
|
||||
sd_SetLuminosity(potency/10)
|
||||
spawn(delay)
|
||||
if(src)
|
||||
Spread()
|
||||
|
||||
/obj/effect/glowshroom/proc/Spread()
|
||||
set background = 1
|
||||
var/spreaded = 1
|
||||
|
||||
while(spreaded)
|
||||
spreaded = 0
|
||||
|
||||
for(var/i=1,i<=yield,i++)
|
||||
if(prob(spreadChance))
|
||||
var/list/possibleLocs = list()
|
||||
var/spreadsIntoAdjacent = 0
|
||||
|
||||
if(prob(spreadIntoAdjacentChance))
|
||||
spreadsIntoAdjacent = 1
|
||||
|
||||
for(var/turf/simulated/floor/plating/airless/asteroid/earth in view(3,src))
|
||||
if(spreadsIntoAdjacent || !locate(/obj/effect/glowshroom) in view(1,earth))
|
||||
possibleLocs += earth
|
||||
|
||||
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 /obj/effect/glowshroom(newLoc)
|
||||
child.potency = potency
|
||||
child.yield = yield
|
||||
child.delay = delay
|
||||
child.endurance = endurance
|
||||
|
||||
spreaded++
|
||||
|
||||
if(prob(evolveChance)) //very low chance to evolve on its own
|
||||
potency += rand(4,6)
|
||||
|
||||
sleep(delay)
|
||||
|
||||
/obj/effect/glowshroom/proc/CalcDir(turf/location = loc)
|
||||
set background = 1
|
||||
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/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
|
||||
endurance -= W.force
|
||||
|
||||
CheckEndurance()
|
||||
|
||||
/obj/effect/glowshroom/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
del(src)
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
del(src)
|
||||
return
|
||||
if(3.0)
|
||||
if (prob(5))
|
||||
del(src)
|
||||
return
|
||||
else
|
||||
return
|
||||
|
||||
/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)
|
||||
del(src)
|
||||
@@ -0,0 +1,85 @@
|
||||
/obj/effect/mine/New()
|
||||
icon_state = "uglyminearmed"
|
||||
|
||||
/obj/effect/mine/HasEntered(AM as mob|obj)
|
||||
Bumped(AM)
|
||||
|
||||
/obj/effect/mine/Bumped(mob/M as mob|obj)
|
||||
|
||||
if(triggered) return
|
||||
|
||||
if(istype(M, /mob/living/carbon/human) || istype(M, /mob/living/carbon/monkey))
|
||||
for(var/mob/O in viewers(world.view, src.loc))
|
||||
O << "<font color='red'>[M] triggered the \icon[src] [src]</font>"
|
||||
triggered = 1
|
||||
call(src,triggerproc)(M)
|
||||
|
||||
/obj/effect/mine/proc/triggerrad(obj)
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
obj:radiation += 50
|
||||
randmutb(obj)
|
||||
domutcheck(obj,null)
|
||||
spawn(0)
|
||||
del(src)
|
||||
|
||||
/obj/effect/mine/proc/triggerstun(obj)
|
||||
if(ismob(obj))
|
||||
var/mob/M = obj
|
||||
M.Stun(30)
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
spawn(0)
|
||||
del(src)
|
||||
|
||||
/obj/effect/mine/proc/triggern2o(obj)
|
||||
//example: n2o triggerproc
|
||||
//note: im lazy
|
||||
|
||||
for (var/turf/simulated/floor/target in range(1,src))
|
||||
if(!target.blocks_air)
|
||||
if(target.parent)
|
||||
target.parent.suspend_group_processing()
|
||||
|
||||
var/datum/gas_mixture/payload = new
|
||||
var/datum/gas/sleeping_agent/trace_gas = new
|
||||
|
||||
trace_gas.moles = 30
|
||||
payload += trace_gas
|
||||
|
||||
target.air.merge(payload)
|
||||
|
||||
spawn(0)
|
||||
del(src)
|
||||
|
||||
/obj/effect/mine/proc/triggerplasma(obj)
|
||||
for (var/turf/simulated/floor/target in range(1,src))
|
||||
if(!target.blocks_air)
|
||||
if(target.parent)
|
||||
target.parent.suspend_group_processing()
|
||||
|
||||
var/datum/gas_mixture/payload = new
|
||||
|
||||
payload.toxins = 30
|
||||
|
||||
target.air.merge(payload)
|
||||
|
||||
target.hotspot_expose(1000, CELL_VOLUME)
|
||||
|
||||
spawn(0)
|
||||
del(src)
|
||||
|
||||
/obj/effect/mine/proc/triggerkick(obj)
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
del(obj:client)
|
||||
spawn(0)
|
||||
del(src)
|
||||
|
||||
/obj/effect/mine/proc/explode(obj)
|
||||
explosion(loc, 0, 1, 2, 3)
|
||||
spawn(0)
|
||||
del(src)
|
||||
@@ -0,0 +1,37 @@
|
||||
|
||||
|
||||
/obj/effect/portal/Bumped(mob/M as mob|obj)
|
||||
spawn(0)
|
||||
src.teleport(M)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/effect/portal/HasEntered(AM as mob|obj)
|
||||
spawn(0)
|
||||
src.teleport(AM)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/effect/portal/New()
|
||||
spawn(300)
|
||||
del(src)
|
||||
return
|
||||
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 (icon_state == "portal1")
|
||||
return
|
||||
if (!( target ))
|
||||
del(src)
|
||||
return
|
||||
if (istype(M, /atom/movable))
|
||||
if(prob(failchance)) //oh dear a problem, put em in deep space
|
||||
src.icon_state = "portal1"
|
||||
do_teleport(M, locate(rand(5, world.maxx - 5), rand(5, world.maxy -5), 3), 0)
|
||||
else
|
||||
do_teleport(M, target, 1) ///You will appear adjacent to the beacon
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
/obj/effect/sign/securearea/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
del(src)
|
||||
return
|
||||
if(2.0)
|
||||
del(src)
|
||||
return
|
||||
if(3.0)
|
||||
del(src)
|
||||
return
|
||||
else
|
||||
return
|
||||
|
||||
/obj/effect/sign/securearea/blob_act()
|
||||
del(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/effect/sign/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
del(src)
|
||||
return
|
||||
if(2.0)
|
||||
del(src)
|
||||
return
|
||||
if(3.0)
|
||||
del(src)
|
||||
return
|
||||
else
|
||||
return
|
||||
|
||||
/obj/effect/sign/blob_act()
|
||||
del(src)
|
||||
return
|
||||
@@ -0,0 +1,204 @@
|
||||
/* The old single tank bombs that dont really work anymore
|
||||
/obj/effect/spawner/bomb
|
||||
name = "bomb"
|
||||
icon = 'icons/mob/screen1.dmi'
|
||||
icon_state = "x"
|
||||
var/btype = 0 //0 = radio, 1= prox, 2=time
|
||||
var/explosive = 1 // 0= firebomb
|
||||
var/btemp = 500 // bomb temperature (degC)
|
||||
var/active = 0
|
||||
|
||||
/obj/effect/spawner/bomb/radio
|
||||
btype = 0
|
||||
|
||||
/obj/effect/spawner/bomb/proximity
|
||||
btype = 1
|
||||
|
||||
/obj/effect/spawner/bomb/timer
|
||||
btype = 2
|
||||
|
||||
/obj/effect/spawner/bomb/timer/syndicate
|
||||
btemp = 450
|
||||
|
||||
/obj/effect/spawner/bomb/suicide
|
||||
btype = 3
|
||||
|
||||
/obj/effect/spawner/bomb/New()
|
||||
..()
|
||||
|
||||
switch (src.btype)
|
||||
// radio
|
||||
if (0)
|
||||
var/obj/item/assembly/r_i_ptank/R = new /obj/item/assembly/r_i_ptank(src.loc)
|
||||
var/obj/item/weapon/tank/plasma/p3 = new /obj/item/weapon/tank/plasma(R)
|
||||
var/obj/item/device/radio/signaler/p1 = new /obj/item/device/radio/signaler(R)
|
||||
var/obj/item/device/igniter/p2 = new /obj/item/device/igniter(R)
|
||||
R.part1 = p1
|
||||
R.part2 = p2
|
||||
R.part3 = p3
|
||||
p1.master = R
|
||||
p2.master = R
|
||||
p3.master = R
|
||||
R.status = explosive
|
||||
p1.b_stat = 0
|
||||
p2.secured = 1
|
||||
p3.air_contents.temperature = btemp + T0C
|
||||
|
||||
// proximity
|
||||
if (1)
|
||||
var/obj/item/assembly/m_i_ptank/R = new /obj/item/assembly/m_i_ptank(src.loc)
|
||||
var/obj/item/weapon/tank/plasma/p3 = new /obj/item/weapon/tank/plasma(R)
|
||||
var/obj/item/device/prox_sensor/p1 = new /obj/item/device/prox_sensor(R)
|
||||
var/obj/item/device/igniter/p2 = new /obj/item/device/igniter(R)
|
||||
R.part1 = p1
|
||||
R.part2 = p2
|
||||
R.part3 = p3
|
||||
p1.master = R
|
||||
p2.master = R
|
||||
p3.master = R
|
||||
R.status = explosive
|
||||
|
||||
p3.air_contents.temperature = btemp + T0C
|
||||
p2.secured = 1
|
||||
|
||||
if(src.active)
|
||||
R.part1.secured = 1
|
||||
R.part1.icon_state = text("motion[]", 1)
|
||||
R.c_state(1, src)
|
||||
|
||||
// timer
|
||||
if (2)
|
||||
var/obj/item/assembly/t_i_ptank/R = new /obj/item/assembly/t_i_ptank(src.loc)
|
||||
var/obj/item/weapon/tank/plasma/p3 = new /obj/item/weapon/tank/plasma(R)
|
||||
var/obj/item/device/timer/p1 = new /obj/item/device/timer(R)
|
||||
var/obj/item/device/igniter/p2 = new /obj/item/device/igniter(R)
|
||||
R.part1 = p1
|
||||
R.part2 = p2
|
||||
R.part3 = p3
|
||||
p1.master = R
|
||||
p2.master = R
|
||||
p3.master = R
|
||||
R.status = explosive
|
||||
|
||||
p3.air_contents.temperature = btemp + T0C
|
||||
p2.secured = 1
|
||||
//bombvest
|
||||
if(3)
|
||||
var/obj/item/clothing/suit/armor/a_i_a_ptank/R = new /obj/item/clothing/suit/armor/a_i_a_ptank(src.loc)
|
||||
var/obj/item/weapon/tank/plasma/p4 = new /obj/item/weapon/tank/plasma(R)
|
||||
var/obj/item/device/healthanalyzer/p1 = new /obj/item/device/healthanalyzer(R)
|
||||
var/obj/item/device/igniter/p2 = new /obj/item/device/igniter(R)
|
||||
var/obj/item/clothing/suit/armor/vest/p3 = new /obj/item/clothing/suit/armor/vest(R)
|
||||
R.part1 = p1
|
||||
R.part2 = p2
|
||||
R.part3 = p3
|
||||
R.part4 = p4
|
||||
p1.master = R
|
||||
p2.master = R
|
||||
p3.master = R
|
||||
p4.master = R
|
||||
R.status = explosive
|
||||
|
||||
p4.air_contents.temperature = btemp + T0C
|
||||
p2.secured = 1
|
||||
|
||||
del(src)
|
||||
*/
|
||||
|
||||
/obj/effect/spawner/newbomb
|
||||
name = "bomb"
|
||||
icon = 'icons/mob/screen1.dmi'
|
||||
icon_state = "x"
|
||||
var/btype = 0 // 0=radio, 1=prox, 2=time
|
||||
var/btemp1 = 1500
|
||||
var/btemp2 = 1000 // tank temperatures
|
||||
|
||||
timer
|
||||
btype = 2
|
||||
|
||||
syndicate
|
||||
btemp1 = 150
|
||||
btemp2 = 20
|
||||
|
||||
proximity
|
||||
btype = 1
|
||||
|
||||
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/plasma/PT = new(V)
|
||||
var/obj/item/weapon/tank/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/plasma/PT = new(V)
|
||||
var/obj/item/weapon/tank/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/plasma/PT = new(V)
|
||||
var/obj/item/weapon/tank/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()
|
||||
del(src)
|
||||
Reference in New Issue
Block a user