Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into AlternateTest_Bum…
Browse files Browse the repository at this point in the history
…p_1609
  • Loading branch information
Drulikar committed Jul 18, 2023
2 parents 1ac3cba + 1cbf986 commit 1fad5c9
Show file tree
Hide file tree
Showing 141 changed files with 1,218 additions and 931 deletions.
1 change: 1 addition & 0 deletions code/__DEFINES/client_prefs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#define TOGGLE_VEND_ITEM_TO_HAND (1<<15) // This toggles whether items from vendors will be automatically put into your hand.
#define TOGGLE_START_JOIN_CURRENT_SLOT (1<<16) // Whether joining at roundstart ignores assigned character slot for the job and uses currently selected slot.
#define TOGGLE_LATE_JOIN_CURRENT_SLOT (1<<17) //Whether joining during the round ignores assigned character slot for the job and uses currently selected slot.
#define TOGGLE_ABILITY_DEACTIVATION_OFF (1<<18) // This toggles whether selecting the same ability again can toggle it off

#define JOB_SLOT_RANDOMISED_SLOT -1
#define JOB_SLOT_CURRENT_SLOT 0
Expand Down
1 change: 0 additions & 1 deletion code/__DEFINES/speech_channels.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@
#define ME_CHANNEL "Me"
#define OOC_CHANNEL "OOC"
#define LOOC_CHANNEL "LOOC"
#define MOD_CHANNEL "MSAY"
#define ADMIN_CHANNEL "ASAY"
#define MENTOR_CHANNEL "Mentor"
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.5.0"
#define TGS_DMAPI_VERSION "6.5.2"

// 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.dm
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@
#define XENO_LEAVE_TIMER_LARVA 80 //80 seconds
/// The time against away_timer when an AFK xeno (not larva) can be replaced
#define XENO_LEAVE_TIMER 300 //300 seconds
/// The time against away_timer when an AFK facehugger converts to a npc
#define XENO_FACEHUGGER_LEAVE_TIMER 420 //420 seconds
/// The time against away_timer when an AFK xeno gets listed in the available list so ghosts can get ready
#define XENO_AVAILABLE_TIMER 60 //60 seconds

Expand Down
19 changes: 17 additions & 2 deletions code/__HELPERS/game.dm
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,14 @@
else
return get_step(start, EAST)

/// Get a list of observers that can be alien candidates, optionally sorted by larva_queue_time
/proc/get_alien_candidates(sorted = TRUE)
/**
* Get a list of observers that can be alien candidates.
*
* Arguments:
* * hive - The hive we're filling a slot for to check if the player is banished
* * sorted - Whether to sort by larva_queue_time (default TRUE) or leave unsorted
*/
/proc/get_alien_candidates(datum/hive_status/hive = null, sorted = TRUE)
var/list/candidates = list()

for(var/mob/dead/observer/cur_obs as anything in GLOB.observer_list)
Expand Down Expand Up @@ -273,6 +279,15 @@
if((cur_obs.client.admin_holder && (cur_obs.client.admin_holder.rights & R_MOD)) && !cur_obs.adminlarva)
continue

if(hive)
var/banished = FALSE
for(var/mob_name in hive.banished_ckeys)
if(hive.banished_ckeys[mob_name] == cur_obs.ckey)
banished = TRUE
break
if(banished)
continue

candidates += cur_obs

// Optionally sort by larva_queue_time
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystem/x_evolution.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#define EVOLUTION_INCREMENT_TIME (30 MINUTES) // Evolution increases by 1 every 25 minutes.

SUBSYSTEM_DEF(xevolution)
name = "Evilution"
name = "Evilution" //This is not a typo, do not change it.
wait = 1 MINUTES
priority = SS_PRIORITY_INACTIVITY

Expand Down
9 changes: 7 additions & 2 deletions code/datums/components/footstep.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,17 @@
var/falloff
///This can be a list OR a soundfile OR null. Determines whatever sound gets played.
var/footstep_sounds
var/drag_sounds

/datum/component/footstep/Initialize(steps_ = 2, volume_ = 50, range_ = null, falloff_ = 1, footstep_sounds_ = "alien_footstep_large")
/datum/component/footstep/Initialize(steps_ = 2, volume_ = 50, range_ = null, falloff_ = 1, footstep_sounds_ = "alien_footstep_large", drag_sounds_ = 'sound/effects/alien_dragsound_large.ogg')
if(!isliving(parent))
return COMPONENT_INCOMPATIBLE
steps = steps_
volume = volume_
range = range_
falloff = falloff_
footstep_sounds = footstep_sounds_
drag_sounds = drag_sounds_

RegisterSignal(parent, list(COMSIG_MOVABLE_MOVED), PROC_REF(play_simplestep))

Expand All @@ -44,5 +46,8 @@
var/turf/open/T = prepare_step()
if(!T)
return
if(isfile(footstep_sounds) || istext(footstep_sounds))
var/mob/living/parent_mob = parent
if(parent_mob.lying && (isfile(drag_sounds) || istext(drag_sounds)))
playsound(T, drag_sounds, volume, rand(20000, 25000), range, falloff = falloff)
else if(isfile(footstep_sounds) || istext(footstep_sounds))
playsound(T, footstep_sounds, volume, rand(20000, 25000), range, falloff = falloff)
7 changes: 0 additions & 7 deletions code/datums/keybinding/communication.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,6 @@
full_name = "IC Comms (;)"
keybind_signal = COMSIG_KG_CLIENT_RADIO_DOWN

/datum/keybinding/client/communication/mod_say
hotkey_keys = list("Unbound")
classic_keys = list("Unbound")
name = MOD_CHANNEL
full_name = "Mod Say"
keybind_signal = COMSIG_KB_ADMIN_ASAY_DOWN

/datum/keybinding/client/communication/asay
hotkey_keys = list("F3")
classic_keys = list("F5")
Expand Down
16 changes: 0 additions & 16 deletions code/datums/redis/callbacks/msay.dm

This file was deleted.

2 changes: 1 addition & 1 deletion code/game/atoms.dm
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ Parameters are passed from New.
if(!ismovable(src))
var/turf/curturf = get_turf(src)
if(curturf)
. += "<option value='?_src_=holder;[HrefToken()];adminplayerobservecoodjump=1;X=[curturf.x];Y=[curturf.y];Z=[curturf.z]'>Jump To</option>"
. += "<option value='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];adminplayerobservecoodjump=1;X=[curturf.x];Y=[curturf.y];Z=[curturf.z]'>Jump To</option>"
VV_DROPDOWN_OPTION(VV_HK_MODIFY_TRANSFORM, "Modify Transform")
VV_DROPDOWN_OPTION(VV_HK_ADD_REAGENT, "Add Reagent")
VV_DROPDOWN_OPTION(VV_HK_TRIGGER_EMP, "EMP Pulse")
Expand Down
38 changes: 25 additions & 13 deletions code/game/gamemodes/cm_initialize.dm
Original file line number Diff line number Diff line change
Expand Up @@ -333,23 +333,28 @@ Additional game mode variables.
/datum/game_mode/proc/check_xeno_late_join(mob/xeno_candidate)
if(jobban_isbanned(xeno_candidate, JOB_XENOMORPH)) // User is jobbanned
to_chat(xeno_candidate, SPAN_WARNING("You are banned from playing aliens and cannot spawn as a xenomorph."))
return
return 1
return FALSE
return TRUE

/datum/game_mode/proc/attempt_to_join_as_xeno(mob/xeno_candidate, instant_join = 0)
/datum/game_mode/proc/attempt_to_join_as_xeno(mob/xeno_candidate, instant_join = FALSE)
var/list/available_xenos = list()
var/list/available_xenos_non_ssd = list()

for(var/mob/living/carbon/xenomorph/X in GLOB.living_xeno_list)
var/area/A = get_area(X)
if(is_admin_level(X.z) && (!A || !(A.flags_area & AREA_ALLOW_XENO_JOIN)) || X.aghosted)
continue //xenos on admin z level and aghosted ones don't count
if(istype(X) && ((!islarva(X) && (XENO_LEAVE_TIMER - X.away_timer < XENO_AVAILABLE_TIMER)) || (islarva(X) && (XENO_LEAVE_TIMER_LARVA - X.away_timer < XENO_AVAILABLE_TIMER))))
if(!X.client)
available_xenos += X
else
available_xenos_non_ssd += X

for(var/mob/living/carbon/xenomorph/cur_xeno as anything in GLOB.living_xeno_list)
if(cur_xeno.aghosted)
continue //aghosted xenos don't count
var/area/area = get_area(cur_xeno)
if(is_admin_level(cur_xeno.z) && (!area || !(area.flags_area & AREA_ALLOW_XENO_JOIN)))
continue //xenos on admin z level don't count
if(!istype(cur_xeno))
continue
var/required_time = islarva(cur_xeno) ? XENO_LEAVE_TIMER_LARVA - cur_xeno.away_timer : XENO_LEAVE_TIMER - cur_xeno.away_timer
if(required_time > XENO_AVAILABLE_TIMER)
continue
if(!cur_xeno.client)
available_xenos += cur_xeno
else
available_xenos_non_ssd += cur_xeno

var/datum/hive_status/hive
for(var/hivenumber in GLOB.hive_datum)
Expand Down Expand Up @@ -379,6 +384,13 @@ Additional game mode variables.
// No cache, lets check now then
message_alien_candidates(get_alien_candidates(), dequeued = 0, cache_only = TRUE)
if(candidate_observer.larva_queue_cached_message)
var/datum/hive_status/cur_hive
for(var/hive_num in GLOB.hive_datum)
cur_hive = GLOB.hive_datum[hive_num]
for(var/mob_name in cur_hive.banished_ckeys)
if(cur_hive.banished_ckeys[mob_name] == xeno_candidate.ckey)
candidate_observer.larva_queue_cached_message += "\n" + SPAN_WARNING("NOTE: You are banished from the [cur_hive] and you may not rejoin unless the Queen re-admits you or dies. Your queue number won't update until there is a hive you aren't banished from.")
break
to_chat(xeno_candidate, candidate_observer.larva_queue_cached_message)
return FALSE

Expand Down
18 changes: 10 additions & 8 deletions code/game/machinery/cryopod.dm
Original file line number Diff line number Diff line change
Expand Up @@ -503,23 +503,25 @@ GLOBAL_LIST_INIT(frozen_items, list(SQUAD_MARINE_1 = list(), SQUAD_MARINE_2 = li
add_fingerprint(usr)


/obj/structure/machinery/cryopod/proc/go_in_cryopod(mob/M, silent = FALSE)
/obj/structure/machinery/cryopod/proc/go_in_cryopod(mob/mob, silent = FALSE)
if(occupant)
return
M.forceMove(src)
occupant = M
mob.forceMove(src)
occupant = mob
icon_state = "body_scanner_closed"
SetLuminosity(2)
time_entered = world.time
start_processing()

if(!silent)
if(M.client)
to_chat(M, SPAN_NOTICE("You feel cool air surround you. You go numb as your senses turn inward."))
to_chat(M, SPAN_BOLDNOTICE("If you log out or close your client now, your character will permanently removed from the round in 10 minutes. If you ghost, timer will be decreased to 2 minutes."))
if(mob.client)
to_chat(mob, SPAN_NOTICE("You feel cool air surround you. You go numb as your senses turn inward."))
to_chat(mob, SPAN_BOLDNOTICE("If you log out or close your client now, your character will permanently removed from the round in 10 minutes. If you ghost, timer will be decreased to 2 minutes."))
if(!is_admin_level(src.z)) // Set their queue time now because the client has to actually leave to despawn and at that point the client is lost
mob.client.player_details.larva_queue_time = max(mob.client.player_details.larva_queue_time, world.time)
var/area/location = get_area(src)
if(M.job != GET_MAPPED_ROLE(JOB_SQUAD_MARINE))
message_admins("[key_name_admin(M)], [M.job], has entered \a [src] at [location] after playing for [duration2text(world.time - M.life_time_start)].")
if(mob.job != GET_MAPPED_ROLE(JOB_SQUAD_MARINE))
message_admins("[key_name_admin(mob)], [mob.job], has entered \a [src] at [location] after playing for [duration2text(world.time - mob.life_time_start)].")
playsound(src, 'sound/machines/hydraulics_3.ogg', 30)
silent_exit = silent

Expand Down
10 changes: 10 additions & 0 deletions code/game/machinery/vending/vendor_types/crew/staff_officer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,21 @@

GLOBAL_LIST_INIT(cm_vending_clothing_staff_officer, list(
list("STANDARD EQUIPMENT (TAKE ALL)", 0, null, null, null),
list("Uniform", 0, /obj/item/clothing/under/marine/officer/bridge, MARINE_CAN_BUY_UNIFORM, VENDOR_ITEM_MANDATORY),
list("Boots", 0, /obj/item/clothing/shoes/marine/knife, MARINE_CAN_BUY_SHOES, VENDOR_ITEM_MANDATORY),
list("Headset", 0, /obj/item/device/radio/headset/almayer/mcom, MARINE_CAN_BUY_EAR, VENDOR_ITEM_MANDATORY),
list("Helmet", 0, /obj/item/clothing/head/helmet/marine/MP/SO, MARINE_CAN_BUY_HELMET, VENDOR_ITEM_MANDATORY),
list("MRE", 0, /obj/item/storage/box/MRE, MARINE_CAN_BUY_MRE, VENDOR_ITEM_MANDATORY),

list("JACKET (CHOOSE 1)", 0, null, null, null),
list("Service Jacket", 0, /obj/item/clothing/suit/storage/jacket/marine/service, MARINE_CAN_BUY_ARMOR, VENDOR_ITEM_RECOMMENDED),

list("HAT (CHOOSE 1)", 0, null, null, null),
list("Beret, Green", 0, /obj/item/clothing/head/beret/cm, MARINE_CAN_BUY_HELMET, VENDOR_ITEM_RECOMMENDED),
list("Beret, Tan", 0, /obj/item/clothing/head/beret/cm/tan, MARINE_CAN_BUY_HELMET, VENDOR_ITEM_RECOMMENDED),
list("Patrol Cap", 0, /obj/item/clothing/head/cmcap, MARINE_CAN_BUY_HELMET, VENDOR_ITEM_RECOMMENDED),


list("PERSONAL SIDEARM (CHOOSE 1)", 0, null, null, null),
list("M44 Revolver", 0, /obj/item/storage/belt/gun/m44/mp, MARINE_CAN_BUY_BELT, VENDOR_ITEM_RECOMMENDED),
list("M4A3 Pistol", 0, /obj/item/storage/belt/gun/m4a3/commander, MARINE_CAN_BUY_BELT, VENDOR_ITEM_RECOMMENDED),
Expand Down
1 change: 1 addition & 0 deletions code/game/machinery/vending/vendor_types/requisitions.dm
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@

list("POUCHES", -1, null, null),
list("Autoinjector Pouch", round(scale * 2), /obj/item/storage/pouch/autoinjector, VENDOR_ITEM_REGULAR),
list("Bayonet Pouch", round(scale * 2), /obj/item/storage/pouch/bayonet, VENDOR_ITEM_REGULAR),
list("Construction Pouch", round(scale * 2), /obj/item/storage/pouch/construction, VENDOR_ITEM_REGULAR),
list("Document Pouch", round(scale * 2), /obj/item/storage/pouch/document/small, VENDOR_ITEM_REGULAR),
list("Electronics Pouch", round(scale * 2), /obj/item/storage/pouch/electronics, VENDOR_ITEM_REGULAR),
Expand Down
14 changes: 8 additions & 6 deletions code/game/objects/effects/landmarks/landmarks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -216,23 +216,25 @@

/obj/effect/landmark/yautja_teleport
name = "yautja_teleport"
/// The index we registered as in mainship_yautja_desc or yautja_teleport_descs
var/desc_index

/obj/effect/landmark/yautja_teleport/Initialize(mapload, ...)
. = ..()
var/turf/T = get_turf(src)
var/turf/turf = get_turf(src)
desc_index = turf.loc.name + turf.loc_to_string()
if(is_mainship_level(z))
GLOB.mainship_yautja_teleports += src
GLOB.mainship_yautja_desc[T.loc.name + T.loc_to_string()] = src
GLOB.mainship_yautja_desc[desc_index] = src
else
GLOB.yautja_teleports += src
GLOB.yautja_teleport_descs[T.loc.name + T.loc_to_string()] = src
GLOB.yautja_teleport_descs[desc_index] = src

/obj/effect/landmark/yautja_teleport/Destroy()
var/turf/T = get_turf(src)
GLOB.mainship_yautja_teleports -= src
GLOB.yautja_teleports -= src
GLOB.mainship_yautja_desc -= T.loc.name + T.loc_to_string()
GLOB.yautja_teleport_descs -= T.loc.name + T.loc_to_string()
GLOB.mainship_yautja_desc -= desc_index
GLOB.yautja_teleport_descs -= desc_index
return ..()


Expand Down
4 changes: 2 additions & 2 deletions code/game/objects/effects/landmarks/survivor_spawner.dm
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@

/obj/effect/landmark/survivor_spawner/bigred_crashed_pmc
equipment = /datum/equipment_preset/survivor/pmc
synth_equipment = /datum/equipment_preset/pmc/synth
synth_equipment = /datum/equipment_preset/synth/survivor/pmc
intro_text = list("<h2>You are a survivor of a crash landing!</h2>",\
"<span class='notice'>You are NOT aware of the xenomorph threat.</span>",\
"<span class='danger'>Your primary objective is to heal up and survive. If you want to assault the hive - adminhelp.</span>")
Expand All @@ -80,7 +80,7 @@

/obj/effect/landmark/survivor_spawner/bigred_crashed_cl
equipment = /datum/equipment_preset/survivor/wy/manager
synth_equipment = /datum/equipment_preset/pmc/synth
synth_equipment = /datum/equipment_preset/synth/survivor/pmc
intro_text = list("<h2>You are a survivor of a crash landing!</h2>",\
"<span class='notice'>You are NOT aware of the xenomorph threat.</span>",\
"<span class='danger'>Your primary objective is to heal up and survive. If you want to assault the hive - adminhelp.</span>")
Expand Down
4 changes: 2 additions & 2 deletions code/game/objects/items/pamphlets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@
user.hud_set_squad()

var/obj/item/card/id/ID = user.wear_id
ID.set_assignment((user.assigned_squad ? (user.assigned_squad.name + " ") : "") + "Squad Spotter")
GLOB.data_core.manifest_modify(user.real_name, WEAKREF(user), "Squad Spotter")
ID.set_assignment((user.assigned_squad ? (user.assigned_squad.name + " ") : "") + "Spotter")
GLOB.data_core.manifest_modify(user.real_name, WEAKREF(user), "Spotter")

/obj/item/pamphlet/skill/machinegunner
name = "heavy machinegunner instructional pamphlet"
Expand Down
3 changes: 1 addition & 2 deletions code/game/objects/items/storage/pouch.dm
Original file line number Diff line number Diff line change
Expand Up @@ -612,13 +612,12 @@
name = "explosive pouch"
desc = "It can carry grenades, plastic explosives, mine boxes, and other explosives."
icon_state = "large_explosive"
storage_slots = 3
storage_slots = 6
max_w_class = SIZE_MEDIUM
can_hold = list(
/obj/item/explosive/plastic,
/obj/item/explosive/mine,
/obj/item/explosive/grenade,
/obj/item/storage/box/explosive_mines,
)

/obj/item/storage/pouch/explosive/attackby(obj/item/W, mob/user)
Expand Down
6 changes: 3 additions & 3 deletions code/game/objects/items/storage/storage.dm
Original file line number Diff line number Diff line change
Expand Up @@ -799,9 +799,9 @@ W is always an item. stop_warning prevents messaging. user may be null.**/
storage_close(watcher)

/obj/item/storage/proc/dump_objectives()
for(var/obj/item/I in src)
if(I.is_objective)
I.forceMove(loc)
for(var/obj/item/cur_item in src)
if(cur_item.is_objective)
remove_from_storage(cur_item, loc)


/obj/item/storage/Destroy()
Expand Down
15 changes: 9 additions & 6 deletions code/game/objects/structures/crates_lockers/closets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -245,19 +245,22 @@
else if(istype(W, /obj/item/packageWrap) || istype(W, /obj/item/explosive/plastic))
return
else if(iswelder(W))
if(material != MATERIAL_METAL && material != MATERIAL_PLASTEEL)
to_chat(user, SPAN_WARNING("You cannot weld [material]!"))
return FALSE//Can't weld wood/plastic.
if(!HAS_TRAIT(W, TRAIT_TOOL_BLOWTORCH))
to_chat(user, SPAN_WARNING("You need a stronger blowtorch!"))
return
return FALSE
var/obj/item/tool/weldingtool/WT = W
if(!WT.isOn())
to_chat(user, SPAN_WARNING("\The [WT] needs to be on!"))
return
return FALSE
if(!WT.remove_fuel(0, user))
to_chat(user, SPAN_NOTICE("You need more welding fuel to complete this task."))
return
return FALSE
playsound(src, 'sound/items/Welder.ogg', 25, 1)
if(!do_after(user, 10 * user.get_skill_duration_multiplier(SKILL_CONSTRUCTION), INTERRUPT_ALL|BEHAVIOR_IMMOBILE, BUSY_ICON_BUILD))
return
return FALSE
welded = !welded
update_icon()
for(var/mob/M as anything in viewers(src))
Expand All @@ -266,9 +269,9 @@
if(isxeno(user))
var/mob/living/carbon/xenomorph/opener = user
src.attack_alien(opener)
return
return FALSE
src.attack_hand(user)
return
return TRUE

/obj/structure/closet/MouseDrop_T(atom/movable/O, mob/user)
if(!opened)
Expand Down
Loading

0 comments on commit 1fad5c9

Please sign in to comment.