mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 05:57:24 +01:00
Merge remote-tracking branch 'ParadiseSS13/master' into Virtual-Avatars
This commit is contained in:
@@ -337,8 +337,8 @@ steam.start() -- spawns the effect
|
||||
return
|
||||
|
||||
|
||||
/obj/effect/effect/bad_smoke/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(air_group || (height==0)) return 1
|
||||
/obj/effect/effect/bad_smoke/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)
|
||||
@@ -877,21 +877,22 @@ steam.start() -- spawns the effect
|
||||
// Similar to smoke, but spreads out more
|
||||
// metal foams leave behind a foamed metal wall
|
||||
|
||||
/obj/effect/effect/foam
|
||||
/obj/structure/foam
|
||||
name = "foam"
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "foam"
|
||||
opacity = 0
|
||||
anchored = 1
|
||||
density = 0
|
||||
layer = OBJ_LAYER + 0.9
|
||||
mouse_opacity = 0
|
||||
animate_movement = 0
|
||||
var/amount = 3
|
||||
var/expand = 1
|
||||
animate_movement = 0
|
||||
var/metal = 0
|
||||
|
||||
|
||||
/obj/effect/effect/foam/New(loc, var/ismetal=0)
|
||||
/obj/structure/foam/New(loc, var/ismetal=0)
|
||||
..(loc)
|
||||
icon_state = "[ismetal ? "m":""]foam"
|
||||
if(!ismetal && reagents)
|
||||
@@ -918,11 +919,11 @@ steam.start() -- spawns the effect
|
||||
|
||||
flick("[icon_state]-disolve", src)
|
||||
sleep(5)
|
||||
delete()
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
// on delete, transfer any reagents to the floor
|
||||
/obj/effect/effect/foam/Destroy()
|
||||
/obj/structure/foam/Destroy()
|
||||
if(!metal && reagents)
|
||||
reagents.handle_reactions()
|
||||
for(var/atom/A in oview(1, src))
|
||||
@@ -933,7 +934,7 @@ steam.start() -- spawns the effect
|
||||
reagents.reaction(A, TOUCH, fraction)
|
||||
return ..()
|
||||
|
||||
/obj/effect/effect/foam/process()
|
||||
/obj/structure/foam/process()
|
||||
if(--amount < 0)
|
||||
return
|
||||
|
||||
@@ -948,11 +949,11 @@ steam.start() -- spawns the effect
|
||||
if(!T.Enter(src))
|
||||
continue
|
||||
|
||||
var/obj/effect/effect/foam/F = locate() in T
|
||||
var/obj/structure/foam/F = locate() in T
|
||||
if(F)
|
||||
continue
|
||||
|
||||
F = new /obj/effect/effect/foam(T, metal)
|
||||
F = new /obj/structure/foam(T, metal)
|
||||
F.amount = amount
|
||||
if(!metal)
|
||||
F.create_reagents(15)
|
||||
@@ -963,15 +964,15 @@ steam.start() -- spawns the effect
|
||||
|
||||
// foam disolves when heated
|
||||
// except metal foams
|
||||
/obj/effect/effect/foam/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
/obj/structure/foam/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(!metal && prob(max(0, exposed_temperature - 475)))
|
||||
flick("[icon_state]-disolve", src)
|
||||
|
||||
spawn(5)
|
||||
delete()
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/effect/effect/foam/Crossed(var/atom/movable/AM)
|
||||
/obj/structure/foam/Crossed(var/atom/movable/AM)
|
||||
if(metal)
|
||||
return
|
||||
|
||||
@@ -1016,13 +1017,13 @@ steam.start() -- spawns the effect
|
||||
|
||||
/datum/effect/system/foam_spread/start()
|
||||
spawn(0)
|
||||
var/obj/effect/effect/foam/F = locate() in location
|
||||
var/obj/structure/foam/F = locate() in location
|
||||
if(F)
|
||||
F.amount += amount
|
||||
F.amount = min(F.amount, 27)
|
||||
return
|
||||
|
||||
F = new /obj/effect/effect/foam(location, metal)
|
||||
F = new /obj/structure/foam(location, metal)
|
||||
F.amount = amount
|
||||
|
||||
if(!metal) // don't carry other chemicals if a metal foam
|
||||
@@ -1124,8 +1125,7 @@ steam.start() -- spawns the effect
|
||||
M.visible_message("<span class='danger'>[M] tears apart \the [src]!</span>");
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/foamedmetal/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
|
||||
if(air_group) return 0
|
||||
/obj/structure/foamedmetal/CanPass(atom/movable/mover, turf/target, height=1.5)
|
||||
return !density
|
||||
|
||||
/obj/structure/foamedmetal/CanAtmosPass()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//separate dm since hydro is getting bloated already
|
||||
|
||||
/obj/effect/glowshroom
|
||||
/obj/structure/glowshroom
|
||||
name = "glowshroom"
|
||||
desc = "Mycena Bregprox, a species of mushroom that glows in the dark."
|
||||
anchored = 1
|
||||
@@ -10,30 +10,55 @@
|
||||
icon_state = "glowshroom" //replaced in New
|
||||
layer = 2.1
|
||||
var/endurance = 30
|
||||
var/potency = 30
|
||||
var/delay = 1200
|
||||
var/floor = 0
|
||||
var/yield = 3
|
||||
var/generation = 1
|
||||
var/spreadIntoAdjacentChance = 60
|
||||
light_color = "#006622"
|
||||
var/obj/item/seeds/myseed = /obj/item/seeds/glowshroom
|
||||
|
||||
obj/effect/glowshroom/glowcap
|
||||
/obj/structure/glowshroom/glowcap
|
||||
name = "glowcap"
|
||||
desc = "Mycena Ruthenia, a species of mushroom that, while it does glow in the dark, is not actually bioluminescent."
|
||||
icon_state = "glowcap"
|
||||
light_color = "#8E0300"
|
||||
myseed = /obj/item/seeds/glowshroom/glowcap
|
||||
|
||||
/obj/effect/glowshroom/single
|
||||
yield = 0
|
||||
/obj/structure/glowshroom/shadowshroom
|
||||
name = "shadowshroom"
|
||||
desc = "Mycena Umbra, a species of mushroom that emits shadow instead of light."
|
||||
icon_state = "shadowshroom"
|
||||
myseed = /obj/item/seeds/glowshroom/shadowshroom
|
||||
|
||||
/obj/effect/glowshroom/examine(mob/user)
|
||||
/obj/structure/glowshroom/single/Spread()
|
||||
return
|
||||
|
||||
/obj/structure/glowshroom/examine(mob/user)
|
||||
. = ..()
|
||||
to_chat(user, "This is a [generation]\th generation [name]!")
|
||||
|
||||
/obj/effect/glowshroom/New()
|
||||
/obj/structure/glowshroom/Destroy()
|
||||
if(myseed)
|
||||
qdel(myseed)
|
||||
myseed = null
|
||||
return ..()
|
||||
|
||||
/obj/structure/glowshroom/New(loc, obj/item/seeds/newseed, mutate_stats)
|
||||
..()
|
||||
set_light(round(potency/10))
|
||||
dir = CalcDir()
|
||||
if(newseed)
|
||||
myseed = newseed.Copy()
|
||||
myseed.forceMove(src)
|
||||
else
|
||||
myseed = new myseed(src)
|
||||
if(mutate_stats) //baby mushrooms have different stats :3
|
||||
myseed.adjust_potency(rand(-3,6))
|
||||
myseed.adjust_yield(rand(-1,2))
|
||||
myseed.adjust_production(rand(-3,6))
|
||||
myseed.adjust_endurance(rand(-3,6))
|
||||
delay = delay - myseed.production * 100 //So the delay goes DOWN with better stats instead of up. :I
|
||||
endurance = myseed.endurance
|
||||
if(myseed.get_gene(/datum/plant_gene/trait/glow))
|
||||
var/datum/plant_gene/trait/glow/G = myseed.get_gene(/datum/plant_gene/trait/glow)
|
||||
set_light(G.glow_range(myseed), G.glow_power(myseed), G.glow_color)
|
||||
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
|
||||
@@ -49,10 +74,12 @@ obj/effect/glowshroom/glowcap
|
||||
else //if on the floor, glowshroom on-floor sprite
|
||||
icon_state = "[base_icon_state]f"
|
||||
|
||||
addtimer(src, "Spread", delay)
|
||||
addtimer(src, "Spread", delay, FALSE)
|
||||
|
||||
/obj/effect/glowshroom/proc/Spread()
|
||||
for(var/i = 1 to yield)
|
||||
/obj/structure/glowshroom/proc/Spread()
|
||||
var/turf/ownturf = get_turf(src)
|
||||
var/shrooms_planted = 0
|
||||
for(var/i in 1 to myseed.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
|
||||
@@ -61,7 +88,9 @@ obj/effect/glowshroom/glowcap
|
||||
spreadsIntoAdjacent = TRUE
|
||||
|
||||
for(var/turf/simulated/floor/earth in view(3,src))
|
||||
if(spreadsIntoAdjacent || !locate(/obj/effect/glowshroom) in view(1,earth))
|
||||
if(!ownturf.CanAtmosPass(earth))
|
||||
continue
|
||||
if(spreadsIntoAdjacent || !locate(/obj/structure/glowshroom) in view(1,earth))
|
||||
possibleLocs += earth
|
||||
CHECK_TICK
|
||||
|
||||
@@ -72,7 +101,7 @@ obj/effect/glowshroom/glowcap
|
||||
|
||||
var/shroomCount = 0 //hacky
|
||||
var/placeCount = 1
|
||||
for(var/obj/effect/glowshroom/shroom in newLoc)
|
||||
for(var/obj/structure/glowshroom/shroom in newLoc)
|
||||
shroomCount++
|
||||
for(var/wallDir in cardinal)
|
||||
var/turf/isWall = get_step(newLoc,wallDir)
|
||||
@@ -81,16 +110,18 @@ obj/effect/glowshroom/glowcap
|
||||
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)
|
||||
var/obj/structure/glowshroom/child = new type(newLoc, myseed, TRUE)
|
||||
child.generation = generation + 1
|
||||
shrooms_planted++
|
||||
|
||||
CHECK_TICK
|
||||
else
|
||||
shrooms_planted++ //if we failed due to generation, don't try to plant one later
|
||||
if(shrooms_planted < myseed.yield) //if we didn't get all possible shrooms planted, try again later
|
||||
myseed.yield -= shrooms_planted
|
||||
addtimer(src, "Spread", delay, FALSE)
|
||||
|
||||
/obj/effect/glowshroom/proc/CalcDir(turf/location = loc)
|
||||
/obj/structure/glowshroom/proc/CalcDir(turf/location = loc)
|
||||
var/direction = 16
|
||||
|
||||
for(var/wallDir in cardinal)
|
||||
@@ -98,7 +129,7 @@ obj/effect/glowshroom/glowcap
|
||||
if(newTurf.density)
|
||||
direction |= wallDir
|
||||
|
||||
for(var/obj/effect/glowshroom/shroom in location)
|
||||
for(var/obj/structure/glowshroom/shroom in location)
|
||||
if(shroom == src)
|
||||
continue
|
||||
if(shroom.floor) //special
|
||||
@@ -122,13 +153,13 @@ obj/effect/glowshroom/glowcap
|
||||
floor = 1
|
||||
return 1
|
||||
|
||||
/obj/effect/glowshroom/attackby(obj/item/I, mob/user)
|
||||
/obj/structure/glowshroom/attackby(obj/item/I, mob/user)
|
||||
..()
|
||||
if(I.damtype != STAMINA)
|
||||
endurance -= I.force
|
||||
CheckEndurance()
|
||||
|
||||
/obj/effect/glowshroom/ex_act(severity)
|
||||
/obj/structure/glowshroom/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1)
|
||||
qdel(src)
|
||||
@@ -139,11 +170,11 @@ obj/effect/glowshroom/glowcap
|
||||
if(prob(5))
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/glowshroom/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
/obj/structure/glowshroom/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > 300)
|
||||
endurance -= 5
|
||||
CheckEndurance()
|
||||
|
||||
/obj/effect/glowshroom/proc/CheckEndurance()
|
||||
/obj/structure/glowshroom/proc/CheckEndurance()
|
||||
if(endurance <= 0)
|
||||
qdel(src)
|
||||
qdel(src)
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "uglyminearmed"
|
||||
var/triggered = 0
|
||||
var/faction = "syndicate"
|
||||
|
||||
/obj/effect/mine/proc/mineEffect(mob/living/victim)
|
||||
to_chat(victim, "<span class='danger'>*click*</span>")
|
||||
@@ -15,6 +16,8 @@
|
||||
return
|
||||
if(isanimal(AM))
|
||||
var/mob/living/simple_animal/SA = AM
|
||||
if(faction && (faction in SA.faction))
|
||||
return
|
||||
if(!SA.flying)
|
||||
triggermine(SA)
|
||||
else
|
||||
|
||||
@@ -121,6 +121,7 @@
|
||||
/obj/item/weapon/wirecutters = 10,
|
||||
/obj/item/weapon/wrench = 40,
|
||||
/obj/item/weapon/relic = 35,
|
||||
/obj/item/weaponcrafting/receiver = 20,
|
||||
/obj/item/clothing/shoes/brown = 30,
|
||||
/obj/item/seeds/ambrosia/deus = 10,
|
||||
/obj/item/seeds/ambrosia = 20,
|
||||
@@ -148,7 +149,7 @@
|
||||
/obj/item/weapon/implanter/storage = 1,
|
||||
/obj/item/toy/cards/deck/syndicate = 2,
|
||||
/obj/item/weapon/storage/secure/briefcase/syndie = 2,
|
||||
"" = 90
|
||||
"" = 70
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/crate_spawner // for ruins
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//generic procs copied from obj/effect/alien
|
||||
/obj/effect/spider
|
||||
/obj/structure/spider
|
||||
name = "web"
|
||||
desc = "it's stringy and sticky"
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
@@ -8,7 +8,7 @@
|
||||
var/health = 15
|
||||
|
||||
//similar to weeds, but only barfed out by nurses manually
|
||||
/obj/effect/spider/ex_act(severity)
|
||||
/obj/structure/spider/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
qdel(src)
|
||||
@@ -20,7 +20,7 @@
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/effect/spider/attackby(var/obj/item/weapon/W, var/mob/user, params)
|
||||
/obj/structure/spider/attackby(var/obj/item/weapon/W, var/mob/user, params)
|
||||
if(W.attack_verb.len)
|
||||
visible_message("<span class='danger'>[user] has [pick(W.attack_verb)] \the [src] with \the [W]!</span>")
|
||||
else
|
||||
@@ -38,29 +38,29 @@
|
||||
health -= damage
|
||||
healthcheck()
|
||||
|
||||
/obj/effect/spider/bullet_act(var/obj/item/projectile/Proj)
|
||||
/obj/structure/spider/bullet_act(var/obj/item/projectile/Proj)
|
||||
..()
|
||||
health -= Proj.damage
|
||||
healthcheck()
|
||||
|
||||
/obj/effect/spider/proc/healthcheck()
|
||||
/obj/structure/spider/proc/healthcheck()
|
||||
if(health <= 0)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/spider/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
/obj/structure/spider/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > 300)
|
||||
health -= 5
|
||||
healthcheck()
|
||||
|
||||
/obj/effect/spider/stickyweb
|
||||
/obj/structure/spider/stickyweb
|
||||
icon_state = "stickyweb1"
|
||||
|
||||
/obj/effect/spider/stickyweb/New()
|
||||
/obj/structure/spider/stickyweb/New()
|
||||
if(prob(50))
|
||||
icon_state = "stickyweb2"
|
||||
|
||||
/obj/effect/spider/stickyweb/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(air_group || (height==0)) return 1
|
||||
/obj/structure/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))
|
||||
@@ -71,7 +71,7 @@
|
||||
return prob(30)
|
||||
return 1
|
||||
|
||||
/obj/effect/spider/eggcluster
|
||||
/obj/structure/spider/eggcluster
|
||||
name = "egg cluster"
|
||||
desc = "They seem to pulse slightly with an inner life"
|
||||
icon_state = "eggs"
|
||||
@@ -80,24 +80,24 @@
|
||||
var/faction = list()
|
||||
var/master_commander = null
|
||||
|
||||
/obj/effect/spider/eggcluster/New()
|
||||
/obj/structure/spider/eggcluster/New()
|
||||
pixel_x = rand(3,-3)
|
||||
pixel_y = rand(3,-3)
|
||||
processing_objects.Add(src)
|
||||
|
||||
/obj/effect/spider/eggcluster/process()
|
||||
/obj/structure/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)
|
||||
var/obj/structure/spider/spiderling/S = new /obj/structure/spider/spiderling(src.loc)
|
||||
S.faction = faction
|
||||
S.master_commander = master_commander
|
||||
if(player_spiders)
|
||||
S.player_spiders = 1
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/spider/spiderling
|
||||
/obj/structure/spider/spiderling
|
||||
name = "spiderling"
|
||||
desc = "It never stays still for long."
|
||||
icon_state = "spiderling"
|
||||
@@ -113,27 +113,27 @@
|
||||
var/master_commander = null
|
||||
var/selecting_player = 0
|
||||
|
||||
/obj/effect/spider/spiderling/New()
|
||||
/obj/structure/spider/spiderling/New()
|
||||
pixel_x = rand(6,-6)
|
||||
pixel_y = rand(6,-6)
|
||||
processing_objects.Add(src)
|
||||
|
||||
/obj/effect/spider/spiderling/Bump(atom/user)
|
||||
/obj/structure/spider/spiderling/Bump(atom/user)
|
||||
if(istype(user, /obj/structure/table))
|
||||
src.loc = user.loc
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/effect/spider/spiderling/proc/die()
|
||||
/obj/structure/spider/spiderling/proc/die()
|
||||
visible_message("<span class='alert'>[src] dies!</span>")
|
||||
new /obj/effect/decal/cleanable/spiderling_remains(src.loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/spider/spiderling/healthcheck()
|
||||
/obj/structure/spider/spiderling/healthcheck()
|
||||
if(health <= 0)
|
||||
die()
|
||||
|
||||
/obj/effect/spider/spiderling/process()
|
||||
/obj/structure/spider/spiderling/process()
|
||||
if(travelling_in_vent)
|
||||
if(istype(src.loc, /turf))
|
||||
travelling_in_vent = 0
|
||||
@@ -217,16 +217,16 @@
|
||||
icon_state = "greenshatter"
|
||||
anchored = 1
|
||||
|
||||
/obj/effect/spider/cocoon
|
||||
/obj/structure/spider/cocoon
|
||||
name = "cocoon"
|
||||
desc = "Something wrapped in silky spider web"
|
||||
icon_state = "cocoon1"
|
||||
health = 60
|
||||
|
||||
/obj/effect/spider/cocoon/New()
|
||||
/obj/structure/spider/cocoon/New()
|
||||
icon_state = pick("cocoon1","cocoon2","cocoon3")
|
||||
|
||||
/obj/effect/spider/cocoon/Destroy()
|
||||
/obj/structure/spider/cocoon/Destroy()
|
||||
src.visible_message("<span class='danger'>\The [src] splits open.</span>")
|
||||
for(var/atom/movable/A in contents)
|
||||
A.loc = src.loc
|
||||
|
||||
Reference in New Issue
Block a user