diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
index 339d48c9fe39..c66b16031c63 100644
--- a/.github/CONTRIBUTING.md
+++ b/.github/CONTRIBUTING.md
@@ -167,20 +167,6 @@ Certain PRs, such as those which directly change number values (i.e. health, rec
* We understand that having something you have worked on for quite some time being denied can be frustrating. Therefore, it is recommended that you check with a maintainer before beginning to code your PR if you have any doubts that it will be accepted. This will save everyone's time and energy.
-## Good Boy Points
-
-Each GitHub account has a score known as Good Boy Points, or GBP. This is a system we use to ensure that the codebase stays maintained and that contributors fix bugs as well as add features.
-
-The GBP gain or loss for a PR depends on the type of changes the PR makes, represented by the tags assigned to the PR by the CM-SS13 github bot or maintainers. Generally speaking, fixing bugs, updating sprites, or improving maps increases your GBP score, while adding mechanics, or rebalancing things will cost you GBP.
-
-The GBP change of a PR is the sum of greatest positive and lowest negative values it has. For example, a PR that has tags worth +10, +4, -1, -7, will net 3 GBP (10 - 7).
-
-Negative GBP increases the likelihood of a maintainer closing your PR. With that chance being higher the lower your GBP is. Be sure to use the proper tags in the changelog to prevent unnecessary GBP loss. Maintainers reserve the right to change tags as they deem appropriate.
-
-There is no benefit to having a higher positive GBP score, since GBP only comes into consideration when it is negative.
-
-You can see each tag and their GBP values [Here](https://github.com/cmss13-devs/cmss13/blob/master/.github/gbp.toml).
-
## Porting features/sprites/sounds/tools from other codebases
If you are porting features/tools from other codebases, you must give them credit where it's due. Typically, crediting them in your pull request and the changelog is the recommended way of doing it. Take note of what license they use though, porting stuff from AGPLv3 and GPLv3 codebases are allowed.
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index 8f8ccbe07f60..cb1790053744 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -26,8 +26,8 @@ Put screenshots and videos here with an empty line between the screenshots and t
# Changelog
-
-
+
+
:cl:
add: Added something
diff --git a/.github/alternate_byond_versions.txt b/.github/alternate_byond_versions.txt
index f25861c46714..005803964cca 100644
--- a/.github/alternate_byond_versions.txt
+++ b/.github/alternate_byond_versions.txt
@@ -6,4 +6,4 @@
# Example:
# 500.1337: runtimestation
-515.1603: lv624
+515.1610: lv624
diff --git a/.github/gbp.toml b/.github/gbp.toml
deleted file mode 100644
index 85dd702803e2..000000000000
--- a/.github/gbp.toml
+++ /dev/null
@@ -1,23 +0,0 @@
-no_balance_label = "GBP: No Update"
-reset_label = "GBP: Reset"
-
-[points]
-"Accessibility" = 3
-"Admin" = 2
-"Atomic" = 2
-"Balance" = -5
-"Code Improvement" = 2
-"Fix" = 3
-"Grammar and Formatting" = 1
-"Hard Deletes" = 12
-"Logging" = 1
-"Feature" = -5
-"Performance" = 12
-"Priority: CRITICAL" = 20
-"Priority: High" = 15
-"Quality of Life" = 1
-"Refactor" = 6
-"Roadmap" = 15
-"Sound" = 3
-"Sprites" = 3
-"UI" = 3
diff --git a/.github/workflows/gbp.yml b/.github/workflows/gbp.yml
deleted file mode 100644
index 9c92e5f379dc..000000000000
--- a/.github/workflows/gbp.yml
+++ /dev/null
@@ -1,42 +0,0 @@
-name: GBP
-on:
- pull_request_target:
- types: [closed, opened]
-jobs:
- gbp:
- runs-on: ubuntu-latest
- steps:
- - name: "Check for ACTION_ENABLER secret and pass true to output if it exists to be checked by later steps"
- id: value_holder
- env:
- ENABLER_SECRET: ${{ secrets.ACTION_ENABLER }}
- run: |
- unset SECRET_EXISTS
- if [ -n "$ENABLER_SECRET" ]; then SECRET_EXISTS=true ; fi
- echo "::set-output name=ACTIONS_ENABLED::$SECRET_EXISTS"
- - name: Checkout
- if: steps.value_holder.outputs.ACTIONS_ENABLED
- uses: actions/checkout@v3
- - name: Setup git
- if: steps.value_holder.outputs.ACTIONS_ENABLED
- run: |
- git config --global user.name "gbp-action"
- git config --global user.email "<>"
- - name: Checkout alternate branch
- if: steps.value_holder.outputs.ACTIONS_ENABLED
- uses: actions/checkout@v3
- with:
- ref: "gbp-balances" # The branch name
- path: gbp-balances
- # This is to ensure we keep the gbp.toml from master
- # without having to update our separate branch.
- - name: Copy configuration
- if: steps.value_holder.outputs.ACTIONS_ENABLED
- run: cp ./.github/gbp.toml ./gbp-balances/.github/gbp.toml
- - name: GBP action
- if: steps.value_holder.outputs.ACTIONS_ENABLED
- uses: tgstation/gbp-action@master
- with:
- branch: "gbp-balances"
- directory: ./gbp-balances
- token: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/gbp_collect.yml b/.github/workflows/gbp_collect.yml
deleted file mode 100644
index dc2af17a12de..000000000000
--- a/.github/workflows/gbp_collect.yml
+++ /dev/null
@@ -1,44 +0,0 @@
-name: GBP Collection
-# Every hour at the :20 minute mark. GitHub tells us to pick odd hours, instead of just using the start.
-on:
- schedule:
- - cron: "20 * * * *"
- workflow_dispatch:
-jobs:
- gbp_collection:
- runs-on: ubuntu-latest
- steps:
- - name: "Check for ACTION_ENABLER secret and pass true to output if it exists to be checked by later steps"
- id: value_holder
- env:
- ENABLER_SECRET: ${{ secrets.ACTION_ENABLER }}
- run: |
- unset SECRET_EXISTS
- if [ -n "$ENABLER_SECRET" ]; then SECRET_EXISTS=true ; fi
- echo "::set-output name=ACTIONS_ENABLED::$SECRET_EXISTS"
- - name: Checkout
- if: steps.value_holder.outputs.ACTIONS_ENABLED
- uses: actions/checkout@v3
- - name: Setup git
- if: steps.value_holder.outputs.ACTIONS_ENABLED
- run: |
- git config --global user.name "github-actions[bot]"
- git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
- - name: Checkout alternate branch
- if: steps.value_holder.outputs.ACTIONS_ENABLED
- uses: actions/checkout@v3
- with:
- ref: "gbp-balances" # The branch name
- path: gbp-balances
- # This is to ensure we keep the gbp.toml from master
- # without having to update our separate branch.
- - name: Copy configuration
- if: steps.value_holder.outputs.ACTIONS_ENABLED
- run: cp ./.github/gbp.toml ./gbp-balances/.github/gbp.toml
- - name: GBP action
- if: steps.value_holder.outputs.ACTIONS_ENABLED
- uses: tgstation/gbp-action@master
- with:
- collect: "true"
- directory: ./gbp-balances
- token: ${{ secrets.GITHUB_TOKEN }}
diff --git a/code/__DEFINES/access.dm b/code/__DEFINES/access.dm
index a40675e0560e..dcc8e4bf6c4b 100644
--- a/code/__DEFINES/access.dm
+++ b/code/__DEFINES/access.dm
@@ -71,3 +71,11 @@ most of them are tied into map-placed objects. This should be reworked in the fu
#define ACCESS_WY_CORPORATE_DS 202
#define ACCESS_PRESS 203
//=================================================
+
+// Yautja Access Levels
+/// Requires a visible ID chip to open
+#define ACCESS_YAUTJA_SECURE 250
+/// Elders+ only
+#define ACCESS_YAUTJA_ELDER 251
+/// Ancients only
+#define ACCESS_YAUTJA_ANCIENT 252
diff --git a/code/__DEFINES/autofire.dm b/code/__DEFINES/autofire.dm
new file mode 100644
index 000000000000..934cdcd7dc79
--- /dev/null
+++ b/code/__DEFINES/autofire.dm
@@ -0,0 +1,4 @@
+// Controls how many buckets should be kept, each representing a tick. Max is ten seconds, to have better perf.
+#define AUTOFIRE_BUCKET_LEN (world.fps * 10)
+/// Helper for getting the correct bucket
+#define AUTOFIRE_BUCKET_POS(next_fire) (((round((next_fire - SSautomatedfire.head_offset) / world.tick_lag) + 1) % AUTOFIRE_BUCKET_LEN) || AUTOFIRE_BUCKET_LEN)
diff --git a/code/__DEFINES/clans.dm b/code/__DEFINES/clans.dm
index 54c9d11616e5..1b95d11c030c 100644
--- a/code/__DEFINES/clans.dm
+++ b/code/__DEFINES/clans.dm
@@ -49,14 +49,14 @@
/// Scales with clan size
#define CLAN_LIMIT_SIZE 2
-var/global/list/datum/rank/clan_ranks = list(
- CLAN_RANK_UNBLOODED = new /datum/rank/unblooded(),
- CLAN_RANK_YOUNG = new /datum/rank/young(),
- CLAN_RANK_BLOODED = new /datum/rank/blooded(),
- CLAN_RANK_ELITE = new /datum/rank/elite(),
- CLAN_RANK_ELDER = new /datum/rank/elder(),
- CLAN_RANK_LEADER = new /datum/rank/leader(),
- CLAN_RANK_ADMIN = new /datum/rank/ancient()
+var/global/list/datum/yautja_rank/clan_ranks = list(
+ CLAN_RANK_UNBLOODED = new /datum/yautja_rank/unblooded(),
+ CLAN_RANK_YOUNG = new /datum/yautja_rank/young(),
+ CLAN_RANK_BLOODED = new /datum/yautja_rank/blooded(),
+ CLAN_RANK_ELITE = new /datum/yautja_rank/elite(),
+ CLAN_RANK_ELDER = new /datum/yautja_rank/elder(),
+ CLAN_RANK_LEADER = new /datum/yautja_rank/leader(),
+ CLAN_RANK_ADMIN = new /datum/yautja_rank/ancient()
)
var/global/list/clan_ranks_ordered = list(
diff --git a/code/__DEFINES/conflict.dm b/code/__DEFINES/conflict.dm
index fc8ca4e03a9f..7a1b322a19ee 100644
--- a/code/__DEFINES/conflict.dm
+++ b/code/__DEFINES/conflict.dm
@@ -54,30 +54,24 @@
#define GUN_TRIGGER_SAFETY (1<<1)
#define GUN_UNUSUAL_DESIGN (1<<2)
#define GUN_SILENCED (1<<3)
-#define GUN_AUTOMATIC (1<<4)
///If checking for ammo with current.mag you have to check it against numerical values, as booleans will not trigger.
-#define GUN_INTERNAL_MAG (1<<5)
-#define GUN_AUTO_EJECTOR (1<<6)
-#define GUN_AMMO_COUNTER (1<<7)
-#define GUN_BURST_ON (1<<8)
-#define GUN_BURST_FIRING (1<<9)
-#define GUN_FLASHLIGHT_ON (1<<10)
-#define GUN_WY_RESTRICTED (1<<11)
-#define GUN_SPECIALIST (1<<12)
-#define GUN_WIELDED_FIRING_ONLY (1<<13)
-#define GUN_HAS_FULL_AUTO (1<<14)
-#define GUN_FULL_AUTO_ON (1<<15)
+#define GUN_INTERNAL_MAG (1<<4)
+#define GUN_AUTO_EJECTOR (1<<5)
+#define GUN_AMMO_COUNTER (1<<6)
+#define GUN_BURST_FIRING (1<<7)
+#define GUN_FLASHLIGHT_ON (1<<8)
+#define GUN_WY_RESTRICTED (1<<9)
+#define GUN_SPECIALIST (1<<10)
+#define GUN_WIELDED_FIRING_ONLY (1<<11)
/// removes unwielded accuracy and scatter penalties (not recoil)
-#define GUN_ONE_HAND_WIELDED (1<<16)
-#define GUN_ANTIQUE (1<<17)
+#define GUN_ONE_HAND_WIELDED (1<<12)
+#define GUN_ANTIQUE (1<<13)
/// Whether the gun has been fired by its current user (reset upon `dropped()`)
-#define GUN_RECOIL_BUILDUP (1<<18)
+#define GUN_RECOIL_BUILDUP (1<<14)
/// support weapon, bipod will grant IFF
-#define GUN_SUPPORT_PLATFORM (1<<19)
-#define GUN_BURST_ONLY (1<<20)
-#define GUN_FULL_AUTO_ONLY (1<<21)
+#define GUN_SUPPORT_PLATFORM (1<<15)
/// No gun description, only base desc
-#define GUN_NO_DESCRIPTION (1<<22)
+#define GUN_NO_DESCRIPTION (1<<16)
// NOTE: Don't add flags past 1<<23, it'll break things due to BYOND limitations. You can usually use a Component instead.
#define USES_STREAKS (1<<0)
@@ -85,15 +79,17 @@
#define MOVES_WHEN_LEVERING (1<<2)
//Gun attachable related flags.
-#define ATTACH_REMOVABLE 1
-#define ATTACH_ACTIVATION 2
+#define ATTACH_REMOVABLE (1<<0)
+#define ATTACH_ACTIVATION (1<<1)
/// for attachments that fire bullets
-#define ATTACH_PROJECTILE 4
-#define ATTACH_RELOADABLE 8
+#define ATTACH_PROJECTILE (1<<2)
+#define ATTACH_RELOADABLE (1<<3)
/// is a weapon that fires stuff
-#define ATTACH_WEAPON 16
+#define ATTACH_WEAPON (1<<4)
+/// This attachment should override ignore if it is empty
+#define ATTACH_IGNORE_EMPTY (1<<5)
/// This attachment should activate if you attack() with it attached.
-#define ATTACH_MELEE 32
+#define ATTACH_MELEE (1<<6)
//Ammo magazine defines, for flags_magazine
diff --git a/code/__DEFINES/dcs/signals/atom/mob/signals_mob.dm b/code/__DEFINES/dcs/signals/atom/mob/signals_mob.dm
index 347623798b74..323e0ee6966c 100644
--- a/code/__DEFINES/dcs/signals/atom/mob/signals_mob.dm
+++ b/code/__DEFINES/dcs/signals/atom/mob/signals_mob.dm
@@ -110,3 +110,9 @@
#define COMSIG_MOB_STAT_SET_DEAD "mob_stat_set_dead"
#define COMSIG_GHOST_MOVED "ghost_moved"
+
+#define COMSIG_MOB_MOUSEDOWN "mob_mousedown" //from /client/MouseDown(): (atom/object, turf/location, control, params)
+#define COMSIG_MOB_MOUSEUP "mob_mouseup" //from /client/MouseUp(): (atom/object, turf/location, control, params)
+#define COMSIG_MOB_MOUSEDRAG "mob_mousedrag" //from /client/MouseDrag(): (atom/src_object, atom/over_object, turf/src_location, turf/over_location, src_control, over_control, params)
+ #define COMSIG_MOB_CLICK_CANCELED (1<<0)
+ #define COMSIG_MOB_CLICK_HANDLED (1<<1)
diff --git a/code/__DEFINES/dcs/signals/atom/signals_item.dm b/code/__DEFINES/dcs/signals/atom/signals_item.dm
index 9c2f3b92ba05..138e88d21746 100644
--- a/code/__DEFINES/dcs/signals/atom/signals_item.dm
+++ b/code/__DEFINES/dcs/signals/atom/signals_item.dm
@@ -38,3 +38,19 @@
#define COMSIG_ITEM_ZOOM "item_zoom"
/// from /obj/item/proc/unzoom() : (mob/user)
#define COMSIG_ITEM_UNZOOM "item_unzoom"
+
+//Signals for automatic fire at component
+#define COMSIG_AUTOMATIC_SHOOTER_START_SHOOTING_AT "start_shooting_at"
+#define COMSIG_AUTOMATIC_SHOOTER_STOP_SHOOTING_AT "stop_shooting_at"
+#define COMSIG_AUTOMATIC_SHOOTER_SHOOT "shoot"
+
+//Signals for gun auto fire component
+#define COMSIG_GET_BURST_FIRE "get_burst_fire"
+ #define BURST_FIRING (1<<0)
+
+#define COMSIG_GUN_FIRE "gun_fire"
+#define COMSIG_GUN_STOP_FIRE "gun_stop_fire"
+#define COMSIG_GUN_FIRE_MODE_TOGGLE "gun_fire_mode_toggle"
+#define COMSIG_GUN_AUTOFIREDELAY_MODIFIED "gun_autofiredelay_modified"
+#define COMSIG_GUN_BURST_SHOTS_TO_FIRE_MODIFIED "gun_burst_shots_to_fire_modified"
+#define COMSIG_GUN_BURST_SHOT_DELAY_MODIFIED "gun_burst_shot_delay_modified"
diff --git a/code/__DEFINES/dcs/signals/signals_global.dm b/code/__DEFINES/dcs/signals/signals_global.dm
index 9781f61ec95c..a288ac2c8be7 100644
--- a/code/__DEFINES/dcs/signals/signals_global.dm
+++ b/code/__DEFINES/dcs/signals/signals_global.dm
@@ -56,3 +56,6 @@
/// From /datum/game_mode/colonialmarines/proc/check_ground_humans()
#define COMSIG_GLOB_GROUNDSIDE_FORSAKEN_HANDLING "!groundside_forsaken_handling"
+
+/// From
+#define COMSIG_GLOB_YAUTJA_ARMORY_OPENED "yautja_armory_opened"
diff --git a/code/__DEFINES/wj_emotes.dm b/code/__DEFINES/emote_panels.dm
similarity index 70%
rename from code/__DEFINES/wj_emotes.dm
rename to code/__DEFINES/emote_panels.dm
index f315c6eb2ba5..59959818da74 100644
--- a/code/__DEFINES/wj_emotes.dm
+++ b/code/__DEFINES/emote_panels.dm
@@ -6,3 +6,7 @@
#define JOE_EMOTE_CATEGORY_WARNING "Warning"
#define JOE_EMOTE_CATEGORY_QUESTION "Question"
#define JOE_EMOTE_CATEGORY_NOTICE "Notice"
+
+#define YAUTJA_EMOTE_CATEGORY_FAKESOUND "Fake Sound"
+#define YAUTJA_EMOTE_CATEGORY_VOICE "Voice Synthesizer"
+#define YAUTJA_EMOTE_CATEGORY_SPECIES "Yautja"
diff --git a/code/__DEFINES/guns.dm b/code/__DEFINES/guns.dm
index a89d98805e73..b29f7c7439f2 100644
--- a/code/__DEFINES/guns.dm
+++ b/code/__DEFINES/guns.dm
@@ -37,3 +37,11 @@
#define REVOLVER_TIP_COLOR_INCENDIARY AMMO_BAND_COLOR_INCENDIARY
#define REVOLVER_TIP_COLOR_PENETRATING AMMO_BAND_COLOR_PENETRATING
#define REVOLVER_TIP_COLOR_TOXIN AMMO_BAND_COLOR_TOXIN
+
+#define GUN_FIREMODE_SEMIAUTO "semi-auto fire mode"
+#define GUN_FIREMODE_BURSTFIRE "burst-fire mode"
+#define GUN_FIREMODE_AUTOMATIC "automatic fire mode"
+
+//autofire component fire callback return flags
+#define AUTOFIRE_CONTINUE (1<<0)
+#define AUTOFIRE_SUCCESS (1<<1)
diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm
index 4464a0b16a1d..b024f22ebfff 100644
--- a/code/__DEFINES/misc.dm
+++ b/code/__DEFINES/misc.dm
@@ -113,7 +113,7 @@
// These behaviors are either of the person performing the action or any targets.
/// You cannot move the person while this action is being performed
-#define BEHAVIOR_IMMOBILE (1<<18)
+#define BEHAVIOR_IMMOBILE (1<<19)
// *************************************** //
// END DO_AFTER FLAGS //
diff --git a/code/__DEFINES/subsystems.dm b/code/__DEFINES/subsystems.dm
index 662bcb458c55..3a25d865fb60 100644
--- a/code/__DEFINES/subsystems.dm
+++ b/code/__DEFINES/subsystems.dm
@@ -173,6 +173,7 @@
#define SS_PRIORITY_INPUT 1000
#define SS_PRIORITY_TIMER 700
+#define SS_PRIORITY_AUTOFIRE 450
#define SS_PRIORITY_SOUND 250
#define SS_PRIORITY_TICKER 200
#define SS_PRIORITY_NIGHTMARE 180
diff --git a/code/_globalvars/bitfields.dm b/code/_globalvars/bitfields.dm
index 09b55accf16d..ef539b8459c7 100644
--- a/code/_globalvars/bitfields.dm
+++ b/code/_globalvars/bitfields.dm
@@ -108,24 +108,18 @@ DEFINE_BITFIELD(flags_gun_features, list(
"GUN_TRIGGER_SAFETY" = GUN_TRIGGER_SAFETY,
"GUN_UNUSUAL_DESIGN" = GUN_UNUSUAL_DESIGN,
"GUN_SILENCED" = GUN_SILENCED,
- "GUN_AUTOMATIC" = GUN_AUTOMATIC,
"GUN_INTERNAL_MAG" = GUN_INTERNAL_MAG,
"GUN_AUTO_EJECTOR" = GUN_AUTO_EJECTOR,
"GUN_AMMO_COUNTER" = GUN_AMMO_COUNTER,
- "GUN_BURST_ON" = GUN_BURST_ON,
"GUN_BURST_FIRING" = GUN_BURST_FIRING,
"GUN_FLASHLIGHT_ON" = GUN_FLASHLIGHT_ON,
"GUN_WY_RESTRICTED" = GUN_WY_RESTRICTED,
"GUN_SPECIALIST" = GUN_SPECIALIST,
"GUN_WIELDED_FIRING_ONLY" = GUN_WIELDED_FIRING_ONLY,
- "GUN_HAS_FULL_AUTO" = GUN_HAS_FULL_AUTO,
- "GUN_FULL_AUTO_ON" = GUN_FULL_AUTO_ON,
"GUN_ONE_HAND_WIELDED" = GUN_ONE_HAND_WIELDED,
"GUN_ANTIQUE" = GUN_ANTIQUE,
"GUN_RECOIL_BUILDUP" = GUN_RECOIL_BUILDUP,
"GUN_SUPPORT_PLATFORM" = GUN_SUPPORT_PLATFORM,
- "GUN_BURST_ONLY" = GUN_BURST_ONLY,
- "GUN_FULL_AUTO_ONLY" = GUN_FULL_AUTO_ONLY,
))
DEFINE_BITFIELD(flags_magazine, list(
diff --git a/code/_onclick/click_hold.dm b/code/_onclick/click_hold.dm
index c68beb52fc9e..f65dd33c2eea 100644
--- a/code/_onclick/click_hold.dm
+++ b/code/_onclick/click_hold.dm
@@ -30,6 +30,9 @@
mouse_trace_history = null
LAZYADD(mouse_trace_history, A)
+ if(SEND_SIGNAL(mob, COMSIG_MOB_MOUSEDOWN, A, T, skin_ctl, params) & COMSIG_MOB_CLICK_CANCELED)
+ return
+
var/list/mods = params2list(params)
if(mods["left"])
SEND_SIGNAL(src, COMSIG_CLIENT_LMB_DOWN, A, mods)
@@ -62,6 +65,9 @@
params += ";click_catcher=1"
holding_click = FALSE
+ if(SEND_SIGNAL(mob, COMSIG_MOB_MOUSEUP, A, T, skin_ctl, params) & COMSIG_MOB_CLICK_CANCELED)
+ return
+
var/list/mods = params2list(params)
if(mods["left"])
SEND_SIGNAL(src, COMSIG_CLIENT_LMB_UP, A, params)
@@ -75,6 +81,9 @@
if(click_catcher_click)
params += ";click_catcher=1"
+ if(SEND_SIGNAL(mob, COMSIG_MOB_MOUSEDRAG, src_obj, over_obj, src_loc, over_loc, src_ctl, over_ctl, params) & COMSIG_MOB_CLICK_CANCELED)
+ return
+
var/list/mods = params2list(params)
if(mods["left"])
SEND_SIGNAL(src, COMSIG_CLIENT_LMB_DRAG, src_obj, over_obj, params)
diff --git a/code/controllers/subsystem/autofire.dm b/code/controllers/subsystem/autofire.dm
new file mode 100644
index 000000000000..3d3abbd2669f
--- /dev/null
+++ b/code/controllers/subsystem/autofire.dm
@@ -0,0 +1,85 @@
+/**
+ * # Autofire Subsystem
+ *
+ * Maintains a timer-like system to handle autofiring. Much of this code is modeled
+ * after or adapted from TGMC's runechat subsytem.
+ *
+ * Note that this has the same structure for storing and queueing shooter component as the timer subsystem does
+ * for handling timers: the bucket_list is a list of autofire component, each of which are the head
+ * of a linked list. Any given index in bucket_list could be null, representing an empty bucket.
+ *
+ * Doesn't support any event scheduled for more than 100 ticks in the future, as it has no secondary queue by design
+ */
+SUBSYSTEM_DEF(automatedfire)
+ name = "Automated fire"
+ flags = SS_TICKER | SS_NO_INIT
+ wait = 1
+ priority = SS_PRIORITY_AUTOFIRE
+
+ /// world.time of the first entry in the bucket list, effectively the 'start time' of the current buckets
+ var/head_offset = 0
+ /// Index of the first non-empty bucket
+ var/practical_offset = 1
+ ///How many buckets for every frame of world.fps
+ var/bucket_resolution = 0
+ /// How many shooter are in the buckets
+ var/shooter_count = 0
+ /// List of buckets, each bucket holds every shooter that has to shoot this byond tick
+ var/list/bucket_list = list()
+ /// Reference to the next shooter before we clean shooter.next
+ var/datum/component/automatedfire/next_shooter
+
+/datum/controller/subsystem/automatedfire/PreInit()
+ bucket_list.len = AUTOFIRE_BUCKET_LEN
+ head_offset = world.time
+ bucket_resolution = world.tick_lag
+
+/datum/controller/subsystem/automatedfire/stat_entry(msg = "ActShooters: [shooter_count]")
+ return ..()
+
+/datum/controller/subsystem/automatedfire/fire(resumed = FALSE)
+ // Check for when we need to loop the buckets, this occurs when
+ // the head_offset is approaching AUTOFIRE_BUCKET_LEN ticks in the past
+ if (practical_offset > AUTOFIRE_BUCKET_LEN)
+ head_offset += TICKS2DS(AUTOFIRE_BUCKET_LEN)
+ practical_offset = 1
+ resumed = FALSE
+
+ // Check for when we have to reset buckets, typically from auto-reset
+ if ((length(bucket_list) != AUTOFIRE_BUCKET_LEN) || (world.tick_lag != bucket_resolution))
+ reset_buckets()
+ bucket_list = src.bucket_list
+ resumed = FALSE
+
+ // Store a reference to the 'working' shooter so that we can resume if the MC
+ // has us stop mid-way through processing
+ var/static/datum/component/automatedfire/shooter
+ if (!resumed)
+ shooter = null
+
+ // Iterate through each bucket starting from the practical offset
+ while (practical_offset <= AUTOFIRE_BUCKET_LEN && head_offset + ((practical_offset - 1) * world.tick_lag) <= world.time)
+ if(!shooter)
+ shooter = bucket_list[practical_offset]
+ bucket_list[practical_offset] = null
+
+ while (shooter)
+ next_shooter = shooter.next
+ INVOKE_ASYNC(shooter, TYPE_PROC_REF(/datum/component/automatedfire, process_shot))
+
+ SSautomatedfire.shooter_count--
+ shooter = next_shooter
+ if (MC_TICK_CHECK)
+ return
+
+ // Move to the next bucket
+ practical_offset++
+
+/datum/controller/subsystem/automatedfire/Recover()
+ bucket_list |= SSautomatedfire.bucket_list
+
+///In the event of a change of world.tick_lag, we refresh the size of the bucket and the bucket resolution
+/datum/controller/subsystem/automatedfire/proc/reset_buckets()
+ bucket_list.len = AUTOFIRE_BUCKET_LEN
+ head_offset = world.time
+ bucket_resolution = world.tick_lag
diff --git a/code/controllers/subsystem/mapping.dm b/code/controllers/subsystem/mapping.dm
index ed6e3cda15f5..afecabd74be0 100644
--- a/code/controllers/subsystem/mapping.dm
+++ b/code/controllers/subsystem/mapping.dm
@@ -123,10 +123,14 @@ SUBSYSTEM_DEF(mapping)
++i
// load the maps
- for (var/P in parsed_maps)
- var/datum/parsed_map/pm = P
- if (!pm.load(1, 1, start_z + parsed_maps[P], no_changeturf = TRUE))
+ for (var/datum/parsed_map/pm as anything in parsed_maps)
+ var/cur_z = start_z + parsed_maps[pm]
+ if (!pm.load(1, 1, cur_z, no_changeturf = TRUE))
errorList |= pm.original_path
+ if(istype(z_list[cur_z], /datum/space_level))
+ var/datum/space_level/cur_level = z_list[cur_z]
+ cur_level.x_bounds = pm.bounds[MAP_MAXX]
+ cur_level.y_bounds = pm.bounds[MAP_MAXY]
if(!silent)
INIT_ANNOUNCE("Loaded [name] in [(REALTIMEOFDAY - start_time)/10]s!")
return parsed_maps
diff --git a/code/datums/agents/tools/tranq_gun.dm b/code/datums/agents/tools/tranq_gun.dm
index e812aa57037e..e95f853cef82 100644
--- a/code/datums/agents/tools/tranq_gun.dm
+++ b/code/datums/agents/tools/tranq_gun.dm
@@ -6,11 +6,10 @@
item_state = "pk9r"
current_mag = /obj/item/ammo_magazine/pistol/tranq
- burst_amount = 1
/obj/item/weapon/gun/pistol/tranquilizer/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_6
+ set_fire_delay(FIRE_DELAY_TIER_6)
accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_7
accuracy_mult_unwielded = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_10
scatter = SCATTER_AMOUNT_TIER_10
diff --git a/code/datums/components/autofire/_automated_fire.dm b/code/datums/components/autofire/_automated_fire.dm
new file mode 100644
index 000000000000..9abd6a152199
--- /dev/null
+++ b/code/datums/components/autofire/_automated_fire.dm
@@ -0,0 +1,49 @@
+/datum/component/automatedfire
+ ///The owner of this component
+ var/atom/shooter
+ /// Contains the scheduled fire time, used for scheduling EOL
+ var/next_fire
+ /// Contains the reference to the next component in the bucket, used by autofire subsystem
+ var/datum/component/automatedfire/next
+ /// Contains the reference to the previous component in the bucket, used by autofire subsystem
+ var/datum/component/automatedfire/prev
+
+
+/// schedule the shooter into the system, inserting it into the next fire queue
+/datum/component/automatedfire/proc/schedule_shot()
+ //We move to another bucket, so we clean the reference from the former linked list
+ next = null
+ prev = null
+ var/list/bucket_list = SSautomatedfire.bucket_list
+
+ // Ensure the next_fire time is properly bound to avoid missing a scheduled event
+ next_fire = max(CEILING(next_fire, world.tick_lag), world.time + world.tick_lag)
+
+ // Get bucket position and a local reference to the datum var, it's faster to access this way
+ var/bucket_pos = AUTOFIRE_BUCKET_POS(next_fire)
+
+ // Get the bucket head for that bucket, increment the bucket count
+ var/datum/component/automatedfire/bucket_head = bucket_list[bucket_pos]
+ SSautomatedfire.shooter_count++
+
+ // If there is no existing head of this bucket, we can set this shooter to be that head
+ if (!bucket_head)
+ bucket_list[bucket_pos] = src
+ return
+
+ // Otherwise it's a simple insertion into the double-linked list
+ if (bucket_head.next)
+ next = bucket_head.next
+ next.prev = src
+
+ bucket_head.next = src
+ prev = bucket_head
+
+ //Something went wrong, probably a lag spike or something. To prevent infinite loops, we reschedule it to a another next fire
+ if(prev == src)
+ next_fire += 1
+ schedule_shot()
+
+///Handle the firing of the autofire component
+/datum/component/automatedfire/proc/process_shot()
+ return
diff --git a/code/datums/components/autofire/autofire.dm b/code/datums/components/autofire/autofire.dm
new file mode 100644
index 000000000000..31ca255f1b88
--- /dev/null
+++ b/code/datums/components/autofire/autofire.dm
@@ -0,0 +1,137 @@
+/datum/component/automatedfire/autofire
+ ///The current fire mode of the shooter
+ var/fire_mode
+ ///Delay between two shots when in full auto
+ var/auto_fire_shot_delay
+ ///Delay between two burst shots
+ var/burstfire_shot_delay
+ ///How many bullets are fired in burst mode
+ var/burst_shots_to_fire
+ ///Count the shots fired when bursting
+ var/shots_fired = 0
+ ///If the shooter is currently shooting
+ var/shooting = FALSE
+ ///If TRUE, the shooter will reset its references at the end of the burst
+ var/have_to_reset_at_burst_end = FALSE
+ ///If we are in a burst
+ var/bursting = FALSE
+ ///Callback to set bursting mode on the parent
+ var/datum/callback/callback_bursting
+ ///Callback to ask the parent to reset its firing vars
+ var/datum/callback/callback_reset_fire
+ ///Callback to ask the parent to fire
+ var/datum/callback/callback_fire
+ ///Callback to ask the parent to display ammo
+ var/datum/callback/callback_display_ammo
+ ///Callback to set parent's fa_firing
+ var/datum/callback/callback_set_firing
+
+/datum/component/automatedfire/autofire/Initialize(auto_fire_shot_delay = 0.3 SECONDS, burstfire_shot_delay, burst_shots_to_fire = 3, fire_mode = GUN_FIREMODE_SEMIAUTO, datum/callback/callback_bursting, datum/callback/callback_reset_fire, datum/callback/callback_fire, datum/callback/callback_display_ammo, datum/callback/callback_set_firing)
+ . = ..()
+
+ RegisterSignal(parent, COMSIG_GUN_FIRE_MODE_TOGGLE, PROC_REF(modify_fire_mode))
+ RegisterSignal(parent, COMSIG_GUN_AUTOFIREDELAY_MODIFIED, PROC_REF(modify_fire_shot_delay))
+ RegisterSignal(parent, COMSIG_GUN_BURST_SHOTS_TO_FIRE_MODIFIED, PROC_REF(modify_burst_shots_to_fire))
+ RegisterSignal(parent, COMSIG_GUN_BURST_SHOT_DELAY_MODIFIED, PROC_REF(modify_burstfire_shot_delay))
+ RegisterSignal(parent, COMSIG_GUN_FIRE, PROC_REF(initiate_shot))
+ RegisterSignal(parent, COMSIG_GUN_STOP_FIRE, PROC_REF(stop_firing))
+
+ src.auto_fire_shot_delay = auto_fire_shot_delay
+ src.burstfire_shot_delay = burstfire_shot_delay
+ src.burst_shots_to_fire = burst_shots_to_fire
+ src.fire_mode = fire_mode
+ src.callback_bursting = callback_bursting
+ src.callback_reset_fire = callback_reset_fire
+ src.callback_fire = callback_fire
+ src.callback_display_ammo = callback_display_ammo
+ src.callback_set_firing = callback_set_firing
+
+/datum/component/automatedfire/autofire/Destroy(force, silent)
+ QDEL_NULL(callback_fire)
+ QDEL_NULL(callback_reset_fire)
+ QDEL_NULL(callback_bursting)
+ QDEL_NULL(callback_display_ammo)
+ QDEL_NULL(callback_set_firing)
+ return ..()
+
+///Setter for fire mode
+/datum/component/automatedfire/autofire/proc/modify_fire_mode(datum/source, fire_mode)
+ SIGNAL_HANDLER
+ src.fire_mode = fire_mode
+
+///Setter for auto fire shot delay
+/datum/component/automatedfire/autofire/proc/modify_fire_shot_delay(datum/source, auto_fire_shot_delay)
+ SIGNAL_HANDLER
+ src.auto_fire_shot_delay = auto_fire_shot_delay
+
+///Setter for the number of shots in a burst
+/datum/component/automatedfire/autofire/proc/modify_burst_shots_to_fire(datum/source, burst_shots_to_fire)
+ SIGNAL_HANDLER
+ src.burst_shots_to_fire = burst_shots_to_fire
+
+///Setter for burst shot delay
+/datum/component/automatedfire/autofire/proc/modify_burstfire_shot_delay(datum/source, burstfire_shot_delay)
+ SIGNAL_HANDLER
+ src.burstfire_shot_delay = burstfire_shot_delay
+
+///Insert the component in the bucket system if it was not in already
+/datum/component/automatedfire/autofire/proc/initiate_shot()
+ SIGNAL_HANDLER
+ if(shooting)//if we are already shooting, it means the shooter is still on cooldown
+ return
+ shooting = TRUE
+ process_shot()
+
+///Remove the component from the bucket system if it was in
+/datum/component/automatedfire/autofire/proc/stop_firing()
+ SIGNAL_HANDLER
+ if(!shooting)
+ return
+ ///We are burst firing, we can't clean the state now. We will do it when the burst is over
+ if(bursting)
+ have_to_reset_at_burst_end = TRUE
+ return
+ shooting = FALSE
+ shots_fired = 0
+
+///Hard reset the autofire, happens when the shooter fall/is thrown, at the end of a burst or when it runs out of ammunition
+/datum/component/automatedfire/autofire/proc/hard_reset()
+ callback_reset_fire.Invoke() //resets the gun
+ shots_fired = 0
+ have_to_reset_at_burst_end = FALSE
+ if(bursting)
+ bursting = FALSE
+ callback_bursting.Invoke(FALSE)
+ shooting = FALSE
+
+
+///Ask the shooter to fire and schedule the next shot if need
+/datum/component/automatedfire/autofire/process_shot()
+ if(!shooting)
+ return
+ if(next_fire > world.time)//This mean duplication somewhere, we abort now
+ return
+ if(!(callback_fire.Invoke() & AUTOFIRE_CONTINUE))//reset fire if we want to stop
+ hard_reset()
+ return
+ switch(fire_mode)
+ if(GUN_FIREMODE_BURSTFIRE)
+ shots_fired++
+ if(shots_fired == burst_shots_to_fire)
+ callback_bursting.Invoke(FALSE)
+ callback_display_ammo.Invoke()
+ bursting = FALSE
+ stop_firing()
+ if(have_to_reset_at_burst_end)//We failed to reset because we were bursting, we do it now
+ callback_reset_fire.Invoke()
+ have_to_reset_at_burst_end = FALSE
+ return
+ callback_bursting.Invoke(TRUE)
+ bursting = TRUE
+ next_fire = world.time + burstfire_shot_delay
+ if(GUN_FIREMODE_AUTOMATIC)
+ callback_set_firing.Invoke(TRUE)
+ next_fire = world.time + auto_fire_shot_delay
+ if(GUN_FIREMODE_SEMIAUTO)
+ return
+ schedule_shot()
diff --git a/code/datums/emergency_calls/emergency_call.dm b/code/datums/emergency_calls/emergency_call.dm
index 2a305dcc4342..3d43917b2bc7 100644
--- a/code/datums/emergency_calls/emergency_call.dm
+++ b/code/datums/emergency_calls/emergency_call.dm
@@ -9,6 +9,11 @@
var/list/datum/emergency_call/all_calls = list() //initialized at round start and stores the datums.
var/datum/emergency_call/picked_calls[] = list() //Which distress calls are currently active
+/datum/game_mode/proc/ares_online()
+ var/name = "ARES Online"
+ var/input = "ARES. Online. Good morning, marines."
+ shipwide_ai_announcement(input, name, 'sound/AI/ares_online.ogg')
+
//The distress call parent. Cannot be called itself due to "name" being a filtered target.
/datum/emergency_call
var/name = "name"
diff --git a/code/datums/factions/uscm.dm b/code/datums/factions/uscm.dm
index 1fb1df278ab0..4d13e7d285ca 100644
--- a/code/datums/factions/uscm.dm
+++ b/code/datums/factions/uscm.dm
@@ -2,15 +2,15 @@
name = "United States Colonial Marines"
faction_tag = FACTION_MARINE
-/datum/faction/uscm/modify_hud_holder(image/holder, mob/living/carbon/human/H)
- var/datum/squad/squad = H.assigned_squad
+/datum/faction/uscm/modify_hud_holder(image/holder, mob/living/carbon/human/current_human)
+ var/datum/squad/squad = current_human.assigned_squad
if(istype(squad))
- var/squad_clr = squad_colors[H.assigned_squad.color]
+ var/squad_clr = current_human.assigned_squad.equipment_color
var/marine_rk
- var/obj/item/card/id/I = H.get_idcard()
+ var/obj/item/card/id/I = current_human.get_idcard()
var/_role
- if(H.job)
- _role = H.job
+ if(current_human.job)
+ _role = current_human.job
else if(I)
_role = I.rank
switch(GET_DEFAULT_ROLE(_role))
@@ -29,42 +29,42 @@
if(JOB_MARINE_RAIDER) marine_rk = "soc"
if(JOB_MARINE_RAIDER_SL) marine_rk = "soctl"
if(JOB_MARINE_RAIDER_CMD) marine_rk = "soccmd"
- if(squad.squad_leader == H)
+ if(squad.squad_leader == current_human)
switch(squad.squad_type)
if("Squad") marine_rk = "leader_a"
if("Team") marine_rk = "soctl_a"
- H.langchat_styles = "langchat_bolded" // bold text for bold leaders
+ current_human.langchat_styles = "langchat_bolded" // bold text for bold leaders
else
- H.langchat_styles = initial(H.langchat_styles)
+ current_human.langchat_styles = initial(current_human.langchat_styles)
- H.langchat_color = squad_colors_chat[H.assigned_squad.color]
+ current_human.langchat_color = current_human.assigned_squad.chat_color
- if(!marine_rk) marine_rk = H.rank_fallback
+ if(!marine_rk) marine_rk = current_human.rank_fallback
if(marine_rk)
- var/image/IMG = image('icons/mob/hud/marine_hud.dmi', H, "hudsquad")
+ var/image/IMG = image('icons/mob/hud/marine_hud.dmi', current_human, "hudsquad")
if(squad_clr)
IMG.color = squad_clr
else
IMG.color = "#5A934A"
holder.overlays += IMG
- holder.overlays += image('icons/mob/hud/marine_hud.dmi', H, "hudsquad_[marine_rk]")
- if(H.assigned_squad && H.assigned_fireteam)
- var/image/IMG2 = image('icons/mob/hud/marine_hud.dmi', H, "hudsquad_[H.assigned_fireteam]")
+ holder.overlays += image('icons/mob/hud/marine_hud.dmi', current_human, "hudsquad_[marine_rk]")
+ if(current_human.assigned_squad && current_human.assigned_fireteam)
+ var/image/IMG2 = image('icons/mob/hud/marine_hud.dmi', current_human, "hudsquad_[current_human.assigned_fireteam]")
IMG2.color = squad_clr
holder.overlays += IMG2
- if(H.assigned_squad.fireteam_leaders[H.assigned_fireteam] == H)
- var/image/IMG3 = image('icons/mob/hud/marine_hud.dmi', H, "hudsquad_ftl")
+ if(current_human.assigned_squad.fireteam_leaders[current_human.assigned_fireteam] == current_human)
+ var/image/IMG3 = image('icons/mob/hud/marine_hud.dmi', current_human, "hudsquad_ftl")
IMG3.color = squad_clr
holder.overlays += IMG3
else
var/marine_rk
var/border_rk
var/icon_prefix = "hudsquad_"
- var/obj/item/card/id/ID = H.get_idcard()
+ var/obj/item/card/id/ID = current_human.get_idcard()
var/_role
- if(H.mind)
- _role = H.job
+ if(current_human.mind)
+ _role = current_human.job
else if(ID)
_role = ID.rank
switch(_role)
@@ -188,9 +188,9 @@
icon_prefix = "cmb_"
if(marine_rk)
- var/image/I = image('icons/mob/hud/marine_hud.dmi', H, "hudsquad")
+ var/image/I = image('icons/mob/hud/marine_hud.dmi', current_human, "hudsquad")
I.color = "#5A934A"
holder.overlays += I
- holder.overlays += image('icons/mob/hud/marine_hud.dmi', H, "[icon_prefix][marine_rk]")
+ holder.overlays += image('icons/mob/hud/marine_hud.dmi', current_human, "[icon_prefix][marine_rk]")
if(border_rk)
- holder.overlays += image('icons/mob/hud/marine_hud.dmi', H, "hudmarineborder[border_rk]")
+ holder.overlays += image('icons/mob/hud/marine_hud.dmi', current_human, "hudmarineborder[border_rk]")
diff --git a/code/datums/map_config.dm b/code/datums/map_config.dm
index c37bf802f12b..1f3c265ead76 100644
--- a/code/datums/map_config.dm
+++ b/code/datums/map_config.dm
@@ -31,6 +31,7 @@
var/shuttles = list()
var/announce_text = ""
+ var/infection_announce_text = ""
var/squads_max_num = 4
@@ -339,6 +340,9 @@
if(json["announce_text"])
announce_text = json["announce_text"]
+ if(json["infection_announce_text"])
+ infection_announce_text = json["infection_announce_text"]
+
if(json["weather_holder"])
weather_holder = text2path(json["weather_holder"])
if(!weather_holder)
diff --git a/code/datums/recipe.dm b/code/datums/recipe.dm
index ec0c90f427ca..47752fd59400 100644
--- a/code/datums/recipe.dm
+++ b/code/datums/recipe.dm
@@ -769,7 +769,7 @@
/datum/recipe/syntikabob
items = list(
/obj/item/stack/rods,
- /obj/item/reagent_container/food/snacks/meat/syntiflesh,
+ /obj/item/reagent_container/food/snacks/meat/synthmeat,
)
result = /obj/item/reagent_container/food/snacks/monkeykabob
diff --git a/code/datums/supply_packs/operations.dm b/code/datums/supply_packs/operations.dm
index 610503d6c25d..6d5e5d14756c 100644
--- a/code/datums/supply_packs/operations.dm
+++ b/code/datums/supply_packs/operations.dm
@@ -94,7 +94,7 @@
group = "Operations"
/datum/supply_packs/nuclearbomb
- name = "Operational Nuke"
+ name = "Decrypted Operational Nuke"
cost = 0
containertype = /obj/structure/machinery/nuclearbomb
buyable = 0
@@ -102,7 +102,7 @@
iteration_needed = null
/datum/supply_packs/technuclearbomb
- name = "Intel Operational Nuke"
+ name = "Encrypted Operational Nuke"
cost = 0
containertype = /obj/structure/machinery/nuclearbomb/tech
buyable = 0
diff --git a/code/game/gamemodes/cm_process.dm b/code/game/gamemodes/cm_process.dm
index e4e0e32adff4..82f0902e2f8c 100644
--- a/code/game/gamemodes/cm_process.dm
+++ b/code/game/gamemodes/cm_process.dm
@@ -244,6 +244,34 @@ GLOBAL_VAR_INIT(next_admin_bioscan, 30 MINUTES)
return num_marines
+/datum/game_mode/proc/count_per_faction(list/z_levels = SSmapping.levels_by_any_trait(list(ZTRAIT_GROUND, ZTRAIT_RESERVED, ZTRAIT_MARINE_MAIN_SHIP)))
+ var/num_marines = 0
+ var/num_WY = 0
+ var/num_UPP = 0
+ var/num_CLF = 0
+ var/num_headcount = 0
+
+ for(var/mob/living/carbon/human/current_human as anything in GLOB.alive_human_list)
+ if(!(current_human.z && (current_human.z in z_levels) && !istype(current_human.loc, /turf/open/space)))
+ continue
+ if(current_human.faction in FACTION_LIST_WY || current_human.job == "Corporate Liaison") //The CL is assigned the USCM faction for gameplay purposes
+ num_WY++
+ num_headcount++
+ continue
+ if(current_human.faction == FACTION_UPP)
+ num_UPP++
+ num_headcount++
+ continue
+ if(current_human.faction == FACTION_CLF)
+ num_CLF++
+ num_headcount++
+ continue
+ if(current_human.faction == FACTION_MARINE)
+ num_marines++
+ num_headcount++
+ continue
+ num_headcount++
+ return list("marine_headcount" = num_marines,"WY_headcount" = num_WY,"UPP_headcount" = num_UPP,"CLF_headcount" = num_CLF,"total_headcount" = num_headcount)
/*
#undef QUEEN_DEATH_COUNTDOWN
diff --git a/code/game/gamemodes/colonialmarines/colonialmarines.dm b/code/game/gamemodes/colonialmarines/colonialmarines.dm
index 65dc2666070d..067201277e38 100644
--- a/code/game/gamemodes/colonialmarines/colonialmarines.dm
+++ b/code/game/gamemodes/colonialmarines/colonialmarines.dm
@@ -118,8 +118,6 @@
if(SSmapping.configs[GROUND_MAP].environment_traits[ZTRAIT_BASIC_RT])
flags_round_type |= MODE_BASIC_RT
- round_time_lobby = world.time
-
addtimer(CALLBACK(src, PROC_REF(ares_online)), 5 SECONDS)
addtimer(CALLBACK(src, PROC_REF(map_announcement)), 20 SECONDS)
@@ -143,11 +141,6 @@
var/monkey_to_spawn = pick(monkey_types)
new monkey_to_spawn(T)
-/datum/game_mode/colonialmarines/proc/ares_online()
- var/name = "ARES Online"
- var/input = "ARES. Online. Good morning, marines."
- shipwide_ai_announcement(input, name, 'sound/AI/ares_online.ogg')
-
/datum/game_mode/colonialmarines/proc/map_announcement()
if(SSmapping.configs[GROUND_MAP].announce_text)
var/rendered_announce_text = replacetext(SSmapping.configs[GROUND_MAP].announce_text, "###SHIPNAME###", MAIN_SHIP_NAME)
@@ -354,6 +347,8 @@
//////////////////////////////////////////////////////////////////////
//Announces the end of the game with all relevant information stated//
//////////////////////////////////////////////////////////////////////
+#define MAJORITY 0.5 // What percent do we consider a 'majority?'
+
/datum/game_mode/colonialmarines/declare_completion()
announce_ending()
var/musical_track
@@ -372,7 +367,20 @@
round_statistics.current_map.total_marine_victories++
round_statistics.current_map.total_marine_majors++
if(MODE_INFESTATION_X_MINOR)
- musical_track = pick('sound/theme/neutral_melancholy1.ogg','sound/theme/neutral_melancholy2.ogg')
+ var/list/living_player_list = count_humans_and_xenos(EvacuationAuthority.get_affected_zlevels())
+ if(living_player_list[1] && !living_player_list[2]) // If Xeno Minor but Xenos are dead and Humans are alive, see which faction is the last standing
+ var/headcount = count_per_faction()
+ var/living = headcount["total_headcount"]
+ if ((headcount["WY_headcount"] / living) > MAJORITY)
+ musical_track = pick('sound/theme/LastManStanding_WY.ogg')
+ else if ((headcount["UPP_headcount"] / living) > MAJORITY)
+ musical_track = pick('sound/theme/LastManStanding_UPP.ogg')
+ else if ((headcount["CLF_headcount"] / living) > MAJORITY)
+ 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
+ musical_track = pick('sound/theme/neutral_melancholy1.ogg')
end_icon = "xeno_minor"
if(round_statistics && round_statistics.current_map)
round_statistics.current_map.total_xeno_victories++
@@ -581,3 +589,4 @@
#undef HIJACK_EXPLOSION_COUNT
#undef MARINE_MAJOR_ROUND_END_DELAY
+#undef MAJORITY
diff --git a/code/game/gamemodes/extended/infection.dm b/code/game/gamemodes/extended/infection.dm
index d42f71798a50..04e0545361aa 100644
--- a/code/game/gamemodes/extended/infection.dm
+++ b/code/game/gamemodes/extended/infection.dm
@@ -25,17 +25,25 @@
initialize_post_marine_gear_list()
for(var/mob/new_player/np in GLOB.new_player_list)
np.new_player_panel_proc()
- spawn(50)
- marine_announcement("We've lost contact with the Weyland-Yutani's research facility, [name]. The [MAIN_SHIP_NAME] has been dispatched to assist.", "[MAIN_SHIP_NAME]")
+
+ addtimer(CALLBACK(src, PROC_REF(ares_online)), 5 SECONDS)
+ addtimer(CALLBACK(src, PROC_REF(map_announcement)), 20 SECONDS)
return ..()
+/datum/game_mode/infection/proc/map_announcement()
+ if(SSmapping.configs[GROUND_MAP].infection_announce_text)
+ var/rendered_announce_text = replacetext(SSmapping.configs[GROUND_MAP].infection_announce_text, "###SHIPNAME###", MAIN_SHIP_NAME)
+ marine_announcement(rendered_announce_text, "[MAIN_SHIP_NAME]")
+ else if(SSmapping.configs[GROUND_MAP].announce_text) //if we missed a infection text for above, or just don't need a special one, we just use default announcement
+ var/rendered_announce_text = replacetext(SSmapping.configs[GROUND_MAP].announce_text, "###SHIPNAME###", MAIN_SHIP_NAME)
+ marine_announcement(rendered_announce_text, "[MAIN_SHIP_NAME]")
+
/datum/game_mode/infection/proc/initialize_post_survivor_list()
if(synth_survivor)
transform_survivor(synth_survivor, TRUE)
for(var/datum/mind/survivor in survivors)
if(transform_survivor(survivor) == 1)
survivors -= survivor
- tell_survivor_story()
/datum/game_mode/infection/can_start()
initialize_starting_survivor_list()
diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm
index 8017056c682d..5b007d275c32 100644
--- a/code/game/gamemodes/game_mode.dm
+++ b/code/game/gamemodes/game_mode.dm
@@ -103,17 +103,18 @@ var/global/cas_tracking_id_increment = 0 //this var used to assign unique tracki
for(var/mob/new_player/np in GLOB.new_player_list)
np.new_player_panel_proc()
+ round_time_lobby = world.time
log_game("Round started at [time2text(world.realtime)]")
if(SSticker.mode)
log_game("Game mode set to [SSticker.mode]")
log_game("Server IP: [world.internet_address]:[world.port]")
- return 1
+ return TRUE
///process()
///Called by the gameticker
/datum/game_mode/process()
- return 0
+ return FALSE
/datum/game_mode/proc/check_finished() //to be called by ticker
diff --git a/code/game/jobs/access.dm b/code/game/jobs/access.dm
index 55eee2e521bf..54f79ce32881 100644
--- a/code/game/jobs/access.dm
+++ b/code/game/jobs/access.dm
@@ -2,17 +2,28 @@
//returns FALSE otherwise
/obj/proc/allowed(mob/M)
//check if it doesn't require any access at all
- if(check_access()) return TRUE
- if(isRemoteControlling(M)) return TRUE //AI can do whatever he wants
+ if(check_access() || isRemoteControlling(M))
+ return TRUE
- else if(ishuman(M))
+ if(ishuman(M))
var/mob/living/carbon/human/H = M
//if they are holding or wearing a card that has access, that works
- if(check_access(H.get_active_hand()) || check_access(H.wear_id)) return TRUE
- else if(istype(M, /mob/living/carbon/xenomorph))
+ if(check_access(H.get_active_hand()) || check_access(H.wear_id))
+ return TRUE
+ return check_yautja_access(H)
+ if(istype(M, /mob/living/carbon/xenomorph))
var/mob/living/carbon/C = M
- if(check_access(C.get_active_hand())) return TRUE
- return FALSE
+ if(check_access(C.get_active_hand()))
+ return TRUE
+ return FALSE
+
+/obj/proc/check_yautja_access(mob/living/carbon/human/yautja)
+ if(!istype(yautja))
+ return FALSE
+ var/obj/item/clothing/gloves/yautja/hunter/bracer = yautja.gloves
+ if(!istype(bracer) || !bracer.embedded_id || !check_access(bracer.embedded_id))
+ return FALSE
+ return TRUE
/obj/item/proc/GetAccess() return list()
diff --git a/code/game/jobs/job/marine/marine.dm b/code/game/jobs/job/marine/marine.dm
index a64701b8bfc7..e07c1edd3138 100644
--- a/code/game/jobs/job/marine/marine.dm
+++ b/code/game/jobs/job/marine/marine.dm
@@ -5,15 +5,15 @@
spawn_positions = 8
allow_additional = 1
-/datum/job/marine/generate_entry_message(mob/living/carbon/human/H)
- if(H.assigned_squad)
- entry_message_intro = "You are a [title]! You have been assigned to: [lowertext(H.assigned_squad.name)] squad.[Check_WO() ? "" : " Make your way to the cafeteria for some post-cryosleep chow, and then get equipped in your squad's prep room." ]"
+/datum/job/marine/generate_entry_message(mob/living/carbon/human/current_human)
+ if(current_human.assigned_squad)
+ entry_message_intro = "You are a [title]! You have been assigned to: [lowertext(current_human.assigned_squad.name)] squad.[Check_WO() ? "" : " Make your way to the cafeteria for some post-cryosleep chow, and then get equipped in your squad's prep room." ]"
return ..()
-/datum/job/marine/generate_entry_conditions(mob/living/carbon/human/H)
+/datum/job/marine/generate_entry_conditions(mob/living/carbon/human/current_human)
..()
if(!Check_WO())
- H.nutrition = rand(NUTRITION_VERYLOW, NUTRITION_LOW) //Start hungry for the default marine.
+ current_human.nutrition = rand(NUTRITION_VERYLOW, NUTRITION_LOW) //Start hungry for the default marine.
/datum/timelock/squad
name = "Squad Roles"
diff --git a/code/game/jobs/job/marine/squad_info.dm b/code/game/jobs/job/marine/squad_info.dm
index 1dc4ad7181cd..7e7dfcc0229a 100644
--- a/code/game/jobs/job/marine/squad_info.dm
+++ b/code/game/jobs/job/marine/squad_info.dm
@@ -17,7 +17,7 @@
update_squad_leader()
var/list/data = squad_info_data.Copy()
data["squad"] = name
- data["squad_color"] = squad_colors[color]
+ data["squad_color"] = equipment_color
data["is_lead"] = get_leadership(user)
data["objective"] = list(
"primary" = primary_objective,
diff --git a/code/game/jobs/job/marine/squads.dm b/code/game/jobs/job/marine/squads.dm
index 9f4068e8450f..fb85be012d30 100644
--- a/code/game/jobs/job/marine/squads.dm
+++ b/code/game/jobs/job/marine/squads.dm
@@ -25,29 +25,51 @@
sub_leader = "Strike Leader"
/datum/squad
- var/name //Name of the squad
+ /// Name of the squad
+ var/name
+ /// Squads ID that is set on New()
var/tracking_id = null //Used for the tracking subsystem
- var/max_positions = -1 //Maximum number allowed in a squad. Defaults to infinite
- var/color = 0 //Color for helmets, etc.
- var/list/access = list() //Which special access do we grant them
- var/omni_squad_vendor = FALSE /// Can use any squad vendor regardless of squad connection
- var/max_engineers = 3 //maximum # of engineers allowed in squad
- var/max_medics = 4 //Ditto, squad medics
+ /// Maximum number allowed in a squad. Defaults to infinite
+ var/max_positions = -1
+ /// Color for the squad marines gear overlays
+ var/equipment_color = "#FFFFFF"
+ /// The alpha for the armor overlay used by equipment color
+ var/armor_alpha = 125
+ /// Color for the squad marines langchat
+ var/chat_color = "#FFFFFF"
+ /// Which special access do we grant them
+ var/list/access = list()
+ /// Can use any squad vendor regardless of squad connection
+ var/omni_squad_vendor = FALSE
+ /// maximum # of engineers allowed in the squad
+ var/max_engineers = 3
+ /// maximum # of squad medics allowed in the squad
+ var/max_medics = 4
+ /// maximum # of specs allowed in the squad
var/max_specialists = 1
+ /// maximum # of fireteam leaders allowed in the suqad
var/max_tl = 2
+ /// maximum # of smartgunners allowed in the squad
var/max_smartgun = 1
+ /// maximum # of squad leaders allowed in the squad
var/max_leaders = 1
- var/radio_freq = 1461 //Squad radio headset frequency.
-
- ///Variables for showing up in various places
- var/usable = FALSE //Is it used in-game?
- var/roundstart = TRUE /// Whether this squad can be picked at roundstart
- var/locked = FALSE //Is it available for squad management?
- var/active = FALSE //Is it visible in overwatch?
- var/faction = FACTION_MARINE //What faction runs the squad?
-
- ///Squad Type Specifics
+ /// Squad headsets default radio frequency
+ var/radio_freq = 1461
+
+ /// Whether this squad can be used by marines
+ var/usable = FALSE
+ /// Whether this squad can be picked at roundstart
+ var/roundstart = TRUE
+ // Whether the squad is available for squad management
+ var/locked = FALSE
+ /// Whether it is visible in overwatch
+ var/active = FALSE
+ /// Which faction the squad is in
+ var/faction = FACTION_MARINE
+
+ /// What will the assistant squad leader be called
var/squad_type = "Squad" //Referenced for aSL details. Squad/Team/Cell etc.
+ /// Squad leaders icon
var/lead_icon //Referenced for SL's 'L' icon. If nulled, won't override icon for aSLs.
//vvv Do not set these in squad defines
@@ -96,35 +118,40 @@
/datum/squad/marine/alpha
name = SQUAD_MARINE_1
- color = 1
+ equipment_color = "#e61919"
+ chat_color = "#e67d7d"
access = list(ACCESS_MARINE_ALPHA)
radio_freq = ALPHA_FREQ
minimap_color = MINIMAP_SQUAD_ALPHA
/datum/squad/marine/bravo
name = SQUAD_MARINE_2
- color = 2
+ equipment_color = "#ffc32d"
+ chat_color = "#ffe650"
access = list(ACCESS_MARINE_BRAVO)
radio_freq = BRAVO_FREQ
minimap_color = MINIMAP_SQUAD_BRAVO
/datum/squad/marine/charlie
name = SQUAD_MARINE_3
- color = 3
+ equipment_color = "#c864c8"
+ chat_color = "#ff96ff"
access = list(ACCESS_MARINE_CHARLIE)
radio_freq = CHARLIE_FREQ
minimap_color = MINIMAP_SQUAD_CHARLIE
/datum/squad/marine/delta
name = SQUAD_MARINE_4
- color = 4
+ equipment_color = "#4148c8"
+ chat_color = "#828cff"
access = list(ACCESS_MARINE_DELTA)
radio_freq = DELTA_FREQ
minimap_color = MINIMAP_SQUAD_DELTA
/datum/squad/marine/echo
name = SQUAD_MARINE_5
- color = 5
+ equipment_color = "#67d692"
+ chat_color = "#67d692"
access = list(ACCESS_MARINE_ALPHA, ACCESS_MARINE_BRAVO, ACCESS_MARINE_CHARLIE, ACCESS_MARINE_DELTA)
radio_freq = ECHO_FREQ
omni_squad_vendor = TRUE
@@ -136,7 +163,8 @@
/datum/squad/marine/cryo
name = SQUAD_MARINE_CRYO
- color = 6
+ equipment_color = "#c47a50"
+ chat_color = "#c47a50"
access = list(ACCESS_MARINE_ALPHA, ACCESS_MARINE_BRAVO, ACCESS_MARINE_CHARLIE, ACCESS_MARINE_DELTA)
minimap_color = MINIMAP_SQUAD_FOXTROT
@@ -149,7 +177,8 @@
/datum/squad/marine/sof
name = SQUAD_SOF
- color = 7
+ equipment_color = "#400000"
+ chat_color = "#400000"
radio_freq = SOF_FREQ
squad_type = "Team"
lead_icon = "soctl"
@@ -168,23 +197,28 @@
/datum/squad/upp/one
name = "UPPS1"
- color = 1
+ equipment_color = "#e61919"
+ chat_color = "#e67d7d"
/datum/squad/upp/twp
name = "UPPS2"
- color = 2
+ equipment_color = "#ffc32d"
+ chat_color = "#ffe650"
/datum/squad/upp/three
name = "UPPS3"
- color = 3
+ equipment_color = "#c864c8"
+ chat_color = "#ff96ff"
/datum/squad/upp/four
name = "UPPS4"
- color = 4
+ equipment_color = "#4148c8"
+ chat_color = "#828cff"
/datum/squad/upp/kdo
name = "UPPKdo"
- color = 6
+ equipment_color = "#c47a50"
+ chat_color = "#c47a50"
squad_type = "Team"
locked = TRUE
//###############################
@@ -197,11 +231,13 @@
/datum/squad/pmc/one
name = "Team Upsilon"
- color = 3
+ equipment_color = "#c864c8"
+ chat_color = "#ff96ff"
/datum/squad/pmc/two
name = "Team Gamma"
- color = 6
+ equipment_color = "#c47a50"
+ chat_color = "#c47a50"
/datum/squad/pmc/wo
name = "Taskforce White"
@@ -331,7 +367,7 @@
/// Displays a message to squad members directly on the game map
/datum/squad/proc/send_maptext(text = "", title_text = "", only_leader = 0)
- var/message_colour = squad_colors_chat[color]
+ var/message_colour = chat_color
if(only_leader)
if(squad_leader)
var/mob/living/carbon/human/SL = squad_leader
diff --git a/code/game/machinery/ARES/ARES.dm b/code/game/machinery/ARES/ARES.dm
index f8a7351d123e..fd85aff215db 100644
--- a/code/game/machinery/ARES/ARES.dm
+++ b/code/game/machinery/ARES/ARES.dm
@@ -151,8 +151,8 @@
var/list/records_asrs = list()
/// Holds all (/datum/ares_record/security)s and (/datum/ares_record/antiair)s
var/list/records_security = list()
- /// Is nuke request usable or not? (Nuke request is not currently coded to work.)
- var/nuke_available = FALSE
+ /// Is nuke request usable or not?
+ var/nuke_available = TRUE
COOLDOWN_DECLARE(ares_distress_cooldown)
diff --git a/code/game/machinery/ARES/ARES_procs.dm b/code/game/machinery/ARES/ARES_procs.dm
index 8b5f77fa6d84..6c5bd1dec08a 100644
--- a/code/game/machinery/ARES/ARES_procs.dm
+++ b/code/game/machinery/ARES/ARES_procs.dm
@@ -576,15 +576,22 @@ GLOBAL_LIST_INIT(maintenance_categories, list(
playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
return FALSE
if(security_level == SEC_LEVEL_DELTA || SSticker.mode.is_in_endgame)
- to_chat(usr, SPAN_WARNING("The mission has failed catastrophically, what do you want a nuke for!"))
+ to_chat(usr, SPAN_WARNING("The mission has failed catastrophically, what do you want a nuke for?!"))
playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
return FALSE
-
+ var/reason = tgui_input_text(usr, "Please enter reason nuclear ordnance is required.", "Reason for Nuclear Ordnance")
+ if(!reason)
+ return FALSE
for(var/client/admin in GLOB.admins)
if((R_ADMIN|R_MOD) & admin.admin_holder.rights)
playsound_client(admin,'sound/effects/sos-morse-code.ogg',10)
- message_admins("[key_name(usr)] has requested use of Nuclear Ordnance (via ARES)! [CC_MARK(usr)] (APPROVE) (DENY) [ADMIN_JMP_USER(usr)] [CC_REPLY(usr)]")
- to_chat(usr, SPAN_NOTICE("A nuclear ordnance request has been sent to USCM High Command."))
+ message_admins("[key_name(usr)] has requested use of Nuclear Ordnance (via ARES)! Reason: [reason] [CC_MARK(usr)] (APPROVE) (DENY) [ADMIN_JMP_USER(usr)] [CC_REPLY(usr)]")
+ to_chat(usr, SPAN_NOTICE("A nuclear ordnance request has been sent to USCM High Command for the following reason: [reason]"))
+ if(ares_can_log())
+ link.log_ares_security("Nuclear Ordnance Request", "[last_login] has sent a request for nuclear ordnance for the following reason: [reason]")
+ if(ares_can_interface())
+ ai_silent_announcement("[last_login] has sent a request for nuclear ordnance to USCM High Command.", ".V")
+ ai_silent_announcement("Reason given: [reason].", ".V")
COOLDOWN_START(src, ares_nuclear_cooldown, COOLDOWN_COMM_DESTRUCT)
return TRUE
// ------ End ARES Interface UI ------ //
diff --git a/code/game/machinery/doors/airlock_types.dm b/code/game/machinery/doors/airlock_types.dm
index 899f9f5a0e1c..373c74767bb4 100644
--- a/code/game/machinery/doors/airlock_types.dm
+++ b/code/game/machinery/doors/airlock_types.dm
@@ -267,6 +267,36 @@
/obj/structure/machinery/door/airlock/strata/mining/autoname
autoname = TRUE
+//YAUTJA SHIP - CURRENTLY USES STRATA DOORS
+/obj/structure/machinery/door/airlock/yautja
+ name = "\improper Airlock"
+ icon = 'icons/obj/structures/doors/strata/strata_doors.dmi'
+ openspeed = 5
+ req_access = null
+ req_one_access = null
+ tiles_with = list(
+ /obj/structure/window/framed/strata,
+ /obj/structure/machinery/door/airlock,
+ )
+ masterkey_resist = TRUE
+ no_panel = TRUE
+ not_weldable = TRUE
+ unacidable = TRUE
+
+/obj/structure/machinery/door/airlock/yautja/autoname
+ autoname = TRUE
+
+/obj/structure/machinery/door/airlock/yautja/secure
+ heavy = TRUE
+ req_one_access = list(ACCESS_YAUTJA_SECURE, ACCESS_YAUTJA_ELDER, ACCESS_YAUTJA_ANCIENT)
+
+/obj/structure/machinery/door/airlock/yautja/secure/elder
+ req_one_access = list(ACCESS_YAUTJA_ELDER, ACCESS_YAUTJA_ANCIENT)
+
+/obj/structure/machinery/door/airlock/yautja/secure/ancient
+ req_one_access = list(ACCESS_YAUTJA_ANCIENT)
+ unslashable = TRUE
+
//FIORINA PENITENTIARY (PRISON_FOP) MAINTENANCE HATCHES
/obj/structure/machinery/door/airlock/prison_hatch
diff --git a/code/game/machinery/doors/shutters.dm b/code/game/machinery/doors/shutters.dm
index 68b0464f87f8..39ecbd806e64 100644
--- a/code/game/machinery/doors/shutters.dm
+++ b/code/game/machinery/doors/shutters.dm
@@ -87,6 +87,17 @@
. = ..()
relativewall_neighbours()
+/obj/structure/machinery/door/poddoor/shutters/almayer/yautja
+ name = "Armory Shutter"
+ id = "Yautja Armory"
+ needs_power = FALSE
+ unacidable = TRUE
+ indestructible = TRUE
+
+/obj/structure/machinery/door/poddoor/shutters/almayer/yautja/Initialize()
+ . = ..()
+ RegisterSignal(SSdcs, COMSIG_GLOB_YAUTJA_ARMORY_OPENED, PROC_REF(open))
+
/obj/structure/machinery/door/poddoor/shutters/almayer/containment
unacidable = TRUE
diff --git a/code/game/machinery/nuclearbomb.dm b/code/game/machinery/nuclearbomb.dm
index 6c0ec4cc0389..743f53e4f03b 100644
--- a/code/game/machinery/nuclearbomb.dm
+++ b/code/game/machinery/nuclearbomb.dm
@@ -12,7 +12,7 @@ var/bomb_set = FALSE
var/timing = FALSE
var/deployable = FALSE
var/explosion_time = null
- var/timeleft = 4800
+ var/timeleft = 8 MINUTES
var/safety = TRUE
var/being_used = FALSE
var/end_round = TRUE
@@ -152,6 +152,7 @@ var/bomb_set = FALSE
data["command_lockout"] = command_lockout
data["allowed"] = allowed
data["being_used"] = being_used
+ data["decryption_complete"] = TRUE //this is overriden by techweb nuke UI_data later, this just makes it default to true
return data
diff --git a/code/game/machinery/telecomms/presets.dm b/code/game/machinery/telecomms/presets.dm
index a25293aebbd3..c56360953650 100644
--- a/code/game/machinery/telecomms/presets.dm
+++ b/code/game/machinery/telecomms/presets.dm
@@ -50,7 +50,7 @@
. = ..()
if(z)
- SSminimaps.add_marker(src, z, MINIMAP_FLAG_USCM, "supply")
+ SSminimaps.add_marker(src, z, MINIMAP_FLAG_ALL, "supply")
// doesn't need power, instead uses health
/obj/structure/machinery/telecomms/relay/preset/tower/inoperable(additional_flags)
diff --git a/code/game/machinery/vending/vendor_types/crew/synthetic.dm b/code/game/machinery/vending/vendor_types/crew/synthetic.dm
index be6939a6f9dd..dd11cea0f242 100644
--- a/code/game/machinery/vending/vendor_types/crew/synthetic.dm
+++ b/code/game/machinery/vending/vendor_types/crew/synthetic.dm
@@ -295,7 +295,7 @@ GLOBAL_LIST_INIT(cm_vending_clothing_synth_snowflake, list(
/obj/structure/machinery/cm_vending/own_points/experimental_tools/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/coin/marine/synth))
if(user.drop_inv_item_to_loc(W, src))
- available_points = available_points + 45
+ available_points = 45
available_points_to_display = available_points
to_chat(user, SPAN_NOTICE("You insert \the [W] into \the [src]."))
return
diff --git a/code/game/machinery/vending/vendor_types/squad_prep/squad_engineer.dm b/code/game/machinery/vending/vendor_types/squad_prep/squad_engineer.dm
index 3d39479167b0..05784ec3c161 100644
--- a/code/game/machinery/vending/vendor_types/squad_prep/squad_engineer.dm
+++ b/code/game/machinery/vending/vendor_types/squad_prep/squad_engineer.dm
@@ -24,7 +24,7 @@ GLOBAL_LIST_INIT(cm_vending_gear_engi, list(
list("Laser Designator", 15, /obj/item/device/binoculars/range/designator, null, VENDOR_ITEM_REGULAR),
list("Sandbags x25", 10, /obj/item/stack/sandbags_empty/half, null, VENDOR_ITEM_RECOMMENDED),
list("Super-Capacity Power Cell", 10, /obj/item/cell/super, null, VENDOR_ITEM_REGULAR),
- list("Welding Goggles", 5, /obj/item/clothing/glasses/welding, null, VENDOR_ITEM_MANDATORY),
+ list("Welding Goggles", 5, /obj/item/clothing/glasses/welding, null, VENDOR_ITEM_REGULAR),
list("ES-11 Mobile Fuel Canister", 4, /obj/item/tool/weldpack/minitank, null, VENDOR_ITEM_REGULAR),
list("EXPLOSIVES", 0, null, null, null),
diff --git a/code/game/objects/items/reagent_containers/food.dm b/code/game/objects/items/reagent_containers/food.dm
index 13dfcac84ff8..ded1b90b106f 100644
--- a/code/game/objects/items/reagent_containers/food.dm
+++ b/code/game/objects/items/reagent_containers/food.dm
@@ -2,6 +2,10 @@
/// Food.
////////////////////////////////////////////////////////////////////////////////
/obj/item/reagent_container/food
+ item_icons = list(
+ WEAR_L_HAND = 'icons/mob/humans/onmob/items_lefthand_1.dmi',
+ WEAR_R_HAND = 'icons/mob/humans/onmob/items_righthand_1.dmi'
+ )
possible_transfer_amounts = null
volume = 50 //Sets the default container amount for all food items.
flags_atom = CAN_BE_SYRINGED
diff --git a/code/game/objects/items/reagent_containers/food/fish_snacks.dm b/code/game/objects/items/reagent_containers/food/fish_snacks.dm
index 9e9dcb1b8017..ba4a3c05fb0f 100644
--- a/code/game/objects/items/reagent_containers/food/fish_snacks.dm
+++ b/code/game/objects/items/reagent_containers/food/fish_snacks.dm
@@ -13,7 +13,7 @@
var/gut_icon_state = null
var/gut_time = 3
var/initial_desc = ""
- var/list/guttable_atoms = list(/obj/item/reagent_container/food/snacks/meat, /obj/item/reagent_container/food/snacks/meat/syntiflesh)//placeholders, for now
+ var/list/guttable_atoms = list(/obj/item/reagent_container/food/snacks/meat, /obj/item/reagent_container/food/snacks/meat/synthmeat)//placeholders, for now
var/base_gut_meat = /obj/item/reagent_container/food/snacks/meat
//slice_path = null//
//slices_num
diff --git a/code/game/objects/items/reagent_containers/food/snacks/meat.dm b/code/game/objects/items/reagent_containers/food/snacks/meat.dm
index 0174af8520d2..f459d1b169ae 100644
--- a/code/game/objects/items/reagent_containers/food/snacks/meat.dm
+++ b/code/game/objects/items/reagent_containers/food/snacks/meat.dm
@@ -24,10 +24,20 @@
else
..()
-/obj/item/reagent_container/food/snacks/meat/syntiflesh
+/obj/item/reagent_container/food/snacks/meat/synthmeat
name = "synthetic meat"
desc = "A synthetic slab of flesh."
+/obj/item/reagent_container/food/snacks/meat/synthmeat/synthflesh //meat made from synthetics. Slightly toxic
+ name = "synthetic flesh"
+ desc = "A slab of artificial, inorganic 'flesh' that resembles human meat. Probably came from a synth."
+ icon_state = "synthmeat"
+ filling_color = "#ffffff"
+
+/obj/item/reagent_container/food/snacks/meat/synthmeat/synthetic/Initialize()
+ . = ..()
+ reagents.add_reagent("pacid", 1.5)
+
/obj/item/reagent_container/food/snacks/meat/human
name = "human meat"
desc = "A slab of flesh for cannibals."
diff --git a/code/game/objects/items/storage/belt.dm b/code/game/objects/items/storage/belt.dm
index 6e8b00fc48e8..290460da758f 100644
--- a/code/game/objects/items/storage/belt.dm
+++ b/code/game/objects/items/storage/belt.dm
@@ -3,6 +3,10 @@
desc = "Can hold various things."
icon = 'icons/obj/items/clothing/belts.dmi'
icon_state = "utilitybelt"
+ item_icons = list(
+ WEAR_L_HAND = 'icons/mob/humans/onmob/items_lefthand_1.dmi',
+ WEAR_R_HAND = 'icons/mob/humans/onmob/items_righthand_1.dmi'
+ )
item_state = "utility"
flags_equip_slot = SLOT_WAIST
attack_verb = list("whipped", "lashed", "disciplined")
diff --git a/code/game/objects/items/tools/misc_tools.dm b/code/game/objects/items/tools/misc_tools.dm
index 1bcebd9f1ea3..505006285881 100644
--- a/code/game/objects/items/tools/misc_tools.dm
+++ b/code/game/objects/items/tools/misc_tools.dm
@@ -276,13 +276,29 @@
pen_colour = "white"
/obj/item/tool/pen/fountain
- desc = "A luxurious fountain pen, embossed with gold accents. Its intricate mechanics allow the user to switch between various ink colors with a simple twist."
+ desc = "A lavish testament to the ingenuity of ARMAT's craftsmanship, this fountain pen is a paragon of design and functionality. Detailed with golden accents and intricate mechanics, the pen allows for a swift change between a myriad of ink colors with a simple twist. A product of precision engineering, each mechanism inside the pen is designed to provide a seamless, effortless transition from one color to the next, creating an instrument of luxurious versatility."
+ desc_lore = "More than just a tool for writing, ARMAT's fountain pen is a symbol of distinction and authority within the ranks of the United States Colonial Marine Corps (USCM). It is a legacy item, exclusively handed out to the top-tier command personnel, each pen a tribute to the recipient's leadership and dedication.\n \nARMAT, renowned for their weapons technology, took a different approach in crafting this piece. The fountain pen, though seemingly a departure from their usual field, is deeply ingrained with the company's engineering philosophy, embodying precision, functionality, and robustness.\n \nThe golden accents are not mere embellishments; they're an identifier, setting apart these pens and their owners from the rest. The gold is meticulously alloyed with a durable metallic substance, granting it resilience to daily wear and tear. Such resilience is symbolic of the tenacity and perseverance required of USCM command personnel.\n \nEach pen is equipped with an intricate color changing mechanism, allowing the user to switch between various ink colors. This feature, inspired by the advanced targeting systems of ARMAT's weaponry, uses miniaturized actuators and precision-ground components to smoothly transition the ink flow. A simple twist of the pen's body activates the change, rotating the internal ink cartridges into place with mechanical grace, ready for the user's command.\n \nThe ink colors are not chosen arbitrarily. Each represents a different echelon within the USCM, allowing the pen's owner to write in the hue that corresponds with their rank or the rank of the recipient of their written orders. This acts as a silent testament to the authority of their words, as if each stroke of the pen echoes through the halls of USCM authority.\n \nDespite its ornate appearance, the pen is as robust as any ARMAT weapon, reflecting the company's commitment to reliability and durability. The metal components are corrosion-resistant, ensuring the pen's longevity, even under the challenging conditions often faced by USCM high command.\n \nThe fusion of luxury and utility, the blend of gold and metal, is an embodiment of the hard-won elegance of command, of the fusion between power and grace. It's more than a writing instrument - it's an emblem of leadership, an accolade to the dedication and strength of those who bear it. ARMAT's fountain pen stands as a monument to the precision, integrity, and courage embodied by the USCM's highest-ranking officers."
name = "fountain pen"
icon_state = "fountain_pen"
item_state = "fountain_pen"
matter = list("metal" = 20, "gold" = 10)
var/static/list/colour_list = list("red", "blue", "green", "yellow", "purple", "pink", "brown", "black", "orange") // Can add more colors as required
var/current_colour_index = 1
+ var/owner = "hard to read text"
+
+/obj/item/tool/pen/fountain/Initialize(mapload, mob/living/carbon/human/user)
+ . = ..()
+ var/turf/current_turf = get_turf(src)
+ var/mob/living/carbon/human/new_owner = locate() in current_turf
+ if(new_owner)
+ owner = new_owner.real_name
+ var/obj/structure/machinery/cryopod/new_owners_pod = locate() in current_turf
+ if(new_owners_pod)
+ owner = new_owners_pod.occupant?.real_name
+
+/obj/item/tool/pen/fountain/get_examine_text(mob/user)
+ . = ..()
+ . += "There's a laser engraving of [owner] on it."
/obj/item/tool/pen/fountain/attack_self(mob/living/carbon/human/user)
if(on)
diff --git a/code/game/supplyshuttle.dm b/code/game/supplyshuttle.dm
index b760340004f5..350d6047b2a4 100644
--- a/code/game/supplyshuttle.dm
+++ b/code/game/supplyshuttle.dm
@@ -191,11 +191,11 @@ var/datum/controller/supply/supply_controller = new()
var/list/data = list()
var/list/squad_list = list()
- for(var/datum/squad/S in RoleAuthority.squads)
- if(S.active && S.faction == faction && S.color)
+ for(var/datum/squad/current_squad in RoleAuthority.squads)
+ if(current_squad.active && current_squad.faction == faction && current_squad.equipment_color)
squad_list += list(list(
- "squad_name" = S.name,
- "squad_color" = squad_colors[S.color]
+ "squad_name" = current_squad.name,
+ "squad_color" = current_squad.equipment_color
))
data["can_pick_squad"] = can_pick_squad
diff --git a/code/game/world.dm b/code/game/world.dm
index d6ddd1fa41f6..25cd609646da 100644
--- a/code/game/world.dm
+++ b/code/game/world.dm
@@ -39,7 +39,6 @@ var/list/reboot_sfx = file2list("config/reboot_sfx.txt")
GLOB.changelog_hash = fexists(latest_changelog) ? md5(latest_changelog) : 0 //for telling if the changelog has changed recently
initialize_tgs()
- initialize_marine_armor()
#ifdef UNIT_TESTS
GLOB.test_log = "data/logs/tests.log"
diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm
index 6154bb4f8c32..20ff65ed144e 100644
--- a/code/modules/admin/admin_verbs.dm
+++ b/code/modules/admin/admin_verbs.dm
@@ -191,6 +191,7 @@ var/list/admin_verbs_debug = list(
/client/proc/restart_controller,
/client/proc/debug_controller,
/client/proc/cmd_debug_toggle_should_check_for_win,
+ /client/proc/cmd_debug_mass_screenshot,
/client/proc/enable_debug_verbs,
/client/proc/toggledebuglogs,
/client/proc/togglenichelogs,
diff --git a/code/modules/admin/tabs/event_tab.dm b/code/modules/admin/tabs/event_tab.dm
index 89d709cbdda3..b9eb4fd47ea1 100644
--- a/code/modules/admin/tabs/event_tab.dm
+++ b/code/modules/admin/tabs/event_tab.dm
@@ -402,6 +402,29 @@
give_jelly_award(last_hive_checked, as_admin=TRUE)
+/client/proc/give_nuke()
+ if(!check_rights(R_ADMIN))
+ return
+ var/nuketype = "Decrypted Operational Nuke"
+ var/encrypt = tgui_alert(src, "Do you want the nuke to be already decrypted?", "Nuke Type", list("Encrypted", "Decrypted"), 20 SECONDS)
+ if(encrypt == "Encrypted")
+ nuketype = "Encrypted Operational Nuke"
+ var/prompt = tgui_alert(src, "THIS CAN BE USED TO END THE ROUND. Are you sure you want to spawn a nuke? The nuke will be put onto the ASRS Lift.", "DEFCON 1", list("No", "Yes"), 30 SECONDS)
+ if(prompt != "Yes")
+ return
+
+ var/datum/supply_order/new_order = new()
+ new_order.ordernum = supply_controller.ordernum
+ supply_controller.ordernum++
+ new_order.object = supply_controller.supply_packs[nuketype]
+ new_order.orderedby = MAIN_AI_SYSTEM
+ new_order.approvedby = MAIN_AI_SYSTEM
+ supply_controller.shoppinglist += new_order
+
+ marine_announcement("A nuclear device has been supplied and will be delivered to requisitions via ASRS.", "NUCLEAR ARSENAL ACQUIRED", 'sound/misc/notice2.ogg')
+ message_admins("[key_name_admin(usr)] admin-spawned a [encrypt] nuke.")
+ log_game("[key_name_admin(usr)] admin-spawned a [encrypt] nuke.")
+
/client/proc/turn_everyone_into_primitives()
var/random_names = FALSE
if (alert(src, "Do you want to give everyone random numbered names?", "Confirmation", "Yes", "No") == "Yes")
@@ -684,6 +707,7 @@
Misc Award a medal Award a royal jelly
+ Spawn a nuke Toggle PMC gun restrictions Turn everyone into monkies
diff --git a/code/modules/admin/topic/topic.dm b/code/modules/admin/topic/topic.dm
index 010802318fbe..a76be10e9c26 100644
--- a/code/modules/admin/topic/topic.dm
+++ b/code/modules/admin/topic/topic.dm
@@ -982,7 +982,7 @@
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Observer.)", 1)
else if(href_list["revive"])
- if(!check_rights(R_MOD))
+ if(!check_rights(R_MOD))
return
var/mob/living/L = locate(href_list["revive"])
@@ -1926,6 +1926,42 @@
log_game("[key_name_admin(usr)] has granted self-destruct, requested by [key_name_admin(ref_person)]")
message_admins("[key_name_admin(usr)] has granted self-destruct, requested by [key_name_admin(ref_person)]", 1)
+ if(href_list["nukeapprove"])
+ var/mob/ref_person = locate(href_list["nukeapprove"])
+ if(!istype(ref_person))
+ return FALSE
+ var/nuketype = "Encrypted Operational Nuke"
+ var/prompt = tgui_alert(usr, "Do you want the nuke to be Encrypted?", "Nuke Type", list("Encrypted", "Decrypted"), 20 SECONDS)
+ if(prompt == "Decrypted")
+ nuketype = "Decrypted Operational Nuke"
+ prompt = tgui_alert(usr, "Are you sure you want to authorize a [nuketype] to the marines? This will greatly affect the round!", "DEFCON 1", list("No", "Yes"))
+ if(prompt != "Yes")
+ return
+
+ //make ASRS order for nuke
+ var/datum/supply_order/new_order = new()
+ new_order.ordernum = supply_controller.ordernum
+ supply_controller.ordernum++
+ new_order.object = supply_controller.supply_packs[nuketype]
+ new_order.orderedby = ref_person
+ new_order.approvedby = "USCM High Command"
+ supply_controller.shoppinglist += new_order
+
+ //Can no longer request a nuke
+ GLOB.ares_link.interface.nuke_available = FALSE
+
+ marine_announcement("A nuclear device has been authorized by High Command and will be delivered to requisitions via ASRS.", "NUCLEAR ORDNANCE AUTHORIZED", 'sound/misc/notice2.ogg', logging = ARES_LOG_MAIN)
+ log_game("[key_name_admin(usr)] has authorized a [nuketype], requested by [key_name_admin(ref_person)]")
+ message_admins("[key_name_admin(usr)] has authorized a [nuketype], requested by [key_name_admin(ref_person)]")
+
+ if(href_list["nukedeny"])
+ var/mob/ref_person = locate(href_list["nukedeny"])
+ if(!istype(ref_person))
+ return FALSE
+ marine_announcement("Your request for nuclear ordnance deployment has been reviewed and denied by USCM High Command for operational security and colonial preservation reasons. Have a good day.", "NUCLEAR ORDNANCE DENIED", 'sound/misc/notice2.ogg', logging = ARES_LOG_MAIN)
+ log_game("[key_name_admin(usr)] has denied nuclear ordnance, requested by [key_name_admin(ref_person)]")
+ message_admins("[key_name_admin(usr)] has dnied nuclear ordnance, requested by [key_name_admin(ref_person)]")
+
if(href_list["sddeny"]) // CentComm-deny. The self-destruct is denied, without any further conditions
var/mob/ref_person = locate(href_list["sddeny"])
marine_announcement("The self-destruct request has not received a response, ARES is now recalculating statistics.", "Self-Destruct System", logging = ARES_LOG_SECURITY)
diff --git a/code/modules/admin/topic/topic_events.dm b/code/modules/admin/topic/topic_events.dm
index 1055d5e47879..3240bf947938 100644
--- a/code/modules/admin/topic/topic_events.dm
+++ b/code/modules/admin/topic/topic_events.dm
@@ -22,6 +22,8 @@
owner.award_medal()
if("jelly")
owner.award_jelly()
+ if("nuke")
+ owner.give_nuke()
if("pmcguns")
owner.toggle_gun_restrictions()
if("monkify")
diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm
index 8a017446858d..6be6b14e0247 100644
--- a/code/modules/admin/verbs/debug.dm
+++ b/code/modules/admin/verbs/debug.dm
@@ -92,7 +92,74 @@
else
message_admins("[key_name(src)] disabled checking for round-end.")
+/client/proc/cmd_debug_mass_screenshot()
+ set category = "Debug"
+ set name = "Mass Screenshot"
+ set background = TRUE
+ set waitfor = FALSE
+
+ if(!check_rights(R_MOD))
+ return
+ if(tgui_alert(usr, "Are you sure you want to mass screenshot this z-level? Ensure your visual settings are correct first (other ghost visibility, zoom level, etc.) and you have emptied your BYOND/screenshots folder.", "Mass Screenshot", list("Yes", "No")) != "Yes")
+ return
+
+ var/sleep_duration = tgui_input_number(usr, "Enter a delay in deciseconds between screenshots to allow the client to render changes.", "Screenshot delay", 2, 10, 1, 0, TRUE)
+ if(!sleep_duration)
+ return
+
+ if(!mob)
+ return
+
+ if(!isobserver(mob))
+ admin_ghost()
+
+ mob.alpha = 0
+ if(mob.hud_used)
+ mob.hud_used.show_hud(HUD_STYLE_NOHUD)
+ mob.animate_movement = NO_STEPS
+
+ message_admins(WRAP_STAFF_LOG(usr, "started a mass screenshot operation."))
+
+ var/half_chunk_size = view + 1
+ var/chunk_size = half_chunk_size * 2 - 1
+ var/cur_x = half_chunk_size
+ var/cur_y = half_chunk_size
+ var/cur_z = mob.z
+ var/width
+ var/height
+ if(istype(SSmapping.z_list[cur_z], /datum/space_level))
+ var/datum/space_level/cur_level = SSmapping.z_list[cur_z]
+ width = cur_level.x_bounds - half_chunk_size + 2
+ height = cur_level.y_bounds - half_chunk_size + 2
+ else
+ width = world.maxx - half_chunk_size + 2
+ height = world.maxy - half_chunk_size + 2
+ var/width_inside = width - 1
+ var/height_inside = height - 1
+
+ while(cur_y < height)
+ while(cur_x < width)
+ mob.on_mob_jump()
+ mob.forceMove(locate(cur_x, cur_y, cur_z))
+ sleep(sleep_duration)
+ winset(src, null, "command='.screenshot auto'")
+ if(cur_x == width_inside)
+ break
+ cur_x += chunk_size
+ cur_x = min(cur_x, width_inside)
+ if(cur_y == height_inside)
+ break
+ cur_x = half_chunk_size
+ cur_y += chunk_size
+ cur_y = min(cur_y, height_inside)
+
+ mob.alpha = initial(mob.alpha)
+ if(mob.hud_used)
+ mob.hud_used.show_hud(HUD_STYLE_STANDARD)
+ mob.animate_movement = SLIDE_STEPS // Initial is incorrect
+
+ to_chat(usr, "Provide these values when asked for the MapTileImageTool: [width] [height] [half_chunk_size] [world.icon_size]")
//TODO: merge the vievars version into this or something maybe mayhaps
/client/proc/cmd_debug_del_all()
diff --git a/code/modules/asset_cache/asset_list_items.dm b/code/modules/asset_cache/asset_list_items.dm
index 4ca05fe8a93c..e00f4a2d1263 100644
--- a/code/modules/asset_cache/asset_list_items.dm
+++ b/code/modules/asset_cache/asset_list_items.dm
@@ -271,7 +271,6 @@
/datum/asset/spritesheet/ranks/register()
var/icon_file = 'icons/mob/hud/marine_hud.dmi'
- var/list/squads = list("Alpha", "Bravo", "Charlie", "Delta", "Foxtrot", "Cryo")
var/list/icon_data = list(
list("Mar", null),
@@ -284,10 +283,8 @@
list("SL", "hudsquad_leader"),
)
- var/i
- for(i = 1; i < length(squads); i++)
- var/squad = squads[i]
- var/color = squad_colors[i]
+ for(var/datum/squad/marine/squad in RoleAuthority.squads)
+ var/color = squad.equipment_color
for(var/iref in icon_data)
var/list/iconref = iref
var/icon/background = icon('icons/mob/hud/marine_hud.dmi', "hudsquad", SOUTH)
diff --git a/code/modules/clans/client.dm b/code/modules/clans/client.dm
index 2d06725736ce..d1f403c08300 100644
--- a/code/modules/clans/client.dm
+++ b/code/modules/clans/client.dm
@@ -405,10 +405,10 @@
to_chat(src, SPAN_WARNING("This player doesn't belong to a clan!"))
return
- var/list/datum/rank/ranks = clan_ranks.Copy()
+ var/list/datum/yautja_rank/ranks = clan_ranks.Copy()
ranks -= CLAN_RANK_ADMIN // Admin rank should not and cannot be obtained from here
- var/datum/rank/chosen_rank
+ var/datum/yautja_rank/chosen_rank
if(has_clan_permission(CLAN_PERMISSION_ADMIN_MODIFY, warn = FALSE))
var/input = tgui_input_list(src, "Select the rank to change this user to.", "Select Rank", ranks)
diff --git a/code/modules/clans/rank.dm b/code/modules/clans/rank.dm
index b0748ce60662..a6b78a0d95e9 100644
--- a/code/modules/clans/rank.dm
+++ b/code/modules/clans/rank.dm
@@ -1,4 +1,4 @@
-/datum/rank
+/datum/yautja_rank
var/name
var/limit_type
@@ -7,29 +7,29 @@
var/permissions = CLAN_PERMISSION_USER_VIEW
var/permission_required = CLAN_PERMISSION_USER_MODIFY
-/datum/rank/unblooded
+/datum/yautja_rank/unblooded
name = CLAN_RANK_UNBLOODED
permission_required = CLAN_PERMISSION_ADMIN_MODIFY
-/datum/rank/young
+/datum/yautja_rank/young
name = CLAN_RANK_YOUNG
-/datum/rank/blooded
+/datum/yautja_rank/blooded
name = CLAN_RANK_BLOODED
-/datum/rank/elite
+/datum/yautja_rank/elite
name = CLAN_RANK_ELITE
limit_type = CLAN_LIMIT_SIZE
limit = 5
-/datum/rank/elder
+/datum/yautja_rank/elder
name = CLAN_RANK_ELDER
limit_type = CLAN_LIMIT_SIZE
limit = 12
-/datum/rank/leader
+/datum/yautja_rank/leader
name = CLAN_RANK_LEADER
permissions = CLAN_PERMISSION_USER_ALL
@@ -37,7 +37,7 @@
limit_type = CLAN_LIMIT_NUMBER
limit = 1
-/datum/rank/ancient
+/datum/yautja_rank/ancient
name = CLAN_RANK_ADMIN
permission_required = CLAN_PERMISSION_ADMIN_MANAGER
diff --git a/code/modules/clothing/gloves/marine_gloves.dm b/code/modules/clothing/gloves/marine_gloves.dm
index bbddc1f10bb7..04d0b2f1c0cb 100644
--- a/code/modules/clothing/gloves/marine_gloves.dm
+++ b/code/modules/clothing/gloves/marine_gloves.dm
@@ -22,11 +22,17 @@
armor_rad = CLOTHING_ARMOR_NONE
armor_internaldamage = CLOTHING_ARMOR_LOW
var/adopts_squad_color = TRUE
+ /// The dmi where the grayscale squad overlays are contained
+ var/squad_overlay_icon = 'icons/mob/humans/onmob/hands_garb.dmi'
-/obj/item/clothing/gloves/marine/get_mob_overlay(mob/living/carbon/human/H, slot)
+/obj/item/clothing/gloves/marine/get_mob_overlay(mob/living/carbon/human/current_human, slot)
var/image/ret = ..()
- if(adopts_squad_color && slot == WEAR_HANDS && istype(H) && H.assigned_squad)
- ret.overlays += glovemarkings[H.assigned_squad.color]
+ if(!adopts_squad_color || !(current_human.assigned_squad && current_human.assigned_squad.equipment_color))
+ return ret
+ var/image/glove_overlay = image(squad_overlay_icon, icon_state = "std-gloves")
+ glove_overlay.alpha = current_human.assigned_squad.armor_alpha
+ glove_overlay.color = current_human.assigned_squad.equipment_color
+ ret.overlays += glove_overlay
return ret
/obj/item/clothing/gloves/marine/insulated
diff --git a/code/modules/clothing/head/helmet.dm b/code/modules/clothing/head/helmet.dm
index 1b66d3e1bf5f..0181d239c574 100644
--- a/code/modules/clothing/head/helmet.dm
+++ b/code/modules/clothing/head/helmet.dm
@@ -360,7 +360,7 @@ GLOBAL_LIST_INIT(allowed_helmet_items, list(
var/flags_marine_helmet = HELMET_SQUAD_OVERLAY|HELMET_GARB_OVERLAY|HELMET_DAMAGE_OVERLAY
var/helmet_bash_cooldown = 0
- var/specialty = "M10 pattern marine" //Give them a specialty var so that they show up correctly in vendors.
+ var/specialty = "M10 pattern marine" //Give them a specialty var so that they show up correctly in vendors. speciality does NOTHING if you have NO_NAME_OVERRIDE.
valid_accessory_slots = list(ACCESSORY_SLOT_HELM_C)
restricted_accessory_slots = list(ACCESSORY_SLOT_HELM_C)
item_icons = list(
@@ -372,8 +372,8 @@ GLOBAL_LIST_INIT(allowed_helmet_items, list(
var/storage_slots_reserved_for_garb = 1
var/storage_max_w_class = SIZE_TINY // can hold tiny items only, EXCEPT for glasses & metal flask.
var/storage_max_storage_space = 4
-
- //speciality does NOTHING if you have NO_NAME_OVERRIDE
+ /// The dmi where the grayscale squad overlays are contained
+ var/helmet_overlay_icon = 'icons/mob/humans/onmob/head_1.dmi'
/obj/item/clothing/head/helmet/marine/New(loc,
new_protection[] = list(MAP_ICE_COLONY = ICE_PLANET_MIN_COLD_PROT))
diff --git a/code/modules/clothing/suits/marine_armor.dm b/code/modules/clothing/suits/marine_armor.dm
index c6a2f7fcc32b..c78e6782a833 100644
--- a/code/modules/clothing/suits/marine_armor.dm
+++ b/code/modules/clothing/suits/marine_armor.dm
@@ -28,44 +28,6 @@
#define SOF 7
#define NOSQUAD 8
-var/list/armormarkings = list()
-var/list/armormarkings_sql = list()
-var/list/helmetmarkings = list()
-var/list/helmetmarkings_sql = list()
-var/list/glovemarkings = list()
-var/list/squad_colors = list(rgb(230,25,25), rgb(255,195,45), rgb(200,100,200), rgb(65,72,200), rgb(103,214,146), rgb(196, 122, 80), rgb(64, 0, 0))
-var/list/squad_colors_chat = list(rgb(230,125,125), rgb(255,230,80), rgb(255,150,255), rgb(130,140,255), rgb(103,214,146), rgb(196, 122, 80), rgb(64, 0, 0))
-
-/proc/initialize_marine_armor()
- var/i
- for(i=1, i<(length(squad_colors) + 1), i++)
- var/squad_color = squad_colors[i]
- var/armor_color = rgb(hex2num(copytext(squad_color, 2, 4)), hex2num(copytext(squad_color, 4, 6)), hex2num(copytext(squad_color, 6, 8)), 125)
-
- var/image/armor
- var/image/helmet
- var/image/glove
-
- armor = image('icons/mob/humans/onmob/suit_1.dmi',icon_state = "std-armor")
- armor.color = armor_color
- armormarkings += armor
- armor = image('icons/mob/humans/onmob/suit_1.dmi',icon_state = "sql-armor")
- armor.color = armor_color
- armormarkings_sql += armor
-
- helmet = image('icons/mob/humans/onmob/head_1.dmi',icon_state = "std-helmet")
- helmet.color = armor_color
- helmetmarkings += helmet
- helmet = image('icons/mob/humans/onmob/head_1.dmi',icon_state = "sql-helmet")
- helmet.color = armor_color
- helmetmarkings_sql += helmet
-
- glove = image('icons/mob/humans/onmob/hands_garb.dmi',icon_state = "std-gloves")
- glove.color = armor_color
- glovemarkings += glove
-
-
-
// MARINE STORAGE ARMOR
/obj/item/clothing/suit/storage/marine
@@ -122,7 +84,7 @@ var/list/squad_colors_chat = list(rgb(230,125,125), rgb(255,230,80), rgb(255,150
var/armor_overlays[]
actions_types = list(/datum/action/item_action/toggle)
var/flags_marine_armor = ARMOR_SQUAD_OVERLAY|ARMOR_LAMP_OVERLAY
- var/specialty = "M3 pattern marine" //Same thing here. Give them a specialty so that they show up correctly in vendors.
+ var/specialty = "M3 pattern marine" //Same thing here. Give them a specialty so that they show up correctly in vendors. speciality does NOTHING if you have NO_NAME_OVERRIDE
w_class = SIZE_HUGE
uniform_restricted = list(/obj/item/clothing/under/marine)
sprite_sheets = list(SPECIES_MONKEY = 'icons/mob/humans/species/monkeys/onmob/suit_monkey_1.dmi')
@@ -132,7 +94,8 @@ var/list/squad_colors_chat = list(rgb(230,125,125), rgb(255,230,80), rgb(255,150
drop_sound = "armorequip"
equip_sounds = list('sound/handling/putting_on_armor1.ogg')
var/armor_variation = 0
- //speciality does NOTHING if you have NO_NAME_OVERRIDE
+ /// The dmi where the grayscale squad overlays are contained
+ var/squad_overlay_icon = 'icons/mob/humans/onmob/suit_1.dmi'
/obj/item/clothing/suit/storage/marine/Initialize(mapload)
. = ..()
diff --git a/code/modules/cm_marines/marines_consoles.dm b/code/modules/cm_marines/marines_consoles.dm
index 3539a43e6c15..36535a0b5141 100644
--- a/code/modules/cm_marines/marines_consoles.dm
+++ b/code/modules/cm_marines/marines_consoles.dm
@@ -594,11 +594,11 @@
/obj/structure/machinery/computer/squad_changer/ui_static_data(mob/user)
var/list/data = list()
var/list/squads = list()
- for(var/datum/squad/S in RoleAuthority.squads)
- if(S.name != "Root" && !S.locked && S.active && S.faction == faction)
+ for(var/datum/squad/current_squad in RoleAuthority.squads)
+ if(current_squad.name != "Root" && !current_squad.locked && current_squad.active && current_squad.faction == faction)
var/list/squad = list(list(
- "name" = S.name,
- "color" = S.color-1
+ "name" = current_squad.name,
+ "color" = current_squad.equipment_color
))
squads += squad
data["squads"] = squads
diff --git a/code/modules/cm_preds/falcon.dm b/code/modules/cm_preds/falcon.dm
index 7b369d6b1032..19977a7bd84a 100644
--- a/code/modules/cm_preds/falcon.dm
+++ b/code/modules/cm_preds/falcon.dm
@@ -11,12 +11,27 @@
)
flags_equip_slot = SLOT_EAR
flags_item = ITEM_PREDATOR
+ flags_atom = FPRINT|USES_HEARING
+
+
+/obj/item/falcon_drone/hear_talk(mob/living/sourcemob, message, verb, datum/language/language, italics)
+ var/mob/hologram/falcon/hologram = loc
+ if(!istype(hologram))
+ return FALSE
+ var/mob/living/carbon/human/user = hologram.owned_bracers.loc
+ if(!ishuman(user) || user == sourcemob)
+ return FALSE
+
+ to_chat(user, SPAN_YAUTJABOLD("Falcon Relay: [sourcemob.name] [verb], \"[message]\""))
+ if(user && user.client && user.client.prefs && !user.client.prefs.lang_chat_disabled \
+ && !user.ear_deaf && user.say_understands(sourcemob, language))
+ sourcemob.langchat_display_image(user)
+
+ return TRUE
/obj/item/falcon_drone/get_examine_location(mob/living/carbon/human/wearer, mob/examiner, slot, t_he = "They", t_his = "their", t_him = "them", t_has = "have", t_is = "are")
switch(slot)
- if(WEAR_L_EAR)
- return "on [t_his] shoulder"
- if(WEAR_R_EAR)
+ if(WEAR_L_EAR, WEAR_R_EAR)
return "on [t_his] shoulder"
return ..()
diff --git a/code/modules/cm_preds/yaut_bracers.dm b/code/modules/cm_preds/yaut_bracers.dm
index 9642b4b9f5a5..f33d5f9a5554 100644
--- a/code/modules/cm_preds/yaut_bracers.dm
+++ b/code/modules/cm_preds/yaut_bracers.dm
@@ -50,14 +50,10 @@
/obj/item/clothing/gloves/yautja/equipped(mob/user, slot)
. = ..()
if(slot == WEAR_HANDS)
- flags_item |= NODROP
START_PROCESSING(SSobj, src)
- if(isyautja(user))
- to_chat(user, SPAN_WARNING("The bracer clamps securely around your forearm and beeps in a comfortable, familiar way."))
- else
- to_chat(user, SPAN_WARNING("The bracer clamps painfully around your forearm and beeps angrily. It won't come off!"))
if(!owner)
owner = user
+ toggle_lock_internal(user, TRUE)
/obj/item/clothing/gloves/yautja/Destroy()
STOP_PROCESSING(SSobj, src)
@@ -227,7 +223,7 @@
var/caster_material = "ebony"
var/obj/item/card/id/bracer_chip/embedded_id
-
+ var/owner_rank = CLAN_RANK_UNBLOODED_INT
var/caster_deployed = FALSE
var/obj/item/weapon/gun/energy/yautja/plasma_caster/caster
@@ -236,8 +232,10 @@
var/obj/item/weapon/wristblades/left_wristblades
var/obj/item/weapon/wristblades/right_wristblades
-/obj/item/clothing/gloves/yautja/hunter/Initialize(mapload, new_translator_type, new_caster_material)
+/obj/item/clothing/gloves/yautja/hunter/Initialize(mapload, new_translator_type, new_caster_material, new_owner_rank)
. = ..()
+ if(new_owner_rank)
+ owner_rank = new_owner_rank
embedded_id = new(src)
if(new_translator_type)
translator_type = new_translator_type
@@ -742,12 +740,13 @@
return
exploding = FALSE
to_chat(M, SPAN_NOTICE("Your bracers stop beeping."))
- message_admins("[M] ([M.key]) has deactivated their Self-Destruct.")
+ message_all_yautja("[M.real_name] has cancelled their bracer's self-destruction sequence.")
+ message_admins("[key_name(M)] has deactivated their Self-Destruct.")
return
if(istype(M.wear_mask,/obj/item/clothing/mask/facehugger) || (M.status_flags & XENO_HOST))
to_chat(M, SPAN_WARNING("Strange...something seems to be interfering with your bracer functions..."))
return
- if(forced || alert("Detonate the bracers? Are you sure?","Explosive Bracers", "Yes", "No") == "Yes")
+ if(forced || alert("Detonate the bracers? Are you sure?\n\nNote: If you activate SD for any non-accidental reason during or after a fight, you commit to the SD. By initially activating the SD, you have accepted your impending death to preserve any lost honor.","Explosive Bracers", "Yes", "No") == "Yes")
if(M.gloves != src)
return
if(M.stat == DEAD)
@@ -1077,3 +1076,69 @@
M.u_equip(embedded_id, src, FALSE, TRUE)
else
embedded_id.forceMove(src)
+
+/// Verb to let Yautja attempt the unlocking.
+/obj/item/clothing/gloves/yautja/hunter/verb/toggle_lock()
+ set name = "Toggle Bracer Lock"
+ set desc = "Toggle the lock on your bracers, allowing them to be removed."
+ set category = "Yautja.Misc"
+ set src in usr
+
+ if(usr.stat)
+ to_chat(usr, SPAN_WARNING("You can't do that right now..."))
+ return FALSE
+ if(!HAS_TRAIT(usr, TRAIT_YAUTJA_TECH))
+ to_chat(usr, SPAN_WARNING("You have no idea how to use this..."))
+ return FALSE
+
+ attempt_toggle_lock(usr, FALSE)
+ return TRUE
+
+/// Handles all the locking and unlocking of bracers.
+/obj/item/clothing/gloves/yautja/proc/attempt_toggle_lock(mob/user, force_lock)
+ if(!user)
+ return FALSE
+
+ var/obj/item/grab/held_mob = user.get_active_hand()
+ if(!istype(held_mob))
+ log_attack("[key_name_admin(usr)] has unlocked their own bracer.")
+ toggle_lock_internal(user)
+ return TRUE
+
+ var/mob/living/carbon/human/victim = held_mob.grabbed_thing
+ var/obj/item/clothing/gloves/yautja/hunter/bracer = victim.gloves
+ if(isspeciesyautja(victim) && !(victim.stat == DEAD))
+ to_chat(user, SPAN_WARNING("You cannot unlock the bracer of a living hunter!"))
+ return FALSE
+
+ if(!istype(bracer))
+ to_chat(user, SPAN_WARNING("This [victim.species] does not have a bracer attached."))
+ return FALSE
+
+ if(alert("Are you sure you want to unlock this [victim.species]'s bracer?", "Unlock Bracers", "Yes", "No") != "Yes")
+ return FALSE
+
+ if(user.get_active_hand() == held_mob && victim && victim.gloves == bracer)
+ log_interact(user, victim, "[key_name(user)] unlocked the [bracer.name] of [key_name(victim)].")
+ user.visible_message(SPAN_WARNING("[user] presses a few buttons on [victim]'s wrist bracer."),SPAN_DANGER("You unlock the bracer."))
+ bracer.toggle_lock_internal(victim)
+ return TRUE
+
+/// The actual unlock/lock function.
+/obj/item/clothing/gloves/yautja/proc/toggle_lock_internal(mob/wearer, force_lock)
+ if(((flags_item & NODROP) || (flags_inventory & CANTSTRIP)) && !force_lock)
+ flags_item &= ~NODROP
+ flags_inventory &= ~CANTSTRIP
+ if(!isyautja(wearer))
+ to_chat(wearer, SPAN_WARNING("The bracer beeps pleasantly, releasing it's grip on your forearm."))
+ else
+ to_chat(wearer, SPAN_WARNING("With an angry blare the bracer releases your forearm."))
+ return TRUE
+
+ flags_item |= NODROP
+ flags_inventory |= CANTSTRIP
+ if(isyautja(wearer))
+ to_chat(wearer, SPAN_WARNING("The bracer clamps securely around your forearm and beeps in a comfortable, familiar way."))
+ else
+ to_chat(wearer, SPAN_WARNING("The bracer clamps painfully around your forearm and beeps angrily. It won't come off!"))
+ return TRUE
diff --git a/code/modules/cm_preds/yaut_items.dm b/code/modules/cm_preds/yaut_items.dm
index 47b2408c4f37..31526ae908f3 100644
--- a/code/modules/cm_preds/yaut_items.dm
+++ b/code/modules/cm_preds/yaut_items.dm
@@ -888,11 +888,31 @@
desc = "A complex cypher chip embedded within a set of clan bracers."
icon = 'icons/obj/items/radio.dmi'
icon_state = "upp_key"
+ access = list(ACCESS_YAUTJA_SECURE)
w_class = SIZE_TINY
flags_equip_slot = SLOT_ID
flags_item = ITEM_PREDATOR|DELONDROP|NODROP
paygrade = null
+/obj/item/card/id/bracer_chip/set_user_data(mob/living/carbon/human/human_user)
+ if(!istype(human_user))
+ return
+
+ registered_name = human_user.real_name
+ registered_ref = WEAKREF(human_user)
+ registered_gid = human_user.gid
+ blood_type = human_user.blood_type
+
+ var/list/new_access = list(ACCESS_YAUTJA_SECURE)
+ var/obj/item/clothing/gloves/yautja/hunter/bracer = loc
+ if(istype(bracer) && bracer.owner_rank)
+ switch(bracer.owner_rank)
+ if(CLAN_RANK_ELDER_INT, CLAN_RANK_LEADER_INT)
+ new_access = list(ACCESS_YAUTJA_SECURE, ACCESS_YAUTJA_ELDER)
+ if(CLAN_RANK_ADMIN_INT)
+ new_access = list(ACCESS_YAUTJA_SECURE, ACCESS_YAUTJA_ELDER, ACCESS_YAUTJA_ANCIENT)
+ access = new_access
+
/obj/item/storage/medicomp
name = "medicomp"
desc = "A complex kit of alien tools and medicines."
diff --git a/code/modules/cm_preds/yaut_weapons.dm b/code/modules/cm_preds/yaut_weapons.dm
index 986b30c27ddf..fbbe6c183aaa 100644
--- a/code/modules/cm_preds/yaut_weapons.dm
+++ b/code/modules/cm_preds/yaut_weapons.dm
@@ -757,7 +757,7 @@
/obj/item/weapon/gun/launcher/spike/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_6
+ set_fire_delay(FIRE_DELAY_TIER_6)
accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_5
accuracy_mult_unwielded = BASE_ACCURACY_MULT
scatter = SCATTER_AMOUNT_TIER_8
@@ -859,7 +859,7 @@
/obj/item/weapon/gun/energy/yautja/plasmarifle/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_6*2
+ set_fire_delay(FIRE_DELAY_TIER_6*2)
accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_10
accuracy_mult_unwielded = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_10
scatter = SCATTER_AMOUNT_TIER_6
@@ -961,7 +961,7 @@
/obj/item/weapon/gun/energy/yautja/plasmapistol/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_7
+ set_fire_delay(FIRE_DELAY_TIER_7)
accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_10
accuracy_mult_unwielded = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_7
scatter = SCATTER_AMOUNT_TIER_8
@@ -1084,7 +1084,7 @@
/obj/item/weapon/gun/energy/yautja/plasma_caster/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_6
+ set_fire_delay(FIRE_DELAY_TIER_6)
accuracy_mult = BASE_ACCURACY_MULT
accuracy_mult_unwielded = BASE_ACCURACY_MULT + FIRE_DELAY_TIER_6
scatter = SCATTER_AMOUNT_TIER_6
@@ -1100,21 +1100,21 @@
if("low power stun bolts")
strength = "high power stun bolts"
charge_cost = 100
- fire_delay = FIRE_DELAY_TIER_6 * 3
+ set_fire_delay(FIRE_DELAY_TIER_6 * 3)
fire_sound = 'sound/weapons/pred_lasercannon.ogg'
to_chat(user, SPAN_NOTICE("[src] will now fire [strength]."))
ammo = GLOB.ammo_list[/datum/ammo/energy/yautja/caster/bolt/stun]
if("high power stun bolts")
strength = "plasma immobilizers"
charge_cost = 300
- fire_delay = FIRE_DELAY_TIER_6 * 20
+ set_fire_delay(FIRE_DELAY_TIER_6 * 20)
fire_sound = 'sound/weapons/pulse.ogg'
to_chat(user, SPAN_NOTICE("[src] will now fire [strength]."))
ammo = GLOB.ammo_list[/datum/ammo/energy/yautja/caster/sphere/stun]
if("plasma immobilizers")
strength = "low power stun bolts"
charge_cost = 30
- fire_delay = FIRE_DELAY_TIER_6
+ set_fire_delay(FIRE_DELAY_TIER_6)
fire_sound = 'sound/weapons/pred_plasmacaster_fire.ogg'
to_chat(user, SPAN_NOTICE("[src] will now fire [strength]."))
ammo = GLOB.ammo_list[/datum/ammo/energy/yautja/caster/stun]
@@ -1123,14 +1123,14 @@
if("plasma bolts")
strength = "plasma spheres"
charge_cost = 1200
- fire_delay = FIRE_DELAY_TIER_6 * 20
+ set_fire_delay(FIRE_DELAY_TIER_6 * 20)
fire_sound = 'sound/weapons/pulse.ogg'
to_chat(user, SPAN_NOTICE("[src] will now fire [strength]."))
ammo = GLOB.ammo_list[/datum/ammo/energy/yautja/caster/sphere]
if("plasma spheres")
strength = "plasma bolts"
charge_cost = 100
- fire_delay = FIRE_DELAY_TIER_6 * 3
+ set_fire_delay(FIRE_DELAY_TIER_6 * 3)
fire_sound = 'sound/weapons/pred_lasercannon.ogg'
to_chat(user, SPAN_NOTICE("[src] will now fire [strength]."))
ammo = GLOB.ammo_list[/datum/ammo/energy/yautja/caster/bolt]
@@ -1142,7 +1142,7 @@
to_chat(usr, SPAN_YAUTJABOLD("[src.source] beeps: [src] is now set to [mode] mode"))
strength = "plasma bolts"
charge_cost = 100
- fire_delay = FIRE_DELAY_TIER_6 * 3
+ set_fire_delay(FIRE_DELAY_TIER_6 * 3)
fire_sound = 'sound/weapons/pred_lasercannon.ogg'
to_chat(usr, SPAN_NOTICE("[src] will now fire [strength]."))
ammo = GLOB.ammo_list[/datum/ammo/energy/yautja/caster/bolt]
@@ -1152,7 +1152,7 @@
to_chat(usr, SPAN_YAUTJABOLD("[src.source] beeps: [src] is now set to [mode] mode"))
strength = "low power stun bolts"
charge_cost = 30
- fire_delay = FIRE_DELAY_TIER_6
+ set_fire_delay(FIRE_DELAY_TIER_6)
fire_sound = 'sound/weapons/pred_plasmacaster_fire.ogg'
to_chat(usr, SPAN_NOTICE("[src] will now fire [strength]."))
ammo = GLOB.ammo_list[/datum/ammo/energy/yautja/caster/stun]
diff --git a/code/modules/cm_tech/implements/adv_weapon.dm b/code/modules/cm_tech/implements/adv_weapon.dm
index 58773f551306..3cc8f1ceb4d6 100644
--- a/code/modules/cm_tech/implements/adv_weapon.dm
+++ b/code/modules/cm_tech/implements/adv_weapon.dm
@@ -101,8 +101,8 @@
/obj/item/weapon/gun/rifle/techweb_railgun/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_6*5
- burst_amount = BURST_AMOUNT_TIER_1
+ set_fire_delay(FIRE_DELAY_TIER_6*5)
+ set_burst_amount(BURST_AMOUNT_TIER_1)
accuracy_mult = BASE_ACCURACY_MULT * 3 //you HAVE to be able to hit
scatter = SCATTER_AMOUNT_TIER_8
damage_mult = BASE_BULLET_DAMAGE_MULT
diff --git a/code/modules/cm_tech/implements/medical_czsp.dm b/code/modules/cm_tech/implements/medical_czsp.dm
index ccfd59ce7cbc..e0b00ebf5afd 100644
--- a/code/modules/cm_tech/implements/medical_czsp.dm
+++ b/code/modules/cm_tech/implements/medical_czsp.dm
@@ -186,21 +186,21 @@
/obj/item/weapon/gun/pill/Fire(atom/target, mob/living/user, params, reflex, dual_wield)
if(!able_to_fire(user))
- return
+ return NONE
if(!current_mag.current_rounds)
click_empty(user)
- return
+ return NONE
if(!istype(current_mag, /obj/item/ammo_magazine/internal/pillgun))
- return
+ return NONE
var/obj/item/ammo_magazine/internal/pillgun/internal_mag = current_mag
var/obj/item/reagent_container/pill/pill_to_use = LAZYACCESS(internal_mag.pills, 1)
if(QDELETED(pill_to_use))
click_empty(user)
- return
+ return NONE
var/obj/item/projectile/pill/P = new /obj/item/projectile/pill(src, user, src)
P.generate_bullet(GLOB.ammo_list[/datum/ammo/pill], 0, 0)
@@ -211,6 +211,7 @@
playsound(user.loc, 'sound/items/syringeproj.ogg', 50, 1)
P.fire_at(target, user, src)
+ return AUTOFIRE_CONTINUE
/datum/ammo/pill
name = "syringe"
diff --git a/code/modules/cm_tech/techs/marine/tier4/nuke.dm b/code/modules/cm_tech/techs/marine/tier4/nuke.dm
index eb4e64b59951..441c9aba69fc 100644
--- a/code/modules/cm_tech/techs/marine/tier4/nuke.dm
+++ b/code/modules/cm_tech/techs/marine/tier4/nuke.dm
@@ -10,7 +10,7 @@
tier = /datum/tier/four
announce_name = "NUCLEAR ARSENAL ACQUIRED"
- announce_message = "A nuclear device has been purchased and will be delivered to requisitions via ASRS."
+ announce_message = "A nuclear device has been authorized and will be delivered to requisitions via ASRS."
flags = TREE_FLAG_MARINE
@@ -20,11 +20,12 @@
/datum/tech/nuke/on_unlock()
. = ..()
- var/datum/supply_order/new_order = new /datum/supply_order()
+ var/datum/supply_order/new_order = new()
new_order.ordernum = supply_controller.ordernum
supply_controller.ordernum++
- new_order.object = supply_controller.supply_packs["Intel Operational Nuke"]
+ new_order.object = supply_controller.supply_packs["Encrypted Operational Nuke"]
new_order.orderedby = MAIN_AI_SYSTEM
+ new_order.approvedby = MAIN_AI_SYSTEM
supply_controller.shoppinglist += new_order
diff --git a/code/modules/gear_presets/fun.dm b/code/modules/gear_presets/fun.dm
index 3930f6fb9999..20a7f18077dd 100644
--- a/code/modules/gear_presets/fun.dm
+++ b/code/modules/gear_presets/fun.dm
@@ -141,7 +141,7 @@
launcher.cylinder.storage_slots = launcher.internal_slots //need to adjust the internal storage as well.
for(var/i = 1 to launcher.internal_slots)
new /obj/item/explosive/grenade/high_explosive/frag(launcher.cylinder)
- launcher.fire_delay = FIRE_DELAY_TIER_4 //More HEFA per second, per second. Strictly speaking this is probably a nerf.
+ launcher.set_fire_delay(FIRE_DELAY_TIER_4) //More HEFA per second, per second. Strictly speaking this is probably a nerf.
// Satchel
if(satchel_success)
diff --git a/code/modules/gear_presets/pmc.dm b/code/modules/gear_presets/pmc.dm
index 59f1b9e09cdf..5fa5dd1374e8 100644
--- a/code/modules/gear_presets/pmc.dm
+++ b/code/modules/gear_presets/pmc.dm
@@ -1837,10 +1837,10 @@ list("POUCHES (CHOOSE 2)", 0, null, null, null),
languages = ALL_SYNTH_LANGUAGES
skills = /datum/skills/synthetic
- idtype = /obj/item/card/id/data
+ idtype = /obj/item/card/id/pmc
assignment = JOB_PMC_SYNTH
rank = JOB_PMC_SYNTH
- role_comm_title = "Syn"
+ role_comm_title = "WY Syn"
headset_type = /obj/item/device/radio/headset/distress/pmc/command
@@ -1879,7 +1879,7 @@ list("POUCHES (CHOOSE 2)", 0, null, null, null),
new_human.equip_to_slot_or_del(new /obj/item/clothing/accessory/storage/surg_vest/equipped, WEAR_ACCESSORY)
new_human.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/marine/veteran/pmc/light/synth, WEAR_JACKET)
new_human.equip_to_slot_or_del(new /obj/item/weapon/telebaton, WEAR_IN_JACKET)
- new_human.equip_to_slot_or_del(new /obj/item/tool/surgery/synthgraft, WEAR_IN_JACKET)
+ new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/smg/nailgun, WEAR_IN_JACKET)
new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/smg/nailgun, WEAR_IN_JACKET)
new_human.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/marine/veteran/pmc, WEAR_HEAD)
@@ -1895,8 +1895,7 @@ list("POUCHES (CHOOSE 2)", 0, null, null, null),
new_human.equip_to_slot_or_del(new /obj/item/roller/surgical, WEAR_IN_BACK)
new_human.equip_to_slot_or_del(new /obj/item/tool/extinguisher/mini, WEAR_IN_BACK)
new_human.equip_to_slot_or_del(new /obj/item/device/defibrillator/upgraded, WEAR_IN_BACK)
- new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/smg/nailgun, WEAR_IN_BACK)
- new /obj/item/clothing/suit/auto_cpr(new_human.back)
+ new_human.equip_to_slot_or_del(new /obj/item/tool/crew_monitor, WEAR_IN_BACK)
new_human.equip_to_slot_or_del(new /obj/item/storage/belt/medical/lifesaver/full/dutch, WEAR_WAIST)
new_human.equip_to_slot_or_del(new /obj/item/weapon/gun/smg/nailgun/compact, WEAR_J_STORE)
diff --git a/code/modules/gear_presets/synths.dm b/code/modules/gear_presets/synths.dm
index 3e732e93990a..eaf6299b88a8 100644
--- a/code/modules/gear_presets/synths.dm
+++ b/code/modules/gear_presets/synths.dm
@@ -372,6 +372,7 @@
/datum/equipment_preset/synth/survivor/security_synth
name = "Survivor - Synthetic - Corporate Security Synth"
idtype = /obj/item/card/id/silver/cl
+ role_comm_title = "WY Syn"
equipment_to_spawn = list(
WEAR_HEAD = /obj/item/clothing/head/soft/sec/corp,
WEAR_L_EAR = /obj/item/device/radio/headset/distress/WY,
@@ -392,6 +393,7 @@
/datum/equipment_preset/synth/survivor/protection_synth
name = "Survivor - Synthetic - Corporate Protection Synth"
idtype = /obj/item/card/id/pmc
+ role_comm_title = "WY Syn"
equipment_to_spawn = list(
WEAR_HEAD = /obj/item/clothing/head/helmet/marine/veteran/pmc,
WEAR_L_EAR = /obj/item/device/radio/headset/distress/pmc/hvh,
@@ -414,6 +416,8 @@
/datum/equipment_preset/synth/survivor/corporate_synth
name = "Survivor - Synthetic - Corporate Clerical Synth"
+ idtype = /obj/item/card/id/data
+ role_comm_title = "WY Syn"
equipment_to_spawn = list(
WEAR_L_EAR = /obj/item/device/radio/headset/distress/WY,
WEAR_BODY = /obj/item/clothing/under/suit_jacket/trainee,
@@ -471,7 +475,7 @@
new_human.equip_to_slot_or_del(new /obj/item/clothing/accessory/storage/surg_vest/equipped, WEAR_ACCESSORY)
new_human.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/marine/veteran/pmc/light/synth, WEAR_JACKET)
new_human.equip_to_slot_or_del(new /obj/item/weapon/telebaton, WEAR_IN_JACKET)
- new_human.equip_to_slot_or_del(new /obj/item/tool/surgery/synthgraft, WEAR_IN_JACKET)
+ new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/smg/nailgun, WEAR_IN_JACKET)
new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/smg/nailgun, WEAR_IN_JACKET)
new_human.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/marine/veteran/pmc, WEAR_HEAD)
@@ -487,8 +491,7 @@
new_human.equip_to_slot_or_del(new /obj/item/roller/surgical, WEAR_IN_BACK)
new_human.equip_to_slot_or_del(new /obj/item/tool/extinguisher/mini, WEAR_IN_BACK)
new_human.equip_to_slot_or_del(new /obj/item/device/defibrillator/upgraded, WEAR_IN_BACK)
- new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/smg/nailgun, WEAR_IN_BACK)
- new_human.equip_to_slot_or_del(new /obj/item/clothing/suit/auto_cpr, WEAR_IN_BACK)
+ new_human.equip_to_slot_or_del(new /obj/item/tool/crew_monitor, WEAR_IN_BACK)
new_human.equip_to_slot_or_del(new /obj/item/storage/belt/medical/lifesaver/full/dutch, WEAR_WAIST)
new_human.equip_to_slot_or_del(new /obj/item/weapon/gun/smg/nailgun/compact, WEAR_J_STORE)
diff --git a/code/modules/gear_presets/yautja.dm b/code/modules/gear_presets/yautja.dm
index 51d2178bd905..21656e62eb7c 100644
--- a/code/modules/gear_presets/yautja.dm
+++ b/code/modules/gear_presets/yautja.dm
@@ -8,6 +8,7 @@
skills = /datum/skills/yautja/warrior
var/default_cape_type = "None"
+ var/clan_rank
/datum/equipment_preset/yautja/load_race(mob/living/carbon/human/new_human, client/mob_client)
new_human.set_species(SPECIES_YAUTJA)
@@ -53,7 +54,7 @@
cape_color = mob_client.prefs.predator_cape_color
new_human.equip_to_slot_or_del(new /obj/item/clothing/under/chainshirt/hunter(new_human), WEAR_BODY)
- new_human.equip_to_slot_or_del(new /obj/item/clothing/gloves/yautja/hunter(new_human, translator_type, caster_material), WEAR_HANDS)
+ new_human.equip_to_slot_or_del(new /obj/item/clothing/gloves/yautja/hunter(new_human, translator_type, caster_material, clan_rank), WEAR_HANDS)
new_human.equip_to_slot_or_del(new /obj/item/device/radio/headset/yautja(new_human), WEAR_L_EAR)
new_human.equip_to_slot_or_del(new /obj/item/device/flashlight/lantern(new_human), WEAR_R_STORE)
new_human.equip_to_slot_or_del(new /obj/item/device/yautja_teleporter(new_human), WEAR_L_STORE)
@@ -89,6 +90,7 @@
/datum/equipment_preset/yautja/youngblood
name = "Yautja Young"
flags = EQUIPMENT_PRESET_START_OF_ROUND
+ clan_rank = CLAN_RANK_UNBLOODED_INT
/datum/equipment_preset/yautja/youngblood/load_name(mob/living/carbon/human/new_human, randomise)
. = ..()
@@ -100,12 +102,14 @@
name = "Yautja Blooded"
flags = EQUIPMENT_PRESET_START_OF_ROUND
default_cape_type = PRED_YAUTJA_QUARTER_CAPE
+ clan_rank = CLAN_RANK_BLOODED_INT
// ELITE
/datum/equipment_preset/yautja/elite
name = "Yautja Elite"
flags = EQUIPMENT_PRESET_START_OF_ROUND
default_cape_type = PRED_YAUTJA_HALF_CAPE
+ clan_rank = CLAN_RANK_ELITE_INT
/datum/equipment_preset/yautja/elite/load_name(mob/living/carbon/human/new_human, randomise)
. = ..()
@@ -117,6 +121,7 @@
name = "Yautja Elder"
flags = EQUIPMENT_PRESET_START_OF_ROUND
default_cape_type = PRED_YAUTJA_THIRD_CAPE
+ clan_rank = CLAN_RANK_ELDER_INT
/datum/equipment_preset/yautja/elder/load_name(mob/living/carbon/human/new_human, randomise)
. = ..()
@@ -132,6 +137,7 @@
name = "Yautja Leader"
flags = EQUIPMENT_PRESET_START_OF_ROUND
default_cape_type = PRED_YAUTJA_CAPE
+ clan_rank = CLAN_RANK_LEADER_INT
/datum/equipment_preset/yautja/leader/load_name(mob/living/carbon/human/new_human, randomise)
. = ..()
@@ -147,6 +153,7 @@
name = "Yautja Ancient"
flags = EQUIPMENT_PRESET_START_OF_ROUND
default_cape_type = PRED_YAUTJA_PONCHO
+ clan_rank = CLAN_RANK_ADMIN_INT
/datum/equipment_preset/yautja/ancient/load_name(mob/living/carbon/human/new_human, randomise)
. = ..()
diff --git a/code/modules/mapping/space_management/space_level.dm b/code/modules/mapping/space_management/space_level.dm
index 86958c5b41b4..861258aa20a2 100644
--- a/code/modules/mapping/space_management/space_level.dm
+++ b/code/modules/mapping/space_management/space_level.dm
@@ -4,11 +4,13 @@
var/list/traits
var/z_value = 1 //actual z placement
var/linkage = SELFLOOPING
- var/xi
- var/yi //imaginary placements on the grid
+ var/x_bounds
+ var/y_bounds
/datum/space_level/New(new_z, new_name, list/new_traits = list())
z_value = new_z
name = new_name
traits = new_traits
//set_linkage(new_traits[ZTRAIT_LINKAGE])
+ x_bounds = world.maxx
+ y_bounds = world.maxy
diff --git a/code/modules/mob/dead/observer/orbit.dm b/code/modules/mob/dead/observer/orbit.dm
index 94d1203493da..a77138668d72 100644
--- a/code/modules/mob/dead/observer/orbit.dm
+++ b/code/modules/mob/dead/observer/orbit.dm
@@ -134,7 +134,7 @@
serialized["icon"] = icon ? icon : "private"
if(human.assigned_squad)
- serialized["background_color"] = human.assigned_squad.color ? squad_colors[human.assigned_squad.color] : human.assigned_squad.minimap_color
+ serialized["background_color"] = human.assigned_squad.equipment_color ? human.assigned_squad.equipment_color : human.assigned_squad.minimap_color
else
serialized["background_color"] = human.assigned_equipment_preset?.minimap_background
diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm
index 181f1c8a2814..8a1b7203c1ca 100644
--- a/code/modules/mob/living/carbon/human/human_attackhand.dm
+++ b/code/modules/mob/living/carbon/human/human_attackhand.dm
@@ -1,72 +1,72 @@
/mob/living/carbon/human/var/cpr_cooldown
/mob/living/carbon/human/var/cpr_attempt_timer
-/mob/living/carbon/human/attack_hand(mob/living/carbon/human/M)
+/mob/living/carbon/human/attack_hand(mob/living/carbon/human/attacking_mob)
if(..())
return TRUE
- if((M != src) && check_shields(0, M.name))
- visible_message(SPAN_DANGER("[M] attempted to touch [src]!"), null, null, 5)
+ if((attacking_mob != src) && check_shields(0, attacking_mob.name))
+ visible_message(SPAN_DANGER("[attacking_mob] attempted to touch [src]!"), null, null, 5)
return 0
- switch(M.a_intent)
+ switch(attacking_mob.a_intent)
if(INTENT_HELP)
- if(on_fire && M != src)
+ if(on_fire && attacking_mob != src)
adjust_fire_stacks(-10, min_stacks = 0)
playsound(src.loc, 'sound/weapons/thudswoosh.ogg', 25, 1, 7)
- M.visible_message(SPAN_DANGER("[M] tries to put out the fire on [src]!"), \
+ attacking_mob.visible_message(SPAN_DANGER("[attacking_mob] tries to put out the fire on [src]!"), \
SPAN_WARNING("You try to put out the fire on [src]!"), null, 5)
if(fire_stacks <= 0)
- M.visible_message(SPAN_DANGER("[M] has successfully extinguished the fire on [src]!"), \
+ attacking_mob.visible_message(SPAN_DANGER("[attacking_mob] has successfully extinguished the fire on [src]!"), \
SPAN_NOTICE("You extinguished the fire on [src]."), null, 5)
return 1
// If unconcious with oxygen damage, do CPR. If dead, we do CPR
if(!(stat == UNCONSCIOUS && getOxyLoss() > 0) && !(stat == DEAD))
- help_shake_act(M)
+ help_shake_act(attacking_mob)
return 1
- if(M.head && (M.head.flags_inventory & COVERMOUTH) || M.wear_mask && (M.wear_mask.flags_inventory & COVERMOUTH) && !(M.wear_mask.flags_inventory & ALLOWCPR))
- to_chat(M, SPAN_NOTICE("Remove your mask!"))
+ if(attacking_mob.head && (attacking_mob.head.flags_inventory & COVERMOUTH) || attacking_mob.wear_mask && (attacking_mob.wear_mask.flags_inventory & COVERMOUTH) && !(attacking_mob.wear_mask.flags_inventory & ALLOWCPR))
+ to_chat(attacking_mob, SPAN_NOTICE("Remove your mask!"))
return 0
if(head && (head.flags_inventory & COVERMOUTH) || wear_mask && (wear_mask.flags_inventory & COVERMOUTH) && !(wear_mask.flags_inventory & ALLOWCPR))
- to_chat(M, SPAN_NOTICE("Remove [src.gender==MALE?"his":"her"] mask!"))
+ to_chat(attacking_mob, SPAN_NOTICE("Remove [src.gender==MALE?"his":"her"] mask!"))
return 0
if(cpr_attempt_timer >= world.time)
- to_chat(M, SPAN_NOTICE("CPR is already being performed on [src]!"))
+ to_chat(attacking_mob, SPAN_NOTICE("CPR is already being performed on [src]!"))
return 0
//CPR
- if(M.action_busy)
+ if(attacking_mob.action_busy)
return 1
- M.visible_message(SPAN_NOTICE("[M] starts performing CPR on [src]."),
+ attacking_mob.visible_message(SPAN_NOTICE("[attacking_mob] starts performing CPR on [src]."),
SPAN_HELPFUL("You start performing CPR on [src]."))
- cpr_attempt_timer = world.time + HUMAN_STRIP_DELAY * M.get_skill_duration_multiplier(SKILL_MEDICAL)
- if(do_after(M, HUMAN_STRIP_DELAY * M.get_skill_duration_multiplier(SKILL_MEDICAL), INTERRUPT_ALL, BUSY_ICON_GENERIC, src, INTERRUPT_MOVED, BUSY_ICON_MEDICAL))
+ cpr_attempt_timer = world.time + HUMAN_STRIP_DELAY * attacking_mob.get_skill_duration_multiplier(SKILL_MEDICAL)
+ if(do_after(attacking_mob, HUMAN_STRIP_DELAY * attacking_mob.get_skill_duration_multiplier(SKILL_MEDICAL), INTERRUPT_ALL, BUSY_ICON_GENERIC, src, INTERRUPT_MOVED, BUSY_ICON_MEDICAL))
if(stat != DEAD)
var/suff = min(getOxyLoss(), 10) //Pre-merge level, less healing, more prevention of dieing.
apply_damage(-suff, OXY)
updatehealth()
- src.affected_message(M,
+ src.affected_message(attacking_mob,
SPAN_HELPFUL("You feel a breath of fresh air enter your lungs. It feels good."),
SPAN_HELPFUL("You perform CPR on [src]. Repeat at least every 7 seconds."),
- SPAN_NOTICE("[M] performs CPR on [src]."))
+ SPAN_NOTICE("[attacking_mob] performs CPR on [src]."))
if(is_revivable() && stat == DEAD)
if(cpr_cooldown < world.time)
revive_grace_period += 7 SECONDS
- M.visible_message(SPAN_NOTICE("[M] performs CPR on [src]."),
+ attacking_mob.visible_message(SPAN_NOTICE("[attacking_mob] performs CPR on [src]."),
SPAN_HELPFUL("You perform CPR on [src]."))
else
- M.visible_message(SPAN_NOTICE("[M] fails to perform CPR on [src]."),
+ attacking_mob.visible_message(SPAN_NOTICE("[attacking_mob] fails to perform CPR on [src]."),
SPAN_HELPFUL("You fail to perform CPR on [src]. Incorrect rhythm. Do it slower."))
cpr_cooldown = world.time + 7 SECONDS
cpr_attempt_timer = 0
return 1
if(INTENT_GRAB)
- if(M == src)
+ if(attacking_mob == src)
check_for_injuries()
return 1
@@ -74,116 +74,112 @@
return 0
if(w_uniform)
- w_uniform.add_fingerprint(M)
-
- M.start_pulling(src)
+ w_uniform.add_fingerprint(attacking_mob)
+ attacking_mob.start_pulling(src)
return 1
if(INTENT_HARM)
// See if they can attack, and which attacks to use.
- var/datum/unarmed_attack/attack = M.species.unarmed
- if(!attack.is_usable(M)) attack = M.species.secondary_unarmed
- if(!attack.is_usable(M)) return
+ var/datum/unarmed_attack/attack = attacking_mob.species.unarmed
+ if(!attack.is_usable(attacking_mob))
+ attack = attacking_mob.species.secondary_unarmed
+ return
last_damage_data = create_cause_data("fisticuffs", src)
- M.attack_log += text("\[[time_stamp()]\] [pick(attack.attack_verb)]ed [key_name(src)]")
- attack_log += text("\[[time_stamp()]\] Has been [pick(attack.attack_verb)]ed by [key_name(M)]")
- msg_admin_attack("[key_name(M)] [pick(attack.attack_verb)]ed [key_name(src)] in [get_area(src)] ([src.loc.x],[src.loc.y],[src.loc.z]).", src.loc.x, src.loc.y, src.loc.z)
+ attacking_mob.attack_log += text("\[[time_stamp()]\] [pick(attack.attack_verb)]ed [key_name(src)]")
+ attack_log += text("\[[time_stamp()]\] Has been [pick(attack.attack_verb)]ed by [key_name(attacking_mob)]")
+ msg_admin_attack("[key_name(attacking_mob)] [pick(attack.attack_verb)]ed [key_name(src)] in [get_area(src)] ([src.loc.x],[src.loc.y],[src.loc.z]).", src.loc.x, src.loc.y, src.loc.z)
- M.animation_attack_on(src)
- M.flick_attack_overlay(src, "punch")
+ attacking_mob.animation_attack_on(src)
+ attacking_mob.flick_attack_overlay(src, "punch")
var/extra_cqc_dmg = 0 //soft maximum of 5, this damage is added onto the final value depending on how much cqc skill you have
- if(M.skills)
- extra_cqc_dmg = M.skills?.get_skill_level(SKILL_CQC)
+ if(attacking_mob.skills)
+ extra_cqc_dmg = attacking_mob.skills?.get_skill_level(SKILL_CQC)
var/raw_damage = 0 //final value, gets absorbed by the armor and then deals the leftover to the mob
- var/obj/limb/affecting = get_limb(rand_zone(M.zone_selected, 70))
+ var/obj/limb/affecting = get_limb(rand_zone(attacking_mob.zone_selected, 70))
var/armor = getarmor(affecting, ARMOR_MELEE)
playsound(loc, attack.attack_sound, 25, 1)
- visible_message(SPAN_DANGER("[M] [pick(attack.attack_verb)]ed [src]!"), null, null, 5)
+ visible_message(SPAN_DANGER("[attacking_mob] [pick(attack.attack_verb)]ed [src]!"), null, null, 5)
raw_damage = attack.damage + extra_cqc_dmg
var/final_damage = armor_damage_reduction(GLOB.marine_melee, raw_damage, armor, FALSE) // no penetration from punches
apply_damage(final_damage, BRUTE, affecting, sharp=attack.sharp, edge = attack.edge)
if(INTENT_DISARM)
- if(M == src)
+ if(attacking_mob == src)
check_for_injuries()
return 1
- M.attack_log += text("\[[time_stamp()]\] Disarmed [key_name(src)]")
- src.attack_log += text("\[[time_stamp()]\] Has been disarmed by [key_name(M)]")
+ attacking_mob.attack_log += text("\[[time_stamp()]\] Disarmed [key_name(src)]")
+ src.attack_log += text("\[[time_stamp()]\] Has been disarmed by [key_name(attacking_mob)]")
- M.animation_attack_on(src)
- M.flick_attack_overlay(src, "disarm")
+ attacking_mob.animation_attack_on(src)
+ attacking_mob.flick_attack_overlay(src, "disarm")
- msg_admin_attack("[key_name(M)] disarmed [key_name(src)] in [get_area(src)] ([src.loc.x],[src.loc.y],[src.loc.z]).", src.loc.x, src.loc.y, src.loc.z)
+ msg_admin_attack("[key_name(attacking_mob)] disarmed [key_name(src)] in [get_area(src)] ([src.loc.x],[src.loc.y],[src.loc.z]).", src.loc.x, src.loc.y, src.loc.z)
if(w_uniform)
- w_uniform.add_fingerprint(M)
+ w_uniform.add_fingerprint(attacking_mob)
//Accidental gun discharge
- if(!skillcheck(M, SKILL_CQC, SKILL_CQC_SKILLED))
+ if(!skillcheck(attacking_mob, SKILL_CQC, SKILL_CQC_SKILLED))
if (isgun(r_hand) || isgun(l_hand))
- var/obj/item/weapon/gun/W = null
+ var/obj/item/weapon/gun/held_weapon = null
var/chance = 0
if (isgun(l_hand))
- W = l_hand
+ held_weapon = l_hand
chance = hand ? 40 : 20
if (isgun(r_hand))
- W = r_hand
+ held_weapon = r_hand
chance = !hand ? 40 : 20
if (prob(chance))
- visible_message(SPAN_DANGER("[M] accidentally makes [src]'s [W.name] go off during the struggle!"), SPAN_DANGER("You accidentally make [src]'s [W.name] go off during the struggle!"), null, 5)
+ visible_message(SPAN_DANGER("[attacking_mob] accidentally makes [src]'s [held_weapon.name] go off during the struggle!"), SPAN_DANGER("You accidentally make [src]'s [held_weapon.name] go off during the struggle!"), null, 5)
var/list/turfs = list()
for(var/turf/T in view())
turfs += T
var/turf/target = pick(turfs)
count_niche_stat(STATISTICS_NICHE_DISCHARGE)
- attack_log += "\[[time_stamp()]\] [key_name(src)] accidentally fired [W.name] in [get_area(src)] triggered by [key_name(M)]."
- M.attack_log += "\[[time_stamp()]\] [key_name(src)] accidentally fired [W.name] in [get_area(src)] triggered by [key_name(M)]."
- msg_admin_attack("[key_name(src)] accidentally fired [W.name] in [get_area(M)] ([M.loc.x],[M.loc.y],[M.loc.z]) triggered by [key_name(M)].", M.loc.x, M.loc.y, M.loc.z)
-
- return W.afterattack(target,src)
+ attack_log += "\[[time_stamp()]\] [key_name(src)] accidentally fired [held_weapon.name] in [get_area(src)] triggered by [key_name(attacking_mob)]."
+ attacking_mob.attack_log += "\[[time_stamp()]\] [key_name(src)] accidentally fired [held_weapon.name] in [get_area(src)] triggered by [key_name(attacking_mob)]."
+ msg_admin_attack("[key_name(src)] accidentally fired [held_weapon.name] in [get_area(attacking_mob)] ([attacking_mob.loc.x],[attacking_mob.loc.y],[attacking_mob.loc.z]) triggered by [key_name(attacking_mob)].", attacking_mob.loc.x, attacking_mob.loc.y, attacking_mob.loc.z)
- var/randn = rand(1, 100)
- var/skill_level = M.skills.get_skill_level(SKILL_CQC)
- if(M.skills)
- randn -= 5 * skill_level //attacker's martial arts training
+ return held_weapon.afterattack(target,src)
- if(skills)
- randn += 5 * skill_level //defender's martial arts training
+ var/disarm_chance = rand(1, 100)
+ var/attacker_skill_level = attacking_mob.skills ? skills.get_skill_level(SKILL_CQC) : SKILL_CQC_MAX // No skills, so assume max
+ var/defender_skill_level = skills ? skills.get_skill_level(SKILL_CQC) : SKILL_CQC_MAX // No skills, so assume max
+ disarm_chance -= 5 * attacker_skill_level
+ disarm_chance += 5 * defender_skill_level
- if (randn <= 25)
- apply_effect(2 + skill_level, WEAKEN)
+ if(disarm_chance <= 25)
+ apply_effect(2 + max((attacker_skill_level - defender_skill_level), 0), WEAKEN)
playsound(loc, 'sound/weapons/thudswoosh.ogg', 25, 1, 7)
- var/shovetext = skill_level > 1 ? "tackled" : pick("pushed", "shoved")
- visible_message(SPAN_DANGER("[M] has [shovetext] [src]!"), null, null, 5)
+ var/shove_text = attacker_skill_level > 1 ? "tackled" : pick("pushed", "shoved")
+ visible_message(SPAN_DANGER("[attacking_mob] has [shove_text] [src]!"), null, null, 5)
return
- if(randn <= 60)
+ if(disarm_chance <= 60)
//BubbleWrap: Disarming breaks a pull
if(pulling)
- visible_message(SPAN_DANGER("[M] has broken [src]'s grip on [pulling]!"), null, null, 5)
+ visible_message(SPAN_DANGER("[attacking_mob] has broken [src]'s grip on [pulling]!"), null, null, 5)
stop_pulling()
else
drop_held_item()
- visible_message(SPAN_DANGER("[M] has disarmed [src]!"), null, null, 5)
+ visible_message(SPAN_DANGER("[attacking_mob] has disarmed [src]!"), null, null, 5)
playsound(loc, 'sound/weapons/thudswoosh.ogg', 25, 1, 7)
return
-
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, 7)
- visible_message(SPAN_DANGER("[M] attempted to disarm [src]!"), null, null, 5)
- return
+ visible_message(SPAN_DANGER("[attacking_mob] attempted to disarm [src]!"), null, null, 5)
/mob/living/carbon/human/proc/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, inrange, params)
return
diff --git a/code/modules/mob/living/carbon/human/species/emote-yautja.dm b/code/modules/mob/living/carbon/human/species/emote-yautja.dm
deleted file mode 100644
index 8c959329c953..000000000000
--- a/code/modules/mob/living/carbon/human/species/emote-yautja.dm
+++ /dev/null
@@ -1,145 +0,0 @@
-/datum/emote/living/carbon/human/yautja
- species_type_allowed_typecache = list(/datum/species/yautja)
- keybind_category = CATEGORY_YAUTJA_EMOTE
-
-/datum/emote/living/carbon/human/yautja/anytime
- key = "anytime"
- sound = 'sound/voice/pred_anytime.ogg'
- emote_type = EMOTE_AUDIBLE
-
-/datum/emote/living/carbon/human/yautja/click
- key = "click"
- emote_type = EMOTE_AUDIBLE
-
-/datum/emote/living/carbon/human/yautja/click/get_sound(mob/living/user)
- if(rand(0,100) < 50)
- return 'sound/voice/pred_click1.ogg'
- else
- return 'sound/voice/pred_click2.ogg'
-
-/datum/emote/living/carbon/human/yautja/helpme
- key = "helpme"
- sound = 'sound/voice/pred_helpme.ogg'
- volume = 25
- emote_type = EMOTE_AUDIBLE
-
-/datum/emote/living/carbon/human/yautja/malescream
- key = "malescream"
- emote_type = EMOTE_AUDIBLE
- sound = "male_scream"
-
-/datum/emote/living/carbon/human/yautja/femalescream
- key = "femalescream"
- emote_type = EMOTE_AUDIBLE
- sound = "female_scream"
-
-/datum/emote/living/carbon/human/yautja/iseeyou
- key = "iseeyou"
- sound = 'sound/hallucinations/i_see_you2.ogg'
- emote_type = EMOTE_AUDIBLE
-
-/datum/emote/living/carbon/human/yautja/itsatrap
- key = "itsatrap"
- sound = 'sound/voice/pred_itsatrap.ogg'
- volume = 25
- emote_type = EMOTE_AUDIBLE
-
-/datum/emote/living/carbon/human/yautja/laugh1
- key = "laugh1"
- sound = 'sound/voice/pred_laugh1.ogg'
- volume = 25
- emote_type = EMOTE_AUDIBLE
-
-/datum/emote/living/carbon/human/yautja/laugh2
- key = "laugh2"
- sound = 'sound/voice/pred_laugh2.ogg'
- volume = 25
- emote_type = EMOTE_AUDIBLE
-
-/datum/emote/living/carbon/human/yautja/laugh3
- key = "laugh3"
- sound = 'sound/voice/pred_laugh3.ogg'
- volume = 25
- emote_type = EMOTE_AUDIBLE
-
-/datum/emote/living/carbon/human/yautja/overhere
- key = "overhere"
- sound = 'sound/voice/pred_overhere.ogg'
- volume = 25
- emote_type = EMOTE_AUDIBLE
-
-/datum/emote/living/carbon/human/yautja/roar
- key = "roar"
- message = "roars!"
- emote_type = EMOTE_AUDIBLE|EMOTE_VISIBLE
-
-/datum/emote/living/carbon/human/yautja/roar/get_sound(mob/living/user)
- return pick('sound/voice/pred_roar1.ogg', 'sound/voice/pred_roar2.ogg')
-
-/datum/emote/living/carbon/human/yautja/roar2
- key = "roar2"
- sound = 'sound/voice/pred_roar3.ogg'
- message = "roars!"
- emote_type = EMOTE_AUDIBLE|EMOTE_VISIBLE
-
-/datum/emote/living/carbon/human/yautja/loudroar
- key = "loudroar"
- message = "roars loudly!"
- volume = 60
- cooldown = 120 SECONDS
- emote_type = EMOTE_AUDIBLE|EMOTE_VISIBLE
-
-/datum/emote/living/carbon/human/yautja/loudroar/get_sound(mob/living/user)
- return pick('sound/voice/pred_roar4.ogg', 'sound/voice/pred_roar5.ogg')
-
-/datum/emote/living/carbon/human/yautja/loudroar/run_emote(mob/user, params, type_override, intentional)
- . = ..()
- if(!.)
- return
-
- for(var/mob/current_mob as anything in get_mobs_in_z_level_range(get_turf(user), 18) - user)
- var/relative_dir = get_dir(current_mob, user)
- var/final_dir = dir2text(relative_dir)
- to_chat(current_mob, SPAN_HIGHDANGER("You hear a loud roar coming from [final_dir ? "the [final_dir]" : "nearby"]!"))
-
-/datum/emote/living/carbon/human/yautja/turnaround
- key = "turnaround"
- sound = 'sound/voice/pred_turnaround.ogg'
- volume = 25
- emote_type = EMOTE_AUDIBLE
-
-/datum/emote/living/carbon/human/yautja/click2
- key = "click2"
- emote_type = EMOTE_AUDIBLE
-
-/datum/emote/living/carbon/human/yautja/click2/get_sound(mob/living/user)
- return pick('sound/voice/pred_click3.ogg', 'sound/voice/pred_click4.ogg')
-
-/datum/emote/living/carbon/human/yautja/aliengrowl
- key = "aliengrowl"
- emote_type = EMOTE_AUDIBLE
-
-/datum/emote/living/carbon/human/yautja/aliengrowl/get_sound(mob/living/user)
- return pick('sound/voice/alien_growl1.ogg', 'sound/voice/alien_growl2.ogg')
-
-/datum/emote/living/carbon/human/yautja/alienhelp
- key = "alienhelp"
- emote_type = EMOTE_AUDIBLE
-
-/datum/emote/living/carbon/human/yautja/alienhelp/get_sound(mob/living/user)
- return pick('sound/voice/alien_help1.ogg', 'sound/voice/alien_help2.ogg')
-
-/datum/emote/living/carbon/human/yautja/comeonout
- key = "comeonout"
- sound = 'sound/voice/pred_come_on_out.ogg'
- emote_type = EMOTE_AUDIBLE
-
-/datum/emote/living/carbon/human/yautja/overthere
- key = "overthere"
- sound = 'sound/voice/pred_over_there.ogg'
- emote_type = EMOTE_AUDIBLE
-
-/datum/emote/living/carbon/human/yautja/uglyfreak
- key = "uglyfreak"
- sound = 'sound/voice/pred_ugly_freak.ogg'
- emote_type = EMOTE_AUDIBLE
diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm
index a6d0355bfbe5..b6eeb68e95d3 100644
--- a/code/modules/mob/living/carbon/human/species/species.dm
+++ b/code/modules/mob/living/carbon/human/species/species.dm
@@ -123,6 +123,10 @@
/datum/species/proc/larva_impregnated(obj/item/alien_embryo/embryo)
return
+/// Override to add an emote panel to a species
+/datum/species/proc/open_emote_panel()
+ return
+
/datum/species/proc/handle_npc(mob/living/carbon/human/H)
set waitfor = FALSE
return
diff --git a/code/modules/mob/living/carbon/human/species/working_joe/_emote.dm b/code/modules/mob/living/carbon/human/species/working_joe/_emote.dm
index 63cc79a57dae..e66fec576f64 100644
--- a/code/modules/mob/living/carbon/human/species/working_joe/_emote.dm
+++ b/code/modules/mob/living/carbon/human/species/working_joe/_emote.dm
@@ -2,7 +2,7 @@
species_type_allowed_typecache = list(/datum/species/synthetic/colonial/working_joe)
keybind_category = CATEGORY_SYNTH_EMOTE
volume = 75
- /// A general category for the emote, for use in the WJ emote panel. See [code/__DEFINES/wj_emotes.dm] for categories.
+ /// A general category for the emote, for use in the WJ emote panel. See [code/__DEFINES/emote_panels.dm] for categories.
var/category = ""
/// Override text for the emote to be displayed in the WJ emote panel
var/override_say = ""
diff --git a/code/modules/mob/living/carbon/human/species/working_joe/_species.dm b/code/modules/mob/living/carbon/human/species/working_joe/_species.dm
index b9044becb6f5..139b339fbfd7 100644
--- a/code/modules/mob/living/carbon/human/species/working_joe/_species.dm
+++ b/code/modules/mob/living/carbon/human/species/working_joe/_species.dm
@@ -22,7 +22,7 @@
return ..()
/// Open the WJ's emote panel, which allows them to use voicelines
-/datum/species/synthetic/colonial/working_joe/proc/open_emote_panel()
+/datum/species/synthetic/colonial/working_joe/open_emote_panel()
var/datum/joe_emote_panel/ui = new(usr)
ui.ui_interact(usr)
diff --git a/code/modules/mob/living/carbon/human/species/yautja/_emote.dm b/code/modules/mob/living/carbon/human/species/yautja/_emote.dm
new file mode 100644
index 000000000000..0202eece1620
--- /dev/null
+++ b/code/modules/mob/living/carbon/human/species/yautja/_emote.dm
@@ -0,0 +1,10 @@
+/datum/emote/living/carbon/human/yautja
+ species_type_allowed_typecache = list(/datum/species/yautja)
+ keybind_category = CATEGORY_YAUTJA_EMOTE
+ emote_type = EMOTE_AUDIBLE
+ /// A general category for the emote, for use in the Yautja emote panel. See [code/__DEFINES/emote_panels.dm] for categories.
+ var/category = ""
+ /// Override text for the emote to be displayed in the Yautja emote panel
+ var/override_say = ""
+ /// Override for being in panel or not
+ var/no_panel = FALSE
diff --git a/code/modules/mob/living/carbon/human/species/yautja.dm b/code/modules/mob/living/carbon/human/species/yautja/_species.dm
similarity index 68%
rename from code/modules/mob/living/carbon/human/species/yautja.dm
rename to code/modules/mob/living/carbon/human/species/yautja/_species.dm
index a4c87b5da4e1..8e8849f5ad4c 100644
--- a/code/modules/mob/living/carbon/human/species/yautja.dm
+++ b/code/modules/mob/living/carbon/human/species/yautja/_species.dm
@@ -180,16 +180,16 @@
limb.max_damage = 35
limb.time_to_knit = -1
-/datum/species/yautja/handle_post_spawn(mob/living/carbon/human/H)
- GLOB.alive_human_list -= H
- H.universal_understand = 1
+/datum/species/yautja/handle_post_spawn(mob/living/carbon/human/hunter)
+ GLOB.alive_human_list -= hunter
+ hunter.universal_understand = 1
- H.blood_type = "Y*"
- H.h_style = "Standard"
+ hunter.blood_type = "Y*"
+ hunter.h_style = "Standard"
#ifndef UNIT_TESTS // Since this is a hard ref, we shouldn't confuse create_and_destroy
- GLOB.yautja_mob_list += H
+ GLOB.yautja_mob_list += hunter
#endif
- for(var/obj/limb/limb in H.limbs)
+ for(var/obj/limb/limb in hunter.limbs)
switch(limb.name)
if("groin","chest")
limb.min_broken_damage = 145
@@ -208,7 +208,8 @@
limb.max_damage = 150
limb.time_to_knit = 600 // 1 minute to self heal bone break, time is in tenths of a second
- H.set_languages(list(LANGUAGE_YAUTJA))
+ hunter.set_languages(list(LANGUAGE_YAUTJA))
+ give_action(hunter, /datum/action/yautja_emote_panel)
return ..()
/datum/species/yautja/get_hairstyle(style)
@@ -220,3 +221,105 @@
/datum/species/yautja/handle_paygrades()
return ""
+
+/// Open the Yautja emote panel, which allows them to use their emotes easier.
+/datum/species/yautja/open_emote_panel()
+ var/datum/yautja_emote_panel/ui = new(usr)
+ ui.ui_interact(usr)
+
+/datum/action/yautja_emote_panel
+ name = "Open Emote Panel"
+ action_icon_state = "looc_toggle"
+
+/datum/action/yautja_emote_panel/can_use_action()
+ . = ..()
+ if(!.)
+ return FALSE
+
+ if(!isyautja(owner))
+ return FALSE
+
+ return TRUE
+
+/datum/action/yautja_emote_panel/action_activate()
+ if(!can_use_action())
+ return
+
+ var/mob/living/carbon/human/human_owner = owner
+ var/datum/species/yautja/yautja_species = human_owner.species
+ yautja_species.open_emote_panel()
+
+/datum/yautja_emote_panel
+ /// Static dict ("category" : (emotes)) of every yautja emote typepath
+ var/static/list/yautja_emotes
+ /// Static list of categories
+ var/static/list/yautja_categories = list()
+ /// Panel allows you to spam, so a manual CD is added here
+ COOLDOWN_DECLARE(panel_emote_cooldown)
+
+/datum/yautja_emote_panel/New()
+ if(!length(yautja_emotes))
+ var/list/emotes_to_add = list()
+ for(var/datum/emote/living/carbon/human/yautja/emote as anything in subtypesof(/datum/emote/living/carbon/human/yautja))
+ if(!initial(emote.key) || initial(emote.no_panel))
+ continue
+
+ if(!(initial(emote.category) in yautja_categories))
+ yautja_categories += initial(emote.category)
+ emotes_to_add += emote
+ yautja_emotes = emotes_to_add
+
+/datum/yautja_emote_panel/proc/ui_interact(mob/user, datum/tgui/ui)
+ ui = SStgui.try_update_ui(user, src, ui)
+ if(!ui)
+ ui = new(user, src, "YautjaEmotes")
+ ui.open()
+
+/datum/yautja_emote_panel/ui_data(mob/user)
+ var/list/data = list()
+
+ data["on_cooldown"] = !COOLDOWN_FINISHED(src, panel_emote_cooldown)
+
+ return data
+
+/datum/yautja_emote_panel/ui_state(mob/user)
+ return GLOB.conscious_state
+
+/datum/yautja_emote_panel/ui_static_data(mob/user)
+ var/list/data = list()
+
+ data["categories"] = yautja_categories
+ data["emotes"] = list()
+
+ for(var/datum/emote/living/carbon/human/yautja/emote as anything in yautja_emotes)
+ data["emotes"] += list(list(
+ "id" = initial(emote.key),
+ "text" = (initial(emote.override_say) || initial(emote.say_message) || initial(emote.key)),
+ "category" = initial(emote.category),
+ "path" = "[emote]",
+ ))
+
+ return data
+
+/datum/yautja_emote_panel/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
+ . = ..()
+ if(.)
+ return
+
+ switch(action)
+ if("emote")
+ var/datum/emote/living/carbon/human/yautja/path
+ if(!params["emotePath"])
+ return FALSE
+
+ path = text2path(params["emotePath"])
+
+ if(!path || !COOLDOWN_FINISHED(src, panel_emote_cooldown))
+ return
+
+ if(!(path in subtypesof(/datum/emote/living/carbon/human/yautja)))
+ return FALSE
+
+ COOLDOWN_START(src, panel_emote_cooldown, 2.5 SECONDS)
+ usr.emote(initial(path.key))
+ return TRUE
diff --git a/code/modules/mob/living/carbon/human/species/yautja/fake_sounds.dm b/code/modules/mob/living/carbon/human/species/yautja/fake_sounds.dm
new file mode 100644
index 000000000000..f29a990b6254
--- /dev/null
+++ b/code/modules/mob/living/carbon/human/species/yautja/fake_sounds.dm
@@ -0,0 +1,22 @@
+/datum/emote/living/carbon/human/yautja/fake_sound
+ category = YAUTJA_EMOTE_CATEGORY_FAKESOUND
+
+/datum/emote/living/carbon/human/yautja/fake_sound/aliengrowl
+ key = "aliengrowl"
+
+/datum/emote/living/carbon/human/yautja/fake_sound/aliengrowl/get_sound(mob/living/user)
+ return pick('sound/voice/alien_growl1.ogg', 'sound/voice/alien_growl2.ogg')
+
+/datum/emote/living/carbon/human/yautja/fake_sound/alienhelp
+ key = "alienhelp"
+
+/datum/emote/living/carbon/human/yautja/fake_sound/alienhelp/get_sound(mob/living/user)
+ return pick('sound/voice/alien_help1.ogg', 'sound/voice/alien_help2.ogg')
+
+/datum/emote/living/carbon/human/yautja/fake_sound/malescream
+ key = "malescream"
+ sound = "male_scream"
+
+/datum/emote/living/carbon/human/yautja/fake_sound/femalescream
+ key = "femalescream"
+ sound = "female_scream"
diff --git a/code/modules/mob/living/carbon/human/species/yautja/fake_voice.dm b/code/modules/mob/living/carbon/human/species/yautja/fake_voice.dm
new file mode 100644
index 000000000000..409fa83e7f1b
--- /dev/null
+++ b/code/modules/mob/living/carbon/human/species/yautja/fake_voice.dm
@@ -0,0 +1,50 @@
+/datum/emote/living/carbon/human/yautja/voice
+ category = YAUTJA_EMOTE_CATEGORY_VOICE
+
+/datum/emote/living/carbon/human/yautja/voice/anytime
+ key = "anytime"
+ sound = 'sound/voice/pred_anytime.ogg'
+
+
+/datum/emote/living/carbon/human/yautja/voice/helpme
+ key = "helpme"
+ sound = 'sound/voice/pred_helpme.ogg'
+ volume = 25
+
+
+/datum/emote/living/carbon/human/yautja/voice/iseeyou
+ key = "iseeyou"
+ sound = 'sound/hallucinations/i_see_you2.ogg'
+
+
+/datum/emote/living/carbon/human/yautja/voice/itsatrap
+ key = "itsatrap"
+ sound = 'sound/voice/pred_itsatrap.ogg'
+ volume = 25
+
+
+/datum/emote/living/carbon/human/yautja/voice/overhere
+ key = "overhere"
+ sound = 'sound/voice/pred_overhere.ogg'
+ volume = 25
+
+
+/datum/emote/living/carbon/human/yautja/voice/turnaround
+ key = "turnaround"
+ sound = 'sound/voice/pred_turnaround.ogg'
+ volume = 25
+
+
+/datum/emote/living/carbon/human/yautja/voice/comeonout
+ key = "comeonout"
+ sound = 'sound/voice/pred_come_on_out.ogg'
+
+
+/datum/emote/living/carbon/human/yautja/voice/overthere
+ key = "overthere"
+ sound = 'sound/voice/pred_over_there.ogg'
+
+
+/datum/emote/living/carbon/human/yautja/voice/uglyfreak
+ key = "uglyfreak"
+ sound = 'sound/voice/pred_ugly_freak.ogg'
diff --git a/code/modules/mob/living/carbon/human/species/yautja/yautja_sound.dm b/code/modules/mob/living/carbon/human/species/yautja/yautja_sound.dm
new file mode 100644
index 000000000000..a6a9a659f215
--- /dev/null
+++ b/code/modules/mob/living/carbon/human/species/yautja/yautja_sound.dm
@@ -0,0 +1,70 @@
+/datum/emote/living/carbon/human/yautja/species_sound
+ category = YAUTJA_EMOTE_CATEGORY_SPECIES
+
+/datum/emote/living/carbon/human/yautja/species_sound/click
+ key = "click"
+
+/datum/emote/living/carbon/human/yautja/species_sound/click/get_sound(mob/living/user)
+ if(rand(0,100) < 50)
+ return 'sound/voice/pred_click1.ogg'
+ else
+ return 'sound/voice/pred_click2.ogg'
+
+/datum/emote/living/carbon/human/yautja/species_sound/click2
+ key = "click2"
+
+/datum/emote/living/carbon/human/yautja/species_sound/click2/get_sound(mob/living/user)
+ return pick('sound/voice/pred_click3.ogg', 'sound/voice/pred_click4.ogg')
+
+// Laughing Emotes
+/datum/emote/living/carbon/human/yautja/species_sound/laugh1
+ key = "laugh1"
+ sound = 'sound/voice/pred_laugh1.ogg'
+ volume = 25
+
+/datum/emote/living/carbon/human/yautja/species_sound/laugh2
+ key = "laugh2"
+ sound = 'sound/voice/pred_laugh2.ogg'
+ volume = 25
+
+/datum/emote/living/carbon/human/yautja/species_sound/laugh3
+ key = "laugh3"
+ sound = 'sound/voice/pred_laugh3.ogg'
+ volume = 25
+
+
+// Roar Emotes
+/datum/emote/living/carbon/human/yautja/species_sound/roar
+ key = "roar"
+ message = "roars!"
+ emote_type = EMOTE_AUDIBLE|EMOTE_VISIBLE
+
+/datum/emote/living/carbon/human/yautja/species_sound/roar/get_sound(mob/living/user)
+ return pick('sound/voice/pred_roar1.ogg', 'sound/voice/pred_roar2.ogg')
+
+/datum/emote/living/carbon/human/yautja/species_sound/roar2
+ key = "roar2"
+ sound = 'sound/voice/pred_roar3.ogg'
+ message = "roars!"
+ emote_type = EMOTE_AUDIBLE|EMOTE_VISIBLE
+
+/datum/emote/living/carbon/human/yautja/species_sound/loudroar
+ key = "loudroar"
+ message = "roars loudly!"
+ volume = 60
+ cooldown = 120 SECONDS
+ emote_type = EMOTE_AUDIBLE|EMOTE_VISIBLE
+ no_panel = TRUE
+
+/datum/emote/living/carbon/human/yautja/species_sound/loudroar/get_sound(mob/living/user)
+ return pick('sound/voice/pred_roar4.ogg', 'sound/voice/pred_roar5.ogg')
+
+/datum/emote/living/carbon/human/yautja/species_sound/loudroar/run_emote(mob/user, params, type_override, intentional)
+ . = ..()
+ if(!.)
+ return
+
+ for(var/mob/current_mob as anything in get_mobs_in_z_level_range(get_turf(user), 18) - user)
+ var/relative_dir = get_dir(current_mob, user)
+ var/final_dir = dir2text(relative_dir)
+ to_chat(current_mob, SPAN_HIGHDANGER("You hear a loud roar coming from [final_dir ? "the [final_dir]" : "nearby"]!"))
diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm
index f74b65c2606d..6ee249a6333e 100644
--- a/code/modules/mob/living/carbon/human/update_icons.dm
+++ b/code/modules/mob/living/carbon/human/update_icons.dm
@@ -367,7 +367,6 @@ Applied by gun suicide and high impact bullet executions, removed by rejuvenate,
overlays_standing[GLOVES_LAYER] = I
apply_overlay(GLOVES_LAYER)
-
/mob/living/carbon/human/update_inv_glasses()
remove_overlay(GLASSES_LAYER)
if(glasses)
@@ -458,12 +457,15 @@ Applied by gun suicide and high impact bullet executions, removed by rejuvenate,
if(istype(head, /obj/item/clothing/head/helmet/marine))
var/obj/item/clothing/head/helmet/marine/marine_helmet = head
if(assigned_squad && marine_helmet.flags_marine_helmet & HELMET_SQUAD_OVERLAY)
- var/datum/squad/S = assigned_squad
- var/leader = S.squad_leader == src
- if(S.color <= helmetmarkings.len)
- var/image/J = leader? helmetmarkings_sql[S.color] : helmetmarkings[S.color]
- J.layer = -HEAD_SQUAD_LAYER
- overlays_standing[HEAD_SQUAD_LAYER] = J
+ if(assigned_squad && assigned_squad.equipment_color)
+ var/leader = assigned_squad.squad_leader
+ var/image/helmet_overlay = image(marine_helmet.helmet_overlay_icon, icon_state = "std-helmet")
+ if(leader == src)
+ helmet_overlay = image(marine_helmet.helmet_overlay_icon, icon_state = "sql-helmet")
+ helmet_overlay.layer = -HEAD_SQUAD_LAYER
+ helmet_overlay.alpha = assigned_squad.armor_alpha
+ helmet_overlay.color = assigned_squad.equipment_color
+ overlays_standing[HEAD_SQUAD_LAYER] = helmet_overlay
apply_overlay(HEAD_SQUAD_LAYER)
var/num_helmet_overlays = 0
@@ -517,14 +519,16 @@ Applied by gun suicide and high impact bullet executions, removed by rejuvenate,
if(istype(wear_suit, /obj/item/clothing/suit/storage/marine))
var/obj/item/clothing/suit/storage/marine/marine_armor = wear_suit
if(marine_armor.flags_marine_armor & ARMOR_SQUAD_OVERLAY)
- if(assigned_squad)
- var/datum/squad/S = assigned_squad
- var/leader = S.squad_leader == src
- if(S.color <= helmetmarkings.len)
- var/image/J = leader? armormarkings_sql[S.color] : armormarkings[S.color]
- J.layer = -SUIT_SQUAD_LAYER
- overlays_standing[SUIT_SQUAD_LAYER] = J
- apply_overlay(SUIT_SQUAD_LAYER)
+ if(assigned_squad && assigned_squad.equipment_color)
+ var/leader = assigned_squad.squad_leader
+ var/image/squad_overlay = image(marine_armor.squad_overlay_icon, icon_state = "std-armor")
+ if(leader == src)
+ squad_overlay = image(marine_armor.squad_overlay_icon, icon_state = "sql-armor")
+ squad_overlay.layer = -SUIT_SQUAD_LAYER
+ squad_overlay.alpha = assigned_squad.armor_alpha
+ squad_overlay.color = assigned_squad.equipment_color
+ overlays_standing[SUIT_SQUAD_LAYER] = squad_overlay
+ apply_overlay(SUIT_SQUAD_LAYER)
if(marine_armor.armor_overlays.len)
var/image/K
diff --git a/code/modules/mob/living/carbon/xenomorph/Embryo.dm b/code/modules/mob/living/carbon/xenomorph/Embryo.dm
index b1c6bddd0ac8..e390cd15dca2 100644
--- a/code/modules/mob/living/carbon/xenomorph/Embryo.dm
+++ b/code/modules/mob/living/carbon/xenomorph/Embryo.dm
@@ -190,7 +190,8 @@
if(isyautja(affected_mob) || (flags_embryo & FLAG_EMBRYO_PREDATOR))
new_xeno = new /mob/living/carbon/xenomorph/larva/predalien(affected_mob)
- yautja_announcement(SPAN_YAUTJABOLDBIG("WARNING!\n\nAn abomination has been detected at [get_area_name(new_xeno)]. It is a stain upon our purity and is unfit for life. Exterminate it immediately"))
+ yautja_announcement(SPAN_YAUTJABOLDBIG("WARNING!\n\nAn abomination has been detected at [get_area_name(new_xeno)]. It is a stain upon our purity and is unfit for life. Exterminate it immediately.\n\nHeavy Armory unlocked."))
+ SEND_GLOBAL_SIGNAL(COMSIG_GLOB_YAUTJA_ARMORY_OPENED)
else
new_xeno = new(affected_mob)
diff --git a/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm b/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm
index 5586da3765dc..aea1ce9a5906 100644
--- a/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm
+++ b/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm
@@ -271,27 +271,40 @@
//
//////////////////////////////////////////////////////////////////
var/tunnel = FALSE
- var/stealth = FALSE // for check on lurker invisibility
+ /// for check on lurker invisibility
+ var/stealth = FALSE
var/burrow = FALSE
var/fortify = FALSE
var/crest_defense = FALSE
- var/agility = FALSE // 0 - upright, 1 - all fours
+ /// 0/FALSE - upright, 1/TRUE - all fours
+ var/agility = FALSE
var/ripping_limb = FALSE
var/steelcrest = FALSE
- // Related to zooming out (primarily queen and boiler)
- var/devour_timer = 0 // The world.time at which we will regurgitate our currently-vored victim
- var/extra_build_dist = 0 // For drones/hivelords. Extends the maximum build range they have
+ /// The world.time at which we will regurgitate our currently-vored victim
+ var/devour_timer = 0
+ /// For drones/hivelords. Extends the maximum build range they have
+ var/extra_build_dist = 0
+ /// tiles from self you can plant eggs.
+ var/egg_planting_range = 1
var/can_stack_builds = FALSE
var/list/resin_build_order
- var/selected_resin // Which resin structure to build when we secrete resin, defaults to null.
- var/selected_construction = XENO_STRUCTURE_CORE //which special structure to build when we place constructions
- var/selected_mark // If leader what mark you will place when you make one
- var/datum/ammo/xeno/ammo = null //The ammo datum for our spit projectiles. We're born with this, it changes sometimes.
+ /// Which resin structure to build when we secrete resin, defaults to null.
+ var/selected_resin
+ /// which special structure to build when we place constructions
+ var/selected_construction = XENO_STRUCTURE_CORE
+ /// If leader what mark you will place when you make one
+ var/selected_mark
+ /// The ammo datum for our spit projectiles. We're born with this, it changes sometimes.
+ var/datum/ammo/xeno/ammo = null
var/tunnel_delay = 0
- var/list/available_fruits = list() // List of placeable the xenomorph has access to.
- var/list/current_fruits = list() // If we have current_fruits that are limited, e.g. fruits
- var/max_placeable = 0 // Limit to that amount
- var/obj/effect/alien/resin/fruit/selected_fruit = null // the typepath of the placeable we wanna put down
+ /// List of placeable the xenomorph has access to.
+ var/list/available_fruits = list()
+ /// If we have current_fruits that are limited, e.g. fruits
+ var/list/current_fruits = list()
+ /// Limit to that amount
+ var/max_placeable = 0
+ /// the typepath of the placeable we wanna put down
+ var/obj/effect/alien/resin/fruit/selected_fruit = null
var/list/built_structures = list()
var/icon_xeno
diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/general_abilities.dm b/code/modules/mob/living/carbon/xenomorph/abilities/general_abilities.dm
index b681179e7ce8..c1b1ee5f8902 100644
--- a/code/modules/mob/living/carbon/xenomorph/abilities/general_abilities.dm
+++ b/code/modules/mob/living/carbon/xenomorph/abilities/general_abilities.dm
@@ -382,6 +382,7 @@
name = "Hide"
action_icon_state = "xenohide"
plasma_cost = 0
+ xeno_cooldown = 0.5 SECONDS
macro_path = /datum/action/xeno_action/verb/verb_hide
action_type = XENO_ACTION_CLICK
listen_signal = COMSIG_KB_XENO_HIDE
@@ -391,6 +392,15 @@
if(X && !X.buckled && !X.is_mob_incapacitated())
return TRUE
+/// remove hide and apply modified attack cooldown
+/datum/action/xeno_action/onclick/xenohide/proc/post_attack()
+ var/mob/living/carbon/xenomorph/xeno = owner
+ if(xeno.layer == XENO_HIDING_LAYER)
+ xeno.layer = initial(xeno.layer)
+ button.icon_state = "template"
+ xeno.update_wounds()
+ apply_cooldown(4) //2 second cooldown after attacking
+
/datum/action/xeno_action/onclick/xenohide/give_to(mob/living/living_mob)
. = ..()
var/mob/living/carbon/xenomorph/xeno = owner
diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/general_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/general_powers.dm
index 4a57c0729b91..a9cffb196cb3 100644
--- a/code/modules/mob/living/carbon/xenomorph/abilities/general_powers.dm
+++ b/code/modules/mob/living/carbon/xenomorph/abilities/general_powers.dm
@@ -396,11 +396,9 @@
return
if(X.layer == XENO_HIDING_LAYER) //Xeno is currently hiding, unhide him
- X.layer = MOB_LAYER
- X.update_wounds()
- var/datum/action/hide_ability = get_xeno_action_by_type(X, /datum/action/xeno_action/onclick/xenohide)
- if(hide_ability)
- hide_ability.button.icon_state = "template"
+ var/datum/action/xeno_action/onclick/xenohide/hide = get_xeno_action_by_type(X, /datum/action/xeno_action/onclick/xenohide)
+ if(hide)
+ hide.post_attack()
if(isravager(X))
X.emote("roar")
@@ -508,6 +506,10 @@
var/mob/living/carbon/xenomorph/xeno = owner
if(!xeno.check_state(TRUE))
return
+ if(!action_cooldown_check())
+ return
+ if(xeno.action_busy)
+ return
if(xeno.layer != XENO_HIDING_LAYER)
xeno.layer = XENO_HIDING_LAYER
to_chat(xeno, SPAN_NOTICE("You are now hiding."))
@@ -517,6 +519,7 @@
to_chat(xeno, SPAN_NOTICE("You have stopped hiding."))
button.icon_state = "template"
xeno.update_wounds()
+ apply_cooldown()
return ..()
/datum/action/xeno_action/onclick/place_trap/use_ability(atom/A)
diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Hellhound.dm b/code/modules/mob/living/carbon/xenomorph/castes/Hellhound.dm
index 271fe3182210..a44fee5645ac 100644
--- a/code/modules/mob/living/carbon/xenomorph/castes/Hellhound.dm
+++ b/code/modules/mob/living/carbon/xenomorph/castes/Hellhound.dm
@@ -12,6 +12,7 @@
evasion = XENO_EVASION_LOW
speed = XENO_SPEED_HELLHOUND
attack_delay = -2
+ behavior_delegate_type = /datum/behavior_delegate/hellhound_base
minimum_evolve_time = 0
@@ -125,3 +126,13 @@
/mob/living/carbon/xenomorph/hellhound/handle_blood_splatter(splatter_dir)
new /obj/effect/temp_visual/dir_setting/bloodsplatter/hellhound(loc, splatter_dir)
+
+/datum/behavior_delegate/hellhound_base
+ name = "Base Hellhound Behavior Delegate"
+
+/datum/behavior_delegate/hellhound_base/melee_attack_additional_effects_self()
+ ..()
+
+ var/datum/action/xeno_action/onclick/xenohide/hide = get_xeno_action_by_type(bound_xeno, /datum/action/xeno_action/onclick/xenohide)
+ if(hide)
+ hide.post_attack()
diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Predalien.dm b/code/modules/mob/living/carbon/xenomorph/castes/Predalien.dm
index c7970e017c4b..14aa31b1f1e8 100644
--- a/code/modules/mob/living/carbon/xenomorph/castes/Predalien.dm
+++ b/code/modules/mob/living/carbon/xenomorph/castes/Predalien.dm
@@ -136,12 +136,18 @@ Your health meter will not regenerate normally, so kill and die for the hive!= WEED_LEVEL_HIVE && W.linked_hive.hivenumber == hivenumber)
- hive_weeds = W
+ var/obj/effect/alien/weeds/hive_weeds
+ var/obj/effect/alien/weeds/any_weeds
+ for(var/obj/effect/alien/weeds/weed in T)
+ if(weed.weed_strength >= WEED_LEVEL_HIVE && weed.linked_hive.hivenumber == hivenumber)
+ hive_weeds = weed
break
+ if(weed.weed_strength >= WEED_LEVEL_WEAK && weed.linked_hive.hivenumber == hivenumber) //check for ANY weeds
+ any_weeds = weed
- if(!hive_weeds)
- var/datum/hive_status/hive = GLOB.hive_datum[hivenumber]
+ var/datum/hive_status/hive = GLOB.hive_datum[hivenumber]
+ if(!any_weeds && !hive_weeds) //you need at least some weeds to plant on.
+ to_chat(user, SPAN_XENOWARNING("[src] must be planted on [lowertext(hive.prefix)]weeds."))
+ return
+
+ if(!hive_weeds && user.mutation_type != CARRIER_EGGSAC)
to_chat(user, SPAN_XENOWARNING("[src] can only be planted on [lowertext(hive.prefix)]hive weeds."))
return
@@ -106,8 +116,8 @@
if(!user.check_plasma(30))
return
- for(var/obj/effect/alien/weeds/W in T)
- if(W.weed_strength >= WEED_LEVEL_HIVE)
+ for(var/obj/effect/alien/weeds/weed in T)
+ if(weed.weed_strength >= WEED_LEVEL_HIVE || user.mutation_type == CARRIER_EGGSAC)
user.use_plasma(30)
var/obj/effect/alien/egg/newegg = new /obj/effect/alien/egg(T, hivenumber)
diff --git a/code/modules/mob/living/carbon/xenomorph/mutators/strains/carrier/eggsac.dm b/code/modules/mob/living/carbon/xenomorph/mutators/strains/carrier/eggsac.dm
index 436adb79e5aa..7e5773e5aec5 100644
--- a/code/modules/mob/living/carbon/xenomorph/mutators/strains/carrier/eggsac.dm
+++ b/code/modules/mob/living/carbon/xenomorph/mutators/strains/carrier/eggsac.dm
@@ -1,6 +1,6 @@
/datum/xeno_mutator/eggsac
name = "STRAIN: Carrier - Eggsac"
- description = "In exchange for your ability to store huggers and place traps, you gain larger plasma stores, strong pheromones, and the ability to lay eggs by using your plasma stores. In addition, you can now carry twelve eggs at once and can place eggs one pace further than normal."
+ description = "In exchange for your ability to store huggers and place traps, you gain larger plasma stores, strong pheromones, and the ability to lay eggs by using your plasma stores. In addition, you can now carry twelve eggs at once, can plant eggs of non-hive weeds, and can place eggs one pace further than normal"
flavor_description = "An egg is always an adventure; the next one may be different."
cost = MUTATOR_COST_EXPENSIVE
individual_only = TRUE
@@ -39,7 +39,7 @@
carrier.update_hugger_overlays()
carrier.update_eggsac_overlays()
carrier.eggs_max = 12
- carrier.extra_build_dist = 1
+ carrier.egg_planting_range = 2
return TRUE
/datum/action/xeno_action/active_toggle/generate_egg
@@ -75,4 +75,5 @@
if(egg_generation_progress >= 15)
egg_generation_progress = 0
xeno.eggs_cur++
+ to_chat(xeno, SPAN_XENONOTICE("You generate a egg. Now sheltering: [xeno.eggs_cur] / [xeno.eggs_max]."))
xeno.update_icons()
diff --git a/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm b/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm
index eaff5a66309e..b30ea73cd680 100644
--- a/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm
+++ b/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm
@@ -812,16 +812,6 @@
#undef OPEN_SLOTS
#undef GUARANTEED_SLOTS
-// returns if that location can be used to plant eggs
-/datum/hive_status/proc/in_egg_plant_range(turf/T)
- if(!istype(living_xeno_queen))
- return TRUE // xenos already dicked without queen. Let them plant whereever
-
- if(!living_xeno_queen.ovipositor)
- return FALSE // ovid queen only
-
- return get_dist(living_xeno_queen, T) <= egg_planting_range
-
/datum/hive_status/proc/can_build_structure(structure_name)
if(!structure_name || !hive_structures_limit[structure_name])
return FALSE
@@ -1054,6 +1044,7 @@
hugger.visible_message(SPAN_XENODANGER("A facehugger suddenly emerges out of \the [A]!"), SPAN_XENODANGER("You emerge out of \the [A] and awaken from your slumber. For the Hive!"))
playsound(hugger, 'sound/effects/xeno_newlarva.ogg', 25, TRUE)
hugger.generate_name()
+ hugger.timeofdeath = user.timeofdeath // Keep old death time
/datum/hive_status/proc/update_lesser_drone_limit()
lesser_drone_limit = Ceiling(totalXenos.len / 3)
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index 0c182fb0fe9c..06df71427e4f 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -594,8 +594,8 @@ below 100 is not dizzy
if(!istype(src, /mob/living/carbon/human)) // for the moment, only humans get dizzy
return
- dizziness = min(1000, dizziness + amount) // store what will be new value
- // clamped to max 1000
+ dizziness = min(500, dizziness + amount) // store what will be new value
+ // clamped to max 500
if(dizziness > 100 && !is_dizzy)
INVOKE_ASYNC(src, PROC_REF(dizzy_process))
@@ -609,16 +609,22 @@ note dizziness decrements automatically in the mob's Life() proc.
is_dizzy = 1
while(dizziness > 100)
if(client)
- var/amplitude = dizziness*(sin(dizziness * 0.044 * world.time) + 1) / 70
- client.pixel_x = amplitude * sin(0.008 * dizziness * world.time)
- client.pixel_y = amplitude * cos(0.008 * dizziness * world.time)
-
+ if(buckled || resting)
+ client.pixel_x = 0
+ client.pixel_y = 0
+ else
+ var/amplitude = dizziness*(sin(dizziness * 0.044 * world.time) + 1) / 70
+ client.pixel_x = amplitude * sin(0.008 * dizziness * world.time)
+ client.pixel_y = amplitude * cos(0.008 * dizziness * world.time)
+ if(prob(1))
+ to_chat(src, "The dizziness is becoming unbearable! It should pass faster if you lie down.")
sleep(1)
//endwhile - reset the pixel offsets to zero
is_dizzy = 0
if(client)
client.pixel_x = 0
client.pixel_y = 0
+ to_chat(src, "The dizziness has passed, you're starting to feel better.")
// jitteriness - copy+paste of dizziness
diff --git a/code/modules/projectiles/full_auto.dm b/code/modules/projectiles/full_auto.dm
deleted file mode 100644
index ad3e037b68e6..000000000000
--- a/code/modules/projectiles/full_auto.dm
+++ /dev/null
@@ -1,129 +0,0 @@
-/obj/item/weapon/gun/proc/full_auto_start(client/source, atom/A, params)
- SIGNAL_HANDLER
- if(!ismob(loc) || !A)
- return
- var/mob/user = loc
-
- // No FA with mods
- if(params["shift"] || params["ctrl"] || params["alt"])
- return
-
- // No shooting the 4th wall
- if(istype(A, /atom/movable/screen))
- return
-
- // No FA on attachables
- if(active_attachable)
- return
-
- if(user.get_active_hand() != src)
- return
-
- if(user.throw_mode)
- return
-
- // Don't open fire on adjacent targets. Let normal attack code handle this
- if(A.Adjacent(user) && user.a_intent != INTENT_HARM)
- return
-
- if(user.client?.prefs?.toggle_prefs & TOGGLE_HELP_INTENT_SAFETY && (user.a_intent == INTENT_HELP))
- if(world.time % 3) // Limits how often this message pops up, saw this somewhere else and thought it was clever
- to_chat(user, SPAN_NOTICE("You consider shooting at [A], but do not follow through."))
- return
-
- fa_firing = TRUE
- fa_shots = 0
- fa_target = A
- fa_params = params
-
- // Ward off spamclickin fellas
- if(world.time < last_fired + fa_delay)
- if(world.time % 3) // Limits how often this message pops up, saw this somewhere else and it's fucking stupid
- to_chat(user, SPAN_WARNING("[src] is not ready to fire again!"))
- return
-
- // Kick off the full-auto
- INVOKE_ASYNC(src, PROC_REF(repeat_fire), user)
-
-/obj/item/weapon/gun/proc/full_auto_stop(client/source, atom/A, params)
- SIGNAL_HANDLER
- fa_target = null
- fa_params = null
-
-/obj/item/weapon/gun/proc/full_auto_new_target(client/source, atom/start, atom/hovered, params)
- SIGNAL_HANDLER
- if(!ismob(loc))
- return
- var/mob/user = loc
-
- if(istype(hovered, /atom/movable/screen))
- return
-
- if(get_turf(hovered) == get_turf(user))
- return
-
- fa_target = hovered
- fa_params = params2list(params)
-
-/obj/item/weapon/gun/proc/repeat_fire(mob/user)
- if(!fa_target)
- return
-
- // fun is ended
- if(active_attachable)
- return
-
- // fun's over
- if(!in_chamber && !current_mag)
- click_empty(user)
- return
-
- // fun's also over
- if(!user.canmove || user.stat || user.is_mob_restrained() || !user.loc || !isturf(user.loc))
- return
-
- // you abandoned the f u n
- if(user.get_active_hand() != src || loc != user)
- return
-
- if(user.throw_mode)
- return
-
- user.face_atom(fa_target)
- Fire(fa_target, user, fa_params)
-
- addtimer(CALLBACK(src, PROC_REF(repeat_fire), user), fa_delay)
-
-// Make sure we're not trying to start full auto when the gun isn't even held by anyone
-/obj/item/weapon/gun/dropped(mob/user)
- ..()
-
- if(!user.client)
- return
-
- UnregisterSignal(user.client, list(
- COMSIG_CLIENT_LMB_DOWN,
- COMSIG_CLIENT_LMB_UP,
- COMSIG_CLIENT_LMB_DRAG,
- ))
-
-// Also make sure it's registered when held in any hand and full-auto is on
-/obj/item/weapon/gun/equipped(mob/user, slot)
- ..()
-
- if(!user.client)
- return
-
- // If it was equipped to anything but the hands, make sure we're not registered
- if(slot != WEAR_R_HAND && slot != WEAR_L_HAND)
- UnregisterSignal(user.client, list(
- COMSIG_CLIENT_LMB_DOWN,
- COMSIG_CLIENT_LMB_UP,
- COMSIG_CLIENT_LMB_DRAG,
- ))
- return
-
- if(flags_gun_features & GUN_FULL_AUTO_ON)
- RegisterSignal(user.client, COMSIG_CLIENT_LMB_DOWN, PROC_REF(full_auto_start))
- RegisterSignal(user.client, COMSIG_CLIENT_LMB_UP, PROC_REF(full_auto_stop))
- RegisterSignal(user.client, COMSIG_CLIENT_LMB_DRAG, PROC_REF(full_auto_new_target))
diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm
index 263f5b07cca4..54e066e05544 100644
--- a/code/modules/projectiles/gun.dm
+++ b/code/modules/projectiles/gun.dm
@@ -92,8 +92,8 @@
///Multiplier. Increased and decreased through attachments. Multiplies the accuracy/scatter penalty of the projectile when firing onehanded while moving.
var/movement_onehanded_acc_penalty_mult = 5 //Multiplier. Increased and decreased through attachments. Multiplies the accuracy/scatter penalty of the projectile when firing onehanded while moving.
- ///For regular shots, how long to wait before firing again.
- var/fire_delay = 0
+ ///For regular shots, how long to wait before firing again. Use modify_fire_delay and set_fire_delay instead of modifying this on the fly
+ VAR_PROTECTED/fire_delay = 0
///When it was last fired, related to world.time.
var/last_fired = 0
@@ -112,10 +112,10 @@
var/delay_style = WEAPON_DELAY_SCATTER_AND_ACCURACY
//Burst fire.
- ///How many shots can the weapon shoot in burst? Anything less than 2 and you cannot toggle burst.
- var/burst_amount = 1
- ///The delay in between shots. Lower = less delay = faster.
- var/burst_delay = 1
+ ///How many shots can the weapon shoot in burst? Anything less than 2 and you cannot toggle burst. Use modify_burst_amount and set_burst_amount instead of modifying this
+ VAR_PROTECTED/burst_amount = 1
+ ///The delay in between shots. Lower = less delay = faster. Use modify_burst_delay and set_burst_delay instead of modifying this
+ VAR_PROTECTED/burst_delay = 1
///When burst-firing, this number is extra time before the weapon can fire again. Depends on number of rounds fired.
var/extra_delay = 0
///When PB burst firing and handing off to /fire after a target moves out of range, this is how many bullets have been fired.
@@ -124,22 +124,13 @@
// Full auto
///Whether or not the gun is firing full-auto
var/fa_firing = FALSE
- ///How many shots have been fired using full-auto. Used to figure out scatter
- var/fa_shots = 0
///How many full-auto shots to get to max scatter?
- var/fa_scatter_peak = 8
+ var/fa_scatter_peak = 4
///How bad does the scatter get on full auto?
- var/fa_max_scatter = 5
- ///The delay when firing full-auto
- var/fa_delay = 2.5
- ///The atom we're shooting at while full-autoing
- var/atom/fa_target = null
+ var/fa_max_scatter = 8.5
///Click parameters to use when firing full-auto
var/fa_params = null
- //Targeting.
- ///List of who yer targeting.
- var/tmp/list/mob/living/target
///Used to fire faster at more than one person.
var/tmp/mob/living/last_moved_mob
var/tmp/lock_time = -100
@@ -223,6 +214,21 @@
// Set to TRUE or FALSE, it overrides the is_civilian_usable check with its value. Does nothing if null.
var/civilian_usable_override = null
+ ///Current selected firemode of the gun.
+ var/gun_firemode = GUN_FIREMODE_SEMIAUTO
+ ///List of allowed firemodes.
+ var/list/gun_firemode_list = list()
+ ///How many bullets the gun fired while bursting/auto firing
+ var/shots_fired = 0
+ /// Currently selected target to fire at. Set with set_target()
+ VAR_PRIVATE/atom/target
+ /// Current user (holding) of the gun. Set with set_gun_user()
+ VAR_PRIVATE/mob/gun_user
+ /// If this gun should spawn with semi-automatic fire. Protected due to it never needing to be edited.
+ VAR_PROTECTED/start_semiauto = TRUE
+ /// If this gun should spawn with automatic fire. Protected due to it never needing to be edited.
+ VAR_PROTECTED/start_automatic = FALSE
+
/**
* An assoc list where the keys are fire delay group string defines
@@ -253,11 +259,13 @@
else
current_mag = new current_mag(src, spawn_empty? 1:0)
replace_ammo(null, current_mag)
- else ammo = GLOB.ammo_list[ammo] //If they don't have a mag, they fire off their own thing.
+ else
+ ammo = GLOB.ammo_list[ammo] //If they don't have a mag, they fire off their own thing.
set_gun_attachment_offsets()
set_gun_config_values()
set_bullet_traits()
+ setup_firemodes()
update_force_list() //This gives the gun some unique attack verbs for attacking.
handle_starting_attachment()
handle_random_attachments()
@@ -265,6 +273,8 @@
if(auto_retrieval_slot)
AddElement(/datum/element/drop_retrieval/gun, auto_retrieval_slot)
update_icon() //for things like magazine overlays
+ gun_firemode = gun_firemode_list[1] || GUN_FIREMODE_SEMIAUTO
+ AddComponent(/datum/component/automatedfire/autofire, fire_delay, burst_delay, burst_amount, gun_firemode, CALLBACK(src, PROC_REF(set_bursting)), CALLBACK(src, PROC_REF(reset_fire)), CALLBACK(src, PROC_REF(fire_wrapper)), CALLBACK(src, PROC_REF(display_ammo)), CALLBACK(src, PROC_REF(set_auto_firing))) //This should go after handle_starting_attachment() and setup_firemodes() to get the proper values set.
/obj/item/weapon/gun/proc/set_gun_attachment_offsets()
attachable_offset = null
@@ -288,8 +298,8 @@
attachments = null
attachable_overlays = null
QDEL_NULL(active_attachable)
- fa_target = null
GLOB.gun_list -= src
+ set_gun_user(null)
. = ..()
/*
@@ -299,12 +309,12 @@
* This makes reading each gun's values MUCH easier.
*/
/obj/item/weapon/gun/proc/set_gun_config_values()
- fire_delay = FIRE_DELAY_TIER_5
+ set_fire_delay(FIRE_DELAY_TIER_5)
accuracy_mult = BASE_ACCURACY_MULT
accuracy_mult_unwielded = BASE_ACCURACY_MULT
scatter = SCATTER_AMOUNT_TIER_6
burst_scatter_mult = SCATTER_AMOUNT_TIER_7
- burst_amount = BURST_AMOUNT_TIER_1
+ set_burst_amount(BURST_AMOUNT_TIER_5)
scatter_unwielded = SCATTER_AMOUNT_TIER_6
damage_mult = BASE_BULLET_DAMAGE_MULT
damage_falloff_mult = DAMAGE_FALLOFF_TIER_10
@@ -378,8 +388,9 @@
//Add attachment bonuses
for(var/slot in attachments)
var/obj/item/attachable/R = attachments[slot]
- if(!R) continue
- fire_delay += R.delay_mod
+ if(!R)
+ continue
+ modify_fire_delay(R.delay_mod)
accuracy_mult += R.accuracy_mod
accuracy_mult_unwielded += R.accuracy_unwielded_mod
scatter += R.scatter_mod
@@ -392,7 +403,7 @@
effective_range_max += R.range_max_mod
recoil += R.recoil_mod
burst_scatter_mult += R.burst_scatter_mod
- burst_amount += R.burst_mod
+ modify_burst_amount(R.burst_mod)
recoil_unwielded += R.recoil_unwielded_mod
aim_slowdown += R.aim_speed_mod
wield_delay += R.wield_delay_mod
@@ -471,6 +482,10 @@
for(var/obj/O in contents)
O.emp_act(severity)
+/*
+Note: pickup and dropped on weapons must have both the ..() to update zoom AND twohanded,
+As sniper rifles have both and weapon mods can change them as well. ..() deals with zoom only.
+*/
/obj/item/weapon/gun/equipped(mob/user, slot)
if(flags_item & NODROP) return
@@ -480,8 +495,31 @@
pull_time += 3
guaranteed_delay_time = world.time + WEAPON_GUARANTEED_DELAY
+ var/delay_left = (last_fired + fire_delay + additional_fire_group_delay) - world.time
+ if(fire_delay_group && delay_left > 0)
+ for(var/group in fire_delay_group)
+ LAZYSET(user.fire_delay_next_fire, group, world.time + delay_left)
+
+ if(slot in list(WEAR_L_HAND, WEAR_R_HAND))
+ set_gun_user(user)
+ else
+ set_gun_user(null)
+
return ..()
+/obj/item/weapon/gun/dropped(mob/user)
+ . = ..()
+
+ disconnect_light_from_mob(user)
+
+ var/delay_left = (last_fired + fire_delay + additional_fire_group_delay) - world.time
+ if(fire_delay_group && delay_left > 0)
+ for(var/group in fire_delay_group)
+ LAZYSET(user.fire_delay_next_fire, group, world.time + delay_left)
+
+ unwield(user)
+ set_gun_user(null)
+
/obj/item/weapon/gun/update_icon()
if(overlays)
overlays.Cut()
@@ -675,8 +713,8 @@
data["penetration_max"] = ARMOR_PENETRATION_TIER_10
data["punch_max"] = 5
data["glob_armourbreak"] = GLOB.xeno_general.armor_ignore_integrity
- data["automatic"] = flags_gun_features & GUN_HAS_FULL_AUTO
- data["auto_only"] = flags_gun_features & GUN_FULL_AUTO_ONLY
+ data["automatic"] = (GUN_FIREMODE_AUTOMATIC in gun_firemode_list)
+ data["auto_only"] = ((length(gun_firemode_list) == 1) && (GUN_FIREMODE_AUTOMATIC in gun_firemode_list))
return data
@@ -724,14 +762,10 @@
else
wield_time -= 2*user.skills.get_skill_level(SKILL_FIREARMS)
- if(flags_gun_features & GUN_FULL_AUTO_ON)
- ADD_TRAIT(user, TRAIT_OVERRIDE_CLICKDRAG, TRAIT_SOURCE_WEAPON)
-
return 1
/obj/item/weapon/gun/unwield(mob/user)
. = ..()
- REMOVE_TRAIT(user, TRAIT_OVERRIDE_CLICKDRAG, TRAIT_SOURCE_WEAPON)
if(.)
slowdown = initial(slowdown)
@@ -892,33 +926,6 @@ User can be passed as null, (a gun reloading itself for instance), so we need to
// \\
//----------------------------------------------------------
-/obj/item/weapon/gun/afterattack(atom/A, mob/living/user, flag, params)
- if(active_attachable && (active_attachable.flags_attach_features & ATTACH_MELEE)) //this is expected to do something in melee.
- active_attachable.fire_attachment(A, src, user)
- return TRUE
- if(flag)
- return FALSE //It's adjacent, is the user, or is on the user's person
- if(!istype(A))
- return FALSE
- // If firing full-auto, the firing starts when the mouse is clicked, not when it's released
- // so the gun should already be shooting
- if(fa_firing)
- fa_firing = FALSE
- return TRUE
- if(flags_gun_features & GUN_BURST_FIRING)
- return FALSE
- if(!user || !user.client || !user.client.prefs)
- return FALSE
- else if(user.client?.prefs?.toggle_prefs & TOGGLE_HELP_INTENT_SAFETY && (user.a_intent == INTENT_HELP))
- if (world.time % 3) // Limits how often this message pops up, saw this somewhere else and thought it was clever
- //Absolutely SCREAM this at people so they don't get killed by it
- to_chat(user, SPAN_HIGHDANGER("Help intent safety is on! Switch to another intent to fire your weapon."))
- click_empty(user)
- return FALSE
- else
- Fire(A,user,params) //Otherwise, fire normally.
- return TRUE
-
/**
load_into_chamber(), reload_into_chamber(), and clear_jam() do all of the heavy lifting.
If you need to change up how a gun fires, just change these procs for that subtype
@@ -1056,17 +1063,11 @@ and you're good to go.
// \\
//----------------------------------------------------------
-/obj/item/weapon/gun/proc/Fire(atom/target, mob/living/user, params, reflex = 0, dual_wield)
- set waitfor = 0
-
- if(!able_to_fire(user) || !target)
- return
+/obj/item/weapon/gun/proc/Fire(atom/target, mob/living/user, params, reflex = FALSE, dual_wield)
+ set waitfor = FALSE
- var/turf/curloc = get_turf(user) //In case the target or we are expired.
- var/turf/targloc = get_turf(target)
- if(!targloc || !curloc)
- return //Something has gone wrong...
- var/atom/original_target = target //This is for burst mode, in case the target changes per scatter chance in between fired bullets.
+ if(!able_to_fire(user) || !target || !get_turf(user) || !get_turf(target))
+ return NONE
/*
This is where the grenade launcher and flame thrower function as attachments.
@@ -1074,12 +1075,10 @@ and you're good to go.
*/
var/check_for_attachment_fire = 0
- //Number of bullets based on burst. If an active attachable is shooting, bursting is always zero.
- var/bullets_to_fire = 1
if(active_attachable?.flags_attach_features & ATTACH_WEAPON) //Attachment activated and is a weapon.
check_for_attachment_fire = 1
if(!(active_attachable.flags_attach_features & ATTACH_PROJECTILE)) //If it's unique projectile, this is where we fire it.
- if(active_attachable.current_rounds <= 0)
+ if((active_attachable.current_rounds <= 0) && !(active_attachable.flags_attach_features & ATTACH_IGNORE_EMPTY))
click_empty(user) //If it's empty, let them know.
to_chat(user, SPAN_WARNING("[active_attachable] is empty!"))
to_chat(user, SPAN_NOTICE("You disable [active_attachable]."))
@@ -1087,18 +1086,16 @@ and you're good to go.
else
active_attachable.fire_attachment(target, src, user) //Fire it.
active_attachable.last_fired = world.time
- return
+ return NONE
//If there's more to the attachment, it will be processed farther down, through in_chamber and regular bullet act.
/*
This is where burst is established for the proceeding section. Which just means the proc loops around that many times.
If burst = 1, you must null it if you ever RETURN during the for() cycle. If for whatever reason burst is left on while
the gun is not firing, it will break a lot of stuff. BREAK is fine, as it will null it.
*/
- else if((flags_gun_features & GUN_BURST_ON) && burst_amount > 1)
- bullets_to_fire = burst_amount
+ else if((gun_firemode == GUN_FIREMODE_BURSTFIRE) && burst_amount > BURST_AMOUNT_TIER_1)
flags_gun_features |= GUN_BURST_FIRING
if(PB_burst_bullets_fired) //Has a burst been carried over from a PB?
- bullets_to_fire -= PB_burst_bullets_fired
PB_burst_bullets_fired = 0 //Don't need this anymore. The torch is passed.
//Dual wielding. Do we have a gun in the other hand, is it loaded, and is it the same category?
@@ -1114,109 +1111,110 @@ and you're good to go.
else
akimbo.Fire(target,user,params, 0, TRUE)
- var/bullets_fired
- for(bullets_fired = 1 to bullets_to_fire)
- if(loc != user || (flags_gun_features & GUN_WIELDED_FIRING_ONLY && !(flags_item & WIELDED)))
- break //If you drop it while bursting, for example.
+ var/fire_return = handle_fire(target, user, params, reflex, dual_wield, check_for_attachment_fire)
+ if(!fire_return)
+ return fire_return
- if (bullets_fired > 1 && !(flags_gun_features & GUN_BURST_FIRING)) // No longer burst firing somehow
- break
-
- //The gun should return the bullet that it already loaded from the end cycle of the last Fire().
- var/obj/item/projectile/projectile_to_fire = load_into_chamber(user) //Load a bullet in or check for existing one.
- if(!projectile_to_fire) //If there is nothing to fire, click.
- click_empty(user)
- flags_gun_features &= ~GUN_BURST_FIRING
- return
+ flags_gun_features &= ~GUN_BURST_FIRING // We always want to turn off bursting when we're done, mainly for when we break early mid-burstfire.
+ return AUTOFIRE_CONTINUE
- apply_bullet_effects(projectile_to_fire, user, bullets_fired, reflex, dual_wield) //User can be passed as null.
- SEND_SIGNAL(projectile_to_fire, COMSIG_BULLET_USER_EFFECTS, user)
+/obj/item/weapon/gun/proc/handle_fire(atom/target, mob/living/user, params, reflex = FALSE, dual_wield, check_for_attachment_fire)
+ var/turf/curloc = get_turf(user) //In case the target or we are expired.
+ var/turf/targloc = get_turf(target)
- curloc = get_turf(user)
- if(QDELETED(original_target)) //If the target's destroyed, shoot at where it was last.
- target = targloc
- else
- target = original_target
- targloc = get_turf(target)
-
- projectile_to_fire.original = target
-
- // turf-targeted projectiles are fired without scatter, because proc would raytrace them further away
- var/ammo_flags = projectile_to_fire.ammo.flags_ammo_behavior | projectile_to_fire.projectile_override_flags
- if(!(ammo_flags & AMMO_HITS_TARGET_TURF))
- target = simulate_scatter(projectile_to_fire, target, curloc, targloc, user, bullets_fired)
-
- var/bullet_velocity = projectile_to_fire?.ammo?.shell_speed + velocity_add
-
- if(params) // Apply relative clicked position from the mouse info to offset projectile
- if(!params["click_catcher"])
- if(params["vis-x"])
- projectile_to_fire.p_x = text2num(params["vis-x"])
- else if(params["icon-x"])
- projectile_to_fire.p_x = text2num(params["icon-x"])
- if(params["vis-y"])
- projectile_to_fire.p_y = text2num(params["vis-y"])
- else if(params["icon-y"])
- projectile_to_fire.p_y = text2num(params["icon-y"])
- var/atom/movable/clicked_target = original_target
- if(istype(clicked_target))
- projectile_to_fire.p_x -= clicked_target.bound_width / 2
- projectile_to_fire.p_y -= clicked_target.bound_height / 2
- else
- projectile_to_fire.p_x -= world.icon_size / 2
- projectile_to_fire.p_y -= world.icon_size / 2
- else
- projectile_to_fire.p_x -= world.icon_size / 2
- projectile_to_fire.p_y -= world.icon_size / 2
+ var/atom/original_target = target //This is for burst mode, in case the target changes per scatter chance in between fired bullets.
- //Finally, make with the pew pew!
- if(QDELETED(projectile_to_fire) || !isobj(projectile_to_fire))
- to_chat(user, "ERROR CODE I1: Gun malfunctioned due to invalid chambered projectile, clearing it. AHELP if this persists.")
- log_debug("ERROR CODE I1: projectile malfunctioned while firing. User: [user] Weapon: [src] Magazine: [current_mag]")
- flags_gun_features &= ~GUN_BURST_FIRING
- in_chamber = null
- click_empty(user)
- return
+ if(loc != user || (flags_gun_features & GUN_WIELDED_FIRING_ONLY && !(flags_item & WIELDED)))
+ return TRUE
- if(targloc != curloc)
- simulate_recoil(dual_wield, user, target)
+ //The gun should return the bullet that it already loaded from the end cycle of the last Fire().
+ var/obj/item/projectile/projectile_to_fire = load_into_chamber(user) //Load a bullet in or check for existing one.
+ if(!projectile_to_fire) //If there is nothing to fire, click.
+ click_empty(user)
+ flags_gun_features &= ~GUN_BURST_FIRING
+ return NONE
- //This is where the projectile leaves the barrel and deals with projectile code only.
- //vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
- in_chamber = null // It's not in the gun anymore
- INVOKE_ASYNC(projectile_to_fire, TYPE_PROC_REF(/obj/item/projectile, fire_at), target, user, src, projectile_to_fire?.ammo?.max_range, bullet_velocity, original_target)
- projectile_to_fire = null // Important: firing might have made projectile collide early and ALREADY have deleted it. We clear it too.
- //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ apply_bullet_effects(projectile_to_fire, user, reflex, dual_wield) //User can be passed as null.
+ SEND_SIGNAL(projectile_to_fire, COMSIG_BULLET_USER_EFFECTS, user)
- if(check_for_attachment_fire)
- active_attachable.last_fired = world.time
+ curloc = get_turf(user)
+ if(QDELETED(original_target)) //If the target's destroyed, shoot at where it was last.
+ target = targloc
+ else
+ target = original_target
+ targloc = get_turf(target)
+
+ projectile_to_fire.original = target
+
+ // turf-targeted projectiles are fired without scatter, because proc would raytrace them further away
+ var/ammo_flags = projectile_to_fire.ammo.flags_ammo_behavior | projectile_to_fire.projectile_override_flags
+ if(!(ammo_flags & AMMO_HITS_TARGET_TURF))
+ target = simulate_scatter(projectile_to_fire, target, curloc, targloc, user)
+
+ var/bullet_velocity = projectile_to_fire?.ammo?.shell_speed + velocity_add
+
+ if(params) // Apply relative clicked position from the mouse info to offset projectile
+ if(!params["click_catcher"])
+ if(params["vis-x"])
+ projectile_to_fire.p_x = text2num(params["vis-x"])
+ else if(params["icon-x"])
+ projectile_to_fire.p_x = text2num(params["icon-x"])
+ if(params["vis-y"])
+ projectile_to_fire.p_y = text2num(params["vis-y"])
+ else if(params["icon-y"])
+ projectile_to_fire.p_y = text2num(params["icon-y"])
+ var/atom/movable/clicked_target = original_target
+ if(istype(clicked_target))
+ projectile_to_fire.p_x -= clicked_target.bound_width / 2
+ projectile_to_fire.p_y -= clicked_target.bound_height / 2
else
- last_fired = world.time
- SEND_SIGNAL(user, COMSIG_MOB_FIRED_GUN, src)
- . = TRUE
+ projectile_to_fire.p_x -= world.icon_size / 2
+ projectile_to_fire.p_y -= world.icon_size / 2
+ else
+ projectile_to_fire.p_x -= world.icon_size / 2
+ projectile_to_fire.p_y -= world.icon_size / 2
+
+ //Finally, make with the pew pew!
+ if(QDELETED(projectile_to_fire) || !isobj(projectile_to_fire))
+ to_chat(user, "ERROR CODE I1: Gun malfunctioned due to invalid chambered projectile, clearing it. AHELP if this persists.")
+ log_debug("ERROR CODE I1: projectile malfunctioned while firing. User: [user] Weapon: [src] Magazine: [current_mag]")
+ flags_gun_features &= ~GUN_BURST_FIRING
+ in_chamber = null
+ click_empty(user)
+ return NONE
- if(flags_gun_features & GUN_FULL_AUTO_ON)
- fa_shots++
+ if(targloc != curloc)
+ simulate_recoil(dual_wield, user, target)
- else // This happens in very rare circumstances when you're moving a lot while burst firing, so I'm going to toss it up to guns jamming.
- clear_jam(projectile_to_fire,user)
- break
+ //This is where the projectile leaves the barrel and deals with projectile code only.
+ //vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
+ in_chamber = null // It's not in the gun anymore
+ INVOKE_ASYNC(projectile_to_fire, TYPE_PROC_REF(/obj/item/projectile, fire_at), target, user, src, projectile_to_fire?.ammo?.max_range, bullet_velocity, original_target)
+ projectile_to_fire = null // Important: firing might have made projectile collide early and ALREADY have deleted it. We clear it too.
+ //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- //>>POST PROCESSING AND CLEANUP BEGIN HERE.<<
- var/angle = round(Get_Angle(user,target)) //Let's do a muzzle flash.
- muzzle_flash(angle,user)
+ if(check_for_attachment_fire)
+ active_attachable.last_fired = world.time
+ else
+ last_fired = world.time
+ SEND_SIGNAL(user, COMSIG_MOB_FIRED_GUN, src)
+ . = TRUE
- //This is where we load the next bullet in the chamber. We check for attachments too, since we don't want to load anything if an attachment is active.
- if(!check_for_attachment_fire && !reload_into_chamber(user)) // It has to return a bullet, otherwise it's empty. Unless it's an undershotgun.
- click_empty(user)
- break //Nothing else to do here, time to cancel out.
+ shots_fired++
- if(bullets_fired < bullets_to_fire) // We still have some bullets to fire.
- extra_delay = fire_delay * 0.5
- sleep(burst_delay)
+ else // This happens in very rare circumstances when you're moving a lot while burst firing, so I'm going to toss it up to guns jamming.
+ clear_jam(projectile_to_fire,user)
+ return TRUE
- flags_gun_features &= ~GUN_BURST_FIRING // We always want to turn off bursting when we're done, mainly for when we break early mid-burstfire.
- display_ammo(user)
+ //>>POST PROCESSING AND CLEANUP BEGIN HERE.<<
+ var/angle = round(Get_Angle(user,target)) //Let's do a muzzle flash.
+ muzzle_flash(angle,user)
+
+ //This is where we load the next bullet in the chamber. We check for attachments too, since we don't want to load anything if an attachment is active.
+ if(!check_for_attachment_fire && !reload_into_chamber(user)) // It has to return a bullet, otherwise it's empty. Unless it's an undershotgun.
+ click_empty(user)
+ return TRUE //Nothing else to do here, time to cancel out.
+ return TRUE
#define EXECUTION_CHECK (attacked_mob.stat == UNCONSCIOUS || attacked_mob.is_mob_restrained()) && ((user.a_intent == INTENT_GRAB)||(user.a_intent == INTENT_DISARM))
@@ -1335,7 +1333,7 @@ and you're good to go.
var/bullets_to_fire = 1
- if(!check_for_attachment_fire && (flags_gun_features & GUN_BURST_ON) && burst_amount > 1)
+ if(!check_for_attachment_fire && (gun_firemode == GUN_FIREMODE_BURSTFIRE) && burst_amount > BURST_AMOUNT_TIER_1)
bullets_to_fire = burst_amount
flags_gun_features |= GUN_BURST_FIRING
@@ -1470,6 +1468,8 @@ not all weapons use normal magazines etc. load_into_chamber() itself is designed
*/
if(flags_gun_features & GUN_BURST_FIRING)
+ return TRUE
+ if(user.is_mob_incapacitated())
return
if(world.time < guaranteed_delay_time)
return
@@ -1540,12 +1540,15 @@ not all weapons use normal magazines etc. load_into_chamber() itself is designed
if(active_attachable)
return
- if(flags_gun_features & GUN_AMMO_COUNTER && !(flags_gun_features & GUN_BURST_FIRING) && current_mag)
+ if(!user)
+ user = gun_user
+
+ if(flags_gun_features & GUN_AMMO_COUNTER && current_mag)
var/chambered = in_chamber ? TRUE : FALSE
to_chat(user, SPAN_DANGER("[current_mag.current_rounds][chambered ? "+1" : ""] / [current_mag.max_rounds] ROUNDS REMAINING"))
//This proc applies some bonus effects to the shot/makes the message when a bullet is actually fired.
-/obj/item/weapon/gun/proc/apply_bullet_effects(obj/item/projectile/projectile_to_fire, mob/user, bullets_fired = 1, reflex = 0, dual_wield = 0)
+/obj/item/weapon/gun/proc/apply_bullet_effects(obj/item/projectile/projectile_to_fire, mob/user, reflex = 0, dual_wield = 0)
var/actual_sound = fire_sound
if(isnull(fire_sound))
actual_sound = pick(fire_sounds)
@@ -1626,8 +1629,8 @@ not all weapons use normal magazines etc. load_into_chamber() itself is designed
var/fire_angle = Get_Angle(curloc, targloc)
var/total_scatter_angle = projectile_to_fire.scatter
- if(flags_gun_features & GUN_BURST_ON && bullets_fired > 1)//Much higher scatter on burst. Each additional bullet adds scatter
- var/bullet_amt_scat = min(bullets_fired-1, SCATTER_AMOUNT_TIER_6)//capped so we don't penalize large bursts too much.
+ if((gun_firemode == GUN_FIREMODE_BURSTFIRE))//Much higher scatter on burst. Each additional bullet adds scatter
+ var/bullet_amt_scat = min(burst_amount - 1, SCATTER_AMOUNT_TIER_6)//capped so we don't penalize large bursts too much.
if(flags_item & WIELDED)
total_scatter_angle += max(0, bullet_amt_scat * burst_scatter_mult)
else
@@ -1635,9 +1638,9 @@ not all weapons use normal magazines etc. load_into_chamber() itself is designed
// Full auto fucks your scatter up big time
// Note that full auto uses burst scatter multipliers
- if(flags_gun_features & GUN_FULL_AUTO_ON)
+ if(gun_firemode == GUN_FIREMODE_AUTOMATIC)
// The longer you fire full-auto, the worse the scatter gets
- var/bullet_amt_scat = min((fa_shots/fa_scatter_peak) * fa_max_scatter, fa_max_scatter)
+ var/bullet_amt_scat = min((shots_fired / fa_scatter_peak) * fa_max_scatter, fa_max_scatter)
if(flags_item & WIELDED)
total_scatter_angle += max(0, bullet_amt_scat * burst_scatter_mult)
else
@@ -1730,3 +1733,152 @@ not all weapons use normal magazines etc. load_into_chamber() itself is designed
xeno.animation_attack_on(src)
xeno.visible_message(SPAN_XENOWARNING("\The [xeno] slashes the lights on \the [src]!"), SPAN_XENONOTICE("You slash the lights on \the [src]!"))
return XENO_ATTACK_ACTION
+
+/// Setter proc to toggle burst firing
+/obj/item/weapon/gun/proc/set_bursting(bursting = FALSE)
+ if(bursting)
+ flags_gun_features |= GUN_BURST_FIRING
+ else
+ flags_gun_features &= ~GUN_BURST_FIRING
+
+///Clean all references
+/obj/item/weapon/gun/proc/reset_fire()
+ shots_fired = 0//Let's clean everything
+ set_target(null)
+ set_auto_firing(FALSE)
+
+/// adder for fire_delay
+/obj/item/weapon/gun/proc/modify_fire_delay(value)
+ fire_delay += value
+ SEND_SIGNAL(src, COMSIG_GUN_AUTOFIREDELAY_MODIFIED, fire_delay)
+
+/// setter for fire_delay
+/obj/item/weapon/gun/proc/set_fire_delay(value)
+ fire_delay = value
+ SEND_SIGNAL(src, COMSIG_GUN_AUTOFIREDELAY_MODIFIED, fire_delay)
+
+/// getter for fire_delay
+/obj/item/weapon/gun/proc/get_fire_delay(value)
+ return fire_delay
+
+/// setter for burst_amount
+/obj/item/weapon/gun/proc/set_burst_amount(value, mob/user)
+ burst_amount = value
+ SEND_SIGNAL(src, COMSIG_GUN_BURST_SHOTS_TO_FIRE_MODIFIED, burst_amount)
+ setup_firemodes()
+
+/// adder for burst_amount
+/obj/item/weapon/gun/proc/modify_burst_amount(value, mob/user)
+ burst_amount += value
+ SEND_SIGNAL(src, COMSIG_GUN_BURST_SHOTS_TO_FIRE_MODIFIED, burst_amount)
+ setup_firemodes()
+
+/// Adder for burst_delay
+/obj/item/weapon/gun/proc/modify_burst_delay(value, mob/user)
+ burst_delay += value
+ SEND_SIGNAL(src, COMSIG_GUN_BURST_SHOT_DELAY_MODIFIED, burst_delay)
+
+/// Setter for burst_delay
+/obj/item/weapon/gun/proc/set_burst_delay(value, mob/user)
+ burst_delay = value
+ SEND_SIGNAL(src, COMSIG_GUN_BURST_SHOT_DELAY_MODIFIED, burst_delay)
+
+///Set the target and take care of hard delete
+/obj/item/weapon/gun/proc/set_target(atom/object)
+ active_attachable?.set_target(object)
+ if(object == target || object == loc)
+ return
+ if(target)
+ UnregisterSignal(target, COMSIG_PARENT_QDELETING)
+ target = object
+ if(target)
+ RegisterSignal(target, COMSIG_PARENT_QDELETING, PROC_REF(clean_target))
+
+///Set the target to its turf, so we keep shooting even when it was qdeled
+/obj/item/weapon/gun/proc/clean_target()
+ SIGNAL_HANDLER
+ active_attachable?.clean_target()
+ target = get_turf(target)
+
+/obj/item/weapon/gun/proc/stop_fire()
+ SIGNAL_HANDLER
+ if(!target || (gun_user.get_active_hand() != src))
+ return
+
+ if(gun_firemode == GUN_FIREMODE_AUTOMATIC)
+ reset_fire()
+ display_ammo()
+ SEND_SIGNAL(src, COMSIG_GUN_STOP_FIRE)
+
+/obj/item/weapon/gun/proc/set_gun_user(mob/to_set)
+ if(to_set == gun_user)
+ return
+ if(gun_user)
+ UnregisterSignal(gun_user, list(COMSIG_MOB_MOUSEUP, COMSIG_MOB_MOUSEDOWN, COMSIG_MOB_MOUSEDRAG))
+
+ gun_user = to_set
+ RegisterSignal(gun_user, COMSIG_MOB_MOUSEDOWN, PROC_REF(start_fire))
+ RegisterSignal(gun_user, COMSIG_MOB_MOUSEDRAG, PROC_REF(change_target))
+ RegisterSignal(gun_user, COMSIG_MOB_MOUSEUP, PROC_REF(stop_fire))
+
+///Update the target if you draged your mouse
+/obj/item/weapon/gun/proc/change_target(datum/source, atom/src_object, atom/over_object, turf/src_location, turf/over_location, src_control, over_control, params)
+ SIGNAL_HANDLER
+ set_target(get_turf_on_clickcatcher(over_object, gun_user, params))
+ gun_user?.face_atom(target)
+
+///Check if the gun can fire and add it to bucket auto_fire system if needed, or just fire the gun if not
+/obj/item/weapon/gun/proc/start_fire(datum/source, atom/object, turf/location, control, params, bypass_checks = FALSE)
+ SIGNAL_HANDLER
+
+ var/list/modifiers = params2list(params)
+ if(modifiers["shift"] || modifiers["middle"] || modifiers["right"])
+ return
+
+ // Don't allow doing anything else if inside a container of some sort, like a locker.
+ if(!isturf(gun_user.loc))
+ return
+
+ if(istype(object, /atom/movable/screen))
+ return
+
+ if(!bypass_checks)
+ if(gun_user.hand && !isgun(gun_user.l_hand) || !gun_user.hand && !isgun(gun_user.r_hand)) // If the object in our active hand is not a gun, abort
+ return
+
+ if(gun_user.throw_mode)
+ return
+
+ if(gun_user.Adjacent(object)) //Dealt with by attack code
+ return
+
+ if(QDELETED(object))
+ return
+
+ if(gun_user.client?.prefs?.toggle_prefs & TOGGLE_HELP_INTENT_SAFETY && (gun_user.a_intent == INTENT_HELP))
+ if(world.time % 3) // Limits how often this message pops up, saw this somewhere else and thought it was clever
+ //Absolutely SCREAM this at people so they don't get killed by it
+ to_chat(gun_user, SPAN_HIGHDANGER("Help intent safety is on! Switch to another intent to fire your weapon."))
+ click_empty(gun_user)
+ return FALSE
+
+ set_target(get_turf_on_clickcatcher(object, gun_user, params))
+ if((gun_firemode == GUN_FIREMODE_SEMIAUTO) || active_attachable)
+ Fire(object, gun_user, modifiers)
+ reset_fire()
+ display_ammo()
+ return
+ SEND_SIGNAL(src, COMSIG_GUN_FIRE)
+
+/// Wrapper proc for the autofire subsystem to ensure the important args aren't null
+/obj/item/weapon/gun/proc/fire_wrapper(atom/target, mob/living/user, params, reflex = FALSE, dual_wield)
+ SHOULD_NOT_OVERRIDE(TRUE)
+ if(!target)
+ target = src.target
+ if(!user)
+ user = src.gun_user
+ return Fire(target, user, params, reflex, dual_wield)
+
+/// Setter proc for fa_firing
+/obj/item/weapon/gun/proc/set_auto_firing(auto = FALSE)
+ fa_firing = auto
diff --git a/code/modules/projectiles/gun_attachables.dm b/code/modules/projectiles/gun_attachables.dm
index 17dc435210c9..001cd9fbe10c 100644
--- a/code/modules/projectiles/gun_attachables.dm
+++ b/code/modules/projectiles/gun_attachables.dm
@@ -131,8 +131,7 @@ Defined in conflicts.dm of the #defines folder.
G.attachments[slot] = src
G.recalculate_attachment_bonuses()
- if(G.burst_amount <= 1)
- G.flags_gun_features &= ~GUN_BURST_ON //Remove burst if they can no longer use it.
+ G.setup_firemodes()
G.update_force_list() //This updates the gun to use proper force verbs.
var/mob/living/living
@@ -855,7 +854,7 @@ Defined in conflicts.dm of the #defines folder.
/obj/item/attachable/scope/proc/apply_scoped_buff(obj/item/weapon/gun/G, mob/living/carbon/user)
if(G.zoom)
G.accuracy_mult += accuracy_scoped_buff
- G.fire_delay += delay_scoped_nerf
+ G.modify_fire_delay(delay_scoped_nerf)
G.damage_falloff_mult += damage_falloff_scoped_buff
using_scope = TRUE
RegisterSignal(user, COMSIG_LIVING_ZOOM_OUT, PROC_REF(remove_scoped_buff))
@@ -865,7 +864,7 @@ Defined in conflicts.dm of the #defines folder.
UnregisterSignal(user, COMSIG_LIVING_ZOOM_OUT)
using_scope = FALSE
G.accuracy_mult -= accuracy_scoped_buff
- G.fire_delay -= delay_scoped_nerf
+ G.modify_fire_delay(-delay_scoped_nerf)
G.damage_falloff_mult -= damage_falloff_scoped_buff
/obj/item/attachable/scope/activate_attachment(obj/item/weapon/gun/G, mob/living/carbon/user, turn_off)
@@ -1926,18 +1925,34 @@ Defined in conflicts.dm of the #defines folder.
/// An assoc list in the format list(/datum/element/bullet_trait_to_give = list(...args))
/// that will be given to the projectiles of the attached gun
var/list/list/traits_to_give_attached
+ /// Current target we're firing at
+ var/mob/target
-/obj/item/attachable/attached_gun/New() //Let's make sure if something needs an ammo type, it spawns with one.
- ..()
+/obj/item/attachable/attached_gun/Initialize(mapload, ...) //Let's make sure if something needs an ammo type, it spawns with one.
+ . = ..()
if(ammo)
ammo = GLOB.ammo_list[ammo]
/obj/item/attachable/attached_gun/Destroy()
ammo = null
- . = ..()
-
+ target = null
+ return ..()
+/// setter for target
+/obj/item/attachable/attached_gun/proc/set_target(atom/object)
+ if(object == target)
+ return
+ if(target)
+ UnregisterSignal(target, COMSIG_PARENT_QDELETING)
+ target = object
+ if(target)
+ RegisterSignal(target, COMSIG_PARENT_QDELETING, PROC_REF(clean_target))
+
+///Set the target to its turf, so we keep shooting even when it was qdeled
+/obj/item/attachable/attached_gun/proc/clean_target()
+ SIGNAL_HANDLER
+ target = get_turf(target)
/obj/item/attachable/attached_gun/activate_attachment(obj/item/weapon/gun/G, mob/living/user, turn_off)
if(G.active_attachable == src)
@@ -2414,7 +2429,7 @@ Defined in conflicts.dm of the #defines folder.
attach_icon = "flamer_nozzle_a_1"
w_class = SIZE_MEDIUM
slot = "under"
- flags_attach_features = ATTACH_REMOVABLE|ATTACH_ACTIVATION|ATTACH_WEAPON|ATTACH_MELEE
+ flags_attach_features = ATTACH_REMOVABLE|ATTACH_ACTIVATION|ATTACH_WEAPON|ATTACH_MELEE|ATTACH_IGNORE_EMPTY
pixel_shift_x = 4
pixel_shift_y = 14
@@ -2442,7 +2457,7 @@ Defined in conflicts.dm of the #defines folder.
/obj/item/attachable/attached_gun/flamer_nozzle/fire_attachment(atom/target, obj/item/weapon/gun/gun, mob/living/user)
. = ..()
- if(world.time < gun.last_fired + gun.fire_delay)
+ if(world.time < gun.last_fired + gun.get_fire_delay())
return
if((gun.flags_gun_features & GUN_WIELDED_FIRING_ONLY) && !(gun.flags_item & WIELDED))
diff --git a/code/modules/projectiles/gun_helpers.dm b/code/modules/projectiles/gun_helpers.dm
index 62f7378191a5..a60773c88be7 100644
--- a/code/modules/projectiles/gun_helpers.dm
+++ b/code/modules/projectiles/gun_helpers.dm
@@ -136,29 +136,6 @@ DEFINES in setup.dm, referenced here.
else
..()
-/*
-Note: pickup and dropped on weapons must have both the ..() to update zoom AND twohanded,
-As sniper rifles have both and weapon mods can change them as well. ..() deals with zoom only.
-*/
-/obj/item/weapon/gun/dropped(mob/user)
- . = ..()
-
- disconnect_light_from_mob(user)
-
- var/delay_left = (last_fired + fire_delay + additional_fire_group_delay) - world.time
- if(fire_delay_group && delay_left > 0)
- for(var/group in fire_delay_group)
- LAZYSET(user.fire_delay_next_fire, group, world.time + delay_left)
-
- unwield(user)
-
-/obj/item/weapon/gun/equipped(mob/user, slot)
- . = ..()
-
- var/delay_left = (last_fired + fire_delay + additional_fire_group_delay) - world.time
- if(fire_delay_group && delay_left > 0)
- for(var/group in fire_delay_group)
- LAZYSET(user.fire_delay_next_fire, group, world.time + delay_left)
/// This function disconnects the luminosity from the mob and back to the gun
/obj/item/weapon/gun/proc/disconnect_light_from_mob(mob/bearer)
@@ -687,72 +664,71 @@ As sniper rifles have both and weapon mods can change them as well. ..() deals w
playsound(src, 'sound/handling/attachment_remove.ogg', 15, 1, 4)
update_icon()
-/obj/item/weapon/gun/proc/toggle_burst(mob/user)
- //Burst of 1 doesn't mean anything. The weapon will only fire once regardless.
- //Just a good safety to have all weapons that can equip a scope with 1 burst_amount.
- if(burst_amount < 2 && !(flags_gun_features & GUN_HAS_FULL_AUTO))
- to_chat(user, SPAN_WARNING("This weapon does not have a burst fire mode!"))
- return
-
+/obj/item/weapon/gun/proc/do_toggle_firemode(datum/source, datum/keybinding, new_firemode)
+ SIGNAL_HANDLER
if(flags_gun_features & GUN_BURST_FIRING)//can't toggle mid burst
return
- if(flags_gun_features & GUN_BURST_ONLY)
- if(!(flags_gun_features & GUN_BURST_ON))
- stack_trace("[src] has GUN_BURST_ONLY flag but not GUN_BURST_ON.")
- flags_gun_features |= GUN_BURST_ON
- return
+ if(!length(gun_firemode_list))
+ CRASH("[src] called do_toggle_firemode() with an empty gun_firemode_list")
- to_chat(user, SPAN_NOTICE("\The [src] can only be fired in bursts!"))
+ if(length(gun_firemode_list) == 1)
+ to_chat(source, SPAN_NOTICE("[icon2html(src, source)] This gun only has one firemode."))
return
- if(flags_gun_features & GUN_FULL_AUTO_ONLY)
- if(!(flags_gun_features & GUN_FULL_AUTO_ON))
- stack_trace("[src] has GUN_FULL_AUTO_ONLY flag but not GUN_FULL_AUTO_ON.")
- flags_gun_features |= GUN_FULL_AUTO_ON
- RegisterSignal(user.client, COMSIG_CLIENT_LMB_DOWN, PROC_REF(full_auto_start))
- RegisterSignal(user.client, COMSIG_CLIENT_LMB_UP, PROC_REF(full_auto_stop))
- RegisterSignal(user.client, COMSIG_CLIENT_LMB_DRAG, PROC_REF(full_auto_new_target))
- return
+ if(new_firemode)
+ if(!(new_firemode in gun_firemode_list))
+ CRASH("[src] called do_toggle_firemode() with [new_firemode] new_firemode, not on gun_firemode_list")
+ gun_firemode = new_firemode
+ else
+ var/mode_index = gun_firemode_list.Find(gun_firemode)
+ if(++mode_index <= length(gun_firemode_list))
+ gun_firemode = gun_firemode_list[mode_index]
+ else
+ gun_firemode = gun_firemode_list[1]
- to_chat(user, SPAN_NOTICE("\The [src] can only be fired in full auto mode!"))
- return
+ playsound(source, 'sound/weapons/handling/gun_burst_toggle.ogg', 15, 1)
- playsound(user, 'sound/weapons/handling/gun_burst_toggle.ogg', 15, 1)
+ if(ishuman(source))
+ to_chat(source, SPAN_NOTICE("[icon2html(src, source)] You switch to [gun_firemode]."))
+ SEND_SIGNAL(src, COMSIG_GUN_FIRE_MODE_TOGGLE, gun_firemode)
- if(flags_gun_features & GUN_HAS_FULL_AUTO)
- if((flags_gun_features & GUN_BURST_ON) || (burst_amount < 2 && !(flags_gun_features & GUN_FULL_AUTO_ON)))
- flags_gun_features &= ~GUN_BURST_ON
- flags_gun_features |= GUN_FULL_AUTO_ON
+/obj/item/weapon/gun/proc/add_firemode(added_firemode, mob/user)
+ gun_firemode_list |= added_firemode
- // Register the full auto click listeners
- RegisterSignal(user.client, COMSIG_CLIENT_LMB_DOWN, PROC_REF(full_auto_start))
- RegisterSignal(user.client, COMSIG_CLIENT_LMB_UP, PROC_REF(full_auto_stop))
- RegisterSignal(user.client, COMSIG_CLIENT_LMB_DRAG, PROC_REF(full_auto_new_target))
+ if(!length(gun_firemode_list))
+ CRASH("add_firemode called with a resulting gun_firemode_list length of [length(gun_firemode_list)].")
- to_chat(user, SPAN_NOTICE("[icon2html(src, user)] You set [src] to full auto mode."))
- return
- else if(flags_gun_features & GUN_FULL_AUTO_ON)
- flags_gun_features &= ~GUN_FULL_AUTO_ON
- REMOVE_TRAIT(user, TRAIT_OVERRIDE_CLICKDRAG, TRAIT_SOURCE_WEAPON)
- full_auto_stop() // If the LMBUP hasn't been called for any reason.
- UnregisterSignal(user.client, list(
- COMSIG_CLIENT_LMB_DOWN,
- COMSIG_CLIENT_LMB_UP,
- COMSIG_CLIENT_LMB_DRAG,
- ))
-
- to_chat(user, SPAN_NOTICE("[icon2html(src, user)] You set [src] to single fire mode."))
- return
+/obj/item/weapon/gun/proc/remove_firemode(removed_firemode, mob/user)
+ if(!length(gun_firemode_list) || (length(gun_firemode_list) == 1))
+ CRASH("remove_firemode called with gun_firemode_list length [length(gun_firemode_list)].")
+
+ gun_firemode_list -= removed_firemode
+ if(gun_firemode == removed_firemode)
+ gun_firemode = gun_firemode_list[1]
+ do_toggle_firemode(user, gun_firemode)
- flags_gun_features ^= GUN_BURST_ON
- to_chat(user, SPAN_NOTICE("[icon2html(src, user)] You [flags_gun_features & GUN_BURST_ON ? "enable" : "disable"] [src]'s burst fire mode."))
+/obj/item/weapon/gun/proc/setup_firemodes()
+ gun_firemode_list.len = 0
+ if(start_semiauto)
+ gun_firemode_list |= GUN_FIREMODE_SEMIAUTO
+
+ if(burst_amount > BURST_AMOUNT_TIER_1)
+ gun_firemode_list |= GUN_FIREMODE_BURSTFIRE
+
+ if(start_automatic)
+ gun_firemode_list |= GUN_FIREMODE_AUTOMATIC
+
+ if(!length(gun_firemode_list))
+ CRASH("[src] called setup_firemodes() with an empty gun_firemode_list")
+ else
+ gun_firemode = gun_firemode_list[1]
/obj/item/weapon/gun/verb/use_toggle_burst()
set category = "Weapons"
- set name = "Toggle Burst Fire Mode"
- set desc = "Toggle on or off your weapon burst mode, if it has one. Greatly reduces accuracy."
+ set name = "Toggle Firemode"
+ set desc = "Cycles through your gun's firemodes. Automatic modes greatly reduce accuracy."
set src = usr.contents
var/obj/item/weapon/gun/active_firearm = get_active_firearm(usr)
@@ -760,7 +736,7 @@ As sniper rifles have both and weapon mods can change them as well. ..() deals w
return
src = active_firearm
- toggle_burst(usr)
+ do_toggle_firemode(usr)
/obj/item/weapon/gun/verb/empty_mag()
set category = "Weapons"
@@ -966,3 +942,12 @@ As sniper rifles have both and weapon mods can change them as well. ..() deals w
return TRUE
return FALSE
+
+///Helper proc that processes a clicked target, if the target is not black tiles, it will not change it. If they are it will return the turf of the black tiles. It will return null if the object is a screen object other than black tiles.
+/proc/get_turf_on_clickcatcher(atom/target, mob/user, params)
+ var/list/modifiers = params2list(params)
+ if(!istype(target, /atom/movable/screen))
+ return target
+ if(!istype(target, /atom/movable/screen/click_catcher))
+ return null
+ return params2turf(modifiers["screen-loc"], get_turf(user), user.client)
diff --git a/code/modules/projectiles/guns/boltaction.dm b/code/modules/projectiles/guns/boltaction.dm
index c34e9d44a626..a558d3dd7969 100644
--- a/code/modules/projectiles/guns/boltaction.dm
+++ b/code/modules/projectiles/guns/boltaction.dm
@@ -56,8 +56,8 @@
/obj/item/weapon/gun/boltaction/set_gun_config_values()
..()
- burst_amount = 0
- fire_delay = FIRE_DELAY_TIER_4
+ set_burst_amount(0)
+ set_fire_delay(FIRE_DELAY_TIER_4)
accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_3
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_10
scatter = SCATTER_AMOUNT_TIER_6
diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm
index 12f1976e186e..25efbd420ec6 100644
--- a/code/modules/projectiles/guns/energy.dm
+++ b/code/modules/projectiles/guns/energy.dm
@@ -90,6 +90,7 @@
to_firer = "[round((cell.charge / charge_cost), 1)] / [max_shots] SHOTS REMAINING"
user.visible_message(SPAN_DANGER("[user] fires \the [src]!"),
SPAN_DANGER("[to_firer]"), message_flags = CHAT_TYPE_WEAPON_USE)
+ return AUTOFIRE_CONTINUE
/obj/item/weapon/gun/energy/reload_into_chamber()
update_icon()
@@ -132,7 +133,7 @@
/obj/item/weapon/gun/energy/rxfm5_eva/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_8
+ set_fire_delay(FIRE_DELAY_TIER_8)
accuracy_mult = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_3
scatter = SCATTER_AMOUNT_TIER_7
damage_mult = BASE_BULLET_DAMAGE_MULT
@@ -183,9 +184,9 @@
/obj/item/weapon/gun/energy/laz_uzi/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_SMG
- burst_delay = FIRE_DELAY_TIER_SMG
- burst_amount = BURST_AMOUNT_TIER_2
+ set_fire_delay(FIRE_DELAY_TIER_SMG)
+ set_burst_delay(FIRE_DELAY_TIER_SMG)
+ set_burst_amount(BURST_AMOUNT_TIER_2)
accuracy_mult = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_3
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_7
scatter = SCATTER_AMOUNT_TIER_5
@@ -217,7 +218,7 @@
/obj/item/weapon/gun/energy/taser/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_7
+ set_fire_delay(FIRE_DELAY_TIER_7)
accuracy_mult = BASE_ACCURACY_MULT
accuracy_mult_unwielded = BASE_ACCURACY_MULT
damage_mult = BASE_BULLET_DAMAGE_MULT
diff --git a/code/modules/projectiles/guns/flamer/flamer.dm b/code/modules/projectiles/guns/flamer/flamer.dm
index c5a0c8ee2f8c..f327a92ffc9c 100644
--- a/code/modules/projectiles/guns/flamer/flamer.dm
+++ b/code/modules/projectiles/guns/flamer/flamer.dm
@@ -51,7 +51,7 @@
/obj/item/weapon/gun/flamer/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_4 * 5
+ set_fire_delay(FIRE_DELAY_TIER_4 * 5)
/obj/item/weapon/gun/flamer/unique_action(mob/user)
toggle_gun_safety()
@@ -92,7 +92,7 @@
. = ..()
if(.)
if(!current_mag || !current_mag.current_rounds)
- return
+ return NONE
/obj/item/weapon/gun/flamer/proc/get_fire_sound()
var/list/fire_sounds = list(
@@ -102,20 +102,20 @@
return pick(fire_sounds)
/obj/item/weapon/gun/flamer/Fire(atom/target, mob/living/user, params, reflex)
- set waitfor = 0
+ set waitfor = FALSE
if(!able_to_fire(user))
- return
+ return NONE
var/turf/curloc = get_turf(user) //In case the target or we are expired.
var/turf/targloc = get_turf(target)
if (!targloc || !curloc)
- return //Something has gone wrong...
+ return NONE //Something has gone wrong...
if(active_attachable && active_attachable.flags_attach_features & ATTACH_WEAPON) //Attachment activated and is a weapon.
if(active_attachable.flags_attach_features & ATTACH_PROJECTILE)
return
- if(active_attachable.current_rounds <= 0)
+ if((active_attachable.current_rounds <= 0) && !(active_attachable.flags_attach_features & ATTACH_IGNORE_EMPTY))
click_empty(user) //If it's empty, let them know.
to_chat(user, SPAN_WARNING("[active_attachable] is empty!"))
to_chat(user, SPAN_NOTICE("You disable [active_attachable]."))
@@ -123,20 +123,22 @@
else
active_attachable.fire_attachment(target, src, user) //Fire it.
active_attachable.last_fired = world.time
- return
+ return NONE
if(flags_gun_features & GUN_TRIGGER_SAFETY)
to_chat(user, SPAN_WARNING("\The [src] isn't lit!"))
- return
+ return NONE
if(!current_mag)
- return
+ return NONE
if(current_mag.current_rounds <= 0)
click_empty(user)
else
user.track_shot(initial(name))
unleash_flame(target, user)
+ return AUTOFIRE_CONTINUE
+ return NONE
/obj/item/weapon/gun/flamer/reload(mob/user, obj/item/ammo_magazine/magazine)
if(!magazine || !istype(magazine))
@@ -321,7 +323,7 @@
unload(user, drop_override = TRUE)
current_mag = fuelpack.active_fuel
update_icon()
- ..()
+ return ..()
/obj/item/weapon/gun/flamer/M240T/reload(mob/user, obj/item/ammo_magazine/magazine)
@@ -360,6 +362,16 @@
return TRUE
return FALSE
+/obj/item/weapon/gun/flamer/M240T/auto // With NEW advances in science, we've learned how to drain a pyro's tank in 6 seconds, or your money back!
+ name = "\improper M240-T2 incinerator unit"
+ desc = "A prototyped model of the M240-T incinerator unit, it was discontinued after its automatic mode was deemed too expensive to deploy in the field."
+ start_semiauto = FALSE
+ start_automatic = TRUE
+
+/obj/item/weapon/gun/flamer/M240T/auto/set_gun_config_values()
+ . = ..()
+ set_fire_delay(FIRE_DELAY_TIER_3)
+
GLOBAL_LIST_EMPTY(flamer_particles)
/particles/flamer_fire
icon = 'icons/effects/particles/fire.dmi'
diff --git a/code/modules/projectiles/guns/lever_action.dm b/code/modules/projectiles/guns/lever_action.dm
index 259c6170ae48..986f42716e64 100644
--- a/code/modules/projectiles/guns/lever_action.dm
+++ b/code/modules/projectiles/guns/lever_action.dm
@@ -45,7 +45,7 @@ their unique feature is that a direct hit will buff your damage and firerate
/obj/item/weapon/gun/lever_action/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_1 + FIRE_DELAY_TIER_10
+ set_fire_delay(FIRE_DELAY_TIER_1 + FIRE_DELAY_TIER_10)
lever_delay = FIRE_DELAY_TIER_3
accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_5
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_10
@@ -118,12 +118,12 @@ their unique feature is that a direct hit will buff your damage and firerate
last_fired = world.time - buff_fire_reduc //to shoot the next round faster
lever_delay = FIRE_DELAY_TIER_10
damage_mult = initial(damage_mult) + BULLET_DAMAGE_MULT_TIER_10
- fire_delay = FIRE_DELAY_TIER_5
+ set_fire_delay(FIRE_DELAY_TIER_5)
for(var/slot in attachments)
var/obj/item/attachable/AM = attachments[slot]
if(AM.damage_mod || AM.delay_mod)
damage_mult += AM.damage_mod
- fire_delay += AM.delay_mod
+ modify_fire_delay(AM.delay_mod)
wield_delay = 0 //for one-handed levering
/obj/item/weapon/gun/lever_action/proc/reset_hit_buff(mob/user, one_hand_lever)
@@ -137,7 +137,7 @@ their unique feature is that a direct hit will buff your damage and firerate
cur_onehand_chance = initial(cur_onehand_chance)
//these are init configs and so cannot be initial()
lever_delay = FIRE_DELAY_TIER_3
- fire_delay = FIRE_DELAY_TIER_1
+ set_fire_delay(FIRE_DELAY_TIER_1)
damage_mult = BASE_BULLET_DAMAGE_MULT
recalculate_attachment_bonuses() //stock wield delay
if(one_hand_lever)
@@ -392,7 +392,7 @@ their unique feature is that a direct hit will buff your damage and firerate
/obj/item/weapon/gun/lever_action/xm88/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_1
+ set_fire_delay(FIRE_DELAY_TIER_1)
lever_delay = FIRE_DELAY_TIER_3
accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_5
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_10
@@ -478,7 +478,7 @@ their unique feature is that a direct hit will buff your damage and firerate
lever_sound = lever_super_sound
lever_message = "You quickly press the [lever_name]!"
last_fired = world.time - buff_fire_reduc //to shoot the next round faster
- fire_delay = FIRE_DELAY_TIER_3
+ set_fire_delay(FIRE_DELAY_TIER_3)
damage_mult = BASE_BULLET_DAMAGE_MULT + BULLET_DAMAGE_MULT_TIER_4
if(floating_penetration < floating_penetration_upper_limit)
@@ -488,12 +488,12 @@ their unique feature is that a direct hit will buff your damage and firerate
var/obj/item/attachable/AM = attachments[slot]
if(AM && (AM.damage_mod || AM.delay_mod))
damage_mult += AM.damage_mod
- fire_delay += AM.delay_mod
+ modify_fire_delay(AM.delay_mod)
wield_delay = 0 //for one-handed levering
/obj/item/weapon/gun/lever_action/xm88/Fire(atom/target, mob/living/user, params, reflex, dual_wield)
if(!able_to_fire(user) || !target) //checks here since we don't want to fuck up applying the increase
- return
+ return NONE
if(floating_penetration && in_chamber) //has to go before actual firing
var/obj/item/projectile/P = in_chamber
switch(floating_penetration)
@@ -529,7 +529,7 @@ their unique feature is that a direct hit will buff your damage and firerate
P.ammo = GLOB.ammo_list[/datum/ammo/bullet/lever_action/xm88]
floating_penetration = FLOATING_PENETRATION_TIER_0
//these are init configs and so cannot be initial()
- fire_delay = FIRE_DELAY_TIER_1 + FIRE_DELAY_TIER_10
+ set_fire_delay(FIRE_DELAY_TIER_1 + FIRE_DELAY_TIER_10)
lever_delay = FIRE_DELAY_TIER_3
damage_mult = BASE_BULLET_DAMAGE_MULT
recalculate_attachment_bonuses() //stock wield delay
diff --git a/code/modules/projectiles/guns/misc.dm b/code/modules/projectiles/guns/misc.dm
index 4a84f99d7c62..2aa6b2dfc4d3 100644
--- a/code/modules/projectiles/guns/misc.dm
+++ b/code/modules/projectiles/guns/misc.dm
@@ -13,8 +13,10 @@
current_mag = /obj/item/ammo_magazine/minigun
w_class = SIZE_HUGE
force = 20
- flags_gun_features = GUN_AUTO_EJECTOR|GUN_WIELDED_FIRING_ONLY|GUN_AMMO_COUNTER|GUN_RECOIL_BUILDUP|GUN_HAS_FULL_AUTO|GUN_CAN_POINTBLANK
+ flags_gun_features = GUN_AUTO_EJECTOR|GUN_WIELDED_FIRING_ONLY|GUN_AMMO_COUNTER|GUN_RECOIL_BUILDUP|GUN_CAN_POINTBLANK
gun_category = GUN_CATEGORY_HEAVY
+ start_semiauto = FALSE
+ start_automatic = TRUE
/obj/item/weapon/gun/minigun/Initialize(mapload, spawn_empty)
. = ..()
@@ -22,7 +24,7 @@
/obj/item/weapon/gun/minigun/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_10
+ set_fire_delay(FIRE_DELAY_TIER_10)
accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_3
@@ -45,7 +47,7 @@
/obj/item/weapon/gun/minigun/upp
name = "\improper GSh-7.62 rotary machine gun"
desc = "A gas-operated rotary machine gun used by UPP heavies. Its enormous volume of fire and ammunition capacity allows the suppression of large concentrations of enemy forces. Heavy weapons training is required control its recoil."
- flags_gun_features = GUN_AUTO_EJECTOR|GUN_SPECIALIST|GUN_WIELDED_FIRING_ONLY|GUN_AMMO_COUNTER|GUN_RECOIL_BUILDUP|GUN_HAS_FULL_AUTO|GUN_CAN_POINTBLANK
+ flags_gun_features = GUN_AUTO_EJECTOR|GUN_SPECIALIST|GUN_WIELDED_FIRING_ONLY|GUN_AMMO_COUNTER|GUN_RECOIL_BUILDUP|GUN_CAN_POINTBLANK
/obj/item/weapon/gun/minigun/upp/able_to_fire(mob/living/user)
. = ..()
@@ -72,7 +74,7 @@
current_mag = /obj/item/ammo_magazine/m60
w_class = SIZE_LARGE
force = 25
- flags_gun_features = GUN_WIELDED_FIRING_ONLY|GUN_HAS_FULL_AUTO|GUN_FULL_AUTO_ON|GUN_FULL_AUTO_ONLY|GUN_CAN_POINTBLANK
+ flags_gun_features = GUN_WIELDED_FIRING_ONLY|GUN_CAN_POINTBLANK
gun_category = GUN_CATEGORY_HEAVY
attachable_allowed = list(
/obj/item/attachable/m60barrel,
@@ -82,6 +84,8 @@
/obj/item/attachable/m60barrel,
/obj/item/attachable/bipod/m60,
)
+ start_semiauto = FALSE
+ start_automatic = TRUE
var/cover_open = FALSE //if the gun's feed-cover is open or not.
@@ -96,9 +100,9 @@
/obj/item/weapon/gun/m60/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_10
- burst_amount = BURST_AMOUNT_TIER_5
- burst_delay = FIRE_DELAY_TIER_10
+ set_fire_delay(FIRE_DELAY_TIER_10)
+ set_burst_amount(BURST_AMOUNT_TIER_5)
+ set_burst_delay(FIRE_DELAY_TIER_10)
accuracy_mult = BASE_ACCURACY_MULT
accuracy_mult_unwielded = BASE_ACCURACY_MULT
scatter = SCATTER_AMOUNT_TIER_10
diff --git a/code/modules/projectiles/guns/pistols.dm b/code/modules/projectiles/guns/pistols.dm
index cc4207724b60..47b80f7b9218 100644
--- a/code/modules/projectiles/guns/pistols.dm
+++ b/code/modules/projectiles/guns/pistols.dm
@@ -72,7 +72,7 @@
/obj/item/weapon/gun/pistol/m4a3/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_10
+ set_fire_delay(FIRE_DELAY_TIER_10)
accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_4
accuracy_mult_unwielded = BASE_ACCURACY_MULT
scatter = SCATTER_AMOUNT_TIER_6
@@ -93,7 +93,7 @@
/obj/item/weapon/gun/pistol/m4a3/custom/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_10
+ set_fire_delay(FIRE_DELAY_TIER_10)
accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_4
accuracy_mult_unwielded = BASE_ACCURACY_MULT
scatter = SCATTER_AMOUNT_TIER_6
@@ -122,7 +122,7 @@
/obj/item/weapon/gun/pistol/m1911/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_8
+ set_fire_delay(FIRE_DELAY_TIER_8)
accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_4
accuracy_mult_unwielded = BASE_ACCURACY_MULT
scatter = SCATTER_AMOUNT_TIER_6
@@ -140,7 +140,7 @@
/obj/item/weapon/gun/pistol/m1911/socom/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_8
+ set_fire_delay(FIRE_DELAY_TIER_8)
accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_4
accuracy_mult_unwielded = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_2
scatter = SCATTER_AMOUNT_TIER_8
@@ -171,14 +171,14 @@
BFA.flags_attach_features &= ~ATTACH_REMOVABLE
BFA.Attach(src)
update_attachable(BFA.slot)
- flags_gun_features |= GUN_BURST_ON
+ add_firemode(GUN_FIREMODE_BURSTFIRE)
/obj/item/weapon/gun/pistol/b92fs/set_gun_attachment_offsets()
attachable_offset = list("muzzle_x" = 28, "muzzle_y" = 20,"rail_x" = 10, "rail_y" = 22, "under_x" = 21, "under_y" = 17, "stock_x" = 21, "stock_y" = 17)
/obj/item/weapon/gun/pistol/b92fs/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_10
+ set_fire_delay(FIRE_DELAY_TIER_10)
accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_5
accuracy_mult_unwielded = BASE_ACCURACY_MULT
scatter = SCATTER_AMOUNT_TIER_7
@@ -218,9 +218,9 @@
/obj/item/weapon/gun/pistol/heavy/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_4
- burst_amount = BURST_AMOUNT_TIER_2
- burst_delay = FIRE_DELAY_TIER_7
+ set_fire_delay(FIRE_DELAY_TIER_4)
+ set_burst_amount(BURST_AMOUNT_TIER_2)
+ set_burst_delay(FIRE_DELAY_TIER_7)
accuracy_mult = BASE_ACCURACY_MULT
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_5
scatter = SCATTER_AMOUNT_TIER_6
@@ -242,7 +242,7 @@
/obj/item/weapon/gun/pistol/heavy/co/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_5
+ set_fire_delay(FIRE_DELAY_TIER_5)
accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_4
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_7
scatter = SCATTER_AMOUNT_TIER_6
@@ -285,7 +285,7 @@
/obj/item/weapon/gun/pistol/c99/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_10
+ set_fire_delay(FIRE_DELAY_TIER_10)
accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_4
accuracy_mult_unwielded = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_4
scatter = SCATTER_AMOUNT_TIER_6
@@ -337,7 +337,7 @@
/obj/item/weapon/gun/pistol/kt42/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_9
+ set_fire_delay(FIRE_DELAY_TIER_9)
accuracy_mult = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_1
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_2
scatter = SCATTER_AMOUNT_TIER_6
@@ -373,7 +373,7 @@
/obj/item/weapon/gun/pistol/holdout/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_9
+ set_fire_delay(FIRE_DELAY_TIER_9)
accuracy_mult = BASE_ACCURACY_MULT
accuracy_mult_unwielded = BASE_ACCURACY_MULT
scatter = SCATTER_AMOUNT_TIER_6
@@ -410,7 +410,7 @@
/obj/item/weapon/gun/pistol/clfpistol/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_10
+ set_fire_delay(FIRE_DELAY_TIER_10)
accuracy_mult = BASE_ACCURACY_MULT
accuracy_mult_unwielded = BASE_ACCURACY_MULT
scatter = SCATTER_AMOUNT_TIER_6
@@ -462,8 +462,8 @@
if(!manually_slided)
click_empty()
to_chat(user, SPAN_DANGER("\The [src] makes a clicking noise! You need to manually rack the slide after loading in a new magazine!"))
- return
- ..()
+ return NONE
+ return ..()
/obj/item/weapon/gun/pistol/highpower/unique_action(mob/user)
if(!manually_slided)
@@ -488,7 +488,7 @@
/obj/item/weapon/gun/pistol/highpower/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_5
+ set_fire_delay(FIRE_DELAY_TIER_5)
accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_4
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_3
scatter = SCATTER_AMOUNT_TIER_6
@@ -552,9 +552,9 @@
/obj/item/weapon/gun/pistol/mod88/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_9
- burst_amount = BURST_AMOUNT_TIER_3
- burst_delay = FIRE_DELAY_TIER_9
+ set_fire_delay(FIRE_DELAY_TIER_9)
+ set_burst_amount(BURST_AMOUNT_TIER_3)
+ set_burst_delay(FIRE_DELAY_TIER_9)
accuracy_mult = BASE_ACCURACY_MULT
accuracy_mult_unwielded = BASE_ACCURACY_MULT
scatter = SCATTER_AMOUNT_TIER_7
@@ -651,9 +651,9 @@
/obj/item/weapon/gun/pistol/vp78/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_4
- burst_amount = BURST_AMOUNT_TIER_3
- burst_delay = FIRE_DELAY_TIER_9
+ set_fire_delay(FIRE_DELAY_TIER_4)
+ set_burst_amount(BURST_AMOUNT_TIER_3)
+ set_burst_delay(FIRE_DELAY_TIER_9)
accuracy_mult = BASE_ACCURACY_MULT
accuracy_mult_unwielded = BASE_ACCURACY_MULT
scatter = SCATTER_AMOUNT_TIER_6
@@ -683,9 +683,9 @@ It is a modified Beretta 93R, and can fire three-round burst or single fire. Whe
/obj/item/weapon/gun/pistol/auto9/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_7
- burst_amount = BURST_AMOUNT_TIER_3
- burst_delay = FIRE_DELAY_TIER_10
+ set_fire_delay(FIRE_DELAY_TIER_7)
+ set_burst_amount(BURST_AMOUNT_TIER_3)
+ set_burst_delay(FIRE_DELAY_TIER_10)
accuracy_mult = BASE_ACCURACY_MULT
accuracy_mult_unwielded = BASE_ACCURACY_MULT
scatter = SCATTER_AMOUNT_TIER_6
@@ -715,9 +715,9 @@ It is a modified Beretta 93R, and can fire three-round burst or single fire. Whe
/obj/item/weapon/gun/pistol/chimp/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_8
- burst_delay = FIRE_DELAY_TIER_9
- burst_amount = BURST_AMOUNT_TIER_2
+ set_fire_delay(FIRE_DELAY_TIER_8)
+ set_burst_delay(FIRE_DELAY_TIER_9)
+ set_burst_amount(BURST_AMOUNT_TIER_2)
accuracy_mult = BASE_ACCURACY_MULT
accuracy_mult_unwielded = BASE_ACCURACY_MULT
scatter = SCATTER_AMOUNT_TIER_6
@@ -747,9 +747,9 @@ It is a modified Beretta 93R, and can fire three-round burst or single fire. Whe
/obj/item/weapon/gun/pistol/smart/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_10
- burst_amount = BURST_AMOUNT_TIER_3
- burst_delay = FIRE_DELAY_TIER_9
+ set_fire_delay(FIRE_DELAY_TIER_10)
+ set_burst_amount(BURST_AMOUNT_TIER_3)
+ set_burst_delay(FIRE_DELAY_TIER_9)
accuracy_mult = BASE_ACCURACY_MULT
accuracy_mult_unwielded = BASE_ACCURACY_MULT
scatter = SCATTER_AMOUNT_TIER_6
@@ -776,7 +776,7 @@ It is a modified Beretta 93R, and can fire three-round burst or single fire. Whe
fire_sound = 'sound/weapons/gun_skorpion.ogg'
current_mag = /obj/item/ammo_magazine/pistol/skorpion
- flags_gun_features = GUN_AUTO_EJECTOR|GUN_CAN_POINTBLANK|GUN_ONE_HAND_WIELDED|GUN_HAS_FULL_AUTO|GUN_FULL_AUTO_ON|GUN_FULL_AUTO_ONLY
+ flags_gun_features = GUN_AUTO_EJECTOR|GUN_CAN_POINTBLANK|GUN_ONE_HAND_WIELDED
attachable_allowed = list(
/obj/item/attachable/reddot, //Rail
/obj/item/attachable/reflex,
@@ -787,14 +787,16 @@ It is a modified Beretta 93R, and can fire three-round burst or single fire. Whe
/obj/item/attachable/heavy_barrel,
/obj/item/attachable/lasersight, //Underbarrel
/obj/item/attachable/burstfire_assembly,
- )
+ )
+ start_semiauto = FALSE
+ start_automatic = TRUE
/obj/item/weapon/gun/pistol/skorpion/set_gun_attachment_offsets()
attachable_offset = list("muzzle_x" = 29, "muzzle_y" = 18,"rail_x" = 16, "rail_y" = 21, "under_x" = 23, "under_y" = 15, "stock_x" = 23, "stock_y" = 15)
/obj/item/weapon/gun/pistol/skorpion/set_gun_config_values()
..()
- fa_delay = FIRE_DELAY_TIER_9
+ set_fire_delay(FIRE_DELAY_TIER_9)
fa_scatter_peak = 15 //shots
fa_max_scatter = SCATTER_AMOUNT_TIER_4
diff --git a/code/modules/projectiles/guns/revolvers.dm b/code/modules/projectiles/guns/revolvers.dm
index 3553ae880d7d..022a8cabd349 100644
--- a/code/modules/projectiles/guns/revolvers.dm
+++ b/code/modules/projectiles/guns/revolvers.dm
@@ -33,7 +33,7 @@
/obj/item/weapon/gun/revolver/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_5
+ set_fire_delay(FIRE_DELAY_TIER_5)
accuracy_mult = BASE_ACCURACY_MULT
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_3
scatter = SCATTER_AMOUNT_TIER_8
@@ -318,7 +318,7 @@
/obj/item/weapon/gun/revolver/m44/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_7
+ set_fire_delay(FIRE_DELAY_TIER_7)
accuracy_mult = BASE_ACCURACY_MULT
scatter = SCATTER_AMOUNT_TIER_8
damage_mult = BASE_BULLET_DAMAGE_MULT
@@ -375,7 +375,7 @@
..()
accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_4
damage_mult = BASE_BULLET_DAMAGE_MULT + BULLET_DAMAGE_MULT_TIER_2
- fire_delay = FIRE_DELAY_TIER_9
+ set_fire_delay(FIRE_DELAY_TIER_9)
/obj/item/weapon/gun/revolver/m44/custom/pkd_special/k2049
name = "\improper M2049 Blaster"
@@ -414,9 +414,9 @@
..()
accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_4
damage_mult = BASE_BULLET_DAMAGE_MULT + BULLET_DAMAGE_MULT_TIER_2
- fire_delay = FIRE_DELAY_TIER_9
- burst_amount = BURST_AMOUNT_TIER_2
- burst_delay = FIRE_DELAY_TIER_10
+ set_fire_delay(FIRE_DELAY_TIER_9)
+ set_burst_amount(BURST_AMOUNT_TIER_2)
+ set_burst_delay(FIRE_DELAY_TIER_10)
/obj/item/weapon/gun/revolver/m44/custom/webley //Van Bandolier's Webley.
@@ -469,7 +469,7 @@
/obj/item/weapon/gun/revolver/nagant/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_8
+ set_fire_delay(FIRE_DELAY_TIER_8)
accuracy_mult = BASE_ACCURACY_MULT
scatter = SCATTER_AMOUNT_TIER_6
damage_mult = BASE_BULLET_DAMAGE_MULT + BULLET_DAMAGE_MULT_TIER_1
@@ -504,7 +504,7 @@
/obj/item/weapon/gun/revolver/small/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_6
+ set_fire_delay(FIRE_DELAY_TIER_6)
accuracy_mult = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_7
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_7
scatter = SCATTER_AMOUNT_TIER_5
@@ -596,9 +596,9 @@
/obj/item/weapon/gun/revolver/mateba/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_2
- burst_amount = BURST_AMOUNT_TIER_3
- burst_delay = FIRE_DELAY_TIER_7
+ set_fire_delay(FIRE_DELAY_TIER_2)
+ set_burst_amount(BURST_AMOUNT_TIER_3)
+ set_burst_delay(FIRE_DELAY_TIER_7)
accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_2
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_5
scatter = SCATTER_AMOUNT_TIER_7
@@ -699,14 +699,14 @@
/obj/item/weapon/gun/revolver/cmb/Fire(atom/target, mob/living/user, params, reflex = 0, dual_wield)
playsound('sound/weapons/gun_cmb_bass.ogg') // badass shooting bass
- . = ..()
+ return ..()
/obj/item/weapon/gun/revolver/cmb/set_gun_attachment_offsets()
attachable_offset = list("muzzle_x" = 29, "muzzle_y" = 22,"rail_x" = 11, "rail_y" = 25, "under_x" = 20, "under_y" = 18, "stock_x" = 20, "stock_y" = 18)
/obj/item/weapon/gun/revolver/cmb/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_6
+ set_fire_delay(FIRE_DELAY_TIER_6)
accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_4
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_4
scatter = SCATTER_AMOUNT_TIER_7
diff --git a/code/modules/projectiles/guns/rifles.dm b/code/modules/projectiles/guns/rifles.dm
index ab2602204f72..09a0e2b683cf 100644
--- a/code/modules/projectiles/guns/rifles.dm
+++ b/code/modules/projectiles/guns/rifles.dm
@@ -18,9 +18,9 @@
/obj/item/weapon/gun/rifle/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_5
- burst_amount = BURST_AMOUNT_TIER_3
- burst_delay = FIRE_DELAY_TIER_9
+ set_fire_delay(FIRE_DELAY_TIER_5)
+ set_burst_amount(BURST_AMOUNT_TIER_3)
+ set_burst_delay(FIRE_DELAY_TIER_9)
accuracy_mult = BASE_ACCURACY_MULT
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_7
scatter = SCATTER_AMOUNT_TIER_6
@@ -82,12 +82,13 @@
/obj/item/weapon/gun/rifle/m41a/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_9
- burst_amount = BURST_AMOUNT_TIER_3
- burst_delay = FIRE_DELAY_TIER_9
+ set_fire_delay(FIRE_DELAY_TIER_9)
+ set_burst_amount(BURST_AMOUNT_TIER_3)
+ set_burst_delay(FIRE_DELAY_TIER_9)
accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_4 + 2*HIT_ACCURACY_MULT_TIER_1
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_7
scatter = SCATTER_AMOUNT_TIER_8
+ //fa_scatter_peak = FULL_AUTO_SCATTER_PEAK_TIER_8 //Zonenote
burst_scatter_mult = SCATTER_AMOUNT_TIER_10
scatter_unwielded = SCATTER_AMOUNT_TIER_2
damage_mult = BASE_BULLET_DAMAGE_MULT + BULLET_DAMAGE_MULT_TIER_2
@@ -137,7 +138,7 @@
/obj/item/attachable/scope/mini/nsg23,
)
- flags_gun_features = GUN_AUTO_EJECTOR|GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_BURST_ON|GUN_BURST_ONLY|GUN_WY_RESTRICTED
+ flags_gun_features = GUN_AUTO_EJECTOR|GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_WY_RESTRICTED
random_spawn_muzzle = list(
/obj/item/attachable/suppressor,
@@ -148,6 +149,7 @@
/obj/item/attachable/scope/mini/nsg23,
/obj/item/attachable/attached_gun/flamer/advanced,
)
+ start_semiauto = FALSE
/obj/item/weapon/gun/rifle/nsg23/Initialize(mapload, spawn_empty)
. = ..()
@@ -158,9 +160,9 @@
/obj/item/weapon/gun/rifle/nsg23/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_7
- burst_amount = BURST_AMOUNT_TIER_3
- burst_delay = FIRE_DELAY_TIER_8
+ set_fire_delay(FIRE_DELAY_TIER_7)
+ set_burst_amount(BURST_AMOUNT_TIER_3)
+ set_burst_delay(FIRE_DELAY_TIER_8)
accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_10
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_7
scatter = SCATTER_AMOUNT_TIER_9
@@ -182,7 +184,7 @@
starting_attachment_types = list() //starts with the stock anyways due to handle_starting_attachment()
/obj/item/weapon/gun/rifle/nsg23/no_lock
- flags_gun_features = GUN_AUTO_EJECTOR|GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_BURST_ON|GUN_BURST_ONLY
+ flags_gun_features = GUN_AUTO_EJECTOR|GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER
starting_attachment_types = list(
/obj/item/attachable/scope/mini/nsg23,
/obj/item/attachable/attached_gun/flamer,//non-op flamer for normal spawns
@@ -230,9 +232,9 @@
/obj/item/weapon/gun/rifle/m41a/elite/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_9
- burst_amount = BURST_AMOUNT_TIER_2
- burst_delay = FIRE_DELAY_TIER_10
+ set_fire_delay(FIRE_DELAY_TIER_9)
+ set_burst_amount(BURST_AMOUNT_TIER_2)
+ set_burst_delay(FIRE_DELAY_TIER_10)
accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_10
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_4
scatter = SCATTER_AMOUNT_TIER_10
@@ -291,7 +293,7 @@
indestructible = TRUE
current_mag = /obj/item/ammo_magazine/rifle/xm40/heap
- flags_gun_features = GUN_AUTO_EJECTOR|GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER|GUN_BURST_ON
+ flags_gun_features = GUN_AUTO_EJECTOR|GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER
aim_slowdown = SLOWDOWN_ADS_QUICK
wield_delay = WIELD_DELAY_FAST
map_specific_decoration = FALSE
@@ -344,9 +346,9 @@
/obj/item/weapon/gun/rifle/m41a/elite/xm40/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_9
- burst_amount = BURST_AMOUNT_TIER_3
- burst_delay = FIRE_DELAY_TIER_10
+ set_fire_delay(FIRE_DELAY_TIER_9)
+ set_burst_amount(BURST_AMOUNT_TIER_3)
+ set_burst_delay(FIRE_DELAY_TIER_10)
accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_10
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_4
scatter = SCATTER_AMOUNT_TIER_10
@@ -388,9 +390,9 @@
/obj/item/weapon/gun/rifle/m41aMK1/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_9
- burst_amount = BURST_AMOUNT_TIER_4
- burst_delay = FIRE_DELAY_TIER_9
+ set_fire_delay(FIRE_DELAY_TIER_9)
+ set_burst_amount(BURST_AMOUNT_TIER_4)
+ set_burst_delay(FIRE_DELAY_TIER_9)
accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_3
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_7
scatter = SCATTER_AMOUNT_TIER_9
@@ -496,6 +498,7 @@
LAZYADD(traits_to_give, list(
BULLET_TRAIT_ENTRY_ID("iff", /datum/element/bullet_trait_iff)
))
+ recalculate_attachment_bonuses()
/obj/item/weapon/gun/rifle/m46c/Destroy()
linked_human = null
@@ -515,9 +518,9 @@
/obj/item/weapon/gun/rifle/m46c/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_8
- burst_amount = BURST_AMOUNT_TIER_4
- burst_delay = FIRE_DELAY_TIER_10
+ set_fire_delay(FIRE_DELAY_TIER_8)
+ set_burst_amount(BURST_AMOUNT_TIER_4)
+ set_burst_delay(FIRE_DELAY_TIER_10)
accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_4
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_8
scatter = SCATTER_AMOUNT_TIER_8
@@ -614,6 +617,7 @@
to_chat(usr, SPAN_WARNING("[icon2html(src, usr)] Action denied by [src]. Unauthorized user."))
return
+ gun_firemode = GUN_FIREMODE_SEMIAUTO
iff_enabled = !iff_enabled
to_chat(usr, SPAN_NOTICE("[icon2html(src, usr)] You [iff_enabled? "enable": "disable"] the IFF on [src]."))
playsound(loc,'sound/machines/click.ogg', 25, 1)
@@ -627,10 +631,11 @@
/obj/item/weapon/gun/rifle/m46c/recalculate_attachment_bonuses()
. = ..()
if(iff_enabled)
- fire_delay += FIRE_DELAY_TIER_10
- burst_amount -= BURST_AMOUNT_TIER_6
+ modify_fire_delay(FIRE_DELAY_TIER_10)
+ remove_firemode(GUN_FIREMODE_BURSTFIRE)
- flags_gun_features &= ~GUN_BURST_ON //Gun loses some combat ability in return for IFF, as well as burst fire mode
+ else
+ add_firemode(GUN_FIREMODE_BURSTFIRE)
/obj/item/weapon/gun/rifle/m46c/proc/name_after_co(mob/living/carbon/human/H)
@@ -723,9 +728,9 @@
/obj/item/weapon/gun/rifle/mar40/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_7
- burst_amount = BURST_AMOUNT_TIER_4
- burst_delay = FIRE_DELAY_TIER_9
+ set_fire_delay(FIRE_DELAY_TIER_7)
+ set_burst_amount(BURST_AMOUNT_TIER_4)
+ set_burst_delay(FIRE_DELAY_TIER_9)
accuracy_mult = BASE_ACCURACY_MULT
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_7
scatter = SCATTER_AMOUNT_TIER_6
@@ -796,7 +801,7 @@
/obj/item/weapon/gun/rifle/mar40/carbine/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_8
+ set_fire_delay(FIRE_DELAY_TIER_8)
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_4
damage_mult = BASE_BULLET_DAMAGE_MULT - BULLET_DAMAGE_MULT_TIER_2
scatter_unwielded = SCATTER_AMOUNT_TIER_4
@@ -842,9 +847,9 @@
/obj/item/weapon/gun/rifle/mar40/lmg/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_8
- burst_amount = BURST_AMOUNT_TIER_5
- burst_delay = FIRE_DELAY_TIER_9
+ set_fire_delay(FIRE_DELAY_TIER_8)
+ set_burst_amount(BURST_AMOUNT_TIER_5)
+ set_burst_delay(FIRE_DELAY_TIER_9)
accuracy_mult = BASE_ACCURACY_MULT
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_7
scatter = SCATTER_AMOUNT_TIER_6
@@ -935,9 +940,9 @@
/obj/item/weapon/gun/rifle/m16/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_9
- burst_amount = BURST_AMOUNT_TIER_3
- burst_delay = FIRE_DELAY_TIER_9
+ set_fire_delay(FIRE_DELAY_TIER_9)
+ set_burst_amount(BURST_AMOUNT_TIER_3)
+ set_burst_delay(FIRE_DELAY_TIER_9)
accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_7
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_7
scatter = SCATTER_AMOUNT_TIER_10
@@ -1046,9 +1051,9 @@
/obj/item/weapon/gun/rifle/xm177/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_SMG
- burst_amount = BURST_AMOUNT_TIER_3
- burst_delay = FIRE_DELAY_TIER_SMG
+ set_fire_delay(FIRE_DELAY_TIER_SMG)
+ set_burst_amount(BURST_AMOUNT_TIER_3)
+ set_burst_delay(FIRE_DELAY_TIER_SMG)
accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_6
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_3
scatter = SCATTER_AMOUNT_TIER_8
@@ -1123,9 +1128,9 @@
/obj/item/weapon/gun/rifle/ar10/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_7
- burst_amount = BURST_AMOUNT_TIER_3
- burst_delay = FIRE_DELAY_TIER_7
+ set_fire_delay(FIRE_DELAY_TIER_7)
+ set_burst_amount(BURST_AMOUNT_TIER_3)
+ set_burst_delay(FIRE_DELAY_TIER_7)
accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_8
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_10
scatter = SCATTER_AMOUNT_TIER_9
@@ -1185,9 +1190,9 @@
/obj/item/weapon/gun/rifle/xm177/dutch/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_SMG
- burst_amount = BURST_AMOUNT_TIER_3
- burst_delay = FIRE_DELAY_TIER_SMG
+ set_fire_delay(FIRE_DELAY_TIER_SMG)
+ set_burst_amount(BURST_AMOUNT_TIER_3)
+ set_burst_delay(FIRE_DELAY_TIER_SMG)
accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_6
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_3
scatter = SCATTER_AMOUNT_TIER_8
@@ -1236,10 +1241,9 @@
/obj/item/weapon/gun/rifle/lmg/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_LMG
- burst_amount = BURST_AMOUNT_TIER_5
- burst_delay = FIRE_DELAY_TIER_LMG
- fa_delay = FIRE_DELAY_TIER_9
+ set_fire_delay(FIRE_DELAY_TIER_LMG)
+ set_burst_amount(BURST_AMOUNT_TIER_5)
+ set_burst_delay(FIRE_DELAY_TIER_LMG)
fa_scatter_peak = FULL_AUTO_SCATTER_PEAK_TIER_3
fa_max_scatter = SCATTER_AMOUNT_TIER_4
accuracy_mult = BASE_ACCURACY_MULT
@@ -1299,9 +1303,9 @@
/obj/item/weapon/gun/rifle/type71/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_9
- burst_amount = BURST_AMOUNT_TIER_4
- burst_delay = FIRE_DELAY_TIER_8
+ set_fire_delay(FIRE_DELAY_TIER_9)
+ set_burst_amount(BURST_AMOUNT_TIER_4)
+ set_burst_delay(FIRE_DELAY_TIER_8)
accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_4
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_7
scatter = SCATTER_AMOUNT_TIER_6
@@ -1414,7 +1418,7 @@
/obj/item/weapon/gun/rifle/type71/carbine/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_9
+ set_fire_delay(FIRE_DELAY_TIER_9)
damage_mult = BASE_BULLET_DAMAGE_MULT - BULLET_DAMAGE_MULT_TIER_2
scatter_unwielded = SCATTER_AMOUNT_TIER_5
recoil_unwielded = RECOIL_AMOUNT_TIER_4
@@ -1479,8 +1483,8 @@
..()
accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_7
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_4
- fire_delay = FIRE_DELAY_TIER_9
- burst_delay = FIRE_DELAY_TIER_10
+ set_fire_delay(FIRE_DELAY_TIER_9)
+ set_burst_delay(FIRE_DELAY_TIER_10)
scatter = SCATTER_AMOUNT_TIER_8
//-------------------------------------------------------
@@ -1526,8 +1530,8 @@
/obj/item/weapon/gun/rifle/m4ra/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_8
- burst_amount = 0
+ set_fire_delay(FIRE_DELAY_TIER_8)
+ set_burst_amount(0)
accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_5
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_4
damage_mult = BASE_BULLET_DAMAGE_MULT + BULLET_DAMAGE_MULT_TIER_6
@@ -1590,8 +1594,8 @@
/obj/item/weapon/gun/rifle/l42a/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_8
- burst_amount = 0
+ set_fire_delay(FIRE_DELAY_TIER_8)
+ set_burst_amount(0)
accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_5
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_4
damage_mult = BASE_BULLET_DAMAGE_MULT + BULLET_DAMAGE_MULT_TIER_6
diff --git a/code/modules/projectiles/guns/shotguns.dm b/code/modules/projectiles/guns/shotguns.dm
index d844498c2c02..8903be95db95 100644
--- a/code/modules/projectiles/guns/shotguns.dm
+++ b/code/modules/projectiles/guns/shotguns.dm
@@ -35,7 +35,7 @@ can cause issues with ammo types getting mixed up during the burst.
/obj/item/weapon/gun/shotgun/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_5
+ set_fire_delay(FIRE_DELAY_TIER_5)
accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_3
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_10
scatter = SCATTER_AMOUNT_TIER_6
@@ -199,9 +199,9 @@ can cause issues with ammo types getting mixed up during the burst.
/obj/item/weapon/gun/shotgun/merc/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_6*2
- burst_amount = BURST_AMOUNT_TIER_2
- burst_delay = FIRE_DELAY_TIER_9
+ set_fire_delay(FIRE_DELAY_TIER_6*2)
+ set_burst_amount(BURST_AMOUNT_TIER_2)
+ set_burst_delay(FIRE_DELAY_TIER_9)
accuracy_mult = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_4
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_10
scatter = SCATTER_AMOUNT_TIER_6
@@ -222,8 +222,8 @@ can cause issues with ammo types getting mixed up during the burst.
/obj/item/weapon/gun/shotgun/merc/damaged/set_gun_config_values()
..()
- fire_delay = 1.5 SECONDS
- burst_amount = BURST_AMOUNT_TIER_1
+ set_fire_delay(1.5 SECONDS)
+ set_burst_amount(BURST_AMOUNT_TIER_1)
accuracy_mult = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_6
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_10
scatter = SCATTER_AMOUNT_TIER_5
@@ -279,7 +279,7 @@ can cause issues with ammo types getting mixed up during the burst.
/obj/item/weapon/gun/shotgun/combat/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_5*2
+ set_fire_delay(FIRE_DELAY_TIER_5*2)
accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_3
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_10
scatter = SCATTER_AMOUNT_TIER_6
@@ -324,9 +324,9 @@ can cause issues with ammo types getting mixed up during the burst.
current_mag = /obj/item/ammo_magazine/internal/shotgun/buckshot
flags_equip_slot = SLOT_WAIST|SLOT_BACK
- flags_gun_features = GUN_CAN_POINTBLANK|GUN_INTERNAL_MAG|GUN_HAS_FULL_AUTO|GUN_FULL_AUTO_ON
- fa_delay = FIRE_DELAY_TIER_6
+ flags_gun_features = GUN_CAN_POINTBLANK|GUN_INTERNAL_MAG
auto_retrieval_slot = WEAR_J_STORE
+ start_automatic = TRUE
/obj/item/weapon/gun/shotgun/combat/marsoc/Initialize(mapload, spawn_empty)
. = ..()
@@ -347,7 +347,7 @@ can cause issues with ammo types getting mixed up during the burst.
/obj/item/weapon/gun/shotgun/combat/marsoc/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_5*2
+ set_fire_delay(FIRE_DELAY_TIER_6)
accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_3
accuracy_mult_unwielded = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_3 - HIT_ACCURACY_MULT_TIER_5
scatter = SCATTER_AMOUNT_TIER_6
@@ -395,7 +395,7 @@ can cause issues with ammo types getting mixed up during the burst.
/obj/item/weapon/gun/shotgun/type23/set_gun_config_values()
..()
- fire_delay = 2.5 SECONDS
+ set_fire_delay(2.5 SECONDS)
accuracy_mult = BASE_ACCURACY_MULT
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_10
scatter = SCATTER_AMOUNT_TIER_4
@@ -521,8 +521,8 @@ can cause issues with ammo types getting mixed up during the burst.
/obj/item/weapon/gun/shotgun/double/set_gun_config_values()
..()
- burst_amount = BURST_AMOUNT_TIER_2
- fire_delay = FIRE_DELAY_TIER_9
+ set_burst_amount(BURST_AMOUNT_TIER_2)
+ set_fire_delay(FIRE_DELAY_TIER_9)
accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_3
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_10
scatter = SCATTER_AMOUNT_TIER_6
@@ -632,8 +632,8 @@ can cause issues with ammo types getting mixed up during the burst.
/obj/item/weapon/gun/shotgun/double/damaged/set_gun_config_values()
..()
- burst_amount = BURST_AMOUNT_TIER_1
- fire_delay = 0.9 SECONDS
+ set_burst_amount(BURST_AMOUNT_TIER_1)
+ set_fire_delay(0.9 SECONDS)
accuracy_mult = BASE_ACCURACY_MULT
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_10
scatter = SCATTER_AMOUNT_TIER_7
@@ -655,7 +655,7 @@ can cause issues with ammo types getting mixed up during the burst.
/obj/item/weapon/gun/shotgun/double/sawn/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_9
+ set_fire_delay(FIRE_DELAY_TIER_9)
accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_3 - HIT_ACCURACY_MULT_TIER_5
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_10
scatter = SCATTER_AMOUNT_TIER_6
@@ -701,8 +701,8 @@ can cause issues with ammo types getting mixed up during the burst.
/obj/item/weapon/gun/shotgun/double/cane/set_gun_config_values()
..()
- burst_amount = BURST_AMOUNT_TIER_1
- fire_delay = FIRE_DELAY_TIER_7
+ set_burst_amount(BURST_AMOUNT_TIER_1)
+ set_fire_delay(FIRE_DELAY_TIER_7)
accuracy_mult_unwielded = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_10
scatter_unwielded = SCATTER_AMOUNT_TIER_7
damage_mult = BASE_BULLET_DAMAGE_MULT + BULLET_DAMAGE_MULT_TIER_5
@@ -788,8 +788,8 @@ can cause issues with ammo types getting mixed up during the burst.
/obj/item/weapon/gun/shotgun/double/mou53/set_gun_config_values()
..()
- burst_amount = BURST_AMOUNT_TIER_1
- fire_delay = FIRE_DELAY_TIER_8
+ set_burst_amount(BURST_AMOUNT_TIER_1)
+ set_fire_delay(FIRE_DELAY_TIER_8)
accuracy_mult = BASE_ACCURACY_MULT
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_10
scatter = SCATTER_AMOUNT_TIER_10
@@ -879,8 +879,8 @@ can cause issues with ammo types getting mixed up during the burst.
/obj/item/weapon/gun/shotgun/double/twobore/set_gun_config_values()
..()
- burst_amount = BURST_AMOUNT_TIER_1
- fire_delay = 2 SECONDS //Less than the stun time, but you still have to brace to fire safely.
+ set_burst_amount(BURST_AMOUNT_TIER_1)
+ set_fire_delay(2 SECONDS )//Less than the stun time, but you still have to brace to fire safely.
accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_5
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_10
scatter = SCATTER_AMOUNT_TIER_8
@@ -935,9 +935,9 @@ can cause issues with ammo types getting mixed up during the burst.
/obj/item/weapon/gun/shotgun/double/twobore/Fire(atom/target, mob/living/carbon/human/user, params, reflex = 0, dual_wield) //Using this instead of apply_bullet_effects() as RPG does so I get more granular angles than just user direction.
var/prefire_rounds = current_mag.current_rounds //How many rounds do we have before we fire?
- ..()
+ . = ..()
if(current_mag.current_rounds == prefire_rounds) //We didn't fire a shot.
- return
+ return NONE
var/target_angle = Get_Compass_Dir(user, target) //More precise than get_dir().
fired_shots++
twobore_recoil(user, target_angle)
@@ -1111,8 +1111,8 @@ can cause issues with ammo types getting mixed up during the burst.
/obj/item/weapon/gun/shotgun/pump/set_gun_config_values()
..()
- burst_amount = BURST_AMOUNT_TIER_1
- fire_delay = FIRE_DELAY_TIER_7 * 5
+ set_burst_amount(BURST_AMOUNT_TIER_1)
+ set_fire_delay(FIRE_DELAY_TIER_7 * 5)
accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_3
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_10
scatter = SCATTER_AMOUNT_TIER_6
@@ -1220,7 +1220,7 @@ can cause issues with ammo types getting mixed up during the burst.
playsound(src, 'sound/machines/switch.ogg', 15, TRUE)
return TRUE
-/obj/item/weapon/gun/shotgun/pump/dual_tube/toggle_burst()
+/obj/item/weapon/gun/shotgun/pump/dual_tube/set_bursting()
var/obj/item/weapon/gun/shotgun/pump/dual_tube/shotgun = get_active_firearm(usr)
if(shotgun == src)
swap_tube(usr)
@@ -1257,7 +1257,7 @@ can cause issues with ammo types getting mixed up during the burst.
/obj/item/weapon/gun/shotgun/pump/dual_tube/cmb/set_gun_config_values()
..()
- fire_delay = 1.6 SECONDS
+ set_fire_delay(1.6 SECONDS)
accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_3
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_10
scatter = SCATTER_AMOUNT_TIER_6
diff --git a/code/modules/projectiles/guns/smartgun.dm b/code/modules/projectiles/guns/smartgun.dm
index c73d9c0f6423..859f99b17908 100644
--- a/code/modules/projectiles/guns/smartgun.dm
+++ b/code/modules/projectiles/guns/smartgun.dm
@@ -59,10 +59,12 @@
/obj/item/attachable/flashlight,
)
- flags_gun_features = GUN_SPECIALIST|GUN_WIELDED_FIRING_ONLY|GUN_HAS_FULL_AUTO|GUN_FULL_AUTO_ON|GUN_FULL_AUTO_ONLY
+ flags_gun_features = GUN_SPECIALIST|GUN_WIELDED_FIRING_ONLY
gun_category = GUN_CATEGORY_HEAVY
starting_attachment_types = list(/obj/item/attachable/smartbarrel)
auto_retrieval_slot = WEAR_J_STORE
+ start_semiauto = FALSE
+ start_automatic = TRUE
/obj/item/weapon/gun/smartgun/Initialize(mapload, ...)
@@ -85,10 +87,7 @@
/obj/item/weapon/gun/smartgun/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_10
- burst_amount = BURST_AMOUNT_TIER_3
- burst_delay = FIRE_DELAY_TIER_9
- fa_delay = FIRE_DELAY_TIER_SG
+ set_fire_delay(FIRE_DELAY_TIER_SG)
fa_scatter_peak = FULL_AUTO_SCATTER_PEAK_TIER_8
fa_max_scatter = SCATTER_AMOUNT_TIER_9
if(accuracy_improvement)
@@ -101,7 +100,6 @@
else
scatter = SCATTER_AMOUNT_TIER_6
recoil = RECOIL_AMOUNT_TIER_3
- burst_scatter_mult = SCATTER_AMOUNT_TIER_8
damage_mult = BASE_BULLET_DAMAGE_MULT
/obj/item/weapon/gun/smartgun/set_bullet_traits()
@@ -364,15 +362,13 @@
/obj/item/weapon/gun/smartgun/Fire(atom/target, mob/living/user, params, reflex = 0, dual_wield)
if(!requires_battery)
- ..()
- return
+ return ..()
if(battery)
if(!requires_power)
- ..()
- return
+ return ..()
if(drain_battery())
- ..()
+ return ..()
/obj/item/weapon/gun/smartgun/proc/drain_battery(override_drain)
@@ -672,7 +668,7 @@
ammo = /obj/item/ammo_magazine/smartgun/dirty
ammo_primary = /datum/ammo/bullet/smartgun/dirty//Toggled ammo type
ammo_secondary = /datum/ammo/bullet/smartgun/dirty/armor_piercing///Toggled ammo type
- flags_gun_features = GUN_WY_RESTRICTED|GUN_SPECIALIST|GUN_WIELDED_FIRING_ONLY|GUN_HAS_FULL_AUTO|GUN_FULL_AUTO_ON|GUN_FULL_AUTO_ONLY
+ flags_gun_features = GUN_WY_RESTRICTED|GUN_SPECIALIST|GUN_WIELDED_FIRING_ONLY
/obj/item/weapon/gun/smartgun/dirty/Initialize(mapload, ...)
. = ..()
@@ -690,12 +686,12 @@
/obj/item/weapon/gun/smartgun/dirty/elite/set_gun_config_values()
..()
- burst_amount = BURST_AMOUNT_TIER_5
- burst_delay = FIRE_DELAY_TIER_10
+ set_burst_amount(BURST_AMOUNT_TIER_5)
+ set_burst_delay(FIRE_DELAY_TIER_10)
if(!recoil_compensation)
scatter = SCATTER_AMOUNT_TIER_8
burst_scatter_mult = SCATTER_AMOUNT_TIER_10
- fa_delay = FIRE_DELAY_TIER_10
+ set_fire_delay(FIRE_DELAY_TIER_10)
fa_scatter_peak = FULL_AUTO_SCATTER_PEAK_TIER_10
fa_max_scatter = SCATTER_AMOUNT_NONE
diff --git a/code/modules/projectiles/guns/smgs.dm b/code/modules/projectiles/guns/smgs.dm
index 0c3e7f42fe72..699f05ed318c 100644
--- a/code/modules/projectiles/guns/smgs.dm
+++ b/code/modules/projectiles/guns/smgs.dm
@@ -75,9 +75,9 @@
/obj/item/weapon/gun/smg/m39/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_SMG
- burst_delay = FIRE_DELAY_TIER_SMG
- burst_amount = BURST_AMOUNT_TIER_3
+ set_fire_delay(FIRE_DELAY_TIER_SMG)
+ set_burst_delay(FIRE_DELAY_TIER_SMG)
+ set_burst_amount(BURST_AMOUNT_TIER_3)
accuracy_mult = BASE_ACCURACY_MULT
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_5
scatter = SCATTER_AMOUNT_TIER_4
@@ -124,7 +124,7 @@
/obj/item/weapon/gun/smg/m39/elite/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_SMG
+ set_fire_delay(FIRE_DELAY_TIER_SMG)
accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_7
accuracy_mult_unwielded = BASE_ACCURACY_MULT
scatter = SCATTER_AMOUNT_TIER_9
@@ -176,9 +176,9 @@
/obj/item/weapon/gun/smg/mp5/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_9
- burst_delay = FIRE_DELAY_TIER_SMG
- burst_amount = BURST_AMOUNT_TIER_3
+ set_fire_delay(FIRE_DELAY_TIER_9)
+ set_burst_delay(FIRE_DELAY_TIER_SMG)
+ set_burst_amount(BURST_AMOUNT_TIER_3)
accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_4
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_4
@@ -227,9 +227,9 @@
/obj/item/weapon/gun/smg/mp27/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_SMG
- burst_delay = FIRE_DELAY_TIER_SMG
- burst_amount = BURST_AMOUNT_TIER_2
+ set_fire_delay(FIRE_DELAY_TIER_SMG)
+ set_burst_delay(FIRE_DELAY_TIER_SMG)
+ set_burst_amount(BURST_AMOUNT_TIER_2)
accuracy_mult = BASE_ACCURACY_MULT
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_2
scatter = SCATTER_AMOUNT_TIER_4 + (SCATTER_AMOUNT_TIER_10 * 0.5)
@@ -260,9 +260,9 @@
/obj/item/weapon/gun/smg/ppsh/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_SMG
- burst_delay = FIRE_DELAY_TIER_SMG
- burst_amount = BURST_AMOUNT_TIER_3
+ set_fire_delay(FIRE_DELAY_TIER_SMG)
+ set_burst_delay(FIRE_DELAY_TIER_SMG)
+ set_burst_amount(BURST_AMOUNT_TIER_3)
accuracy_mult = BASE_ACCURACY_MULT
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_5
scatter = SCATTER_AMOUNT_TIER_4
@@ -283,15 +283,15 @@
playsound(src, 'sound/weapons/handling/gun_jam_click.ogg', 35, TRUE)
to_chat(user, SPAN_WARNING("Your gun is jammed! Mash Unique-Action to unjam it!"))
balloon_alert(user, "*jammed*")
- return
+ return NONE
else if(prob(ppsh_mag?.jam_chance))
jammed = TRUE
playsound(src, 'sound/weapons/handling/gun_jam_initial_click.ogg', 50, FALSE)
user.visible_message(SPAN_DANGER("[src] makes a noticeable clicking noise!"), SPAN_HIGHDANGER("\The [src] suddenly jams and refuses to fire! Mash Unique-Action to unjam it."))
balloon_alert(user, "*jammed*")
- return
+ return NONE
else
- . = ..()
+ return ..()
/obj/item/weapon/gun/smg/ppsh/unique_action(mob/user)
if(jammed)
@@ -361,6 +361,7 @@
)
wield_delay = WIELD_DELAY_NONE
aim_slowdown = SLOWDOWN_ADS_NONE
+ start_automatic = TRUE
/obj/item/weapon/gun/smg/mac15/set_gun_attachment_offsets()
attachable_offset = list("muzzle_x" = 32, "muzzle_y" = 20,"rail_x" = 16, "rail_y" = 22, "under_x" = 22, "under_y" = 16, "stock_x" = 22, "stock_y" = 16)
@@ -368,13 +369,9 @@
/obj/item/weapon/gun/smg/mac15/set_gun_config_values()
..()
- /* commented out until better fullauto code
- fa_delay = FIRE_DELAY_TIER_10
fa_scatter_peak = FULL_AUTO_SCATTER_PEAK_TIER_7
fa_max_scatter = SCATTER_AMOUNT_TIER_3
- */
-
- fire_delay = FIRE_DELAY_TIER_10
+ set_fire_delay(FIRE_DELAY_TIER_10)
accuracy_mult = BASE_ACCURACY_MULT
scatter = SCATTER_AMOUNT_TIER_5
burst_scatter_mult = SCATTER_AMOUNT_TIER_8
@@ -413,6 +410,7 @@
)
wield_delay = WIELD_DELAY_MIN
aim_slowdown = SLOWDOWN_ADS_QUICK
+ start_automatic = TRUE
var/jammed = FALSE
/obj/item/weapon/gun/smg/uzi/set_gun_attachment_offsets()
@@ -421,13 +419,9 @@
/obj/item/weapon/gun/smg/uzi/set_gun_config_values()
..()
- /* commented out until better fullauto code
- fa_delay = FIRE_DELAY_TIER_9
fa_scatter_peak = FULL_AUTO_SCATTER_PEAK_TIER_5
fa_max_scatter = SCATTER_AMOUNT_TIER_5
- */
-
- fire_delay = FIRE_DELAY_TIER_9
+ set_fire_delay(FIRE_DELAY_TIER_9)
accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_2
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_2
scatter = SCATTER_AMOUNT_TIER_6
@@ -444,15 +438,15 @@
playsound(src, 'sound/weapons/handling/gun_jam_click.ogg', 35, TRUE)
to_chat(user, SPAN_WARNING("Your gun is jammed! Mash Unique-Action to unjam it!"))
balloon_alert(user, "*jammed*")
- return
+ return NONE
else if(prob(uzi_mag.jam_chance))
jammed = TRUE
playsound(src, 'sound/weapons/handling/gun_jam_initial_click.ogg', 35, TRUE)
user.visible_message(SPAN_DANGER("[src] makes a noticeable clicking noise!"), SPAN_HIGHDANGER("\The [src] suddenly jams and refuses to fire! Mash Unique-Action to unjam it."))
balloon_alert(user, "*jammed*")
- return
+ return NONE
else
- . = ..()
+ return ..()
/obj/item/weapon/gun/smg/uzi/unique_action(mob/user)
if(jammed)
@@ -515,9 +509,9 @@
/obj/item/weapon/gun/smg/fp9000/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_SMG
- burst_delay = FIRE_DELAY_TIER_SMG
- burst_amount = BURST_AMOUNT_TIER_3
+ set_fire_delay(FIRE_DELAY_TIER_SMG)
+ set_burst_delay(FIRE_DELAY_TIER_SMG)
+ set_burst_amount(BURST_AMOUNT_TIER_3)
accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_5
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_5
scatter = SCATTER_AMOUNT_TIER_6
@@ -578,7 +572,7 @@
/obj/item/weapon/gun/smg/nailgun/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_9
+ set_fire_delay(FIRE_DELAY_TIER_9)
accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_5
accuracy_mult_unwielded = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_4
diff --git a/code/modules/projectiles/guns/souto.dm b/code/modules/projectiles/guns/souto.dm
index fbc1a39124b8..8d7a1b2550a4 100644
--- a/code/modules/projectiles/guns/souto.dm
+++ b/code/modules/projectiles/guns/souto.dm
@@ -27,14 +27,14 @@
to_chat(user, "You must equip the specialized Backpack Souto Vending Machine to use the Souto Slinger Supremo!")
click_empty(user)
unlink_soutopack()
- return
+ return NONE
if(soutopack)
if(!current_mag)
current_mag = soutopack.internal_mag
// Check we're actually firing the right fuel tank
if(current_mag != soutopack.internal_mag)
current_mag = soutopack.internal_mag
- ..()
+ return ..()
/obj/item/weapon/gun/souto/reload(mob/user, obj/item/ammo_magazine/magazine)
to_chat(user, SPAN_WARNING("The [src] feed system cannot be reloaded manually."))
diff --git a/code/modules/projectiles/guns/specialist.dm b/code/modules/projectiles/guns/specialist.dm
index be1bf5068a54..22fb290878e9 100644
--- a/code/modules/projectiles/guns/specialist.dm
+++ b/code/modules/projectiles/guns/specialist.dm
@@ -267,7 +267,7 @@
if(toggling_action)
toggling_action.update_button_icon()
-/obj/item/weapon/gun/rifle/sniper/toggle_burst(mob/user)
+/obj/item/weapon/gun/rifle/sniper/set_bursting(mob/user)
if(has_aimed_shot)
toggle_laser(user)
else
@@ -321,8 +321,8 @@
/obj/item/weapon/gun/rifle/sniper/M42A/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_6*3
- burst_amount = BURST_AMOUNT_TIER_1
+ set_fire_delay(FIRE_DELAY_TIER_6*3)
+ set_burst_amount(BURST_AMOUNT_TIER_1)
accuracy_mult = BASE_ACCURACY_MULT * 3 //you HAVE to be able to hit
scatter = SCATTER_AMOUNT_TIER_8
damage_mult = BASE_BULLET_DAMAGE_MULT
@@ -365,9 +365,9 @@
/obj/item/weapon/gun/rifle/sniper/XM42B/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_6 * 6 //Big boy damage, but it takes a lot of time to fire a shot.
+ set_fire_delay(FIRE_DELAY_TIER_6 * 6 )//Big boy damage, but it takes a lot of time to fire a shot.
//Kaga: Adjusted from 56 (Tier 4, 7*8) -> 30 (Tier 6, 5*6) ticks. 95 really wasn't big-boy damage anymore, although I updated it to 125 to remain consistent with the other 10x99mm caliber weapon (M42C). Now takes only twice as long as the M42A.
- burst_amount = BURST_AMOUNT_TIER_1
+ set_burst_amount(BURST_AMOUNT_TIER_1)
accuracy_mult = BASE_ACCURACY_MULT + 2*HIT_ACCURACY_MULT_TIER_10 //Who coded this like this, and why? It just calculates out to 1+1=2. Leaving a note here to check back later.
scatter = SCATTER_AMOUNT_TIER_10
damage_mult = BASE_BULLET_DAMAGE_MULT
@@ -430,8 +430,8 @@
/obj/item/weapon/gun/rifle/sniper/elite/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_6*5
- burst_amount = BURST_AMOUNT_TIER_1
+ set_fire_delay(FIRE_DELAY_TIER_6*5)
+ set_burst_amount(BURST_AMOUNT_TIER_1)
accuracy_mult = BASE_ACCURACY_MULT * 3 //Was previously BAM + HAMT10, similar to the XM42B, and coming out to 1.5? Changed to be consistent with M42A. -Kaga
scatter = SCATTER_AMOUNT_TIER_10 //Was previously 8, changed to be consistent with the XM42B.
damage_mult = BASE_BULLET_DAMAGE_MULT
@@ -507,9 +507,9 @@
/obj/item/weapon/gun/rifle/sniper/svd/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_6
- burst_amount = BURST_AMOUNT_TIER_2
- burst_delay = FIRE_DELAY_TIER_9
+ set_fire_delay(FIRE_DELAY_TIER_6)
+ set_burst_amount(BURST_AMOUNT_TIER_2)
+ set_burst_delay(FIRE_DELAY_TIER_9)
accuracy_mult = BASE_ACCURACY_MULT
scatter = SCATTER_AMOUNT_TIER_8
burst_scatter_mult = SCATTER_AMOUNT_TIER_6
@@ -584,9 +584,9 @@
/obj/item/weapon/gun/rifle/m4ra_custom/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_6
- burst_amount = BURST_AMOUNT_TIER_2
- burst_delay = FIRE_DELAY_TIER_10
+ set_fire_delay(FIRE_DELAY_TIER_6)
+ set_burst_amount(BURST_AMOUNT_TIER_2)
+ set_burst_delay(FIRE_DELAY_TIER_10)
accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_2
scatter = SCATTER_AMOUNT_TIER_8
burst_scatter_mult = SCATTER_AMOUNT_TIER_8
@@ -922,7 +922,7 @@
/obj/item/weapon/gun/launcher/grenade/m92/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_4*4
+ set_fire_delay(FIRE_DELAY_TIER_4*4)
/obj/item/weapon/gun/launcher/grenade/m92/able_to_fire(mob/living/user)
. = ..()
@@ -949,7 +949,7 @@
/obj/item/weapon/gun/launcher/grenade/m81/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_4 * 1.5
+ set_fire_delay(FIRE_DELAY_TIER_4 * 1.5)
/obj/item/weapon/gun/launcher/grenade/m81/on_pocket_removal()
..()
@@ -1058,7 +1058,7 @@
/obj/item/weapon/gun/launcher/rocket/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_6*2
+ set_fire_delay(FIRE_DELAY_TIER_6*2)
accuracy_mult = BASE_ACCURACY_MULT
scatter = SCATTER_AMOUNT_TIER_6
damage_mult = BASE_BULLET_DAMAGE_MULT
@@ -1225,9 +1225,9 @@
/obj/item/weapon/gun/launcher/rocket/m57a4/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_5
- burst_delay = FIRE_DELAY_TIER_7
- burst_amount = BURST_AMOUNT_TIER_4
+ set_fire_delay(FIRE_DELAY_TIER_5)
+ set_burst_delay(FIRE_DELAY_TIER_7)
+ set_burst_amount(BURST_AMOUNT_TIER_4)
accuracy_mult = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_4
scatter = SCATTER_AMOUNT_TIER_6
damage_mult = BASE_BULLET_DAMAGE_MULT
@@ -1372,7 +1372,7 @@
/obj/item/weapon/gun/flare/set_gun_config_values()
..()
- fire_delay = FIRE_DELAY_TIER_10
+ set_fire_delay(FIRE_DELAY_TIER_10)
accuracy_mult = BASE_ACCURACY_MULT
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_10
scatter = 0
diff --git a/code/modules/reagents/chemistry_reactions/food_drink.dm b/code/modules/reagents/chemistry_reactions/food_drink.dm
index 9864af675cee..7e3fdac324f7 100644
--- a/code/modules/reagents/chemistry_reactions/food_drink.dm
+++ b/code/modules/reagents/chemistry_reactions/food_drink.dm
@@ -160,16 +160,16 @@
new /obj/item/reagent_container/food/snacks/sliceable/cheesewheel/immature(location)
-/datum/chemical_reaction/syntiflesh
- name = "Syntiflesh"
- id = "syntiflesh"
+/datum/chemical_reaction/synthmeat
+ name = "synthmeat"
+ id = "synthmeat"
result = null
required_reagents = list("blood" = 5, "clonexadone" = 1)
result_amount = 1
-/datum/chemical_reaction/syntiflesh/on_reaction(datum/reagents/holder, created_volume)
+/datum/chemical_reaction/synthmeat/on_reaction(datum/reagents/holder, created_volume)
var/location = get_turf(holder.my_atom)
- new /obj/item/reagent_container/food/snacks/meat/syntiflesh(location)
+ new /obj/item/reagent_container/food/snacks/meat/synthmeat(location)
/datum/chemical_reaction/hot_ramen
diff --git a/code/modules/shuttle/computers/escape_pod_computer.dm b/code/modules/shuttle/computers/escape_pod_computer.dm
index a28f2bfd2d60..99a989ab2e9f 100644
--- a/code/modules/shuttle/computers/escape_pod_computer.dm
+++ b/code/modules/shuttle/computers/escape_pod_computer.dm
@@ -204,11 +204,18 @@
heat_proof = 1
unslashable = TRUE
unacidable = TRUE
+ var/obj/docking_port/mobile/escape_shuttle/linked_shuttle
/obj/structure/machinery/door/airlock/evacuation/Initialize()
. = ..()
INVOKE_ASYNC(src, PROC_REF(lock))
+/obj/structure/machinery/door/airlock/evacuation/Destroy()
+ if(linked_shuttle)
+ linked_shuttle.mode = SHUTTLE_CRASHED
+ linked_shuttle.door_handler.doors -= list(src)
+ . = ..()
+
//Can't interact with them, mostly to prevent grief and meta.
/obj/structure/machinery/door/airlock/evacuation/Collided()
return FALSE
@@ -219,8 +226,24 @@
/obj/structure/machinery/door/airlock/evacuation/attack_hand()
return FALSE
-/obj/structure/machinery/door/airlock/evacuation/attack_alien()
- return FALSE //Probably a better idea that these cannot be forced open.
+/obj/structure/machinery/door/airlock/evacuation/attack_alien(mob/living/carbon/xenomorph/xeno)
+ if(!density || unslashable) //doors become slashable after evac is called
+ return FALSE
+
+ if(xeno.claw_type < CLAW_TYPE_SHARP)
+ to_chat(xeno, SPAN_WARNING("[src] is bolted down tight."))
+ return XENO_NO_DELAY_ACTION
+
+ xeno.animation_attack_on(src)
+ playsound(src, 'sound/effects/metalhit.ogg', 25, 1)
+ take_damage(HEALTH_DOOR / XENO_HITS_TO_DESTROY_BOLTED_DOOR)
+ return XENO_ATTACK_ACTION
+
/obj/structure/machinery/door/airlock/evacuation/attack_remote()
return FALSE
+
+/obj/structure/machinery/door/airlock/evacuation/get_applying_acid_time() //you can melt evacuation doors only when they are manually locked
+ if(!density)
+ return -1
+ return ..()
diff --git a/code/modules/shuttle/shuttles/escape_shuttle.dm b/code/modules/shuttle/shuttles/escape_shuttle.dm
index 6c580f9f163b..859aa45aceb3 100644
--- a/code/modules/shuttle/shuttles/escape_shuttle.dm
+++ b/code/modules/shuttle/shuttles/escape_shuttle.dm
@@ -9,7 +9,8 @@
ignitionTime = 8 SECONDS
ignition_sound = 'sound/effects/escape_pod_warmup.ogg'
/// The % chance of the escape pod crashing into the groundmap
- var/crash_land_chance = 33
+ var/early_crash_land_chance = 75
+ var/crash_land_chance = 25
var/datum/door_controller/single/door_handler = new()
var/launched = FALSE
@@ -19,11 +20,12 @@
/obj/docking_port/mobile/escape_shuttle/Initialize(mapload)
. = ..(mapload)
for(var/place in shuttle_areas)
- for(var/obj/structure/machinery/door/air in place)
+ for(var/obj/structure/machinery/door/airlock/evacuation/air in place)
door_handler.doors += list(air)
air.breakable = FALSE
air.indestructible = TRUE
air.unacidable = TRUE
+ air.linked_shuttle = src
/obj/docking_port/mobile/escape_shuttle/proc/cancel_evac()
door_handler.control_doors("force-unlock")
@@ -43,6 +45,12 @@
for(var/area/interior_area in shuttle_areas)
for(var/obj/structure/machinery/cryopod/evacuation/cryotube in interior_area)
cryotube.dock_state = STATE_READY
+ for(var/obj/structure/machinery/door/air in door_handler.doors)
+ air.breakable = TRUE
+ air.indestructible = FALSE
+ air.unslashable = FALSE
+ air.unacidable = FALSE
+
/obj/docking_port/mobile/escape_shuttle/proc/evac_launch()
if(mode == SHUTTLE_CRASHED)
@@ -76,7 +84,7 @@
return
destination = null
- if(prob(crash_land_chance))
+ if(prob((EvacuationAuthority.evac_status >= EVACUATION_STATUS_IN_PROGRESS ? crash_land_chance : early_crash_land_chance)))
create_crash_point()
set_mode(SHUTTLE_IGNITING)
@@ -84,6 +92,16 @@
setTimer(ignitionTime)
launched = TRUE
+ if(!crash_land) // so doors won't break in space
+ for(var/obj/structure/machinery/door/air in door_handler.doors)
+ for(var/obj/effect/xenomorph/acid/acid in air.loc)
+ if(acid.acid_t == air)
+ qdel(acid)
+ air.breakable = FALSE
+ air.indestructible = TRUE
+ air.unacidable = TRUE
+
+
/obj/docking_port/mobile/escape_shuttle/proc/create_crash_point()
for(var/i = 1 to 10)
var/list/all_ground_levels = SSmapping.levels_by_trait(ZTRAIT_GROUND)
@@ -191,6 +209,8 @@
id = ESCAPE_SHUTTLE_EAST_CL
width = 4
height = 5
+ early_crash_land_chance = 25
+ crash_land_chance = 5
/obj/docking_port/mobile/escape_shuttle/w
id = ESCAPE_SHUTTLE_WEST
diff --git a/code/modules/tents/blockers.dm b/code/modules/tents/blockers.dm
index 3301768d9147..24765ca2a284 100644
--- a/code/modules/tents/blockers.dm
+++ b/code/modules/tents/blockers.dm
@@ -7,6 +7,7 @@
invisibility = INVISIBILITY_MAXIMUM
density = TRUE
opacity = FALSE // Unfortunately this doesn't behave as we'd want with ON_BORDER so we can't make tent opaque
+ throwpass = TRUE // Needs this so xenos can attack through the blocker and hit the tents or people inside
/// The tent this blocker relates to, will be destroyed along with it
var/obj/structure/tent/linked_tent
@@ -36,3 +37,9 @@
/obj/structure/blocker/tent/get_projectile_hit_boolean(obj/item/projectile/P)
. = ..()
return FALSE // Always fly through the tent
+
+//Blocks all direction, basically an invisible wall
+/obj/structure/blocker/tent/full_tile
+ flags_atom = NO_FLAGS
+ icon = 'icons/landmarks.dmi'
+ icon_state = "invisible_wall"
diff --git a/code/modules/tents/deployed_tents.dm b/code/modules/tents/deployed_tents.dm
index c81beb318d5a..28bf11a38a6a 100644
--- a/code/modules/tents/deployed_tents.dm
+++ b/code/modules/tents/deployed_tents.dm
@@ -3,6 +3,7 @@
/obj/structure/tent
name = "tent"
icon = 'icons/obj/structures/tents_deployed_classic.dmi'
+ desc = "Can be torn down with an entrenching tool."
opacity = FALSE // Seems only the initial turf blocks light, not all of the multitile. Therefore, useless.
layer = INTERIOR_WALL_SOUTH_LAYER // This should be below FLY_LAYER but just thank chairs and other bs
health = 200
@@ -11,7 +12,7 @@
/// Turf dimensions along the X axis, beginning from left, at ground level
var/x_dim = 2
/// Turf dimensions along the Y axis, beginning from bottom, at ground level
- var/y_dim = 3
+ var/y_dim = 4
/// How much cold protection to add to entering humans - Full body clothing means complete (1) protection
var/cold_protection_factor = 0.4
@@ -55,6 +56,7 @@
return
var/mob/subject_mob = subject
RegisterSignal(subject_mob, list(COMSIG_MOVABLE_TURF_ENTERED, COMSIG_GHOST_MOVED), PROC_REF(mob_moved), override = TRUE) // Must override because we can't know if mob was already inside tent without keeping an awful ref list
+ subject_mob.RegisterSignal(src, COMSIG_PARENT_QDELETING, TYPE_PROC_REF(/mob, tent_deletion_clean_up), override = TRUE)
var/atom/movable/screen/plane_master/roof/roof_plane = subject_mob.hud_used.plane_masters["[ROOF_PLANE]"]
roof_plane?.invisibility = INVISIBILITY_MAXIMUM
if(ishuman(subject))
@@ -71,28 +73,60 @@
/obj/structure/tent/proc/mob_exited_tent(mob/subject)
UnregisterSignal(subject, list(COMSIG_MOVABLE_TURF_ENTERED, COMSIG_GHOST_MOVED, COMSIG_HUMAN_COLD_PROTECTION_APPLY_MODIFIERS))
+ subject.UnregisterSignal(src, COMSIG_PARENT_QDELETING)
var/atom/movable/screen/plane_master/roof/roof_plane = subject.hud_used.plane_masters["[ROOF_PLANE]"]
roof_plane?.invisibility = 0
+/mob/proc/tent_deletion_clean_up(obj/structure/tent/deleting_tent)
+ SIGNAL_HANDLER
+ deleting_tent.mob_exited_tent(src)
+
/obj/structure/tent/attack_alien(mob/living/carbon/xenomorph/M)
if(unslashable)
return
- health -= 20
+
+ M.animation_attack_on(src)
+ health -= rand(M.melee_damage_lower, M.melee_damage_upper)
+ playsound(src, 'sound/items/paper_ripped.ogg', 25, 1)
+
+ M.visible_message(SPAN_DANGER("[M] [M.slashes_verb] [src]!"), \
+ SPAN_DANGER("You [M.slash_verb] [src]!"), null, 5, CHAT_TYPE_XENO_COMBAT)
+
if(health <= 0)
visible_message(SPAN_BOLDWARNING("The [src] collapses!"))
qdel(src)
+ return XENO_ATTACK_ACTION
+
+/obj/structure/tent/attackby(obj/item/item, mob/user)
+ var/obj/item/tool/shovel/shovel = item
+ if(!istype(shovel) || shovel.folded)
+ return
+ visible_message(SPAN_HIGHDANGER("[user] is trying to tear down the [src]"))
+ playsound(src, 'sound/items/paper_ripped.ogg', 25, 1)
+
+ if(user.action_busy || !do_after(user, 150, INTERRUPT_ALL|BEHAVIOR_IMMOBILE, BUSY_ICON_HOSTILE, src) || QDELETED(src))
+ return
+
+ visible_message(SPAN_HIGHDANGER("[user] tears down the [src]"))
+ playsound(src, 'sound/items/paper_ripped.ogg', 25, 1)
+ qdel(src)
+
+/obj/structure/tent/get_projectile_hit_boolean(obj/item/projectile/P)
+ . = ..()
+ return FALSE // Always fly through the tent
+
/// Command tent, providing basics for field command: a phone, and an overwatch console
/obj/structure/tent/cmd
icon_state = "cmd_interior"
roof_state = "cmd_top"
- desc = "A standard USCM Command Tent. This one comes equipped with a self-powered Overwatch Console and a Telephone. It is very frail, do not burn, expose to sharp objects, or explosives."
+ desc = "A standard USCM Command Tent. This one comes equipped with a self-powered Overwatch Console and a Telephone. It is very frail, do not burn, expose to sharp objects, or explosives. Can be torn down with an entrenching tool."
/// Medical tent, procures a buff to surgery speed
/obj/structure/tent/med
icon_state = "med_interior"
roof_state = "med_top"
- desc = "A standard USCM Medical Tent. This one comes equipped with advanced field surgery facilities. It is very fragile however and won't withstand the rigors of war."
+ desc = "A standard USCM Medical Tent. This one comes equipped with advanced field surgery facilities. It is very fragile however and won't withstand the rigors of war. Can be torn down with an entrenching tool."
var/surgery_speed_mult = 0.9
var/surgery_pain_reduction = 5
diff --git a/code/modules/tents/folded_tents.dm b/code/modules/tents/folded_tents.dm
index d6f1dbca9fd9..08b8142ab358 100644
--- a/code/modules/tents/folded_tents.dm
+++ b/code/modules/tents/folded_tents.dm
@@ -114,7 +114,7 @@
icon_state = "cmd"
desc = "A standard USCM Command Tent. This one comes equipped with a self-powered Overwatch Console and a Telephone. Unfold in a suitable location to maximize usefulness. Staff Officer not included. ENTRANCE TO THE SOUTH."
dim_x = 2
- dim_y = 3
+ dim_y = 4
off_x = -1
template = /datum/map_template/tent/cmd
@@ -123,7 +123,7 @@
icon_state = "med"
desc = "A standard USCM Medical Tent. This one comes equipped with advanced field surgery facilities. Unfold in a suitable location to maximize health gains. Surgical Tray not included. ENTRANCE TO THE SOUTH."
dim_x = 2
- dim_y = 3
+ dim_y = 4
template = /datum/map_template/tent/med
/obj/item/folded_tent/reqs
@@ -131,7 +131,7 @@
icon_state = "req"
desc = "A standard USCM Requisitions Tent. Now, you can enjoy req line anywhere you go! Unfold in a suitable location to maximize resource distribution. ASRS not included. ENTRANCE TO THE SOUTH."
dim_x = 4
- dim_y = 3
+ dim_y = 4
off_x = -2
template = /datum/map_template/tent/reqs
@@ -140,7 +140,7 @@
icon_state = "big"
desc = "A standard USCM Tent. This one is just a bigger, general purpose version. Unfold in a suitable location for maximum FOB vibes. Mess Tech not included. ENTRANCE TO THE SOUTH."
dim_x = 3
- dim_y = 3
+ dim_y = 4
off_x = -2
template = /datum/map_template/tent/big
diff --git a/code/modules/unit_tests/_unit_tests.dm b/code/modules/unit_tests/_unit_tests.dm
index 010cba770ce2..7e620b6bc1fa 100644
--- a/code/modules/unit_tests/_unit_tests.dm
+++ b/code/modules/unit_tests/_unit_tests.dm
@@ -85,7 +85,7 @@
#include "unit_test.dm"
#include "spawn_humans.dm"
#include "check_runtimes.dm"
-#include "wj_emotes.dm"
+#include "emote_panels.dm"
#undef TEST_ASSERT
#undef TEST_ASSERT_EQUAL
diff --git a/code/modules/unit_tests/emote_panels.dm b/code/modules/unit_tests/emote_panels.dm
new file mode 100644
index 000000000000..87bbd5e15620
--- /dev/null
+++ b/code/modules/unit_tests/emote_panels.dm
@@ -0,0 +1,11 @@
+/// Test that all emotes for Working Joes & Yautja have a category
+/datum/unit_test/emote_panels
+
+/datum/unit_test/emote_panels/Run()
+ for(var/datum/emote/living/carbon/human/synthetic/working_joe/wj_emote as anything in subtypesof(/datum/emote/living/carbon/human/synthetic/working_joe))
+ if(!initial(wj_emote.category))
+ TEST_FAIL("Emote [wj_emote] did not have a category!")
+
+ for(var/datum/emote/living/carbon/human/yautja/yautja_emote as anything in subtypesof(/datum/emote/living/carbon/human/yautja))
+ if(!initial(yautja_emote.category))
+ TEST_FAIL("Emote [yautja_emote] did not have a category!")
diff --git a/code/modules/unit_tests/missing_icons.dm b/code/modules/unit_tests/missing_icons.dm
index 53abbed70d6a..44f135ae34fb 100644
--- a/code/modules/unit_tests/missing_icons.dm
+++ b/code/modules/unit_tests/missing_icons.dm
@@ -19,6 +19,7 @@
/datum/unit_test/missing_icons/Run()
generate_possible_icon_states_list()
generate_possible_icon_states_list("icons/effects/")
+ generate_possible_icon_states_list("icons/mobs/")
if(additional_icon_location)
generate_possible_icon_states_list(additional_icon_location)
diff --git a/code/modules/unit_tests/wj_emotes.dm b/code/modules/unit_tests/wj_emotes.dm
deleted file mode 100644
index f89757665011..000000000000
--- a/code/modules/unit_tests/wj_emotes.dm
+++ /dev/null
@@ -1,7 +0,0 @@
-/// Test that all working joe emotes have a category
-/datum/unit_test/wj_emotes
-
-/datum/unit_test/wj_emotes/Run()
- for(var/datum/emote/living/carbon/human/synthetic/working_joe/emote as anything in subtypesof(/datum/emote/living/carbon/human/synthetic/working_joe))
- if(!initial(emote.category))
- TEST_FAIL("Emote [emote] did not have a category!")
diff --git a/colonialmarines.dme b/colonialmarines.dme
index 4a5798995693..2b3b08984dfa 100644
--- a/colonialmarines.dme
+++ b/colonialmarines.dme
@@ -33,6 +33,7 @@
#include "code\__DEFINES\admin.dm"
#include "code\__DEFINES\ARES.dm"
#include "code\__DEFINES\atmospherics.dm"
+#include "code\__DEFINES\autofire.dm"
#include "code\__DEFINES\autolathe.dm"
#include "code\__DEFINES\blood.dm"
#include "code\__DEFINES\bsql.config.dm"
@@ -51,6 +52,7 @@
#include "code\__DEFINES\db_defs.dm"
#include "code\__DEFINES\defenses.dm"
#include "code\__DEFINES\dropships.dm"
+#include "code\__DEFINES\emote_panels.dm"
#include "code\__DEFINES\equipment.dm"
#include "code\__DEFINES\events.dm"
#include "code\__DEFINES\fire.dm"
@@ -111,7 +113,6 @@
#include "code\__DEFINES\vv.dm"
#include "code\__DEFINES\weapon_stats.dm"
#include "code\__DEFINES\weather.dm"
-#include "code\__DEFINES\wj_emotes.dm"
#include "code\__DEFINES\xeno.dm"
#include "code\__DEFINES\dcs\flags.dm"
#include "code\__DEFINES\dcs\helpers.dm"
@@ -228,6 +229,7 @@
#include "code\controllers\subsystem\admin.dm"
#include "code\controllers\subsystem\assets.dm"
#include "code\controllers\subsystem\atoms.dm"
+#include "code\controllers\subsystem\autofire.dm"
#include "code\controllers\subsystem\cellauto.dm"
#include "code\controllers\subsystem\chat.dm"
#include "code\controllers\subsystem\communications.dm"
@@ -372,6 +374,8 @@
#include "code\datums\components\toxin_buildup.dm"
#include "code\datums\components\weed_damage_reduction.dm"
#include "code\datums\components\weed_food.dm"
+#include "code\datums\components\autofire\_automated_fire.dm"
+#include "code\datums\components\autofire\autofire.dm"
#include "code\datums\components\xeno\shield_slash.dm"
#include "code\datums\construction\construction_template.dm"
#include "code\datums\construction\xenomorph\construction_template_xenomorph.dm"
@@ -1785,12 +1789,10 @@
#include "code\modules\mob\living\carbon\human\powers\human_powers.dm"
#include "code\modules\mob\living\carbon\human\powers\issue_order.dm"
#include "code\modules\mob\living\carbon\human\species\emote-monkey.dm"
-#include "code\modules\mob\living\carbon\human\species\emote-yautja.dm"
#include "code\modules\mob\living\carbon\human\species\human.dm"
#include "code\modules\mob\living\carbon\human\species\monkey.dm"
#include "code\modules\mob\living\carbon\human\species\species.dm"
#include "code\modules\mob\living\carbon\human\species\synthetic.dm"
-#include "code\modules\mob\living\carbon\human\species\yautja.dm"
#include "code\modules\mob\living\carbon\human\species\zombie.dm"
#include "code\modules\mob\living\carbon\human\species\working_joe\_emote.dm"
#include "code\modules\mob\living\carbon\human\species\working_joe\_species.dm"
@@ -1802,6 +1804,11 @@
#include "code\modules\mob\living\carbon\human\species\working_joe\restricted_area.dm"
#include "code\modules\mob\living\carbon\human\species\working_joe\task_update.dm"
#include "code\modules\mob\living\carbon\human\species\working_joe\warning.dm"
+#include "code\modules\mob\living\carbon\human\species\yautja\_emote.dm"
+#include "code\modules\mob\living\carbon\human\species\yautja\_species.dm"
+#include "code\modules\mob\living\carbon\human\species\yautja\fake_sounds.dm"
+#include "code\modules\mob\living\carbon\human\species\yautja\fake_voice.dm"
+#include "code\modules\mob\living\carbon\human\species\yautja\yautja_sound.dm"
#include "code\modules\mob\living\carbon\xenomorph\Abilities.dm"
#include "code\modules\mob\living\carbon\xenomorph\attack_alien.dm"
#include "code\modules\mob\living\carbon\xenomorph\damage_procs.dm"
@@ -2065,7 +2072,6 @@
#include "code\modules\power\turbine.dm"
#include "code\modules\projectiles\ammo_datums.dm"
#include "code\modules\projectiles\ammunition.dm"
-#include "code\modules\projectiles\full_auto.dm"
#include "code\modules\projectiles\gun.dm"
#include "code\modules\projectiles\gun_attachables.dm"
#include "code\modules\projectiles\gun_helpers.dm"
diff --git a/html/changelogs/AutoChangeLog-pr-3455.yml b/html/changelogs/AutoChangeLog-pr-3455.yml
deleted file mode 100644
index c3189ad233bd..000000000000
--- a/html/changelogs/AutoChangeLog-pr-3455.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-author: "realforest2001"
-delete-after: True
-changes:
- - rscadd: "Adds a plasma breaching charge that detonates a plasma wave stunning those opposite it."
- - rscadd: "Adds the name of the tracked item to the Yautja gear tracker."
- - rscadd: "Added an alternate mode for the Plasma Pistol and moved the incendiary property to it."
- - rscadd: "Added MINIMAP_FLAG_ALL to Yautja globe map."
\ No newline at end of file
diff --git a/html/changelogs/AutoChangeLog-pr-3757.yml b/html/changelogs/AutoChangeLog-pr-3757.yml
deleted file mode 100644
index 4cc6cc928423..000000000000
--- a/html/changelogs/AutoChangeLog-pr-3757.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-author: "realforest2001"
-delete-after: True
-changes:
- - rscadd: "Made Yautja cloak cost no power to operate, and created multipliers for disabled duration based upon what caused the Yautja to decloak."
\ No newline at end of file
diff --git a/html/changelogs/AutoChangeLog-pr-3764.yml b/html/changelogs/AutoChangeLog-pr-3764.yml
deleted file mode 100644
index ecb789daaf91..000000000000
--- a/html/changelogs/AutoChangeLog-pr-3764.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-author: "ghostsheet"
-delete-after: True
-changes:
- - rscadd: "Large General Pouch has stricter restriction against internal boxes."
- - rscadd: "Large General Pouch no longer restricted to 1 medium item."
- - rscadd: "Large General Pouch added to REQ."
- - rscadd: "Shuffled REQ pouch order into Meds, Engi, Misc, Ammo."
\ No newline at end of file
diff --git a/html/changelogs/AutoChangeLog-pr-3783.yml b/html/changelogs/AutoChangeLog-pr-3783.yml
deleted file mode 100644
index 1d995da56001..000000000000
--- a/html/changelogs/AutoChangeLog-pr-3783.yml
+++ /dev/null
@@ -1,16 +0,0 @@
-author: "realforest2001"
-delete-after: True
-changes:
- - rscadd: "Adds functional maintenance ticket control to the Apollo Console"
- - rscadd: "Adds a unique ID system for each ticket. Credit to Ben10083 for the idea."
- - rscadd: "Adds procs for vents to spew gas within a radius. Not currently usable without proccall."
- - code_imp: "Starts work on Access Tickets."
- - code_imp: "START of contribs from Ben10083"
- - rscadd: "ARES now announces when Bioscan fails."
- - code_imp: "new procs to see if ARES can talk, or log something. Bioscan proc renamed for consistency."
- - admin: "Admins can now force an ARES announcement or communication if subsystem is offline."
- - rscadd: "new emergency protocol from ARES; call General Quarters, which sets the ship to immediate Red Alert."
- - rscadd: "New APOLLO maintenance ticket categories; Janitorial and Support. Fire now a priority ticket"
- - qol: "Claimed APOLLO tickets can be unclaimed"
- - qol: "APOLLO tickets can be rejected/completed if unclaimed by any Working Joe"
- - code_imp: "END of contribs from Ben10083"
\ No newline at end of file
diff --git a/html/changelogs/AutoChangeLog-pr-3868.yml b/html/changelogs/AutoChangeLog-pr-3868.yml
deleted file mode 100644
index 4bd11e9a6b0e..000000000000
--- a/html/changelogs/AutoChangeLog-pr-3868.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-author: "MarpleJones, ihatethisengine2"
-delete-after: True
-changes:
- - rscadd: "Added new sprites for the Eggsac Carrier. Includes an additional death sound for the eggsac bursting."
- - rscadd: "Added a hive announcement for when a Carrier dies with eggs."
- - bugfix: "Carrier egg drop chance upon death now works as intended."
\ No newline at end of file
diff --git a/html/changelogs/AutoChangeLog-pr-3925.yml b/html/changelogs/AutoChangeLog-pr-3925.yml
new file mode 100644
index 000000000000..0b5bfc0792f9
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-3925.yml
@@ -0,0 +1,4 @@
+author: "Drathek"
+delete-after: True
+changes:
+ - code_imp: "Bump alternate 515 testing to byond 1610"
\ No newline at end of file
diff --git a/html/changelogs/AutoChangeLog-pr-3939.yml b/html/changelogs/AutoChangeLog-pr-3939.yml
deleted file mode 100644
index 97bac6e085de..000000000000
--- a/html/changelogs/AutoChangeLog-pr-3939.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-author: "Morrow"
-delete-after: True
-changes:
- - rscadd: "Added lesser drones"
\ No newline at end of file
diff --git a/html/changelogs/AutoChangeLog-pr-3949.yml b/html/changelogs/AutoChangeLog-pr-3949.yml
deleted file mode 100644
index eca0cae6dc4a..000000000000
--- a/html/changelogs/AutoChangeLog-pr-3949.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-author: "Morrow"
-delete-after: True
-changes:
- - bugfix: "Stops multiple facehuggers spawning from one client"
\ No newline at end of file
diff --git a/html/changelogs/AutoChangeLog-pr-3964.yml b/html/changelogs/AutoChangeLog-pr-3964.yml
deleted file mode 100644
index ccd54d9eda5f..000000000000
--- a/html/changelogs/AutoChangeLog-pr-3964.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-author: "Drathek"
-delete-after: True
-changes:
- - bugfix: "Fix bodybags not accepting warm (recent) dead bodies even if unreviveable"
\ No newline at end of file
diff --git a/html/changelogs/AutoChangeLog-pr-3975.yml b/html/changelogs/AutoChangeLog-pr-3975.yml
deleted file mode 100644
index 6f871b20bbb6..000000000000
--- a/html/changelogs/AutoChangeLog-pr-3975.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-author: "Drathek"
-delete-after: True
-changes:
- - bugfix: "Fixed ability deactivation and late join current slot toggles not persisting."
- - bugfix: "Toggle the Ability to Hurt Yourself now says On when you can hurt yourself."
\ No newline at end of file
diff --git a/html/changelogs/AutoChangeLog-pr-3995.yml b/html/changelogs/AutoChangeLog-pr-3995.yml
new file mode 100644
index 000000000000..eae87e01edc0
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-3995.yml
@@ -0,0 +1,4 @@
+author: "Ben10083"
+delete-after: True
+changes:
+ - ui: "Xenos (and others) now see comms relays on minimap"
\ No newline at end of file
diff --git a/html/changelogs/archive/2023-07.yml b/html/changelogs/archive/2023-07.yml
index 99120b3a13c4..00e6cd9556fc 100644
--- a/html/changelogs/archive/2023-07.yml
+++ b/html/changelogs/archive/2023-07.yml
@@ -409,3 +409,142 @@
indestructible blast doors.
Morrow:
- bugfix: Fixes wood window numbering
+2023-07-26:
+ BeagleGaming1:
+ - code_imp: Changed squad color code from a list to a variable
+ - rscadd: How long disarm stuns for depends on the difference in CQC skill between
+ the participants
+ - bugfix: CQC properly affects disarm chance again
+ Ben10083:
+ - rscadd: You can now petition High Command via ARES for a nuclear device, bypassing
+ techweb (If you can convince them, that is.)
+ - admin: Implemented Admin side of ARES Nuke request to allow for granting of different
+ nuke types, or denying the request.
+ - bugfix: Working Joes no longer spawn meat when butchered by Abominations
+ - bugfix: Synthetics now are butchered into synthflesh when butchered by Abominations
+ - rscadd: special meat subtype 'synthflesh' if Synthetics get butchered. Uses same
+ recipes as synthmeat
+ - imageadd: synthflesh sprite
+ - bugfix: Non-techweb nuke now works properly.
+ - ui: Nuke timers now use minutes instead of seconds
+ - spellcheck: Nukes renamed to 'Encrypted' and 'Decrypted' nuke respectively.
+ - admin: Ability to spawn nuke added to event panel
+ - rscadd: Infection gamemode announcement fixed and adjusts for each map, like Distress
+ Signal
+ - code_imp: elements of distress signal post_setup code moved to parent to be called
+ by all gamemodes
+ - balance: Xenomorphs lose their hiding ability for 2 seconds after a melee attack.
+ 0.5 second cooldown applied to hide ability.
+ - balance: Carriers with Eggsac strain can now place eggs on regular weeds.
+ - bugfix: Extra egg planting range now properly applied for Eggsac strain and Queen
+ on ovi
+ - qol: Eggsac Carriers now notified when they generate a egg.
+ - code_imp: new variable to xenomorphs to dictate egg planting distance, and removal
+ of unused procs
+ - balance: LVL-624 Robotics Dome operating table replaced with bioprinter.
+ BraveMole, Zonespace:
+ - bugfix: Smartgunners can no longer shoot their smartgun while aghosted
+ - balance: The Uzi and Mac-15 now have full-auto
+ Drathek:
+ - bugfix: Fixed xeno hide ability not checking for busy status.
+ - bugfix: Fix bodybags not accepting warm (recent) dead bodies even if unreviveable
+ - code_imp: Added additional lints to dmi/test.py to test for duplicate state names
+ and excessive quantity and added another type path to the missing_icons unit_test.
+ - imageadd: Renamed and moved some icons around to comply with new testing.
+ - bugfix: Fixed ability deactivation and late join current slot toggles not persisting.
+ - bugfix: Toggle the Ability to Hurt Yourself now says On when you can hurt yourself.
+ - bugfix: Fix huggers not retaining at least their old death value.
+ - rscadd: Added the debug verb Mass-Screenshot and a python script MapTileImageTool
+ to combine those images into a single full image map.
+ Hopek:
+ - rscadd: Changed the description flavortext of the fountain pen to match the new
+ lore. There is now a laser engraving of the owner on the pen itself.
+ - rscadd: Added a detailed lore description for the fountain pen.
+ Katskan:
+ - bugfix: Fixed synthetics getting an extra 45 points more than any previous who
+ had used the gadget vendor
+ MarpleJones, ihatethisengine2:
+ - rscadd: Added new sprites for the Eggsac Carrier. Includes an additional death
+ sound for the eggsac bursting.
+ - rscadd: Added a hive announcement for when a Carrier dies with eggs.
+ - bugfix: Carrier egg drop chance upon death now works as intended.
+ Morrow:
+ - bugfix: Stops multiple facehuggers spawning from one client
+ - rscadd: Added lesser drones
+ QuickLode:
+ - rscadd: Radio titles for W-Y prepositioned Synthetics
+ - qol: Swaps PMC Synthetic autocompressor for a crew monitor to facilitate search
+ and rescue.
+ - bugfix: fixes PMC Synthetic ID & removes redundant graft
+ Zonespace27:
+ - bugfix: Welding goggles are no longer marked as "mandatory" in comtech vendors
+ blackdragonTOW:
+ - rscadd: Added unique, faction dependent music to Round End in the event that Xenos
+ lose post hijack.
+ ghostsheet:
+ - rscadd: Large General Pouch has stricter restriction against internal boxes.
+ - rscadd: Large General Pouch no longer restricted to 1 medium item.
+ - rscadd: Large General Pouch added to REQ.
+ - rscadd: Shuffled REQ pouch order into Meds, Engi, Misc, Ammo.
+ - rscadd: Tents can be destroyed with an E-tool.
+ - rscadd: Tents are now in their respective department, Big tent is now in Bravo
+ Bunks.
+ - rscadd: You can no longer stand behind a tent.
+ - bugfix: Xenos can now slash tents from the side.
+ - bugfix: Tents no longer randomly block bullets.
+ - bugfix: Staying inside a tent when it is destroyed no longer give your permanent
+ see-through roof vision.
+ ihatethisengine:
+ - balance: early pod launch now has a 75% chance of crashing, launch after the timer
+ has a 25% chance.
+ - rscadd: CL's pod has a 25% chance of crashing on early launch and only 5% otherwise.
+ - rscadd: xenos can slash and melt manually locked pod's doors.
+ - bugfix: fixed behavior_immobile flag using wrong number
+ realforest2001:
+ - rscadd: Adds a plasma breaching charge that detonates a plasma wave stunning those
+ opposite it.
+ - rscadd: Adds the name of the tracked item to the Yautja gear tracker.
+ - rscadd: Added an alternate mode for the Plasma Pistol and moved the incendiary
+ property to it.
+ - rscadd: Added MINIMAP_FLAG_ALL to Yautja globe map.
+ - rscadd: Adds functional maintenance ticket control to the Apollo Console
+ - rscadd: Adds a unique ID system for each ticket. Credit to Ben10083 for the idea.
+ - rscadd: Adds procs for vents to spew gas within a radius. Not currently usable
+ without proccall.
+ - code_imp: Starts work on Access Tickets.
+ - code_imp: START of contribs from Ben10083
+ - rscadd: ARES now announces when Bioscan fails.
+ - code_imp: new procs to see if ARES can talk, or log something. Bioscan proc renamed
+ for consistency.
+ - admin: Admins can now force an ARES announcement or communication if subsystem
+ is offline.
+ - rscadd: new emergency protocol from ARES; call General Quarters, which sets the
+ ship to immediate Red Alert.
+ - rscadd: New APOLLO maintenance ticket categories; Janitorial and Support. Fire
+ now a priority ticket
+ - qol: Claimed APOLLO tickets can be unclaimed
+ - qol: APOLLO tickets can be rejected/completed if unclaimed by any Working Joe
+ - code_imp: END of contribs from Ben10083
+ - code_imp: Changes /datum/rank to /datum/yautja_rank to be clearer on what it is
+ used for.
+ - rscadd: Added access defines for Yautja ship.
+ - rscadd: Added rank identifiers on Yautja equipment presets to help set access
+ levels on their bracer chips.
+ - maptweak: Changed the doors on the Yautja ship to be their own subtypes, with
+ certain ones being locked to Yautja or certain Yautja Ranks.
+ - code_imp: Slightly modernised obj/proc/allowed, and also made it check for access
+ on bracer chips if present.
+ - maptweak: Replaced the unworthy prey section of the Yautja Ship with a secondary
+ armory for plasma rifles, however the door is inaccessible to most Yautja. Intended
+ to make it a bit less obvious admins are spawning them in for the rare times
+ they're used/necessary.
+ - maptweak: Above armory will automatically open if an Abomination is detected.
+ - maptweak: Reduces amount of herbs on the Yautja Ship.
+ - maptweak: Fixes the "Consoles" orientation in the Yautja flight deck.
+ - rscadd: Allowed Falcon Drones to relay speech back to their operators.
+ - rscadd: Made Yautja cloak cost no power to operate, and created multipliers for
+ disabled duration based upon what caused the Yautja to decloak.
+ - rscadd: Added a toggle for Yautja bracer lock. This also works with the same mechanic
+ of SDing another Yautja.
+ - rscadd: Added a message to all Yautja if an SD is cancelled.
+ - ui: Adds a UI panel for Yautja emotes, all credit to Zonespace.
diff --git a/icons/mob/hud/human_old.dmi b/icons/mob/hud/human_old.dmi
index 194206d4de16..e8b682c7c831 100644
Binary files a/icons/mob/hud/human_old.dmi and b/icons/mob/hud/human_old.dmi differ
diff --git a/icons/mob/humans/onmob/items_lefthand_0.dmi b/icons/mob/humans/onmob/items_lefthand_0.dmi
index 676920e0bac0..1f154ef92396 100644
Binary files a/icons/mob/humans/onmob/items_lefthand_0.dmi and b/icons/mob/humans/onmob/items_lefthand_0.dmi differ
diff --git a/icons/mob/humans/onmob/items_lefthand_1.dmi b/icons/mob/humans/onmob/items_lefthand_1.dmi
index b149c4ea872b..d65bcccc02af 100644
Binary files a/icons/mob/humans/onmob/items_lefthand_1.dmi and b/icons/mob/humans/onmob/items_lefthand_1.dmi differ
diff --git a/icons/mob/humans/onmob/items_righthand_0.dmi b/icons/mob/humans/onmob/items_righthand_0.dmi
index a380e5eb73f4..858da88c29ed 100644
Binary files a/icons/mob/humans/onmob/items_righthand_0.dmi and b/icons/mob/humans/onmob/items_righthand_0.dmi differ
diff --git a/icons/mob/humans/onmob/items_righthand_1.dmi b/icons/mob/humans/onmob/items_righthand_1.dmi
index 70fa3a73fbc5..f9b5350d6a7b 100644
Binary files a/icons/mob/humans/onmob/items_righthand_1.dmi and b/icons/mob/humans/onmob/items_righthand_1.dmi differ
diff --git a/icons/obj/items/food.dmi b/icons/obj/items/food.dmi
index 6e2c86aa4999..3c2e963e3804 100644
Binary files a/icons/obj/items/food.dmi and b/icons/obj/items/food.dmi differ
diff --git a/icons/obj/structures/props/rocks.dmi b/icons/obj/structures/props/rocks.dmi
index e494bdcba2f8..71ea709c771f 100644
Binary files a/icons/obj/structures/props/rocks.dmi and b/icons/obj/structures/props/rocks.dmi differ
diff --git a/icons/rebase_icons.dmi b/icons/rebase_icons.dmi
index 2d394cef793d..6b0a25a1f7e6 100644
Binary files a/icons/rebase_icons.dmi and b/icons/rebase_icons.dmi differ
diff --git a/icons/turf/floors/desert_dirt.dmi b/icons/turf/floors/desert_dirt.dmi
index e153917e708a..ed6c57cc1809 100644
Binary files a/icons/turf/floors/desert_dirt.dmi and b/icons/turf/floors/desert_dirt.dmi differ
diff --git a/icons/turf/floors/desert_rock.dmi b/icons/turf/floors/desert_rock.dmi
index 8cbd01e3cec1..79a33d83257f 100644
Binary files a/icons/turf/floors/desert_rock.dmi and b/icons/turf/floors/desert_rock.dmi differ
diff --git a/maps/map_files/LV624/LV624.dmm b/maps/map_files/LV624/LV624.dmm
index b84ed33ef0e4..a8aac22505c8 100644
--- a/maps/map_files/LV624/LV624.dmm
+++ b/maps/map_files/LV624/LV624.dmm
@@ -4877,7 +4877,9 @@
/turf/open/gm/coast/beachcorner/north_west,
/area/lv624/ground/jungle/west_jungle)
"ayj" = (
-/obj/structure/machinery/optable,
+/obj/structure/machinery/bioprinter{
+ stored_metal = 1000
+ },
/obj/structure/machinery/light/small{
dir = 4
},
diff --git a/maps/map_files/USS_Almayer/USS_Almayer.dmm b/maps/map_files/USS_Almayer/USS_Almayer.dmm
index 0e5546879dcb..80262ec61937 100644
--- a/maps/map_files/USS_Almayer/USS_Almayer.dmm
+++ b/maps/map_files/USS_Almayer/USS_Almayer.dmm
@@ -5938,6 +5938,7 @@
/obj/item/device/radio/marine,
/obj/item/device/radio/marine,
/obj/item/device/radio/marine,
+/obj/item/folded_tent/cmd,
/turf/open/floor/almayer{
icon_state = "redfull"
},
@@ -15896,6 +15897,10 @@
desc = "Someone has crossed out the Space from Space Cleaner and written in Surgery. 'Do not remove under punishment of death!!!' is scrawled on the back.";
name = "Surgery Cleaner"
},
+/obj/item/folded_tent/med{
+ pixel_x = -8;
+ pixel_y = 14
+ },
/turf/open/floor/almayer{
dir = 8;
icon_state = "sterile_green_corner"
@@ -29660,11 +29665,6 @@
pixel_x = 9
},
/obj/item/reagent_container/pill/happy,
-/obj/item/stack/tile/plasteel{
- layer = 2.5;
- pixel_x = -8;
- pixel_y = 4
- },
/obj/item/clothing/glasses/disco_fever{
pixel_x = -3;
pixel_y = -2
@@ -37958,18 +37958,6 @@
icon_state = "plate"
},
/area/almayer/hallways/vehiclehangar)
-"gCu" = (
-/obj/structure/disposalpipe/segment{
- dir = 8
- },
-/obj/structure/pipes/standard/simple/hidden/supply{
- dir = 4
- },
-/obj/item/folded_tent/cmd,
-/turf/open/floor/almayer{
- icon_state = "plating_striped"
- },
-/area/almayer/squads/req)
"gCw" = (
/obj/item/reagent_container/food/drinks/cans/beer{
pixel_x = 10
@@ -40122,18 +40110,6 @@
/obj/structure/pipes/standard/manifold/hidden/supply,
/turf/open/floor/plating/plating_catwalk,
/area/almayer/hallways/hangar)
-"hBP" = (
-/obj/structure/disposalpipe/segment{
- dir = 8
- },
-/obj/structure/pipes/standard/simple/hidden/supply{
- dir = 4
- },
-/obj/item/folded_tent/med,
-/turf/open/floor/almayer{
- icon_state = "plating_striped"
- },
-/area/almayer/squads/req)
"hBU" = (
/obj/structure/largecrate/random/secure,
/obj/effect/decal/warning_stripes{
@@ -42135,8 +42111,9 @@
/area/almayer/squads/delta)
"ixN" = (
/obj/structure/largecrate,
-/obj/item/prop/almayer/handheld1{
- pixel_y = 12
+/obj/item/folded_tent/reqs{
+ pixel_x = -3;
+ pixel_y = 10
},
/turf/open/floor/almayer{
icon_state = "test_floor4"
@@ -57166,18 +57143,6 @@
icon_state = "green"
},
/area/almayer/hallways/aft_hallway)
-"pvF" = (
-/obj/structure/disposalpipe/segment{
- dir = 8
- },
-/obj/structure/pipes/standard/simple/hidden/supply{
- dir = 4
- },
-/obj/item/folded_tent/reqs,
-/turf/open/floor/almayer{
- icon_state = "plating_striped"
- },
-/area/almayer/squads/req)
"pvJ" = (
/obj/structure/disposalpipe/segment{
dir = 4
@@ -71715,18 +71680,6 @@
icon_state = "plate"
},
/area/almayer/living/grunt_rnr)
-"vSr" = (
-/obj/structure/disposalpipe/segment{
- dir = 8
- },
-/obj/structure/pipes/standard/simple/hidden/supply{
- dir = 4
- },
-/obj/item/folded_tent/big,
-/turf/open/floor/almayer{
- icon_state = "plating_striped"
- },
-/area/almayer/squads/req)
"vSE" = (
/obj/structure/closet/secure_closet/personal,
/turf/open/floor/almayer{
@@ -74846,12 +74799,17 @@
desc = "A supply crate containing everything you need to stop a CLF uprising.";
name = "\improper USCM crate 'FOB supplies'"
},
-/obj/item/storage/box/mousetraps{
- pixel_y = 12
- },
/obj/structure/sign/arcturianstopsign{
pixel_y = 32
},
+/obj/item/folded_tent/big{
+ pixel_y = 10;
+ pixel_x = -6
+ },
+/obj/item/storage/box/mousetraps{
+ pixel_y = 12;
+ pixel_x = 3
+ },
/turf/open/floor/almayer{
icon_state = "plate"
},
@@ -119397,7 +119355,7 @@ bEi
bZr
bmD
ngw
-gCu
+pjG
boz
bpR
bpR
@@ -119600,7 +119558,7 @@ brp
bZr
bmD
xId
-hBP
+pjG
boz
bpR
bpR
@@ -120006,7 +119964,7 @@ buz
bZr
bmD
dmE
-pvF
+pjG
boz
bpR
bpR
@@ -120209,7 +120167,7 @@ bEm
bZr
bmD
hAc
-vSr
+pjG
boz
bpR
bpR
diff --git a/maps/predship/huntership.dmm b/maps/predship/huntership.dmm
index 6a129b6f8cfe..5680271c4df2 100644
--- a/maps/predship/huntership.dmm
+++ b/maps/predship/huntership.dmm
@@ -195,7 +195,7 @@
},
/area/yautja)
"ar" = (
-/obj/structure/machinery/door/airlock/strata/autoname{
+/obj/structure/machinery/door/airlock/yautja/secure{
dir = 1;
name = "\improper Wargear Storage"
},
@@ -407,7 +407,7 @@
},
/area/yautja)
"aP" = (
-/obj/structure/machinery/door/airlock/strata/autoname{
+/obj/structure/machinery/door/airlock/yautja{
dir = 1;
name = "\improper Trophy Room"
},
@@ -427,7 +427,7 @@
},
/area/yautja)
"aT" = (
-/obj/structure/machinery/door/airlock/strata/autoname{
+/obj/structure/machinery/door/airlock/yautja{
name = "\improper Operation Room"
},
/turf/open/shuttle/predship,
@@ -486,6 +486,10 @@
/obj/structure/pipes/standard/simple/hidden{
dir = 4
},
+/obj/structure/machinery/computer/crew/alt{
+ faction = "Yautja";
+ pixel_y = 24
+ },
/turf/open/floor/corsat{
dir = 1;
icon_state = "squareswood"
@@ -505,7 +509,7 @@
/turf/open/floor/light,
/area/yautja)
"be" = (
-/obj/structure/machinery/door/airlock/strata/autoname{
+/obj/structure/machinery/door/airlock/yautja{
name = "\improper Blooded Teleporter"
},
/turf/open/floor/strata{
@@ -531,13 +535,13 @@
/turf/closed/wall/huntership,
/area/yautja)
"bl" = (
-/obj/structure/machinery/door/airlock/strata/autoname{
+/obj/structure/machinery/door/airlock/yautja{
name = "\improper Starboard Wing"
},
/turf/open/shuttle/predship,
/area/yautja)
"bm" = (
-/obj/structure/machinery/door/airlock/strata/autoname{
+/obj/structure/machinery/door/airlock/yautja{
name = "\improper Port Wing"
},
/turf/open/shuttle/predship,
@@ -566,7 +570,7 @@
},
/area/yautja)
"bp" = (
-/obj/structure/machinery/door/airlock/strata/autoname{
+/obj/structure/machinery/door/airlock/yautja/secure{
dir = 1;
name = "\improper Research Chamber"
},
@@ -600,7 +604,7 @@
},
/area/yautja)
"bu" = (
-/obj/structure/machinery/door/airlock/strata/autoname{
+/obj/structure/machinery/door/airlock/yautja/secure{
dir = 1;
name = "\improper Burial Room"
},
@@ -618,7 +622,7 @@
/turf/open/shuttle/predship,
/area/yautja)
"bx" = (
-/obj/structure/machinery/door/airlock/strata/autoname{
+/obj/structure/machinery/door/airlock/yautja{
dir = 1;
name = "\improper Storage Chamber"
},
@@ -680,10 +684,11 @@
},
/area/yautja)
"bD" = (
-/obj/structure/machinery/door/airlock/strata/autoname{
+/obj/structure/machinery/door/airlock/yautja/secure{
dir = 1;
- name = "\improper Unworthy Prey"
+ name = "\improper Heavy Armory"
},
+/obj/structure/machinery/door/poddoor/shutters/almayer/yautja,
/turf/open/shuttle/predship,
/area/yautja)
"bE" = (
@@ -697,7 +702,7 @@
},
/area/yautja)
"bG" = (
-/obj/structure/machinery/door/airlock/strata/autoname{
+/obj/structure/machinery/door/airlock/yautja{
name = "\improper Cooler Room"
},
/turf/open/shuttle/predship,
@@ -749,13 +754,9 @@
/turf/open/shuttle/predship,
/area/yautja)
"bN" = (
-/obj/structure/kitchenspike{
- icon_state = "spikebloodygreen"
- },
-/obj/effect/decal/cleanable/blood/gibs/xeno/body,
-/turf/open/floor/strata{
- color = "#5e5d5d";
- icon_state = "multi_tiles"
+/turf/closed/wall/cult{
+ hull = 1;
+ name = "runed hull"
},
/area/yautja)
"bO" = (
@@ -781,16 +782,6 @@
icon_state = "squareswood"
},
/area/yautja)
-"bR" = (
-/obj/structure/kitchenspike{
- icon_state = "spikebloody"
- },
-/obj/effect/decal/cleanable/blood/gibs,
-/turf/open/floor/strata{
- color = "#5e5d5d";
- icon_state = "multi_tiles"
- },
-/area/yautja)
"bS" = (
/obj/structure/pipes/standard/simple/hidden{
dir = 9
@@ -802,7 +793,8 @@
id = "Cell Lockdown 1";
name = "Cell Lockdown 1";
pixel_x = -25;
- pixel_y = 9
+ pixel_y = 9;
+ req_one_access_txt = "250;251;252"
},
/turf/open/shuttle/predship,
/area/yautja)
@@ -811,12 +803,13 @@
id = "Cell Lockdown 4";
name = "Cell Lockdown 4";
pixel_x = -7;
- pixel_y = 9
+ pixel_y = 9;
+ req_one_access_txt = "250;251;252"
},
/turf/closed/wall/huntership,
/area/yautja)
"bW" = (
-/obj/structure/machinery/door/airlock/strata/autoname{
+/obj/structure/machinery/door/airlock/yautja/secure{
name = "\improper Prisoner Cell 1";
opacity = 0
},
@@ -828,7 +821,7 @@
/turf/open/shuttle/predship,
/area/yautja)
"bX" = (
-/obj/structure/machinery/door/airlock/strata/autoname{
+/obj/structure/machinery/door/airlock/yautja/secure{
name = "\improper Prisoner Cell 4";
opacity = 0
},
@@ -865,7 +858,8 @@
id = "Cell Lockdown 2";
name = "Cell Lockdown 2";
pixel_x = -25;
- pixel_y = 9
+ pixel_y = 9;
+ req_one_access_txt = "250;251;252"
},
/turf/open/shuttle/predship,
/area/yautja)
@@ -889,7 +883,7 @@
},
/area/yautja)
"ce" = (
-/obj/structure/machinery/door/airlock/strata/autoname{
+/obj/structure/machinery/door/airlock/yautja/secure{
name = "\improper Prisoner Cell 2";
opacity = 0
},
@@ -901,7 +895,7 @@
/turf/open/shuttle/predship,
/area/yautja)
"cf" = (
-/obj/structure/machinery/door/airlock/strata/autoname{
+/obj/structure/machinery/door/airlock/yautja/secure{
name = "\improper Prisoner Cell 5";
opacity = 0
},
@@ -917,7 +911,8 @@
id = "Cell Lockdown 3";
name = "Cell Lockdown 3";
pixel_x = -25;
- pixel_y = 9
+ pixel_y = 9;
+ req_one_access_txt = "250;251;252"
},
/turf/open/shuttle/predship,
/area/yautja)
@@ -926,7 +921,8 @@
id = "Cell Lockdown 6";
name = "Cell Lockdown 6";
pixel_x = -7;
- pixel_y = 9
+ pixel_y = 9;
+ req_one_access_txt = "250;251;252"
},
/turf/closed/wall/huntership,
/area/yautja)
@@ -948,7 +944,7 @@
},
/area/yautja)
"cm" = (
-/obj/structure/machinery/door/airlock/strata/autoname{
+/obj/structure/machinery/door/airlock/yautja/secure{
name = "\improper Prisoner Cell 3";
opacity = 0
},
@@ -960,7 +956,7 @@
/turf/open/shuttle/predship,
/area/yautja)
"cn" = (
-/obj/structure/machinery/door/airlock/strata/autoname{
+/obj/structure/machinery/door/airlock/yautja/secure{
name = "\improper Prisoner Cell 6";
opacity = 0
},
@@ -1002,7 +998,7 @@
/turf/open/shuttle/predship,
/area/yautja)
"ct" = (
-/obj/structure/machinery/door/airlock/strata/autoname{
+/obj/structure/machinery/door/airlock/yautja{
dir = 1;
name = "\improper Fore Rooms"
},
@@ -1106,7 +1102,7 @@
},
/area/yautja)
"cA" = (
-/obj/structure/machinery/door/airlock/strata/autoname{
+/obj/structure/machinery/door/airlock/yautja{
name = "\improper Elder Teleporter"
},
/turf/open/floor/corsat{
@@ -1115,9 +1111,9 @@
},
/area/yautja)
"cB" = (
-/obj/structure/machinery/door/airlock/strata/autoname{
+/obj/structure/machinery/door/airlock/yautja/secure{
dir = 1;
- name = "\improper Navigation Chamber"
+ name = "\improper Control Center"
},
/turf/open/shuttle/predship,
/area/yautja)
@@ -1136,7 +1132,7 @@
},
/area/yautja)
"cF" = (
-/obj/structure/machinery/door/airlock/strata/autoname{
+/obj/structure/machinery/door/airlock/yautja{
dir = 1;
name = "\improper Engine Room"
},
@@ -1499,7 +1495,7 @@
},
/area/yautja)
"dc" = (
-/obj/structure/machinery/door/airlock/strata/autoname{
+/obj/structure/machinery/door/airlock/yautja/secure{
dir = 1;
name = "\improper Research Containment"
},
@@ -1591,7 +1587,8 @@
id = "Cell Lockdown 5";
name = "Cell Lockdown 5";
pixel_x = -7;
- pixel_y = 9
+ pixel_y = 9;
+ req_one_access_txt = "250;251;252"
},
/turf/closed/wall/huntership,
/area/yautja)
@@ -1669,6 +1666,24 @@
/obj/structure/machinery/cryopod,
/turf/open/shuttle/predship,
/area/yautja)
+"fo" = (
+/obj/structure/surface/table/reinforced/prison{
+ color = "#6b675e"
+ },
+/obj/structure/window/reinforced{
+ dir = 4;
+ health = 80
+ },
+/obj/structure/window/reinforced{
+ dir = 8;
+ health = 80
+ },
+/obj/item/storage/box/bracer,
+/turf/open/floor/corsat{
+ dir = 1;
+ icon_state = "squareswood"
+ },
+/area/yautja)
"fq" = (
/obj/structure/window/framed/colony/reinforced/hull{
color = "#aba9a9"
@@ -1727,19 +1742,39 @@
},
/area/yautja)
"gb" = (
-/obj/item/reagent_container/blood/OMinus,
-/obj/item/reagent_container/blood/OMinus,
-/obj/item/reagent_container/blood/OMinus,
-/obj/item/reagent_container/blood/OMinus,
-/obj/item/reagent_container/blood/OMinus,
-/obj/item/reagent_container/blood/OMinus,
-/obj/item/reagent_container/blood/OMinus,
-/obj/item/reagent_container/blood/OMinus,
-/obj/item/reagent_container/blood/OMinus,
-/obj/item/reagent_container/blood/OMinus,
/obj/structure/closet/crate{
color = "#6b675e"
},
+/obj/item/stack/medical/advanced/bruise_pack/predator{
+ pixel_x = 6
+ },
+/obj/item/stack/medical/advanced/bruise_pack/predator{
+ pixel_x = 6
+ },
+/obj/item/stack/medical/advanced/bruise_pack/predator{
+ pixel_x = 6
+ },
+/obj/item/stack/medical/advanced/bruise_pack/predator{
+ pixel_x = 6
+ },
+/obj/item/stack/medical/advanced/bruise_pack/predator{
+ pixel_x = 6
+ },
+/obj/item/stack/medical/advanced/ointment/predator{
+ pixel_x = -6
+ },
+/obj/item/stack/medical/advanced/ointment/predator{
+ pixel_x = -6
+ },
+/obj/item/stack/medical/advanced/ointment/predator{
+ pixel_x = -6
+ },
+/obj/item/stack/medical/advanced/ointment/predator{
+ pixel_x = -6
+ },
+/obj/item/stack/medical/advanced/ointment/predator{
+ pixel_x = -6
+ },
/turf/open/floor/strata{
color = "#5e5d5d";
icon_state = "multi_tiles"
@@ -1753,30 +1788,31 @@
},
/area/yautja)
"gr" = (
-/obj/structure/surface/table/reinforced/prison{
- color = "#6b675e"
- },
-/obj/item/weapon/unathiknife,
-/obj/item/weapon/unathiknife{
- attack_speed = 12;
- force = 25
+/obj/structure/closet/crate/secure{
+ req_one_access_txt = "252";
+ color = "#6b675e";
+ name = "Secure Yautja crate"
},
+/obj/item/explosive/grenade/spawnergrenade/hellhound,
+/obj/item/explosive/grenade/spawnergrenade/hellhound,
+/obj/item/explosive/grenade/spawnergrenade/hellhound,
+/obj/item/explosive/grenade/spawnergrenade/hellhound,
/turf/open/floor/strata{
color = "#5e5d5d";
icon_state = "multi_tiles"
},
/area/yautja)
"gG" = (
-/obj/structure/surface/table/reinforced/prison{
- color = "#6b675e"
+/obj/structure/machinery/door_control{
+ id = "Yautja Armory";
+ name = "Armory Shutters";
+ pixel_x = 24;
+ req_one_access_txt = "252";
+ needs_power = 0
},
-/obj/item/tool/surgery/FixOVein/predatorFixOVein,
-/obj/item/tool/surgery/bonegel/predatorbonegel,
-/obj/item/tool/surgery/bonesetter/predatorbonesetter,
-/obj/item/tool/surgery/surgicaldrill/predatorsurgicaldrill,
-/turf/open/floor/strata{
- color = "#5e5d5d";
- icon_state = "multi_tiles"
+/turf/open/floor/corsat{
+ dir = 1;
+ icon_state = "squareswood"
},
/area/yautja)
"ha" = (
@@ -1931,13 +1967,6 @@
},
/area/yautja)
"nh" = (
-/obj/item/storage/box/bracer{
- pixel_y = 16
- },
-/obj/item/storage/box/bracer{
- pixel_y = 8
- },
-/obj/item/storage/box/bracer,
/obj/structure/surface/rack{
color = "#6b675e";
layer = 2.79
@@ -2123,7 +2152,7 @@
},
/area/yautja)
"sV" = (
-/obj/structure/machinery/door/airlock/strata/autoname{
+/obj/structure/machinery/door/airlock/yautja{
dir = 1;
name = "\improper Feed Hall"
},
@@ -2180,6 +2209,24 @@
icon_state = "squareswood"
},
/area/yautja)
+"tR" = (
+/obj/structure/surface/table/reinforced/prison{
+ color = "#6b675e"
+ },
+/obj/structure/window/reinforced{
+ dir = 8;
+ health = 80
+ },
+/obj/structure/window/reinforced{
+ dir = 4;
+ health = 80
+ },
+/obj/item/storage/box/bracer,
+/turf/open/floor/corsat{
+ dir = 1;
+ icon_state = "squareswood"
+ },
+/area/yautja)
"uf" = (
/obj/structure/barricade/handrail/strata{
dir = 8
@@ -2375,27 +2422,36 @@
/obj/structure/machinery/cryopod/right,
/turf/open/shuttle/predship,
/area/yautja)
-"Br" = (
-/turf/open/gm/dirtgrassborder{
- icon_state = "desert2"
+"Bg" = (
+/obj/structure/closet/crate/secure{
+ req_one_access_txt = "252";
+ color = "#6b675e";
+ name = "Secure Yautja crate"
},
-/area/yautja)
-"BB" = (
-/obj/structure/machinery/iv_drip,
+/obj/item/weapon/yautja/combistick,
+/obj/item/weapon/yautja/combistick{
+ pixel_x = -4;
+ pixel_y = 4
+ },
+/obj/item/weapon/twohanded/yautja/glaive/alt,
+/obj/item/weapon/yautja/chain,
+/obj/item/weapon/yautja/sword,
+/obj/item/weapon/yautja/scythe,
/turf/open/floor/strata{
color = "#5e5d5d";
icon_state = "multi_tiles"
},
/area/yautja)
+"Br" = (
+/turf/open/gm/dirtgrassborder{
+ icon_state = "desert2"
+ },
+/area/yautja)
"BK" = (
/obj/structure/surface/table/reinforced/prison{
color = "#6b675e"
},
-/obj/item/tool/surgery/cautery/predatorcautery,
-/obj/item/tool/surgery/circular_saw/predatorbonesaw,
-/obj/item/tool/surgery/hemostat/predatorhemostat,
-/obj/item/tool/surgery/retractor/predatorretractor,
-/obj/item/tool/surgery/scalpel/predatorscalpel,
+/obj/item/storage/medicomp/full,
/turf/open/floor/strata{
color = "#5e5d5d";
icon_state = "multi_tiles"
@@ -2460,7 +2516,7 @@
},
/area/yautja)
"Dr" = (
-/obj/structure/machinery/door/airlock/strata/autoname{
+/obj/structure/machinery/door/airlock/yautja/secure{
indestructible = 1;
locked = 1;
name = "\improper External Airlock"
@@ -2488,7 +2544,13 @@
},
/area/yautja)
"DJ" = (
-/obj/structure/machinery/computer/crew,
+/obj/structure/machinery/computer/crew/alt{
+ dir = 1;
+ name = "human monitoring computer"
+ },
+/obj/structure/surface/table/reinforced/prison{
+ color = "#6b675e"
+ },
/turf/open/floor/strata{
color = "#5e5d5d";
icon_state = "multi_tiles"
@@ -2528,13 +2590,12 @@
/obj/structure/surface/table/reinforced/prison{
color = "#6b675e"
},
-/obj/item/bedsheet{
- anchored = 1;
+/obj/structure/showcase{
desc = "A console used by the Hunters for navigation purposes.";
dir = 8;
icon = 'icons/obj/structures/machinery/computer.dmi';
icon_state = "security_cam";
- name = "Hunter Nav Console"
+ name = "Radar Console"
},
/turf/open/floor/strata{
color = "#5e5d5d";
@@ -2555,7 +2616,7 @@
/turf/open/shuttle/predship,
/area/yautja)
"Gd" = (
-/obj/structure/machinery/door/airlock/strata/autoname,
+/obj/structure/machinery/door/airlock/yautja/secure,
/turf/open/shuttle/predship,
/area/yautja)
"Gk" = (
@@ -2624,18 +2685,16 @@
color = "#6b675e";
layer = 2.79
},
-/obj/item/stack/medical/advanced/ointment/predator,
-/obj/item/stack/medical/advanced/ointment/predator,
-/obj/item/stack/medical/advanced/ointment/predator,
-/obj/item/stack/medical/advanced/ointment/predator,
-/obj/item/stack/medical/advanced/ointment/predator,
-/obj/item/stack/medical/advanced/ointment/predator,
-/obj/item/stack/medical/advanced/bruise_pack/predator,
-/obj/item/stack/medical/advanced/bruise_pack/predator,
-/obj/item/stack/medical/advanced/bruise_pack/predator,
-/obj/item/stack/medical/advanced/bruise_pack/predator,
-/obj/item/stack/medical/advanced/bruise_pack/predator,
-/obj/item/stack/medical/advanced/bruise_pack/predator,
+/obj/item/stack/medical/advanced/ointment/predator{
+ pixel_x = 6;
+ desc = "A poultice made of cold, blue petals that is rubbed on burns. Not to be removed from the ship.";
+ name = "arena soothing herbs"
+ },
+/obj/item/stack/medical/advanced/bruise_pack/predator{
+ pixel_x = -6;
+ desc = "A poultice made of soft leaves that is rubbed on bruises. Not to be removed from the ship.";
+ name = "arena mending herbs"
+ },
/turf/open/shuttle/predship,
/area/yautja)
"Hp" = (
@@ -2659,6 +2718,25 @@
icon_state = "squareswood"
},
/area/yautja)
+"HD" = (
+/obj/structure/surface/rack{
+ color = "#6b675e";
+ layer = 2.79;
+ pixel_y = 24;
+ density = 0
+ },
+/obj/item/weapon/gun/energy/yautja/plasmarifle{
+ pixel_y = -8
+ },
+/obj/item/weapon/gun/energy/yautja/plasmarifle,
+/obj/item/weapon/gun/energy/yautja/plasmarifle{
+ pixel_y = 8
+ },
+/turf/open/floor/strata{
+ color = "#5e5d5d";
+ icon_state = "multi_tiles"
+ },
+/area/yautja)
"HN" = (
/obj/structure/surface/table/reinforced/prison{
color = "#6b675e"
@@ -2674,8 +2752,17 @@
},
/area/yautja)
"If" = (
-/obj/structure/machinery/optable,
-/obj/effect/decal/cleanable/blood,
+/obj/structure/surface/rack{
+ color = "#6b675e";
+ layer = 2.79
+ },
+/obj/item/weapon/gun/energy/yautja/plasmapistol{
+ pixel_y = -8
+ },
+/obj/item/weapon/gun/energy/yautja/plasmapistol,
+/obj/item/weapon/gun/energy/yautja/plasmapistol{
+ pixel_y = 8
+ },
/turf/open/floor/strata{
color = "#5e5d5d";
icon_state = "multi_tiles"
@@ -2721,7 +2808,7 @@
},
/area/yautja)
"Iw" = (
-/obj/structure/machinery/door/airlock/strata/autoname{
+/obj/structure/machinery/door/airlock/yautja/secure{
name = "\improper Hellhound Quarters"
},
/turf/open/floor/corsat{
@@ -2730,7 +2817,7 @@
},
/area/yautja)
"IC" = (
-/obj/structure/machinery/door/airlock/strata/autoname{
+/obj/structure/machinery/door/airlock/yautja/secure/elder{
name = "\improper Elder Quarters"
},
/turf/open/shuttle/predship,
@@ -2876,7 +2963,7 @@
},
/area/yautja)
"MI" = (
-/obj/structure/machinery/door/airlock/strata/autoname{
+/obj/structure/machinery/door/airlock/yautja{
name = "\improper Blooded Teleporter"
},
/turf/open/floor/strata{
@@ -2930,7 +3017,7 @@
},
/area/yautja)
"Pr" = (
-/obj/structure/machinery/door/airlock/strata/autoname{
+/obj/structure/machinery/door/airlock/yautja/secure{
name = "\improper Research Containment"
},
/turf/open/floor/strata{
@@ -3074,13 +3161,12 @@
/obj/structure/surface/table/reinforced/prison{
color = "#6b675e"
},
-/obj/item/bedsheet{
- anchored = 1;
+/obj/structure/showcase{
desc = "A console used by the Hunters for navigation purposes.";
dir = 4;
icon = 'icons/obj/structures/machinery/computer.dmi';
icon_state = "security_cam";
- name = "Hunter Nav Console"
+ name = "Radar Console"
},
/turf/open/floor/strata{
color = "#5e5d5d";
@@ -3110,7 +3196,7 @@
/turf/open/shuttle/predship,
/area/yautja)
"Wg" = (
-/obj/structure/machinery/door/airlock/strata/autoname{
+/obj/structure/machinery/door/airlock/yautja{
dir = 1;
name = "\improper Gladiator Hall"
},
@@ -3198,7 +3284,7 @@
},
/area/yautja)
"YL" = (
-/obj/structure/machinery/door/airlock/strata/autoname{
+/obj/structure/machinery/door/airlock/yautja{
dir = 1;
name = "\improper Cryo Room"
},
@@ -3214,8 +3300,11 @@
/turf/open/shuttle/predship,
/area/yautja)
"Zs" = (
-/obj/structure/machinery/door/airlock/strata/autoname{
- name = "\improper Containment"
+/obj/structure/machinery/door/airlock/yautja/secure{
+ name = "\improper Heavy Armory"
+ },
+/obj/structure/machinery/door/poddoor/shutters/almayer/yautja{
+ dir = 4
},
/turf/open/floor/strata{
color = "#5e5d5d";
@@ -4816,7 +4905,7 @@ bj
aa
aa
aa
-aa
+dI
aa
bj
bj
@@ -5028,7 +5117,7 @@ cP
cP
cP
cP
-wQ
+fo
bj
bj
aa
@@ -5100,7 +5189,7 @@ ZM
au
cP
cP
-wQ
+fo
bj
bj
bj
@@ -5149,7 +5238,7 @@ aa
aa
ac
bj
-af
+bN
ZR
aV
bn
@@ -5172,7 +5261,7 @@ bj
wQ
cP
cP
-wQ
+fo
bj
bj
bj
@@ -5221,7 +5310,7 @@ aa
aa
ae
bj
-af
+bN
aC
cP
bL
@@ -5244,7 +5333,7 @@ rH
wQ
bL
cP
-wQ
+fo
bj
bj
bj
@@ -5310,9 +5399,9 @@ KD
bL
JH
JH
-af
+bN
be
-af
+bN
JH
JH
JH
@@ -6318,9 +6407,9 @@ bL
bL
JH
JH
-af
+bN
MI
-af
+bN
JH
JH
JH
@@ -6373,7 +6462,7 @@ aa
aa
ae
bj
-af
+bN
aC
cP
bL
@@ -6396,7 +6485,7 @@ ti
Ut
bL
cP
-Ut
+tR
bj
bj
bj
@@ -6445,7 +6534,7 @@ aa
aa
ad
bj
-af
+bN
ZR
aV
bn
@@ -6468,7 +6557,7 @@ bj
Ut
cP
cP
-Ut
+tR
bj
bj
bj
@@ -6540,7 +6629,7 @@ ZM
zZ
cP
cP
-Ut
+tR
bj
bj
bj
@@ -6612,7 +6701,7 @@ cP
cP
cP
cP
-Ut
+tR
bj
bj
aa
@@ -6765,9 +6854,9 @@ aa
aa
bj
bj
-bR
+HD
+JH
If
-bN
bj
bj
bj
@@ -6837,9 +6926,9 @@ aa
bj
bj
bj
-BB
-JH
+HD
JH
+If
bj
bj
bj
@@ -6983,7 +7072,7 @@ gb
JH
JH
JH
-JH
+Bg
bj
bj
bj
@@ -7126,7 +7215,7 @@ bD
df
JH
BK
-gG
+BK
bj
bj
bj
@@ -7192,7 +7281,7 @@ bj
bL
bL
bL
-bL
+gG
bL
Fy
dl
diff --git a/maps/tents/tent_big.dmm b/maps/tents/tent_big.dmm
index f341e67ce2aa..acf19e26a98e 100644
--- a/maps/tents/tent_big.dmm
+++ b/maps/tents/tent_big.dmm
@@ -7,6 +7,10 @@
/obj/structure/tent_curtain,
/turf/template_noop,
/area/template_noop)
+"k" = (
+/obj/structure/blocker/tent/full_tile,
+/turf/template_noop,
+/area/template_noop)
"n" = (
/obj/structure/blocker/tent{
dir = 4
@@ -59,19 +63,19 @@
/area/template_noop)
(1,1,1) = {"
-O
+k
J
v
a
"}
(2,1,1) = {"
-O
+k
S
O
x
"}
(3,1,1) = {"
-O
+k
n
s
G
diff --git a/maps/tents/tent_cmd.dmm b/maps/tents/tent_cmd.dmm
index e7260ca9bccf..0dbd6a6ef330 100644
--- a/maps/tents/tent_cmd.dmm
+++ b/maps/tents/tent_cmd.dmm
@@ -30,6 +30,7 @@
/turf/template_noop,
/area/template_noop)
"p" = (
+/obj/structure/blocker/tent/full_tile,
/turf/template_noop,
/area/template_noop)
"v" = (
diff --git a/maps/tents/tent_med.dmm b/maps/tents/tent_med.dmm
index fcb446a68e25..527f3dc7bc05 100644
--- a/maps/tents/tent_med.dmm
+++ b/maps/tents/tent_med.dmm
@@ -16,6 +16,7 @@
/turf/template_noop,
/area/template_noop)
"p" = (
+/obj/structure/blocker/tent/full_tile,
/turf/template_noop,
/area/template_noop)
"v" = (
diff --git a/maps/tents/tent_reqs.dmm b/maps/tents/tent_reqs.dmm
index 7d9cf926e698..2dc47531ed37 100644
--- a/maps/tents/tent_reqs.dmm
+++ b/maps/tents/tent_reqs.dmm
@@ -70,6 +70,10 @@
},
/turf/template_noop,
/area/template_noop)
+"R" = (
+/obj/structure/blocker/tent/full_tile,
+/turf/template_noop,
+/area/template_noop)
"S" = (
/obj/structure/blocker/tent{
dir = 8
@@ -83,25 +87,25 @@
/area/template_noop)
(1,1,1) = {"
-a
+R
B
S
m
"}
(2,1,1) = {"
-a
+R
J
a
c
"}
(3,1,1) = {"
-a
+R
w
U
k
"}
(4,1,1) = {"
-a
+R
n
d
k
diff --git a/sound/theme/lastmanstanding_clf.ogg b/sound/theme/lastmanstanding_clf.ogg
new file mode 100644
index 000000000000..365af09116bb
Binary files /dev/null and b/sound/theme/lastmanstanding_clf.ogg differ
diff --git a/sound/theme/lastmanstanding_upp.ogg b/sound/theme/lastmanstanding_upp.ogg
new file mode 100644
index 000000000000..d74812f73df1
Binary files /dev/null and b/sound/theme/lastmanstanding_upp.ogg differ
diff --git a/sound/theme/lastmanstanding_wy.ogg b/sound/theme/lastmanstanding_wy.ogg
new file mode 100644
index 000000000000..225914b416d1
Binary files /dev/null and b/sound/theme/lastmanstanding_wy.ogg differ
diff --git a/tgui/packages/tgui/interfaces/AresInterface.js b/tgui/packages/tgui/interfaces/AresInterface.js
index 5cd78011a81c..fc7901795046 100644
--- a/tgui/packages/tgui/interfaces/AresInterface.js
+++ b/tgui/packages/tgui/interfaces/AresInterface.js
@@ -1405,7 +1405,8 @@ const Emergency = (props, context) => {
let nuke_reason =
'Request a nuclear device to be authorized by USCM High Command.';
if (!nuke_available) {
- nuke_reason = 'No nuclear ordnance is available during this operation.';
+ nuke_reason =
+ 'No nuclear ordnance is available during this operation, or one has already been provided.';
} else if (mission_failed) {
nuke_reason =
'You have already lost the objective, you cannot use a nuclear device aboard the ship!';
diff --git a/tgui/packages/tgui/interfaces/NuclearBomb.js b/tgui/packages/tgui/interfaces/NuclearBomb.js
index b29bc17e0779..e49b958f7857 100644
--- a/tgui/packages/tgui/interfaces/NuclearBomb.js
+++ b/tgui/packages/tgui/interfaces/NuclearBomb.js
@@ -18,7 +18,7 @@ export const NuclearBomb = (_props, context) => {
{data.decryption_complete
? 'Decryption complete.'
: `Decryption time left :
- ${data.decryption_time} seconds`}
+ ${data.decryption_time} minutes`}
diff --git a/tgui/packages/tgui/interfaces/SquadMod.js b/tgui/packages/tgui/interfaces/SquadMod.js
index 85ff237d3aac..15ce727a5341 100644
--- a/tgui/packages/tgui/interfaces/SquadMod.js
+++ b/tgui/packages/tgui/interfaces/SquadMod.js
@@ -5,7 +5,6 @@ import { Window } from '../layouts';
export const SquadMod = (props, context) => {
const { act, data } = useBackend(context);
const { squads = [], human, id_name, has_id } = data;
- const COLORS_SPECTRUM = ['red', 'yellow', 'purple', 'teal', 'brown', 'grey'];
return (
@@ -47,7 +46,7 @@ export const SquadMod = (props, context) => {
key={entry.name}
fluid
content={entry.name}
- color={COLORS_SPECTRUM[entry.color]}
+ backgroundColor={entry.color}
onClick={() =>
act('PRG_squad', {
name: entry.name,
diff --git a/tgui/packages/tgui/interfaces/YautjaEmotes.tsx b/tgui/packages/tgui/interfaces/YautjaEmotes.tsx
new file mode 100644
index 000000000000..d33e1cfbdf10
--- /dev/null
+++ b/tgui/packages/tgui/interfaces/YautjaEmotes.tsx
@@ -0,0 +1,110 @@
+import { useBackend, useLocalState } from '../backend';
+import { Box, Button, Divider, Section, Stack, Tabs } from '../components';
+import { Window } from '../layouts';
+import { BooleanLike } from '../../common/react';
+
+type Emote = {
+ id: string;
+ text: string;
+ category: string;
+ path: string;
+};
+
+type BackendContext = {
+ categories: string[];
+ emotes: Emote[];
+ on_cooldown: BooleanLike;
+};
+
+const EmoteTab = (props, context) => {
+ const { data, act } = useBackend(context);
+ const { categories, emotes, on_cooldown } = data;
+ const [categoryIndex, setCategoryIndex] = useLocalState(
+ context,
+ 'category_index',
+ 'Fake Sound'
+ );
+ const mapped_emote = emotes.filter(
+ (emote) => emote && emote.category === categoryIndex
+ );
+ return (
+
+
+
+
+ {categories.map((item, key) => (
+ {
+ setCategoryIndex(item);
+ }}>
+ {item}
+
+ ))}
+
+
+
+
+
+
+
+ {mapped_emote.map((item) => (
+
+
+ {' '}
+
+
+
+
+
+
+
+
+ ))}
+
+
+
+
+ );
+};
+
+export const YautjaEmotes = (props, context) => {
+ return (
+
+
+
+
+
+ );
+};
diff --git a/tools/MapTileImageTool/MapTileImageTool.py b/tools/MapTileImageTool/MapTileImageTool.py
new file mode 100644
index 000000000000..cf0919c3a88b
--- /dev/null
+++ b/tools/MapTileImageTool/MapTileImageTool.py
@@ -0,0 +1,85 @@
+#This script processes screenshots from the Mass-Screenshot Debug verb in SS13 into a full map image
+
+# Loosely based on https://github.com/vortex1942/telescience/blob/master/src/tools/PhotoProcessor.py
+
+# This script uses the Pillow library (PIL) install it with pip install pillow
+
+#*****************************************************************
+#******ALL .pngs in the rawimages folder will be processed********
+#********Exported file may be overwritten in the output***********
+#*****************************************************************
+
+from PIL import Image
+from os import listdir, path
+
+# Selection of Input/Output directories
+rawimgdir = str(input("Directory of RAW images: "))
+if path.exists(rawimgdir) == False:
+ print("Directory could not be found!")
+ exit(1)
+
+imgdir = str(input("Directory for output image (leave blank to use RAW image directory): "))
+if imgdir == "":
+ imgdir = rawimgdir
+elif path.exists(imgdir) == False:
+ print("Directory could not be found!")
+ exit(1)
+
+exportfilename = str(input("Filename for Full Image (E.g LV624_Complete): "))
+if exportfilename == "":
+ print("Filename is invalid!")
+ exit(1)
+
+gamearguments = str(input("Values provided after using the Mass-Screenshot verb: "))
+gamearguments = gamearguments.split()
+if len(gamearguments) != 4:
+ print("Invalid arguments!")
+ exit(1)
+pixelsize = int(gamearguments[3])
+halfchunksize = int(gamearguments[2])
+width = (int(gamearguments[0]) + halfchunksize - 2)
+height = (int(gamearguments[1]) + halfchunksize - 2)
+if width < 1 or height < 1 or pixelsize < 1 or halfchunksize < 1 or halfchunksize * 2 >= width or halfchunksize * 2 >= height:
+ print("Invalid arguments!")
+ exit(1)
+width *= pixelsize
+height *= pixelsize
+halfchunksize *= pixelsize
+
+# Function for saving the image (params: name=Filename, export=Image IMG variable)
+def func_exportfullimage(name, export):
+ print("SAVING IMAGE")
+ file = (imgdir+"\\"+name+".png")
+ print(file)
+ file = open(file, "wb")
+ export.save(file)
+
+# Where the magic happens, Creates a canvas and pastes RAWimages in a grid fashion
+masterexport = Image.new("RGBA", (width,height), color=(0,0,0,255))
+imagelist = [file for file in sorted(listdir(rawimgdir), key=lambda x: path.getmtime(rawimgdir+"\\"+x)) if file.endswith('.png')]
+imagecount = len(imagelist)
+chunksize = halfchunksize * 2 - pixelsize
+x = fc = 0
+y = height - chunksize
+
+# For loop stitches RAw images together
+for p in imagelist:
+ file = (rawimgdir+"\\"+p)
+ photo = Image.open(file).convert("RGBA")
+ #Verbose mode [Iteration] [Image Coords] [RAW Filename]
+ #print("iter: " f"{fc : >2}", "IMG XY: " f"{x : >4}", f"{y : >4}", "FILE: " f"{p : >13}")
+ masterexport.paste(photo, (x, y))
+ x += chunksize
+ fc += 1
+ if x >= width:
+ x = 0
+ y -= chunksize
+ y = max(y, 0)
+ progress = fc / imagecount * 100
+ print("%.1f" % progress, "%")
+ x = min(x, width - chunksize)
+
+func_exportfullimage(exportfilename, masterexport)
+
+# Hopefully you got this far
+print("COMPLETED :)")
diff --git a/tools/dmi/test.py b/tools/dmi/test.py
index 09629927d88a..fcf73603f7d5 100644
--- a/tools/dmi/test.py
+++ b/tools/dmi/test.py
@@ -3,23 +3,54 @@
from dmi import *
+def green(text):
+ return "\033[32m" + str(text) + "\033[0m"
+
+
+def red(text):
+ return "\033[31m" + str(text) + "\033[0m"
+
+
def _self_test():
# test: can we load every DMI in the tree
count = 0
+ failed = 0
for dirpath, dirnames, filenames in os.walk('.'):
if '.git' in dirnames:
dirnames.remove('.git')
for filename in filenames:
if filename.endswith('.dmi'):
fullpath = os.path.join(dirpath, filename)
+ failures_this_file = 0
try:
- Dmi.from_file(fullpath)
+ dmi = Dmi.from_file(fullpath)
+ dmi_states = dmi.states
+ number_of_icon_states = len(dmi.states)
+ if number_of_icon_states > 512:
+ print("{0} {1} has too many icon states: {2}/512.".format(red("FAIL"), fullpath, number_of_icon_states))
+ failures_this_file += 1
+ existing_states = []
+ for state in dmi_states:
+ state_name = state.name
+ if state.movement:
+ state_name += "_MOVEMENT_STATE_TRUE"
+ if state_name in existing_states:
+ print("{0} {1} has a duplicate state '{2}'.".format(red("FAIL"), fullpath, state.name))
+ failures_this_file += 1
+ continue
+ existing_states.append(state_name)
except Exception:
- print('Failed on:', fullpath)
+ print("{0} {1} threw an exception.".format(red("FAIL"), fullpath))
+ failures_this_file += 1
raise
count += 1
+ if failures_this_file > 0:
+ failed += 1
- print(f"{os.path.relpath(__file__)}: successfully parsed {count} .dmi files")
+ print(f"{os.path.relpath(__file__)}: {green(f'successfully parsed {count-failed} .dmi files')}")
+ if failed > 0:
+ print(f"{os.path.relpath(__file__)}: {red(f'failed to parse {failed} .dmi files')}")
+ exit(1)
def _usage():