Skip to content

Commit

Permalink
Merge pull request #615 from KittyNoodle/hairytick
Browse files Browse the repository at this point in the history
Brings our heretics up to speed with tg (Knock path and other changes)
  • Loading branch information
dwasint authored Jan 2, 2024
2 parents 21cc1f1 + 2f30084 commit 188785c
Show file tree
Hide file tree
Showing 103 changed files with 2,091 additions and 424 deletions.
494 changes: 494 additions & 0 deletions _maps/templates/heretic_sacrifice_template.dmm

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions code/__DEFINES/achievements.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
#define MEDAL_VOID_ASCENSION "Void"
#define MEDAL_BLADE_ASCENSION "Blade"
#define MEDAL_COSMOS_ASCENSION "Cosmos"
#define MEDAL_KNOCK_ASCENSION "Knock"
#define MEDAL_TOOLBOX_SOUL "Toolsoul"
#define MEDAL_CHEM_TUT "Beginner Chemist"
#define MEDAL_HOT_DAMN "Hot Damn!"
Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/actions.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,16 @@
#define AB_CHECK_CONSCIOUS (1<<3)
///Action button checks if user is incapacitated
#define AB_CHECK_INCAPACITATED (1<<4)
///Action button checks if user is jaunting
#define AB_CHECK_PHASED (1<<5)

DEFINE_BITFIELD(check_flags, list(
"CHECK IF HANDS BLOCKED" = AB_CHECK_HANDS_BLOCKED,
"CHECK IF IMMOBILIZED" = AB_CHECK_IMMOBILE,
"CHECK IF LYING DOWN" = AB_CHECK_LYING,
"CHECK IF CONSCIOUS" = AB_CHECK_CONSCIOUS,
"CHECK IF INCAPACITATED" = AB_CHECK_INCAPACITATED,
"CHECK IF TEMPORARILY INCORPOREAL" = AB_CHECK_PHASED,
))

///Action button triggered with right click
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/antagonists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
#define PATH_VOID "Void Path"
#define PATH_BLADE "Blade Path"
#define PATH_COSMIC "Cosmic Path"
#define PATH_KNOCK "Knock Path"

/// Defines are used in /proc/has_living_heart() to report if the heretic has no heart period, no living heart, or has a living heart.
#define HERETIC_NO_HEART_ORGAN -1
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/colors.dm
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
#define COLOR_STRONG_MAGENTA "#B800B8"
#define COLOR_PURPLE "#800080"
#define COLOR_VIOLET "#B900F7"
#define COLOR_VOID_PURPLE "#53277E"
#define COLOR_STRONG_VIOLET "#6927C5"
#define COLOR_DARK_PURPLE "#551A8B"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,6 @@
#define ATTACKER_SHOVING (1<<1)
/// The attack is a damaging-type attack
#define ATTACKER_DAMAGING_ATTACK (1<<2)

/// Called on the atom being hit, from /datum/component/anti_magic/on_attack() : (obj/item/weapon, mob/user, antimagic_flags)
#define COMSIG_ATOM_HOLYATTACK "atom_holyattacked"
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
#define COMSIG_CARBON_EMBED_REMOVAL "item_embed_remove_safe"
///Called when someone attempts to cuff a carbon
#define COMSIG_CARBON_CUFF_ATTEMPTED "carbon_attempt_cuff"
#define COMSIG_CARBON_CUFF_PREVENT (1<<0)
///Called when a carbon mutates (source = dna, mutation = mutation added)
#define COMSIG_CARBON_GAIN_MUTATION "carbon_gain_mutation"
///Called when a carbon loses a mutation (source = dna, mutation = mutation lose)
Expand Down
4 changes: 1 addition & 3 deletions code/__DEFINES/magic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@
/// Whether the spell can be cast by mobs who are brains / mmis.
/// When applying, bear in mind most spells will not function for brains out of the box.
#define SPELL_CASTABLE_AS_BRAIN (1 << 2)
/// Whether the spell can be cast while phased, such as blood crawling, ethereal jaunting or using rod form.
#define SPELL_CASTABLE_WHILE_PHASED (1 << 3)

/// Whether the spell can be cast while the user has antimagic on them that corresponds to the spell's own antimagic flags.
#define SPELL_REQUIRES_NO_ANTIMAGIC (1 << 4)
/// Whether the spell requires being on the station z-level to be cast.
Expand All @@ -66,7 +65,6 @@

DEFINE_BITFIELD(spell_requirements, list(
"SPELL_CASTABLE_AS_BRAIN" = SPELL_CASTABLE_AS_BRAIN,
"SPELL_CASTABLE_WHILE_PHASED" = SPELL_CASTABLE_WHILE_PHASED,
"SPELL_CASTABLE_WITHOUT_INVOCATION" = SPELL_CASTABLE_WITHOUT_INVOCATION,
"SPELL_REQUIRES_HUMAN" = SPELL_REQUIRES_HUMAN,
"SPELL_REQUIRES_MIME_VOW" = SPELL_REQUIRES_MIME_VOW,
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1138,6 +1138,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_MAGNETIC_ID_CARD "magnetic_id_card"
/// ID cards with this trait have special appraisal text.
#define TRAIT_TASTEFULLY_THICK_ID_CARD "impressive_very_nice"
/// things with this trait are treated as having no access in /obj/proc/check_access(obj/item)
#define TRAIT_ALWAYS_NO_ACCESS "alwaysnoaccess"

/// Traits granted to items due to their chameleon properties.
#define CHAMELEON_ITEM_TRAIT "chameleon_item_trait"
Expand Down
2 changes: 1 addition & 1 deletion code/__HELPERS/areas.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ GLOBAL_LIST_INIT(typecache_powerfailure_safe_areas, typecacheof(/area/station/en
// The dirs are connected turfs in the same space
// break_if_found is a typecache of turf/area types to return false if found
// Please keep this proc type agnostic. If you need to restrict it do it elsewhere or add an arg.
/proc/detect_room(turf/origin, list/break_if_found, max_size=INFINITY)
/proc/detect_room(turf/origin, list/break_if_found = list(), max_size=INFINITY)
if(origin.blocks_air)
return list(origin)

Expand Down
98 changes: 86 additions & 12 deletions code/_globalvars/phobias.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ GLOBAL_LIST_INIT(phobia_types, sort_list(list(
"falling",
"greytide",
"guns",
"heresy",
"insects",
"lizards",
"robots",
Expand All @@ -36,6 +37,7 @@ GLOBAL_LIST_INIT(phobia_regexes, list(
"falling" = construct_phobia_regex("falling"),
"greytide" = construct_phobia_regex("greytide"),
"guns" = construct_phobia_regex("guns"),
"heresy" = construct_phobia_regex("heresy"),
"insects" = construct_phobia_regex("insects"),
"lizards" = construct_phobia_regex("lizards"),
"ocky icky" = construct_phobia_regex("ocky icky"),
Expand Down Expand Up @@ -296,18 +298,90 @@ GLOBAL_LIST_INIT(phobia_objs, list(
/obj/machinery/stasis,
/obj/structure/sign/departments/medbay,
)),

"authority" = typecacheof(list(
/obj/item/card/id/advanced/centcom,
/obj/item/card/id/advanced/gold,
/obj/item/card/id/advanced/silver,
/obj/item/clothing/under/rank/captain,
/obj/item/clothing/under/rank/centcom/commander,
/obj/item/clothing/under/rank/centcom/officer,
/obj/item/clothing/under/rank/civilian/head_of_personnel,
/obj/item/clothing/under/rank/engineering/chief_engineer,
/obj/item/clothing/under/rank/medical/chief_medical_officer,
/obj/item/clothing/under/rank/rnd/research_director,
"greytide" = (typecacheof(list(
/obj/item/clothing/under/color/grey,
/obj/item/melee/baton/security/cattleprod,
/obj/item/spear,
/obj/item/toy/figure/assistant,
/obj/structure/statue/sandstone/assistant,
)) + typecacheof(list(/obj/item/clothing/mask/gas), ignore_root_path = FALSE, only_root_path = TRUE // to match only specific items in this phobia and not subtypes, use an additional typecacheof w/ ignore_root_path set FALSE and only_root_patch set TRUE
)),
"guns" = typecacheof(list(
/obj/item/ammo_box,
/obj/item/ammo_casing,
/obj/item/gun/ballistic,
/obj/item/gun/blastcannon,
/obj/item/gun/chem,
/obj/item/gun/energy,
/obj/item/gun/grenadelauncher,
/obj/item/gun/syringe,
/obj/item/mecha_ammo,
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic,
/obj/item/mecha_parts/mecha_equipment/weapon/energy,
/obj/item/storage/belt/bandolier,
/obj/item/storage/belt/holster,
/obj/machinery/porta_turret,
/obj/machinery/power/emitter,
)),
"heresy" = typecacheof(list(
/obj/effect/floating_blade,
/obj/effect/forcefield/cosmic_field,
/obj/effect/forcefield/wizard/heretic,
/obj/effect/heretic_influence,
/obj/effect/heretic_rune,
/obj/effect/knock_portal,
/obj/effect/visible_heretic_influence,
/obj/item/ammo_box/a762/lionhunter,
/obj/item/ammo_casing/a762/lionhunter,
/obj/item/clothing/mask/madness_mask,
/obj/item/clothing/neck/eldritch_amulet,
/obj/item/clothing/neck/fake_heretic_amulet,
/obj/item/clothing/neck/heretic_focus,
/obj/item/clothing/suit/hooded/cultrobes/eldritch,
/obj/item/codex_cicatrix,
/obj/item/coin/eldritch,
/obj/item/gun/ballistic/rifle/lionhunter,
/obj/item/heretic_lintel,
/obj/item/melee/rune_carver,
/obj/item/melee/sickly_blade,
/obj/item/melee/touch_attack/mansus_fist,
/obj/item/reagent_containers/cup/beaker/eldritch,
/obj/item/toy/eldritch_book,
/obj/item/toy/reality_pierce,
/obj/projectile/curse_hand,
/obj/structure/destructible/eldritch_crucible,
/obj/structure/knock_tear,
)),
"insects" = typecacheof(list(
/obj/item/clothing/mask/animal/small/bee,
/obj/item/clothing/suit/hooded/bee_costume,
/obj/item/toy/plush/beeplushie,
/obj/item/toy/plush/moth,
/obj/structure/beebox,
)),
"lizards" = typecacheof(list(
/obj/item/clothing/head/costume/lizard,
/obj/item/clothing/shoes/cowboy/lizard,
/obj/item/food/kebab/tail,
/obj/item/organ/external/tail/lizard,
/obj/item/reagent_containers/cup/glass/bottle/lizardwine,
/obj/item/toy/plush/lizard_plushie,
)),
"robots" = typecacheof(list(
/obj/item/ai_module,
/obj/item/aicard,
/obj/item/toy/figure/borg,
/obj/item/toy/talking/ai,
/obj/machinery/computer/upload,
/obj/machinery/recharge_station,
/obj/structure/statue/diamond/ai1,
/obj/structure/statue/diamond/ai2,
/obj/structure/statue/silver/medborg,
/obj/structure/statue/silver/secborg,
)),
"security" = typecacheof(list(
/obj/effect/client_image_holder/securitron,
/obj/item/clothing/under/rank/security/detective,
/obj/item/clothing/under/rank/security/head_of_security,
/obj/item/clothing/under/rank/cargo/qm,
/obj/item/clothing/neck/cloak/qm,
Expand Down
6 changes: 6 additions & 0 deletions code/datums/achievements/misc_achievements.dm
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,12 @@
database_id = MEDAL_ARCHMAGE
icon = "archmage"

/datum/award/achievement/misc/knock_ascension
name = "Secrets behind the Spider Door"
desc = "You managed to open a gate into the mansus."
database_id = MEDAL_KNOCK_ASCENSION
icon = "knockascend"

/datum/award/achievement/misc/toolbox_soul
name = "SOUL'd Out"
desc = "My eternal soul was destroyed to make a toolbox look funny and all I got was this achievement..."
Expand Down
17 changes: 14 additions & 3 deletions code/datums/actions/action.dm
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,15 @@
if(check_flags & AB_CHECK_CONSCIOUS)
RegisterSignal(owner, COMSIG_MOB_STATCHANGE, PROC_REF(update_status_on_signal))
if(check_flags & AB_CHECK_INCAPACITATED)
RegisterSignal(owner, SIGNAL_ADDTRAIT(TRAIT_INCAPACITATED), PROC_REF(update_status_on_signal))
RegisterSignals(owner, list(SIGNAL_ADDTRAIT(TRAIT_INCAPACITATED), SIGNAL_REMOVETRAIT(TRAIT_INCAPACITATED)), PROC_REF(update_status_on_signal))
if(check_flags & AB_CHECK_IMMOBILE)
RegisterSignal(owner, SIGNAL_ADDTRAIT(TRAIT_IMMOBILIZED), PROC_REF(update_status_on_signal))
RegisterSignals(owner, list(SIGNAL_ADDTRAIT(TRAIT_IMMOBILIZED), SIGNAL_REMOVETRAIT(TRAIT_IMMOBILIZED)), PROC_REF(update_status_on_signal))
if(check_flags & AB_CHECK_HANDS_BLOCKED)
RegisterSignal(owner, SIGNAL_ADDTRAIT(TRAIT_HANDS_BLOCKED), PROC_REF(update_status_on_signal))
RegisterSignals(owner, list(SIGNAL_ADDTRAIT(TRAIT_HANDS_BLOCKED), SIGNAL_REMOVETRAIT(TRAIT_HANDS_BLOCKED)), PROC_REF(update_status_on_signal))
if(check_flags & AB_CHECK_LYING)
RegisterSignal(owner, COMSIG_LIVING_SET_BODY_POSITION, PROC_REF(update_status_on_signal))
if(check_flags & AB_CHECK_PHASED)
RegisterSignals(owner, list(SIGNAL_ADDTRAIT(TRAIT_MAGICALLY_PHASED), SIGNAL_REMOVETRAIT(TRAIT_MAGICALLY_PHASED)), PROC_REF(update_status_on_signal))

if(owner_has_control)
GiveAction(grant_to)
Expand Down Expand Up @@ -130,6 +132,11 @@
SIGNAL_ADDTRAIT(TRAIT_HANDS_BLOCKED),
SIGNAL_ADDTRAIT(TRAIT_IMMOBILIZED),
SIGNAL_ADDTRAIT(TRAIT_INCAPACITATED),
SIGNAL_ADDTRAIT(TRAIT_MAGICALLY_PHASED),
SIGNAL_REMOVETRAIT(TRAIT_HANDS_BLOCKED),
SIGNAL_REMOVETRAIT(TRAIT_IMMOBILIZED),
SIGNAL_REMOVETRAIT(TRAIT_INCAPACITATED),
SIGNAL_REMOVETRAIT(TRAIT_MAGICALLY_PHASED),
))

if(target == owner)
Expand Down Expand Up @@ -174,6 +181,10 @@
if (feedback)
owner.balloon_alert(owner, "unconscious!")
return FALSE
if((check_flags & AB_CHECK_PHASED) && HAS_TRAIT(owner, TRAIT_MAGICALLY_PHASED))
if (feedback)
owner.balloon_alert(owner, "incorporeal!")
return FALSE
return TRUE

/// Builds / updates all buttons we have shared or given out
Expand Down
5 changes: 3 additions & 2 deletions code/datums/actions/mobs/open_mob_commands.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
overlay_icon_state = "bg_heretic_border"
button_icon = 'icons/mob/actions/actions_ecult.dmi'
button_icon_state = "stargazer_menu"
check_flags = AB_CHECK_CONSCIOUS | AB_CHECK_INCAPACITATED | AB_CHECK_PHASED
/// Weakref for storing our stargazer
var/datum/weakref/our_mob

/datum/action/cooldown/open_mob_commands/Grant(mob/granted_to, mob/living/basic/star_gazer/our_mob_input)
/datum/action/cooldown/open_mob_commands/Grant(mob/granted_to, mob/living/basic/heretic_summon/star_gazer/our_mob_input)
. = ..()
our_mob = WEAKREF(our_mob_input)

Expand All @@ -18,7 +19,7 @@

/// Opens the pet command options menu for a mob.
/datum/action/cooldown/open_mob_commands/proc/open_menu()
var/mob/living/basic/star_gazer/our_mob_resolved = our_mob?.resolve()
var/mob/living/basic/heretic_summon/star_gazer/our_mob_resolved = our_mob?.resolve()
if(our_mob_resolved)
var/datum/component/obeys_commands/command_component = our_mob_resolved.GetComponent(/datum/component/obeys_commands)
if(command_component)
Expand Down
8 changes: 8 additions & 0 deletions code/datums/brain_damage/phobia.dm
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,14 @@
phobia_type = "strangers"
random_gain = FALSE

/datum/brain_trauma/mild/phobia/heresy
phobia_type = "heresy"
random_gain = FALSE

/datum/brain_trauma/mild/phobia/insects
phobia_type = "insects"
random_gain = FALSE

/datum/brain_trauma/mild/phobia/birds
phobia_type = "birds"
random_gain = FALSE
Expand Down
5 changes: 5 additions & 0 deletions code/datums/components/anti_magic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
if(isitem(parent))
RegisterSignal(parent, COMSIG_ITEM_EQUIPPED, PROC_REF(on_equip))
RegisterSignal(parent, COMSIG_ITEM_DROPPED, PROC_REF(on_drop))
RegisterSignals(parent, list(COMSIG_ITEM_ATTACK, COMSIG_ITEM_ATTACK_OBJ), PROC_REF(on_attack))
else if(ismob(parent))
RegisterSignal(parent, COMSIG_MOB_RECEIVE_MAGIC, PROC_REF(block_receiving_magic), override = TRUE)
RegisterSignal(parent, COMSIG_MOB_RESTRICT_MAGIC, PROC_REF(restrict_casting_magic), override = TRUE)
Expand Down Expand Up @@ -158,3 +159,7 @@
return COMPONENT_MAGIC_BLOCKED

return NONE

/datum/component/anti_magic/proc/on_attack(atom/movable/source, atom/target, mob/user)
SIGNAL_HANDLER
SEND_SIGNAL(target, COMSIG_ATOM_HOLYATTACK, source, user, antimagic_flags)
30 changes: 30 additions & 0 deletions code/datums/components/death_linked.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/**
* ## Death link component
*
* When the owner of this component dies it also gibs a linked mob
*/
/datum/component/death_linked
///The mob that also dies when the user dies
var/datum/weakref/linked_mob

/datum/component/death_linked/Initialize(mob/living/target_mob)
. = ..()
if(!isliving(parent))
return COMPONENT_INCOMPATIBLE
if(isnull(target_mob))
stack_trace("[type] added to [parent] with no linked mob.")
src.linked_mob = WEAKREF(target_mob)

/datum/component/death_linked/RegisterWithParent()
. = ..()
RegisterSignal(parent, COMSIG_LIVING_DEATH, PROC_REF(on_death))

/datum/component/death_linked/UnregisterFromParent()
. = ..()
UnregisterSignal(parent, COMSIG_LIVING_DEATH)

///signal called by the stat of the target changing
/datum/component/death_linked/proc/on_death(mob/living/target, gibbed)
SIGNAL_HANDLER
var/mob/living/linked_mob_resolved = linked_mob?.resolve()
linked_mob_resolved?.gib()
29 changes: 0 additions & 29 deletions code/datums/elements/death_linked.dm

This file was deleted.

3 changes: 3 additions & 0 deletions code/datums/elements/embed.dm
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@

if(blocked || !istype(victim) || HAS_TRAIT(victim, TRAIT_PIERCEIMMUNE))
return FALSE

if(victim.status_flags & GODMODE)
return FALSE

var/flying_speed = throwingdatum?.speed || weapon.throw_speed

Expand Down
2 changes: 1 addition & 1 deletion code/datums/elements/strippable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@
continue

var/obj/item/item = item_data.get_item(owner)
if (isnull(item) || (HAS_TRAIT(item, TRAIT_NO_STRIP)))
if (isnull(item) || (HAS_TRAIT(item, TRAIT_NO_STRIP) || (item.item_flags & EXAMINE_SKIP)))
items[strippable_key] = result
continue

Expand Down
Loading

0 comments on commit 188785c

Please sign in to comment.