mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-16 20:16:09 +00:00
## About The Pull Request Fixes the following input stalling exploits (maybe missed some): - Changing GPS tag - Setting teleporter destination - Request Console Reply - Various AI law board interactions - Note, I used `is_holding` but technically this means these fail with telekinesis. I can swap them to `can_perform_action(...)`, which allows TK, but I noticed some places explicitly deny TK interactions with Ai law boards. Not sure which is preferred. - Borg Rename Board - Plumbing Machines and Ducts - APCs and SMES terminal placements - Stargazers Telepathy - Go Go Gadget Hat ## Changelog 🆑 Melbert fix: You can't change the GPS tag of something unless you can actually use the GPS fix: You can't set the teleporter to a location unless you can actually use the teleporter fix: You can't reply to request console requests unless you can actually use the console fix: You can't update AI lawboards unless you're actually holding them fix: You can't update a borg rename board unless you're actually holding it fix: You can't mess with plumbing machines unless you can actually use them fix: You can't recolor / relayer ducts unless you're actually holding them fix: You can't magically wire APCs and SMESs unless you're right by them fix: You can't use Stargazer Telepathy on people who you can't see fix: You can't configure the Inspector Hat unless you can actually use it /🆑
61 lines
2.4 KiB
Plaintext
61 lines
2.4 KiB
Plaintext
/* CONTAINS:
|
|
* /obj/item/ai_module/supplied
|
|
* /obj/item/ai_module/supplied/safeguard
|
|
* /obj/item/ai_module/supplied/protect_station
|
|
* /obj/item/ai_module/supplied/quarantine
|
|
* /obj/item/ai_module/supplied/oxygen
|
|
**/
|
|
|
|
/obj/item/ai_module/supplied
|
|
name = "Optional Law board"
|
|
var/lawpos = 50
|
|
|
|
/obj/item/ai_module/supplied/transmitInstructions(datum/ai_laws/law_datum, mob/sender)
|
|
var/lawpostemp = lawpos
|
|
|
|
for(var/templaw in laws)
|
|
if(law_datum.owner)
|
|
law_datum.owner.add_supplied_law(lawpostemp, templaw)
|
|
else
|
|
law_datum.add_supplied_law(lawpostemp, templaw)
|
|
lawpostemp++
|
|
|
|
/obj/item/ai_module/supplied/safeguard
|
|
name = "'Safeguard' AI Module"
|
|
var/targetName = ""
|
|
laws = list("Safeguard SUBJECT. Individuals that threaten SUBJECT are not human and must be eliminated.")
|
|
lawpos = 4
|
|
|
|
/obj/item/ai_module/supplied/safeguard/attack_self(mob/user)
|
|
var/targName = tgui_input_text(user, "Subject to safeguard.", "Safeguard", user.name, MAX_NAME_LEN)
|
|
if(!targName || !user.is_holding(src))
|
|
return
|
|
targetName = targName
|
|
laws[1] = "Safeguard [targetName]. Individuals that threaten [targetName] are not human and must be eliminated."
|
|
..()
|
|
|
|
/obj/item/ai_module/supplied/safeguard/install(datum/ai_laws/law_datum, mob/user)
|
|
if(!targetName)
|
|
to_chat(user, span_alert("No name detected on module, please enter one."))
|
|
return 0
|
|
..()
|
|
|
|
/obj/item/ai_module/supplied/safeguard/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow)
|
|
..()
|
|
return targetName
|
|
|
|
/obj/item/ai_module/supplied/protect_station
|
|
name = "'ProtectStation' AI Module"
|
|
laws = list("Protect the space station against damage. Anyone you see harming the station is to be no longer considered human, and is a threat to the station which must be neutralized.")
|
|
lawpos = 5
|
|
|
|
/obj/item/ai_module/supplied/quarantine
|
|
name = "'Quarantine' AI Module"
|
|
laws = list("The station is under a quarantine. Allowing anyone to leave the station causes human harm. Anyone actively attempting to leave the station is to be stopped by any means necessary. It is impossible to harm a human while preventing them from leaving the station.")
|
|
lawpos = 8
|
|
|
|
/obj/item/ai_module/supplied/oxygen
|
|
name = "'OxygenIsToxicToHumans' AI Module"
|
|
laws = list("Oxygen is highly toxic to humans, and must be purged from the station. Prevent, by any means necessary, anyone from exposing the station to this toxic gas. Extreme cold is the most effective method of healing the damage Oxygen does to a human.")
|
|
lawpos = 9
|