Skip to content

Commit

Permalink
TGS Test Merge (#8114)
Browse files Browse the repository at this point in the history
  • Loading branch information
cm13-github committed Feb 9, 2025
2 parents cff3b2a + 94931c3 commit 95ef661
Show file tree
Hide file tree
Showing 68 changed files with 238,985 additions and 67 deletions.
3 changes: 2 additions & 1 deletion .github/maps_to_ignore.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
chinook
corsat
ice_colony_v2
prison_station_fop
prison_station_fop
biggerred
1 change: 1 addition & 0 deletions code/__DEFINES/__game.dm
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#define MAP_LV759_HYBRISA_PROSPERA "LV-759 Hybrisa Prospera" // Highpop Only
#define MAP_NEW_VARADERO "New Varadero"//ice colony underground but as its own map
#define MAP_CHINOOK "Chinook 91 GSO" //admin level
#define MAP_BIGGER_RED "Solaris Ridge (Multiz)"

#define GAMEMODE_WHISKEY_OUTPOST "Whiskey Outpost"
#define GAMEMODE_HIVE_WARS "Hive Wars"
Expand Down
2 changes: 1 addition & 1 deletion code/__DEFINES/_math.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Use in favor of `A.loc` or `src.loc` so that things work correctly when
* stored inside an inventory, locker, or other container.
*/
#define get_turf(A) get_step(A, 0)
#define get_turf(A) (get_step(A, 0))

#define CARDINAL_DIRS list(1,2,4,8)
#define CARDINAL_ALL_DIRS list(1,2,4,5,6,8,9,10)
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/equipment.dm
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@
#define QUICK_DRAWABLE (1<<20)
// If object should utilize icon state indexes for map colors (s_ d_ etc) in select_gamemode_skin
#define MAP_COLOR_INDEX (1<<21)
/// If an object will fall through open space, use this when dashing \ jumping for example
#define NO_ZFALL (1<<22)

//==========================================================================================

Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/keybinding.dm
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@
#define COMSIG_KB_MOB_TARGETNEXT_DOWN "keybinding_mob_targetnext_down"
#define COMSIG_KB_MOB_TARGETPREV_DOWN "keybinding_mob_targetprev_down"
#define COMSIG_KB_MOB_BLOCKMOVEMENT_DOWN "keybinding_mob_blockmovement_down"
#define COMSIG_KB_MOB_LOOK_UP "keybinding_mob_look_up"

//Robot
#define COMSIG_KB_SILICON_TOGGLEMODULEONE_DOWN "keybinding_silicon_togglemoduleone_down"
Expand Down
4 changes: 4 additions & 0 deletions code/__DEFINES/layers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,10 @@
/// NEVER HAVE ANYTHING BELOW THIS PLANE ADJUST IF YOU NEED MORE SPACE
#define LOWEST_EVER_PLANE -200

#define OPEN_SPACE_PLANE -9

#define OPENSPACE_BACKDROP_PLANE -8

/// Floor plane, self explanatory. Used for Ambient Occlusion filter
#define FLOOR_PLANE -7
/// Game Plane, where most of the game objects reside
Expand Down
2 changes: 1 addition & 1 deletion code/__DEFINES/subsystems.dm
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
* call LateInitialize at the end of all atom Initalization
*
* The item will be added to the late_loaders list, this is iterated over after
* initalization of subsystems is complete and calls LateInitalize on the atom
* initalization of subsystems is complete and calls LateInitialize on the atom
* see [this file for the LateIntialize proc](atom.html#proc/LateInitialize)
*/
#define INITIALIZE_HINT_LATELOAD 1
Expand Down
13 changes: 12 additions & 1 deletion code/__HELPERS/unsorted.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,18 @@
//Offuscate y for coord system
#define obfuscate_y(y) ((y) + GLOB.obfs_y)

//Offuscate z for the coord system
#define obfuscate_z(z) ((z) + GLOB.obfs_z)

//Deoffuscate x for coord system
#define deobfuscate_x(x) ((x) - GLOB.obfs_x)

//Deoffuscate y for coord system
#define deobfuscate_y(y) ((y) - GLOB.obfs_y)

//Deoffuscate z for the coord system
#define deobfuscate_z(z) ((z) - GLOB.obfs_z)

#define can_xeno_build(T) (!T.density && !(locate(/obj/structure/fence) in T) && !(locate(/obj/structure/tunnel) in T) && (locate(/obj/effect/alien/weeds) in T))

// For the purpose of a skillcheck, not having a skillset counts as being skilled in everything (!user.skills check)
Expand Down Expand Up @@ -1236,7 +1242,12 @@ GLOBAL_LIST_INIT(WALLITEMS, list(
/proc/get_line(atom/start_atom, atom/end_atom, include_start_atom = TRUE)
var/turf/start_turf = get_turf(start_atom)
var/turf/end_turf = get_turf(end_atom)
var/start_z = start_turf.z
var/start_z

if(end_atom.z > start_atom.z)
start_z = end_atom.z
else
start_z = start_atom.z

var/list/line = list()
if(include_start_atom)
Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/bitfields.dm
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ DEFINE_BITFIELD(flags_atom, list(
"HTML_USE_INITAL_ICON" = HTML_USE_INITAL_ICON,
"QUICK_DRAWABLE" = QUICK_DRAWABLE,
"MAP_COLOR_INDEX" = MAP_COLOR_INDEX,
"NO_ZFALL" = NO_ZFALL,
))

DEFINE_BITFIELD(turf_flags, list(
Expand Down
2 changes: 2 additions & 0 deletions code/_globalvars/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ GLOBAL_VAR(xeno_queue_candidate_count)
GLOBAL_VAR(obfs_x)
/// A number between -500 and 500.
GLOBAL_VAR(obfs_y)
/// A number between -10 and 10
GLOBAL_VAR(obfs_z)

/// The current amount of giant lizards that are alive.
GLOBAL_VAR_INIT(giant_lizards_alive, 0)
3 changes: 3 additions & 0 deletions code/_onclick/adjacent.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
* Passing through in this case ignores anything with the throwpass flag, such as tables, racks, and morgue trays.
*/
/turf/Adjacent(atom/neighbor, atom/target = null, list/ignore_list)
if(neighbor.z && (z != neighbor.z))
return FALSE

var/turf/T0 = get_turf(neighbor)
if(T0 == src)
return TRUE
Expand Down
22 changes: 22 additions & 0 deletions code/_onclick/hud/rendering/plane_master.dm
Original file line number Diff line number Diff line change
Expand Up @@ -196,3 +196,25 @@
plane = DISPLACEMENT_PLATE_RENDER_LAYER
render_target = DISPLACEMENT_PLATE_RENDER_TARGET
render_relay_plane = null

/atom/movable/screen/plane_master/open_space
name = "open space plane"
plane = OPEN_SPACE_PLANE

/atom/movable/screen/plane_master/open_space/Initialize()
. = ..()
add_filter("multizblur", 1, gauss_blur_filter(0.5))

/atom/movable/screen/plane_master/openspace_backdrop
name = "open space plane master"
plane = OPENSPACE_BACKDROP_PLANE
appearance_flags = PLANE_MASTER
blend_mode = BLEND_MULTIPLY
alpha = 255

/atom/movable/screen/plane_master/openspace_backdrop/Initialize()
. = ..()
filters = list()
filters += filter(type = "drop_shadow", color = "#04080FAA", size = -10)
filters += filter(type = "drop_shadow", color = "#04080FAA", size = -15)
filters += filter(type = "drop_shadow", color = "#04080FAA", size = -20)
10 changes: 10 additions & 0 deletions code/_onclick/human.dm
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,13 @@
target.update_transform(TRUE)


/mob/living/carbon/human/RangedAttack(atom/A)
. = ..()

if(.)
return

var/turf/target_turf = get_turf(get_step(src, Get_Compass_Dir(src, A)))

if(istype(target_turf, /turf/open_space))
return target_turf.attack_hand(src)
3 changes: 3 additions & 0 deletions code/_onclick/xeno.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
target = params2turf(click_parameters["screen-loc"], get_turf(src), client)
tile_attack = TRUE

if(target.z != z)
return

if(isturf(target) && tile_attack) //Attacks on turfs must be done indirectly through directional attacks or clicking own sprite.
var/turf/T = target
var/mob/living/non_xeno_target
Expand Down
42 changes: 37 additions & 5 deletions code/controllers/subsystem/minimap.dm
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,8 @@ SUBSYSTEM_DEF(minimaps)
var/allowed_flags = MINIMAP_FLAG_USCM
/// by default the ground map - this picks the first level matching the trait. if it exists
var/targeted_ztrait = ZTRAIT_GROUND
/// the current z level within the z stack
var/target_z = 1
var/atom/owner

/// tacmap holder for holding the minimap
Expand Down Expand Up @@ -749,9 +751,9 @@ SUBSYSTEM_DEF(minimaps)
/datum/tacmap/tgui_interact(mob/user, datum/tgui/ui)
if(!map_holder)
var/level = SSmapping.levels_by_trait(targeted_ztrait)
if(!level[1])
if(!level[target_z])
return
map_holder = SSminimaps.fetch_tacmap_datum(level[1], allowed_flags)
map_holder = SSminimaps.fetch_tacmap_datum(level[target_z], allowed_flags)

ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
Expand Down Expand Up @@ -780,9 +782,9 @@ SUBSYSTEM_DEF(minimaps)

if(use_live_map && !map_holder)
var/level = SSmapping.levels_by_trait(targeted_ztrait)
if(!level[1])
if(!level[target_z])
return
map_holder = SSminimaps.fetch_tacmap_datum(level[1], allowed_flags)
map_holder = SSminimaps.fetch_tacmap_datum(level[target_z], allowed_flags)

ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
Expand Down Expand Up @@ -837,6 +839,7 @@ SUBSYSTEM_DEF(minimaps)
data["mapRef"] = map_holder?.map_ref
data["canDraw"] = FALSE
data["canViewTacmap"] = TRUE
data["canChangeZ"] = FALSE
data["canViewCanvas"] = FALSE
data["isxeno"] = FALSE

Expand All @@ -845,10 +848,11 @@ SUBSYSTEM_DEF(minimaps)
/datum/tacmap/drawing/ui_static_data(mob/user)
var/list/data = list()

data["canvasCooldownDuration"] = CANVAS_COOLDOWN_TIME
data["mapRef"] = map_holder?.map_ref
data["canvasCooldownDuration"] = CANVAS_COOLDOWN_TIME
data["canDraw"] = FALSE
data["mapFallback"] = wiki_map_fallback
data["canChangeZ"] = TRUE

var/mob/living/carbon/xenomorph/xeno = user
var/is_xeno = istype(xeno)
Expand Down Expand Up @@ -954,6 +958,34 @@ SUBSYSTEM_DEF(minimaps)
if("onDraw")
updated_canvas = FALSE

if("changeZ")
var/amount = params["amount"]
var/level = SSmapping.levels_by_trait(targeted_ztrait)
if(target_z+amount < 1 || target_z+amount > length(level) || !SSmapping.same_z_map(level[target_z], level[target_z+amount]))
return

target_z += amount

if(!level[target_z])
return

if(user.client)
user.client.clear_map(map_holder.map.name)
map_holder = SSminimaps.fetch_tacmap_datum(level[target_z], allowed_flags)
resend_current_map_png(user)
if(user.client)
user.client.register_map_obj(map_holder.map)

distribute_current_map_png(faction)
last_update_time = world.time

new_current_map = get_unannounced_tacmap_data_png(faction)
old_map = get_tacmap_data_png(faction)
current_svg = get_tacmap_data_svg(faction)

ui.send_full_update(ui_static_data(user) + ui_data(user), force=TRUE, force_refresh=TRUE)


if("selectAnnouncement")
if(!drawing_allowed)
msg_admin_niche("[key_name(user)] made an unauthorized attempt to 'selectAnnouncement' the [faction] tacmap!")
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystem/sound.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +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
run_hearers |= SSquadtree.players_in_range(SQUARE(run_template.x, run_template.y, run_template.range * 2), run_template.z)
run_hearers |= run_template.get_hearers()
if(MC_TICK_CHECK)
return
while(length(run_hearers)) // Output sound to hearers
Expand Down
16 changes: 16 additions & 0 deletions code/datums/keybinding/mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@
category = CATEGORY_HUMAN
weight = WEIGHT_MOB

/datum/keybinding/mob/look_up
hotkey_keys = list("Unbound")
classic_keys = list("Unbound")
name = "look_up"
full_name = "Look Up"
description = ""
keybind_signal = COMSIG_KB_MOB_LOOK_UP

/datum/keybinding/mob/look_up/down(client/user)
. = ..()
if (.)
return
var/mob/user_mob = user.mob
user_mob.look_up()
return TRUE

/datum/keybinding/mob/stop_pulling
hotkey_keys = list("H", "Delete")
classic_keys = list("Delete")
Expand Down
2 changes: 1 addition & 1 deletion code/datums/soundOutput.dm
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
S.falloff /= 2
owner_turf = candidate
S.x = T.x - owner_turf.x
S.y = 0
S.y = T.z - owner_turf.z
S.z = T.y - owner_turf.y
S.y += T.y_s_offset
S.x += T.x_s_offset
Expand Down
5 changes: 5 additions & 0 deletions code/game/area/areas.dm
Original file line number Diff line number Diff line change
Expand Up @@ -458,3 +458,8 @@
/// From roundstart, sets a timer to make an area oviable.
/area/proc/handle_ovi_timer()
addtimer(VARSET_CALLBACK(src, unoviable_timer, FALSE), unoviable_timer)

/area/sky
name = "Sky"
icon_state = "lv-626"
flags_area = AREA_UNWEEDABLE
3 changes: 3 additions & 0 deletions code/game/atoms_movable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -350,3 +350,6 @@
set_light_range(range)
set_light_power(power)
set_light_color(color)

/atom/movable/proc/onZImpact(turf/impact_turf, height)
INVOKE_ASYNC(src, PROC_REF(SpinAnimation), 5, 2)
10 changes: 9 additions & 1 deletion code/game/objects/effects/decals/cleanable/cleanable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ GLOBAL_LIST_EMPTY(cleanable_decal_cache)

garbage = TRUE

keep_as_object = TRUE

/obj/effect/decal/cleanable/Initialize(mapload, ...)
. = ..()
if (random_icon_states && length(src.random_icon_states) > 0)
Expand Down Expand Up @@ -82,7 +84,13 @@ GLOBAL_LIST_EMPTY(cleanable_decal_cache)

/obj/effect/decal/cleanable/proc/create_overlay(overlay_icon = icon, overlay_icon_state = icon_state)
overlayed_image = image(overlay_icon, icon_state = overlay_icon_state)
overlayed_image.appearance = appearance
if(pixel_x)
overlayed_image.pixel_x = pixel_x
if(pixel_y)
overlayed_image.pixel_y = pixel_y
if(color)
overlayed_image.color = color

cleanable_turf.overlays += overlayed_image
moveToNullspace() // This obj should not be on the turf for performance

Expand Down
1 change: 1 addition & 0 deletions code/game/objects/effects/shockwave.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
plane = DISPLACEMENT_PLATE_RENDER_LAYER
pixel_x = -496
pixel_y = -496
vis_flags = 0

/obj/effect/shockwave/Initialize(mapload, radius, speed, easing_type = LINEAR_EASING, y_offset, x_offset)
. = ..()
Expand Down
6 changes: 5 additions & 1 deletion code/game/objects/items/devices/binoculars.dm
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
var/rangefinder_popup = TRUE //Whether coordinates are displayed in a separate popup window.
var/last_x = "UNKNOWN"
var/last_y = "UNKNOWN"
var/last_z = "UNKNOWN"

/// Normally used for the small green dot signifying coordinations-obtaining mode.
var/range_laser_overlay = "laser_range"
Expand All @@ -113,7 +114,7 @@

/obj/item/device/binoculars/range/get_examine_text(mob/user)
. = ..()
. += SPAN_NOTICE(FONT_SIZE_LARGE("The rangefinder reads: LONGITUDE [last_x], LATITUDE [last_y]."))
. += SPAN_NOTICE(FONT_SIZE_LARGE("The rangefinder reads: LONGITUDE [last_x], LATITUDE [last_y], HEIGHT [last_z]."))

/obj/item/device/binoculars/range/verb/toggle_rangefinder_popup()
set name = "Toggle Rangefinder Display"
Expand Down Expand Up @@ -203,6 +204,7 @@
coord = LT
last_x = obfuscate_x(coord.x)
last_y = obfuscate_y(coord.y)
last_z = obfuscate_z(coord.z)
playsound(src, 'sound/effects/binoctarget.ogg', 35)
show_coords(user)
while(coord)
Expand Down Expand Up @@ -230,6 +232,7 @@

data["xcoord"] = src.last_x
data["ycoord"] = src.last_y
data["zcoord"] = src.last_z

return data

Expand Down Expand Up @@ -360,6 +363,7 @@
coord = LT
last_x = obfuscate_x(coord.x)
last_y = obfuscate_y(coord.y)
last_z = obfuscate_z(coord.z)
show_coords(user)
playsound(src, 'sound/effects/binoctarget.ogg', 35)
while(coord)
Expand Down
Loading

0 comments on commit 95ef661

Please sign in to comment.