Revert "the Space Parallax update" (#10323)
@@ -106,10 +106,7 @@ CREATE TABLE client (
|
||||
warns INTEGER,
|
||||
warnbans INTEGER,
|
||||
usewmp INTEGER,
|
||||
usenanoui INTEGER,
|
||||
space_parallax INTEGER,
|
||||
space_dust INTEGER,
|
||||
parallax_speed INTEGER
|
||||
usenanoui INTEGER
|
||||
);
|
||||
|
||||
|
||||
|
||||
@@ -1579,11 +1579,3 @@ Game Mode config tags:
|
||||
found_mode = GM
|
||||
break
|
||||
return found_mode
|
||||
|
||||
/atom/proc/get_mobs_in_contents() //returns mobs recursively inside the atom
|
||||
. = list()
|
||||
for(var/atom/A in contents)
|
||||
. += A.get_mobs_in_contents()
|
||||
|
||||
/mob/get_mobs_in_contents()
|
||||
. = ..() + src
|
||||
|
||||
@@ -159,7 +159,6 @@ var/global/obj/screen/clicker/catcher = new()
|
||||
mymob:schematics_background = using
|
||||
|
||||
reload_fullscreen()
|
||||
update_parallax_and_dust()
|
||||
|
||||
//Triggered when F12 is pressed (Unless someone changed something in the DMF)
|
||||
/mob/verb/button_pressed_F12()
|
||||
|
||||
@@ -1,252 +0,0 @@
|
||||
/*
|
||||
* This file handles all parallax-related business once the parallax itself is initialized with the rest of the HUD
|
||||
*/
|
||||
|
||||
var/list/parallax_on_clients = list()
|
||||
|
||||
/obj/screen/parallax
|
||||
var/base_offset_x = 0
|
||||
var/base_offset_y = 0
|
||||
mouse_opacity = 0
|
||||
icon = 'icons/turf/space.dmi'
|
||||
icon_state = "blank"
|
||||
name = "space parallax"
|
||||
blend_mode = BLEND_ADD
|
||||
layer = AREA_LAYER
|
||||
plane = PLANE_SPACE_PARALLAX//changing this var doesn't actually change the plane of its overlays
|
||||
globalscreen = 1
|
||||
var/parallax_speed = 0
|
||||
|
||||
/obj/screen/parallax_master
|
||||
plane = PLANE_SPACE_PARALLAX
|
||||
screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
appearance_flags = PLANE_MASTER
|
||||
blend_mode = BLEND_MULTIPLY
|
||||
globalscreen = 1
|
||||
|
||||
/obj/screen/parallax_voidmaster
|
||||
plane = PLANE_SPACE_BACKGROUND
|
||||
color = list(0, 0, 0,
|
||||
0, 0, 0,
|
||||
0, 0, 0,
|
||||
1, 1, 1) // This will cause space to be solid white
|
||||
appearance_flags = PLANE_MASTER
|
||||
screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
globalscreen = 1
|
||||
|
||||
/obj/screen/parallax_canvas
|
||||
mouse_opacity = 0
|
||||
icon = 'icons/turf/space.dmi'
|
||||
icon_state = "white"
|
||||
color = "#000000"
|
||||
name = "space parallax"
|
||||
blend_mode = BLEND_ADD
|
||||
layer = AREA_LAYER
|
||||
plane = PLANE_SPACE_PARALLAX
|
||||
screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
globalscreen = 1
|
||||
|
||||
/obj/screen/parallax_dustmaster
|
||||
plane = PLANE_SPACE_PARALLAX_DUST
|
||||
screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
appearance_flags = PLANE_MASTER
|
||||
blend_mode = BLEND_MULTIPLY
|
||||
globalscreen = 1
|
||||
|
||||
/datum/hud/proc/update_parallax()
|
||||
var/client/C = mymob.client
|
||||
if(!parallax_initialized || C.updating_parallax) return
|
||||
|
||||
for(var/turf/T in range(get_turf(C.eye),C.view))
|
||||
if(istype(T,/turf/space))
|
||||
C.updating_parallax = 1
|
||||
break
|
||||
|
||||
if(!C.updating_parallax)
|
||||
return
|
||||
|
||||
//multiple sub-procs for profiling purposes
|
||||
if(update_parallax1())
|
||||
update_parallax2(0)
|
||||
update_parallax3()
|
||||
C.updating_parallax = 0
|
||||
else
|
||||
C.updating_parallax = 0
|
||||
|
||||
/datum/hud/proc/update_parallax_and_dust()
|
||||
var/client/C = mymob.client
|
||||
if(!parallax_initialized || C.updating_parallax) return
|
||||
C.updating_parallax = 1
|
||||
if(update_parallax1())
|
||||
update_parallax2(1)
|
||||
update_parallax3()
|
||||
C.updating_parallax = 0
|
||||
else
|
||||
C.updating_parallax = 0
|
||||
|
||||
/datum/hud/proc/update_parallax1()
|
||||
var/client/C = mymob.client
|
||||
//DO WE UPDATE PARALLAX
|
||||
if(C.prefs.space_parallax)//have to exclude Centcom so parallax doens't appear during hyperspace
|
||||
parallax_on_clients |= C
|
||||
else
|
||||
for(var/obj/screen/parallax/bgobj in C.parallax)
|
||||
C.screen -= bgobj
|
||||
for(var/obj/screen/parallax/bgobj in C.parallax_nodust)
|
||||
C.screen -= bgobj
|
||||
parallax_on_clients -= C
|
||||
|
||||
C.screen -= C.parallax_master
|
||||
C.screen -= C.parallax_canvas
|
||||
C.screen -= C.parallax_voidmaster
|
||||
C.screen -= C.parallax_dustmaster
|
||||
return 0
|
||||
|
||||
if(!C.parallax_master)
|
||||
C.parallax_master = getFromPool(/obj/screen/parallax_master)
|
||||
if(!C.parallax_canvas)
|
||||
C.parallax_canvas = getFromPool(/obj/screen/parallax_canvas)
|
||||
if(!C.parallax_voidmaster)
|
||||
C.parallax_voidmaster = getFromPool(/obj/screen/parallax_voidmaster)
|
||||
if(!C.parallax_dustmaster)
|
||||
C.parallax_dustmaster = getFromPool(/obj/screen/parallax_dustmaster)
|
||||
|
||||
C.parallax_master.appearance_flags = PLANE_MASTER
|
||||
C.parallax_voidmaster.appearance_flags = PLANE_MASTER
|
||||
C.parallax_dustmaster.appearance_flags = PLANE_MASTER
|
||||
C.parallax_canvas.color = space_color
|
||||
|
||||
C.screen |= C.parallax_master
|
||||
C.screen |= C.parallax_canvas
|
||||
C.screen |= C.parallax_voidmaster
|
||||
C.screen |= C.parallax_dustmaster
|
||||
|
||||
return 1
|
||||
|
||||
/datum/hud/proc/update_parallax2(forcerecalibrate = 0)
|
||||
var/client/C = mymob.client
|
||||
//DO WE HAVE TO REPLACE ALL THE LAYERS
|
||||
|
||||
if(!C.parallax.len)
|
||||
var/list/wantDatParallax = list()
|
||||
wantDatParallax |= space_parallax_dust_0 + space_parallax_dust_1 + space_parallax_dust_2
|
||||
for(var/obj/screen/parallax/bgobj in wantDatParallax)
|
||||
var/obj/screen/parallax/parallax_layer = getFromPool(/obj/screen/parallax)
|
||||
parallax_layer.overlays |= bgobj.overlays
|
||||
parallax_layer.base_offset_x = bgobj.base_offset_x
|
||||
parallax_layer.base_offset_y = bgobj.base_offset_y
|
||||
parallax_layer.plane = bgobj.plane
|
||||
parallax_layer.parallax_speed = bgobj.parallax_speed
|
||||
C.parallax |= parallax_layer
|
||||
|
||||
if(!C.parallax_nodust.len)
|
||||
var/list/wantDatParallax = list()
|
||||
wantDatParallax |= space_parallax_0 + space_parallax_1 + space_parallax_2
|
||||
for(var/obj/screen/parallax/bgobj in wantDatParallax)
|
||||
var/obj/screen/parallax/parallax_layer = getFromPool(/obj/screen/parallax)
|
||||
parallax_layer.overlays |= bgobj.overlays
|
||||
parallax_layer.base_offset_x = bgobj.base_offset_x
|
||||
parallax_layer.base_offset_y = bgobj.base_offset_y
|
||||
parallax_layer.plane = bgobj.plane
|
||||
parallax_layer.parallax_speed = bgobj.parallax_speed
|
||||
C.parallax_nodust |= parallax_layer
|
||||
|
||||
var/parallax_loaded = 0
|
||||
for(var/obj/screen/S in C.screen)
|
||||
if(istype(S,/obj/screen/parallax))
|
||||
parallax_loaded = 1
|
||||
break
|
||||
|
||||
if(forcerecalibrate || !parallax_loaded)
|
||||
for(var/obj/screen/parallax/bgobj in C.parallax)
|
||||
C.screen -= bgobj
|
||||
for(var/obj/screen/parallax/bgobj in C.parallax_nodust)
|
||||
C.screen -= bgobj
|
||||
|
||||
if(C.prefs.space_dust)
|
||||
for(var/obj/screen/parallax/bgobj in C.parallax)
|
||||
C.screen |= bgobj
|
||||
else
|
||||
for(var/obj/screen/parallax/bgobj in C.parallax_nodust)
|
||||
C.screen |= bgobj
|
||||
|
||||
if(C.prefs.space_dust)
|
||||
C.parallax_canvas.plane = PLANE_SPACE_PARALLAX_DUST
|
||||
else
|
||||
C.parallax_canvas.plane = PLANE_SPACE_PARALLAX
|
||||
|
||||
if(!C.parallax_offset.len)
|
||||
C.parallax_offset["horizontal"] = 0
|
||||
C.parallax_offset["vertical"] = 0
|
||||
|
||||
/datum/hud/proc/update_parallax3()
|
||||
var/client/C = mymob.client
|
||||
//ACTUALLY MOVING THE PARALLAX
|
||||
var/turf/posobj = get_turf(C.eye)
|
||||
|
||||
if(!C.previous_turf || (C.previous_turf.z != posobj.z))
|
||||
C.previous_turf = posobj
|
||||
|
||||
//Doing it this way prevents parallax layers from "jumping" when you change Z-Levels.
|
||||
C.parallax_offset["horizontal"] += posobj.x - C.previous_turf.x
|
||||
C.parallax_offset["vertical"] += posobj.y - C.previous_turf.y
|
||||
|
||||
C.previous_turf = posobj
|
||||
|
||||
if(C.prefs.space_dust)
|
||||
for(var/obj/screen/parallax/bgobj in C.parallax)
|
||||
if(bgobj.parallax_speed)//only the middle and front layers actually move
|
||||
var/accumulated_offset_x = bgobj.base_offset_x - round(C.parallax_offset["horizontal"] * bgobj.parallax_speed * (C.prefs.parallax_speed/2))
|
||||
var/accumulated_offset_y = bgobj.base_offset_y - round(C.parallax_offset["vertical"] * bgobj.parallax_speed * (C.prefs.parallax_speed/2))
|
||||
|
||||
while(accumulated_offset_x > 720)
|
||||
accumulated_offset_x -= 1440
|
||||
while(accumulated_offset_x < -720)
|
||||
accumulated_offset_x += 1440
|
||||
|
||||
while(accumulated_offset_y > 720)
|
||||
accumulated_offset_y -= 1440
|
||||
while(accumulated_offset_y < -720)
|
||||
accumulated_offset_y += 1440
|
||||
|
||||
bgobj.screen_loc = "CENTER-7:[accumulated_offset_x],CENTER-7:[accumulated_offset_y]"
|
||||
else
|
||||
bgobj.screen_loc = "CENTER-7:[bgobj.base_offset_x],CENTER-7:[bgobj.base_offset_y]"
|
||||
else
|
||||
for(var/obj/screen/parallax/bgobj in C.parallax_nodust)
|
||||
if(bgobj.parallax_speed)//only the middle and front layers actually move
|
||||
var/accumulated_offset_x = bgobj.base_offset_x - round(C.parallax_offset["horizontal"] * bgobj.parallax_speed * (C.prefs.parallax_speed/2))
|
||||
var/accumulated_offset_y = bgobj.base_offset_y - round(C.parallax_offset["vertical"] * bgobj.parallax_speed * (C.prefs.parallax_speed/2))
|
||||
|
||||
while(accumulated_offset_x > 720)
|
||||
accumulated_offset_x -= 1440
|
||||
while(accumulated_offset_x < -720)
|
||||
accumulated_offset_x += 1440
|
||||
|
||||
while(accumulated_offset_y > 720)
|
||||
accumulated_offset_y -= 1440
|
||||
while(accumulated_offset_y < -720)
|
||||
accumulated_offset_y += 1440
|
||||
|
||||
bgobj.screen_loc = "CENTER-7:[accumulated_offset_x],CENTER-7:[accumulated_offset_y]"
|
||||
else
|
||||
bgobj.screen_loc = "CENTER-7:[bgobj.base_offset_x],CENTER-7:[bgobj.base_offset_y]"
|
||||
|
||||
/proc/calibrate_parallax(var/obj/screen/parallax/p_layer,var/i)
|
||||
if(!p_layer || !i) return
|
||||
|
||||
/*
|
||||
1 2 3
|
||||
4 5 6
|
||||
7 8 9
|
||||
*/
|
||||
switch(i)
|
||||
if(1,4,7)
|
||||
p_layer.base_offset_x = -480
|
||||
if(3,6,9)
|
||||
p_layer.base_offset_x = 480
|
||||
switch(i)
|
||||
if(1,2,3)
|
||||
p_layer.base_offset_y = 480
|
||||
if(7,8,9)
|
||||
p_layer.base_offset_y = -480
|
||||
@@ -102,10 +102,6 @@ datum/controller/game_controller/proc/setup()
|
||||
cachedamageicons()
|
||||
log_startup_progress(" Finished caching damage icons in [stop_watch(watch)]s.")
|
||||
|
||||
log_startup_progress("Caching space parallax simulation...")
|
||||
cachespaceparallax()
|
||||
log_startup_progress(" Finished caching space parallax simulation in [stop_watch(watch)]s.")
|
||||
|
||||
buildcamlist()
|
||||
|
||||
if(config.media_base_url)
|
||||
@@ -177,87 +173,6 @@ datum/controller/game_controller/proc/cachedamageicons()
|
||||
damage_icon_parts["[damage_state]/[O.icon_name]/[species_blood]"] = DI
|
||||
del(H)
|
||||
|
||||
datum/controller/game_controller/proc/cachespaceparallax()
|
||||
for(var/i in 1 to 9)
|
||||
var/obj/screen/parallax/parallax_layer = new /obj/screen/parallax()
|
||||
for(var/j in 0 to 224)
|
||||
var/image/I = image('icons/turf/space_parallax4.dmi',"[rand(26)]")
|
||||
I.pixel_x = 32 * (j%15)
|
||||
I.pixel_y = 32 * round(j/15)
|
||||
I.plane = PLANE_SPACE_PARALLAX
|
||||
parallax_layer.overlays += I
|
||||
parallax_layer.parallax_speed = 0
|
||||
parallax_layer.plane = PLANE_SPACE_PARALLAX
|
||||
calibrate_parallax(parallax_layer,i)
|
||||
space_parallax_0[i] = parallax_layer
|
||||
for(var/i in 1 to 9)
|
||||
var/obj/screen/parallax/parallax_layer = new /obj/screen/parallax()
|
||||
for(var/j in 0 to 224)
|
||||
var/image/I = image('icons/turf/space_parallax3.dmi',"[rand(26)]")
|
||||
I.pixel_x = 32 * (j%15)
|
||||
I.pixel_y = 32 * round(j/15)
|
||||
I.plane = PLANE_SPACE_PARALLAX
|
||||
parallax_layer.overlays += I
|
||||
parallax_layer.parallax_speed = 1
|
||||
parallax_layer.plane = PLANE_SPACE_PARALLAX
|
||||
calibrate_parallax(parallax_layer,i)
|
||||
space_parallax_1[i] = parallax_layer
|
||||
for(var/i in 1 to 9)
|
||||
var/obj/screen/parallax/parallax_layer = new /obj/screen/parallax()
|
||||
for(var/j in 0 to 224)
|
||||
var/image/I = image('icons/turf/space_parallax2.dmi',"[rand(26)]")
|
||||
I.pixel_x = 32 * (j%15)
|
||||
I.pixel_y = 32 * round(j/15)
|
||||
I.plane = PLANE_SPACE_PARALLAX
|
||||
parallax_layer.overlays += I
|
||||
parallax_layer.parallax_speed = 2
|
||||
parallax_layer.plane = PLANE_SPACE_PARALLAX
|
||||
calibrate_parallax(parallax_layer,i)
|
||||
space_parallax_2[i] = parallax_layer
|
||||
for(var/i in 1 to 9)
|
||||
var/obj/screen/parallax/parallax_layer = new /obj/screen/parallax()
|
||||
var/image/space_parallax_layer = space_parallax_0[i]
|
||||
for(var/j in 1 to space_parallax_layer.overlays.len)
|
||||
var/image/I = space_parallax_layer.overlays[j]
|
||||
var/image/J = image('icons/turf/space_parallax4.dmi',I.icon_state)
|
||||
J.plane = PLANE_SPACE_PARALLAX_DUST
|
||||
J.pixel_x = I.pixel_x
|
||||
J.pixel_y = I.pixel_y
|
||||
parallax_layer.overlays += J
|
||||
parallax_layer.parallax_speed = 0
|
||||
parallax_layer.plane = PLANE_SPACE_PARALLAX_DUST
|
||||
calibrate_parallax(parallax_layer,i)
|
||||
space_parallax_dust_0[i] = parallax_layer
|
||||
for(var/i in 1 to 9)
|
||||
var/obj/screen/parallax/parallax_layer = new /obj/screen/parallax()
|
||||
var/image/space_parallax_layer = space_parallax_1[i]
|
||||
for(var/j in 1 to space_parallax_layer.overlays.len)
|
||||
var/image/I = space_parallax_layer.overlays[j]
|
||||
var/image/J = image('icons/turf/space_parallax3.dmi',I.icon_state)
|
||||
J.plane = PLANE_SPACE_PARALLAX_DUST
|
||||
J.pixel_x = I.pixel_x
|
||||
J.pixel_y = I.pixel_y
|
||||
parallax_layer.overlays += J
|
||||
parallax_layer.parallax_speed = 1
|
||||
parallax_layer.plane = PLANE_SPACE_PARALLAX_DUST
|
||||
calibrate_parallax(parallax_layer,i)
|
||||
space_parallax_dust_1[i] = parallax_layer
|
||||
for(var/i in 1 to 9)
|
||||
var/obj/screen/parallax/parallax_layer = new /obj/screen/parallax()
|
||||
var/image/space_parallax_layer = space_parallax_2[i]
|
||||
for(var/j in 1 to space_parallax_layer.overlays.len)
|
||||
var/image/I = space_parallax_layer.overlays[j]
|
||||
var/image/J = image('icons/turf/space_parallax2.dmi',I.icon_state)
|
||||
J.plane = PLANE_SPACE_PARALLAX_DUST
|
||||
J.pixel_x = I.pixel_x
|
||||
J.pixel_y = I.pixel_y
|
||||
parallax_layer.overlays += J
|
||||
parallax_layer.parallax_speed = 2
|
||||
parallax_layer.plane = PLANE_SPACE_PARALLAX_DUST
|
||||
calibrate_parallax(parallax_layer,i)
|
||||
space_parallax_dust_2[i] = parallax_layer
|
||||
parallax_initialized = 1
|
||||
|
||||
/datum/controller/game_controller/proc/setup_objects()
|
||||
var/watch = start_watch()
|
||||
var/overwatch = start_watch() // Overall.
|
||||
|
||||
@@ -2142,7 +2142,7 @@ proc/process_adminbus_teleport_locs()
|
||||
|
||||
/area/awaymission/leviathan
|
||||
name = "Leviathan"
|
||||
|
||||
|
||||
/area/awaymission/leviathan/research
|
||||
name = "Leviathan"
|
||||
icon_state = "anolab"
|
||||
|
||||
@@ -179,8 +179,6 @@
|
||||
last_move = 0
|
||||
return
|
||||
|
||||
move_parallax(loc)
|
||||
|
||||
if(tether && can_pull_tether && !tether_pull)
|
||||
tether.follow(src,oldloc)
|
||||
var/datum/chain/tether_datum = tether.chain_datum
|
||||
@@ -317,20 +315,12 @@
|
||||
var/datum/locking_category/category = locked_atoms[AM]
|
||||
category.update_lock(AM)
|
||||
|
||||
move_parallax(destination)
|
||||
|
||||
// Update on_moved listeners.
|
||||
INVOKE_EVENT(on_moved,list("loc"=loc))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/atom/movable/proc/move_parallax(atom/destination)
|
||||
spawn()
|
||||
for(var/client/C in clients)
|
||||
if((get_turf(C.eye) == destination) && (C.mob.hud_used))
|
||||
C.mob.hud_used.update_parallax()
|
||||
|
||||
|
||||
/atom/movable/proc/forceEnter(atom/destination)
|
||||
if(destination)
|
||||
if(loc)
|
||||
@@ -344,9 +334,6 @@
|
||||
for(var/atom/movable/AM in locked_atoms)
|
||||
AM.forceMove(loc)
|
||||
|
||||
move_parallax(destination)
|
||||
|
||||
INVOKE_EVENT(on_moved,list("loc"=loc))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
@@ -333,7 +333,7 @@ obj/structure/ex_act(severity)
|
||||
last_delay = current_tube.enter_delay(src, next_dir)
|
||||
sleep(last_delay)
|
||||
dir = next_dir
|
||||
forceMove(next_loc) // When moving from one tube to another, skip collision and such.
|
||||
loc = next_loc // When moving from one tube to another, skip collision and such.
|
||||
density = current_tube.density
|
||||
|
||||
if(current_tube && current_tube.should_stop_pod(src, next_dir))
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
desc = "The final frontier."
|
||||
icon_state = "0"
|
||||
|
||||
plane = PLANE_SPACE_BACKGROUND
|
||||
|
||||
temperature = TCMB
|
||||
thermal_conductivity = OPEN_HEAT_TRANSFER_COEFFICIENT
|
||||
heat_capacity = 700000
|
||||
@@ -18,11 +16,8 @@
|
||||
if(loc)
|
||||
var/area/A = loc
|
||||
A.area_turfs += src
|
||||
icon_state = "[((x + y) ^ ~(x * y) + z) % 26]"
|
||||
var/image/I = image('icons/turf/space_parallax1.dmi',"[icon_state]")
|
||||
I.plane = PLANE_SPACE_DUST
|
||||
I.alpha = 80
|
||||
overlays += I
|
||||
|
||||
icon_state = "[((x + y) ^ ~(x * y) + z) % 25]"
|
||||
|
||||
/turf/space/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
/turf/space/transit
|
||||
plane = PLANE_BASE
|
||||
var/pushdirection // push things that get caught in the transit tile this direction
|
||||
|
||||
/turf/space/transit/New()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/turf
|
||||
icon = 'icons/turf/floors.dmi'
|
||||
level = 1.0
|
||||
plane = PLANE_BASE
|
||||
|
||||
luminosity = 0
|
||||
|
||||
//for floors, use is_plating(), is_plasteel_floor() and is_light_floor()
|
||||
|
||||
@@ -417,13 +417,3 @@ var/adminblob_beat = 'sound/effects/blob_pulse.ogg'
|
||||
#define DEPARTMENT_START_FUNDS 5000
|
||||
#define DEPARTMENT_START_WAGE 500
|
||||
#define PLAYER_START_WAGE 50
|
||||
|
||||
//SPACE PARALLAX
|
||||
var/parallax_initialized = 0
|
||||
var/space_color = "#050505"
|
||||
var/list/space_parallax_0[9]
|
||||
var/list/space_parallax_1[9]
|
||||
var/list/space_parallax_2[9]
|
||||
var/list/space_parallax_dust_0[9]
|
||||
var/list/space_parallax_dust_1[9]
|
||||
var/list/space_parallax_dust_2[9]
|
||||
|
||||
@@ -792,7 +792,6 @@ var/global/floorIsLava = 0
|
||||
<A href='?src=\ref[src];secretsfun=bombernohurt'>Make Bomberman Bombs harmless to players(default)</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=bombernodestroy'>Make Bomberman Bombs harmless to the environnement(default)</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=placeturret'>Create a turret</A><BR>
|
||||
<A href='?src=\ref[src];secretsfun=spacecolor'>Set the color of parallaxed space</A><BR>
|
||||
<BR>
|
||||
<B>Final Solutions</B><BR>
|
||||
<I>(Warning, these will end the round!)</I><BR>
|
||||
|
||||
@@ -3131,22 +3131,6 @@
|
||||
var/emag = input("Emag the turret?") in list("Yes", "No")
|
||||
if(emag=="Yes")
|
||||
Turret.emag(usr)
|
||||
if("spacecolor")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","SpaceColor")
|
||||
|
||||
var/newcolor = input("Set the color of space. This will only affect players with parallax enabled. (default=#050505)","Space Color") as null|text
|
||||
|
||||
if(newcolor)
|
||||
space_color = newcolor
|
||||
|
||||
for(var/mob/M in player_list)
|
||||
if(M.hud_used)
|
||||
M.hud_used.update_parallax()
|
||||
|
||||
message_admins("[key_name_admin(usr)] changed the color of space. Space is now [newcolor].")
|
||||
log_admin("[key_name_admin(usr)] changed the color of space. Space is now [newcolor].")
|
||||
|
||||
if("hardcore_mode")
|
||||
var/choice = input("Are you sure you want to [ticker.hardcore_mode ? "disable" : "enable"] hardcore mode? Starvation will [ticker.hardcore_mode ? "no longer":""]slowly kill player-controlled humans.", "Admin Abuse") in list("Yes", "No!")
|
||||
|
||||
|
||||
@@ -62,16 +62,3 @@
|
||||
// Their chat window, sort of important.
|
||||
// See /goon/code/datums/browserOutput.dm
|
||||
var/datum/chatOutput/chatOutput
|
||||
|
||||
////////////
|
||||
//PARALLAX//
|
||||
////////////
|
||||
var/updating_parallax = 0
|
||||
var/list/parallax = list()
|
||||
var/list/parallax_nodust = list()
|
||||
var/list/parallax_offset = list()
|
||||
var/turf/previous_turf = null
|
||||
var/obj/screen/parallax_canvas/parallax_canvas = null
|
||||
var/obj/screen/parallax_master/parallax_master = null
|
||||
var/obj/screen/parallax_dustmaster/parallax_dustmaster = null
|
||||
var/obj/screen/parallax_voidmaster/parallax_voidmaster = null
|
||||
|
||||
@@ -94,9 +94,6 @@ var/const/MAX_SAVE_SLOTS = 8
|
||||
var/toggles = TOGGLES_DEFAULT
|
||||
var/UI_style_color = "#ffffff"
|
||||
var/UI_style_alpha = 255
|
||||
var/space_parallax = 1
|
||||
var/space_dust = 1
|
||||
var/parallax_speed = 2
|
||||
var/special_popup = 0
|
||||
|
||||
//character preferences
|
||||
@@ -277,9 +274,6 @@ var/const/MAX_SAVE_SLOTS = 8
|
||||
/datum/preferences/proc/setup_special(var/dat, var/user)
|
||||
dat += {"<table><tr><td width='340px' height='300px' valign='top'>
|
||||
<h2>General Settings</h2>
|
||||
<b>Space Parallax:</b> <a href='?_src_=prefs;preference=parallax'><b>[space_parallax ? "Enabled" : "Disabled"]</b></a><br>
|
||||
<b>Parallax Speed:</b> <a href='?_src_=prefs;preference=p_speed'><b>[parallax_speed]</b></a><br>
|
||||
<b>Space Dust:</b> <a href='?_src_=prefs;preference=dust'><b>[space_dust ? "Yes" : "No"]</b></a><br>
|
||||
<b>Play admin midis:</b> <a href='?_src_=prefs;preference=hear_midis'><b>[(toggles & SOUND_MIDI) ? "Yes" : "No"]</b></a><br>
|
||||
<b>Play lobby music:</b> <a href='?_src_=prefs;preference=lobby_music'><b>[(toggles & SOUND_LOBBY) ? "Yes" : "No"]</b></a><br>
|
||||
<b>Hear streamed media:</b> <a href='?_src_=prefs;preference=jukebox'><b>[(toggles & SOUND_STREAMING) ? "Yes" : "No"]</b></a><br>
|
||||
@@ -1428,15 +1422,6 @@ NOTE: The change will take effect AFTER any current recruiting periods."}
|
||||
if(!UI_style_alpha_new | !(UI_style_alpha_new <= 255 && UI_style_alpha_new >= 50)) return
|
||||
UI_style_alpha = UI_style_alpha_new
|
||||
|
||||
if("parallax")
|
||||
space_parallax = !space_parallax
|
||||
|
||||
if("dust")
|
||||
space_dust = !space_dust
|
||||
|
||||
if("p_speed")
|
||||
parallax_speed = min(max(input(user, "Enter a number between 0 and 5 included (default=2)","Parallax Speed Preferences",parallax_speed),0),5)
|
||||
|
||||
if("name")
|
||||
be_random_name = !be_random_name
|
||||
|
||||
|
||||
@@ -90,9 +90,6 @@
|
||||
randomslot = text2num(preference_list_client["randomslot"])
|
||||
usenanoui = text2num(preference_list_client["usenanoui"])
|
||||
progress_bars = text2num(preference_list_client["progress_bars"])
|
||||
space_parallax = text2num(preference_list_client["space_parallax"])
|
||||
space_dust = text2num(preference_list_client["space_dust"])
|
||||
parallax_speed = text2num(preference_list_client["parallax_speed"])
|
||||
|
||||
ooccolor = sanitize_hexcolor(ooccolor, initial(ooccolor))
|
||||
lastchangelog = sanitize_text(lastchangelog, initial(lastchangelog))
|
||||
@@ -108,9 +105,6 @@
|
||||
special_popup = sanitize_integer(special_popup, 0, 1, initial(special_popup))
|
||||
usenanoui = sanitize_integer(usenanoui, 0, 1, initial(usenanoui))
|
||||
progress_bars = sanitize_integer(progress_bars, 0, 1, initial(progress_bars))
|
||||
space_parallax = sanitize_integer(space_parallax, 0, 1, initial(space_parallax))
|
||||
space_dust = sanitize_integer(space_dust, 0, 1, initial(space_dust))
|
||||
parallax_speed = sanitize_integer(parallax_speed, 0, 5, initial(parallax_speed))
|
||||
return 1
|
||||
|
||||
|
||||
@@ -171,15 +165,15 @@
|
||||
check.Add("SELECT ckey FROM client WHERE ckey = ?", ckey)
|
||||
if(check.Execute(db))
|
||||
if(!check.NextRow())
|
||||
q.Add("INSERT into client (ckey, ooc_color, lastchangelog, UI_style, default_slot, toggles, UI_style_color, UI_style_alpha, warns, warnbans, randomslot, volume, usewmp, special, usenanoui, progress_bars, space_parallax, space_dust, parallax_speed) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)",\
|
||||
ckey, ooccolor, lastchangelog, UI_style, default_slot, toggles, UI_style_color, UI_style_alpha, warns, warnbans, randomslot, volume, usewmp, special_popup, usenanoui, progress_bars, space_parallax, space_dust, parallax_speed)
|
||||
q.Add("INSERT into client (ckey, ooc_color, lastchangelog, UI_style, default_slot, toggles, UI_style_color, UI_style_alpha, warns, warnbans, randomslot, volume, usewmp, special, usenanoui, progress_bars) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)",\
|
||||
ckey, ooccolor, lastchangelog, UI_style, default_slot, toggles, UI_style_color, UI_style_alpha, warns, warnbans, randomslot, volume, usewmp, special_popup, usenanoui, progress_bars)
|
||||
if(!q.Execute(db))
|
||||
message_admins("Error #: [q.Error()] - [q.ErrorMsg()]")
|
||||
WARNING("Error #:[q.Error()] - [q.ErrorMsg()]")
|
||||
return 0
|
||||
else
|
||||
q.Add("UPDATE client SET ooc_color=?,lastchangelog=?,UI_style=?,default_slot=?,toggles=?,UI_style_color=?,UI_style_alpha=?,warns=?,warnbans=?,randomslot=?,volume=?,usewmp=?,special=?,usenanoui=?,progress_bars=?,space_parallax=?,space_dust=?,parallax_speed=? WHERE ckey = ?",\
|
||||
ooccolor, lastchangelog, UI_style, default_slot, toggles, UI_style_color, UI_style_alpha, warns, warnbans, randomslot, volume, usewmp, special_popup, usenanoui, progress_bars, space_parallax, space_dust, parallax_speed, ckey)
|
||||
q.Add("UPDATE client SET ooc_color=?,lastchangelog=?,UI_style=?,default_slot=?,toggles=?,UI_style_color=?,UI_style_alpha=?,warns=?,warnbans=?,randomslot=?,volume=?,usewmp=?,special=?,usenanoui=?,progress_bars=? WHERE ckey = ?",\
|
||||
ooccolor, lastchangelog, UI_style, default_slot, toggles, UI_style_color, UI_style_alpha, warns, warnbans, randomslot, volume, usewmp, special_popup, usenanoui, progress_bars, ckey)
|
||||
if(!q.Execute(db))
|
||||
message_admins("Error #: [q.Error()] - [q.ErrorMsg()]")
|
||||
WARNING("Error #:[q.Error()] - [q.ErrorMsg()]")
|
||||
@@ -213,9 +207,6 @@
|
||||
S["warnbans"] << warnbans
|
||||
S["randomslot"] << randomslot
|
||||
S["volume"] << volume
|
||||
S["space_parallax"] << space_parallax
|
||||
S["space_dust"] << space_dust
|
||||
S["parallax_speed"] << parallax_speed
|
||||
return 1
|
||||
|
||||
//saving volume changes
|
||||
|
||||
@@ -244,44 +244,3 @@
|
||||
to_chat(usr, "You will no longer see progress bars when doing delayed actions.")
|
||||
else
|
||||
to_chat(usr, "You will now see progress bars when doing delayed actions")
|
||||
|
||||
/client/verb/toggle_space_parallax()
|
||||
set name = "Toggle Space Parallax"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggle the parallax effect of space turfs."
|
||||
prefs.space_parallax = !prefs.space_parallax
|
||||
|
||||
prefs.save_preferences_sqlite(src,ckey)
|
||||
|
||||
if(!prefs.space_parallax)
|
||||
to_chat(usr, "Space parallax is now deactivated.")
|
||||
else
|
||||
to_chat(usr, "Space parallax is now activated.")
|
||||
|
||||
if(mob && mob.hud_used)
|
||||
mob.hud_used.update_parallax_and_dust()
|
||||
|
||||
/client/verb/toggle_space_dust()
|
||||
set name = "Toggle Space Dust"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggle the presence of dust on space turfs."
|
||||
prefs.space_dust = !prefs.space_dust
|
||||
|
||||
prefs.save_preferences_sqlite(src,ckey)
|
||||
|
||||
if(!prefs.space_dust)
|
||||
to_chat(usr, "Space dust is now deactivated.")
|
||||
else
|
||||
to_chat(usr, "Space dust is now activated.")
|
||||
|
||||
if(mob && mob.hud_used)
|
||||
mob.hud_used.update_parallax_and_dust()
|
||||
|
||||
/client/verb/toggle_parallax_speed()
|
||||
set name = "Change Parallax Speed"
|
||||
set category = "Preferences"
|
||||
set desc = "Change the speed at which parallax moves."
|
||||
|
||||
prefs.parallax_speed = min(max(input(usr, "Enter a number between 0 and 5 included (default=2)","Parallax Speed Preferences",prefs.parallax_speed),0),5)
|
||||
|
||||
prefs.save_preferences_sqlite(src,ckey)
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
/datum/migration/sqlite/ss13_prefs/_003
|
||||
id = 3
|
||||
name = "Add Space Parallax"
|
||||
|
||||
/datum/migration/sqlite/ss13_prefs/_003/up()
|
||||
if(!hasColumn("client","space_parallax"))
|
||||
return execute("ALTER TABLE `client` ADD COLUMN space_parallax INTEGER DEFAULT 1")
|
||||
return TRUE
|
||||
|
||||
/datum/migration/sqlite/ss13_prefs/_003/down()
|
||||
if(hasColumn("client","space_parallax"))
|
||||
return execute("ALTER TABLE `client` DROP COLUMN space_parallax")
|
||||
return TRUE
|
||||
@@ -1,13 +0,0 @@
|
||||
/datum/migration/sqlite/ss13_prefs/_004
|
||||
id = 4
|
||||
name = "Add Space Dust"
|
||||
|
||||
/datum/migration/sqlite/ss13_prefs/_004/up()
|
||||
if(!hasColumn("client","space_dust"))
|
||||
return execute("ALTER TABLE `client` ADD COLUMN space_dust INTEGER DEFAULT 1")
|
||||
return TRUE
|
||||
|
||||
/datum/migration/sqlite/ss13_prefs/_004/down()
|
||||
if(hasColumn("client","space_dust"))
|
||||
return execute("ALTER TABLE `client` DROP COLUMN space_dust")
|
||||
return TRUE
|
||||
@@ -1,13 +0,0 @@
|
||||
/datum/migration/sqlite/ss13_prefs/_005
|
||||
id = 5
|
||||
name = "Add Parallax Speed"
|
||||
|
||||
/datum/migration/sqlite/ss13_prefs/_005/up()
|
||||
if(!hasColumn("client","parallax_speed"))
|
||||
return execute("ALTER TABLE `client` ADD COLUMN parallax_speed INTEGER DEFAULT 2")
|
||||
return TRUE
|
||||
|
||||
/datum/migration/sqlite/ss13_prefs/_005/down()
|
||||
if(hasColumn("client","parallax_speed"))
|
||||
return execute("ALTER TABLE `client` DROP COLUMN parallax_speed")
|
||||
return TRUE
|
||||
@@ -1507,11 +1507,4 @@ var/proccalls = 1
|
||||
#define EVENT_OBJECT_INDEX "o"
|
||||
#define EVENT_PROC_INDEX "p"
|
||||
|
||||
#define HIGHLANDER "highlander"
|
||||
|
||||
//New planes stuff, currently only used by Space Parallax
|
||||
#define PLANE_BASE 0
|
||||
#define PLANE_SPACE_PARALLAX -5
|
||||
#define PLANE_SPACE_DUST -7
|
||||
#define PLANE_SPACE_PARALLAX_DUST -8
|
||||
#define PLANE_SPACE_BACKGROUND -10
|
||||
#define HIGHLANDER "highlander"
|
||||
|
Before Width: | Height: | Size: 1.5 MiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 126 KiB After Width: | Height: | Size: 126 KiB |
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 577 B |
|
Before Width: | Height: | Size: 795 B |
|
Before Width: | Height: | Size: 2.2 KiB |
@@ -72,7 +72,6 @@
|
||||
#include "code\_onclick\hud\movable_screen_objects.dm"
|
||||
#include "code\_onclick\hud\other_mobs.dm"
|
||||
#include "code\_onclick\hud\pai.dm"
|
||||
#include "code\_onclick\hud\parallax.dm"
|
||||
#include "code\_onclick\hud\robot.dm"
|
||||
#include "code\_onclick\hud\screen_objects.dm"
|
||||
#include "code\_onclick\hud\spell_screen_objects.dm"
|
||||
@@ -1190,9 +1189,6 @@
|
||||
#include "code\modules\migrations\SS13\_base.dm"
|
||||
#include "code\modules\migrations\SS13_Prefs\001-create.dm"
|
||||
#include "code\modules\migrations\SS13_Prefs\002-add-progress-bars.dm"
|
||||
#include "code\modules\migrations\SS13_Prefs\003-add-space-parallax.dm"
|
||||
#include "code\modules\migrations\SS13_Prefs\004-add-space-dust.dm"
|
||||
#include "code\modules\migrations\SS13_Prefs\005-add-parallax-speed.dm"
|
||||
#include "code\modules\migrations\SS13_Prefs\_base.dm"
|
||||
#include "code\modules\mining\abandonedcrates.dm"
|
||||
#include "code\modules\mining\debug_shit.dm"
|
||||
|
||||