Review of haveResources
-
@wc_sumpton said in Review of haveResources:
@cernel said in Review of haveResources:
For consistency, I would have it called "resources" instead of "haveResources". In none of the similar cases, we have anything starting from "have". For example, we have the condition "techs" not "haveTechs". However, if "resources" alone may be confusing, it can be "resourcesPossession" (which is practically an other way to say "have resources")
"resources" is already used, both in territoryAttachment and triggerAttachment. "resourcesPossession" would be ok, but as you stated, it's just another way of saying "haveResources". As I have not yet submitted the PR, changing the name would be quite easy.
This is one more reason for having "resources" instead of "haveResources" (I mean the fact that the trigger option is
<option name="resource" value="PUs"/> <option name="resourceCount" value="6"/>instead of
<option name="addResource" value="PUs"/> <option name="resourceCount" value="6"/>.)
(I don't understand why having a "resourceCount" as a separate option instead of the given number being the count for the primary option.)
There is no problem having a conditions option with the same name as a triggers option, is there? Actually, the triggers option is "resource" (not "resources"). Maybe the conditions option should be "resource" too for consistency.
To be clear, my primary suggestion was to call it just "resources". "resourcesPossession" was the didascalic alternative.
Thinking again about it, I guess it should better be named "resource" instead of "resources".
-
@cernel I would prefer hasResources for clarity.
-
Thank you!
Cheers...
@cernel said in Review of haveResources:
(I don't understand why having a "resourceCount" as a separate option instead of the given number being the count for the primary option.)
Many have complained about this. I have "changeResources" which will look at this. (Yes, I have many modifications done.)
@cernel said in Review of haveResources:
There is no problem having a conditions option with the same name as a triggers option, is there? Actually, the triggers option is "resource" (not "resources"). Maybe the conditions option should be "resource" too for consistency.
Because this adds different resources, and can use the "players" option, I think "resources" with an "s" is still better. Conditions/triggers/objectives at times use the same "library" of files, so I try to stay away names that have already been used.
@cernel said in Review of haveResources:
To be clear, my primary suggestion was to call it just "resources". "resourcesPossession" was the didascalic alternative.
Understood, again thank you for your time and suggestions.
Cheers...
-
@wc_sumpton
My 2p I prefer hasResource (no s) -
@thedog said in Review of haveResources:
@wc_sumpton
My 2p I prefer hasResource (no s)Thank you!
Cheers...
-
I would prefer "hasResources" actually since "hasResource" could also mean just one of a type. If you have one Iron you would have that resource, but "hasResources" would be clearer as you are checking how many resources of a type a player has.
-
At the present time I have change it to "hasResource"
The question the trigger is asking is "Has this player have enough oil/fuel/PUs (not oils/fuels/PUss resource) to do something?".
Cheers...
-
Hmm, you have convinced me. You can see it as "has(enough of that)Resource". So go with "hasResource". It's also shorter lol

-
PR has been submitted for hasResource
Cheers...
-
DOA
PR has been pulled.
Cheers...
-
-
@beelee said in Review of haveResources:
who or what is DOA
"Dead On Arrival"
@beelee said in Review of haveResources:
pulled as in merged ?
No sorry.
Cheers...
-
oh yea

bummer
kinda doesn't make one want to help Be nice if someone would try and help with your work instead of just saying no.
idk maybe they do and I'm just reading it wrong.
You're good at what you do and more devs are always wanted.
idk not enough time for them to teach I guess

Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login