Starting main character creation.
This commit is contained in:
parent
981712c32b
commit
7c454b41c2
16
RoloLudo.package/FirelightsCharacter.class/properties.json
Normal file
16
RoloLudo.package/FirelightsCharacter.class/properties.json
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"commentStamp" : "",
|
||||||
|
"super" : "Object",
|
||||||
|
"category" : "RoloLudo",
|
||||||
|
"classinstvars" : [ ],
|
||||||
|
"pools" : [ ],
|
||||||
|
"classvars" : [ ],
|
||||||
|
"instvars" : [
|
||||||
|
"name",
|
||||||
|
"pronouns",
|
||||||
|
"relics",
|
||||||
|
"approaches"
|
||||||
|
],
|
||||||
|
"name" : "FirelightsCharacter",
|
||||||
|
"type" : "normal"
|
||||||
|
}
|
@ -0,0 +1,3 @@
|
|||||||
|
accessing
|
||||||
|
characters
|
||||||
|
^ characters ifNil: [ characters := OrderedCollection new]
|
@ -0,0 +1,3 @@
|
|||||||
|
accessing
|
||||||
|
namesOracle
|
||||||
|
^ SfOracle new
|
@ -0,0 +1,4 @@
|
|||||||
|
accessing
|
||||||
|
newMainCharacter
|
||||||
|
self characters ifEmpty: [ self characters add: FirelightsCharacter new].
|
||||||
|
^ self characters first.
|
@ -10,7 +10,8 @@
|
|||||||
"dice",
|
"dice",
|
||||||
"wordMap",
|
"wordMap",
|
||||||
"oracles",
|
"oracles",
|
||||||
"wiki"
|
"wiki",
|
||||||
|
"characters"
|
||||||
],
|
],
|
||||||
"name" : "FirelightsGame",
|
"name" : "FirelightsGame",
|
||||||
"type" : "normal"
|
"type" : "normal"
|
||||||
|
@ -0,0 +1,3 @@
|
|||||||
|
accessing
|
||||||
|
fromRepository
|
||||||
|
^ STONJSON fromString: 'https://raw.githubusercontent.com/rsek/dataforged/main/src/starforged/oracles.json' asUrl retrieveContents
|
@ -0,0 +1,14 @@
|
|||||||
|
accessing
|
||||||
|
loadCharacterNames
|
||||||
|
| dataSlice response |
|
||||||
|
dataSlice := (self fromRepository second at: 'Oracles') sixth.
|
||||||
|
self name: (dataSlice at: 'Display' at: 'Title').
|
||||||
|
self intro: (dataSlice at: 'Description').
|
||||||
|
response := OrderedDictionary new.
|
||||||
|
#('givenNames' 'callsigns' 'familyNames') doWithIndex: [ :key :i |
|
||||||
|
response
|
||||||
|
at: key
|
||||||
|
put: ((((dataSlice at: 'Oracles') at: i) at: 'Table') collect: [ :each | each at: 'Result' ]).
|
||||||
|
].
|
||||||
|
self options: response.
|
||||||
|
^ self
|
@ -1,5 +1,7 @@
|
|||||||
accessing
|
accessing
|
||||||
printOn: aStream
|
printOn: aStream
|
||||||
|
| currentName |
|
||||||
|
currentName := self name ifNil: ['Unammed'].
|
||||||
super printOn: aStream.
|
super printOn: aStream.
|
||||||
aStream
|
aStream
|
||||||
nextPutAll: '( ', self name, ' )'.
|
nextPutAll: '( ', currentName, ' )'.
|
Loading…
Reference in New Issue
Block a user