mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 20:16:55 +01:00
Merge pull request #16405 from AffectedArc07/removes-headcrabs
Removes headcrabs
This commit is contained in:
@@ -182,7 +182,6 @@ GLOBAL_LIST_EMPTY(event_last_fired)
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Swarmer Spawn", /datum/event/spawn_swarmer, 150, is_one_shot = TRUE),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Morph Spawn", /datum/event/spawn_morph, 40, list(ASSIGNMENT_SECURITY = 10), is_one_shot = TRUE),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Disease Outbreak", /datum/event/disease_outbreak, 0, list(ASSIGNMENT_MEDICAL = 150), TRUE),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Headcrabs", /datum/event/headcrabs, 0, list(ASSIGNMENT_SECURITY = 20)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Door Runtime", /datum/event/door_runtime, 50, list(ASSIGNMENT_ENGINEER = 25, ASSIGNMENT_AI = 150), TRUE)
|
||||
)
|
||||
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
#define HEADCRAB_NORMAL 0
|
||||
#define HEADCRAB_FASTMIX 1
|
||||
#define HEADCRAB_FAST 2
|
||||
#define HEADCRAB_POISONMIX 3
|
||||
#define HEADCRAB_POISON 4
|
||||
#define HEADCRAB_SPAWNER 5
|
||||
|
||||
/datum/event/headcrabs
|
||||
announceWhen = 10
|
||||
endWhen = 11
|
||||
var/locstring
|
||||
var/headcrab_type
|
||||
|
||||
/datum/event/headcrabs/start()
|
||||
var/list/availableareas = list()
|
||||
for(var/area/maintenance/A in world)
|
||||
availableareas += A
|
||||
var/area/randomarea = pick(availableareas)
|
||||
var/list/turf/simulated/floor/turfs = list()
|
||||
for(var/turf/simulated/floor/F in randomarea)
|
||||
if(turf_clear(F))
|
||||
turfs += F
|
||||
var/list/spawn_types = list()
|
||||
var/max_number
|
||||
headcrab_type = rand(0, 5)
|
||||
switch(headcrab_type)
|
||||
if(HEADCRAB_NORMAL)
|
||||
spawn_types = list(/mob/living/simple_animal/hostile/headcrab)
|
||||
max_number = 6
|
||||
if(HEADCRAB_FASTMIX)
|
||||
spawn_types = list(/mob/living/simple_animal/hostile/headcrab, /mob/living/simple_animal/hostile/headcrab/fast)
|
||||
max_number = 8
|
||||
if(HEADCRAB_FAST)
|
||||
spawn_types = list(/mob/living/simple_animal/hostile/headcrab/fast)
|
||||
max_number = 6
|
||||
if(HEADCRAB_POISONMIX)
|
||||
spawn_types = list(/mob/living/simple_animal/hostile/headcrab, /mob/living/simple_animal/hostile/headcrab/poison)
|
||||
max_number = 4
|
||||
if(HEADCRAB_POISON)
|
||||
spawn_types = list(/mob/living/simple_animal/hostile/headcrab/poison)
|
||||
max_number = 3
|
||||
if(HEADCRAB_SPAWNER)
|
||||
spawn_types = list(/obj/structure/spawner/headcrab)
|
||||
max_number = 2
|
||||
|
||||
|
||||
var/num = rand(2,max_number)
|
||||
|
||||
while(turfs.len > 0 && num > 0)
|
||||
var/turf/simulated/floor/T = pick(turfs)
|
||||
turfs.Remove(T)
|
||||
num--
|
||||
var/spawn_type = pick(spawn_types)
|
||||
new spawn_type(T)
|
||||
|
||||
|
||||
/datum/event/headcrabs/announce()
|
||||
GLOB.event_announcement.Announce("Bioscans indicate that headcrabs have been breeding on the station. Clear them out, before this starts to affect productivity", "Lifesign Alert")
|
||||
|
||||
#undef HEADCRAB_NORMAL
|
||||
#undef HEADCRAB_FASTMIX
|
||||
#undef HEADCRAB_FAST
|
||||
#undef HEADCRAB_POISONMIX
|
||||
#undef HEADCRAB_POISON
|
||||
#undef HEADCRAB_SPAWNER
|
||||
@@ -1,193 +0,0 @@
|
||||
/mob/living/simple_animal/hostile/headcrab
|
||||
name = "headcrab"
|
||||
desc = "A small parasitic creature that would like to connect with your brain stem."
|
||||
icon = 'icons/mob/headcrab.dmi'
|
||||
icon_state = "headcrab"
|
||||
icon_living = "headcrab"
|
||||
icon_dead = "headcrab_dead"
|
||||
health = 60
|
||||
maxHealth = 60
|
||||
dodging = 1
|
||||
melee_damage_lower = 5
|
||||
melee_damage_upper = 10
|
||||
ranged = 1
|
||||
ranged_message = "leaps"
|
||||
ranged_cooldown_time = 40
|
||||
var/jumpdistance = 4
|
||||
var/jumpspeed = 1
|
||||
attacktext = "bites"
|
||||
attack_sound = 'sound/creatures/headcrab_attack.ogg'
|
||||
speak_emote = list("hisses")
|
||||
var/is_zombie = 0
|
||||
stat_attack = DEAD // Necessary for them to attack (zombify) dead humans
|
||||
robust_searching = 1
|
||||
var/host_species = ""
|
||||
var/list/human_overlays = list()
|
||||
|
||||
/mob/living/simple_animal/hostile/headcrab/Life(seconds, times_fired)
|
||||
if(..() && !stat)
|
||||
if(!is_zombie && isturf(src.loc))
|
||||
for(var/mob/living/carbon/human/H in oview(src, 1)) //Only for corpse right next to/on same tile
|
||||
if(H.stat == DEAD || (!H.check_death_method() && H.health <= HEALTH_THRESHOLD_DEAD))
|
||||
Zombify(H)
|
||||
break
|
||||
if(times_fired % 4 == 0)
|
||||
for(var/mob/living/simple_animal/K in oview(src, 1)) //Only for corpse right next to/on same tile
|
||||
if(K.stat == DEAD || (!K.check_death_method() && K.health <= HEALTH_THRESHOLD_DEAD))
|
||||
visible_message("<span class='danger'>[src] consumes [K] whole!</span>")
|
||||
if(health < maxHealth)
|
||||
health += 10
|
||||
qdel(K)
|
||||
break
|
||||
|
||||
/mob/living/simple_animal/hostile/headcrab/OpenFire(atom/A)
|
||||
if(check_friendly_fire)
|
||||
for(var/turf/T in getline(src,A)) // Not 100% reliable but this is faster than simulating actual trajectory
|
||||
for(var/mob/living/L in T)
|
||||
if(L == src || L == A)
|
||||
continue
|
||||
if(faction_check_mob(L) && !attack_same)
|
||||
return
|
||||
visible_message("<span class='danger'><b>[src]</b> [ranged_message] at [A]!</span>")
|
||||
throw_at(A, jumpdistance, jumpspeed, spin = FALSE, diagonals_first = TRUE)
|
||||
ranged_cooldown = world.time + ranged_cooldown_time
|
||||
|
||||
/mob/living/simple_animal/hostile/headcrab/proc/Zombify(mob/living/carbon/human/H)
|
||||
if(!H.check_death_method())
|
||||
H.death()
|
||||
var/obj/item/organ/external/head/head_organ = H.get_organ("head")
|
||||
is_zombie = TRUE
|
||||
if(H.wear_suit)
|
||||
var/obj/item/clothing/suit/armor/A = H.wear_suit
|
||||
if(A.armor && A.armor.getRating("melee"))
|
||||
maxHealth += A.armor.getRating("melee") //That zombie's got armor, I want armor!
|
||||
maxHealth += 200
|
||||
health = maxHealth
|
||||
name = "zombie"
|
||||
desc = "A corpse animated by the alien being on its head."
|
||||
melee_damage_lower = 10
|
||||
melee_damage_upper = 15
|
||||
ranged = 0
|
||||
stat_attack = CONSCIOUS // Disables their targeting of dead mobs once they're already a zombie
|
||||
icon = H.icon
|
||||
speak = list('sound/creatures/zombie_idle1.ogg','sound/creatures/zombie_idle2.ogg','sound/creatures/zombie_idle3.ogg')
|
||||
speak_chance = 50
|
||||
speak_emote = list("groans")
|
||||
attacktext = "bites"
|
||||
attack_sound = 'sound/creatures/zombie_attack.ogg'
|
||||
icon_state = "zombie2_s"
|
||||
if(head_organ && !(NO_HAIR in H.dna.species.species_traits))
|
||||
head_organ.h_style = null
|
||||
H.update_hair()
|
||||
host_species = H.dna.species.name
|
||||
human_overlays = H.overlays
|
||||
update_icons()
|
||||
H.forceMove(src)
|
||||
visible_message("<span class='warning'>The corpse of [H.name] suddenly rises!</span>")
|
||||
|
||||
/mob/living/simple_animal/hostile/headcrab/death()
|
||||
..()
|
||||
if(is_zombie)
|
||||
qdel(src)
|
||||
|
||||
/mob/living/simple_animal/hostile/headcrab/handle_automated_speech() // This way they have different screams when attacking, sometimes. Might be seen as sphagetthi code though.
|
||||
if(speak_chance)
|
||||
if(rand(0,200) < speak_chance)
|
||||
if(speak && speak.len)
|
||||
playsound(get_turf(src), pick(speak), 200, 1)
|
||||
|
||||
/mob/living/simple_animal/hostile/headcrab/Destroy()
|
||||
if(contents)
|
||||
for(var/mob/M in contents)
|
||||
M.loc = get_turf(src)
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/headcrab/update_icons()
|
||||
. = ..()
|
||||
if(is_zombie)
|
||||
overlays.Cut()
|
||||
overlays = human_overlays
|
||||
var/image/I = image('icons/mob/headcrab.dmi', icon_state = "headcrabpod")
|
||||
if(host_species == "Vox")
|
||||
I = image('icons/mob/headcrab.dmi', icon_state = "headcrabpod_vox")
|
||||
else if(host_species == "Gray")
|
||||
I = image('icons/mob/headcrab.dmi', icon_state = "headcrabpod_gray")
|
||||
overlays += I
|
||||
|
||||
/mob/living/simple_animal/hostile/headcrab/CanAttack(atom/the_target)
|
||||
if(stat_attack == DEAD && isliving(the_target) && !ishuman(the_target))
|
||||
var/mob/living/L = the_target
|
||||
if(L.stat == DEAD)
|
||||
// Override default behavior of stat_attack, to stop headcrabs targeting dead mobs they cannot infect, such as silicons.
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/headcrab/fast
|
||||
name = "fast headcrab"
|
||||
desc = "A fast parasitic creature that would like to connect with your brain stem."
|
||||
icon = 'icons/mob/headcrab.dmi'
|
||||
icon_state = "fast_headcrab"
|
||||
icon_living = "fast_headcrab"
|
||||
icon_dead = "fast_headcrab_dead"
|
||||
health = 40
|
||||
maxHealth = 40
|
||||
ranged_cooldown_time = 30
|
||||
jumpdistance = 8
|
||||
jumpspeed = 2
|
||||
speak_emote = list("screech")
|
||||
|
||||
/mob/living/simple_animal/hostile/headcrab/fast/update_icons()
|
||||
. = ..()
|
||||
if(is_zombie)
|
||||
overlays.Cut()
|
||||
overlays = human_overlays
|
||||
var/image/I = image('icons/mob/headcrab.dmi', icon_state = "fast_headcrabpod")
|
||||
if(host_species == "Vox")
|
||||
I = image('icons/mob/headcrab.dmi', icon_state = "fast_headcrabpod_vox")
|
||||
else if(host_species == "Gray")
|
||||
I = image('icons/mob/headcrab.dmi', icon_state = "fast_headcrabpod_gray")
|
||||
overlays += I
|
||||
|
||||
/mob/living/simple_animal/hostile/headcrab/fast/Zombify(mob/living/carbon/human/H)
|
||||
. = ..()
|
||||
speak = list('sound/creatures/fast_zombie_idle1.ogg','sound/creatures/fast_zombie_idle2.ogg','sound/creatures/fast_zombie_idle3.ogg')
|
||||
|
||||
/mob/living/simple_animal/hostile/headcrab/poison
|
||||
name = "poison headcrab"
|
||||
desc = "A poison parasitic creature that would like to connect with your brain stem."
|
||||
icon = 'icons/mob/headcrab.dmi'
|
||||
icon_state = "poison_headcrab"
|
||||
icon_living = "poison_headcrab"
|
||||
icon_dead = "poison_headcrab_dead"
|
||||
health = 80
|
||||
maxHealth = 80
|
||||
ranged_cooldown_time = 50
|
||||
jumpdistance = 3
|
||||
jumpspeed = 1
|
||||
melee_damage_lower = 8
|
||||
melee_damage_upper = 20
|
||||
attack_sound = 'sound/creatures/ph_scream1.ogg'
|
||||
speak_emote = list("screech")
|
||||
|
||||
/mob/living/simple_animal/hostile/headcrab/poison/update_icons()
|
||||
. = ..()
|
||||
if(is_zombie)
|
||||
overlays.Cut()
|
||||
overlays = human_overlays
|
||||
var/image/I = image('icons/mob/headcrab.dmi', icon_state = "poison_headcrabpod")
|
||||
if(host_species == "Vox")
|
||||
I = image('icons/mob/headcrab.dmi', icon_state = "poison_headcrabpod_vox")
|
||||
else if(host_species == "Gray")
|
||||
I = image('icons/mob/headcrab.dmi', icon_state = "poison_headcrabpod_gray")
|
||||
overlays += I
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/headcrab/poison/AttackingTarget()
|
||||
. = ..()
|
||||
if(iscarbon(target) && target.reagents)
|
||||
var/inject_target = pick("chest", "head")
|
||||
var/mob/living/carbon/C = target
|
||||
if(C.stunned || C.can_inject(null, FALSE, inject_target, FALSE))
|
||||
if(C.eye_blurry < 60)
|
||||
C.AdjustEyeBlurry(10)
|
||||
visible_message("<span class='danger'>[src] buries its fangs deep into the [inject_target] of [target]!</span>")
|
||||
Reference in New Issue
Block a user