From b765f50302f02c28e5adc7167011b6d13eb9bb89 Mon Sep 17 00:00:00 2001 From: deathride58 Date: Tue, 5 Dec 2017 21:44:56 -0500 Subject: [PATCH 1/5] makes the default view scale a config option --- code/_globalvars/configuration.dm | 2 ++ code/controllers/configuration/entries/game_options.dm | 10 +++++++++- code/datums/components/riding.dm | 2 +- code/game/mecha/mecha.dm | 4 ++-- code/game/mecha/mecha_actions.dm | 2 +- code/game/objects/structures/manned_turret.dm | 2 +- code/modules/admin/verbs/randomverbs.dm | 2 +- code/modules/clothing/spacesuits/flightsuit.dm | 2 +- code/modules/mob/dead/observer/observer.dm | 4 ++-- code/modules/mob/login.dm | 2 +- code/modules/power/singularity/emitter.dm | 2 +- code/modules/projectiles/gun.dm | 2 +- code/modules/projectiles/guns/beam_rifle.dm | 2 +- code/modules/shuttle/navigation_computer.dm | 2 +- config/game_options.txt | 7 ++++++- 15 files changed, 31 insertions(+), 16 deletions(-) diff --git a/code/_globalvars/configuration.dm b/code/_globalvars/configuration.dm index 391744e34c6..c31c60003b1 100644 --- a/code/_globalvars/configuration.dm +++ b/code/_globalvars/configuration.dm @@ -36,3 +36,5 @@ GLOBAL_VAR_INIT(MAX_EX_FLAME_RANGE, 14) GLOBAL_PROTECT(MAX_EX_FLAME_RANGE) GLOBAL_VAR_INIT(DYN_EX_SCALE, 0.5) +//Screen resolution stuffs. +GLOBAL_VAR_INIT(DEFAULT_VIEW, "15x15") diff --git a/code/controllers/configuration/entries/game_options.dm b/code/controllers/configuration/entries/game_options.dm index b7cf723c2c5..5ddd6c3120a 100644 --- a/code/controllers/configuration/entries/game_options.dm +++ b/code/controllers/configuration/entries/game_options.dm @@ -259,4 +259,12 @@ CONFIG_DEF(number/emergency_shuttle_autocall_threshold) max_val = 1 integer = FALSE -CONFIG_DEF(flag/ic_printing) \ No newline at end of file +CONFIG_DEF(flag/ic_printing) + +CONFIG_DEF(string/default_view) + value = "15x15" + +/datum/config_entry/string/default_view/ValidateAndSet() + . = ..() + if(.) + GLOB.DEFAULT_VIEW = value diff --git a/code/datums/components/riding.dm b/code/datums/components/riding.dm index 4b18f910141..1e3465e7da5 100644 --- a/code/datums/components/riding.dm +++ b/code/datums/components/riding.dm @@ -131,7 +131,7 @@ buckled_mob.pixel_x = 0 buckled_mob.pixel_y = 0 if(buckled_mob.client) - buckled_mob.client.change_view(world.view) + buckled_mob.client.change_view(GLOB.DEFAULT_VIEW) //MOVEMENT /datum/component/riding/proc/turf_check(turf/next, turf/current) diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 10d4638eb07..a9303cf1952 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -970,7 +970,7 @@ setDir(dir_in) if(L && L.client) - L.client.change_view(world.view) + L.client.change_view(GLOBAL.DEFAULT_VIEW) zoom_mode = 0 ///////////////////////// @@ -1042,4 +1042,4 @@ GLOBAL_VAR_INIT(year_integer, text2num(year)) // = 2013??? /obj/mecha/update_remote_sight(mob/living/user) if(occupant_sight_flags) if(user == occupant) - user.sight |= occupant_sight_flags \ No newline at end of file + user.sight |= occupant_sight_flags diff --git a/code/game/mecha/mecha_actions.dm b/code/game/mecha/mecha_actions.dm index ec6bd6e4717..a616ce10af7 100644 --- a/code/game/mecha/mecha_actions.dm +++ b/code/game/mecha/mecha_actions.dm @@ -244,7 +244,7 @@ owner.client.change_view(12) SEND_SOUND(owner, sound('sound/mecha/imag_enh.ogg',volume=50)) else - owner.client.change_view(world.view) //world.view - default mob view size + owner.client.change_view(GLOB.DEFAULT_VIEW) //world.view - default mob view size UpdateButtonIcon() /datum/action/innate/mecha/mech_switch_damtype diff --git a/code/game/objects/structures/manned_turret.dm b/code/game/objects/structures/manned_turret.dm index 4ebbe1d977f..9c9b9e8afa7 100644 --- a/code/game/objects/structures/manned_turret.dm +++ b/code/game/objects/structures/manned_turret.dm @@ -37,7 +37,7 @@ buckled_mob.pixel_x = 0 buckled_mob.pixel_y = 0 if(buckled_mob.client) - buckled_mob.client.change_view(world.view) + buckled_mob.client.change_view(GLOBAL.DEFAULT_VIEW) anchored = FALSE . = ..() STOP_PROCESSING(SSfastprocess, src) diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index a464cd1cbd6..b30ccecb44e 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -655,7 +655,7 @@ Traitors and the like can also be revived with the previous role mostly intact. if(view == world.view) change_view(input("Select view range:", "FUCK YE", 7) in list(1,2,3,4,5,6,7,8,9,10,11,12,13,14,128)) else - change_view(world.view) + change_view(GLOBAL.DEFAULT_VIEW) log_admin("[key_name(usr)] changed their view range to [view].") //message_admins("\blue [key_name_admin(usr)] changed their view range to [view].") //why? removed by order of XSI diff --git a/code/modules/clothing/spacesuits/flightsuit.dm b/code/modules/clothing/spacesuits/flightsuit.dm index 79886b1446a..cb20e15d7c5 100644 --- a/code/modules/clothing/spacesuits/flightsuit.dm +++ b/code/modules/clothing/spacesuits/flightsuit.dm @@ -1100,7 +1100,7 @@ /obj/item/clothing/head/helmet/space/hardsuit/flightsuit/proc/toggle_zoom(mob/living/user, force_off = FALSE) if(zoom || force_off) - user.client.change_view(world.view) + user.client.change_view(GLOBAL.DEFAULT_VIEW) to_chat(user, "Disabling smart zooming image enhancement...") zoom = FALSE return FALSE diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 4bd87ed11e5..b75ea03a64d 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -319,7 +319,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp if(mind.current.key && copytext(mind.current.key,1,2)!="@") //makes sure we don't accidentally kick any clients to_chat(usr, "Another consciousness is in your body...It is resisting you.") return - client.change_view(world.view) + client.change_view(GLOBAL.DEFAULT_VIEW) SStgui.on_transfer(src, mind.current) // Transfer NanoUIs. mind.current.key = key return 1 @@ -463,7 +463,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp if(new_view) client.change_view(Clamp(new_view, 7, max_view)) else - client.change_view(world.view) + client.change_view(GLOBAL.DEFAULT_VIEW) /mob/dead/observer/verb/add_view_range(input as num) set name = "Add View Range" diff --git a/code/modules/mob/login.dm b/code/modules/mob/login.dm index 71d834e0e06..795e8f40df3 100644 --- a/code/modules/mob/login.dm +++ b/code/modules/mob/login.dm @@ -37,7 +37,7 @@ if(client) client.click_intercept = null - client.change_view(world.view) // Resets the client.view in case it was changed. + client.change_view(GLOBAL.DEFAULT_VIEW) // Resets the client.view in case it was changed. if(!GLOB.individual_log_list[ckey]) GLOB.individual_log_list[ckey] = logging diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm index 7596d890e0d..76f8215e41c 100644 --- a/code/modules/power/singularity/emitter.dm +++ b/code/modules/power/singularity/emitter.dm @@ -335,7 +335,7 @@ buckled_mob.pixel_x = 0 buckled_mob.pixel_y = 0 if(buckled_mob.client) - buckled_mob.client.change_view(world.view) + buckled_mob.client.change_view(GLOBAL.DEFAULT_VIEW) auto.Remove(buckled_mob) . = ..() diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 03d9e69e542..11267bee481 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -497,7 +497,7 @@ user.client.pixel_x = world.icon_size*_x user.client.pixel_y = world.icon_size*_y else - user.client.change_view(world.view) + user.client.change_view(GLOBAL.DEFAULT_VIEW) user.client.pixel_x = 0 user.client.pixel_y = 0 return zoomed diff --git a/code/modules/projectiles/guns/beam_rifle.dm b/code/modules/projectiles/guns/beam_rifle.dm index 19cd2762884..2491ea0b69d 100644 --- a/code/modules/projectiles/guns/beam_rifle.dm +++ b/code/modules/projectiles/guns/beam_rifle.dm @@ -176,7 +176,7 @@ zoom_animating = 0 animate(current_user.client, pixel_x = 0, pixel_y = 0, 0, FALSE, LINEAR_EASING, ANIMATION_END_NOW) zoom_current_view_increase = 0 - current_user.client.change_view(world.view) + current_user.client.change_view(GLOBAL.DEFAULT_VIEW) zooming_angle = 0 current_zoom_x = 0 current_zoom_y = 0 diff --git a/code/modules/shuttle/navigation_computer.dm b/code/modules/shuttle/navigation_computer.dm index dd27d40e916..ee500900f44 100644 --- a/code/modules/shuttle/navigation_computer.dm +++ b/code/modules/shuttle/navigation_computer.dm @@ -69,7 +69,7 @@ var/mob/camera/aiEye/remote/shuttle_docker/the_eye = eyeobj user.client.images -= the_eye.placement_images user.client.images -= the_eye.placed_images - user.client.change_view(world.view) + user.client.change_view(GLOBAL.DEFAULT_VIEW) /obj/machinery/computer/camera_advanced/shuttle_docker/proc/placeLandingSpot() if(!checkLandingSpot()) diff --git a/config/game_options.txt b/config/game_options.txt index 85a9bc6d5b4..fa2ccf2f49c 100644 --- a/config/game_options.txt +++ b/config/game_options.txt @@ -492,4 +492,9 @@ MICE_ROUNDSTART 10 #EMERGENCY_SHUTTLE_AUTOCALL_THRESHOLD 0.2 ## Determines if players are allowed to print integrated circuits, uncomment to allow. -#IC_PRINTING \ No newline at end of file +#IC_PRINTING + +## This sets the default screen resolution, in tiles. +## By default, this is 15x15, which gets simplified to 7 by BYOND, as it is a 1:1 screen ratio. +## For reference, Goonstation uses a resolution of 21x15 for it's widescreen mode. +DEFAULT_VIEW 15x15 \ No newline at end of file From 1904080823bc767950de00a07e2fa05079a82881 Mon Sep 17 00:00:00 2001 From: deathride58 Date: Tue, 5 Dec 2017 21:53:52 -0500 Subject: [PATCH 2/5] i fucked up - GLOBAL.DEFAULT_VIEW > GLOB.DEFAULT_VIEW --- code/game/mecha/mecha.dm | 2 +- code/game/objects/structures/manned_turret.dm | 2 +- code/modules/admin/verbs/randomverbs.dm | 2 +- code/modules/clothing/spacesuits/flightsuit.dm | 2 +- code/modules/mob/dead/observer/observer.dm | 4 ++-- code/modules/mob/login.dm | 2 +- code/modules/power/singularity/emitter.dm | 2 +- code/modules/projectiles/gun.dm | 2 +- code/modules/projectiles/guns/beam_rifle.dm | 2 +- code/modules/shuttle/navigation_computer.dm | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index a9303cf1952..4ed9934112f 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -970,7 +970,7 @@ setDir(dir_in) if(L && L.client) - L.client.change_view(GLOBAL.DEFAULT_VIEW) + L.client.change_view(GLOB.DEFAULT_VIEW) zoom_mode = 0 ///////////////////////// diff --git a/code/game/objects/structures/manned_turret.dm b/code/game/objects/structures/manned_turret.dm index 9c9b9e8afa7..a23a60b6c34 100644 --- a/code/game/objects/structures/manned_turret.dm +++ b/code/game/objects/structures/manned_turret.dm @@ -37,7 +37,7 @@ buckled_mob.pixel_x = 0 buckled_mob.pixel_y = 0 if(buckled_mob.client) - buckled_mob.client.change_view(GLOBAL.DEFAULT_VIEW) + buckled_mob.client.change_view(GLOB.DEFAULT_VIEW) anchored = FALSE . = ..() STOP_PROCESSING(SSfastprocess, src) diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index b30ccecb44e..e7e562f327c 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -655,7 +655,7 @@ Traitors and the like can also be revived with the previous role mostly intact. if(view == world.view) change_view(input("Select view range:", "FUCK YE", 7) in list(1,2,3,4,5,6,7,8,9,10,11,12,13,14,128)) else - change_view(GLOBAL.DEFAULT_VIEW) + change_view(GLOB.DEFAULT_VIEW) log_admin("[key_name(usr)] changed their view range to [view].") //message_admins("\blue [key_name_admin(usr)] changed their view range to [view].") //why? removed by order of XSI diff --git a/code/modules/clothing/spacesuits/flightsuit.dm b/code/modules/clothing/spacesuits/flightsuit.dm index cb20e15d7c5..aaa8e8d9d34 100644 --- a/code/modules/clothing/spacesuits/flightsuit.dm +++ b/code/modules/clothing/spacesuits/flightsuit.dm @@ -1100,7 +1100,7 @@ /obj/item/clothing/head/helmet/space/hardsuit/flightsuit/proc/toggle_zoom(mob/living/user, force_off = FALSE) if(zoom || force_off) - user.client.change_view(GLOBAL.DEFAULT_VIEW) + user.client.change_view(GLOB.DEFAULT_VIEW) to_chat(user, "Disabling smart zooming image enhancement...") zoom = FALSE return FALSE diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index b75ea03a64d..9603478dbd3 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -319,7 +319,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp if(mind.current.key && copytext(mind.current.key,1,2)!="@") //makes sure we don't accidentally kick any clients to_chat(usr, "Another consciousness is in your body...It is resisting you.") return - client.change_view(GLOBAL.DEFAULT_VIEW) + client.change_view(GLOB.DEFAULT_VIEW) SStgui.on_transfer(src, mind.current) // Transfer NanoUIs. mind.current.key = key return 1 @@ -463,7 +463,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp if(new_view) client.change_view(Clamp(new_view, 7, max_view)) else - client.change_view(GLOBAL.DEFAULT_VIEW) + client.change_view(GLOB.DEFAULT_VIEW) /mob/dead/observer/verb/add_view_range(input as num) set name = "Add View Range" diff --git a/code/modules/mob/login.dm b/code/modules/mob/login.dm index 795e8f40df3..d99a717afbc 100644 --- a/code/modules/mob/login.dm +++ b/code/modules/mob/login.dm @@ -37,7 +37,7 @@ if(client) client.click_intercept = null - client.change_view(GLOBAL.DEFAULT_VIEW) // Resets the client.view in case it was changed. + client.change_view(GLOB.DEFAULT_VIEW) // Resets the client.view in case it was changed. if(!GLOB.individual_log_list[ckey]) GLOB.individual_log_list[ckey] = logging diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm index 76f8215e41c..a996657036d 100644 --- a/code/modules/power/singularity/emitter.dm +++ b/code/modules/power/singularity/emitter.dm @@ -335,7 +335,7 @@ buckled_mob.pixel_x = 0 buckled_mob.pixel_y = 0 if(buckled_mob.client) - buckled_mob.client.change_view(GLOBAL.DEFAULT_VIEW) + buckled_mob.client.change_view(GLOB.DEFAULT_VIEW) auto.Remove(buckled_mob) . = ..() diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 11267bee481..366c2704ca0 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -497,7 +497,7 @@ user.client.pixel_x = world.icon_size*_x user.client.pixel_y = world.icon_size*_y else - user.client.change_view(GLOBAL.DEFAULT_VIEW) + user.client.change_view(GLOB.DEFAULT_VIEW) user.client.pixel_x = 0 user.client.pixel_y = 0 return zoomed diff --git a/code/modules/projectiles/guns/beam_rifle.dm b/code/modules/projectiles/guns/beam_rifle.dm index 2491ea0b69d..6d0e2081363 100644 --- a/code/modules/projectiles/guns/beam_rifle.dm +++ b/code/modules/projectiles/guns/beam_rifle.dm @@ -176,7 +176,7 @@ zoom_animating = 0 animate(current_user.client, pixel_x = 0, pixel_y = 0, 0, FALSE, LINEAR_EASING, ANIMATION_END_NOW) zoom_current_view_increase = 0 - current_user.client.change_view(GLOBAL.DEFAULT_VIEW) + current_user.client.change_view(GLOB.DEFAULT_VIEW) zooming_angle = 0 current_zoom_x = 0 current_zoom_y = 0 diff --git a/code/modules/shuttle/navigation_computer.dm b/code/modules/shuttle/navigation_computer.dm index ee500900f44..a5a528985ed 100644 --- a/code/modules/shuttle/navigation_computer.dm +++ b/code/modules/shuttle/navigation_computer.dm @@ -69,7 +69,7 @@ var/mob/camera/aiEye/remote/shuttle_docker/the_eye = eyeobj user.client.images -= the_eye.placement_images user.client.images -= the_eye.placed_images - user.client.change_view(GLOBAL.DEFAULT_VIEW) + user.client.change_view(GLOB.DEFAULT_VIEW) /obj/machinery/computer/camera_advanced/shuttle_docker/proc/placeLandingSpot() if(!checkLandingSpot()) From 8297ca87b473d2f30bd528410cec1088349a93a7 Mon Sep 17 00:00:00 2001 From: deathride58 Date: Tue, 5 Dec 2017 22:47:46 -0500 Subject: [PATCH 3/5] second pass - makes change view range function again --- code/modules/admin/verbs/randomverbs.dm | 2 +- code/modules/mob/dead/observer/observer.dm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index e7e562f327c..b28c2a94c26 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -652,7 +652,7 @@ Traitors and the like can also be revived with the previous role mostly intact. set name = "Change View Range" set desc = "switches between 1x and custom views" - if(view == world.view) + if(view == GLOB.DEFAULT_VIEW) change_view(input("Select view range:", "FUCK YE", 7) in list(1,2,3,4,5,6,7,8,9,10,11,12,13,14,128)) else change_view(GLOB.DEFAULT_VIEW) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 9603478dbd3..8d78d1b045d 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -455,7 +455,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp set desc = "Change your view range." var/max_view = client.prefs.unlock_content ? GHOST_MAX_VIEW_RANGE_MEMBER : GHOST_MAX_VIEW_RANGE_DEFAULT - if(client.view == world.view) + if(client.view == GLOB.DEFAULT_VIEW) var/list/views = list() for(var/i in 7 to max_view) views |= i From 3265d093282f1c6c00fe8e54358f373a60664162 Mon Sep 17 00:00:00 2001 From: deathride58 Date: Wed, 6 Dec 2017 12:46:02 -0500 Subject: [PATCH 4/5] Nerfs criticism --- code/_globalvars/configuration.dm | 3 --- code/controllers/configuration/entries/config.dm | 3 +++ code/controllers/configuration/entries/game_options.dm | 8 -------- code/datums/components/riding.dm | 2 +- code/game/mecha/mecha.dm | 2 +- code/game/mecha/mecha_actions.dm | 2 +- code/game/objects/structures/manned_turret.dm | 2 +- code/modules/admin/verbs/randomverbs.dm | 4 ++-- code/modules/clothing/spacesuits/flightsuit.dm | 2 +- code/modules/mob/dead/observer/observer.dm | 6 +++--- code/modules/mob/login.dm | 2 +- code/modules/power/singularity/emitter.dm | 2 +- code/modules/projectiles/gun.dm | 2 +- code/modules/projectiles/guns/beam_rifle.dm | 2 +- code/modules/shuttle/navigation_computer.dm | 2 +- config/config.txt | 7 +++++++ config/game_options.txt | 7 +------ 17 files changed, 26 insertions(+), 32 deletions(-) diff --git a/code/_globalvars/configuration.dm b/code/_globalvars/configuration.dm index c31c60003b1..8ecf572ea73 100644 --- a/code/_globalvars/configuration.dm +++ b/code/_globalvars/configuration.dm @@ -35,6 +35,3 @@ GLOBAL_PROTECT(MAX_EX_FLASH_RANGE) GLOBAL_VAR_INIT(MAX_EX_FLAME_RANGE, 14) GLOBAL_PROTECT(MAX_EX_FLAME_RANGE) GLOBAL_VAR_INIT(DYN_EX_SCALE, 0.5) - -//Screen resolution stuffs. -GLOBAL_VAR_INIT(DEFAULT_VIEW, "15x15") diff --git a/code/controllers/configuration/entries/config.dm b/code/controllers/configuration/entries/config.dm index d7dc0ff84d8..45ae68052ef 100644 --- a/code/controllers/configuration/entries/config.dm +++ b/code/controllers/configuration/entries/config.dm @@ -385,3 +385,6 @@ CONFIG_TWEAK(flag/ValidateAndSet(str_val)) CONFIG_DEF(number/rounds_until_hard_restart) value = -1 min_val = 0 + +CONFIG_DEF(string/default_view) + value = "15x15" diff --git a/code/controllers/configuration/entries/game_options.dm b/code/controllers/configuration/entries/game_options.dm index 5ddd6c3120a..7ca2ee5096d 100644 --- a/code/controllers/configuration/entries/game_options.dm +++ b/code/controllers/configuration/entries/game_options.dm @@ -260,11 +260,3 @@ CONFIG_DEF(number/emergency_shuttle_autocall_threshold) integer = FALSE CONFIG_DEF(flag/ic_printing) - -CONFIG_DEF(string/default_view) - value = "15x15" - -/datum/config_entry/string/default_view/ValidateAndSet() - . = ..() - if(.) - GLOB.DEFAULT_VIEW = value diff --git a/code/datums/components/riding.dm b/code/datums/components/riding.dm index 1e3465e7da5..f165717a312 100644 --- a/code/datums/components/riding.dm +++ b/code/datums/components/riding.dm @@ -131,7 +131,7 @@ buckled_mob.pixel_x = 0 buckled_mob.pixel_y = 0 if(buckled_mob.client) - buckled_mob.client.change_view(GLOB.DEFAULT_VIEW) + buckled_mob.client.change_view(CONFIG_GET(string/default_view)) //MOVEMENT /datum/component/riding/proc/turf_check(turf/next, turf/current) diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 4ed9934112f..ba41609fca7 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -970,7 +970,7 @@ setDir(dir_in) if(L && L.client) - L.client.change_view(GLOB.DEFAULT_VIEW) + L.client.change_view(CONFIG_GET(string/default_view)) zoom_mode = 0 ///////////////////////// diff --git a/code/game/mecha/mecha_actions.dm b/code/game/mecha/mecha_actions.dm index a616ce10af7..480c24b87fa 100644 --- a/code/game/mecha/mecha_actions.dm +++ b/code/game/mecha/mecha_actions.dm @@ -244,7 +244,7 @@ owner.client.change_view(12) SEND_SOUND(owner, sound('sound/mecha/imag_enh.ogg',volume=50)) else - owner.client.change_view(GLOB.DEFAULT_VIEW) //world.view - default mob view size + owner.client.change_view(CONFIG_GET(string/default_view)) //world.view - default mob view size UpdateButtonIcon() /datum/action/innate/mecha/mech_switch_damtype diff --git a/code/game/objects/structures/manned_turret.dm b/code/game/objects/structures/manned_turret.dm index a23a60b6c34..f0a83cc70e2 100644 --- a/code/game/objects/structures/manned_turret.dm +++ b/code/game/objects/structures/manned_turret.dm @@ -37,7 +37,7 @@ buckled_mob.pixel_x = 0 buckled_mob.pixel_y = 0 if(buckled_mob.client) - buckled_mob.client.change_view(GLOB.DEFAULT_VIEW) + buckled_mob.client.change_view(CONFIG_GET(string/default_view)) anchored = FALSE . = ..() STOP_PROCESSING(SSfastprocess, src) diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index b28c2a94c26..bad834bc50e 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -652,10 +652,10 @@ Traitors and the like can also be revived with the previous role mostly intact. set name = "Change View Range" set desc = "switches between 1x and custom views" - if(view == GLOB.DEFAULT_VIEW) + if(view == CONFIG_GET(string/default_view)) change_view(input("Select view range:", "FUCK YE", 7) in list(1,2,3,4,5,6,7,8,9,10,11,12,13,14,128)) else - change_view(GLOB.DEFAULT_VIEW) + change_view(CONFIG_GET(string/default_view)) log_admin("[key_name(usr)] changed their view range to [view].") //message_admins("\blue [key_name_admin(usr)] changed their view range to [view].") //why? removed by order of XSI diff --git a/code/modules/clothing/spacesuits/flightsuit.dm b/code/modules/clothing/spacesuits/flightsuit.dm index aaa8e8d9d34..d7e13a1fd56 100644 --- a/code/modules/clothing/spacesuits/flightsuit.dm +++ b/code/modules/clothing/spacesuits/flightsuit.dm @@ -1100,7 +1100,7 @@ /obj/item/clothing/head/helmet/space/hardsuit/flightsuit/proc/toggle_zoom(mob/living/user, force_off = FALSE) if(zoom || force_off) - user.client.change_view(GLOB.DEFAULT_VIEW) + user.client.change_view(CONFIG_GET(string/default_view)) to_chat(user, "Disabling smart zooming image enhancement...") zoom = FALSE return FALSE diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 8d78d1b045d..d9824d944d3 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -319,7 +319,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp if(mind.current.key && copytext(mind.current.key,1,2)!="@") //makes sure we don't accidentally kick any clients to_chat(usr, "Another consciousness is in your body...It is resisting you.") return - client.change_view(GLOB.DEFAULT_VIEW) + client.change_view(CONFIG_GET(string/default_view)) SStgui.on_transfer(src, mind.current) // Transfer NanoUIs. mind.current.key = key return 1 @@ -455,7 +455,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp set desc = "Change your view range." var/max_view = client.prefs.unlock_content ? GHOST_MAX_VIEW_RANGE_MEMBER : GHOST_MAX_VIEW_RANGE_DEFAULT - if(client.view == GLOB.DEFAULT_VIEW) + if(client.view == CONFIG_GET(string/default_view)) var/list/views = list() for(var/i in 7 to max_view) views |= i @@ -463,7 +463,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp if(new_view) client.change_view(Clamp(new_view, 7, max_view)) else - client.change_view(GLOB.DEFAULT_VIEW) + client.change_view(CONFIG_GET(string/default_view)) /mob/dead/observer/verb/add_view_range(input as num) set name = "Add View Range" diff --git a/code/modules/mob/login.dm b/code/modules/mob/login.dm index d99a717afbc..55af44ee164 100644 --- a/code/modules/mob/login.dm +++ b/code/modules/mob/login.dm @@ -37,7 +37,7 @@ if(client) client.click_intercept = null - client.change_view(GLOB.DEFAULT_VIEW) // Resets the client.view in case it was changed. + client.change_view(CONFIG_GET(string/default_view)) // Resets the client.view in case it was changed. if(!GLOB.individual_log_list[ckey]) GLOB.individual_log_list[ckey] = logging diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm index a996657036d..1c5f0a3375f 100644 --- a/code/modules/power/singularity/emitter.dm +++ b/code/modules/power/singularity/emitter.dm @@ -335,7 +335,7 @@ buckled_mob.pixel_x = 0 buckled_mob.pixel_y = 0 if(buckled_mob.client) - buckled_mob.client.change_view(GLOB.DEFAULT_VIEW) + buckled_mob.client.change_view(CONFIG_GET(string/default_view)) auto.Remove(buckled_mob) . = ..() diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 366c2704ca0..51bd12c4149 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -497,7 +497,7 @@ user.client.pixel_x = world.icon_size*_x user.client.pixel_y = world.icon_size*_y else - user.client.change_view(GLOB.DEFAULT_VIEW) + user.client.change_view(CONFIG_GET(string/default_view)) user.client.pixel_x = 0 user.client.pixel_y = 0 return zoomed diff --git a/code/modules/projectiles/guns/beam_rifle.dm b/code/modules/projectiles/guns/beam_rifle.dm index 6d0e2081363..313c77b224e 100644 --- a/code/modules/projectiles/guns/beam_rifle.dm +++ b/code/modules/projectiles/guns/beam_rifle.dm @@ -176,7 +176,7 @@ zoom_animating = 0 animate(current_user.client, pixel_x = 0, pixel_y = 0, 0, FALSE, LINEAR_EASING, ANIMATION_END_NOW) zoom_current_view_increase = 0 - current_user.client.change_view(GLOB.DEFAULT_VIEW) + current_user.client.change_view(CONFIG_GET(string/default_view)) zooming_angle = 0 current_zoom_x = 0 current_zoom_y = 0 diff --git a/code/modules/shuttle/navigation_computer.dm b/code/modules/shuttle/navigation_computer.dm index a5a528985ed..cedebc8edbd 100644 --- a/code/modules/shuttle/navigation_computer.dm +++ b/code/modules/shuttle/navigation_computer.dm @@ -69,7 +69,7 @@ var/mob/camera/aiEye/remote/shuttle_docker/the_eye = eyeobj user.client.images -= the_eye.placement_images user.client.images -= the_eye.placed_images - user.client.change_view(GLOB.DEFAULT_VIEW) + user.client.change_view(CONFIG_GET(string/default_view)) /obj/machinery/computer/camera_advanced/shuttle_docker/proc/placeLandingSpot() if(!checkLandingSpot()) diff --git a/config/config.txt b/config/config.txt index 1c89d93bc73..1841c13492c 100644 --- a/config/config.txt +++ b/config/config.txt @@ -396,3 +396,10 @@ DISABLE_HIGH_POP_MC_MODE_AMOUNT 60 ## Uncomment to set the number of /world/Reboot()s before the DreamDaemon restarts itself. 0 means restart every round. Requires tgstation server tools. #ROUNDS_UNTIL_HARD_RESTART 10 + + +##Default screen resolution, in tiles. +## By default, this is 15x15, which gets simplified to 7 by BYOND, as it is a 1:1 screen ratio. +## For reference, Goonstation uses a resolution of 21x15 for it's widescreen mode. +## Do note that changing this value will affect the title screen. The title screen will have to be updated manually if this is changed. +DEFAULT_VIEW 15x15 diff --git a/config/game_options.txt b/config/game_options.txt index fa2ccf2f49c..85a9bc6d5b4 100644 --- a/config/game_options.txt +++ b/config/game_options.txt @@ -492,9 +492,4 @@ MICE_ROUNDSTART 10 #EMERGENCY_SHUTTLE_AUTOCALL_THRESHOLD 0.2 ## Determines if players are allowed to print integrated circuits, uncomment to allow. -#IC_PRINTING - -## This sets the default screen resolution, in tiles. -## By default, this is 15x15, which gets simplified to 7 by BYOND, as it is a 1:1 screen ratio. -## For reference, Goonstation uses a resolution of 21x15 for it's widescreen mode. -DEFAULT_VIEW 15x15 \ No newline at end of file +#IC_PRINTING \ No newline at end of file From cc0b52b11060e11573ab2b9211b5e1fd7dc935dc Mon Sep 17 00:00:00 2001 From: deathride58 Date: Wed, 6 Dec 2017 22:52:47 -0500 Subject: [PATCH 5/5] fixes ai anticheat runtimes --- code/modules/mob/living/silicon/ai/ai.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index ed36e62492e..47d5a0ffd84 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -817,7 +817,8 @@ return (GLOB.cameranet && GLOB.cameranet.checkTurfVis(get_turf_pixel(A))) || apc_override //AI is carded/shunted //view(src) returns nothing for carded/shunted AIs and they have x-ray vision so just use get_dist - return get_dist(src, A) <= client.view + var/list/viewscale = getviewsize(client.view) + return get_dist(src, A) <= max(viewscale[1]*0.5,viewscale[2]*0.5) /mob/living/silicon/ai/proc/relay_speech(message, atom/movable/speaker, datum/language/message_language, raw_message, radio_freq, list/spans, message_mode) raw_message = lang_treat(speaker, message_language, raw_message, spans, message_mode)