Coder Social home page Coder Social logo

Feature Request: ACE Arsenal about domination HOT 6 CLOSED

xeno69 avatar xeno69 commented on May 30, 2024
Feature Request: ACE Arsenal

from domination.

Comments (6)

dedmen avatar dedmen commented on May 30, 2024

The limited arsenal variant is slightly different. ACE Arsenal takes array of all Classnames without categorization. I think BI arsenal does things differently in that regard.

You definitely should not modify a static variable that is computed at gameStart.

https://ace3mod.com/wiki/framework/arsenal-framework.html#11-adding-virtual-items

from domination.

Xeno69 avatar Xeno69 commented on May 30, 2024

First of all, uiNamespace variables are getting recreated each time a player connects to a server (because of security concerns, was changed during A2/OA times).

Second, BI does it correctly and puts the virtual arsenal classes into a variable in mission namespace (ace does the same just not mission namespace).
It is never a good idea to just hope that third party users do not change those public variables.

from domination.

dedmen avatar dedmen commented on May 30, 2024

First of all, uiNamespace variables are getting recreated each time a player connects to a server (because of security concerns, was changed during A2/OA times).

Nope. Not at all. missionNamespace yes. But none of the other namespaces.

Second, BI does it correctly and puts the virtual arsenal classes into a variable in mission namespace (ace does the same just not mission namespace).

ACE arsenal does it so it doesn't have to rescan items each mission restart. Allowing for instant arsenal open without any preloading.
The ACE thing is completly different. It's a list of all existing Items in config. Selecting which items should be displayed is done later.

It is never a good idea to just hope that third party uses do not change those public variables.

Yeah sorry. Oversight by me. I already notified the arsenal author to decide if we should compileFinal that variable in the next update.

from domination.

Xeno69 avatar Xeno69 commented on May 30, 2024

Believe me, uiNamespace gets deleted when a player connects to a server otherwise one could change whatever he likes in uiNamespace in the single player editor, change scripts or whatever and do nasty things once connected.

It was a major security issue during OA times and BI changed it back then.

Compilefinal is also not a solution.
The extDB3 author added a compileFinal to the only public variable the mod has and broke all missions using it because it was no longer a boolean variable but code.

Anyway, if there is an easier solution to clean the ace arsenal array let me know.

Best solution would be to make the variable a normal mission namespace variable, that would only be filled if needed once per mission.

from domination.

dedmen avatar dedmen commented on May 30, 2024

The extDB3 author added a compileFinal to the only public variable the mod has and broke all missions using it because it was no longer a boolean variable but code.

Not a concern. no-one should be accessing that variable. And if someone does... His fault.

Believe me, uiNamespace gets deleted when a player connects to a server

I will believe you if you tell me why ACE arsenal works at all if the variable that only get's created once at gameStart gets deleted before being accessed.

Or how all my mods variables are always in uiNamespace although I only set them once at gamestart. If uiNamespace gets deleted like you say. Explain me how the variables keep existing.

Best solution would be to make the variable a normal mission namespace variable, that would only be filled if needed once per mission.

https://ace3mod.com/wiki/framework/arsenal-framework.html#11-adding-virtual-items That is how it works. And works about the same as BI arsenal.

It might very well be like that in OA. But not in A3.

from domination.

commy2 avatar commy2 commented on May 30, 2024

Believe me, uiNamespace gets deleted when a player connects to a server otherwise one could change whatever he likes in uiNamespace in the single player editor, change scripts or whatever and do nasty things once connected.

This is demonstrably wrong. In fact, this not being the case is the only reason compileFinal exists: to cache the functions library in ui namespace while at the same time be unable to inject arbitrary code.

from domination.

Related Issues (20)

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.