Skip to content

Commit

Permalink
java v1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
FlinTyX committed Feb 11, 2023
1 parent 4450eba commit 0e16218
Show file tree
Hide file tree
Showing 95 changed files with 1,086 additions and 190 deletions.
37 changes: 27 additions & 10 deletions assets/bundles/bundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ block.animalia-bioreactor.name = Bioreactor
block.animalia-bioreactor.description = Transforms the substances contained in Spores into a Solution rich in chemicals.
block.animalia-carbonizer.name = Carbonizer
block.animalia-carbonizer.description = Carbonizes a filament of organic material, transforming into a carbon fiber filament.
block.animalia-eggshell-printer.name = Egshell Printer
block.animalia-eggshell-printer.name = Eggshell Printer
block.animalia-eggshell-printer.description = A kind of 3D Printer that crafts eggshells.
block.animalia-genetic-reconstructor.name = Genetic Reconstructor
block.animalia-genetic-reconstructor.description = Does genetic synthesis using advanced engineering, modifies and creates genes to make a specific Egg.
Expand Down Expand Up @@ -45,22 +45,29 @@ block.animalia-incubator.description = Uses power to keep the egg warm until it
block.animalia-cataclysm-detector.name = Cataclysm Detector
block.animalia-cataclysm-detector.description = Returns the latest cataclysm occurring name through [accent]@config[] sensor.

## Environment
block.animalia-tree.name = Tree
block.animalia-tree.description = Do not destroy, it may have animals on it.

# Items
## General
item.animalia-carbon-fiber.name = Carbon Fiber
item.animalia-carbon-fiber.description =
item.animalia-chlorophyll.name = Chlorophyll
item.animalia-chlorophyll.description = A green organic compound capable of absorbing light to convert it into Chemical Energy.

## Eggs
item.animalia-eggshell.name = Eggshell
item.animalia-eggshell.description = Only an eggshell. Used in the craft of every Egg.
item.animalia-assault-frog-egg.name = Assault Frog Egg
item.animalia-assault-frog-egg.description = A kind of synthetic egg that doesnt follow the way that some animals are born, but uses advanced technology to simulate the environment where the animal best evolves.
item.animalia-assault-frog-egg.description = A kind of synthetic egg that doesn't follow the way that some animals are born, but uses advanced technology to simulate the environment where the animal best evolves.
item.animalia-exotic-frog-egg.name = Exotic Frog Egg
item.animalia-exotic-frog-egg.description = A kind of synthetic egg that doesnt follow the way that some animals are born, but uses advanced technology to simulate the environment where the animal best evolves.
item.animalia-exotic-frog-egg.description = A kind of synthetic egg that doesn't follow the way that some animals are born, but uses advanced technology to simulate the environment where the animal best evolves.
item.animalia-frog-egg.name = Frog Egg
item.animalia-frog-egg.description = A kind of synthetic egg that doesnt follow the way that some animals are born, but uses advanced technology to simulate the environment where the animal best evolves.
item.animalia-frog-egg.description = A kind of synthetic egg that doesn't follow the way that some animals are born, but uses advanced technology to simulate the environment where the animal best evolves.
item.animalia-leopard-frog-egg.name = Leopard Frog Egg
item.animalia-leopard-frog-egg.description = A kind of synthetic egg that doesn't follow the way that some animals are born, but uses advanced technology to simulate the environment where the animal best evolves.
item.animalia-gliding-frog.name = Gliding Frog Egg
item.animalia-gliding-frog.description = A kind of synthetic egg that doesn't follow the way that some animals are born, but uses advanced technology to simulate the environment where the animal best evolves.

# Liquids
liquid.animalia-nutritive-solution.name = Nutritive Solution
Expand All @@ -73,8 +80,13 @@ unit.animalia-assault-frog.description = An offensive frog type. Has a small min
unit.animalia-exotic-frog.name = Exotic Frog
unit.animalia-exotic-frog.description = A poisonous frog, applies poison to every ground units in a certain range, including allies. Can kill daggers and maces easily.
unit.animalia-frog.name = Frog
unit.animalia-frog.description = It jumps high. There's a chance of a frog spawn on a coast, you are lucky, the frog can be friendly. If so, you can control it.\nBut they dont like to be controlled...
unit.animalia-frog.details = Froge
unit.animalia-frog.description = It jumps high. There's a chance of a frog spawn on a coast, you are lucky, the frog can be friendly. If so, you can control it.\nBut they don't like to be controlled...
unit.animalia-leopard-frog.name = Leopard Frog
unit.animalia-leopard-frog.description = A little faster frog...
unit.animalia-gliding-frog.name = Gliding Frog
unit.animalia-gliding-frog.description = An arboreal frog type. It's always looking for a tree.
unit.animalia-phroge.name = Phroge
unit.animalia-phroge.description = A very rare frog...

# Weathers
weather.animalia-warning = A {0}[] is being formed now
Expand All @@ -90,15 +102,20 @@ consequence.animalia-thunder.name = Thunderstorm
consequence.animalia-fire.name = Fire

# Status Effects
status.animalia-dart-poisoned.name = Dart Poisoned
status.animalia-poisoned.name = Dart Poisoned

# Content
content.weather.name = Weathers

# Tech Tree
techtree.animalia = Animalia

# UI
setting.crashreport.name = Show Crash Report Dialog
setting.reportcrash.name = Show Crash Report Dialog
setting.entryweathers.name = Animalia Weathers on Custom Maps

link.animalia.description = See more about Animalia!
link.report.description = Create a new issue in FlinTyX/Animalia

dialog.animalia-report.name = Crash Report
dialog.animalia-report.description = Looks like you are having issues with Animalia...\nWould you like to report it?
Expand All @@ -119,7 +136,7 @@ reward.animalia-block = Block Reward

stat.consequence = Consequences
stat.drain = Drain
stat.draincapacity = Drain Capaticy
stat.draincapacity = Drain Capacity
stat.hatch = Hatch Time
stat.poisonous = Poisonous
stat.spawns = Spawns At
Expand Down
Binary file added assets/sounds/ribbit1.mp3
Binary file not shown.
Binary file added assets/sounds/ribbit2.mp3
Binary file not shown.
Binary file modified assets/sprites/blocks/crafting/bioreactor-bottom.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/sprites/blocks/crafting/bioreactor-liquid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/sprites/blocks/crafting/bioreactor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/sprites/blocks/crafting/carbonizer-bottom.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/sprites/blocks/crafting/carbonizer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/sprites/blocks/crafting/eggshell-printer-top.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/sprites/blocks/crafting/eggshell-printer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/sprites/blocks/crafting/genetic-reconstructor-bottom.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/sprites/blocks/crafting/genetic-reconstructor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/sprites/blocks/environment/tree-shadow-0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/sprites/blocks/production/chlorophyll-synthesizer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/sprites/blocks/turrets/apoptosis.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/sprites/blocks/turrets/lysis.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/sprites/blocks/turrets/necrosis.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/sprites/blocks/units/incubator-out.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/sprites/blocks/units/incubator-top.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/sprites/blocks/units/incubator.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/sprites/effects/note-0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/sprites/effects/note-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/sprites/items/gliding-frog-egg-up.png
Binary file added assets/sprites/items/gliding-frog-egg.png
Binary file added assets/sprites/items/leopard-frog-egg-up.png
Binary file added assets/sprites/items/leopard-frog-egg.png
File renamed without changes
Binary file modified assets/sprites/units/frogs/assault-frog-full.png
Binary file modified assets/sprites/units/frogs/assault-frog-jump.png
Binary file modified assets/sprites/units/frogs/assault-frog-swim.png
Binary file modified assets/sprites/units/frogs/assault-frog.png
Binary file modified assets/sprites/units/frogs/exotic-frog-full.png
Binary file modified assets/sprites/units/frogs/exotic-frog.png
Binary file modified assets/sprites/units/frogs/frog-full.png
Binary file modified assets/sprites/units/frogs/frog-jump.png
Binary file modified assets/sprites/units/frogs/frog-swim.png
Binary file modified assets/sprites/units/frogs/frog.png
Binary file modified assets/sprites/units/frogs/gliding-frog-full.png
Binary file modified assets/sprites/units/frogs/gliding-frog-jump-outline.png
Binary file modified assets/sprites/units/frogs/gliding-frog-jump.png
Binary file modified assets/sprites/units/frogs/gliding-frog-outline.png
Binary file modified assets/sprites/units/frogs/gliding-frog.png
Binary file added assets/sprites/units/frogs/leopard-frog-full.png
Binary file added assets/sprites/units/frogs/leopard-frog-jump.png
Binary file added assets/sprites/units/frogs/leopard-frog-outline.png
Binary file added assets/sprites/units/frogs/leopard-frog-swim.png
Binary file added assets/sprites/units/frogs/leopard-frog.png
Binary file added assets/sprites/units/frogs/phroge-full.png
Binary file added assets/sprites/units/frogs/phroge-jump-outline.png
Binary file added assets/sprites/units/frogs/phroge-jump.png
Binary file added assets/sprites/units/frogs/phroge-outline.png
Binary file added assets/sprites/units/frogs/phroge-swim-outline.png
Binary file added assets/sprites/units/frogs/phroge-swim.png
Binary file added assets/sprites/units/frogs/phroge.png
6 changes: 3 additions & 3 deletions mod.hjson
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: animalia
displayName: "Animalia"
description: "A mod that contains unique biological forms, blocks, machines and mechanics to discover the world of the Animalia Kingdom!"
description: "A fun mod that contains Animals, Plants, Natural disasters and a lot more!"
author: "Flin"
java: true
main: "animalia.Animalia"
repo: FlinTyx/Animalia
repo: FlinTyX/Animalia
keepOutlines: true
version: "java 1.0"
minGameVersion: 140
minGameVersion: 141
25 changes: 14 additions & 11 deletions src/animalia/Animalia.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@

import static mindustry.Vars.*;

import animalia.content.AniBlocks;
import animalia.content.AniStatuses;
import animalia.content.AniUnitTypes;
import animalia.content.*;
import animalia.ui.AniTex;
import animalia.world.WorldSetup;
import arc.Core;
import arc.Events;
import arc.util.Time;
import mindustry.game.EventType;
import mindustry.game.EventType.*;
import mindustry.mod.Mod;
import animalia.content.AniWeathers;
import animalia.ui.AniUI;

public class Animalia extends Mod {
Expand All @@ -25,24 +24,28 @@ public Animalia(){
@Override
public void init(){
if(!headless) {
world.setup();
AniTex.load();

Events.on(ClientLoadEvent.class, e -> {
ui.load();
});
Events.on(ClientLoadEvent.class, e -> ui.load());
Events.on(WorldLoadEvent.class, e -> Time.run(5, () -> world.onLoad()));
Events.run(Trigger.newGame, () -> Time.run(3, () -> world.onCreate()));

Events.run(EventType.Trigger.update, () -> {
Events.run(Trigger.update, () -> {
world.update();
});
}
}

@Override
public void loadContent(){
AniWeathers.load();
AniLiquids.load();
AniStatuses.load();
AniBlocks.load();
AniUnitTypes.load();
AniItems.load();
AniBlocks.load();
AniWeathers.load();
AniShaders.load();
AniTechTree.load();
}

public static float sfxvol(){
Expand Down
31 changes: 24 additions & 7 deletions src/animalia/ai/types/FrogAI.java
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
package animalia.ai.types;

import animalia.entities.units.FrogEntity;
import animalia.type.unit.FrogType;
import animalia.world.environment.SeasonalTree.SeasonalTreeBuild;
import arc.math.Angles;
import arc.math.Mathf;
import arc.math.geom.Point3;
import arc.util.Interval;
import arc.util.Time;
import mindustry.Vars;
import mindustry.core.World;
import mindustry.entities.Units;
import mindustry.entities.units.AIController;
import mindustry.gen.Teamc;
import mindustry.gen.Unit;

public class FrogAI extends AIController {
protected Interval action = new Interval();

@Override
public void updateMovement(){
FrogEntity u = (FrogEntity) unit;

if(u.type().usesTongue){
//TODO frog tongue
updateWeapons();
faceTarget();
}

Expand All @@ -34,8 +35,10 @@ public void updateMovement(){
}
}

if(u.over != null) {
if (Mathf.chance(u.type().swimChance) && u.onLiquid() && u.canSwim()) {
if(u.over != null){

} else {
if(Mathf.chance(u.type().swimChance) && u.onLiquid() && u.canSwim()) {
u.swim();
return;
}
Expand All @@ -48,10 +51,24 @@ public void updateMovement(){

@Override
public void faceTarget(){
if(target != null && unit.canShoot()){
FrogEntity u = (FrogEntity) unit;

if(target != null && !(u.jumping || u.swimming || u.gliding)){
unit.rotation = Angles.moveToward(unit.rotation, unit.angleTo(target), Time.delta * 4);
} else if(unit.moving()){
unit.lookAt(unit.vel().angle());
}
}

@Override
public boolean invalid(Teamc target){
return Units.invalidateTarget(target, unit.team, unit.x, unit.y) ||
!(target instanceof Unit u && (u.type.flying || u.hitSize <= ((FrogType) unit.type()).tongueMaxCap) && !World.raycast(
World.toTile(unit.x),
World.toTile(unit.y),
World.toTile(u.x),
World.toTile(u.y),
(x, y) -> Vars.world.build(x, y) != null || Vars.world.tile(x, y).solid()
));
}
}
Loading

0 comments on commit 0e16218

Please sign in to comment.