Fixes some verbs and gateway

This commit is contained in:
Artur
2020-09-09 21:08:16 +03:00
parent b2fb23f4b9
commit ff4c94c2d5
5 changed files with 13 additions and 15 deletions

View File

@@ -246,7 +246,6 @@
#define COMSIG_PROCESS_BORGCHARGER_OCCUPANT "living_charge" #define COMSIG_PROCESS_BORGCHARGER_OCCUPANT "living_charge"
///from base of mob/AltClickOn(): (atom/A) ///from base of mob/AltClickOn(): (atom/A)
#define COMSIG_MOB_ALTCLICKON "mob_altclickon" #define COMSIG_MOB_ALTCLICKON "mob_altclickon"
#define COMSIG_MOB_CANCEL_CLICKON (1<<0)
// /client signals // /client signals
#define COMSIG_MOB_CLIENT_LOGIN "mob_client_login" //sent when a mob/login() finishes: (client) #define COMSIG_MOB_CLIENT_LOGIN "mob_client_login" //sent when a mob/login() finishes: (client)

View File

@@ -1,7 +1,7 @@
SUBSYSTEM_DEF(statpanels) SUBSYSTEM_DEF(statpanels)
name = "Stat Panels" name = "Stat Panels"
wait = 4 wait = 4
init_order = INIT_ORDER_STATPANELS init_order = INIT_ORDER_STATPANELS //Really early so we can debug MC roundstart
runlevels = RUNLEVELS_DEFAULT | RUNLEVEL_LOBBY runlevels = RUNLEVELS_DEFAULT | RUNLEVEL_LOBBY
var/list/currentrun = list() var/list/currentrun = list()
var/encoded_global_data var/encoded_global_data
@@ -11,13 +11,12 @@ SUBSYSTEM_DEF(statpanels)
/datum/controller/subsystem/statpanels/fire(resumed = FALSE) /datum/controller/subsystem/statpanels/fire(resumed = FALSE)
if(!resumed) if(!resumed)
var/datum/map_config/cached = SSmapping.next_map_config var/datum/map_config/cached = SSmapping.next_map_config
var/round_time = world.time - SSticker.round_start_time
var/list/global_data = list( var/list/global_data = list(
"Map: [SSmapping.config?.map_name || "Loading..."]", "Map: [SSmapping.config?.map_name || "Loading..."]",
cached ? "Next Map: [cached.map_name]" : null, cached ? "Next Map: [cached.map_name]" : null,
"Round ID: [GLOB.round_id ? GLOB.round_id : "NULL"]", "Round ID: [GLOB.round_id ? GLOB.round_id : "NULL"]",
"Server Time: [time2text(world.timeofday, "YYYY-MM-DD hh:mm:ss")]", "Server Time: [time2text(world.timeofday, "YYYY-MM-DD hh:mm:ss")]",
"Round Time: [round_time > MIDNIGHT_ROLLOVER ? "[round(round_time/MIDNIGHT_ROLLOVER)]:[worldtime2text()]" : worldtime2text()]", "Round Time: [SStime_track.stat_time_text]",
"Station Time: [STATION_TIME_TIMESTAMP("hh:mm:ss", world.time)]", "Station Time: [STATION_TIME_TIMESTAMP("hh:mm:ss", world.time)]",
"Time Dilation: [round(SStime_track.time_dilation_current,1)]% AVG:([round(SStime_track.time_dilation_avg_fast,1)]%, [round(SStime_track.time_dilation_avg,1)]%, [round(SStime_track.time_dilation_avg_slow,1)]%)" "Time Dilation: [round(SStime_track.time_dilation_current,1)]% AVG:([round(SStime_track.time_dilation_avg_fast,1)]%, [round(SStime_track.time_dilation_avg,1)]%, [round(SStime_track.time_dilation_avg_slow,1)]%)"
) )

View File

@@ -11,7 +11,7 @@ GLOBAL_LIST_EMPTY(gateway_destinations)
/datum/gateway_destination /datum/gateway_destination
var/name = "Unknown Destination" var/name = "Unknown Destination"
var/wait = 0 /// How long after roundstart this destination becomes active var/wait = 0 /// How long after roundstart this destination becomes active
var/enabled = TRUE /// If disabled, the destination won't be availible var/enabled = TRUE /// If disabled, the destination won't be available
var/hidden = FALSE /// Will not show on gateway controls at all. var/hidden = FALSE /// Will not show on gateway controls at all.
/* Can a gateway link to this destination right now. */ /* Can a gateway link to this destination right now. */
@@ -19,7 +19,7 @@ GLOBAL_LIST_EMPTY(gateway_destinations)
return enabled && (world.time - SSticker.round_start_time >= wait) return enabled && (world.time - SSticker.round_start_time >= wait)
/* Returns user-friendly description why you can't connect to this destination, displayed in UI */ /* Returns user-friendly description why you can't connect to this destination, displayed in UI */
/datum/gateway_destination/proc/get_availible_reason() /datum/gateway_destination/proc/get_available_reason()
. = "Unreachable" . = "Unreachable"
if(world.time - SSticker.round_start_time < wait) if(world.time - SSticker.round_start_time < wait)
. = "Connection desynchronized. Recalibration in progress." . = "Connection desynchronized. Recalibration in progress."
@@ -52,8 +52,8 @@ GLOBAL_LIST_EMPTY(gateway_destinations)
. = list() . = list()
.["ref"] = REF(src) .["ref"] = REF(src)
.["name"] = name .["name"] = name
.["availible"] = is_available() .["available"] = is_available()
.["reason"] = get_availible_reason() .["reason"] = get_available_reason()
if(wait) if(wait)
.["timeout"] = max(1 - (wait - (world.time - SSticker.round_start_time)) / wait, 0) .["timeout"] = max(1 - (wait - (world.time - SSticker.round_start_time)) / wait, 0)
@@ -75,7 +75,7 @@ GLOBAL_LIST_EMPTY(gateway_destinations)
/datum/gateway_destination/gateway/is_available() /datum/gateway_destination/gateway/is_available()
return ..() && target_gateway.calibrated && !target_gateway.target && target_gateway.powered() return ..() && target_gateway.calibrated && !target_gateway.target && target_gateway.powered()
/datum/gateway_destination/gateway/get_availible_reason() /datum/gateway_destination/gateway/get_available_reason()
. = ..() . = ..()
if(!target_gateway.calibrated) if(!target_gateway.calibrated)
. = "Exit gateway malfunction. Manual recalibration required." . = "Exit gateway malfunction. Manual recalibration required."
@@ -217,7 +217,6 @@ GLOBAL_LIST_EMPTY(gateway_destinations)
target = D target = D
target.activate(destination) target.activate(destination)
generate_bumper() generate_bumper()
if(use_power == IDLE_POWER_USE)
use_power = ACTIVE_POWER_USE use_power = ACTIVE_POWER_USE
update_icon() update_icon()
@@ -261,8 +260,7 @@ GLOBAL_LIST_EMPTY(gateway_destinations)
if(!GLOB.the_gateway) if(!GLOB.the_gateway)
to_chat(user,"<span class='warning'>Home gateway is not responding!</span>") to_chat(user,"<span class='warning'>Home gateway is not responding!</span>")
if(GLOB.the_gateway.target) if(GLOB.the_gateway.target)
to_chat(user,"<span class='warning'>Home gateway already in use!</span>") GLOB.the_gateway.deactivate() //this will turn the home gateway off so that it's free for us to connect to
return
activate(GLOB.the_gateway.destination) activate(GLOB.the_gateway.destination)
else else
deactivate() deactivate()

View File

@@ -8,7 +8,9 @@
/mob/living/carbon/human/Initialize() /mob/living/carbon/human/Initialize()
add_verb(src, /mob/living/proc/mob_sleep) add_verb(src, /mob/living/proc/mob_sleep)
add_verb(src, /mob/living/proc/lay_down) add_verb(src, /mob/living/proc/lay_down)
add_verb(src, /mob/living/carbon/human/verb/underwear_toggle)
add_verb(src, /mob/living/verb/subtle)
add_verb(src, /mob/living/verb/subtler)
//initialize limbs first //initialize limbs first
create_bodyparts() create_bodyparts()

File diff suppressed because one or more lines are too long