SWU-Karabast / SWUOnline

Star Wars Unlimited Sim
GNU General Public License v3.0
41 stars 32 forks source link

DJ only returns enemy resources #260

Closed Raising closed 1 month ago

Raising commented 1 month ago

It is not tested and do not implement completely right the DJ interaction when the resource is not in your side anymore, but for most of the cases will work properly

OotTheMonk commented 1 month ago

Hi there! Did you see my message on discord? I was taking a look, and I was not very familiar with the syntax you used, I was hoping for some more explanation of how this is working the resource zone doesn't have a concept of owner (it may be one that needs to be added); so I was hoping to understand where the owner variable comes from in this case image

Raising commented 1 month ago

Ok, I just check deeper the code. I thought the
$owner = MZPlayerID($player, $resource); was the way to get the owner, not the controller

yeah, if the owner is not in the code, it probably should or you wont be able to work arroud some functionalities. I am starting to worry about scalability and performance of the code.

Any way, I created another PR that should work since I know understand better how it is implemented