Skip to content

Commit

Permalink
Merge branch 'master' into ui/almayer-control
Browse files Browse the repository at this point in the history
  • Loading branch information
stanalbatross authored Aug 3, 2023
2 parents e211022 + 6dd2c71 commit fcced55
Show file tree
Hide file tree
Showing 63 changed files with 514 additions and 166 deletions.
3 changes: 3 additions & 0 deletions code/__DEFINES/xeno.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
#define TUNNEL_ENTER_BIG_XENO_DELAY 120
#define TUNNEL_ENTER_LARVA_DELAY 10

/// The duration it takes a player controlled facehugger to leap or hug adjacently
#define FACEHUGGER_WINDUP_DURATION 1 SECONDS

// Defines for action types and click delays used by xenomorph/unarmedattack() and attack_alien().

/// Full attack delay.
Expand Down
6 changes: 4 additions & 2 deletions code/__HELPERS/logging.dm
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,10 @@
if (CONFIG_GET(flag/log_interact))
WRITE_LOG(GLOB.world_game_log, "INTERACT: [msg]")
LOG_REDIS("interact", "\[[time]\] [msg]")
origin.attack_log += "\[[time]\]<font color='green'> [msg] </font>"
target.attack_log += "\[[time]\]<font color='green'> [msg] </font>"
if(origin)
origin.attack_log += "\[[time]\]<font color='green'> [msg] </font>"
if(target)
target.attack_log += "\[[time]\]<font color='green'> [msg] </font>"

GLOB.STUI.attack.Add("\[[time]]INTERACT: [msg]")
GLOB.STUI.processing |= STUI_LOG_ATTACK
Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/lists/mapping_globals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ GLOBAL_LIST_EMPTY(latewhiskey)

GLOBAL_LIST_EMPTY(latejoin)
GLOBAL_LIST_EMPTY(latejoin_by_squad)
GLOBAL_LIST_EMPTY(latejoin_by_job)

GLOBAL_LIST_EMPTY(zombie_landmarks)

Expand Down
19 changes: 15 additions & 4 deletions code/datums/statistics/entities/death_stats.dm
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,25 @@
)

/mob/proc/track_mob_death(datum/cause_data/cause_data, turf/death_loc)
if(!mind || statistic_exempt)
return

if(cause_data && !istype(cause_data))
stack_trace("track_mob_death called with string cause ([cause_data]) instead of datum")
cause_data = create_cause_data(cause_data)

var/log_message = "\[[time_stamp()]\] [key_name(src)] died to "
if(cause_data)
log_message += "[cause_data.cause_name]"
else
log_message += "unknown causes"
var/mob/cause_mob = cause_data?.resolve_mob()
if(cause_mob)
log_message += " from [key_name(cause_data.resolve_mob())]"
cause_mob.attack_log += "\[[time_stamp()]\] [key_name(cause_mob)] killed [key_name(src)] with [cause_data.cause_name]."

attack_log += "[log_message]."

if(!mind || statistic_exempt)
return

var/datum/entity/statistic/death/new_death = DB_ENTITY(/datum/entity/statistic/death)
var/datum/entity/player/player_entity = get_player_from_key(mind.ckey)
if(player_entity)
Expand All @@ -96,7 +108,6 @@
new_death.cause_role_name = cause_data?.role
new_death.cause_faction_name = cause_data?.faction

var/mob/cause_mob = cause_data?.resolve_mob()
if(cause_mob)
cause_mob.life_kills_total += life_value

Expand Down
6 changes: 3 additions & 3 deletions code/game/gamemodes/colonialmarines/colonialmarines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -372,11 +372,11 @@
var/headcount = count_per_faction()
var/living = headcount["total_headcount"]
if ((headcount["WY_headcount"] / living) > MAJORITY)
musical_track = pick('sound/theme/LastManStanding_WY.ogg')
musical_track = pick('sound/theme/lastmanstanding_wy.ogg')
else if ((headcount["UPP_headcount"] / living) > MAJORITY)
musical_track = pick('sound/theme/LastManStanding_UPP.ogg')
musical_track = pick('sound/theme/lastmanstanding_upp.ogg')
else if ((headcount["CLF_headcount"] / living) > MAJORITY)
musical_track = pick('sound/theme/LastManStanding_CLF.ogg')
musical_track = pick('sound/theme/lastmanstanding_clf.ogg')
else if ((headcount["marine_headcount"] / living) > MAJORITY)
musical_track = pick('sound/theme/neutral_melancholy2.ogg') //This is the theme song for Colonial Marines the game, fitting
else
Expand Down
2 changes: 2 additions & 0 deletions code/game/jobs/job/job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,8 @@
join_turf = get_turf(pick(GLOB.spawns_by_job[type]))
else if(assigned_squad && GLOB.latejoin_by_squad[assigned_squad])
join_turf = get_turf(pick(GLOB.latejoin_by_squad[assigned_squad]))
else if(GLOB.latejoin_by_job[title])
join_turf = get_turf(pick(GLOB.latejoin_by_job[title]))
else
join_turf = get_turf(pick(GLOB.latejoin))
human.forceMove(join_turf)
Expand Down
2 changes: 2 additions & 0 deletions code/game/jobs/role_authority.dm
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,8 @@ I hope it's easier to tell what the heck this proc is even doing, unlike previou
var/turf/late_join_turf
if(GLOB.latejoin_by_squad[assigned_squad])
late_join_turf = get_turf(pick(GLOB.latejoin_by_squad[assigned_squad]))
else if(GLOB.latejoin_by_job[J.title])
late_join_turf = get_turf(pick(GLOB.latejoin_by_job[J.title]))
else
late_join_turf = get_turf(pick(GLOB.latejoin))
H.forceMove(late_join_turf)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ GLOBAL_LIST_INIT(cm_vending_clothing_engi, list(
list("Technician Satchel", 0, /obj/item/storage/backpack/marine/satchel/tech, MARINE_CAN_BUY_BACKPACK, VENDOR_ITEM_REGULAR),
list("Technician Welderpack", 0, /obj/item/storage/backpack/marine/engineerpack, MARINE_CAN_BUY_BACKPACK, VENDOR_ITEM_MANDATORY),
list("Technician Welder-Satchel", 0, /obj/item/storage/backpack/marine/engineerpack/satchel, MARINE_CAN_BUY_BACKPACK, VENDOR_ITEM_REGULAR),
list("Technician Welder Chestrig", 0, /obj/item/storage/backpack/marine/engineerpack/welder_chestrig, MARINE_CAN_BUY_BACKPACK, VENDOR_ITEM_MANDATORY),

list("BELT (CHOOSE 1)", 0, null, null, null),
list("G8-A General Utility Pouch", 0, /obj/item/storage/backpack/general_belt, MARINE_CAN_BUY_BELT, VENDOR_ITEM_REGULAR),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
list("Shotgun Scabbard", 5, /obj/item/storage/large_holster/m37, VENDOR_ITEM_REGULAR),
list("USCM Satchel", 10, /obj/item/storage/backpack/marine/satchel, VENDOR_ITEM_REGULAR),
list("USCM Technical Satchel", 10, /obj/item/storage/backpack/marine/satchel/tech, VENDOR_ITEM_REGULAR),
list("USCM Technical Chestrig", 10, /obj/item/storage/backpack/marine/engineerpack/welder_chestrig, VENDOR_ITEM_REGULAR),
list("USCM Uniform", 20, /obj/item/clothing/under/marine, VENDOR_ITEM_REGULAR),

list("BELTS", -1, null, null),
Expand Down
10 changes: 10 additions & 0 deletions code/game/objects/effects/landmarks/landmarks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,8 @@
name = "late join"
icon_state = "x2"
var/squad
/// What job should latejoin on this landmark
var/job

/obj/effect/landmark/late_join/alpha
name = "alpha late join"
Expand All @@ -396,16 +398,24 @@
squad = SQUAD_MARINE_4


/obj/effect/landmark/late_join/working_joe
name = "working joe late join"
job = JOB_WORKING_JOE

/obj/effect/landmark/late_join/Initialize(mapload, ...)
. = ..()
if(squad)
LAZYADD(GLOB.latejoin_by_squad[squad], src)
else if(job)
LAZYADD(GLOB.latejoin_by_job[job], src)
else
GLOB.latejoin += src

/obj/effect/landmark/late_join/Destroy()
if(squad)
LAZYREMOVE(GLOB.latejoin_by_squad[squad], src)
else if(job)
LAZYREMOVE(GLOB.latejoin_by_job[job], src)
else
GLOB.latejoin -= src
return ..()
Expand Down
9 changes: 6 additions & 3 deletions code/game/objects/items/devices/motion_detector.dm
Original file line number Diff line number Diff line change
Expand Up @@ -229,11 +229,14 @@
if(human_user)
show_blip(human_user, M)

for(var/mob/hologram/queen/Q in GLOB.hologram_list)
if(Q.z != cur_turf.z || !(range_bounds.contains_atom(Q))) continue
for(var/mob/hologram/holo as anything in GLOB.hologram_list)
if(!holo.motion_sensed)
continue
if(holo.z != cur_turf.z || !(range_bounds.contains_atom(holo)))
continue
ping_count++
if(human_user)
show_blip(human_user, Q, "queen_eye")
show_blip(human_user, holo, "queen_eye")

if(ping_count > 0)
playsound(loc, pick('sound/items/detector_ping_1.ogg', 'sound/items/detector_ping_2.ogg', 'sound/items/detector_ping_3.ogg', 'sound/items/detector_ping_4.ogg'), 60, 0, 7, 2)
Expand Down
3 changes: 3 additions & 0 deletions code/game/objects/items/devices/portable_vendor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -270,4 +270,7 @@

list("MISC", 0, null, null, null),
list("Hollow Cane", 15, /obj/item/weapon/pole/fancy_cane/this_is_a_knife, "white", "A hollow cane that can store any commonplace sharp weaponry. Said weapon not included."),

list("AMMO", 0, null, null, null),
list("ES-4 stun magazine", 10, /obj/item/ammo_magazine/pistol/es4, "white", "Holds 19 rounds of specialized Conductive 9mm."),
)
33 changes: 17 additions & 16 deletions code/game/objects/items/explosives/grenades/marines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -547,31 +547,32 @@
ram_distance -- //for max pinballing.
icon_state = inactive_icon

/obj/item/explosive/grenade/slug/proc/impact_mob(mob/living/M)
var/direction = Get_Angle(src,M)
var/target_turf = get_angle_target_turf(src,direction,throw_max)
var/fling = rand(throw_min,throw_max) //WEEEEEEEEEEEEEEEEEEEE What is going to be put into throw_atom
/obj/item/explosive/grenade/slug/proc/impact_mob(mob/living/smacked)
var/direction = Get_Angle(src, smacked)
var/target_turf = get_angle_target_turf(src,direction, throw_max)
var/fling = rand(throw_min, throw_max) //WEEEEEEEEEEEEEEEEEEEE What is going to be put into throw_atom
var/random_tile = 0 //random tile for bounce

playsound(M.loc, impact_sound, 75, 1)
M.apply_damage(impact_damage, BRUTE)
playsound(smacked.loc, impact_sound, 75, 1)
smacked.apply_damage(impact_damage, BRUTE)
smacked.attack_log += "\[[time_stamp()]\] [src], fired by [fingerprintslast], struck [key_name(smacked)]."

random_tile = get_random_turf_in_range(src,ram_distance,ram_distance) //getting random tile for bounce
src.throw_atom(random_tile,ram_distance,SPEED_FAST,src,TRUE,NORMAL_LAUNCH,NO_FLAGS) //time for a little trolling

if(isyautja(M)|| issynth(M))
M.apply_effect(slowdown_time * 0.5, SLOW)
M.apply_effect(dazed_time * 0.5, DAZE)
if(isyautja(smacked)|| issynth(smacked))
smacked.apply_effect(slowdown_time * 0.5, SLOW)
smacked.apply_effect(dazed_time * 0.5, DAZE)

if(M.mob_size >= MOB_SIZE_BIG)//big xenos not KO'ed
M.apply_effect(slowdown_time * 1.2, SLOW)//They are slowed more :trol:
M.apply_effect(dazed_time * 1.2, DAZE)
if(smacked.mob_size >= MOB_SIZE_BIG)//big xenos not KO'ed
smacked.apply_effect(slowdown_time * 1.2, SLOW)//They are slowed more :trol:
smacked.apply_effect(dazed_time * 1.2, DAZE)
return

M.apply_effect(knockout_time, WEAKEN)//but little xenos and humans are
M.throw_atom(target_turf,fling,SPEED_AVERAGE,M,TRUE)
M.apply_effect(slowdown_time, SLOW)
M.apply_effect(dazed_time, DAZE)
smacked.apply_effect(knockout_time, WEAKEN)//but little xenos and humans are
smacked.throw_atom(target_turf, fling, SPEED_AVERAGE, smacked, TRUE)
smacked.apply_effect(slowdown_time, SLOW)
smacked.apply_effect(dazed_time, DAZE)
return

/obj/item/explosive/grenade/slug/baton
Expand Down
10 changes: 10 additions & 0 deletions code/game/objects/items/storage/backpack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -914,6 +914,16 @@ GLOBAL_LIST_EMPTY_TYPED(radio_packs, /obj/item/storage/backpack/marine/satchel/r
max_fuel = 100
worn_accessible = TRUE

/obj/item/storage/backpack/marine/engineerpack/welder_chestrig
name = "\improper Technician Welder Chestrig"
desc = "A specialized Chestrig worn by technicians and engineers. It carries one medium fuel tank for quick welder refueling and use."
icon_state = "welder_chestrig"
item_state = "welder_chestrig"
max_storage_space = 12
has_gamemode_skin = FALSE
max_fuel = 100
worn_accessible = TRUE

// Pyrotechnician Spec backpack fuel tank
/obj/item/storage/backpack/marine/engineerpack/flamethrower
name = "\improper USCM Pyrotechnician G6-2 fueltank"
Expand Down
8 changes: 3 additions & 5 deletions code/game/objects/items/storage/lockbox.dm
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,9 @@
req_access = list(ACCESS_WY_CORPORATE)

/obj/item/storage/lockbox/loyalty/fill_preset_inventory()
new /obj/item/ammo_magazine/pistol/mod88(src)
new /obj/item/ammo_magazine/pistol/mod88(src)
new /obj/item/ammo_magazine/pistol/mod88/rubber(src)
new /obj/item/ammo_magazine/pistol/mod88/rubber(src)

new /obj/item/ammo_magazine/pistol/es4(src)
new /obj/item/ammo_magazine/pistol/es4(src)
new /obj/item/ammo_magazine/pistol/es4(src)

/obj/item/storage/lockbox/cluster
name = "lockbox of cluster flashbangs"
Expand Down
14 changes: 13 additions & 1 deletion code/game/objects/items/weapons/twohanded.dm
Original file line number Diff line number Diff line change
Expand Up @@ -323,13 +323,25 @@
item_state = "syn_breacher"
force_wielded = MELEE_FORCE_VERY_STRONG
really_heavy = TRUE
var/move_delay_addition = 1.5

/obj/item/weapon/twohanded/breacher/synth/pickup(mob/user)
if(!(HAS_TRAIT(user, TRAIT_SUPER_STRONG)))
to_chat(user, SPAN_WARNING("You barely manage to lift \the [src] above your knees. This thing will probably be useless to you."))
to_chat(user, SPAN_HIGHDANGER("You barely manage to lift [src] above your knees. This thing will probably be useless to you."))
user.apply_effect(3, EYE_BLUR)
RegisterSignal(user, COMSIG_HUMAN_POST_MOVE_DELAY, PROC_REF(handle_movedelay))

return
..()

/obj/item/weapon/twohanded/breacher/synth/proc/handle_movedelay(mob/living/M, list/movedata)
SIGNAL_HANDLER
movedata["move_delay"] += move_delay_addition

/obj/item/weapon/twohanded/breacher/synth/dropped(mob/user, silent)
. = ..()
UnregisterSignal(user, COMSIG_HUMAN_POST_MOVE_DELAY)

/obj/item/weapon/twohanded/breacher/synth/attack(target as mob, mob/living/user as mob)
if(!HAS_TRAIT(user, TRAIT_SUPER_STRONG))
to_chat(user, SPAN_WARNING("\The [src] is too heavy for you to use as a weapon!"))
Expand Down
88 changes: 88 additions & 0 deletions code/game/objects/structures/props.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1152,3 +1152,91 @@
icon = 'icons/obj/structures/props/almayer_props.dmi'
icon_state = "rope"
density = FALSE

/obj/structure/prop/pred_flight
name = "hunter flight console"
desc = "A console designed by the Hunters to assist in flight pathing and navigation."
icon = 'icons/obj/structures/machinery/computer.dmi'
icon_state = "overwatch"
density = TRUE

/obj/structure/prop/invuln/joey
name = "Workin' Joey"
desc = "A defunct Seegson-brand Working Joe lifted from deep storage by a crew of marines after the last shore leave. Attempts have been made to modify the janitorial synthetic to serve as a crude bartender, but with little success."
icon = 'icons/obj/structures/props/props.dmi'
icon_state = "joey"
unslashable = FALSE
wrenchable = FALSE
/// converted into minutes when used to determine cooldown timer between quips
var/quip_delay_minimum = 5
/// delay between Quips. Slightly randomized with quip_delay_minimum plus a random number
COOLDOWN_DECLARE(quip_delay)
/// delay between attack voicelines. Short but done for anti-spam
COOLDOWN_DECLARE(damage_delay)
/// list of quip emotes, taken from Working Joe
var/static/list/quips = list(
/datum/emote/living/carbon/human/synthetic/working_joe/quip/alwaysknow_damaged,
/datum/emote/living/carbon/human/synthetic/working_joe/quip/not_liking,
/datum/emote/living/carbon/human/synthetic/working_joe/greeting/how_can_i_help,
/datum/emote/living/carbon/human/synthetic/working_joe/task_update/day_never_done,
/datum/emote/living/carbon/human/synthetic/working_joe/task_update/required_by_apollo,
/datum/emote/living/carbon/human/synthetic/working_joe/warning/safety_breach
)
/// list of voicelines to use when damaged
var/static/list/damaged = list(
/datum/emote/living/carbon/human/synthetic/working_joe/warning/damage,
/datum/emote/living/carbon/human/synthetic/working_joe/warning/that_stings,
/datum/emote/living/carbon/human/synthetic/working_joe/warning/irresponsible,
/datum/emote/living/carbon/human/synthetic/working_joe/warning/this_is_futile,
/datum/emote/living/carbon/human/synthetic/working_joe/warning/hysterical,
/datum/emote/living/carbon/human/synthetic/working_joe/warning/patience
)

/obj/structure/prop/invuln/joey/Initialize()
. = ..()
START_PROCESSING(SSobj, src)

/obj/structure/prop/invuln/joey/Destroy()
STOP_PROCESSING(SSobj, src)
return ..()

/obj/structure/prop/invuln/joey/process()
//check if quip_delay cooldown finished. If so, random chance it says a line
if(COOLDOWN_FINISHED(src, quip_delay) && prob(10))
emote(pick(quips))
var/delay = rand(3) + quip_delay_minimum
COOLDOWN_START(src, quip_delay, delay MINUTES)

// Advert your eyes.
/obj/structure/prop/invuln/joey/attackby(obj/item/W, mob/user)
attacked()
return ..()

/obj/structure/prop/invuln/joey/bullet_act(obj/item/projectile/P)
attacked()
return ..()

/// A terrible way of handling being hit. If signals would work it should be used.
/obj/structure/prop/invuln/joey/proc/attacked()
if(COOLDOWN_FINISHED(src, damage_delay) && prob(25))
emote(pick(damaged))
COOLDOWN_START(src, damage_delay, 8 SECONDS)

/// SAY THE LINE JOE
/obj/structure/prop/invuln/joey/proc/emote(datum/emote/living/carbon/human/synthetic/working_joe/emote)
if (!emote)
return FALSE

for(var/mob/mob in hearers(src, null))
mob.show_message("<span class='game say'><span class='name'>[src]</span> says, \"[initial(emote.say_message)]\"</span>", SHOW_MESSAGE_AUDIBLE)

var/list/viewers = get_mobs_in_view(7, src)
for(var/mob/current_mob in viewers)
if(!(current_mob.client?.prefs.toggles_langchat & LANGCHAT_SEE_EMOTES))
viewers -= current_mob
langchat_speech(initial(emote.say_message), viewers, GLOB.all_languages, skip_language_check = TRUE)

if(initial(emote.sound))
playsound(loc, initial(emote.sound), 50, FALSE)
return TRUE

1 change: 1 addition & 0 deletions code/modules/admin/verbs/adminhelp.dm
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)

AddInteraction("Deferred to Mentors by [key_name_admin(usr)].", player_message = "Deferred to Mentors.")
to_chat(initiator, SPAN_ADMINHELP("Your ticket has been deferred to Mentors."))
log_admin_private("Ticket [TicketHref("#[id]")] deferred to mentors by [usr.key].")
log_ahelp(id, "Defer", "Deferred to mentors by [usr.key]", null, usr.ckey)
Close(silent = TRUE)

Expand Down
Loading

0 comments on commit fcced55

Please sign in to comment.