mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 05:30:05 +01:00
Merge branch 'master' of https://github.com/Skyrat-SS13/Skyrat-tg into upstream-2407c
This commit is contained in:
@@ -59,27 +59,7 @@
|
||||
post_status(picture)
|
||||
else
|
||||
if(picture == "currentalert") // You cannot set Code Blue display during Code Red and similiar
|
||||
switch(SSsecurity_level.get_current_level_as_number())
|
||||
if(SEC_LEVEL_DELTA)
|
||||
post_status("alert", "deltaalert")
|
||||
if(SEC_LEVEL_RED)
|
||||
post_status("alert", "redalert")
|
||||
if(SEC_LEVEL_BLUE)
|
||||
post_status("alert", "bluealert")
|
||||
if(SEC_LEVEL_GREEN)
|
||||
post_status("alert", "greenalert")
|
||||
// SKYRAT EDIT ADD START - Alert Levels
|
||||
if(SEC_LEVEL_VIOLET)
|
||||
post_status("alert", "violetalert")
|
||||
if(SEC_LEVEL_ORANGE)
|
||||
post_status("alert", "orangealert")
|
||||
if(SEC_LEVEL_AMBER)
|
||||
post_status("alert", "amberalert")
|
||||
if(SEC_LEVEL_EPSILON)
|
||||
post_status("alert", "epsilonalert")
|
||||
if(SEC_LEVEL_GAMMA)
|
||||
post_status("alert", "gammaalert")
|
||||
// SKYRAT EDIT ADD END - Alert Levels
|
||||
post_status("alert", SSsecurity_level?.current_security_level?.status_display_icon_state || "greenalert")
|
||||
else
|
||||
post_status("alert", picture)
|
||||
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
return data
|
||||
data += list(
|
||||
"nodes" = list(),
|
||||
"queue_nodes" = stored_research.research_queue_nodes,
|
||||
"experiments" = list(),
|
||||
"researched_designs" = stored_research.researched_designs,
|
||||
"points" = stored_research.research_points,
|
||||
@@ -64,6 +65,10 @@
|
||||
// Serialize all nodes to display
|
||||
for(var/tier in stored_research.tiers)
|
||||
var/datum/techweb_node/node = SSresearch.techweb_node_by_id(tier)
|
||||
var/enqueued_by_user = FALSE
|
||||
|
||||
if((tier in stored_research.research_queue_nodes) && stored_research.research_queue_nodes[tier] == user)
|
||||
enqueued_by_user = TRUE
|
||||
|
||||
// Ensure node is supposed to be visible
|
||||
if (stored_research.hidden_nodes[tier])
|
||||
@@ -71,8 +76,11 @@
|
||||
|
||||
data["nodes"] += list(list(
|
||||
"id" = node.id,
|
||||
"is_free" = node.is_free(stored_research),
|
||||
"can_unlock" = stored_research.can_unlock_node(node),
|
||||
"tier" = stored_research.tiers[node.id]
|
||||
"have_experiments_done" = stored_research.have_experiments_for_node(node),
|
||||
"tier" = stored_research.tiers[node.id],
|
||||
"enqueued_by_user" = enqueued_by_user
|
||||
))
|
||||
|
||||
// Get experiments and serialize them
|
||||
@@ -111,6 +119,12 @@
|
||||
if ("researchNode")
|
||||
research_node(params["node_id"], usr)
|
||||
return TRUE
|
||||
if ("enqueueNode")
|
||||
enqueue_node(params["node_id"], usr)
|
||||
return TRUE
|
||||
if ("dequeueNode")
|
||||
dequeue_node(params["node_id"], usr)
|
||||
return TRUE
|
||||
|
||||
/datum/computer_file/program/science/ui_static_data(mob/user)
|
||||
. = list(
|
||||
@@ -188,6 +202,20 @@
|
||||
id_cache_seq += 1
|
||||
return id_cache[id]
|
||||
|
||||
/datum/computer_file/program/science/proc/enqueue_node(id, mob/user)
|
||||
if(!stored_research || !stored_research.available_nodes[id] || stored_research.researched_nodes[id])
|
||||
computer.say("Node enqueue failed: Either no techweb is found, node is already researched or is not available!")
|
||||
return FALSE
|
||||
stored_research.enqueue_node(id, user)
|
||||
return TRUE
|
||||
|
||||
/datum/computer_file/program/science/proc/dequeue_node(id, mob/user)
|
||||
if(!stored_research || !stored_research.available_nodes[id] || stored_research.researched_nodes[id])
|
||||
computer.say("Node dequeue failed: Either no techweb is found, node is already researched or is not available!")
|
||||
return FALSE
|
||||
stored_research.dequeue_node(id, user)
|
||||
return TRUE
|
||||
|
||||
/datum/computer_file/program/science/proc/research_node(id, mob/user)
|
||||
if(!stored_research || !stored_research.available_nodes[id] || stored_research.researched_nodes[id])
|
||||
computer.say("Node unlock failed: Either no techweb is found, node is already researched or is not available!")
|
||||
|
||||
Reference in New Issue
Block a user