mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-11 23:23:28 +01:00
separates alien structures and effects into own files
fixes aliens not being able to open egg
This commit is contained in:
@@ -0,0 +1,88 @@
|
||||
/* Alien shit!
|
||||
* Contains:
|
||||
* effect/acid
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Acid
|
||||
*/
|
||||
/obj/effect/acid
|
||||
gender = PLURAL
|
||||
name = "acid"
|
||||
desc = "Burbling corrossive stuff."
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
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/simulated/mineral))
|
||||
var/turf/simulated/mineral/M = target
|
||||
M.ChangeTurf(/turf/simulated/floor/plating/airless/asteroid)
|
||||
|
||||
if(istype(target, /turf/simulated/floor))
|
||||
var/turf/simulated/floor/F = target
|
||||
F.ChangeTurf(/turf/space)
|
||||
|
||||
if(istype(target, /turf/simulated/wall))
|
||||
var/turf/simulated/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()
|
||||
@@ -4,7 +4,6 @@
|
||||
* Resin
|
||||
* Weeds
|
||||
* Egg
|
||||
* effect/acid
|
||||
*/
|
||||
|
||||
#define WEED_NORTH_EDGING "north"
|
||||
@@ -317,6 +316,9 @@
|
||||
spawn(rand(MIN_GROWTH_TIME, MAX_GROWTH_TIME))
|
||||
Grow()
|
||||
|
||||
/obj/structure/alien/egg/attack_alien(mob/living/carbon/alien/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/structure/alien/egg/attack_hand(mob/living/user)
|
||||
if(user.get_int_organ(/obj/item/organ/internal/xenos/plasmavessel))
|
||||
switch(status)
|
||||
@@ -420,90 +422,6 @@
|
||||
#undef MIN_GROWTH_TIME
|
||||
#undef MAX_GROWTH_TIME
|
||||
|
||||
|
||||
/*
|
||||
* Acid
|
||||
*/
|
||||
/obj/effect/acid
|
||||
gender = PLURAL
|
||||
name = "acid"
|
||||
desc = "Burbling corrossive stuff."
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
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/simulated/mineral))
|
||||
var/turf/simulated/mineral/M = target
|
||||
M.ChangeTurf(/turf/simulated/floor/plating/airless/asteroid)
|
||||
|
||||
if(istype(target, /turf/simulated/floor))
|
||||
var/turf/simulated/floor/F = target
|
||||
F.ChangeTurf(/turf/space)
|
||||
|
||||
if(istype(target, /turf/simulated/wall))
|
||||
var/turf/simulated/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()
|
||||
|
||||
#undef WEED_NORTH_EDGING
|
||||
#undef WEED_SOUTH_EDGING
|
||||
#undef WEED_EAST_EDGING
|
||||
+2
-1
@@ -707,7 +707,7 @@
|
||||
#include "code\game\objects\objs.dm"
|
||||
#include "code\game\objects\structures.dm"
|
||||
#include "code\game\objects\weapons.dm"
|
||||
#include "code\game\objects\effects\aliens.dm"
|
||||
#include "code\game\objects\effects\alien_acid.dm"
|
||||
#include "code\game\objects\effects\anomalies.dm"
|
||||
#include "code\game\objects\effects\bump_teleporter.dm"
|
||||
#include "code\game\objects\effects\effects.dm"
|
||||
@@ -944,6 +944,7 @@
|
||||
#include "code\game\objects\items\weapons\tanks\tanks.dm"
|
||||
#include "code\game\objects\items\weapons\tanks\watertank.dm"
|
||||
#include "code\game\objects\random\random.dm"
|
||||
#include "code\game\objects\structures\aliens.dm"
|
||||
#include "code\game\objects\structures\artstuff.dm"
|
||||
#include "code\game\objects\structures\barsign.dm"
|
||||
#include "code\game\objects\structures\bedsheet_bin.dm"
|
||||
|
||||
Reference in New Issue
Block a user