Skip to content

Commit

Permalink
Fluff Paper Language Setting (#18850)
Browse files Browse the repository at this point in the history
Fluff papers can now have a written language set, as the code for
translating things was copypasted in like 6 places.
  • Loading branch information
RustingWithYou authored Apr 18, 2024
1 parent a066384 commit ad4df4f
Show file tree
Hide file tree
Showing 11 changed files with 67 additions and 68 deletions.
13 changes: 13 additions & 0 deletions code/modules/paperwork/paper.dm
Original file line number Diff line number Diff line change
Expand Up @@ -765,6 +765,19 @@
/obj/item/paper/fluff
name = "fluff paper"
desc = "You aren't supposed to see this."
///The language to translate the paper into. Set to the name of the language.
var/language

/obj/item/paper/fluff/Initialize()
. = ..()
if(language)
var/datum/language/L = GLOB.all_languages[language]
if(istype(L) && L.written_style) //Don't want to try and write in Hivenet or something
var/key = L.key
var/languagetext = "\[lang=[key]]"
languagetext += "[info]\[/lang]"
info = parsepencode(languagetext)
update_icon()

// Used in the deck 3 cafe on the SCCV Horizon.
/obj/item/paper/fluff/microwave
Expand Down
41 changes: 41 additions & 0 deletions html/changelogs/RustingWithYou - paperlangs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# wip (For works in progress)
# tweak
# soundadd
# sounddel
# rscadd (general adding of nice things)
# rscdel (general deleting of nice things)
# imageadd
# imagedel
# maptweak
# spellcheck (typo fixes)
# experiment
# balance
# admin
# backend
# security
# refactor
#################################

# Your name.
author: RustingWithYou

# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True

# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
changes:
- rscadd: "Fluff papers can now be set to a written language."
8 changes: 1 addition & 7 deletions maps/away/ships/coc/coc_scarab/coc_scarab.dm
Original file line number Diff line number Diff line change
Expand Up @@ -206,13 +206,7 @@
name = "Burrow-class Freighter Engine Field Guide"
desc = "A paper."
info = "This is the field guide for the combustion engine of a Burrow-class freight vessel.<BR><BR>A combustion engine works by burning a fire in a combustion chamber, letting it burn out to 100% CO2, and then running the superheated gas through a vent, into a thermoelectric generator, and back into the chamber. This produces a lot of power, and will be required to keep the ship SMES topped up in the long term, but slowly cools down while in use. <BR><BR>GUIDE FOR USE:<BR><BR>Step 1: pressurise the cold loop with at least 2 canisters of hydrogen. The cold loop is the one that runs out into an external radiator array.<BR><BR>Step 2: configure the mixer to output a 60% oxygen and 40% hydrogen mix, and inject as much gas into the chamber as is available to you. <BR><BR>Step 3: cut injection, and ignite the mix. Do not panic when the glass makes a noise, that is normal and should stop after a short period.<BR><BR>Step 3: once the fire has fully burned out, enable combustion chamber injection at 700L/s and output at 1000kPa, so the gas begins to circulate through the thermoelectric generator. Lowering the output pressure will cause it to produce less power while causing the chamber to cool down slower, and raising the output pressure will cause the inverse. Do not generally raise the output above roughly 2000kPa, as this will cause it to cool down very quickly while generating more power than the engine SMES can actually intake, wasting heat. When you do not need power from it, disable the output and input to preserve the heat inside.<BR><BR>WARNING: Do not leave injection on after ignition, and if you think the glass might break, immediately cut fuel injection and lower the blast doors!"

/obj/item/paper/fluff/scarabengine/Initialize()
. = ..()
var/languagetext = "\[lang=3\]"
languagetext += "[info]\[/lang\]"
info = parsepencode(languagetext)
icon_state = "paper_words"
language = LANGUAGE_GUTTER

// Golden variant of the passblade, because it looks weird with the standard white
/obj/item/clothing/accessory/badge/passcard/scarab/gold
Expand Down
10 changes: 2 additions & 8 deletions maps/away/ships/tirakqi_smuggler/tirakqi_smuggler.dm
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@
color = "#c8bbfc"

// paper
/obj/item/paper/tirakqi_smuggler
/obj/item/paper/fluff/tirakqi_smuggler
name = "IMPORTANT!"
desc = "A handwritten note."
info = "\
Expand All @@ -275,10 +275,4 @@
<br>\
VERY IMPORTANT - If we do get boarded, burn this paper immediately, and stash all the important stuff in these caches. Better hope you remember all this. <br>\
"

/obj/item/paper/tirakqi_smuggler/Initialize()
. = ..()
var/languagetext = "\[lang=k\]"
languagetext += "[info]\[/lang\]"
info = parsepencode(languagetext)
icon_state = "paper_words"
language = LANGUAGE_SKRELLIAN
2 changes: 1 addition & 1 deletion maps/away/ships/tirakqi_smuggler/tirakqi_smuggler.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -3896,7 +3896,7 @@
pixel_x = -9;
dir = 8
},
/obj/item/paper/tirakqi_smuggler{
/obj/item/paper/fluff/tirakqi_smuggler{
pixel_x = 4;
pixel_y = 10
},
Expand Down
8 changes: 1 addition & 7 deletions maps/away/ships/unathi_pirate/hiskyn/unathi_pirate_hiskyn.dm
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,4 @@
/obj/item/paper/fluff/hiskyn
name = "KEEP OUT!"
info = "How many times I gotta warn you tailwags about going through a man's stash! Next time I'm putting a landmine in this damned thing!"

/obj/item/paper/fluff/hiskyn/Initialize()
. = ..()
var/languagetext = "\[lang=o\]"
languagetext += "[info]\[/lang\]"
info = parsepencode(languagetext)
icon_state = "paper_words"
language = LANGUAGE_UNATHI
9 changes: 1 addition & 8 deletions maps/random_ruins/exoplanets/haneunim/haneunim_crash.dm
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,4 @@
name = "scrawled message"
info = "They fucking sold us out. I told the LT not to make a deal with those 5-Cheung fucks, but did she listen? No, course not. Bastards are barely better than the corps. Fucking KASF were on us before we had time to blink. Blew out half the engines, was barely able to get us down here, but\
it'd take a miracle to get back up again. Either gonna wait for the Konyangers to come arrest us, or wait to starve. If anyone finds this, I didn't want to be a smuggler. Just saw what the corps were doing to Sol, figured I had to take a stand. Fat lot of good that did. Whoever's reading this, take my body back to Mars. Bury me at home, if there's anything left of it."


/obj/item/paper/fluff/haneunim_crash/Initialize()
. = ..()
var/languagetext = "\[lang=1\]"
languagetext += "[info]\[/lang\]"
info = parsepencode(languagetext)
icon_state = "scrap_bloodied"
language = LANGUAGE_SOL_COMMON
8 changes: 1 addition & 7 deletions maps/random_ruins/exoplanets/haneunim/haneunim_refugees.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,4 @@
name = "message"
desc = "A few words, scratched onto the back of a Go-Go-Gwok receipt."
info = "Remember us, who strived for freedom and failed. Remember us, upon Ascension."

/obj/item/paper/fluff/haneunim_refugees/Initialize()
. = ..()
var/languagetext = "\[lang=6]"
languagetext += "[info]\[/lang\]"
info = parsepencode(languagetext)
icon_state = "paper_words"
language = LANGUAGE_EAL
16 changes: 2 additions & 14 deletions maps/random_ruins/exoplanets/uueoaesa/kazhkz_crash.dm
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,7 @@
/obj/item/paper/fluff/kazhkz_crash_note
name = "scrawled message"
info = "The plan has failed. Izweski defences have shot down King Seryo's vessel, and the survivors of the assault have fled. I was able to distract the Hegemony's fighters with our own vessel for a time, but our engines are too damaged. I tried to bring us down on the surface here, in the hopes that the others would find us, but I fear it is too late. Most of my warriors perished, either in the battle or from the crash, and the others do not have long. Lord Kasz has guided the others in a retreat, and I pray to whatever spirits know this cursed place that they are safe and far from here. I will not join my ancestors in the earth of our homeland, and my bones may never be honored - but should my spirit rest here, may I guide my clan and that of my King to safety, and may I visit a terrible curse upon the tyrant S'kresti Izweski.<br><i>R'tiza Han'san<br>09/06/2438</i>"

/obj/item/paper/fluff/kazhkz_crash_note/Initialize()
. = ..()
var/languagetext = "\[lang=p\]"
languagetext += "[info]\[/lang\]"
info = parsepencode(languagetext)
icon_state = "scrap_bloodied"
language = LANGUAGE_AZAZIBA

/obj/item/paper/fluff/kazhkz_crash_plans
name = "assault plans"
Expand All @@ -108,10 +102,4 @@
Once you have secured the position, the remainder of our forces will move in and seize the Izweski stronghold. This war will end in one stroke, as the Hegemony will either capitulate or crumble into infighting. It is a deadly mission I entrust you with, yet your clan's lord tells me that there is no officer of his blood who would be better-suited.<br>\
Strike fear into their hearts and glory into your own, Uezsla Han'san.<br>\
<i>By the hand and will of King Seryo Kazhkz.</i>"

/obj/item/paper/fluff/kazhkz_crash_plans/Initialize()
. = ..()
var/languagetext = "\[lang=p\]"
languagetext += "[info]\[/lang\]"
info = parsepencode(languagetext)
icon_state = "paper_words"
language = LANGUAGE_AZAZIBA
11 changes: 3 additions & 8 deletions maps/random_ruins/exoplanets/uueoaesa/pid_crashed_shuttle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
if("black")
M.change_skin_color(28, 28, 28)

/obj/item/paper/fluff/pid_shuttle
language = LANGUAGE_UNATHI

/obj/item/paper/fluff/pid_shuttle/entry1
name = "pilot's log #1"
info = "Those Izharshan scum blew out our thrusters. We've been leaking CO2 halfway across the system, and our distress beacon's not responding. I'm going to put us down on Pid. It's a long shot, but I know those Vaurca have been setting something up there. Maybe we can contact them. It'll be a rough landing, though. Spirits guide us."
Expand All @@ -47,11 +50,3 @@
/obj/item/paper/fluff/pid_shuttle/entry5
name = "pilot's log #5"
info = "The others won't go without me, and they won't make it with me. Our air is running out too fast. Kssighriss, Vharek, Ikhla. When you find this, take the remaining supplies and go after the signal. Tell my clan that I chose to go to my death with honor, for all of our sakes. Three Heads guide you all, my friends."

/obj/item/paper/fluff/pid_shuttle/Initialize()
. = ..()
var/languagetext = "\[lang=o\]"
languagetext += info
languagetext += "\[/lang\]"
info = parsepencode(languagetext)
icon_state = "paper_words"
9 changes: 1 addition & 8 deletions maps/random_ruins/exoplanets/uueoaesa/sol_listening_post.dm
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
M.equip_to_slot_or_del(new /obj/item/melee/energy/sword/pirate(M), slot_belt)

/obj/item/paper/fluff/sol_uueoa
language = LANGUAGE_SOL_COMMON

/obj/item/paper/fluff/sol_uueoa/entry1
name = "SAMS Sentinel Entry #1"
Expand Down Expand Up @@ -90,14 +91,6 @@
name = "SAMS Sentinel Unsent Fax"
info = "words"

/obj/item/paper/fluff/sol_uueoa/Initialize()
. = ..()
var/languagetext = "\[lang=1\]"
languagetext += info
languagetext += "\[/lang\]"
info = parsepencode(languagetext)
icon_state = "paper_words"

/obj/item/paper/fluff/sol_uueoa/entry5/Initialize()
. = ..()
var/T = parsepencode(
Expand Down

0 comments on commit ad4df4f

Please sign in to comment.