mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 12:21:52 +09:00
more postal codes
This commit is contained in:
BIN
assets/graphics/fonts/code.tga
LFS
BIN
assets/graphics/fonts/code.tga
LFS
Binary file not shown.
Binary file not shown.
@@ -60,7 +60,7 @@ data class Post(
|
||||
}
|
||||
|
||||
data class PostContents(
|
||||
val type: String, // "text", "btex"
|
||||
val type: String, // "text"(read from LANG), "textcustom"(custom string), "btex"(always custom)
|
||||
val contentsRaw: String, // plain text for "text"; xml for "btex"
|
||||
val encryption: String = "none", // "none", "end2end"
|
||||
val contentsExtra: Any? = null,
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
package net.torvald.terrarum.modulebasegame.gameworld
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 2025-02-16.
|
||||
*/
|
||||
object PostAutogenContentFactory {
|
||||
|
||||
operator fun invoke(type: String, args: List<Any>?): PostContents {
|
||||
TODO()
|
||||
}
|
||||
|
||||
@PostContentAutogenFunction
|
||||
private fun moneyorder(args: List<Any>?): PostContents {
|
||||
val UUID_SENDER = args!![0].toString()
|
||||
val UUID_RECIPIENT = args!![1].toString()
|
||||
|
||||
val xml = """
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE btexdoc SYSTEM "btexdoc.dtd">
|
||||
<btexdoc cover="post" inner="post" papersize="post">
|
||||
<cover hue="210">
|
||||
<title><v fromgame="POSTAL_TITLE_MONEY_ORDER"/></title>
|
||||
<postsender>${UUID_SENDER}</postsender>
|
||||
<postrecipient>${UUID_RECIPIENT}</postrecipient>
|
||||
</cover>
|
||||
<manuscript>
|
||||
<v fromgame="POSTAL_CONTENT_MONEY_ORDER"/>
|
||||
</manuscript>
|
||||
</btexdoc>
|
||||
""".trimIndent()
|
||||
|
||||
return PostContents("btex", xml)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
annotation class PostContentAutogenFunction
|
||||
@@ -57,7 +57,7 @@ class UIRedeemCodeMachine : UICanvas(
|
||||
private val thisOffsetX = UIInventoryFull.INVENTORY_CELLS_OFFSET_X() + UIItemInventoryElemSimple.height + UIItemInventoryItemGrid.listGap - halfSlotOffset
|
||||
private val yEnd = -UIInventoryFull.YPOS_CORRECTION + (App.scr.height + UIInventoryFull.internalHeight).div(2).toFloat()
|
||||
|
||||
private val alphnums = (('0'..'9') + ('a'..'z') + ('A'..'Z')).map { "$it" }.toHashSet()
|
||||
private val alphnums = (('0'..'9') + ('a'..'z') + ('A'..'Z') + '@').map { "$it" }.toHashSet()
|
||||
|
||||
override fun inputStrobed(e: TerrarumKeyboardEvent) {
|
||||
super.inputStrobed(e)
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user