From 08255584308e3d04bd6d36472d38c7f65652aacf Mon Sep 17 00:00:00 2001
From: Kashargul <144968721+Kashargul@users.noreply.github.com>
Date: Mon, 16 Dec 2024 05:44:03 +0100
Subject: [PATCH] enable define sanity (#16707)
* enable define sanity
* .
* .
* fix unicode
* fix broken unicode
* more
* .
* even more
* more
* more
* .
* .
* .
* .
* .
* .
* eh not sure if we even have over 1000
* defines
* -
* .
* uranium
---
.github/workflows/ci.yml | 2 +
.gitignore | 3 +
code/__defines/belly_modes_vr.dm | 6 +
code/__defines/dna.dm | 6 +
code/__defines/phobias.dm | 9 ++
code/datums/locations/qerrvallis.dm | 32 +++---
code/datums/locations/vir.dm | 12 +-
code/game/dna/dna2.dm | 7 --
code/game/dna/dna2_domutcheck.dm | 1 -
.../objects/items/weapons/wiki_manuals.dm | 3 +
.../modules/examine/descriptions/telecomms.dm | 4 +-
code/modules/games/cah_black_cards.dm | 14 +--
.../hardcode_library/fiction/PortedBooks.dm | 68 +++++------
.../fiction/battlefieldcommander.dm | 78 ++++++-------
.../hardcode_library/reference/Schnayy.dm | 2 +-
.../lore_data/important_locations.dm | 10 +-
code/modules/lore_codex/lore_data/species.dm | 22 ++--
.../lore_codex/lore_data_vr/history.dm | 10 +-
.../lore_codex/lore_data_vr/species.dm | 10 +-
code/modules/maps/bapi-dmm/bapi_bindings.dm | 2 +
code/modules/mining/ore_datum.dm | 2 +-
.../mob/living/carbon/human/phobias.dm | 10 --
.../guns/projectile/leveraction.dm | 10 +-
code/modules/vore/eating/belly_obj_vr.dm | 5 -
tools/define_sanity/check.py | 106 ++++++++++++++++++
vorestation.dme | 1 +
26 files changed, 273 insertions(+), 162 deletions(-)
create mode 100644 code/__defines/phobias.dm
create mode 100644 tools/define_sanity/check.py
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index c499e3d2dc..2e60daf63b 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -58,6 +58,8 @@ jobs:
tools/bootstrap/python -c ''
- name: Run Grep Checks
run: tools/ci/validate_files.sh
+ - name: Run Define Sanity Checks
+ run: tools/bootstrap/python -m define_sanity.check
- name: Run TGUI Checks
run: tools/build/build --ci lint tgui-test
diff --git a/.gitignore b/.gitignore
index d87340a7fa..dae7acc003 100644
--- a/.gitignore
+++ b/.gitignore
@@ -41,3 +41,6 @@ tgui/public/tgui.bundle.css
tgui/public/tgui.bundle.js
#ignore tracy dll
prof.dll
+
+# From /tools/define_sanity/check.py - potential output file that we load onto the user's machine that we don't want to have committed.
+define_sanity_output.txt
diff --git a/code/__defines/belly_modes_vr.dm b/code/__defines/belly_modes_vr.dm
index b0e7976dbd..266d2f583a 100644
--- a/code/__defines/belly_modes_vr.dm
+++ b/code/__defines/belly_modes_vr.dm
@@ -43,3 +43,9 @@
#define DR_SLEEP "Sleep"
#define DR_FAKE "False Sleep"
#define DR_WEIGHT "Weight Drain"
+
+//Vore Sprite Flags
+#define DM_FLAG_VORESPRITE_BELLY 0x1
+#define DM_FLAG_VORESPRITE_TAIL 0x2
+#define DM_FLAG_VORESPRITE_MARKING 0x4
+#define DM_FLAG_VORESPRITE_ARTICLE 0x8
diff --git a/code/__defines/dna.dm b/code/__defines/dna.dm
index 10fe4d729b..b958466201 100644
--- a/code/__defines/dna.dm
+++ b/code/__defines/dna.dm
@@ -154,3 +154,9 @@ var/SMALLSIZEBLOCK = 0
#define DNA2_BUF_UI 1
#define DNA2_BUF_UE 2
#define DNA2_BUF_SE 4
+
+// Mutation flags
+#define MUTCHK_FORCED 1
+
+// Gene flags
+#define GENE_ALWAYS_ACTIVATE 1
diff --git a/code/__defines/phobias.dm b/code/__defines/phobias.dm
new file mode 100644
index 0000000000..0bf2fc1613
--- /dev/null
+++ b/code/__defines/phobias.dm
@@ -0,0 +1,9 @@
+//Handling and defining of phobias and fears
+#define NYCTOPHOBIA 1
+#define ARACHNOPHOBIA 2
+#define HEMOPHOBIA 4
+#define THALASSOPHOBIA 8
+#define CLAUSTROPHOBIA_MINOR 16
+#define CLAUSTROPHOBIA_MAJOR 32
+#define ANATIDAEPHOBIA 64
+#define AGRAVIAPHOBIA 128
diff --git a/code/datums/locations/qerrvallis.dm b/code/datums/locations/qerrvallis.dm
index 79efa37c9a..a3cc2468ba 100644
--- a/code/datums/locations/qerrvallis.dm
+++ b/code/datums/locations/qerrvallis.dm
@@ -26,32 +26,32 @@
..(creator)
/datum/locations/qarrkloa
- name = "Qarrkloa"
- desc = "Mythically considered the first State-City ever built by Skrellkind, Qarrkloa attracts thousands of tourists and archeologists \
+ name = "Qarr'kloa"
+ desc = "Mythically considered the first State-City ever built by Skrellkind, Qarr'kloa attracts thousands of tourists and archeologists \
every year thanks to the ancestral structures, built thousands of years ago by the Skrell, scattered in its vicinity."
/datum/locations/moglar
- name = "Moglar"
- desc = "Built on the northern coast of Qorrgloa, Moglar was, at the time of XiKrrioals colonization, a major port of trade between \
+ name = "Mo'glar"
+ desc = "Built on the northern coast of Qorr'gloa, Mo'glar was, at the time of Xi'Krri'oal's colonization, a major port of trade between \
the two continents of the planet. It has kept that role to this day, although it never truly adapted to inter-planetary trade, leaving the \
- task of exporting Qerrbalaks goods to other planets to other cities, mainly on XiKrrioal."
+ task of exporting Qerrbalak's goods to other planets to other cities, mainly on Xi'Krri'oal."
/datum/locations/miqoxi
- name = "Miqoxi"
- desc = "This city, built on the small patch of islands north of XiKrrioal, owes most of its current status to the infamous Qerr-Skria \
- Glomorr Krrixi who, in the 23th century BCE, built a large empire spanning from the Qorria Sea to the current city of Qalkrrea, mostly \
- through military conquests. As the center of his empire, Miqoxi became a large center of population and industry and while the fall of \
- the empire at Krrixis death did put a halt to the citys growth, it is still today one of the biggest cities of the continent."
+ name = "Mi'qoxi"
+ desc = "This city, built on the small patch of islands north of Xi'Krri'oal, owes most of its current status to the infamous Qerr-Skria \
+ Glo'morr Krrixi who, in the 23th century BCE, built a large empire spanning from the Qo'rria Sea to the current city of Qal'krrea, mostly \
+ through military conquests. As the center of his empire, Mi'qoxi became a large center of population and industry and while the fall of \
+ the empire at Krrixi's death did put a halt to the city's growth, it is still today one of the biggest cities of the continent."
/datum/locations/kallo
- name = "Kallo"
- desc = "A relatively recent city compared to the other major cities of the planet, Kallo quickly rose in status by fathering some of the most \
- important figures of modern skrellian society. It is notably the birthplace of Xikrra Kolgoa, who wrote the Loglomogrri in 46 BCE, \
+ name = "Kal'lo"
+ desc = "A relatively recent city compared to the other major cities of the planet, Kal'lo quickly rose in status by fathering some of the most \
+ important figures of modern skrellian society. It is notably the birthplace of Xikrra Kol'goa, who wrote the Lo'glo'mog'rri in 46 BCE, \
the constitutional code that is still used by most of the skrellian states in the galaxy."
/datum/locations/glimorr
- name = "Glimorr"
- desc = "While Glimorr is not as heavily-populated than its continental counterparts, its touristic potential made it rich enough to finance \
+ name = "Gli'morr"
+ desc = "While Gli'morr is not as heavily-populated than its continental counterparts, its touristic potential made it rich enough to finance \
the biggest research center of the planet, covering dozens of scientific fields. Its Academy is just as much renowned, and even the lowest \
Qrri-Mog (although most of its students prefer to continue their studies until they become Qerr-Mog) coming out of its classrooms is \
- considered part of the elite."
\ No newline at end of file
+ considered part of the elite."
diff --git a/code/datums/locations/vir.dm b/code/datums/locations/vir.dm
index 377ecc9b03..3a407f1dc8 100644
--- a/code/datums/locations/vir.dm
+++ b/code/datums/locations/vir.dm
@@ -17,12 +17,12 @@
/datum/locations/firnir
name = "Firnir"
- desc = "Tidally locked to Vir and having temperatures in excess of 570 degrees kelvin (299C) on the day side has caused this planet to go mostly ignored."
+ desc = "Tidally locked to Vir and having temperatures in excess of 570 degrees kelvin (299°C) on the day side has caused this planet to go mostly ignored."
/datum/locations/tyr
name = "Tyr"
desc = "Second closest planet, with a high concentration of minerals in the crust, but otherwise a typical planet. The surface temperature can reach \
- 405 degrees kelvin (132C), which deter most mining operations, except for one, which has a mining base and a few orbitals established, utilizing \
+ 405 degrees kelvin (132°C), which deter most mining operations, except for one, which has a mining base and a few orbitals established, utilizing \
specialized equipment, chiefly being autonomous synthetic mining drones, to retrieve precious ore in a rather expensive, but safer way, compared to the \
pirate haven that is asteroid mining."
@@ -30,16 +30,16 @@
name = "Sif"
desc = "Falling within Vir's 'habitable zone', the third planet was the first to be colonized, initially by a large group of colonists owing \
loyalty to their own employers. Unfortunate events discussed previously had forced the settlement to be abandoned, and then reclaimed. \
- The planet's mean temperature is 286 kelvin (13C), chilly but habitable."
+ The planet's mean temperature is 286 kelvin (13°C), chilly but habitable."
/datum/locations/magni
name = "Magni"
- desc = "Outside of the habitable zone, Vir D is generally at 202 kelvin (-71C)."
+ desc = "Outside of the habitable zone, Vir D is generally at 202 kelvin (-71°C)."
/datum/locations/kara
name = "Kara"
desc = "A gas giant, with a large number of moons. Captured asteroids, to be specific. Many of these asteroids are being used by different companies for \
- various purposes. The temperature of the gas giant is 150 kelvin (-108C)"
+ various purposes. The temperature of the gas giant is 150 kelvin (-108°C)"
/datum/locations/kara/New(var/creator)
contents.Add(
@@ -65,4 +65,4 @@
/datum/locations/rota
name = "Rota"
- desc = "A Neptune-like ice giant, with a beautiful ring system circling it. It is 165 kelvin (-157C)."
\ No newline at end of file
+ desc = "A Neptune-like ice giant, with a beautiful ring system circling it. It is 165 kelvin (-157°C)."
diff --git a/code/game/dna/dna2.dm b/code/game/dna/dna2.dm
index 2a686e0a9a..099e5c4d18 100644
--- a/code/game/dna/dna2.dm
+++ b/code/game/dna/dna2.dm
@@ -25,13 +25,6 @@ var/global/list/assigned_blocks[DNA_SE_LENGTH]
var/global/list/datum/dna/gene/dna_genes[0]
-/////////////////
-// GENE DEFINES
-/////////////////
-// Skip checking if it's already active.
-// Used for genes that check for value rather than a binary on/off.
-#define GENE_ALWAYS_ACTIVATE 1
-
/datum/dna
// READ-ONLY, GETS OVERWRITTEN
// DO NOT FUCK WITH THESE OR BYOND WILL EAT YOUR FACE
diff --git a/code/game/dna/dna2_domutcheck.dm b/code/game/dna/dna2_domutcheck.dm
index 02495bbc49..2b3f820532 100644
--- a/code/game/dna/dna2_domutcheck.dm
+++ b/code/game/dna/dna2_domutcheck.dm
@@ -3,7 +3,6 @@
// M: Mob to mess with
// connected: Machine we're in, type unchecked so I doubt it's used beyond monkeying
// flags: See below, bitfield.
-#define MUTCHK_FORCED 1
/proc/domutcheck(var/mob/living/M, var/connected=null, var/flags=0)
for(var/datum/dna/gene/gene in dna_genes)
if(!M || !M.dna)
diff --git a/code/game/objects/items/weapons/wiki_manuals.dm b/code/game/objects/items/weapons/wiki_manuals.dm
index 8ba6b68dab..aaac07da1d 100644
--- a/code/game/objects/items/weapons/wiki_manuals.dm
+++ b/code/game/objects/items/weapons/wiki_manuals.dm
@@ -143,3 +143,6 @@
title = "Engineering Textbook"
page_link = "Guide_to_Engineering"
+
+#undef BOOK_WINDOW_BROWSE_SIZE
+#undef WIKI_PAGE_IFRAME
diff --git a/code/modules/examine/descriptions/telecomms.dm b/code/modules/examine/descriptions/telecomms.dm
index 9096a6b1a4..7e86084daf 100644
--- a/code/modules/examine/descriptions/telecomms.dm
+++ b/code/modules/examine/descriptions/telecomms.dm
@@ -11,7 +11,7 @@
Internet (sometimes referred to as the InterPlaNet), which was conceived and developed due to the limitations of the terrestrial Internet, mainly because \
the IP protocol was unsuitable for long range communications in space, due to the massive delays associated with lightspeed being unable to overcome \
the massive distances between planets in a timely manner. It was a store-and-forward network of smaller internets, distributed between various nodes, \
- and was designed to be error, fault, and delay tolerant. The first nodes were put into space around the time when colonization had begun, to service humanitys \
+ and was designed to be error, fault, and delay tolerant. The first nodes were put into space around the time when colonization had begun, to service humanity's \
close holdings, such as Luna and Mars.
\
\
By 2104, the Interplanetary Internet had coverage within most of Sol, but the network of networks were limited by the speed of light, and due \
@@ -33,4 +33,4 @@
This node is privately owned and maintained by NanoTrasen, and allows the crew of the station to have access to the Exonet."
description_antag = "An EMP will disable this device for a short period of time. A longer downage can be achieved by turning it off, or rigging \
- the APC it uses to turn off remotely, such as with a signaler in the right wire."
\ No newline at end of file
+ the APC it uses to turn off remotely, such as with a signaler in the right wire."
diff --git a/code/modules/games/cah_black_cards.dm b/code/modules/games/cah_black_cards.dm
index c2ab79df12..312d8f19d2 100644
--- a/code/modules/games/cah_black_cards.dm
+++ b/code/modules/games/cah_black_cards.dm
@@ -182,27 +182,27 @@
"Why do I hurt all over?",
"In the seventh circle of Hell, sinners must endure _____ for all eternity.",
"A successful job interview begins with a firm handshake and ends with _____.",
- "Lovin� you is easy �cause you�re _____.",
+ "Lovin' you is easy 'cause you're _____.",
"My life is ruled by a vicious cycle of _____ and _____.",
"The blind date was going horribly until we discovered our shared interest in _____.",
"_____. Awesome in theory, kind of a mess in practice.",
- "I�m not like the rest of you. I�m too rich and busy for _____.",
+ "I'm not like the rest of you. I'm too rich and busy for _____.",
"(Pick 2) _____: Hours of fun. Easy to use. Perfect for _____!",
"What left this stain on my couch?",
"Call the law offices of Goldstein & Goldstein, because no one should have to tolerate _____ in the workplace.",
"(Pick 2) When you get right down to it, _____ is just _____.",
"Turns out that _____ Man was neither the hero we needed nor wanted.",
"As part of his daily regimen, Anderson Cooper sets aside 15 minutes for _____.",
- "Money can�t buy me love, but it can buy me _____.",
+ "Money can't buy me love, but it can buy me _____.",
"(Pick 2) With enough time and pressure, _____ will turn into _____.",
"And what did you bring for show and tell?",
"During high school I never really fit in until I found _____ club.",
- "Hey baby, come back to my place and I�ll show you _____.",
- "(Pick 2) After months of practice with _____, I think I�m finally ready for _____.",
+ "Hey baby, come back to my place and I'll show you _____.",
+ "(Pick 2) After months of practice with _____, I think I'm finally ready for _____.",
"To prepare for his upcoming role, Daniel Day-Lewis immersed himself in the world of _____.",
"Finally! A service that delivers _____ right to your door.",
"My gym teacher got fired for adding _____ to the obstacle course.",
"(Pick 2) Having problems with _____? Try _____!",
- "As part of his contract, Prince won�t perform without _____ in his dressing room.",
- "(Pick 2) Listen, son. If you want to get involved with _____, I won�t stop you. Just steer clear of _____."
+ "As part of his contract, Prince won't perform without _____ in his dressing room.",
+ "(Pick 2) Listen, son. If you want to get involved with _____, I won't stop you. Just steer clear of _____."
)
diff --git a/code/modules/library/hardcode_library/fiction/PortedBooks.dm b/code/modules/library/hardcode_library/fiction/PortedBooks.dm
index 0bc2ef9846..c52a4dfde9 100644
--- a/code/modules/library/hardcode_library/fiction/PortedBooks.dm
+++ b/code/modules/library/hardcode_library/fiction/PortedBooks.dm
@@ -46,39 +46,39 @@ Category: Fiction
- Once upon a time there was a cat, but he wasn�t the kind of cat you�re thinking of. He was from the land of the fairies and his fur was completely unexpected colors. For starters, his nose was violet. His eyes were indigo, his ears were sky blue, his front paws were green, his body was yellow, his back paws were orange, and his tail was red. So he was a mysterious cat of seven colors arranged just like a rainbow.
+ Once upon a time there was a cat, but he wasn't the kind of cat you're thinking of. He was from the land of the fairies and his fur was completely unexpected colors. For starters, his nose was violet. His eyes were indigo, his ears were sky blue, his front paws were green, his body was yellow, his back paws were orange, and his tail was red. So he was a mysterious cat of seven colors arranged just like a rainbow.
That rainbow cat went on all sorts of strange adventures. The following story is one of them.
One day while the rainbow cat was sunbathing, he was suddenly vexed by boredom. That is to say, peace reigned in the land of the fairies, so nothing much was going on.
- It�s not good for my health to spend all my time idling about as if I haven�t got a care in the world, he thought. Perhaps I should head out and go on an adventure.
+ It's not good for my health to spend all my time idling about as if I haven't got a care in the world, he thought. Perhaps I should head out and go on an adventure.
So he put a note up on his door: "Dear Mr. Post Man, I will be gone for two or three days, so if any packages or letters come, please throw them down the chimney."
Then he packed a small bag, hung it on his tail, and wobbled off to the border of the land of the fairies. When he arrived, a thick cloud billowed up.
- "Well, maybe I�ll drop by the cloud people�s place," he chattered to himself, climbing up the cloud embankment.
+ "Well, maybe I'll drop by the cloud people's place," he chattered to himself, climbing up the cloud embankment.
- The people who lived in cloud country were quite pleasant folks. They didn�t do any work, in particular, but just because they were lazy didn�t mean that they didn�t find the world interesting. They all lived in splendid palaces, of which the ones you couldn�t see from Earth were far more beautiful than the ones you could.
+ The people who lived in cloud country were quite pleasant folks. They didn't do any work, in particular, but just because they were lazy didn't mean that they didn't find the world interesting. They all lived in splendid palaces, of which the ones you couldn't see from Earth were far more beautiful than the ones you could.
- The people of the cloud country sometimes drove pearly gray carriages or went sailing in lightweight boats. They lived in the sky, so the only person they had to fear was Sir Thunder. It�s quite understandable given that he was quick to anger -- he would make the sky rumble with his stomping and go around knocking down their houses.
+ The people of the cloud country sometimes drove pearly gray carriages or went sailing in lightweight boats. They lived in the sky, so the only person they had to fear was Sir Thunder. It's quite understandable given that he was quick to anger -- he would make the sky rumble with his stomping and go around knocking down their houses.
The people of the cloud country were very happy to have the rainbow cat visit and greeted him politely.
- "You�ve come at a great time," they said. "We�re having a big celebration at the Wind God�s house. His eldest son, North Wind is taking the daughter of the King of the Magic Isle as his wife."
+ "You've come at a great time," they said. "We're having a big celebration at the Wind God's house. His eldest son, North Wind is taking the daughter of the King of the Magic Isle as his wife."
The rainbow cat, having thought just such a thing might happen, was prepared with various goods in the bag on his tail.
It was a truly magnificent wedding.
- Everyone came. Even Comet showed up. You wouldn�t see Comet unless it was a very fine banquet indeed.
+ Everyone came. Even Comet showed up. You wouldn't see Comet unless it was a very fine banquet indeed.
- And Aurora came in the most indescribably beautiful garments of light. Of course, the bride�s parents, the King of Magic Isle and his Pearl Oyster Queen, were in attendance.
+ And Aurora came in the most indescribably beautiful garments of light. Of course, the bride's parents, the King of Magic Isle and his Pearl Oyster Queen, were in attendance.
- A feast was served and everyone was in a lively mood, having interesting conversations and drinking, when all of the sudden a swallow flew in. According to him, the giant Sir Thunder was rushing towards them at a tremendous speed. Apparently, when Trade Wind was hurrying by, he had tripped over sleeping Sir Thunder�s toes and Sir Thunder was furious.
+ A feast was served and everyone was in a lively mood, having interesting conversations and drinking, when all of the sudden a swallow flew in. According to him, the giant Sir Thunder was rushing towards them at a tremendous speed. Apparently, when Trade Wind was hurrying by, he had tripped over sleeping Sir Thunder's toes and Sir Thunder was furious.
- "What�ll we do?" everyone wondered at once, their faces pale. "The celebration will be ruined!"
+ "What'll we do?" everyone wondered at once, their faces pale. "The celebration will be ruined!"
All the guests and the master of the house began to scatter in a panic.
@@ -88,9 +88,9 @@ Category: Fiction
A moment later, he came back out.
- "I�ll find a way to keep Sir Thunder from coming here," said the cat. "So please continue the celebration as you were. I�ll go to him and see what I can do."
+ "I'll find a way to keep Sir Thunder from coming here," said the cat. "So please continue the celebration as you were. I'll go to him and see what I can do."
- Everyone was surprised at how brave and composed the rainbow cat was, but it sounded like their celebration wouldn�t be intruded upon partway through, so they were happy to gather and see off the cat as he raced towards the far-off rumblings of Sir Thunder.
+ Everyone was surprised at how brave and composed the rainbow cat was, but it sounded like their celebration wouldn't be intruded upon partway through, so they were happy to gather and see off the cat as he raced towards the far-off rumblings of Sir Thunder.