Skip to content

Commit

Permalink
Merge branch 'master' into Adds-Improvisation-Traits
Browse files Browse the repository at this point in the history
  • Loading branch information
Katskan committed Jul 17, 2023
2 parents 3255fb2 + 823c9ce commit 34e522f
Show file tree
Hide file tree
Showing 167 changed files with 2,423 additions and 1,626 deletions.
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/tgui.dm
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
/// Creates a message packet for sending via output()
// This is {"type":type,"payload":payload}, but pre-encoded. This is much faster
// than doing it the normal way.
// To ensure this is correct, this is unit tested in tgui_create_message. However, CM does not have unit tests available.
// To ensure this is correct, this is unit tested in tgui_create_message.
#define TGUI_CREATE_MESSAGE(type, payload) ( \
"%7b%22type%22%3a%22[type]%22%2c%22payload%22%3a[url_encode(json_encode(payload))]%7d" \
)
Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@
#define TRAIT_ABILITY_NO_PLASMA_TRANSFER "t_ability_no_plasma_transfer"
/// Shows that the xeno queen is on ovi
#define TRAIT_ABILITY_OVIPOSITOR "t_ability_ovipositor"
/// Used for burrowed mobs, prevent's SG/sentrys/claymores from autofiring
#define TRAIT_ABILITY_BURROWED "t_ability_burrowed"

//-- item traits --
// TOOL TRAITS
Expand Down Expand Up @@ -240,6 +242,7 @@ GLOBAL_LIST_INIT(mob_traits, list(
TRAIT_REAGENT_SCANNER,
TRAIT_IMPROVISER,
TRAIT_FASTLEARNER,
TRAIT_ABILITY_BURROWED,
))

/*
Expand Down
8 changes: 8 additions & 0 deletions code/__DEFINES/wj_emotes.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#define JOE_EMOTE_CATEGORY_GREETING "Greeting"
#define JOE_EMOTE_CATEGORY_TASK_UPDATE "Task Update"
#define JOE_EMOTE_CATEGORY_RESTRICTED_AREA "Restricted Area"
#define JOE_EMOTE_CATEGORY_FAREWELL "Farewell"
#define JOE_EMOTE_CATEGORY_QUIP "Quip"
#define JOE_EMOTE_CATEGORY_WARNING "Warning"
#define JOE_EMOTE_CATEGORY_QUESTION "Question"
#define JOE_EMOTE_CATEGORY_NOTICE "Notice"
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
7 changes: 1 addition & 6 deletions code/__HELPERS/game.dm
Original file line number Diff line number Diff line change
Expand Up @@ -290,21 +290,16 @@
* * cache_only - Whether to not actually send a to_chat message and instead only update larva_queue_cached_message
*/
/proc/message_alien_candidates(list/candidates, dequeued, cache_only = FALSE)
var/new_players = 0
for(var/i in (1 + dequeued) to candidates.len)
var/mob/dead/observer/cur_obs = candidates[i]

// Generate the messages
var/cached_message = SPAN_XENONOTICE("You are currently [i-dequeued]\th in the larva queue. There are [new_players] ahead of you that have yet to play this round.")
var/cached_message = SPAN_XENONOTICE("You are currently [i-dequeued]\th in the larva queue.")
cur_obs.larva_queue_cached_message = cached_message
if(!cache_only)
var/chat_message = dequeued ? replacetext(cached_message, "currently", "now") : cached_message
to_chat(candidates[i], chat_message)

// Count how many are prioritized
if(cur_obs.client.player_details.larva_queue_time < 2) // 0 and 1 because facehuggers/t-domers are slightly deprioritized
new_players++

/proc/convert_k2c(temp)
return ((temp - T0C))

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)
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 @@ -3,7 +3,7 @@
//whiskey outpost extra marines
/datum/emergency_call/cryo_squad
name = "Marine Cryo Reinforcements (Squad)"
mob_max = 15
mob_max = 10
mob_min = 1
probability = 0
objectives = "Assist the USCM forces"
Expand Down
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
33 changes: 19 additions & 14 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 @@ -383,7 +388,7 @@ Additional game mode variables.
return FALSE

// We aren't in queue yet, lets teach them about the queue then
candidate_observer.larva_queue_cached_message = SPAN_XENONOTICE("You are currently still awaiting assignment in the larva queue. Priority is given to players who have yet to play in the round, but otherwise the ordering is based on your time of death. When you have been dead long enough and are not inactive, you will periodically receive messages where you are in the queue relative to other currently valid xeno candidates. Note: Playing as a facehugger or in the thunderdome will not alter your time of death. This means you won't lose your relative place in queue if you step away, disconnect, play as a facehugger, or play in the thunderdome.")
candidate_observer.larva_queue_cached_message = SPAN_XENONOTICE("You are currently awaiting assignment in the larva queue. The ordering is based on your time of death or the time you joined. When you have been dead long enough and are not inactive, you will periodically receive messages where you are in the queue relative to other currently valid xeno candidates. Your current position will shift as others change their preferences or go inactive, but your relative position compared to all observers is the same. Note: Playing as a facehugger or in the thunderdome will not alter your time of death. This means you won't lose your relative place in queue if you step away, disconnect, play as a facehugger, or play in the thunderdome.")
to_chat(xeno_candidate, candidate_observer.larva_queue_cached_message)
return FALSE

Expand Down
1 change: 1 addition & 0 deletions code/game/machinery/cryo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

/obj/structure/machinery/cryo_cell
name = "cryo cell"
desc = "A donation from the old A.W. project, using cryogenic technology. It slowly heals whoever is inside the tube."
icon = 'icons/obj/structures/machinery/cryogenics2.dmi'
icon_state = "cell"
density = FALSE
Expand Down
32 changes: 31 additions & 1 deletion code/game/machinery/iv_drip.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@
anchored = FALSE
density = FALSE
drag_delay = 1
base_pixel_x = 15
base_pixel_y = -2

var/mob/living/carbon/attached = null
var/mode = 1 // 1 is injecting, 0 is taking blood.
var/obj/item/reagent_container/beaker = null
var/datum/beam/current_beam

/obj/structure/machinery/iv_drip/update_icon()
if(src.attached)
if(attached)
icon_state = "hooked"
else
icon_state = ""
Expand All @@ -35,8 +38,31 @@
filling.color = mix_color_from_reagents(reagents.reagent_list)
overlays += filling

/obj/structure/machinery/iv_drip/proc/update_beam()
if(current_beam)
QDEL_NULL(current_beam)
else if(!QDELETED(src) && attached)
current_beam = beam(attached, "iv_tube")

/obj/structure/machinery/iv_drip/power_change()
. = ..()
if(stat & NOPOWER && attached)
visible_message("\The [src] retracts its IV tube and shuts down.")
attached.active_transfusions -= src
attached = null
update_beam()
update_icon()

/obj/structure/machinery/iv_drip/Destroy()
attached?.active_transfusions -= src
update_beam()
. = ..()

/obj/structure/machinery/iv_drip/MouseDrop(over_object, src_location, over_location)
..()
if(inoperable())
visible_message("\The [src] is not powered.")
return

if(ishuman(usr))
var/mob/living/carbon/human/H = usr
Expand All @@ -48,6 +74,7 @@
"You detach \the [src] from \the [attached].")
attached.active_transfusions -= src
attached = null
update_beam()
update_icon()
stop_processing()
return
Expand All @@ -57,6 +84,7 @@
"You attach \the [src] to \the [over_object].")
attached = over_object
attached.active_transfusions += src
update_beam()
update_icon()
start_processing()

Expand All @@ -81,6 +109,7 @@
log_admin("[key_name(user)] put a [beaker] into [src], containing [reagentnames] at ([src.loc.x],[src.loc.y],[src.loc.z]).")

to_chat(user, "You attach \the [W] to \the [src].")
update_beam()
update_icon()
return
else
Expand All @@ -97,6 +126,7 @@
attached.emote("scream")
attached.active_transfusions -= src
attached = null
update_beam()
update_icon()
stop_processing()
return
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
Loading

0 comments on commit 34e522f

Please sign in to comment.