Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The revival of Dullahans! + Ventriloquism! #10093

Merged
merged 8 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion code/__DEFINES/dcs/signals/signals_atom/signals_atom.dm
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@
///! from the base of atom/intercept_teleport: (channel, turf/origin, turf/destination)
#define COMSIG_ATOM_INTERCEPT_TELEPORT "intercept_teleport"
#define COMPONENT_BLOCK_TELEPORT 1
#define COMSIG_ATOM_HEARER_IN_VIEW "atom_hearer_in_view" //called when an atom is added to the hearers on get_hearers_in_view(): (list/processing_list, list/hearers)
///called when an atom starts orbiting another atom: (atom)
#define COMSIG_ATOM_ORBIT_BEGIN "atom_orbit_begin"
/// called when an atom stops orbiting another atom: (atom)
Expand All @@ -144,7 +145,8 @@

/////////////////
#define COMSIG_CLICK "atom_click" //! from base of atom/Click(): (location, control, params, mob/user)
#define COMSIG_CLICK_SHIFT "shift_click" //! from base of atom/ShiftClick(): (/mob)
#define COMSIG_CLICK_SHIFT "shift_click" //from base of atom/ShiftClick(): (/mob)
#define COMPONENT_ALLOW_EXAMINATE 1 //Allows the user to examinate regardless of client.eye.
#define COMSIG_CLICK_CTRL "ctrl_click" //! from base of atom/CtrlClickOn(): (/mob)
#define COMSIG_CLICK_ALT "alt_click" //! from base of atom/AltClick(): (/mob)
#define COMPONENT_INTERCEPT_ALT 1
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/dcs/signals/signals_mob/signals_mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@
#define SPEECH_LANGUAGE 5
#define SPEECH_IGNORE_SPAM 6
#define SPEECH_FORCED 7 */
#define SPEECH_RANGE 8

#define COMSIG_MOB_EMOTE "mob_emote" // from /mob/living/emote(): ()
#define COMSIG_MOB_SWAP_HANDS "mob_swap_hands" //from base of mob/swap_hand()
#define COMPONENT_BLOCK_SWAP 1
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/is_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ GLOBAL_LIST_INIT(turfs_without_ground, typecacheof(list(
#define iscatperson(A) (is_species(A, /datum/species/human/felinid) )
#define isethereal(A) (is_species(A, /datum/species/ethereal))
#define isvampire(A) (is_species(A,/datum/species/vampire))
#define isdullahan(A) (is_species(A, /datum/species/dullahan))
#define isipc(A) (is_species(A, /datum/species/ipc))
#define isapid(A) (is_species(A, /datum/species/apid))
#define isandroid(A) (is_species(A, /datum/species/android))
Expand Down
4 changes: 2 additions & 2 deletions code/_onclick/click.dm
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,8 @@
A.ShiftClick(src)
return
/atom/proc/ShiftClick(mob/user)
SEND_SIGNAL(src, COMSIG_CLICK_SHIFT, user)
if(user.client && user.client.eye == user || user.client.eye == user.loc)
var/flags = SEND_SIGNAL(user, COMSIG_CLICK_SHIFT, src)
if(user.client && (user.client.eye == user || user.client.eye == user.loc || flags & COMPONENT_ALLOW_EXAMINATE))
user.examinate(src)
return

Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/recycler.dm
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
var/atom/movable/AM = i
var/obj/item/bodypart/head/as_head = AM
var/obj/item/mmi/as_mmi = AM
var/brain_holder = istype(AM, /obj/item/organ/brain) || (istype(as_head) && as_head.brain) || (istype(as_mmi) && as_mmi.brain) || istype(AM, /mob/living/brain)
var/brain_holder = istype(AM, /obj/item/organ/brain) || (istype(as_head) && as_head.brain) || (istype(as_mmi) && as_mmi.brain) || isbrain(AM) || istype(AM, /obj/item/dullahan_relay)
if(brain_holder)
emergency_stop(AM)
else if(isliving(AM))
Expand Down
4 changes: 2 additions & 2 deletions code/game/say.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ GLOBAL_LIST_INIT(freqtospan, list(
"[FREQ_CTF_BLUE]" = "blueteamradio"
))

/atom/movable/proc/say(message, bubble_type, var/list/spans = list(), sanitize = TRUE, datum/language/language = null, ignore_spam = FALSE, forced = null, atom/source=src)
/atom/movable/proc/say(message, bubble_type, var/list/spans = list(), sanitize = TRUE, datum/language/language = null, ignore_spam = FALSE, forced = null, range = 7, atom/source=src)
if(!can_speak())
return
if(message == "" || !message)
return
spans |= speech_span
if(!language)
language = get_selected_language()
send_speech(message, 7, source, , spans, message_language=language)
send_speech(message, range, source, , spans, message_language=language)

/atom/movable/proc/Hear(message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, list/message_mods = list())
SEND_SIGNAL(src, COMSIG_MOVABLE_HEAR, args)
Expand Down
5 changes: 3 additions & 2 deletions code/modules/mob/living/brain/brain_item.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@
var/suicided = FALSE
var/mob/living/brain/brainmob = null
var/brain_death = FALSE //if the brainmob was intentionally killed by attacking the brain after removal, or by severe braindamage
var/decoy_override = FALSE //if it's a fake brain with no brainmob assigned. Feedback messages will be faked as if it does have a brainmob. See changelings & dullahans.
//two variables necessary for calculating whether we get a brain trauma or not
/// If it's a fake brain with no brainmob assigned. Feedback messages will be faked as if it does have a brainmob. See changelings & dullahans.
var/decoy_override = FALSE
/// Two variables necessary for calculating whether we get a brain trauma or not
var/damage_delta = 0

var/list/datum/brain_trauma/traumas = list()
Expand Down
6 changes: 6 additions & 0 deletions code/modules/mob/living/carbon/human/human.dm
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,12 @@
INVOKE_ASYNC(C, TYPE_PROC_REF(/obj/vehicle/sealed/car, RunOver), src)
spreadFire(AM)

/mob/living/carbon/human/reset_perspective(atom/new_eye, force_reset = FALSE)
if(dna?.species?.prevent_perspective_change && !force_reset) // This is in case a species needs to prevent perspective changes in certain cases, like Dullahans preventing perspective changes when they're looking through their head.
update_fullscreen()
return
return ..()

/mob/living/carbon/human/Topic(href, href_list)
if(href_list["embedded_object"] && usr.canUseTopic(src, BE_CLOSE, NO_DEXTERITY))
var/obj/item/bodypart/L = locate(href_list["embedded_limb"]) in bodyparts
Expand Down
16 changes: 16 additions & 0 deletions code/modules/mob/living/carbon/human/species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@ GLOBAL_LIST_EMPTY(features_by_species)
// Species specific bitflags. Used for things like if the race is unable to become a changeling.
var/species_bitflags = NONE

/// Do we try to prevent reset_perspective() from working? Useful for Dullahans to stop perspective changes when they're looking through their head.
var/prevent_perspective_change = FALSE

///////////
// PROCS //
///////////
Expand Down Expand Up @@ -2498,6 +2501,19 @@ GLOBAL_LIST_EMPTY(features_by_species)
/datum/species/proc/prepare_human_for_preview(mob/living/carbon/human/human)
return

/**
* Owner login
*/

/**
* A simple proc to be overwritten if something needs to be done when a mob logs in. Does nothing by default.
*
* Arguments:
* * owner - The owner of our species.
*/
/datum/species/proc/on_owner_login(mob/living/carbon/human/owner)
return

/**
* Gets a short description for the specices. Should be relatively succinct.
* Used in the preference menu.
Expand Down
Loading
Loading