Merge pull request #6676 from Citadel-Station-13/upstream-merge-37406
[MIRROR] Adds (fake) ambient occlusion as a client preference
This commit is contained in:
@@ -34,8 +34,10 @@ Iconnery
|
||||
var/turf/T = loc
|
||||
if(level == 2 || !T.intact)
|
||||
showpipe = TRUE
|
||||
plane = GAME_PLANE
|
||||
else
|
||||
showpipe = FALSE
|
||||
plane = FLOOR_PLANE
|
||||
|
||||
if(!showpipe)
|
||||
return //no need to update the pipes if they aren't showing
|
||||
|
||||
@@ -120,6 +120,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
|
||||
var/parallax
|
||||
|
||||
var/ambientocclusion = TRUE
|
||||
|
||||
var/uplink_spawn_loc = UPLINK_PDA
|
||||
|
||||
var/list/exp = list()
|
||||
@@ -490,6 +492,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
dat += "High"
|
||||
dat += "</a><br>"
|
||||
|
||||
dat += "<b>Ambient Occlusion:</b> <a href='?_src_=prefs;preference=ambientocclusion'>[ambientocclusion ? "Enabled" : "Disabled"]</a><br>"
|
||||
|
||||
dat += "</td><td width='300px' height='300px' valign='top'>"
|
||||
|
||||
dat += "<h2>Special Role Settings</h2>"
|
||||
@@ -1535,6 +1539,14 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
cit_toggles ^= DIGESTION_NOISES
|
||||
//END CITADEL EDIT
|
||||
|
||||
if("ambientocclusion")
|
||||
ambientocclusion = !ambientocclusion
|
||||
if(parent && parent.screen && parent.screen.len)
|
||||
var/obj/screen/plane_master/game_world/PM = locate(/obj/screen/plane_master/game_world) in parent.screen
|
||||
PM.filters -= AMBIENT_OCCLUSION
|
||||
if(ambientocclusion)
|
||||
PM.filters += AMBIENT_OCCLUSION
|
||||
|
||||
if("save")
|
||||
save_preferences()
|
||||
save_character()
|
||||
@@ -1642,4 +1654,4 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
if(icon_updates)
|
||||
character.update_body()
|
||||
character.update_hair()
|
||||
character.update_body_parts()
|
||||
character.update_body_parts()
|
||||
|
||||
@@ -130,6 +130,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
S["uses_glasses_colour"]>> uses_glasses_colour
|
||||
S["clientfps"] >> clientfps
|
||||
S["parallax"] >> parallax
|
||||
S["ambientocclusion"] >> ambientocclusion
|
||||
S["menuoptions"] >> menuoptions
|
||||
S["enable_tips"] >> enable_tips
|
||||
S["tip_delay"] >> tip_delay
|
||||
@@ -160,6 +161,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
toggles = sanitize_integer(toggles, 0, 65535, initial(toggles))
|
||||
clientfps = sanitize_integer(clientfps, 0, 1000, 0)
|
||||
parallax = sanitize_integer(parallax, PARALLAX_INSANE, PARALLAX_DISABLE, null)
|
||||
ambientocclusion = sanitize_integer(ambientocclusion, 0, 1, initial(ambientocclusion))
|
||||
ghost_form = sanitize_inlist(ghost_form, GLOB.ghost_forms, initial(ghost_form))
|
||||
ghost_orbit = sanitize_inlist(ghost_orbit, GLOB.ghost_orbits, initial(ghost_orbit))
|
||||
ghost_accs = sanitize_inlist(ghost_accs, GLOB.ghost_accs_options, GHOST_ACCS_DEFAULT_OPTION)
|
||||
@@ -210,6 +212,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
WRITE_FILE(S["uses_glasses_colour"], uses_glasses_colour)
|
||||
WRITE_FILE(S["clientfps"], clientfps)
|
||||
WRITE_FILE(S["parallax"], parallax)
|
||||
WRITE_FILE(S["ambientocclusion"], ambientocclusion)
|
||||
WRITE_FILE(S["menuoptions"], menuoptions)
|
||||
WRITE_FILE(S["enable_tips"], enable_tips)
|
||||
WRITE_FILE(S["tip_delay"], tip_delay)
|
||||
|
||||
@@ -728,7 +728,7 @@
|
||||
/datum/reagent/toxin/rotatium/on_mob_life(mob/living/M)
|
||||
if(M.hud_used)
|
||||
if(current_cycle >= 20 && current_cycle%20 == 0)
|
||||
var/list/screens = list(M.hud_used.plane_masters["[GAME_PLANE]"], M.hud_used.plane_masters["[LIGHTING_PLANE]"])
|
||||
var/list/screens = list(M.hud_used.plane_masters["[FLOOR_PLANE]"], M.hud_used.plane_masters["[GAME_PLANE]"], M.hud_used.plane_masters["[LIGHTING_PLANE]"])
|
||||
var/rotation = min(round(current_cycle/20), 89) // By this point the player is probably puking and quitting anyway
|
||||
for(var/whole_screen in screens)
|
||||
animate(whole_screen, transform = matrix(rotation, MATRIX_ROTATE), time = 5, easing = QUAD_EASING, loop = -1)
|
||||
@@ -737,7 +737,7 @@
|
||||
|
||||
/datum/reagent/toxin/rotatium/on_mob_delete(mob/living/M)
|
||||
if(M && M.hud_used)
|
||||
var/list/screens = list(M.hud_used.plane_masters["[GAME_PLANE]"], M.hud_used.plane_masters["[LIGHTING_PLANE]"])
|
||||
var/list/screens = list(M.hud_used.plane_masters["[FLOOR_PLANE]"], M.hud_used.plane_masters["[GAME_PLANE]"], M.hud_used.plane_masters["[LIGHTING_PLANE]"])
|
||||
for(var/whole_screen in screens)
|
||||
animate(whole_screen, transform = matrix(), time = 5, easing = QUAD_EASING)
|
||||
..()
|
||||
@@ -755,7 +755,7 @@
|
||||
/datum/reagent/toxin/skewium/on_mob_life(mob/living/M)
|
||||
if(M.hud_used)
|
||||
if(current_cycle >= 5 && current_cycle % 3 == 0)
|
||||
var/list/screens = list(M.hud_used.plane_masters["[GAME_PLANE]"], M.hud_used.plane_masters["[LIGHTING_PLANE]"])
|
||||
var/list/screens = list(M.hud_used.plane_masters["[FLOOR_PLANE]"], M.hud_used.plane_masters["[GAME_PLANE]"], M.hud_used.plane_masters["[LIGHTING_PLANE]"])
|
||||
var/matrix/skew = matrix()
|
||||
var/intensity = 8
|
||||
skew.set_skew(rand(-intensity,intensity), rand(-intensity,intensity))
|
||||
@@ -772,7 +772,7 @@
|
||||
|
||||
/datum/reagent/toxin/skewium/on_mob_delete(mob/living/M)
|
||||
if(M && M.hud_used)
|
||||
var/list/screens = list(M.hud_used.plane_masters["[GAME_PLANE]"], M.hud_used.plane_masters["[LIGHTING_PLANE]"])
|
||||
var/list/screens = list(M.hud_used.plane_masters["[FLOOR_PLANE]"], M.hud_used.plane_masters["[GAME_PLANE]"], M.hud_used.plane_masters["[LIGHTING_PLANE]"])
|
||||
for(var/whole_screen in screens)
|
||||
animate(whole_screen, transform = matrix(), time = 5, easing = QUAD_EASING)
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user