More runtimes (#7904)

This commit is contained in:
Raeschen
2024-03-08 13:49:41 +01:00
committed by GitHub
parent 0fdd1ffc83
commit 586c984ac1
11 changed files with 43 additions and 29 deletions

View File

@@ -139,7 +139,7 @@
max_power_rating = initial(max_power_rating) * cap_rating / 2
max_temperature = max(initial(max_temperature) - T20C, 0) * ((bin_rating * 4 + cap_rating) / 5) + T20C
air_contents.volume = max(initial(internal_volume) - 200, 0) + 200 * bin_rating
air_contents?.volume = max(initial(internal_volume) - 200, 0) + 200 * bin_rating
set_power_level(power_setting)
/obj/machinery/atmospherics/unary/heater/proc/set_power_level(var/new_power_setting)

View File

@@ -276,7 +276,7 @@ var/obj/screen/robot_inventory
else
//Modules display is hidden
//r.client.screen -= robot_inventory //"store" icon
for(var/atom/A in r.module.modules)
for(var/atom/A in r.module?.modules)
if(r.client && (A != r.module_state_1) && (A != r.module_state_2) && (A != r.module_state_3) )
//Module is not currently active
r.client.screen -= A

View File

@@ -240,6 +240,9 @@ var/list/runechat_image_cache = list()
if(!client)
return
// Source Deleting
if(QDELETED(speaker))
return
// Doesn't want to hear
if(ismob(speaker) && !client.is_preference_enabled(/datum/client_preference/runechat_mob))
return
@@ -346,7 +349,7 @@ var/list/runechat_image_cache = list()
hearing_mobs = hear["mobs"]
for(var/mob/M as anything in hearing_mobs)
if(!M.client)
if(!M?.client)
continue
M.create_chat_message(src, message, italics, classes, audible)

View File

@@ -60,7 +60,9 @@
disallow_jobhop = TRUE
pto_type = PTO_CIVILIAN
alt_titles = list("Command Liaison" = /datum/alt_title/command_liaison, "Command Assistant" = /datum/alt_title/command_assistant, "Command Intern" = /datum/alt_title/command_intern,
"Bridge Secretary" = /datum/alt_title/bridge_secretary, "Bridge Assistant" = /datum/alt_title/bridge_assistant)
"Bridge Secretary" = /datum/alt_title/bridge_secretary, "Bridge Assistant" = /datum/alt_title/bridge_assistant,
"Bridge Officer" = /datum/alt_title/bridge_officer //ChompEDIT add bridge officer
)
/datum/alt_title/command_liaison
title = "Command Liaison"

View File

@@ -112,7 +112,7 @@
user.visible_message("[user] smears paint on [src], covering the entire thing in paint.", "You smear paint on [src], changing the color of the entire thing.", runemessage = "smears paint")
update_appearance()
return
if(user.a_intent == I_HELP)
tgui_interact(user)
else
@@ -141,7 +141,8 @@
return FALSE
var/x = text2num(params["x"])
var/y = text2num(params["y"])
grid[x][y] = color
if(grid?[x]?[y])
grid[x][y] = color
used = TRUE
update_appearance()
. = TRUE
@@ -291,7 +292,7 @@
if(new_color)
selected_color = new_color
color_drop.color = new_color
cut_overlays()
if(hud_level)
add_overlay(color_drop)
@@ -320,7 +321,7 @@
refund_type = /obj/item/stack/material/wood
icon_state = "frame-empty"
build_machine_type = /obj/structure/sign/painting
/obj/structure/sign/painting
name = "Painting"
desc = "Art or \"Art\"? You decide."
@@ -478,12 +479,12 @@
/obj/structure/sign/painting/proc/load_persistent()
if(!persistence_id || !LAZYLEN(SSpersistence.unpicked_paintings))
return
var/list/painting_category = list()
for (var/list/P in SSpersistence.unpicked_paintings)
if(P["persistence_id"] == persistence_id)
painting_category[++painting_category.len] = P
var/list/painting
while(!painting)
if(!length(painting_category))
@@ -495,7 +496,7 @@
continue //and try again
painting = chosen
SSpersistence.unpicked_paintings -= list(chosen)
var/title = painting["title"]
var/author_name = painting["author"]
var/author_ckey = painting["ckey"]
@@ -504,7 +505,7 @@
var/obj/item/canvas/new_canvas
var/w = I.Width()
var/h = I.Height()
for(var/T in typesof(/obj/item/canvas))
new_canvas = T
if(initial(new_canvas.width) == w && initial(new_canvas.height) == h)
@@ -514,7 +515,7 @@
if(!new_canvas)
warning("Couldn't find a canvas to match [w]x[h] of painting")
return
new_canvas.fill_grid_from_icon(I)
new_canvas.generated_icon = I
new_canvas.icon_generated = TRUE
@@ -616,7 +617,7 @@
return
if(!current_canvas.painting_name)
current_canvas.painting_name = "Untitled Artwork"
var/data = current_canvas.get_data_string()
var/md5 = md5(lowertext(data))
for(var/list/entry in SSpersistence.all_paintings)
@@ -625,10 +626,10 @@
var/png_directory = "data/persistent/paintings/[persistence_id]/"
var/png_path = png_directory + "[md5].png"
var/result = rustg_dmi_create_png(png_path,"[current_canvas.width]","[current_canvas.height]",data)
if(result)
CRASH("Error saving persistent painting: [result]")
SSpersistence.all_paintings += list(list(
"persistence_id" = persistence_id,
"title" = current_canvas.painting_name,

View File

@@ -353,7 +353,7 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
else
//BEGIN CACHED ICON GENERATION.
var/obj/item/organ/external/chest = get_organ(BP_TORSO)
base_icon = chest.get_icon(skeleton, !wholeicontransparent)
base_icon = chest?.get_icon(skeleton, !wholeicontransparent)
var/apply_extra_transparency_leg = organs_by_name[BP_L_LEG] && organs_by_name[BP_R_LEG]
var/apply_extra_transparency_foot = organs_by_name[BP_L_FOOT] && organs_by_name[BP_R_FOOT]

View File

@@ -120,6 +120,8 @@ GLOBAL_VAR_INIT(teppi_count, 0) // How mant teppi DO we have?
var/teppi_warned = FALSE
var/teppi_mutate = FALSE //Allows Teppi to get their children's colors scrambled, and possibly other things later on!
var/teppi_growingup = FALSE // flag to prevent multiple qdels
attacktext = list("nipped", "chomped", "bonked", "stamped on")
attack_sound = 'sound/voice/teppi/roar.ogg' // make a better one idiot
friendly = list("snoofs", "nuzzles", "nibbles", "smooshes on")
@@ -687,7 +689,10 @@ GLOBAL_VAR_INIT(teppi_count, 0) // How mant teppi DO we have?
var/nutrition_cost = 500 + (nutrition / 2)
adjust_nutrition(-nutrition_cost)
new /mob/living/simple_mob/vore/alienanimals/teppi(loc, src)
qdel(src)
if(!teppi_growingup)
teppi_growingup = TRUE
qdel(src)
return
else
visible_message("\The [src] whines pathetically...", runemessage = "whines")
if(prob(50))

View File

@@ -351,8 +351,8 @@
for (var/mob/G in player_list)
if (istype(G, /mob/new_player))
continue
else if(isobserver(G) && G.is_preference_enabled(/datum/client_preference/ghost_ears && \
G.is_preference_enabled(/datum/client_preference/ghost_see_whisubtle)))
else if(isobserver(G) && G.is_preference_enabled(/datum/client_preference/ghost_ears) && \
G.is_preference_enabled(/datum/client_preference/ghost_see_whisubtle))
if(is_preference_enabled(/datum/client_preference/whisubtle_vis) || G.client.holder)
to_chat(G, "<span class='psay'>\The [M] thinks, \"[message]\"</span>")
log_say(message,M)

View File

@@ -74,11 +74,12 @@ GLOBAL_LIST_EMPTY(fusion_cores)
set_strength(target_field_strength)
spawn(1)
owned_field.process()
owned_field.stability_monitor()
owned_field.radiation_scale()
owned_field.temp_dump()
owned_field.temp_color()
if(!QDELETED(owned_field))
owned_field.process()
owned_field.stability_monitor()
owned_field.radiation_scale()
owned_field.temp_dump()
owned_field.temp_color()
/obj/machinery/power/fusion_core/Topic(href, href_list)
if(..())
@@ -166,4 +167,4 @@ GLOBAL_LIST_EMPTY(fusion_cores)
if(!owned_field)
return FALSE
owned_field.plasma_temperature = field_temperature
return TRUE
return TRUE

View File

@@ -1,3 +1,3 @@
/datum/job/secretary
alt_titles = list(
"Bridge Officer" = /decl/hierarchy/outfit/job/bridge_officer)
/datum/alt_title/bridge_officer
title = "Bridge Officer"
title_outfit = /decl/hierarchy/outfit/job/bridge_officer

View File

@@ -70,6 +70,8 @@
if(spawned)
B = P.back
P.unEquip(P.back)
if(QDELETED(B)) // for mannequins or such
return
B.forceMove(src)
rig_storage = B
P.drop_item(B)