mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-22 03:27:46 +01:00
Swarm Component + Pixel shift attack animation (#17179)
* Swarm!! * carp dmi * swarm * Proper swarming * Swarmers * Update --------- Co-authored-by: Selis <12716288+ItsSelis@users.noreply.github.com>
This commit is contained in:
@@ -195,12 +195,8 @@ note dizziness decrements automatically in the mob's Life() proc.
|
||||
else if(direction & WEST)
|
||||
pixel_x_diff = 8
|
||||
|
||||
var/default_pixel_x = initial(pixel_x)
|
||||
var/default_pixel_y = initial(pixel_y)
|
||||
var/mob/mob = src
|
||||
if(istype(mob))
|
||||
default_pixel_x = mob.default_pixel_x
|
||||
default_pixel_y = mob.default_pixel_y
|
||||
var/default_pixel_x = pixel_x
|
||||
var/default_pixel_y = pixel_y
|
||||
|
||||
animate(src, pixel_x = pixel_x + pixel_x_diff, pixel_y = pixel_y + pixel_y_diff, time = windup_time - 2)
|
||||
animate(pixel_x = default_pixel_x, pixel_y = default_pixel_y, time = 2)
|
||||
@@ -220,12 +216,8 @@ note dizziness decrements automatically in the mob's Life() proc.
|
||||
else if(direction & WEST)
|
||||
pixel_x_diff = -8
|
||||
|
||||
var/default_pixel_x = initial(pixel_x)
|
||||
var/default_pixel_y = initial(pixel_y)
|
||||
var/mob/mob = src
|
||||
if(istype(mob))
|
||||
default_pixel_x = mob.default_pixel_x
|
||||
default_pixel_y = mob.default_pixel_y
|
||||
var/default_pixel_x = pixel_x
|
||||
var/default_pixel_y = pixel_y
|
||||
|
||||
animate(src, pixel_x = pixel_x + pixel_x_diff, pixel_y = pixel_y + pixel_y_diff, time = 2)
|
||||
animate(pixel_x = default_pixel_x, pixel_y = default_pixel_y, time = 2)
|
||||
|
||||
@@ -25,6 +25,7 @@ GLOBAL_VAR_INIT(jellyfish_count, 0)
|
||||
icon_dead = "space_jellyfish_dead"
|
||||
has_eye_glow = TRUE
|
||||
hovering = TRUE
|
||||
density = FALSE
|
||||
|
||||
|
||||
faction = FACTION_JELLYFISH
|
||||
@@ -80,6 +81,16 @@ GLOBAL_VAR_INIT(jellyfish_count, 0)
|
||||
|
||||
var/reproduction_cooldown = 0
|
||||
|
||||
/mob/living/simple_mob/vore/alienanimals/space_jellyfish/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/swarming)
|
||||
|
||||
// Allows this mob to swarm
|
||||
/mob/living/simple_mob/vore/alienanimals/space_jellyfish/CanPass(atom/movable/mover, turf/target)
|
||||
if(isliving(mover) && !istype(mover, /mob/living/simple_mob/vore/alienanimals/space_jellyfish) && mover.density == TRUE)
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/datum/say_list/jellyfish
|
||||
emote_see = list("flickers", "flashes", "looms","pulses","sways","shimmers hypnotically")
|
||||
|
||||
|
||||
@@ -68,6 +68,7 @@
|
||||
icon_living = "guard"
|
||||
icon_dead = "guard_dead"
|
||||
has_eye_glow = TRUE
|
||||
density = FALSE
|
||||
|
||||
faction = FACTION_SPIDERS
|
||||
maxHealth = 200
|
||||
@@ -119,6 +120,15 @@
|
||||
|
||||
allow_mind_transfer = TRUE
|
||||
|
||||
/mob/living/simple_mob/animal/giant_spider/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/swarming)
|
||||
|
||||
/mob/living/simple_mob/animal/giant_spider/CanPass(atom/movable/mover, turf/target)
|
||||
if(isliving(mover) && !istype(mover, /mob/living/simple_mob/animal/giant_spider) && mover.density == TRUE)
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_mob/animal/giant_spider/apply_melee_effects(var/atom/A)
|
||||
if(isliving(A))
|
||||
var/mob/living/L = A
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
name = "space carp"
|
||||
desc = "A ferocious, fang-bearing creature that resembles a fish."
|
||||
catalogue_data = list(/datum/category_item/catalogue/fauna/carp)
|
||||
icon = 'icons/mob/carp.dmi'
|
||||
icon_state = "carp"
|
||||
icon_living = "carp"
|
||||
icon_dead = "carp_dead"
|
||||
@@ -39,10 +40,13 @@
|
||||
health = 25
|
||||
movement_cooldown = -2
|
||||
hovering = TRUE
|
||||
density = FALSE
|
||||
|
||||
response_help = "pets the"
|
||||
response_disarm = "gently pushes aside the"
|
||||
response_harm = "hits the"
|
||||
vore_active = TRUE
|
||||
vore_icons = SA_ICON_LIVING
|
||||
response_help = "pets"
|
||||
response_disarm = "gently pushes aside"
|
||||
response_harm = "hits"
|
||||
|
||||
melee_damage_lower = 7 // About 14 DPS.
|
||||
melee_damage_upper = 7
|
||||
@@ -60,6 +64,85 @@
|
||||
|
||||
var/knockdown_chance = 15
|
||||
|
||||
var/random_color = FALSE
|
||||
var/rarechance = 1
|
||||
|
||||
var/static/list/carp_colors = list(\
|
||||
"lightpurple" = "#c3b9f1", \
|
||||
"lightpink" = "#da77a8", \
|
||||
"green" = "#70ff25", \
|
||||
"grape" = "#df0afb", \
|
||||
"swamp" = "#e5e75a", \
|
||||
"turquoise" = "#04e1ed", \
|
||||
"brown" = "#ca805a", \
|
||||
"teal" = "#20e28e", \
|
||||
"lightblue" = "#4d88cc", \
|
||||
"rusty" = "#dd5f34", \
|
||||
"beige" = "#bbaeaf", \
|
||||
"yellow" = "#f3ca4a", \
|
||||
"blue" = "#09bae1", \
|
||||
"palegreen" = "#7ef099", \
|
||||
)
|
||||
var/static/list/carp_colors_rare = list(\
|
||||
"silver" = "#fdfbf3", \
|
||||
)
|
||||
|
||||
/mob/living/simple_mob/animal/space/carp/Initialize()
|
||||
. = ..()
|
||||
carp_randomify(rarechance)
|
||||
update_icons()
|
||||
AddComponent(/datum/component/swarming)
|
||||
|
||||
// This is so carps can swarm
|
||||
/mob/living/simple_mob/animal/space/carp/CanPass(atom/movable/mover, turf/target)
|
||||
if(isliving(mover) && !istype(mover, /mob/living/simple_mob/animal/space/carp) && mover.density == TRUE)
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_mob/animal/space/carp/proc/carp_randomify(rarechance)
|
||||
if(random_color)
|
||||
var/our_color
|
||||
if(prob(rarechance))
|
||||
our_color = pick(carp_colors_rare)
|
||||
add_atom_colour(carp_colors_rare[our_color], FIXED_COLOUR_PRIORITY)
|
||||
else
|
||||
our_color = pick(carp_colors)
|
||||
add_atom_colour(carp_colors[our_color], FIXED_COLOUR_PRIORITY)
|
||||
regenerate_icons()
|
||||
|
||||
/mob/living/simple_mob/animal/space/carp/proc/add_carp_overlay()
|
||||
if(!random_color)
|
||||
return
|
||||
var/mutable_appearance/base_overlay = mutable_appearance(icon, "base_mouth")
|
||||
base_overlay.appearance_flags = RESET_COLOR
|
||||
add_overlay(base_overlay)
|
||||
|
||||
/mob/living/simple_mob/animal/space/carp/proc/add_dead_carp_overlay()
|
||||
if(!random_color)
|
||||
return
|
||||
var/mutable_appearance/base_dead_overlay = mutable_appearance(icon, "base_dead_mouth")
|
||||
base_dead_overlay.appearance_flags = RESET_COLOR
|
||||
add_overlay(base_dead_overlay)
|
||||
|
||||
/mob/living/simple_mob/animal/space/carp/death(gibbed)
|
||||
. = ..()
|
||||
if(!random_color || gibbed)
|
||||
return
|
||||
regenerate_icons()
|
||||
|
||||
/mob/living/simple_mob/animal/space/carp/revive()
|
||||
..()
|
||||
regenerate_icons()
|
||||
|
||||
/mob/living/simple_mob/animal/space/carp/regenerate_icons()
|
||||
..()
|
||||
if(!random_color)
|
||||
return
|
||||
if(stat != DEAD)
|
||||
add_carp_overlay()
|
||||
else
|
||||
add_dead_carp_overlay()
|
||||
|
||||
/mob/living/simple_mob/animal/space/carp/apply_melee_effects(var/atom/A)
|
||||
if(isliving(A))
|
||||
var/mob/living/L = A
|
||||
@@ -81,6 +164,7 @@
|
||||
icon_state = "shark"
|
||||
icon_living = "shark"
|
||||
icon_dead = "shark_dead"
|
||||
vore_icons = FALSE
|
||||
|
||||
maxHealth = 50
|
||||
health = 50
|
||||
@@ -102,6 +186,7 @@
|
||||
icon_dead = "megacarp_dead"
|
||||
icon_living = "megacarp"
|
||||
icon_state = "megacarp"
|
||||
vore_icons = FALSE
|
||||
|
||||
maxHealth = 230
|
||||
health = 230
|
||||
@@ -174,6 +259,7 @@
|
||||
icon_gib = null
|
||||
meat_amount = 0
|
||||
meat_type = null
|
||||
vore_icons = FALSE
|
||||
|
||||
mob_class = MOB_CLASS_PHOTONIC // Xeno-taser won't work on this as its not a 'real' carp.
|
||||
|
||||
|
||||
@@ -32,7 +32,8 @@
|
||||
health = 15
|
||||
movement_cooldown = -2
|
||||
|
||||
pass_flags = PASSTABLE
|
||||
pass_flags = PASSTABLE | PASSMOB
|
||||
a_intent = I_HURT
|
||||
mob_swap_flags = 0
|
||||
mob_push_flags = 0
|
||||
|
||||
@@ -49,6 +50,10 @@
|
||||
|
||||
ai_holder_type = /datum/ai_holder/simple_mob/melee/evasive
|
||||
|
||||
/mob/living/simple_mob/mechanical/viscerator/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/swarming)
|
||||
|
||||
/mob/living/simple_mob/mechanical/viscerator/death()
|
||||
..(null,"is smashed into pieces!")
|
||||
qdel(src)
|
||||
|
||||
@@ -46,6 +46,10 @@
|
||||
|
||||
allow_mind_transfer = TRUE
|
||||
|
||||
/mob/living/simple_mob/vore/bee/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/swarming)
|
||||
|
||||
/mob/living/simple_mob/vore/bee/Process_Spacemove(var/check_drift = 0)
|
||||
return 1 //No drifting in space for space bee!
|
||||
|
||||
|
||||
@@ -119,21 +119,6 @@
|
||||
melee_damage_upper = 15
|
||||
attack_armor_pen = 0
|
||||
|
||||
/mob/living/simple_mob/animal/space/carp
|
||||
icon = 'icons/mob/vore.dmi'
|
||||
vore_active = 1
|
||||
vore_icons = SA_ICON_LIVING
|
||||
response_help = "pets"
|
||||
response_disarm = "gently pushes aside"
|
||||
response_harm = "hits"
|
||||
|
||||
/mob/living/simple_mob/animal/space/carp/large
|
||||
vore_icons = 0
|
||||
/mob/living/simple_mob/animal/space/carp/large/huge
|
||||
vore_icons = 0
|
||||
/mob/living/simple_mob/animal/space/carp/holodeck
|
||||
vore_icons = 0
|
||||
|
||||
/* //VOREStation AI Temporary removal
|
||||
/mob/living/simple_mob/hostile/creature/vore
|
||||
vore_active = 1
|
||||
|
||||
Reference in New Issue
Block a user