Skip to content

Commit

Permalink
Merge branch 'master' into XM43E1-alt2
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaga-404 authored May 5, 2024
2 parents 1e8679f + aca1e69 commit f2326a1
Show file tree
Hide file tree
Showing 119 changed files with 2,338 additions and 2,878 deletions.
8 changes: 3 additions & 5 deletions code/__DEFINES/admin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,10 @@
#define NOTE_ADMIN 1
///This note is used by staff for positive record keeping.
#define NOTE_MERIT 2
///These notes are used by respective whitelist councils for record keeping.
#define NOTE_COMMANDER 3
#define NOTE_SYNTHETIC 4
#define NOTE_YAUTJA 5
///These notes are automatically applied by the Whitelist Panel.
#define NOTE_WHITELIST 3
///Note categories in text form, in order of their numerical #defines.
GLOBAL_LIST_INIT(note_categories, list("Admin", "Merit", "Commanding Officer", "Synthetic", "Yautja"))
GLOBAL_LIST_INIT(note_categories, list("Admin", "Merit", "Whitelist"))

#define ADMIN_FLW(user) "(<a href='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];adminplayerobservefollow=[REF(user)]'>FLW</a>)"
#define ADMIN_PP(user) "(<a href='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];adminplayeropts=[REF(user)]'>PP</a>)"
Expand Down
2 changes: 1 addition & 1 deletion code/__DEFINES/dcs/signals/atom/signals_obj.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#define COMSIG_TENT_COLLAPSING "tent_collapsing"

/// from /obj/proc/afterbuckle()
#define COSMIG_OBJ_AFTER_BUCKLE "signal_obj_after_buckle"
#define COMSIG_OBJ_AFTER_BUCKLE "signal_obj_after_buckle"

/// from /obj/structure/machinery/cryopod/go_out()
#define COMSIG_CRYOPOD_GO_OUT "cryopod_go_out"
Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/dcs/signals/signals_global.dm
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@
/// From /proc/biohazard_lockdown()
#define COMSIG_GLOB_RESEARCH_LOCKDOWN "!research_lockdown_closed"
#define COMSIG_GLOB_RESEARCH_LIFT "!research_lockdown_opened"
/// From /proc/aicore_lockdown()
#define COMSIG_GLOB_AICORE_LOCKDOWN "!aicore_lockdown_closed"
#define COMSIG_GLOB_AICORE_LIFT "!aicore_lockdown_opened"

/// From /obj/structure/machinery/power/reactor/proc/set_overloading() : (set_overloading)
#define COMSIG_GLOB_GENERATOR_SET_OVERLOADING "!generator_set_overloading"
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ GLOBAL_LIST_INIT(job_command_roles, JOB_COMMAND_ROLES_LIST)

//-------- WY Goons --------//
#define JOB_WY_GOON "WY Corporate Security"
#define JOB_WY_GOON_TECH "WY Corporate Security Technician"
#define JOB_WY_GOON_LEAD "WY Corporate Security Lead"
#define JOB_WY_GOON_RESEARCHER "WY Research Consultant"

Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@
#define CANDAZE (1<<18)
#define CANSLOW (1<<19)
#define NO_PERMANENT_DAMAGE (1<<20)
#define CORRUPTED_ALLY (1<<21)

// =============================
// hive types
Expand Down
22 changes: 11 additions & 11 deletions code/datums/components/weed_food.dm
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
parent_buckle = null

/datum/component/weed_food/RegisterWithParent()
RegisterSignal(parent_mob, COMSIG_MOVABLE_MOVED, PROC_REF(on_move))
RegisterSignal(parent_mob, COMSIG_MOVABLE_TURF_ENTERED, PROC_REF(on_move))
RegisterSignal(parent_mob, list(COMSIG_LIVING_REJUVENATED, COMSIG_HUMAN_REVIVED), PROC_REF(on_rejuv))
RegisterSignal(parent_mob, COMSIG_HUMAN_SET_UNDEFIBBABLE, PROC_REF(on_update))
RegisterSignal(parent_mob, COMSIG_LIVING_PREIGNITION, PROC_REF(on_preignition))
Expand All @@ -98,7 +98,7 @@
/datum/component/weed_food/UnregisterFromParent()
if(parent_mob)
UnregisterSignal(parent_mob, list(
COMSIG_MOVABLE_MOVED,
COMSIG_MOVABLE_TURF_ENTERED,
COMSIG_LIVING_REJUVENATED,
COMSIG_HUMAN_REVIVED,
COMSIG_HUMAN_SET_UNDEFIBBABLE,
Expand All @@ -109,12 +109,12 @@
if(parent_turf)
UnregisterSignal(parent_turf, COMSIG_WEEDNODE_GROWTH)
if(parent_buckle)
UnregisterSignal(parent_buckle, COSMIG_OBJ_AFTER_BUCKLE)
UnregisterSignal(parent_buckle, COMSIG_OBJ_AFTER_BUCKLE)
if(parent_nest)
UnregisterSignal(parent_nest, COMSIG_PARENT_QDELETING)
UnregisterSignal(SSdcs, COMSIG_GLOB_GROUNDSIDE_FORSAKEN_HANDLING)

/// SIGNAL_HANDLER for COMSIG_MOVABLE_MOVED
/// SIGNAL_HANDLER for COMSIG_MOVABLE_TURF_ENTERED
/datum/component/weed_food/proc/on_move()
SIGNAL_HANDLER

Expand Down Expand Up @@ -148,7 +148,7 @@

qdel(src)

/// SIGNAL_HANDLER for COSMIG_OBJ_AFTER_BUCKLE
/// SIGNAL_HANDLER for COMSIG_OBJ_AFTER_BUCKLE
/datum/component/weed_food/proc/on_after_buckle(obj/source, mob/buckled)
SIGNAL_HANDLER

Expand Down Expand Up @@ -220,12 +220,12 @@
return FALSE // Still buckled to the same thing
if(!istype(parent_mob.buckled, /obj/structure/bed/nest))
if(parent_buckle) // Still have a lingering reference somehow?
UnregisterSignal(parent_buckle, COSMIG_OBJ_AFTER_BUCKLE)
UnregisterSignal(parent_buckle, COMSIG_OBJ_AFTER_BUCKLE)
parent_buckle = parent_mob.buckled
RegisterSignal(parent_mob.buckled, COSMIG_OBJ_AFTER_BUCKLE, PROC_REF(on_after_buckle))
RegisterSignal(parent_mob.buckled, COMSIG_OBJ_AFTER_BUCKLE, PROC_REF(on_after_buckle))
return FALSE
if(parent_buckle)
UnregisterSignal(parent_buckle, COSMIG_OBJ_AFTER_BUCKLE)
UnregisterSignal(parent_buckle, COMSIG_OBJ_AFTER_BUCKLE)
parent_buckle = null

if(parent_mob.is_xeno_grabbable())
Expand Down Expand Up @@ -282,16 +282,16 @@
return FALSE // Still buckled to the same thing somehow?
if(!istype(parent_mob.buckled, /obj/structure/bed/nest))
if(parent_buckle) // Still have a lingering reference somehow?
UnregisterSignal(parent_buckle, COSMIG_OBJ_AFTER_BUCKLE)
UnregisterSignal(parent_buckle, COMSIG_OBJ_AFTER_BUCKLE)
parent_buckle = parent_mob.buckled
RegisterSignal(parent_mob.buckled, COSMIG_OBJ_AFTER_BUCKLE, PROC_REF(on_after_buckle))
RegisterSignal(parent_mob.buckled, COMSIG_OBJ_AFTER_BUCKLE, PROC_REF(on_after_buckle))
return FALSE
else
parent_nest = parent_mob.buckled
RegisterSignal(parent_nest, COMSIG_PARENT_QDELETING, PROC_REF(on_nest_deletion))

if(parent_buckle)
UnregisterSignal(parent_buckle, COSMIG_OBJ_AFTER_BUCKLE)
UnregisterSignal(parent_buckle, COMSIG_OBJ_AFTER_BUCKLE)
parent_buckle = null

if(SEND_SIGNAL(parent_mob, COMSIG_ATTEMPT_MOB_PULL) & COMPONENT_CANCEL_MOB_PULL)
Expand Down
4 changes: 4 additions & 0 deletions code/datums/effects/neurotoxin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@
return FALSE
if(affected_mob.stat == DEAD)
return

if(issynth(affected_atom))
return

// General effects
affected_mob.last_damage_data = cause_data
affected_mob.apply_stamina_damage(stam_dam)
Expand Down
19 changes: 12 additions & 7 deletions code/datums/entities/player.dm
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,12 @@ BSQL_PROTECT_DATUM(/datum/entity/player)
/datum/entity/player/proc/add_note(note_text, is_confidential, note_category = NOTE_ADMIN, is_ban = FALSE, duration = null)
var/client/admin = usr.client
// do all checks here, especially for sensitive stuff like this
if(!admin || !admin.player_data)
return FALSE
if(note_category == NOTE_ADMIN || is_confidential)
if (!AHOLD_IS_MOD(admin.admin_holder))
if(!(note_category == NOTE_WHITELIST))
if(!admin || !admin.player_data)
return FALSE
if(note_category == NOTE_ADMIN || is_confidential)
if (!AHOLD_IS_MOD(admin.admin_holder))
return FALSE

// this is here for a short transition period when we still are testing DB notes and constantly deleting the file
if(CONFIG_GET(flag/duplicate_notes_to_file))
Expand All @@ -119,7 +120,7 @@ BSQL_PROTECT_DATUM(/datum/entity/player)
note.note_category = note_category
note.is_ban = is_ban
note.ban_time = duration
note.admin_rank = admin.admin_holder.rank
note.admin_rank = admin.admin_holder ? admin.admin_holder.rank : "Non-Staff"
// since admin is in game, their player_data has to be populated. This is also checked above
note.admin_id = admin.player_data.id
note.admin = admin.player_data
Expand All @@ -134,13 +135,17 @@ BSQL_PROTECT_DATUM(/datum/entity/player)
notes.Add(note)
return TRUE

/datum/entity/player/proc/remove_note(note_id)
/datum/entity/player/proc/remove_note(note_id, whitelist = FALSE)
if(IsAdminAdvancedProcCall())
return PROC_BLOCKED
var/client/admin = usr.client
// do all checks here, especially for sensitive stuff like this
if(!admin || !admin.player_data)
return FALSE

if (!AHOLD_IS_MOD(admin.admin_holder))
if((!AHOLD_IS_MOD(admin.admin_holder)) && !whitelist)
return FALSE
if(whitelist && !(isSenator(admin) || CLIENT_HAS_RIGHTS(admin, R_PERMISSIONS)))
return FALSE

// this is here for a short transition period when we still are testing DB notes and constantly deleting the file
Expand Down
4 changes: 4 additions & 0 deletions code/datums/mob_hud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,10 @@ GLOBAL_LIST_INIT_TYPED(huds, /datum/mob_hud, list(
if(hive && hive.color)
holder3.color = hive.color

if(status_flags & CORRUPTED_ALLY)
holder4.color = "#80ff80"
holder4.icon_state = "hudalien_ally"

if(stat == DEAD || status_flags & FAKEDEATH)
if(revive_enabled)
if(!client)
Expand Down
36 changes: 36 additions & 0 deletions code/datums/skills/wygoons.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/datum/skills/wy_goon
name = "Corporate Security"
skills = list(
SKILL_CQC = SKILL_CQC_SKILLED,
SKILL_POLICE = SKILL_POLICE_SKILLED,
SKILL_FIREMAN = SKILL_FIREMAN_SKILLED,
SKILL_ENDURANCE = SKILL_ENDURANCE_TRAINED,
SKILL_MELEE_WEAPONS = SKILL_MELEE_TRAINED,
)

/datum/skills/wy_goon_tech
name = "Corporate Security Support Technician"
skills = list(
SKILL_CQC = SKILL_CQC_SKILLED,
SKILL_POLICE = SKILL_POLICE_SKILLED,
SKILL_FIREMAN = SKILL_FIREMAN_TRAINED,
SKILL_ENDURANCE = SKILL_ENDURANCE_TRAINED,
SKILL_MELEE_WEAPONS = SKILL_MELEE_TRAINED,
SKILL_MEDICAL = SKILL_MEDICAL_TRAINED,
SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI,
SKILL_ENGINEER = SKILL_ENGINEER_ENGI,
)

/datum/skills/wy_goon_lead
name = "Corporate Security Leader"
skills = list(
SKILL_CQC = SKILL_CQC_SKILLED,
SKILL_POLICE = SKILL_POLICE_SKILLED,
SKILL_FIREMAN = SKILL_FIREMAN_SKILLED,
SKILL_ENDURANCE = SKILL_ENDURANCE_TRAINED,
SKILL_MELEE_WEAPONS = SKILL_MELEE_TRAINED,
SKILL_MEDICAL = SKILL_MEDICAL_TRAINED,
SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_ENGI,
SKILL_ENGINEER = SKILL_ENGINEER_ENGI,
SKILL_LEADERSHIP = SKILL_LEAD_TRAINED,
)
19 changes: 12 additions & 7 deletions code/defines/procs/announcement.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,19 @@
continue
if(is_mainship_level(H.z)) // People on ship see everything
continue

// If they have iff AND a marine headset they will recieve announcements
if ((FACTION_MARINE in H.wear_id?.faction_group) && (istype(H.wear_l_ear, /obj/item/device/radio/headset/almayer) || istype(H.wear_r_ear, /obj/item/device/radio/headset/almayer)))
continue

if((H.faction != faction_to_display && !add_PMCs) || (H.faction != faction_to_display && add_PMCs && !(H.faction in FACTION_LIST_WY)) && !(faction_to_display in H.faction_group)) //faction checks
targets.Remove(H)

switch(logging)
if(ARES_LOG_MAIN)
log_ares_announcement(title, message)
log_ares_announcement(title, message, signature)
if(ARES_LOG_SECURITY)
log_ares_security(title, message)
log_ares_security(title, message, signature)

else if(faction_to_display == "Everyone (-Yautja)")
for(var/mob/M in targets)
Expand Down Expand Up @@ -98,9 +103,9 @@

switch(logging)
if(ARES_LOG_MAIN)
log_ares_announcement("[MAIN_AI_SYSTEM] Comms Update", message)
log_ares_announcement("Comms Update", message, MAIN_AI_SYSTEM)
if(ARES_LOG_SECURITY)
log_ares_security("[MAIN_AI_SYSTEM] Security Update", message)
log_ares_security("Security Update", message, MAIN_AI_SYSTEM)

/proc/ai_silent_announcement(message, channel_prefix, bypass_cooldown = FALSE)
if(!message)
Expand Down Expand Up @@ -133,9 +138,9 @@
message += "<br><br><i> Signed by, <br> [signature]</i>"
switch(ares_logging)
if(ARES_LOG_MAIN)
log_ares_announcement(title, message)
log_ares_announcement(title, message, signature)
if(ARES_LOG_SECURITY)
log_ares_security(title, message)
log_ares_security(title, message, signature)

announcement_helper(message, title, targets, sound_to_play)

Expand All @@ -148,7 +153,7 @@
if(!ishuman(T) || isyautja(T) || !is_mainship_level((get_turf(T))?.z))
targets.Remove(T)

log_ares_announcement("[title] Shipwide Update", message)
log_ares_announcement("Shipwide Update", message, title)

announcement_helper(message, title, targets, sound_to_play)

Expand Down
Loading

0 comments on commit f2326a1

Please sign in to comment.