Merge pull request #4233 from Fox-McCloud/abduction

Abduction
This commit is contained in:
TheDZD
2016-04-20 11:01:55 -04:00
77 changed files with 2806 additions and 173 deletions
+22 -2
View File
@@ -107,10 +107,10 @@
to_chat(player, msg_dead)
continue
else if(istype(player,/mob/dead) || ((src in player.languages) && check_special_condition(player)))
else if(istype(player,/mob/dead) || ((src in player.languages) && check_special_condition(player, speaker)))
to_chat(player, msg)
/datum/language/proc/check_special_condition(var/mob/other)
/datum/language/proc/check_special_condition(var/mob/other, var/mob/living/speaker)
return 1
/datum/language/proc/get_spoken_verb(var/msg_end)
@@ -409,6 +409,7 @@
key = "8"
flags = RESTRICTED | HIVEMIND
/datum/language/shadowling/broadcast(var/mob/living/speaker, var/message, var/speaker_mask)
if(speaker.mind && speaker.mind.special_role)
..(speaker, message, "([speaker.mind.special_role]) [speaker]")
@@ -422,6 +423,25 @@
else
..(speaker,message)
/datum/language/abductor
name = "Abductor Mindlink"
desc = "Abductors are incapable of speech, but have a psychic link attuned to their own team."
speech_verb = "gibbers"
ask_verb = "gibbers"
exclaim_verb = "gibbers"
colour = "abductor"
key = "zw" //doesn't matter, this is their default and only language
flags = RESTRICTED | HIVEMIND
/datum/language/abductor/broadcast(var/mob/living/speaker,var/message,var/speaker_mask)
..(speaker,message,speaker.real_name)
/datum/language/abductor/check_special_condition(var/mob/living/carbon/human/other, var/mob/living/carbon/human/speaker)
if(other.mind && other.mind.abductor)
if(other.mind.abductor.team == speaker.mind.abductor.team)
return 1
return 0
/datum/language/corticalborer
name = "Cortical Link"
desc = "Cortical borers possess a strange link between their tiny minds."
@@ -112,6 +112,9 @@
/mob/living/carbon/human/grey/New(var/new_loc)
..(new_loc, "Grey")
/mob/living/carbon/human/abductor/New(var/new_loc)
..(new_loc, "Abductor")
/mob/living/carbon/human/human/New(var/new_loc)
..(new_loc, "Human")
@@ -688,6 +691,8 @@
//repurposed proc. Now it combines get_id_name() and get_face_name() to determine a mob's name variable. Made into a seperate proc as it'll be useful elsewhere
/mob/living/carbon/human/get_visible_name()
if(name_override)
return name_override
if(wear_mask && (wear_mask.flags_inv & HIDEFACE)) //Wearing a mask which hides our face, use id-name if possible
return get_id_name("Unknown")
if(head && (head.flags_inv & HIDEFACE))
@@ -80,6 +80,8 @@
var/hand_blood_color
var/name_override //For temporary visible name changes
var/xylophone = 0 //For the spoooooooky xylophone cooldown
var/mob/remoteview_target = null
@@ -0,0 +1,27 @@
/datum/species/abductor
name = "Abductor"
name_plural = "Abductors"
icobase = 'icons/mob/human_races/r_abductor.dmi'
deform = 'icons/mob/human_races/r_abductor.dmi'
path = /mob/living/carbon/human/abductor
language = "Abductor Mindlink"
default_language = "Abductor Mindlink"
unarmed_type = /datum/unarmed_attack/punch
darksight = 3
eyes = "blank_eyes"
flags = HAS_LIPS | NO_BLOOD | NO_BREATHE
virus_immune = 1
clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS
dietflags = DIET_OMNI
reagent_tag = PROCESS_ORG
blood_color = "#FF5AFF"
/datum/species/abductor/can_understand(var/mob/other) //Abductors can understand everyone, but they can only speak over their mindlink to another team-member
return 1
/datum/species/abductor/handle_post_spawn(var/mob/living/carbon/human/H)
H.gender = NEUTER
if(H.mind)
H.mind.abductor = new /datum/abductor
return ..()
@@ -104,41 +104,6 @@ If you have any questions/constructive-comments/bugs-to-report/or have a massivl
Please contact me on #coderbus IRC. ~Carn x
*/
//Human Overlays Indexes/////////
#define MUTANTRACE_LAYER 1
#define TAIL_UNDERLIMBS_LAYER 2
#define LIMBS_LAYER 3
#define MARKINGS_LAYER 4
#define UNDERWEAR_LAYER 5
#define MUTATIONS_LAYER 6
#define DAMAGE_LAYER 7
#define UNIFORM_LAYER 8
#define ID_LAYER 9
#define SHOES_LAYER 10
#define GLOVES_LAYER 11
#define EARS_LAYER 12
#define SUIT_LAYER 13
#define GLASSES_LAYER 14
#define BELT_LAYER 15 //Possible make this an overlay of somethign required to wear a belt?
#define SUIT_STORE_LAYER 16
#define BACK_LAYER 17
#define TAIL_LAYER 18 //bs12 specific. this hack is probably gonna come back to haunt me
#define HAIR_LAYER 19 //TODO: make part of head layer?
#define HEAD_ACCESSORY_LAYER 20
#define FHAIR_LAYER 21
#define FACEMASK_LAYER 22
#define HEAD_LAYER 23
#define COLLAR_LAYER 24
#define HANDCUFF_LAYER 25
#define LEGCUFF_LAYER 26
#define L_HAND_LAYER 27
#define R_HAND_LAYER 28
#define TARGETED_LAYER 29 //BS12: Layer for the target overlay from weapon targeting system
#define FIRE_LAYER 30 //If you're on fire
#define TOTAL_LAYERS 30
/mob/living/carbon/human
var/list/overlays_standing[TOTAL_LAYERS]
var/previous_damage_appearance // store what the body last looked like, so we only have to update it if something changed
@@ -163,18 +128,26 @@ Please contact me on #coderbus IRC. ~Carn x
update_hud() //TODO: remove the need for this
var/stealth = 0
for(var/obj/item/weapon/cloaking_device/S in list(l_hand,r_hand,belt,l_store,r_store))
if(S.active)
var/obj/item/clothing/suit/armor/abductor/vest/V // Begin the most snowflakey bullshit code I've ever written. I'm so sorry, but there was no other way.
for(V in list(wear_suit))
if(V.stealth_active)
stealth = 1
break
if(stealth)
icon = 'icons/mob/human.dmi'
icon_state = "body_cloaked"
var/image/I = overlays_standing[L_HAND_LAYER]
if(istype(I)) overlays += I
I = overlays_standing[R_HAND_LAYER]
if(istype(I)) overlays += I
icon = V.disguise.icon //if the suit is active, reference the suit's current loaded icon and overlays; this does not include hand overlays
overlays.Cut()
for(var/thing in V.disguise.overlays)
if(thing)
overlays += thing
var/image/I = overlays_standing[L_HAND_LAYER] //manually add both left and right hand, so its independently updated
if(istype(I))
overlays += I
I = overlays_standing[R_HAND_LAYER]
if(istype(I))
overlays += I
else
icon = stand_icon
overlays.Cut()
@@ -1240,34 +1213,11 @@ var/global/list/damage_icon_parts = list()
O.sync_colour_to_human(src)
update_body(0)
//Human Overlays Indexes/////////
#undef MUTANTRACE_LAYER
#undef TAIL_UNDERLIMBS_LAYER
#undef LIMBS_LAYER
#undef MARKINGS_LAYER
#undef MUTATIONS_LAYER
#undef DAMAGE_LAYER
#undef UNIFORM_LAYER
#undef ID_LAYER
#undef SHOES_LAYER
#undef GLOVES_LAYER
#undef EARS_LAYER
#undef SUIT_LAYER
#undef GLASSES_LAYER
#undef FACEMASK_LAYER
#undef BELT_LAYER
#undef SUIT_STORE_LAYER
#undef BACK_LAYER
#undef TAIL_LAYER
#undef HAIR_LAYER
#undef HEAD_LAYER
#undef HEAD_ACCESSORY_LAYER
#undef FHAIR_LAYER
#undef COLLAR_LAYER
#undef HANDCUFF_LAYER
#undef LEGCUFF_LAYER
#undef L_HAND_LAYER
#undef R_HAND_LAYER
#undef TARGETED_LAYER
#undef FIRE_LAYER
#undef TOTAL_LAYERS
/mob/living/carbon/human/proc/get_overlays_copy(list/unwantedLayers)
var/list/out = new
for(var/i=1;i<=TOTAL_LAYERS;i++)
if(overlays_standing[i])
if(i in unwantedLayers)
continue
out += overlays_standing[i]
return out
@@ -39,14 +39,6 @@
/mob/living/bullet_act(var/obj/item/projectile/P, var/def_zone)
//Being hit while using a cloaking device
var/obj/item/weapon/cloaking_device/C = locate((/obj/item/weapon/cloaking_device) in src)
if(C && C.active)
C.attack_self(src)//Should shut it off
update_icons()
to_chat(src, "\blue Your [C.name] was disrupted!")
Stun(2)
//Armor
var/armor = run_armor_check(def_zone, P.flag, armour_penetration = P.armour_penetration)
var/proj_sharp = is_sharp(P)