Synchronizing local changes after getting "Detached..." warning at Iceberg.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2021-06-20 13:32:57 -05:00
parent dbe6d3fc10
commit 611f94a7c6
27 changed files with 144 additions and 4 deletions

View File

@ -4,7 +4,7 @@ abilitiesAsWikiText
output := '' writeStream.
output
nextPutAll: '<ul style="list-style-type:none;">'; cr;
nextPutAll: (self abilitiesAsWikiTextFor: self currentAbilities);
nextPutAll: (self abilitiesAsWikiTextFor: self pendingAbilities);
nextPutAll: (self abilitiesAsWikiTextFor: self currentAbilities marked: '⬢');
nextPutAll: (self abilitiesAsWikiTextFor: self pendingAbilities marked: '⬡');
nextPutAll: '</ul>'.
^ output contents

View File

@ -0,0 +1,12 @@
utilities
abilitiesAsWikiTextFor: abilitiesSubset marked: unicodeSymbol
| aStream |
aStream := '' writeStream.
abilitiesSubset do: [:abi|
aStream
nextPutAll: ' <li> ', unicodeSymbol ; cr;
nextPutAll: ' ';
nextPutAll: abi; cr;
nextPutAll: ' </li>'; cr ].
^ aStream contents

View File

@ -1,3 +1,3 @@
accessing
asJsonTiddler
^ STON toStringPretty: self asTiddler asDictionary.
^ self asTiddler asJson

View File

@ -3,4 +3,5 @@ asTiddler
^ Tiddler new
title: self name;
tags: 'Starforged ' , self category;
text: self abilitiesAsWikiText
text: self abilitiesAsWikiText;
created: DateAndTime now asString.

View File

View File

@ -0,0 +1,7 @@
accessing
asTiddler
^ Tiddler new
title: self name;
tags: 'Starforged ' ,'[[', self category,']]';
text: self text;
created: DateAndTime now asString.

View File

@ -0,0 +1,3 @@
accessing
category
^ category

View File

@ -0,0 +1,8 @@
accessing
fromDictionary: aDictionary
| tempText |
tempText := (WikiText new content: (aDictionary at: 'Text')) convertMarkdownBold; convertMarkdownLinks.
category := aDictionary at: 'Category'.
name := aDictionary at: 'Name'.
text := tempText content.
(aDictionary includesKey: 'Progress Move') ifTrue: [ self progress: true ]

View File

@ -0,0 +1,3 @@
accessing
name
^ name

View File

@ -0,0 +1,4 @@
accessing
printOn: aStream
super printOn: aStream.
aStream nextPutAll: '( ', self name, ' ) '.

View File

@ -0,0 +1,3 @@
accessing
progress: aBoolean
progress := aBoolean

View File

@ -0,0 +1,3 @@
accessing
progress
^ progress

View File

@ -0,0 +1,3 @@
accessing
text
^ text

View File

@ -0,0 +1,16 @@
{
"commentStamp" : "",
"super" : "Object",
"category" : "RoloLudo",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [
"category",
"name",
"text",
"progress"
],
"name" : "SfMove",
"type" : "normal"
}

View File

@ -0,0 +1,7 @@
accessing
asTiddler
^ Tiddler new
title: self name;
tags: 'Starforged';
text: self intro, String lf, String lf, self optionsWikiTextTable;
created: DateAndTime now asString.

View File

@ -0,0 +1,15 @@
accessing
fromDictionary: aDictionary
| optionsTable |
name := aDictionary at: 'Name'.
optionsTable := aDictionary at: 'Table'.
optionsTable doWithIndex: [:opt :i | | key value prevKey |
(i = 1)
ifTrue: [key := 1 to: (opt at: 'Chance') asInteger]
ifFalse: [
prevKey := ((optionsTable at: (i-1)) at: 'Chance').
key := (prevKey asInteger + 1) to: (opt at: 'Chance') asInteger.
].
value := (opt at: 'Description') capitalized.
self options at: key put: value .
].

View File

@ -0,0 +1,3 @@
accessing
intro: longerText
intro := longerText

View File

@ -0,0 +1,3 @@
accessing
intro
^ intro

View File

@ -0,0 +1,3 @@
accessing
name: shortText
name := shortText

View File

@ -0,0 +1,3 @@
accessing
name
^ name

View File

@ -0,0 +1,3 @@
accessing
options: anOrderedDictionary
options := anOrderedDictionary

View File

@ -0,0 +1,3 @@
accessing
options
^ options ifNil: [ options := OrderedDictionary new ]

View File

@ -0,0 +1,10 @@
accessing
optionsWikiTextTable
| output |
output := '' writeStream.
self options keysAndValuesDo: [:k :v |
output
nextPutAll: '| ', k first asString, ' - ', k last asString, ' |';
nextPutAll: v, ' |'; cr
].
^ output contents

View File

@ -0,0 +1,5 @@
accessing
printOn: aStream
super printOn: aStream.
aStream
nextPutAll: '( ', self name, ' )'.

View File

@ -0,0 +1,7 @@
accessing
roll
| diceRoll |
diceRoll := 100 atRandom.
self options keysAndValuesDo: [:k :v |
(k includes: diceRoll) ifTrue: [ ^ v ]
]

View File

@ -0,0 +1,15 @@
{
"commentStamp" : "",
"super" : "Object",
"category" : "RoloLudo-RoloLudo",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [
"name",
"intro",
"options"
],
"name" : "SfOracle",
"type" : "normal"
}