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

[PTBF] Hallucination: The Backrooms #27710

Open
wants to merge 34 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
b4f437f
add backrooms hallucination
pwbokie Dec 22, 2024
83c6ab2
Merge branch 'ParadiseSS13:master' into paul-backrooms
pwbokie Dec 22, 2024
60491cc
mapmerge
pwbokie Dec 22, 2024
2597633
Merge branch 'paul-backrooms' of github.com:pwbokie/SlimeioParadise i…
pwbokie Dec 22, 2024
df4a527
fix some backrooms issues and add some error handling stuff
pwbokie Dec 23, 2024
f330df5
Merge branch 'ParadiseSS13:master' into paul-backrooms
pwbokie Dec 23, 2024
0112a15
change backrooms carpet
pwbokie Dec 23, 2024
20b230c
remove code that isn't doing anything
pwbokie Dec 23, 2024
0cdee55
tick new backrooms file
pwbokie Dec 23, 2024
b1c30c3
try a new method with movement
pwbokie Dec 24, 2024
c76e955
don't smooth corners
pwbokie Dec 24, 2024
0fe0e32
fix red carpet hiding under backrooms carpet
pwbokie Dec 24, 2024
0ca2428
fix multiple turfs
pwbokie Dec 24, 2024
18a5ca2
accidentally removed important code tracking items, oops
pwbokie Dec 24, 2024
f6ee760
implement new solution to the backrooms clone thing
pwbokie Dec 24, 2024
f0cde09
hmm so that's what the icon does
pwbokie Dec 24, 2024
69649f4
indentation machine broke
pwbokie Dec 24, 2024
de5289b
remove the tucked away spawn locations
pwbokie Dec 24, 2024
1580124
Merge branch 'master' into paul-backrooms
pwbokie Dec 24, 2024
f015c02
Merge branch 'master' into paul-backrooms
pwbokie Dec 26, 2024
b263038
Merge branch 'master' of github.com:pwbokie/SlimeioParadise into paul…
pwbokie Jan 10, 2025
8ed1129
Merge branch 'master' of github.com:pwbokie/SlimeioParadise into paul…
pwbokie Jan 10, 2025
5fbc5b8
add comment for follow_movement
pwbokie Jan 10, 2025
75076d3
revert oversight (the bar can keep its bevvies)
pwbokie Jan 10, 2025
ca85a70
Merge branch 'master' into paul-backrooms
pwbokie Jan 10, 2025
c20d04e
put the thing back in that I wasn't supposed to remove
pwbokie Jan 10, 2025
055cd8e
Merge branch 'paul-backrooms' of github.com:pwbokie/SlimeioParadise i…
pwbokie Jan 10, 2025
a3b32bd
Merge branch 'master' of github.com:pwbokie/SlimeioParadise into paul…
pwbokie Jan 10, 2025
c9c7a01
Update code/modules/hallucinations/effects/backrooms.dm
pwbokie Jan 11, 2025
0ece557
Update code/modules/hallucinations/effects/backrooms.dm
pwbokie Jan 13, 2025
e751dac
Merge branch 'master' into paul-backrooms
pwbokie Jan 15, 2025
6fc9f63
fix missing comma
pwbokie Jan 15, 2025
43445be
code improvement tweaks from DLG
pwbokie Jan 15, 2025
1ca0d91
add a fade out and in
pwbokie Jan 15, 2025
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
2,242 changes: 1,137 additions & 1,105 deletions _maps/map_files/generic/centcomm.dmm

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions code/__DEFINES/icon_smoothing_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ DEFINE_BITFIELD(smoothing_flags, list(
#define SMOOTH_GROUP_REGULAR_WALLS S_OBJ(17) ///turf/simulated/wall, /obj/structure/falsewall
#define SMOOTH_GROUP_REINFORCED_WALLS S_OBJ(18) ///turf/simulated/wall/r_wall, /obj/structure/falsewall/reinforced
#define SMOOTH_GROUP_CULT_WALLS S_OBJ(19) ///turf/simulated/wall/cult
#define SMOOTH_GROUP_BACKROOMS_WALLS S_OBJ(20) ///turf/simulated/wall/backrooms, /obj/structure/falsewall/backrooms

#define SMOOTH_GROUP_WINDOW_FULLTILE S_OBJ(21) ///turf/simulated/indestructible/fakeglass, /obj/structure/window/full/basic, /obj/structure/window/full/plasmabasic, /obj/structure/window/full/plasmareinforced, /obj/structure/window/full/reinforced
#define SMOOTH_GROUP_WINDOW_FULLTILE_BRASS S_OBJ(22) ///obj/structure/window/brass/fulltile
Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/mapping_vars.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ GLOBAL_LIST_EMPTY(newplayer_start)
GLOBAL_LIST_EMPTY(latejoin)
GLOBAL_LIST_EMPTY(prisonwarp) //prisoners go to these
GLOBAL_LIST_EMPTY(syndieprisonwarp) //contractor targets go to these
GLOBAL_LIST_EMPTY(backroomswarp) //backrooms hallucinators go to these
GLOBAL_LIST_EMPTY(xeno_spawn)//Aliens spawn at these.
GLOBAL_LIST_EMPTY(ertdirector)
GLOBAL_LIST_EMPTY(emergencyresponseteamspawn)
Expand Down
6 changes: 6 additions & 0 deletions code/game/area/centcom_areas.dm
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,9 @@
requires_power = FALSE
has_gravity = TRUE
hide_attacklogs = TRUE

/area/backrooms
name = "Backrooms"
icon_state = "yellow"
requires_power = FALSE
dynamic_lighting = DYNAMIC_LIGHTING_FORCED
8 changes: 8 additions & 0 deletions code/game/objects/effects/landmarks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,14 @@ INITIALIZE_IMMEDIATE(/obj/effect/landmark/newplayer_start) //Without this you sp
name = "bubblegum_arena_exit"
icon_state = "bubblegumjumpscare"

/obj/effect/landmark/spawner/backrooms
name = "backrooms_spawn"
icon_state = "Assistant"

/obj/effect/landmark/spawner/backrooms/Initialize(mapload)
spawner_list = GLOB.backroomswarp
return ..()

/obj/effect/landmark/spawner/syndie
name = "Syndicate-Spawn"
icon_state = "Syndie"
Expand Down
9 changes: 9 additions & 0 deletions code/game/objects/structures/false_walls.dm
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,15 @@
smoothing_groups = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_PLASTITANIUM_WALLS)
canSmoothWith = list(SMOOTH_GROUP_PLASTITANIUM_WALLS, SMOOTH_GROUP_AIRLOCK, SMOOTH_GROUP_SHUTTLE_PARTS)

/obj/structure/falsewall/backrooms
desc = "A strange wall that looks like cheap wallpaper and drywall."
icon = 'icons/turf/walls/backrooms_wall.dmi'
icon_state = "backrooms_wall-0"
base_icon_state = "backrooms_wall"
smoothing_flags = SMOOTH_BITMASK
smoothing_groups = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_BACKROOMS_WALLS)
canSmoothWith = list(SMOOTH_GROUP_BACKROOMS_WALLS)

/obj/structure/falsewall/brass
name = "clockwork wall"
desc = "A huge chunk of warm metal. The clanging of machinery emanates from within."
Expand Down
8 changes: 8 additions & 0 deletions code/game/turfs/simulated/floor/misc_floor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,14 @@
break_tile_to_plating()
hotspot_expose(1000,CELL_VOLUME)

// Carpet used in the backrooms hallucination
/turf/simulated/floor/backrooms_carpet
name = "backrooms carpet"
desc = "An old, musty carpet. It smells faintly mildewy."
icon = 'icons/turf/floors.dmi'
icon_state = "backrooms_carpet"
baseturf = /turf/simulated/floor/backrooms_carpet

/turf/open/floor/plating/rust
//SDMM supports colors, this is simply for easier mapping
//and should be removed on initialize
Expand Down
10 changes: 10 additions & 0 deletions code/game/turfs/simulated/walls_indestructible.dm
Original file line number Diff line number Diff line change
Expand Up @@ -302,3 +302,13 @@ GLOBAL_DATUM(title_splash, /turf/simulated/wall/indestructible/splashscreen)
smoothing_groups = list(SMOOTH_GROUP_SIMULATED_TURFS, SMOOTH_GROUP_WALLS, SMOOTH_GROUP_SYNDICATE_WALLS)
canSmoothWith = list(SMOOTH_GROUP_SYNDICATE_WALLS, SMOOTH_GROUP_AIRLOCK, SMOOTH_GROUP_SHUTTLE_PARTS)

/turf/simulated/wall/indestructible/backrooms
name = "wall"
desc = "A strange wall that looks like cheap wallpaper and drywall."
icon = 'icons/turf/walls/backrooms_wall.dmi'
icon_state = "backrooms_wall-0"
base_icon_state = "backrooms_wall"
explosion_block = 4
smoothing_flags = SMOOTH_BITMASK
smoothing_groups = list(SMOOTH_GROUP_BACKROOMS_WALLS)
canSmoothWith = list(SMOOTH_GROUP_BACKROOMS_WALLS, SMOOTH_GROUP_AIRLOCK, SMOOTH_GROUP_SHUTTLE_PARTS)
58 changes: 58 additions & 0 deletions code/modules/hallucinations/effects/backrooms.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
GLOBAL_VAR_INIT(backrooms_occupied, FALSE)

/**
* # Hallucination - Backrooms
*
* Temporarily sends the target to the backrooms. Their body's movement matches their movement in the backrooms.
*/

/datum/hallucination_manager/backrooms
// this is the total length of the hallucination, if it's too short it cuts off the end
trigger_time = 14 SECONDS
// Human that will see the hallucination
var/mob/living/carbon/human/human_owner
// Item that will copy the owner's visible contents
var/obj/item/clone_base

/datum/hallucination_manager/backrooms/on_spawn()
if(!ishuman(owner))
return
human_owner = owner
pwbokie marked this conversation as resolved.
Show resolved Hide resolved
// One person at a time in the backrooms, no backroom brawls allowed.
if(GLOB.backrooms_occupied)
return
GLOB.backrooms_occupied = TRUE
fade_out_trigger()

/datum/hallucination_manager/backrooms/proc/fade_out_trigger()
human_owner.overlay_fullscreen("sleepblind", /atom/movable/screen/fullscreen/center/blind/sleeping, animated = 1 SECONDS)
trigger_timer = addtimer(CALLBACK(src, PROC_REF(do_hallucination_trigger)), 1 SECONDS, TIMER_STOPPABLE)

/datum/hallucination_manager/backrooms/proc/do_hallucination_trigger()
human_owner.clear_fullscreen("sleepblind")
RegisterSignal(human_owner, COMSIG_MOVABLE_MOVED, PROC_REF(follow_movement))
var/obj/spawn_location = pick(GLOB.backroomswarp)
clone_base = new(spawn_location)
clone_base.vis_contents += human_owner
human_owner.reset_perspective(clone_base)
trigger_timer = addtimer(CALLBACK(src, PROC_REF(fade_in_trigger)), 12 SECONDS, TIMER_STOPPABLE)

/datum/hallucination_manager/backrooms/proc/fade_in_trigger()
human_owner.overlay_fullscreen("sleepblind", /atom/movable/screen/fullscreen/center/blind/sleeping, animated = 1 SECONDS)
trigger_timer = addtimer(CALLBACK(src, PROC_REF(end_fade_trigger)), 1 SECONDS, TIMER_STOPPABLE)

/datum/hallucination_manager/backrooms/proc/end_fade_trigger()
human_owner.clear_fullscreen("sleepblind")

/datum/hallucination_manager/backrooms/Destroy(force)
GLOB.backrooms_occupied = FALSE
UnregisterSignal(human_owner, COMSIG_MOVABLE_MOVED)
human_owner.reset_perspective(human_owner)
human_owner = null
QDEL_NULL(clone_base)
return ..()

/datum/hallucination_manager/backrooms/proc/follow_movement(source, atom/old_loc, dir, forced)
// signal is called above in on_spawn so that whenever our human moves, we also move the clone
SIGNAL_HANDLER // COMSIG_MOVABLE_MOVED
step_towards(clone_base, get_step(get_turf(clone_base), dir))
7 changes: 4 additions & 3 deletions code/modules/hallucinations/hallucination_manager.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
RegisterSignal(owner, COMSIG_PARENT_QDELETING, PROC_REF(signal_qdel))
spawn_hallucination()

/datum/hallucination_manager/Destroy(force, ...)
/datum/hallucination_manager/Destroy(force)
. = ..()
owner = null
QDEL_NULL(hallucination_list)
Expand All @@ -38,8 +38,9 @@
var/turf/spawn_location = get_spawn_location()
if(!spawn_location)
return
initial_hallucination = new initial_hallucination(spawn_location, owner)
hallucination_list |= initial_hallucination
if(initial_hallucination)
initial_hallucination = new initial_hallucination(spawn_location, owner)
hallucination_list |= initial_hallucination
on_spawn()
trigger_timer = addtimer(CALLBACK(src, PROC_REF(on_trigger)), trigger_time, TIMER_DELETE_ME)

Expand Down
3 changes: 2 additions & 1 deletion code/modules/hallucinations/hallucinations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ GLOBAL_LIST_INIT(hallucinations, list(
/obj/effect/hallucination/fake_grenade/spawner = 10,
/obj/effect/hallucination/terror_infestation = 10,
/obj/effect/hallucination/loose_energy_ball = 10,
/datum/hallucination_manager/blind_rush = 1,
/datum/hallucination_manager/xeno_pounce = 10,
/datum/hallucination_manager/backrooms = 1,
/datum/hallucination_manager/blind_rush = 1,
/datum/hallucination_manager/waves = 2,
/obj/effect/hallucination/blob = 10,
)
Expand Down
Binary file modified icons/turf/floors.dmi
Binary file not shown.
Binary file added icons/turf/walls/backrooms_wall.dmi
Binary file not shown.
1 change: 1 addition & 0 deletions paradise.dme
Original file line number Diff line number Diff line change
Expand Up @@ -1994,6 +1994,7 @@
#include "code\modules\games\unum.dm"
#include "code\modules\hallucinations\hallucination_manager.dm"
#include "code\modules\hallucinations\hallucinations.dm"
#include "code\modules\hallucinations\effects\backrooms.dm"
#include "code\modules\hallucinations\effects\blind_rush_hallucination.dm"
#include "code\modules\hallucinations\effects\common.dm"
#include "code\modules\hallucinations\effects\grenades.dm"
Expand Down
Loading