Skip to content

Commit

Permalink
Merge remote-tracking branch 'cmss13-devs/master' into project/corsat
Browse files Browse the repository at this point in the history
  • Loading branch information
realforest2001 committed May 10, 2024
2 parents 42471cd + 2478f9e commit ffec957
Show file tree
Hide file tree
Showing 169 changed files with 2,649 additions and 773 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
10 changes: 9 additions & 1 deletion code/__DEFINES/dcs/signals/atom/signals_obj.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,16 @@
#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 /datum/cm_objective/retrieve_data/disk/process()
#define COMSIG_INTEL_DISK_LOST_POWER "intel_disk_lost_power"

/// from /datum/cm_objective/retrieve_data/disk/complete()
#define COMSIG_INTEL_DISK_COMPLETED "intel_disk_completed"

/// from /obj/vehicle/multitile/arc/toggle_antenna()
#define COMSIG_ARC_ANTENNA_TOGGLED "arc_antenna_toggled"
/// from /obj/structure/machinery/cryopod/go_out()
#define COMSIG_CRYOPOD_GO_OUT "cryopod_go_out"

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
2 changes: 1 addition & 1 deletion code/__DEFINES/vehicle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#define HDPT_TURRET "turret"
#define HDPT_SPECIAL "special" //special pre-installed hardpoints with unique behaviour

#define HDPT_LAYER_WHEELS 1
#define HDPT_LAYER_WHEELS 0.01 // so it appears below xenomorphs and other mobs
#define HDPT_LAYER_SUPPORT 2
#define HDPT_LAYER_ARMOR 3
#define HDPT_LAYER_TURRET 4
Expand Down
3 changes: 2 additions & 1 deletion code/_onclick/item_attack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
return FALSE

/atom/movable/attackby(obj/item/W, mob/living/user)
if(W)
. = ..()
if(W && !.)
if(!(W.flags_item & NOBLUDGEON))
visible_message(SPAN_DANGER("[src] has been hit by [user] with [W]."), null, null, 5, CHAT_TYPE_MELEE_HIT)
user.animation_attack_on(src)
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystem/ticker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ SUBSYSTEM_DEF(ticker)

var/totalPlayers = 0 //used for pregame stats on statpanel
var/totalPlayersReady = 0 //used for pregame stats on statpanel
var/tutorial_disabled = FALSE //zonenote
var/tutorial_disabled = FALSE

/datum/controller/subsystem/ticker/Initialize(timeofday)
load_mode()
Expand Down
14 changes: 14 additions & 0 deletions code/datums/ammo/bullet/arc.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/datum/ammo/bullet/re700
name = "rotary cannon bullet"
icon_state = "autocannon"
damage_falloff = 0
flags_ammo_behavior = AMMO_BALLISTIC

accuracy = HIT_ACCURACY_TIER_7
scatter = 0
damage = 30
damage_var_high = PROJECTILE_VARIANCE_TIER_8
penetration = ARMOR_PENETRATION_TIER_2
accurate_range = 10
max_range = 12
shell_speed = AMMO_SPEED_TIER_6
87 changes: 87 additions & 0 deletions code/datums/components/disk_reader.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
/datum/component/disk_reader
dupe_mode = COMPONENT_DUPE_UNIQUE
/// Ref to the inserted disk
var/obj/item/disk/objective/disk

/datum/component/disk_reader/Initialize()
. = ..()
if(!istype(parent, /obj/structure/machinery))
return COMPONENT_INCOMPATIBLE

/datum/component/disk_reader/Destroy(force, silent)
handle_qdel()
return ..()

/datum/component/disk_reader/RegisterWithParent()
..()
RegisterSignal(parent, COMSIG_PARENT_ATTACKBY, PROC_REF(on_disk_insert))
RegisterSignal(parent, COMSIG_PARENT_QDELETING, PROC_REF(handle_qdel))
RegisterSignal(parent, COMSIG_INTEL_DISK_COMPLETED, PROC_REF(on_disk_complete))
RegisterSignal(parent, COMSIG_INTEL_DISK_LOST_POWER, PROC_REF(on_power_lost))

/datum/component/disk_reader/UnregisterFromParent()
..()
handle_qdel()

/datum/component/disk_reader/proc/handle_qdel()
SIGNAL_HANDLER
QDEL_NULL(disk)

/datum/component/disk_reader/proc/on_disk_insert(datum/source, obj/item/disk/objective/potential_disk, mob/living/inserter, params)
SIGNAL_HANDLER

if(!istype(potential_disk) || !potential_disk.objective)
return

if(disk)
to_chat(inserter, SPAN_WARNING("There's already a disk inside [parent], wait for it to finish first!"))
return COMPONENT_NO_AFTERATTACK

if(potential_disk.objective.state == OBJECTIVE_COMPLETE)
to_chat(inserter, SPAN_WARNING("The reader displays a message stating this disk has already been read and refuses to accept it."))
return COMPONENT_NO_AFTERATTACK

INVOKE_ASYNC(src, PROC_REF(handle_disk_insert), potential_disk, inserter)
return COMPONENT_NO_AFTERATTACK

/datum/component/disk_reader/proc/handle_disk_insert(obj/item/disk/objective/potential_disk, mob/living/inserter)
if(tgui_input_text(inserter, "Enter the encryption key", "Decrypting [potential_disk]", "") != potential_disk.objective.decryption_password)
to_chat(inserter, SPAN_WARNING("The reader buzzes, ejecting the disk."))
return

if(disk)
to_chat(inserter, SPAN_WARNING("There's already a disk inside [parent], wait for it to finish first!"))
return

if(!(potential_disk in inserter.contents))
return

potential_disk.objective.activate()

inserter.drop_inv_item_to_loc(potential_disk, parent)
disk = potential_disk
to_chat(inserter, SPAN_NOTICE("You insert [potential_disk] and enter the decryption key."))
inserter.count_niche_stat(STATISTICS_NICHE_DISK)

/datum/component/disk_reader/proc/on_disk_complete(datum/source)
SIGNAL_HANDLER
var/atom/atom_parent = parent

atom_parent.visible_message("[atom_parent] pings softly as the upload finishes and ejects [disk].")
playsound(atom_parent, 'sound/machines/screen_output1.ogg', 25, 1)
disk.forceMove(get_turf(atom_parent))
disk.name = "[disk.name] (complete)"
disk.objective.award_points()
disk.retrieve_objective.state = OBJECTIVE_ACTIVE
disk.retrieve_objective.activate()
disk = null

/datum/component/disk_reader/proc/on_power_lost(datum/source)
SIGNAL_HANDLER
var/atom/atom_parent = parent

atom_parent.visible_message(SPAN_WARNING("[atom_parent] powers down mid-operation as the area loses power."))
playsound(atom_parent, 'sound/machines/terminal_shutdown.ogg', 25, 1)
SSobjectives.stop_processing_objective(src)
disk.forceMove(get_turf(atom_parent))
disk = null
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
2 changes: 1 addition & 1 deletion code/datums/elements/bullet_trait/iff.dm
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
// The cache is reset when the user drops their ID
/datum/element/bullet_trait_iff/proc/get_user_iff_group(mob/living/carbon/human/user)
if(!ishuman(user))
return user.faction_group
return user?.faction_group

var/iff_group = LAZYACCESS(iff_group_cache, user)
if(isnull(iff_group))
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
8 changes: 6 additions & 2 deletions code/datums/skills/uscm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,8 @@ COMMAND STAFF
SKILL_JTAC = SKILL_JTAC_MASTER,
SKILL_SPEC_WEAPONS = SKILL_SPEC_ALL,
SKILL_EXECUTION = SKILL_EXECUTION_TRAINED, //can BE people
SKILL_INTEL = SKILL_INTEL_EXPERT
SKILL_INTEL = SKILL_INTEL_EXPERT,
SKILL_VEHICLE = SKILL_VEHICLE_LARGE,
)

/datum/skills/commander
Expand All @@ -261,7 +262,8 @@ COMMAND STAFF
SKILL_JTAC = SKILL_JTAC_MASTER,
SKILL_EXECUTION = SKILL_EXECUTION_TRAINED, //can BE people
SKILL_INTEL = SKILL_INTEL_EXPERT,
SKILL_NAVIGATIONS = SKILL_NAVIGATIONS_TRAINED //can change ship alt
SKILL_NAVIGATIONS = SKILL_NAVIGATIONS_TRAINED, //can change ship alt
SKILL_VEHICLE = SKILL_VEHICLE_LARGE,
)

/datum/skills/XO
Expand All @@ -282,6 +284,7 @@ COMMAND STAFF
SKILL_JTAC = SKILL_JTAC_MASTER,
SKILL_INTEL = SKILL_INTEL_EXPERT,
SKILL_NAVIGATIONS = SKILL_NAVIGATIONS_TRAINED,
SKILL_VEHICLE = SKILL_VEHICLE_LARGE,
)

/datum/skills/SO
Expand All @@ -299,6 +302,7 @@ COMMAND STAFF
SKILL_POWERLOADER = SKILL_POWERLOADER_TRAINED,
SKILL_JTAC = SKILL_JTAC_EXPERT,
SKILL_INTEL = SKILL_INTEL_TRAINED,
SKILL_VEHICLE = SKILL_VEHICLE_LARGE,
)

/datum/skills/SEA
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,
)
Loading

0 comments on commit ffec957

Please sign in to comment.