mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 15:17:01 +01:00
[READY]Parallax (#22315)
* Ports Space Parallax from vg/yogs * KILL ME * fuck shit * fixes * rgfkbjhkefrhjkfrejhkfds * Parallax, part 2. * Gotta get these defines in before remie notices! * DAMN IT! SHE FOUND ONE! * fixes orbits * fix orbits take 2 * Fixes some things with parallax * Refactors parallax shuttle animations.
This commit is contained in:
committed by
Cheridan
parent
743ec486cb
commit
2243ab6036
@@ -262,6 +262,9 @@ var/next_external_rsc = 0
|
||||
admins -= src
|
||||
directory -= ckey
|
||||
clients -= src
|
||||
if(movingmob != null)
|
||||
movingmob.client_mobs_in_contents -= mob
|
||||
UNSETEMPTY(movingmob.client_mobs_in_contents)
|
||||
return ..()
|
||||
|
||||
/client/Destroy()
|
||||
|
||||
@@ -5,6 +5,7 @@ var/list/preferences_datums = list()
|
||||
|
||||
|
||||
/datum/preferences
|
||||
var/client/parent
|
||||
//doohickeys for savefiles
|
||||
var/path
|
||||
var/default_slot = 1 //Holder so it doesn't default to slot 1, rather the last one used
|
||||
@@ -94,7 +95,10 @@ var/list/preferences_datums = list()
|
||||
|
||||
var/clientfps = 0
|
||||
|
||||
var/parallax = PARALLAX_HIGH
|
||||
|
||||
/datum/preferences/New(client/C)
|
||||
parent = C
|
||||
custom_names["ai"] = pick(ai_names)
|
||||
custom_names["cyborg"] = pick(ai_names)
|
||||
custom_names["clown"] = pick(clown_names)
|
||||
@@ -411,9 +415,23 @@ var/list/preferences_datums = list()
|
||||
p_map = VM.friendlyname
|
||||
else
|
||||
p_map += " (No longer exists)"
|
||||
dat += "<b>Preferred Map:</b> <a href='?_src_=prefs;preference=preferred_map;task=input'>[p_map]</a>"
|
||||
dat += "<b>Preferred Map:</b> <a href='?_src_=prefs;preference=preferred_map;task=input'>[p_map]</a><br>"
|
||||
|
||||
dat += "<b>FPS:</b> <a href='?_src_=prefs;preference=clientfps;task=input'>[clientfps]</a>"
|
||||
dat += "<b>FPS:</b> <a href='?_src_=prefs;preference=clientfps;task=input'>[clientfps]</a><br>"
|
||||
|
||||
dat += "<b>Parallax (Fancy Space):</b> <a href='?_src_=prefs;preference=parallaxdown' oncontextmenu='window.location.href=\"?_src_=prefs;preference=parallaxup\";return false;'>"
|
||||
switch (parallax)
|
||||
if (PARALLAX_LOW)
|
||||
dat += "Low"
|
||||
if (PARALLAX_MED)
|
||||
dat += "Medium"
|
||||
if (PARALLAX_INSANE)
|
||||
dat += "Insane"
|
||||
if (PARALLAX_DISABLE)
|
||||
dat += "Disabled"
|
||||
else
|
||||
dat += "High"
|
||||
dat += "</a><br>"
|
||||
|
||||
dat += "</td><td width='300px' height='300px' valign='top'>"
|
||||
|
||||
@@ -1168,6 +1186,16 @@ var/list/preferences_datums = list()
|
||||
if("allow_midround_antag")
|
||||
toggles ^= MIDROUND_ANTAG
|
||||
|
||||
if("parallaxup")
|
||||
parallax = Wrap(parallax + 1, PARALLAX_INSANE, PARALLAX_DISABLE + 1)
|
||||
if (parent && parent.mob && parent.mob.hud_used)
|
||||
parent.mob.hud_used.update_parallax_pref()
|
||||
|
||||
if("parallaxdown")
|
||||
parallax = Wrap(parallax - 1, PARALLAX_INSANE, PARALLAX_DISABLE + 1)
|
||||
if (parent && parent.mob && parent.mob.hud_used)
|
||||
parent.mob.hud_used.update_parallax_pref()
|
||||
|
||||
if("save")
|
||||
save_preferences()
|
||||
save_character()
|
||||
|
||||
@@ -175,6 +175,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
S["inquisitive_ghost"] >> inquisitive_ghost
|
||||
S["uses_glasses_colour"]>> uses_glasses_colour
|
||||
S["clientfps"] >> clientfps
|
||||
S["parallax"] >> parallax
|
||||
|
||||
//try to fix any outdated data if necessary
|
||||
if(needs_update >= 0)
|
||||
@@ -191,6 +192,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
default_slot = sanitize_integer(default_slot, 1, max_save_slots, initial(default_slot))
|
||||
toggles = sanitize_integer(toggles, 0, 65535, initial(toggles))
|
||||
clientfps = sanitize_integer(clientfps, 0, 1000, 0)
|
||||
parallax = sanitize_integer(parallax, PARALLAX_INSANE, PARALLAX_DISABLE, PARALLAX_HIGH)
|
||||
ghost_form = sanitize_inlist(ghost_form, ghost_forms, initial(ghost_form))
|
||||
ghost_orbit = sanitize_inlist(ghost_orbit, ghost_orbits, initial(ghost_orbit))
|
||||
ghost_accs = sanitize_inlist(ghost_accs, ghost_accs_options, GHOST_ACCS_DEFAULT_OPTION)
|
||||
@@ -229,6 +231,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
S["inquisitive_ghost"] << inquisitive_ghost
|
||||
S["uses_glasses_colour"]<< uses_glasses_colour
|
||||
S["clientfps"] << clientfps
|
||||
S["parallax"] << parallax
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user