Skip to content

Commit

Permalink
more sht
Browse files Browse the repository at this point in the history
  • Loading branch information
Qwertytoforty committed Jan 20, 2025
1 parent fb722bd commit 25c65e6
Show file tree
Hide file tree
Showing 30 changed files with 119 additions and 61 deletions.
3 changes: 3 additions & 0 deletions code/__DEFINES/hud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#define GLAND_HUD "23"//Gland indicators for abductors
#define JANI_HUD "24" // Sign overlay over cleanable decals
#define PRESSURE_HUD "25" // Pressure coloring for tiles
#define HERETIC_HUD "26" // Seeing reality smashes and shit

//by default everything in the hud_list of an atom is an image
//a value in hud_list with one of these will change that behavior
Expand Down Expand Up @@ -60,6 +61,8 @@
#define ANTAG_HUD_BLOB 22
#define ANTAG_HUD_ZOMBIE 23
#define ANTAG_HUD_MIND_FLAYER 24
#define DATA_HUD_HERETIC 25


// Notification action types
#define NOTIFY_JUMP "jump"
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/role_preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ GLOBAL_LIST_INIT(special_roles, list(
ROLE_ALIEN, // Xenomorph
ROLE_WIZARD = /datum/game_mode/wizard, // Wizard
ROLE_MIND_FLAYER,
ROLE_HERETIC,
// UNUSED/BROKEN ANTAGS
// ROLE_HOG_GOD = /datum/game_mode/hand_of_god,
// ROLE_HOG_CULTIST = /datum/game_mode/hand_of_god,
Expand Down
7 changes: 5 additions & 2 deletions code/datums/atom_hud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,16 @@ GLOBAL_LIST_INIT(huds, list(
ANTAG_HUD_EVENTMISC = new/datum/atom_hud/antag/hidden(),
ANTAG_HUD_BLOB = new/datum/atom_hud/antag/hidden(),
ANTAG_HUD_ZOMBIE = new/datum/atom_hud/antag(),
ANTAG_HUD_MIND_FLAYER = new/datum/atom_hud/antag/hidden()
ANTAG_HUD_MIND_FLAYER = new/datum/atom_hud/antag/hidden(),
DATA_HUD_HERETIC = new/datum/atom_hud/data/heretic(),
))

/datum/atom_hud
var/list/atom/hudatoms = list() //list of all atoms which display this hud
var/list/mob/hudusers = list() //list with all mobs who can see the hud
var/list/hud_icons = list() //these will be the indexes for the atom's hud_list
/// Do we ignore the invisibility check? Used by heretic huds so we can see our stuff.
var/ignore_invisibility_check = FALSE


/datum/atom_hud/New()
Expand Down Expand Up @@ -85,7 +88,7 @@ GLOBAL_LIST_INIT(huds, list(
/datum/atom_hud/proc/add_to_single_hud(mob/M, atom/A) //unsafe, no sanity apart from client
if(!M || !M.client || !A)
return
if(A.invisibility > M.see_invisible) // yee yee ass snowflake check for our yee yee ass snowflake huds
if((A.invisibility > M.see_invisible) && !ignore_invisibility_check) // yee yee ass snowflake check for our yee yee ass snowflake huds
return
for(var/i in hud_icons)
if(A.hud_list[i])
Expand Down
2 changes: 1 addition & 1 deletion code/datums/elements/leaching_walk.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
var/need_mob_update = FALSE
need_mob_update += source.adjustBruteLoss(-3, updating_health = FALSE)
need_mob_update += source.adjustFireLoss(-3, updating_health = FALSE)
need_mob_update += source.adjustToxLoss(-3, updating_health = FALSE) // Slimes are people too
need_mob_update += source.adjustToxLoss(-3, updating_health = FALSE)
need_mob_update += source.adjustOxyLoss(-1.5, updating_health = FALSE)
need_mob_update += source.adjustStaminaLoss(-10, updating= FALSE)
if(need_mob_update)
Expand Down
7 changes: 7 additions & 0 deletions code/datums/spell_targeting/spell_targeting.dm
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@
*/
/datum/spell_targeting/proc/InterceptClickOn(mob/user, params, atom/A, datum/spell/spell)
var/list/targets = choose_targets(user, spell, params, A)
var/list/final_targets
for(var/atom/thing in targets)
if(spell.valid_target(thing, user))
final_targets += targets
if(!length(final_targets))
to_chat(user, "<span class='warning'>No target found, aborting the spell!</span>")
return FALSE // no targets
spell.try_perform(targets, user)

/**
Expand Down
11 changes: 11 additions & 0 deletions code/game/data_huds.dm
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@
/datum/atom_hud/data/pressure
hud_icons = list(PRESSURE_HUD)

/datum/atom_hud/data/heretic
hud_icons = list(HERETIC_HUD)
ignore_invisibility_check = TRUE

/// Pressure hud is special, because it doesn't use hudatoms. SSair manages its images, so tell SSair to add the initial set.
/datum/atom_hud/data/pressure/add_hud_to(mob/user)
..()
Expand Down Expand Up @@ -499,6 +503,13 @@
else
holder.icon_state = ""

/*~~~~~~~~~~~~~~
HERETIC HUD
~~~~~~~~~~~~~~~*/
/obj/effect/heretic_influence/proc/do_hud_stuff()
var/image/holder = hud_list[HERETIC_HUD]
holder.icon_state = "reality_smash"

/*~~~~~~~~~~~~~~
JANI HUD
~~~~~~~~~~~~~~~*/
Expand Down
9 changes: 9 additions & 0 deletions code/game/gamemodes/dynamic/antag_rulesets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,15 @@
antag.add_antag_datum(traitor_datum)
addtimer(CALLBACK(dynamic, TYPE_PROC_REF(/datum/game_mode, fill_antag_slots)), random_time)

/datum/ruleset/heretic
name = "Heretic"
ruleset_weight = 9
antag_cost = 10
antagonist_type = /datum/antagonist/heretic

banned_jobs = list("Cyborg", "AI")


/datum/ruleset/vampire
name = "Vampire"
ruleset_weight = 12
Expand Down
6 changes: 4 additions & 2 deletions code/game/objects/items/weapons/storage/belt.dm
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@
/obj/item/holosign_creator,
/obj/item/stack/nanopaste,
/obj/item/robotanalyzer,
/obj/item/rpd/bluespace
/obj/item/rpd/bluespace,
/obj/item/melee/sickly_blade/lock
)

/obj/item/storage/belt/utility/full/populate_contents()
Expand Down Expand Up @@ -852,7 +853,8 @@
/obj/item/wirecutters,
/obj/item/wrench,
/obj/item/multitool,
/obj/item/handheld_defibrillator
/obj/item/handheld_defibrillator,
/obj/item/melee/sickly_blade/lock
)

/obj/item/storage/belt/bluespace/owlman
Expand Down
4 changes: 2 additions & 2 deletions code/game/turfs/simulated/floor/misc_floor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@
break_tile_to_plating()
hotspot_expose(1000,CELL_VOLUME)

/turf/open/floor/plating/rust
/turf/simulated/floor/plating/rust
//SDMM supports colors, this is simply for easier mapping
//and should be removed on initialize
color = COLOR_BROWN
Expand All @@ -319,7 +319,7 @@
AddElement(/datum/element/rust)
color = null

/turf/open/floor/plating/heretic_rust
/turf/simulated/floor/plating/heretic_rust
color = COLOR_GREEN_GRAY

/turf/simulated/floor/plating/heretic_rust/Initialize(mapload)
Expand Down
8 changes: 6 additions & 2 deletions code/modules/antagonists/heretic/heretic_antag.dm
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@

for(var/starting_knowledge in GLOB.heretic_start_knowledge)
gain_knowledge(starting_knowledge)
SEND_SOUND(owner.current, sound('sound/ambience/antag/heretic/heretic_gain.ogg'))


addtimer(CALLBACK(src, PROC_REF(passive_influence_gain)), passive_gain_timer) // Gain +1 knowledge every 20 minutes.
Expand All @@ -250,10 +251,11 @@

if(!issilicon(our_mob))
GLOB.reality_smash_track.add_tracked_mind(owner)

var/datum/atom_hud/data/heretic/h_hud = GLOB.huds[DATA_HUD_HERETIC]
h_hud.add_hud_to(our_mob)
ADD_TRAIT(our_mob, TRAIT_MANSUS_TOUCHED, src.UID())
RegisterSignal(our_mob, COMSIG_LIVING_CULT_SACRIFICED, PROC_REF(on_cult_sacrificed))
RegisterSignals(our_mob, COMSIG_MOB_BEFORE_SPELL_CAST, PROC_REF(on_spell_cast))
RegisterSignal(our_mob, COMSIG_MOB_BEFORE_SPELL_CAST, PROC_REF(on_spell_cast))
RegisterSignal(our_mob, COMSIG_INTERACT_USER, PROC_REF(on_item_use))

/datum/antagonist/heretic/remove_innate_effects(mob/living/mob_override)
Expand All @@ -263,6 +265,8 @@

if(owner in GLOB.reality_smash_track.tracked_heretics)
GLOB.reality_smash_track.remove_tracked_mind(owner)
var/datum/atom_hud/data/heretic/h_hud = GLOB.huds[DATA_HUD_HERETIC]
h_hud.remove_hud_from(our_mob)

REMOVE_TRAIT(our_mob, TRAIT_MANSUS_TOUCHED, src.UID())
UnregisterSignal(our_mob, list(
Expand Down
22 changes: 13 additions & 9 deletions code/modules/antagonists/heretic/influences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

var/location_sanity = 0
while((length(smashes) + num_drained) < how_many_can_we_make && location_sanity < 100)
var/turf/chosen_location = find_safe_turf()
var/turf/chosen_location = find_safe_turf() //QWERTODO: GET TG VERSION SO IT ISN'T ALL IN MAINTS

// We don't want them close to each other - at least 1 tile of separation
var/list/nearby_things = range(1, chosen_location)
Expand All @@ -62,7 +62,7 @@
tracked_heretics |= heretic

// If our heretic's on station, generate some new influences
if(ishuman(heretic.current) && !is_teleport_allowed(heretic.current.z))
if(ishuman(heretic.current) && is_teleport_allowed(heretic.current.z))
generate_new_influences()

/**
Expand All @@ -80,6 +80,7 @@
anchored = TRUE
resistance_flags = FIRE_PROOF | UNACIDABLE | ACID_PROOF
alpha = 0
new_attack_chain = TRUE

/obj/effect/visible_heretic_influence/Initialize(mapload)
. = ..()
Expand Down Expand Up @@ -156,27 +157,30 @@
/obj/effect/heretic_influence
name = "reality smash"
icon = 'icons/effects/eldritch.dmi'
icon_state = "reality_smash"
anchored = TRUE
resistance_flags = FIRE_PROOF | UNACIDABLE | ACID_PROOF
invisibility = INVISIBILITY_OBSERVER
invisibility = INVISIBILITY_LEVEL_TWO
hud_possible = list(HERETIC_HUD)
new_attack_chain = TRUE
/// Whether we're currently being drained or not.
var/being_drained = FALSE
/// The icon state applied to the image created for this influence.
var/real_icon_state = "reality_smash"

/obj/effect/heretic_influence/Initialize(mapload)
. = ..()
GLOB.reality_smash_track.smashes += src
generate_name()

//var/image/heretic_image = image(icon, src, real_icon_state, OBJ_LAYER)
prepare_huds()
for(var/datum/atom_hud/data/heretic/h_hud in GLOB.huds)
h_hud.add_to_hud(src)
do_hud_stuff()
//add_alt_appearance(/datum/atom_hud/alternate_appearance/basic/has_antagonist/heretic, "reality_smash", heretic_image) //qwertodo: get someone that knows huds

//AddElement(/datum/element/block_turf_fingerprints)
//AddComponent(/datum/component/redirect_attack_hand_from_turf, interact_check = CALLBACK(src, PROC_REF(verify_user_can_see))) //oh fuck my attack chain ass

/obj/effect/heretic_influence/proc/verify_user_can_see(mob/user)
return (user.mind in GLOB.reality_smash_track.tracked_heretics)
///obj/effect/heretic_influence/proc/verify_user_can_see(mob/user)
//return (user.mind in GLOB.reality_smash_track.tracked_heretics)

/obj/effect/heretic_influence/Destroy()
GLOB.reality_smash_track.smashes -= src
Expand Down
1 change: 1 addition & 0 deletions code/modules/antagonists/heretic/items/heretic_blades.dm
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@
item_state = "key_blade"
after_use_message = "The Stewards hear your call..."
tool_behaviour = TOOL_CROWBAR
usesound = 'sound/items/crowbar.ogg' //Maybe something else?
toolspeed = 1.3

// Path of Moon's blade
Expand Down
14 changes: 7 additions & 7 deletions code/modules/antagonists/heretic/items/keyring.dm
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@

//get it?
var/obj/machinery/door/doorstination = (inverted ? !IS_HERETIC_OR_MONSTER(teleportee) : IS_HERETIC_OR_MONSTER(teleportee)) ? destination.our_airlock : find_random_airlock()
if(SEND_SIGNAL(teleportee, COMSIG_MOVABLE_TELEPORTING, get_turf(destination)) & COMPONENT_BLOCK_TELEPORT)
if(SEND_SIGNAL(teleportee, COMSIG_MOVABLE_TELEPORTING, get_turf(doorstination)) & COMPONENT_BLOCK_TELEPORT)
return FALSE
teleportee.forceMove(get_turf(destination))
teleportee.forceMove(get_turf(doorstination))

teleportee.client?.move_delay = 0 //make moving through smoother

Expand All @@ -74,15 +74,15 @@
///Returns a random airlock on the same Z level as our portal, that isnt our airlock
/obj/effect/lock_portal/proc/find_random_airlock()
var/list/turf/possible_destinations = list()
for(var/obj/machinery/door/airlock in GLOB.airlocks)
if(airlock.z != z)
for(var/obj/machinery/door/airlock/ourlock in GLOB.airlocks)
if(ourlock.z != z)
continue
if(airlock.loc == loc)
if(ourlock.loc == loc)
continue
var/area/airlock_area = get_area(airlock)
var/area/airlock_area = get_area(ourlock)
if(airlock_area.tele_proof)
continue
possible_destinations += airlock
possible_destinations += ourlock
return pick(possible_destinations)

///Asynchronous proc to unbolt, then open the passed door
Expand Down
1 change: 1 addition & 0 deletions code/modules/antagonists/heretic/knowledge/lock_lore.dm
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
else if(istype(target,/obj/machinery/door/airlock))
var/obj/machinery/door/airlock/door = target
door.unlock()
door.open()
//else if(istype(target, /obj/machinery/computer)) //qwertodo: as much of this as possible
// var/obj/machinery/computer/computer = target
// computer.authenticated = TRUE
Expand Down
20 changes: 12 additions & 8 deletions code/modules/antagonists/heretic/magic/aggressive_spread.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,28 @@


/datum/spell/aoe/rust_conversion/create_new_targeting()
var/datum/spell_targeting/aoe/targeting = new()
var/datum/spell_targeting/aoe/turf/targeting = new()
targeting.range = aoe_range
A.allowed_type = /atom
return targeting

/datum/spell/aoe/rust_conversion/cast(list/targets, mob/living/user = usr)
for(var/atom/victim in targets)
for(var/turf/target_turfs in targets)
// We have less chance of rusting stuff that's further
var/distance_to_caster = get_dist(victim, user)
var/distance_to_caster = get_dist(target_turfs, user)
var/chance_of_not_rusting = (max(distance_to_caster, 1) - 1) * 100 / (aoe_range + 1)

if(prob(chance_of_not_rusting))
return

continue
for(var/atom/victim in target_turfs)
if(isliving(user))
user.do_rust_heretic_act(victim)
else
victim.rust_heretic_act()
if(isliving(user))
user.do_rust_heretic_act(victim)
user.do_rust_heretic_act(target_turfs)
else
victim.rust_heretic_act()
target_turfs.rust_heretic_act()


/datum/spell/aoe/rust_conversion/construct
name = "Construct Spread"
Expand Down
8 changes: 4 additions & 4 deletions code/modules/antagonists/heretic/magic/caretaker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@
spell_requirements = NONE


/datum/spell/caretaker/create_new_targeting()
return new /datum/spell_targeting/self


/datum/spell/caretaker/before_cast(list/targets, mob/user)
..()

/datum/spell/caretaker/valid_target(target, user)
for(var/mob/living/alive in orange(5, user))
if(alive.stat != DEAD && alive.client)
to_chat(user, "<span class='warning'>There are sentient beings blocking you from shifting!</span>")
return FALSE
return TRUE

/datum/spell/caretaker/cast(list/targets, mob/user)
. = ..()
Expand Down
1 change: 1 addition & 0 deletions code/modules/antagonists/heretic/magic/cosmic_expansion.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
summon_amt = 9
summon_type = list(/obj/effect/forcefield/cosmic_field)
summon_ignore_density = TRUE
aoe_range = 2
/// The range at which people will get marked with a star mark.
var/star_mark_range = 7
/// Effect for when the spell triggers
Expand Down
9 changes: 7 additions & 2 deletions code/modules/antagonists/heretic/magic/cosmic_runes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
/// Rune removal effect.
var/obj/effect/rune_remove_effect = /obj/effect/temp_visual/cosmic_rune_fade

/datum/spell/cosmic_rune/create_new_targeting()
var/datum/spell_targeting/aoe/turf/targeting = new()
targeting.range = 1
return targeting

/datum/spell/cosmic_rune/cast(list/targets, mob/user)
. = ..()
var/obj/effect/cosmic_rune/first_rune_resolved = locateUID(first_rune)
Expand Down Expand Up @@ -116,8 +121,8 @@
addtimer(CALLBACK(src, TYPE_PROC_REF(/atom, update_atom_colour)), 0.5 SECONDS)

/// For linking a new rune
/obj/effect/cosmic_rune/proc/link_rune(new_rune)
linked_rune = new_rune
/obj/effect/cosmic_rune/proc/link_rune(obj/effect/cosmic_rune/new_rune)
linked_rune = new_rune.UID()

/obj/effect/cosmic_rune/Destroy()
var/obj/effect/cosmic_rune/linked_rune_resolved = locateUID(linked_rune)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/antagonists/heretic/magic/mind_gate.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
invocation_type = INVOCATION_WHISPER
spell_requirements = NONE

/datum/spell/blind/create_new_targeting()
/datum/spell/mind_gate/create_new_targeting()
var/datum/spell_targeting/click/C = new()
C.selection_type = SPELL_SELECTION_RANGE
C.allowed_type = /mob/living/carbon/human
Expand Down
Loading

0 comments on commit 25c65e6

Please sign in to comment.