Hiding of resistances.

Post Reply
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Hiding of resistances.

Post by eradicator »

posila wrote:
Sat Nov 03, 2018 10:33 pm
  • Resistances/Damage types - no engine change, mods can add more damage types if they need to

What?

Ability to exclude a resitance type from all entity_info on a per-damage-type basis. (E.g. a prototye flag on the damage-types.)

Explanation:

Now that 0.17 is going to bring back the displaying of resistances i'd like the ability to not display certain resistances on entities even if they have resistance to a damage type. This is because i use uniquely named damage types to circumvent the engine limitation of not being able to know what weapon was used to cause damage on an entity. There are other hacky usages of damage types, and some mods even add a flat 100% resistance to (almost) all entities for their special script-controlled damage types to work.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Bilka
Factorio Staff
Factorio Staff
Posts: 3128
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Hiding of resistances.

Post by Bilka »

Okay, I added DamageType::hidden for 0.17.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Hiding of resistances.

Post by eradicator »

Great!

Does it come with API readability?
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

posila
Factorio Staff
Factorio Staff
Posts: 5201
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Hiding of resistances.

Post by posila »

It does. It also comes with LuaControl::character_running_speed for some reason (inside joke/poke at content of Bilka's pull request)

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Hiding of resistances.

Post by eradicator »

posila wrote:
Wed Nov 28, 2018 9:53 pm
It does. It also comes with LuaControl::character_running_speed for some reason (inside joke/poke at content of Bilka's pull request)
I...see. :ugeek:

Edit: Wait, that was weird. When i pressed quote the explanatory (brackets) weren't there yet.

Thanks again
.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Bilka
Factorio Staff
Factorio Staff
Posts: 3128
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Hiding of resistances.

Post by Bilka »

posila wrote:
Wed Nov 28, 2018 9:53 pm
It does. It also comes with LuaControl::character_running_speed for some reason (inside joke/poke at content of Bilka's pull request)
I find it awkward to make pull requests with like 10 lines of changes (or 1 line ... points at last few bugfix PRs) , so I often end up putting multiple unrelated API additions into the same pull request :D Just give me write access to master and I'll stop :P :lol:
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Hiding of resistances.

Post by eradicator »

i-can-haz-write-access.jpg
i-can-haz-write-access.jpg (98.99 KiB) Viewed 1543 times
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Post Reply

Return to “Implemented mod requests”