Skip to content
This repository has been archived by the owner on Jan 25, 2021. It is now read-only.

Commit

Permalink
donald trump
Browse files Browse the repository at this point in the history
  • Loading branch information
GlennFolker committed Oct 12, 2020
1 parent 0976bd1 commit bf3b2c8
Show file tree
Hide file tree
Showing 5 changed files with 108 additions and 21 deletions.
60 changes: 46 additions & 14 deletions src/mw/content/MWBlocks.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@
public class MWBlocks implements ContentList{
public static Block

//environment
lava, contaminatedWater, deepContaminatedWater, darksandContaminatedWater, sandContaminatedWater,
//environment
lava, contaminatedWater, deepContaminatedWater, darksandContaminatedWater, sandContaminatedWater,

//ores
oreIron, oreAluminum, oreUranium,
//ores
oreIron, oreAluminum, oreUranium,

//defense
insulatorWall, insulatorWallLarge, reinforcedWall, reinforcedWallLarge, steelWall, steelWallLarge,
//defense
insulatorWall, insulatorWallLarge, reinforcedWall, reinforcedWallLarge, steelWall, steelWallLarge,

//transport
aluminumConveyor, ironConveyor;
//transport
aluminumConveyor, ironConveyor;

@Override
public void load(){
Expand Down Expand Up @@ -131,13 +131,45 @@ public void load(){
//region defense

insulatorWall = new InsulatorWall("insulator-wall"){{
requirements(Category.defense, with(MWItems.insulationPlate, 1));
requirements(Category.defense, with(MWItems.insulationPlate, 6));

health = 1000;
solid = true;
sync = true;
update = true;
powerProduction = 2;
health = 900;
powerProduction = 2f;
}};

insulatorWallLarge = new InsulatorWall("insulator-wall-large"){{
requirements(Category.defense, with(MWItems.insulationPlate, 24));

size = 2;
health = 3600;
powerProduction = 4f;
energyMultiplier = 30f;
}};

reinforcedWall = new ReinforcedWall("reinforced-wall"){{
requirements(Category.defense, with(MWItems.iron, 6, Items.surgealloy, 4, MWItems.uranium, 3, Items.phasefabric, 1));

health = 1280;
}};

reinforcedWallLarge = new ReinforcedWall("reinforced-wall-large"){{
requirements(Category.defense, with(MWItems.iron, 24, Items.surgealloy, 16, MWItems.uranium, 12, Items.phasefabric, 4));

size = 2;
health = 5120;
}};

steelWall = new Wall("steel-wall"){{
requirements(Category.defense, with(MWItems.steel, 6));

health = 560;
}};

steelWallLarge = new Wall("steel-wall-large"){{
requirements(Category.defense, with(MWItems.steel, 24));

size = 2;
health = 2240;
}};

//end region
Expand Down
12 changes: 6 additions & 6 deletions src/mw/content/MWItems.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
public class MWItems implements ContentList{
public static Item

gravel, iron, aluminum, uranium,
steel, scrapPlate, insulationPlate,
apShell, heShell,
alienSporePod, radioactiveSporePod,
mk2Module,
coil, sulfur;
gravel, iron, aluminum, uranium,
steel, scrapPlate, insulationPlate,
apShell, heShell,
alienSporePod, radioactiveSporePod,
mk2Module,
coil, sulfur;

@Override
public void load(){
Expand Down
2 changes: 1 addition & 1 deletion src/mw/content/MWLiquids.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
public class MWLiquids implements ContentList{
public static Liquid

lava, contaminatedWater, acid, gas;
lava, contaminatedWater, acid, gas;

@Override
public void load(){
Expand Down
20 changes: 20 additions & 0 deletions src/mw/world/blocks/defense/InsulatorWall.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import arc.math.*;
import arc.struct.*;
import arc.util.*;
import arc.util.io.*;
import mindustry.entities.bullet.*;
import mindustry.gen.*;
import mindustry.graphics.*;
Expand All @@ -24,6 +25,8 @@ public class InsulatorWall extends Wall{

public InsulatorWall(String name){
super(name);
update = true;
sync = true;
insulated = true;
flashHit = true;
consumesPower = false;
Expand Down Expand Up @@ -64,5 +67,22 @@ public boolean collision(Bullet bullet){

return super.collision(bullet);
}

@Override
public float getPowerProduction(){
return powerProduction * productionEfficiency;
}

@Override
public void write(Writes write){
super.write(write);
write.f(productionEfficiency);
}

@Override
public void read(Reads read){
super.read(read);
productionEfficiency = read.f();
}
}
}
35 changes: 35 additions & 0 deletions src/mw/world/blocks/defense/ReinforcedWall.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package mw.world.blocks.defense;

import arc.graphics.*;
import mindustry.content.*;
import mindustry.entities.*;
import mindustry.world.blocks.defense.*;

public class ReinforcedWall extends Wall{
/** Delay at which the block heals itself */
public float healTime = 90f;
/** Fraction of heal power, 1.0 is equivalent 100% */
public float healPower = 1f / 15f;

public Effect healEffect = Fx.healBlockFull;
public Color healColor = Color.valueOf("efefff");
public int healTimer = timers++;

public ReinforcedWall(String name){
super(name);
update = true;
sync = true;
}

public class ReinforcedWallBuild extends WallBuild{
@Override
public void updateTile(){
super.updateTile();

if(timer(healTimer, healTime)){
heal(maxHealth() / healPower);
healEffect.at(x, y, rotation, healColor, size);
}
}
}
}

4 comments on commit bf3b2c8

@GlennFolker
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wall :D

@ThePythonGuy3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah nice name

@GlennFolker
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

W A L L D:<

@ThePythonGuy3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh. lmao u are dumb

Please sign in to comment.