Comments (6)
@tuomount I see you have already started offloading SpeechLine
s to JSON. You seem to use my old design I posted in #666, where file is treated as object.
I have to stop you there. Don't do that, for reasons mentioned above. I have tried it already and it is a bad direction.
I don't have much time lately, but I will look into the SpeechSet
implementation when possible.
After all, I have functional one already 😄. It just has some design flaws and cannot handle the "ID problem".
But I would appreciate if you could fix that dichotomy between "behavior" and "text ID" in SpeechFactory
.
Adding SpeechType
like "ACKNOWLEDGE_WAR" might be sufficient. 👍
(and then slightly refactoring SpeechFactory
)
Then, I will be able to put SpeechSets together much faster and in much better form.
I don't want to convert data back and forth, when I can prevent the situation by "doing it well from the start". 😐
from open-realms-of-stars.
Reason why I did the JSON first, I wanted to try it if it could work out, but then I noticed reading speeches in that format would not be easy that DataLoader. It would need to have extra class something like SpeechSet.
I can add add the ACKNOWLEDGE_WAR SpeechType.
from open-realms-of-stars.
but then I noticed reading speeches in that format would not be easy that DataLoader
Exactly, DataLoader
is designed to work with objects. My design from #666 predates DataLoader
... and it was done with jackson-jr
😄 . Plus there are issues with further extensibility of SpeechSet
not-yet-defined class.
I can add add the ACKNOWLEDGE_WAR SpeechType.
👍
It is not possible to do this without it anyway. Or some other solution to the ID issue. 🙂
from open-realms-of-stars.
I have checked-out the changes, but the issue with "one ID for two texts" is still not fixed. TBH, I have no idea why the changes with ACKNOWLEDGE_WARE
were done 😄, but having 2 IDs point to one text is completely OK. Might be used for flavor texts even.
However, the true issue is SpeechFactory.createAgreeWithWarLine(SpaceRace)
method, as it's call is not paired with any "ID", but rather called ad-hoc in code. Also, it returns "SpeechType.AGREE". If it will be addressed by "ID" (SpeechType), the factory should return that SpeechType and code should accept it.
One more issue, in the same spirit of "I request A, I get B" is with Mechions and Synthdroids, which "alter" output of SpeechFactory.createDeclineAngerLine()
from SpeechType.DECLINE_ANGER
to SpeechType.DECLINE
. This is unexpected behavior, and it violates several assumptions about SpeechFactory. And, which is the most problematic part, it causes SpeechFactory
define behavior. This is another blocker to dehardcoding SpeechLines and should be remedied as well.
from open-realms-of-stars.
Okay, I did not first get what you meant by ACKNOWLEDGE_WAR
. But yes, now createAgreeWithWarLine is called as any other speechline and has it's own type, which is ACKNOWLEDGE_WAR
.
Removed also special thing that robots could not get angry.
from open-realms-of-stars.
Seems to work, closing.
from open-realms-of-stars.
Related Issues (20)
- Water level/type on planet HOT 1
- Proper design for Space Pirates and "pseudo realms" HOT 2
- Planet radiation type HOT 1
- Galactic Event system rewrite HOT 3
- Armed freighters mechanic design HOT 7
- SpaceRace enum dehardcoding HOT 5
- Space Race Editor HOT 2
- New space trait: Plantlife form
- Redesign realm setup view HOT 1
- Refactor Government into class and read data from JSON HOT 1
- Zero gravity beings value planet wrongly HOT 1
- Possibility to ask third party planet locations
- Government Editor
- Check and improve tutorial
- If one the alliance party makes peace with third party peace should both alliance parties
- Flathub package HOT 1
- Doomed starting scenarios should be visible in background story.
- Ready made space race for plant life
- BUG: Realm color does not change in realm setup view in dropdown menu
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from open-realms-of-stars.