OSDN Git Service
(root)
/
kcd
/
KCD.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bce833c
)
位置を指定して装備idをセットする関数を追加
author
masakih
<masakih@users.sourceforge.jp>
Tue, 14 Mar 2017 11:33:31 +0000
(20:33 +0900)
committer
masakih
<masakih@users.sourceforge.jp>
Tue, 14 Mar 2017 11:33:31 +0000
(20:33 +0900)
KCD/Ship.swift
patch
|
blob
|
history
diff --git
a/KCD/Ship.swift
b/KCD/Ship.swift
index
2e03112
..
28d90e1
100644
(file)
--- a/
KCD/Ship.swift
+++ b/
KCD/Ship.swift
@@
-296,6
+296,16
@@
extension Ship {
default: return 0
}
}
+ func setItem(_ id: Int, for slot: Int) {
+ switch slot {
+ case 0: slot_0 = id
+ case 1: slot_1 = id
+ case 2: slot_2 = id
+ case 3: slot_3 = id
+ case 4: slot_4 = id
+ default: fatalError("Ship: setItem out of bounds.")
+ }
+ }
private func slotItemMax(_ index: Int) -> Int {
switch index {
case 0: return master_ship.maxeq_0