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 4 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ options.txt
# Blender backup files
*.blend1
*.blend2
*.bat
OmegaHaxors marked this conversation as resolved.
Show resolved Hide resolved
1,321 changes: 1,159 additions & 162 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 @@ -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
@@ -0,0 +1,78 @@
package mods.eln.transparentnode.electricalmachine;

import mods.eln.misc.*;
import mods.eln.misc.Obj3D.Obj3DPart;
import mods.eln.sim.ThermalLoadInitializer;
import mods.eln.sixnode.electricalcable.ElectricalCableDescriptor;
import net.minecraft.entity.item.EntityItem;
import org.lwjgl.opengl.GL11;

public class ArcFurnaceDescriptor extends ElectricalMachineDescriptor {
private float tyOn;
Copy link
Contributor

Choose a reason for hiding this comment

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

what on earth are these.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, please explain. By comment.

private float tyOff;

private Obj3DPart main;
private Obj3DPart move;

public ArcFurnaceDescriptor(String name, Obj3D obj, double nominalU, double nominalP, double maximalU,
ThermalLoadInitializer thermal, ElectricalCableDescriptor cable, RecipesList recipe) {
super(name, nominalU, nominalP, maximalU, thermal, cable, recipe);

if (obj != null) {
main = obj.getPart("main");
move = obj.getPart("move");
if (move != null) {
tyOn = move.getFloat("tyon");
tyOff = move.getFloat("tyoff");
}
}
}

class ArcFurnaceDescriptorHandle {
final RcInterpolator interpolator = new RcInterpolator(0.25f);
float itemCounter = 0f;
}

@Override
Object newDrawHandle() {
return new ArcFurnaceDescriptorHandle();
}

@Override
public float volumeForRunningSound(float processState, float powerFactor) {
/*if (processState < 0.1)
return 0f;
else if (processState < 0.3)
return super.volumeForRunningSound(processState, powerFactor) * (processState - 0.1f) * 5f;
else*/
return super.volumeForRunningSound(processState, powerFactor);
}

@Override
void draw(ElectricalMachineRender render, Object handleO, EntityItem inEntity, EntityItem outEntity,
float powerFactor, float processState) {
ArcFurnaceDescriptorHandle handle = (ArcFurnaceDescriptorHandle) handleO;

UtilsClient.drawEntityItem(inEntity, -0.35f, 0.04f, 0.3f, handle.itemCounter, 1f);
UtilsClient.drawEntityItem(outEntity, 0.35f, 0.04f, 0.3f, -handle.itemCounter + 139f, 1f);

main.draw();
GL11.glTranslatef(0f, tyOff + (float) Math.sqrt(handle.interpolator.get()) * (tyOn - tyOff), 0f);
move.draw();
}

@Override
void refresh(float deltaT, ElectricalMachineRender render, Object handleO, EntityItem inEntity, EntityItem outEntity, float powerFactor, float processState) {
ArcFurnaceDescriptorHandle handle = (ArcFurnaceDescriptorHandle) handleO;
handle.interpolator.setTarget(processState);
handle.interpolator.step(deltaT);

handle.itemCounter += deltaT * 90;
while (handle.itemCounter >= 360f) handle.itemCounter -= 360;
}

@Override
public boolean powerLrdu(Direction side, Direction front) {
return side != front && side != front.getInverse();
}
}
66 changes: 56 additions & 10 deletions src/main/resources/assets/eln/lang/en_US.lang
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ achievement.open_guide.desc=Open the wiki guide
25A_Diode.name=25A Diode
2x3_Rotating_Solar_Panel.name=2x3 Rotating Solar Panel
2x3_Solar_Panel.name=2x3 Solar Panel
2x_Graphite_Rods.name=2x Graphite Rods
3x_Graphite_Rods.name=3x Graphite Rods
4x_Graphite_Rods.name=4x Graphite Rods
50V_Battery_Charger.name=50V Battery Charger
50V_Carbon_Incandescent_Light_Bulb.name=50V Carbon Incandescent Light Bulb
50V_Compressor.name=50V Compressor
Expand All @@ -49,6 +52,7 @@ achievement.open_guide.desc=Open the wiki guide
50V_Power_Socket.name=50V Power Socket
50V_Tungsten_Heating_Corp.name=50V Tungsten Heating Corp
50V_Turbine.name=50V Turbine
800V_Arc_Furnace.name=800V Arc Furnace
800V_Defence_Turret.name=800V Defence Turret
AND_Chip.name=AND Chip
Advanced_Chip.name=Advanced Chip
Expand All @@ -65,6 +69,10 @@ Analog_Watch.name=Analog watch
Analog_vuMeter.name=Analog Gauge
Analogic_Regulator.name=Analogic Regulator
Animal_Filter.name=Animal Filter
Arc_Clay_Chunk.name=Arc Clay Chunk
Arc_Clay_Ingot.name=Arc Clay Ingot
Arc_Metal_Chunk.name=Arc Metal Chunk
Arc_Metal_Ingot.name=Arc Metal Ingot
Auto_Miner.name=Auto Miner
Average_Electrical_Drill.name=Average Electrical Drill
Average_Ferromagnetic_Core.name=Average Ferromagnetic Core
Expand All @@ -74,6 +82,8 @@ Black_Brush.name=Black Brush
Blown_Lead_Fuse.name=Blown Lead Fuse
Blue_Brush.name=Blue Brush
Brown_Brush.name=Brown Brush
Canister_of_Arc_Water.name=Canister of Arc Water
Canister_of_Water.name=Canister of Water
Capacity_Oriented_Battery.name=Capacity Oriented Battery
Casing.name=Casing
Cheap_Chip.name=Cheap Chip
Expand All @@ -87,17 +97,23 @@ 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
Creative_Cable.name=Creative Cable
Current_Oriented_Battery.name=Current Oriented Battery
Cyan_Brush.name=Cyan Brush
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 +133,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,8 +143,10 @@ 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
Graphite_Rod.name=Graphite Rod
Gray_Brush.name=Gray Brush
Green_Brush.name=Green Brush
Ground_Cable.name=Ground Cable
Expand All @@ -138,16 +157,19 @@ High_Voltage_Relay.name=High Voltage Relay
High_Voltage_Switch.name=High Voltage Switch
Hub.name=Hub
Industrial_Data_Logger.name=Industrial Data Logger
Inert_Canister.name=Inert Canister
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 Down Expand Up @@ -180,6 +202,7 @@ 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 +221,11 @@ 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
Perfect_High_Voltage_Cable.name=Perfect High Voltage Cable
Perfect_Low_Voltage_Cable.name=Perfect Low Voltage Cable
Perfect_Medium_Voltage_Cable.name=Perfect Medium Voltage Cable
Perfect_Very_High_Voltage_Cable.name=Perfect Very High Voltage Cable
Pink_Brush.name=Pink Brush
Player_Filter.name=Player Filter
Portable_Battery.name=Portable Battery
Expand All @@ -211,18 +239,30 @@ 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
Quality_High_Voltage_Cable.name=Quality High Voltage Cable
Quality_Low_Voltage_Cable.name=Quality Low Voltage Cable
Quality_Medium_Voltage_Cable.name=Quality Medium Voltage Cable
Quality_Very_High_Voltage_Cable.name=Quality Very High Voltage Cable
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
Shoddy_High_Voltage_Cable.name=Shoddy High Voltage Cable
Shoddy_Low_Voltage_Cable.name=Shoddy Low Voltage Cable
Shoddy_Medium_Voltage_Cable.name=Shoddy Medium Voltage Cable
Shoddy_Very_High_Voltage_Cable.name=Shoddy Very High Voltage Cable
Signal_20H_inductor.name=Signal 20H inductor
Signal_Antenna.name=Signal Antenna
Signal_Bus_Cable.name=Signal Bus Cable
Signal_Button.name=Signal Button
Signal_Cable.name=Signal Cable
Signal_Diode.name=Signal Diode
Expand All @@ -236,6 +276,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 All @@ -259,6 +300,9 @@ Steam_Turbine.name=Steam Turbine
Stone_Heat_Furnace.name=Stone Heat Furnace
Street_Light.name=Streetlight
Suspended_Lamp_Socket.name=Suspended Lamp Socket
Synthetic_Diamond.name=Synthetic Diamond
T1_Transmission_Cable.name=T1 Transmission Cable
T2_Transmission_Cable.name=T2 Transmission Cable
Tachometer.name=Tachometer
Temperature_Probe.name=Temperature Probe
Thermal_Probe.name=Thermal Probe
Expand All @@ -271,6 +315,7 @@ 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
Expand Down Expand Up @@ -316,6 +361,7 @@ tile.eln.ElnProbe.name=Eln Computer Probe
tile.eln.EnergyConverterElnToOtherHVUBlock.name=800V Electrical Age to other energy exporter
tile.eln.EnergyConverterElnToOtherLVUBlock.name=50V Electrical Age to other energy exporter
tile.eln.EnergyConverterElnToOtherMVUBlock.name=200V Electrical Age to other energy exporter
unreleasedium.name=unreleasedium

# ./src/main/java/mods/eln/i18n/I18N.java
You_have_%1$_lives_left=You have %1$ lives left
Expand Down Expand Up @@ -365,11 +411,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 +765,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 +809,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 +1052,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 +1112,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
Binary file not shown.
20 changes: 20 additions & 0 deletions src/main/resources/assets/eln/model/ArcFurnace/arcfurnace.mtl
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Blender MTL File: 'compressora.blend'
# Material Count: 2

newmtl Material
Ns 96.078431
Ka 0.000000 0.000000 0.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ni 1.000000
d 1.000000
illum 2

newmtl None
Ns 0
Ka 0.000000 0.000000 0.000000
Kd 0.8 0.8 0.8
Ks 0.8 0.8 0.8
d 1
illum 2
map_Kd tex.png
Loading