Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cable quality update #896

Open
wants to merge 22 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
eda1c9e
Resistors now use Resistive Dust
OmegaHaxors Jan 23, 2019
e0cf4af
Buffed 200V machine power draw from 400 to 200*5
OmegaHaxors Feb 4, 2019
35f6ed8
Cable Quality Update
OmegaHaxors Feb 5, 2019
7713a09
Re-added Arc Furnace as it is a dependency for the update
OmegaHaxors Dec 20, 2018
310035c
Massive rework to the wire registering
OmegaHaxors Feb 13, 2019
37fe490
Cleaned up the code for release
OmegaHaxors Feb 13, 2019
74661c8
Turrets track much faster but cost more to run
OmegaHaxors Feb 10, 2019
da5c686
Added Ender Pearl -> 20 Experience Bottle recipe to magnetizer
OmegaHaxors Feb 10, 2019
98dd335
Turrets now do the following:
OmegaHaxors Jan 18, 2019
b2ae1ba
Imported Arc Furnace code over to the main branch
OmegaHaxors Dec 20, 2018
9b0a966
Battery recycle a lot cheaper now
OmegaHaxors Feb 14, 2019
079adca
Improved Cable Registry state machine (uses nested for instead of whi…
OmegaHaxors Feb 16, 2019
5c34db0
Removed all traces of the Arc Furnace from this branch.
OmegaHaxors Feb 16, 2019
4c91de1
Removed unnecessary Arc Furnace code
OmegaHaxors Feb 16, 2019
152147e
Perfect cables increased from 4x to 10x to match realistic values and…
OmegaHaxors Feb 18, 2019
de416a2
Revert "Perfect cables increased from 4x to 10x to match realistic va…
OmegaHaxors Feb 18, 2019
00e8188
Perfect cables increased from 4x to 10x to match realistic values and…
OmegaHaxors Feb 18, 2019
2c3c35b
Revert "Perfect cables increased from 4x to 10x to match realistic va…
OmegaHaxors Feb 18, 2019
43f6018
Perfect cables increased from 4x to 10x to match realistic values and…
OmegaHaxors Feb 18, 2019
6197168
Removed Gravel/Dirt cost from Shoddy Cables (it's just blank space now)
OmegaHaxors Feb 19, 2019
01fc4e1
Added model and framework for E-Diamond armor
OmegaHaxors Mar 21, 2019
adb1baf
Battery Rebalancing
OmegaHaxors Apr 7, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ eclipse
options.txt
/out
/classes
/build-play.bat
/build-full.bat
OmegaHaxors marked this conversation as resolved.
Show resolved Hide resolved

# IntelliJ
.idea
Expand All @@ -24,3 +26,4 @@ options.txt
# Blender backup files
*.blend1
*.blend2

OmegaHaxors marked this conversation as resolved.
Show resolved Hide resolved
1,460 changes: 885 additions & 575 deletions src/main/java/mods/eln/Eln.java

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions src/main/java/mods/eln/item/GraphiteDescriptor.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package mods.eln.item;

import mods.eln.generic.GenericItemUsingDamageDescriptor;

public class GraphiteDescriptor extends GenericItemUsingDamageDescriptor {

public GraphiteDescriptor(String name) {
super(name);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ public CableRenderDescriptor getCableRender(LRDU lrdu) {
if (descriptor.isSignalSource()) return Eln.instance.signalCableDescriptor.render;
if (voltage < Eln.instance.lowVoltageCableDescriptor.electricalMaximalVoltage)
return Eln.instance.lowVoltageCableDescriptor.render;
if (voltage < Eln.instance.meduimVoltageCableDescriptor.electricalMaximalVoltage)
return Eln.instance.meduimVoltageCableDescriptor.render;
if (voltage < Eln.instance.mediumVoltageCableDescriptor.electricalMaximalVoltage)
return Eln.instance.mediumVoltageCableDescriptor.render;
if (voltage > Eln.instance.highVoltageCableDescriptor.electricalMaximalVoltage)
return Eln.instance.highVoltageCableDescriptor.render;
return Eln.instance.veryHighVoltageCableDescriptor.render;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ public class ResistorContainer extends BasicContainer {

public ResistorContainer(EntityPlayer player, IInventory inventory) {
super(player, inventory, new Slot[]{
new SlotFilter(inventory, coreId, 132, 8, 64, ItemStackFilter.OreDict("dustCoal"),
new SlotFilter(inventory, coreId, 135, 8, 64, ItemStackFilter.OreDict("dustResistive"),
OmegaHaxors marked this conversation as resolved.
Show resolved Hide resolved
ISlotSkin.SlotSkin.medium,
new String[]{tr("Coal dust slot"), tr("(Sets resistance)")})
});
new String[]{tr("Resistive Dust slot"), tr("(Each dust adds more resistance)")})
}
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ public Properties() {
impulseEnergy = 1000;
gunMinElevation = -40;
gunMaxElevation = 70;
turretSeekAnimationSpeed = 40;
turretAimAnimationSpeed = 70;
gunArmAnimationSpeed = 3;
turretSeekAnimationSpeed = 100;
turretAimAnimationSpeed = 140;
gunArmAnimationSpeed = 6;
gunDisarmAnimationSpeed = 0.5f;
gunAimAnimationSpeed = 100;
gunAimAnimationSpeed = 200;
minimalVoltage = 600;
minimalVoltageHysteresisFactor = 0.1;
maximalVoltage = 1050;
basePower = 25;
basePower = 75;
chargePower = 1000;
entityDetectionInterval = 0.25;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import java.util.List;
import java.util.Random;


public class TurretSlowProcess extends StateMachine {
private static final Random rand = new Random();
private double actualPower;
Expand Down Expand Up @@ -206,7 +207,11 @@ else if (element.getTurretAngle() <= -element.getDescriptor().getProperties().ac
}

if (visible) {
element.play(new SoundCommand("eln:TurretFire").mulVolume(0.4));
if(entity.getHealth()>0) {
OmegaHaxors marked this conversation as resolved.
Show resolved Hide resolved
element.play(new SoundCommand("eln:TurretFire").mulVolume(0.4));
} else {
element.play(new SoundCommand("eln:TurretKill").mulVolume(0.4));
}
return new AimingState(entity);
}
}
Expand Down Expand Up @@ -237,7 +242,7 @@ public void enter() {

@Override
public State state(double time) {
if (target.isDead) return new SeekingState();
if (target.getHealth()<=0) return new SeekingState();
OmegaHaxors marked this conversation as resolved.
Show resolved Hide resolved

Class filterClass = null;
ItemStack filterStack = element.getInventory().getStackInSlot(TurretContainer.filterId);
Expand Down Expand Up @@ -319,14 +324,17 @@ public ShootState(EntityLivingBase target) {

@Override
public void enter() {
if (target != null) target.attackEntityFrom(new DamageSource("Unknown"), 5);
element.shoot();
if (target != null){
target.hurtResistantTime = 0;
target.attackEntityFrom(new DamageSource("Unknown"), 5);
element.shoot();
element.play(new SoundCommand("eln:LaserGun"));
}
}

@Override
public State state(double time) {
if (target == null || target.isDead)
if (target == null || target.getHealth()<=0)
OmegaHaxors marked this conversation as resolved.
Show resolved Hide resolved
return new SeekingState();
else
return new AimingState(target);
Expand Down
12 changes: 12 additions & 0 deletions src/main/resources/assets/eln/lang/en.lang
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,10 @@ Green_Brush.name=Green Brush
Ground_Cable.name=Ground Cable
High_Power_Receiver_Antenna.name=High Power Receiver Antenna
High_Power_Transmitter_Antenna.name=High Power Transmitter Antenna
Shoddy_High_Voltage_Cable.name=Shoddy High Voltage Cable
High_Voltage_Cable.name=High Voltage Cable
Quality_High_Voltage_Cable.name=Quality High Voltage Cable
Perfect_High_Voltage_Cable.name=Perfect High Voltage Cable
High_Voltage_Relay.name=High Voltage Relay
High_Voltage_Switch.name=High Voltage Switch
Hub.name=Hub
Expand All @@ -142,15 +145,21 @@ Lime_Brush.name=Lime Brush
Long_Suspended_Lamp_Socket.name=Long Suspended Lamp Socket
Low_Power_Receiver_Antenna.name=Low Power Receiver Antenna
Low_Power_Transmitter_Antenna.name=Low Power Transmitter Antenna
Shoddy_Low_Voltage_Cable.name=Shoddy Low Voltage Cable
Low_Voltage_Cable.name=Low Voltage Cable
Quality_Low_Voltage_Cable.name=Quality Low Voltage Cable
Perfect_Low_Voltage_Cable.name=Perfect Low Voltage Cable
Low_Voltage_Relay.name=Low Voltage Relay
Low_Voltage_Switch.name=Low Voltage Switch
Machine_Block.name=Machine Block
Machine_Booster.name=Machine Booster
Magenta_Brush.name=Magenta Brush
Medium_Power_Receiver_Antenna.name=Medium Power Receiver Antenna
Medium_Power_Transmitter_Antenna.name=Medium Power Transmitter Antenna
Shoddy_Medium_Voltage_Cable.name=Shoddy Medium Voltage Cable
Medium_Voltage_Cable.name=Medium Voltage Cable
Quality_Medium_Voltage_Cable.name=Quality Medium Voltage Cable
Perfect_Medium_Voltage_Cable.name=Perfect Medium Voltage Cable
Medium_Voltage_Relay.name=Medium Voltage Relay
Medium_Voltage_Switch.name=Medium Voltage Switch
Mercury.name=Mercury
Expand Down Expand Up @@ -244,7 +253,10 @@ Tungsten_Dust.name=Tungsten Dust
Tungsten_Ingot.name=Tungsten Ingot
Tungsten_Ore.name=Tungsten Ore
Tutorial_Sign.name=Tutorial Sign
Shoddy_Very_High_Voltage_Cable.name=Shoddy Very High Voltage Cable
Very_High_Voltage_Cable.name=Very High Voltage Cable
Quality_Very_High_Voltage_Cable.name=Quality Very High Voltage Cable
Perfect_Very_High_Voltage_Cable.name=Perfect Very High Voltage Cable
Very_High_Voltage_Relay.name=Very High Voltage Relay
Very_High_Voltage_Switch.name=Very High Voltage Switch
Voltage-to-Redstone_Converter.name=Voltage-to-Redstone Converter
Expand Down
42 changes: 26 additions & 16 deletions src/main/resources/assets/eln/lang/en_US.lang
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ achievement.open_guide.desc=Open the wiki guide
200V_Active_Thermal_Dissipator.name=200V Active Thermal Dissipator
200V_Battery_Charger.name=200V Battery Charger
200V_Compressor.name=200V Compressor
200V_Condensator.name=200V Capacitor
200V_Copper_Heating_Corp.name=200V Copper Heating Corp
200V_Economic_Light_Bulb.name=200V Economic Light Bulb
200V_Emergency_Lamp.name=200V Emergency Lamp
Expand All @@ -33,7 +32,6 @@ achievement.open_guide.desc=Open the wiki guide
50V_Battery_Charger.name=50V Battery Charger
50V_Carbon_Incandescent_Light_Bulb.name=50V Carbon Incandescent Light Bulb
50V_Compressor.name=50V Compressor
50V_Condensator.name=50V Capacitor
50V_Copper_Heating_Corp.name=50V Copper Heating Corp
50V_Economic_Light_Bulb.name=50V Economic Light Bulb
50V_Egg_Incubator.name=50V Egg Incubator
Expand Down Expand Up @@ -87,9 +85,13 @@ Combustion_Chamber.name=Combustion Chamber
Configurable_summing_unit.name=Configurable summing unit
Copper_Cable.name=Copper Cable
Copper_Dust.name=Copper Dust
Copper_Folded_Plate.name=Copper Folded Plate
Copper_Folded_Plate_in_a_Bucket.name=Copper Folded Plate in a Bucket
Copper_Ingot.name=Copper Ingot
Copper_Ore.name=Copper Ore
Copper_Plate.name=Copper Plate
Copper_Slag.name=Copper Slag
Copper_Slag_Bucket.name=Copper Slag Bucket
Copper_Thermal_Cable.name=Copper Thermal Cable
Cost_Oriented_Battery.name=Cost Oriented Battery
Current_Oriented_Battery.name=Current Oriented Battery
Expand All @@ -98,6 +100,7 @@ DC-DC_Converter.name=DC-DC Converter
D_Flip_Flop_Chip.name=D Flip Flop Chip
Data_Logger.name=Data Logger
Data_Logger_Print.name=Data Logger Print
Diamond_Dust.name=Diamond Dust
Dielectric.name=Dielectric
Digital_Watch.name=Digital Watch
Electrical_Anemometer_Sensor.name=Electrical Anemometer Sensor
Expand All @@ -117,6 +120,7 @@ Electrical_Timer.name=Electrical Timer
Electrical_Weather_Sensor.name=Electrical Weather Sensor
Electrical_age_wrench,\nCan_be_used_to_turn\nsmall_wall_blocks=Electrical age wrench,\nCan be used to turn\nsmall wall blocks
Energy_Meter.name=Energy Meter
Experimental_Battery.name=Experimental Battery
Experimental_Transporter.name=Experimental Transporter
Fast_Electrical_Drill.name=Fast Electrical Drill
Ferrite_Ingot.name=Ferrite Ingot
Expand All @@ -126,28 +130,30 @@ Flywheel.name=Flywheel
Fuel_Heat_Furnace.name=Fuel Heat Furnace
Gas_Turbine.name=Gas Turbine
Generator.name=Generator
Glorious_Copper_Plate.name=Glorious Copper Plate
Gold_Dust.name=Gold Dust
Gold_Plate.name=Gold Plate
Gray_Brush.name=Gray Brush
Green_Brush.name=Green Brush
Ground_Cable.name=Ground Cable
High_Power_Receiver_Antenna.name=High Power Receiver Antenna
High_Power_Transmitter_Antenna.name=High Power Transmitter Antenna
High_Voltage_Cable.name=High Voltage Cable
High_Voltage_Relay.name=High Voltage Relay
High_Voltage_Switch.name=High Voltage Switch
Hub.name=Hub
Industrial_Data_Logger.name=Industrial Data Logger
Iron_Cable.name=Iron Cable
Iron_Dust.name=Iron Dust
Iron_Plate.name=Iron Plate
Irresponsible_Electrical_Drill.name=Irresponsible Electrical Drill
JK_Flip_Flop_Chip.name=JK Flip Flop Chip
Joint.name=Joint
Joint_hub.name=Joint hub
LED_vuMeter.name=LED vuMeter
Lamp_Socket_A.name=Lamp Socket A
Lamp_Socket_B_Projector.name=Lamp Socket B Projector
Lamp_Supply.name=Lamp Supply
Lapis_Dust.name=Lapis Dust
Large_Rheostat.name=Large Rheostat
Lead_Dust.name=Lead Dust
Lead_Fuse_for_high_voltage_cables.name=Lead Fuse for high voltage cables
Expand All @@ -163,7 +169,6 @@ Lime_Brush.name=Lime Brush
Long_Suspended_Lamp_Socket.name=Long Suspended Lamp Socket
Low_Power_Receiver_Antenna.name=Low Power Receiver Antenna
Low_Power_Transmitter_Antenna.name=Low Power Transmitter Antenna
Low_Voltage_Cable.name=Low Voltage Cable
Low_Voltage_Relay.name=Low Voltage Relay
Low_Voltage_Switch.name=Low Voltage Switch
Lowpass_filter.name=Lowpass filter
Expand All @@ -173,13 +178,13 @@ Magenta_Brush.name=Magenta Brush
Medium_Fuel_Burner.name=Medium Fuel Burner
Medium_Power_Receiver_Antenna.name=Medium Power Receiver Antenna
Medium_Power_Transmitter_Antenna.name=Medium Power Transmitter Antenna
Medium_Voltage_Cable.name=Medium Voltage Cable
Medium_Voltage_Relay.name=Medium Voltage Relay
Medium_Voltage_Switch.name=Medium Voltage Switch
Mercury.name=Mercury
Mining_Pipe.name=Mining Pipe
Modbus_RTU.name=Modbus RTU
Modern_Data_Logger.name=Modern Data Logger
Molten_Copper_Bucket.name=Molten Copper Bucket
Monster_Filter.name=Monster Filter
MultiMeter.name=Multimeter
NAND_Chip.name=NAND Chip
Expand All @@ -198,6 +203,7 @@ Overheating_Protection.name=Overheating Protection
Overvoltage_Protection.name=Overvoltage Protection
PAL_Chip.name=PAL Chip
PID_Regulator.name=PID Regulator
Peppered_Molten_Copper_Bucket.name=Peppered Molten Copper Bucket
Pink_Brush.name=Pink Brush
Player_Filter.name=Player Filter
Portable_Battery.name=Portable Battery
Expand All @@ -211,16 +217,19 @@ Power_Inductor.name=Power Inductor
Power_Resistor.name=Power Resistor
Power_capacitor.name=Power capacitor
Power_inductor.name=Power inductor
Pure_Copper_Ingot.name=Pure Copper Ingot
Purple_Brush.name=Purple Brush
Red_Brush.name=Red Brush
Redstone-to-Voltage_Converter.name=Redstone-to-Voltage Converter
Resistive_Dust.name=Resistive Dust
Rheostat.name=Rheostat
Robust_Lamp_Socket.name=Robust Lamp Socket
Rubber.name=Rubber
Sample_and_hold.name=Sample and hold
Scanner.name=Scanner
Schmitt_Trigger_Chip.name=Schmitt Trigger Chip
Sconce_Lamp_Socket.name=Sconce Lamp Socket
Seperated_Molten_Copper_Bucket.name=Seperated Molten Copper Bucket
Signal_20H_inductor.name=Signal 20H inductor
Signal_Antenna.name=Signal Antenna
Signal_Button.name=Signal Button
Expand All @@ -236,6 +245,7 @@ Silicon_Dust.name=Silicon Dust
Silicon_Ingot.name=Silicon Ingot
Silicon_Plate.name=Silicon Plate
Silver_Brush.name=Silver Brush
Silver_Ingot.name=Silver Ingot
Simple_Lamp_Socket.name=Simple Lamp Socket
Single-use_Battery.name=Single-use Battery
Small_200V_Copper_Heating_Corp.name=Small 200V Copper Heating Corp
Expand Down Expand Up @@ -271,8 +281,8 @@ Tungsten_Cable.name=Tungsten Cable
Tungsten_Dust.name=Tungsten Dust
Tungsten_Ingot.name=Tungsten Ingot
Tungsten_Ore.name=Tungsten Ore
Turbo_Electrical_Drill.name=Turbo Electrical Drill
Tutorial_Sign.name=Tutorial Sign
Very_High_Voltage_Cable.name=Very High Voltage Cable
Very_High_Voltage_Relay.name=Very High Voltage Relay
Very_High_Voltage_Switch.name=Very High Voltage Switch
Voltage-to-Redstone_Converter.name=Voltage-to-Redstone Converter
Expand Down Expand Up @@ -365,11 +375,11 @@ Useful_to_prevent_over-voltage\nof_Batteries=Useful to prevent over-voltage\nof
# ./src/main/java/mods/eln/item/SolarTrackerDescriptor.java
Solar_panel_upgrade=Solar panel upgrade

# ./src/main/java/mods/eln/item/electricalitem/BatteryItem.java
# ./src/main/java/mods/eln/item/electricalitem/BatteryItem.kt

# ./src/main/java/mods/eln/item/electricalitem/ElectricalLampItem.java
# ./src/main/java/mods/eln/item/electricalitem/ElectricalLampItem.kt
State\:=State:
Stored_Energy\:_%1$J_(%2$%)=Stored Energy: %1$J (%2$%)
Stored_Energy\:_%1\$J_(%2$%)=Stored Energy: %1\$J (%2$%)

# ./src/main/java/mods/eln/item/regulator/RegulatorSlot.java

Expand Down Expand Up @@ -719,14 +729,14 @@ Supplies_any_device\nplugged_in_with_energy.=Supplies any device\nplugged in wit
Specify_the_device_to_supply_through_this_socket.=Specify the device to supply through this socket.

# ./src/main/java/mods/eln/sixnode/resistor/ResistorContainer.java
(Sets_resistance)=(Sets resistance)
Coal_dust_slot=Coal dust slot
(Each_dust_adds_more_resistance)=(Each dust adds more resistance)
Resistive_Dust_slot=Resistive Dust slot

# ./src/main/java/mods/eln/sixnode/resistor/ResistorElement.java

# ./src/main/java/mods/eln/sixnode/thermalcable/ThermalCableDescriptor.java
High_parallel_resistance\n_\=>_Low_power_dissipation.=High parallel resistance\n => Low power dissipation.
Low_serial_resistance\n_\=>_High_conductivity.=Low serial resistance\n => High conductivity.
Low_serialized_resistance\n_\=>_High_conductivity.=Low serialized resistance\n => High conductivity.
Parallel_resistance\:_%1$K_W=Parallel resistance: %1$K/W
Serial_resistance\:_%1$K_W=Serial resistance: %1$K/W

Expand Down Expand Up @@ -763,7 +773,6 @@ Fuel_level=Fuel level
Nominal_power\:_%1$_W=Nominal power: %1$ W
Nominal_voltage\:_%1$_V=Nominal voltage: %1$ V
Produces_electricity_using_gasoline.=Produces electricity using gasoline.
State=State

# ./src/main/java/mods/eln/transparentnode/FuelHeatFurnace.kt
Actual\:_%1$=Actual: %1$
Expand Down Expand Up @@ -1007,14 +1016,14 @@ Capacity\:_%1$F=Capacity: %1$F
Channel=Channel
Charge=Charge
Charge_power=Charge power
Charge_power\:_%1$W=Charge power: %1$W
Charge_power\:_%1\$W=Charge power: %1\$W
Closed=Closed
Connected=Connected
Cooling_power\:_%1$W=Cooling power: %1$W
Copper_cable_slot=Copper cable slot
Current=Current
Dielectric_slot=Dielectric slot
Discharge_power\:_%1$W=Discharge power: %1$W
Discharge_power\:_%1\$W=Discharge power: %1\$W
Electrical_cable_slot=Electrical cable slot
Energy=Energy
Entity_filter_slot=Entity filter slot
Expand Down Expand Up @@ -1067,7 +1076,8 @@ Resistance\:_%1$\u2126=Resistance: %1$\u2126
Smallest=Smallest
Specify_the_channel=Specify the channel
Specify_the_supply_channel=Specify the supply channel
Stored_energy\:_%1$J_(%2$%)=Stored energy: %1$J (%2$%)
State=State
Stored_energy\:_%1\$J_(%2$%)=Stored energy: %1\$J (%2$%)
Temperature=Temperature
Temperature\:_%1$°C=Temperature: %1$°C
Temperature_gauge=Temperature gauge
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading