-
Notifications
You must be signed in to change notification settings - Fork 1
/
new_script.gd
116 lines (88 loc) · 3.07 KB
/
new_script.gd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
extends Node3D
var player : Character
func _init():
OS.low_processor_usage_mode = true
player = Character.new().fromShortName('BSECHA')
# Persistence.saveDTO(LocationDTO.new())
func _ready() -> void:
print('TEST START')
player.name = 'Player'
player.shortName = 'PLAYER'
player.currentHp = 25
player.getStat(Enums.CharacterAbility.CONSTITUTION).score = 15
player.type = Enums.CharacterType.PC
player.verdictActive = false
Signals.playerArrivedLocation.connect(printEntering)
Signals.playerChangedRoom.connect(printTraveling)
# TEST
var armor = Armor.new().fromShortName("BSEARM")
armor.maxIntegrity = 10
armor.currentIntegrity = 10
Signals.emit_signal("characterEquipedArmor", player, armor)
var weapon = Weapon.new().fromShortName("BSEWPN")
var weapon2 = Weapon.new().fromShortName("BSEWPN")
var weapon3 = Weapon.new().fromShortName("BSEWPN")
var weapon4 = Weapon.new().fromShortName("BSEWPN")
var weapon5 = Weapon.new().fromShortName("BSEWPN")
weapon.name = "Test Weapon1"
weapon.shortName = "TSTWPN1"
weapon.damage = 1
weapon.modifierRollType = Enums.DiceRollType.BEST
weapon.modifierDice = Enums.DiceType.D4
weapon2.name = "Test Weapon2"
weapon2.shortName = "TSTWPN2"
weapon2.damage = 2
weapon3.name = "Test Weapon3"
weapon3.shortName = "TSTWPN3"
weapon3.damage = 3
weapon4.name = "Test Weapon4"
weapon4.shortName = "TSTWPN4"
weapon4.damage = 4
weapon5.name = "Test Weapon5"
weapon5.shortName = "TSTWPN5"
weapon5.damage = 5
Signals.emit_signal("characterReceivedWeapon", player, weapon)
Signals.emit_signal("characterReceivedWeapon", player, weapon2)
Signals.emit_signal("characterReceivedWeapon", player, weapon3)
Signals.emit_signal("characterReceivedWeapon", player, weapon4)
Signals.emit_signal("characterReceivedWeapon", player, weapon5)
var item1 = Item.new().fromShortName("BSEITM")
var item2 = Item.new().fromShortName("BSEITM")
var item3 = Item.new().fromShortName("BSEITM")
var item4 = Item.new().fromShortName("BSEITM")
var item5 = Item.new().fromShortName("BSEITM")
item1.shortName = "ITM1"
item2.shortName = "ITM2"
item3.shortName = "ITM3"
item4.shortName = "ITM4"
item5.shortName = "ITM5"
item1.name = "ITM1"
item2.name = "ITM2"
item3.name = "ITM3"
item4.name = "ITM4"
item5.name = "ITM5"
Signals.emit_signal("characterReceivedItem", player, item1)
Signals.emit_signal("characterReceivedItem", player, item2)
Signals.emit_signal("characterReceivedItem", player, item3)
Signals.emit_signal("characterReceivedItem", player, item4)
Signals.emit_signal("characterReceivedItem", player, item5)
GameManager.player = player
LocationManager.changeLocation(GameManager.player, 'BSELOC', 0, Enums.Direction.EAST)
func _process(_delta) -> void:
pass
func printEntering(location : Location) -> void:
print('Entering location \'' + location.name + '\'')
func printTraveling(direction : int) -> void:
var directionStr
match direction:
0:
directionStr = 'north'
1:
directionStr = 'east'
2:
directionStr = 'south'
3:
directionStr = 'west'
_:
directionStr = ''
print('moving to the ' + directionStr)