Merge pull request #3679 from Citadel-Station-13/upstream-merge-32174

[MIRROR] Halloween race fixes
This commit is contained in:
LetterJay
2017-10-29 16:05:19 -04:00
committed by GitHub
4 changed files with 161 additions and 9 deletions
@@ -0,0 +1,149 @@
/datum/species/dullahan
name = "dullahan"
id = "dullahan"
default_color = "FFFFFF"
species_traits = list(EYECOLOR,HAIR,FACEHAIR,LIPS,NOBREATH,NOHUNGER)
mutant_bodyparts = list("tail_human", "ears", "wings")
default_features = list("mcolor" = "FFF", "tail_human" = "None", "ears" = "None", "wings" = "None")
use_skintones = TRUE
mutant_brain = /obj/item/organ/brain/dullahan
mutanteyes = /obj/item/organ/eyes/dullahan
mutanttongue = /obj/item/organ/tongue/dullahan
mutantears = /obj/item/organ/ears/dullahan
blacklisted = TRUE
limbs_id = "human"
skinned_type = /obj/item/stack/sheet/animalhide/human
var/obj/item/dullahan_relay/myhead
/datum/species/dullahan/check_roundstart_eligible()
if(SSevents.holidays && SSevents.holidays[HALLOWEEN])
return TRUE
return FALSE
/datum/species/dullahan/on_species_gain(mob/living/carbon/human/H, datum/species/old_species)
. = ..()
var/obj/item/bodypart/head/head = H.get_bodypart("head")
if(head)
head.drop_limb()
head.flags_1 = HEAR_1
head.throwforce = 25
myhead = new /obj/item/dullahan_relay (head, H)
H.put_in_hands(head)
/datum/species/dullahan/on_species_loss(mob/living/carbon/human/H)
if(myhead)
var/obj/item/dullahan_relay/DR = myhead
myhead = null
DR.owner = null
qdel(DR)
..()
/datum/species/dullahan/spec_life(mob/living/carbon/human/H)
if(!QDELETED(myhead))
update_vision_perspective(H)
var/turf/Me = get_turf(H)
var/turf/Head = get_turf(myhead)
if(Me == Head || (Head in oview(7, Me)))
H.disabilities &= ~DEAF
else
H.disabilities |= DEAF
else
myhead = null
H.gib()
var/obj/item/bodypart/head/head2 = H.get_bodypart("head")
if(head2)
myhead = null
H.gib()
/datum/species/dullahan/proc/update_vision_perspective(mob/living/carbon/human/H)
var/obj/item/organ/eyes/eyes = H.getorganslot(ORGAN_SLOT_EYES)
if(eyes)
H.update_tint()
if(eyes.tint)
H.reset_perspective(H)
else
H.reset_perspective(myhead)
/obj/item/organ/brain/dullahan
decoy_override = TRUE
vital = FALSE
/obj/item/organ/tongue/dullahan
zone = "abstract"
/obj/item/organ/tongue/dullahan/TongueSpeech(var/message)
if(ishuman(owner))
var/mob/living/carbon/human/H = owner
if(H.dna.species.id == "dullahan")
var/datum/species/dullahan/D = H.dna.species
if(isobj(D.myhead.loc))
var/obj/O = D.myhead.loc
O.say(message)
message = ""
return message
/obj/item/organ/ears/dullahan
zone = "abstract"
/obj/item/organ/eyes/dullahan
name = "head vision"
desc = "An abstraction."
actions_types = list(/datum/action/item_action/organ_action/dullahan)
zone = "abstract"
/datum/action/item_action/organ_action/dullahan
name = "Toggle Perspective"
desc = "Switch between seeing normally from your head, or blindly from your body."
/datum/action/item_action/organ_action/dullahan/Trigger()
. = ..()
var/obj/item/organ/eyes/dullahan/DE = target
if(DE.tint)
DE.tint = 0
else
DE.tint = INFINITY
if(ishuman(owner))
var/mob/living/carbon/human/H = owner
if(H.dna.species.id == "dullahan")
var/datum/species/dullahan/D = H.dna.species
D.update_vision_perspective(H)
/obj/item/dullahan_relay
var/mob/living/owner
flags_1 = HEAR_1
/obj/item/dullahan_relay/Initialize(mapload,new_owner)
. = ..()
owner = new_owner
START_PROCESSING(SSobj, src)
/obj/item/dullahan_relay/process()
if(!istype(loc, /obj/item/bodypart/head) || QDELETED(owner))
. = PROCESS_KILL
qdel(src)
/obj/item/dullahan_relay/Hear(message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, message_mode)
if(!QDELETED(owner))
var/turf/T = get_turf(speaker)
var/turf/owner_turf = get_turf(owner)
if(T == owner_turf || (T in oview(7, owner_turf))) //Do not relay things we can already hear
return
message = compose_message(speaker, message_language, raw_message, radio_freq, spans, message_mode)
to_chat(owner,message)
else
qdel(src)
/obj/item/dullahan_relay/Destroy()
if(!QDELETED(owner))
var/mob/living/carbon/human/H = owner
if(H.dna.species.id == "dullahan")
var/datum/species/dullahan/D = H.dna.species
D.myhead = null
owner.gib()
owner = null
..()
@@ -24,9 +24,8 @@
to_chat(C, "[info_text]")
C.skin_tone = "albino"
C.update_body(0)
if(C.mind)
var/obj/effect/proc_holder/spell/targeted/shapeshift/bat/B = new
C.mind.AddSpell(B)
var/obj/effect/proc_holder/spell/targeted/shapeshift/bat/B = new
C.AddSpell(B)
/datum/species/vampire/on_species_loss(mob/living/carbon/C)
. = ..()
@@ -45,7 +44,7 @@
C.adjustOxyLoss(-4)
C.adjustCloneLoss(-4)
return
C.blood_volume -= 1.5
C.blood_volume -= 0.75
if(C.blood_volume <= BLOOD_VOLUME_SURVIVE)
to_chat(C, "<span class='danger'>You ran out of blood!</span>")
C.dust()
@@ -123,8 +122,4 @@
invocation = "Squeak!"
charge_max = 50
cooldown_min = 50
shapeshift_type = /mob/living/simple_animal/hostile/retaliate/bat
current_shapes = list(/mob/living/simple_animal/hostile/retaliate/bat)
current_casters = list()
possible_shapes = list(/mob/living/simple_animal/hostile/retaliate/bat)
@@ -34,4 +34,7 @@
//Space bats need no air to fly in.
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
minbodytemp = 0
minbodytemp = 0
/mob/living/simple_animal/hostile/retaliate/bat/Process_Spacemove(movement_dir = 0)
return 1
@@ -22,6 +22,11 @@
/mob/living/simple_animal/hostile/construct/armored)
/obj/effect/proc_holder/spell/targeted/shapeshift/cast(list/targets,mob/user = usr)
if(src in user.mob_spell_list)
user.mob_spell_list.Remove(src)
user.mind.AddSpell(src)
if(user.buckled)
user.buckled.unbuckle_mob(src,force=TRUE)
for(var/mob/living/M in targets)
if(!shapeshift_type)
var/list/animal_list = list()