citylimits/scripts/command_handler.gd

29 lines
517 B
GDScript3
Raw Normal View History

2021-05-20 21:25:41 -04:00
extends Node
enum {
ARG_INT,
ARG_STRING,
ARG_BOOL,
ARG_FLOAT
}
const valid_commands = [
["money", [ARG_STRING] ],
["whereyoufrom", [ARG_STRING] ],
["whatyearisit", [ARG_STRING] ]
2021-05-20 21:25:41 -04:00
]
func _budget_print(value: int):
return "Budget increased to " + str(value)
func money(value):
SimData.budget += int(value)
2021-05-20 21:25:41 -04:00
func whereyoufrom(value):
SimData.city_name = str(value)
return "Changed city name to: " + str(value)
func whatyearisit(value):
SimData.year = int(value)
return "Change year to: " + str(value)