summaryrefslogtreecommitdiff
path: root/src/simulation
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-04-17 17:42:36 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-04-17 17:42:36 (GMT)
commit80a77f47501336f5d690965a6e8f79f2ef231943 (patch)
tree197c103b6bdf6dfe82c2b6e2314c494aef273896 /src/simulation
parentfdb4dff4d77d36e45e48847a602b53f786380ba0 (diff)
downloadpowder-80a77f47501336f5d690965a6e8f79f2ef231943.zip
powder-80a77f47501336f5d690965a6e8f79f2ef231943.tar.gz
TPT: Added FRAY - Force-ray and RPEL - Repeller f6696282e1
Diffstat (limited to 'src/simulation')
-rw-r--r--src/simulation/ElementFunctions.h2
-rw-r--r--src/simulation/Elements.h4
-rw-r--r--src/simulation/SimulationData.cpp9
-rw-r--r--src/simulation/SimulationData.h27
4 files changed, 26 insertions, 16 deletions
diff --git a/src/simulation/ElementFunctions.h b/src/simulation/ElementFunctions.h
index ef80b6f..be3f9f4 100644
--- a/src/simulation/ElementFunctions.h
+++ b/src/simulation/ElementFunctions.h
@@ -105,6 +105,8 @@ int update_DCEL(UPDATE_FUNC_ARGS);
int update_BANG(UPDATE_FUNC_ARGS);
int update_IGNT(UPDATE_FUNC_ARGS);
int update_MISC(UPDATE_FUNC_ARGS);
+int update_FRAY(UPDATE_FUNC_ARGS);
+int update_REPL(UPDATE_FUNC_ARGS);
int update_legacy_PYRO(UPDATE_FUNC_ARGS);
int update_legacy_all(UPDATE_FUNC_ARGS);
int run_stickman(playerst* playerp, UPDATE_FUNC_ARGS);
diff --git a/src/simulation/Elements.h b/src/simulation/Elements.h
index 8acafde..7d59dcb 100644
--- a/src/simulation/Elements.h
+++ b/src/simulation/Elements.h
@@ -275,7 +275,9 @@
#define PT_WIRE 156
#define PT_GBMB 157
#define PT_FIGH 158
-#define PT_NUM 159
+#define PT_FRAY 159
+#define PT_REPL 160
+#define PT_NUM 161
//#endif /* ELEMENTS_H_ */
diff --git a/src/simulation/SimulationData.cpp b/src/simulation/SimulationData.cpp
index 2fb10b2..47ce638 100644
--- a/src/simulation/SimulationData.cpp
+++ b/src/simulation/SimulationData.cpp
@@ -158,6 +158,7 @@ menu_section * LoadMenus(int & menuCount)
{"\xC1", "Walls", 0, 1},
{"\xC2", "Electronics", 0, 1},
{"\xD6", "Powered Materials", 0, 1},
+ {"\xE2", "Force", 0, 1},
{"\xC3", "Explosives", 0, 1},
{"\xC5", "Gasses", 0, 1},
{"\xC4", "Liquids", 0, 1},
@@ -321,8 +322,8 @@ part_type * LoadElements(int & elementCount)
{"EMP", PIXPACK(0x66AAFF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.0f, 0.0f * CFDS, 0, 0, 0, 0, 3, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 121, "Breaks activated electronics.", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_EMP, &graphics_EMP},
{"BREL", PIXPACK(0x707060), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.18f, 0.00f, 0.000f * CFDS, 1, 0, 0, 2, 2, 1, 1, 90, SC_POWDERS, R_TEMP+0.0f +273.15f, 211, "Broken electronics", ST_SOLID, TYPE_PART|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_HOT_GLOW, NULL, NULL},
{"ELEC", PIXPACK(0xDFEFFF), 0.0f, 0.00f * CFDS, 1.00f, 1.00f, -0.99f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, -1, SC_NUCLEAR, R_TEMP+200.0f+273.15f, 251, "Electrons", ST_GAS, TYPE_ENERGY|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, &update_ELEC, &graphics_ELEC},
- {"ACEL", PIXPACK(0x0099CC), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_POWERED, R_TEMP+0.0f +273.15f, 251, "Accelerator", ST_NONE, TYPE_SOLID, &update_ACEL, &graphics_ACEL},
- {"DCEL", PIXPACK(0x99CC00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_POWERED, R_TEMP+0.0f +273.15f, 251, "Decelerator", ST_NONE, TYPE_SOLID, &update_DCEL, &graphics_DCEL},
+ {"ACEL", PIXPACK(0x0099CC), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_FORCE, R_TEMP+0.0f +273.15f, 251, "Accelerator", ST_NONE, TYPE_SOLID, &update_ACEL, &graphics_ACEL},
+ {"DCEL", PIXPACK(0x99CC00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_FORCE, R_TEMP+0.0f +273.15f, 251, "Decelerator", ST_NONE, TYPE_SOLID, &update_DCEL, &graphics_DCEL},
{"TNT", PIXPACK(0xC05050), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 88, "Explosive.", ST_SOLID, TYPE_SOLID | PROP_NEUTPENETRATE, &update_BANG, NULL},
{"IGNC", PIXPACK(0xC0B050), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_EXPLOSIVE, R_TEMP+0.0f +273.15f, 88, "Ignition cord.", ST_SOLID, TYPE_SOLID | PROP_NEUTPENETRATE | PROP_SPARKSETTLE | PROP_LIFE_KILL, &update_IGNT, NULL},
{"BOYL", PIXPACK(0x0A3200), 1.0f, 0.01f * CFDS, 0.99f, 0.30f, -0.1f, 0.0f, 0.18f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 1, SC_GAS, R_TEMP+2.0f +273.15f, 42, "Boyle, variable pressure gas. Expands when heated.", ST_GAS, TYPE_GAS, &update_BOYL, NULL},
@@ -343,6 +344,8 @@ part_type * LoadElements(int & elementCount)
{"WIRE", PIXPACK(0xFFCC00), 0.0f, 0.00f * CFDS, 0.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, 1, 100, SC_ELEC, R_TEMP+0.0f +273.15f, 250, "WireWorld wires.",ST_SOLID,TYPE_SOLID,&update_WIRE, &graphics_WIRE},
{"GBMB", PIXPACK(0x1144BB), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 0, 0, 0, 20, 1, 1, 30, SC_EXPLOSIVE, R_TEMP-2.0f +273.15f, 29, "Sticks to first object it touches then produces strong gravity push.", ST_NONE, TYPE_PART|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, &update_GBMB, &graphics_GBMB},
{"FIGH", PIXPACK(0x000000), 0.5f, 0.00f * CFDS, 0.2f, 1.0f, 0.0f, 0.0f, 0.0f, 0.00f * CFDS, 0, 0, 0, 0, 0, 1, 1, 50, SC_SPECIAL, R_TEMP+14.6f+273.15f, 0, "Fighter. Tries to kill stickmen.", ST_NONE, 0, &update_FIGH, &graphics_FIGH},
+ {"FRAY", PIXPACK(0x00BBFF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, 1, 100, SC_FORCE, 20.0f+0.0f +273.15f, 0, "Force Emitter. Push or pull objects based on temp value, use like ARAY", ST_SOLID, TYPE_SOLID|PROP_LIFE_DEC, &update_FRAY, NULL},
+ {"RPEL", PIXPACK(0x99CC00), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_FORCE, 20.0f+0.0f +273.15f, 0, "Repel or attract particles based on temp value.", ST_NONE, TYPE_SOLID, &update_REPL, NULL},
//Name Colour Advec Airdrag Airloss Loss Collid Grav Diffus Hotair Fal Burn Exp Mel Hrd M Use Weight Section H Ins Description
};
elementCount = PT_NUM;
@@ -523,6 +526,8 @@ part_transition * LoadTransitions(int & transitionCount)
/* WIRE */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT},
/* GBMB */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT},
/* FIGH */ {IPL, NT, IPH, NT, ITL, NT, 620.0f, PT_FIRE},
+ /* FRAY */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT},
+ /* REPL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT},
};
#undef IPL
#undef IPH
diff --git a/src/simulation/SimulationData.h b/src/simulation/SimulationData.h
index 3e35af6..2c13450 100644
--- a/src/simulation/SimulationData.h
+++ b/src/simulation/SimulationData.h
@@ -8,19 +8,20 @@
#define SC_WALL 0
#define SC_ELEC 1
#define SC_POWERED 2
-#define SC_EXPLOSIVE 3
-#define SC_GAS 4
-#define SC_LIQUID 5
-#define SC_POWDERS 6
-#define SC_SOLIDS 7
-#define SC_NUCLEAR 8
-#define SC_SPECIAL 9
-#define SC_LIFE 10
-#define SC_TOOL 11
-#define SC_DECO 12
-#define SC_CRACKER 13
-#define SC_CRACKER2 14
-#define SC_TOTAL 13
+#define SC_FORCE 3
+#define SC_EXPLOSIVE 4
+#define SC_GAS 5
+#define SC_LIQUID 6
+#define SC_POWDERS 7
+#define SC_SOLIDS 8
+#define SC_NUCLEAR 9
+#define SC_SPECIAL 10
+#define SC_LIFE 11
+#define SC_TOOL 12
+#define SC_DECO 13
+#define SC_CRACKER 14
+#define SC_CRACKER2 15
+#define SC_TOTAL 14
#define UI_WALLSTART 222
#define UI_ACTUALSTART 122