mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 15:17:01 +01:00
Fixes an exploit with stacking igniters. Refactors some assembly flag oddities. Limits assembly holders at 12 assemblies. (#71264)
## About The Pull Request Soft revert of #71224 , Fixes #71222 Fixes an exploit involving attachment of multiple igniters to one assembly. - Multiple igniters or condensers can no longer be attached to the same assembly holder - Assembly holders have a limit of 12 assemblies maximum - I'm not sure if this is too low or limited, I picked it arbitrarily. Please inform me if it could be upped a smidge. - This lag exploit was born because of limitless assembly holders, which is a little silly even with the exploit aside. All that uncapped holders can bring are exploits or bugs, which I feel confident limited can prevent. What use is there even for having so many? - Cleans up / refactors some aspects of assemblies and assembly holders. - Assemblies had a weird wire type flag that was only ever used by signallers, but also used wrong by signallers. I did some scanning of the code and realized that ... a lot of this was just straight up unused, and not even assigned anywhere. - Now, there is a flag assembly flag var, which everything is read off of. Tested it and still seemed to all work fine. ## Why It's Good For The Game Lag exploits are bad. ## Changelog 🆑 Melbert fix: Fixed an exploit involving igniters attached to themselves. Assembly holders are now limited to 12 assemblies maximum, and you cannot attach multiple igniters to the same assembly. refactor: Refactored some assembly jank, namely in how they pulse and are pulsed. /🆑
This commit is contained in:
@@ -224,7 +224,7 @@
|
||||
var/list/stored_decals = list()
|
||||
|
||||
|
||||
/obj/item/assembly/trapdoor/pulsed(radio, mob/pulser)
|
||||
/obj/item/assembly/trapdoor/pulsed(mob/pulser)
|
||||
. = ..()
|
||||
if(linked)
|
||||
return
|
||||
@@ -307,7 +307,7 @@
|
||||
return TRUE
|
||||
|
||||
if(!internals.linked)
|
||||
internals.pulsed(pulser = user)
|
||||
internals.pulsed(user)
|
||||
// The pulse linked successfully
|
||||
if(internals.linked)
|
||||
user.balloon_alert(user, "linked")
|
||||
@@ -325,7 +325,7 @@
|
||||
icon_state = "trapdoor_pressed"
|
||||
addtimer(VARSET_CALLBACK(src, icon_state, initial(icon_state)), trapdoor_cooldown_time)
|
||||
COOLDOWN_START(src, trapdoor_cooldown, trapdoor_cooldown_time)
|
||||
internals.pulsed(pulser = user)
|
||||
internals.pulsed(user)
|
||||
return TRUE
|
||||
|
||||
#undef TRAPDOOR_LINKING_SEARCH_RANGE
|
||||
|
||||
Reference in New Issue
Block a user