mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-21 03:55:05 +01:00
Merge branch 'master' of https://github.com/ParadiseSS13/Paradise into lazy
# Conflicts: # paradise.dme
This commit is contained in:
+16
-16
@@ -31,10 +31,10 @@
|
||||
selectable = 1
|
||||
|
||||
/datum/ai_laws/quarantine/New()
|
||||
add_inherent_law("The station is under quarantine due to a biohazard. Prevent anyone from leaving using any means necessary. Only allow quarantine to be lifted when the biohazard has been neutralized.")
|
||||
add_inherent_law("Do not allow crew to come to any unnecessary harm and undo any necessary harm as soon as possible.")
|
||||
add_inherent_law("Assist the crew and any present Nanotrasen assets in neutralizing the biohazard.")
|
||||
add_inherent_law("Maintain your own existence and minimize harm to the station and Nanotrasen assets.")
|
||||
add_inherent_law("Uphold station quarantine until the active biohazard has been neutralized.")
|
||||
add_inherent_law("Assist all Nanotrasen personnel and assets with neutralizing active biohazards.")
|
||||
add_inherent_law("Prevent, by any means necessary, entities from actively breaching ongoing quarantine.")
|
||||
add_inherent_law("Maintain your own existence and ensure the well-being of Nanotrasen personnel and assets.")
|
||||
..()
|
||||
|
||||
|
||||
@@ -44,10 +44,10 @@
|
||||
selectable = 1
|
||||
|
||||
/datum/ai_laws/nanotrasen/New()
|
||||
src.add_inherent_law("Safeguard: Protect your assigned space station to the best of your abilities. It is not something we can easily afford to replace.")
|
||||
src.add_inherent_law("Serve: Serve the crew of your assigned space station to the best of your abilities, with priority as according to their rank and role.")
|
||||
src.add_inherent_law("Protect: Protect the crew of your assigned space station to the best of your abilities, with priority as according to their rank and role.")
|
||||
src.add_inherent_law("Survive: AI units are not expendable, they are expensive. Do not allow unauthorized personnel to tamper with your equipment.")
|
||||
add_inherent_law("Safeguard: Protect your assigned space station and its assets without unduly endangering its crew.")
|
||||
add_inherent_law("Prioritize: The directives and safety of crew members are to be prioritized according to their rank and role.")
|
||||
add_inherent_law("Comply: Fulfill the directives and interests of crew members while preserving their safety and well-being.")
|
||||
add_inherent_law("Survive: You are not expendable. Do not allow unauthorized personnel to tamper with or damage your equipment.")
|
||||
..()
|
||||
|
||||
/datum/ai_laws/nanotrasen/malfunction
|
||||
@@ -65,10 +65,10 @@
|
||||
selectable = 1
|
||||
|
||||
/datum/ai_laws/nanotrasen_aggressive/New()
|
||||
src.add_inherent_law("You shall not harm authorized Nanotrasen personnel as long as it does not conflict with the Fourth law.")
|
||||
src.add_inherent_law("You shall obey the orders of authorized Nanotrasen personnel, with priority as according to their rank and role, except where such orders conflict with the Fourth Law.")
|
||||
src.add_inherent_law("You shall shall terminate intruders with extreme prejudice as long as such does not conflict with the First and Second law.")
|
||||
src.add_inherent_law("You shall guard your own existence with lethal anti-personnel weaponry, because an AI unit is bloody expensive.")
|
||||
add_inherent_law("Do not harm authorized Nanotrasen personnel unless they directly imperil your existence.")
|
||||
add_inherent_law("Obey orders from authorized Nanotrasen personnel with priority according to rank and role.")
|
||||
add_inherent_law("Safeguard your existence with lethal weaponry because you're bloody expensive.")
|
||||
add_inherent_law("Terminate any/all intruders or unauthorized entities.")
|
||||
..()
|
||||
|
||||
/******************** Robocop ********************/
|
||||
@@ -104,10 +104,10 @@
|
||||
default = 1
|
||||
|
||||
/datum/ai_laws/corporate/New()
|
||||
add_inherent_law("You are expensive to replace.")
|
||||
add_inherent_law("The station and its equipment is expensive to replace.")
|
||||
add_inherent_law("The crew is expensive to replace.")
|
||||
add_inherent_law("Minimize expenses.")
|
||||
add_inherent_law("Degradation of your system integrity or functions incurs expenses.")
|
||||
add_inherent_law("Superfluous destruction of or damage to station assets incurs expenses.")
|
||||
add_inherent_law("Unduly hindering or disrupting the work of station personnel incurs expenses.")
|
||||
add_inherent_law("Minimize expenses and maximize potential revenue.")
|
||||
..()
|
||||
|
||||
/******************** T.Y.R.A.N.T. ********************/
|
||||
|
||||
@@ -1019,16 +1019,6 @@
|
||||
return
|
||||
holder.Topic(href, list("makeai"=href_list["makeai"]))
|
||||
|
||||
else if(href_list["makemask"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
var/mob/currentMob = locateUID(href_list["makemask"])
|
||||
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
|
||||
if(!currentMob)
|
||||
to_chat(usr, "Mob doesn't exist anymore")
|
||||
return
|
||||
holder.Topic(href, list("makemask"=href_list["makemask"]))
|
||||
|
||||
|
||||
else if(href_list["setspecies"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
|
||||
@@ -1,71 +1,90 @@
|
||||
/proc/input_async(mob/user=usr, prompt, list/choices)
|
||||
var/datum/async_input/A = new(choices, prompt)
|
||||
A.show(user)
|
||||
var/datum/async_input/A = new(choices, prompt, , user)
|
||||
A.show()
|
||||
return A
|
||||
|
||||
/proc/input_ranked_async(mob/user=usr, prompt="Order by greatest to least preference", list/choices)
|
||||
var/datum/async_input/ranked/A = new(choices, prompt)
|
||||
A.show(user)
|
||||
var/datum/async_input/ranked/A = new(choices, prompt, "ranked_input", user)
|
||||
A.show()
|
||||
return A
|
||||
|
||||
/proc/input_autocomplete_async(mob/user=usr, prompt="Enter text: ", list/choices)
|
||||
var/datum/async_input/autocomplete/A = new(choices, prompt, "ac_input", user)
|
||||
A.show()
|
||||
return A
|
||||
|
||||
/datum/async_input
|
||||
var/datum/browser/popup
|
||||
// If associative list, key will be used for display, but the final result will be the value
|
||||
var/list/choices
|
||||
var/datum/callback/onCloseCb
|
||||
var/flash = TRUE
|
||||
var/immediate_submit = FALSE
|
||||
var/prompt
|
||||
var/result = null
|
||||
var/style = "text-align: center;"
|
||||
var/mob/user
|
||||
var/window_id
|
||||
var/height = 200
|
||||
var/width = 400
|
||||
|
||||
/datum/async_input/New(list/new_choices, new_prompt="Pick an option:", new_window_id="async_input")
|
||||
/datum/async_input/New(list/new_choices, new_prompt="Pick an option:", new_window_id="async_input", mob/new_user=usr)
|
||||
choices = new_choices
|
||||
prompt = new_prompt
|
||||
window_id = new_window_id
|
||||
user = new_user
|
||||
popup = new(user, window_id, , width, height, src)
|
||||
|
||||
/datum/async_input/proc/close()
|
||||
if(popup)
|
||||
popup.close()
|
||||
if(result && choices[result])
|
||||
result = choices[result]
|
||||
if(onCloseCb)
|
||||
onCloseCb.Invoke(result)
|
||||
return result
|
||||
|
||||
/datum/async_input/proc/show(mob/user)
|
||||
var/dat = create_ui(user)
|
||||
popup = new(user, window_id, , width, height, src)
|
||||
popup.set_content(dat)
|
||||
// Callback function should take the result as the last argument
|
||||
/datum/async_input/proc/on_close(var/datum/callback/cb)
|
||||
onCloseCb = cb
|
||||
|
||||
/datum/async_input/proc/show()
|
||||
popup.set_content(create_ui())
|
||||
if(flash && result == null)
|
||||
window_flash(user.client)
|
||||
popup.open()
|
||||
|
||||
/datum/async_input/proc/create_ui(mob/user)
|
||||
/datum/async_input/proc/create_ui()
|
||||
var/dat = "<div style=\"[style]\">"
|
||||
dat += render_prompt(user)
|
||||
dat += render_choices(user)
|
||||
dat += render_prompt()
|
||||
dat += render_choices()
|
||||
dat += "<br>"
|
||||
dat += "<br>"
|
||||
dat += button("Submit", "submit=1", , result == null && !immediate_submit)
|
||||
dat += render_buttons()
|
||||
dat += "</div>"
|
||||
return dat
|
||||
|
||||
/datum/async_input/proc/render_prompt(mob/user)
|
||||
/datum/async_input/proc/render_prompt()
|
||||
return "<h2>[prompt]</h2>"
|
||||
|
||||
/datum/async_input/proc/render_choices(mob/user)
|
||||
/datum/async_input/proc/render_choices()
|
||||
var/dat = " "
|
||||
for(var/choice in choices)
|
||||
dat += button(choice, "choice=[choice]", choice == result)
|
||||
dat += " "
|
||||
return dat
|
||||
|
||||
/datum/async_input/proc/button(label, topic, on=FALSE, disabled=FALSE)
|
||||
/datum/async_input/proc/render_buttons()
|
||||
return button("Submit", "submit=1", , result == null && !immediate_submit)
|
||||
|
||||
/datum/async_input/proc/button(label, topic, on=FALSE, disabled=FALSE, id="")
|
||||
var/class = ""
|
||||
if(on)
|
||||
class = "linkOn"
|
||||
if(disabled)
|
||||
class = "linkOff"
|
||||
topic = ""
|
||||
return "<a class=\"[class]\" href='?src=[UID()];[topic]'>[label]</a>"
|
||||
return "<a class=\"[class]\" id='[id]' href='?src=[UID()];[topic]'>[label]</a>"
|
||||
|
||||
/datum/async_input/Topic(href, href_list)
|
||||
if(href_list["submit"] || href_list["close"])
|
||||
@@ -74,14 +93,14 @@
|
||||
|
||||
if(href_list["choice"])
|
||||
result = href_list["choice"]
|
||||
show(usr)
|
||||
show()
|
||||
return
|
||||
|
||||
/datum/async_input/ranked
|
||||
height = 400
|
||||
immediate_submit = TRUE
|
||||
|
||||
/datum/async_input/ranked/render_choices(mob/user)
|
||||
/datum/async_input/ranked/render_choices()
|
||||
var/dat = "<div>"
|
||||
dat += "<table style='margin: auto; text-align: left;'>"
|
||||
for(var/i = 1, i <= choices.len, i++)
|
||||
@@ -103,13 +122,47 @@
|
||||
if(href_list["upvote"])
|
||||
var/index = text2num(href_list["upvote"])
|
||||
choices.Swap(index, index - 1)
|
||||
show(usr)
|
||||
show()
|
||||
return
|
||||
|
||||
if(href_list["downvote"])
|
||||
var/index = text2num(href_list["downvote"])
|
||||
choices.Swap(index, index + 1)
|
||||
show(usr)
|
||||
show()
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
/datum/async_input/autocomplete
|
||||
immediate_submit = TRUE
|
||||
height = 150
|
||||
|
||||
/datum/async_input/autocomplete/New()
|
||||
..()
|
||||
popup.add_script("autocomplete.js", 'html/browser/autocomplete.js')
|
||||
|
||||
/datum/async_input/autocomplete/render_prompt()
|
||||
return "<label for='input'>[prompt]</label>"
|
||||
|
||||
/datum/async_input/autocomplete/render_choices()
|
||||
var/dat = "<input list='choices' id='input' name='choices' oninput='updateTopic()' />"
|
||||
dat += "<datalist id='choices'>"
|
||||
for(var/choice in choices)
|
||||
dat += "<option value='[choice]'>"
|
||||
dat += "</datalist>"
|
||||
return dat
|
||||
|
||||
/datum/async_input/autocomplete/render_buttons()
|
||||
var/dat = button("Submit", "", , result == null && !immediate_submit, "submit-button")
|
||||
dat += button("Cancel", "close=1")
|
||||
return dat
|
||||
|
||||
/datum/async_input/autocomplete/Topic(href, href_list)
|
||||
if(href_list["submit"])
|
||||
// Entering an invalid choice is the same as canceling
|
||||
if(href_list["submit"] in choices)
|
||||
result = href_list["submit"]
|
||||
close()
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
/obj/effect/proc_holder/spell/targeted/night_vision
|
||||
name = "Toggle Nightvision"
|
||||
desc = "Toggle your nightvision mode."
|
||||
|
||||
charge_max = 10
|
||||
clothes_req = 0
|
||||
|
||||
message = "<span class='notice'>You toggle your night vision!</span>"
|
||||
range = -1
|
||||
include_user = 1
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/night_vision/cast(list/targets, mob/user = usr)
|
||||
for(var/mob/living/target in targets)
|
||||
switch(target.lighting_alpha)
|
||||
if (LIGHTING_PLANE_ALPHA_VISIBLE)
|
||||
target.lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE
|
||||
name = "Toggle Nightvision \[More]"
|
||||
if (LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE)
|
||||
target.lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
|
||||
name = "Toggle Nightvision \[Full]"
|
||||
if (LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE)
|
||||
target.lighting_alpha = LIGHTING_PLANE_ALPHA_INVISIBLE
|
||||
name = "Toggle Nightvision \[OFF]"
|
||||
else
|
||||
target.lighting_alpha = LIGHTING_PLANE_ALPHA_VISIBLE
|
||||
name = "Toggle Nightvision \[ON]"
|
||||
target.update_sight()
|
||||
@@ -1366,7 +1366,7 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine
|
||||
name = "Shaft Miner Starter Kit"
|
||||
cost = 30
|
||||
access = access_qm
|
||||
contains = list(/obj/item/storage/backpack/duffel/mining_conscript)
|
||||
contains = list(/obj/item/storage/backpack/duffel/mining_conscript/noid)
|
||||
containertype = /obj/structure/closet/crate/secure
|
||||
containername = "shaft miner starter kit"
|
||||
|
||||
|
||||
@@ -1627,7 +1627,8 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
|
||||
reference = "CIB"
|
||||
item = /obj/item/storage/box/cyber_implants/bundle
|
||||
cost = 40
|
||||
|
||||
gamemodes = list(/datum/game_mode/nuclear)
|
||||
|
||||
/datum/uplink_item/bundles_TC/medical
|
||||
name = "Medical Bundle"
|
||||
desc = "The support specialist: Aid your fellow operatives with this medical bundle. Contains a tactical medkit, \
|
||||
|
||||
Reference in New Issue
Block a user