fix pai software exploit (#18368)

* fix pai software exploit

* .
This commit is contained in:
Kashargul
2025-08-29 17:05:14 +02:00
committed by GitHub
parent dc07c4413b
commit 6a8a0ce3cc
@@ -515,6 +515,10 @@
to_chat(src, span_warning("Insufficient RAM for download. (Cost [our_soft.ram_cost] : [ram] Remaining)"))
return
if(tgui_alert(src, "Do you want to download [our_soft.name]? It costs [our_soft.ram_cost], and you have [ram] remaining.", "Download [our_soft.name]", list("Yes", "No")) == "Yes")
if(!(ram >= our_soft.ram_cost))
return
if(software[our_soft.id])
return
ram -= our_soft.ram_cost
software[our_soft.id] = our_soft
to_chat(src, span_notice("You downloaded [our_soft.name]. ([ram] RAM remaining.)"))