Merge branch 'ambientocclusion' of https://github.com/Markolie/Paradise into lighting

This commit is contained in:
Mark van Alphen
2019-04-22 18:52:55 +02:00
68 changed files with 310 additions and 123 deletions
+14 -4
View File
@@ -333,6 +333,8 @@
if(!prefs)
prefs = new /datum/preferences(src)
preferences_datums[ckey] = prefs
else
prefs.parent = src
prefs.last_ip = address //these are gonna be used for banning
prefs.last_id = computer_id //these are gonna be used for banning
if(world.byond_version >= 511 && byond_version >= 511 && prefs.clientfps)
@@ -393,10 +395,8 @@
if(establish_db_connection())
to_chat(src,"<span class='notice'>You have enabled karma gains.")
if(!void)
void = new()
screen += void
generate_clickcatcher()
apply_clickcatcher()
if(!winexists(src, "asset_cache_browser")) // The client is using a custom skin, tell them.
to_chat(src, "<span class='warning'>Unable to access asset cache browser, if you are using a custom skin file, please allow DS to download the updated version, if you are not, then make a bug report. This is not a critical issue but can cause issues with resource downloading, as it is impossible to know when extra resources arrived to you.</span>")
@@ -772,3 +772,13 @@
winset(src, "rpane.changelog", "background-color=#40628a;text-color=#FFFFFF")
else
winset(src, "rpane.changelog", "background-color=none;text-color=#000000")
/client/proc/generate_clickcatcher()
if(!void)
void = new()
screen += void
/client/proc/apply_clickcatcher()
generate_clickcatcher()
var/list/actualview = getviewsize(view)
void.UpdateGreed(actualview[1],actualview[2])
+10 -17
View File
@@ -183,7 +183,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
// 0 = character settings, 1 = game preferences
var/current_tab = TAB_CHAR
// OOC Metadata:
// OOC Metadata:
var/metadata = ""
var/slot_name = ""
@@ -452,6 +452,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
dat += "<b>Donator Publicity:</b> <a href='?_src_=prefs;preference=donor_public'><b>[(toggles & DONATOR_PUBLIC) ? "Public" : "Hidden"]</b></a><br>"
dat += "<b>Fancy NanoUI:</b> <a href='?_src_=prefs;preference=nanoui'>[(nanoui_fancy) ? "Yes" : "No"]</a><br>"
dat += "<b>FPS:</b> <a href='?_src_=prefs;preference=clientfps;task=input'>[clientfps]</a><br>"
dat += "<b>Ambient Occlusion:</b> <a href='?_src_=prefs;preference=ambientocclusion'><b>[toggles & AMBIENT_OCCLUSION ? "Enabled" : "Disabled"]</b></a><br>"
dat += "<b>Ghost Ears:</b> <a href='?_src_=prefs;preference=ghost_ears'><b>[(toggles & CHAT_GHOSTEARS) ? "All Speech" : "Nearest Creatures"]</b></a><br>"
dat += "<b>Ghost Sight:</b> <a href='?_src_=prefs;preference=ghost_sight'><b>[(toggles & CHAT_GHOSTSIGHT) ? "All Emotes" : "Nearest Creatures"]</b></a><br>"
dat += "<b>Ghost Radio:</b> <a href='?_src_=prefs;preference=ghost_radio'><b>[(toggles & CHAT_GHOSTRADIO) ? "All Chatter" : "Nearest Speakers"]</b></a><br>"
@@ -1921,22 +1922,6 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
if(world.byond_version >= 511 && user.client && user.client.byond_version >= 511)
parent.fps = clientfps
/*
if("skin_style")
var/skin_style_name = input(user, "Select a new skin style") as null|anything in list("default1", "default2", "default3")
if(!skin_style_name) return
*/
/* if("spawnpoint")
var/list/spawnkeys = list()
for(var/S in spawntypes)
spawnkeys += S
var/choice = input(user, "Where would you like to spawn when latejoining?") as null|anything in spawnkeys
if(!choice || !spawntypes[choice])
spawnpoint = "Arrivals Shuttle"
return
spawnpoint = choice */
else
switch(href_list["preference"])
if("publicity")
@@ -2081,6 +2066,14 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
if(href_list["tab"])
current_tab = text2num(href_list["tab"])
if("ambientocclusion")
toggles ^= AMBIENT_OCCLUSION
if(parent && parent.screen && parent.screen.len)
var/obj/screen/plane_master/game_world/PM = locate(/obj/screen/plane_master/game_world) in parent.screen
PM.filters -= FILTER_AMBIENT_OCCLUSION
if(toggles & AMBIENT_OCCLUSION)
PM.filters += FILTER_AMBIENT_OCCLUSION
ShowChoices(user)
return 1
@@ -18,7 +18,7 @@
ghost_anonsay,
exp,
clientfps,
atklog
atklog,
FROM [format_table_name("player")]
WHERE ckey='[C.ckey]'"}
)
@@ -55,7 +55,7 @@
ooccolor = sanitize_hexcolor(ooccolor, initial(ooccolor))
UI_style = sanitize_inlist(UI_style, list("White", "Midnight"), initial(UI_style))
default_slot = sanitize_integer(default_slot, 1, max_save_slots, initial(default_slot))
toggles = sanitize_integer(toggles, 0, 2097151, initial(toggles))
toggles = sanitize_integer(toggles, 0, TOGGLES_TOTAL, initial(toggles))
sound = sanitize_integer(sound, 0, 65535, initial(sound))
UI_style_color = sanitize_hexcolor(UI_style_color, initial(UI_style_color))
UI_style_alpha = sanitize_integer(UI_style_alpha, 0, 255, initial(UI_style_alpha))
@@ -230,7 +230,6 @@
to_chat(usr, "<span class='notice'>You have disabled karma gains.")
else
to_chat(usr, "<span class='notice'>You have enabled karma gains.")
return
/client/verb/toggle_popup_limiter()
set name = "Toggle Text Popup Limiter"
@@ -242,4 +241,4 @@
to_chat(usr, "<span class='notice'>You have enabled text popup limiting.")
else
to_chat(usr, "<span class='notice'>You have disabled text popup limiting.")
return
+2 -1
View File
@@ -58,7 +58,8 @@
blueeffect.screen_loc = "WEST,SOUTH to EAST,NORTH"
blueeffect.icon = 'icons/effects/effects.dmi'
blueeffect.icon_state = "shieldsparkles"
blueeffect.layer = 17
blueeffect.layer = FLASH_LAYER
blueeffect.plane = FULLSCREEN_PLANE
blueeffect.mouse_opacity = MOUSE_OPACITY_TRANSPARENT
M.client.screen += blueeffect
sleep(20)
+4 -4
View File
@@ -38,8 +38,8 @@
if(!l_hand && has_left_hand())
W.forceMove(src) //TODO: move to equipped?
l_hand = W
W.layer = 20 //TODO: move to equipped?
W.plane = HUD_PLANE //TODO: move to equipped?
W.layer = ABOVE_HUD_LAYER //TODO: move to equipped?
W.plane = ABOVE_HUD_PLANE //TODO: move to equipped?
W.equipped(src,slot_l_hand)
if(pulling == W)
stop_pulling()
@@ -54,8 +54,8 @@
if(!r_hand && has_right_hand())
W.forceMove(src)
r_hand = W
W.layer = 20
W.plane = HUD_PLANE
W.layer = ABOVE_HUD_LAYER
W.plane = ABOVE_HUD_PLANE
W.equipped(src,slot_r_hand)
if(pulling == W)
stop_pulling()
@@ -202,8 +202,8 @@
W.screen_loc = null
W.loc = src
W.equipped(src, slot)
W.layer = 20
W.plane = HUD_PLANE
W.layer = ABOVE_HUD_LAYER
W.plane = ABOVE_HUD_PLANE
switch(slot)
if(slot_back)
@@ -248,8 +248,8 @@
var/obj/item/clothing/ears/offear/O = new(W)
O.loc = src
r_ear = O
O.layer = 20
O.plane = HUD_PLANE
O.layer = ABOVE_HUD_LAYER
O.plane = ABOVE_HUD_PLANE
update_inv_ears(redraw_mob)
if(slot_r_ear)
r_ear = W
@@ -257,8 +257,8 @@
var/obj/item/clothing/ears/offear/O = new(W)
O.loc = src
l_ear = O
O.layer = 20
O.plane = HUD_PLANE
O.layer = ABOVE_HUD_LAYER
O.plane = ABOVE_HUD_PLANE
update_inv_ears(redraw_mob)
if(slot_glasses)
glasses = W
@@ -55,24 +55,24 @@
if(!module_state_1)
O.mouse_opacity = initial(O.mouse_opacity)
module_state_1 = O
O.layer = 20
O.plane = HUD_PLANE
O.layer = ABOVE_HUD_LAYER
O.plane = ABOVE_HUD_PLANE
O.screen_loc = inv1.screen_loc
contents += O
set_actions(O)
else if(!module_state_2)
O.mouse_opacity = initial(O.mouse_opacity)
module_state_2 = O
O.layer = 20
O.plane = HUD_PLANE
O.layer = ABOVE_HUD_LAYER
O.plane = ABOVE_HUD_PLANE
O.screen_loc = inv2.screen_loc
contents += O
set_actions(O)
else if(!module_state_3)
O.mouse_opacity = initial(O.mouse_opacity)
module_state_3 = O
O.layer = 20
O.plane = HUD_PLANE
O.layer = ABOVE_HUD_LAYER
O.plane = ABOVE_HUD_PLANE
O.screen_loc = inv3.screen_loc
contents += O
set_actions(O)
@@ -114,7 +114,9 @@ var/list/robot_verbs_default = list(
robot_modules_background = new()
robot_modules_background.icon_state = "block"
robot_modules_background.layer = 19 //Objects that appear on screen are on layer 20, UI should be just below it.
robot_modules_background.layer = HUD_LAYER //Objects that appear on screen are on layer 20, UI should be just below it.
robot_modules_background.plane = HUD_PLANE
ident = rand(1, 999)
rename_character(null, get_default_name())
update_icons()
@@ -534,8 +534,8 @@
W.forceMove(src)
W.equipped(src, slot)
W.layer = 20
W.plane = HUD_PLANE
W.layer = ABOVE_HUD_LAYER
W.plane = ABOVE_HUD_PLANE
switch(slot)
if(slot_collar)
+4 -4
View File
@@ -334,15 +334,15 @@
else if(h_user.l_store == src)
h_user.unEquip(src)
B.loc = h_user
B.layer = 20
B.plane = HUD_PLANE
B.layer = ABOVE_HUD_LAYER
B.plane = ABOVE_HUD_PLANE
h_user.l_store = B
h_user.update_inv_pockets()
else if(h_user.r_store == src)
h_user.unEquip(src)
B.loc = h_user
B.layer = 20
B.plane = HUD_PLANE
B.layer = ABOVE_HUD_LAYER
B.plane = ABOVE_HUD_PLANE
h_user.r_store = B
h_user.update_inv_pockets()
else if(h_user.head == src)
@@ -604,6 +604,32 @@
M.emote("laugh")
return list(effect, update_flags)
/datum/reagent/rotatium //Rotatium. Fucks up your rotation and is hilarious
name = "Rotatium"
id = "rotatium"
description = "A constantly swirling, oddly colourful fluid. Causes the consumer's sense of direction and hand-eye coordination to become wild."
reagent_state = LIQUID
color = "#AC88CA" //RGB: 172, 136, 202
metabolization_rate = 0.6 * REAGENTS_METABOLISM
taste_message = "spinning"
/datum/reagent/rotatium/on_mob_life(mob/living/carbon/M)
if(M.hud_used)
if(current_cycle >= 20 && current_cycle % 20 == 0)
var/list/screens = list(M.hud_used.plane_masters["[FLOOR_PLANE]"], M.hud_used.plane_masters["[GAME_PLANE]"])
var/rotation = min(round(current_cycle / 20), 89) // By this point the player is probably puking and quitting anyway
for(var/whole_screen in screens)
animate(whole_screen, transform = matrix(rotation, MATRIX_ROTATE), time = 5, easing = QUAD_EASING, loop = -1)
animate(transform = matrix(-rotation, MATRIX_ROTATE), time = 5, easing = QUAD_EASING)
return ..()
/datum/reagent/rotatium/on_mob_delete(mob/living/M)
if(M && M.hud_used)
var/list/screens = list(M.hud_used.plane_masters["[FLOOR_PLANE]"], M.hud_used.plane_masters["[GAME_PLANE]"])
for(var/whole_screen in screens)
animate(whole_screen, transform = matrix(), time = 5, easing = QUAD_EASING)
..()
//////////////////////////////
// Synth-Drugs //
//////////////////////////////
+1 -1
View File
@@ -680,7 +680,7 @@
dir = 0 // dir will contain dominant direction for junction pipes
var/health = 10 // health points 0-10
armor = list("melee" = 25, "bullet" = 10, "laser" = 10, "energy" = 100, "bomb" = 0, "bio" = 100, "rad" = 100)
layer = 2.3 // slightly lower than wires and other pipes
layer = DISPOSAL_PIPE_LAYER // slightly lower than wires and other pipes
var/base_icon_state // initial icon state on map
// new pipe, set the icon_state as on map