Revert "Merge pull request #4739 from monster860/vg-parallax"
This reverts commit451c934379, reversing changes made to64f26d999f. Conflicts: SQL/paradise_schema.sql SQL/paradise_schema_prefixed.sql
@@ -250,9 +250,6 @@ CREATE TABLE `player` (
|
|||||||
`nanoui_fancy` smallint(4) DEFAULT '1',
|
`nanoui_fancy` smallint(4) DEFAULT '1',
|
||||||
`show_ghostitem_attack` smallint(4) DEFAULT '1',
|
`show_ghostitem_attack` smallint(4) DEFAULT '1',
|
||||||
`lastchangelog` varchar(32) NOT NULL DEFAULT '0',
|
`lastchangelog` varchar(32) NOT NULL DEFAULT '0',
|
||||||
`space_parallax` smallint(4) DEFAULT '1',
|
|
||||||
`space_dust` smallint(4) DEFAULT '1',
|
|
||||||
`parallax_speed` float(24) DEFAULT '2',
|
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
UNIQUE KEY `ckey` (`ckey`)
|
UNIQUE KEY `ckey` (`ckey`)
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=32446 DEFAULT CHARSET=latin1;
|
) ENGINE=InnoDB AUTO_INCREMENT=32446 DEFAULT CHARSET=latin1;
|
||||||
|
|||||||
@@ -250,9 +250,6 @@ CREATE TABLE `SS13_player` (
|
|||||||
`nanoui_fancy` smallint(4) DEFAULT '1',
|
`nanoui_fancy` smallint(4) DEFAULT '1',
|
||||||
`show_ghostitem_attack` smallint(4) DEFAULT '1',
|
`show_ghostitem_attack` smallint(4) DEFAULT '1',
|
||||||
`lastchangelog` varchar(32) NOT NULL DEFAULT '0',
|
`lastchangelog` varchar(32) NOT NULL DEFAULT '0',
|
||||||
`space_parallax` smallint(4) DEFAULT '1',
|
|
||||||
`space_dust` smallint(4) DEFAULT '1',
|
|
||||||
`parallax_speed` float(24) DEFAULT '2',
|
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
UNIQUE KEY `ckey` (`ckey`)
|
UNIQUE KEY `ckey` (`ckey`)
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=32446 DEFAULT CHARSET=latin1;
|
) ENGINE=InnoDB AUTO_INCREMENT=32446 DEFAULT CHARSET=latin1;
|
||||||
|
|||||||
@@ -80,14 +80,6 @@
|
|||||||
//turfs += centerturf
|
//turfs += centerturf
|
||||||
return atoms
|
return atoms
|
||||||
|
|
||||||
/proc/trange(rad = 0, turf/centre = null) //alternative to range (ONLY processes turfs and thus less intensive)
|
|
||||||
if(!centre)
|
|
||||||
return
|
|
||||||
|
|
||||||
var/turf/x1y1 = locate(((centre.x-rad)<1 ? 1 : centre.x-rad),((centre.y-rad)<1 ? 1 : centre.y-rad),centre.z)
|
|
||||||
var/turf/x2y2 = locate(((centre.x+rad)>world.maxx ? world.maxx : centre.x+rad),((centre.y+rad)>world.maxy ? world.maxy : centre.y+rad),centre.z)
|
|
||||||
return block(x1y1,x2y2)
|
|
||||||
|
|
||||||
/proc/get_dist_euclidian(atom/Loc1 as turf|mob|obj,atom/Loc2 as turf|mob|obj)
|
/proc/get_dist_euclidian(atom/Loc1 as turf|mob|obj,atom/Loc2 as turf|mob|obj)
|
||||||
var/dx = Loc1.x - Loc2.x
|
var/dx = Loc1.x - Loc2.x
|
||||||
var/dy = Loc1.y - Loc2.y
|
var/dy = Loc1.y - Loc2.y
|
||||||
|
|||||||
@@ -72,9 +72,4 @@ var/timezoneOffset = 0 // The difference betwen midnight (of the host computer)
|
|||||||
|
|
||||||
// For FTP requests. (i.e. downloading runtime logs.)
|
// For FTP requests. (i.e. downloading runtime logs.)
|
||||||
// However it'd be ok to use for accessing attack logs and such too, which are even laggier.
|
// However it'd be ok to use for accessing attack logs and such too, which are even laggier.
|
||||||
var/fileaccess_timer = 0
|
var/fileaccess_timer = 0
|
||||||
|
|
||||||
//SPACE PARALLAX
|
|
||||||
var/parallax_initialized = 0
|
|
||||||
var/space_color = "#050505"
|
|
||||||
var/list/parallax_icon[27]
|
|
||||||
@@ -1,8 +1,3 @@
|
|||||||
#define CLICKCATCHER_PLANE -99
|
#define CLICKCATCHER_PLANE -99
|
||||||
|
|
||||||
#define PLANE_SPACE_BACKGROUND -10
|
|
||||||
#define PLANE_SPACE_PARALLAX (PLANE_SPACE_BACKGROUND + 1)
|
|
||||||
#define PLANE_SPACE_DUST (PLANE_SPACE_PARALLAX + 1)
|
|
||||||
#define PLANE_BASE 0
|
|
||||||
|
|
||||||
#define HUD_PLANE 90
|
#define HUD_PLANE 90
|
||||||
@@ -167,7 +167,6 @@
|
|||||||
mymob.update_action_buttons(1)
|
mymob.update_action_buttons(1)
|
||||||
reorganize_alerts()
|
reorganize_alerts()
|
||||||
reload_fullscreen()
|
reload_fullscreen()
|
||||||
update_parallax_and_dust()
|
|
||||||
|
|
||||||
/datum/hud/human/show_hud(version = 0)
|
/datum/hud/human/show_hud(version = 0)
|
||||||
..()
|
..()
|
||||||
|
|||||||
@@ -1,281 +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
|
|
||||||
var/parallax_speed = 0
|
|
||||||
var/last_accumulated_offset_x = 0
|
|
||||||
var/last_accumulated_offset_y = 0
|
|
||||||
|
|
||||||
/obj/screen/plane_master
|
|
||||||
appearance_flags = PLANE_MASTER
|
|
||||||
screen_loc = "1,1"
|
|
||||||
|
|
||||||
/obj/screen/plane_master/parallax_master
|
|
||||||
plane = PLANE_SPACE_PARALLAX
|
|
||||||
blend_mode = BLEND_MULTIPLY
|
|
||||||
color = list(
|
|
||||||
1, 0, 0, 0,
|
|
||||||
0, 1, 0, 0,
|
|
||||||
0, 0, 1, 0,
|
|
||||||
0, 0, 0, 0,
|
|
||||||
0, 0, 0, 1)
|
|
||||||
|
|
||||||
/obj/screen/plane_master/parallax_spacemaster // Turns space-turfs into white. The parallax plane multiplies itself by the white, causing the parallax to only show in areas with opacity.
|
|
||||||
plane = PLANE_SPACE_BACKGROUND
|
|
||||||
color = list(
|
|
||||||
0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0,
|
|
||||||
1, 1, 1, 1,
|
|
||||||
0, 0, 0, 0)
|
|
||||||
|
|
||||||
/obj/screen/plane_master/parallax_dustmaster
|
|
||||||
plane = PLANE_SPACE_DUST
|
|
||||||
|
|
||||||
/datum/hud/proc/update_parallax()
|
|
||||||
var/client/C = mymob.client
|
|
||||||
if(!parallax_initialized || C.updating_parallax) return
|
|
||||||
|
|
||||||
for(var/turf/space/T in trange(C.view,get_turf(C.eye)))
|
|
||||||
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
|
|
||||||
parallax_on_clients -= C
|
|
||||||
C.screen -= C.parallax_master
|
|
||||||
C.screen -= C.parallax_spacemaster
|
|
||||||
C.screen -= C.parallax_dustmaster
|
|
||||||
return 0
|
|
||||||
|
|
||||||
if(!C.parallax_master)
|
|
||||||
C.parallax_master = new /obj/screen/plane_master/parallax_master
|
|
||||||
if(!C.parallax_spacemaster)
|
|
||||||
C.parallax_spacemaster = new /obj/screen/plane_master/parallax_spacemaster
|
|
||||||
if(!C.parallax_dustmaster)
|
|
||||||
C.parallax_dustmaster = new /obj/screen/plane_master/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)
|
|
||||||
for(var/obj/screen/parallax/bgobj in parallax_icon)
|
|
||||||
var/obj/screen/parallax/parallax_layer = new /obj/screen/parallax
|
|
||||||
parallax_layer.appearance = bgobj.appearance
|
|
||||||
parallax_layer.base_offset_x = bgobj.base_offset_x
|
|
||||||
parallax_layer.base_offset_y = bgobj.base_offset_y
|
|
||||||
parallax_layer.parallax_speed = bgobj.parallax_speed
|
|
||||||
C.parallax += parallax_layer
|
|
||||||
|
|
||||||
var/parallax_loaded = 0
|
|
||||||
for(var/obj/screen/parallax/S in C.screen)
|
|
||||||
parallax_loaded = 1
|
|
||||||
break
|
|
||||||
|
|
||||||
if(forcerecalibrate || !parallax_loaded)
|
|
||||||
for(var/obj/screen/parallax/bgobj in C.parallax)
|
|
||||||
C.screen |= bgobj
|
|
||||||
|
|
||||||
C.screen |= C.parallax_master
|
|
||||||
C.screen |= C.parallax_spacemaster
|
|
||||||
C.screen |= C.parallax_dustmaster
|
|
||||||
C.parallax_dustmaster.color = list(0,0,0,0)
|
|
||||||
if(C.prefs.space_dust)
|
|
||||||
C.parallax_dustmaster.color = list(
|
|
||||||
1,0,0,0,
|
|
||||||
0,1,0,0,
|
|
||||||
0,0,1,0,
|
|
||||||
0,0,0,1)
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
var/x_diff = posobj.x - C.previous_turf.x
|
|
||||||
var/y_diff = posobj.y - C.previous_turf.y
|
|
||||||
if(x_diff == 0 && y_diff == 0)
|
|
||||||
return // Nothing to do here.
|
|
||||||
var/world_time = world.time
|
|
||||||
var/last_delay = world_time - C.last_parallax_shift
|
|
||||||
last_delay = min(last_delay, 4)
|
|
||||||
|
|
||||||
//Doing it this way prevents parallax layers from "jumping" when you change Z-Levels.
|
|
||||||
C.parallax_offset["horizontal"] += x_diff
|
|
||||||
C.parallax_offset["vertical"] += y_diff
|
|
||||||
|
|
||||||
C.previous_turf = posobj
|
|
||||||
C.last_parallax_shift = world_time
|
|
||||||
|
|
||||||
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))
|
|
||||||
|
|
||||||
bgobj.last_accumulated_offset_x = accumulated_offset_x
|
|
||||||
bgobj.last_accumulated_offset_y = accumulated_offset_y
|
|
||||||
|
|
||||||
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]"
|
|
||||||
|
|
||||||
//Parallax generation code below
|
|
||||||
|
|
||||||
#define PARALLAX4_ICON_NUMBER 20
|
|
||||||
#define PARALLAX3_ICON_NUMBER 14
|
|
||||||
#define PARALLAX2_ICON_NUMBER 10
|
|
||||||
|
|
||||||
/datum/controller/game_controller/proc/cachespaceparallax()
|
|
||||||
var/list/plane1 = list()
|
|
||||||
var/list/plane2 = list()
|
|
||||||
var/list/plane3 = list()
|
|
||||||
var/list/pixel_x = list()
|
|
||||||
var/list/pixel_y = list()
|
|
||||||
var/index = 1
|
|
||||||
for(var/i = 0 to 224)
|
|
||||||
for(var/j = 1 to 9)
|
|
||||||
plane1 += rand(1,26)
|
|
||||||
plane2 += rand(1,26)
|
|
||||||
plane3 += rand(1,26)
|
|
||||||
pixel_x += 32 * (i%15)
|
|
||||||
pixel_y += 32 * round(i/15)
|
|
||||||
|
|
||||||
for(var/i in 0 to 8)
|
|
||||||
var/obj/screen/parallax/parallax_layer = new /obj/screen/parallax()
|
|
||||||
|
|
||||||
var/list/L = list()
|
|
||||||
for(var/j in 1 to 225)
|
|
||||||
if(plane1[j+i*225] <= PARALLAX4_ICON_NUMBER)
|
|
||||||
var/image/I = image('icons/turf/space_parallax4.dmi',"[plane1[j+i*225]]")
|
|
||||||
I.pixel_x = pixel_x[j]
|
|
||||||
I.pixel_y = pixel_y[j]
|
|
||||||
I.plane = PLANE_SPACE_PARALLAX
|
|
||||||
L += I
|
|
||||||
|
|
||||||
parallax_layer.overlays = L
|
|
||||||
parallax_layer.parallax_speed = 0
|
|
||||||
parallax_layer.plane = PLANE_SPACE_PARALLAX
|
|
||||||
calibrate_parallax(parallax_layer,i+1)
|
|
||||||
parallax_icon[index] = parallax_layer
|
|
||||||
index++
|
|
||||||
|
|
||||||
for(var/i in 0 to 8)
|
|
||||||
var/obj/screen/parallax/parallax_layer = new /obj/screen/parallax()
|
|
||||||
|
|
||||||
var/list/L = list()
|
|
||||||
for(var/j in 1 to 225)
|
|
||||||
if(plane2[j+i*225] <= PARALLAX3_ICON_NUMBER)
|
|
||||||
var/image/I = image('icons/turf/space_parallax3.dmi',"[plane2[j+i*225]]")
|
|
||||||
I.pixel_x = pixel_x[j]
|
|
||||||
I.pixel_y = pixel_y[j]
|
|
||||||
I.plane = PLANE_SPACE_PARALLAX
|
|
||||||
L += I
|
|
||||||
|
|
||||||
parallax_layer.overlays = L
|
|
||||||
parallax_layer.parallax_speed = 1
|
|
||||||
parallax_layer.plane = PLANE_SPACE_PARALLAX
|
|
||||||
calibrate_parallax(parallax_layer,i+1)
|
|
||||||
parallax_icon[index] = parallax_layer
|
|
||||||
index++
|
|
||||||
|
|
||||||
for(var/i in 0 to 8)
|
|
||||||
var/obj/screen/parallax/parallax_layer = new /obj/screen/parallax()
|
|
||||||
var/list/L = list()
|
|
||||||
for(var/j in 1 to 225)
|
|
||||||
if(plane3[j+i*225] <= PARALLAX2_ICON_NUMBER)
|
|
||||||
var/image/I = image('icons/turf/space_parallax2.dmi',"[plane3[j+i*225]]")
|
|
||||||
I.pixel_x = pixel_x[j]
|
|
||||||
I.pixel_y = pixel_y[j]
|
|
||||||
I.plane = PLANE_SPACE_PARALLAX
|
|
||||||
L += I
|
|
||||||
|
|
||||||
parallax_layer.overlays = L
|
|
||||||
parallax_layer.parallax_speed = 2
|
|
||||||
parallax_layer.plane = PLANE_SPACE_PARALLAX
|
|
||||||
calibrate_parallax(parallax_layer,i+1)
|
|
||||||
parallax_icon[index] = parallax_layer
|
|
||||||
index++
|
|
||||||
|
|
||||||
parallax_initialized = 1
|
|
||||||
|
|
||||||
/proc/calibrate_parallax(var/obj/screen/parallax/p_layer,var/i)
|
|
||||||
if(!p_layer || !i) return
|
|
||||||
|
|
||||||
/* Placement of screen objects
|
|
||||||
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
|
|
||||||
|
|
||||||
#undef PARALLAX4_ICON_NUMBER
|
|
||||||
#undef PARALLAX3_ICON_NUMBER
|
|
||||||
#undef PARALLAX2_ICON_NUMBER
|
|
||||||
@@ -53,11 +53,6 @@ var/global/pipe_processing_killed = 0
|
|||||||
setupgenetics()
|
setupgenetics()
|
||||||
setupfactions()
|
setupfactions()
|
||||||
setup_economy()
|
setup_economy()
|
||||||
|
|
||||||
var/watch = start_watch()
|
|
||||||
log_startup_progress("Caching space parallax simulation...")
|
|
||||||
cachespaceparallax()
|
|
||||||
log_startup_progress(" Finished caching space parallax simulation in [stop_watch(watch)]s.")
|
|
||||||
|
|
||||||
for(var/i=0, i<max_secret_rooms, i++)
|
for(var/i=0, i<max_secret_rooms, i++)
|
||||||
make_mining_asteroid_secret()
|
make_mining_asteroid_secret()
|
||||||
|
|||||||
@@ -104,8 +104,6 @@
|
|||||||
|
|
||||||
if(. && buckled_mob && !handle_buckled_mob_movement(loc, direct)) //movement failed due to buckled mob
|
if(. && buckled_mob && !handle_buckled_mob_movement(loc, direct)) //movement failed due to buckled mob
|
||||||
. = 0
|
. = 0
|
||||||
|
|
||||||
update_client_hook(loc)
|
|
||||||
|
|
||||||
|
|
||||||
// Previously known as Crossed()
|
// Previously known as Crossed()
|
||||||
@@ -146,25 +144,9 @@
|
|||||||
|
|
||||||
for(var/datum/light_source/L in light_sources)
|
for(var/datum/light_source/L in light_sources)
|
||||||
L.source_atom.update_light()
|
L.source_atom.update_light()
|
||||||
|
|
||||||
update_client_hook(destination)
|
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
/atom/movable/proc/update_client_hook(atom/destination)
|
|
||||||
if(locate(/mob) in src)
|
|
||||||
for(var/client/C in parallax_on_clients)
|
|
||||||
if((get_turf(C.eye) == destination) && (C.mob.hud_used))
|
|
||||||
C.mob.hud_used.update_parallax()
|
|
||||||
|
|
||||||
/mob/update_client_hook(atom/destination)
|
|
||||||
if(locate(/mob) in src)
|
|
||||||
for(var/client/C in parallax_on_clients)
|
|
||||||
if((get_turf(C.eye) == destination) && (C.mob.hud_used))
|
|
||||||
C.mob.hud_used.update_parallax()
|
|
||||||
else if(client && hud_used)
|
|
||||||
hud_used.update_parallax()
|
|
||||||
|
|
||||||
//called when src is thrown into hit_atom
|
//called when src is thrown into hit_atom
|
||||||
/atom/movable/proc/throw_impact(atom/hit_atom, var/speed)
|
/atom/movable/proc/throw_impact(atom/hit_atom, var/speed)
|
||||||
if(istype(hit_atom,/mob/living))
|
if(istype(hit_atom,/mob/living))
|
||||||
|
|||||||
@@ -78,7 +78,7 @@
|
|||||||
last_delay = current_tube.enter_delay(src, next_dir)
|
last_delay = current_tube.enter_delay(src, next_dir)
|
||||||
sleep(last_delay)
|
sleep(last_delay)
|
||||||
dir = next_dir
|
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
|
density = current_tube.density
|
||||||
|
|
||||||
if(current_tube && current_tube.should_stop_pod(src, next_dir))
|
if(current_tube && current_tube.should_stop_pod(src, next_dir))
|
||||||
|
|||||||
@@ -4,8 +4,6 @@
|
|||||||
icon_state = "0"
|
icon_state = "0"
|
||||||
dynamic_lighting = 0
|
dynamic_lighting = 0
|
||||||
luminosity = 1
|
luminosity = 1
|
||||||
|
|
||||||
plane = PLANE_SPACE_BACKGROUND
|
|
||||||
|
|
||||||
temperature = TCMB
|
temperature = TCMB
|
||||||
thermal_conductivity = OPEN_HEAT_TRANSFER_COEFFICIENT
|
thermal_conductivity = OPEN_HEAT_TRANSFER_COEFFICIENT
|
||||||
@@ -20,11 +18,6 @@
|
|||||||
|
|
||||||
if(!istype(src, /turf/space/transit))
|
if(!istype(src, /turf/space/transit))
|
||||||
icon_state = "[((x + y) ^ ~(x * y) + z) % 25]"
|
icon_state = "[((x + y) ^ ~(x * y) + z) % 25]"
|
||||||
var/image/I = image('icons/turf/space_parallax1.dmi',"[icon_state]")
|
|
||||||
I.plane = PLANE_SPACE_DUST
|
|
||||||
I.alpha = 80
|
|
||||||
I.blend_mode = BLEND_ADD
|
|
||||||
overlays += I
|
|
||||||
update_starlight()
|
update_starlight()
|
||||||
|
|
||||||
/turf/space/Destroy()
|
/turf/space/Destroy()
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
/turf/space/transit
|
/turf/space/transit
|
||||||
plane = 0
|
|
||||||
var/pushdirection // push things that get caught in the transit tile this direction
|
var/pushdirection // push things that get caught in the transit tile this direction
|
||||||
|
|
||||||
//Overwrite because we dont want people building rods in space.
|
//Overwrite because we dont want people building rods in space.
|
||||||
|
|||||||
@@ -88,16 +88,4 @@
|
|||||||
|
|
||||||
// Their chat window, sort of important.
|
// Their chat window, sort of important.
|
||||||
// See /goon/code/datums/browserOutput.dm
|
// See /goon/code/datums/browserOutput.dm
|
||||||
var/datum/chatOutput/chatOutput
|
var/datum/chatOutput/chatOutput
|
||||||
|
|
||||||
////////////
|
|
||||||
//PARALLAX//
|
|
||||||
////////////
|
|
||||||
var/updating_parallax = 0
|
|
||||||
var/list/parallax = list()
|
|
||||||
var/list/parallax_offset = list()
|
|
||||||
var/turf/previous_turf = null
|
|
||||||
var/obj/screen/plane_master/parallax_master/parallax_master = null
|
|
||||||
var/obj/screen/plane_master/parallax_dustmaster/parallax_dustmaster = null
|
|
||||||
var/obj/screen/plane_master/parallax_spacemaster/parallax_spacemaster = null
|
|
||||||
var/last_parallax_shift
|
|
||||||
@@ -93,9 +93,6 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
|||||||
var/show_ghostitem_attack = TRUE
|
var/show_ghostitem_attack = TRUE
|
||||||
var/UI_style_color = "#ffffff"
|
var/UI_style_color = "#ffffff"
|
||||||
var/UI_style_alpha = 255
|
var/UI_style_alpha = 255
|
||||||
var/space_parallax = 1
|
|
||||||
var/space_dust = 1
|
|
||||||
var/parallax_speed = 1
|
|
||||||
|
|
||||||
|
|
||||||
//character preferences
|
//character preferences
|
||||||
@@ -381,9 +378,6 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
|||||||
if(TAB_GAME) // General Preferences
|
if(TAB_GAME) // General Preferences
|
||||||
dat += "<table><tr><td width='340px' height='300px' valign='top'>"
|
dat += "<table><tr><td width='340px' height='300px' valign='top'>"
|
||||||
dat += "<h2>General Settings</h2>"
|
dat += "<h2>General Settings</h2>"
|
||||||
dat += "<b>Space Parallax:</b> <a href='?_src_=prefs;preference=parallax'><b>[space_parallax ? "Enabled" : "Disabled"]</b></a><br>"
|
|
||||||
dat += "<b>Parallax Speed:</b> <a href='?_src_=prefs;preference=p_speed'><b>[parallax_speed]</b></a><br>"
|
|
||||||
dat += "<b>Space Dust:</b> <a href='?_src_=prefs;preference=dust'><b>[space_dust ? "Yes" : "No"]</b></a><br>"
|
|
||||||
dat += "<b>Fancy NanoUI:</b> <a href='?_src_=prefs;preference=nanoui'>[(nanoui_fancy) ? "Yes" : "No"]</a><br>"
|
dat += "<b>Fancy NanoUI:</b> <a href='?_src_=prefs;preference=nanoui'>[(nanoui_fancy) ? "Yes" : "No"]</a><br>"
|
||||||
dat += "<b>Ghost-Item Attack Animation:</b> <a href='?_src_=prefs;preference=ghost_att_anim'>[(show_ghostitem_attack) ? "Yes" : "No"]</a><br>"
|
dat += "<b>Ghost-Item Attack Animation:</b> <a href='?_src_=prefs;preference=ghost_att_anim'>[(show_ghostitem_attack) ? "Yes" : "No"]</a><br>"
|
||||||
dat += "<b>Custom UI settings:</b><br>"
|
dat += "<b>Custom UI settings:</b><br>"
|
||||||
@@ -1761,21 +1755,6 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
|||||||
var/mob/living/carbon/human/H = usr
|
var/mob/living/carbon/human/H = usr
|
||||||
H.remake_hud()
|
H.remake_hud()
|
||||||
|
|
||||||
if("parallax")
|
|
||||||
space_parallax = !space_parallax
|
|
||||||
|
|
||||||
if(usr && usr.hud_used)
|
|
||||||
usr.hud_used.update_parallax_and_dust()
|
|
||||||
|
|
||||||
if("dust")
|
|
||||||
space_dust = !space_dust
|
|
||||||
|
|
||||||
if(usr && usr.hud_used)
|
|
||||||
usr.hud_used.update_parallax_and_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("be_special")
|
if("be_special")
|
||||||
var/r = href_list["role"]
|
var/r = href_list["role"]
|
||||||
if(!(r in special_roles))
|
if(!(r in special_roles))
|
||||||
@@ -2038,4 +2017,4 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
|||||||
popup.open(0)
|
popup.open(0)
|
||||||
|
|
||||||
/datum/preferences/proc/close_load_dialog(mob/user)
|
/datum/preferences/proc/close_load_dialog(mob/user)
|
||||||
user << browse(null, "window=saves")
|
user << browse(null, "window=saves")
|
||||||
@@ -13,10 +13,7 @@
|
|||||||
volume,
|
volume,
|
||||||
nanoui_fancy,
|
nanoui_fancy,
|
||||||
show_ghostitem_attack,
|
show_ghostitem_attack,
|
||||||
lastchangelog,
|
lastchangelog
|
||||||
space_parallax,
|
|
||||||
space_dust,
|
|
||||||
parallax_speed
|
|
||||||
FROM [format_table_name("player")]
|
FROM [format_table_name("player")]
|
||||||
WHERE ckey='[C.ckey]'"}
|
WHERE ckey='[C.ckey]'"}
|
||||||
)
|
)
|
||||||
@@ -43,9 +40,6 @@
|
|||||||
nanoui_fancy = text2num(query.item[11])
|
nanoui_fancy = text2num(query.item[11])
|
||||||
show_ghostitem_attack = text2num(query.item[12])
|
show_ghostitem_attack = text2num(query.item[12])
|
||||||
lastchangelog = query.item[13]
|
lastchangelog = query.item[13]
|
||||||
space_parallax = text2num(query.item[14])
|
|
||||||
space_dust = text2num(query.item[15])
|
|
||||||
parallax_speed = text2num(query.item[16])
|
|
||||||
|
|
||||||
//Sanitize
|
//Sanitize
|
||||||
ooccolor = sanitize_hexcolor(ooccolor, initial(ooccolor))
|
ooccolor = sanitize_hexcolor(ooccolor, initial(ooccolor))
|
||||||
@@ -60,9 +54,6 @@
|
|||||||
nanoui_fancy = sanitize_integer(nanoui_fancy, 0, 1, initial(nanoui_fancy))
|
nanoui_fancy = sanitize_integer(nanoui_fancy, 0, 1, initial(nanoui_fancy))
|
||||||
show_ghostitem_attack = sanitize_integer(show_ghostitem_attack, 0, 1, initial(show_ghostitem_attack))
|
show_ghostitem_attack = sanitize_integer(show_ghostitem_attack, 0, 1, initial(show_ghostitem_attack))
|
||||||
lastchangelog = sanitize_text(lastchangelog, initial(lastchangelog))
|
lastchangelog = sanitize_text(lastchangelog, initial(lastchangelog))
|
||||||
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
|
return 1
|
||||||
|
|
||||||
/datum/preferences/proc/save_preferences(client/C)
|
/datum/preferences/proc/save_preferences(client/C)
|
||||||
@@ -87,10 +78,7 @@
|
|||||||
volume='[volume]',
|
volume='[volume]',
|
||||||
nanoui_fancy='[nanoui_fancy]',
|
nanoui_fancy='[nanoui_fancy]',
|
||||||
show_ghostitem_attack='[show_ghostitem_attack]',
|
show_ghostitem_attack='[show_ghostitem_attack]',
|
||||||
lastchangelog='[lastchangelog]',
|
lastchangelog='[lastchangelog]'
|
||||||
space_parallax='[space_parallax]',
|
|
||||||
space_dust='[space_dust]',
|
|
||||||
parallax_speed='[parallax_speed]'
|
|
||||||
WHERE ckey='[C.ckey]'"}
|
WHERE ckey='[C.ckey]'"}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -213,45 +213,4 @@
|
|||||||
set category = "Preferences"
|
set category = "Preferences"
|
||||||
set desc = "Allows you to access the Setup Character screen. Changes to your character won't take effect until next round, but other changes will."
|
set desc = "Allows you to access the Setup Character screen. Changes to your character won't take effect until next round, but other changes will."
|
||||||
prefs.current_tab = 1
|
prefs.current_tab = 1
|
||||||
prefs.ShowChoices(usr)
|
prefs.ShowChoices(usr)
|
||||||
|
|
||||||
/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(src)
|
|
||||||
|
|
||||||
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(src)
|
|
||||||
|
|
||||||
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(src)
|
|
||||||
|
Before Width: | Height: | Size: 1.5 MiB |
|
Before Width: | Height: | Size: 197 KiB After Width: | Height: | Size: 197 KiB |
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 508 B |
|
Before Width: | Height: | Size: 715 B |
|
Before Width: | Height: | Size: 2.1 KiB |
@@ -111,7 +111,6 @@
|
|||||||
#include "code\_onclick\hud\monkey.dm"
|
#include "code\_onclick\hud\monkey.dm"
|
||||||
#include "code\_onclick\hud\movable_screen_objects.dm"
|
#include "code\_onclick\hud\movable_screen_objects.dm"
|
||||||
#include "code\_onclick\hud\other_mobs.dm"
|
#include "code\_onclick\hud\other_mobs.dm"
|
||||||
#include "code\_onclick\hud\parallax.dm"
|
|
||||||
#include "code\_onclick\hud\robot.dm"
|
#include "code\_onclick\hud\robot.dm"
|
||||||
#include "code\_onclick\hud\screen_objects.dm"
|
#include "code\_onclick\hud\screen_objects.dm"
|
||||||
#include "code\_onclick\hud\swarmer.dm"
|
#include "code\_onclick\hud\swarmer.dm"
|
||||||
|
|||||||