more resources

This commit is contained in:
stryan 2022-05-28 18:19:02 -04:00
parent a386ae1872
commit 308097311d
4 changed files with 107 additions and 14 deletions

View File

@ -23,3 +23,51 @@ icon = "w"
[[converter.costs]] [[converter.costs]]
name = "brick" name = "brick"
value = 3 value = 3
[[converter]]
itemid = 9
name = "kiln"
displayName = "Brick kiln"
flavour = "Forge your own destiny"
source = "brick"
output = "metal"
rate = 10
icon = "k"
[[converter.costs]]
name = "brick"
value = 20
[[converter.costs]]
name = "tea"
value = 10
[[converter]]
itemid = 10
name = "veggieTrap"
displayName = "Baited Trap"
flavour = "If I like the smell of soup, who knows what else does?"
source = "soup"
output = "hide"
rate = 15
icon = "^"
[[converter.costs]]
name = "wood"
value = 5
[[converter.costs]]
name = "soup"
value = 1
[[converter]]
itemid = 11
name = "cutter"
displayName = "Cutting station"
flavour = "Good metal lets you take down the tallest tree"
source = ""
output = "wood"
rate = 0
icon = "C"
[[converter.costs]]
name = "metal"
value = 10
[[converter.costs]]
name = "brick"
value = 20

View File

@ -15,3 +15,35 @@ flavour = "Tea compressed into a brick shape"
icon = "b" icon = "b"
buildable = false buildable = false
[[resource]]
itemid = 5
name = "metal"
displayName = "Metal"
flavour = "Bricks transmuted into metal. Wait how did that happen?"
icon = "m"
buildable = false
[[resource]]
itemid = 6
name = "wood"
displayName = "Wood"
flavour = "A sturdy piece of wood"
icon = "T"
buildable = false
[[resource]]
itemid = 7
name = "soup"
displayName = "Vegetable Soup"
flavour = "Smells delicious"
icon = "u"
buildable = true
[[resource]]
itemid = 8
name = "hide"
displayName = "Leather Hide"
flavour = "Tanned hide, good for many uses"
icon = "_"
buildable = false

View File

@ -1,20 +1,29 @@
[[tech]] [[tech]]
techid = 1 techid = 1
name = "teaConverter" name = "teaTech"
displayName = "Tea Pulper" displayName = "Tea Manipulation"
unlocks = ["teaConverter"] unlocks = ["teaConverter","teaPlanter"]
[[tech.requires]] [[tech.requires]]
name = "tea" name = "tea"
value = 10 value = 10
[[tech]] [[tech]]
techid = 2 techid = 2
name = "teaPlanting" name = "basicHarvest"
displayName = "Tea Planters" displayName = "Harvesting"
unlocks = ["teaPlanter"] unlocks = ["cutter","kiln"]
[[tech.requires]]
name = "brick"
value = 15
[[tech.requires]] [[tech.requires]]
name = "tea" name = "tea"
value = 20 value = 30
[[tech]]
techid = 3
name = "basicHunt"
displayName = "Trapping"
unlocks = ["veggieTrap"]
[[tech.requires]] [[tech.requires]]
name = "teaConverter" name = "metal"
value = 1 value = 30

View File

@ -104,17 +104,21 @@ func (p *Player) research() {
func (p *Player) Announce(msg string) { func (p *Player) Announce(msg string) {
p.logIndex++ p.logIndex++
p.log = append(p.log, strconv.Itoa(p.logIndex)+" "+msg) p.log = append(p.log, strconv.Itoa(p.logIndex)+" "+msg)
if len(p.log) > 4 {
p.log = p.log[1:]
}
} }
//Log returns the player log //Log returns the player log
func (p *Player) Log() string { func (p *Player) Log() string {
res := "Log:\n" res := "Log:\n"
for i, v := range p.log { start := p.logIndex - 4
if start < 0 {
start = 0
}
end := p.logIndex
for i := start; i < end; i++ {
v := p.log[i]
res += v res += v
if i < 3 { if i != end {
res += "\n" res += "\n"
} }
} }