Coder Social home page Coder Social logo

ecolawextensionsmod's People

Contributors

thomasfn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

ecolawextensionsmod's Issues

Game value to test height

Read y coordinate from input location and return it as float, maybe option for relative (to surface) vs absolute?

Update for Version 10

As expected beta 0.4.1 doesn't work on version 10 of the server. The following error is thrown on startup.

[23:14:09.507] [24] [Error] [Eco] Failed to start the server. Exception was Exception: ReflectionTypeLoadException
Message:Unable to load one or more of the requested types.

Source:System.Private.CoreLib

System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types.

   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.Assembly.GetTypes()
   at Eco.Shared.Utils.ReflectionCache.<>c.<GetTypesCached>b__10_0(Assembly a)
   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
   at Eco.Shared.Utils.ReflectionCache.GetTypesCached(Assembly assembly)
   at Eco.Shared.Utils.ReflectionCache.<>c.<GetGameAssembliesTypes>b__21_0(Assembly assembly)
   at System.Linq.Enumerable.SelectManySingleSelectorIterator`2.MoveNext()
   at Eco.Core.Serialization.SimpleSerializer.InitializeSerializableTypes()
   at Eco.Core.Serialization.SimpleSerializer..cctor()
System.TypeLoadException
Outer Exceptions:
One or more errors occurred. (Exception has been thrown by the target of an invocation.)
Exception has been thrown by the target of an invocation.
One or more errors occurred. (The type initializer for 'Eco.Core.Serialization.SimpleSerializer' threw an exception.)
The type initializer for 'Eco.Core.Serialization.SimpleSerializer' threw an exception.
 
[23:14:14.512] [24] [ Info] [Eco] Shutdown finished
 
[23:14:14.512] [24] [Error] [Eco] Errors report:
Failed to get derived types for 'Eco.World.Blocks.Block' in assembly 'EcoLawExtensionsMod, Version=0.4.1.0, Culture=neutral, PublicKeyToken=null' (usually safe to ignore for third party assembly). Error message: Unable to load one or more of the requested types.
: 1
Failed to start the server. Exception was Exception: ReflectionTypeLoadException
Message:Unable to load one or more of the requested types.

Source:System.Private.CoreLib

System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types.

   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.Assembly.GetTypes()
   at Eco.Shared.Utils.ReflectionCache.<>c.<GetTypesCached>b__10_0(Assembly a)
   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
   at Eco.Shared.Utils.ReflectionCache.GetTypesCached(Assembly assembly)
   at Eco.Shared.Utils.ReflectionCache.<>c.<GetGameAssembliesTypes>b__21_0(Assembly assembly)
   at System.Linq.Enumerable.SelectManySingleSelectorIterator`2.MoveNext()
   at Eco.Core.Serialization.SimpleSerializer.InitializeSerializableTypes()
   at Eco.Core.Serialization.SimpleSerializer..cctor()
System.TypeLoadException
Outer Exceptions:
One or more errors occurred. (Exception has been thrown by the target of an invocation.)
Exception has been thrown by the target of an invocation.
One or more errors occurred. (The type initializer for 'Eco.Core.Serialization.SimpleSerializer' threw an exception.)
The type initializer for 'Eco.Core.Serialization.SimpleSerializer' threw an exception.
: 1

Check Plant Growth %,

It would be nice if you could limit gathering of crops on public land via a law stating only X % grown plants could be gathered from when using the On Harvests/Hunt action.

Game value to read biome from location

Not sure if it's possible to have a picker for biome, and fairly sure biome is fractional not binary (e.g a little bit desert vs alot desert), so some investigation required to determine feasibility for this.

Game Value to test if a bank account is a government account or a private account

On WT, we have a law that should automatically transfer all income from a person to their company.

It goes like this:
On transfer money -> if receiver is employed by a company -> transfer the amount that just got transferred from the target bank account to the personal account of the company of the receiver

This also happens if the receiver is in a government office and the transaction is for government business e.g. someone buys something at a government store. In that case, the government income is rerouted to the owners company.
It would be awesome to be able to filter where the money is going in a "transfer money" trigger by having a check "is government account" for a bank account. Then we could change our law like this:

On transfer money -> if receiver is employed by a company and target bank account is not a government account -> transfer the amount to the company

Possible server crash when using law clauses affecting power grids

[15:47:37.829] [12] [Error] [Eco] System.AggregateException: One or more errors occurred. (Object reference not set to an instance of an object.)
 ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at Eco.Gameplay.Civics.Laws.LegalActions.Money.TaxPayBase_LegalAction.GovernmentTransferUsers(LocString description, Single amount, Currency currency, BankAccount governmentAccount, GameValue`1 aliasGameValue, IContextObject context, Settlement jurisdictionSettlement, Boolean canTransferNonCitizens, Boolean taxing, Boolean preventIfUnableToPay, AccountChangeSet acc)
   at Eco.Gameplay.Civics.Laws.LegalActions.Money.Pay_LegalAction.DoTransfer(LocString description, IContextObject context, Settlement jurisdictionSettlement, Single amount, Currency currency, Boolean preventIfUnableToPay, AccountChangeSet acc)
   at Eco.Gameplay.Civics.Laws.LegalActions.Money.MoneyTransferBase_LegalAction.Do(LocString description, IContextObject context, Settlement jurisdictionSettlement, AccountChangeSet acc)
   at Eco.Gameplay.Civics.Laws.LegalActions.Money.MoneyTransferBase_LegalAction.Perform(Law law, GameAction action, AccountChangeSet acc)
   at Eco.Gameplay.Civics.LegalAction.PerformAndProcessResult(Law law, GameAction action, AccountChangeSet acc)
   at Eco.Gameplay.Civics.IfThenBlock.TryPerform(Law law, GameAction action, AccountChangeSet acc, LawSection section, Int32 index, LocStringBuilder sbDebug)
   at Eco.Gameplay.Civics.Laws.LawSection.CheckConditionsAndApplyEffects(Law law, GameAction action, AccountChangeSet acc)
   at Eco.Gameplay.Civics.Laws.LawSection.InternalPerform(Law law, GameAction action, AccountChangeSet acc)
   at Eco.Gameplay.Civics.Laws.LawSection.Perform(Law law, GameAction action, AccountChangeSet acc)
   at Eco.Gameplay.Civics.Laws.Law.TryPerform(GameAction action, AccountChangeSet acc)
   at Eco.Gameplay.Civics.Laws.LawManager.Perform(GameAction action, AccountChangeSet acc)
   at Eco.Gameplay.GameActions.GameActionManager.TryPerformActions(PackFlags flags, List`1 actions, IEnumerable`1 preTests, IEnumerable`1 postEffects, AccountChangeSet acc)
   at Eco.Gameplay.GameActions.GameActionManager.TryPerformActions(User userToNotify, GameActionPack actionPack)
   at Eco.Mods.LawExtensions.PowerGridLawManager.DoLawTick(Single deltaTime)
   at Eco.Core.Utils.Threading.PeriodicWorkerFactory.<>c__DisplayClass0_0.<Create>b__0(CancellationToken token)
   at Eco.Core.Utils.Threading.RepeatableWorkerBase.DoWork(CancellationToken token)
   --- End of inner exception stack trace --- System.NullReferenceException: Object reference not set to an instance of an object.
   at Eco.Gameplay.Civics.Laws.LegalActions.Money.TaxPayBase_LegalAction.GovernmentTransferUsers(LocString description, Single amount, Currency currency, BankAccount governmentAccount, GameValue`1 aliasGameValue, IContextObject context, Settlement jurisdictionSettlement, Boolean canTransferNonCitizens, Boolean taxing, Boolean preventIfUnableToPay, AccountChangeSet acc)
   at Eco.Gameplay.Civics.Laws.LegalActions.Money.Pay_LegalAction.DoTransfer(LocString description, IContextObject context, Settlement jurisdictionSettlement, Single amount, Currency currency, Boolean preventIfUnableToPay, AccountChangeSet acc)
   at Eco.Gameplay.Civics.Laws.LegalActions.Money.MoneyTransferBase_LegalAction.Do(LocString description, IContextObject context, Settlement jurisdictionSettlement, AccountChangeSet acc)
   at Eco.Gameplay.Civics.Laws.LegalActions.Money.MoneyTransferBase_LegalAction.Perform(Law law, GameAction action, AccountChangeSet acc)
   at Eco.Gameplay.Civics.LegalAction.PerformAndProcessResult(Law law, GameAction action, AccountChangeSet acc)
   at Eco.Gameplay.Civics.IfThenBlock.TryPerform(Law law, GameAction action, AccountChangeSet acc, LawSection section, Int32 index, LocStringBuilder sbDebug)
   at Eco.Gameplay.Civics.Laws.LawSection.CheckConditionsAndApplyEffects(Law law, GameAction action, AccountChangeSet acc)
   at Eco.Gameplay.Civics.Laws.LawSection.InternalPerform(Law law, GameAction action, AccountChangeSet acc)
   at Eco.Gameplay.Civics.Laws.LawSection.Perform(Law law, GameAction action, AccountChangeSet acc)
   at Eco.Gameplay.Civics.Laws.Law.TryPerform(GameAction action, AccountChangeSet acc)
   at Eco.Gameplay.Civics.Laws.LawManager.Perform(GameAction action, AccountChangeSet acc)
   at Eco.Gameplay.GameActions.GameActionManager.TryPerformActions(PackFlags flags, List`1 actions, IEnumerable`1 preTests, IEnumerable`1 postEffects, AccountChangeSet acc)
   at Eco.Gameplay.GameActions.GameActionManager.TryPerformActions(User userToNotify, GameActionPack actionPack)
   at Eco.Mods.LawExtensions.PowerGridLawManager.DoLawTick(Single deltaTime)
   at Eco.Core.Utils.Threading.PeriodicWorkerFactory.<>c__DisplayClass0_0.<Create>b__0(CancellationToken token)
   at Eco.Core.Utils.Threading.RepeatableWorkerBase.DoWork(CancellationToken token)

Check room xp bonus

The same way we can check the bonus from each nutriments included in the food bonus, it would be interesting to also check the xp bonus provided by each type of room in the residency.

"Then" arithmetic additional choices

Can choose settlement population to do math against a settlement for funding but cannot have the left number as Demographic or seemingly only pick on active citizens.

Idea for law would be every 24 hours Pay from X account to X account Active Settlement population ABC Town Multiplied by X, if the game has a better way to do this I have not found it.

Ie

Every 24 hours pay from Global Govt to Country Govt 15 * 200 due to them having 15 citizens

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.