Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/cmss13-devs/cmss13-pve in…
Browse files Browse the repository at this point in the history
…to odolla_onslaught
  • Loading branch information
AndroBetel committed Jul 28, 2024
2 parents beee8a4 + c3742c9 commit 39bb512
Show file tree
Hide file tree
Showing 116 changed files with 1,243 additions and 558 deletions.
1 change: 1 addition & 0 deletions code/__DEFINES/atmospherics.dm
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,4 @@ var/MAX_EXPLOSION_RANGE = 14
#define VENT_GAS_SMOKE "Smoke"
#define VENT_GAS_CN20 "CN20 Nerve Gas"
#define VENT_GAS_CN20_XENO "CN20-X Nerve Gas"
#define VENT_GAS_LSD "ALD-91 LSD Gas"
3 changes: 3 additions & 0 deletions code/__DEFINES/layers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@

//#define AREA_LAYER 1

#define DISPLACEMENT_PLATE_RENDER_LAYER 1
#define DISPLACEMENT_PLATE_RENDER_TARGET "*DISPLACEMENT_PLATE_RENDER_TARGET"

#define UNDER_TURF_LAYER 1.99

#define TURF_LAYER 2
Expand Down
3 changes: 2 additions & 1 deletion code/__HELPERS/icons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -920,8 +920,9 @@ world
// From /datum/preferences/proc/copy_appearance_to
body.age = original.age
body.gender = original.gender
body.ethnicity = original.ethnicity
body.skin_color = original.skin_color
body.body_type = original.body_type
body.body_size = original.body_size

body.r_eyes = original.r_eyes
body.g_eyes = original.g_eyes
Expand Down
9 changes: 6 additions & 3 deletions code/__HELPERS/mobs.dm
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
#define isdeaf(A) (ismob(A) && ((A?:sdisabilities & DISABILITY_DEAF) || A?:ear_deaf))
#define xeno_hivenumber(A) (isxeno(A) ? A?:hivenumber : FALSE)

/proc/random_ethnicity()
return pick(GLOB.ethnicities_list)
/proc/random_skin_color()
return pick(GLOB.skin_color_list)

/proc/random_body_type()
return pick(GLOB.body_types_list)
return pick(GLOB.body_type_list)

/proc/random_body_size()
return pick(GLOB.body_size_list)

/proc/random_hair_style(gender, species = "Human")
var/h_style = "Crewcut"
Expand Down
16 changes: 11 additions & 5 deletions code/__HELPERS/sanitize_values.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,24 @@
else return default
return default

/proc/sanitize_ethnicity(ethnicity, default = "Western")
if (ethnicity in GLOB.ethnicities_list)
return ethnicity
/proc/sanitize_skin_color(skin_color, default = "Pale 2")
if(skin_color in GLOB.skin_color_list)
return skin_color

return default

/proc/sanitize_body_type(body_type, default = "Mesomorphic (Average)")
if (body_type in GLOB.body_types_list)
/proc/sanitize_body_type(body_type, default = "Lean")
if(body_type in GLOB.body_type_list)
return body_type

return default

/proc/sanitize_body_size(body_size, default = "Average")
if(body_size in GLOB.body_size_list)
return body_size

return default

/proc/sanitize_hexcolor(color, default="#000000")
if(!istext(color)) return default
var/len = length(color)
Expand Down
1 change: 0 additions & 1 deletion code/__pragmas.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#pragma SoftReservedKeyword error
#pragma DuplicateVariable error
#pragma DuplicateProcDefinition error
#pragma TooManyArguments error
#pragma PointlessParentCall error
#pragma PointlessBuiltinCall error
#pragma SuspiciousMatrixCall error
Expand Down
9 changes: 5 additions & 4 deletions code/_globalvars/global_lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,11 @@ GLOBAL_LIST_INIT(custom_event_info_list, setup_custom_event_info())
GLOBAL_LIST_INIT(poster_designs, subtypesof(/datum/poster))

//Preferences stuff
// Ethnicities
GLOBAL_REFERENCE_LIST_INDEXED(ethnicities_list, /datum/ethnicity, name) // Stores /datum/ethnicity indexed by name
// Body Types
GLOBAL_REFERENCE_LIST_INDEXED(body_types_list, /datum/body_type, name) // Stores /datum/body_type indexed by name
// Skin colors
GLOBAL_REFERENCE_LIST_INDEXED(skin_color_list, /datum/skin_color, name) // Stores /datum/skin_color indexed by name
// Body
GLOBAL_REFERENCE_LIST_INDEXED(body_type_list, /datum/body_type, name) // Stores /datum/body_type indexed by name
GLOBAL_REFERENCE_LIST_INDEXED(body_size_list, /datum/body_size, name) // Stores /datum/body_size indexed by name
//Hairstyles
GLOBAL_REFERENCE_LIST_INDEXED(hair_styles_list, /datum/sprite_accessory/hair, name) //stores /datum/sprite_accessory/hair indexed by name
GLOBAL_REFERENCE_LIST_INDEXED(facial_hair_styles_list, /datum/sprite_accessory/facial_hair, name) //stores /datum/sprite_accessory/facial_hair indexed by name
Expand Down
3 changes: 3 additions & 0 deletions code/_macros.dm
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@
#define GENERATE_DEBUG_ID "[rand(0, 9)][rand(0, 9)][rand(0, 9)][rand(0, 9)][pick(alphabet_lowercase)][pick(alphabet_lowercase)][pick(alphabet_lowercase)][pick(alphabet_lowercase)]"

#define RECT new /datum/shape/rectangle
#define SQUARE new /datum/shape/rectangle/square
#define ELLIPSE new /datum/shape/ellipse
#define CIRCLE new /datum/shape/ellipse/circle
#define QTREE new /datum/quadtree
#define SEARCH_QTREE(qtree, shape_range, flags) qtree.query_range(shape_range, null, flags)

Expand Down
7 changes: 7 additions & 0 deletions code/_onclick/hud/rendering/plane_master.dm
Original file line number Diff line number Diff line change
Expand Up @@ -175,3 +175,10 @@
plane = ESCAPE_MENU_PLANE
appearance_flags = PLANE_MASTER|NO_CLIENT_COLOR
render_relay_plane = RENDER_PLANE_MASTER

/atom/movable/screen/plane_master/displacement
name = "displacement plane"
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
plane = DISPLACEMENT_PLATE_RENDER_LAYER
render_target = DISPLACEMENT_PLATE_RENDER_TARGET
render_relay_plane = null
4 changes: 4 additions & 0 deletions code/_onclick/hud/rendering/render_plate.dm
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@
plane = RENDER_PLANE_GAME
render_relay_plane = RENDER_PLANE_MASTER

/atom/movable/screen/plane_master/rendering_plate/game_world/Initialize(mapload, datum/hud/hud_owner)
. = ..()
add_filter("displacer", 1, displacement_map_filter(render_source = DISPLACEMENT_PLATE_RENDER_TARGET, size = 10))

///render plate for OOC stuff like ghosts, hud-screen effects, etc
/atom/movable/screen/plane_master/rendering_plate/non_game
name = "non-game rendering plate"
Expand Down
3 changes: 1 addition & 2 deletions code/controllers/subsystem/sound.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ SUBSYSTEM_DEF(sound)
if(!run_hearers) // Initialize for handling next template
run_hearers = run_queue[run_template] // get base hearers
if(run_template.range) // ranging
var/datum/shape/rectangle/zone = RECT(run_template.x, run_template.y, run_template.range * 2, run_template.range * 2)
run_hearers |= SSquadtree.players_in_range(zone, run_template.z)
run_hearers |= SSquadtree.players_in_range(SQUARE(run_template.x, run_template.y, run_template.range * 2), run_template.z)
if(MC_TICK_CHECK)
return
while(length(run_hearers)) // Output sound to hearers
Expand Down
11 changes: 0 additions & 11 deletions code/controllers/subsystem/techtree.dm
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,6 @@ SUBSYSTEM_DEF(techtree)
var/datum/space_level/zpos = SSmapping.add_new_zlevel(tree.name, list(ZTRAIT_TECHTREE))
tree.zlevel = zpos

var/zlevel = zpos.z_value
var/turf/z_min = locate(1, 1, zlevel)
var/turf/z_max = locate(world.maxx, world.maxy, zlevel)



for(var/t in block(z_min, z_max))
var/turf/Tu = t
Tu.ChangeTurf(/turf/closed/void, list(/turf/closed/void))
new /area/techtree(Tu)

for(var/tier in tree.tree_tiers)
tree.unlocked_techs += tier
tree.all_techs += tier
Expand Down
52 changes: 0 additions & 52 deletions code/controllers/subsystem/ticker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,6 @@ SUBSYSTEM_DEF(ticker)
mode.declare_completion(force_ending)
REDIS_PUBLISH("byond.round", "type" = "round-complete")
flash_clients()
addtimer(CALLBACK(
SSvote,
/datum/controller/subsystem/vote/proc/initiate_vote,
"gamemode",
"SERVER",
CALLBACK(src, PROC_REF(handle_map_reboot)),
TRUE
), 3 SECONDS)
Master.SetRunLevel(RUNLEVEL_POSTGAME)

/// Attempt to start game asynchronously if applicable
Expand Down Expand Up @@ -161,16 +153,6 @@ SUBSYSTEM_DEF(ticker)
return FALSE
return TRUE

/datum/controller/subsystem/ticker/proc/handle_map_reboot()
addtimer(CALLBACK(
SSvote,
/datum/controller/subsystem/vote/proc/initiate_vote,
"groundmap",
"SERVER",
CALLBACK(src, PROC_REF(Reboot)),
TRUE
), 3 SECONDS)

/datum/controller/subsystem/ticker/proc/setup()
to_chat(world, SPAN_BOLDNOTICE("Enjoy the game!"))
var/init_start = world.timeofday
Expand Down Expand Up @@ -349,40 +331,6 @@ SUBSYSTEM_DEF(ticker)
fdel("data/mode.txt")
WRITE_FILE(file("data/mode.txt"), the_mode)


/datum/controller/subsystem/ticker/proc/Reboot(reason, delay)
set waitfor = FALSE

if(usr && !check_rights(R_SERVER))
return

if(graceful)
to_chat_forced(world, "<h3>[SPAN_BOLDNOTICE("Shutting down...")]</h3>")
world.Reboot(FALSE)
return

if(!delay)
delay = CONFIG_GET(number/round_end_countdown) * 10

var/skip_delay = check_rights()
if(delay_end && !skip_delay)
to_chat(world, SPAN_BOLDNOTICE("An admin has delayed the round end."))
return

to_chat(world, SPAN_BOLDNOTICE("Rebooting World in [DisplayTimeText(delay)]. [reason]"))

var/start_wait = world.time
sleep(delay - (world.time - start_wait))

if(delay_end && !skip_delay)
to_chat(world, SPAN_BOLDNOTICE("Reboot was cancelled by an admin."))
return

log_game("Rebooting World. [reason]")
to_chat_forced(world, "<h3>[SPAN_BOLDNOTICE("Rebooting...")]</h3>")

world.Reboot(TRUE)

/datum/controller/subsystem/ticker/proc/create_characters()
if(!RoleAuthority)
return
Expand Down
1 change: 1 addition & 0 deletions code/datums/ammo/bullet/shotgun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@

/datum/ammo/bullet/shotgun/buckshot/special
name = "buckshot shell, USCM special type"
handful_state = "special_buck"
bonus_projectiles_type = /datum/ammo/bullet/shotgun/spread/special

accurate_range = 8
Expand Down
3 changes: 3 additions & 0 deletions code/datums/autocells/explosion.dm
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,9 @@ as having entered the turf.
if(QDELETED(E))
return

if(power >= 150) //shockwave for anything over 150 power
new /obj/effect/shockwave(epicenter, power/60)

E.power = power
E.power_falloff = falloff
E.falloff_shape = falloff_shape
Expand Down
35 changes: 21 additions & 14 deletions code/datums/datacore.dm
Original file line number Diff line number Diff line change
Expand Up @@ -355,31 +355,38 @@ GLOBAL_DATUM_INIT(data_core, /datum/datacore, new)
var/icon/icobase = H.species.icobase
var/icon/temp

var/datum/ethnicity/ET = GLOB.ethnicities_list[H.ethnicity]
var/datum/body_type/B = GLOB.body_types_list[H.body_type]
var/datum/skin_color/set_skin_color = GLOB.skin_color_list[H.skin_color]
var/datum/body_type/set_body_type = GLOB.body_type_list[H.body_type]
var/datum/body_size/set_body_size = GLOB.body_size_list[H.body_size]

var/e_icon
var/b_icon
var/skin_color_icon
var/body_type_icon
var/body_size_icon

if (!ET)
e_icon = "western"
if(!set_skin_color)
skin_color_icon = "pale2"
else
e_icon = ET.icon_name
skin_color_icon = set_skin_color.icon_name

if (!B)
b_icon = "mesomorphic"
if(!set_body_type)
body_type_icon = "lean"
else
b_icon = B.icon_name
body_type_icon = set_body_type.icon_name

preview_icon = new /icon(icobase, get_limb_icon_name(H.species, b_icon, H.gender, "torso", e_icon))
temp = new /icon(icobase, get_limb_icon_name(H.species, b_icon, H.gender, "groin", e_icon))
if(!set_body_size)
body_size_icon = "avg"
else
body_size_icon = set_body_size.icon_name

preview_icon = new /icon(icobase, get_limb_icon_name(H.species, body_size_icon, body_type_icon, H.gender, "torso", skin_color_icon))
temp = new /icon(icobase, get_limb_icon_name(H.species, body_size_icon, body_type_icon, H.gender, "groin", skin_color_icon))
preview_icon.Blend(temp, ICON_OVERLAY)
temp = new /icon(icobase, get_limb_icon_name(H.species, b_icon, H.gender, "head", e_icon))
temp = new /icon(icobase, get_limb_icon_name(H.species, body_size_icon, body_type_icon, H.gender, "head", skin_color_icon))
preview_icon.Blend(temp, ICON_OVERLAY)

for(var/obj/limb/E in H.limbs)
if(E.status & LIMB_DESTROYED) continue
temp = new /icon(icobase, get_limb_icon_name(H.species, b_icon, H.gender, E.name, e_icon))
temp = new /icon(icobase, get_limb_icon_name(H.species, body_size_icon, body_type_icon, H.gender, E.name, skin_color_icon))
if(E.status & LIMB_ROBOT)
temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
preview_icon.Blend(temp, ICON_OVERLAY)
Expand Down
10 changes: 0 additions & 10 deletions code/datums/global_variables.dm
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,11 @@

/client/proc/debug_global_variable(name, value, level)
var/html = ""
var/change = 0
//to make the value bold if changed
if(!(admin_holder.rights & R_DEBUG))
return html

html += "<li style='backgroundColor:white'><a href='?_src_=glob_vars;varnameedit=[name]'>E</a><a href='?_src_=glob_vars;varnamechange=[name]'>C</a> "
if(value != initial(global.vars[name]))
html += "<font color='#B300B3'>"
change = 1

if (isnull(value))
html += "[name] = <span class='value'>null</span>"
Expand Down Expand Up @@ -175,8 +171,6 @@

else
html += "[name] = <span class='value'>[value]</span>"
if(change)
html += "</font>"

html += "</li>"

Expand Down Expand Up @@ -353,7 +347,6 @@
if(admin_holder && admin_holder.marked_datum)
possible_classes += "marked datum"
possible_classes += "edit referenced object"
possible_classes += "restore to default"

class = tgui_input_list(usr, "What kind of variable?","Variable Type", possible_classes)
if(!class)
Expand All @@ -365,9 +358,6 @@
mod_list(global.vars[variable])
return

if("restore to default")
global.vars[variable] = initial(global.vars[variable])

if("edit referenced object")
return .(global.vars[variable])

Expand Down
Loading

0 comments on commit 39bb512

Please sign in to comment.