Skip to content

Commit

Permalink
Merge branch 'TauCetiStation:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
BasiaBelov authored May 31, 2024
2 parents b6d25ad + e6e386e commit 209a319
Show file tree
Hide file tree
Showing 121 changed files with 3,119 additions and 2,019 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- master
env:
BYOND_MAJOR: 515
BYOND_MINOR: 1619
BYOND_MINOR: 1637
SPACEMAN_DMM_VERSION: suite-1.8
jobs:
DreamChecker:
Expand Down
32 changes: 10 additions & 22 deletions code/__DEFINES/_planes_layers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,9 @@ What is the naming convention for planes or layers?
#define SINGULARITY_EFFECT_PLANE_1 -24
#define SINGULARITY_EFFECT_PLANE_2 -23
#define SINGULARITY_EFFECT_PLANE_3 -22
#define SINGULO_RENDER_TARGET_0 "*SINGULOEFFECT_RENDER_TARGET_0"
#define SINGULO_RENDER_TARGET_1 "*SINGULOEFFECT_RENDER_TARGET_1"
#define SINGULO_RENDER_TARGET_2 "*SINGULOEFFECT_RENDER_TARGET_2"
#define SINGULO_RENDER_TARGET_3 "*SINGULOEFFECT_RENDER_TARGET_3"

//ANOMALIES EFFECT
#define ANOMALY_PLANE -21
#define ANOMALY_RENDER_TARGET "*ANOM_RENDER_TARGET"
//DISPLACEMENT EFFECT
#define DISTORTION_PLANE -21

// underfloor, floor and game planes have common layout order
// in some cases object can be switched between these planes
Expand Down Expand Up @@ -137,7 +132,7 @@ What is the naming convention for planes or layers?
#define ABOVE_GAME_PLANE -1
#define SEETHROUGH_PLANE -3

#define BLACKNESS_PLANE 0
//#define BLACKNESS_PLANE 0 // also default byond plane. We don't render it, don't use it

#define SINGULARITY_PLANE 10
#define SINGULARITY_LAYER 1
Expand All @@ -146,26 +141,22 @@ What is the naming convention for planes or layers?
#define AREA_PLANE 60

#define GHOST_ILLUSION_PLANE 79
#define GHOST_ILLUSION_RENDER_TARGET "*GHOST_ILLUSION_RENDER_TARGET"

#define GHOST_PLANE 80
#define POINT_PLANE 90

//---------- -----LIGHTING -------------
#define LIGHTING_PLANE 100

#define LIGHTING_EXPOSURE_PLANE 102 // Light sources "cones"
#define LIGHTING_LAMPS_SELFGLOW 103 // Light sources glow (lamps, doors overlay, etc.)
#define LIGHTING_LAMPS_PLANE 104 // Light sources themselves (lamps, screens, etc.)
#define LIGHTING_LAMPS_GLARE 105 // Light glare (optional setting)
#define DYNAMIC_LIGHTING_PLANE 101 // light objects

#define LIGHTING_LAMPS_RENDER_TARGET "*LIGHTING_LAMPS_RENDER_TARGET"
#define DYNAMIC_LIGHTING_RENDER_TARGET "*DYNAMIC_LIGHTING_RENDER_TARGET"
#define ENVIRONMENT_LIGHTING_PLANE 105
#define ENVIRONMENT_LIGHTING_LOCAL_PLANE 106

#define ENVIRONMENT_LIGHTING_PLANE 110
#define ENVIRONMENT_LIGHTING_COLOR_PLANE 111
#define ENVIRONMENT_LIGHTING_LOCAL_PLANE 112
#define DYNAMIC_LIGHTING_PLANE 115 // light objects
#define LIGHTING_EXPOSURE_PLANE 110 // Light sources "cones"
#define LIGHTING_LAMPS_SELFGLOW 111 // Light sources glow (lamps, doors overlay, etc.)
#define LIGHTING_LAMPS_PLANE 112 // Light sources themselves (lamps, screens, etc.)
#define LIGHTING_LAMPS_GLARE 113 // Light glare (optional setting)

#define ABOVE_LIGHTING_PLANE 120
#define ABOVE_LIGHTING_LAYER 1
Expand Down Expand Up @@ -197,9 +188,6 @@ What is the naming convention for planes or layers?
///Plane of the "splash" icon used that shows on the lobby screen. Nothing should ever be above this.
#define SPLASHSCREEN_PLANE 9999

///Plane master controller keys
#define PLANE_MASTERS_GAME "plane_masters_game"

//--------------------MISC-----------------------
//modifiers for /obj/machinery/door (and subtypes) layers
#define DOOR_CLOSED_MOD 0.3 // how much the layer is increased when the door is closed
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/dcs/signals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,8 @@
#define COMSIG_ACCESS_ALLOWED 1
///from base of /mob/proc/update_z: (new_z)
#define COMSIG_MOB_Z_CHANGED "mob_z_changed"
///from base of /mob/proc/set_lighting_alpha(): (value)
#define COMSIG_MOB_LIGHTING_ALPHA_CHANGED "LIGHTING_ALPHA_CHANGED"

// living signals
///from base of mob/living/rejuvenate(): ()
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
// gets final path from /obj/random, ignores item spawn nothing chance
#define PATH_OR_RANDOM_PATH(path) (ispath(path, /obj/random) ? random2path(path) : path)

#define PM_RENDER_NAME(path) "*[path]: render name"

//number of deciseconds in a day
#define MIDNIGHT_ROLLOVER 864000

Expand Down
21 changes: 12 additions & 9 deletions code/__DEFINES/skills.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,23 @@
#define SKILL_SURGERY "Surgery"
#define SKILL_COMMAND "Command"

#define SKILL_TASK_TRIVIAL 10
#define SKILL_TASK_VERY_EASY 20
#define SKILL_TASK_EASY 30
#define SKILL_TASK_AVERAGE 50
#define SKILL_TASK_TOUGH 80
#define SKILL_TASK_DIFFICULT 100
#define SKILL_TASK_CHALLENGING 150
#define SKILL_TASK_FORMIDABLE 200
#define HELP_OTHER_TIME 200
// base task time, not mandatory but helps to keep tasks difficulty consistent
// usually final time will be modified by task and user skills
#define SKILL_TASK_TRIVIAL 1 SECONDS
#define SKILL_TASK_VERY_EASY 2 SECONDS
#define SKILL_TASK_EASY 3 SECONDS
#define SKILL_TASK_AVERAGE 5 SECONDS
#define SKILL_TASK_TOUGH 8 SECONDS
#define SKILL_TASK_DIFFICULT 10 SECONDS
#define SKILL_TASK_CHALLENGING 15 SECONDS
#define SKILL_TASK_FORMIDABLE 20 SECONDS
#define HELP_OTHER_TIME 20 SECONDS

#define SKILL_LEVEL_MIN 0
#define SKILL_LEVEL_HUMAN_MAX 4
#define SKILL_LEVEL_MAX 5

// all skill levels, based on skill can be named differently depending on custom_ranks
#define SKILL_LEVEL_NONE 0
#define SKILL_LEVEL_NOVICE 1
#define SKILL_LEVEL_TRAINED 2
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@
#define TRAIT_XENO_FUR "xeno_fur"
// Trait from being under the floor in some manner
#define TRAIT_UNDERFLOOR "underfloor"
#define TRAIT_CONDUCT "conduct"

// trait sources
#define EYE_DAMAGE_TRAIT "eye_damage"
Expand Down
10 changes: 5 additions & 5 deletions code/__HELPERS/global_lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
//////////////////////////

/proc/make_datum_references_lists()
global.default_plane_masters = init_paths(/atom/movable/screen/plane_master) - /atom/movable/screen/plane_master/rendering_plate

//Hair - Initialise all /datum/sprite_accessory/hair into an list indexed by hair-style name
for(var/path in subtypesof(/datum/sprite_accessory/hair))
var/datum/sprite_accessory/hair/H = new path()
Expand Down Expand Up @@ -327,11 +329,9 @@
/proc/init_paths(prototype, list/L)
if(!istype(L))
L = list()
for(var/path in typesof(prototype))
if(path == prototype)
continue
L+= path
return L
for(var/path in subtypesof(prototype))
L+= path
return L

/proc/gen_hex_by_color()
if(!hex_by_color)
Expand Down
4 changes: 2 additions & 2 deletions code/_globalvars/lists/flavor_misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ var/global/list/hairs_cache = list() // Circular doubly linked list index
var/global/list/facial_hairs_cache = list() // Circular doubly linked list indexed by name and hash. see global_lists.dm
//Underwear
var/global/list/underwear_m = list("White", "Grey", "Green", "Blue", "Black", "Mankini", "None") //Curse whoever made male/female underwear diffrent colours
var/global/list/underwear_f = list("Red", "White", "Yellow", "Blue", "Black", "Thong", "None")
var/global/list/underwear_f = list("Red", "White", "Green", "Blue", "Black", "Thong", "None")
//undershirt
var/global/list/undershirt_t = list("Black Tank top", "White Tank top", "Black shirt", "White shirt", "Love shirt", "Corgy shirt", "Brit shirt", "I love NT shirt", "Peace shirt", "Mond shirt", "Pacman shirt", "Sailor shirt", "Short sleeves white shirt", "Short sleeves purple shirt", "Short sleeves blue shirt", "Short sleeves green shirt", "Short sleeves black shirt", "Blue shirt","Red shirt","Yellow shirt","Green shirt","Blue polo","Red polo","White polo","Gray-yellow polo","Green sport shirt","Red sport shirt","Blue sport shirt", "None")
var/global/list/undershirt_t = list("Black Tank top", "White Tank top", "Black shirt", "White shirt", "Love shirt", "Corgy shirt", "Tau whale shirt", "I love NT shirt", "Beerex shirt", "Mond shirt", "Pacman shirt", "Sailor shirt", "Short sleeves white shirt", "Short sleeves purple shirt", "Short sleeves blue shirt", "Short sleeves green shirt", "Short sleeves black shirt", "Blue shirt","Red shirt","Yellow shirt","Green shirt","Blue brand shirt","Red brand shirt","Black brand shirt","Green brand shirt","Green sport shirt","Red sport shirt","Blue sport shirt", "None")
var/global/list/socks_t = list("White normal", "White normal hipster", "White short", "White knee", "White long", "Black normal", "Black short", "Black knee", "Black long", "Tights knee", "Tights long", "Tights full", "Rainbow knee", "Rainbow long", "Stripped knee", "Stripped long", "USA knee", "USA long", "Australia knee", "Australia long", "Present knee", "Present long", "None")
//Backpacks
var/global/list/backbaglist = list("Nothing", "Backpack", "Sporty Backpack", "Satchel", "Satchel Alt")
Expand Down
1 change: 1 addition & 0 deletions code/_onclick/click.dm
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@
else if(modifiers[RIGHT_CLICK])
C.cob.remove_build_overlay(C)

// todo: move to fullscreens?
/atom/movable/screen/click_catcher
icon = 'icons/hud/screen_gen.dmi'
icon_state = "click_catcher"
Expand Down
12 changes: 4 additions & 8 deletions code/_onclick/hud/action.dm
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,6 @@
if(!client)
return FALSE

sync_lighting_plane_alpha()

if(stat == DEAD)
sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS
see_in_dark = 8
Expand All @@ -267,12 +265,10 @@

return TRUE

///Set the lighting plane hud alpha to the mobs lighting_alpha var
/mob/proc/sync_lighting_plane_alpha()
if(hud_used)
var/atom/movable/screen/plane_master/lighting/L = hud_used.plane_masters["[LIGHTING_PLANE]"]
if(L)
L.alpha = lighting_alpha
/mob/proc/set_lighting_alpha(value)
if(lighting_alpha != value)
lighting_alpha = value
SEND_SIGNAL(src, COMSIG_MOB_LIGHTING_ALPHA_CHANGED, value)

/datum/hud/proc/ButtonNumberToScreenCoords(number) // TODO : Make this zero-indexed for readabilty
var/row = round((number-1)/AB_MAX_COLUMNS)
Expand Down
11 changes: 11 additions & 0 deletions code/_onclick/hud/fullscreen.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
/mob
var/list/screens = list()

// todo: need to update fullscreens for better support of outer map views
// meta-fullscreens (darkness, starlight) should not be a part of mob, but client

/mob/proc/overlay_fullscreen(category, type, severity)
var/atom/movable/screen/fullscreen/screen = screens[category]
if (!screen || screen.type != type)
Expand Down Expand Up @@ -73,12 +76,20 @@
var/severity = 0
var/atom/movable/screen/fullscreen/screen_part

/atom/movable/screen/fullscreen/proc/set_map_view(map_view)
assigned_map = map_view
screen_loc = "[map_view]:1,1"
appearance_flags |= TILE_BOUND // stops fullscreens from resizing external map views

/atom/movable/screen/fullscreen/Destroy()
QDEL_NULL(screen_part)
severity = 0
return ..()

/atom/movable/screen/fullscreen/proc/update_for_view(client_view)
if(assigned_map) // used in external map view, no need to resize
return

if (screen_loc == "CENTER-7,CENTER-7" && view != client_view)
var/list/actualview = getviewsize(client_view)
view = client_view
Expand Down
24 changes: 1 addition & 23 deletions code/_onclick/hud/hud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ var/global/list/available_ui_styles = list(

var/atom/movable/screen/movable/action_button/hide_toggle/hide_actions_toggle
var/action_buttons_hidden = 0
var/list/atom/movable/screen/plane_master/plane_masters = list() // see "appearance_flags" in the ref, assoc list of "[plane]" = object
///Assoc list of controller groups, associated with key string group name with value of the plane master controller ref
var/list/atom/movable/plane_master_controller/plane_master_controllers = list()

// subtypes can override this to force a specific UI style
var/ui_style
Expand All @@ -51,15 +48,6 @@ var/global/list/available_ui_styles = list(
// will fall back to the default if any of these are null
ui_style = ui_style2icon(mymob.client?.prefs?.UI_style)

for(var/mytype in subtypesof(/atom/movable/screen/plane_master))
var/atom/movable/screen/plane_master/instance = new mytype()
plane_masters["[instance.plane]"] = instance
instance.backdrop(mymob)

for(var/mytype in subtypesof(/atom/movable/plane_master_controller))
var/atom/movable/plane_master_controller/controller_instance = new mytype(null, src)
plane_master_controllers[controller_instance.name] = controller_instance

instantiate()

/datum/hud/Destroy()
Expand All @@ -69,8 +57,6 @@ var/global/list/available_ui_styles = list(
complex = null
hide_actions_toggle = null
mymob = null
QDEL_LIST_ASSOC_VAL(plane_masters)
QDEL_LIST_ASSOC_VAL(plane_master_controllers)
return ..()

/datum/hud/proc/hidden_inventory_update()
Expand Down Expand Up @@ -190,20 +176,12 @@ var/global/list/available_ui_styles = list(

mymob.update_action_buttons()
reorganize_alerts()
create_parallax()
plane_masters_update()
create_parallax() // todo: why we recreate parallax every time we change mob or press f12
hidden_inventory_update()
persistant_inventory_update()

hud_version = version

/datum/hud/proc/plane_masters_update()
// Plane masters are always shown to OUR mob, never to observers
for(var/thing in plane_masters)
var/atom/movable/screen/plane_master/PM = plane_masters[thing]
PM.backdrop(mymob)
mymob.client.screen += PM

//Triggered when F12 is pressed (Unless someone changed something in the DMF)
/mob/verb/button_pressed_F12()
set name = "F12"
Expand Down
Loading

0 comments on commit 209a319

Please sign in to comment.