Jump to content

How can I automatically delete the data when the map is initialized?

Closed 1.0.5

P.P
P.P

Posted (edited)

Automatically clears data on map wipe. Allows players to keep their unredeemed recyclers between wipes

 

I'm not sure how to set this up. I'm having a hard time solving it because it's not configured as a configuration example or by default.

Edited by P.P
imthenewguy

Posted

If you want all credits erased, set "Allow for recycler credits to carry over across a map wipe?" to false.

Any player that does not have the personalrecycler.use or personalrecycler.admin perks won't be given recyclers to use on wipe.

BippyMiester

Posted (edited)

Sorry replied to wrong thread.

Edited by BippyMiester
P.P

Posted

Also, several problems arose.
Debugging the plug-in and sharing which code caused the problem.

 

1. The number of available recyclers goes down to less than 0 (negative number): When subtracting the number of available recyclers in line 607, it seems to be a problem because there is no process to check whether the currently available recyclers are greater than 0. Also, I don't understand why the number of available recyclers is deducted each time it is placed. I would like it to be changed so that it is deducted only when redeeming.

2. When the base is destroyed, the recycler is also destroyed, but the recycler is created as an item at that time: Delete the item drop code on line 488, and instead copy the code on lines 238-241, modify it appropriately, and paste it below line 496 to return the number of recyclers available to the player when destroyed.

3. If you don't understand what I've explained, please contact me again.

imthenewguy

Posted

I have found the issue causing the recycler values to go negative and have patched for next release.

If you want a fix now, go into the .cs file and delete the following line:

Line 608: pi.available_recyclers--;

 

The suggestion for point 2 doesn't make any sense. The recycler is meant to revert to item form and lose condition, not be given back to the player to be redeemed again.

  • Like 1
P.P

Posted (edited)

thanks for fix it.

However, I soon discovered another problem. GroundWatch is set to false but the recycler is not destroyed.

화면 캡처 2022-12-18 004917.png

화면 캡처 2022-12-18 004935.png

Edited by P.P
add contents
imthenewguy

Posted

Setting ground watch to false means the recycler wont get destroyed when its parented entity is removed.

P.P

Posted

I think I was misinformation. What I meant was that the data's GroundWatch is False but it's not being deleted.
Configuration file GroundWatch is True. can you confirm?

imthenewguy

Posted

Pickup the entity and redeploy it to test. If it was placed before the plugin was updated, or if it was placed when the config was set to false, then it won't have the ground watch behavior. If ground watch is false when the recycler was placed down, it won't be deleted.

P.P

Posted

Thanks for the reply. I understand it as an answer that even if Ground Watch is set to True in the Data file, it will be destroyed well.

I also wish there was a command that would allow the person who installed the recycler to retrieve it back when the base is occupied or otherwise, is this possible?

imthenewguy

Posted

They only command that exists is usable when the player is looking at the recycler.

P.P

Posted

Quote

2. When the base is destroyed, the recycler is also destroyed, but the recycler is created as an item at that time: Delete the item drop code on line 488, and instead copy the code on lines 238-241, modify it appropriately, and paste it below line 496 to return the number of recyclers available to the player when destroyed.

In response to this question, I received an answer that recyclers are supposed to return to their item state and lose their state, but are at risk of being stolen by other players until they return to their item state and despawn. Could you please consider this offer again?

imthenewguy

Posted

Changed Status from Pending to Closed

1.4m

Downloads

Total number of downloads.

6.9k

Customers

Total customers served.

102.2k

Files Sold

Total number of files sold.

2m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.