Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into vehicle-autofire
Browse files Browse the repository at this point in the history
  • Loading branch information
Doubleumc committed Oct 28, 2023
2 parents 10e3037 + 6d17e8d commit 05512d1
Show file tree
Hide file tree
Showing 23 changed files with 142,935 additions and 1,171 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
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
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
67 changes: 67 additions & 0 deletions code/game/area/golden_arrow.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/area/golden_arrow
icon = 'icons/turf/area_almayer.dmi'
icon_state = "almayer"
ceiling = CEILING_METAL
powernet_name = "golden_arrow"
sound_environment = SOUND_ENVIRONMENT_ROOM
soundscape_interval = 30
ambience_exterior = AMBIENCE_ALMAYER
ceiling_muffle = FALSE

/area/golden_arrow/hangar
name = "\improper Hangar"
icon_state = "hangar"
soundscape_playlist = SCAPE_PL_HANGAR
soundscape_interval = 50

/area/golden_arrow/platoon_commander_rooms
name = "\improper Platoon Commander's Rooms"
icon_state = "livingspace"

/area/golden_arrow/medical
name = "\improper Medical"
icon_state = "medical"

/area/golden_arrow/supply
name = "\improper Supply"
icon_state = "req"

/area/golden_arrow/engineering
name = "\improper Engineering"
icon_state = "upperengineering"

/area/golden_arrow/briefing
name = "\improper Briefing Area"
icon_state = "briefing"

/area/golden_arrow/dorms
name = "\improper Dorms"
icon_state = "gruntrnr"

/area/golden_arrow/canteen
name = "\improper Canteen"
icon_state = "food"

/area/golden_arrow/cryo_cells
name = "\improper Cryo Cells"
icon_state = "cryo"

/area/golden_arrow/prep_hallway
name = "\improper Prep Hallway"
icon_state = "port"

/area/golden_arrow/platoon_sergeant
name = "\improper Platoon Sergeant Office"
icon_state = "alpha"

/area/golden_arrow/squad_one
name = "\improper Squad One Prep"
icon_state = "charlie"

/area/golden_arrow/squad_two
name = "\improper Squad Two Prep"
icon_state = "delta"

/area/golden_arrow/synthcloset
name = "\improper Synthetic Storage Closet"
icon_state = "livingspace"
11 changes: 11 additions & 0 deletions code/game/machinery/vending/cm_vending.dm
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,12 @@ GLOBAL_LIST_EMPTY(vending_products)
vendor_theme = VENDOR_THEME_USCM
vend_flags = VEND_CLUTTER_PROTECTION|VEND_CATEGORY_CHECK|VEND_TO_HAND

/obj/structure/machinery/cm_vending/gear/Initialize()
. = ..()
if(length(list(z) & SSmapping.levels_by_trait(ZTRAIT_GROUND)))
malfunction()


/obj/structure/machinery/cm_vending/gear/ui_static_data(mob/user)
. = ..(user)
.["vendor_type"] = "gear"
Expand All @@ -778,6 +784,11 @@ GLOBAL_LIST_EMPTY(vending_products)
vendor_theme = VENDOR_THEME_USCM
vend_flags = VEND_CLUTTER_PROTECTION | VEND_UNIFORM_RANKS | VEND_UNIFORM_AUTOEQUIP | VEND_CATEGORY_CHECK

/obj/structure/machinery/cm_vending/clothing/Initialize()
. = ..()
if(length(list(z) & SSmapping.levels_by_trait(ZTRAIT_GROUND)))
malfunction()

/obj/structure/machinery/cm_vending/clothing/ui_static_data(mob/user)
. = ..(user)
.["vendor_type"] = "clothing"
Expand Down
Loading

0 comments on commit 05512d1

Please sign in to comment.