mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-03-30 07:17:03 +00:00
charge help, and fixed a bug in help in weird geometry warped cells
This commit is contained in:
parent
89fe310154
commit
62734bbfc5
@ -192,9 +192,11 @@ EX namespace elec {
|
|||||||
EX bool havecharge, haveelec, havethunder;
|
EX bool havecharge, haveelec, havethunder;
|
||||||
EX bool afterOrb; // extra charge from the Orb of Lightning
|
EX bool afterOrb; // extra charge from the Orb of Lightning
|
||||||
|
|
||||||
|
#if HDR
|
||||||
enum eCharge {
|
enum eCharge {
|
||||||
ecCharged, ecGrounded, ecIsolator, ecConductor
|
ecCharged, ecGrounded, ecIsolator, ecConductor
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
bool conduct(eCharge cf, eCharge ct) {
|
bool conduct(eCharge cf, eCharge ct) {
|
||||||
if(ct == ecIsolator) return false;
|
if(ct == ecIsolator) return false;
|
||||||
@ -202,7 +204,7 @@ EX namespace elec {
|
|||||||
return ct != cf;
|
return ct != cf;
|
||||||
}
|
}
|
||||||
|
|
||||||
eCharge getCharge(cell *c) {
|
EX eCharge getCharge(cell *c) {
|
||||||
bool ao = afterOrb && c->ligon;
|
bool ao = afterOrb && c->ligon;
|
||||||
|
|
||||||
/* not yet generated */
|
/* not yet generated */
|
||||||
|
11
help.cpp
11
help.cpp
@ -935,7 +935,16 @@ EX void describeMouseover() {
|
|||||||
appendHelp(string("\n\n") + XLAT(warpdesc));
|
appendHelp(string("\n\n") + XLAT(warpdesc));
|
||||||
|
|
||||||
if(S7 != 7 || !BITRUNCATED) if(c->item != itOrb37)
|
if(S7 != 7 || !BITRUNCATED) if(c->item != itOrb37)
|
||||||
help += "\n\n" + other_geometry() + forbidden_unmarked();
|
appendHelp("\n\n" + other_geometry() + forbidden_unmarked());
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isElectricLand(c) || isElectricLand(cwt.at->land)) {
|
||||||
|
using namespace elec;
|
||||||
|
eCharge ch = getCharge(c);
|
||||||
|
if(ch == ecCharged) appendHelp("\n\nThis cell is charged.");
|
||||||
|
if(ch == ecGrounded) appendHelp("\n\nThis cell is grounded.");
|
||||||
|
if(ch == ecConductor) appendHelp("\n\nThis cell is currently conductive.");
|
||||||
|
if(ch == ecIsolator) appendHelp("\n\nThis cell is currently not conductive.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user