Merge pull request #14971 from Arturlang/nanite_updates

Ports update appearance
This commit is contained in:
silicons
2021-08-08 04:06:18 -07:00
committed by GitHub
218 changed files with 2251 additions and 1898 deletions
+1 -1
View File
@@ -553,7 +553,7 @@ GLOBAL_LIST_EMPTY(teleportlocs)
A.power_equip = power_equip
A.power_environ = power_environ
INVOKE_ASYNC(A, .proc/power_change)
update_icon()
update_appearance()
/area/proc/usage(chan)
switch(chan)
+52 -11
View File
@@ -103,6 +103,9 @@
/// A luminescence-shifted value of the last color calculated for chatmessage overlays
var/chat_color_darkened
///Used for changing icon states for different base sprites.
var/base_icon_state
///Mobs that are currently do_after'ing this atom, to be cleared from on Destroy()
var/list/targeted_by
@@ -531,37 +534,75 @@
if(!LAZYLEN(.)) // lol ..length
return list("<span class='notice'><i>You examine [src] closer, but find nothing of interest...</i></span>")
/**
* Updates the appearence of the icon
*
* Mostly delegates to update_name, update_desc, and update_icon
*
* Arguments:
* - updates: A set of bitflags dictating what should be updated. Defaults to [ALL]
*/
/atom/proc/update_appearance(updates=ALL)
//SHOULD_NOT_SLEEP(TRUE)
//SHOULD_CALL_PARENT(TRUE)
. = NONE
updates &= ~SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_APPEARANCE, updates)
if(updates & UPDATE_NAME)
. |= update_name(updates)
if(updates & UPDATE_DESC)
. |= update_desc(updates)
if(updates & UPDATE_ICON)
. |= update_icon(updates)
/// Updates the name of the atom
/atom/proc/update_name(updates=ALL)
//SHOULD_CALL_PARENT(TRUE)
return SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_NAME, updates)
/// Updates the description of the atom
/atom/proc/update_desc(updates=ALL)
//SHOULD_CALL_PARENT(TRUE)
return SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_DESC, updates)
/// Updates the icon of the atom
/atom/proc/update_icon()
// I expect we're going to need more return flags and options in this proc
var/signalOut = SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_ICON)
. = FALSE
/atom/proc/update_icon(updates=ALL)
SIGNAL_HANDLER
//SHOULD_CALL_PARENT(TRUE)
if(!(signalOut & COMSIG_ATOM_NO_UPDATE_ICON_STATE))
. = NONE
updates &= ~SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_ICON, updates)
if(updates & UPDATE_ICON_STATE)
update_icon_state()
. = TRUE
. |= UPDATE_ICON_STATE
if(!(signalOut & COMSIG_ATOM_NO_UPDATE_OVERLAYS))
var/list/new_overlays = update_overlays()
if(updates & UPDATE_OVERLAYS)
if(LAZYLEN(managed_vis_overlays))
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
var/list/new_overlays = update_overlays(updates)
if(managed_overlays)
cut_overlay(managed_overlays)
managed_overlays = null
if(length(new_overlays))
managed_overlays = new_overlays
add_overlay(new_overlays)
. = TRUE
. |= UPDATE_OVERLAYS
SEND_SIGNAL(src, COMSIG_ATOM_UPDATED_ICON, signalOut, .)
. |= SEND_SIGNAL(src, COMSIG_ATOM_UPDATED_ICON, updates, .)
/// Updates the icon state of the atom
/atom/proc/update_icon_state()
//SHOULD_CALL_PARENT(TRUE)
return SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_ICON_STATE)
/// Updates the overlays of the atom
/atom/proc/update_overlays()
SHOULD_CALL_PARENT(TRUE)
//SHOULD_CALL_PARENT(TRUE)
. = list()
SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_OVERLAYS, .)
/atom/proc/relaymove(mob/living/user)
if(!istype(user))
return //why are you buckling nonliving mobs to atoms?
+22 -8
View File
@@ -66,7 +66,11 @@
. = ..()
switch(blocks_emissive)
if(EMISSIVE_BLOCK_GENERIC)
update_emissive_block()
var/mutable_appearance/gen_emissive_blocker = mutable_appearance(icon, icon_state, plane = EMISSIVE_PLANE, alpha = src.alpha)
gen_emissive_blocker.color = GLOB.em_block_color
gen_emissive_blocker.dir = dir
gen_emissive_blocker.appearance_flags |= appearance_flags
add_overlay(list(gen_emissive_blocker))
if(EMISSIVE_BLOCK_UNIQUE)
render_target = ref(src)
em_block = new(src, render_target)
@@ -111,13 +115,23 @@
/atom/movable/proc/update_emissive_block()
if(blocks_emissive != EMISSIVE_BLOCK_GENERIC)
return
if(length(managed_vis_overlays))
for(var/a in managed_vis_overlays)
var/obj/effect/overlay/vis/vs
if(vs.plane == EMISSIVE_BLOCKER_PLANE)
SSvis_overlays.remove_vis_overlay(src, list(vs))
break
SSvis_overlays.add_vis_overlay(src, icon, icon_state, EMISSIVE_BLOCKER_LAYER, EMISSIVE_BLOCKER_PLANE, dir)
else if (blocks_emissive == EMISSIVE_BLOCK_GENERIC)
var/mutable_appearance/gen_emissive_blocker = mutable_appearance(icon, icon_state, plane = EMISSIVE_PLANE, alpha = src.alpha)
gen_emissive_blocker.color = GLOB.em_block_color
gen_emissive_blocker.dir = dir
gen_emissive_blocker.appearance_flags |= appearance_flags
return gen_emissive_blocker
else if(blocks_emissive == EMISSIVE_BLOCK_UNIQUE)
if(!em_block)
render_target = ref(src)
em_block = new(src, render_target)
return em_block
/atom/movable/update_overlays()
. = ..()
var/emissive_block = update_emissive_block()
if(emissive_block)
. += emissive_block
/atom/movable/proc/can_zFall(turf/source, levels = 1, turf/target, direction)
if(!direction)
+20 -2
View File
@@ -148,11 +148,15 @@ Class Procs:
START_PROCESSING(SSmachines, src)
else
START_PROCESSING(SSfastprocess, src)
power_change()
RegisterSignal(src, COMSIG_ENTER_AREA, .proc/power_change)
if (occupant_typecache)
occupant_typecache = typecacheof(occupant_typecache)
return INITIALIZE_HINT_LATELOAD
/obj/machinery/LateInitialize()
. = ..()
power_change()
/obj/machinery/Destroy()
GLOB.machines.Remove(src)
@@ -176,6 +180,17 @@ Class Procs:
/obj/machinery/proc/process_atmos()//If you dont use process why are you here
return PROCESS_KILL
///Called when we want to change the value of the stat variable. Holds bitflags.
/obj/machinery/proc/set_machine_stat(new_value)
if(new_value == stat)
return
. = stat
stat = new_value
on_machine_stat_update(stat)
/obj/machinery/proc/on_machine_stat_update(stat)
return
/obj/machinery/emp_act(severity)
. = ..()
if(use_power && !stat && !(. & EMP_PROTECT_SELF))
@@ -383,8 +398,11 @@ Class Procs:
M.icon_state = "box_1"
/obj/machinery/obj_break(damage_flag)
if(!(flags_1 & NODECONSTRUCT_1))
. = ..()
if(!(stat & BROKEN) && !(flags_1 & NODECONSTRUCT_1))
stat |= BROKEN
SEND_SIGNAL(src, COMSIG_MACHINERY_BROKEN, damage_flag)
update_appearance()
return TRUE
/obj/machinery/contents_explosion(severity, target)
+1 -1
View File
@@ -407,7 +407,7 @@
/obj/machinery/camera/get_remote_view_fullscreens(mob/user)
if(view_range == short_range) //unfocused
user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 2)
user.overlay_fullscreen("remote_view", /atom/movable/screen/fullscreen/impaired, 2)
/obj/machinery/camera/update_remote_sight(mob/living/user)
user.see_invisible = SEE_INVISIBLE_LIVING //can't see ghosts through cameras
+2 -2
View File
@@ -57,8 +57,8 @@
var/overlay_state = icon_screen
if(stat & BROKEN)
overlay_state = "[icon_state]_broken"
SSvis_overlays.add_vis_overlay(src, icon, overlay_state, layer, plane, dir)
SSvis_overlays.add_vis_overlay(src, icon, overlay_state, EMISSIVE_LAYER, EMISSIVE_PLANE, dir, alpha=128)
. += mutable_appearance(icon, overlay_state)
. += emissive_appearance(icon, overlay_state)
/obj/machinery/computer/power_change()
..()
+4 -4
View File
@@ -16,10 +16,10 @@
// Stuff needed to render the map
var/map_name
var/obj/screen/map_view/cam_screen
var/atom/movable/screen/map_view/cam_screen
/// All the plane masters that need to be applied.
var/list/cam_plane_masters
var/obj/screen/background/cam_background
var/atom/movable/screen/background/cam_background
interaction_flags_machine = INTERACT_MACHINE_ALLOW_SILICON | INTERACT_MACHINE_SET_MACHINE //| INTERACT_MACHINE_REQUIRES_SIGHT
@@ -40,8 +40,8 @@
cam_screen.del_on_map_removal = FALSE
cam_screen.screen_loc = "[map_name]:1,1"
cam_plane_masters = list()
for(var/plane in subtypesof(/obj/screen/plane_master))
var/obj/screen/instance = new plane()
for(var/plane in subtypesof(/atom/movable/screen/plane_master))
var/atom/movable/screen/instance = new plane()
instance.assigned_map = map_name
instance.del_on_map_removal = FALSE
instance.screen_loc = "[map_name]:CENTER"
@@ -275,7 +275,7 @@
if(final)
playsound(origin, 'sound/machines/terminal_prompt_confirm.ogg', 25, 0)
remote_eye.setLoc(get_turf(final))
C.overlay_fullscreen("flash", /obj/screen/fullscreen/flash/static)
C.overlay_fullscreen("flash", /atom/movable/screen/fullscreen/flash/static)
C.clear_fullscreen("flash", 3) //Shorter flash than normal since it's an ~~advanced~~ console!
else
playsound(origin, 'sound/machines/terminal_prompt_deny.ogg', 25, 0)
@@ -123,7 +123,7 @@
var/list/this_pad = list()
this_pad["name"] = pad.display_name
this_pad["id"] = i
if(pad.machine_stat & NOPOWER)
if(pad.stat & NOPOWER)
this_pad["inactive"] = TRUE
pad_list += list(this_pad)
else
@@ -135,7 +135,7 @@
var/obj/machinery/mechpad/current_pad = mechpads[selected_id]
data["pad_name"] = current_pad.display_name
data["selected_pad"] = current_pad
if(QDELETED(current_pad) || (current_pad.machine_stat & NOPOWER))
if(QDELETED(current_pad) || (current_pad.stat & NOPOWER))
data["pad_active"] = FALSE
return data
data["pad_active"] = TRUE
+2 -6
View File
@@ -9,6 +9,7 @@
layer = OPEN_DOOR_LAYER
power_channel = ENVIRON
max_integrity = 350
damage_deflection = 10
armor = list("melee" = 30, "bullet" = 30, "laser" = 20, "energy" = 20, "bomb" = 10, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 70)
CanAtmosPass = ATMOS_PASS_DENSITY
flags_1 = PREVENT_CLICK_UNDER_1|DEFAULT_RICOCHET_1
@@ -38,7 +39,7 @@
var/locked = FALSE //whether the door is bolted or not.
var/assemblytype //the type of door frame to drop during deconstruction
var/datum/effect_system/spark_spread/spark_system
var/damage_deflection = 10
var/real_explosion_block //ignore this, just use explosion_block
var/red_alert_access = FALSE //if TRUE, this door will always open on red alert
var/poddoor = FALSE
@@ -223,11 +224,6 @@
return 1
return ..()
/obj/machinery/door/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
if(damage_flag == "melee" && damage_amount < damage_deflection)
return 0
. = ..()
/obj/machinery/door/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
. = ..()
if(. && obj_integrity > 0)
+15 -5
View File
@@ -79,23 +79,33 @@
if(is_station_level(z))
. += "fire_[GLOB.security_level]"
SSvis_overlays.add_vis_overlay(src, icon, "fire_[GLOB.security_level]", EMISSIVE_LAYER, EMISSIVE_PLANE, dir)
. += mutable_appearance(icon, "fire_[GLOB.security_level]")
. += emissive_appearance(icon, "fire_[GLOB.security_level]")
else
. += "fire_[SEC_LEVEL_GREEN]"
SSvis_overlays.add_vis_overlay(src, icon, "fire_[SEC_LEVEL_GREEN]", EMISSIVE_LAYER, EMISSIVE_PLANE, dir)
. += mutable_appearance(icon, "fire_[SEC_LEVEL_GREEN]")
. += emissive_appearance(icon, "fire_[SEC_LEVEL_GREEN]")
var/area/A = src.loc
A = A.loc
if(!detecting || !A.fire)
. += "fire_off"
SSvis_overlays.add_vis_overlay(src, icon, "fire_off", EMISSIVE_LAYER, EMISSIVE_PLANE, dir)
. += mutable_appearance(icon, "fire_off")
. += emissive_appearance(icon, "fire_off")
else if(obj_flags & EMAGGED)
. += "fire_emagged"
SSvis_overlays.add_vis_overlay(src, icon, "fire_emagged", EMISSIVE_LAYER, EMISSIVE_PLANE, dir)
. += mutable_appearance(icon, "fire_emagged")
. += emissive_appearance(icon, "fire_emagged")
else
. += "fire_on"
SSvis_overlays.add_vis_overlay(src, icon, "fire_on", EMISSIVE_LAYER, EMISSIVE_PLANE, dir)
. += mutable_appearance(icon, "fire_on")
. += emissive_appearance(icon, "fire_on")
if(!panel_open && detecting) //It just looks horrible with the panel open
. += "fire_detected"
. += mutable_appearance(icon, "fire_detected")
. += emissive_appearance(icon, "fire_detected") //Pain
/obj/machinery/firealarm/emp_act(severity)
. = ..()
+41 -23
View File
@@ -1,52 +1,70 @@
// the light switch
// can have multiple per area
// can also operate on non-loc area through "otherarea" var
/// The light switch. Can have multiple per area.
/obj/machinery/light_switch
name = "light switch"
icon = 'icons/obj/power.dmi'
icon_state = "light1"
plane = ABOVE_WALL_PLANE
base_icon_state = "light"
desc = "Make dark."
var/on = TRUE
var/area/area = null
var/otherarea = null
/obj/machinery/light_switch/directional/north
dir = SOUTH
pixel_y = 26
/obj/machinery/light_switch/directional/south
dir = NORTH
pixel_y = -26
/obj/machinery/light_switch/directional/east
dir = WEST
pixel_x = 26
/obj/machinery/light_switch/directional/west
dir = EAST
pixel_x = -26
/obj/machinery/light_switch/Initialize()
. = ..()
area = get_area(src)
if(istext(area))
area = text2path(area)
if(ispath(area))
area = GLOB.areas_by_type[area]
if(otherarea)
area = locate(text2path("/area/[otherarea]"))
if(!area)
area = get_area(src)
if(!name)
name = "light switch ([area.name])"
on = area.lightswitch
update_icon()
/obj/machinery/light_switch/update_appearance(updates=ALL)
. = ..()
luminosity = (stat & NOPOWER) ? 0 : 1
/obj/machinery/light_switch/update_icon_state()
if(stat & NOPOWER)
icon_state = "light-p"
else
if(on)
icon_state = "light1"
else
icon_state = "light0"
icon_state = "[base_icon_state]-p"
return ..()
icon_state = "[base_icon_state][area.lightswitch ? 1 : 0]"
return ..()
/obj/machinery/light_switch/update_overlays()
. = ..()
if(!(stat & NOPOWER))
. += emissive_appearance(icon, "[base_icon_state]-glow", alpha = src.alpha)
/obj/machinery/light_switch/examine(mob/user)
. = ..()
. += "It is [on? "on" : "off"]."
. += "It is [area.lightswitch ? "on" : "off"]."
/obj/machinery/light_switch/interact(mob/user)
. = ..()
on = !on
area.lightswitch = on
area.update_icon()
area.lightswitch = !area.lightswitch
area.update_appearance()
for(var/obj/machinery/light_switch/L in area)
L.on = on
L.update_icon()
L.update_appearance()
area.power_change()
@@ -58,7 +76,7 @@
else
stat |= NOPOWER
update_icon()
update_appearance()
/obj/machinery/light_switch/emp_act(severity)
. = ..()
@@ -30,7 +30,7 @@
integrity_failure = 0.5
armor = list("melee" = 50, "bullet" = 30, "laser" = 30, "energy" = 30, "bomb" = 30, "bio" = 0, "rad" = 0, "fire" = 90, "acid" = 90)
/// Base turret icon state
var/base_icon_state = "standard"
base_icon_state = "standard"
/// Scan range of the turret for locating targets
var/scan_range = 7
/// For turrets inside other objects
+25 -11
View File
@@ -2,6 +2,7 @@
name = "recharger"
icon = 'icons/obj/stationobjs.dmi'
icon_state = "recharger0"
base_icon_state = "recharger"
desc = "A charging dock for energy based weaponry."
use_power = IDLE_POWER_USE
idle_power_usage = 4
@@ -187,16 +188,29 @@
if(B.cell)
B.cell.charge = 0
/obj/machinery/recharger/update_appearance(updates)
. = ..()
if((stat & (NOPOWER|BROKEN)) || panel_open || !anchored)
luminosity = 0
return
luminosity = 1
/obj/machinery/recharger/update_icon_state()
/obj/machinery/recharger/update_overlays()
. = ..()
if(stat & (NOPOWER|BROKEN) || !anchored)
icon_state = "rechargeroff"
else if(panel_open)
icon_state = "rechargeropen"
else if(charging)
if(using_power)
icon_state = "recharger1"
else
icon_state = "recharger2"
else
icon_state = "recharger0"
return
if(panel_open)
. += mutable_appearance(icon, "[base_icon_state]-open", alpha = src.alpha)
return
if(!charging)
. += mutable_appearance(icon, "[base_icon_state]-empty", alpha = src.alpha)
. += emissive_appearance(icon, "[base_icon_state]-empty", alpha = src.alpha)
return
if(using_power)
. += mutable_appearance(icon, "[base_icon_state]-charging", alpha = src.alpha)
. += emissive_appearance(icon, "[base_icon_state]-charging", alpha = src.alpha)
return
. += mutable_appearance(icon, "[base_icon_state]-full", alpha = src.alpha)
. += emissive_appearance(icon, "[base_icon_state]-full", alpha = src.alpha)
@@ -12,7 +12,7 @@
var/load_audio = "sound/weapons/gun_magazine_insert_empty_1.ogg"
var/ammo_type
/obj/item/mecha_ammo/proc/update_name()
/obj/item/mecha_ammo/update_name()
if(!rounds)
name = "empty ammo box"
desc = "An exosuit ammuniton box that has since been emptied. Please recycle."
+7 -7
View File
@@ -357,22 +357,22 @@
if(0.75 to INFINITY)
occupant.clear_alert("charge")
if(0.5 to 0.75)
occupant.throw_alert("charge", /obj/screen/alert/lowcell, 1)
occupant.throw_alert("charge", /atom/movable/screen/alert/lowcell, 1)
if(0.25 to 0.5)
occupant.throw_alert("charge", /obj/screen/alert/lowcell, 2)
occupant.throw_alert("charge", /atom/movable/screen/alert/lowcell, 2)
if(0.01 to 0.25)
occupant.throw_alert("charge", /obj/screen/alert/lowcell, 3)
occupant.throw_alert("charge", /atom/movable/screen/alert/lowcell, 3)
else
occupant.throw_alert("charge", /obj/screen/alert/emptycell)
occupant.throw_alert("charge", /atom/movable/screen/alert/emptycell)
var/integrity = obj_integrity/max_integrity*100
switch(integrity)
if(30 to 45)
occupant.throw_alert("mech damage", /obj/screen/alert/low_mech_integrity, 1)
occupant.throw_alert("mech damage", /atom/movable/screen/alert/low_mech_integrity, 1)
if(15 to 35)
occupant.throw_alert("mech damage", /obj/screen/alert/low_mech_integrity, 2)
occupant.throw_alert("mech damage", /atom/movable/screen/alert/low_mech_integrity, 2)
if(-INFINITY to 15)
occupant.throw_alert("mech damage", /obj/screen/alert/low_mech_integrity, 3)
occupant.throw_alert("mech damage", /atom/movable/screen/alert/low_mech_integrity, 3)
else
occupant.clear_alert("mech damage")
var/atom/checking = occupant.loc
+1 -1
View File
@@ -73,7 +73,7 @@
M.setDir(dir)
buckled_mobs |= M
M.update_mobility()
M.throw_alert("buckled", /obj/screen/alert/restrained/buckled)
M.throw_alert("buckled", /atom/movable/screen/alert/restrained/buckled)
post_buckle_mob(M)
SEND_SIGNAL(src, COMSIG_MOVABLE_BUCKLE, M, force)
+3 -3
View File
@@ -99,8 +99,8 @@
. = ..()
if(!. && ismob(loc) && loc == usr)
var/mob/M = loc
if(!M.incapacitated() && istype(over_object, /obj/screen/inventory/hand))
var/obj/screen/inventory/hand/H = over_object
if(!M.incapacitated() && istype(over_object, /atom/movable/screen/inventory/hand))
var/atom/movable/screen/inventory/hand/H = over_object
M.putItemFromInventoryInHandIfPossible(src, H.held_index)
/obj/item/defibrillator/attackby(obj/item/W, mob/user, params)
@@ -283,7 +283,7 @@
var/combat = FALSE //If it penetrates armor and gives additional functionality
var/grab_ghost = FALSE
var/tlimit = DEFIB_TIME_LIMIT * 10
var/base_icon_state = "defibpaddles"
base_icon_state = "defibpaddles"
var/disarm_shock_time = 10
var/wielded = FALSE // track wielded status on item
+2 -2
View File
@@ -184,7 +184,7 @@
/obj/item/multitool/ai_detect/proc/show_hud(mob/user)
if(user && hud_type)
var/obj/screen/plane_master/camera_static/PM = user.hud_used.plane_masters["[CAMERA_STATIC_PLANE]"]
var/atom/movable/screen/plane_master/camera_static/PM = user.hud_used.plane_masters["[CAMERA_STATIC_PLANE]"]
PM.alpha = 150
var/datum/atom_hud/H = GLOB.huds[hud_type]
if(!H.hudusers[user])
@@ -194,7 +194,7 @@
/obj/item/multitool/ai_detect/proc/remove_hud(mob/user)
if(user && hud_type)
var/obj/screen/plane_master/camera_static/PM = user.hud_used.plane_masters["[CAMERA_STATIC_PLANE]"]
var/atom/movable/screen/plane_master/camera_static/PM = user.hud_used.plane_masters["[CAMERA_STATIC_PLANE]"]
PM.alpha = 255
var/datum/atom_hud/H = GLOB.huds[hud_type]
H.remove_hud_from(user)
@@ -130,8 +130,8 @@
. = ..()
if(ismob(loc))
var/mob/M = loc
if(!M.incapacitated() && istype(over_object, /obj/screen/inventory/hand))
var/obj/screen/inventory/hand/H = over_object
if(!M.incapacitated() && istype(over_object, /atom/movable/screen/inventory/hand))
var/atom/movable/screen/inventory/hand/H = over_object
M.putItemFromInventoryInHandIfPossible(src, H.held_index)
/obj/item/storage/portable_chem_mixer/ui_interact(mob/user, datum/tgui/ui)
+1 -1
View File
@@ -14,7 +14,7 @@ GLOBAL_LIST_INIT(gift_item_blacklist, typecacheof(list(
/obj/mafia_game_board,
/obj/docking_port,
/obj/shapeshift_holder,
/obj/screen
/atom/movable/screen
)))
GLOBAL_LIST_EMPTY(possible_gifts)
+1 -1
View File
@@ -446,7 +446,7 @@
mood_message = null
cheer_up()
/obj/item/toy/plush/proc/update_desc()
/obj/item/toy/plush/update_desc()
desc = normal_desc
if(mood_message)
desc += mood_message
+1 -1
View File
@@ -548,7 +548,7 @@
force = 3
throwforce = 3
throw_speed = 3
var/base_icon_state = "eshield" // [base_icon_state]1 for expanded, [base_icon_state]0 for contracted
base_icon_state = "eshield" // [base_icon_state]1 for expanded, [base_icon_state]0 for contracted
var/on_force = 10
var/on_throwforce = 8
var/on_throw_speed = 2
+1 -1
View File
@@ -18,7 +18,7 @@
. = ..()
update_desc()
/obj/item/stack/spacecash/proc/update_desc()
/obj/item/stack/spacecash/update_desc()
var/total_worth = get_item_credit_value()
desc = "It's worth [total_worth] credit[( total_worth > 1 ) ? "s" : ""]"
+2 -2
View File
@@ -80,8 +80,8 @@
/obj/item/watertank/MouseDrop(obj/over_object)
var/mob/M = loc
if(istype(M) && istype(over_object, /obj/screen/inventory/hand))
var/obj/screen/inventory/hand/H = over_object
if(istype(M) && istype(over_object, /atom/movable/screen/inventory/hand))
var/atom/movable/screen/inventory/hand/H = over_object
M.putItemFromInventoryInHandIfPossible(src, H.held_index)
return ..()
+2 -2
View File
@@ -889,8 +889,8 @@
M.put_in_hands(src)
to_chat(usr, "<span class='notice'>You pick up the deck.</span>")
else if(istype(over_object, /obj/screen/inventory/hand))
var/obj/screen/inventory/hand/H = over_object
else if(istype(over_object, /atom/movable/screen/inventory/hand))
var/atom/movable/screen/inventory/hand/H = over_object
if(M.putItemFromInventoryInHandIfPossible(src, H.held_index))
to_chat(usr, "<span class='notice'>You pick up the deck.</span>")
+2
View File
@@ -22,6 +22,8 @@
//returns the damage value of the attack after processing the obj's various armor protections
/obj/proc/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir, armour_penetration = 0)
if(damage_flag == MELEE && damage_amount < damage_deflection)
return 0
switch(damage_type)
if(BRUTE)
if(BURN)
+3
View File
@@ -20,6 +20,9 @@
var/max_integrity = 500
var/integrity_failure = 0 //0 if we have no special broken behavior, otherwise is a percentage of at what point the obj breaks. 0.5 being 50%
///Damage under this value will be completely ignored
var/damage_deflection = 0
var/resistance_flags = NONE // INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ON_FIRE | UNACIDABLE | ACID_PROOF
var/persistence_replacement //have something WAY too amazing to live to the next round? Set a new path here. Overuse of this var will make me upset.
@@ -86,7 +86,7 @@
. += "off"
. += "sparking"
//Overlay is similar enough for both that we can use the same mask for both
SSvis_overlays.add_vis_overlay(src, icon, "locked", EMISSIVE_LAYER, EMISSIVE_PLANE, dir, alpha)
. += emissive_appearance(icon, "locked", alpha = src.alpha)
. += locked ? "locked" : "unlocked"
@@ -356,7 +356,7 @@
return
/obj/structure/closet/MouseDrop_T(atom/movable/O, mob/living/user)
if(!istype(O) || O.anchored || istype(O, /obj/screen))
if(!istype(O) || O.anchored || istype(O, /atom/movable/screen))
return
if(!istype(user) || user.incapacitated() || user.lying)
return
@@ -531,7 +531,7 @@
/obj/structure/closet/get_remote_view_fullscreens(mob/user)
if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS)))
user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 1)
user.overlay_fullscreen("remote_view", /atom/movable/screen/fullscreen/impaired, 1)
/obj/structure/closet/emp_act(severity)
. = ..()
@@ -269,7 +269,7 @@
. += get_airlock_overlay("glass_construction", overlays_file)
. += get_airlock_overlay("panel_c[state+1]", overlays_file)
/obj/structure/door_assembly/proc/update_name()
/obj/structure/door_assembly/update_name()
name = ""
switch(state)
if(AIRLOCK_ASSEMBLY_NEEDS_WIRES)
+1 -1
View File
@@ -139,7 +139,7 @@ GLOBAL_LIST_EMPTY(bodycontainers) //Let them act as spawnpoints for revenants an
/obj/structure/bodycontainer/get_remote_view_fullscreens(mob/user)
if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS)))
user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 2)
user.overlay_fullscreen("remote_view", /atom/movable/screen/fullscreen/impaired, 2)
/*
* Morgue
*/