This commit is contained in:
2025-03-29 13:48:24 +01:00
parent 45ed369a78
commit 79330ef8f5
20 changed files with 538 additions and 52 deletions

View File

@@ -3,7 +3,6 @@ module encoder
import time
import encoding.binary as bin
import freeflowuniverse.herolib.data.ourtime
import freeflowuniverse.herolib.data.currency
import freeflowuniverse.herolib.data.gid
const kb = 1024
@@ -110,13 +109,6 @@ pub fn (mut b Encoder) add_f64(data f64) {
b.add_u64(bits)
}
// adds currency.Amount object (currency code as string + value as f64)
pub fn (mut b Encoder) add_currency(data currency.Amount) {
// Add currency code as string
b.add_string(data.currency.name)
b.add_f64(data.val)
}
// adds gid as a string
pub fn (mut b Encoder) add_gid(data gid.GID) {
b.add_string(data.str())