Opened 8 years ago
Closed 7 years ago
#4240 closed enhancement (fixed)
[PATCH] No fish on random map Gear
Reported by: | elexis | Owned by: | Ágoston Sipos |
---|---|---|---|
Priority: | Nice to Have | Milestone: | Alpha 22 |
Component: | Maps | Keywords: | |
Cc: | agoston.sipos.95@… | Patch: |
Description (last modified by )
The map "Gear" has a lot of water, but no fish in it. Since there are these streams between players, adding fish would add some tension between players and incentivize attacks form the water.
File to update: gear.js
. Placing fish can be copied from maps like cycladic_archipelago.js
. But ensure fish won't be placed on land like #3746.
Attachments (5)
Change History (15)
comment:1 by , 7 years ago
Cc: | added |
---|---|
Description: | modified (diff) |
Owner: | set to |
by , 7 years ago
Attachment: | change4240.patch added |
---|
comment:2 by , 7 years ago
Keywords: | rfc added |
---|---|
Milestone: | Backlog → Work In Progress |
I created a first version to generate fish. You can see the minimap on the screenshot: the red squares in the water are the fishes (the ones on ground are animals, I checked it). Is it an appropriate number of fish, or should I change?
comment:3 by , 7 years ago
Keywords: | review added; rfc removed |
---|---|
Type: | defect → enhancement |
Looks good to me, only the warn (and unused variable a
) should be removed. Notice the huge scaleByMapSize(400,2000)
numbers are due to #4294.
comment:4 by , 7 years ago
Thanks, I didn't know it is a known bug, just increased the number of fish, until it really got placed (now it's said to be 934...). I will attach the cleaned code ASAP.
by , 7 years ago
Attachment: | change4240.2.patch added |
---|
by , 7 years ago
Attachment: | screenshot_fishes.2.png added |
---|
There is a proposed fix for #4294 . I tried my code with it and the result is on the screenshot. I think it's still an OK number of fish. (Can't be more because there is not enough space.)
comment:6 by , 7 years ago
The cleaned patch looks good. The distance between the fish spots should be increased a bit probably though, since fish should be a nice addition, not a replacement (didn't actually test the patch but judging from the screenshot).
The patch attached to #4294 does not fix the maps, only the library and whenever we change an interface, we also have to check how the users of it will be affected.
When applying the fix to the rm library of #4294, every second number in every js file in maps/random/
will have to be changed, otherwise all maps will look completely different.
In order to compare the results, everytime when writing the patch, polishing it, rebasing it (#4326), doing the first review, doing the second review, every map will have to be generated multiple times comparing the patched with the unpatched versions (5 devsteps * 5 tests/devstep * 73 maps/test * (patched + unpatched code) = 3650 map generations? Did only about 150 tests when doing the rms cleanup in FF), implying some indefinite suspension time of this ticket. Not my decision anyway since I can't commit this ticket because I already moved it to the review queue xP
comment:7 by , 7 years ago
Summary: | No fish on random map Gear → [PATCH] No fish on random map Gear |
---|
It looks like the var
(or more prefered let
) is missed here: group = new SimpleGroup([new SimpleObject(oFish, 1,1, 0,3)], true, clFood);
. No warnings, because there is var group;
in a loop (which isn't the same scope), but var
makes it globally described, so if we will replace var
to let
in future then we will get an error at this line.
by , 7 years ago
Attachment: | change4240.3.patch added |
---|
This is the code change with let group = ...
. Though I would say that - as this file uses let
at no other place - it might be confusing to use it only at this line.
comment:9 by , 7 years ago
Keywords: | simple review removed |
---|---|
Milestone: | Work In Progress → Alpha 22 |
- 8 -> 12, so that there's slightly less fish than proposed
- That
unPaintClass
call is needed indeed, since that paragraph paints the outer part of the inner central mountain - no space in empty lines
- space after comma
- Thanks for the patch
First proposal of change