Comments (4)
done this very hacky (and didn't actually make local repo to make this as PR)
ISAUI.lua
lines 137-160, replaced with:
if noPZ > 1 then
local text = "There are currently " .. noPZ .. " solar panels connected"
player:Say(text)
end
if difference > 0 then
local dtime = ((capacity - actualCharge) / difference)
local text4 = "The battery bank has enough solar panels to power my connected devices"
if dtime > 0 then
text4 = text4 .. " It will take about " .. math.abs(math.floor(dtime)) .. " hours to fully charge"
end
player:Say(text4)
end
if difference == 0 then
local text4 = "The battery bank has enough solar panels to power my connected devices but not to charge batteries"
player:Say(text4)
end
if difference < 0 then
local dtime = (actualCharge / difference)
local text4 = ""
if input > 0 then
text4 = "I need more solar panels to power my devices."
else
text4 = "Panels do not generate electricity - need to check during sunny day."
end
text4 = text4 .. " Power will remain for about " .. math.abs(math.floor(dtime)) .. "hours."
player:Say(text4)
end
if batterynumber == 0 then
local text3 = "There are no batteries to charge up the battery bank"
player:Say(text3)
end
I do hope my logic is correct.
from immersivesolararrays.
I haven't tested this but if it works I am happy to add it in, it all looks correct to me.
I don't have Zomboid installed and ready for modding at the moment, not until the end of Jan.
from immersivesolararrays.
Take your time. This is code I do use on my local copy and seems to be working fine.
from immersivesolararrays.
I have added this to the mod.
from immersivesolararrays.
Related Issues (17)
- [bug] [MP]Potential Multiplayer Issue HOT 7
- [bug] [MP?] Solars crash on powerbank placement HOT 4
- line # 93 is bugged HOT 4
- Stove use electricity when powered off. HOT 7
- [feature request] Wind turbines HOT 1
- [feature request] List Connected Devices HOT 3
- [Feature Request] Move the power bank data to a new window instead to use player:say HOT 1
- [Question] Store data in server side HOT 7
- Generators can charge batteries
- picking up battery bank do not clear panel connections HOT 4
- [Question] Looking for a little guidance on item restrictions for containers HOT 4
- [Error] function: chargeBatteries -- file: ISAPowerbank_server.lua line # 132 | MOD: Immersive Solar Arrays [23.5.1] HOT 3
- Reduce battery bank range HOT 2
- [feature request] To be possible to turn on / off battery banks HOT 1
- [bug] [sprites] Loading Issues for 41.60 MP - Dedicated Server HOT 15
- typo in loot table GarageMechanic HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from immersivesolararrays.