Skip to content

Commit

Permalink
[MIRROR] The Voidwalker | New Midround Antagonist [MDB IGNORE] (#4546)
Browse files Browse the repository at this point in the history
* The Voidwalker | New Midround Antagonist

* Update role_preferences.dm

* Update sql_ban_system.dm

* Update _bodyparts.dm

* Update role_preferences.dm

* Update lazy_templates.dm

* Update _bodyparts.dm

* Update _bodyparts.dm

* Grep

---------

Co-authored-by: NovaBot <[email protected]>
Co-authored-by: Time-Green <[email protected]>
Co-authored-by: SomeRandomOwl <[email protected]>
Co-authored-by: Bloop <[email protected]>
Co-authored-by: Iajret <[email protected]>
  • Loading branch information
6 people authored Jul 18, 2024
1 parent ad3f252 commit 1417993
Show file tree
Hide file tree
Showing 63 changed files with 2,591 additions and 25 deletions.
1,101 changes: 1,101 additions & 0 deletions _maps/templates/lazy_templates/voidwalker_void.dmm

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion code/__DEFINES/dcs/signals/signals_atom/signals_atom_main.dm
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
#define COMSIG_ATOM_EXITED "atom_exited"
///from base of atom/movable/Moved(): (atom/movable/gone, direction)
#define COMSIG_ATOM_ABSTRACT_EXITED "atom_abstract_exited"
///from base of atom/Bumped(): (/atom/movable)
///from base of atom/Bumped(): (/atom/movable) (the one that gets bumped)
#define COMSIG_ATOM_BUMPED "atom_bumped"
///from base of atom/has_gravity(): (turf/location, list/forced_gravities)
#define COMSIG_ATOM_HAS_GRAVITY "atom_has_gravity"
Expand Down Expand Up @@ -140,3 +140,6 @@
/// From /obj/effect/particle_effect/sparks/proc/sparks_touched(datum/source, atom/movable/singed)
#define COMSIG_ATOM_TOUCHED_SPARKS "atom_touched_sparks"
#define COMSIG_ATOM_TOUCHED_HAZARDOUS_SPARKS "atom_touched_hazardous_sparks"

/// From whoever has been revealed (atom/revealed)
#define COMSIG_ATOM_REVEAL "atom_reveal"
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@
#define COMSIG_MOVABLE_MOVED "movable_moved"
///from base of atom/movable/Cross(): (/atom/movable)
#define COMSIG_MOVABLE_CROSS "movable_cross"
#define COMPONENT_BLOCK_CROSS (1<<0)
///from base of atom/movable/Move(): (/atom/movable)
#define COMSIG_MOVABLE_CROSS_OVER "movable_cross_am"
///from base of atom/movable/Bump(): (/atom)
#define COMSIG_MOVABLE_BUMP "movable_bump"
#define COMPONENT_INTERCEPT_BUMPED (1<<0)
///from base of atom/movable/newtonian_move(): (inertia_direction, start_delay)
#define COMSIG_MOVABLE_NEWTONIAN_MOVE "movable_newtonian_move"
#define COMPONENT_MOVABLE_NEWTONIAN_BLOCK (1<<0)
Expand Down Expand Up @@ -123,3 +125,4 @@
#define COMSIG_MOVABLE_BUMP_PUSHED "movable_bump_pushed"
/// Stop it from moving
#define COMPONENT_NO_PUSH (1<<0)

Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@
#define COMSIG_ATOM_START_PULL "movable_start_pull"
/// called on /atom when something attempts to pass through it (atom/movable/source, atom/movable/passing, dir)
#define COMSIG_ATOM_TRIED_PASS "atom_tried_pass"
#define COMSIG_COMPONENT_PERMIT_PASSAGE (1 << 0)
/// called on /movable when something attempts to pass through it (atom/movable/source, atom/movable/passing, dir) AND WHEN general_movement = FALSE for some fucking reason
#define COMSIG_MOVABLE_CAN_PASS_THROUGH "movable_can_pass_through"
/// If given, we permit passage through
#define COMSIG_COMPONENT_PERMIT_PASSAGE (1 << 0)
/// If given, we DONT permit passage through
#define COMSIG_COMPONENT_REFUSE_PASSAGE (1 << 1)
///called on /living when someone starts pulling (atom/movable/pulled, state, force)
#define COMSIG_LIVING_START_PULL "living_start_pull"
///called on /living when someone is pulled (mob/living/puller)
Expand Down
4 changes: 4 additions & 0 deletions code/__DEFINES/dcs/signals/signals_spell.dm
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@
#define COMSIG_MOB_EJECTED_FROM_JAUNT "spell_mob_eject_jaunt"
/// Sent from datum/action/cooldown/spell/jaunt/exit_jaunt, after the mob exited jaunt: (datum/action/cooldown/spell/spell)
#define COMSIG_MOB_AFTER_EXIT_JAUNT "spell_mob_after_exit_jaunt"
/// Sent from /obj/effect/dummy/phased_mob/proc/phased_check when moving to the holder object: (/obj/effect/dummy/phased_mob, mob/living/phaser, turf/newloc)
#define COMSIG_MOB_PHASED_CHECK "mob_phased_check"
/// Return this to cancel the phased move
#define COMPONENT_BLOCK_PHASED_MOVE (1 << 0)

/// Sent from/datum/action/cooldown/spell/jaunt/bloodcrawl/slaughter_demon/try_enter_jaunt,
/// to any unconscious / critical mobs being dragged when the jaunter enters blood:
Expand Down
6 changes: 4 additions & 2 deletions code/__DEFINES/lazy_templates.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
#define LAZY_TEMPLATE_KEY_NINJA_HOLDING_FACILITY "LT_NINJAHOLDING"
#define LAZY_TEMPLATE_KEY_ABDUCTOR_SHIPS "LT_ABDUCTORSHIPS"
#define LAZY_TEMPLATE_KEY_HERETIC_SACRIFICE "LT_HERETICSACRIFICE"
#define LAZY_TEMPLATE_KEY_VOIDWALKER_VOID "LT_VOIDWALKERVOID"

#define LAZY_TEMPLATE_KEY_LIST_ALL(...) list( \
"Nukie Base" = LAZY_TEMPLATE_KEY_NUKIEBASE, \
"Wizard Den" = LAZY_TEMPLATE_KEY_WIZARDDEN, \
"Ninja Holding" = LAZY_TEMPLATE_KEY_NINJA_HOLDING_FACILITY, \
"Abductor Ships" = LAZY_TEMPLATE_KEY_ABDUCTOR_SHIPS, \
"Heretic Sacrifice Level" = LAZY_TEMPLATE_KEY_HERETIC_SACRIFICE, \
"Outpost of Cogs" = LAZY_TEMPLATE_KEY_OUTPOST_OF_COGS, \
) // NOVA EDIT ABOVE - OUTPOST OF COGS
"Voidwalker Void" = LAZY_TEMPLATE_KEY_VOIDWALKER_VOID, \
"Outpost of Cogs" = LAZY_TEMPLATE_KEY_OUTPOST_OF_COGS, /* NOVA EDIT ADDITION */ \
)
4 changes: 4 additions & 0 deletions code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@
#define SPECIES_ZOMBIE "zombie"
#define SPECIES_ZOMBIE_INFECTIOUS "memezombie"
#define SPECIES_ZOMBIE_KROKODIL "krokodil_zombie"
#define SPECIES_VOIDWALKER "voidwalker"

// Like species IDs, but not specifically attached a species.
#define BODYPART_ID_ALIEN "alien"
Expand Down Expand Up @@ -482,6 +483,9 @@
#define ROBOTIC_BRUTE_EXAMINE_TEXT "denting"
#define ROBOTIC_BURN_EXAMINE_TEXT "charring"

#define GLASSY_BRUTE_EXAMINE_TEXT "cracking"
#define GLASSY_BURN_EXAMINE_TEXT "deformation"

#define GRAB_PIXEL_SHIFT_PASSIVE 6
#define GRAB_PIXEL_SHIFT_AGGRESSIVE 12
#define GRAB_PIXEL_SHIFT_NECK 16
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/role_preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
#define ROLE_MUTANT "Mutated Abomination"
#define ROLE_CLOCK_CULTIST "Clock Cultist"
// NOVA EDIT ADDITION END
#define ROLE_VOIDWALKER "Voidwalker"

// Latejoin roles
#define ROLE_HERETIC_SMUGGLER "Heretic Smuggler"
Expand Down Expand Up @@ -180,6 +181,7 @@ GLOBAL_LIST_INIT(special_roles, list(
ROLE_DRIFTING_CONTRACTOR = 14,
ROLE_MUTANT = 0,
// NOVA EDIT ADDITION END
ROLE_VOIDWALKER = 0,

// Latejoin
ROLE_HERETIC_SMUGGLER = 0,
Expand Down
2 changes: 1 addition & 1 deletion code/__byond_version_compat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// We use wrappers for this in case some part of the api ever changes, and to make their function more clear
// For the record: GLOBAL_VERB_REF would be useless as verbs can't be global.

/// Call by name proc references, checks if the proc exists on either this type or as a global proc.
/// Call by name proc references, checks if the proc exists on either this type () (AND ONLY THIS TYPE) or as a global proc.
#define PROC_REF(X) (nameof(.proc/##X))
/// Call by name verb references, checks if the verb exists on either this type or as a global verb.
#define VERB_REF(X) (nameof(.verb/##X))
Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/lists/names.dm
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ GLOBAL_LIST_INIT(guardian_first_names, world.file2list("strings/names/guardian_d
GLOBAL_LIST_INIT(guardian_tech_surnames, world.file2list("strings/names/guardian_gamepieces.txt"))
GLOBAL_LIST_INIT(guardian_fantasy_surnames, world.file2list("strings/names/guardian_tarot.txt"))
GLOBAL_LIST_INIT(operative_aliases, world.file2list("strings/names/operative_alias.txt"))
GLOBAL_LIST_INIT(voidwalker_names, world.file2list("strings/names/voidwalker.txt"))

GLOBAL_LIST_INIT(verbs, world.file2list("strings/names/verbs.txt"))
GLOBAL_LIST_INIT(ing_verbs, world.file2list("strings/names/ing_verbs.txt"))
Expand Down
39 changes: 39 additions & 0 deletions code/controllers/subsystem/dynamic/dynamic_rulesets_midround.dm
Original file line number Diff line number Diff line change
Expand Up @@ -973,3 +973,42 @@

#undef MALF_ION_PROB
#undef REPLACE_LAW_WITH_ION_PROB

/// Midround Voidwalker Ruleset (From Ghosts)
/datum/dynamic_ruleset/midround/from_ghosts/voidwalker
name = "Voidwalker"
midround_ruleset_style = MIDROUND_RULESET_STYLE_LIGHT
antag_datum = /datum/antagonist/voidwalker
antag_flag = ROLE_VOIDWALKER
antag_flag_override = ROLE_VOIDWALKER
ruleset_category = parent_type::ruleset_category | RULESET_CATEGORY_NO_WITTING_CREW_ANTAGONISTS
required_enemies = list(2,2,1,1,1,1,1,0,0,0)
required_candidates = 1
weight = 2
cost = 5
minimum_players = 40
repeatable = TRUE
ruleset_lazy_templates = list(LAZY_TEMPLATE_KEY_VOIDWALKER_VOID)
/// The space turf we find in acceptable(), cached for ease
var/space_turf

/datum/dynamic_ruleset/midround/from_ghosts/voidwalker/acceptable(population = 0, threat_level = 0)
space_turf = find_space_spawn()
if(!space_turf)
return FALSE
return ..()

/datum/dynamic_ruleset/midround/from_ghosts/voidwalker/generate_ruleset_body(mob/applicant)
var/datum/mind/player_mind = new /datum/mind(applicant.key)
player_mind.active = TRUE

var/mob/living/carbon/human/voidwalker = new (space_turf)
player_mind.transfer_to(voidwalker)
player_mind.set_assigned_role(SSjob.GetJobType(/datum/job/voidwalker))
player_mind.special_role = antag_flag
player_mind.add_antag_datum(antag_datum)

playsound(voidwalker, 'sound/magic/ethereal_exit.ogg', 50, TRUE, -1)
message_admins("[ADMIN_LOOKUPFLW(voidwalker)] has been made into a Voidwalker by the midround ruleset.")
log_dynamic("[key_name(voidwalker)] was spawned as a Voidwalker by the midround ruleset.")
return voidwalker
8 changes: 8 additions & 0 deletions code/controllers/subsystem/parallax.dm
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,12 @@ SUBSYSTEM_DEF(parallax)
/datum/controller/subsystem/parallax/proc/post_station_setup()
random_layer?.apply_global_effects()

/// Return the most dominant color, if we have a colored background (mostly nebula gas)
/datum/controller/subsystem/parallax/proc/get_parallax_color()
var/atom/movable/screen/parallax_layer/random/space_gas/gas = random_layer
if(!istype(gas))
return

return gas.parallax_color

#undef PARALLAX_NONE
4 changes: 4 additions & 0 deletions code/datums/bodypart_overlays/bodypart_overlay.dm
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,7 @@
///Generate a unique identifier to cache with. If you change something about the image, but the icon cache stays the same, it'll simply pull the unchanged image out of the cache
/datum/bodypart_overlay/proc/generate_icon_cache()
return list()

/// Additionally color or texture the limb
/datum/bodypart_overlay/proc/modify_bodypart_appearance(datum/appearance)
return
2 changes: 1 addition & 1 deletion code/datums/bodypart_overlays/markings_bodypart_overlay.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

/datum/bodypart_overlay/simple/body_marking/get_image(layer, obj/item/bodypart/limb)
var/gender_string = (use_gender && limb.is_dimorphic) ? (limb.gender == MALE ? MALE : FEMALE + "_") : "" //we only got male and female sprites
return image(icon, gender_string + icon_state + "_" + limb.body_zone, layer = layer)
return mutable_appearance(icon, gender_string + icon_state + "_" + limb.body_zone, layer = layer)

/datum/bodypart_overlay/simple/body_marking/moth
dna_feature_key = "moth_markings"
Expand Down
2 changes: 1 addition & 1 deletion code/datums/bodypart_overlays/simple_bodypart_overlay.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
var/draw_color

/datum/bodypart_overlay/simple/get_image(layer, obj/item/bodypart/limb)
return image(icon, icon_state, layer = layer)
return mutable_appearance(icon, icon_state, layer = layer)

/datum/bodypart_overlay/simple/color_image(image/overlay, layer, obj/item/bodypart/limb)

Expand Down
23 changes: 23 additions & 0 deletions code/datums/bodypart_overlays/texture_bodypart_overlay.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/// Bodypart overlays focused on texturing limbs
/datum/bodypart_overlay/texture
/// icon file for the texture
var/texture_icon
/// icon state for the texture
var/texture_icon_state
/// Cache the icon so we dont have to make a new one each time
var/cached_texture_icon

/datum/bodypart_overlay/texture/New()
. = ..()

cached_texture_icon = icon(texture_icon, texture_icon_state)

/datum/bodypart_overlay/texture/modify_bodypart_appearance(datum/appearance)
appearance.add_filter("bodypart_texture_[texture_icon_state]", 1, layering_filter(icon = cached_texture_icon,blend_mode = BLEND_INSET_OVERLAY))

/datum/bodypart_overlay/texture/generate_icon_cache()
return "[type]"

/datum/bodypart_overlay/texture/spacey
texture_icon_state = "spacey"
texture_icon = 'icons/mob/human/textures.dmi'
37 changes: 37 additions & 0 deletions code/datums/components/banned_from_space.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/// Following recent tomfoolery, we've decided to ban you from space.
/datum/component/banned_from_space
/// List of recent tiles we walked on that aren't space
var/list/tiles = list()
/// The max amount of tiles we store
var/max_tile_list_size = 4

/datum/component/banned_from_space/Initialize(...)
if(!ismovable(parent))
return COMPONENT_INCOMPATIBLE

RegisterSignal(parent, COMSIG_ATOM_ENTERING, PROC_REF(check_if_space))

/datum/component/banned_from_space/proc/check_if_space(atom/source, atom/new_location)
SIGNAL_HANDLER

if(!isturf(new_location))
return

if(isspaceturf(new_location))
send_back(parent)

else
tiles.Add(new_location)
if(tiles.len > max_tile_list_size)
tiles.Cut(1, 2)

/datum/component/banned_from_space/proc/send_back(atom/movable/parent)
var/new_turf

if(tiles.len)
new_turf = tiles[1]
new /obj/effect/temp_visual/portal_animation(parent.loc, new_turf, parent)
else
new_turf = get_random_station_turf()

parent.forceMove(new_turf)
50 changes: 50 additions & 0 deletions code/datums/components/glass_passer.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/// Allows us to move through glass but not electrified glass. Can also do a little slowdown before passing through
/datum/component/glass_passer
/// How long does it take us to move into glass?
var/pass_time = 0 SECONDS

/datum/component/glass_passer/Initialize(pass_time)
if(!ismob(parent)) //if its not a mob then just directly use passwindow
return COMPONENT_INCOMPATIBLE

src.pass_time = pass_time

if(!pass_time)
passwindow_on(parent, type)
else
RegisterSignal(parent, COMSIG_MOVABLE_BUMP, PROC_REF(bumped))

var/mob/mobbers = parent
mobbers.generic_canpass = FALSE
RegisterSignal(parent, COMSIG_MOVABLE_CROSS_OVER, PROC_REF(cross_over))

/datum/component/glass_passer/Destroy()
. = ..()
if(parent)
passwindow_off(parent, type)

/datum/component/glass_passer/proc/cross_over(mob/passer, atom/crosser)
SIGNAL_HANDLER

if(istype(crosser, /obj/structure/grille))
var/obj/structure/grille/grillefriend = crosser
if(grillefriend.is_shocked()) //prevent passage of shocked
crosser.balloon_alert(passer, "is shocked!")
return COMPONENT_BLOCK_CROSS

return null

/datum/component/glass_passer/proc/bumped(mob/living/owner, atom/bumpee)
SIGNAL_HANDLER

if(!istype(bumpee, /obj/structure/window))
return

INVOKE_ASYNC(src, PROC_REF(phase_through_glass), owner, bumpee)

/datum/component/glass_passer/proc/phase_through_glass(mob/living/owner, atom/bumpee)
if(!do_after(owner, pass_time, bumpee))
return
passwindow_on(owner, type)
try_move_adjacent(owner, get_dir(owner, bumpee))
passwindow_off(owner, type)
14 changes: 14 additions & 0 deletions code/datums/components/space_allaergy.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/// Slowly kill the thing when iuts on a planet
/datum/component/planet_allergy/Initialize(...)
if(!isliving(parent))
return COMPONENT_INCOMPATIBLE

RegisterSignal(parent, COMSIG_ENTER_AREA, PROC_REF(entered_area))

/datum/component/planet_allergy/proc/entered_area(mob/living/parent, area/new_area)
SIGNAL_HANDLER

if(is_on_a_planet(parent) && parent.has_gravity())
parent.apply_status_effect(/datum/status_effect/planet_allergy) //your gamer body cant stand real gravity
else
parent.remove_status_effect(/datum/status_effect/planet_allergy)
54 changes: 54 additions & 0 deletions code/datums/components/space_camo.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/// Camouflage us when we enter space by increasing alpha and or changing color
/datum/component/space_camo
/// Alpha we have in space
var/space_alpha
/// Alpha we have elsewhere
var/non_space_alpha
/// How long we can't enter camo after hitting or being hit
var/reveal_after_combat
/// The world time after we can camo again
VAR_PRIVATE/next_camo

/datum/component/space_camo/Initialize(space_alpha, non_space_alpha, reveal_after_combat)
if(!ismovable(parent))
return COMPONENT_INCOMPATIBLE

src.space_alpha = space_alpha
src.non_space_alpha = non_space_alpha
src.reveal_after_combat = reveal_after_combat

RegisterSignal(parent, COMSIG_ATOM_ENTERING, PROC_REF(on_atom_entering))

if(isliving(parent))
RegisterSignals(parent, list(COMSIG_ATOM_WAS_ATTACKED, COMSIG_MOB_ITEM_ATTACK, COMSIG_LIVING_UNARMED_ATTACK, COMSIG_ATOM_BULLET_ACT, COMSIG_ATOM_REVEAL), PROC_REF(force_exit_camo))

/datum/component/space_camo/proc/on_atom_entering(atom/movable/entering, atom/entered)
SIGNAL_HANDLER

if(!attempt_enter_camo())
exit_camo(parent)

/datum/component/space_camo/proc/attempt_enter_camo()
if(!isspaceturf(get_turf(parent)) || next_camo > world.time)
return FALSE

enter_camo(parent)
return TRUE

/datum/component/space_camo/proc/force_exit_camo()
SIGNAL_HANDLER

exit_camo(parent)
next_camo = world.time + reveal_after_combat
addtimer(CALLBACK(src, PROC_REF(attempt_enter_camo)), reveal_after_combat, TIMER_OVERRIDE | TIMER_UNIQUE)

/datum/component/space_camo/proc/enter_camo(atom/movable/parent)
if(parent.alpha != space_alpha)
animate(parent, alpha = space_alpha, time = 0.5 SECONDS)
parent.remove_from_all_data_huds()
parent.add_atom_colour(SSparallax.get_parallax_color(), TEMPORARY_COLOUR_PRIORITY)

/datum/component/space_camo/proc/exit_camo(atom/movable/parent)
animate(parent, alpha = non_space_alpha, time = 0.5 SECONDS)
parent.add_to_all_human_data_huds()
parent.remove_atom_colour(TEMPORARY_COLOUR_PRIORITY)
Loading

0 comments on commit 1417993

Please sign in to comment.