next-we-melt-the-memories-that-are

This commit is contained in:
Fox McCloud
2019-09-09 16:20:04 -04:00
parent d19961378d
commit 177ac43f23
26 changed files with 482 additions and 165 deletions
+71 -67
View File
@@ -1,88 +1,92 @@
/* Alien shit!
* Contains:
* effect/acid
*/
/*
* Acid
*/
/obj/effect/acid
gender = PLURAL
name = "acid"
desc = "Burbling corrossive stuff."
icon = 'icons/effects/effects.dmi'
desc = "Burbling corrosive stuff."
icon_state = "acid"
density = 0
density = FALSE
opacity = 0
anchored = 1
unacidable = 1
var/atom/target
var/ticks = 0
var/target_strength = 0
anchored = TRUE
resistance_flags = FIRE_PROOF | UNACIDABLE | ACID_PROOF
layer = ABOVE_NORMAL_TURF_LAYER
var/turf/target
/obj/effect/acid/New(loc, targ)
..(loc)
target = targ
/obj/effect/acid/Initialize(mapload, acid_pwr, acid_amt)
. = ..()
target = get_turf(src)
if(acid_amt)
acid_level = min(acid_amt * acid_pwr, 12000) //capped so the acid effect doesn't last a half hour on the floor.
//handle APCs and newscasters and stuff nicely
pixel_x = target.pixel_x
pixel_y = target.pixel_y
pixel_x = target.pixel_x + rand(-4,4)
pixel_y = target.pixel_y + rand(-4,4)
if(isturf(target)) //Turfs take twice as long to take down.
target_strength = 640
else
target_strength = 320
tick()
START_PROCESSING(SSobj, src)
/obj/effect/acid/proc/tick()
/obj/effect/acid/Destroy()
STOP_PROCESSING(SSobj, src)
target = null
return ..()
/obj/effect/acid/process()
. = 1
if(!target)
qdel(src)
return 0
ticks++
if(prob(5))
playsound(loc, 'sound/items/welder.ogg', 100, TRUE)
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/simulated/mineral))
var/turf/simulated/mineral/M = target
M.ChangeTurf(/turf/simulated/floor/plating/asteroid/airless)
if(istype(target, /turf/simulated/floor))
var/turf/simulated/floor/F = target
F.ChangeTurf(F.baseturf)
if(istype(target, /turf/simulated/wall))
var/turf/simulated/wall/W = target
W.dismantle_wall(1)
else
qdel(target)
for(var/obj/O in target)
if(prob(20) && !(resistance_flags & UNACIDABLE))
if(O.acid_level < acid_level * 0.3)
var/acid_used = min(acid_level * 0.05, 20)
O.acid_act(10, acid_used)
acid_level = max(0, acid_level - acid_used * 10)
acid_level = max(acid_level - (5 + 2 * round(sqrt(acid_level))), 0)
if(acid_level <= 0)
qdel(src)
return
return 0
x = target.x
y = target.y
z = target.z
/obj/effect/acid/Crossed(AM as mob|obj)
if(isliving(AM))
var/mob/living/L = AM
if(L.flying)
return
if(L.m_intent != MOVE_INTENT_WALK && prob(40))
var/acid_used = min(acid_level * 0.05, 20)
if(L.acid_act(10, acid_used, "feet"))
acid_level = max(0, acid_level - acid_used * 10)
playsound(L, 'sound/weapons/sear.ogg', 50, TRUE)
to_chat(L, "<span class='userdanger'>[src] burns you!</span>")
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>")
//xenomorph corrosive acid
/obj/effect/acid/alien
var/target_strength = 30
spawn(1)
if(src)
tick()
/obj/effect/acid/alien/process()
. = ..()
if(.)
if(prob(45))
playsound(loc, 'sound/items/welder.ogg', 100, TRUE)
target_strength--
if(target_strength <= 0)
target.visible_message("<span class='warning'>[target] collapses under its own weight into a puddle of goop and undigested debris!</span>")
target.acid_melt()
qdel(src)
else
switch(target_strength)
if(24)
visible_message("<span class='warning'>[target] is holding up against the acid!</span>")
if(16)
visible_message("<span class='warning'>[target] is being melted by the acid!</span>")
if(8)
visible_message("<span class='warning'>[target] is struggling to withstand the acid!</span>")
if(4)
visible_message("<span class='warning'>[target] begins to crumble under the acid!</span>")
@@ -1,6 +1,12 @@
/obj/effect/decal/remains
gender = PLURAL
/obj/effect/decal/remains/acid_act()
visible_message("<span class='warning'>[src] dissolve[gender==PLURAL?"":"s"] into a puddle of sizzling goop!</span>")
playsound(src, 'sound/items/welder.ogg', 150, TRUE)
new /obj/effect/decal/cleanable/greenglow(drop_location())
qdel(src)
/obj/effect/decal/remains/human
name = "remains"
desc = "They look like human remains. They have a strange aura about them."
+6
View File
@@ -15,6 +15,12 @@
/obj/effect/attack_hulk(mob/living/carbon/human/user, does_attack_animation = FALSE)
return FALSE
/obj/effect/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE)
return
/obj/effect/acid_act()
return
/obj/effect/decal
plane = FLOOR_PLANE
var/no_scoop = FALSE //if it has this, don't let it be scooped up
+7
View File
@@ -188,3 +188,10 @@
/obj/structure/glowshroom/proc/CheckEndurance()
if(endurance <= 0)
qdel(src)
/obj/structure/glowshroom/acid_act(acidpwr, acid_volume)
. = 1
visible_message("<span class='danger'>[src] melts away!</span>")
var/obj/effect/decal/cleanable/molten_object/I = new (get_turf(src))
I.desc = "Looks like this was \an [src] some time ago."
qdel(src)