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

add: UnusualVision protection for all gates areas #4149

Closed
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
1,938 changes: 969 additions & 969 deletions _maps/map_files/RandomZLevels/academy.dmm

Large diffs are not rendered by default.

516 changes: 258 additions & 258 deletions _maps/map_files/RandomZLevels/beach.dmm

Large diffs are not rendered by default.

2,236 changes: 1,118 additions & 1,118 deletions _maps/map_files/RandomZLevels/blackmarketpackers.dmm

Large diffs are not rendered by default.

310 changes: 155 additions & 155 deletions _maps/map_files/RandomZLevels/example.dmm

Large diffs are not rendered by default.

1,551 changes: 778 additions & 773 deletions _maps/map_files/RandomZLevels/moonoutpost19.dmm

Large diffs are not rendered by default.

4,158 changes: 2,079 additions & 2,079 deletions _maps/map_files/RandomZLevels/spacebattle.dmm

Large diffs are not rendered by default.

1,821 changes: 909 additions & 912 deletions _maps/map_files/RandomZLevels/spacehotel.dmm

Large diffs are not rendered by default.

2,564 changes: 1,282 additions & 1,282 deletions _maps/map_files/RandomZLevels/terrorspiders.dmm

Large diffs are not rendered by default.

2,528 changes: 1,264 additions & 1,264 deletions _maps/map_files/RandomZLevels/undergroundoutpost45.dmm

Large diffs are not rendered by default.

688 changes: 344 additions & 344 deletions _maps/map_files/RandomZLevels/wildwest.dmm

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions _maps/map_files/templates/spacehotel/s_03.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/area/template_noop)
"b" = (
/turf/simulated/floor/indestructible/upperlevel,
/area/awaymission/desert)
/area/vision_change_area/awaymission/desert)
"c" = (
/obj/machinery/shower{
pixel_y = 24
Expand All @@ -14,8 +14,8 @@
id = "room_s"
},
/turf/simulated/floor/indestructible{
icon_state = "whiteblue";
dir = 8
dir = 8;
icon_state = "whiteblue"
},
/area/template_noop)
"d" = (
Expand Down Expand Up @@ -86,15 +86,15 @@
name = "lavaland"
},
/turf/simulated/floor/indestructible/upperlevel,
/area/awaymission/desert)
/area/vision_change_area/awaymission/desert)
"k" = (
/obj/structure/window/reinforced/polarized{
dir = 4;
id = "room_s"
},
/turf/simulated/floor/indestructible{
icon_state = "whiteblue";
dir = 8
dir = 8;
icon_state = "whiteblue"
},
/area/template_noop)
"l" = (
Expand All @@ -113,14 +113,14 @@
range = 5
},
/turf/simulated/floor/indestructible{
icon_state = "whiteblue";
dir = 1
dir = 1;
icon_state = "whiteblue"
},
/area/template_noop)
"n" = (
/turf/simulated/floor/indestructible{
icon_state = "whiteblue";
dir = 1
dir = 1;
icon_state = "whiteblue"
},
/area/template_noop)
"o" = (
Expand All @@ -129,8 +129,8 @@
id = "room_s"
},
/turf/simulated/floor/indestructible{
icon_state = "whitebluecorner";
dir = 1
dir = 1;
icon_state = "whitebluecorner"
},
/area/template_noop)
"p" = (
Expand Down
24 changes: 13 additions & 11 deletions code/game/area/ss13_areas.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2659,41 +2659,43 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
ambientsounds = AWAY_MISSION_SOUNDS
sound_environment = SOUND_ENVIRONMENT_ROOM

/area/awaymission/example
/area/vision_change_area/awaymission

/area/vision_change_area/awaymission/example
name = "\improper Strange Station"
icon_state = "away"

/area/awaymission/desert
/area/vision_change_area/awaymission/desert
name = "Sudden Drop"
icon_state = "away"

/area/awaymission/beach
/area/vision_change_area/awaymission/beach
name = "Beach"
icon_state = "beach"
dynamic_lighting = DYNAMIC_LIGHTING_DISABLED
requires_power = FALSE
ambientsounds = list('sound/ambience/shore.ogg', 'sound/ambience/seag1.ogg', 'sound/ambience/seag2.ogg', 'sound/ambience/seag2.ogg', 'sound/ambience/ambiodd.ogg', 'sound/ambience/ambinice.ogg')

/area/awaymission/undersea
/area/vision_change_area/awaymission/undersea
name = "Undersea"
icon_state = "undersea"


// area for AWAY "moonoutpost19"
/area/moonoutpost19
/area/vision_change_area/moonoutpost19
name = "moonoutpost"
has_gravity = TRUE
report_alerts = FALSE

/area/moonoutpost19/mo19arrivals
/area/vision_change_area/moonoutpost19/mo19arrivals
name = "MO19 Arrivals"
icon_state = "awaycontent1"

/area/moonoutpost19/mo19research
/area/vision_change_area/moonoutpost19/mo19research
name = "MO19 Research"
icon_state = "awaycontent2"

/area/moonoutpost19/khonsu19
/area/vision_change_area/moonoutpost19/khonsu19
name = "Khonsu 19"
icon_state = "awaycontent3"
always_unpowered = TRUE
Expand All @@ -2704,11 +2706,11 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
poweralm = FALSE
outdoors = TRUE

/area/moonoutpost19/syndicateoutpost
/area/vision_change_area/moonoutpost19/syndicateoutpost
name = "Syndicate Outpost"
icon_state = "awaycontent4"

/area/moonoutpost19/hive
/area/vision_change_area/moonoutpost19/hive
name = "The Hive"
icon_state = "awaycontent5"
always_unpowered = TRUE
Expand All @@ -2717,7 +2719,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
power_light = FALSE
poweralm = FALSE

/area/moonoutpost19/mo19utilityroom
/area/vision_change_area/moonoutpost19/mo19utilityroom
name = "MO19 Utility Room"
icon_state = "awaycontent6"

Expand Down
48 changes: 48 additions & 0 deletions code/game/area/vision_reset_areas.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/**
* Here lie areas that reset your vision.
* Designed to cancel off xray/meson/thermal vision effects.
* Special for spooky secret areas and gates. :D
*/

/area/vision_change_area

/area/vision_change_area/Entered(atom/movable/arrived)
. = ..()
if(istype(arrived, /mob/living/carbon))
var/mob/living/carbon/C = arrived
C.see_invisible = initial(C.see_invisible)
C.see_in_dark = initial(C.see_in_dark)
C.sight = initial(C.sight)
C.lighting_alpha = initial(C.lighting_alpha)
C.sync_lighting_plane_alpha()
C.AddComponent(/datum/component/vision_reset)

/area/vision_change_area/Exited(atom/movable/gone)
. = ..()
if(istype(gone, /mob/living/carbon))
var/mob/living/carbon/C = gone
var/datum/component/component = C.GetComponent(/datum/component/vision_reset)
if(component)
qdel(component)
C.update_sight()

/datum/component/vision_reset
var/mob/living/carbon/my_mob

/datum/component/vision_reset/Initialize(...)
my_mob = parent
if(!istype(parent))
return COMPONENT_INCOMPATIBLE
RegisterSignal(my_mob, COMSIG_MOB_UPDATE_SIGHT, PROC_REF(change_vision))

/datum/component/vision_reset/proc/change_vision()
my_mob.see_invisible = initial(my_mob.see_invisible)
my_mob.see_in_dark = initial(my_mob.see_in_dark)
my_mob.sight = initial(my_mob.sight)
my_mob.lighting_alpha = initial(my_mob.lighting_alpha)
my_mob.sync_lighting_plane_alpha()

/datum/component/vision_reset/Destroy(force, silent)
UnregisterSignal(my_mob, COMSIG_MOB_UPDATE_SIGHT)
my_mob.update_sight()
return ..()
9 changes: 9 additions & 0 deletions code/game/atoms_movable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,8 @@

/atom/movable/proc/forceMove(atom/destination)
var/turf/old_loc = loc
var/area/old_area = get_area(src)
var/area/new_area = get_area(destination)
loc = destination
moving_diagonally = 0

Expand All @@ -294,12 +296,19 @@
for(var/atom/movable/AM in old_loc)
AM.Uncrossed(src)

if(old_area && (new_area != old_area))
old_area.Exited(src)

if(destination)
destination.Entered(src)
for(var/atom/movable/AM in destination)
if(AM == src)
continue
AM.Crossed(src, old_loc)

if(new_area && (old_area != new_area))
new_area.Entered(src)

var/turf/oldturf = get_turf(old_loc)
var/turf/destturf = get_turf(destination)
var/old_z = (oldturf ? oldturf.z : null)
Expand Down
16 changes: 8 additions & 8 deletions code/modules/awaymissions/mission_code/UO45.dm
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
/area/awaymission/UO45
/area/vision_change_area/awaymission/UO45
name = "UO45"
report_alerts = FALSE

/area/awaymission/UO45/gateaway
/area/vision_change_area/awaymission/UO45/gateaway
name = "UO45 Gateway"
icon_state = "awaycontent1"

/area/awaymission/UO45/research
/area/vision_change_area/awaymission/UO45/research
name = "UO45 Research"
icon_state = "awaycontent2"

/area/awaymission/UO45/crew_quarters
/area/vision_change_area/awaymission/UO45/crew_quarters
name = "UO45 Crew Quarters"
icon_state = "awaycontent3"

/area/awaymission/UO45/central_hall
/area/vision_change_area/awaymission/UO45/central_hall
name = "UO45 Central Hall"
icon_state = "awaycontent4"

/area/awaymission/UO45/mining
/area/vision_change_area/awaymission/UO45/mining
name = "UO45 Mining"
icon_state = "awaycontent5"

/area/awaymission/UO45/engineering
/area/vision_change_area/awaymission/UO45/engineering
name = "UO45 Engineering"
icon_state = "awaycontent6"

/area/awaymission/UO45/caves
/area/vision_change_area/awaymission/UO45/caves
name = "UO45 Caves"
icon_state = "awaycontent7"
always_unpowered = TRUE
Expand Down
26 changes: 13 additions & 13 deletions code/modules/awaymissions/mission_code/UO71-terrorspiders.dm
Original file line number Diff line number Diff line change
@@ -1,74 +1,74 @@
/area/awaymission/UO71
/area/vision_change_area/awaymission/UO71
name = "UO71"
icon_state = "away"
report_alerts = FALSE
tele_proof = TRUE


/area/awaymission/UO71/plaza
/area/vision_change_area/awaymission/UO71/plaza
name = "UO71 Plaza"
icon_state = "awaycontent1"
fire = TRUE

/area/awaymission/UO71/centralhall
/area/vision_change_area/awaymission/UO71/centralhall
name = "UO71 Central"
icon_state = "awaycontent2"
fire = TRUE

/area/awaymission/UO71/eng
/area/vision_change_area/awaymission/UO71/eng
name = "UO71 Engineering"
icon_state = "awaycontent3"
fire = TRUE

/area/awaymission/UO71/mining
/area/vision_change_area/awaymission/UO71/mining
name = "UO71 Mining"
icon_state = "awaycontent4"
fire = TRUE

/area/awaymission/UO71/science
/area/vision_change_area/awaymission/UO71/science
name = "UO71 Science"
icon_state = "awaycontent5"
fire = TRUE

/area/awaymission/UO71/medical
/area/vision_change_area/awaymission/UO71/medical
name = "UO71 Medical"
icon_state = "awaycontent6"
fire = TRUE

/area/awaymission/UO71/gateway
/area/vision_change_area/awaymission/UO71/gateway
name = "UO71 Gateway"
icon_state = "awaycontent7"
fire = TRUE

/area/awaymission/UO71/outside
/area/vision_change_area/awaymission/UO71/outside
name = "UO71 Outside"
icon_state = "awaycontent8"

/area/awaymission/UO71/bridge
/area/vision_change_area/awaymission/UO71/bridge
name = "UO71 Bridge"
icon_state = "awaycontent21"
fire = TRUE
requires_power = FALSE
tele_proof = TRUE
dynamic_lighting = DYNAMIC_LIGHTING_FORCED

/area/awaymission/UO71/queen
/area/vision_change_area/awaymission/UO71/queen
name = "UO71 Queen Lair"
icon_state = "awaycontent9"
fire = TRUE
requires_power = FALSE
tele_proof = TRUE
dynamic_lighting = DYNAMIC_LIGHTING_FORCED

/area/awaymission/UO71/prince
/area/vision_change_area/awaymission/UO71/prince
name = "UO71 Prince Containment"
icon_state = "awaycontent10"
fire = TRUE
requires_power = FALSE
tele_proof = TRUE
dynamic_lighting = DYNAMIC_LIGHTING_FORCED

/area/awaymission/UO71/loot
/area/vision_change_area/awaymission/UO71/loot
name = "UO71 Loot Vault"
icon_state = "awaycontent11"
requires_power = FALSE
Expand Down
10 changes: 5 additions & 5 deletions code/modules/awaymissions/mission_code/academy.dm
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
//Academy Areas

/area/awaymission/academy
/area/vision_change_area/awaymission/academy
name = "\improper Academy Asteroids"
icon_state = "away"
report_alerts = FALSE
no_teleportlocs = TRUE
tele_proof = TRUE

/area/awaymission/academy/headmaster
/area/vision_change_area/awaymission/academy/headmaster
name = "\improper Academy Fore Block"
icon_state = "away1"

/area/awaymission/academy/classrooms
/area/vision_change_area/awaymission/academy/classrooms
name = "\improper Academy Classroom Block"
icon_state = "away2"

/area/awaymission/academy/academyaft
/area/vision_change_area/awaymission/academy/academyaft
name = "\improper Academy Ship Aft Block"
icon_state = "away3"

/area/awaymission/academy/academygate
/area/vision_change_area/awaymission/academy/academygate
name = "\improper Academy Gateway"
icon_state = "away4"

Expand Down
Loading
Loading