Skip to content

Commit

Permalink
Merge branch 'PvE-CMSS13:master' into lurker-scary
Browse files Browse the repository at this point in the history
  • Loading branch information
xDanilcusx committed Oct 28, 2023
2 parents e036032 + 73297f0 commit 4a4c0f6
Show file tree
Hide file tree
Showing 103 changed files with 144,243 additions and 2,328 deletions.
3 changes: 2 additions & 1 deletion code/__DEFINES/__game.dm
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ block( \
#define MAP_LV522_CHANCES_CLAIM "LV-522 Chance's Claim" // 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_DERELICT_ALMAYER "Derelict Almayer"

#define GAMEMODE_WHISKEY_OUTPOST "Whiskey Outpost"
#define GAMEMODE_HIVE_WARS "Hive Wars"
Expand Down Expand Up @@ -154,7 +155,7 @@ block( \

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

#define TOGGLES_CHAT_DEFAULT (CHAT_OOC|CHAT_DEAD|CHAT_GHOSTEARS|CHAT_GHOSTSIGHT|CHAT_PRAYER|CHAT_RADIO|CHAT_LOOC|CHAT_GHOSTHIVEMIND)
#define TOGGLES_CHAT_DEFAULT (CHAT_OOC|CHAT_DEAD|CHAT_GHOSTRADIO|CHAT_PRAYER|CHAT_RADIO|CHAT_LOOC|CHAT_GHOSTHIVEMIND)

#define TOGGLES_GHOST_DEFAULT (GHOST_HEALTH_SCAN)

Expand Down
2 changes: 1 addition & 1 deletion code/__DEFINES/minimap.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ GLOBAL_LIST_INIT(all_minimap_flags, bitfield2list(MINIMAP_FLAG_ALL))
#define MINIMAP_AREA_CONTESTED_ZONE "#0603c4ee"

#define MINIMAP_SQUAD_UNKNOWN "#d8d8d8"
#define MINIMAP_SQUAD_ALPHA "#ed1c24"
#define MINIMAP_SQUAD_ALPHA "#4148c8"
#define MINIMAP_SQUAD_BRAVO "#fbc70e"
#define MINIMAP_SQUAD_CHARLIE "#76418a"
#define MINIMAP_SQUAD_DELTA "#0c0cae"
Expand Down
2 changes: 1 addition & 1 deletion code/__DEFINES/tgs.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// tgstation-server DMAPI

#define TGS_DMAPI_VERSION "6.6.0"
#define TGS_DMAPI_VERSION "6.6.1"

// All functions and datums outside this document are subject to change with any version and should not be relied on.

Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/xeno_ai.dm
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,5 @@ PROBABILITY CALCULATIONS ARE HERE
#define XENO_SPAWN_T2 (1<<1)
#define XENO_SPAWN_T3 (1<<2)

/// Special blockers for pathfinding or obstacle handling
#define XENO_AI_SPECIAL_BLOCKERS list(/obj/flamer_fire, /obj/vehicle/multitile)
5 changes: 1 addition & 4 deletions code/controllers/subsystem/pathfinding.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ SUBSYSTEM_DEF(xeno_pathfinding)
var/list/hash_path = list()
var/current_position = 1

/// Any special blockers we want to account for that do not normally block movement
var/list/special_blockers = list(/obj/flamer_fire)

/datum/controller/subsystem/xeno_pathfinding/stat_entry(msg)
msg = "P:[length(paths_to_calculate)]"
return ..()
Expand Down Expand Up @@ -133,7 +130,7 @@ SUBSYSTEM_DEF(xeno_pathfinding)
var/list/pass_back = list()

for(var/atom/checked_atom as anything in checking_turf)
for(var/special_block in special_blockers)
for(var/special_block in XENO_AI_SPECIAL_BLOCKERS)
if(istype(checked_atom, special_block))
pass_back += checked_atom

Expand Down
56 changes: 54 additions & 2 deletions code/datums/components/overlay_lighting.dm
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@
///Cast range for the directional cast (how far away the atom is moved)
var/cast_range = 2

var/base_offset


/datum/component/overlay_lighting/Initialize(_range, _power, _color, starts_on, is_directional)
if(!ismovable(parent))
Expand Down Expand Up @@ -191,6 +193,9 @@
return
if(directional)
cast_directional_light()
else if(length(current_holder?.locs) > 1)
handle_multitile_light()

get_new_turfs()


Expand Down Expand Up @@ -335,9 +340,9 @@
if(pixel_bounds == 32)
visible_mask.transform = null
return
var/offset = (pixel_bounds - 32) * 0.5
base_offset = (pixel_bounds - 32) * 0.5
var/matrix/transform = new
transform.Translate(-offset, -offset)
transform.Translate(-base_offset, -base_offset)
visible_mask.transform = transform
directional_offset_x = 0
directional_offset_y = 0
Expand Down Expand Up @@ -419,6 +424,8 @@
add_dynamic_lumi(current_holder)
if(directional)
cast_directional_light()
else if(length(current_holder?.locs) > 1)
handle_multitile_light()
if(current_holder && current_holder != parent && current_holder != parent_attached_to)
RegisterSignal(current_holder, COMSIG_MOVABLE_MOVED, PROC_REF(on_holder_moved))
get_new_turfs()
Expand Down Expand Up @@ -462,6 +469,7 @@
scanning = next_turf

current_holder.underlays -= visible_mask
current_holder.underlays -= cone

var/translate_x = -((range - 1) * 32)
var/translate_y = translate_x
Expand All @@ -474,14 +482,58 @@
translate_x += 32 * final_distance
if(WEST)
translate_x += -32 * final_distance

var/multitile_light = length(current_holder?.locs) > 1
var/multitile_translate_x = 0
var/multitile_translate_y = 0

if(multitile_light)
switch(current_direction)
if(NORTH)
multitile_translate_x += current_holder.bound_width * 0.5
multitile_translate_y += current_holder.bound_height
if(SOUTH)
multitile_translate_x += current_holder.bound_width * 0.5
if(EAST)
multitile_translate_x += current_holder.bound_width
multitile_translate_y += current_holder.bound_height * 0.5
if(WEST)
multitile_translate_y += current_holder.bound_height * 0.5

translate_x += multitile_translate_x
translate_y += multitile_translate_y

if((directional_offset_x != translate_x) || (directional_offset_y != translate_y))
directional_offset_x = translate_x
directional_offset_y = translate_y
var/matrix/transform = matrix()
transform.Translate(translate_x, translate_y)
visible_mask.transform = transform
if(multitile_light)
var/matrix/cone_transform = matrix()
cone_transform.Translate(multitile_translate_x - 32, multitile_translate_y - 32)
cone.transform = cone_transform
if(overlay_lighting_flags & LIGHTING_ON)
current_holder.underlays += visible_mask
current_holder.underlays += cone

/datum/component/overlay_lighting/proc/handle_multitile_light()
var/multitile_translate_x = 0
var/multitile_translate_y = 0
switch(current_holder.dir)
if(NORTH, SOUTH)
multitile_translate_x = current_holder.bound_width * 0.5
multitile_translate_y = current_holder.bound_height * 0.5
if(EAST, WEST)
multitile_translate_x = current_holder.bound_height * 0.5
multitile_translate_y = current_holder.bound_width * 0.5
if(current_holder && overlay_lighting_flags & LIGHTING_ON)
current_holder.underlays -= visible_mask
var/matrix/transform = new
transform.Translate(multitile_translate_x - base_offset, multitile_translate_y - base_offset)
visible_mask.transform = transform
if(current_holder && overlay_lighting_flags & LIGHTING_ON)
current_holder.underlays += visible_mask

///Called when current_holder changes loc.
/datum/component/overlay_lighting/proc/on_holder_dir_change(atom/movable/source, olddir, newdir)
Expand Down
19 changes: 13 additions & 6 deletions code/datums/components/phone.dm
Original file line number Diff line number Diff line change
Expand Up @@ -369,13 +369,12 @@ GLOBAL_LIST_EMPTY_TYPED(phones, /datum/component/phone)

log_say("TELEPHONE: [key_name(speaker)] on Phone '[phone_id]' to '[calling_phone.phone_id]' said '[message]'")

var/comm_paygrade = ""

if (ishuman(speaker))
var/mob/living/carbon/human/human_speaker = speaker
comm_paygrade = human_speaker.get_paygrade()
var/comm_paygrade = speaker.get_paygrade()

for(var/mob/dead/observer/cycled_observer in GLOB.player_list)
if(cycled_observer == get_user() || cycled_observer == calling_phone.get_user())
continue

if((cycled_observer.client) && (cycled_observer.client.prefs) && (cycled_observer.client.prefs.toggles_chat & CHAT_GHOSTRADIO))
var/ghost_message = "<span class='purple'><span class='name'>[comm_paygrade][speaker] (<a href='byond://?src=\ref[cycled_observer];track=\ref[speaker]'>F</a>)</span> on '[phone_id]' to '[calling_phone.phone_id]': <span class='body'>\"[message]\"</span></span>"
cycled_observer.show_message(ghost_message, SHOW_MESSAGE_AUDIBLE)
Expand Down Expand Up @@ -418,7 +417,9 @@ GLOBAL_LIST_EMPTY_TYPED(phones, /datum/component/phone)
return FALSE
return TRUE


/// Returns a mob that is using the phone or null if unable to find a user
/datum/component/phone/proc/get_user()
return ismob(phone_handset.loc) ? phone_handset.loc : null

//TGUI section

Expand Down Expand Up @@ -596,6 +597,9 @@ GLOBAL_LIST_EMPTY_TYPED(phones, /datum/component/phone)
log_say("TELEPHONE: [key_name(speaker)] on Phone '[phone_id]' to '[calling_phone.phone_id]' said '[message]'")

for(var/mob/dead/observer/cycled_observer in GLOB.player_list)
if(cycled_observer == get_user() || cycled_observer == calling_phone.get_user())
continue

if((cycled_observer.client) && (cycled_observer.client.prefs) && (cycled_observer.client.prefs.toggles_chat & CHAT_GHOSTRADIO))
var/ghost_message = "<span class='purple'><span class='name'>Game Master</span> on '[phone_id]' to '[calling_phone.phone_id]': <span class='body'>\"[message]\"</span></span>"
cycled_observer.show_message(ghost_message, SHOW_MESSAGE_AUDIBLE)
Expand All @@ -604,6 +608,9 @@ GLOBAL_LIST_EMPTY_TYPED(phones, /datum/component/phone)

return COMPONENT_OVERRIDE_DEAD_SPEAK

/datum/component/phone/virtual/get_user()
return virtual_user

// TGUI section

/datum/component/phone/virtual/ui_status(mob/user, datum/ui_state/state)
Expand Down
2 changes: 1 addition & 1 deletion code/datums/emergency_calls/cryo_marines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
var/leaders = 0
spawn_max_amount = TRUE

/datum/emergency_call/cryo_squad/spawn_candidates(announce, override_spawn_loc, announce_dispatch_message)
/datum/emergency_call/cryo_squad/spawn_candidates(quiet_launch, announce_incoming, override_spawn_loc)
var/datum/squad/marine/cryo/cryo_squad = RoleAuthority.squads_by_type[/datum/squad/marine/cryo]
leaders = cryo_squad.num_leaders
. = ..()
Expand Down
2 changes: 1 addition & 1 deletion code/datums/emergency_calls/cryo_marines_heavy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

var/leaders = 0

/datum/emergency_call/cryo_squad_equipped/spawn_candidates(announce, override_spawn_loc, announce_dispatch_message)
/datum/emergency_call/cryo_squad_equipped/spawn_candidates(quiet_launch, announce_incoming, override_spawn_loc)
var/datum/squad/marine/cryo/cryo_squad = RoleAuthority.squads_by_type[/datum/squad/marine/cryo]
leaders = cryo_squad.num_leaders
. = ..()
Expand Down
14 changes: 7 additions & 7 deletions code/datums/emergency_calls/emergency_call.dm
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,12 @@
else
return chosen_call

/datum/game_mode/proc/get_specific_call(call_name, quiet_launch = FALSE, announce = TRUE, is_emergency = TRUE, info = "", announce_dispatch_message = TRUE)
/datum/game_mode/proc/get_specific_call(call_name, quiet_launch = FALSE, announce_incoming = TRUE, info = "")
for(var/datum/emergency_call/E in all_calls) //Loop through all potential candidates
if(E.name == call_name)
var/datum/emergency_call/em_call = new E.type()
em_call.objective_info = info
em_call.activate(quiet_launch, announce, is_emergency, announce_dispatch_message)
em_call.activate(quiet_launch, announce_incoming)
return
error("get_specific_call could not find emergency call '[call_name]'")
return
Expand Down Expand Up @@ -192,7 +192,7 @@
else
to_chat(src, SPAN_WARNING("You did not get enlisted in the response team. Better luck next time!"))

/datum/emergency_call/proc/activate(quiet_launch = FALSE, announce = TRUE, turf/override_spawn_loc, announce_dispatch_message = TRUE)
/datum/emergency_call/proc/activate(quiet_launch = FALSE, announce_incoming = TRUE, turf/override_spawn_loc)
set waitfor = 0
if(!SSticker.mode) //Something horribly wrong with the gamemode ticker
return
Expand All @@ -205,9 +205,9 @@
if(!quiet_launch)
marine_announcement("A distress beacon has been launched from the [MAIN_SHIP_NAME].", "Priority Alert", 'sound/AI/distressbeacon.ogg', logging = ARES_LOG_SECURITY)

addtimer(CALLBACK(src, TYPE_PROC_REF(/datum/emergency_call, spawn_candidates), quiet_launch, announce, override_spawn_loc, announce_dispatch_message), 30 SECONDS)
addtimer(CALLBACK(src, TYPE_PROC_REF(/datum/emergency_call, spawn_candidates), quiet_launch, announce_incoming, override_spawn_loc), 30 SECONDS)

/datum/emergency_call/proc/spawn_candidates(quiet_launch = FALSE, announce = TRUE, override_spawn_loc, announce_dispatch_message = TRUE)
/datum/emergency_call/proc/spawn_candidates(quiet_launch = FALSE, announce_incoming = TRUE, override_spawn_loc)
if(SSticker.mode)
SSticker.mode.picked_calls -= src

Expand Down Expand Up @@ -248,7 +248,7 @@
if(I.current)
to_chat(I.current, SPAN_WARNING("You didn't get selected to join the distress team. Better luck next time!"))

if(announce)
if(announce_incoming)
marine_announcement(dispatch_message, "Distress Beacon", 'sound/AI/distressreceived.ogg', logging = ARES_LOG_SECURITY) //Announcement that the Distress Beacon has been answered, does not hint towards the chosen ERT

message_admins("Distress beacon: [src.name] finalized, setting up candidates.")
Expand Down Expand Up @@ -304,7 +304,7 @@
create_member(null, override_spawn_loc)

candidates = list()
if(arrival_message && announce)
if(arrival_message && announce_incoming)
marine_announcement(arrival_message, "Intercepted Tranmission:")

/datum/emergency_call/proc/add_candidate(mob/M)
Expand Down
27 changes: 0 additions & 27 deletions code/game/area/almayer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
powernet_name = "almayer"
sound_environment = SOUND_ENVIRONMENT_ROOM
soundscape_interval = 30
//soundscape_playlist = list('sound/effects/xylophone1.ogg', 'sound/effects/xylophone2.ogg', 'sound/effects/xylophone3.ogg')
ambience_exterior = AMBIENCE_ALMAYER
ceiling_muffle = FALSE

Expand Down Expand Up @@ -64,7 +63,6 @@
fake_zlevel = 1 // upperdeck
soundscape_playlist = SCAPE_PL_CIC
soundscape_interval = 50
flags_area = AREA_NOTUNNEL

/area/almayer/command/cichallway
name = "\improper Secure Command Hallway"
Expand All @@ -77,10 +75,6 @@
fake_zlevel = 1 // upperdeck
soundscape_playlist = SCAPE_PL_ARES
soundscape_interval = 120
flags_area = AREA_NOTUNNEL|AREA_UNWEEDABLE
can_build_special = FALSE
is_resin_allowed = FALSE
resin_construction_allowed = FALSE

/area/almayer/command/securestorage
name = "\improper Secure Storage"
Expand All @@ -96,13 +90,11 @@
name = "\improper Telecommunications"
icon_state = "tcomms"
fake_zlevel = 1 // upperdeck
flags_area = AREA_NOTUNNEL

/area/almayer/command/self_destruct
name = "\improper Self-Destruct Core Room"
icon_state = "selfdestruct"
fake_zlevel = 1 // upperdeck
flags_area = AREA_NOTUNNEL

/area/almayer/command/corporateliason
name = "\improper Corporate Liaison Office"
Expand Down Expand Up @@ -548,11 +540,6 @@
icon_state = "livingspace"
fake_zlevel = 1 // upperdeck

/area/almayer/living/platoon_commander_rooms
name = "\improper Platoon Commander's Rooms"
icon_state = "livingspace"
fake_zlevel = 1 // upperdeck

/area/almayer/living/chapel
name = "\improper Almayer Chapel"
icon_state = "officerrnr"
Expand Down Expand Up @@ -666,17 +653,6 @@
icon_state = "alpha"
fake_zlevel = 2 // lowerdeck

/area/almayer/squads/alpha/platoon_sergeant
name = "\improper Alpha Platoon Sergeant Office"

/area/almayer/squads/alpha/squad_one
name = "\improper Alpha Squad One Preparation"
icon_state = "charlie"

/area/almayer/squads/alpha/squad_two
name = "\improper Alpha Squad Two Preparation"
icon_state = "delta"

/area/almayer/squads/bravo
name = "\improper Squad Bravo Preparation"
icon_state = "bravo"
Expand Down Expand Up @@ -749,19 +725,16 @@
/area/almayer/ert_port
name = "\improper ERT Docking Port"
icon_state = "lifeboat"
flags_area = AREA_NOTUNNEL

/area/space/almayer/lifeboat_dock
name = "\improper Lifeboat Docking Port"
icon_state = "lifeboat"
fake_zlevel = 1 // upperdeck
flags_area = AREA_NOTUNNEL

/area/almayer/evacuation
icon = 'icons/turf/areas.dmi'
icon_state = "shuttle2"
requires_power = 0
flags_area = AREA_NOTUNNEL

//Placeholder.
/area/almayer/evacuation/pod1
Expand Down
2 changes: 1 addition & 1 deletion code/game/area/areas.dm
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
var/gas_type = GAS_TYPE_AIR
var/temperature = T20C
var/pressure = ONE_ATMOSPHERE
var/can_build_special = FALSE
var/can_build_special = TRUE
var/is_resin_allowed = TRUE // can xenos weed, place resin holes or dig tunnels at said areas
var/is_landing_zone = FALSE // primarily used to prevent mortars from hitting this location
var/resin_construction_allowed = TRUE // Allow construction of resin walls, and other special
Expand Down
Loading

0 comments on commit 4a4c0f6

Please sign in to comment.