diff --git a/code/game/objects/effects/aliens.dm b/code/game/objects/effects/aliens.dm
index c5699769067..cf51041e361 100644
--- a/code/game/objects/effects/aliens.dm
+++ b/code/game/objects/effects/aliens.dm
@@ -7,6 +7,10 @@
* effect/acid
*/
+#define WEED_NORTH_EDGING "north"
+#define WEED_SOUTH_EDGING "south"
+#define WEED_EAST_EDGING "east"
+#define WEED_WEST_EDGING "west"
/obj/structure/alien
icon = 'icons/mob/alien.dmi'
@@ -27,6 +31,7 @@
var/resintype = null
smooth = SMOOTH_TRUE
+
/obj/structure/alien/resin/New(location)
..()
air_update_turf(1)
@@ -44,7 +49,7 @@
name = "resin wall"
desc = "Thick resin solidified into a wall."
icon = 'icons/obj/smooth_structures/alien/resin_wall.dmi'
- icon_state = "resin" //same as resin, but consistency ho!
+ icon_state = "wall0" //same as resin, but consistency ho!
resintype = "wall"
canSmoothWith = list(/obj/structure/alien/resin/wall, /obj/structure/alien/resin/membrane)
@@ -60,7 +65,7 @@
name = "resin membrane"
desc = "Resin just thin enough to let light pass through."
icon = 'icons/obj/smooth_structures/alien/resin_membrane.dmi'
- icon_state = "membrane"
+ icon_state = "membrane0"
opacity = 0
health = 120
resintype = "membrane"
@@ -77,13 +82,13 @@
healthcheck()
-/obj/structure/alien/resin/ex_act(severity, target)
+/obj/structure/alien/resin/ex_act(severity)
switch(severity)
- if(1.0)
+ if(1)
health -= 150
- if(2.0)
+ if(2)
health -= 100
- if(3.0)
+ if(3)
health -= 50
healthcheck()
@@ -105,7 +110,6 @@
health -= tforce
healthcheck()
-
/obj/structure/alien/resin/attack_hand(mob/living/user)
if(HULK in user.mutations)
user.do_attack_animation(src)
@@ -157,6 +161,7 @@
layer = 2
var/health = 15
var/obj/structure/alien/weeds/node/linked_node = null
+ var/static/list/weedImageCache
/obj/structure/alien/weeds/New(pos, node)
@@ -191,6 +196,7 @@
return
for(var/turf/T in U.GetAtmosAdjacentTurfs())
+
if(locate(/obj/structure/alien/weeds) in T || istype(T, /turf/space))
continue
@@ -208,7 +214,7 @@
else
visible_message("[user] has attacked [src] with [I]!")
- var/damage = I.force / 4.0
+ var/damage = I.force / 4
if(istype(I, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = I
if(WT.remove_fuel(0, user))
@@ -229,25 +235,35 @@
health -= 5
healthcheck()
+
/obj/structure/alien/weeds/proc/updateWeedOverlays()
overlays.Cut()
+
+ if(!weedImageCache || !weedImageCache.len)
+ weedImageCache = list()
+ weedImageCache.len = 4
+ weedImageCache[WEED_NORTH_EDGING] = image('icons/mob/alien.dmi', "weeds_side_n", layer=2.11, pixel_y = -32)
+ weedImageCache[WEED_SOUTH_EDGING] = image('icons/mob/alien.dmi', "weeds_side_s", layer=2.11, pixel_y = 32)
+ weedImageCache[WEED_EAST_EDGING] = image('icons/mob/alien.dmi', "weeds_side_e", layer=2.11, pixel_x = -32)
+ weedImageCache[WEED_WEST_EDGING] = image('icons/mob/alien.dmi', "weeds_side_w", layer=2.11, pixel_x = 32)
+
var/turf/N = get_step(src, NORTH)
var/turf/S = get_step(src, SOUTH)
var/turf/E = get_step(src, EAST)
var/turf/W = get_step(src, WEST)
if(!locate(/obj/structure/alien) in N.contents)
if(istype(N, /turf/simulated/floor))
- src.overlays += image('icons/mob/alien.dmi', "weeds_side_s", layer=2, pixel_y = 32)
+ overlays += weedImageCache[WEED_SOUTH_EDGING]
if(!locate(/obj/structure/alien) in S.contents)
if(istype(S, /turf/simulated/floor))
- src.overlays += image('icons/mob/alien.dmi', "weeds_side_n", layer=2, pixel_y = -32)
+ overlays += weedImageCache[WEED_NORTH_EDGING]
if(!locate(/obj/structure/alien) in E.contents)
if(istype(E, /turf/simulated/floor))
- src.overlays += image('icons/mob/alien.dmi', "weeds_side_w", layer=2, pixel_x = 32)
+ overlays += weedImageCache[WEED_WEST_EDGING]
if(!locate(/obj/structure/alien) in W.contents)
if(istype(W, /turf/simulated/floor))
- src.overlays += image('icons/mob/alien.dmi', "weeds_side_e", layer=2, pixel_x = -32)
+ overlays += weedImageCache[WEED_EAST_EDGING]
/obj/structure/alien/weeds/proc/fullUpdateWeedOverlays()
@@ -289,6 +305,7 @@
anchored = 1
var/health = 100
var/status = GROWING //can be GROWING, GROWN or BURST; all mutually exclusive
+ layer = MOB_LAYER
/obj/structure/alien/egg/New()
@@ -297,51 +314,34 @@
spawn(rand(MIN_GROWTH_TIME, MAX_GROWTH_TIME))
Grow()
-
-/obj/structure/alien/egg/attack_alien(mob/user)
- if(isalien(user))
- switch(status)
- if(BURST)
- user << "You clear the hatched egg."
- playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
- qdel(src)
- return
- if(GROWING)
- user << "The child is not developed yet."
- return
- if(GROWN)
- user << "You retrieve the child."
- Burst(0)
- return
- else
- return attack_hand(user)
-
-
-/obj/structure/alien/egg/attack_hand(mob/user)
+/obj/structure/alien/egg/attack_hand(mob/living/user)
if(user.get_int_organ(/obj/item/organ/internal/xenos/plasmavessel))
switch(status)
if(BURST)
user << "You clear the hatched egg."
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
qdel(src)
+ return
if(GROWING)
user << "The child is not developed yet."
+ return
if(GROWN)
user << "You retrieve the child."
Burst(0)
+ return
else
user << "It feels slimy."
+ user.changeNext_move(CLICK_CD_MELEE)
+
/obj/structure/alien/egg/proc/GetFacehugger()
return locate(/obj/item/clothing/mask/facehugger) in contents
-
/obj/structure/alien/egg/proc/Grow()
icon_state = "egg"
status = GROWN
-
-/obj/structure/alien/egg/proc/Burst(var/kill = 1) //drops and kills the hugger if any is remaining
+/obj/structure/alien/egg/proc/Burst(kill = 1) //drops and kills the hugger if any is remaining
if(status == GROWN || status == GROWING)
icon_state = "egg_hatched"
flick("egg_opening", src)
@@ -359,7 +359,6 @@
child.Attach(M)
break
-
/obj/structure/alien/egg/bullet_act(obj/item/projectile/Proj)
health -= Proj.damage
..()
@@ -367,7 +366,6 @@
/obj/structure/alien/egg/attackby(obj/item/I, mob/user, params)
- user.changeNext_move(CLICK_CD_MELEE)
if(I.attack_verb.len)
visible_message("[user] has [pick(I.attack_verb)] [src] with [I]!")
else
@@ -382,6 +380,7 @@
playsound(loc, 'sound/items/Welder.ogg', 100, 1)
health -= damage
+ user.changeNext_move(CLICK_CD_MELEE)
healthcheck()
@@ -405,7 +404,7 @@
return
var/mob/living/carbon/C = AM
- if(C.stat == CONSCIOUS && C.status_flags & XENO_HOST)
+ if(C.stat == CONSCIOUS && C.get_int_organ(/obj/item/organ/internal/body_egg/alien_embryo))
return
Burst(0)
@@ -460,9 +459,23 @@
if(ticks >= target_strength)
target.visible_message("[target] collapses under its own weight into a puddle of goop and undigested debris!")
+ 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/space)
+
+ 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)
@@ -485,4 +498,9 @@
spawn(1)
if(src)
- tick()
\ No newline at end of file
+ tick()
+
+#undef WEED_NORTH_EDGING
+#undef WEED_SOUTH_EDGING
+#undef WEED_EAST_EDGING
+#undef WEED_WEST_EDGING
diff --git a/code/modules/mob/living/carbon/alien/death.dm b/code/modules/mob/living/carbon/alien/death.dm
index 693763e4960..115a49f20a8 100644
--- a/code/modules/mob/living/carbon/alien/death.dm
+++ b/code/modules/mob/living/carbon/alien/death.dm
@@ -11,6 +11,8 @@
animation.icon = 'icons/mob/mob.dmi'
animation.master = src
+ playsound(src.loc, 'sound/goonstation/effects/gib.ogg', 50, 1)
+
flick("gibbed-a", animation)
xgibs(loc, viruses)
dead_mob_list -= src
diff --git a/icons/mob/alien.dmi b/icons/mob/alien.dmi
index 9d1022b8a2e..0e019014c57 100644
Binary files a/icons/mob/alien.dmi and b/icons/mob/alien.dmi differ