diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 9998d5c82b..3fcaf2691e 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -3,3 +3,8 @@
# This list is alphabetized by User -> Filename KEEP IT THAT WAY
# In the event that multiple org members are to be informed of changes
# to the same file or dir, add them to the end under Multiple Owners
+
+# Username
+
+# /path/to/file.dm @Username
+# /path/to/directory @Username
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
new file mode 100644
index 0000000000..36292805d5
--- /dev/null
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,5 @@
+
+
+## About The Pull Request
+
+
diff --git a/.github/workflows/remove_guide_comments.yml b/.github/workflows/remove_guide_comments.yml
new file mode 100644
index 0000000000..621d860c5c
--- /dev/null
+++ b/.github/workflows/remove_guide_comments.yml
@@ -0,0 +1,18 @@
+# Removes guide comments from PRs when opened, so that when we merge them
+# and reuse the pull request description, the clutter is not left behind
+name: Remove guide comments
+on:
+ pull_request_target:
+ types: [opened]
+jobs:
+ remove_guide_comments:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ - name: Remove guide comments
+ uses: actions/github-script@v7
+ with:
+ script: |
+ const { removeGuideComments } = await import('${{ github.workspace }}/tools/pull_request_hooks/removeGuideComments.js')
+ await removeGuideComments({ github, context })
diff --git a/.github/workflows/render_nanomaps.yml b/.github/workflows/render_nanomaps.yml
index ec05c188cb..692e9b827b 100644
--- a/.github/workflows/render_nanomaps.yml
+++ b/.github/workflows/render_nanomaps.yml
@@ -10,6 +10,7 @@ on:
- master
paths:
- 'maps/**'
+ workflow_dispatch:
permissions: {}
jobs:
@@ -19,7 +20,7 @@ jobs:
pull-requests: write # to create pull requests (repo-sync/pull-request)
name: 'Generate NanoMaps'
- runs-on: ubuntu-22.04
+ runs-on: ubuntu-24.04
steps:
- name: Clone
uses: actions/checkout@v4
@@ -30,7 +31,17 @@ jobs:
git branch -f nanomaps_generation
git checkout nanomaps_generation
git reset --hard origin/master
-
+ - name: Restore SpacemanDMM cache
+ uses: actions/cache@v4
+ with:
+ path: ~/SpacemanDMM
+ key: ${{ runner.os }}-spacemandmm-${{ hashFiles('dependencies.sh') }}
+ restore-keys: |
+ ${{ runner.os }}-spacemandmm-
+ - name: Install Tools
+ run: |
+ bash tools/ci/install_spaceman_dmm.sh dmm-tools
+ sudo apt install -y imagemagick
- name: Ensure +x on github-actions directory
run: chmod -R +x ./tools/github-actions
diff --git a/code/ATMOSPHERICS/components/binary_devices/pipeturbine.dm b/code/ATMOSPHERICS/components/binary_devices/pipeturbine.dm
index df55d47a9f..a79d3b65da 100644
--- a/code/ATMOSPHERICS/components/binary_devices/pipeturbine.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/pipeturbine.dm
@@ -18,8 +18,8 @@
var/datum/pipe_network/network1
var/datum/pipe_network/network2
-/obj/machinery/atmospherics/pipeturbine/New()
- ..()
+/obj/machinery/atmospherics/pipeturbine/Initialize(mapload, newdir)
+ . = ..()
air_in.volume = 200
air_out.volume = 800
volume_ratio = air_in.volume / (air_in.volume + air_out.volume)
diff --git a/code/__defines/dcs/signals/signals_subsystem.dm b/code/__defines/dcs/signals/signals_subsystem.dm
new file mode 100644
index 0000000000..26daf58e1a
--- /dev/null
+++ b/code/__defines/dcs/signals/signals_subsystem.dm
@@ -0,0 +1,7 @@
+// Subsystem signals. Format:
+// When the signal is called: (signal arguments)
+// All signals send the source datum of the signal as the first argument
+
+///Subsystem signals
+///From base of datum/controller/subsystem/Initialize
+#define COMSIG_SUBSYSTEM_POST_INITIALIZE "subsystem_post_initialize"
diff --git a/code/__defines/dna.dm b/code/__defines/dna.dm
index b958466201..bcf5f15e3c 100644
--- a/code/__defines/dna.dm
+++ b/code/__defines/dna.dm
@@ -160,3 +160,4 @@ var/SMALLSIZEBLOCK = 0
// Gene flags
#define GENE_ALWAYS_ACTIVATE 1
+#define MUTCHK_HIDEMSG 2
diff --git a/code/__defines/exosuit_fab.dm b/code/__defines/exosuit_fab.dm
index 030c324cd3..e3da26b840 100644
--- a/code/__defines/exosuit_fab.dm
+++ b/code/__defines/exosuit_fab.dm
@@ -35,10 +35,16 @@
#define EXOSUIT_MODULE_DURAND (1<<3)
/// Module is compatible with Phazon Exosuit models
#define EXOSUIT_MODULE_PHAZON (1<<4)
+/// Module is compatible with Pinnace Fighter models
+#define EXOSUIT_MODULE_PINNACE (1<<5)
+/// Module is compatible with Baron Fighter models
+#define EXOSUIT_MODULE_BARON (1<<6)
/// Module is compatible with "Working" Exosuit models - Ripley
#define EXOSUIT_MODULE_WORKING EXOSUIT_MODULE_RIPLEY
/// Module is compatible with "Combat" Exosuit models - Gygax, Durand and Phazon
#define EXOSUIT_MODULE_COMBAT EXOSUIT_MODULE_GYGAX | EXOSUIT_MODULE_DURAND | EXOSUIT_MODULE_PHAZON
-/// Module is compatible with "Medical" Exosuit modelsm - Odysseus
+/// Module is compatible with "Medical" Exosuit models - Odysseus
#define EXOSUIT_MODULE_MEDICAL EXOSUIT_MODULE_ODYSSEUS
+/// Module is compatible with "Fighter" Exosuit models - Pinnace, Baron
+#define EXOSUIT_MODULE_FIGHTER EXOSUIT_MODULE_PINNACE | EXOSUIT_MODULE_BARON
diff --git a/code/__defines/is_helpers.dm b/code/__defines/is_helpers.dm
index f56b590be9..71b7858571 100644
--- a/code/__defines/is_helpers.dm
+++ b/code/__defines/is_helpers.dm
@@ -42,6 +42,7 @@
#define iscorgi(A) istype(A, /mob/living/simple_mob/animal/passive/dog/corgi)
#define isslime(A) istype(A, /mob/living/simple_mob/slime)
#define isxeno(A) istype(A, /mob/living/simple_mob/animal/space/alien)
+#define issimplekin(A) istype(A, /mob/living/simple_mob/shadekin)
#define iscarbon(A) istype(A, /mob/living/carbon)
#define isalien(A) istype(A, /mob/living/carbon/alien)
diff --git a/code/__defines/misc.dm b/code/__defines/misc.dm
index ab3d82c281..0a34f8e30a 100644
--- a/code/__defines/misc.dm
+++ b/code/__defines/misc.dm
@@ -29,6 +29,7 @@
// For the client FPS pref and anywhere else
#define MAX_CLIENT_FPS 200
+#define RECOMMENDED_FPS 100
// Some arbitrary defines to be used by self-pruning global lists. (see master_controller)
#define MAX_GEAR_COST 15 // Used in chargen for accessory loadout limit.
diff --git a/code/__defines/mobs.dm b/code/__defines/mobs.dm
index 790d8dcf4a..4e31ab3309 100644
--- a/code/__defines/mobs.dm
+++ b/code/__defines/mobs.dm
@@ -75,6 +75,9 @@
#define I_GRAB "grab"
#define I_HURT "harm"
+#define I_RUN "run"
+#define I_WALK "walk"
+
//These are used Bump() code for living mobs, in the mob_bump_flag, mob_swap_flags, and mob_push_flags vars to determine whom can bump/swap with whom.
#define HUMAN 1
#define MONKEY 2
@@ -262,6 +265,13 @@
#define MOB_PULL_SAME 2
#define MOB_PULL_LARGER 3
+//Protean organs
+#define O_ORCH "orchestrator"
+#define O_FACT "refactory"
+
+//Alraune organs
+#define A_FRUIT "fruit gland"
+
//XENOBIO2 FLAGS
#define NOMUT 0
#define COLORMUT 1
@@ -298,23 +308,42 @@
#define SPECIES_UNATHI "Unathi"
#define SPECIES_SKRELL "Skrell"
#define SPECIES_TESHARI "Teshari"
-#define SPECIES_TAJ "Tajara"
+#define SPECIES_TAJARAN "Tajara"
#define SPECIES_PROMETHEAN "Promethean"
#define SPECIES_DIONA "Diona"
#define SPECIES_VOX "Vox"
#define SPECIES_ZADDAT "Zaddat"
+#define SPECIES_AKULA "Akula"
+#define SPECIES_ALRAUNE "Alraune"
+#define SPECIES_NEVREAN "Nevrean"
+#define SPECIES_PROTEAN "Protean"
+#define SPECIES_RAPALA "Rapala"
+#define SPECIES_SERGAL "Sergal"
+#define SPECIES_ALTEVIAN "Altevian"
+#define SPECIES_SHADEKIN_CREW "Black-Eyed Shadekin"
+#define SPECIES_VASILISSAN "Vasilissan"
+#define SPECIES_VULPKANIN "Vulpkanin"
+#define SPECIES_XENOCHIMERA "Xenochimera"
+#define SPECIES_ZORREN_HIGH "Zorren"
+#define SPECIES_CUSTOM "Custom Species"
+#define SPECIES_LLEILL "Lleill"
+#define SPECIES_HANNER "Hanner"
// Monkey and alien monkeys.
-#define SPECIES_MONKEY "Monkey"
-#define SPECIES_MONKEY_TAJ "Farwa"
-#define SPECIES_MONKEY_SKRELL "Neaera"
-#define SPECIES_MONKEY_UNATHI "Stok"
+#define SPECIES_MONKEY "Monkey"
+#define SPECIES_MONKEY_TAJ "Farwa"
+#define SPECIES_MONKEY_SKRELL "Neaera"
+#define SPECIES_MONKEY_UNATHI "Stok"
+#define SPECIES_MONKEY_AKULA "Sobaka"
+#define SPECIES_MONKEY_NEVREAN "Sparra"
+#define SPECIES_MONKEY_SERGAL "Saru"
+#define SPECIES_MONKEY_VULPKANIN "Wolpin"
// Virtual Reality IDs.
#define SPECIES_VR "Virtual Reality Avatar"
#define SPECIES_VR_HUMAN "Virtual Reality Human"
#define SPECIES_VR_UNATHI "Virtual Reality Unathi"
-#define SPECIES_VR_TAJ "Virtual Reality Tajara" // NO CHANGING.
+#define SPECIES_VR_TAJARAN "Virtual Reality Tajara" // NO CHANGING.
#define SPECIES_VR_SKRELL "Virtual Reality Skrell"
#define SPECIES_VR_TESHARI "Virtual Reality Teshari"
#define SPECIES_VR_DIONA "Virtual Reality Diona"
@@ -343,6 +372,24 @@
#define SPECIES_REPLICANT_ALPHA "Alpha Replicant"
#define SPECIES_REPLICANT_BETA "Beta Replicant"
#define SPECIES_REPLICANT_CREW "Gamma Replicant"
+#define SPECIES_WEREBEAST "Werebeast"
+#define SPECIES_SHADEKIN "Shadekin"
+
+// Custom species base
+#define SPECIES_FENNEC "Fennec"
+#define SPECIES_XENOHYBRID "Xenohybrid"
+
+//for custom bodytypes
+#define SELECTS_BODYTYPE_FALSE 0
+#define SELECTS_BODYTYPE_CUSTOM 1
+#define SELECTS_BODYTYPE_SHAPESHIFTER 2
+
+#define MARKING_NONDIGI_ONLY (1 << 0)
+#define MARKING_DIGITIGRADE_ONLY (1 << 1)
+#define MARKING_ALL_LEGS MARKING_NONDIGI_ONLY|MARKING_DIGITIGRADE_ONLY
+
+//Grabs
+#define UPGRADE_COOLDOWN 40
// Used to seperate simple animals by ""intelligence"".
#define SA_PLANT 1
diff --git a/code/__defines/mobs_vr.dm b/code/__defines/mobs_vr.dm
deleted file mode 100644
index af0eddf426..0000000000
--- a/code/__defines/mobs_vr.dm
+++ /dev/null
@@ -1,50 +0,0 @@
-//Protean organs
-#define O_ORCH "orchestrator"
-#define O_FACT "refactory"
-
-//Alraune organs
-#define A_FRUIT "fruit gland"
-
-//species defines
-
-//station species
-#define SPECIES_AKULA "Akula"
-#define SPECIES_ALRAUNE "Alraune"
-#define SPECIES_NEVREAN "Nevrean"
-#define SPECIES_PROTEAN "Protean"
-#define SPECIES_RAPALA "Rapala"
-#define SPECIES_SERGAL "Sergal"
-#define SPECIES_ALTEVIAN "Altevian"
-#define SPECIES_SHADEKIN_CREW "Black-Eyed Shadekin"
-#define SPECIES_VASILISSAN "Vasilissan"
-#define SPECIES_VULPKANIN "Vulpkanin"
-#define SPECIES_XENOCHIMERA "Xenochimera"
-#define SPECIES_ZORREN_HIGH "Zorren"
-#define SPECIES_CUSTOM "Custom Species"
-#define SPECIES_TAJARAN "Tajara"
-#define SPECIES_LLEILL "Lleill"
-#define SPECIES_HANNER "Hanner"
-//monkey species
-#define SPECIES_MONKEY_AKULA "Sobaka"
-#define SPECIES_MONKEY_NEVREAN "Sparra"
-#define SPECIES_MONKEY_SERGAL "Saru"
-#define SPECIES_MONKEY_VULPKANIN "Wolpin"
-//event species
-#define SPECIES_WEREBEAST "Werebeast"
-#define SPECIES_SHADEKIN "Shadekin"
-//custom species base sprites
-#define SPECIES_FENNEC "Fennec"
-#define SPECIES_XENOHYBRID "Xenohybrid"
-
-//for custom bodytypes
-
-#define SELECTS_BODYTYPE_FALSE 0
-#define SELECTS_BODYTYPE_CUSTOM 1
-#define SELECTS_BODYTYPE_SHAPESHIFTER 2
-
-#define MARKING_NONDIGI_ONLY (1 << 0)
-#define MARKING_DIGITIGRADE_ONLY (1 << 1)
-#define MARKING_ALL_LEGS MARKING_NONDIGI_ONLY|MARKING_DIGITIGRADE_ONLY
-
-//Grabs
-#define UPGRADE_COOLDOWN 40
diff --git a/code/__defines/preferences.dm b/code/__defines/preferences.dm
index 14adeb62bb..5e03f3217c 100644
--- a/code/__defines/preferences.dm
+++ b/code/__defines/preferences.dm
@@ -16,6 +16,15 @@
#define SAVE_RESET -1
+//randomised elements
+#define RANDOM_ANTAG_ONLY 1
+#define RANDOM_DISABLED 2
+#define RANDOM_ENABLED 3
+
+// randomise_appearance_prefs() and randomize_human_appearance() proc flags
+#define RANDOMIZE_SPECIES (1<<0)
+#define RANDOMIZE_NAME (1<<1)
+
// Values for /datum/preference/savefile_identifier
/// This preference is character specific.
#define PREFERENCE_CHARACTER "character"
diff --git a/code/__defines/sprite_sheets.dm b/code/__defines/sprite_sheets.dm
index 06b119a8e3..b474b31301 100644
--- a/code/__defines/sprite_sheets.dm
+++ b/code/__defines/sprite_sheets.dm
@@ -1,7 +1,7 @@
// Default species get default sprites, VR species get VR sprites
#define VR_SPECIES_SPRITE_SHEETS_SUIT_MOB list(\
SPECIES_HUMAN = 'icons/inventory/suit/mob.dmi',\
-SPECIES_TAJ = 'icons/inventory/suit/mob_tajaran.dmi',\
+SPECIES_TAJARAN = 'icons/inventory/suit/mob_tajaran.dmi',\
SPECIES_SKRELL = 'icons/inventory/suit/mob_skrell.dmi',\
SPECIES_UNATHI = 'icons/inventory/suit/mob_unathi.dmi',\
SPECIES_TESHARI = 'icons/inventory/suit/mob_teshari.dmi',\
@@ -15,7 +15,7 @@ SPECIES_FENNEC = 'icons/inventory/suit/mob_vr_vulpkanin.dmi',\
SPECIES_ALTEVIAN = 'icons/inventory/suit/mob_vr_altevian.dmi')
#define VR_SPECIES_SPRITE_SHEETS_HEAD_MOB list(\
SPECIES_HUMAN = 'icons/inventory/head/mob.dmi',\
-SPECIES_TAJ = 'icons/inventory/head/mob_tajaran.dmi',\
+SPECIES_TAJARAN = 'icons/inventory/head/mob_tajaran.dmi',\
SPECIES_SKRELL = 'icons/inventory/head/mob_skrell.dmi',\
SPECIES_UNATHI = 'icons/inventory/head/mob_unathi.dmi',\
SPECIES_TESHARI = 'icons/inventory/head/mob_teshari.dmi',\
@@ -30,7 +30,7 @@ SPECIES_ALTEVIAN = 'icons/inventory/head/mob_vr_altevian.dmi',\
SPECIES_GREY_YW = 'icons/inventory/head/mob_grey.dmi' /* yw edit - shadekin */)
#define VR_SPECIES_SPRITE_SHEETS_HANDS_MOB list(\
SPECIES_HUMAN = 'icons/inventory/hands/mob.dmi',\
-SPECIES_TAJ = 'icons/inventory/hands/mob_tajaran.dmi',\
+SPECIES_TAJARAN = 'icons/inventory/hands/mob_tajaran.dmi',\
SPECIES_SKRELL = 'icons/inventory/hands/mob_skrell.dmi',\
SPECIES_UNATHI = 'icons/inventory/hands/mob_unathi.dmi',\
SPECIES_TESHARI = 'icons/inventory/hands/mob_teshari.dmi',\
@@ -43,7 +43,7 @@ SPECIES_ZORREN_HIGH = 'icons/inventory/hands/mob_vr_vulpkanin.dmi',\
SPECIES_FENNEC = 'icons/inventory/hands/mob_vr_vulpkanin.dmi')
#define VR_SPECIES_SPRITE_SHEETS_FEET_MOB list(\
SPECIES_HUMAN = 'icons/inventory/feet/mob.dmi',\
-SPECIES_TAJ = 'icons/inventory/feet/mob_tajaran.dmi',\
+SPECIES_TAJARAN = 'icons/inventory/feet/mob_tajaran.dmi',\
SPECIES_SKRELL = 'icons/inventory/feet/mob_skrell.dmi',\
SPECIES_UNATHI = 'icons/inventory/feet/mob_unathi.dmi',\
SPECIES_TESHARI = 'icons/inventory/feet/mob_teshari.dmi',\
@@ -57,7 +57,7 @@ SPECIES_FENNEC = 'icons/inventory/feet/mob_vr_vulpkanin.dmi')
#define VR_SPECIES_SPRITE_SHEETS_SUIT_ITEM list(\
SPECIES_HUMAN = 'icons/inventory/suit/item.dmi',\
-SPECIES_TAJ = 'icons/inventory/suit/item_tajaran.dmi',\
+SPECIES_TAJARAN = 'icons/inventory/suit/item_tajaran.dmi',\
SPECIES_SKRELL = 'icons/inventory/suit/item_skrell.dmi',\
SPECIES_UNATHI = 'icons/inventory/suit/item_unathi.dmi',\
SPECIES_TESHARI = 'icons/inventory/suit/item_teshari.dmi',\
@@ -71,7 +71,7 @@ SPECIES_FENNEC = 'icons/inventory/suit/item_vr_vulpkanin.dmi',\
SPECIES_ALTEVIAN = 'icons/inventory/suit/item_vr_altevian.dmi')
#define VR_SPECIES_SPRITE_SHEETS_HEAD_ITEM list(\
SPECIES_HUMAN = 'icons/inventory/head/item.dmi',\
-SPECIES_TAJ = 'icons/inventory/head/item_tajaran.dmi',\
+SPECIES_TAJARAN = 'icons/inventory/head/item_tajaran.dmi',\
SPECIES_SKRELL = 'icons/inventory/head/item_skrell.dmi',\
SPECIES_UNATHI = 'icons/inventory/head/item_unathi.dmi',\
SPECIES_TESHARI = 'icons/inventory/head/item_teshari.dmi',\
@@ -85,7 +85,7 @@ SPECIES_FENNEC = 'icons/inventory/head/item_vr_vulpkanin.dmi',\
SPECIES_ALTEVIAN = 'icons/inventory/head/item_vr_altevian.dmi')
#define VR_SPECIES_SPRITE_SHEETS_HANDS_ITEM list(\
SPECIES_HUMAN = 'icons/inventory/hands/item.dmi',\
-SPECIES_TAJ = 'icons/inventory/hands/item_tajaran.dmi',\
+SPECIES_TAJARAN = 'icons/inventory/hands/item_tajaran.dmi',\
SPECIES_SKRELL = 'icons/inventory/hands/item_skrell.dmi',\
SPECIES_UNATHI = 'icons/inventory/hands/item_unathi.dmi',\
SPECIES_TESHARI = 'icons/inventory/hands/item_teshari.dmi',\
@@ -98,7 +98,7 @@ SPECIES_ZORREN_HIGH = 'icons/inventory/hands/item_vr_vulpkanin.dmi',\
SPECIES_FENNEC = 'icons/inventory/hands/item_vr_vulpkanin.dmi')
#define VR_SPECIES_SPRITE_SHEETS_FEET_ITEM list(\
SPECIES_HUMAN = 'icons/inventory/feet/item.dmi',\
-SPECIES_TAJ = 'icons/inventory/feet/item_tajaran.dmi',\
+SPECIES_TAJARAN = 'icons/inventory/feet/item_tajaran.dmi',\
SPECIES_SKRELL = 'icons/inventory/feet/item_skrell.dmi',\
SPECIES_UNATHI = 'icons/inventory/feet/item_unathi.dmi',\
SPECIES_TESHARI = 'icons/inventory/feet/item_teshari.dmi',\
@@ -113,7 +113,7 @@ SPECIES_FENNEC = 'icons/inventory/feet/item_vr_vulpkanin.dmi')
// All species get VR sprites
#define ALL_VR_SPRITE_SHEETS_SUIT_MOB list(\
SPECIES_HUMAN = 'icons/inventory/suit/mob_vr.dmi',\
-SPECIES_TAJ = 'icons/inventory/suit/mob_vr_tajaran.dmi',\
+SPECIES_TAJARAN = 'icons/inventory/suit/mob_vr_tajaran.dmi',\
SPECIES_SKRELL = 'icons/inventory/suit/mob_vr_skrell.dmi',\
SPECIES_UNATHI = 'icons/inventory/suit/mob_vr_unathi.dmi',\
SPECIES_TESHARI = 'icons/inventory/suit/mob_vr_teshari.dmi',\
@@ -127,7 +127,7 @@ SPECIES_FENNEC = 'icons/inventory/suit/mob_vr_vulpkanin.dmi',\
SPECIES_ALTEVIAN = 'icons/inventory/suit/mob_vr_altevian.dmi')
#define ALL_VR_SPRITE_SHEETS_HEAD_MOB list(\
SPECIES_HUMAN = 'icons/inventory/head/mob_vr.dmi',\
-SPECIES_TAJ = 'icons/inventory/head/mob_vr_tajaran.dmi',\
+SPECIES_TAJARAN = 'icons/inventory/head/mob_vr_tajaran.dmi',\
SPECIES_SKRELL = 'icons/inventory/head/mob_vr_skrell.dmi',\
SPECIES_UNATHI = 'icons/inventory/head/mob_vr_unathi.dmi',\
SPECIES_TESHARI = 'icons/inventory/head/mob_vr_teshari.dmi',\
@@ -142,7 +142,7 @@ SPECIES_ALTEVIAN = 'icons/inventory/head/mob_vr_altevian.dmi',\
SPECIES_GREY_YW = 'icons/inventory/head/mob_grey.dmi' /* yw edit - shadekin */)
#define ALL_VR_SPRITE_SHEETS_HANDS_MOB list(\
SPECIES_HUMAN = 'icons/inventory/hands/mob_vr.dmi',\
-SPECIES_TAJ = 'icons/inventory/hands/mob_vr_tajaran.dmi',\
+SPECIES_TAJARAN = 'icons/inventory/hands/mob_vr_tajaran.dmi',\
SPECIES_SKRELL = 'icons/inventory/hands/mob_vr_skrell.dmi',\
SPECIES_UNATHI = 'icons/inventory/hands/mob_vr_unathi.dmi',\
SPECIES_TESHARI = 'icons/inventory/hands/mob_vr_teshari.dmi',\
@@ -155,7 +155,7 @@ SPECIES_ZORREN_HIGH = 'icons/inventory/hands/mob_vr_vulpkanin.dmi',\
SPECIES_FENNEC = 'icons/inventory/hands/mob_vr_vulpkanin.dmi')
#define ALL_VR_SPRITE_SHEETS_FEET_MOB list(\
SPECIES_HUMAN = 'icons/inventory/feet/mob_vr.dmi',\
-SPECIES_TAJ = 'icons/inventory/feet/mob_vr_tajaran.dmi',\
+SPECIES_TAJARAN = 'icons/inventory/feet/mob_vr_tajaran.dmi',\
SPECIES_SKRELL = 'icons/inventory/feet/mob_vr_skrell.dmi',\
SPECIES_UNATHI = 'icons/inventory/feet/mob_vr_unathi.dmi',\
SPECIES_TESHARI = 'icons/inventory/feet/mob_vr_teshari.dmi',\
@@ -169,7 +169,7 @@ SPECIES_FENNEC = 'icons/inventory/feet/mob_vr_vulpkanin.dmi')
#define ALL_VR_SPRITE_SHEETS_SUIT_ITEM list(\
SPECIES_HUMAN = 'icons/inventory/suit/item_vr.dmi',\
-SPECIES_TAJ = 'icons/inventory/suit/item_vr_tajaran.dmi',\
+SPECIES_TAJARAN = 'icons/inventory/suit/item_vr_tajaran.dmi',\
SPECIES_SKRELL = 'icons/inventory/suit/item_vr_skrell.dmi',\
SPECIES_UNATHI = 'icons/inventory/suit/item_vr_unathi.dmi',\
SPECIES_TESHARI = 'icons/inventory/suit/item_vr_teshari.dmi',\
@@ -183,7 +183,7 @@ SPECIES_FENNEC = 'icons/inventory/suit/item_vr_vulpkanin.dmi',\
SPECIES_ALTEVIAN = 'icons/inventory/suit/item_vr_altevian.dmi')
#define ALL_VR_SPRITE_SHEETS_HEAD_ITEM list(\
SPECIES_HUMAN = 'icons/inventory/head/item_vr.dmi',\
-SPECIES_TAJ = 'icons/inventory/head/item_vr_tajaran.dmi',\
+SPECIES_TAJARAN = 'icons/inventory/head/item_vr_tajaran.dmi',\
SPECIES_SKRELL = 'icons/inventory/head/item_vr_skrell.dmi',\
SPECIES_UNATHI = 'icons/inventory/head/item_vr_unathi.dmi',\
SPECIES_TESHARI = 'icons/inventory/head/item_vr_teshari.dmi',\
@@ -197,7 +197,7 @@ SPECIES_FENNEC = 'icons/inventory/head/item_vr_vulpkanin.dmi',\
SPECIES_ALTEVIAN = 'icons/inventory/head/item_vr_altevian.dmi')
#define ALL_VR_SPRITE_SHEETS_HANDS_ITEM list(\
SPECIES_HUMAN = 'icons/inventory/hands/item_vr.dmi',\
-SPECIES_TAJ = 'icons/inventory/hands/item_vr_tajaran.dmi',\
+SPECIES_TAJARAN = 'icons/inventory/hands/item_vr_tajaran.dmi',\
SPECIES_SKRELL = 'icons/inventory/hands/item_vr_skrell.dmi',\
SPECIES_UNATHI = 'icons/inventory/hands/item_vr_unathi.dmi',\
SPECIES_TESHARI = 'icons/inventory/hands/item_vr_teshari.dmi',\
@@ -210,7 +210,7 @@ SPECIES_ZORREN_HIGH = 'icons/inventory/hands/item_vr_vulpkanin.dmi',\
SPECIES_FENNEC = 'icons/inventory/hands/item_vr_vulpkanin.dmi')
#define ALL_VR_SPRITE_SHEETS_FEET_ITEM list(\
SPECIES_HUMAN = 'icons/inventory/feet/item_vr.dmi',\
-SPECIES_TAJ = 'icons/inventory/feet/item_vr_tajaran.dmi',\
+SPECIES_TAJARAN = 'icons/inventory/feet/item_vr_tajaran.dmi',\
SPECIES_SKRELL = 'icons/inventory/feet/item_vr_skrell.dmi',\
SPECIES_UNATHI = 'icons/inventory/feet/item_vr_unathi.dmi',\
SPECIES_TESHARI = 'icons/inventory/feet/item_vr_teshari.dmi',\
diff --git a/code/__defines/subsystems.dm b/code/__defines/subsystems.dm
index 4d80021c0f..eb813b0d1a 100644
--- a/code/__defines/subsystems.dm
+++ b/code/__defines/subsystems.dm
@@ -202,3 +202,6 @@ var/global/list/runlevel_flags = list(RUNLEVEL_LOBBY, RUNLEVEL_SETUP, RUNLEVEL_G
* * timer_subsystem the subsystem to insert this timer into
*/
#define addtimer(args...) _addtimer(args, file = __FILE__, line = __LINE__)
+
+/// The timer key used to know how long subsystem initialization takes
+#define SS_INIT_TIMER_KEY "ss_init"
diff --git a/code/_global_vars/lists/misc.dm b/code/_global_vars/lists/misc.dm
index 5fb7fadce2..7fbe4c74f1 100644
--- a/code/_global_vars/lists/misc.dm
+++ b/code/_global_vars/lists/misc.dm
@@ -11,3 +11,5 @@ GLOBAL_LIST_EMPTY(tagger_locations)
GLOBAL_LIST_INIT(char_directory_tags, list("Pred", "Pred-Pref", "Prey", "Prey-Pref", "Switch", "Non-Vore", "Unset"))
GLOBAL_LIST_INIT(char_directory_erptags, list("Dominant", "Dom-Pref", "Submissive", "Sub-Pref", "Switch", "No ERP", "Unset"))
GLOBAL_LIST_EMPTY(crafting_recipes) //list of all table craft recipes
+
+GLOBAL_LIST_INIT(uplink_locations, list("PDA", "Headset", "None"))
diff --git a/code/_helpers/_lists.dm b/code/_helpers/_lists.dm
index babe0b58d2..9a0a7ec500 100644
--- a/code/_helpers/_lists.dm
+++ b/code/_helpers/_lists.dm
@@ -975,3 +975,10 @@ var/global/list/json_cache = list()
if(islist(value))
new_value = deep_copy_list_alt(value)
copied_list[key_or_value] = new_value
+
+/// Turns an associative list into a flat list of keys
+/proc/assoc_to_keys(list/input)
+ var/list/keys = list()
+ for(var/key in input)
+ UNTYPED_LIST_ADD(keys, key)
+ return keys
diff --git a/code/_helpers/mobs.dm b/code/_helpers/mobs.dm
index 0efc265b49..5c29365452 100644
--- a/code/_helpers/mobs.dm
+++ b/code/_helpers/mobs.dm
@@ -11,7 +11,7 @@
return src
/mob/living/bot/mulebot/get_mob()
- if(load && istype(load, /mob/living))
+ if(load && isliving(load))
return list(src, load)
return src
@@ -167,7 +167,7 @@ Proc for attack log creation, because really why not
//checks whether this item is a module of the robot it is located in.
/proc/is_robot_module(var/obj/item/thing)
- if (!thing || !istype(thing.loc, /mob/living/silicon/robot))
+ if (!thing || !isrobot(thing.loc))
return 0
var/mob/living/silicon/robot/R = thing.loc
return (thing in R.module.modules)
@@ -354,7 +354,7 @@ Proc for attack log creation, because really why not
cached_character_icons[cachekey] = .
/proc/not_has_ooc_text(mob/user)
- if (CONFIG_GET(flag/allow_metadata) && (!user.client?.prefs?.metadata || length(user.client.prefs.metadata) < 15))
+ if (CONFIG_GET(flag/allow_metadata) && (!user.client?.prefs?.read_preference(/datum/preference/text/living/ooc_notes) || length(user.client.prefs.read_preference(/datum/preference/text/living/ooc_notes)) < 15))
to_chat(user, span_warning("Please set informative OOC notes related to RP/ERP preferences. Set them using the 'OOC Notes' button on the 'General' tab in character setup."))
return TRUE
return FALSE
diff --git a/code/_helpers/text.dm b/code/_helpers/text.dm
index 725335f267..910644d63f 100644
--- a/code/_helpers/text.dm
+++ b/code/_helpers/text.dm
@@ -349,7 +349,7 @@ GLOBAL_LIST_EMPTY(text_tag_cache)
if(!(C && C.prefs?.read_preference(/datum/preference/toggle/chat_tags)))
return tagdesc
if(!GLOB.text_tag_cache[tagname])
- var/datum/asset/spritesheet/chatassets = get_asset_datum(/datum/asset/spritesheet/chat)
+ var/datum/asset/spritesheet_batched/chatassets = get_asset_datum(/datum/asset/spritesheet_batched/chat)
GLOB.text_tag_cache[tagname] = chatassets.icon_tag(tagname)
if(!C.tgui_panel.is_ready() || C.tgui_panel.oldchat)
return "
"
@@ -624,5 +624,5 @@ GLOBAL_LIST_EMPTY(text_tag_cache)
/// Removes all non-alphanumerics from the text, keep in mind this can lead to id conflicts
/proc/sanitize_css_class_name(name)
- var/static/regex/regex = new(@"[^a-zA-Z0-9]","g")
- return replacetext(name, regex, "")
+ var/static/regex/regex = new(@"[^a-zA-Z0-9]","g")
+ return replacetext(name, regex, "")
diff --git a/code/_helpers/unsorted.dm b/code/_helpers/unsorted.dm
index 05bfc9a444..9fd1e731d7 100644
--- a/code/_helpers/unsorted.dm
+++ b/code/_helpers/unsorted.dm
@@ -802,7 +802,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
//Move the mobs unless it's an AI eye or other eye type.
for(var/mob/M in T)
- if(istype(M, /mob/observer/eye)) continue // If we need to check for more mobs, I'll add a variable
+ if(isEye(M)) continue // If we need to check for more mobs, I'll add a variable
M.loc = X
if(z_level_change) // Same goes for mobs.
@@ -945,7 +945,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
for(var/mob/M in T)
- if(!istype(M,/mob) || istype(M, /mob/observer/eye)) continue // If we need to check for more mobs, I'll add a variable
+ if(!ismob(M) || isEye(M)) continue // If we need to check for more mobs, I'll add a variable
mobs += M
for(var/mob/M in mobs)
@@ -1248,8 +1248,8 @@ var/mob/dview/dview_mob = new
color = origin.color
set_light(origin.light_range, origin.light_power, origin.light_color)
-/mob/dview/New()
- ..()
+/mob/dview/Initialize()
+ . = ..()
// We don't want to be in any mob lists; we're a dummy not a mob.
mob_list -= src
if(stat == DEAD)
diff --git a/code/_onclick/hud/alien_larva.dm b/code/_onclick/hud/alien_larva.dm
index 123a13819b..e53a1cbd32 100644
--- a/code/_onclick/hud/alien_larva.dm
+++ b/code/_onclick/hud/alien_larva.dm
@@ -12,7 +12,7 @@
using.name = "mov_intent"
using.set_dir(SOUTHWEST)
using.icon = HUD.ui_style
- using.icon_state = (m_intent == "run" ? "running" : "walking")
+ using.icon_state = (m_intent == I_RUN ? "running" : "walking")
using.screen_loc = ui_acti
using.layer = HUD_LAYER
HUD.adding += using
diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm
index 518c3e03c5..2d70678ae0 100644
--- a/code/_onclick/hud/hud.dm
+++ b/code/_onclick/hud/hud.dm
@@ -361,15 +361,51 @@ var/list/global_huds = list(
if(!client)
return 0
- HUD.ui_style = ui_style2icon(client?.prefs?.UI_style)
- HUD.ui_color = client?.prefs?.UI_style_color
- HUD.ui_alpha = client?.prefs?.UI_style_alpha
+ HUD.ui_style = ui_style2icon(read_preference(/datum/preference/choiced/ui_style))
+ HUD.ui_color = read_preference(/datum/preference/color/ui_style_color)
+ HUD.ui_alpha = read_preference(/datum/preference/numeric/ui_style_alpha)
set_hud_used(HUD)
/mob/proc/set_hud_used(datum/hud/new_hud)
hud_used = new_hud
new_hud.build_action_groups()
+/mob/proc/update_ui_style(UI_style_new, UI_style_alpha_new, UI_style_color_new)
+ if(!hud_used)
+ return
+
+ if(!UI_style_alpha_new)
+ UI_style_alpha_new = hud_used.ui_alpha
+ hud_used.ui_alpha = UI_style_alpha_new
+ if(!UI_style_color_new)
+ UI_style_color_new = hud_used.ui_color
+ hud_used.ui_color = UI_style_color_new
+
+ var/list/icons = hud_used.adding + hud_used.other + hud_used.hotkeybuttons
+ icons.Add(zone_sel)
+ icons.Add(gun_setting_icon)
+ icons.Add(item_use_icon)
+ icons.Add(gun_move_icon)
+ icons.Add(radio_use_icon)
+
+ var/icon/ic
+
+ if(UI_style_new)
+ if(isrobot(src))
+ ic = all_ui_styles_robot[UI_style_new]
+ else
+ ic = all_ui_styles[UI_style_new]
+ hud_used.ui_style = ic
+ else
+ ic = hud_used.ui_style
+
+ for(var/obj/screen/I in icons)
+ if(I.name in list(I_HELP, I_HURT, I_DISARM, I_GRAB))
+ continue
+ I.icon = ic
+ I.color = UI_style_color_new
+ I.alpha = UI_style_alpha_new
+
/datum/hud/proc/apply_minihud(var/datum/mini_hud/MH)
if(MH in minihuds)
return
diff --git a/code/_onclick/hud/human.dm b/code/_onclick/hud/human.dm
index dec8ee9178..88b16d6622 100644
--- a/code/_onclick/hud/human.dm
+++ b/code/_onclick/hud/human.dm
@@ -132,7 +132,7 @@
using = new /obj/screen()
using.name = "mov_intent"
using.icon = HUD.ui_style
- using.icon_state = (m_intent == "run" ? "running" : "walking")
+ using.icon_state = (m_intent == I_RUN ? "running" : "walking")
using.screen_loc = ui_movi
using.color = HUD.ui_color
using.alpha = HUD.ui_alpha
diff --git a/code/_onclick/hud/popups_vr.dm b/code/_onclick/hud/popups_vr.dm
index 20dc1963da..260ea2b87b 100644
--- a/code/_onclick/hud/popups_vr.dm
+++ b/code/_onclick/hud/popups_vr.dm
@@ -66,6 +66,6 @@
close_button_y_start = 86
close_button_y_end = 94
-/obj/screen/popup/default/New()
- ..()
- icon_state = "popup[rand(1,10)]"
\ No newline at end of file
+/obj/screen/popup/default/Initialize(mapload)
+ icon_state = "popup[rand(1,10)]"
+ . = ..()
diff --git a/code/_onclick/hud/robot.dm b/code/_onclick/hud/robot.dm
index 4b062a6b5f..2aa272bce5 100644
--- a/code/_onclick/hud/robot.dm
+++ b/code/_onclick/hud/robot.dm
@@ -85,7 +85,7 @@ var/obj/screen/robot_inventory
using = new /obj/screen()
using.name = "mov_intent"
using.icon = HUD.ui_style
- using.icon_state = (m_intent == "run" ? "running" : "walking")
+ using.icon_state = (m_intent == I_RUN ? "running" : "walking")
using.screen_loc = ui_movi
using.color = HUD.ui_color
using.alpha = HUD.ui_alpha
@@ -230,7 +230,7 @@ var/obj/screen/robot_inventory
else if(speed == -1)
using.icon_state = "speed_2"
HUD.control_vtec = using
- m_intent = "run"
+ m_intent = I_RUN
HUD.move_intent.icon_state = "running"
client.screen += HUD.control_vtec
@@ -254,7 +254,7 @@ var/obj/screen/robot_inventory
control_vtec.icon_state = "speed_1"
else if(R.speed == -1)
control_vtec.icon_state = "speed_2"
- R.m_intent = "run"
+ R.m_intent = I_RUN
R.hud_used.move_intent.icon_state = "running"
R.client?.screen += control_vtec
else
diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm
index 4d221c9c4f..63b1d4c09d 100644
--- a/code/_onclick/hud/screen_objects.dm
+++ b/code/_onclick/hud/screen_objects.dm
@@ -291,36 +291,36 @@
var/mob/living/carbon/C = usr
if(C.legcuffed)
to_chat(C, span_notice("You are legcuffed! You cannot run until you get [C.legcuffed] removed!"))
- C.m_intent = "walk" //Just incase
+ C.m_intent = I_WALK //Just incase
C.hud_used.move_intent.icon_state = "walking"
return 1
var/mob/living/L = usr
switch(L.m_intent)
- if("run")
- L.m_intent = "walk"
+ if(I_RUN)
+ L.m_intent = I_WALK
L.hud_used.move_intent.icon_state = "walking"
- if("walk")
- L.m_intent = "run"
+ if(I_WALK)
+ L.m_intent = I_RUN
L.hud_used.move_intent.icon_state = "running"
if("m_intent")
if(!usr.m_int)
switch(usr.m_intent)
- if("run")
+ if(I_RUN)
usr.m_int = "13,14"
- if("walk")
+ if(I_WALK)
usr.m_int = "14,14"
if("face")
usr.m_int = "15,14"
else
usr.m_int = null
- if("walk")
- usr.m_intent = "walk"
+ if(I_WALK)
+ usr.m_intent = I_WALK
usr.m_int = "14,14"
if("face")
usr.m_intent = "face"
usr.m_int = "15,14"
- if("run")
- usr.m_intent = "run"
+ if(I_RUN)
+ usr.m_intent = I_RUN
usr.m_int = "13,14"
if("Reset Machine")
usr.unset_machine()
@@ -390,7 +390,7 @@
contents.Add(0)
// No races breath this, but never know about downstream servers.
- if ("carbon dioxide")
+ if (GAS_CO2)
if(t.air_contents.gas[GAS_CO2] && !t.air_contents.gas[GAS_PHORON])
contents.Add(t.air_contents.gas[GAS_CO2])
else
@@ -532,15 +532,15 @@
to_chat(R, "You haven't selected a module yet.")
if("module1")
- if(istype(usr, /mob/living/silicon/robot))
+ if(isrobot(usr))
usr:toggle_module(1)
if("module2")
- if(istype(usr, /mob/living/silicon/robot))
+ if(isrobot(usr))
usr:toggle_module(2)
if("module3")
- if(istype(usr, /mob/living/silicon/robot))
+ if(isrobot(usr))
usr:toggle_module(3)
if("AI Core")
@@ -776,6 +776,7 @@
var/obj/screen/mapper/extras_holder/extras_holder
/obj/screen/movable/mapper_holder/Initialize(mapload, newowner)
+ . = ..()
owner = newowner
mask_full = new(src) // Full white square mask
diff --git a/code/controllers/autotransfer.dm b/code/controllers/autotransfer.dm
index 4a76dccf63..223ecfc582 100644
--- a/code/controllers/autotransfer.dm
+++ b/code/controllers/autotransfer.dm
@@ -13,6 +13,7 @@ var/datum/controller/transfer_controller/transfer_controller
/datum/controller/transfer_controller/Destroy()
STOP_PROCESSING(SSprocessing, src)
+ ..()
/datum/controller/transfer_controller/process()
currenttick = currenttick + 1
diff --git a/code/controllers/emergency_shuttle_controller.dm b/code/controllers/emergency_shuttle_controller.dm
index 039e81e4a8..2e960a191d 100644
--- a/code/controllers/emergency_shuttle_controller.dm
+++ b/code/controllers/emergency_shuttle_controller.dm
@@ -251,8 +251,8 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle = new
layer = TURF_LAYER
plane = TURF_PLANE
-/obj/effect/bgstar/New()
- ..()
+/obj/effect/bgstar/Initialize()
+ . = ..()
pixel_x += rand(-2,30)
pixel_y += rand(-2,30)
var/starnum = pick("1", "1", "1", "2", "3", "4")
diff --git a/code/controllers/master.dm b/code/controllers/master.dm
index 2e5f80c3d5..ec7f0a61e4 100644
--- a/code/controllers/master.dm
+++ b/code/controllers/master.dm
@@ -19,44 +19,66 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
/// Stack end detector to detect stack overflows that kill the mc's main loop
var/datum/stack_end_detector/stack_end_detector
- // world.time of last fire, for tracking lag outside of the mc
+ /// world.time of last fire, for tracking lag outside of the mc
var/last_run
- // List of subsystems to process().
+ /// List of subsystems to process().
var/list/subsystems
// Vars for keeping track of tick drift.
var/init_timeofday
var/init_time
var/tickdrift = 0
+ /// Tickdrift as of last tick, w no averaging going on
+ var/olddrift = 0
+ /// How long is the MC sleeping between runs, read only (set by Loop() based off of anti-tick-contention heuristics)
var/sleep_delta = 1
- var/make_runtime = 0
+ /// Only run ticker subsystems for the next n ticks.
+ var/skip_ticks = 0
+
+ /// makes the mc main loop runtime
+ var/make_runtime = FALSE
var/initializations_finished_with_no_players_logged_in //I wonder what this could be?
// The type of the last subsystem to be process()'d.
var/last_type_processed
- var/datum/controller/subsystem/queue_head //Start of queue linked list
- var/datum/controller/subsystem/queue_tail //End of queue linked list (used for appending to the list)
+ var/datum/controller/subsystem/queue_head //!Start of queue linked list
+ var/datum/controller/subsystem/queue_tail //!End of queue linked list (used for appending to the list)
var/queue_priority_count = 0 //Running total so that we don't have to loop thru the queue each run to split up the tick
var/queue_priority_count_bg = 0 //Same, but for background subsystems
- var/map_loading = FALSE //Are we loading in a new map?
+ var/map_loading = FALSE //!Are we loading in a new map?
- var/current_runlevel //for scheduling different subsystems for different stages of the round
+ var/current_runlevel //!for scheduling different subsystems for different stages of the round
+
+ /// During initialization, will be the instanced subsytem that is currently initializing.
+ /// Outside of initialization, returns null.
+ var/current_initializing_subsystem = null
var/static/restart_clear = 0
var/static/restart_timeout = 0
var/static/restart_count = 0
- //current tick limit, assigned by the queue controller before running a subsystem.
- //used by check_tick as well so that the procs subsystems call can obey that SS's tick limits
+ var/static/random_seed
+
+ ///current tick limit, assigned before running a subsystem.
+ ///used by CHECK_TICK as well so that the procs subsystems call can obey that SS's tick limits
var/static/current_ticklimit
/datum/controller/master/New()
// Highlander-style: there can only be one! Kill off the old and replace it with the new.
+
+ if(!random_seed)
+ #ifdef UNIT_TESTS
+ random_seed = 29051994 // How about 22475?
+ #else
+ random_seed = rand(1, 1e9)
+ #endif
+ rand_seed(random_seed)
+
var/list/_subsystems = list()
subsystems = _subsystems
if (Master != src)
@@ -84,6 +106,8 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
reverseRange(subsystems)
for(var/datum/controller/subsystem/ss in subsystems)
log_world("Shutting down [ss.name] subsystem...")
+ if (ss.slept_count > 0)
+ log_world("Warning: Subsystem `[ss.name]` slept [ss.slept_count] times.")
ss.Shutdown()
log_world("Shutdown complete")
@@ -178,8 +202,9 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
for (var/datum/controller/subsystem/SS in subsystems)
if (SS.flags & SS_NO_INIT)
continue
- SS.Initialize(REALTIMEOFDAY)
+ init_subsystem(SS)
CHECK_TICK
+ current_initializing_subsystem = null
current_ticklimit = TICK_LIMIT_RUNNING
var/time = (REALTIMEOFDAY - start_timeofday) / 10
@@ -188,7 +213,8 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
log_world(msg)
- send2chat("Server Initialization completed! - Took [time] second[time == 1 ? "" : "s"].", "bot announce")
+ // FIXME: TGS <-> Discord communication; sending message to a TGS chat channel
+ // send2chat("Server Initialization completed! - Took [time] second[time == 1 ? "" : "s"].", "bot announce")
if (!current_runlevel)
SetRunLevel(RUNLEVEL_LOBBY)
@@ -210,6 +236,80 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
// Loop.
Master.StartProcessing(0)
+/**
+ * Initialize a given subsystem and handle the results.
+ *
+ * Arguments:
+ * * subsystem - the subsystem to initialize.
+ */
+/datum/controller/master/proc/init_subsystem(datum/controller/subsystem/subsystem)
+ var/static/list/valid_results = list(
+ SS_INIT_FAILURE,
+ SS_INIT_NONE,
+ SS_INIT_SUCCESS,
+ SS_INIT_NO_NEED,
+ )
+
+ if (subsystem.flags & SS_NO_INIT || subsystem.subsystem_initialized) //Don't init SSs with the corresponding flag or if they already are initialized
+ return
+
+ current_initializing_subsystem = subsystem
+ rustg_time_reset(SS_INIT_TIMER_KEY)
+
+ var/result = subsystem.Initialize()
+
+ // Capture end time
+ var/time = rustg_time_milliseconds(SS_INIT_TIMER_KEY)
+ var/seconds = round(time / 1000, 0.01)
+
+ // Always update the blackbox tally regardless.
+ // SSblackbox.record_feedback("tally", "subsystem_initialize", time, subsystem.name)
+ feedback_set_details("subsystem_initialize", "[time] [subsystem.name]")
+
+ // Gave invalid return value.
+ if(result && !(result in valid_results))
+ warning("[subsystem.name] subsystem initialized, returning invalid result [result]. This is a bug.")
+
+ // just returned ..() or didn't implement Initialize() at all
+ if(result == SS_INIT_NONE)
+ warning("[subsystem.name] subsystem does not implement Initialize() or it returns ..(). If the former is true, the SS_NO_INIT flag should be set for this subsystem.")
+
+ if(result != SS_INIT_FAILURE)
+ // Some form of success, implicit failure, or the SS in unused.
+ subsystem.subsystem_initialized = TRUE
+
+ SEND_SIGNAL(subsystem, COMSIG_SUBSYSTEM_POST_INITIALIZE)
+ else
+ // The subsystem officially reports that it failed to init and wishes to be treated as such.
+ subsystem.subsystem_initialized = FALSE
+ subsystem.can_fire = FALSE
+
+ // The rest of this proc is printing the world log and chat message.
+ var/message_prefix
+
+ // If true, print the chat message with boldwarning text.
+ var/chat_warning = FALSE
+
+ switch(result)
+ if(SS_INIT_FAILURE)
+ message_prefix = "Failed to initialize [subsystem.name] subsystem after"
+ chat_warning = TRUE
+ if(SS_INIT_SUCCESS)
+ message_prefix = "Initialized [subsystem.name] subsystem within"
+ if(SS_INIT_NO_NEED)
+ // This SS is disabled or is otherwise shy.
+ return
+ else
+ // SS_INIT_NONE or an invalid value.
+ message_prefix = "Initialized [subsystem.name] subsystem with errors within"
+ chat_warning = TRUE
+
+ var/message = "[message_prefix] [seconds] second[seconds == 1 ? "" : "s"]!"
+ var/chat_message = chat_warning ? span_boldwarning(message) : span_boldannounce(message)
+
+ to_chat(world, chat_message)
+ log_world(message)
+
/datum/controller/master/proc/SetRunLevel(new_runlevel)
var/old_runlevel = isnull(current_runlevel) ? "NULL" : runlevel_flags[current_runlevel]
testing("MC: Runlevel changed from [old_runlevel] to [new_runlevel]")
diff --git a/code/controllers/subsystem.dm b/code/controllers/subsystem.dm
index 3cd8af77fe..3e5e269057 100644
--- a/code/controllers/subsystem.dm
+++ b/code/controllers/subsystem.dm
@@ -1,36 +1,99 @@
+/**
+ * # Subsystem base class
+ *
+ * Defines a subsystem to be managed by the [Master Controller][/datum/controller/master]
+ *
+ * Simply define a child of this subsystem, using the [SUBSYSTEM_DEF] macro, and the MC will handle registration.
+ * Changing the name is required
+**/
+
/datum/controller/subsystem
// Metadata; you should define these.
- name = "fire coderbus" //name of the subsystem
- var/init_order = INIT_ORDER_DEFAULT //order of initialization. Higher numbers are initialized first, lower numbers later. Can be decimal and negative values.
- var/wait = 20 //time to wait (in deciseconds) between each call to fire(). Must be a positive integer.
- var/priority = FIRE_PRIORITY_DEFAULT //When mutiple subsystems need to run in the same tick, higher priority subsystems will run first and be given a higher share of the tick before MC_TICK_CHECK triggers a sleep
- var/flags = 0 //see MC.dm in __DEFINES Most flags must be set on world start to take full effect. (You can also restart the mc to force them to process again)
- var/subsystem_initialized = FALSE //set to TRUE after it has been initialized, will obviously never be set if the subsystem doesn't initialize
- var/runlevels = RUNLEVELS_DEFAULT //points of the game at which the SS can fire
+ /// Name of the subsystem - you must change this
+ name = "fire coderbus"
- //set to 0 to prevent fire() calls, mostly for admin use or subsystems that may be resumed later
- // use the SS_NO_FIRE flag instead for systems that never fire to keep it from even being added to the list
+ /// Order of initialization. Higher numbers are initialized first, lower numbers later. Use or create defines such as [INIT_ORDER_DEFAULT] so we can see the order in one file.
+ var/init_order = INIT_ORDER_DEFAULT
+
+ /// Time to wait (in deciseconds) between each call to fire(). Must be a positive integer.
+ var/wait = 20
+
+ /// Priority Weight: When mutiple subsystems need to run in the same tick, higher priority subsystems will be given a higher share of the tick before MC_TICK_CHECK triggers a sleep, higher priority subsystems also run before lower priority subsystems.
+ var/priority = FIRE_PRIORITY_DEFAULT
+
+ /// [Subsystem Flags][SS_NO_INIT] to control binary behavior. Flags must be set at compile time or before preinit finishes to take full effect. (You can also restart the mc to force them to process again)
+ var/flags = NONE
+
+ /// This var is set to TRUE after the subsystem has been initialized.
+ var/subsystem_initialized = FALSE
+
+ /// Set to 0 to prevent fire() calls, mostly for admin use or subsystems that may be resumed later
+ /// use the [SS_NO_FIRE] flag instead for systems that never fire to keep it from even being added to list that is checked every tick
var/can_fire = TRUE
- // Bookkeeping variables; probably shouldn't mess with these.
- var/last_fire = 0 //last world.time we called fire()
- var/next_fire = 0 //scheduled world.time for next fire()
- var/cost = 0 //average time to execute
- var/tick_usage = 0 //average tick usage
- var/tick_overrun = 0 //average tick overrun
- var/state = SS_IDLE //tracks the current state of the ss, running, paused, etc.
- var/paused_ticks = 0 //ticks this ss is taking to run right now.
- var/paused_tick_usage //total tick_usage of all of our runs while pausing this run
- var/ticks = 1 //how many ticks does this ss take to run on avg.
- var/times_fired = 0 //number of times we have called fire()
- var/queued_time = 0 //time we entered the queue, (for timing and priority reasons)
- var/queued_priority //we keep a running total to make the math easier, if priority changes mid-fire that would break our running total, so we store it here
- //linked list stuff for the queue
+ ///Bitmap of what game states can this subsystem fire at. See [RUNLEVELS_DEFAULT] for more details.
+ var/runlevels = RUNLEVELS_DEFAULT
+
+ /*
+ * The following variables are managed by the MC and should not be modified directly.
+ */
+
+ /// Last world.time the subsystem completed a run (as in wasn't paused by [MC_TICK_CHECK])
+ var/last_fire = 0
+
+ /// Scheduled world.time for next fire()
+ var/next_fire = 0
+
+ /// Running average of the amount of milliseconds it takes the subsystem to complete a run (including all resumes but not the time spent paused)
+ var/cost = 0
+
+ /// Running average of the amount of tick usage in percents of a tick it takes the subsystem to complete a run
+ var/tick_usage = 0
+
+ /// Running average of the amount of tick usage (in percents of a game tick) the subsystem has spent past its allocated time without pausing
+ var/tick_overrun = 0
+
+ /// How much of a tick (in percents of a tick) were we allocated last fire.
+ var/tick_allocation_last = 0
+
+ /// How much of a tick (in percents of a tick) do we get allocated by the mc on avg.
+ var/tick_allocation_avg = 0
+
+ /// Tracks the current execution state of the subsystem. Used to handle subsystems that sleep in fire so the mc doesn't run them again while they are sleeping
+ var/state = SS_IDLE
+
+ /// Tracks how many times a subsystem has ever slept in fire().
+ var/slept_count = 0
+
+ /// Tracks how many fires the subsystem has consecutively paused on in the current run
+ var/paused_ticks = 0
+
+ /// Tracks how much of a tick the subsystem has consumed in the current run
+ var/paused_tick_usage
+
+ /// Tracks how many fires the subsystem takes to complete a run on average.
+ var/ticks = 1
+
+ /// Tracks the amount of completed runs for the subsystem
+ var/times_fired = 0
+
+ /// Time the subsystem entered the queue, (for timing and priority reasons)
+ var/queued_time = 0
+
+ /// Priority at the time the subsystem entered the queue. Needed to avoid changes in priority (by admins and the like) from breaking things.
+ var/queued_priority
+
+ /// How many times we suspect a subsystem type has crashed the MC, 3 strikes and you're out!
+ var/static/list/failure_strikes
+
+ /// Next subsystem in the queue of subsystems to run this tick
var/datum/controller/subsystem/queue_next
+ /// Previous subsystem in the queue of subsystems to run this tick
var/datum/controller/subsystem/queue_prev
- var/static/list/failure_strikes //How many times we suspect a subsystem type has crashed the MC, 3 strikes and you're out!
+ //Do not blindly add vars here to the bottom, put it where it goes above
+ //If your var only has two values, put it in as a flag.
//Do not override
///datum/controller/subsystem/New()
@@ -41,24 +104,32 @@
/datum/controller/subsystem/proc/PreInit()
return
-//This is used so the mc knows when the subsystem sleeps. do not override.
-/datum/controller/subsystem/proc/ignite(resumed = 0)
+///This is used so the mc knows when the subsystem sleeps. do not override.
+/datum/controller/subsystem/proc/ignite(resumed = FALSE)
+ SHOULD_NOT_OVERRIDE(TRUE)
set waitfor = 0
+ . = SS_IDLE
+
+ tick_allocation_last = Master.current_ticklimit-(TICK_USAGE)
+ tick_allocation_avg = MC_AVERAGE(tick_allocation_avg, tick_allocation_last)
+
. = SS_SLEEPING
fire(resumed)
. = state
if (state == SS_SLEEPING)
+ slept_count++
state = SS_IDLE
if (state == SS_PAUSING)
+ slept_count++
var/QT = queued_time
enqueue()
state = SS_PAUSED
queued_time = QT
-//previously, this would have been named 'process()' but that name is used everywhere for different things!
-//fire() seems more suitable. This is the procedure that gets called every 'wait' deciseconds.
-//Sleeping in here prevents future fires until returned.
-/datum/controller/subsystem/proc/fire(resumed = 0)
+///previously, this would have been named 'process()' but that name is used everywhere for different things!
+///fire() seems more suitable. This is the procedure that gets called every 'wait' deciseconds.
+///Sleeping in here prevents future fires until returned.
+/datum/controller/subsystem/proc/fire(resumed = FALSE)
flags |= SS_NO_FIRE
throw EXCEPTION("Subsystem [src]([type]) does not fire() but did not set the SS_NO_FIRE flag. Please add the SS_NO_FIRE flag to any subsystem that doesn't fire so it doesn't get added to the processing list and waste cpu.")
@@ -66,12 +137,13 @@
dequeue()
can_fire = 0
flags |= SS_NO_FIRE
- Master.subsystems -= src
+ if (Master)
+ Master.subsystems -= src
return ..()
-//Queue it to run.
-// (we loop thru a linked list until we get to the end or find the right point)
-// (this lets us sort our run order correctly without having to re-sort the entire already sorted list)
+///Queue it to run.
+/// (we loop thru a linked list until we get to the end or find the right point)
+/// (this lets us sort our run order correctly without having to re-sort the entire already sorted list)
/datum/controller/subsystem/proc/enqueue()
var/SS_priority = priority
var/SS_flags = flags
@@ -155,14 +227,11 @@
/// Called after the config has been loaded or reloaded.
/datum/controller/subsystem/proc/OnConfigLoad()
-//used to initialize the subsystem AFTER the map has loaded
-/datum/controller/subsystem/Initialize(start_timeofday)
- subsystem_initialized = TRUE
- var/time = (REALTIMEOFDAY - start_timeofday) / 10
- var/msg = "Initialized [name] subsystem within [time] second[time == 1 ? "" : "s"]!"
- to_chat(world, span_boldannounce("[msg]"))
- log_world(msg)
- return time
+/**
+ * Used to initialize the subsystem. This is expected to be overriden by subtypes.
+ */
+/datum/controller/subsystem/Initialize()
+ return SS_INIT_NONE
//hook for printing stats to the "MC" statuspanel for admins to see performance and related stats etc.
/datum/controller/subsystem/stat_entry(msg)
@@ -221,3 +290,9 @@
var/msg = "[name] subsystem received final blame for MC failure"
log_world(msg)
log_game(msg)
+
+/datum/controller/subsystem/vv_edit_var(var_name, var_value)
+ switch (var_name)
+ if (NAMEOF(src, queued_priority)) //editing this breaks things.
+ return FALSE
+ . = ..()
diff --git a/code/controllers/subsystems/air.dm b/code/controllers/subsystems/air.dm
index c4b64ba450..880d829fe9 100644
--- a/code/controllers/subsystems/air.dm
+++ b/code/controllers/subsystems/air.dm
@@ -106,7 +106,8 @@ SUBSYSTEM_DEF(air)
var/current_cycle = 0
var/next_id = 1 //Used to keep track of zone UIDs.
-/datum/controller/subsystem/air/Initialize(timeofday)
+/datum/controller/subsystem/air/Initialize()
+ var/start_timeofday = REALTIMEOFDAY
report_progress("Processing Geometry...")
current_cycle = 0
@@ -116,7 +117,7 @@ SUBSYSTEM_DEF(air)
S.update_air_properties()
CHECK_TICK
- admin_notice(span_danger("Geometry initialized in [round(0.1*(REALTIMEOFDAY-timeofday),0.1)] seconds.") + \
+ admin_notice(span_danger("Geometry initialized in [round(0.1*(REALTIMEOFDAY-start_timeofday),0.1)] seconds.") + \
span_info("
\
Total Simulated Turfs: [simulated_turf_count]
\
Total Zones: [zones.len]
\
@@ -171,7 +172,7 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
log_debug("Active Edges on ZAS Startup\n" + edge_log.Join("\n"))
startup_active_edge_log = edge_log.Copy()
- ..()
+ return SS_INIT_SUCCESS
/datum/controller/subsystem/air/fire(resumed = 0)
var/timer
diff --git a/code/controllers/subsystems/alarm.dm b/code/controllers/subsystems/alarm.dm
index e3507a34e4..25a28ca59e 100644
--- a/code/controllers/subsystems/alarm.dm
+++ b/code/controllers/subsystems/alarm.dm
@@ -18,7 +18,7 @@ SUBSYSTEM_DEF(alarm)
/datum/controller/subsystem/alarm/Initialize()
all_handlers = list(atmosphere_alarm, camera_alarm, fire_alarm, motion_alarm, power_alarm)
- . = ..()
+ return SS_INIT_SUCCESS
/datum/controller/subsystem/alarm/fire(resumed = FALSE)
if(!resumed)
diff --git a/code/controllers/subsystems/atoms.dm b/code/controllers/subsystems/atoms.dm
index 5968fe1fe3..81e4d217a5 100644
--- a/code/controllers/subsystems/atoms.dm
+++ b/code/controllers/subsystems/atoms.dm
@@ -17,13 +17,13 @@ SUBSYSTEM_DEF(atoms)
var/list/BadInitializeCalls = list()
-/datum/controller/subsystem/atoms/Initialize(timeofday)
+/datum/controller/subsystem/atoms/Initialize()
setupgenetics() //to set the mutations' place in structural enzymes, so initializers know where to put mutations.
initialized = INITIALIZATION_INNEW_MAPLOAD
to_world_log("Initializing objects")
admin_notice(span_danger("Initializing objects"), R_DEBUG)
InitializeAtoms()
- return ..()
+ return SS_INIT_SUCCESS
/datum/controller/subsystem/atoms/proc/InitializeAtoms(list/atoms)
if(initialized == INITIALIZATION_INSSATOMS)
diff --git a/code/controllers/subsystems/character_setup.dm b/code/controllers/subsystems/character_setup.dm
index fdad93fbbb..272cd0b8ab 100644
--- a/code/controllers/subsystems/character_setup.dm
+++ b/code/controllers/subsystems/character_setup.dm
@@ -2,7 +2,7 @@ SUBSYSTEM_DEF(character_setup)
name = "Character Setup"
init_order = INIT_ORDER_DEFAULT
priority = FIRE_PRIORITY_CHARSETUP
- flags = SS_BACKGROUND
+ flags = SS_BACKGROUND | SS_NO_INIT
wait = 1 SECOND
runlevels = RUNLEVEL_LOBBY | RUNLEVELS_DEFAULT
diff --git a/code/controllers/subsystems/chemistry.dm b/code/controllers/subsystems/chemistry.dm
index e31b71dc00..f31441e34c 100644
--- a/code/controllers/subsystems/chemistry.dm
+++ b/code/controllers/subsystems/chemistry.dm
@@ -18,7 +18,7 @@ SUBSYSTEM_DEF(chemistry)
/datum/controller/subsystem/chemistry/Initialize()
initialize_chemical_reagents()
initialize_chemical_reactions()
- ..()
+ return SS_INIT_SUCCESS
/datum/controller/subsystem/chemistry/stat_entry(msg)
msg = "C: [chemical_reagents.len] | R: [chemical_reactions.len]"
diff --git a/code/controllers/subsystems/circuits.dm b/code/controllers/subsystems/circuits.dm
index ca080a3d81..2e555b293d 100644
--- a/code/controllers/subsystems/circuits.dm
+++ b/code/controllers/subsystems/circuits.dm
@@ -17,9 +17,9 @@ SUBSYSTEM_DEF(circuit)
/datum/controller/subsystem/circuit/Recover()
flags |= SS_NO_INIT // Make extra sure we don't initialize twice.
-/datum/controller/subsystem/circuit/Initialize(timeofday)
+/datum/controller/subsystem/circuit/Initialize()
circuits_init()
- return ..()
+ return SS_INIT_SUCCESS
/datum/controller/subsystem/circuit/proc/circuits_init()
//Cached lists for free performance
diff --git a/code/controllers/subsystems/events.dm b/code/controllers/subsystems/events.dm
index 5bdf83fdec..2e91ad3b15 100644
--- a/code/controllers/subsystems/events.dm
+++ b/code/controllers/subsystems/events.dm
@@ -21,7 +21,7 @@ SUBSYSTEM_DEF(events)
)
if(global.using_map.use_overmap)
GLOB.overmap_event_handler.create_events(global.using_map.overmap_z, global.using_map.overmap_size, global.using_map.overmap_event_areas)
- return ..()
+ return SS_INIT_SUCCESS
/datum/controller/subsystem/events/fire(resumed)
if (!resumed)
diff --git a/code/controllers/subsystems/game_master.dm b/code/controllers/subsystems/game_master.dm
index 11844b4f98..064c4307e6 100644
--- a/code/controllers/subsystems/game_master.dm
+++ b/code/controllers/subsystems/game_master.dm
@@ -36,7 +36,7 @@ SUBSYSTEM_DEF(game_master)
if(config && !config.enable_game_master)
can_fire = FALSE
- return ..()
+ return SS_INIT_SUCCESS
/datum/controller/subsystem/game_master/fire(resumed)
adjust_staleness(1)
diff --git a/code/controllers/subsystems/holomaps.dm b/code/controllers/subsystems/holomaps.dm
index 5fcca27480..9275172973 100644
--- a/code/controllers/subsystems/holomaps.dm
+++ b/code/controllers/subsystems/holomaps.dm
@@ -14,9 +14,9 @@ SUBSYSTEM_DEF(holomaps)
/datum/controller/subsystem/holomaps/Recover()
flags |= SS_NO_INIT // Make extra sure we don't initialize twice.
-/datum/controller/subsystem/holomaps/Initialize(timeofday)
+/datum/controller/subsystem/holomaps/Initialize()
generateHoloMinimaps()
- . = ..()
+ return SS_INIT_SUCCESS
/datum/controller/subsystem/holomaps/stat_entry(msg)
if (!Debug2)
diff --git a/code/controllers/subsystems/input.dm b/code/controllers/subsystems/input.dm
index 62fe0184ff..70d1f9cda6 100644
--- a/code/controllers/subsystems/input.dm
+++ b/code/controllers/subsystems/input.dm
@@ -2,7 +2,7 @@ SUBSYSTEM_DEF(input)
name = "Input"
wait = 1 // SS_TICKER means this runs every tick
init_order = INIT_ORDER_INPUT
- flags = SS_TICKER
+ flags = SS_TICKER | SS_NO_INIT
priority = FIRE_PRIORITY_INPUT
runlevels = RUNLEVELS_DEFAULT | RUNLEVEL_LOBBY
diff --git a/code/controllers/subsystems/job.dm b/code/controllers/subsystems/job.dm
index d2f7e72bc9..c86d108415 100644
--- a/code/controllers/subsystems/job.dm
+++ b/code/controllers/subsystems/job.dm
@@ -11,12 +11,12 @@ SUBSYSTEM_DEF(job)
var/debug_messages = FALSE
-/datum/controller/subsystem/job/Initialize(timeofday)
+/datum/controller/subsystem/job/Initialize()
if(!department_datums.len)
setup_departments()
if(!occupations.len)
setup_occupations()
- return ..()
+ return SS_INIT_SUCCESS
/datum/controller/subsystem/job/proc/setup_occupations(faction = FACTION_STATION)
occupations = list()
diff --git a/code/controllers/subsystems/lighting.dm b/code/controllers/subsystems/lighting.dm
index d9643c15ba..9bc179c278 100644
--- a/code/controllers/subsystems/lighting.dm
+++ b/code/controllers/subsystems/lighting.dm
@@ -12,7 +12,7 @@ SUBSYSTEM_DEF(lighting)
return ..()
-/datum/controller/subsystem/lighting/Initialize(timeofday)
+/datum/controller/subsystem/lighting/Initialize()
if(!subsystem_initialized)
if (CONFIG_GET(flag/starlight))
for(var/area/A in world)
@@ -24,7 +24,7 @@ SUBSYSTEM_DEF(lighting)
fire(FALSE, TRUE)
- return ..()
+ return SS_INIT_SUCCESS
/datum/controller/subsystem/lighting/fire(resumed, init_tick_checks)
MC_SPLIT_TICK_INIT(3)
diff --git a/code/controllers/subsystems/machines.dm b/code/controllers/subsystems/machines.dm
index dea5b7ccc3..70f913be52 100644
--- a/code/controllers/subsystems/machines.dm
+++ b/code/controllers/subsystems/machines.dm
@@ -30,12 +30,12 @@ SUBSYSTEM_DEF(machines)
var/list/powernets = list()
var/list/powerobjs = list()
-/datum/controller/subsystem/machines/Initialize(timeofday)
+/datum/controller/subsystem/machines/Initialize()
makepowernets()
admin_notice(span_danger("Initializing atmos machinery."), R_DEBUG)
setup_atmos_machinery(all_machines)
fire()
- ..()
+ return SS_INIT_SUCCESS
/datum/controller/subsystem/machines/fire(resumed = 0)
var/timer = TICK_USAGE
diff --git a/code/controllers/subsystems/mapping.dm b/code/controllers/subsystems/mapping.dm
index 42e1de651c..4b0beb2485 100644
--- a/code/controllers/subsystems/mapping.dm
+++ b/code/controllers/subsystems/mapping.dm
@@ -12,7 +12,7 @@ SUBSYSTEM_DEF(mapping)
flags |= SS_NO_INIT // Make extra sure we don't initialize twice.
shelter_templates = SSmapping.shelter_templates
-/datum/controller/subsystem/mapping/Initialize(timeofday)
+/datum/controller/subsystem/mapping/Initialize()
if(subsystem_initialized)
return
world.max_z_changed() // This is to set up the player z-level list, maxz hasn't actually changed (probably)
@@ -29,7 +29,7 @@ SUBSYSTEM_DEF(mapping)
// Lateload Code related to Expedition areas.
if(using_map) // VOREStation Edit: Re-enable this.
loadLateMaps()
- ..()
+ return SS_INIT_SUCCESS
/datum/controller/subsystem/mapping/proc/load_map_templates()
for(var/datum/map_template/template as anything in subtypesof(/datum/map_template))
diff --git a/code/controllers/subsystems/media_tracks.dm b/code/controllers/subsystems/media_tracks.dm
index 9aa59f95fe..d9b27a3c76 100644
--- a/code/controllers/subsystems/media_tracks.dm
+++ b/code/controllers/subsystems/media_tracks.dm
@@ -10,10 +10,10 @@ SUBSYSTEM_DEF(media_tracks)
/// Lobby music tracks
var/list/lobby_tracks = list()
-/datum/controller/subsystem/media_tracks/Initialize(timeofday)
+/datum/controller/subsystem/media_tracks/Initialize()
load_tracks()
sort_tracks()
- return ..()
+ return SS_INIT_SUCCESS
/datum/controller/subsystem/media_tracks/proc/load_tracks()
for(var/filename in CONFIG_GET(str_list/jukebox_track_files))
diff --git a/code/controllers/subsystems/nightshift.dm b/code/controllers/subsystems/nightshift.dm
index 4cfddfec0f..882016e081 100644
--- a/code/controllers/subsystems/nightshift.dm
+++ b/code/controllers/subsystems/nightshift.dm
@@ -17,7 +17,7 @@ SUBSYSTEM_DEF(nightshift)
if(config.randomize_shift_time)
GLOB.gametime_offset = rand(0, 23) HOURS
*/
- return ..()
+ return SS_INIT_SUCCESS
/datum/controller/subsystem/nightshift/fire(resumed = FALSE)
if(round_duration_in_ds < nightshift_first_check)
diff --git a/code/controllers/subsystems/overlays.dm b/code/controllers/subsystems/overlays.dm
index 0a953e9782..012b6f10e7 100644
--- a/code/controllers/subsystems/overlays.dm
+++ b/code/controllers/subsystems/overlays.dm
@@ -28,9 +28,9 @@ SUBSYSTEM_DEF(overlays)
CHECK_TICK
-/datum/controller/subsystem/overlays/Initialize(timeofday)
+/datum/controller/subsystem/overlays/Initialize()
fire(FALSE, TRUE)
- ..()
+ return SS_INIT_SUCCESS
/datum/controller/subsystem/overlays/stat_entry(msg)
msg = "Queued Atoms: [queue.len], Cache Size: [cache_size]"
diff --git a/code/controllers/subsystems/overmap_renamer_vr.dm b/code/controllers/subsystems/overmap_renamer_vr.dm
index 0180b89355..d82aadbfcb 100644
--- a/code/controllers/subsystems/overmap_renamer_vr.dm
+++ b/code/controllers/subsystems/overmap_renamer_vr.dm
@@ -10,10 +10,9 @@ SUBSYSTEM_DEF(overmap_renamer)
-/datum/controller/subsystem/overmap_renamer/Initialize(timeofday)
+/datum/controller/subsystem/overmap_renamer/Initialize()
update_names()
-
- ..()
+ return SS_INIT_SUCCESS
/*Shouldn't be a switch statement. We want ALL of the if(map_template.name in visitable_z_leves_name_list) to fire
if we end up with multiple renamable lateload overmap objects.*/
diff --git a/code/controllers/subsystems/persistence.dm b/code/controllers/subsystems/persistence.dm
index 1950e90e14..69a92f14e2 100644
--- a/code/controllers/subsystems/persistence.dm
+++ b/code/controllers/subsystems/persistence.dm
@@ -11,12 +11,12 @@ SUBSYSTEM_DEF(persistence)
var/list/unpicked_paintings = list()
/datum/controller/subsystem/persistence/Initialize()
- . = ..()
for(var/datum/persistent/P as anything in subtypesof(/datum/persistent))
if(initial(P.name))
P = new P
persistence_datums[P.type] = P
P.Initialize()
+ return SS_INIT_SUCCESS
/datum/controller/subsystem/persistence/Shutdown()
for(var/thing in persistence_datums)
diff --git a/code/controllers/subsystems/planets.dm b/code/controllers/subsystems/planets.dm
index 2054d6daa7..fa4cf68068 100644
--- a/code/controllers/subsystems/planets.dm
+++ b/code/controllers/subsystems/planets.dm
@@ -14,10 +14,10 @@ SUBSYSTEM_DEF(planets)
var/static/list/needs_sun_update = list()
var/static/list/needs_temp_update = list()
-/datum/controller/subsystem/planets/Initialize(timeofday)
+/datum/controller/subsystem/planets/Initialize()
admin_notice(span_danger("Initializing planetary weather."), R_DEBUG)
createPlanets()
- ..()
+ return SS_INIT_SUCCESS
/datum/controller/subsystem/planets/proc/createPlanets()
var/list/planet_datums = using_map.planet_datums_to_make
diff --git a/code/controllers/subsystems/plants.dm b/code/controllers/subsystems/plants.dm
index b46cc00172..300f19da7c 100644
--- a/code/controllers/subsystems/plants.dm
+++ b/code/controllers/subsystems/plants.dm
@@ -26,9 +26,9 @@ SUBSYSTEM_DEF(plants)
msg = "P:[processing.len]|S:[seeds.len]"
return ..()
-/datum/controller/subsystem/plants/Initialize(timeofday)
+/datum/controller/subsystem/plants/Initialize()
setup()
- return ..()
+ return SS_INIT_SUCCESS
// Predefined/roundstart varieties use a string key to make it
// easier to grab the new variety when mutating. Post-roundstart
diff --git a/code/controllers/subsystems/player_tips.dm b/code/controllers/subsystems/player_tips.dm
index 7ac58b52bd..8afa6cc5b5 100644
--- a/code/controllers/subsystems/player_tips.dm
+++ b/code/controllers/subsystems/player_tips.dm
@@ -1,16 +1,12 @@
-/*
-Player tips procs and lists are defined under /code/modules/player_tips_vr
-*/
+/// Player tips procs and lists are defined under /code/modules/player_tips_vr
SUBSYSTEM_DEF(player_tips)
name = "Periodic Player Tips"
priority = FIRE_PRIORITY_PLAYERTIPS
runlevels = RUNLEVEL_GAME
-
wait = 3000 //We check if it's time to send a tip every 5 minutes (300 seconds)
+ flags = SS_NO_INIT
+
var/static/datum/player_tips/player_tips = new
-
-
-
/datum/controller/subsystem/player_tips/fire()
player_tips.send_tips()
diff --git a/code/controllers/subsystems/processing/fastprocess.dm b/code/controllers/subsystems/processing/fastprocess.dm
index bda0bb6fb6..407477f9b0 100644
--- a/code/controllers/subsystems/processing/fastprocess.dm
+++ b/code/controllers/subsystems/processing/fastprocess.dm
@@ -4,6 +4,7 @@ PROCESSING_SUBSYSTEM_DEF(fastprocess)
name = "Fast Processing"
wait = 2
stat_tag = "FP"
+ flags = SS_NO_INIT
/datum/controller/subsystem/processing/fastprocess/Recover()
log_debug("[name] subsystem Recover().")
@@ -12,4 +13,4 @@ PROCESSING_SUBSYSTEM_DEF(fastprocess)
var/list/old_processing = SSfastprocess.processing.Copy()
for(var/datum/D in old_processing)
if(CHECK_BITFIELD(D.datum_flags, DF_ISPROCESSING))
- processing |= D
\ No newline at end of file
+ processing |= D
diff --git a/code/controllers/subsystems/processing/instruments.dm b/code/controllers/subsystems/processing/instruments.dm
index 72770ea39b..e3a4802f11 100644
--- a/code/controllers/subsystems/processing/instruments.dm
+++ b/code/controllers/subsystems/processing/instruments.dm
@@ -24,7 +24,7 @@ PROCESSING_SUBSYSTEM_DEF(instruments)
/datum/controller/subsystem/processing/instruments/Initialize()
initialize_instrument_data()
synthesizer_instrument_ids = get_allowed_instrument_ids()
- return ..()
+ return SS_INIT_SUCCESS
/datum/controller/subsystem/processing/instruments/proc/on_song_new(datum/song/S)
songs += S
diff --git a/code/controllers/subsystems/processing/turfs.dm b/code/controllers/subsystems/processing/turfs.dm
index d28f4b4809..509ec4f17b 100644
--- a/code/controllers/subsystems/processing/turfs.dm
+++ b/code/controllers/subsystems/processing/turfs.dm
@@ -1,6 +1,7 @@
PROCESSING_SUBSYSTEM_DEF(turfs)
name = "Turf Processing"
wait = 20
+ flags = SS_NO_INIT
/datum/controller/subsystem/processing/turfs/Recover()
log_debug("[name] subsystem Recover().")
@@ -11,4 +12,4 @@ PROCESSING_SUBSYSTEM_DEF(turfs)
if(!isturf(D))
log_debug("[name] subsystem Recover() found inappropriate item in list: [D.type]")
if(CHECK_BITFIELD(D.datum_flags, DF_ISPROCESSING))
- processing |= D
\ No newline at end of file
+ processing |= D
diff --git a/code/controllers/subsystems/robot_sprites.dm b/code/controllers/subsystems/robot_sprites.dm
index 88fa331451..d6d38ab50f 100644
--- a/code/controllers/subsystems/robot_sprites.dm
+++ b/code/controllers/subsystems/robot_sprites.dm
@@ -8,7 +8,7 @@ SUBSYSTEM_DEF(robot_sprites)
/datum/controller/subsystem/robot_sprites/Initialize()
initialize_borg_sprites()
- ..()
+ return SS_INIT_SUCCESS
/datum/controller/subsystem/robot_sprites/proc/initialize_borg_sprites()
diff --git a/code/controllers/subsystems/server_maint.dm b/code/controllers/subsystems/server_maint.dm
index e8d10d6748..20cd2760db 100644
--- a/code/controllers/subsystems/server_maint.dm
+++ b/code/controllers/subsystems/server_maint.dm
@@ -18,7 +18,7 @@ SUBSYSTEM_DEF(server_maint)
/*/datum/controller/subsystem/server_maint/PreInit()
world.hub_password = "" *///quickly! before the hubbies see us.
-/datum/controller/subsystem/server_maint/New()
+/datum/controller/subsystem/server_maint/Initialize()
if (fexists("tmp/"))
fdel("tmp/")
//if (CONFIG_GET(flag/hub))
diff --git a/code/controllers/subsystems/shuttles.dm b/code/controllers/subsystems/shuttles.dm
index 02f9cb91eb..ebd4cdcc5c 100644
--- a/code/controllers/subsystems/shuttles.dm
+++ b/code/controllers/subsystems/shuttles.dm
@@ -32,7 +32,7 @@ SUBSYSTEM_DEF(shuttles)
var/tmp/list/current_run // Shuttles remaining to process this fire() tick
-/datum/controller/subsystem/shuttles/Initialize(timeofday)
+/datum/controller/subsystem/shuttles/Initialize()
last_landmark_registration_time = world.time
// Find all declared shuttle datums and initailize them. (Okay, queue them for initialization a few lines further down)
for(var/shuttle_type in subtypesof(/datum/shuttle)) // This accounts for most shuttles, though away maps can queue up more.
@@ -43,7 +43,7 @@ SUBSYSTEM_DEF(shuttles)
LAZYDISTINCTADD(shuttles_to_initialize, shuttle_type)
block_init_queue = FALSE
process_init_queues()
- return ..()
+ return SS_INIT_SUCCESS
/datum/controller/subsystem/shuttles/fire(resumed = 0)
if (!resumed)
diff --git a/code/controllers/subsystems/skybox.dm b/code/controllers/subsystems/skybox.dm
index 52065ad241..a1f6dcf11a 100644
--- a/code/controllers/subsystems/skybox.dm
+++ b/code/controllers/subsystems/skybox.dm
@@ -28,7 +28,7 @@ SUBSYSTEM_DEF(skybox)
normal_space.layer = TURF_LAYER
normal_space.icon = 'icons/turf/space.dmi'
normal_space.icon_state = "white"
-
+
//Static
for (var/i in 0 to 25)
var/mutable_appearance/MA = new(normal_space)
@@ -36,12 +36,12 @@ SUBSYSTEM_DEF(skybox)
im.plane = DUST_PLANE
im.alpha = 128 //80
im.blend_mode = BLEND_ADD
-
+
MA.cut_overlays()
MA.add_overlay(im)
dust_cache["[i]"] = MA
-
+
//Moving
for (var/i in 0 to 14)
// NORTH/SOUTH
@@ -57,12 +57,12 @@ SUBSYSTEM_DEF(skybox)
im = image('icons/turf/space_dust_transit.dmi', "speedspace_ew_[i]")
im.plane = DUST_PLANE
im.blend_mode = BLEND_ADD
-
+
MA.cut_overlays()
MA.add_overlay(im)
-
+
speedspace_cache["EW_[i]"] = MA
-
+
//Over-the-edge images
for (var/dir in alldirs)
var/mutable_appearance/MA = new(normal_space)
@@ -90,7 +90,7 @@ SUBSYSTEM_DEF(skybox)
. = ..()
/datum/controller/subsystem/skybox/Initialize()
- . = ..()
+ return SS_INIT_SUCCESS
/datum/controller/subsystem/skybox/proc/get_skybox(z)
if(!subsystem_initialized)
@@ -101,9 +101,9 @@ SUBSYSTEM_DEF(skybox)
/datum/controller/subsystem/skybox/proc/generate_skybox(z)
var/datum/skybox_settings/settings = global.using_map.get_skybox_datum(z)
-
+
var/new_overlays = list()
-
+
var/image/res = image(settings.icon)
res.appearance_flags = KEEP_TOGETHER
@@ -136,7 +136,7 @@ SUBSYSTEM_DEF(skybox)
for(var/datum/event/E in SSevents.active_events)
if(E.has_skybox_image && E.isRunning && (z in E.affecting_z))
new_overlays += E.get_skybox_image()
-
+
for(var/image/I in new_overlays)
I.appearance_flags |= RESET_COLOR
@@ -161,7 +161,7 @@ SUBSYSTEM_DEF(skybox)
var/icon_state = "dyable"
var/color
var/random_color = FALSE
-
+
var/use_stars = TRUE
var/star_icon = 'icons/skybox/skybox.dmi'
var/star_state = "stars"
diff --git a/code/controllers/subsystems/sounds.dm b/code/controllers/subsystems/sounds.dm
index 7d94a3d21d..9067c077da 100644
--- a/code/controllers/subsystems/sounds.dm
+++ b/code/controllers/subsystems/sounds.dm
@@ -25,7 +25,7 @@ SUBSYSTEM_DEF(sounds)
/datum/controller/subsystem/sounds/Initialize()
setup_available_channels()
- return ..()
+ return SS_INIT_SUCCESS
/datum/controller/subsystem/sounds/proc/setup_available_channels()
channel_list = list()
diff --git a/code/controllers/subsystems/sqlite.dm b/code/controllers/subsystems/sqlite.dm
index b4074b3355..a2e9b2864a 100644
--- a/code/controllers/subsystems/sqlite.dm
+++ b/code/controllers/subsystems/sqlite.dm
@@ -7,11 +7,11 @@ SUBSYSTEM_DEF(sqlite)
flags = SS_NO_FIRE
var/database/sqlite_db = null
-/datum/controller/subsystem/sqlite/Initialize(timeofday)
+/datum/controller/subsystem/sqlite/Initialize()
connect()
if(sqlite_db)
init_schema(sqlite_db)
- return ..()
+ return SS_INIT_SUCCESS
/datum/controller/subsystem/sqlite/proc/connect()
if(!CONFIG_GET(flag/sqlite_enabled))
diff --git a/code/controllers/subsystems/sun.dm b/code/controllers/subsystems/sun.dm
index 551130a20b..bedb33ed13 100644
--- a/code/controllers/subsystems/sun.dm
+++ b/code/controllers/subsystems/sun.dm
@@ -1,6 +1,7 @@
SUBSYSTEM_DEF(sun)
name = "Sun"
wait = 600
+ flags = SS_NO_INIT
var/static/datum/sun/sun = new
/datum/controller/subsystem/sun/fire()
diff --git a/code/controllers/subsystems/supply.dm b/code/controllers/subsystems/supply.dm
index e7ead3b770..9dbefd3684 100644
--- a/code/controllers/subsystems/supply.dm
+++ b/code/controllers/subsystems/supply.dm
@@ -33,7 +33,7 @@ SUBSYSTEM_DEF(supply)
else
qdel(P)
- . = ..()
+ return SS_INIT_SUCCESS
// Supply shuttle ticker - handles supply point regeneration. Just add points over time.
/datum/controller/subsystem/supply/fire()
diff --git a/code/controllers/subsystems/ticker.dm b/code/controllers/subsystems/ticker.dm
index 2daf0413e2..c006df4b0c 100644
--- a/code/controllers/subsystems/ticker.dm
+++ b/code/controllers/subsystems/ticker.dm
@@ -61,7 +61,7 @@ var/global/datum/controller/subsystem/ticker/ticker
)
)
GLOB.autospeaker = new (null, null, null, 1) //Set up Global Announcer
- return ..()
+ return SS_INIT_SUCCESS
/datum/controller/subsystem/ticker/fire(resumed = FALSE)
switch(current_state)
@@ -463,7 +463,7 @@ var/global/datum/controller/subsystem/ticker/ticker
//VOREStation Addition End
if(captainless)
for(var/mob/M in player_list)
- if(!istype(M,/mob/new_player))
+ if(!isnewplayer(M))
to_chat(M, span_notice("Site Management is not forced on anyone."))
@@ -485,7 +485,7 @@ var/global/datum/controller/subsystem/ticker/ticker
else
to_chat(Player, span_filter_system(span_blue(span_bold("You missed the crew transfer after the events on [station_name()] as [Player.real_name]."))))
else
- if(istype(Player,/mob/observer/dead))
+ if(isobserver(Player))
var/mob/observer/dead/O = Player
if(!O.started_as_observer)
to_chat(Player, span_filter_system(span_red(span_bold("You did not survive the events on [station_name()]..."))))
diff --git a/code/controllers/subsystems/transcore_vr.dm b/code/controllers/subsystems/transcore_vr.dm
index 7bb0d7d6cb..7c0a35257c 100644
--- a/code/controllers/subsystems/transcore_vr.dm
+++ b/code/controllers/subsystems/transcore_vr.dm
@@ -36,7 +36,7 @@ SUBSYSTEM_DEF(transcore)
warning("Instantiated transcore DB without a key: [t]")
continue
databases[db.key] = db
- return ..()
+ return SS_INIT_SUCCESS
/datum/controller/subsystem/transcore/fire(resumed = 0)
var/timer = TICK_USAGE
diff --git a/code/controllers/subsystems/vis_overlays.dm b/code/controllers/subsystems/vis_overlays.dm
index 82a652f00c..61cb58170a 100644
--- a/code/controllers/subsystems/vis_overlays.dm
+++ b/code/controllers/subsystems/vis_overlays.dm
@@ -9,7 +9,7 @@ SUBSYSTEM_DEF(vis_overlays)
/datum/controller/subsystem/vis_overlays/Initialize()
vis_overlay_cache = list()
- return ..()
+ return SS_INIT_SUCCESS
/datum/controller/subsystem/vis_overlays/fire(resumed = FALSE)
if(!resumed)
@@ -82,7 +82,7 @@ SUBSYSTEM_DEF(vis_overlays)
if(istext(icon))
iconstate = icon
icon = src.icon
-
+
return SSvis_overlays.add_vis_overlay(src, icon, iconstate, layer, plane, dir, alpha, add_appearance_flags, add_vis_flags, unique)
/atom/proc/remove_vis_overlay(list/overlays)
diff --git a/code/controllers/subsystems/webhooks.dm b/code/controllers/subsystems/webhooks.dm
index d9b75805af..a47e8933d9 100644
--- a/code/controllers/subsystems/webhooks.dm
+++ b/code/controllers/subsystems/webhooks.dm
@@ -6,7 +6,7 @@ SUBSYSTEM_DEF(webhooks)
/datum/controller/subsystem/webhooks/Initialize()
load_webhooks()
- . = ..()
+ return SS_INIT_SUCCESS
/datum/controller/subsystem/webhooks/proc/load_webhooks()
diff --git a/code/controllers/subsystems/xenoarch.dm b/code/controllers/subsystems/xenoarch.dm
index 45a437b966..a0e3991530 100644
--- a/code/controllers/subsystems/xenoarch.dm
+++ b/code/controllers/subsystems/xenoarch.dm
@@ -14,9 +14,9 @@ SUBSYSTEM_DEF(xenoarch)
var/list/artifact_spawning_turfs = list()
var/list/digsite_spawning_turfs = list()
-/datum/controller/subsystem/xenoarch/Initialize(timeofday)
+/datum/controller/subsystem/xenoarch/Initialize()
SetupXenoarch()
- ..()
+ return SS_INIT_SUCCESS
/datum/controller/subsystem/xenoarch/Recover()
if (istype(SSxenoarch.artifact_spawning_turfs))
diff --git a/code/datums/chat_message.dm b/code/datums/chat_message.dm
index f216ae01cf..b5c41302ba 100644
--- a/code/datums/chat_message.dm
+++ b/code/datums/chat_message.dm
@@ -368,10 +368,10 @@ var/list/runechat_image_cache = list()
return world.icon_size * 0.95
/atom/movable/runechat_x_offset(width, height)
- return (width - bound_width) * -0.5
+ return (width - bound_width) * -0.5 + get_oversized_icon_offsets()["x"]
/atom/movable/runechat_y_offset(width, height)
- return bound_height * 0.95
+ return bound_height * 0.95 + get_oversized_icon_offsets()["y"]
/* Nothing special
/mob/runechat_x_offset(width, height)
diff --git a/code/datums/colormate.dm b/code/datums/colormate.dm
index 3bb625b7b1..c82f09a11c 100644
--- a/code/datums/colormate.dm
+++ b/code/datums/colormate.dm
@@ -90,10 +90,10 @@
if("paint")
do_paint(inserted)
temp = "Painted Successfully!"
- if(istype(inserted, /mob/living/simple_mob))
+ if(isanimal(inserted))
var/mob/living/simple_mob/M = inserted
M.has_recoloured = TRUE
- if(istype(inserted, /mob/living/silicon/robot))
+ if(isrobot(inserted))
var/mob/living/silicon/robot/R = inserted
R.has_recoloured = TRUE
Destroy()
diff --git a/code/datums/datum.dm b/code/datums/datum.dm
index 2c37b78811..95e77fa9a3 100644
--- a/code/datums/datum.dm
+++ b/code/datums/datum.dm
@@ -86,7 +86,7 @@
* Returns [QDEL_HINT_QUEUE]
*/
/datum/proc/Destroy(force=FALSE)
- //SHOULD_CALL_PARENT(TRUE)
+ SHOULD_CALL_PARENT(TRUE)
//SHOULD_NOT_SLEEP(TRUE)
tag = null
weak_reference = null //ensure prompt GCing of weakref.
diff --git a/code/datums/diseases/_disease.dm b/code/datums/diseases/_disease.dm
index 492884b12a..48552997fb 100644
--- a/code/datums/diseases/_disease.dm
+++ b/code/datums/diseases/_disease.dm
@@ -135,7 +135,7 @@ GLOBAL_LIST_INIT(diseases, subtypesof(/datum/disease))
break
var/direction = get_dir(current, target)
var/turf/next = get_step(current, direction)
- if(!current.CanZASPass() || !next.CanZASPass(get_turf(turn(direction, 100))))
+ if(!current.CanZASPass(next))
break
current = next
diff --git a/code/datums/helper_datums/teleport.dm b/code/datums/helper_datums/teleport.dm
index 07f4301ca2..994dd65b2f 100644
--- a/code/datums/helper_datums/teleport.dm
+++ b/code/datums/helper_datums/teleport.dm
@@ -167,7 +167,7 @@ var/bluespace_item_types = newlist(/obj/item/storage/backpack/holding,
bluespace_things |= teleatom.search_contents_for(item)
//VOREStation Addition Start: Prevent taurriding abuse
- if(istype(teleatom, /mob/living))
+ if(isliving(teleatom))
var/mob/living/L = teleatom
if(LAZYLEN(L.buckled_mobs))
for(var/mob/rider in L.buckled_mobs)
@@ -177,7 +177,7 @@ var/bluespace_item_types = newlist(/obj/item/storage/backpack/holding,
if(bluespace_things.len)
precision = max(rand(1,100)*bluespace_things.len,100)
- if(istype(teleatom, /mob/living))
+ if(isliving(teleatom))
var/mob/living/MM = teleatom
to_chat(MM, span_danger("The Bluespace interface on your [teleatom] interferes with the teleport!"))
return 1
@@ -188,7 +188,7 @@ var/bluespace_item_types = newlist(/obj/item/storage/backpack/holding,
return 0
if(!isemptylist(teleatom.search_contents_for(/obj/item/disk/nuclear)))
- if(istype(teleatom, /mob/living))
+ if(isliving(teleatom))
var/mob/living/MM = teleatom
MM.visible_message(span_danger("\The [MM] bounces off of the portal!"),span_warning("Something you are carrying seems to be unable to pass through the portal. Better drop it if you want to go through."))
else
@@ -208,7 +208,7 @@ var/bluespace_item_types = newlist(/obj/item/storage/backpack/holding,
var/obstructed = 0
var/turf/dest_turf = get_turf(destination)
if(local && !(dest_turf.z in using_map.player_levels))
- if(istype(teleatom, /mob/living))
+ if(isliving(teleatom))
to_chat(teleatom, span_warning("The portal refuses to carry you that far away!"))
return 0
else if(istype(destination.loc, /obj/belly))
diff --git a/code/datums/managed_browsers/feedback_form.dm b/code/datums/managed_browsers/feedback_form.dm
index 15bf63f535..cb859d8feb 100644
--- a/code/datums/managed_browsers/feedback_form.dm
+++ b/code/datums/managed_browsers/feedback_form.dm
@@ -142,7 +142,7 @@ GENERAL_PROTECT_DATUM(/datum/managed_browser/feedback_form)
return
my_client.mob << browse(null, "window=[browser_id]") // Closes the window.
- if(istype(my_client.mob, /mob/new_player))
+ if(isnewplayer(my_client.mob))
var/mob/new_player/NP = my_client.mob
NP.new_player_panel_proc() // So the feedback button goes away, if the user gets put on cooldown.
qdel(src)
diff --git a/code/datums/mind.dm b/code/datums/mind.dm
index 78a75a7114..cbb43a230f 100644
--- a/code/datums/mind.dm
+++ b/code/datums/mind.dm
@@ -241,7 +241,7 @@
var/list/possible_targets = list("Free objective")
for(var/datum/mind/possible_target in ticker.minds)
- if ((possible_target != src) && istype(possible_target.current, /mob/living/carbon/human))
+ if ((possible_target != src) && ishuman(possible_target.current))
possible_targets += possible_target.current
var/mob/def_target = null
@@ -386,7 +386,7 @@
log_admin("[key_name_admin(usr)] has unemag'ed [R].")
if("unemagcyborgs")
- if (istype(current, /mob/living/silicon/ai))
+ if (isAI(current))
var/mob/living/silicon/ai/ai = current
for (var/mob/living/silicon/robot/R in ai.connected_robots)
R.emagged = 0
diff --git a/code/datums/repositories/crew.dm b/code/datums/repositories/crew.dm
index ae94e78726..4b59eeeb39 100644
--- a/code/datums/repositories/crew.dm
+++ b/code/datums/repositories/crew.dm
@@ -26,7 +26,7 @@ var/global/datum/repository/crew/crew_repository = new()
var/turf/pos = get_turf(C)
var/area/B = pos?.loc //VOREStation Add: No sensor in Dorm
if((C.has_sensor) && (pos?.z == zLevel) && (C.sensor_mode != SUIT_SENSOR_OFF) && !(B.flag_check(AREA_BLOCK_SUIT_SENSORS)) && !(is_jammed(C)) && !(is_vore_jammed(C))) //VOREStation Edit
- if(istype(C.loc, /mob/living/carbon/human))
+ if(ishuman(C.loc))
var/mob/living/carbon/human/H = C.loc
if(H.w_uniform != C)
continue
diff --git a/code/datums/uplink/announcements.dm b/code/datums/uplink/announcements.dm
index 12330db3b8..e225247862 100644
--- a/code/datums/uplink/announcements.dm
+++ b/code/datums/uplink/announcements.dm
@@ -54,7 +54,7 @@
general.fields["sex"] = I.sex
else
var/mob/living/carbon/human/H
- if(istype(user,/mob/living/carbon/human))
+ if(ishuman(user))
H = user
general.fields["age"] = H.age
else
@@ -106,4 +106,3 @@
var/datum/event_meta/EM = new(EVENT_LEVEL_MUNDANE, "Fake Radiation Storm", add_to_queue = 0)
new/datum/event/radiation_storm/syndicate(EM)
return 1
-
diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm
index 74ca803b19..56b00d2cae 100644
--- a/code/defines/obj/weapon.dm
+++ b/code/defines/obj/weapon.dm
@@ -45,6 +45,7 @@
/obj/item/soap/Initialize()
if(randomize && prob(square_chance))
icon_state = "[icon_state]-alt"
+ . = ..()
/obj/item/soap/nanotrasen
desc = "A NanoTrasen-brand bar of soap. Smells of phoron, a years-old marketing gimmick."
diff --git a/code/defines/procs/announce.dm b/code/defines/procs/announce.dm
index 7840615ccc..72d79a0662 100644
--- a/code/defines/procs/announce.dm
+++ b/code/defines/procs/announce.dm
@@ -54,7 +54,7 @@
/datum/announcement/proc/Message(message as text, message_title as text, var/list/zlevels)
for(var/mob/M in player_list)
- if(!istype(M,/mob/new_player) && !isdeaf(M))
+ if(!isnewplayer(M) && !isdeaf(M))
to_chat(M, "
[title]
")
to_chat(M, span_alert("[message]"))
if (announcer)
@@ -82,7 +82,7 @@
for(var/mob/M in player_list)
if(zlevels && !(get_z(M) in zlevels))
continue
- if(!istype(M,/mob/new_player) && !isdeaf(M))
+ if(!isnewplayer(M) && !isdeaf(M))
to_chat(M, command)
/datum/announcement/priority/Message(var/message as text, var/message_title as text, var/list/zlevels)
@@ -110,7 +110,7 @@
for(var/mob/M in player_list)
if(zlevels && !(M.z in zlevels))
continue
- if(!istype(M,/mob/new_player) && !isdeaf(M))
+ if(!isnewplayer(M) && !isdeaf(M))
M << 'sound/AI/preamble.ogg'
if(!message_sound)
@@ -120,7 +120,7 @@
for(var/mob/M in player_list)
if(zlevels && !(M.z in zlevels))
continue
- if(!istype(M,/mob/new_player) && !isdeaf(M))
+ if(!isnewplayer(M) && !isdeaf(M))
M << message_sound
/datum/announcement/proc/Sound(var/message_sound, var/list/zlevels)
diff --git a/code/game/antagonist/antagonist.dm b/code/game/antagonist/antagonist.dm
index d9d11999f3..38ea7f9629 100644
--- a/code/game/antagonist/antagonist.dm
+++ b/code/game/antagonist/antagonist.dm
@@ -54,7 +54,7 @@
var/flags = 0 // Various runtime options.
// Used for setting appearance.
- var/list/valid_species = list(SPECIES_UNATHI,SPECIES_TAJ,SPECIES_SKRELL,SPECIES_HUMAN,SPECIES_DIONA,SPECIES_TESHARI)
+ var/list/valid_species = list(SPECIES_UNATHI,SPECIES_TAJARAN,SPECIES_SKRELL,SPECIES_HUMAN,SPECIES_DIONA,SPECIES_TESHARI)
// Runtime vars.
var/datum/mind/leader // Current leader, if any.
@@ -109,7 +109,7 @@
// Note that this is done before jobs are handed out.
candidates = ticker.mode.get_players_for_role(role_type, id, ghosts_only)
for(var/datum/mind/player in candidates)
- if(ghosts_only && !istype(player.current, /mob/observer/dead))
+ if(ghosts_only && !isobserver(player.current))
candidates -= player
log_debug("[key_name(player)] is not eligible to become a [role_text]: Only ghosts may join as this role! They have been removed from the draft.")
else if(CONFIG_GET(flag/use_age_restriction_for_antags) && player.current.client.player_age < minimum_player_age)
@@ -147,7 +147,7 @@
return 0
to_chat(player.current, span_danger(span_italics("You have been selected this round as an antagonist!")))
message_admins("[uppertext(ticker.mode.name)]: Selected [player] as a [role_text].")
- if(istype(player.current, /mob/observer/dead))
+ if(isobserver(player.current))
create_default(player.current)
else
add_antagonist(player,0,0,0,1,1)
@@ -185,7 +185,7 @@
if(player.special_role)
log_debug("[player.key] was selected for [role_text] by lottery, but they already have a special role.")
return 0
- if(!(flags & ANTAG_OVERRIDE_JOB) && (!player.current || istype(player.current, /mob/new_player)))
+ if(!(flags & ANTAG_OVERRIDE_JOB) && (!player.current || isnewplayer(player.current)))
log_debug("[player.key] was selected for [role_text] by lottery, but they have not joined the game.")
return 0
diff --git a/code/game/antagonist/antagonist_add.dm b/code/game/antagonist/antagonist_add.dm
index 76781e5def..b4c914498e 100644
--- a/code/game/antagonist/antagonist_add.dm
+++ b/code/game/antagonist/antagonist_add.dm
@@ -8,7 +8,7 @@
player.assigned_role = role_text
player.special_role = role_text
- if(istype(player.current, /mob/observer/dead))
+ if(isobserver(player.current))
create_default(player.current)
else
create_antagonist(player, move_to_spawn, do_not_announce, preserve_appearance)
diff --git a/code/game/antagonist/mutiny/mutineer.dm b/code/game/antagonist/mutiny/mutineer.dm
index 28871a32e2..d7d4193031 100644
--- a/code/game/antagonist/mutiny/mutineer.dm
+++ b/code/game/antagonist/mutiny/mutineer.dm
@@ -18,7 +18,7 @@ var/datum/antagonist/mutineer/mutineers
/datum/antagonist/mutineer/can_become_antag(var/datum/mind/player)
if(!..())
return 0
- if(!istype(player.current, /mob/living/carbon/human))
+ if(!ishuman(player.current))
return 0
if(M.special_role)
return 0
diff --git a/code/game/antagonist/outsider/ninja.dm b/code/game/antagonist/outsider/ninja.dm
index 7df32b76aa..4dd40c508e 100644
--- a/code/game/antagonist/outsider/ninja.dm
+++ b/code/game/antagonist/outsider/ninja.dm
@@ -158,7 +158,7 @@ var/datum/antagonist/ninja/ninjas
if(13)
directive += "Some disgruntled [using_map.company_name] employees have been supportive of our operations. Be wary of any mistreatment by command staff."
if(14)
- var/xenorace = pick(SPECIES_UNATHI, SPECIES_TAJ, SPECIES_SKRELL)
+ var/xenorace = pick(SPECIES_UNATHI, SPECIES_TAJARAN, SPECIES_SKRELL)
directive += "A group of [xenorace] radicals have been loyal supporters of the Spider Clan. Favor [xenorace] crew whenever possible."
if(15)
directive += "The Spider Clan has recently been accused of religious insensitivity. Attempt to speak with the " + JOB_CHAPLAIN + " and prove these accusations false."
diff --git a/code/game/antagonist/station/infiltrator.dm b/code/game/antagonist/station/infiltrator.dm
index f3ffbc0024..472b0737bf 100644
--- a/code/game/antagonist/station/infiltrator.dm
+++ b/code/game/antagonist/station/infiltrator.dm
@@ -24,7 +24,7 @@ var/datum/antagonist/traitor/infiltrator/infiltrators
// Now for the special headset.
// Humans and the AI.
- if(istype(traitor_mob) || istype(traitor_mob, /mob/living/silicon/ai))
+ if(istype(traitor_mob) || isAI(traitor_mob))
var/obj/item/radio/headset/R
R = locate(/obj/item/radio/headset) in traitor_mob.contents
if(!R)
@@ -50,7 +50,7 @@ var/datum/antagonist/traitor/infiltrator/infiltrators
:t")
// Borgs, because their radio is not a headset for some reason.
- if(istype(traitor_mob, /mob/living/silicon/robot))
+ if(isrobot(traitor_mob))
var/mob/living/silicon/robot/borg = traitor_mob
var/obj/item/encryptionkey/syndicate/encrypt_key = new(null)
if(borg.radio)
diff --git a/code/game/antagonist/station/traitor.dm b/code/game/antagonist/station/traitor.dm
index 898e71fd46..1d3a4b45cd 100644
--- a/code/game/antagonist/station/traitor.dm
+++ b/code/game/antagonist/station/traitor.dm
@@ -115,21 +115,23 @@ var/datum/antagonist/traitor/traitors
var/loc = ""
var/obj/item/R = locate() //Hide the uplink in a PDA if available, otherwise radio
- if(traitor_mob.client.prefs.uplinklocation == "Headset")
+ var/uplinklocation = traitor_mob.read_preference(/datum/preference/choiced/uplinklocation)
+
+ if(uplinklocation == "Headset")
R = locate(/obj/item/radio) in traitor_mob.contents
if(!R)
R = locate(/obj/item/pda) in traitor_mob.contents
to_chat(traitor_mob, "Could not locate a Radio, installing in PDA instead!")
if (!R)
to_chat(traitor_mob, "Unfortunately, neither a radio or a PDA relay could be installed.")
- else if(traitor_mob.client.prefs.uplinklocation == "PDA")
+ else if(uplinklocation == "PDA")
R = locate(/obj/item/pda) in traitor_mob.contents
if(!R)
R = locate(/obj/item/radio) in traitor_mob.contents
to_chat(traitor_mob, "Could not locate a PDA, installing into a Radio instead!")
if(!R)
to_chat(traitor_mob, "Unfortunately, neither a radio or a PDA relay could be installed.")
- else if(traitor_mob.client.prefs.uplinklocation == "None")
+ else if(uplinklocation == "None")
to_chat(traitor_mob, "You have elected to not have an AntagCorp portable teleportation relay installed!")
R = null
else
diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm
index 8d5616955b..f9dcbe3f0b 100644
--- a/code/game/area/areas.dm
+++ b/code/game/area/areas.dm
@@ -384,7 +384,7 @@ var/list/mob/living/forced_ambiance_list = new
if(!L.lastarea)
L.lastarea = src
var/area/oldarea = L.lastarea
- if((oldarea.get_gravity() == 0) && (get_gravity() == 1) && (L.m_intent == "run")) // Being ready when you change areas gives you a chance to avoid falling all together.
+ if((oldarea.get_gravity() == 0) && (get_gravity() == 1) && (L.m_intent == I_RUN)) // Being ready when you change areas gives you a chance to avoid falling all together.
thunk(L)
L.update_floating( L.Check_Dense_Object() )
@@ -420,7 +420,7 @@ var/list/mob/living/forced_ambiance_list = new
else
L << sound(null, channel = CHANNEL_AMBIENCE_FORCED)
else if(src.ambience && src.ambience.len)
- var/ambience_odds = L?.client.prefs.ambience_chance
+ var/ambience_odds = L.read_preference(/datum/preference/numeric/ambience_chance)
if(prob(ambience_odds) && (world.time >= L.client.time_last_ambience_played + 1 MINUTE))
var/sound = pick(ambience)
L << sound(sound, repeat = 0, wait = 0, volume = 50 * volume_mod, channel = CHANNEL_AMBIENCE)
@@ -450,7 +450,7 @@ var/list/mob/living/forced_ambiance_list = new
if(H.species.can_zero_g_move || H.species.can_space_freemove)
return
- if(H.m_intent == "run")
+ if(H.m_intent == I_RUN)
H.AdjustStunned(6)
H.AdjustWeakened(6)
else
diff --git a/code/game/atoms.dm b/code/game/atoms.dm
index 80580031d6..e822ae6a79 100644
--- a/code/game/atoms.dm
+++ b/code/game/atoms.dm
@@ -125,7 +125,7 @@
//return flags that should be added to the viewer's sight var.
//Otherwise return a negative number to indicate that the view should be cancelled.
/atom/proc/check_eye(user as mob)
- if (istype(user, /mob/living/silicon/ai)) // WHYYYY
+ if (isAI(user)) // WHYYYY
return 0
return -1
@@ -223,6 +223,7 @@
//All atoms
/atom/proc/examine(mob/user, var/infix = "", var/suffix = "")
+ SHOULD_CALL_PARENT(TRUE)
//This reformat names to get a/an properly working on item descriptions when they are bloody
var/f_name = "\a [src][infix]."
if(src.blood_DNA && !istype(src, /obj/effect/decal))
@@ -818,3 +819,29 @@
var/mouseparams = list2params(paramslist)
usr_client.Click(src, loc, null, mouseparams)
return TRUE
+
+GLOBAL_LIST_EMPTY(icon_dimensions)
+
+/atom/proc/get_oversized_icon_offsets()
+ if (pixel_x == 0 && pixel_y == 0)
+ return list("x" = 0, "y" = 0)
+ var/list/icon_dimensions = get_icon_dimensions(icon)
+ var/icon_width = icon_dimensions["width"]
+ var/icon_height = icon_dimensions["height"]
+ return list(
+ "x" = icon_width > world.icon_size && pixel_x != 0 ? (icon_width - world.icon_size) * 0.5 : 0,
+ "y" = icon_height > world.icon_size /*&& pixel_y != 0*/ ? (icon_height - world.icon_size) * 0.5 : 0, // we don't have pixel_y in use
+ )
+
+/// Returns a list containing the width and height of an icon file
+/proc/get_icon_dimensions(icon_path)
+ // Icons can be a real file(), a rsc backed file(), a dynamic rsc (dyn.rsc) reference (known as a cache reference in byond docs), or an /icon which is pointing to one of those.
+ // Runtime generated dynamic icons are an unbounded concept cache identity wise, the same icon can exist millions of ways and holding them in a list as a key can lead to unbounded memory usage if called often by consumers.
+ // Check distinctly that this is something that has this unspecified concept, and thus that we should not cache.
+ if (!isfile(icon_path) || !length("[icon_path]"))
+ var/icon/my_icon = icon(icon_path)
+ return list("width" = my_icon.Width(), "height" = my_icon.Height())
+ if (isnull(GLOB.icon_dimensions[icon_path]))
+ var/icon/my_icon = icon(icon_path)
+ GLOB.icon_dimensions[icon_path] = list("width" = my_icon.Width(), "height" = my_icon.Height())
+ return GLOB.icon_dimensions[icon_path]
diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm
index 9c63bcb7f7..2a3d12e4d1 100644
--- a/code/game/atoms_movable.dm
+++ b/code/game/atoms_movable.dm
@@ -391,7 +391,7 @@
//called when src is thrown into hit_atom
/atom/movable/proc/throw_impact(atom/hit_atom, var/speed)
- if(istype(hit_atom,/mob/living))
+ if(isliving(hit_atom))
var/mob/living/M = hit_atom
if(M.buckled == src)
return // Don't hit the thing we're buckled to.
@@ -413,7 +413,7 @@
if(src.throwing)
for(var/atom/A in get_turf(src))
if(A == src) continue
- if(istype(A,/mob/living))
+ if(isliving(A))
if(A:lying) continue
src.throw_impact(A,speed)
if(isobj(A))
diff --git a/code/game/birthday.dm b/code/game/birthday.dm
index add0a3f7f0..2af06c13ff 100644
--- a/code/game/birthday.dm
+++ b/code/game/birthday.dm
@@ -1,9 +1,12 @@
/mob/living/carbon/human/proc/consider_birthday()
+ var/bday_month = read_preference(/datum/preference/numeric/human/bday_month)
+ var/bday_day = read_preference(/datum/preference/numeric/human/bday_day)
if(!bday_month || !bday_day) //If we don't have one of these set, don't worry about it
return
if(real_name != client.prefs.real_name) //let's not celebrate the birthday of that weird mob we got dropped into
return
- if(!(client.prefs.last_birthday_notification < world_time_year)) //you only get notified once a year
+
+ if(!(read_preference(/datum/preference/numeric/human/last_bday_note) < world_time_year)) //you only get notified once a year
return
if((world_time_month == bday_month) && (world_time_day == bday_day)) //it is your birthday
birthday(1)
@@ -14,23 +17,23 @@
/mob/living/carbon/human/proc/birthday(var/birthday = 0)
var/msg
- var/lastyear = client.prefs.last_birthday_notification
- client.prefs.last_birthday_notification = world_time_year //We only want to ask once a year per character, this persists, update early in case of shenanigans
+ var/lastyear = read_preference(/datum/preference/numeric/human/last_bday_note)
+ write_preference_directly(/datum/preference/numeric/human/last_bday_note, world_time_year) //We only want to ask once a year per character, this persists, update early in case of shenanigans
if(birthday) //woo
msg = "Today is your birthday! Do you want to increase your character's listed age?"
- if(client.prefs.bday_announce)
+ if(read_preference(/datum/preference/toggle/human/bday_announce))
var/list/sounds = list('sound/voice/BIRTH.ogg')
var/oursound = pickweight(sounds)
command_announcement.Announce("Confirmed presence of BIRTHDAY aboard the station! It is [src.real_name]'s birthday or similar sort of celebration, name day, hatchday, WHATEVER! We encourage you to go find [src.real_name] and show them how we celebrate around here! Have a secure day!", "BIRTHDAY!", oursound)
else
msg = "Your birthday has passed! Do you want to increase your character's listed age?" //sad, but thus is the life of an adult
- if(tgui_alert(src, msg,"BIRTHDAY! ([bday_month]/[bday_day])",list("Level me up, baby","No way, I'mma stay young forever")) == "Level me up, baby")
+ if(tgui_alert(src, msg,"BIRTHDAY! ([read_preference(/datum/preference/numeric/human/bday_month)]/[read_preference(/datum/preference/numeric/human/bday_day)])",list("Level me up, baby","No way, I'mma stay young forever")) == "Level me up, baby")
if(lastyear == 0) //We've never been asked, so let's just assume you were keeping track before now and only add 1
age += 1
else
var/howmuch = world_time_year - lastyear
age += howmuch
to_chat(src, span_notice("You are now [age]! Happy birthday!"))
- client.prefs.age = age //Set the age on the character sheet
+ write_preference_directly(/datum/preference/numeric/human/age, age) //Set the age on the character sheet
client.prefs.save_character() //Save the info
diff --git a/code/game/dna/dna2.dm b/code/game/dna/dna2.dm
index 099e5c4d18..63b8a4a4de 100644
--- a/code/game/dna/dna2.dm
+++ b/code/game/dna/dna2.dm
@@ -50,6 +50,19 @@ var/global/list/datum/dna/gene/dna_genes[0]
var/base_species = "Human"
var/list/species_traits = list()
var/blood_color = "#A10808"
+ var/blood_reagents = "iron"
+ var/scale_appearance = 0
+ var/offset_override = 0
+ var/synth_markings = 0
+ var/custom_speech_bubble = "default"
+ var/species_sounds = "None"
+ var/gender_specific_species_sounds = FALSE
+ var/species_sounds_male = "None"
+ var/species_sounds_female = "None"
+ var/grad_style = 0
+ var/r_grad = 0
+ var/g_grad = 0
+ var/b_grad = 0
var/custom_say
var/custom_ask
var/custom_whisper
@@ -79,6 +92,19 @@ var/global/list/datum/dna/gene/dna_genes[0]
new_dna.custom_species=custom_species //VOREStaton Edit
new_dna.species_traits=species_traits.Copy() //VOREStation Edit
new_dna.blood_color=blood_color //VOREStation Edit
+ new_dna.blood_reagents=blood_reagents
+ new_dna.scale_appearance = scale_appearance
+ new_dna.offset_override = offset_override
+ new_dna.synth_markings = synth_markings
+ new_dna.custom_speech_bubble = custom_speech_bubble
+ new_dna.species_sounds = species_sounds
+ new_dna.gender_specific_species_sounds = gender_specific_species_sounds
+ new_dna.species_sounds_male = species_sounds_male
+ new_dna.species_sounds_female = species_sounds_female
+ new_dna.grad_style = grad_style
+ new_dna.r_grad = r_grad
+ new_dna.g_grad = g_grad
+ new_dna.b_grad = b_grad
new_dna.custom_say=custom_say //VOREStaton Edit
new_dna.custom_ask=custom_ask //VOREStaton Edit
new_dna.custom_whisper=custom_whisper //VOREStaton Edit
@@ -157,6 +183,21 @@ var/global/list/datum/dna/gene/dna_genes[0]
src.custom_species = character.custom_species
src.base_species = character.species.base_species
src.blood_color = character.species.blood_color
+ src.blood_reagents = character.species.blood_reagents
+ src.scale_appearance = character.fuzzy
+ src.offset_override = character.offset_override
+ src.synth_markings = character.synth_markings
+ src.custom_speech_bubble = character.custom_speech_bubble
+ /* Currently not implemented on virgo
+ src.species_sounds = character.species.species_sounds
+ src.gender_specific_species_sounds = character.species.gender_specific_species_sounds
+ src.species_sounds_male = character.species.species_sounds_male
+ src.species_sounds_female = character.species.species_sounds_female
+ */
+ src.grad_style = character.grad_style
+ src.r_grad = character.r_grad
+ src.g_grad = character.g_grad
+ src.b_grad = character.b_grad
src.species_traits = character.species.traits.Copy()
src.custom_say = character.custom_say
src.custom_ask = character.custom_ask
diff --git a/code/game/dna/dna2_helpers.dm b/code/game/dna/dna2_helpers.dm
index e7b68fdfe5..15e9e73139 100644
--- a/code/game/dna/dna2_helpers.dm
+++ b/code/game/dna/dna2_helpers.dm
@@ -127,7 +127,7 @@
// Simpler. Don't specify UI in order for the mob to use its own.
/mob/proc/UpdateAppearance(var/list/UI=null)
- if(istype(src, /mob/living/carbon/human))
+ if(ishuman(src))
if(UI!=null)
src.dna.UI=UI
src.dna.UpdateUI()
@@ -258,12 +258,28 @@
H.custom_whisper = dna.custom_whisper
H.custom_exclaim = dna.custom_exclaim
H.species.blood_color = dna.blood_color
+ H.fuzzy = dna.scale_appearance
+ H.offset_override = dna.offset_override
+ H.synth_markings = dna.synth_markings
+ H.custom_speech_bubble = dna.custom_speech_bubble
+ H.grad_style = dna.grad_style
+ H.r_grad = dna.r_grad
+ H.g_grad = dna.g_grad
+ H.b_grad = dna.b_grad
H.custom_heat = dna.custom_heat
H.custom_cold = dna.custom_cold
var/datum/species/S = H.species
- S.produceCopy(dna.species_traits, H, dna.base_species)
+ S.produceCopy(dna.species_traits, H, dna.base_species/*, FALSE*/) // Traitgenes edit - reset_dna flag required, or genes get reset on resleeve
// VOREStation Edit End
+ H.species.blood_reagents = dna.blood_reagents
+ /* Currently not implemented on virgo
+ H.species.species_sounds = dna.species_sounds
+ H.species.gender_specific_species_sounds = dna.gender_specific_species_sounds
+ H.species.species_sounds_male = dna.species_sounds_male
+ H.species.species_sounds_female = dna.species_sounds_female
+ */
+
H.force_update_organs() //VOREStation Add - Gotta do this too
H.force_update_limbs()
//H.update_body(0) //VOREStation Edit - Done in force_update_limbs already
diff --git a/code/game/dna/genes/monkey.dm b/code/game/dna/genes/monkey.dm
index 9bf5ff965a..959c0cc2f2 100644
--- a/code/game/dna/genes/monkey.dm
+++ b/code/game/dna/genes/monkey.dm
@@ -5,10 +5,10 @@
block=MONKEYBLOCK
/datum/dna/gene/monkey/can_activate(var/mob/M,var/flags)
- return istype(M, /mob/living/carbon/human) || istype(M,/mob/living/carbon/monkey)
+ return ishuman(M) || istype(M,/mob/living/carbon/monkey)
/datum/dna/gene/monkey/activate(var/mob/living/M, var/connected, var/flags)
- if(!istype(M,/mob/living/carbon/human))
+ if(!ishuman(M))
//testing("Cannot monkey-ify [M], type is [M.type].")
return
var/mob/living/carbon/human/H = M
diff --git a/code/game/gamemodes/changeling/powers/armblade.dm b/code/game/gamemodes/changeling/powers/armblade.dm
index 52a83f8e9b..650b134800 100644
--- a/code/game/gamemodes/changeling/powers/armblade.dm
+++ b/code/game/gamemodes/changeling/powers/armblade.dm
@@ -91,7 +91,7 @@
/obj/item/melee/changeling/process() //Stolen from ninja swords.
if(!creator || loc != creator || !creator.item_is_in_hands(src))
// Tidy up a bit.
- if(istype(loc,/mob/living))
+ if(isliving(loc))
var/mob/living/carbon/human/host = loc
if(istype(host))
for(var/obj/item/organ/external/organ in host.organs)
diff --git a/code/game/gamemodes/changeling/powers/visible_camouflage.dm b/code/game/gamemodes/changeling/powers/visible_camouflage.dm
index e83b61bb5c..3692044219 100644
--- a/code/game/gamemodes/changeling/powers/visible_camouflage.dm
+++ b/code/game/gamemodes/changeling/powers/visible_camouflage.dm
@@ -15,7 +15,7 @@
set desc = "Turns yourself almost invisible, as long as you move slowly."
- if(istype(src,/mob/living/carbon/human))
+ if(ishuman(src))
var/mob/living/carbon/human/H = src
if(H.mind.changeling.cloaked)
@@ -41,13 +41,13 @@
to_chat(src, span_notice("We may move at our normal speed while hidden."))
if(must_walk)
- H.set_m_intent("walk")
+ H.set_m_intent(I_WALK)
var/remain_cloaked = TRUE
while(remain_cloaked) //This loop will keep going until the player uncloaks.
sleep(1 SECOND) // Sleep at the start so that if something invalidates a cloak, it will drop immediately after the check and not in one second.
- if(H.m_intent != "walk" && must_walk) // Moving too fast uncloaks you.
+ if(H.m_intent != I_WALK && must_walk) // Moving too fast uncloaks you.
remain_cloaked = 0
if(!H.mind.changeling.cloaked)
remain_cloaked = 0
@@ -65,7 +65,7 @@
H.invisibility = initial(invisibility)
visible_message(span_warning("[src] suddenly fades in, seemingly from nowhere!"),
span_notice("We revert our camouflage, revealing ourselves."))
- H.set_m_intent("run")
+ H.set_m_intent(I_RUN)
H.mind.changeling.cloaked = 0
H.mind.changeling.chem_recharge_rate = old_regen_rate
diff --git a/code/game/gamemodes/cult/construct_spells.dm b/code/game/gamemodes/cult/construct_spells.dm
index 9baf8667f7..5a2168fa53 100644
--- a/code/game/gamemodes/cult/construct_spells.dm
+++ b/code/game/gamemodes/cult/construct_spells.dm
@@ -650,7 +650,7 @@
/obj/item/spell/construct/slam/on_melee_cast(atom/hit_atom, mob/living/user, def_zone)
var/attack_message = "slams"
- if(istype(user, /mob/living/simple_mob))
+ if(isanimal(user))
var/mob/living/simple_mob/S = user
attack_message = pick(S.attacktext)
if(isliving(hit_atom))
diff --git a/code/game/gamemodes/cult/cult_structures.dm b/code/game/gamemodes/cult/cult_structures.dm
index 73429d697b..a4942e3133 100644
--- a/code/game/gamemodes/cult/cult_structures.dm
+++ b/code/game/gamemodes/cult/cult_structures.dm
@@ -154,6 +154,7 @@
return
/obj/effect/gateway/active/Initialize()
+ . = ..()
addtimer(CALLBACK(src, PROC_REF(spawn_and_qdel)), rand(30, 60) SECONDS)
/obj/effect/gateway/active/proc/spawn_and_qdel()
@@ -165,7 +166,7 @@
/obj/effect/gateway/active/Crossed(var/atom/A)
if(A.is_incorporeal())
return
- if(!istype(A, /mob/living))
+ if(!isliving(A))
return
var/mob/living/M = A
diff --git a/code/game/gamemodes/cult/ritual.dm b/code/game/gamemodes/cult/ritual.dm
index 27c0941144..81b5bba11e 100644
--- a/code/game/gamemodes/cult/ritual.dm
+++ b/code/game/gamemodes/cult/ritual.dm
@@ -298,7 +298,7 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa","
/obj/item/book/tome/attack(mob/living/M as mob, mob/living/user as mob)
add_attack_logs(user,M,"Hit with [name]")
- if(istype(M,/mob/observer/dead))
+ if(isobserver(M))
var/mob/observer/dead/D = M
D.manifest(user)
return
@@ -449,7 +449,7 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa","
var/list/runes = list("teleport", "itemport", "tome", "armor", "convert", "tear in reality", "emp", "drain", "seer", "raise", "obscure", "reveal", "astral journey", "manifest", "imbue talisman", "sacrifice", "wall", "freedom", "cultsummon", "deafen", "blind", "bloodboil", "communicate", "stun")
r = input(user, "Choose a rune to scribe", "Rune Scribing") in runes // Remains input() for extreme blocking
var/obj/effect/rune/R = new /obj/effect/rune
- if(istype(user, /mob/living/carbon/human))
+ if(ishuman(user))
var/mob/living/carbon/human/H = user
R.blood_DNA = list()
R.blood_DNA[H.dna.unique_enzymes] = H.dna.b_type
diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm
index 15900cdeca..670f5e26fb 100644
--- a/code/game/gamemodes/cult/runes.dm
+++ b/code/game/gamemodes/cult/runes.dm
@@ -26,7 +26,7 @@ var/list/sacrificed = list()
allrunesloc[index] = R.loc
if(index >= 5)
to_chat(user, span_danger("You feel pain, as rune disappears in reality shift caused by too much wear of space-time fabric."))
- if (istype(user, /mob/living))
+ if (isliving(user))
user.take_overall_damage(5, 0)
qdel(src)
if(allrunesloc && index != 0)
@@ -59,7 +59,7 @@ var/list/sacrificed = list()
runecount++
if(runecount >= 2)
to_chat(user, span_danger("You feel pain, as rune disappears in reality shift caused by too much wear of space-time fabric."))
- if (istype(user, /mob/living))
+ if (isliving(user))
user.take_overall_damage(5, 0)
qdel(src)
for(var/mob/living/carbon/C in orange(1,src))
@@ -661,7 +661,7 @@ var/list/sacrificed = list()
for(var/mob/H in victims)
var/worth = 0
- if(istype(H,/mob/living/carbon/human))
+ if(ishuman(H))
var/mob/living/carbon/human/lamb = H
if(lamb.species.rarity_value > 3)
worth = 1
diff --git a/code/game/gamemodes/cult/soulstone.dm b/code/game/gamemodes/cult/soulstone.dm
index 59c9c62e82..3a5e93689a 100644
--- a/code/game/gamemodes/cult/soulstone.dm
+++ b/code/game/gamemodes/cult/soulstone.dm
@@ -20,7 +20,7 @@
//////////////////////////////Capturing////////////////////////////////////////////////////////
/obj/item/soulstone/attack(mob/living/carbon/human/M as mob, mob/user as mob)
- if(!istype(M, /mob/living/carbon/human))//If target is not a human.
+ if(!ishuman(M))//If target is not a human.
return ..()
if(istype(M, /mob/living/carbon/human/dummy))
return..()
diff --git a/code/game/gamemodes/endgame/supermatter_cascade/blob.dm b/code/game/gamemodes/endgame/supermatter_cascade/blob.dm
index e2bc9d7a4b..a08a6d3009 100644
--- a/code/game/gamemodes/endgame/supermatter_cascade/blob.dm
+++ b/code/game/gamemodes/endgame/supermatter_cascade/blob.dm
@@ -48,7 +48,7 @@
// Nom.
for(var/atom/movable/A in T)
if(A)
- if(istype(A,/mob/living))
+ if(isliving(A))
qdel(A)
else if(istype(A,/mob)) // Observers, AI cameras.
continue
@@ -98,7 +98,7 @@
/turf/unsimulated/wall/supermatter/Bumped(atom/AM as mob|obj)
- if(istype(AM, /mob/living))
+ if(isliving(AM))
var/mob/living/M = AM
var/datum/gender/T = gender_datums[M.get_visible_gender()]
AM.visible_message(span_warning("\The [AM] slams into \the [src] inducing a resonance... [T.his] body starts to glow and catch flame before flashing into ash."),\
diff --git a/code/game/gamemodes/endgame/supermatter_cascade/universe.dm b/code/game/gamemodes/endgame/supermatter_cascade/universe.dm
index 6df1dad864..5889e778bb 100644
--- a/code/game/gamemodes/endgame/supermatter_cascade/universe.dm
+++ b/code/game/gamemodes/endgame/supermatter_cascade/universe.dm
@@ -119,7 +119,7 @@ The access requirements on the Asteroid Shuttles' consoles have now been revoked
/datum/universal_state/supermatter_cascade/proc/PlayerSet()
for(var/datum/mind/M in player_list)
- if(!istype(M.current,/mob/living))
+ if(!isliving(M.current))
continue
if(M.current.stat!=2)
M.current.Weaken(10)
diff --git a/code/game/gamemodes/events.dm b/code/game/gamemodes/events.dm
index 75de7d0fd6..2bf8f17592 100644
--- a/code/game/gamemodes/events.dm
+++ b/code/game/gamemodes/events.dm
@@ -32,7 +32,7 @@
if(1)
command_alert("Meteors have been detected on collision course with the station.", "Meteor Alert")
for(var/mob/M in player_list)
- if(!istype(M,/mob/new_player))
+ if(!isnewplayer(M))
M << sound('sound/AI/meteors.ogg')
spawn(100)
meteor_wave()
@@ -44,7 +44,7 @@
if(2)
command_alert("Gravitational anomalies detected on the station. There is no additional data.", "Anomaly Alert")
for(var/mob/M in player_list)
- if(!istype(M,/mob/new_player))
+ if(!isnewplayer(M))
M << sound('sound/AI/granomalies.ogg')
var/turf/T = pick(blobstart)
var/obj/effect/bhole/bh = new /obj/effect/bhole( T.loc, 30 )
@@ -148,7 +148,7 @@ var/hadevent = 0
continue
if(isNotStationLevel(T.z))
continue
- if(istype(H,/mob/living/carbon/human))
+ if(ishuman(H))
H.apply_effect((rand(15,75)),IRRADIATE,0)
if (prob(5))
H.apply_effect((rand(90,150)),IRRADIATE,0)
diff --git a/code/game/gamemodes/events/black_hole.dm b/code/game/gamemodes/events/black_hole.dm
index 44f6df7005..f378a197f8 100644
--- a/code/game/gamemodes/events/black_hole.dm
+++ b/code/game/gamemodes/events/black_hole.dm
@@ -8,55 +8,70 @@
density = FALSE
anchored = TRUE
-/obj/effect/bhole/New()
- spawn(4)
- controller()
+/obj/effect/bhole/Initialize()
+ . = ..()
+ addtimer(CALLBACK(src, PROC_REF(controller)), 0.4 SECONDS, TIMER_DELETE_ME)
/obj/effect/bhole/proc/controller()
- while(src)
+ if(!isturf(loc))
+ qdel(src)
+ return
- if(!isturf(loc))
- qdel(src)
- return
+ //DESTROYING STUFF AT THE EPICENTER
+ for(var/mob/living/M in orange(1,src))
+ qdel(M)
+ for(var/obj/O in orange(1,src))
+ qdel(O)
+ var/base_turf = get_base_turf_by_area(src)
+ for(var/turf/simulated/ST in orange(1,src))
+ if(ST.type == base_turf)
+ continue
+ ST.ChangeTurf(base_turf)
+ addtimer(CALLBACK(src, PROC_REF(pull_1)), 0.6 SECONDS, TIMER_DELETE_ME)
- //DESTROYING STUFF AT THE EPICENTER
- for(var/mob/living/M in orange(1,src))
- qdel(M)
- for(var/obj/O in orange(1,src))
- qdel(O)
- var/base_turf = get_base_turf_by_area(src)
- for(var/turf/simulated/ST in orange(1,src))
- if(ST.type == base_turf)
- continue
- ST.ChangeTurf(base_turf)
+/obj/effect/bhole/proc/pull_1()
+ grav(10, 4, 10, 0)
+ addtimer(CALLBACK(src, PROC_REF(pull_2)), 0.6 SECONDS, TIMER_DELETE_ME)
- sleep(6)
- grav(10, 4, 10, 0 )
- sleep(6)
- grav( 8, 4, 10, 0 )
- sleep(6)
- grav( 9, 4, 10, 0 )
- sleep(6)
- grav( 7, 3, 40, 1 )
- sleep(6)
- grav( 5, 3, 40, 1 )
- sleep(6)
- grav( 6, 3, 40, 1 )
- sleep(6)
- grav( 4, 2, 50, 6 )
- sleep(6)
- grav( 3, 2, 50, 6 )
- sleep(6)
- grav( 2, 2, 75,25 )
- sleep(6)
+/obj/effect/bhole/proc/pull_2()
+ grav(8, 4, 10, 0)
+ addtimer(CALLBACK(src, PROC_REF(pull_3)), 0.6 SECONDS, TIMER_DELETE_ME)
+/obj/effect/bhole/proc/pull_3()
+ grav(9, 4, 10, 0)
+ addtimer(CALLBACK(src, PROC_REF(pull_4)), 0.6 SECONDS, TIMER_DELETE_ME)
+/obj/effect/bhole/proc/pull_4()
+ grav(7, 3, 40, 1)
+ addtimer(CALLBACK(src, PROC_REF(pull_5)), 0.6 SECONDS, TIMER_DELETE_ME)
- //MOVEMENT
- if( prob(50) )
- src.anchored = FALSE
- step(src,pick(alldirs))
- src.anchored = TRUE
+/obj/effect/bhole/proc/pull_5()
+ grav(5, 3, 40, 1)
+ addtimer(CALLBACK(src, PROC_REF(pull_6)), 0.6 SECONDS, TIMER_DELETE_ME)
+
+/obj/effect/bhole/proc/pull_6()
+ grav(6, 3, 40, 1)
+ addtimer(CALLBACK(src, PROC_REF(pull_7)), 0.6 SECONDS, TIMER_DELETE_ME)
+
+/obj/effect/bhole/proc/pull_7()
+ grav(4, 2, 50, 6)
+ addtimer(CALLBACK(src, PROC_REF(pull_8)), 0.6 SECONDS, TIMER_DELETE_ME)
+
+/obj/effect/bhole/proc/pull_8()
+ grav(3, 2, 50, 6)
+ addtimer(CALLBACK(src, PROC_REF(pull_9)), 0.6 SECONDS, TIMER_DELETE_ME)
+
+/obj/effect/bhole/proc/pull_9()
+ grav(2, 2, 75,25)
+ addtimer(CALLBACK(src, PROC_REF(move)), 0.6 SECONDS, TIMER_DELETE_ME)
+
+/obj/effect/bhole/proc/move()
+ //MOVEMENT
+ if(prob(50))
+ anchored = FALSE
+ step(src, pick(alldirs))
+ anchored = TRUE
+ controller()
/obj/effect/bhole/proc/grav(var/r, var/ex_act_force, var/pull_chance, var/turf_removal_chance)
if(!isturf(loc)) //blackhole cannot be contained inside anything. Weird stuff might happen
diff --git a/code/game/gamemodes/events/dust.dm b/code/game/gamemodes/events/dust.dm
index b3728390d0..bcf038693f 100644
--- a/code/game/gamemodes/events/dust.dm
+++ b/code/game/gamemodes/events/dust.dm
@@ -94,7 +94,7 @@ The "dust" will damage the hull of the station causin minor hull breaches.
spawn(0)
if(prob(50))
for(var/mob/M in range(10, src))
- if(!M.stat && !istype(M, /mob/living/silicon/ai))
+ if(!M.stat && !isAI(M))
shake_camera(M, 3, 1)
if (A)
playsound(src, 'sound/effects/meteorimpact.ogg', 40, 1)
diff --git a/code/game/gamemodes/events/holidays/Christmas.dm b/code/game/gamemodes/events/holidays/Christmas.dm
index 8e79379c7f..bb5e9f84e5 100644
--- a/code/game/gamemodes/events/holidays/Christmas.dm
+++ b/code/game/gamemodes/events/holidays/Christmas.dm
@@ -27,7 +27,7 @@
..()
/obj/item/toy/xmas_cracker/attack(mob/target, mob/user)
- if( !cracked && (istype(target,/mob/living/silicon) || (istype(target,/mob/living/carbon/human) && !target.get_active_hand())) && target.stat == CONSCIOUS)
+ if( !cracked && (issilicon(target) || (ishuman(target) && !target.get_active_hand())) && target.stat == CONSCIOUS)
target.visible_message(span_notice("[user] and [target] pop \an [src]! *pop*"), span_notice("You pull \an [src] with [target]! *pop*"), span_notice("You hear a *pop*."))
var/obj/item/paper/Joke = new /obj/item/paper(user.loc)
Joke.name = "[pick("awful","terrible","unfunny")] joke"
diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm
index 51e3a508ac..184672cf99 100644
--- a/code/game/gamemodes/game_mode.dm
+++ b/code/game/gamemodes/game_mode.dm
@@ -397,9 +397,9 @@ var/global/list/additional_antag_types = list()
for(var/mob/player in player_list)
if(!player.client)
continue
- if(istype(player, /mob/new_player))
+ if(isnewplayer(player))
continue
- if(istype(player, /mob/observer/dead) && !ghosts_only)
+ if(isobserver(player) && !ghosts_only)
continue
if(!role || (player.client.prefs.be_special & role))
log_debug("[player.key] had [antag_id] enabled, so we are drafting them.")
diff --git a/code/game/gamemodes/meme/meme.dm b/code/game/gamemodes/meme/meme.dm
index d79e63ad2a..6b03c69545 100644
--- a/code/game/gamemodes/meme/meme.dm
+++ b/code/game/gamemodes/meme/meme.dm
@@ -133,7 +133,7 @@
/datum/game_mode/meme/check_finished()
var/memes_alive = 0
for(var/datum/mind/meme in memes)
- if(!istype(meme.current,/mob/living))
+ if(!isliving(meme.current))
continue
if(meme.current.stat==2)
continue
diff --git a/code/game/gamemodes/newobjective.dm b/code/game/gamemodes/newobjective.dm
index f12840fdf3..80a2b82a1e 100644
--- a/code/game/gamemodes/newobjective.dm
+++ b/code/game/gamemodes/newobjective.dm
@@ -23,7 +23,7 @@
var/list/datum/objective/assassinate/missions = list()
for(var/datum/mind/target in ticker.minds)
- if((target != traitor) && istype(target.current, /mob/living/carbon/human))
+ if((target != traitor) && ishuman(target.current))
if(target && target.current)
var/datum/objective/target_obj = new /datum/objective/assassinate(null,job,target)
missions += target_obj
@@ -34,7 +34,7 @@
var/list/datum/objective/frame/missions = list()
for(var/datum/mind/target in ticker.minds)
- if((target != traitor) && istype(target.current, /mob/living/carbon/human))
+ if((target != traitor) && ishuman(target.current))
if(target && target.current)
var/datum/objective/target_obj = new /datum/objective/frame(null,job,target)
missions += target_obj
@@ -45,7 +45,7 @@
var/list/datum/objective/frame/missions = list()
for(var/datum/mind/target in ticker.minds)
- if((target != traitor) && istype(target.current, /mob/living/carbon/human))
+ if((target != traitor) && ishuman(target.current))
if(target && target.current)
var/datum/objective/target_obj = new /datum/objective/protection(null,job,target)
missions += target_obj
@@ -388,7 +388,7 @@ datum
find_target_by_role(var/role)
for(var/datum/mind/possible_target in ticker.minds)
- if((possible_target != owner) && istype(possible_target.current, /mob/living/carbon/human) && (possible_target.assigned_role == role))
+ if((possible_target != owner) && ishuman(possible_target.current) && (possible_target.assigned_role == role))
target = possible_target
break
@@ -404,7 +404,7 @@ datum
var/list/possible_targets = list()
for(var/datum/mind/possible_target in ticker.minds)
- if((possible_target != owner) && istype(possible_target.current, /mob/living/carbon/human))
+ if((possible_target != owner) && ishuman(possible_target.current))
possible_targets += possible_target
if(possible_targets.len > 0)
@@ -439,7 +439,7 @@ datum
find_target_by_role(var/role)
for(var/datum/mind/possible_target in ticker.minds)
- if((possible_target != owner) && istype(possible_target.current, /mob/living/carbon/human) && (possible_target.assigned_role == role))
+ if((possible_target != owner) && ishuman(possible_target.current) && (possible_target.assigned_role == role))
target = possible_target
break
@@ -1068,7 +1068,7 @@ datum
if(steal_target)
for(var/obj/item/aicard/C in owner.current.get_contents())
for(var/mob/living/silicon/ai/M in C)
- if(istype(M, /mob/living/silicon/ai) && M.stat != 2)
+ if(isAI(M) && M.stat != 2)
return 1
for(var/mob/living/silicon/ai/M in world)
if(istype(M.loc, /turf))
@@ -1336,7 +1336,7 @@ datum
var/current_amount
var/obj/item/rig/S
- if(istype(owner.current,/mob/living/carbon/human))
+ if(ishuman(owner.current))
var/mob/living/carbon/human/H = owner.current
S = H.back
if(!S || !istype(S) || !S.stored_research.len)
diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm
index 1e589f6f13..86bb8176f8 100644
--- a/code/game/gamemodes/objective.dm
+++ b/code/game/gamemodes/objective.dm
@@ -142,7 +142,7 @@ var/global/list/all_objectives = list()
return target
/datum/objective/anti_revolution/demote/check_completion()
- if(target && target.current && istype(target,/mob/living/carbon/human))
+ if(target && target.current && ishuman(target))
var/obj/item/card/id/I = target.current:wear_id
if(istype(I, /obj/item/pda))
var/obj/item/pda/P = I
@@ -389,7 +389,7 @@ var/global/list/all_objectives = list()
if(already_completed)
return 1
- if(target && target.current && istype(target.current, /mob/living/carbon/human))
+ if(target && target.current && ishuman(target.current))
if(target.current.stat == DEAD)
return 0
@@ -518,7 +518,7 @@ var/global/list/all_objectives = list()
for(var/obj/item/aicard/C in all_items) //Check for ai card
for(var/mob/living/silicon/ai/M in C)
- if(istype(M, /mob/living/silicon/ai) && M.stat != 2) //See if any AI's are alive inside that card.
+ if(isAI(M) && M.stat != 2) //See if any AI's are alive inside that card.
return 1
for(var/mob/living/silicon/ai/ai in mob_list)
@@ -558,7 +558,7 @@ var/global/list/all_objectives = list()
var/current_amount
var/obj/item/rig/S
- if(istype(owner.current,/mob/living/carbon/human))
+ if(ishuman(owner.current))
var/mob/living/carbon/human/H = owner.current
S = H.back
diff --git a/code/game/gamemodes/technomancer/catalog.dm b/code/game/gamemodes/technomancer/catalog.dm
index 6148f50bbd..f911ee76c8 100644
--- a/code/game/gamemodes/technomancer/catalog.dm
+++ b/code/game/gamemodes/technomancer/catalog.dm
@@ -279,7 +279,7 @@ var/list/all_technomancer_assistance = subtypesof(/datum/technomancer/assistance
if(H.stat || H.restrained())
return
- if(!istype(H, /mob/living/carbon/human))
+ if(!ishuman(H))
return 1 //why does this return 1?
if(H != owner)
diff --git a/code/game/gamemodes/technomancer/core_obj.dm b/code/game/gamemodes/technomancer/core_obj.dm
index 333b445259..2a59ee8ada 100644
--- a/code/game/gamemodes/technomancer/core_obj.dm
+++ b/code/game/gamemodes/technomancer/core_obj.dm
@@ -116,7 +116,7 @@
summoned_mobs -= A
continue
// Now check for dead mobs who shouldn't be on the list.
- if(istype(A, /mob/living))
+ if(isliving(A))
var/mob/living/L = A
if(L.stat == DEAD)
summoned_mobs -= L
diff --git a/code/game/gamemodes/technomancer/spell_objs_helpers.dm b/code/game/gamemodes/technomancer/spell_objs_helpers.dm
index dbcf017dbd..59522593ab 100644
--- a/code/game/gamemodes/technomancer/spell_objs_helpers.dm
+++ b/code/game/gamemodes/technomancer/spell_objs_helpers.dm
@@ -19,7 +19,7 @@
return 1
if(L.mind && technomancers.is_antagonist(L.mind)) // This should be done better since we might want opposing technomancers later.
return 1
- if(istype(L, /mob/living/simple_mob)) // Mind controlled simple mobs count as allies too.
+ if(isanimal(L)) // Mind controlled simple mobs count as allies too.
var/mob/living/simple_mob/SM = L
if(owner in SM.friends)
return 1
@@ -58,4 +58,4 @@
if(!L.stat) // Don't want to target dead people or SSDs.
chosen_target = L
break
- return chosen_target
\ No newline at end of file
+ return chosen_target
diff --git a/code/game/gamemodes/technomancer/spells/abjuration.dm b/code/game/gamemodes/technomancer/spells/abjuration.dm
index 732047af58..ed7da4e86c 100644
--- a/code/game/gamemodes/technomancer/spells/abjuration.dm
+++ b/code/game/gamemodes/technomancer/spells/abjuration.dm
@@ -14,12 +14,12 @@
aspect = ASPECT_TELE
/obj/item/spell/abjuration/on_ranged_cast(atom/hit_atom, mob/user)
- if(istype(hit_atom, /mob/living) && pay_energy(500) && within_range(hit_atom))
+ if(isliving(hit_atom) && pay_energy(500) && within_range(hit_atom))
var/mob/living/L = hit_atom
var/mob/living/simple_mob/SM = null
//Bit of a roundabout typecheck, in order to test for two variables from two different mob types in one line.
- if(istype(L, /mob/living/simple_mob))
+ if(isanimal(L))
SM = L
if(L.summoned || (SM && SM.supernatural) )
if(L.client) // Player-controlled mobs are immune to being killed by this.
diff --git a/code/game/gamemodes/technomancer/spells/apportation.dm b/code/game/gamemodes/technomancer/spells/apportation.dm
index b47dc28288..fe9afedea3 100644
--- a/code/game/gamemodes/technomancer/spells/apportation.dm
+++ b/code/game/gamemodes/technomancer/spells/apportation.dm
@@ -47,7 +47,7 @@
add_attack_logs(user,I,"Stolen with [src]")
qdel(src)
//Now let's try to teleport a living mob.
- else if(istype(hit_atom, /mob/living))
+ else if(isliving(hit_atom))
var/mob/living/L = hit_atom
to_chat(L, span_danger("You are teleported towards \the [user]."))
var/datum/effect/effect/system/spark_spread/s1 = new /datum/effect/effect/system/spark_spread
diff --git a/code/game/gamemodes/technomancer/spells/control.dm b/code/game/gamemodes/technomancer/spells/control.dm
index 27e9fe5b47..4e8083ceb1 100644
--- a/code/game/gamemodes/technomancer/spells/control.dm
+++ b/code/game/gamemodes/technomancer/spells/control.dm
@@ -37,7 +37,7 @@
AI.wander = FALSE
AI.forget_everything()
- if(istype(L, /mob/living/simple_mob))
+ if(isanimal(L))
var/mob/living/simple_mob/SM = L
SM.friends |= src.owner
@@ -55,7 +55,7 @@
AI.wander = initial(AI.wander)
AI.forget_everything()
- if(istype(L, /mob/living/simple_mob))
+ if(isanimal(L))
var/mob/living/simple_mob/SM = L
SM.friends -= owner
diff --git a/code/game/gamemodes/technomancer/spells/gambit.dm b/code/game/gamemodes/technomancer/spells/gambit.dm
index 62c7f9620f..dcd74ab476 100644
--- a/code/game/gamemodes/technomancer/spells/gambit.dm
+++ b/code/game/gamemodes/technomancer/spells/gambit.dm
@@ -75,7 +75,7 @@
for(var/mob/living/L in view(owner))
// Spiders, carp... bears.
- if(istype(L, /mob/living/simple_mob))
+ if(isanimal(L))
var/mob/living/simple_mob/SM = L
if(!is_ally(SM) && SM.has_AI() && SM.ai_holder.hostile)
hostile_mobs++
@@ -83,13 +83,13 @@
potential_spells |= /obj/item/spell/abjuration
// Always assume borgs are hostile.
- if(istype(L, /mob/living/silicon/robot))
+ if(isrobot(L))
if(!istype(L, /mob/living/silicon/robot/drone)) // Drones are okay, however.
hostile_mobs++
potential_spells |= /obj/item/spell/projectile/ionic_bolt
// Finally we get to humanoids.
- if(istype(L, /mob/living/carbon/human))
+ if(ishuman(L))
var/mob/living/carbon/human/H = L
if(is_ally(H)) // Don't get scared by our apprentice.
continue
diff --git a/code/game/gamemodes/technomancer/spells/insert/insert.dm b/code/game/gamemodes/technomancer/spells/insert/insert.dm
index d882d624b2..ab18c16e3f 100644
--- a/code/game/gamemodes/technomancer/spells/insert/insert.dm
+++ b/code/game/gamemodes/technomancer/spells/insert/insert.dm
@@ -11,8 +11,8 @@
var/obj/item/inserted_spell/inserting = null
var/allow_stacking = 0
-/obj/item/spell/insert/New()
- ..()
+/obj/item/spell/insert/Initialize()
+ . = ..()
set_light(spell_light_range, spell_light_intensity, l_color = light_color)
/obj/item/inserted_spell
@@ -49,11 +49,11 @@
qdel(src)
/obj/item/spell/insert/on_melee_cast(atom/hit_atom, mob/user)
- if(istype(hit_atom, /mob/living))
+ if(isliving(hit_atom))
var/mob/living/L = hit_atom
insert(L,user)
/obj/item/spell/insert/on_ranged_cast(atom/hit_atom, mob/user)
- if(istype(hit_atom, /mob/living))
+ if(isliving(hit_atom))
var/mob/living/L = hit_atom
insert(L,user)
diff --git a/code/game/gamemodes/technomancer/spells/modifier/modifier.dm b/code/game/gamemodes/technomancer/spells/modifier/modifier.dm
index cca02c4ae3..b462a4a1c8 100644
--- a/code/game/gamemodes/technomancer/spells/modifier/modifier.dm
+++ b/code/game/gamemodes/technomancer/spells/modifier/modifier.dm
@@ -9,17 +9,17 @@
var/spell_light_intensity = 2
var/spell_light_range = 3
-/obj/item/spell/modifier/New()
- ..()
+/obj/item/spell/modifier/Initialize()
+ . = ..()
set_light(spell_light_range, spell_light_intensity, l_color = light_color)
/obj/item/spell/modifier/on_melee_cast(atom/hit_atom, mob/user)
- if(istype(hit_atom, /mob/living))
+ if(isliving(hit_atom))
return on_add_modifier(hit_atom)
return FALSE
/obj/item/spell/modifier/on_ranged_cast(atom/hit_atom, mob/user)
- if(istype(hit_atom, /mob/living))
+ if(isliving(hit_atom))
return on_add_modifier(hit_atom)
return FALSE
@@ -38,4 +38,4 @@
// Technomancer specific subtype which keeps track of spell power and gets targeted specificially by Dispel.
/datum/modifier/technomancer
- var/spell_power = null // Set by on_add_modifier.
\ No newline at end of file
+ var/spell_power = null // Set by on_add_modifier.
diff --git a/code/game/gamemodes/technomancer/spells/phase_shift.dm b/code/game/gamemodes/technomancer/spells/phase_shift.dm
index e8a39c144b..7811569615 100644
--- a/code/game/gamemodes/technomancer/spells/phase_shift.dm
+++ b/code/game/gamemodes/technomancer/spells/phase_shift.dm
@@ -15,8 +15,8 @@
cast_methods = CAST_USE
aspect = ASPECT_TELE
-/obj/item/spell/phase_shift/New()
- ..()
+/obj/item/spell/phase_shift/Initialize()
+ . = ..()
set_light(3, 2, l_color = "#FA58F4")
/obj/effect/phase_shift
@@ -28,8 +28,8 @@
/obj/effect/phase_shift/ex_act()
return
-/obj/effect/phase_shift/New()
- ..()
+/obj/effect/phase_shift/Initialize()
+ . = ..()
set_light(3, 5, l_color = "#FA58F4")
START_PROCESSING(SSobj, src)
diff --git a/code/game/gamemodes/technomancer/spells/resurrect.dm b/code/game/gamemodes/technomancer/spells/resurrect.dm
index 16a8f9b14f..26dd8644bc 100644
--- a/code/game/gamemodes/technomancer/spells/resurrect.dm
+++ b/code/game/gamemodes/technomancer/spells/resurrect.dm
@@ -29,7 +29,7 @@
to_chat(user, span_danger("\The [L]'s been dead for too long, even this function cannot replace cloning at this point."))
return 0
to_chat(user, span_notice("You stab \the [L] with a hidden integrated hypo, attempting to bring them back..."))
- if(istype(L, /mob/living/simple_mob))
+ if(isanimal(L))
var/mob/living/simple_mob/SM = L
SM.health = SM.getMaxHealth() / 3
SM.set_stat(CONSCIOUS)
diff --git a/code/game/gamemodes/technomancer/spells/spawner/darkness.dm b/code/game/gamemodes/technomancer/spells/spawner/darkness.dm
index 0d7d820423..7748470f6f 100644
--- a/code/game/gamemodes/technomancer/spells/spawner/darkness.dm
+++ b/code/game/gamemodes/technomancer/spells/spawner/darkness.dm
@@ -18,8 +18,8 @@
adjust_instability(4)
..()
-/obj/item/spell/spawner/darkness/New()
- ..()
+/obj/item/spell/spawner/darkness/Initialize()
+ . = ..()
set_light(6, -20, l_color = "#FFFFFF")
/obj/effect/temporary_effect/darkness
@@ -28,4 +28,4 @@
invisibility = 101
light_range = 6
light_power = -20
- light_on = TRUE
\ No newline at end of file
+ light_on = TRUE
diff --git a/code/game/gamemodes/technomancer/spells/spawner/destablize.dm b/code/game/gamemodes/technomancer/spells/spawner/destablize.dm
index d491ce60fa..aae1443614 100644
--- a/code/game/gamemodes/technomancer/spells/spawner/destablize.dm
+++ b/code/game/gamemodes/technomancer/spells/spawner/destablize.dm
@@ -14,8 +14,8 @@
aspect = ASPECT_UNSTABLE
spawner_type = /obj/effect/temporary_effect/destablize
-/obj/item/spell/spawner/destablize/New()
- ..()
+/obj/item/spell/spawner/destablize/Initialize()
+ . = ..()
set_light(3, 2, l_color = "#C26DDE")
/obj/item/spell/spawner/destablize/on_ranged_cast(atom/hit_atom, mob/user)
@@ -51,4 +51,4 @@
var/outgoing_instability = instability_power * ( 1 / (radius**2) )
L.receive_radiated_instability(outgoing_instability)
pulses_remaining--
- qdel(src)
\ No newline at end of file
+ qdel(src)
diff --git a/code/game/gamemodes/technomancer/spells/spawner/pulsar.dm b/code/game/gamemodes/technomancer/spells/spawner/pulsar.dm
index aa30601bcf..e67687aa05 100644
--- a/code/game/gamemodes/technomancer/spells/spawner/pulsar.dm
+++ b/code/game/gamemodes/technomancer/spells/spawner/pulsar.dm
@@ -13,8 +13,8 @@
aspect = ASPECT_EMP
spawner_type = /obj/effect/temporary_effect/pulse/pulsar
-/obj/item/spell/spawner/pulsar/New()
- ..()
+/obj/item/spell/spawner/pulsar/Initialize()
+ . = ..()
set_light(3, 2, l_color = "#2ECCFA")
/obj/item/spell/spawner/pulsar/on_ranged_cast(atom/hit_atom, mob/user)
@@ -29,6 +29,7 @@
/obj/effect/temporary_effect/pulse
var/pulses_remaining = 3
var/pulse_delay = 2 SECONDS
+ var/pulsetimer
/obj/effect/temporary_effect/pulse/Initialize()
..()
@@ -37,14 +38,19 @@
/obj/effect/temporary_effect/pulse/LateInitialize()
pulse_loop()
+/obj/effect/temporary_effect/pulse/Destroy()
+ deltimer(pulsetimer)
+ pulsetimer = null
+ . = ..()
+
/obj/effect/temporary_effect/pulse/proc/pulse_loop()
- set waitfor = FALSE
-
- while(pulses_remaining)
- sleep(pulse_delay)
- on_pulse()
+
+ if(pulses_remaining > 0)
+ pulsetimer = addtimer(CALLBACK(src, PROC_REF(pulse_loop)), pulse_delay, TIMER_STOPPABLE)
pulses_remaining--
- qdel(src)
+ on_pulse()
+ else
+ qdel(src)
// Override for specific effects.
/obj/effect/temporary_effect/pulse/proc/on_pulse()
@@ -63,10 +69,3 @@
/obj/effect/temporary_effect/pulse/pulsar/on_pulse()
empulse(src, 1, 1, 2, 2, log = 1)
-
-
-
-
-
-
-
diff --git a/code/game/jobs/job/captain.dm b/code/game/jobs/job/captain.dm
index df2ab4c626..433e990800 100644
--- a/code/game/jobs/job/captain.dm
+++ b/code/game/jobs/job/captain.dm
@@ -26,7 +26,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
min_age_by_species = list(SPECIES_HUMAN_VATBORN = 14)
ideal_character_age = 70 // Old geezer captains ftw
ideal_age_by_species = list(SPECIES_HUMAN_VATBORN = 55) /// Vatborn live shorter, no other race eligible for captain besides human/skrell
- banned_job_species = list(SPECIES_UNATHI, SPECIES_TAJ, SPECIES_DIONA, SPECIES_PROMETHEAN, SPECIES_ZADDAT, "mechanical", "digital")
+ banned_job_species = list(SPECIES_UNATHI, SPECIES_TAJARAN, SPECIES_DIONA, SPECIES_PROMETHEAN, SPECIES_ZADDAT, "mechanical", "digital")
disallow_jobhop = TRUE
pto_type = PTO_CIVILIAN
diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm
index 30738ecd45..acb568c6d8 100644
--- a/code/game/jobs/job_controller.dm
+++ b/code/game/jobs/job_controller.dm
@@ -50,7 +50,7 @@ var/global/datum/controller/occupations/job_master
var/datum/job/job = GetJob(rank)
if(!job)
return 0
- if((job.minimum_character_age || job.min_age_by_species) && (player.client.prefs.age < job.get_min_age(player.client.prefs.species, player.client.prefs.organ_data["brain"])))
+ if((job.minimum_character_age || job.min_age_by_species) && (player.read_preference(/datum/preference/numeric/human/age) < job.get_min_age(player.client.prefs.species, player.client.prefs.organ_data["brain"])))
return 0
if(jobban_isbanned(player, rank))
return 0
@@ -93,7 +93,7 @@ var/global/datum/controller/occupations/job_master
if(!job.player_old_enough(player.client))
Debug("FOC player not old enough, Player: [player]")
continue
- if(job.minimum_character_age && (player.client.prefs.age < job.get_min_age(player.client.prefs.species, player.client.prefs.organ_data["brain"])))
+ if(job.minimum_character_age && (player.read_preference(/datum/preference/numeric/human/age) < job.get_min_age(player.client.prefs.species, player.client.prefs.organ_data["brain"])))
Debug("FOC character not old enough, Player: [player]")
continue
//VOREStation Code Start
@@ -121,7 +121,7 @@ var/global/datum/controller/occupations/job_master
if(!job)
continue
- if((job.minimum_character_age || job.min_age_by_species) && (player.client.prefs.age < job.get_min_age(player.client.prefs.species, player.client.prefs.organ_data["brain"])))
+ if((job.minimum_character_age || job.min_age_by_species) && (player.read_preference(/datum/preference/numeric/human/age) < job.get_min_age(player.client.prefs.species, player.client.prefs.organ_data["brain"])))
continue
if(job.is_species_banned(player.client.prefs.species, player.client.prefs.organ_data["brain"]) == TRUE)
@@ -180,7 +180,7 @@ var/global/datum/controller/occupations/job_master
for(var/mob/V in candidates)
// Log-out during round-start? What a bad boy, no head position for you!
if(!V.client) continue
- var/age = V.client.prefs.age
+ var/age = V.read_preference(/datum/preference/numeric/human/age)
if(age < job.get_min_age(V.client.prefs.species, V.client.prefs.organ_data["brain"])) // Nope.
continue
@@ -660,16 +660,16 @@ var/global/datum/controller/occupations/job_master
fail_deadly = J?.offmap_spawn
//Spawn them at their preferred one
- if(C && C.prefs.spawnpoint)
- if(!(C.prefs.spawnpoint in using_map.allowed_spawns))
+ if(C && C.prefs.read_preference(/datum/preference/choiced/living/spawnpoint))
+ if(!(C.prefs.read_preference(/datum/preference/choiced/living/spawnpoint) in using_map.allowed_spawns))
if(fail_deadly)
to_chat(C, span_warning("Your chosen spawnpoint is unavailable for this map and your job requires a specific spawnpoint. Please correct your spawn point choice."))
return
else
- to_chat(C, span_warning("Your chosen spawnpoint ([C.prefs.spawnpoint]) is unavailable for the current map. Spawning you at one of the enabled spawn points instead."))
+ to_chat(C, span_warning("Your chosen spawnpoint ([C.prefs.read_preference(/datum/preference/choiced/living/spawnpoint)]) is unavailable for the current map. Spawning you at one of the enabled spawn points instead."))
spawnpos = null
else
- spawnpos = spawntypes[C.prefs.spawnpoint]
+ spawnpos = spawntypes[C.prefs.read_preference(/datum/preference/choiced/living/spawnpoint)]
//We will return a list key'd by "turf" and "msg"
. = list("turf","msg")
diff --git a/code/game/machinery/Beacon.dm b/code/game/machinery/Beacon.dm
index fbb71dc9f0..6f8ec101af 100644
--- a/code/game/machinery/Beacon.dm
+++ b/code/game/machinery/Beacon.dm
@@ -10,8 +10,8 @@
idle_power_usage = 0
var/obj/item/radio/beacon/Beacon
-/obj/machinery/bluespace_beacon/New()
- ..()
+/obj/machinery/bluespace_beacon/Initialize(mapload)
+ . = ..()
var/turf/T = src.loc
Beacon = new /obj/item/radio/beacon
Beacon.invisibility = INVISIBILITY_MAXIMUM
@@ -48,4 +48,4 @@
if(Beacon.loc != src.loc)
Beacon.loc = src.loc
- update_icon()
\ No newline at end of file
+ update_icon()
diff --git a/code/game/machinery/CableLayer.dm b/code/game/machinery/CableLayer.dm
index e13944eb9a..aedbb035f3 100644
--- a/code/game/machinery/CableLayer.dm
+++ b/code/game/machinery/CableLayer.dm
@@ -8,9 +8,9 @@
var/max_cable = 100
var/on = 0
-/obj/machinery/cablelayer/New()
- cable = new(src, 100)
- ..()
+/obj/machinery/cablelayer/Initialize()
+ cable = new(src, max_cable)
+ . = ..()
/obj/machinery/cablelayer/Moved(atom/old_loc, direction, forced = FALSE)
. = ..()
diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm
index 9535ddac85..9f7fbe5441 100644
--- a/code/game/machinery/adv_med.dm
+++ b/code/game/machinery/adv_med.dm
@@ -565,8 +565,8 @@
circuit = /obj/item/circuitboard/scanner_console
var/printing = null
-/obj/machinery/body_scanconsole/New()
- ..()
+/obj/machinery/body_scanconsole/Initialize(mapload)
+ . = ..()
findscanner()
/obj/machinery/body_scanconsole/Destroy()
diff --git a/code/game/machinery/ai_slipper.dm b/code/game/machinery/ai_slipper.dm
index afbe5c334d..d307576da2 100644
--- a/code/game/machinery/ai_slipper.dm
+++ b/code/game/machinery/ai_slipper.dm
@@ -14,8 +14,8 @@
var/cooldown_on = 0
req_access = list(access_ai_upload)
-/obj/machinery/ai_slipper/New()
- ..()
+/obj/machinery/ai_slipper/Initialize(mapload)
+ . = ..()
update_icon()
/obj/machinery/ai_slipper/power_change()
diff --git a/code/game/machinery/airconditioner_vr.dm b/code/game/machinery/airconditioner_vr.dm
index 9385e408b2..62926eb9e9 100644
--- a/code/game/machinery/airconditioner_vr.dm
+++ b/code/game/machinery/airconditioner_vr.dm
@@ -20,8 +20,8 @@
var/target_temp = T20C
var/mode = MODE_IDLE
-/obj/machinery/power/thermoregulator/New()
- ..()
+/obj/machinery/power/thermoregulator/Initialize(mapload)
+ . = ..()
default_apply_parts()
/obj/machinery/power/thermoregulator/examine(mob/user)
diff --git a/code/game/machinery/atm_ret_field.dm b/code/game/machinery/atm_ret_field.dm
index 96f1500a9f..b0d8fcd6c2 100644
--- a/code/game/machinery/atm_ret_field.dm
+++ b/code/game/machinery/atm_ret_field.dm
@@ -81,6 +81,7 @@
return
/obj/machinery/atmospheric_field_generator/perma/Initialize()
+ . = ..()
generate_field()
/obj/machinery/atmospheric_field_generator/update_icon()
diff --git a/code/game/machinery/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm
index 7271b01ff8..7847acc627 100644
--- a/code/game/machinery/atmoalter/canister.dm
+++ b/code/game/machinery/atmoalter/canister.dm
@@ -261,7 +261,7 @@ update_flag
src.add_fingerprint(user)
healthcheck()
- if(istype(user, /mob/living/silicon/robot) && istype(W, /obj/item/tank/jetpack))
+ if(isrobot(user) && istype(W, /obj/item/tank/jetpack))
var/datum/gas_mixture/thejetpack = W:air_contents
var/env_pressure = thejetpack.return_pressure()
var/pressure_delta = min(10*ONE_ATMOSPHERE - env_pressure, (air_contents.return_pressure() - env_pressure)/2)
diff --git a/code/game/machinery/atmoalter/meter.dm b/code/game/machinery/atmoalter/meter.dm
index 7dfea2a592..f325c5ba93 100644
--- a/code/game/machinery/atmoalter/meter.dm
+++ b/code/game/machinery/atmoalter/meter.dm
@@ -79,7 +79,7 @@
/obj/machinery/meter/examine(mob/user)
. = ..()
- if(get_dist(user, src) > 3 && !(istype(user, /mob/living/silicon/ai) || istype(user, /mob/observer/dead)))
+ if(get_dist(user, src) > 3 && !(isAI(user) || isobserver(user)))
. += span_warning("You are too far away to read it.")
else if(stat & (NOPOWER|BROKEN))
@@ -96,7 +96,7 @@
/obj/machinery/meter/Click()
- if(istype(usr, /mob/living/carbon/human) || istype(usr, /mob/living/silicon/ai)) // ghosts can call ..() for examine
+ if(ishuman(usr) || isAI(usr)) // ghosts can call ..() for examine
var/mob/living/L = usr
if(!L.get_active_hand() || !L.Adjacent(src))
usr.examinate(src)
diff --git a/code/game/machinery/bioprinter.dm b/code/game/machinery/bioprinter.dm
index 6fda6f6ae7..a527114b32 100644
--- a/code/game/machinery/bioprinter.dm
+++ b/code/game/machinery/bioprinter.dm
@@ -338,7 +338,7 @@
var/matter_amount_per_sheet = 10
var/matter_type = MAT_STEEL
-/obj/machinery/organ_printer/robot/full/New()
+/obj/machinery/organ_printer/robot/full/Initialize()
. = ..()
stored_matter = max_stored_matter
diff --git a/code/game/machinery/bomb_tester_vr.dm b/code/game/machinery/bomb_tester_vr.dm
index 6e59c56844..baa6c6633a 100644
--- a/code/game/machinery/bomb_tester_vr.dm
+++ b/code/game/machinery/bomb_tester_vr.dm
@@ -32,8 +32,8 @@
var/datum/gas_mixture/faketank
var/faketank_integrity
-/obj/machinery/bomb_tester/New()
- ..()
+/obj/machinery/bomb_tester/Initialize(mapload)
+ . = ..()
default_apply_parts()
RefreshParts()
faketank = new
diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm
index 1f89fdbe98..6aa664a089 100644
--- a/code/game/machinery/camera/camera.dm
+++ b/code/game/machinery/camera/camera.dm
@@ -185,7 +185,7 @@
else
assembly.state = 1
to_chat(user, span_notice("You cut \the [src] free from the wall."))
- new /obj/item/stack/cable_coil(src.loc, length=2)
+ new /obj/item/stack/cable_coil(src.loc, 2)
assembly = null //so qdel doesn't eat it.
qdel(src)
@@ -244,7 +244,7 @@
/obj/machinery/camera/proc/deactivate(user as mob, var/choice = 1)
// The only way for AI to reactivate cameras are malf abilities, this gives them different messages.
- if(istype(user, /mob/living/silicon/ai))
+ if(isAI(user))
user = null
if(choice != 1)
@@ -393,7 +393,7 @@
return 0
/obj/machinery/camera/interact(mob/living/user as mob)
- if(!panel_open || istype(user, /mob/living/silicon/ai))
+ if(!panel_open || isAI(user))
return
if(stat & BROKEN)
diff --git a/code/game/machinery/camera/motion.dm b/code/game/machinery/camera/motion.dm
index 00bfeb09cc..aebee15e3c 100644
--- a/code/game/machinery/camera/motion.dm
+++ b/code/game/machinery/camera/motion.dm
@@ -25,7 +25,7 @@
lostTarget(target)
/obj/machinery/camera/proc/newTarget(var/mob/target)
- if (istype(target, /mob/living/silicon/ai)) return 0
+ if (isAI(target)) return 0
if (detectTime == 0)
detectTime = world.time // start the clock
if (!(target in motionTargets))
@@ -59,4 +59,3 @@
if (!area_motion)
if(isliving(AM))
newTarget(AM)
-
diff --git a/code/game/machinery/camera/tracking.dm b/code/game/machinery/camera/tracking.dm
index 80f65a3c22..efb35e92b5 100644
--- a/code/game/machinery/camera/tracking.dm
+++ b/code/game/machinery/camera/tracking.dm
@@ -119,7 +119,7 @@
else
TB.names.Add(name)
TB.namecounts[name] = 1
- if(istype(M, /mob/living/carbon/human))
+ if(ishuman(M))
TB.humans[name] = M
else
TB.others[name] = M
diff --git a/code/game/machinery/cell_charger.dm b/code/game/machinery/cell_charger.dm
index 4ff9a5c540..b33f05c16b 100644
--- a/code/game/machinery/cell_charger.dm
+++ b/code/game/machinery/cell_charger.dm
@@ -100,7 +100,7 @@
update_icon()
/obj/machinery/cell_charger/attack_ai(mob/user)
- if(istype(user, /mob/living/silicon/robot) && Adjacent(user)) // Borgs can remove the cell if they are near enough
+ if(isrobot(user) && Adjacent(user)) // Borgs can remove the cell if they are near enough
if(charging)
user.visible_message("[user] removes [charging] from [src].", "You remove [charging] from [src].")
charging.loc = src.loc
diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm
index ac0d7bc590..d7576fdae4 100644
--- a/code/game/machinery/cloning.dm
+++ b/code/game/machinery/cloning.dm
@@ -14,7 +14,7 @@
if((M.stat != 2) || (!M.client))
continue
//They need a brain!
- if(istype(M, /mob/living/carbon/human))
+ if(ishuman(M))
var/mob/living/carbon/human/H = M
if(!H.has_brain())
continue
@@ -456,8 +456,8 @@
icon_state = "pod_g"
-/obj/machinery/clonepod/full/New()
- ..()
+/obj/machinery/clonepod/full/Initialize()
+ . = ..()
for(var/i = 1 to container_limit)
containers += new /obj/item/reagent_containers/glass/bottle/biomass(src)
diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm
index 50e439b75e..088444aa53 100644
--- a/code/game/machinery/computer/arcade.dm
+++ b/code/game/machinery/computer/arcade.dm
@@ -500,7 +500,7 @@
if(severity >= 3) //you didn't pray hard enough
to_chat(M, span_warning("An overpowering wave of nausea consumes over you. You hunch over, your stomach's contents preparing for a spectacular exit."))
spawn(30)
- if(istype(M,/mob/living/carbon/human))
+ if(ishuman(M))
var/mob/living/carbon/human/H = M
H.vomit()
if(ORION_TRAIL_FLUX)
diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm
index 77f9ce12c0..c4dd7558dc 100644
--- a/code/game/machinery/computer/card.dm
+++ b/code/game/machinery/computer/card.dm
@@ -42,13 +42,13 @@
if(scan)
to_chat(usr, "You remove \the [scan] from \the [src].")
scan.forceMove(get_turf(src))
- if(!usr.get_active_hand() && istype(usr,/mob/living/carbon/human))
+ if(!usr.get_active_hand() && ishuman(usr))
usr.put_in_hands(scan)
scan = null
else if(modify)
to_chat(usr, "You remove \the [modify] from \the [src].")
modify.forceMove(get_turf(src))
- if(!usr.get_active_hand() && istype(usr,/mob/living/carbon/human))
+ if(!usr.get_active_hand() && ishuman(usr))
usr.put_in_hands(modify)
modify = null
else
diff --git a/code/game/machinery/computer/guestpass.dm b/code/game/machinery/computer/guestpass.dm
index ddb74b6ad6..b8ad3ddba3 100644
--- a/code/game/machinery/computer/guestpass.dm
+++ b/code/game/machinery/computer/guestpass.dm
@@ -136,7 +136,7 @@
if(giver)
to_chat(usr, span_notice("You remove \the [giver] from \the [src]."))
giver.loc = get_turf(src)
- if(!usr.get_active_hand() && istype(usr,/mob/living/carbon/human))
+ if(!usr.get_active_hand() && ishuman(usr))
usr.put_in_hands(giver)
else
giver.loc = src.loc
diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm
index afc2640e43..66601e8a08 100644
--- a/code/game/machinery/computer/medical.dm
+++ b/code/game/machinery/computer/medical.dm
@@ -78,7 +78,7 @@
if(scan)
to_chat(usr, "You remove \the [scan] from \the [src].")
scan.loc = get_turf(src)
- if(!usr.get_active_hand() && istype(usr,/mob/living/carbon/human))
+ if(!usr.get_active_hand() && ishuman(usr))
usr.put_in_hands(scan)
scan = null
else
diff --git a/code/game/machinery/computer/message.dm b/code/game/machinery/computer/message.dm
index fb49f1ca0f..ffe823cb71 100644
--- a/code/game/machinery/computer/message.dm
+++ b/code/game/machinery/computer/message.dm
@@ -146,7 +146,7 @@
sendPDAs["[P.name]"] = "\ref[P]"
data["possibleRecipients"] = sendPDAs
- data["isMalfAI"] = ((istype(user, /mob/living/silicon/ai) || istype(user, /mob/living/silicon/robot)) && (user.mind.special_role && user.mind.original == user))
+ data["isMalfAI"] = ((isAI(user) || isrobot(user)) && (user.mind.special_role && user.mind.original == user))
return data
@@ -211,7 +211,7 @@
temp = noserver
//Hack the Console to get the password
if("hack")
- if((istype(ui.user, /mob/living/silicon/ai) || istype(ui.user, /mob/living/silicon/robot)) && (ui.user.mind.special_role && ui.user.mind.original == ui.user))
+ if((isAI(ui.user) || isrobot(ui.user)) && (ui.user.mind.special_role && ui.user.mind.original == ui.user))
hacking = 1
update_icon()
//Time it takes to bruteforce is dependant on the password length.
diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm
index 86d6842df8..b695eb3617 100644
--- a/code/game/machinery/computer/security.dm
+++ b/code/game/machinery/computer/security.dm
@@ -66,7 +66,7 @@
if(scan)
to_chat(usr, "You remove \the [scan] from \the [src].")
scan.loc = get_turf(src)
- if(!usr.get_active_hand() && istype(usr,/mob/living/carbon/human))
+ if(!usr.get_active_hand() && ishuman(usr))
usr.put_in_hands(scan)
scan = null
else
diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm
index 1619659f04..6d24d496ea 100644
--- a/code/game/machinery/cryopod.dm
+++ b/code/game/machinery/cryopod.dm
@@ -339,6 +339,9 @@
//Lifted from Unity stasis.dm and refactored. ~Zuhayr
/obj/machinery/cryopod/process()
if(occupant)
+ if(occupant.loc != src)
+ go_out(TRUE)
+ return
//Allow a ten minute gap between entering the pod and actually despawning.
if(world.time - time_entered < time_till_despawn)
return
@@ -654,12 +657,12 @@
for(var/obj/machinery/gateway/G in range(1,src))
G.icon_state = "on"
-/obj/machinery/cryopod/robot/door/gateway/go_out()
- ..()
+/obj/machinery/cryopod/robot/door/gateway/go_out(var/skip_move = FALSE)
+ ..(skip_move)
for(var/obj/machinery/gateway/G in range(1,src))
G.icon_state = "off"
-/obj/machinery/cryopod/proc/go_out()
+/obj/machinery/cryopod/proc/go_out(var/skip_move = FALSE)
if(!occupant)
return
@@ -667,8 +670,8 @@
if(occupant.client)
occupant.client.eye = occupant.client.mob
occupant.client.perspective = MOB_PERSPECTIVE
-
- occupant.forceMove(get_turf(src))
+ if(!skip_move)
+ occupant.forceMove(get_turf(src))
if(ishuman(occupant) && applies_stasis)
var/mob/living/carbon/human/H = occupant
H.Stasis(0)
diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm
index 54eda82f72..3ff1d2d90c 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -88,7 +88,7 @@
..()
/obj/machinery/door/airlock/attack_alien(var/mob/user) //Familiar, right? Doors. -Mechoid
- if(istype(user, /mob/living/carbon/human))
+ if(ishuman(user))
var/mob/living/carbon/human/X = user
if(istype(X.species, /datum/species/xenos))
if(src.locked || src.welded)
@@ -997,7 +997,7 @@ About the new airlock wires panel:
else
to_chat(user, span_warning("[hold_open] is holding \the [src] open!"))
- if(istype(user, /mob/living/carbon/human))
+ if(ishuman(user))
var/mob/living/carbon/human/X = user
if(istype(X.species, /datum/species/xenos))
src.attack_alien(user)
@@ -1167,7 +1167,7 @@ About the new airlock wires panel:
src.add_fingerprint(user)
if (attempt_vr(src,"attackby_vr",list(C, user))) return
- if(istype(C, /mob/living))
+ if(isliving(C))
..()
return
//VOREstation Edit: Removing material cost from repair requirements
diff --git a/code/game/machinery/doors/blast_door.dm b/code/game/machinery/doors/blast_door.dm
index 8caed89c56..7da07fa04c 100644
--- a/code/game/machinery/doors/blast_door.dm
+++ b/code/game/machinery/doors/blast_door.dm
@@ -139,7 +139,7 @@
//Proc: attack_hand
//Description: Attacked with empty hand. Only to allow special attack_bys.
/obj/machinery/door/blast/attack_hand(mob/user as mob)
- if(istype(user, /mob/living/carbon/human))
+ if(ishuman(user))
var/mob/living/carbon/human/X = user
if(istype(X.species, /datum/species/xenos))
src.attack_alien(user)
@@ -217,7 +217,7 @@
// Parameters: Attacking Xeno mob.
// Description: Forces open the door after a delay.
/obj/machinery/door/blast/attack_alien(var/mob/user) //Familiar, right? Doors.
- if(istype(user, /mob/living/carbon/human))
+ if(ishuman(user))
var/mob/living/carbon/human/X = user
if(istype(X.species, /datum/species/xenos))
if(src.density)
diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm
index 8055af222c..334879e54c 100644
--- a/code/game/machinery/doors/door.dm
+++ b/code/game/machinery/doors/door.dm
@@ -126,7 +126,7 @@
else
do_animate("deny")
- if(istype(AM, /mob/living/bot))
+ if(isbot(AM))
var/mob/living/bot/bot = AM
if(src.check_access(bot.botcard))
if(density)
diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm
index 4502ed9334..7f961c86c8 100644
--- a/code/game/machinery/doors/firedoor.dm
+++ b/code/game/machinery/doors/firedoor.dm
@@ -136,7 +136,7 @@
if(operating)
return//Already doing something.
- if(istype(user, /mob/living/carbon/human))
+ if(ishuman(user))
var/mob/living/carbon/human/X = user
if(istype(X.species, /datum/species/xenos))
src.attack_alien(user)
@@ -193,7 +193,7 @@
close()
/obj/machinery/door/firedoor/attack_alien(var/mob/user) //Familiar, right? Doors.
- if(istype(user, /mob/living/carbon/human))
+ if(ishuman(user))
var/mob/living/carbon/human/X = user
if(istype(X.species, /datum/species/xenos))
if(src.blocked)
diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm
index 5117401535..07fb154cbf 100644
--- a/code/game/machinery/doors/windowdoor.dm
+++ b/code/game/machinery/doors/windowdoor.dm
@@ -152,7 +152,7 @@
/obj/machinery/door/window/attack_hand(mob/user as mob)
src.add_fingerprint(user)
- if(istype(user,/mob/living/carbon/human))
+ if(ishuman(user))
var/mob/living/carbon/human/H = user
if(H.species.can_shred(H))
playsound(src, 'sound/effects/Glasshit.ogg', 75, 1)
diff --git a/code/game/machinery/fire_alarm.dm b/code/game/machinery/fire_alarm.dm
index 7a5d4ffc17..22da386180 100644
--- a/code/game/machinery/fire_alarm.dm
+++ b/code/game/machinery/fire_alarm.dm
@@ -233,7 +233,7 @@ Just a object used in constructing fire alarms
ASSERT(isarea(A))
var/d1
var/d2
- if(istype(user, /mob/living/carbon/human) || istype(user, /mob/living/silicon/ai))
+ if(ishuman(user) || isAI(user))
if(A.party)
d1 = text("No Party :(", src)
@@ -284,7 +284,7 @@ Just a object used in constructing fire alarms
..()
if(usr.stat || stat & (BROKEN|NOPOWER))
return
- if((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(loc, /turf))) || (istype(usr, /mob/living/silicon/ai)))
+ if((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(loc, /turf))) || (isAI(usr)))
usr.machine = src
if(href_list["reset"])
reset()
diff --git a/code/game/machinery/flasher.dm b/code/game/machinery/flasher.dm
index ed53a6e439..48f5929442 100644
--- a/code/game/machinery/flasher.dm
+++ b/code/game/machinery/flasher.dm
@@ -67,7 +67,7 @@
continue
var/flash_time = strength
- if(istype(O, /mob/living/carbon/human))
+ if(ishuman(O))
var/mob/living/carbon/human/H = O
//VOREStation Edit Start
if(H.nif && H.nif.flag_check(NIF_V_FLASHPROT,NIF_FLAGS_VISION))
@@ -103,7 +103,7 @@
if(iscarbon(AM))
var/mob/living/carbon/M = AM
- if(M.m_intent != "walk")
+ if(M.m_intent != I_WALK)
flash()
/obj/machinery/flasher/portable/attackby(obj/item/W as obj, mob/user as mob)
diff --git a/code/game/machinery/floodlight.dm b/code/game/machinery/floodlight.dm
index 54447f264a..00f4e192f9 100644
--- a/code/game/machinery/floodlight.dm
+++ b/code/game/machinery/floodlight.dm
@@ -65,7 +65,7 @@
visible_message("\The [src] shuts down.")
/obj/machinery/floodlight/attack_ai(mob/user as mob)
- if(istype(user, /mob/living/silicon/robot) && Adjacent(user))
+ if(isrobot(user) && Adjacent(user))
return attack_hand(user)
if(on)
diff --git a/code/game/machinery/igniter.dm b/code/game/machinery/igniter.dm
index 4f45449a16..2e7a4e7aa4 100755
--- a/code/game/machinery/igniter.dm
+++ b/code/game/machinery/igniter.dm
@@ -30,9 +30,9 @@
location.hotspot_expose(1000,500,1)
return 1
-/obj/machinery/igniter/New()
- ..()
+/obj/machinery/igniter/Initialize(mapload)
icon_state = "igniter[on]"
+ . = ..()
/obj/machinery/igniter/power_change()
..()
@@ -58,9 +58,6 @@
idle_power_usage = 2
active_power_usage = 4
-/obj/machinery/sparker/New()
- ..()
-
/obj/machinery/sparker/power_change()
..()
if(!(stat & NOPOWER) && disable == 0)
diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm
index f38e2e08cc..af1eb2270e 100644
--- a/code/game/machinery/iv_drip.dm
+++ b/code/game/machinery/iv_drip.dm
@@ -153,7 +153,7 @@
set name = "Toggle Mode"
set src in view(1)
- if(!istype(usr, /mob/living))
+ if(!isliving(usr))
to_chat(usr, span_warning("You can't do that."))
return
diff --git a/code/game/machinery/magnet.dm b/code/game/machinery/magnet.dm
index 0061137038..a9296866bb 100644
--- a/code/game/machinery/magnet.dm
+++ b/code/game/machinery/magnet.dm
@@ -171,7 +171,7 @@
step_towards(M, center)
for(var/mob/living/silicon/S in orange(magnetic_field, center))
- if(istype(S, /mob/living/silicon/ai)) continue
+ if(isAI(S)) continue
step_towards(S, center)
use_power(electricity_level * 5)
diff --git a/code/game/machinery/mass_driver.dm b/code/game/machinery/mass_driver.dm
index a344167c4a..2bdae67c85 100644
--- a/code/game/machinery/mass_driver.dm
+++ b/code/game/machinery/mass_driver.dm
@@ -16,7 +16,7 @@
var/id = 1.0
var/drive_range = 50 //this is mostly irrelevant since current mass drivers throw into space, but you could make a lower-range mass driver for interstation transport or something I guess.
-/obj/machinery/mass_driver/New()
+/obj/machinery/mass_driver/Initialize(mapload)
. = ..()
default_apply_parts()
diff --git a/code/game/machinery/navbeacon.dm b/code/game/machinery/navbeacon.dm
index fa4b720467..0523b47f9f 100644
--- a/code/game/machinery/navbeacon.dm
+++ b/code/game/machinery/navbeacon.dm
@@ -18,8 +18,8 @@ var/global/list/navbeacons = list() // no I don't like putting this in, but it w
var/list/codes = list() // assoc. list of transponder codes
req_access = list(access_engine)
-/obj/machinery/navbeacon/New()
- ..()
+/obj/machinery/navbeacon/Initialize(mapload)
+ . = ..()
set_codes_from_txt(codes_txt)
if(freq)
warning("[src] at [x],[y],[z] has deprecated var freq=[freq]. Replace it with proper type.")
@@ -237,6 +237,6 @@ Transponder Codes:"}
/obj/machinery/navbeacon/patrol
var/next_patrol
-/obj/machinery/navbeacon/patrol/New()
+/obj/machinery/navbeacon/patrol/Initialize(mapload)
codes = list("patrol" = 1, "next_patrol" = next_patrol)
- ..()
+ . = ..()
diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm
index b2a9ff48b2..ed35fd83b9 100644
--- a/code/game/machinery/newscaster.dm
+++ b/code/game/machinery/newscaster.dm
@@ -668,7 +668,7 @@ GLOBAL_LIST_BOILERPLATE(allCasters, /obj/machinery/newscaster)
return "Unknown"
/obj/machinery/newscaster/proc/scan_user(mob/living/user)
- if(istype(user,/mob/living/carbon/human)) //User is a human
+ if(ishuman(user)) //User is a human
var/mob/living/carbon/human/human_user = user
var/obj/item/card/id/I = human_user.GetIdCard()
if(I)
diff --git a/code/game/machinery/recharger.dm b/code/game/machinery/recharger.dm
index 2f9b70203c..3e56fb7919 100644
--- a/code/game/machinery/recharger.dm
+++ b/code/game/machinery/recharger.dm
@@ -118,7 +118,7 @@
update_icon()
/obj/machinery/recharger/attack_ai(mob/user)
- if(istype(user, /mob/living/silicon/robot) && Adjacent(user)) // Borgs can remove the cell if they are near enough
+ if(isrobot(user) && Adjacent(user)) // Borgs can remove the cell if they are near enough
if(charging)
user.visible_message("[user] removes [charging] from [src].", "You remove [charging] from [src].")
charging.update_icon()
diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm
index f6fb8599ed..0fec0b1218 100644
--- a/code/game/machinery/rechargestation.dm
+++ b/code/game/machinery/rechargestation.dm
@@ -173,7 +173,7 @@
return
if (istype(O, /obj/item/grab) && get_dist(src,user)<2)
var/obj/item/grab/G = O
- if(istype(G.affecting,/mob/living))
+ if(isliving(G.affecting))
var/mob/living/M = G.affecting
qdel(O)
go_in(M)
@@ -252,7 +252,7 @@
if(occupant)
return
- if(istype(L, /mob/living/silicon/robot))
+ if(isrobot(L))
var/mob/living/silicon/robot/R = L
if(R.incapacitated())
@@ -273,7 +273,7 @@
return 1
//VOREStation Add Start
- else if(istype(L, /mob/living/silicon/pai))
+ else if(ispAI(L))
var/mob/living/silicon/pai/P = L
if(P.incapacitated())
diff --git a/code/game/machinery/suit_storage/suit_cycler_datums.dm b/code/game/machinery/suit_storage/suit_cycler_datums.dm
index 5f0a842024..7b72f9ef07 100644
--- a/code/game/machinery/suit_storage/suit_cycler_datums.dm
+++ b/code/game/machinery/suit_storage/suit_cycler_datums.dm
@@ -337,7 +337,7 @@ GLOBAL_LIST_EMPTY(suit_cycler_emagged)
/datum/suit_cycler_choice/species/unathi
name = SPECIES_UNATHI
/datum/suit_cycler_choice/species/tajaran
- name = SPECIES_TAJ
+ name = SPECIES_TAJARAN
/datum/suit_cycler_choice/species/teshari
name = SPECIES_TESHARI
/datum/suit_cycler_choice/species/akula
diff --git a/code/game/machinery/syndicatebeacon.dm b/code/game/machinery/syndicatebeacon.dm
index 451252f14c..fa2de55525 100644
--- a/code/game/machinery/syndicatebeacon.dm
+++ b/code/game/machinery/syndicatebeacon.dm
@@ -19,7 +19,7 @@
/obj/machinery/syndicate_beacon/attack_hand(var/mob/user as mob)
user.set_machine(src)
var/dat = "Scanning [pick("retina pattern", "voice print", "fingerprints", "dna sequence")]...
Identity confirmed,
"
- if(istype(user, /mob/living/carbon/human) || istype(user, /mob/living/silicon/ai))
+ if(ishuman(user) || isAI(user))
if(is_special_character(user))
dat += "Operative record found. Greetings, Agent [user.name].
"
else if(charges < 1)
@@ -56,7 +56,7 @@
return
if(2)
return
- if(istype(M, /mob/living/carbon/human))
+ if(ishuman(M))
var/mob/living/carbon/human/N = M
to_chat(N, span_infoplain(span_bold("You have joined the ranks of the Syndicate and become a traitor to the station!")))
traitors.add_antagonist(N.mind)
diff --git a/code/game/machinery/syndicatebeacon_vr.dm b/code/game/machinery/syndicatebeacon_vr.dm
index b1b45ff83a..a619bf92e0 100644
--- a/code/game/machinery/syndicatebeacon_vr.dm
+++ b/code/game/machinery/syndicatebeacon_vr.dm
@@ -3,7 +3,7 @@
/obj/machinery/syndicate_beacon/virgo/attack_hand(var/mob/user as mob)
user.set_machine(src)
var/dat = "Scanning [pick("retina pattern", "voice print", "fingerprints", "dna sequence")]...
Identity confirmed,
"
- if(istype(user, /mob/living/carbon/human) || istype(user, /mob/living/silicon/ai))
+ if(ishuman(user) || isAI(user))
if(is_special_character(user))
dat += "Operative record found. Greetings, Agent [user.name].
"
else if(charges < 1)
@@ -30,7 +30,7 @@
updateUsrDialog()
return
charges -= 1
- if(istype(M, /mob/living/carbon/human))
+ if(ishuman(M))
var/mob/living/carbon/human/N = M
to_chat(N, span_infoplain(span_bold("Access granted, here are the supplies!")))
traitors.spawn_uplink(N)
diff --git a/code/game/machinery/telecomms/broadcaster.dm b/code/game/machinery/telecomms/broadcaster.dm
index fa8db1916d..c54674c7b9 100644
--- a/code/game/machinery/telecomms/broadcaster.dm
+++ b/code/game/machinery/telecomms/broadcaster.dm
@@ -411,11 +411,11 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
if(!R.client?.prefs?.read_preference(/datum/preference/toggle/holder/hear_radio))
continue
- if(istype(R, /mob/new_player)) // we don't want new players to hear messages. rare but generates runtimes.
+ if(isnewplayer(R)) // we don't want new players to hear messages. rare but generates runtimes.
continue
// Ghosts hearing all radio chat don't want to hear syndicate intercepts, they're duplicates
- if(data == DATA_ANTAG && istype(R, /mob/observer/dead) && R.client?.prefs?.read_preference(/datum/preference/toggle/ghost_radio))
+ if(data == DATA_ANTAG && isobserver(R) && R.client?.prefs?.read_preference(/datum/preference/toggle/ghost_radio))
continue
// --- Check for compression ---
diff --git a/code/game/machinery/telecomms/telecomunications.dm b/code/game/machinery/telecomms/telecomunications.dm
index 5717149044..d891c11f89 100644
--- a/code/game/machinery/telecomms/telecomunications.dm
+++ b/code/game/machinery/telecomms/telecomunications.dm
@@ -616,7 +616,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
log.parameters["race"] = race
- if(!istype(M, /mob/new_player) && M)
+ if(!isnewplayer(M) && M)
log.parameters["uspeech"] = M.universal_speak
else
log.parameters["uspeech"] = 0
diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm
index 3ada9642b5..b3c2bf95bd 100644
--- a/code/game/machinery/teleporter.dm
+++ b/code/game/machinery/teleporter.dm
@@ -110,7 +110,7 @@
set src in oview(1)
set desc = "ID Tag:"
- if(stat & (NOPOWER|BROKEN) || !istype(usr,/mob/living))
+ if(stat & (NOPOWER|BROKEN) || !isliving(usr))
return
if(t)
id = t
@@ -168,7 +168,7 @@
return
if(istype(M, /atom/movable))
//VOREStation Addition Start: Prevent taurriding abuse
- if(istype(M, /mob/living))
+ if(isliving(M))
var/mob/living/L = M
if(LAZYLEN(L.buckled_mobs))
var/datum/riding/R = L.riding_datum
diff --git a/code/game/machinery/washing_machine.dm b/code/game/machinery/washing_machine.dm
index 25b4297f7c..7e04843911 100644
--- a/code/game/machinery/washing_machine.dm
+++ b/code/game/machinery/washing_machine.dm
@@ -44,7 +44,7 @@
/obj/machinery/washing_machine/proc/start()
- if(!istype(usr, /mob/living)) //ew ew ew usr, but it's the only way to check.
+ if(!isliving(usr)) //ew ew ew usr, but it's the only way to check.
return
if(state != 4)
diff --git a/code/game/machinery/wishgranter.dm b/code/game/machinery/wishgranter.dm
index 4dd2eae2bb..327ff56cd1 100644
--- a/code/game/machinery/wishgranter.dm
+++ b/code/game/machinery/wishgranter.dm
@@ -18,7 +18,7 @@
to_chat(user, span_infoplain("The Wish Granter lies silent."))
return
- else if(!istype(user, /mob/living/carbon/human))
+ else if(!ishuman(user))
to_chat(user, span_infoplain("You feel a dark stirring inside of the Wish Granter, something you want nothing of. Your instincts are better than any man's."))
return
diff --git a/code/game/mecha/combat/combat.dm b/code/game/mecha/combat/combat.dm
index 49363929a5..4632df4101 100644
--- a/code/game/mecha/combat/combat.dm
+++ b/code/game/mecha/combat/combat.dm
@@ -40,7 +40,7 @@
T = safepick(oview(1,src))
if(!melee_can_hit)
return
- if(istype(T, /mob/living))
+ if(isliving(T))
var/mob/living/M = T
if(src.occupant.a_intent == I_HURT || istype(src.occupant, /mob/living/carbon/brain)) //Brains cannot change intents; Exo-piloting brains lack any form of physical feedback for control, limiting the ability to 'play nice'.
playsound(src, 'sound/weapons/heavysmash.ogg', 50, 1)
diff --git a/code/game/mecha/combat/fighter.dm b/code/game/mecha/combat/fighter.dm
index 8fc517641c..790ef9f1c6 100644
--- a/code/game/mecha/combat/fighter.dm
+++ b/code/game/mecha/combat/fighter.dm
@@ -5,7 +5,7 @@
desc = "The base type of fightercraft. Don't spawn this one!"
var/datum/effect/effect/system/ion_trail_follow/ion_trail
- var/stabilization_enabled = TRUE //If our anti-space-drift is on
+ var/landing_gear_raised = FALSE //If our landing gear for safely crossing ground turfs is on.
var/ground_capable = FALSE //If we can fly over normal turfs and not just space
icon = 'icons/mecha/fighters64x64.dmi' //See ATTRIBUTIONS.md for details on license
@@ -27,8 +27,8 @@
wreckage = /obj/effect/decal/mecha_wreckage/gunpod
- stomp_sound = 'sound/machines/generator/generator_end.ogg'
- swivel_sound = 'sound/machines/hiss.ogg'
+ stomp_sound = 'sound/mecha/fighter/engine_mid_fighter_move.ogg'
+ swivel_sound = 'sound/mecha/fighter/engine_mid_boost_01.ogg'
bound_height = 64
bound_width = 64
@@ -135,17 +135,17 @@
//Modified phazon code
/obj/mecha/combat/fighter/Topic(href, href_list)
..()
- if (href_list["toggle_stabilization"])
- stabilization_enabled = !stabilization_enabled
- send_byjax(src.occupant,"exosuit.browser","stabilization_command","[stabilization_enabled?"Dis":"En"]able thruster stabilization")
- src.occupant_message(span_notice("Thruster stabilization [stabilization_enabled? "enabled" : "disabled"]."))
+ if (href_list["toggle_landing_gear"])
+ landing_gear_raised = !landing_gear_raised
+ send_byjax(src.occupant,"exosuit.browser","landing_gear_command","[landing_gear_raised?"Lower":"Raise"] landing gear")
+ src.occupant_message(span_notice("Landing gear [landing_gear_raised? "raised" : "lowered"]."))
return
/obj/mecha/combat/fighter/get_commands()
var/output = {"
"}
@@ -153,22 +153,28 @@
return output
/obj/mecha/combat/fighter/can_ztravel()
- return (stabilization_enabled && has_charge(step_energy_drain))
+ return (landing_gear_raised && has_charge(step_energy_drain))
// No space drifting
+// This doesnt work but I actually dont want it to anyways, so I'm not touching it at all. Space drifting is cool.
/obj/mecha/combat/fighter/check_for_support()
- if (stabilization_enabled)
+ if (landing_gear_raised)
return 1
return ..()
// No falling if we've got our boosters on
/obj/mecha/combat/fighter/can_fall()
- return (stabilization_enabled && has_charge(step_energy_drain))
+ if(landing_gear_raised && has_charge(step_energy_drain))
+ return FALSE
+ else
+ return TRUE
/obj/mecha/combat/fighter/proc/consider_gravity(var/moved = FALSE)
var/gravity = get_gravity()
- if(gravity && ground_capable && occupant)
+ if (gravity && !landing_gear_raised)
+ playsound(src, 'sound/effects/roll.ogg', 50, 1)
+ else if(gravity && ground_capable && occupant)
start_hover()
else if((!gravity && ground_capable) || !occupant)
stop_hover()
@@ -177,6 +183,11 @@
take_damage(NOGRAV_FIGHTER_DAMAGE, "brute")
playsound(src, 'sound/effects/grillehit.ogg', 50, 1)
+/obj/mecha/combat/fighter/get_step_delay()
+ . = ..()
+ if(get_gravity() && !landing_gear_raised)
+ . += 4
+
/obj/mecha/combat/fighter/handle_equipment_movement()
. = ..()
consider_gravity(TRUE)
@@ -202,7 +213,7 @@
animate(src, pixel_y = old_y, time = 5, easing = SINE_EASING | EASE_IN) //halt animation
/obj/mecha/combat/fighter/check_for_support()
- if (has_charge(step_energy_drain) && stabilization_enabled)
+ if (has_charge(step_energy_drain) && landing_gear_raised)
return 1
var/list/things = orange(1, src)
@@ -241,7 +252,7 @@
var/image/stripe1_overlay
var/image/stripe2_overlay
-/obj/mecha/combat/fighter/gunpod/loaded/Initialize() //Loaded version with gans
+/obj/mecha/combat/fighter/gunpod/loaded/Initialize() //Loaded version with guns
. = ..()
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/energy/laser
ME.attach(src)
@@ -313,7 +324,7 @@
ground_capable = FALSE
-/obj/mecha/combat/fighter/baron/loaded/Initialize() //Loaded version with gans
+/obj/mecha/combat/fighter/baron/loaded/Initialize() //Loaded version with guns
. = ..()
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/energy/laser
ME.attach(src)
@@ -350,7 +361,7 @@
ground_capable = FALSE
-/obj/mecha/combat/fighter/scoralis/loaded/Initialize() //Loaded version with gans
+/obj/mecha/combat/fighter/scoralis/loaded/Initialize() //Loaded version with guns
. = ..()
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/lmg
ME.attach(src)
@@ -389,7 +400,7 @@
health = 500
maxhealth = 500
-/obj/mecha/combat/fighter/allure/loaded/Initialize() //Loaded version with gans
+/obj/mecha/combat/fighter/allure/loaded/Initialize() //Loaded version with guns
. = ..()
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/cloak
ME.attach(src)
@@ -429,7 +440,7 @@
ground_capable = TRUE
-/obj/mecha/combat/fighter/pinnace/loaded/Initialize() //Loaded version with gans
+/obj/mecha/combat/fighter/pinnace/loaded/Initialize() //Loaded version with guns
. = ..()
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/tool/passenger
ME.attach(src)
diff --git a/code/game/mecha/equipment/tools/armor_ranged.dm b/code/game/mecha/equipment/tools/armor_ranged.dm
index 86f66f61f0..f4e30be6d9 100644
--- a/code/game/mecha/equipment/tools/armor_ranged.dm
+++ b/code/game/mecha/equipment/tools/armor_ranged.dm
@@ -91,11 +91,11 @@
/obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster/proc/dynhitby(atom/movable/A)
if(!action_checks(A))
return chassis.dynhitby(A)
- if(prob(chassis.deflect_chance*deflect_coeff) || istype(A, /mob/living) || istype(A, /obj/item/mecha_parts/mecha_tracking))
+ if(prob(chassis.deflect_chance*deflect_coeff) || isliving(A) || istype(A, /obj/item/mecha_parts/mecha_tracking))
chassis.occupant_message(span_notice("The [A] bounces off the armor."))
chassis.visible_message("The [A] bounces off the [chassis] armor")
chassis.log_append_to_last("Armor saved.")
- if(istype(A, /mob/living))
+ if(isliving(A))
var/mob/living/M = A
M.take_organ_damage(10)
else if(istype(A, /obj))
diff --git a/code/game/mecha/equipment/tools/clamp.dm b/code/game/mecha/equipment/tools/clamp.dm
index b85e8d7386..d71ba88ae1 100644
--- a/code/game/mecha/equipment/tools/clamp.dm
+++ b/code/game/mecha/equipment/tools/clamp.dm
@@ -92,7 +92,7 @@
O.anchored = initial(O.anchored)
//attacking
- else if(istype(target,/mob/living))
+ else if(isliving(target))
var/mob/living/M = target
if(M.stat>1) return
if(chassis.occupant.a_intent == I_HURT || istype(chassis.occupant,/mob/living/carbon/brain)) //No tactile feedback for brains
@@ -156,7 +156,7 @@
else
chassis.occupant_message(span_warning("[target] is firmly secured."))
- else if(istype(target,/mob/living))
+ else if(isliving(target))
var/mob/living/M = target
if(M.stat>1) return
if(chassis.occupant.a_intent == I_HURT)
diff --git a/code/game/mecha/equipment/tools/drill.dm b/code/game/mecha/equipment/tools/drill.dm
index 9b897f1241..7d69bee9fe 100644
--- a/code/game/mecha/equipment/tools/drill.dm
+++ b/code/game/mecha/equipment/tools/drill.dm
@@ -65,7 +65,7 @@
target.apply_damage(drill_force, BRUTE)
return
- else if(istype(target, /mob/living/simple_mob))
+ else if(isanimal(target))
var/mob/living/simple_mob/S = target
if(target.stat == DEAD)
if(S.meat_amount > 0)
diff --git a/code/game/mecha/equipment/weapons/honk.dm b/code/game/mecha/equipment/weapons/honk.dm
index 3edd3f554b..5452efe6bb 100644
--- a/code/game/mecha/equipment/weapons/honk.dm
+++ b/code/game/mecha/equipment/weapons/honk.dm
@@ -19,7 +19,7 @@
playsound(src, 'sound/effects/bang.ogg', 30, 1, 30)
chassis.occupant_message(span_warning("You emit a high-pitched noise from the mech."))
for(var/mob/living/carbon/M in ohearers(6, chassis))
- if(istype(M, /mob/living/carbon/human))
+ if(ishuman(M))
var/ear_safety = 0
ear_safety = M.get_ear_protection()
if(ear_safety > 0)
diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm
index c17eaa485b..9876e234ec 100644
--- a/code/game/mecha/mech_fabricator.dm
+++ b/code/game/mecha/mech_fabricator.dm
@@ -67,6 +67,8 @@
"Vehicle",
"Rigsuit",
"Phazon",
+ "Pinnace",
+ "Baron",
"Gopher", // VOREStation Add
"Polecat", // VOREStation Add
"Weasel", // VOREStation Add
@@ -183,6 +185,10 @@
category_override += "Durand"
if(mech_types & EXOSUIT_MODULE_PHAZON)
category_override += "Phazon"
+ if(mech_types & EXOSUIT_MODULE_PINNACE)
+ category_override += "Pinnace"
+ if(mech_types & EXOSUIT_MODULE_BARON)
+ category_override += "Baron"
var/list/part = list(
"name" = D.name,
diff --git a/code/game/mecha/mech_prosthetics.dm b/code/game/mecha/mech_prosthetics.dm
index e7a72c3653..8fb52b95bf 100644
--- a/code/game/mecha/mech_prosthetics.dm
+++ b/code/game/mecha/mech_prosthetics.dm
@@ -49,6 +49,8 @@
"Vehicle",
"Rigsuit",
"Phazon",
+ "Pinnace",
+ "Baron",
"Gopher", // VOREStation Add
"Polecat", // VOREStation Add
"Weasel", // VOREStation Add
diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm
index 0690d11bc7..50dc755176 100644
--- a/code/game/mecha/mecha.dm
+++ b/code/game/mecha/mecha.dm
@@ -1056,7 +1056,7 @@
else
temp_deflect_chance = round(ArmC.get_efficiency() * ArmC.deflect_chance + (defence_mode ? 25 : 0))
- if(istype(user,/mob/living/carbon/human))
+ if(ishuman(user))
var/mob/living/carbon/human/H = user
if(H.species.can_shred(user))
if(!prob(temp_deflect_chance))
@@ -1121,7 +1121,7 @@
src.occupant_message(span_notice("\The [A] bounces off the armor."))
src.visible_message("\The [A] bounces off \the [src] armor")
src.log_append_to_last("Armor saved.")
- if(istype(A, /mob/living))
+ if(isliving(A))
var/mob/living/M = A
M.take_organ_damage(10)
else if(istype(A, /obj))
@@ -1601,7 +1601,7 @@
/*
/obj/mecha/attack_ai(var/mob/living/silicon/ai/user as mob)
- if(!istype(user, /mob/living/silicon/ai))
+ if(!isAI(user))
return
var/output = {"Assume direct control over [src]?
Yes
@@ -2122,7 +2122,7 @@
for(var/atom/ID in list(H.get_active_hand(), H.wear_id, H.belt))
if(src.check_access(ID,src.internals_req_access))
return 1
- else if(istype(H, /mob/living/silicon/robot))
+ else if(isrobot(H))
var/mob/living/silicon/robot/R = H
if(src.check_access(R.idcard,src.internals_req_access))
return 1
diff --git a/code/game/mecha/mecha_construction_paths.dm b/code/game/mecha/mecha_construction_paths.dm
index 8944deeb38..80e23508d3 100644
--- a/code/game/mecha/mecha_construction_paths.dm
+++ b/code/game/mecha/mecha_construction_paths.dm
@@ -2131,3 +2131,571 @@
..()
feedback_inc("mecha_janus_created",1)
return
+
+//Fighters
+
+//////////////////////
+// Pinnace
+//////////////////////
+/datum/construction/mecha/fighter/pinnace_chassis
+ result = "/obj/mecha/combat/fighter/pinnace"
+ steps = list(list("key"=/obj/item/mecha_parts/fighter/part/pinnace_core),//1
+ list("key"=/obj/item/mecha_parts/fighter/part/pinnace_cockpit),//2
+ list("key"=/obj/item/mecha_parts/fighter/part/pinnace_main_engine),//3
+ list("key"=/obj/item/mecha_parts/fighter/part/pinnace_left_engine),//4
+ list("key"=/obj/item/mecha_parts/fighter/part/pinnace_right_engine),//5
+ list("key"=/obj/item/mecha_parts/fighter/part/pinnace_left_wing),//6
+ list("key"=/obj/item/mecha_parts/fighter/part/pinnace_right_wing)//final
+ )
+
+/datum/construction/mecha/fighter/pinnace_chassis/custom_action(step, obj/item/I, mob/user)
+ user.visible_message("[user] has connected [I] to [holder].", "You connect [I] to [holder]")
+ holder.add_overlay("[I.icon_state]+o")
+ qdel(I)
+ return 1
+
+/datum/construction/mecha/fighter/pinnace_chassis/action(obj/item/I,mob/user as mob)
+ return check_all_steps(I,user)
+
+/datum/construction/mecha/fighter/pinnace_chassis/spawn_result()
+ var/obj/item/mecha_parts/chassis/const_holder = holder
+ const_holder.construct = new /datum/construction/reversible/mecha/fighter/pinnace(const_holder)
+ const_holder.icon = 'icons/mecha/fighters_construction64x64.dmi'
+ const_holder.icon_state = "pinnace0"
+ const_holder.density = 1
+ spawn()
+ qdel(src)
+ return
+
+/datum/construction/reversible/mecha/fighter/pinnace
+ result = "/obj/mecha/combat/fighter/pinnace"
+ steps = list(
+ //1
+ list("key"=/obj/item/weldingtool,
+ "backkey"=IS_WRENCH,
+ "desc"="External armor is bolted into place."),
+ //2
+ list("key"=IS_WRENCH,
+ "backkey"=IS_CROWBAR,
+ "desc"="External armor is installed."),
+ //3
+ list("key"=/obj/item/stack/material/plasteel,
+ "backkey"=/obj/item/weldingtool,
+ "desc"="The internal armor is welded into place."),
+ //4
+ list("key"=/obj/item/weldingtool,
+ "backkey"=IS_WRENCH,
+ "desc"="The internal armor is bolted into place."),
+ //5
+ list("key"=IS_WRENCH,
+ "backkey"=IS_CROWBAR,
+ "desc"="The internal armor is installed."),
+ //6
+ list("key"=/obj/item/stack/material/steel,
+ "backkey"=IS_SCREWDRIVER,
+ "desc"="The manual flight control instruments are secured."),
+ //7
+ list("key"=IS_SCREWDRIVER,
+ "backkey"=IS_CROWBAR,
+ "desc"="The manual flight control instruments are installed."),
+ //8
+ list("key"=/obj/item/circuitboard/mecha/fighter/pinnace/cockpitboard,
+ "backkey"=IS_SCREWDRIVER,
+ "desc"="The advanced capacitor is secured."),
+ //9
+ list("key"=IS_SCREWDRIVER,
+ "backkey"=IS_CROWBAR,
+ "desc"="The advanced capacitor is installed."),
+ //10
+ list("key"=/obj/item/stock_parts/capacitor/adv,
+ "backkey"=IS_SCREWDRIVER,
+ "desc"="The targeting module is secured."),
+ //11
+ list("key"=IS_SCREWDRIVER,
+ "backkey"=IS_CROWBAR,
+ "desc"="The targeting module is installed."),
+ //12
+ list("key"=/obj/item/circuitboard/mecha/fighter/pinnace/targeting,
+ "backkey"=IS_SCREWDRIVER,
+ "desc"="The flight control module is secured."),
+ //13
+ list("key"=IS_SCREWDRIVER,
+ "backkey"=IS_CROWBAR,
+ "desc"="The flight control module is installed."),
+ //14
+ list("key"=/obj/item/circuitboard/mecha/fighter/pinnace/flight,
+ "backkey"=IS_SCREWDRIVER,
+ "desc"="The central control module is secured."),
+ //15
+ list("key"=IS_SCREWDRIVER,
+ "backkey"=IS_CROWBAR,
+ "desc"="The central control module is installed."),
+ //16
+ list("key"=/obj/item/circuitboard/mecha/fighter/pinnace/main,
+ "backkey"=IS_SCREWDRIVER,
+ "desc"="The internal wiring is adjusted."),
+ //17
+ list("key"=/obj/item/tool/wirecutters,
+ "backkey"=IS_SCREWDRIVER,
+ "desc"="The internal wiring is added."),
+ //18
+ list("key"=/obj/item/stack/cable_coil,
+ "backkey"=IS_SCREWDRIVER,
+ "desc"="The hydraulic landing gear are deployed."),
+ //19
+ list("key"=IS_SCREWDRIVER,
+ "backkey"=IS_WRENCH,
+ "desc"="The hydraulic landing gear are attached."),
+ //20
+ list("key"=IS_WRENCH,
+ "desc"="The hydraulic landing gear are detached.")
+ )
+
+/datum/construction/reversible/mecha/fighter/pinnace/action(obj/item/I,mob/user as mob)
+ return check_step(I,user)
+
+/datum/construction/reversible/mecha/fighter/pinnace/custom_action(index, diff, obj/item/I, mob/user)
+ if(!..())
+ return 0
+
+ switch(index)
+ if(20)
+ user.visible_message("[user] attaches [holder]'s hydraulic landing gear.", "You attach [holder]'s hydraulic landing gear.")
+ holder.icon_state = "pinnace1"
+ if(19)
+ if(diff==FORWARD)
+ user.visible_message("[user] deploys [holder]'s hydraulic landing gear.", "You deploy [holder]'s hydraulic landing gear.")
+ holder.icon_state = "pinnace2"
+ else
+ user.visible_message("[user] removes [holder]'s hydraulic landing gear.", "You remove [holder]'s hydraulic landing gear.")
+ holder.icon_state = "pinnace0"
+ if(18)
+ if(diff==FORWARD)
+ user.visible_message("[user] adds the internal wiring to [holder].", "You add the internal wiring to [holder].")
+ holder.icon_state = "pinnace3"
+ else
+ user.visible_message("[user] retracts [holder]'s hydraulic landing gear.", "You retract [holder]'s hydraulic landing gear.")
+ holder.icon_state = "pinnace1"
+ if(17)
+ if(diff==FORWARD)
+ user.visible_message("[user] adjusts the internal wiring of [holder].", "You adjust the internal wiring of [holder].")
+ holder.icon_state = "pinnace4"
+ else
+ user.visible_message("[user] removes the internal wiring from [holder].", "You remove the internal wiring from [holder].")
+ var/obj/item/stack/cable_coil/coil = new /obj/item/stack/cable_coil(get_turf(holder))
+ coil.amount = 4
+ holder.icon_state = "pinnace2"
+ if(16)
+ if(diff==FORWARD)
+ user.visible_message("[user] installs the central control module into [holder].", "You install the central control module into [holder].")
+ qdel(I)
+ holder.icon_state = "pinnace5"
+ else
+ user.visible_message("[user] disconnects the wiring of [holder].", "You disconnect the wiring of [holder].")
+ holder.icon_state = "pinnace3"
+ if(15)
+ if(diff==FORWARD)
+ user.visible_message("[user] secures the central control module.", "You secure the central control module.")
+ holder.icon_state = "pinnace6"
+ else
+ user.visible_message("[user] removes the central control module from [holder].", "You remove the central control module from [holder].")
+ new /obj/item/circuitboard/mecha/fighter/pinnace/main(get_turf(holder))
+ holder.icon_state = "pinnace4"
+ if(14)
+ if(diff==FORWARD)
+ user.visible_message("[user] installs the flight control module into [holder].", "You install the flight control module into [holder].")
+ qdel(I)
+ holder.icon_state = "pinnace7"
+ else
+ user.visible_message("[user] unfastens the central control module.", "You unfasten the central control module.")
+ holder.icon_state = "pinnace5"
+ if(13)
+ if(diff==FORWARD)
+ user.visible_message("[user] secures the flight control module.", "You secure the flight control module.")
+ holder.icon_state = "pinnace8"
+ else
+ user.visible_message("[user] removes the flight control module from [holder].", "You remove the flight control module from [holder].")
+ new /obj/item/circuitboard/mecha/fighter/pinnace/flight(get_turf(holder))
+ holder.icon_state = "pinnace6"
+ if(12)
+ if(diff==FORWARD)
+ user.visible_message("[user] installs the targeting control module into [holder].", "You install the targeting control module into [holder].")
+ qdel(I)
+ holder.icon_state = "pinnace9"
+ else
+ user.visible_message("[user] unfastens the peripherals control module.", "You unfasten the peripherals control module.")
+ holder.icon_state = "pinnace7"
+ if(11)
+ if(diff==FORWARD)
+ user.visible_message("[user] secures the targeting control module.", "You secure the targeting control module.")
+ holder.icon_state = "pinnace10"
+ else
+ user.visible_message("[user] removes the targeting control module from [holder].", "You remove the targeting control module from [holder].")
+ new /obj/item/circuitboard/mecha/fighter/pinnace/targeting(get_turf(holder))
+ holder.icon_state = "pinnace8"
+ if(10)
+ if(diff==FORWARD)
+ user.visible_message("[user] installs the advanced capacitor into [holder].", "You install the advanced capacitor into [holder].")
+ qdel(I)
+ holder.icon_state = "pinnace11"
+ else
+ user.visible_message("[user] unfastens the targeting control module.", "You unfasten the targeting control module.")
+ holder.icon_state = "pinnace9"
+ if(9)
+ if(diff==FORWARD)
+ user.visible_message("[user] secures the advanced capacitor.", "You secure the advanced capacitor.")
+ holder.icon_state = "pinnace12"
+ else
+ user.visible_message("[user] removes the advanced capacitor from [holder].", "You remove the advanced capacitor from [holder].")
+ new /obj/item/stock_parts/capacitor/adv(get_turf(holder))
+ holder.icon_state = "pinnace10"
+ if(8)
+ if(diff==FORWARD)
+ user.visible_message("[user] installs the manual flight controls to [holder].", "You install the manual flight controls to [holder].")
+ qdel(I)
+ holder.icon_state = "pinnace13"
+ else
+ user.visible_message("[user] unfastens the advanced capacitor.", "You unfasten the advanced capacitor.")
+ holder.icon_state = "pinnace11"
+ if(7)
+ if(diff==FORWARD)
+ user.visible_message("[user] secures the manual flight controls.", "You secure the manual flight controls.")
+ holder.icon_state = "pinnace14"
+ else
+ user.visible_message("[user] removes the manual flight controls from [holder].", "You remove the manual flight controls from [holder].")
+ new /obj/item/circuitboard/mecha/fighter/pinnace/cockpitboard(get_turf(holder))
+ holder.icon_state = "pinnace12"
+ if(6)
+ if(diff==FORWARD)
+ user.visible_message("[user] installs the internal armor layer to [holder].", "You install the internal armor layer to [holder].")
+ holder.icon_state = "pinnace19"
+ else
+ user.visible_message("[user] unfastens the manual flight controls.", "You unfasten the manual flight controls.")
+ holder.icon_state = "pinnace13"
+ if(5)
+ if(diff==FORWARD)
+ user.visible_message("[user] bolts the internal armor layer.", "You bolt the internal armor layer.")
+ holder.icon_state = "pinnace20"
+ else
+ user.visible_message("[user] pries the internal armor layer from [holder].", "You pry the internal armor layer from [holder].")
+ var/obj/item/stack/material/steel/MS = new /obj/item/stack/material/steel(get_turf(holder))
+ MS.amount = 5
+ holder.icon_state = "pinnace14"
+ if(4)
+ if(diff==FORWARD)
+ user.visible_message("[user] welds the internal armor layer into place on [holder].", "You weld the internal armor layer into place on [holder].")
+ holder.icon_state = "pinnace21"
+ else
+ user.visible_message("[user] unbolt the internal armor layer.", "You unbolt the internal armor layer.")
+ holder.icon_state = "pinnace19"
+ if(3)
+ if(diff==FORWARD)
+ user.visible_message("[user] installs the external reinforced armor layer to [holder].", "You install the external reinforced armor layer to [holder].")
+ holder.icon_state = "pinnace22"
+ else
+ user.visible_message("[user] cuts internal armor layer from [holder].", "You cut the internal armor layer from [holder].")
+ holder.icon_state = "pinnace20"
+ if(2)
+ if(diff==FORWARD)
+ user.visible_message("[user] bolts external armor layer.", "You bolt external reinforced armor layer.")
+ holder.icon_state = "pinnace23"
+ else
+ user.visible_message("[user] pries the external armor layer from [holder].", "You pry external armor layer from [holder].")
+ var/obj/item/stack/material/plasteel/MS = new /obj/item/stack/material/plasteel(get_turf(holder))
+ MS.amount = 5
+ holder.icon_state = "pinnace21"
+ if(1)
+ if(diff==FORWARD)
+ user.visible_message("[user] welds the external armor layer to [holder].", "You weld the external armor layer to [holder].")
+ else
+ user.visible_message("[user] unbolts the external armor layer.", "You unbolt the external armor layer.")
+ holder.icon_state = "pinnace22"
+ return 1
+
+/datum/construction/reversible/mecha/fighter/pinnace/spawn_result()
+ ..()
+ feedback_inc("mecha_fighter_pinnace_created",1)
+ return
+
+//////////////////////
+// Baron
+//////////////////////
+/datum/construction/mecha/fighter/baron_chassis
+ result = "/obj/mecha/combat/fighter/baron"
+ steps = list(list("key"=/obj/item/mecha_parts/fighter/part/baron_core),//1
+ list("key"=/obj/item/mecha_parts/fighter/part/baron_cockpit),//2
+ list("key"=/obj/item/mecha_parts/fighter/part/baron_main_engine),//3
+ list("key"=/obj/item/mecha_parts/fighter/part/baron_left_engine),//4
+ list("key"=/obj/item/mecha_parts/fighter/part/baron_right_engine),//5
+ list("key"=/obj/item/mecha_parts/fighter/part/baron_left_wing),//6
+ list("key"=/obj/item/mecha_parts/fighter/part/baron_right_wing)//final
+ )
+
+/datum/construction/mecha/fighter/baron_chassis/custom_action(step, obj/item/I, mob/user)
+ user.visible_message("[user] has connected [I] to [holder].", "You connect [I] to [holder]")
+ holder.add_overlay("[I.icon_state]+o")
+ qdel(I)
+ return 1
+
+/datum/construction/mecha/fighter/baron_chassis/action(obj/item/I,mob/user as mob)
+ return check_all_steps(I,user)
+
+/datum/construction/mecha/fighter/baron_chassis/spawn_result()
+ var/obj/item/mecha_parts/chassis/const_holder = holder
+ const_holder.construct = new /datum/construction/reversible/mecha/fighter/baron(const_holder)
+ const_holder.icon = 'icons/mecha/fighters_construction64x64.dmi'
+ const_holder.icon_state = "baron0"
+ const_holder.density = 1
+ spawn()
+ qdel(src)
+ return
+
+/datum/construction/reversible/mecha/fighter/baron
+ result = "/obj/mecha/combat/fighter/baron"
+ steps = list(
+ //1
+ list("key"=/obj/item/weldingtool,
+ "backkey"=IS_WRENCH,
+ "desc"="External armor is bolted into place."),
+ //2
+ list("key"=IS_WRENCH,
+ "backkey"=IS_CROWBAR,
+ "desc"="External armor is installed."),
+ //3
+ list("key"=/obj/item/stack/material/plasteel,
+ "backkey"=/obj/item/weldingtool,
+ "desc"="The internal armor is welded into place."),
+ //4
+ list("key"=/obj/item/weldingtool,
+ "backkey"=IS_WRENCH,
+ "desc"="The internal armor is bolted into place."),
+ //5
+ list("key"=IS_WRENCH,
+ "backkey"=IS_CROWBAR,
+ "desc"="The internal armor is installed."),
+ //6
+ list("key"=/obj/item/stack/material/steel,
+ "backkey"=IS_SCREWDRIVER,
+ "desc"="The manual flight control instruments are secured."),
+ //7
+ list("key"=IS_SCREWDRIVER,
+ "backkey"=IS_CROWBAR,
+ "desc"="The manual flight control instruments are installed."),
+ //8
+ list("key"=/obj/item/circuitboard/mecha/fighter/baron/cockpitboard,
+ "backkey"=IS_SCREWDRIVER,
+ "desc"="The advanced capacitor is secured."),
+ //9
+ list("key"=IS_SCREWDRIVER,
+ "backkey"=IS_CROWBAR,
+ "desc"="The advanced capacitor is installed."),
+ //10
+ list("key"=/obj/item/stock_parts/capacitor/adv,
+ "backkey"=IS_SCREWDRIVER,
+ "desc"="The targeting module is secured."),
+ //11
+ list("key"=IS_SCREWDRIVER,
+ "backkey"=IS_CROWBAR,
+ "desc"="The targeting module is installed."),
+ //12
+ list("key"=/obj/item/circuitboard/mecha/fighter/baron/targeting,
+ "backkey"=IS_SCREWDRIVER,
+ "desc"="The flight control module is secured."),
+ //13
+ list("key"=IS_SCREWDRIVER,
+ "backkey"=IS_CROWBAR,
+ "desc"="The flight control module is installed."),
+ //14
+ list("key"=/obj/item/circuitboard/mecha/fighter/baron/flight,
+ "backkey"=IS_SCREWDRIVER,
+ "desc"="The central control module is secured."),
+ //15
+ list("key"=IS_SCREWDRIVER,
+ "backkey"=IS_CROWBAR,
+ "desc"="The central control module is installed."),
+ //16
+ list("key"=/obj/item/circuitboard/mecha/fighter/baron/main,
+ "backkey"=IS_SCREWDRIVER,
+ "desc"="The internal wiring is adjusted."),
+ //17
+ list("key"=/obj/item/tool/wirecutters,
+ "backkey"=IS_SCREWDRIVER,
+ "desc"="The internal wiring is added."),
+ //18
+ list("key"=/obj/item/stack/cable_coil,
+ "backkey"=IS_SCREWDRIVER,
+ "desc"="The hydraulic landing gear are deployed."),
+ //19
+ list("key"=IS_SCREWDRIVER,
+ "backkey"=IS_WRENCH,
+ "desc"="The hydraulic landing gear are attached."),
+ //20
+ list("key"=IS_WRENCH,
+ "desc"="The hydraulic landing gear are detached.")
+ )
+
+/datum/construction/reversible/mecha/fighter/baron/action(obj/item/I,mob/user as mob)
+ return check_step(I,user)
+
+/datum/construction/reversible/mecha/fighter/baron/custom_action(index, diff, obj/item/I, mob/user)
+ if(!..())
+ return 0
+
+ switch(index)
+ if(20)
+ user.visible_message("[user] attaches [holder]'s hydraulic landing gear.", "You attach [holder]'s hydraulic landing gear.")
+ holder.icon_state = "baron1"
+ if(19)
+ if(diff==FORWARD)
+ user.visible_message("[user] deploys [holder]'s hydraulic landing gear.", "You deploy [holder]'s hydraulic landing gear.")
+ holder.icon_state = "baron2"
+ else
+ user.visible_message("[user] removes [holder]'s hydraulic landing gear.", "You remove [holder]'s hydraulic landing gear.")
+ holder.icon_state = "baron0"
+ if(18)
+ if(diff==FORWARD)
+ user.visible_message("[user] adds the internal wiring to [holder].", "You add the internal wiring to [holder].")
+ holder.icon_state = "baron3"
+ else
+ user.visible_message("[user] retracts [holder]'s hydraulic landing gear.", "You retract [holder]'s hydraulic landing gear.")
+ holder.icon_state = "baron1"
+ if(17)
+ if(diff==FORWARD)
+ user.visible_message("[user] adjusts the internal wiring of [holder].", "You adjust the internal wiring of [holder].")
+ holder.icon_state = "baron4"
+ else
+ user.visible_message("[user] removes the internal wiring from [holder].", "You remove the internal wiring from [holder].")
+ var/obj/item/stack/cable_coil/coil = new /obj/item/stack/cable_coil(get_turf(holder))
+ coil.amount = 4
+ holder.icon_state = "baron2"
+ if(16)
+ if(diff==FORWARD)
+ user.visible_message("[user] installs the central control module into [holder].", "You install the central control module into [holder].")
+ qdel(I)
+ holder.icon_state = "baron5"
+ else
+ user.visible_message("[user] disconnects the wiring of [holder].", "You disconnect the wiring of [holder].")
+ holder.icon_state = "baron3"
+ if(15)
+ if(diff==FORWARD)
+ user.visible_message("[user] secures the central control module.", "You secure the central control module.")
+ holder.icon_state = "baron6"
+ else
+ user.visible_message("[user] removes the central control module from [holder].", "You remove the central control module from [holder].")
+ new /obj/item/circuitboard/mecha/fighter/baron/main(get_turf(holder))
+ holder.icon_state = "baron4"
+ if(14)
+ if(diff==FORWARD)
+ user.visible_message("[user] installs the flight control module into [holder].", "You install the flight control module into [holder].")
+ qdel(I)
+ holder.icon_state = "baron7"
+ else
+ user.visible_message("[user] unfastens the central control module.", "You unfasten the central control module.")
+ holder.icon_state = "baron5"
+ if(13)
+ if(diff==FORWARD)
+ user.visible_message("[user] secures the flight control module.", "You secure the flight control module.")
+ holder.icon_state = "baron8"
+ else
+ user.visible_message("[user] removes the flight control module from [holder].", "You remove the flight control module from [holder].")
+ new /obj/item/circuitboard/mecha/fighter/baron/flight(get_turf(holder))
+ holder.icon_state = "baron6"
+ if(12)
+ if(diff==FORWARD)
+ user.visible_message("[user] installs the targeting control module into [holder].", "You install the targeting control module into [holder].")
+ qdel(I)
+ holder.icon_state = "baron9"
+ else
+ user.visible_message("[user] unfastens the peripherals control module.", "You unfasten the peripherals control module.")
+ holder.icon_state = "baron7"
+ if(11)
+ if(diff==FORWARD)
+ user.visible_message("[user] secures the targeting control module.", "You secure the targeting control module.")
+ holder.icon_state = "baron10"
+ else
+ user.visible_message("[user] removes the targeting control module from [holder].", "You remove the targeting control module from [holder].")
+ new /obj/item/circuitboard/mecha/fighter/baron/targeting(get_turf(holder))
+ holder.icon_state = "baron8"
+ if(10)
+ if(diff==FORWARD)
+ user.visible_message("[user] installs the advanced capacitor into [holder].", "You install the advanced capacitor into [holder].")
+ qdel(I)
+ holder.icon_state = "baron11"
+ else
+ user.visible_message("[user] unfastens the targeting control module.", "You unfasten the targeting control module.")
+ holder.icon_state = "baron9"
+ if(9)
+ if(diff==FORWARD)
+ user.visible_message("[user] secures the advanced capacitor.", "You secure the advanced capacitor.")
+ holder.icon_state = "baron12"
+ else
+ user.visible_message("[user] removes the advanced capacitor from [holder].", "You remove the advanced capacitor from [holder].")
+ new /obj/item/stock_parts/capacitor/adv(get_turf(holder))
+ holder.icon_state = "baron10"
+ if(8)
+ if(diff==FORWARD)
+ user.visible_message("[user] installs the manual flight controls to [holder].", "You install the manual flight controls to [holder].")
+ qdel(I)
+ holder.icon_state = "baron13"
+ else
+ user.visible_message("[user] unfastens the advanced capacitor.", "You unfasten the advanced capacitor.")
+ holder.icon_state = "baron11"
+ if(7)
+ if(diff==FORWARD)
+ user.visible_message("[user] secures the manual flight controls.", "You secure the manual flight controls.")
+ holder.icon_state = "baron14"
+ else
+ user.visible_message("[user] removes the manual flight controls from [holder].", "You remove the manual flight controls from [holder].")
+ new /obj/item/circuitboard/mecha/fighter/baron/cockpitboard(get_turf(holder))
+ holder.icon_state = "baron12"
+ if(6)
+ if(diff==FORWARD)
+ user.visible_message("[user] installs the internal armor layer to [holder].", "You install the internal armor layer to [holder].")
+ holder.icon_state = "baron19"
+ else
+ user.visible_message("[user] unfastens the manual flight controls.", "You unfasten the manual flight controls.")
+ holder.icon_state = "baron13"
+ if(5)
+ if(diff==FORWARD)
+ user.visible_message("[user] bolts the internal armor layer.", "You bolt the internal armor layer.")
+ holder.icon_state = "baron20"
+ else
+ user.visible_message("[user] pries the internal armor layer from [holder].", "You pry the internal armor layer from [holder].")
+ var/obj/item/stack/material/steel/MS = new /obj/item/stack/material/steel(get_turf(holder))
+ MS.amount = 5
+ holder.icon_state = "baron14"
+ if(4)
+ if(diff==FORWARD)
+ user.visible_message("[user] welds the internal armor layer into place on [holder].", "You weld the internal armor layer into place on [holder].")
+ holder.icon_state = "baron21"
+ else
+ user.visible_message("[user] unbolt the internal armor layer.", "You unbolt the internal armor layer.")
+ holder.icon_state = "baron19"
+ if(3)
+ if(diff==FORWARD)
+ user.visible_message("[user] installs the external reinforced armor layer to [holder].", "You install the external reinforced armor layer to [holder].")
+ holder.icon_state = "baron22"
+ else
+ user.visible_message("[user] cuts internal armor layer from [holder].", "You cut the internal armor layer from [holder].")
+ holder.icon_state = "baron20"
+ if(2)
+ if(diff==FORWARD)
+ user.visible_message("[user] bolts external armor layer.", "You bolt external reinforced armor layer.")
+ holder.icon_state = "baron23"
+ else
+ user.visible_message("[user] pries the external armor layer from [holder].", "You pry external armor layer from [holder].")
+ var/obj/item/stack/material/plasteel/MS = new /obj/item/stack/material/plasteel(get_turf(holder))
+ MS.amount = 5
+ holder.icon_state = "baron21"
+ if(1)
+ if(diff==FORWARD)
+ user.visible_message("[user] welds the external armor layer to [holder].", "You weld the external armor layer to [holder].")
+ else
+ user.visible_message("[user] unbolts the external armor layer.", "You unbolt the external armor layer.")
+ holder.icon_state = "baron22"
+ return 1
+
+/datum/construction/reversible/mecha/fighter/baron/spawn_result()
+ ..()
+ feedback_inc("mecha_fighter_baron_created",1)
+ return
diff --git a/code/game/mecha/mecha_parts.dm b/code/game/mecha/mecha_parts.dm
index 1a9a4324ff..a8e4aee892 100644
--- a/code/game/mecha/mecha_parts.dm
+++ b/code/game/mecha/mecha_parts.dm
@@ -340,3 +340,120 @@
name="Prototype Durand Right Leg"
icon_state = "janus_r_leg"
origin_tech = list(TECH_MATERIAL = 5, TECH_BLUESPACE = 3, TECH_MAGNET = 3, TECH_ARCANE = 1)
+
+
+///Fighters///
+
+
+/obj/item/mecha_parts/fighter
+ icon = 'icons/mecha/fighters_construct64x64.dmi'
+
+/obj/item/mecha_parts/fighter/chassis
+ name="Fighter Chassis"
+ icon_state = "backbone"
+ var/datum/construction/construct
+
+/obj/item/mecha_parts/fighter/chassis/attackby(obj/item/W, mob/user)
+ if(!construct || !construct.action(W, user))
+ ..()
+ return
+
+/obj/item/mecha_parts/fighter/chassis/attack_hand(mob/user, list/params)
+ return
+
+
+//! Pinnace
+
+/obj/item/mecha_parts/fighter/chassis/pinnace
+ name = "\improper Pinnace Chassis"
+ icon_state = "pinnace_chassis"
+
+ origin_tech = list(TECH_MATERIAL = 2)
+
+/obj/item/mecha_parts/fighter/chassis/pinnace/New()
+ ..()
+ construct = new /datum/construction/mecha/fighter/pinnace_chassis(src)
+
+
+/obj/item/mecha_parts/fighter/part/pinnace_core
+ name="\improper Pinnace Core"
+ icon_state = "pinnace_core"
+ origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_ENGINEERING = 2)
+
+/obj/item/mecha_parts/fighter/part/pinnace_cockpit
+ name="\improper Pinnace Cockpit"
+ icon_state = "pinnace_cockpit"
+ origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_ENGINEERING = 2)
+
+/obj/item/mecha_parts/fighter/part/pinnace_left_wing
+ name="\improper Pinnace Left Wing"
+ icon_state = "pinnace_l_wing"
+ origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_ENGINEERING = 2)
+
+/obj/item/mecha_parts/fighter/part/pinnace_right_wing
+ name="\improper Pinnace Right Wing"
+ icon_state = "pinnace_r_wing"
+ origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_ENGINEERING = 2)
+
+/obj/item/mecha_parts/fighter/part/pinnace_main_engine
+ name="\improper Pinnace Main Engine"
+ icon_state = "pinnace_m_engine"
+ origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_ENGINEERING = 2)
+
+/obj/item/mecha_parts/fighter/part/pinnace_left_engine
+ name="\improper Pinnace Left Engine"
+ icon_state = "pinnace_l_engine"
+ origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_ENGINEERING = 2)
+
+/obj/item/mecha_parts/fighter/part/pinnace_right_engine
+ name="\improper Pinnace Right Engine"
+ icon_state = "pinnace_r_engine"
+ origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_ENGINEERING = 2)
+
+//! Baron
+
+/obj/item/mecha_parts/fighter/chassis/baron
+ name = "\improper Baron Chassis"
+ icon_state = "baron_chassis"
+
+ origin_tech = list(TECH_MATERIAL = 2)
+
+/obj/item/mecha_parts/fighter/chassis/baron/New()
+ ..()
+ construct = new /datum/construction/mecha/fighter/baron_chassis(src)
+
+
+/obj/item/mecha_parts/fighter/part/baron_core
+ name="\improper Baron Core"
+ icon_state = "baron_core"
+ origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 5, TECH_BIO = 2, TECH_ENGINEERING = 4)
+
+/obj/item/mecha_parts/fighter/part/baron_cockpit
+ name="\improper Baron Cockpit"
+ icon_state = "baron_cockpit"
+ origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 5, TECH_BIO = 2, TECH_ENGINEERING = 4)
+
+/obj/item/mecha_parts/fighter/part/baron_left_wing
+ name="\improper Baron Left Wing"
+ icon_state = "baron_l_wing"
+ origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 5, TECH_ENGINEERING = 4)
+
+/obj/item/mecha_parts/fighter/part/baron_right_wing
+ name="\improper Baron Right Wing"
+ icon_state = "baron_r_wing"
+ origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 5, TECH_ENGINEERING = 4)
+
+/obj/item/mecha_parts/fighter/part/baron_main_engine
+ name="\improper Baron Main Engine"
+ icon_state = "baron_m_engine"
+ origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 5, TECH_ENGINEERING = 4)
+
+/obj/item/mecha_parts/fighter/part/baron_left_engine
+ name="\improper Baron Left Engine"
+ icon_state = "baron_l_engine"
+ origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 5, TECH_ENGINEERING = 4)
+
+/obj/item/mecha_parts/fighter/part/baron_right_engine
+ name="\improper Baron Right Engine"
+ icon_state = "baron_r_engine"
+ origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 5, TECH_ENGINEERING = 4)
diff --git a/code/game/mecha/micro/micro.dm b/code/game/mecha/micro/micro.dm
index f28663c044..53a13a465c 100644
--- a/code/game/mecha/micro/micro.dm
+++ b/code/game/mecha/micro/micro.dm
@@ -34,14 +34,14 @@
if(internal_damage&MECHA_INT_CONTROL_LOST)
target = safepick(oview(1,src))
if(!melee_can_hit || !istype(target, /atom)) return
- if(istype(target, /mob/living))
+ if(isliving(target))
var/mob/living/M = target
if(src.occupant.a_intent == I_HURT)
playsound(src, 'sound/weapons/punch4.ogg', 50, 1)
if(damtype == "brute")
step_away(M,src,15)
- if(istype(target, /mob/living/carbon/human))
+ if(ishuman(target))
var/mob/living/carbon/human/H = target
// if (M.health <= 0) return
diff --git a/code/game/mecha/micro/micro_equipment.dm b/code/game/mecha/micro/micro_equipment.dm
index 62680b47d5..6ed2a71fff 100644
--- a/code/game/mecha/micro/micro_equipment.dm
+++ b/code/game/mecha/micro/micro_equipment.dm
@@ -203,7 +203,7 @@
set category = "Object"
set src in view(1)
- if(!istype(usr, /mob/living/carbon/human)) //Only living, intelligent creatures with hands can empty ore boxes.
+ if(!ishuman(usr)) //Only living, intelligent creatures with hands can empty ore boxes.
to_chat(usr, span_warning("You are physically incapable of emptying the ore box."))
return
diff --git a/code/game/objects/buckling.dm b/code/game/objects/buckling.dm
index 632a55ddda..1684044b7a 100644
--- a/code/game/objects/buckling.dm
+++ b/code/game/objects/buckling.dm
@@ -118,7 +118,7 @@
if(!ticker)
to_chat(user, span_warning("You can't buckle anyone in before the game starts."))
return FALSE // Is this really needed?
- if(!user.Adjacent(M) || user.restrained() || user.stat || istype(user, /mob/living/silicon/pai))
+ if(!user.Adjacent(M) || user.restrained() || user.stat || ispAI(user))
return FALSE
if(M in buckled_mobs)
to_chat(user, span_warning("\The [M] is already buckled to \the [src]."))
diff --git a/code/game/objects/effects/chem/foam.dm b/code/game/objects/effects/chem/foam.dm
index a8d7b243ac..87a1180629 100644
--- a/code/game/objects/effects/chem/foam.dm
+++ b/code/game/objects/effects/chem/foam.dm
@@ -85,7 +85,7 @@
return
if(metal)
return
- if(slips && istype(AM, /mob/living)) //VOREStation Add
+ if(slips && isliving(AM)) //VOREStation Add
var/mob/living/M = AM
M.slip("the foam", 6)
diff --git a/code/game/objects/effects/decals/Cleanable/humans.dm b/code/game/objects/effects/decals/Cleanable/humans.dm
index 2a99e8c2bc..2cc66f962e 100644
--- a/code/game/objects/effects/decals/Cleanable/humans.dm
+++ b/code/game/objects/effects/decals/Cleanable/humans.dm
@@ -76,7 +76,7 @@ var/global/list/image/splatter_cache=list()
/obj/effect/decal/cleanable/blood/Crossed(mob/living/carbon/human/perp)
if(perp.is_incorporeal())
return
- if (!istype(perp))
+ if(!istype(perp))
return
if(amount < 1)
return
@@ -273,21 +273,37 @@ var/global/list/image/splatter_cache=list()
return ..()
/obj/effect/decal/cleanable/mucus/Crossed(mob/living/carbon/human/perp)
+ if(perp.is_incorporeal())
+ return
+ if(!istype(perp))
+ return
if(viruses)
for(var/datum/disease/D in viruses)
perp.ContractDisease(D)
/obj/effect/decal/cleanable/mucus/attack_hand(mob/living/carbon/human/perp)
+ if(perp.is_incorporeal())
+ return
+ if(!istype(perp))
+ return
if(viruses)
for(var/datum/disease/D in viruses)
perp.ContractDisease(D)
/obj/effect/decal/cleanable/vomit/Crossed(mob/living/carbon/human/perp)
+ if(perp.is_incorporeal())
+ return
+ if(!istype(perp))
+ return
if(viruses)
for(var/datum/disease/D in viruses)
perp.ContractDisease(D)
/obj/effect/decal/cleanable/vomit/Crossed(mob/living/carbon/human/perp)
+ if(perp.is_incorporeal())
+ return
+ if(!istype(perp))
+ return
if(viruses)
for(var/datum/disease/D in viruses)
perp.ContractDisease(D)
diff --git a/code/game/objects/effects/decals/Cleanable/misc.dm b/code/game/objects/effects/decals/Cleanable/misc.dm
index e8a6083fed..f2cb824888 100644
--- a/code/game/objects/effects/decals/Cleanable/misc.dm
+++ b/code/game/objects/effects/decals/Cleanable/misc.dm
@@ -121,6 +121,7 @@
density = FALSE
anchored = TRUE
icon = 'icons/effects/tomatodecal.dmi'
+ icon_state = "tomato_floor1"
random_icon_states = list("tomato_floor1", "tomato_floor2", "tomato_floor3")
/obj/effect/decal/cleanable/egg_smudge
@@ -129,6 +130,7 @@
density = FALSE
anchored = TRUE
icon = 'icons/effects/tomatodecal.dmi'
+ icon_state = "smashed_egg1"
random_icon_states = list("smashed_egg1", "smashed_egg2", "smashed_egg3")
/obj/effect/decal/cleanable/pie_smudge //honk
@@ -137,6 +139,7 @@
density = FALSE
anchored = TRUE
icon = 'icons/effects/tomatodecal.dmi'
+ icon_state = "smashed_pie"
random_icon_states = list("smashed_pie")
/obj/effect/decal/cleanable/fruit_smudge
diff --git a/code/game/objects/effects/effect_system.dm b/code/game/objects/effects/effect_system.dm
index b69cbba4d7..c29faf6e9b 100644
--- a/code/game/objects/effects/effect_system.dm
+++ b/code/game/objects/effects/effect_system.dm
@@ -197,7 +197,7 @@ steam.start() -- spawns the effect
return 0
if(M.wear_mask && (M.wear_mask.item_flags & AIRTIGHT))
return 0
- if(istype(M,/mob/living/carbon/human))
+ if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.head && (H.head.item_flags & AIRTIGHT))
return 0
diff --git a/code/game/objects/effects/mines.dm b/code/game/objects/effects/mines.dm
index c2bac12e66..a0e6dee33b 100644
--- a/code/game/objects/effects/mines.dm
+++ b/code/game/objects/effects/mines.dm
@@ -118,7 +118,7 @@
..()
/obj/effect/mine/interact(mob/living/user as mob)
- if(!panel_open || istype(user, /mob/living/silicon/ai))
+ if(!panel_open || isAI(user))
return
user.set_machine(src)
wires.Interact(user)
diff --git a/code/game/objects/effects/portals.dm b/code/game/objects/effects/portals.dm
index 002d5d5cc8..132cfbfd67 100644
--- a/code/game/objects/effects/portals.dm
+++ b/code/game/objects/effects/portals.dm
@@ -13,7 +13,7 @@ GLOBAL_LIST_BOILERPLATE(all_portals, /obj/effect/portal)
anchored = TRUE
/obj/effect/portal/Bumped(mob/M as mob|obj)
- if(istype(M,/mob) && !(istype(M,/mob/living)))
+ if(ismob(M) && !(isliving(M)))
return //do not send ghosts, zshadows, ai eyes, etc
spawn(0)
src.teleport(M)
@@ -23,7 +23,7 @@ GLOBAL_LIST_BOILERPLATE(all_portals, /obj/effect/portal)
/obj/effect/portal/Crossed(atom/movable/AM as mob|obj)
if(AM.is_incorporeal())
return
- if(istype(AM,/mob) && !(istype(AM,/mob/living)))
+ if(ismob(AM) && !(isliving(AM)))
return //do not send ghosts, zshadows, ai eyes, etc
spawn(0)
src.teleport(AM)
@@ -31,7 +31,7 @@ GLOBAL_LIST_BOILERPLATE(all_portals, /obj/effect/portal)
return
/obj/effect/portal/attack_hand(mob/user as mob)
- if(istype(user) && !(istype(user,/mob/living)))
+ if(istype(user) && !(isliving(user)))
return //do not send ghosts, zshadows, ai eyes, etc
spawn(0)
src.teleport(user)
@@ -54,7 +54,7 @@ GLOBAL_LIST_BOILERPLATE(all_portals, /obj/effect/portal)
return
if (istype(M, /atom/movable))
//VOREStation Addition Start: Prevent taurriding abuse
- if(istype(M, /mob/living))
+ if(isliving(M))
var/mob/living/L = M
if(LAZYLEN(L.buckled_mobs))
var/datum/riding/R = L.riding_datum
@@ -66,4 +66,3 @@ GLOBAL_LIST_BOILERPLATE(all_portals, /obj/effect/portal)
do_teleport(M, locate(rand(5, world.maxx - 5), rand(5, world.maxy -5), 3), 0)
else
do_teleport(M, target, 1) ///You will appear adjacent to the beacon
-
diff --git a/code/game/objects/effects/spiders.dm b/code/game/objects/effects/spiders.dm
index 3de66afd02..2fde68408b 100644
--- a/code/game/objects/effects/spiders.dm
+++ b/code/game/objects/effects/spiders.dm
@@ -80,7 +80,7 @@
/obj/effect/spider/stickyweb/CanPass(atom/movable/mover, turf/target)
if(istype(mover, /mob/living/simple_mob/animal/giant_spider))
return TRUE
- else if(istype(mover, /mob/living))
+ else if(isliving(mover))
if(prob(50))
to_chat(mover, span_warning("You get stuck in \the [src] for a moment."))
return FALSE
diff --git a/code/game/objects/effects/temporary_visuals/miscellaneous.dm b/code/game/objects/effects/temporary_visuals/miscellaneous.dm
index 0da54588e6..195d1d6319 100644
--- a/code/game/objects/effects/temporary_visuals/miscellaneous.dm
+++ b/code/game/objects/effects/temporary_visuals/miscellaneous.dm
@@ -111,4 +111,5 @@
/obj/effect/temp_visual/heal/Initialize(mapload)
pixel_x = rand(-12, 12)
pixel_y = rand(-9, 0)
+ . = ..()
// VOREStation Add End
diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index 553d08c343..a8d526c31a 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -76,7 +76,7 @@
/* Species-specific sprites, concept stolen from Paradise//vg/.
ex:
sprite_sheets = list(
- SPECIES_TAJ = 'icons/cat/are/bad'
+ SPECIES_TAJARAN = 'icons/cat/are/bad'
)
If index term exists and icon_override is not set, this sprite sheet will be used.
*/
@@ -760,7 +760,7 @@ GLOBAL_LIST_EMPTY(blood_overlays_by_type)
/obj/item/proc/showoff(mob/user)
for (var/mob/M in view(user))
- M.show_message(span_filter_notice("[user] holds up [src]. Take a closer look."),1)
+ M.show_message(span_filter_notice("[user] holds up [src]. Take a closer look."),1)
/mob/living/carbon/verb/showoff()
set name = "Show Held Item"
@@ -796,7 +796,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
var/cannotzoom
- if((M.stat && !zoom) || !(istype(M,/mob/living/carbon/human)))
+ if((M.stat && !zoom) || !(ishuman(M)))
to_chat(M, span_filter_notice("You are unable to focus through the [devicename]."))
cannotzoom = 1
else if(!zoom && (global_hud.darkMask[1] in M.client.screen))
diff --git a/code/game/objects/items/bells.dm b/code/game/objects/items/bells.dm
index 457eb80f47..9df665424b 100644
--- a/code/game/objects/items/bells.dm
+++ b/code/game/objects/items/bells.dm
@@ -61,7 +61,7 @@
..()
/obj/item/deskbell/proc/ring(mob/user)
- if(user.a_intent == "harm")
+ if(user.a_intent == I_HURT)
playsound(src, 'sound/effects/deskbell_rude.ogg', 50, 1)
to_chat(user,span_notice("You hammer [src] rudely!"))
if (prob(2))
diff --git a/code/game/objects/items/blueprints.dm b/code/game/objects/items/blueprints.dm
index 52c5ff7cdf..d3cd836ff4 100644
--- a/code/game/objects/items/blueprints.dm
+++ b/code/game/objects/items/blueprints.dm
@@ -44,7 +44,7 @@
var/can_rename_areas_in = AREA_STATION // Only station areas can be reanamed
/obj/item/blueprints/attack_self(mob/M as mob)
- if (!istype(M,/mob/living/carbon/human))
+ if (!ishuman(M))
to_chat(M, "This stack of blue paper means nothing to you.") //monkeys cannot into projecting
return
interact()
diff --git a/code/game/objects/items/blueprints_vr.dm b/code/game/objects/items/blueprints_vr.dm
index d2fb512de0..0192980b02 100644
--- a/code/game/objects/items/blueprints_vr.dm
+++ b/code/game/objects/items/blueprints_vr.dm
@@ -531,6 +531,13 @@
if(AO && istype(AO,/obj/item/areaeditor))
if(AO.uses_charges)
AO.charges -= 1
+
+ var/list/zLevels = using_map.station_levels.Copy()
+ for(var/datum/planet/P in SSplanets.planets)
+ zLevels -= P.expected_z_levels
+ for(var/obj/machinery/gravity_generator/main/GG in machines)
+ if(GG.z in zLevels)
+ GG.update_areas()
return TRUE
@@ -926,6 +933,12 @@
message_admins("[key_name(creator, creator.client)] just made a new area called [newA.name] ](?) at ([creator.x],[creator.y],[creator.z] - JMP)",0,1)
log_game("[key_name(creator, creator.client)] just made a new area called [newA.name]")
+ var/list/zLevels = using_map.station_levels.Copy()
+ for(var/datum/planet/P in SSplanets.planets)
+ zLevels -= P.expected_z_levels
+ for(var/obj/machinery/gravity_generator/main/GG in machines)
+ if(GG.z in zLevels)
+ GG.update_areas()
return
diff --git a/code/game/objects/items/contraband.dm b/code/game/objects/items/contraband.dm
index 2311d092bb..3ad1e7c131 100644
--- a/code/game/objects/items/contraband.dm
+++ b/code/game/objects/items/contraband.dm
@@ -63,7 +63,7 @@
return ..()
/obj/item/reagent_containers/powder/Initialize()
- ..()
+ . = ..()
get_appearance()
/obj/item/reagent_containers/powder/proc/get_appearance()
diff --git a/code/game/objects/items/devices/communicator/UI_tgui.dm b/code/game/objects/items/devices/communicator/UI_tgui.dm
index c5e4a7466f..06e30f51a8 100644
--- a/code/game/objects/items/devices/communicator/UI_tgui.dm
+++ b/code/game/objects/items/devices/communicator/UI_tgui.dm
@@ -385,7 +385,7 @@
to_chat(ui.user, span_notice("[icon2html(src, ui.user.client)] Sent message to [istype(comm, /obj/item/communicator) ? comm.owner : comm.name], \"[text]\" (Reply)"))
for(var/mob/M in player_list)
if(M.stat == DEAD && M.client?.prefs?.read_preference(/datum/preference/toggle/ghost_ears))
- if(istype(M, /mob/new_player) || M.forbid_seeing_deadchat)
+ if(isnewplayer(M) || M.forbid_seeing_deadchat)
continue
if(exonet.get_atom_from_address(their_address) == M)
continue
diff --git a/code/game/objects/items/devices/communicator/communicator.dm b/code/game/objects/items/devices/communicator/communicator.dm
index cb0b7e7b7a..acf80965ae 100644
--- a/code/game/objects/items/devices/communicator/communicator.dm
+++ b/code/game/objects/items/devices/communicator/communicator.dm
@@ -129,7 +129,7 @@ var/global/list/obj/item/communicator/all_communicators = list()
// Description: Sets up the exonet datum, gives the device an address, and then gets a node reference. Afterwards, populates the device
// list.
/obj/item/communicator/proc/initialize_exonet(mob/user)
- if(!user || !istype(user, /mob/living))
+ if(!user || !isliving(user))
return
if(!exonet)
exonet = new(src)
diff --git a/code/game/objects/items/devices/communicator/messaging.dm b/code/game/objects/items/devices/communicator/messaging.dm
index db724bc918..c964e9f28c 100644
--- a/code/game/objects/items/devices/communicator/messaging.dm
+++ b/code/game/objects/items/devices/communicator/messaging.dm
@@ -162,7 +162,7 @@
log_pda("(DCOMM: [src]) sent \"[text_message]\" to [chosen_communicator]", src)
for(var/mob/M in player_list)
if(M.stat == DEAD && M.client?.prefs?.read_preference(/datum/preference/toggle/ghost_ears))
- if(istype(M, /mob/new_player) || M.forbid_seeing_deadchat)
+ if(isnewplayer(M) || M.forbid_seeing_deadchat)
continue
if(M == src)
continue
diff --git a/code/game/objects/items/devices/gps.dm b/code/game/objects/items/devices/gps.dm
index 8f5db5e637..98993800d7 100644
--- a/code/game/objects/items/devices/gps.dm
+++ b/code/game/objects/items/devices/gps.dm
@@ -1,4 +1,4 @@
-var/list/GPS_list = list()
+GLOBAL_LIST_EMPTY(GPS_list)
/obj/item/gps
name = "global positioning system"
@@ -29,7 +29,7 @@ var/list/GPS_list = list()
/obj/item/gps/Initialize()
. = ..()
compass = new(src)
- GPS_list += src
+ GLOB.GPS_list += src
name = "global positioning system ([gps_tag])"
update_holder()
update_icon()
@@ -93,7 +93,7 @@ var/list/GPS_list = list()
/obj/item/gps/Destroy()
STOP_PROCESSING(SSobj, src)
is_in_processing_list = FALSE
- GPS_list -= src
+ GLOB.GPS_list -= src
. = ..()
update_holder()
QDEL_NULL(compass)
@@ -199,7 +199,7 @@ var/list/GPS_list = list()
dat["z_level_detection"] = using_map.get_map_levels(curr.z, long_range)
var/list/gps_list = list()
- for(var/obj/item/gps/G in GPS_list - src)
+ for(var/obj/item/gps/G in GLOB.GPS_list - src)
if(!can_track(G, dat["z_level_detection"]))
continue
diff --git a/code/game/objects/items/devices/holowarrant.dm b/code/game/objects/items/devices/holowarrant.dm
index 84f854ec82..1c71997228 100644
--- a/code/game/objects/items/devices/holowarrant.dm
+++ b/code/game/objects/items/devices/holowarrant.dm
@@ -17,7 +17,7 @@
. = ..()
if(active)
. += "It's a holographic warrant for '[active.fields["namewarrant"]]'."
- if(in_range(user, src) || istype(user, /mob/observer/dead))
+ if(in_range(user, src) || isobserver(user))
show_content(user) //Opens a browse window, not chatbox related
else
. += span_notice("You have to go closer if you want to read it.")
diff --git a/code/game/objects/items/devices/laserpointer.dm b/code/game/objects/items/devices/laserpointer.dm
index 8920545e03..44fb1f8f16 100644
--- a/code/game/objects/items/devices/laserpointer.dm
+++ b/code/game/objects/items/devices/laserpointer.dm
@@ -184,7 +184,7 @@
//laser pointer image
- icon_state = "pointer_[pointer_icon_state]"
+ icon_state = "[initial(icon_state)]_[pointer_icon_state]"
var/list/showto = list()
for(var/mob/M in viewers(world.view,targloc))
if(M.client)
@@ -211,7 +211,7 @@
flick_overlay(I, showto, cooldown)
spawn(cooldown)
- icon_state = "pointer"
+ icon_state = initial(icon_state)
/obj/item/laser_pointer/process()
if(prob(20 - recharge_locked*5))
diff --git a/code/game/objects/items/devices/modkit.dm b/code/game/objects/items/devices/modkit.dm
index 68a2c4eab2..2864040fe1 100644
--- a/code/game/objects/items/devices/modkit.dm
+++ b/code/game/objects/items/devices/modkit.dm
@@ -76,4 +76,4 @@
/obj/item/modkit/tajaran
name = "tajaran hardsuit modification kit"
desc = "A kit containing all the needed tools and parts to modify a hardsuit for another user. This one looks like it's meant for Tajaran."
- target_species = SPECIES_TAJ
+ target_species = SPECIES_TAJARAN
diff --git a/code/game/objects/items/devices/personal_shield_generator_vr.dm b/code/game/objects/items/devices/personal_shield_generator_vr.dm
index 35498064e3..76cd026389 100644
--- a/code/game/objects/items/devices/personal_shield_generator_vr.dm
+++ b/code/game/objects/items/devices/personal_shield_generator_vr.dm
@@ -297,7 +297,7 @@
/obj/item/personal_shield_generator/process()
if(!bcell) //They removed the battery midway.
- if(istype(loc, /mob/living/carbon/human)) //We on someone? Tell them it turned off.
+ if(ishuman(loc)) //We on someone? Tell them it turned off.
var/mob/living/carbon/human/user = loc
to_chat(user, span_warning("The shield deactivates! An error message pops up on screen: 'Cell missing. Cell replacement required.'"))
user.remove_modifiers_of_type(/datum/modifier/shield_projection)
@@ -309,7 +309,7 @@
if(shield_active)
if(bcell.rigged) //They turned it back on after it was rigged to go boom.
- if(istype(loc, /mob/living/carbon/human)) //Deactivate the shield, first. You're not getting reduced damage...
+ if(ishuman(loc)) //Deactivate the shield, first. You're not getting reduced damage...
var/mob/living/carbon/human/user = loc
to_chat(user, span_warning("The shield deactivates, an error message popping up on screen: 'Cell Reactor Critically damaged. Cell replacement required.'"))
user.remove_modifiers_of_type(/datum/modifier/shield_projection)
@@ -330,7 +330,7 @@
if(bcell.charge < generator_hit_cost || bcell.charge < generator_active_cost) //Out of charge...
shield_active = 0
- if(istype(loc, /mob/living/carbon/human)) //We on someone? Tell them it turned off.
+ if(ishuman(loc)) //We on someone? Tell them it turned off.
var/mob/living/carbon/human/user = loc
to_chat(user, span_warning("The shield deactivates, an error message popping up on screen: 'Cell out of charge.'"))
user.remove_modifiers_of_type(/datum/modifier/shield_projection)
diff --git a/code/game/objects/items/devices/radio/electropack.dm b/code/game/objects/items/devices/radio/electropack.dm
index 98bb6dab2e..668525ee45 100644
--- a/code/game/objects/items/devices/radio/electropack.dm
+++ b/code/game/objects/items/devices/radio/electropack.dm
@@ -47,7 +47,7 @@
//..()
if(usr.stat || usr.restrained())
return
- if(((istype(usr, /mob/living/carbon/human) && ((!( ticker ) || (ticker && ticker.mode != "monkey")) && usr.contents.Find(src))) || (usr.contents.Find(master) || (in_range(src, usr) && istype(loc, /turf)))))
+ if(((ishuman(usr) && ((!( ticker ) || (ticker && ticker.mode != "monkey")) && usr.contents.Find(src))) || (usr.contents.Find(master) || (in_range(src, usr) && istype(loc, /turf)))))
usr.set_machine(src)
if(href_list["freq"])
var/new_frequency = sanitize_frequency(frequency + text2num(href_list["freq"]))
@@ -108,7 +108,7 @@
/obj/item/radio/electropack/attack_self(mob/user as mob, flag1)
- if(!istype(user, /mob/living/carbon/human))
+ if(!ishuman(user))
return
user.set_machine(src)
var/dat = {"
diff --git a/code/game/objects/items/devices/radio/headset.dm b/code/game/objects/items/devices/radio/headset.dm
index ba68230c98..ec3cc1644a 100644
--- a/code/game/objects/items/devices/radio/headset.dm
+++ b/code/game/objects/items/devices/radio/headset.dm
@@ -212,7 +212,7 @@
/obj/item/radio/headset/mob_headset/afterattack(var/atom/movable/target, mob/living/user, proximity)
if(!proximity)
return
- if(istype(target,/mob/living/simple_mob))
+ if(isanimal(target))
var/mob/living/simple_mob/M = target
if(!M.mob_radio)
user.drop_item()
diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm
index c7720c6f09..6c1aeee3b3 100644
--- a/code/game/objects/items/devices/radio/radio.dm
+++ b/code/game/objects/items/devices/radio/radio.dm
@@ -416,7 +416,7 @@ GLOBAL_DATUM(autospeaker, /mob/living/silicon/ai/announcer)
jobname = JOB_CYBORG
// --- Personal AI (pAI) ---
- else if (istype(M, /mob/living/silicon/pai))
+ else if (ispAI(M))
jobname = "Personal AI"
// --- Unidentifiable mob ---
diff --git a/code/game/objects/items/devices/scanners/health.dm b/code/game/objects/items/devices/scanners/health.dm
index e7be367e7d..6831e09c1f 100644
--- a/code/game/objects/items/devices/scanners/health.dm
+++ b/code/game/objects/items/devices/scanners/health.dm
@@ -101,7 +101,7 @@
dat += span_boldnotice("Subject died [DisplayTimeText(tdelta)] ago - resuscitation may be possible!")
dat += "
"
//VOREStation edit/addition ends
- if(istype(M, /mob/living/carbon/human) && mode == 1)
+ if(ishuman(M) && mode == 1)
var/mob/living/carbon/human/H = M
var/list/damaged = H.get_damaged_organs(1,1)
dat += span_notice("Localized Damage, Brute/Burn:")
diff --git a/code/game/objects/items/devices/scanners/sleevemate.dm b/code/game/objects/items/devices/scanners/sleevemate.dm
index f74f2cc02e..540e977b68 100644
--- a/code/game/objects/items/devices/scanners/sleevemate.dm
+++ b/code/game/objects/items/devices/scanners/sleevemate.dm
@@ -283,7 +283,7 @@ var/global/mob/living/carbon/human/dummy/mannequin/sleevemate_mob
if(!istype(target))
return
- if(istype(target, /mob/living/carbon/human))
+ if(ishuman(target))
var/mob/living/carbon/human/H = target
if(H.resleeve_lock && stored_mind.loaded_from_ckey != H.resleeve_lock)
to_chat(usr,span_warning("\The [H] is protected from impersonation!"))
@@ -325,7 +325,7 @@ var/global/mob/living/carbon/human/dummy/mannequin/sleevemate_mob
spark_system.set_up(5, 0, src.loc)
spark_system.start()
playsound(src, "sparks", 50, 1)
- if(istype(src.loc,/mob/living))
+ if(isliving(src.loc))
var/mob/living/L = src.loc
L.unEquip(src)
src.forceMove(get_turf(src))
diff --git a/code/game/objects/items/devices/translocator_vr.dm b/code/game/objects/items/devices/translocator_vr.dm
index d05376bdce..791f13951e 100644
--- a/code/game/objects/items/devices/translocator_vr.dm
+++ b/code/game/objects/items/devices/translocator_vr.dm
@@ -255,7 +255,7 @@ This device records all warnings given and teleport events for admin review in c
if(!teleport_checks(target,user))
return //The checks proc can send them a message if it wants.
- if(istype(target, /mob/living))
+ if(isliving(target))
var/mob/living/L = target
if(!L.stat)
if(L != user)
@@ -270,7 +270,7 @@ This device records all warnings given and teleport events for admin review in c
power_source.use(charge_cost)
//Unbuckle taur riders
- if(istype(target, /mob/living))
+ if(isliving(target))
var/mob/living/L = target
if(LAZYLEN(L.buckled_mobs))
var/datum/riding/R = L.riding_datum
diff --git a/code/game/objects/items/falling_object_vr.dm b/code/game/objects/items/falling_object_vr.dm
index c8583db3c6..d077304d8e 100644
--- a/code/game/objects/items/falling_object_vr.dm
+++ b/code/game/objects/items/falling_object_vr.dm
@@ -31,7 +31,7 @@
qdel(src)
/atom/movable/proc/end_fall(var/crushing = FALSE)
- if(istype(src, /mob/living))
+ if(isliving(src))
var/mob/living/L = src
if(L.vore_selected && L.can_be_drop_pred && L.drop_vore)
for(var/mob/living/P in loc)
diff --git a/code/game/objects/items/glassjar.dm b/code/game/objects/items/glassjar.dm
index 6a4617f12c..e2209a91d3 100644
--- a/code/game/objects/items/glassjar.dm
+++ b/code/game/objects/items/glassjar.dm
@@ -183,7 +183,7 @@
/obj/item/glass_jar/fish/afterattack(var/atom/A, var/mob/user, var/proximity)
if(!filled)
if(istype(A, /obj/structure/sink) || istype(A, /turf/simulated/floor/water))
- if(contains && user.a_intent == "help")
+ if(contains && user.a_intent == I_HELP)
to_chat(user, span_warning("That probably isn't the best idea."))
return
@@ -197,7 +197,7 @@
/obj/item/glass_jar/fish/attack_self(var/mob/user)
if(filled)
if(contains == JAR_ANIMAL)
- if(user.a_intent == "help")
+ if(user.a_intent == I_HELP)
to_chat(user, span_notice("Maybe you shouldn't empty the water..."))
return
diff --git a/code/game/objects/items/leash.dm b/code/game/objects/items/leash.dm
new file mode 100644
index 0000000000..b2aa728fe0
--- /dev/null
+++ b/code/game/objects/items/leash.dm
@@ -0,0 +1,256 @@
+/obj/screen/alert/leash_dom
+ name = "Leash Holder"
+ desc = "You're holding a leash, with someone on the end."
+ icon_state = "leash_master"
+
+/obj/screen/alert/leash_dom/Click()
+ var/obj/item/leash/owner = master
+ owner.unleash()
+
+/obj/screen/alert/leash_pet
+ name = "Leashed"
+ desc = "You're on the hook now!"
+ icon_state = "leash_pet"
+
+/obj/screen/alert/leash_dom/Click()
+ var/obj/item/leash/owner = master
+ owner.struggle_leash()
+
+///// OBJECT /////
+//The leash object itself
+//The component variables are used for hooks, used later.
+/obj/item/leash
+ name = "leash"
+ desc = "A simple tether that can easily be hooked onto a collar. Usually used to keep pets nearby."
+ icon = 'icons/obj/leash.dmi'
+ icon_state = "leash"
+ item_state = "leash"
+ throw_range = 4
+ slot_flags = SLOT_TIE
+ force = 1
+ throwforce = 1
+ w_class = ITEMSIZE_SMALL
+ var/mob/living/leash_pet = null //Variable to store our pet later
+ var/mob/living/leash_master = null //And our master too
+
+/obj/item/leash/Destroy()
+ // Just in case
+ clear_leash()
+ return ..()
+
+/obj/item/leash/process()
+ if(!leash_pet)
+ return
+ if(!is_wearing_collar(leash_pet)) //The pet has slipped their collar and is not the pet anymore.
+ leash_pet.visible_message(
+ span_warning("[leash_pet] has slipped out of their collar!"),
+ span_warning("You have slipped out of your collar!")
+ )
+ clear_leash()
+
+ if(!leash_pet || !leash_master) //If there is no pet, there is no dom. Loop breaks.
+ clear_leash()
+
+//Called when someone is clicked with the leash
+/obj/item/leash/attack(mob/living/carbon/C, mob/living/user, attackchain_flags, damage_multiplier) //C is the target, user is the one with the leash
+ if(C.alerts["leashed"]) //If the pet is already leashed, do not leash them. For the love of god.
+ // If they re-click, remove the leash
+ if (C == leash_pet && user == leash_master)
+ unleash()
+ else
+ // Dear god not the double leashing
+ to_chat(user, span_notice("[C] has already been leashed."))
+ return
+
+ if (C == user)
+ to_chat(user, span_notice("You cannot leash yourself!"))
+ return
+
+ if (!is_wearing_collar(C))
+ to_chat(user, span_notice("[C] needs a collar before you can attach a leash to it."))
+ return
+
+ var/leashtime = 35
+ if(C.handcuffed)
+ leashtime = 5
+
+ C.visible_message(span_danger("\The [user] is attempting to put the leash on \the [C]!"), span_danger("\The [user] tries to put a leash on you"))
+ add_attack_logs(user,C,"Leashed (attempt)")
+ if(!do_mob(user, C, leashtime)) //do_mob adds a progress bar, but then we also check to see if they have a collar
+ return
+ if(tgui_alert(C, "Would you like to be leased by [user]? You can OOC escape to escape", "Become Leashed",list("No","Yes")) != "Yes")
+ return
+
+ C.visible_message(span_danger("\The [user] puts a leash on \the [C]!"), span_danger("The leash clicks onto your collar!"))
+
+ leash_pet = C //Save pet reference for later
+ leash_pet.add_modifier(/datum/modifier/leash)
+ leash_pet.throw_alert("leashed", /obj/screen/alert/leash_pet, new_master = src) //Is the leasher
+ RegisterSignal(leash_pet, COMSIG_MOVABLE_MOVED, PROC_REF(on_pet_move))
+ to_chat(leash_pet, span_userdanger("You have been leashed!"))
+ to_chat(leash_pet, span_danger("(You can use OOC escape to detach the leash)"))
+ leash_master = user //Save dom reference for later
+ leash_master.throw_alert("leash", /obj/screen/alert/leash_dom, new_master = src)//Has now been leashed
+ RegisterSignal(leash_master, COMSIG_MOVABLE_MOVED, PROC_REF(on_master_move))
+
+ START_PROCESSING(SSobj, src)
+
+//Called when the leash is used in hand
+//Tugs the pet closer
+/obj/item/leash/attack_self(mob/living/user)
+ if(!leash_pet) //No pet, no tug.
+ return
+ //Yank the pet. Yank em in close.
+ apply_tug_mob_to_mob(leash_pet, leash_master, 1)
+
+/obj/item/leash/proc/on_master_move()
+ SIGNAL_HANDLER
+
+ //Make sure the dom still has a pet
+ if(!leash_master || !leash_pet)
+ return
+ addtimer(CALLBACK(src, PROC_REF(after_master_move)), 0.2 SECONDS)
+
+/obj/item/leash/proc/after_master_move()
+ //If the master moves, pull the pet in behind
+ //Also, the timer means that the distance check for master happens before the pet, to prevent both from proccing.
+ if(!leash_master || !leash_pet) //Just to stop error messages
+ return
+ apply_tug_mob_to_mob(leash_pet, leash_master, 2)
+
+ //Knock the pet over if they get further behind. Shouldn't happen too often.
+ sleep(3) //This way running normally won't just yank the pet to the ground.
+ if(!leash_master || !leash_pet) //Just to stop error messages. Break the loop early if something removed the master
+ return
+ if(get_dist(leash_pet, leash_master) > 3 && !leash_pet.stunned)
+ leash_pet.visible_message(
+ span_warning("[leash_pet] is pulled to the ground by their leash!"),
+ span_warning("You are pulled to the ground by your leash!")
+ )
+ leash_pet.apply_effect(20, STUN, 0)
+
+ //This code is to check if the pet has gotten too far away, and then break the leash.
+ sleep(3) //Wait to snap the leash
+ if(!leash_master || !leash_pet) //Just to stop error messages
+ return
+ if(get_dist(leash_pet, leash_master) > 5)
+ leash_pet.visible_message(
+ span_warning("The leash snaps free from [leash_pet]'s collar!"),
+ span_warning("Your leash pops from your collar!")
+ )
+ leash_pet.apply_effect(20, STUN, 0)
+ leash_pet.adjustOxyLoss(5)
+ clear_leash()
+
+/obj/item/leash/proc/on_pet_move()
+ SIGNAL_HANDLER
+ //This should only work if there is a pet and a master.
+ //This is here pretty much just to stop the console from flooding with errors
+ if(!leash_master || !leash_pet)
+ return
+
+ //If the pet gets too far away, they get tugged back
+ addtimer(CALLBACK(src, PROC_REF(after_pet_move)), 0.3 SECONDS) //A short timer so the pet kind of bounces back after they make the step
+
+/obj/item/leash/proc/after_pet_move()
+ if(!leash_master || !leash_pet)
+ return
+ for(var/i in 3 to get_dist(leash_pet, leash_master)) // Move the pet to a minimum of 2 tiles away from the master, so the pet trails behind them.
+ step_towards(leash_pet, leash_master)
+
+/obj/item/leash/dropped(mob/user)
+ //Drop the leash, and the leash effects stop
+ . = ..()
+ if(!leash_pet || !leash_master) //There is no pet. Stop this silliness
+ return
+ //Dropping procs any time the leash changes slots. So, we will wait a tick and see if the leash was actually dropped
+ addtimer(CALLBACK(src, PROC_REF(drop_effects), user), 1)
+
+/obj/item/leash/proc/drop_effects(mob/user)
+ SIGNAL_HANDLER
+ if(leash_master.item_is_in_hands(src) || leash_master.get_item_by_slot(SLOT_TIE) == src)
+ return //Dom still has the leash as it turns out. Cancel the proc.
+ leash_master.visible_message(span_notice("\The [leash_master] drops \the [src]."), span_notice("You drop \the [src]."))
+ //DOM HAS DROPPED LEASH. PET IS FREE. SCP HAS BREACHED CONTAINMENT.
+ clear_leash()
+
+/obj/item/leash/proc/clear_leash()
+ leash_pet?.clear_alert("leashed")
+ leash_pet?.remove_a_modifier_of_type(/datum/modifier/leash)
+ UnregisterSignal(leash_pet, COMSIG_MOVABLE_MOVED)
+ leash_pet = null
+
+ leash_master?.clear_alert("leash")
+ UnregisterSignal(leash_master, COMSIG_MOVABLE_MOVED)
+ leash_master = null
+
+ STOP_PROCESSING(SSobj, src)
+
+/obj/item/leash/proc/struggle_leash()
+ leash_pet.visible_message(span_danger("\The [leash_pet] is attempting to unhook their leash!"), span_danger("You attempt to unhook your leash"))
+ add_attack_logs(leash_master,leash_pet,"Self-unleash (attempt)")
+
+ if(!do_mob(leash_pet, leash_pet, 35))
+ return
+
+ to_chat(leash_pet, span_userdanger("You have been released!"))
+ clear_leash()
+
+/obj/item/leash/proc/unleash()
+ leash_pet.visible_message(span_danger("\The [leash_master] is attempting to remove the leash on \the [leash_pet]!"), span_danger("\The [leash_master] tries to remove leash from you"))
+ add_attack_logs(leash_master,leash_pet,"Unleashed (attempt)")
+
+ if(!do_mob(leash_master, leash_pet, 5))
+ return
+
+ to_chat(leash_pet, span_userdanger("You have been released!"))
+ clear_leash()
+
+/obj/item/leash/proc/is_wearing_collar(var/mob/living/carbon/human/human)
+ if (!istype(human))
+ return FALSE
+ for (var/obj/item/clothing/worn in human.worn_clothing)
+ if (istype(worn, /obj/item/clothing/accessory/collar) || (locate(/obj/item/clothing/accessory/collar) in worn.accessories))
+ return TRUE
+ return FALSE
+
+/datum/modifier/leash
+ name = "Leash"
+ slowdown = 5
+
+// Utility functions
+/obj/item/proc/apply_tug_mob_to_mob(mob/living/carbon/tug_pet, mob/living/carbon/tug_master, distance = 2)
+ apply_tug_position(tug_pet, tug_pet.x, tug_pet.y, tug_master.x, tug_master.y, distance)
+
+/obj/item/proc/apply_tug_mob_to_object(mob/living/carbon/tug_pet, obj/tug_master, distance = 2)
+ apply_tug_position(tug_pet, tug_pet.x, tug_pet.y, tug_master.x, tug_master.y, distance)
+
+/obj/item/proc/apply_tug_object_to_mob(obj/tug_pet, mob/living/carbon/tug_master, distance = 2)
+ apply_tug_position(tug_pet, tug_pet.x, tug_pet.y, tug_master.x, tug_master.y, distance)
+
+// TODO: improve this for bigger distances, where it's easy to hide behind something and break the tugging
+/obj/item/proc/apply_tug_position(tug_pet, tug_pet_x, tug_pet_y, tug_master_x, tug_master_y, distance = 2)
+ if(tug_pet_x > tug_master_x + distance)
+ step(tug_pet, WEST, 1) //"1" is the speed of movement. We want the tug to be faster than their slow current walk speed.
+ if(tug_pet_y > tug_master_y)//Check the other axis, and tug them into alignment so they are behind the master
+ step(tug_pet, SOUTH, 1)
+ if(tug_pet_y < tug_master_y)
+ step(tug_pet, NORTH, 1)
+ if(tug_pet_x < tug_master_x - distance)
+ step(tug_pet, EAST, 1)
+ if(tug_pet_y > tug_master_y)
+ step(tug_pet, SOUTH, 1)
+ if(tug_pet_y < tug_master_y)
+ step(tug_pet, NORTH, 1)
+ if(tug_pet_y > tug_master_y + distance)
+ step(tug_pet, SOUTH, 1)
+ if(tug_pet_x > tug_master_x)
+ step(tug_pet, WEST, 1)
+ if(tug_pet_x < tug_master_x)
+ step(tug_pet, EAST, 1)
+ if(tug_pet_y < tug_master_y - distance)
+ step(tug_pet, NORTH, 1)
+ if(tug_pet_x > tug_master_x)
+ step(tug_pet, WEST, 1)
+ if(tug_pet_x < tug_master_x)
+ step(tug_pet, EAST, 1)
diff --git a/code/game/objects/items/lockpicks.dm b/code/game/objects/items/lockpicks.dm
index 0af583a173..843b0608de 100644
--- a/code/game/objects/items/lockpicks.dm
+++ b/code/game/objects/items/lockpicks.dm
@@ -30,7 +30,7 @@
if(do_after(user, pick_time * D.lock_difficulty))
to_chat(user, span_notice("Success!"))
D.locked = FALSE
- else if(istype(A,/mob/living/carbon/human)) //you can pick your friends, and you can pick your nose, but you can't pick your friend's nose
+ else if(ishuman(A)) //you can pick your friends, and you can pick your nose, but you can't pick your friend's nose
var/mob/living/carbon/human/H = A
if(user.zone_sel.selecting == BP_HEAD)
if(H == user)
diff --git a/code/game/objects/items/paintkit.dm b/code/game/objects/items/paintkit.dm
index ea372f883b..94e3c1a484 100644
--- a/code/game/objects/items/paintkit.dm
+++ b/code/game/objects/items/paintkit.dm
@@ -197,6 +197,7 @@
/obj/item/kit/suit/rig/debug/Initialize()
set_info("debug suit", "This is a test", "debug", CUSTOM_ITEM_OBJ, CUSTOM_ITEM_MOB)
+ . = ..()
/obj/item/kit/paint
name = "mecha customisation kit"
diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm
index 4d7265f233..94c9a464b9 100644
--- a/code/game/objects/items/stacks/medical.dm
+++ b/code/game/objects/items/stacks/medical.dm
@@ -29,7 +29,7 @@
to_chat(user, span_warning("There's not enough [uses_charge ? "charge" : "items"] left to use that!"))
return 1
- if (istype(M, /mob/living/carbon/human))
+ if (ishuman(M))
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
@@ -94,7 +94,7 @@
if(..())
return 1
- if (istype(M, /mob/living/carbon/human))
+ if (ishuman(M))
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
@@ -163,7 +163,7 @@
if(..())
return 1
- if (istype(M, /mob/living/carbon/human))
+ if (ishuman(M))
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
@@ -237,7 +237,7 @@
if(..())
return 1
- if (istype(M, /mob/living/carbon/human))
+ if (ishuman(M))
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
@@ -282,7 +282,7 @@
if(..())
return 1
- if (istype(M, /mob/living/carbon/human))
+ if (ishuman(M))
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
@@ -352,7 +352,7 @@
if(..())
return 1
- if (istype(M, /mob/living/carbon/human))
+ if (ishuman(M))
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
@@ -395,7 +395,7 @@
if(..())
return 1
- if (istype(M, /mob/living/carbon/human))
+ if (ishuman(M))
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
var/limb = affecting.name
diff --git a/code/game/objects/items/stacks/nanopaste.dm b/code/game/objects/items/stacks/nanopaste.dm
index 8267de0047..f05a6e0585 100644
--- a/code/game/objects/items/stacks/nanopaste.dm
+++ b/code/game/objects/items/stacks/nanopaste.dm
@@ -26,7 +26,7 @@
else
to_chat(user, span_notice("All [R]'s systems are nominal."))
- if (istype(M,/mob/living/carbon/human)) //Repairing robolimbs
+ if (ishuman(M)) //Repairing robolimbs
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/S = H.get_organ(user.zone_sel.selecting)
if(!S)
diff --git a/code/game/objects/items/toys/toys.dm b/code/game/objects/items/toys/toys.dm
index 9611a4b14d..71c96d7b1c 100644
--- a/code/game/objects/items/toys/toys.dm
+++ b/code/game/objects/items/toys/toys.dm
@@ -185,7 +185,7 @@
cut_overlays() //So that it doesn't keep stacking overlays non-stop on top of each other
if(active)
add_overlay(blade_overlay)
- if(istype(usr,/mob/living/carbon/human))
+ if(ishuman(usr))
var/mob/living/carbon/human/H = usr
H.update_inv_l_hand()
H.update_inv_r_hand()
@@ -257,7 +257,7 @@
return
if((ishuman(H))) //i guess carp and shit shouldn't set them off
var/mob/living/carbon/M = H
- if(M.m_intent == "run")
+ if(M.m_intent == I_RUN)
to_chat(M, span_warning("You step on the snap pop!"))
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
diff --git a/code/game/objects/items/toys/toys_vr.dm b/code/game/objects/items/toys/toys_vr.dm
index 443f4c3f86..4e98ad54f6 100644
--- a/code/game/objects/items/toys/toys_vr.dm
+++ b/code/game/objects/items/toys/toys_vr.dm
@@ -504,7 +504,7 @@
user.visible_message(span_warning("[user] presses the big red button."), span_notice("You press the button, it plays a loud noise!"), span_notice("The button clicks loudly."))
playsound(src, 'sound/effects/explosionfar.ogg', 50, 0, 0)
for(var/mob/M in range(10, src)) // Checks range
- if(!M.stat && !istype(M, /mob/living/silicon/ai)) // Checks to make sure whoever's getting shaken is alive/not the AI
+ if(!M.stat && !isAI(M)) // Checks to make sure whoever's getting shaken is alive/not the AI
sleep(2) // Short delay to match up with the explosion sound
shake_camera(M, 2, 1)
else
@@ -869,7 +869,7 @@
icon_state = "tastybread"
/obj/item/toy/snake_popper/attack(mob/living/M as mob, mob/user as mob)
- if(istype(M,/mob/living/carbon/human))
+ if(ishuman(M))
if(!popped)
to_chat(user, span_warning("A snake popped out of [src]!"))
if(real == 0)
@@ -1024,7 +1024,7 @@
/obj/item/toy/desk/MouseDrop(mob/user as mob) // Code from Paper bin, so you can still pick up the deck
if((user == usr && (!( user.restrained() ) && (!( user.stat ) && (user.contents.Find(src) || in_range(src, user))))))
- if(!istype(user, /mob/living/simple_mob))
+ if(!isanimal(user))
if(!user.get_active_hand()) //if active hand is empty
var/mob/living/carbon/human/H = user
var/obj/item/organ/external/temp = H.organs_by_name["r_hand"]
diff --git a/code/game/objects/items/weapons/AI_modules.dm b/code/game/objects/items/weapons/AI_modules.dm
index 25ae7e9f81..6c0b0db1ac 100644
--- a/code/game/objects/items/weapons/AI_modules.dm
+++ b/code/game/objects/items/weapons/AI_modules.dm
@@ -76,7 +76,7 @@ AI MODULES
comp.current.show_laws()
to_chat(user, "Upload complete. The robot's laws have been modified.")
- else if(istype(AM, /mob/living/silicon/robot))
+ else if(isrobot(AM))
var/mob/living/silicon/robot/R = AM
if(R.stat == DEAD)
to_chat(user, span_warning("Law Upload Error: Unit is nonfunctional."))
diff --git a/code/game/objects/items/weapons/autopsy.dm b/code/game/objects/items/weapons/autopsy.dm
index 1b9662d782..cfe04ba837 100644
--- a/code/game/objects/items/weapons/autopsy.dm
+++ b/code/game/objects/items/weapons/autopsy.dm
@@ -71,7 +71,7 @@
set category = "Object"
set src in view(usr, 1)
set name = "Print Data"
- if(usr.stat || !(istype(usr,/mob/living/carbon/human)))
+ if(usr.stat || !(ishuman(usr)))
to_chat(usr, "No.")
return
diff --git a/code/game/objects/items/weapons/canes.dm b/code/game/objects/items/weapons/canes.dm
index cd500211a1..165856b542 100644
--- a/code/game/objects/items/weapons/canes.dm
+++ b/code/game/objects/items/weapons/canes.dm
@@ -115,7 +115,7 @@
force = 3
attack_verb = list("hit", "poked", "prodded")
- if(istype(user,/mob/living/carbon/human))
+ if(ishuman(user))
var/mob/living/carbon/human/H = user
H.update_inv_l_hand()
H.update_inv_r_hand()
diff --git a/code/game/objects/items/weapons/circuitboards/mecha.dm b/code/game/objects/items/weapons/circuitboards/mecha.dm
index dd3e06d3a7..b17053a055 100644
--- a/code/game/objects/items/weapons/circuitboards/mecha.dm
+++ b/code/game/objects/items/weapons/circuitboards/mecha.dm
@@ -2,6 +2,10 @@
#error T_BOARD_MECHA already defined elsewhere, we can't use it.
#endif
#define T_BOARD_MECHA(name) "exosuit module circuit board (" + (name) + ")"
+#ifdef T_BOARD_FIGHTER
+#error T_BOARD_FIGHTER already defined elsewhere, we can't use it.
+#endif
+#define T_BOARD_FIGHTER(name) "fightercraft circuit board (" + (name) + ")"
/obj/item/circuitboard/mecha
name = "exosuit circuit board"
@@ -124,5 +128,56 @@
desc = "It is marked with a " + span_alien("constantly shifting glyph") + "."
origin_tech = list(TECH_DATA = 3, TECH_BLUESPACE = 1, TECH_PRECURSOR = 2)
-//Undef the macro, shouldn't be needed anywhere else
+///Fighters///
+
+//Pinnace//
+
+/obj/item/circuitboard/mecha/fighter/pinnace
+
+/obj/item/circuitboard/mecha/fighter/pinnace/main
+ name = T_BOARD_FIGHTER("Pinnace central control")
+ origin_tech = list(TECH_DATA = 4, TECH_BIO = 2, TECH_BLUESPACE = 2)
+ icon_state = "mainboard"
+
+/obj/item/circuitboard/mecha/fighter/pinnace/flight
+ name = T_BOARD_FIGHTER("Pinnace flight control")
+ icon_state = "mcontroller"
+ origin_tech = list(TECH_DATA = 4, TECH_BLUESPACE = 2)
+
+/obj/item/circuitboard/mecha/fighter/pinnace/targeting
+ name = T_BOARD_FIGHTER("Pinnace weapon control and targeting")
+ icon_state = "mcontroller"
+ origin_tech = list(TECH_DATA = 4, TECH_COMBAT = 1)
+
+/obj/item/circuitboard/mecha/fighter/pinnace/cockpitboard
+ name = T_BOARD_FIGHTER("Pinnace manual flight control instruments")
+ origin_tech = list(TECH_DATA = 4, TECH_BLUESPACE = 2)
+ icon_state = "card_mod"
+
+//Baron//
+
+/obj/item/circuitboard/mecha/fighter/baron
+
+/obj/item/circuitboard/mecha/fighter/baron/main
+ name = T_BOARD_FIGHTER("Baron central control")
+ icon_state = "mainboard"
+ origin_tech = list(TECH_DATA = 6, TECH_BIO = 4, TECH_BLUESPACE = 5)
+
+/obj/item/circuitboard/mecha/fighter/baron/flight
+ name = T_BOARD_FIGHTER("Baron flight control")
+ icon_state = "mcontroller"
+ origin_tech = list(TECH_DATA = 6, TECH_BLUESPACE = 5)
+
+/obj/item/circuitboard/mecha/fighter/baron/targeting
+ name = T_BOARD_FIGHTER("Baron weapon control and targeting")
+ icon_state = "mcontroller"
+ origin_tech = list(TECH_DATA = 6, TECH_BIO = 4, TECH_COMBAT = 5)
+
+/obj/item/circuitboard/mecha/fighter/baron/cockpitboard
+ name = T_BOARD_FIGHTER("Baron manual flight control instruments")
+ icon_state = "card_mod"
+ origin_tech = list(TECH_DATA = 6, TECH_BLUESPACE = 5)
+
+//Undef the macros, shouldn't be needed anywhere else
#undef T_BOARD_MECHA
+#undef T_BOARD_FIGHTER
diff --git a/code/game/objects/items/weapons/clown_items.dm b/code/game/objects/items/weapons/clown_items.dm
index 88a7a33271..958cd36731 100644
--- a/code/game/objects/items/weapons/clown_items.dm
+++ b/code/game/objects/items/weapons/clown_items.dm
@@ -11,7 +11,7 @@
/obj/item/bananapeel/Crossed(atom/movable/AM as mob|obj)
if(AM.is_incorporeal())
return
- if(istype(AM, /mob/living))
+ if(isliving(AM))
var/mob/living/M = AM
M.slip("the [src.name]",4)
/*
@@ -28,7 +28,7 @@
/obj/item/soap/Crossed(atom/movable/AM as mob|obj)
if(AM.is_incorporeal())
return
- if(istype(AM, /mob/living))
+ if(isliving(AM))
var/mob/living/M = AM
M.slip("the [src.name]",3)
@@ -83,5 +83,5 @@
/obj/item/bikehorn/Crossed(atom/movable/AM as mob|obj)
if(AM.is_incorporeal())
return
- if(istype(AM, /mob/living))
+ if(isliving(AM))
playsound(src, honk_sound, 50, 1)
diff --git a/code/game/objects/items/weapons/dna_injector.dm b/code/game/objects/items/weapons/dna_injector.dm
index 1348a5860c..8a0a4493f8 100644
--- a/code/game/objects/items/weapons/dna_injector.dm
+++ b/code/game/objects/items/weapons/dna_injector.dm
@@ -64,7 +64,7 @@
return buf.dna.SetUIValue(real_block,val)
/obj/item/dnainjector/proc/inject(mob/M as mob, mob/user as mob)
- if(istype(M,/mob/living))
+ if(isliving(M))
var/mob/living/L = M
L.apply_effect(rand(5,20), IRRADIATE, check_protection = 0)
L.apply_damage(max(2,L.getCloneLoss()), CLONE)
diff --git a/code/game/objects/items/weapons/explosives.dm b/code/game/objects/items/weapons/explosives.dm
index 6151cd98e0..88296337ac 100644
--- a/code/game/objects/items/weapons/explosives.dm
+++ b/code/game/objects/items/weapons/explosives.dm
@@ -82,7 +82,7 @@
if (istype(target, /turf/simulated/wall))
var/turf/simulated/wall/W = target
W.dismantle_wall(1,1,1)
- else if(istype(target, /mob/living))
+ else if(isliving(target))
target.ex_act(2) // c4 can't gib mobs anymore.
else
target.ex_act(1)
diff --git a/code/game/objects/items/weapons/gift_wrappaper.dm b/code/game/objects/items/weapons/gift_wrappaper.dm
index 57d50de647..b120b35804 100644
--- a/code/game/objects/items/weapons/gift_wrappaper.dm
+++ b/code/game/objects/items/weapons/gift_wrappaper.dm
@@ -170,7 +170,7 @@
. += "There is about [src.amount] square units of paper left!"
/obj/item/wrapping_paper/attack(mob/target as mob, mob/user as mob)
- if (!istype(target, /mob/living/carbon/human)) return
+ if (!ishuman(target)) return
var/mob/living/carbon/human/H = target
if (istype(H.wear_suit, /obj/item/clothing/suit/straight_jacket) || H.stat)
diff --git a/code/game/objects/items/weapons/grenades/concussion.dm b/code/game/objects/items/weapons/grenades/concussion.dm
index 752888ad41..12851d98e7 100644
--- a/code/game/objects/items/weapons/grenades/concussion.dm
+++ b/code/game/objects/items/weapons/grenades/concussion.dm
@@ -74,7 +74,7 @@
H.sdisabilities |= DEAF
else if(H.ear_damage >= 5)
to_chat(H, span_danger("Your ears start to ring!"))
- if(istype(L, /mob/living/silicon/robot))
+ if(isrobot(L))
var/mob/living/silicon/robot/R = L
if(L.client)
if(prob(50))
diff --git a/code/game/objects/items/weapons/handcuffs.dm b/code/game/objects/items/weapons/handcuffs.dm
index 41b11771e6..92c8683e5c 100644
--- a/code/game/objects/items/weapons/handcuffs.dm
+++ b/code/game/objects/items/weapons/handcuffs.dm
@@ -51,7 +51,7 @@
/obj/item/handcuffs/proc/can_place(var/mob/target, var/mob/user)
if(user == target)
return 1
- if(istype(user, /mob/living/silicon/robot))
+ if(isrobot(user))
if(user.Adjacent(target))
return 1
else
@@ -274,8 +274,8 @@ var/last_chew = 0
lcuffs.loc = target
target.legcuffed = lcuffs
target.update_inv_legcuffed()
- if(target.m_intent != "walk")
- target.m_intent = "walk"
+ if(target.m_intent != I_WALK)
+ target.m_intent = I_WALK
if(target.hud_used && user.hud_used.move_intent)
target.hud_used.move_intent.icon_state = "walking"
return 1
@@ -283,8 +283,8 @@ var/last_chew = 0
/obj/item/handcuffs/legcuffs/equipped(var/mob/living/user,var/slot)
. = ..()
if(slot == slot_legcuffed)
- if(user.m_intent != "walk")
- user.m_intent = "walk"
+ if(user.m_intent != I_WALK)
+ user.m_intent = I_WALK
if(user.hud_used && user.hud_used.move_intent)
user.hud_used.move_intent.icon_state = "walking"
@@ -325,8 +325,8 @@ var/last_chew = 0
lcuffs.loc = target
target.legcuffed = lcuffs
target.update_inv_legcuffed()
- if(target.m_intent != "walk")
- target.m_intent = "walk"
+ if(target.m_intent != I_WALK)
+ target.m_intent = I_WALK
if(target.hud_used && user.hud_used.move_intent)
target.hud_used.move_intent.icon_state = "walking"
return 1
diff --git a/code/game/objects/items/weapons/implants/implant.dm b/code/game/objects/items/weapons/implants/implant.dm
index 00856b0114..02440ee2de 100644
--- a/code/game/objects/items/weapons/implants/implant.dm
+++ b/code/game/objects/items/weapons/implants/implant.dm
@@ -441,7 +441,7 @@ the implant may become unstable and either pre-maturely inject the subject or si
/obj/item/implant/loyalty/handle_implant(mob/M, target_zone = BP_TORSO)
. = ..(M, target_zone)
- if(!istype(M, /mob/living/carbon/human))
+ if(!ishuman(M))
. = FALSE
var/mob/living/carbon/human/H = M
var/datum/antagonist/antag_data = get_antag_data(H.mind.special_role)
diff --git a/code/game/objects/items/weapons/implants/implant_vr.dm b/code/game/objects/items/weapons/implants/implant_vr.dm
index 8f82fb42f7..bd76d493ce 100644
--- a/code/game/objects/items/weapons/implants/implant_vr.dm
+++ b/code/game/objects/items/weapons/implants/implant_vr.dm
@@ -90,20 +90,20 @@
if (malfunction)
return
- if(istype(imp_in, /mob/living))
+ if(isliving(imp_in))
var/mob/living/H = imp_in
if(findtext(msg,"implant-toggle"))
active = !active
if(active)
if(findtext(msg,"grow"))
- H.resize(min(H.size_multiplier*1.5, 2))
+ H.resize(min(H.size_multiplier*1.5, RESIZE_MAXIMUM))
else if(findtext(msg,"shrink"))
- H.resize(max(H.size_multiplier*0.5, 0.25))
+ H.resize(max(H.size_multiplier*0.5, RESIZE_MINIMUM))
else if(findtext(msg, "resize"))
var/static/regex/size_mult = new/regex("\\d+")
if(size_mult.Find(msg))
var/resizing_value = text2num(size_mult.match)
- H.resize(CLAMP(resizing_value/100 , 0.25, 2))
+ H.resize(CLAMP(resizing_value/100 , RESIZE_MINIMUM, RESIZE_MAXIMUM))
@@ -113,7 +113,7 @@
/obj/item/implant/sizecontrol/emp_act(severity)
- if(istype(imp_in, /mob/living))
+ if(isliving(imp_in))
var/newsize = pick(RESIZE_HUGE,RESIZE_BIG,RESIZE_NORMAL,RESIZE_SMALL,RESIZE_TINY,RESIZE_A_HUGEBIG,RESIZE_A_BIGNORMAL,RESIZE_A_NORMALSMALL,RESIZE_A_SMALLTINY)
var/mob/living/H = imp_in
H.resize(newsize)
diff --git a/code/game/objects/items/weapons/implants/implantchair.dm b/code/game/objects/items/weapons/implants/implantchair.dm
index d98081ed0b..281068a130 100644
--- a/code/game/objects/items/weapons/implants/implantchair.dm
+++ b/code/game/objects/items/weapons/implants/implantchair.dm
@@ -47,7 +47,7 @@
/obj/machinery/implantchair/Topic(href, href_list)
- if((get_dist(src, usr) <= 1) || istype(usr, /mob/living/silicon/ai))
+ if((get_dist(src, usr) <= 1) || isAI(usr))
if(href_list["implant"])
if(src.occupant)
injecting = 1
diff --git a/code/game/objects/items/weapons/implants/implantcircuits.dm b/code/game/objects/items/weapons/implants/implantcircuits.dm
index 798f7fe736..51207ed2c7 100644
--- a/code/game/objects/items/weapons/implants/implantcircuits.dm
+++ b/code/game/objects/items/weapons/implants/implantcircuits.dm
@@ -36,7 +36,8 @@
IC.emp_act(severity)
/obj/item/implant/integrated_circuit/examine(mob/user)
- return IC.examine(user)
+ . = ..()
+ . += IC.examine(user)
/obj/item/implant/integrated_circuit/attackby(var/obj/item/O, var/mob/user)
if(O.has_tool_quality(TOOL_CROWBAR) || istype(O, /obj/item/integrated_electronics) || istype(O, /obj/item/integrated_circuit) || O.has_tool_quality(TOOL_SCREWDRIVER) || istype(O, /obj/item/cell/device) )
diff --git a/code/game/objects/items/weapons/implants/implanter.dm b/code/game/objects/items/weapons/implants/implanter.dm
index 7caf0d361f..f385529ee8 100644
--- a/code/game/objects/items/weapons/implants/implanter.dm
+++ b/code/game/objects/items/weapons/implants/implanter.dm
@@ -146,7 +146,7 @@
to_chat(user, span_warning("You can't store \the [A.name] in this!"))
c.scanned = null
return
- if(istype(A.loc,/mob/living/carbon/human))
+ if(ishuman(A.loc))
var/mob/living/carbon/human/H = A.loc
H.remove_from_mob(A)
else if(istype(A.loc,/obj/item/storage))
diff --git a/code/game/objects/items/weapons/manuals_vr.dm b/code/game/objects/items/weapons/manuals_vr.dm
index 5411ab9c9d..79ab4f4031 100644
--- a/code/game/objects/items/weapons/manuals_vr.dm
+++ b/code/game/objects/items/weapons/manuals_vr.dm
@@ -7,7 +7,7 @@
title = "Standard Operating Procedure"
/obj/item/book/manual/standard_operating_procedure/Initialize()
- ..()
+ . = ..()
dat = {"
@@ -30,7 +30,7 @@
title = "Corporate Regulations"
/obj/item/book/manual/command_guide/Initialize()
- ..()
+ . = ..()
dat = {"
@@ -53,8 +53,8 @@
author = "Ali Big"
title = "Food for Dummies 2"
-/obj/item/book/manual/cook_guide/New()
- ..()
+/obj/item/book/manual/cook_guide/Initialize()
+ . = ..()
dat = {"
@@ -76,7 +76,7 @@
Penned by Ali Big
Hello Newbie, congratz on deciding to make food! This guide assumes you know absolutely nothing, so fret not, the information here will help you prepare food for your hungry crewmates!
Workspace prep:
- This step is simple: merely go to the Grill, Oven, and Fryer and turn everything on so you do not need to wait for them to warm up later; they won’t start a fire unless food is left in them unchecked. It is also highly suggested to lay out at least a few Measuring Cups on the counters for ease of use.
+ This step is simple: merely go to the Grill, Oven, and Fryer and turn everything on so you do not need to wait for them to warm up later; they won't start a fire unless food is left in them unchecked. It is also highly suggested to lay out at least a few Measuring Cups on the counters for ease of use.
Basic ingredient prep:
In the lockers and fridges, you have all your needed supplies for this guide, so look through them and familiarize yourself! This guide will only use ingredients you already have access to, so don't worry about missing items!
Part 1: How to Create Various Essential Ingredients with What You Have
@@ -109,7 +109,7 @@
Cheesy Nachos:
Tortilla, Cheese and 1 unit of Salt in the microwave, the perfect Finger Food!
Spaghetti:
- Without Tomato’s from Botany it's not going to be the flashiest, but one can make Boiled Spaghetti with Spaghetti and Water in the Microwave. Kitsune Udon can be made with Spaghetti, Egg Yolk (crack egg in beaker then add to microwave), and Tofu. Spaghetti and Meatballs can be made by doing the Boiled Spaghetti Recipe and adding 2 Meatballs; adding 4 Meatballs into the initial mix makes Spesslaw. Lastly, Spaghetti, Milk, and Cheese in the Oven makes Macaroni and Cheese.
+ Without Tomato's from Botany it's not going to be the flashiest, but one can make Boiled Spaghetti with Spaghetti and Water in the Microwave. Kitsune Udon can be made with Spaghetti, Egg Yolk (crack egg in beaker then add to microwave), and Tofu. Spaghetti and Meatballs can be made by doing the Boiled Spaghetti Recipe and adding 2 Meatballs; adding 4 Meatballs into the initial mix makes Spesslaw. Lastly, Spaghetti, Milk, and Cheese in the Oven makes Macaroni and Cheese.
Steak:
For the pure meat eaters, just add Meat, 1 Salt, and 1 Pepper into the grill for them, and try not to cry as they use up all your Meat quickly. (There's a second Meat Locker in the freezer room if you do run out!)
Donk Pockets:
@@ -137,8 +137,8 @@
author = "Ali Big"
title = "How to Alcohol (And other Drinks)"
-/obj/item/book/manual/bar_guide/New()
- ..()
+/obj/item/book/manual/bar_guide/Initialize()
+ . = ..()
dat = {"
@@ -350,8 +350,8 @@
author = "Engineering Encyclopedia"
title = "Rotary Electric Generator Manual"
-/obj/item/book/manual/rotary_electric_generator/New()
- ..()
+/obj/item/book/manual/rotary_electric_generator/Initialize()
+ . = ..()
dat = {"