Skip to content

Commit

Permalink
Minor fixes of design, sounds deletion (ldtteam#2683)
Browse files Browse the repository at this point in the history
Mostly townhall gui adjustments
Removed unused sounds + builder saturationHigh
  • Loading branch information
Nightenom authored and Raycoms committed Jul 23, 2018
1 parent edc4d96 commit b53af79
Show file tree
Hide file tree
Showing 75 changed files with 119 additions and 140 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public class CompatibilityManager implements ICompatibilityManager
*/
public CompatibilityManager()
{
discover();

}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,11 @@ public final class WindowConstants
*/
public static final String LIST_PERM_EVENT = "permeventslist";

/**
* Id of the total citizens label in the GUI.
*/
public static final String TOTAL_CITIZENS_LABEL = "totalCitizens";

/**
* Id of the citizens list in the GUI.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -595,14 +595,15 @@ private void createAndSetStatistics()
final String numberOfCitizens =
LanguageHandler.format("com.minecolonies.coremod.gui.townHall.population.totalCitizens",
citizensSize, townHall.getColony().getMaxCitizens());
findPaneOfTypeByID(TOTAL_CITIZENS_LABEL, Label.class).setLabelText(numberOfCitizens);

final Integer unemployed = jobCountMap.get("") == null ? 0 : jobCountMap.get("");
final String numberOfUnemployed = LanguageHandler.format(
"com.minecolonies.coremod.gui.townHall.population.unemployed", unemployed);
jobCountMap.remove("");

final Integer maxJobs = jobCountMap.size();
final Integer preJobsHeaders = 3;
final Integer preJobsHeaders = 1;

list.setDataProvider(new ScrollingList.DataProvider()
{
Expand All @@ -621,12 +622,8 @@ public void updateElement(final int index, @NotNull final Pane rowPane)
}

final Label label = rowPane.findPaneOfTypeByID(CITIZENS_AMOUNT_LABEL, Label.class);
// preJobsHeaders = number of all citizens + empty row + number of all unemployed citizens
// preJobsHeaders = number of all unemployed citizens
if (index == 0)
{
label.setLabelText(numberOfCitizens);
}
if (index == 2)
{
label.setLabelText(numberOfUnemployed);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ public final class ColonyManager

private ColonyManager()
{
compatibilityManager.discover();
//Hides default constructor.
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ public static final class Female
public static final SoundEvent badWeather = ModSoundEvents.getSoundID("mob.builder.female.badWeather");
public static final SoundEvent saturationVeryLow = ModSoundEvents.getSoundID("mob.builder.female.saturationVeryLow");
public static final SoundEvent saturationLow = ModSoundEvents.getSoundID("mob.builder.female.saturationLow");
public static final SoundEvent saturationHigh = ModSoundEvents.getSoundID("mob.builder.female.saturationHigh");
public static final SoundEvent greeting = ModSoundEvents.getSoundID("mob.builder.female.greeting");
public static final SoundEvent farewell = ModSoundEvents.getSoundID("mob.builder.female.farewell");
public static final SoundEvent interaction = ModSoundEvents.getSoundID("mob.builder.female.interaction");
Expand Down Expand Up @@ -160,7 +159,7 @@ else if (saturation < AVERAGE_SATURATION)
}
else
{
saturationFeedback = Female.saturationHigh;
return;
}
SoundUtils.playSoundAtCitizenWithChance(worldIn, position, saturationFeedback, getBasicSoundChance());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ public static void registerSounds(final IForgeRegistry<SoundEvent> registry)
registry.register(BakerSounds.Female.interaction);

registry.register(BuilderSounds.Female.hostile);
registry.register(BuilderSounds.Female.saturationHigh);
registry.register(BuilderSounds.Female.saturationLow);
registry.register(BuilderSounds.Female.saturationVeryLow);
registry.register(BuilderSounds.Female.badWeather);
Expand Down
12 changes: 5 additions & 7 deletions src/main/resources/assets/minecolonies/gui/windowhutminer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,19 @@

<view id="levelActions" size="100% 100%">
<layout source="minecolonies:gui/windowbase.xml"/>
<label size="100% 11" pos="0 10"
label="$(com.minecolonies.coremod.gui.workerHuts.minerNodeList)" color="black"
textalign="BOTTOM_MIDDLE"/>
<list id="levels" size="78% 85%" pos="30 30">
<box size="100% 30" linewidth="2">
<label size="100% 11" pos="0 14" textalign="MIDDLE"
label="$(com.minecolonies.coremod.gui.workerHuts.minerNodeList):" color="black"/>
<list id="levels" size="161 198" pos="15 30">
<box size="100% 28" linewidth="2">
<label id="lvl" size="100 12" pos="5 2" textalign="MIDDLE_LEFT" color="black"/>
<button id="changeToLevel" size="100 12" pos="5 2" align="TOP_RIGHT"
<button id="changeToLevel" size="100 12" pos="35 2"
label="$(com.minecolonies.coremod.gui.workerHuts.minerMineNode)"/>
<label id="nONodes" size="50 12" pos="35 16" textalign="MIDDLE_LEFT" color="black"/>
</box>
</list>

</view>


</switch>
<buttonimage id="prevPage" align="TOP_LEFT" size="26 8" pos="12 15" source="minecolonies:textures/gui/builderhut/builder_sketch_arrow_left_c.png"/>
<buttonimage id="nextPage" align="TOP_RIGHT" size="26 8" pos="12 15" source="minecolonies:textures/gui/builderhut/builder_sketch_arrow_right_c.png"/>
Expand Down
Loading

0 comments on commit b53af79

Please sign in to comment.