Merge branch 'master' into familyport
This commit is contained in:
@@ -1,182 +0,0 @@
|
||||
GLOBAL_LIST_EMPTY(active_alternate_appearances)
|
||||
|
||||
|
||||
/atom
|
||||
var/list/alternate_appearances
|
||||
|
||||
/atom/proc/remove_alt_appearance(key)
|
||||
if(alternate_appearances)
|
||||
for(var/K in alternate_appearances)
|
||||
var/datum/atom_hud/alternate_appearance/AA = alternate_appearances[K]
|
||||
if(AA.appearance_key == key)
|
||||
AA.remove_from_hud(src)
|
||||
break
|
||||
|
||||
/atom/proc/add_alt_appearance(type, key, ...)
|
||||
if(!type || !key)
|
||||
return
|
||||
if(alternate_appearances && alternate_appearances[key])
|
||||
return
|
||||
var/list/arguments = args.Copy(2)
|
||||
new type(arglist(arguments))
|
||||
|
||||
/datum/atom_hud/alternate_appearance
|
||||
var/appearance_key
|
||||
|
||||
/datum/atom_hud/alternate_appearance/New(key)
|
||||
..()
|
||||
GLOB.active_alternate_appearances += src
|
||||
appearance_key = key
|
||||
|
||||
/datum/atom_hud/alternate_appearance/Destroy()
|
||||
GLOB.active_alternate_appearances -= src
|
||||
return ..()
|
||||
|
||||
/datum/atom_hud/alternate_appearance/proc/onNewMob(mob/M)
|
||||
if(mobShouldSee(M))
|
||||
add_hud_to(M)
|
||||
|
||||
/datum/atom_hud/alternate_appearance/proc/mobShouldSee(mob/M)
|
||||
return FALSE
|
||||
|
||||
/datum/atom_hud/alternate_appearance/add_to_hud(atom/A, image/I)
|
||||
. = ..()
|
||||
if(.)
|
||||
LAZYINITLIST(A.alternate_appearances)
|
||||
A.alternate_appearances[appearance_key] = src
|
||||
|
||||
/datum/atom_hud/alternate_appearance/remove_from_hud(atom/A)
|
||||
. = ..()
|
||||
if(.)
|
||||
LAZYREMOVE(A.alternate_appearances, appearance_key)
|
||||
|
||||
|
||||
//an alternate appearance that attaches a single image to a single atom
|
||||
/datum/atom_hud/alternate_appearance/basic
|
||||
var/atom/target
|
||||
var/image/theImage
|
||||
var/add_ghost_version = FALSE
|
||||
var/ghost_appearance
|
||||
|
||||
/datum/atom_hud/alternate_appearance/basic/New(key, image/I, target_sees_appearance = TRUE)
|
||||
..()
|
||||
theImage = I
|
||||
target = I.loc
|
||||
hud_icons = list(appearance_key)
|
||||
add_to_hud(target, I)
|
||||
if(target_sees_appearance && ismob(target))
|
||||
add_hud_to(target)
|
||||
if(add_ghost_version)
|
||||
var/image/ghost_image = image(icon = I.icon , icon_state = I.icon_state, loc = I.loc)
|
||||
ghost_image.override = FALSE
|
||||
ghost_image.alpha = 128
|
||||
ghost_appearance = new /datum/atom_hud/alternate_appearance/basic/observers(key + "_observer", ghost_image, FALSE)
|
||||
|
||||
/datum/atom_hud/alternate_appearance/basic/Destroy()
|
||||
. = ..()
|
||||
if(ghost_appearance)
|
||||
QDEL_NULL(ghost_appearance)
|
||||
|
||||
/datum/atom_hud/alternate_appearance/basic/add_to_hud(atom/A)
|
||||
LAZYINITLIST(A.hud_list)
|
||||
A.hud_list[appearance_key] = theImage
|
||||
. = ..()
|
||||
|
||||
/datum/atom_hud/alternate_appearance/basic/remove_from_hud(atom/A)
|
||||
. = ..()
|
||||
A.hud_list -= appearance_key
|
||||
if(. && !QDELETED(src))
|
||||
qdel(src)
|
||||
|
||||
/datum/atom_hud/alternate_appearance/basic/everyone
|
||||
add_ghost_version = TRUE
|
||||
|
||||
/datum/atom_hud/alternate_appearance/basic/everyone/New()
|
||||
..()
|
||||
for(var/mob in GLOB.mob_list)
|
||||
if(mobShouldSee(mob))
|
||||
add_hud_to(mob)
|
||||
|
||||
/datum/atom_hud/alternate_appearance/basic/everyone/mobShouldSee(mob/M)
|
||||
return !isobserver(M)
|
||||
|
||||
/datum/atom_hud/alternate_appearance/basic/silicons
|
||||
|
||||
/datum/atom_hud/alternate_appearance/basic/silicons/New()
|
||||
..()
|
||||
for(var/mob in GLOB.silicon_mobs)
|
||||
if(mobShouldSee(mob))
|
||||
add_hud_to(mob)
|
||||
|
||||
/datum/atom_hud/alternate_appearance/basic/silicons/mobShouldSee(mob/M)
|
||||
if(issilicon(M))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/datum/atom_hud/alternate_appearance/basic/observers
|
||||
add_ghost_version = FALSE //just in case, to prevent infinite loops
|
||||
|
||||
/datum/atom_hud/alternate_appearance/basic/observers/New()
|
||||
..()
|
||||
for(var/mob in GLOB.dead_mob_list)
|
||||
if(mobShouldSee(mob))
|
||||
add_hud_to(mob)
|
||||
|
||||
/datum/atom_hud/alternate_appearance/basic/observers/mobShouldSee(mob/M)
|
||||
return isobserver(M)
|
||||
|
||||
/datum/atom_hud/alternate_appearance/basic/noncult
|
||||
|
||||
/datum/atom_hud/alternate_appearance/basic/noncult/New()
|
||||
..()
|
||||
for(var/mob in GLOB.player_list)
|
||||
if(mobShouldSee(mob))
|
||||
add_hud_to(mob)
|
||||
|
||||
/datum/atom_hud/alternate_appearance/basic/noncult/mobShouldSee(mob/M)
|
||||
if(!iscultist(M))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/datum/atom_hud/alternate_appearance/basic/cult
|
||||
|
||||
/datum/atom_hud/alternate_appearance/basic/cult/New()
|
||||
..()
|
||||
for(var/mob in GLOB.player_list)
|
||||
if(mobShouldSee(mob))
|
||||
add_hud_to(mob)
|
||||
|
||||
/datum/atom_hud/alternate_appearance/basic/cult/mobShouldSee(mob/M)
|
||||
if(iscultist(M))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/datum/atom_hud/alternate_appearance/basic/blessedAware
|
||||
|
||||
/datum/atom_hud/alternate_appearance/basic/blessedAware/New()
|
||||
..()
|
||||
for(var/mob in GLOB.mob_list)
|
||||
if(mobShouldSee(mob))
|
||||
add_hud_to(mob)
|
||||
|
||||
/datum/atom_hud/alternate_appearance/basic/blessedAware/mobShouldSee(mob/M)
|
||||
if(M.mind && (M.mind.assigned_role == "Chaplain"))
|
||||
return TRUE
|
||||
if (istype(M, /mob/living/simple_animal/hostile/construct/wraith))
|
||||
return TRUE
|
||||
if(isrevenant(M) || iseminence(M) || iswizard(M))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/datum/atom_hud/alternate_appearance/basic/onePerson
|
||||
var/mob/seer
|
||||
|
||||
/datum/atom_hud/alternate_appearance/basic/onePerson/mobShouldSee(mob/M)
|
||||
if(M == seer)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/datum/atom_hud/alternate_appearance/basic/onePerson/New(key, image/I, mob/living/M)
|
||||
..(key, I, FALSE)
|
||||
seer = M
|
||||
add_hud_to(seer)
|
||||
@@ -50,7 +50,12 @@
|
||||
|
||||
var/has_gravity = FALSE
|
||||
|
||||
var/parallax_movedir = 0
|
||||
/// Parallax moving?
|
||||
var/parallax_moving = FALSE
|
||||
/// Parallax move speed - 0 to disable
|
||||
var/parallax_move_speed = 0
|
||||
/// Parallax move dir - degrees clockwise from north
|
||||
var/parallax_move_angle = 0
|
||||
|
||||
var/list/ambientsounds = GENERIC
|
||||
flags_1 = CAN_BE_DIRTY_1
|
||||
|
||||
@@ -0,0 +1,175 @@
|
||||
/area/edina
|
||||
name = "Nova Edina wilderness"
|
||||
icon_state = "edina"
|
||||
has_gravity = STANDARD_GRAVITY
|
||||
clockwork_warp_allowed = FALSE // Can servants warp into this area from Reebe?
|
||||
clockwork_warp_fail = "The aurora borealis is interfering with your teleport! Try somewhere closer to the city."
|
||||
always_unpowered = TRUE
|
||||
|
||||
//dynamic_lighting = DYNAMIC_LIGHTING_DISABLED
|
||||
power_light = FALSE
|
||||
power_equip = FALSE
|
||||
power_environ = FALSE
|
||||
outdoors = TRUE
|
||||
//ambientsounds = SPACE //For later
|
||||
|
||||
/area/edina/backstreet
|
||||
name = "Nova Edina backstreets"
|
||||
icon_state = "edina_alley"
|
||||
clockwork_warp_allowed = TRUE
|
||||
ambientsounds = MAINTENANCE
|
||||
always_unpowered = FALSE //Sure you can have power if you want
|
||||
|
||||
/area/edina/backstreet/supply
|
||||
name = "Supply Backstreets"
|
||||
icon_state = "edina_alley"
|
||||
clockwork_warp_allowed = TRUE
|
||||
ambientsounds = MAINTENANCE
|
||||
always_unpowered = FALSE //Sure you can have power if you want
|
||||
|
||||
/area/edina/backstreet/research
|
||||
name = "Research Backstreets"
|
||||
icon_state = "edina_alley"
|
||||
clockwork_warp_allowed = TRUE
|
||||
ambientsounds = MAINTENANCE
|
||||
always_unpowered = FALSE //Sure you can have power if you want
|
||||
|
||||
/area/edina/backstreet/med
|
||||
name = "Hospital Backstreets"
|
||||
icon_state = "edina_alley"
|
||||
clockwork_warp_allowed = TRUE
|
||||
ambientsounds = MAINTENANCE
|
||||
always_unpowered = FALSE //Sure you can have power if you want
|
||||
|
||||
///Nova Edina Streets///
|
||||
|
||||
|
||||
/area/edina/street
|
||||
name = "Nova Edina Streets"
|
||||
icon_state = "edina_street"
|
||||
ambientsounds = null //TODO:add ?
|
||||
always_unpowered = FALSE //Sure you can have power if you want
|
||||
|
||||
/area/edina/street/primary
|
||||
name = "Nova Edina Streets"
|
||||
icon_state = "edina_street"
|
||||
ambientsounds = null //TODO:add ?
|
||||
|
||||
/area/edina/street/primary/princess
|
||||
name = "Princess Street"
|
||||
icon_state = "edina_street"
|
||||
ambientsounds = null //TODO:add ?
|
||||
|
||||
/area/edina/street/primary/progress
|
||||
name = "Progress Street"
|
||||
icon_state = "edina_street"
|
||||
ambientsounds = null //TODO:add ?
|
||||
|
||||
/area/edina/street/primary/perimeter
|
||||
name = "Perimeter Way"
|
||||
icon_state = "edina_street"
|
||||
ambientsounds = null //TODO:add ?
|
||||
|
||||
/area/edina/street/primary/servitor
|
||||
name = "Servitor Street"
|
||||
icon_state = "edina_street"
|
||||
ambientsounds = null //TODO:add ?
|
||||
|
||||
/area/edina/street/secondary
|
||||
name = "Nova Edina Streets"
|
||||
icon_state = "edina_street2"
|
||||
ambientsounds = null //TODO:add ?
|
||||
|
||||
/area/edina/street/secondary/command
|
||||
name = "Command Court"
|
||||
icon_state = "edina_street2"
|
||||
ambientsounds = null //TODO:add ?
|
||||
|
||||
/area/edina/street/secondary/supply
|
||||
name = "Supply Street"
|
||||
icon_state = "edina_street2"
|
||||
ambientsounds = null //TODO:add ?
|
||||
|
||||
/area/edina/street/secondary/castle
|
||||
name = "Castle Way"
|
||||
icon_state = "edina_street2"
|
||||
ambientsounds = null //TODO:add ?
|
||||
|
||||
/area/edina/street/secondary/aux
|
||||
name = "Auxiliary Avenue"
|
||||
icon_state = "edina_street2"
|
||||
ambientsounds = null //TODO:add ?
|
||||
|
||||
/area/edina/street/intersection
|
||||
name = "Nova Edina Streets"
|
||||
icon_state = "edina_street2"
|
||||
ambientsounds = null //TODO:add ?
|
||||
|
||||
/area/edina/street/intersection/princessprogress
|
||||
name = "Princess & Progress"
|
||||
icon_state = "edina_street2"
|
||||
ambientsounds = null //TODO:add ?
|
||||
|
||||
/area/edina/street/intersection/princessperimeter
|
||||
name = "Princess & Perimeter"
|
||||
icon_state = "edina_street2"
|
||||
ambientsounds = null //TODO:add ?
|
||||
|
||||
/area/edina/street/intersection/princessperimeter/north
|
||||
name = "Perimeter & N Princess"
|
||||
icon_state = "edina_street2"
|
||||
ambientsounds = null //TODO:add ?
|
||||
|
||||
/area/edina/street/intersection/princessperimeter/south
|
||||
name = "Perimeter & S Princess"
|
||||
icon_state = "edina_street2"
|
||||
ambientsounds = null //TODO:add ?
|
||||
|
||||
/area/edina/street/intersection/princessservitor
|
||||
name = "Servitor & Princess"
|
||||
icon_state = "edina_street2"
|
||||
ambientsounds = null //TODO:add ?
|
||||
|
||||
/area/edina/street/intersection/servsuppaux
|
||||
name = "Servitor, Supply, & Auxiliary"
|
||||
icon_state = "edina_street2"
|
||||
ambientsounds = null //TODO:add ?
|
||||
|
||||
/area/edina/street/intersection/progcastaux
|
||||
name = "Progress, Castle, & Auxiliary"
|
||||
icon_state = "edina_street2"
|
||||
ambientsounds = null //TODO:add ?
|
||||
|
||||
/area/edina/street/street2 //Just so laying areas is easier
|
||||
icon_state = "edina_street2"
|
||||
|
||||
/area/edina/protected //Prevents ice storms
|
||||
name = "Sheltered Nova Edina"
|
||||
|
||||
/////////////////Edina specific derivitives///////////////////////////////////
|
||||
|
||||
/area/edina/crew_quarters
|
||||
clockwork_warp_allowed = TRUE
|
||||
area_flags = BLOBS_ALLOWED | VALID_TERRITORY
|
||||
|
||||
/area/edina/crew_quarters/holo_atrium
|
||||
name = "Hologram atrium"
|
||||
|
||||
/area/edina/crew_quarters/store/clothes
|
||||
name = "Clothes Store"
|
||||
|
||||
/area/edina/crew_quarters/store/plushies
|
||||
name = "Plushies Store"
|
||||
|
||||
/area/edina/crew_quarters/store/pet
|
||||
name = "Pet Store"
|
||||
|
||||
////////////////Mapping helper/////////////////////////
|
||||
/obj/effect/mapping_helpers/planet_z
|
||||
name = "planet z helper"
|
||||
layer = POINT_LAYER
|
||||
|
||||
/obj/effect/mapping_helpers/planet_z/Initialize()
|
||||
. = ..()
|
||||
var/datum/space_level/S = SSmapping.get_level(z)
|
||||
S.traits["Planet"] = TRUE //This probably doesn't work as I expect. But maybe!!
|
||||
+22
-8
@@ -596,9 +596,13 @@
|
||||
//SHOULD_CALL_PARENT(TRUE)
|
||||
return SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_ICON_STATE)
|
||||
|
||||
/// Updates the overlays of the atom
|
||||
/**
|
||||
* Builds a list of overlays for the atom, this will not apply them.
|
||||
* If you need to update overlays, use [update_icon(UPDATE_OVERLAYS)],
|
||||
* This proc is intended to be overridden.
|
||||
*/
|
||||
/atom/proc/update_overlays()
|
||||
//SHOULD_CALL_PARENT(TRUE)
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
. = list()
|
||||
SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_OVERLAYS, .)
|
||||
|
||||
@@ -610,12 +614,12 @@
|
||||
user.buckle_message_cooldown = world.time + 50
|
||||
to_chat(user, "<span class='warning'>You can't move while buckled to [src]!</span>")
|
||||
|
||||
/atom/proc/contents_explosion(severity, target)
|
||||
/atom/proc/contents_explosion(severity, target, origin)
|
||||
return //For handling the effects of explosions on contents that would not normally be effected
|
||||
|
||||
/atom/proc/ex_act(severity, target, datum/explosion/E)
|
||||
/atom/proc/ex_act(severity, target, origin)
|
||||
set waitfor = FALSE
|
||||
contents_explosion(severity, target)
|
||||
contents_explosion(severity, target, origin)
|
||||
SEND_SIGNAL(src, COMSIG_ATOM_EX_ACT, severity, target)
|
||||
|
||||
/**
|
||||
@@ -1287,9 +1291,7 @@
|
||||
|
||||
/obj/item/update_filters()
|
||||
. = ..()
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtonIcon()
|
||||
update_action_buttons()
|
||||
|
||||
/atom/proc/get_filter(name)
|
||||
if(filter_data && filter_data[name])
|
||||
@@ -1400,3 +1402,15 @@
|
||||
*/
|
||||
/atom/proc/setClosed()
|
||||
return
|
||||
|
||||
//Update the screentip to reflect what we're hoverin over
|
||||
/atom/MouseEntered(location, control, params)
|
||||
. = ..()
|
||||
// Statusbar
|
||||
// status_bar_set_text(usr, name)
|
||||
// Screentips
|
||||
// if(usr?.hud_used)
|
||||
// if(!usr.client?.prefs.screentip_pref || (flags_1 & NO_SCREENTIPS_1))
|
||||
// usr.hud_used.screentip_text.maptext = ""
|
||||
// else
|
||||
// usr.hud_used.screentip_text.maptext = MAPTEXT("<span style='text-align: center'><span style='font-size: 32px'><span style='color:[usr.client.prefs.screentip_color]: 32px'>[name]</span>")
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
var/pass_flags = 0
|
||||
var/moving_diagonally = 0 //0: not doing a diagonal move. 1 and 2: doing the first/second step of the diagonal move
|
||||
var/atom/movable/moving_from_pull //attempt to resume grab after moving instead of before.
|
||||
var/list/client_mobs_in_contents // This contains all the client mobs within this container
|
||||
var/list/acted_explosions //for explosion dodging
|
||||
var/datum/forced_movement/force_moving = null //handled soley by forced_movement.dm
|
||||
|
||||
@@ -108,8 +107,6 @@
|
||||
for(var/movable_content in contents)
|
||||
qdel(movable_content)
|
||||
|
||||
LAZYCLEARLIST(client_mobs_in_contents)
|
||||
|
||||
moveToNullspace()
|
||||
|
||||
/atom/movable/proc/update_emissive_block()
|
||||
|
||||
@@ -48,8 +48,17 @@
|
||||
continue
|
||||
var/atom/movable/thing = i
|
||||
thing.Crossed(src)
|
||||
//
|
||||
////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* meant for movement with zero side effects. only use for objects that are supposed to move "invisibly" (like camera mobs or ghosts)
|
||||
* if you want something to move onto a tile with a beartrap or recycler or tripmine or mouse without that object knowing about it at all, use this
|
||||
* most of the time you want forceMove()
|
||||
*/
|
||||
/atom/movable/proc/abstract_move(atom/new_loc)
|
||||
var/atom/old_loc = loc
|
||||
// move_stacks++
|
||||
loc = new_loc
|
||||
Moved(old_loc)
|
||||
|
||||
/atom/movable/Move(atom/newloc, direct, glide_size_override = 0)
|
||||
var/atom/movable/pullee = pulling
|
||||
@@ -167,12 +176,8 @@
|
||||
if (!inertia_moving)
|
||||
inertia_next_move = world.time + inertia_move_delay
|
||||
newtonian_move(Dir)
|
||||
if (length(client_mobs_in_contents))
|
||||
update_parallax_contents()
|
||||
|
||||
return TRUE
|
||||
|
||||
|
||||
// Make sure you know what you're doing if you call this, this is intended to only be called by byond directly.
|
||||
// You probably want CanPass()
|
||||
/atom/movable/Cross(atom/movable/AM)
|
||||
|
||||
@@ -193,7 +193,9 @@ GLOBAL_LIST_INIT(reverseradiochannels, list(
|
||||
var/frequency = 0
|
||||
var/transmission_method
|
||||
var/list/data
|
||||
var/logging_data
|
||||
|
||||
/datum/signal/New(data, transmission_method = TRANSMISSION_RADIO)
|
||||
/datum/signal/New(data, transmission_method = TRANSMISSION_RADIO, logging_data = null)
|
||||
src.data = data || list()
|
||||
src.transmission_method = transmission_method
|
||||
src.logging_data = logging_data
|
||||
|
||||
@@ -1,523 +0,0 @@
|
||||
/*
|
||||
* Data HUDs have been rewritten in a more generic way.
|
||||
* In short, they now use an observer-listener pattern.
|
||||
* See code/datum/hud.dm for the generic hud datum.
|
||||
* Update the HUD icons when needed with the appropriate hook. (see below)
|
||||
*/
|
||||
|
||||
/* DATA HUD DATUMS */
|
||||
|
||||
/atom/proc/add_to_all_human_data_huds()
|
||||
for(var/datum/atom_hud/data/human/hud in GLOB.huds)
|
||||
hud.add_to_hud(src)
|
||||
|
||||
/atom/proc/remove_from_all_data_huds()
|
||||
for(var/datum/atom_hud/data/hud in GLOB.huds)
|
||||
hud.remove_from_hud(src)
|
||||
|
||||
/datum/atom_hud/data
|
||||
|
||||
/datum/atom_hud/data/human/medical
|
||||
hud_icons = list(STATUS_HUD, HEALTH_HUD, NANITE_HUD, RAD_HUD)
|
||||
|
||||
/datum/atom_hud/data/human/medical/basic
|
||||
|
||||
/datum/atom_hud/data/human/medical/basic/proc/check_sensors(mob/living/carbon/human/H)
|
||||
if(!istype(H))
|
||||
return 0
|
||||
var/obj/item/clothing/under/U = H.w_uniform
|
||||
if(!istype(U))
|
||||
return 0
|
||||
if(U.sensor_mode <= SENSOR_VITALS)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/datum/atom_hud/data/human/medical/basic/add_to_single_hud(mob/M, mob/living/carbon/H)
|
||||
if(check_sensors(H))
|
||||
..()
|
||||
|
||||
/datum/atom_hud/data/human/medical/basic/proc/update_suit_sensors(mob/living/carbon/H)
|
||||
check_sensors(H) ? add_to_hud(H) : remove_from_hud(H)
|
||||
|
||||
/datum/atom_hud/data/human/medical/advanced
|
||||
|
||||
/datum/atom_hud/data/human/security
|
||||
|
||||
/datum/atom_hud/data/human/security/basic
|
||||
hud_icons = list(ID_HUD)
|
||||
|
||||
/datum/atom_hud/data/human/security/advanced
|
||||
hud_icons = list(ID_HUD, IMPTRACK_HUD, IMPLOYAL_HUD, IMPCHEM_HUD, WANTED_HUD, NANITE_HUD)
|
||||
|
||||
/datum/atom_hud/data/diagnostic
|
||||
|
||||
/datum/atom_hud/data/diagnostic/basic
|
||||
hud_icons = list(DIAG_HUD, DIAG_STAT_HUD, DIAG_BATT_HUD, DIAG_MECH_HUD, DIAG_BOT_HUD, DIAG_CIRCUIT_HUD, DIAG_TRACK_HUD, DIAG_AIRLOCK_HUD, DIAG_NANITE_FULL_HUD)
|
||||
|
||||
/datum/atom_hud/data/diagnostic/advanced
|
||||
hud_icons = list(DIAG_HUD, DIAG_STAT_HUD, DIAG_BATT_HUD, DIAG_MECH_HUD, DIAG_BOT_HUD, DIAG_CIRCUIT_HUD, DIAG_TRACK_HUD, DIAG_AIRLOCK_HUD, DIAG_NANITE_FULL_HUD, DIAG_PATH_HUD)
|
||||
|
||||
/datum/atom_hud/data/bot_path
|
||||
hud_icons = list(DIAG_PATH_HUD)
|
||||
|
||||
/datum/atom_hud/abductor
|
||||
hud_icons = list(GLAND_HUD)
|
||||
|
||||
/datum/atom_hud/sentient_disease
|
||||
hud_icons = list(SENTIENT_DISEASE_HUD)
|
||||
|
||||
/datum/atom_hud/ai_detector
|
||||
hud_icons = list(AI_DETECT_HUD)
|
||||
|
||||
/datum/atom_hud/ai_detector/add_hud_to(mob/M)
|
||||
..()
|
||||
if(M && (hudusers.len == 1))
|
||||
for(var/V in GLOB.aiEyes)
|
||||
var/mob/camera/aiEye/E = V
|
||||
E.update_ai_detect_hud()
|
||||
|
||||
/* MED/SEC/DIAG HUD HOOKS */
|
||||
|
||||
/*
|
||||
* THESE HOOKS SHOULD BE CALLED BY THE MOB SHOWING THE HUD
|
||||
*/
|
||||
|
||||
/***********************************************
|
||||
Medical HUD! Basic mode needs suit sensors on.
|
||||
************************************************/
|
||||
|
||||
//HELPERS
|
||||
|
||||
//called when a carbon changes virus
|
||||
/mob/living/carbon/proc/check_virus()
|
||||
var/threat
|
||||
for(var/thing in diseases)
|
||||
var/datum/disease/D = thing
|
||||
if(!(D.visibility_flags & HIDDEN_SCANNER))
|
||||
if(!threat || D.severity > threat) //a buffing virus gets an icon
|
||||
threat = D.severity
|
||||
return threat
|
||||
|
||||
//helper for getting the appropriate health status
|
||||
/proc/RoundHealth(mob/living/M)
|
||||
if(M.stat == DEAD || (HAS_TRAIT(M, TRAIT_FAKEDEATH)))
|
||||
return "health-100" //what's our health? it doesn't matter, we're dead, or faking
|
||||
var/maxi_health = M.maxHealth
|
||||
if(iscarbon(M) && M.health < 0)
|
||||
maxi_health = 100 //so crit shows up right for aliens and other high-health carbon mobs; noncarbons don't have crit.
|
||||
var/resulthealth = (M.health / maxi_health) * 100
|
||||
switch(resulthealth)
|
||||
if(100 to INFINITY)
|
||||
return "health100"
|
||||
if(90.625 to 100)
|
||||
return "health93.75"
|
||||
if(84.375 to 90.625)
|
||||
return "health87.5"
|
||||
if(78.125 to 84.375)
|
||||
return "health81.25"
|
||||
if(71.875 to 78.125)
|
||||
return "health75"
|
||||
if(65.625 to 71.875)
|
||||
return "health68.75"
|
||||
if(59.375 to 65.625)
|
||||
return "health62.5"
|
||||
if(53.125 to 59.375)
|
||||
return "health56.25"
|
||||
if(46.875 to 53.125)
|
||||
return "health50"
|
||||
if(40.625 to 46.875)
|
||||
return "health43.75"
|
||||
if(34.375 to 40.625)
|
||||
return "health37.5"
|
||||
if(28.125 to 34.375)
|
||||
return "health31.25"
|
||||
if(21.875 to 28.125)
|
||||
return "health25"
|
||||
if(15.625 to 21.875)
|
||||
return "health18.75"
|
||||
if(9.375 to 15.625)
|
||||
return "health12.5"
|
||||
if(1 to 9.375)
|
||||
return "health6.25"
|
||||
if(-50 to 1)
|
||||
return "health0"
|
||||
if(-85 to -50)
|
||||
return "health-50"
|
||||
if(-99 to -85)
|
||||
return "health-85"
|
||||
else
|
||||
return "health-100"
|
||||
|
||||
//HOOKS
|
||||
|
||||
//called when a human changes suit sensors
|
||||
/mob/living/carbon/proc/update_suit_sensors()
|
||||
var/datum/atom_hud/data/human/medical/basic/B = GLOB.huds[DATA_HUD_MEDICAL_BASIC]
|
||||
B.update_suit_sensors(src)
|
||||
|
||||
//called when a living mob changes health
|
||||
/mob/living/proc/med_hud_set_health()
|
||||
var/image/holder = hud_list[HEALTH_HUD]
|
||||
holder.icon_state = "hud[RoundHealth(src)]"
|
||||
var/icon/I = icon(icon, icon_state, dir)
|
||||
holder.pixel_y = I.Height() - world.icon_size
|
||||
med_hud_set_radstatus()
|
||||
|
||||
//for carbon suit sensors
|
||||
/mob/living/carbon/med_hud_set_health()
|
||||
..()
|
||||
|
||||
//called when a carbon changes stat, virus or XENO_HOST
|
||||
/mob/living/proc/med_hud_set_status()
|
||||
var/image/holder = hud_list[STATUS_HUD]
|
||||
var/icon/I = icon(icon, icon_state, dir)
|
||||
holder.pixel_y = I.Height() - world.icon_size
|
||||
if(stat == DEAD || (HAS_TRAIT(src, TRAIT_FAKEDEATH)))
|
||||
holder.icon_state = "huddead"
|
||||
else
|
||||
holder.icon_state = "hudhealthy"
|
||||
|
||||
/mob/living/carbon/med_hud_set_status()
|
||||
var/image/holder = hud_list[STATUS_HUD]
|
||||
var/icon/I = icon(icon, icon_state, dir)
|
||||
var/virus_threat = check_virus()
|
||||
holder.pixel_y = I.Height() - world.icon_size
|
||||
if(HAS_TRAIT(src, TRAIT_XENO_HOST))
|
||||
holder.icon_state = "hudxeno"
|
||||
else if(stat == DEAD || (HAS_TRAIT(src, TRAIT_FAKEDEATH)))
|
||||
if(tod)
|
||||
var/tdelta = round(world.time - timeofdeath)
|
||||
if(tdelta < (DEFIB_TIME_LIMIT * 10))
|
||||
var/obj/item/organ/heart/He = getorgan(/obj/item/organ/heart)
|
||||
if(He)
|
||||
holder.icon_state = "huddefib"
|
||||
if(He.organ_flags & ORGAN_FAILING)
|
||||
holder.icon_state = "huddefibheart"
|
||||
else
|
||||
holder.icon_state = "huddefibheart"
|
||||
return
|
||||
holder.icon_state = "huddead"
|
||||
else
|
||||
switch(virus_threat)
|
||||
if(DISEASE_SEVERITY_BIOHAZARD)
|
||||
holder.icon_state = "hudill5"
|
||||
if(DISEASE_SEVERITY_DANGEROUS)
|
||||
holder.icon_state = "hudill4"
|
||||
if(DISEASE_SEVERITY_HARMFUL)
|
||||
holder.icon_state = "hudill3"
|
||||
if(DISEASE_SEVERITY_MEDIUM)
|
||||
holder.icon_state = "hudill2"
|
||||
if(DISEASE_SEVERITY_MINOR)
|
||||
holder.icon_state = "hudill1"
|
||||
if(DISEASE_SEVERITY_NONTHREAT)
|
||||
holder.icon_state = "hudill0"
|
||||
if(DISEASE_SEVERITY_POSITIVE)
|
||||
holder.icon_state = "hudbuff"
|
||||
if(null)
|
||||
holder.icon_state = "hudhealthy"
|
||||
|
||||
|
||||
/mob/living/proc/med_hud_set_radstatus()
|
||||
var/image/radholder = hud_list[RAD_HUD]
|
||||
var/icon/I = icon(icon, icon_state, dir)
|
||||
radholder.pixel_y = I.Height() - world.icon_size
|
||||
var/mob/living/M = src
|
||||
var/rads = M.radiation
|
||||
switch(rads)
|
||||
if(-INFINITY to RAD_MOB_SAFE)
|
||||
radholder.icon_state = "hudradsafe"
|
||||
if((RAD_MOB_SAFE+1) to RAD_MOB_MUTATE)
|
||||
radholder.icon_state = "hudraddanger"
|
||||
if((RAD_MOB_MUTATE+1) to RAD_MOB_VOMIT)
|
||||
radholder.icon_state = "hudradlethal"
|
||||
if((RAD_MOB_VOMIT+1) to INFINITY)
|
||||
radholder.icon_state = "hudradnuke"
|
||||
|
||||
/***********************************************
|
||||
Security HUDs! Basic mode shows only the job.
|
||||
************************************************/
|
||||
|
||||
//HOOKS
|
||||
|
||||
/mob/living/carbon/human/proc/sec_hud_set_ID()
|
||||
var/image/holder = hud_list[ID_HUD]
|
||||
var/icon/I = icon(icon, icon_state, dir)
|
||||
holder.pixel_y = I.Height() - world.icon_size
|
||||
holder.icon_state = "hudno_id"
|
||||
if(wear_id?.GetID())
|
||||
holder.icon_state = "hud[ckey(wear_id.GetJobName())]"
|
||||
sec_hud_set_security_status()
|
||||
|
||||
/mob/living/proc/sec_hud_set_implants()
|
||||
var/image/holder
|
||||
for(var/i in list(IMPTRACK_HUD, IMPLOYAL_HUD, IMPCHEM_HUD))
|
||||
holder = hud_list[i]
|
||||
holder.icon_state = null
|
||||
for(var/obj/item/implant/I in implants)
|
||||
if(istype(I, /obj/item/implant/tracking))
|
||||
holder = hud_list[IMPTRACK_HUD]
|
||||
var/icon/IC = icon(icon, icon_state, dir)
|
||||
holder.pixel_y = IC.Height() - world.icon_size
|
||||
holder.icon_state = "hud_imp_tracking"
|
||||
else if(istype(I, /obj/item/implant/chem))
|
||||
holder = hud_list[IMPCHEM_HUD]
|
||||
var/icon/IC = icon(icon, icon_state, dir)
|
||||
holder.pixel_y = IC.Height() - world.icon_size
|
||||
holder.icon_state = "hud_imp_chem"
|
||||
if(HAS_TRAIT(src, TRAIT_MINDSHIELD))
|
||||
holder = hud_list[IMPLOYAL_HUD]
|
||||
var/icon/IC = icon(icon, icon_state, dir)
|
||||
holder.pixel_y = IC.Height() - world.icon_size
|
||||
holder.icon_state = "hud_imp_loyal"
|
||||
|
||||
/mob/living/carbon/human/proc/sec_hud_set_security_status()
|
||||
var/image/holder = hud_list[WANTED_HUD]
|
||||
var/icon/I = icon(icon, icon_state, dir)
|
||||
holder.pixel_y = I.Height() - world.icon_size
|
||||
var/perpname = get_face_name(get_id_name(""))
|
||||
if(perpname && GLOB.data_core)
|
||||
var/datum/data/record/R = find_record("name", perpname, GLOB.data_core.security)
|
||||
if(R)
|
||||
switch(R.fields["criminal"])
|
||||
if("*Arrest*")
|
||||
holder.icon_state = "hudwanted"
|
||||
return
|
||||
if("Incarcerated")
|
||||
holder.icon_state = "hudincarcerated"
|
||||
return
|
||||
if("Paroled")
|
||||
holder.icon_state = "hudparolled"
|
||||
return
|
||||
if("Discharged")
|
||||
holder.icon_state = "huddischarged"
|
||||
return
|
||||
holder.icon_state = null
|
||||
|
||||
/***********************************************
|
||||
Diagnostic HUDs!
|
||||
************************************************/
|
||||
|
||||
/mob/living/proc/hud_set_nanite_indicator()
|
||||
var/image/holder = hud_list[NANITE_HUD]
|
||||
var/icon/I = icon(icon, icon_state, dir)
|
||||
holder.pixel_y = I.Height() - world.icon_size
|
||||
holder.icon_state = null
|
||||
if(src in SSnanites.nanite_monitored_mobs)
|
||||
holder.icon_state = "nanite_ping"
|
||||
|
||||
//For Diag health and cell bars!
|
||||
/proc/RoundDiagBar(value)
|
||||
switch(value * 100)
|
||||
if(95 to INFINITY)
|
||||
return "max"
|
||||
if(80 to 100)
|
||||
return "good"
|
||||
if(60 to 80)
|
||||
return "high"
|
||||
if(40 to 60)
|
||||
return "med"
|
||||
if(20 to 40)
|
||||
return "low"
|
||||
if(1 to 20)
|
||||
return "crit"
|
||||
else
|
||||
return "dead"
|
||||
|
||||
//Sillycone hooks
|
||||
/mob/living/silicon/proc/diag_hud_set_health()
|
||||
var/image/holder = hud_list[DIAG_HUD]
|
||||
var/icon/I = icon(icon, icon_state, dir)
|
||||
holder.pixel_y = I.Height() - world.icon_size
|
||||
if(stat == DEAD)
|
||||
holder.icon_state = "huddiagdead"
|
||||
else
|
||||
holder.icon_state = "huddiag[RoundDiagBar(health/maxHealth)]"
|
||||
|
||||
/mob/living/silicon/proc/diag_hud_set_status()
|
||||
var/image/holder = hud_list[DIAG_STAT_HUD]
|
||||
var/icon/I = icon(icon, icon_state, dir)
|
||||
holder.pixel_y = I.Height() - world.icon_size
|
||||
switch(stat)
|
||||
if(CONSCIOUS)
|
||||
holder.icon_state = "hudstat"
|
||||
if(UNCONSCIOUS)
|
||||
holder.icon_state = "hudoffline"
|
||||
else
|
||||
holder.icon_state = "huddead2"
|
||||
|
||||
//Borgie battery tracking!
|
||||
/mob/living/silicon/robot/proc/diag_hud_set_borgcell()
|
||||
var/image/holder = hud_list[DIAG_BATT_HUD]
|
||||
var/icon/I = icon(icon, icon_state, dir)
|
||||
holder.pixel_y = I.Height() - world.icon_size
|
||||
if(cell)
|
||||
var/chargelvl = (cell.charge/cell.maxcharge)
|
||||
holder.icon_state = "hudbatt[RoundDiagBar(chargelvl)]"
|
||||
else
|
||||
holder.icon_state = "hudnobatt"
|
||||
|
||||
//borg-AI shell tracking
|
||||
/mob/living/silicon/robot/proc/diag_hud_set_aishell() //Shows tracking beacons on the mech
|
||||
var/image/holder = hud_list[DIAG_TRACK_HUD]
|
||||
var/icon/I = icon(icon, icon_state, dir)
|
||||
holder.pixel_y = I.Height() - world.icon_size
|
||||
if(!shell) //Not an AI shell
|
||||
holder.icon_state = null
|
||||
else if(deployed) //AI shell in use by an AI
|
||||
holder.icon_state = "hudtrackingai"
|
||||
else //Empty AI shell
|
||||
holder.icon_state = "hudtracking"
|
||||
|
||||
//AI side tracking of AI shell control
|
||||
/mob/living/silicon/ai/proc/diag_hud_set_deployed() //Shows tracking beacons on the mech
|
||||
var/image/holder = hud_list[DIAG_TRACK_HUD]
|
||||
var/icon/I = icon(icon, icon_state, dir)
|
||||
holder.pixel_y = I.Height() - world.icon_size
|
||||
if(!deployed_shell)
|
||||
holder.icon_state = null
|
||||
else //AI is currently controlling a shell
|
||||
holder.icon_state = "hudtrackingai"
|
||||
|
||||
/*~~~~~~~~~~~~~~~~~~~~
|
||||
BIG STOMPY MECHS
|
||||
~~~~~~~~~~~~~~~~~~~~~*/
|
||||
/obj/mecha/proc/diag_hud_set_mechhealth()
|
||||
var/image/holder = hud_list[DIAG_MECH_HUD]
|
||||
var/icon/I = icon(icon, icon_state, dir)
|
||||
holder.pixel_y = I.Height() - world.icon_size
|
||||
holder.icon_state = "huddiag[RoundDiagBar(obj_integrity/max_integrity)]"
|
||||
|
||||
|
||||
/obj/mecha/proc/diag_hud_set_mechcell()
|
||||
var/image/holder = hud_list[DIAG_BATT_HUD]
|
||||
var/icon/I = icon(icon, icon_state, dir)
|
||||
holder.pixel_y = I.Height() - world.icon_size
|
||||
if(cell)
|
||||
var/chargelvl = cell.charge/cell.maxcharge
|
||||
holder.icon_state = "hudbatt[RoundDiagBar(chargelvl)]"
|
||||
else
|
||||
holder.icon_state = "hudnobatt"
|
||||
|
||||
|
||||
/obj/mecha/proc/diag_hud_set_mechstat()
|
||||
var/image/holder = hud_list[DIAG_STAT_HUD]
|
||||
var/icon/I = icon(icon, icon_state, dir)
|
||||
holder.pixel_y = I.Height() - world.icon_size
|
||||
holder.icon_state = null
|
||||
if(internal_damage)
|
||||
holder.icon_state = "hudwarn"
|
||||
|
||||
/obj/mecha/proc/diag_hud_set_mechtracking() //Shows tracking beacons on the mech
|
||||
var/image/holder = hud_list[DIAG_TRACK_HUD]
|
||||
var/icon/I = icon(icon, icon_state, dir)
|
||||
holder.pixel_y = I.Height() - world.icon_size
|
||||
var/new_icon_state //This var exists so that the holder's icon state is set only once in the event of multiple mech beacons.
|
||||
for(var/obj/item/mecha_parts/mecha_tracking/T in trackers)
|
||||
if(T.ai_beacon) //Beacon with AI uplink
|
||||
new_icon_state = "hudtrackingai"
|
||||
break //Immediately terminate upon finding an AI beacon to ensure it is always shown over the normal one, as mechs can have several trackers.
|
||||
else
|
||||
new_icon_state = "hudtracking"
|
||||
holder.icon_state = new_icon_state
|
||||
|
||||
/*~~~~~~~~~
|
||||
Bots!
|
||||
~~~~~~~~~~*/
|
||||
/mob/living/simple_animal/bot/proc/diag_hud_set_bothealth()
|
||||
var/image/holder = hud_list[DIAG_HUD]
|
||||
var/icon/I = icon(icon, icon_state, dir)
|
||||
holder.pixel_y = I.Height() - world.icon_size
|
||||
holder.icon_state = "huddiag[RoundDiagBar(health/maxHealth)]"
|
||||
|
||||
/mob/living/simple_animal/bot/proc/diag_hud_set_botstat() //On (With wireless on or off), Off, EMP'ed
|
||||
var/image/holder = hud_list[DIAG_STAT_HUD]
|
||||
var/icon/I = icon(icon, icon_state, dir)
|
||||
holder.pixel_y = I.Height() - world.icon_size
|
||||
if(on)
|
||||
holder.icon_state = "hudstat"
|
||||
else if(stat) //Generally EMP causes this
|
||||
holder.icon_state = "hudoffline"
|
||||
else //Bot is off
|
||||
holder.icon_state = "huddead2"
|
||||
|
||||
/mob/living/simple_animal/bot/proc/diag_hud_set_botmode() //Shows a bot's current operation
|
||||
var/image/holder = hud_list[DIAG_BOT_HUD]
|
||||
var/icon/I = icon(icon, icon_state, dir)
|
||||
holder.pixel_y = I.Height() - world.icon_size
|
||||
if(client) //If the bot is player controlled, it will not be following mode logic!
|
||||
holder.icon_state = "hudsentient"
|
||||
return
|
||||
|
||||
switch(mode)
|
||||
if(BOT_SUMMON, BOT_RESPONDING) //Responding to PDA or AI summons
|
||||
holder.icon_state = "hudcalled"
|
||||
if(BOT_CLEANING, BOT_REPAIRING, BOT_HEALING) //Cleanbot cleaning, Floorbot fixing, or Medibot Healing
|
||||
holder.icon_state = "hudworking"
|
||||
if(BOT_PATROL, BOT_START_PATROL) //Patrol mode
|
||||
holder.icon_state = "hudpatrol"
|
||||
if(BOT_PREP_ARREST, BOT_ARREST, BOT_HUNT) //STOP RIGHT THERE, CRIMINAL SCUM!
|
||||
holder.icon_state = "hudalert"
|
||||
if(BOT_MOVING, BOT_DELIVER, BOT_GO_HOME, BOT_NAV) //Moving to target for normal bots, moving to deliver or go home for MULES.
|
||||
holder.icon_state = "hudmove"
|
||||
else
|
||||
holder.icon_state = ""
|
||||
|
||||
/*~~~~~~~~~~~~
|
||||
Circutry!
|
||||
~~~~~~~~~~~~~*/
|
||||
/obj/item/electronic_assembly/proc/diag_hud_set_circuithealth(hide = FALSE)
|
||||
var/image/holder = hud_list[DIAG_CIRCUIT_HUD]
|
||||
var/icon/I = icon(icon, icon_state, dir)
|
||||
holder.pixel_y = I.Height() - world.icon_size
|
||||
if((!isturf(loc))||hide) //if not on the ground dont show overlay
|
||||
holder.icon_state = null
|
||||
else
|
||||
holder.icon_state = "huddiag[RoundDiagBar(obj_integrity/max_integrity)]"
|
||||
|
||||
/obj/item/electronic_assembly/proc/diag_hud_set_circuitcell(hide = FALSE)
|
||||
var/image/holder = hud_list[DIAG_BATT_HUD]
|
||||
var/icon/I = icon(icon, icon_state, dir)
|
||||
holder.pixel_y = I.Height() - world.icon_size
|
||||
if((!isturf(loc))||hide) //if not on the ground dont show overlay
|
||||
holder.icon_state = null
|
||||
else if(battery)
|
||||
var/chargelvl = battery.charge/battery.maxcharge
|
||||
holder.icon_state = "hudbatt[RoundDiagBar(chargelvl)]"
|
||||
else
|
||||
holder.icon_state = "hudnobatt"
|
||||
|
||||
/obj/item/electronic_assembly/proc/diag_hud_set_circuitstat(hide = FALSE) //On, On and dangerous, or Off
|
||||
var/image/holder = hud_list[DIAG_STAT_HUD]
|
||||
var/icon/I = icon(icon, icon_state, dir)
|
||||
holder.pixel_y = I.Height() - world.icon_size
|
||||
if((!isturf(loc))||hide) //if not on the ground don't show overlay
|
||||
holder.icon_state = null
|
||||
else if(!battery)
|
||||
holder.icon_state = "hudoffline"
|
||||
else if(battery.charge == 0)
|
||||
holder.icon_state = "hudoffline"
|
||||
else if(combat_circuits) //has a circuit that can harm people
|
||||
holder.icon_state = prefered_hud_icon + "-red"
|
||||
else //Bot is on and not dangerous
|
||||
holder.icon_state = prefered_hud_icon
|
||||
|
||||
/obj/item/electronic_assembly/proc/diag_hud_set_circuittracking(hide = FALSE)
|
||||
var/image/holder = hud_list[DIAG_TRACK_HUD]
|
||||
var/icon/I = icon(icon, icon_state, dir)
|
||||
holder.pixel_y = I.Height() - world.icon_size
|
||||
if((!isturf(loc))||hide) //if not on the ground dont show overlay
|
||||
holder.icon_state = null
|
||||
else if(long_range_circuits)
|
||||
holder.icon_state = "hudtracking"
|
||||
else
|
||||
holder.icon_state = null
|
||||
|
||||
/*~~~~~~~~~~~~
|
||||
Airlocks!
|
||||
~~~~~~~~~~~~~*/
|
||||
/obj/machinery/door/airlock/proc/diag_hud_set_electrified()
|
||||
var/image/holder = hud_list[DIAG_AIRLOCK_HUD]
|
||||
if(secondsElectrified != 0)
|
||||
holder.icon_state = "electrified"
|
||||
else
|
||||
holder.icon_state = ""
|
||||
@@ -151,14 +151,8 @@ Credit where due:
|
||||
var/datum/team/clockcult/main_clockcult
|
||||
|
||||
/datum/game_mode/clockwork_cult/pre_setup() //Gamemode and job code is pain. Have fun codediving all of that stuff, whoever works on this next - Delta
|
||||
var/list/errorList = list()
|
||||
var/list/reebes = SSmapping.LoadGroup(errorList, "Reebe", "map_files/generic", "City_of_Cogs.dmm", default_traits = ZTRAITS_REEBE, silent = TRUE)
|
||||
if(errorList.len) // reebe failed to load
|
||||
message_admins("Reebe failed to load!")
|
||||
log_game("Reebe failed to load!")
|
||||
if(!load_reebe())
|
||||
return FALSE
|
||||
for(var/datum/parsed_map/PM in reebes) //Temporarily commented because of z-level loading reliably segfaulting the server.
|
||||
PM.initTemplateBounds()
|
||||
if(CONFIG_GET(flag/protect_roles_from_antagonist))
|
||||
restricted_jobs += protected_jobs
|
||||
if(CONFIG_GET(flag/protect_assistant_from_antagonist))
|
||||
|
||||
@@ -653,6 +653,7 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
|
||||
if (drafted_rules.len > 0)
|
||||
pick_midround_rule(drafted_rules)
|
||||
else if (random_event_hijacked == HIJACKED_TOO_SOON)
|
||||
message_admins("DYNAMIC: Midround injection failed when random event was hijacked. Spawning another random event in its place.")
|
||||
log_game("DYNAMIC: Midround injection failed when random event was hijacked. Spawning another random event in its place.")
|
||||
|
||||
// A random event antag would have rolled had this injection check passed.
|
||||
|
||||
@@ -445,6 +445,70 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
//////////////////////////////////////////////
|
||||
// //
|
||||
// Clock Cult (MID) //
|
||||
// //
|
||||
//////////////////////////////////////////////
|
||||
|
||||
|
||||
//changes two people midround into clockwork cultists
|
||||
/datum/dynamic_ruleset/midround/ratvar_awakening
|
||||
name = "Ratvar Awakening"
|
||||
antag_datum = /datum/antagonist/clockcult
|
||||
antag_flag = "clock mid"
|
||||
antag_flag_override = ROLE_SERVANT_OF_RATVAR
|
||||
protected_roles = list("AI", "Cyborg", "Prisoner", "Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Chaplain", "Head of Personnel", "Quartermaster", "Chief Engineer", "Chief Medical Officer", "Research Director")
|
||||
restricted_roles = list("AI", "Cyborg", "Prisoner", "Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Chaplain", "Head of Personnel", "Quartermaster", "Chief Engineer", "Chief Medical Officer", "Research Director")
|
||||
enemy_roles = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Chaplain", "Head of Personnel", "Quartermaster", "Chief Engineer", "Chief Medical Officer", "Research Director")
|
||||
required_enemies = list(1,1,1,1,1,1,0,0,0,0)
|
||||
required_candidates = 2
|
||||
weight = 3
|
||||
cost = 20
|
||||
requirements = list(101,101,101,101,50,40,30,20,10,10)
|
||||
var/list/clock_cap = list(1,1,1,1,2,3,4,5,5,5)
|
||||
flags = HIGH_IMPACT_RULESET
|
||||
|
||||
/datum/dynamic_ruleset/midround/ratvar_awakening/acceptable(population=0, threat=0)
|
||||
if (locate(/datum/dynamic_ruleset/roundstart/clockcult) in mode.executed_rules)
|
||||
return FALSE // Unavailable if clockies exist at round start
|
||||
indice_pop = min(clock_cap.len, round(living_players.len/5)+1)
|
||||
required_candidates = clock_cap[indice_pop]
|
||||
return ..()
|
||||
|
||||
/datum/dynamic_ruleset/midround/ratvar_awakening/trim_candidates()
|
||||
..()
|
||||
candidates = living_players
|
||||
for(var/mob/living/player as anything in candidates)
|
||||
var/turf/player_turf = get_turf(player)
|
||||
if(!player_turf || !is_station_level(player_turf.z))
|
||||
candidates -= player //no ghost roles
|
||||
continue
|
||||
|
||||
if(!is_eligible_servant(player))
|
||||
candidates -= player
|
||||
continue
|
||||
|
||||
if(player.mind && (player.mind.special_role || length(player.mind.antag_datums) > 0))
|
||||
candidates -= player //no double dipping
|
||||
|
||||
/datum/dynamic_ruleset/midround/ratvar_awakening/execute()
|
||||
if(!candidates || !candidates.len)
|
||||
return FALSE
|
||||
for(var/i = 0; i < required_candidates; i++)
|
||||
if(!candidates.len)
|
||||
break
|
||||
var/mob/living/clock_antag = pick_n_take(candidates)
|
||||
assigned += clock_antag.mind
|
||||
for(var/datum/mind/M in assigned) //add them to the clockwork team
|
||||
add_servant_of_ratvar(M.current)
|
||||
SSticker.mode.equip_servant(M.current)
|
||||
SSticker.mode.greet_servant(M.current)
|
||||
message_admins("[ADMIN_LOOKUPFLW(M.current)] was selected by the [name] ruleset and has been made into a midround clock cultist.")
|
||||
log_game("DYNAMIC: [key_name(M.current)] was selected by the [name] ruleset and has been made into a midround clock cultist.")
|
||||
load_reebe()
|
||||
return ..()
|
||||
|
||||
//////////////////////////////////////////////
|
||||
// //
|
||||
// BLOB (GHOST) //
|
||||
|
||||
@@ -779,6 +779,24 @@ GLOBAL_LIST_EMPTY(possible_items_special)
|
||||
target_amount = count
|
||||
update_explanation_text()
|
||||
*/
|
||||
/datum/objective/protect_object
|
||||
name = "protect object"
|
||||
var/obj/protect_target
|
||||
|
||||
/datum/objective/protect_object/proc/set_target(obj/O)
|
||||
protect_target = O
|
||||
update_explanation_text()
|
||||
|
||||
/datum/objective/protect_object/update_explanation_text()
|
||||
. = ..()
|
||||
if(protect_target)
|
||||
explanation_text = "Protect \the [protect_target] at all costs."
|
||||
else
|
||||
explanation_text = "Free objective."
|
||||
|
||||
/datum/objective/protect_object/check_completion()
|
||||
return !QDELETED(protect_target)
|
||||
|
||||
//Changeling Objectives
|
||||
|
||||
/datum/objective/absorb
|
||||
|
||||
@@ -58,9 +58,9 @@
|
||||
storedpda.forceMove(loc)
|
||||
storedpda = null
|
||||
|
||||
/obj/machinery/pdapainter/contents_explosion(severity, target)
|
||||
/obj/machinery/pdapainter/contents_explosion(severity, target, origin)
|
||||
if(storedpda)
|
||||
storedpda.ex_act(severity, target)
|
||||
storedpda.ex_act(severity, target, origin)
|
||||
|
||||
/obj/machinery/pdapainter/handle_atom_del(atom/A)
|
||||
if(A == storedpda)
|
||||
|
||||
@@ -247,61 +247,94 @@ Class Procs:
|
||||
|
||||
/obj/machinery/proc/auto_use_power()
|
||||
if(!powered(power_channel))
|
||||
return 0
|
||||
return FALSE
|
||||
if(use_power == 1)
|
||||
use_power(idle_power_usage,power_channel)
|
||||
else if(use_power >= 2)
|
||||
use_power(active_power_usage,power_channel)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/proc/is_operational()
|
||||
return !(stat & (NOPOWER|BROKEN|MAINT))
|
||||
|
||||
/obj/machinery/can_interact(mob/user)
|
||||
var/silicon = hasSiliconAccessInArea(user) || IsAdminGhost(user)
|
||||
if((stat & (NOPOWER|BROKEN)) && !(interaction_flags_machine & INTERACT_MACHINE_OFFLINE))
|
||||
if((stat & (NOPOWER|BROKEN)) && !(interaction_flags_machine & INTERACT_MACHINE_OFFLINE)) // Check if the machine is broken, and if we can still interact with it if so
|
||||
return FALSE
|
||||
if(panel_open && !(interaction_flags_machine & INTERACT_MACHINE_OPEN))
|
||||
if(!silicon || !(interaction_flags_machine & INTERACT_MACHINE_OPEN_SILICON))
|
||||
return FALSE
|
||||
|
||||
if(silicon)
|
||||
if(IsAdminGhost(user))
|
||||
return TRUE //if you're an admin, you probably know what you're doing (or at least have permission to do what you're doing)
|
||||
|
||||
if(!isliving(user))
|
||||
return FALSE //no ghosts in the machine allowed, sorry
|
||||
|
||||
// if(SEND_SIGNAL(user, COMSIG_TRY_USE_MACHINE, src) & COMPONENT_CANT_USE_MACHINE_INTERACT)
|
||||
// return FALSE
|
||||
|
||||
var/mob/living/living_user = user
|
||||
|
||||
var/is_dextrous = FALSE
|
||||
if(isanimal(user))
|
||||
var/mob/living/simple_animal/user_as_animal = user
|
||||
if (user_as_animal.dextrous)
|
||||
is_dextrous = TRUE
|
||||
|
||||
if(!issilicon(user) && !is_dextrous && !user.can_hold_items())
|
||||
return FALSE //spiders gtfo
|
||||
|
||||
if(issilicon(user)) // If we are a silicon, make sure the machine allows silicons to interact with it
|
||||
if(!(interaction_flags_machine & INTERACT_MACHINE_ALLOW_SILICON))
|
||||
return FALSE
|
||||
else
|
||||
if(interaction_flags_machine & INTERACT_MACHINE_REQUIRES_SILICON)
|
||||
|
||||
if(panel_open && !(interaction_flags_machine & INTERACT_MACHINE_OPEN) && !(interaction_flags_machine & INTERACT_MACHINE_OPEN_SILICON))
|
||||
return FALSE
|
||||
if(!Adjacent(user))
|
||||
var/mob/living/carbon/H = user
|
||||
if(!(istype(H) && H.has_dna() && H.dna.check_mutation(TK)))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
return TRUE //silicons don't care about petty mortal concerns like needing to be next to a machine to use it
|
||||
|
||||
if(living_user.incapacitated()) //idk why silicons aren't supposed to care about incapacitation when interacting with machines, but it was apparently like this before
|
||||
return FALSE
|
||||
|
||||
// TODO: nerf blind people
|
||||
// if((interaction_flags_machine & INTERACT_MACHINE_REQUIRES_SIGHT) && user.is_blind())
|
||||
// to_chat(user, span_warning("This machine requires sight to use."))
|
||||
// return FALSE
|
||||
|
||||
if(panel_open && !(interaction_flags_machine & INTERACT_MACHINE_OPEN))
|
||||
return FALSE
|
||||
|
||||
if(interaction_flags_machine & INTERACT_MACHINE_REQUIRES_SILICON) //if the user was a silicon, we'd have returned out earlier, so the user must not be a silicon
|
||||
return FALSE
|
||||
|
||||
if(!Adjacent(user)) // Next make sure we are next to the machine unless we have telekinesis
|
||||
var/mob/living/carbon/carbon_user = living_user
|
||||
if(!istype(carbon_user) || !carbon_user.has_dna() || !carbon_user.dna.check_mutation(TK))
|
||||
return FALSE
|
||||
|
||||
return TRUE // If we passed all of those checks, woohoo! We can interact with this machine.
|
||||
|
||||
/obj/machinery/proc/check_nap_violations()
|
||||
if(!SSeconomy.full_ancap)
|
||||
return TRUE
|
||||
if(occupant && !state_open)
|
||||
if(ishuman(occupant))
|
||||
var/mob/living/carbon/human/H = occupant
|
||||
var/obj/item/card/id/I = H.get_idcard()
|
||||
if(I)
|
||||
var/datum/bank_account/insurance = I.registered_account
|
||||
if(!insurance)
|
||||
say("[market_verb] NAP Violation: No bank account found.")
|
||||
nap_violation()
|
||||
return FALSE
|
||||
else
|
||||
if(!insurance.adjust_money(-fair_market_price))
|
||||
say("[market_verb] NAP Violation: Unable to pay.")
|
||||
nap_violation()
|
||||
return FALSE
|
||||
var/datum/bank_account/D = SSeconomy.get_dep_account(payment_department)
|
||||
if(D)
|
||||
D.adjust_money(fair_market_price)
|
||||
else
|
||||
say("[market_verb] NAP Violation: No ID card found.")
|
||||
nap_violation()
|
||||
var/mob/living/L = occupant
|
||||
var/obj/item/card/id/I = L.get_idcard(TRUE)
|
||||
if(I)
|
||||
var/datum/bank_account/insurance = I.registered_account
|
||||
if(!insurance)
|
||||
say("[market_verb] NAP Violation: No bank account found.")
|
||||
nap_violation(L)
|
||||
return FALSE
|
||||
else
|
||||
if(!insurance.adjust_money(-fair_market_price))
|
||||
say("[market_verb] NAP Violation: Unable to pay.")
|
||||
nap_violation(L)
|
||||
return FALSE
|
||||
var/datum/bank_account/D = SSeconomy.get_dep_account(payment_department)
|
||||
if(D)
|
||||
D.adjust_money(fair_market_price)
|
||||
else
|
||||
say("[market_verb] NAP Violation: No ID card found.")
|
||||
nap_violation(L)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/proc/nap_violation(mob/violator)
|
||||
@@ -322,11 +355,11 @@ Class Procs:
|
||||
/obj/machinery/Topic(href, href_list)
|
||||
..()
|
||||
if(!can_interact(usr))
|
||||
return 1
|
||||
return TRUE
|
||||
if(!usr.canUseTopic(src))
|
||||
return 1
|
||||
return TRUE
|
||||
add_fingerprint(usr)
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -405,9 +438,9 @@ Class Procs:
|
||||
update_appearance()
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/contents_explosion(severity, target)
|
||||
/obj/machinery/contents_explosion(severity, target, origin)
|
||||
if(occupant)
|
||||
occupant.ex_act(severity, target)
|
||||
occupant.ex_act(severity, target, origin)
|
||||
|
||||
/obj/machinery/handle_atom_del(atom/A)
|
||||
if(A == occupant)
|
||||
|
||||
@@ -55,9 +55,9 @@
|
||||
storedpart.forceMove(loc)
|
||||
storedpart = null
|
||||
|
||||
/obj/machinery/aug_manipulator/contents_explosion(severity, target)
|
||||
/obj/machinery/aug_manipulator/contents_explosion(severity, target, origin)
|
||||
if(storedpart)
|
||||
storedpart.ex_act(severity, target)
|
||||
storedpart.ex_act(severity, target, origin)
|
||||
|
||||
/obj/machinery/aug_manipulator/handle_atom_del(atom/A)
|
||||
if(A == storedpart)
|
||||
|
||||
+208
-217
@@ -1,7 +1,3 @@
|
||||
#define AUTOLATHE_MAIN_MENU 1
|
||||
#define AUTOLATHE_CATEGORY_MENU 2
|
||||
#define AUTOLATHE_SEARCH_MENU 3
|
||||
|
||||
/obj/machinery/autolathe
|
||||
name = "autolathe"
|
||||
desc = "It produces items using metal and glass."
|
||||
@@ -24,13 +20,14 @@
|
||||
var/shock_wire
|
||||
|
||||
var/busy = FALSE
|
||||
var/prod_coeff = 1
|
||||
|
||||
///the multiplier for how much materials the created object takes from this machines stored materials
|
||||
var/creation_efficiency = 1.6
|
||||
|
||||
var/datum/design/being_built
|
||||
var/datum/techweb/stored_research
|
||||
var/list/datum/design/matching_designs
|
||||
var/selected_category
|
||||
var/screen = 1
|
||||
var/selected_category = "None"
|
||||
var/base_price = 25
|
||||
var/hacked_price = 50
|
||||
|
||||
@@ -60,7 +57,7 @@
|
||||
QDEL_NULL(wires)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/autolathe/ui_interact(mob/user)
|
||||
/obj/machinery/autolathe/ui_interact(mob/user, datum/tgui/ui)
|
||||
. = ..()
|
||||
if(!is_operational())
|
||||
return
|
||||
@@ -68,101 +65,129 @@
|
||||
if(shocked && !(stat & NOPOWER))
|
||||
shock(user,50)
|
||||
|
||||
var/dat
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
ui = new(user, src, "Autolathe", capitalize(src.name))
|
||||
ui.open()
|
||||
|
||||
switch(screen)
|
||||
if(AUTOLATHE_MAIN_MENU)
|
||||
dat = main_win(user)
|
||||
if(AUTOLATHE_CATEGORY_MENU)
|
||||
dat = category_win(user,selected_category)
|
||||
if(AUTOLATHE_SEARCH_MENU)
|
||||
dat = search_win(user)
|
||||
|
||||
var/datum/browser/popup = new(user, "autolathe", name, 400, 500)
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
|
||||
/obj/machinery/autolathe/on_deconstruction()
|
||||
/obj/machinery/autolathe/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
data["materials"] = list()
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
materials.retrieve_all()
|
||||
data["materialtotal"] = materials.total_amount
|
||||
data["materialsmax"] = materials.max_amount
|
||||
data["categories"] = categories
|
||||
data["designs"] = list()
|
||||
data["active"] = busy
|
||||
|
||||
/obj/machinery/autolathe/attackby(obj/item/O, mob/user, params)
|
||||
if (busy)
|
||||
to_chat(user, "<span class=\"alert\">The autolathe is busy. Please wait for completion of previous operation.</span>")
|
||||
return TRUE
|
||||
|
||||
if(default_deconstruction_screwdriver(user, "autolathe_t", "autolathe", O))
|
||||
updateUsrDialog()
|
||||
return TRUE
|
||||
|
||||
if(default_deconstruction_crowbar(O))
|
||||
return TRUE
|
||||
|
||||
if(panel_open && is_wire_tool(O))
|
||||
wires.interact(user)
|
||||
return TRUE
|
||||
|
||||
if(user.a_intent == INTENT_HARM) //so we can hit the machine
|
||||
return ..()
|
||||
|
||||
if(stat)
|
||||
return TRUE
|
||||
|
||||
if(istype(O, /obj/item/disk/design_disk))
|
||||
user.visible_message("<span class='notice'>[user] begins to load \the [O] in \the [src]...</span>",
|
||||
"<span class='notice'>You begin to load a design from \the [O]...</span>",
|
||||
"<span class='hear'>You hear the chatter of a floppy drive.</span>")
|
||||
busy = TRUE
|
||||
var/obj/item/disk/design_disk/D = O
|
||||
if(do_after(user, 14.4, target = src))
|
||||
for(var/B in D.blueprints)
|
||||
if(B)
|
||||
stored_research.add_design(B)
|
||||
busy = FALSE
|
||||
return TRUE
|
||||
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/machinery/autolathe/proc/AfterMaterialInsert(item_inserted, id_inserted, amount_inserted)
|
||||
if(istype(item_inserted, /obj/item/stack/ore/bluespace_crystal))
|
||||
use_power(MINERAL_MATERIAL_AMOUNT / 10)
|
||||
else if(custom_materials && custom_materials.len && custom_materials[SSmaterials.GetMaterialRef(/datum/material/glass)])
|
||||
flick("autolathe_r",src)//plays glass insertion animation by default otherwise
|
||||
for(var/mat_id in materials.materials)
|
||||
var/datum/material/M = mat_id
|
||||
var/mineral_count = materials.materials[mat_id]
|
||||
var/list/material_data = list(
|
||||
name = M.name,
|
||||
mineral_amount = mineral_count,
|
||||
matcolour = M.color,
|
||||
)
|
||||
data["materials"] += list(material_data)
|
||||
if(selected_category != "None" && !length(matching_designs))
|
||||
data["designs"] = handle_designs(stored_research.researched_designs, TRUE)
|
||||
else
|
||||
flick("autolathe_o",src)//plays metal insertion animation
|
||||
data["designs"] = handle_designs(matching_designs, FALSE)
|
||||
return data
|
||||
|
||||
/obj/machinery/autolathe/proc/handle_designs(list/designs, categorycheck)
|
||||
var/list/output = list()
|
||||
for(var/v in designs)
|
||||
var/datum/design/D = categorycheck ? SSresearch.techweb_design_by_id(v) : v
|
||||
if(categorycheck)
|
||||
if(!(selected_category in D.category))
|
||||
continue
|
||||
var/unbuildable = FALSE // we can't build the design currently
|
||||
var/m10 = FALSE // 10x mult
|
||||
var/m25 = FALSE // 25x mult
|
||||
var/m50 = FALSE // 50x mult
|
||||
var/m5 = FALSE // 5x mult
|
||||
var/sheets = FALSE // sheets or no?
|
||||
if(disabled || !can_build(D))
|
||||
unbuildable = TRUE
|
||||
var/max_multiplier = unbuildable ? 0 : 1
|
||||
if(ispath(D.build_path, /obj/item/stack))
|
||||
sheets = TRUE
|
||||
if(!unbuildable)
|
||||
var/datum/component/material_container/mats = GetComponent(/datum/component/material_container)
|
||||
for(var/datum/material/mat in D.materials)
|
||||
max_multiplier = min(D.maxstack, round(mats.get_material_amount(mat)/D.materials[mat]))
|
||||
if (max_multiplier>10 && !disabled)
|
||||
m10 = TRUE
|
||||
if (max_multiplier>25 && !disabled)
|
||||
m25 = TRUE
|
||||
else
|
||||
if(!unbuildable)
|
||||
if(!disabled && can_build(D, 5))
|
||||
m5 = TRUE
|
||||
if(!disabled && can_build(D, 10))
|
||||
m10 = TRUE
|
||||
var/datum/component/material_container/mats = GetComponent(/datum/component/material_container)
|
||||
for(var/datum/material/mat in D.materials)
|
||||
max_multiplier = min(50, round(mats.get_material_amount(mat)/(D.materials[mat] * creation_efficiency)))
|
||||
|
||||
use_power(min(1000, amount_inserted / 100))
|
||||
updateUsrDialog()
|
||||
var/list/design = list(
|
||||
name = D.name,
|
||||
id = D.id,
|
||||
ref = REF(src),
|
||||
cost = get_design_cost(D),
|
||||
buildable = unbuildable,
|
||||
mult5 = m5,
|
||||
mult10 = m10,
|
||||
mult25 = m25,
|
||||
mult50 = m50,
|
||||
sheet = sheets,
|
||||
maxmult = max_multiplier,
|
||||
)
|
||||
output += list(design)
|
||||
return output
|
||||
|
||||
/obj/machinery/autolathe/Topic(href, href_list)
|
||||
if(..())
|
||||
/obj/machinery/autolathe/ui_act(action, params)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if (!busy)
|
||||
if(href_list["menu"])
|
||||
screen = text2num(href_list["menu"])
|
||||
updateUsrDialog()
|
||||
if(action == "menu")
|
||||
selected_category = null
|
||||
matching_designs.Cut()
|
||||
. = TRUE
|
||||
|
||||
if(href_list["category"])
|
||||
selected_category = href_list["category"]
|
||||
updateUsrDialog()
|
||||
if(action == "category")
|
||||
selected_category = params["selectedCategory"]
|
||||
matching_designs.Cut()
|
||||
. = TRUE
|
||||
|
||||
if(href_list["make"])
|
||||
if(action == "search")
|
||||
matching_designs.Cut()
|
||||
|
||||
for(var/v in stored_research.researched_designs)
|
||||
var/datum/design/D = SSresearch.techweb_design_by_id(v)
|
||||
if(findtext(D.name,params["to_search"]))
|
||||
matching_designs.Add(D)
|
||||
. = TRUE
|
||||
|
||||
if(action == "make")
|
||||
if (!busy)
|
||||
/////////////////
|
||||
//href protection
|
||||
being_built = stored_research.isDesignResearchedID(href_list["make"])
|
||||
being_built = stored_research.isDesignResearchedID(params["id"])
|
||||
if(!being_built)
|
||||
return
|
||||
|
||||
var/multiplier = text2num(href_list["multiplier"])
|
||||
var/multiplier = text2num(params["multiplier"])
|
||||
if(!multiplier)
|
||||
to_chat(usr, span_alert("[src] only accepts a numerical multiplier!"))
|
||||
return
|
||||
var/is_stack = ispath(being_built.build_path, /obj/item/stack)
|
||||
multiplier = clamp(multiplier,1,50)
|
||||
multiplier = clamp(round(multiplier),1,50)
|
||||
|
||||
/////////////////
|
||||
|
||||
var/coeff = (is_stack ? 1 : prod_coeff) //stacks are unaffected by production coefficient
|
||||
var/coeff = (is_stack ? 1 : creation_efficiency) //stacks are unaffected by production coefficient
|
||||
var/total_amount = 0
|
||||
|
||||
for(var/MAT in being_built.materials)
|
||||
@@ -184,8 +209,8 @@
|
||||
if(materials.materials[i] > 0)
|
||||
list_to_show += i
|
||||
|
||||
used_material = input("Choose [used_material]", "Custom Material") as null|anything in sortList(list_to_show, /proc/cmp_typepaths_asc)
|
||||
if(!used_material)
|
||||
used_material = tgui_input_list(usr, "Choose [used_material]", "Custom Material", sortList(list_to_show, /proc/cmp_typepaths_asc))
|
||||
if(isnull(used_material))
|
||||
return //Didn't pick any material, so you can't build shit either.
|
||||
custom_materials[used_material] += amount_needed
|
||||
|
||||
@@ -193,27 +218,95 @@
|
||||
|
||||
if(materials.has_materials(materials_used))
|
||||
busy = TRUE
|
||||
to_chat(usr, span_notice("You print [multiplier] item(s) from the [src]"))
|
||||
use_power(power)
|
||||
icon_state = "autolathe_n"
|
||||
var/time = is_stack ? 32 : (32 * coeff * multiplier) ** 0.8
|
||||
addtimer(CALLBACK(src, .proc/make_item, power, materials_used, custom_materials, multiplier, coeff, is_stack, usr), time)
|
||||
. = TRUE
|
||||
else
|
||||
to_chat(usr, "<span class=\"alert\">Not enough materials for this operation.</span>")
|
||||
to_chat(usr, span_alert("Not enough materials for this operation."))
|
||||
else
|
||||
to_chat(usr, span_alert("The autolathe is busy. Please wait for completion of previous operation."))
|
||||
|
||||
if(href_list["search"])
|
||||
matching_designs.Cut()
|
||||
/obj/machinery/autolathe/on_deconstruction()
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
materials.retrieve_all()
|
||||
|
||||
for(var/v in stored_research.researched_designs)
|
||||
var/datum/design/D = SSresearch.techweb_design_by_id(v)
|
||||
if(findtext(D.name,href_list["to_search"]))
|
||||
matching_designs.Add(D)
|
||||
updateUsrDialog()
|
||||
/obj/machinery/autolathe/attackby(obj/item/O, mob/living/user, params)
|
||||
if(busy)
|
||||
balloon_alert(user, "it's busy!")
|
||||
return TRUE
|
||||
|
||||
if(user.a_intent == INTENT_HARM) //so we can hit the machine
|
||||
return ..()
|
||||
|
||||
if(stat)
|
||||
return TRUE
|
||||
|
||||
if(istype(O, /obj/item/disk/design_disk))
|
||||
user.visible_message(span_notice("[user] begins to load \the [O] in \the [src]..."),
|
||||
balloon_alert(user, "uploading design..."),
|
||||
span_hear("You hear the chatter of a floppy drive."))
|
||||
busy = TRUE
|
||||
if(do_after(user, 14.4, target = src))
|
||||
var/obj/item/disk/design_disk/disky = O
|
||||
var/list/not_imported
|
||||
for(var/datum/design/blueprint as anything in disky.blueprints)
|
||||
if(!blueprint)
|
||||
continue
|
||||
if(blueprint.build_type & AUTOLATHE)
|
||||
stored_research.add_design(blueprint)
|
||||
else
|
||||
LAZYADD(not_imported, blueprint.name)
|
||||
if(not_imported)
|
||||
to_chat(user, span_warning("The following design[length(not_imported) > 1 ? "s" : ""] couldn't be imported: [english_list(not_imported)]"))
|
||||
busy = FALSE
|
||||
return TRUE
|
||||
|
||||
if(panel_open)
|
||||
balloon_alert(user, "close the panel first!")
|
||||
return FALSE
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/machinery/autolathe/screwdriver_act(mob/living/user, obj/item/I)
|
||||
. = ..()
|
||||
if(busy)
|
||||
balloon_alert(user, "it's busy!")
|
||||
return STOP_ATTACK_PROC_CHAIN
|
||||
|
||||
if(default_deconstruction_screwdriver(user, "autolathe_t", "autolathe", I))
|
||||
return STOP_ATTACK_PROC_CHAIN
|
||||
|
||||
/obj/machinery/autolathe/crowbar_act(mob/living/user, obj/item/I)
|
||||
. = ..()
|
||||
if(busy)
|
||||
balloon_alert(user, "it's busy!")
|
||||
return STOP_ATTACK_PROC_CHAIN
|
||||
|
||||
if(default_deconstruction_crowbar(I))
|
||||
return STOP_ATTACK_PROC_CHAIN
|
||||
|
||||
/obj/machinery/autolathe/multitool_act(mob/living/user, obj/item/I)
|
||||
. = ..()
|
||||
if(busy)
|
||||
balloon_alert(user, "it's busy!")
|
||||
return STOP_ATTACK_PROC_CHAIN
|
||||
|
||||
if(panel_open)
|
||||
wires.interact(user)
|
||||
return STOP_ATTACK_PROC_CHAIN
|
||||
|
||||
/obj/machinery/autolathe/proc/AfterMaterialInsert(obj/item/item_inserted, id_inserted, amount_inserted)
|
||||
if(istype(item_inserted, /obj/item/stack/ore/bluespace_crystal))
|
||||
use_power(MINERAL_MATERIAL_AMOUNT / 10)
|
||||
else if(custom_materials && custom_materials.len && custom_materials[SSmaterials.GetMaterialRef(/datum/material/glass)])
|
||||
flick("autolathe_r", src)//plays glass insertion animation by default otherwise
|
||||
else
|
||||
to_chat(usr, "<span class=\"alert\">The autolathe is busy. Please wait for completion of previous operation.</span>")
|
||||
flick("autolathe_o", src)//plays metal insertion animation
|
||||
|
||||
updateUsrDialog()
|
||||
|
||||
return
|
||||
use_power(min(1000, amount_inserted / 100))
|
||||
|
||||
/obj/machinery/autolathe/proc/make_item(power, list/materials_used, list/picked_materials, multiplier, coeff, is_stack, mob/user)
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
@@ -223,11 +316,11 @@
|
||||
materials.use_materials(materials_used)
|
||||
|
||||
if(is_stack)
|
||||
var/obj/item/stack/N = new being_built.build_path(A, multiplier)
|
||||
N.update_icon()
|
||||
var/obj/item/stack/N = new being_built.build_path(A, multiplier, FALSE)
|
||||
N.update_appearance()
|
||||
N.autolathe_crafted(src)
|
||||
else
|
||||
for(var/i=1, i<=multiplier, i++)
|
||||
for(var/i in 1 to multiplier)
|
||||
var/obj/item/new_item = new being_built.build_path(A)
|
||||
new_item.autolathe_crafted(src)
|
||||
|
||||
@@ -241,132 +334,30 @@
|
||||
|
||||
icon_state = "autolathe"
|
||||
busy = FALSE
|
||||
updateDialog()
|
||||
|
||||
/obj/machinery/autolathe/RefreshParts()
|
||||
var/T = 0
|
||||
for(var/obj/item/stock_parts/matter_bin/MB in component_parts)
|
||||
T += MB.rating*75000
|
||||
var/mat_capacity = 0
|
||||
for(var/obj/item/stock_parts/matter_bin/new_matter_bin in component_parts)
|
||||
mat_capacity += new_matter_bin.rating*75000
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
materials.max_amount = T
|
||||
T=1.2
|
||||
for(var/obj/item/stock_parts/manipulator/M in component_parts)
|
||||
T -= M.rating*0.2
|
||||
prod_coeff = min(1,max(0,T)) // Coeff going 1 -> 0,8 -> 0,6 -> 0,4
|
||||
materials.max_amount = mat_capacity
|
||||
|
||||
var/efficiency=1.2
|
||||
for(var/obj/item/stock_parts/manipulator/new_manipulator in component_parts)
|
||||
efficiency -= new_manipulator.rating*0.2
|
||||
creation_efficiency = max(1,efficiency) // creation_efficiency goes 1 -> 0,8 -> 0,6 -> 0,4 per level of manipulator efficiency
|
||||
|
||||
/obj/machinery/autolathe/examine(mob/user)
|
||||
. += ..()
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
if(in_range(user, src) || isobserver(user))
|
||||
. += "<span class='notice'>The status display reads: Storing up to <b>[materials.max_amount]</b> material units.<br>Material consumption at <b>[prod_coeff*100]%</b>.</span>"
|
||||
|
||||
/obj/machinery/autolathe/proc/main_win(mob/user)
|
||||
var/dat = "<div class='statusDisplay'><h3>Autolathe Menu:</h3><br>"
|
||||
dat += materials_printout()
|
||||
|
||||
dat += "<form name='search' action='?src=[REF(src)]'>\
|
||||
<input type='hidden' name='src' value='[REF(src)]'>\
|
||||
<input type='hidden' name='search' value='to_search'>\
|
||||
<input type='hidden' name='menu' value='[AUTOLATHE_SEARCH_MENU]'>\
|
||||
<input type='text' name='to_search'>\
|
||||
<input type='submit' value='Search'>\
|
||||
</form><hr>"
|
||||
|
||||
var/line_length = 1
|
||||
dat += "<table style='width:100%' align='center'><tr>"
|
||||
|
||||
for(var/C in categories)
|
||||
if(line_length > 2)
|
||||
dat += "</tr><tr>"
|
||||
line_length = 1
|
||||
|
||||
dat += "<td><A href='?src=[REF(src)];category=[C];menu=[AUTOLATHE_CATEGORY_MENU]'>[C]</A></td>"
|
||||
line_length++
|
||||
|
||||
dat += "</tr></table></div>"
|
||||
return dat
|
||||
|
||||
/obj/machinery/autolathe/proc/category_win(mob/user,selected_category)
|
||||
var/dat = "<A href='?src=[REF(src)];menu=[AUTOLATHE_MAIN_MENU]'>Return to main menu</A>"
|
||||
dat += "<div class='statusDisplay'><h3>Browsing [selected_category]:</h3><br>"
|
||||
dat += materials_printout()
|
||||
|
||||
for(var/v in stored_research.researched_designs)
|
||||
var/datum/design/D = SSresearch.techweb_design_by_id(v)
|
||||
if(!(selected_category in D.category))
|
||||
continue
|
||||
|
||||
if(disabled || !can_build(D))
|
||||
dat += "<span class='linkOff'>[D.name]</span>"
|
||||
else
|
||||
dat += "<a href='?src=[REF(src)];make=[D.id];multiplier=1'>[D.name]</a>"
|
||||
|
||||
if(ispath(D.build_path, /obj/item/stack))
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
var/max_multiplier
|
||||
for(var/datum/material/mat in D.materials)
|
||||
max_multiplier = min(D.maxstack, round(materials.get_material_amount(mat)/D.materials[mat]))
|
||||
if (max_multiplier>10 && !disabled)
|
||||
dat += " <a href='?src=[REF(src)];make=[D.id];multiplier=10'>x10</a>"
|
||||
if (max_multiplier>25 && !disabled)
|
||||
dat += " <a href='?src=[REF(src)];make=[D.id];multiplier=25'>x25</a>"
|
||||
if(max_multiplier > 0 && !disabled)
|
||||
dat += " <a href='?src=[REF(src)];make=[D.id];multiplier=[max_multiplier]'>x[max_multiplier]</a>"
|
||||
else
|
||||
if(!disabled && can_build(D, 5))
|
||||
dat += " <a href='?src=[REF(src)];make=[D.id];multiplier=5'>x5</a>"
|
||||
if(!disabled && can_build(D, 10))
|
||||
dat += " <a href='?src=[REF(src)];make=[D.id];multiplier=10'>x10</a>"
|
||||
|
||||
dat += "[get_design_cost(D)]<br>"
|
||||
|
||||
dat += "</div>"
|
||||
return dat
|
||||
|
||||
/obj/machinery/autolathe/proc/search_win(mob/user)
|
||||
var/dat = "<A href='?src=[REF(src)];menu=[AUTOLATHE_MAIN_MENU]'>Return to main menu</A>"
|
||||
dat += "<div class='statusDisplay'><h3>Search results:</h3><br>"
|
||||
dat += materials_printout()
|
||||
|
||||
for(var/v in matching_designs)
|
||||
var/datum/design/D = v
|
||||
if(disabled || !can_build(D))
|
||||
dat += "<span class='linkOff'>[D.name]</span>"
|
||||
else
|
||||
dat += "<a href='?src=[REF(src)];make=[D.id];multiplier=1'>[D.name]</a>"
|
||||
|
||||
if(ispath(D.build_path, /obj/item/stack))
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
var/max_multiplier
|
||||
for(var/datum/material/mat in D.materials)
|
||||
max_multiplier = min(D.maxstack, round(materials.get_material_amount(mat)/D.materials[mat]))
|
||||
if (max_multiplier>10 && !disabled)
|
||||
dat += " <a href='?src=[REF(src)];make=[D.id];multiplier=10'>x10</a>"
|
||||
if (max_multiplier>25 && !disabled)
|
||||
dat += " <a href='?src=[REF(src)];make=[D.id];multiplier=25'>x25</a>"
|
||||
if(max_multiplier > 0 && !disabled)
|
||||
dat += " <a href='?src=[REF(src)];make=[D.id];multiplier=[max_multiplier]'>x[max_multiplier]</a>"
|
||||
|
||||
dat += "[get_design_cost(D)]<br>"
|
||||
|
||||
dat += "</div>"
|
||||
return dat
|
||||
|
||||
/obj/machinery/autolathe/proc/materials_printout()
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
var/dat = "<b>Total amount:</b> [materials.total_amount] / [materials.max_amount] cm<sup>3</sup><br>"
|
||||
for(var/mat_id in materials.materials)
|
||||
var/datum/material/M = mat_id
|
||||
var/mineral_amount = materials.materials[mat_id]
|
||||
if(mineral_amount > 0)
|
||||
dat += "<b>[M.name] amount:</b> [mineral_amount] cm<sup>3</sup><br>"
|
||||
return dat
|
||||
. += span_notice("The status display reads: Storing up to <b>[materials.max_amount]</b> material units.<br>Material consumption at <b>[creation_efficiency*100]%</b>.")
|
||||
|
||||
/obj/machinery/autolathe/proc/can_build(datum/design/D, amount = 1)
|
||||
if(D.make_reagents.len)
|
||||
if(length(D.make_reagents))
|
||||
return FALSE
|
||||
|
||||
var/coeff = (ispath(D.build_path, /obj/item/stack) ? 1 : prod_coeff)
|
||||
var/coeff = (ispath(D.build_path, /obj/item/stack) ? 1 : creation_efficiency)
|
||||
|
||||
var/list/required_materials = list()
|
||||
|
||||
@@ -379,7 +370,7 @@
|
||||
|
||||
|
||||
/obj/machinery/autolathe/proc/get_design_cost(datum/design/D)
|
||||
var/coeff = (ispath(D.build_path, /obj/item/stack) ? 1 : prod_coeff)
|
||||
var/coeff = (ispath(D.build_path, /obj/item/stack) ? 1 : creation_efficiency)
|
||||
var/dat
|
||||
for(var/i in D.materials)
|
||||
if(istext(i)) //Category handling
|
||||
@@ -402,7 +393,7 @@
|
||||
disabled = FALSE
|
||||
|
||||
/obj/machinery/autolathe/proc/shock(mob/user, prb)
|
||||
if(stat & (BROKEN|NOPOWER)) // unpowered, no shock
|
||||
if(stat & (BROKEN|NOPOWER)) // unpowered, no shock
|
||||
return FALSE
|
||||
if(!prob(prb))
|
||||
return FALSE
|
||||
@@ -424,7 +415,7 @@
|
||||
else
|
||||
stored_research.remove_design(D)
|
||||
|
||||
/obj/machinery/autolathe/hacked/Initialize()
|
||||
/obj/machinery/autolathe/hacked/Initialize(mapload)
|
||||
. = ..()
|
||||
adjust_hacked(TRUE)
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
M.reset_perspective(null)
|
||||
to_chat(M, "The screen bursts into static.")
|
||||
|
||||
/obj/machinery/camera/ex_act(severity, target)
|
||||
/obj/machinery/camera/ex_act(severity, target, origin)
|
||||
if(invuln)
|
||||
return
|
||||
..()
|
||||
@@ -407,7 +407,7 @@
|
||||
|
||||
/obj/machinery/camera/get_remote_view_fullscreens(mob/user)
|
||||
if(view_range == short_range) //unfocused
|
||||
user.overlay_fullscreen("remote_view", /atom/movable/screen/fullscreen/impaired, 2)
|
||||
user.overlay_fullscreen("remote_view", /atom/movable/screen/fullscreen/scaled/impaired, 2)
|
||||
|
||||
/obj/machinery/camera/update_remote_sight(mob/living/user)
|
||||
user.see_invisible = SEE_INVISIBLE_LIVING //can't see ghosts through cameras
|
||||
|
||||
@@ -439,7 +439,7 @@
|
||||
mob_occupant.copy_from_prefs_vr()
|
||||
go_out()
|
||||
|
||||
/obj/machinery/clonepod/ex_act(severity, target)
|
||||
/obj/machinery/clonepod/ex_act(severity, target, origin)
|
||||
..()
|
||||
if(!QDELETED(src))
|
||||
go_out()
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
desc = "A machine to give your apparel a fresh new color! Recommended to use with white items for best results."
|
||||
icon = 'icons/obj/vending.dmi'
|
||||
icon_state = "colormate"
|
||||
// light_mask = "colormate-light-mask"
|
||||
density = TRUE
|
||||
anchored = TRUE
|
||||
circuit = /obj/item/circuitboard/machine/colormate
|
||||
|
||||
@@ -258,8 +258,8 @@
|
||||
|
||||
//heccing chonker passive, only gives more HP at the start of a new game but has one of the hardest weakpoint to trigger.
|
||||
if(LAZYACCESS(enemy_passive, "chonker"))
|
||||
if(weakpoint_check("chonker","power_attack","power_attack","power_attack"))
|
||||
list_temp += "<br><center><h3>After a lot of power attacks you manage to tip over [enemy_name] as they fall over their enormous weight<center><h3> "
|
||||
if(weakpoint_check("chonker","attack","attack","power_attack"))
|
||||
list_temp += "<br><center><h3>After attacking twice, your power attack manages to tip over [enemy_name] as they fall over their enormous weight<center><h3> "
|
||||
enemy_hp -= 30
|
||||
|
||||
//smart passive trait, mainly works in tandem with other traits, makes the enemy unable to be counter_attacked
|
||||
@@ -302,7 +302,7 @@
|
||||
else if(!enemy_stance)
|
||||
var/added_temp
|
||||
|
||||
if(rand())
|
||||
if(prob(80))
|
||||
added_temp = "you for [attack_amount + 5] damage!"
|
||||
player_hp -= attack_amount + 5
|
||||
enemy_stance = "attack"
|
||||
@@ -451,7 +451,7 @@
|
||||
msg += "\t<span class='info'>shotgun -> defend, defend, power attack</span>"
|
||||
msg += "\t<span class='info'>short temper -> counter, counter, counter</span>"
|
||||
msg += "\t<span class='info'>poisonous -> light attack, light attack, light attack</span>"
|
||||
msg += "\t<span class='info'>chonker -> power attack, power attack, power attack</span>"
|
||||
msg += "\t<span class='info'>chonker -> light attack, light attack, power attack</span>"
|
||||
return msg
|
||||
|
||||
/obj/machinery/computer/arcade/battle/emag_act(mob/user)
|
||||
|
||||
@@ -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", /atom/movable/screen/fullscreen/flash/static)
|
||||
C.overlay_fullscreen("flash", /atom/movable/screen/fullscreen/tiled/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)
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
/obj/machinery/computer/communications/Initialize()
|
||||
. = ..()
|
||||
GLOB.shuttle_caller_list += src
|
||||
AddComponent(/datum/component/gps, "Secured Communications Signal")
|
||||
|
||||
/// Are we NOT a silicon, AND we're logged in as the captain?
|
||||
/obj/machinery/computer/communications/proc/authenticated_as_non_silicon_captain(mob/user)
|
||||
@@ -79,13 +80,11 @@
|
||||
if (obj_flags & EMAGGED)
|
||||
return
|
||||
obj_flags |= EMAGGED
|
||||
SSshuttle.shuttle_purchase_requirements_met |= "emagged"
|
||||
if (authenticated)
|
||||
authorize_access = get_all_accesses()
|
||||
to_chat(user, "<span class='danger'>You scramble the communication routing circuits!</span>")
|
||||
to_chat(user, span_danger("You scramble the communication routing circuits!"))
|
||||
playsound(src, 'sound/machines/terminal_alert.ogg', 50, FALSE)
|
||||
SSshuttle.shuttle_purchase_requirements_met["emagged"] = TRUE
|
||||
return
|
||||
|
||||
/obj/machinery/computer/communications/ui_act(action, list/params)
|
||||
var/static/list/approved_states = list(STATE_BUYING_SHUTTLE, STATE_CHANGING_STATUS, STATE_MAIN, STATE_MESSAGES)
|
||||
@@ -104,6 +103,7 @@
|
||||
if ("answerMessage")
|
||||
if (!authenticated(usr))
|
||||
return
|
||||
|
||||
var/answer_index = params["answer"]
|
||||
var/message_index = params["message"]
|
||||
|
||||
@@ -136,11 +136,11 @@
|
||||
var/obj/item/held_item = usr.get_active_held_item()
|
||||
var/obj/item/card/id/id_card = held_item?.GetID()
|
||||
if (!istype(id_card))
|
||||
to_chat(usr, "<span class='warning'>You need to swipe your ID!</span>")
|
||||
to_chat(usr, span_warning("You need to swipe your ID!"))
|
||||
playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, FALSE)
|
||||
return
|
||||
if (!(ACCESS_CAPTAIN in id_card.access))
|
||||
to_chat(usr, "<span class='warning'>You are not authorized to do this!</span>")
|
||||
to_chat(usr, span_warning("You are not authorized to do this!"))
|
||||
playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, FALSE)
|
||||
return
|
||||
|
||||
@@ -152,26 +152,28 @@
|
||||
|
||||
set_security_level(new_sec_level)
|
||||
|
||||
to_chat(usr, "<span class='notice'>Authorization confirmed. Modifying security level.</span>")
|
||||
to_chat(usr, span_notice("Authorization confirmed. Modifying security level."))
|
||||
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE)
|
||||
|
||||
// Only notify people if an actual change happened
|
||||
log_game("[key_name(usr)] has changed the security level to [params["newSecurityLevel"]] with [src] at [AREACOORD(usr)].")
|
||||
message_admins("[ADMIN_LOOKUPFLW(usr)] has changed the security level to [params["newSecurityLevel"]] with [src] at [AREACOORD(usr)].")
|
||||
deadchat_broadcast(" has changed the security level to [params["newSecurityLevel"]] with [src] at <span class='name'>[get_area_name(usr, TRUE)]</span>.", "<span class='name'>[usr.real_name]</span>", usr)
|
||||
deadchat_broadcast(" has changed the security level to [params["newSecurityLevel"]] with [src] at [span_name("[get_area_name(usr, TRUE)]")].", usr, src.loc, message_type=DEADCHAT_ANNOUNCEMENT)
|
||||
|
||||
alert_level_tick += 1
|
||||
if ("deleteMessage")
|
||||
if (!authenticated(usr))
|
||||
return
|
||||
var/message_index = params["message"]
|
||||
|
||||
if(!isnum(message_index))
|
||||
message_admins("[ADMIN_LOOKUPFLW(usr)] provided an invalid index type when deleting a message on [src] [ADMIN_JMP(src)]. This should not happen. Please check with a maintainer and/or consult tgui logs.")
|
||||
CRASH("Non-numeric index provided when deleting comms console message.")
|
||||
var/message_index = text2num(params["message"])
|
||||
if (!message_index)
|
||||
return
|
||||
LAZYREMOVE(messages, LAZYACCESS(messages, message_index))
|
||||
if ("emergency_meeting")
|
||||
if(!(SSevents.holidays && SSevents.holidays[APRIL_FOOLS]))
|
||||
return
|
||||
if (!authenticated_as_silicon_or_captain(usr))
|
||||
return
|
||||
emergency_meeting(usr)
|
||||
if ("makePriorityAnnouncement")
|
||||
if (!authenticated_as_silicon_or_captain(usr))
|
||||
return
|
||||
@@ -188,32 +190,36 @@
|
||||
var/emagged = obj_flags & EMAGGED
|
||||
if (emagged)
|
||||
message_syndicate(message, usr)
|
||||
to_chat(usr, "<span class='danger'>SYSERR @l(19833)of(transmit.dm): !@$ MESSAGE TRANSMITTED TO SYNDICATE COMMAND.</span>")
|
||||
to_chat(usr, span_danger("SYSERR @l(19833)of(transmit.dm): !@$ MESSAGE TRANSMITTED TO SYNDICATE COMMAND."))
|
||||
else
|
||||
message_centcom(message, usr)
|
||||
to_chat(usr, "<span class='notice'>Message transmitted to Central Command.</span>")
|
||||
to_chat(usr, span_notice("Message transmitted to Central Command."))
|
||||
|
||||
var/associates = emagged ? "the Syndicate": "CentCom"
|
||||
usr.log_talk(message, LOG_SAY, tag = "message to [associates]")
|
||||
deadchat_broadcast(" has messaged [associates], \"[message]\" at <span class='name'>[get_area_name(usr, TRUE)]</span>.", "<span class='name'>[usr.real_name]</span>", usr)
|
||||
deadchat_broadcast(" has messaged [associates], \"[message]\" at [span_name("[get_area_name(usr, TRUE)]")].", usr, src.loc, message_type = DEADCHAT_ANNOUNCEMENT)
|
||||
COOLDOWN_START(src, important_action_cooldown, IMPORTANT_ACTION_COOLDOWN)
|
||||
if ("purchaseShuttle")
|
||||
var/can_buy_shuttles_or_fail_reason = can_buy_shuttles(usr)
|
||||
if (can_buy_shuttles_or_fail_reason != TRUE)
|
||||
if (can_buy_shuttles_or_fail_reason != FALSE)
|
||||
to_chat(usr, "<span class='alert'>[can_buy_shuttles_or_fail_reason]</span>")
|
||||
to_chat(usr, span_alert("[can_buy_shuttles_or_fail_reason]"))
|
||||
return
|
||||
var/list/shuttles = flatten_list(SSmapping.shuttle_templates)
|
||||
var/datum/map_template/shuttle/shuttle = locate(params["shuttle"]) in shuttles
|
||||
if (!istype(shuttle))
|
||||
return
|
||||
// if (!can_purchase_this_shuttle(shuttle))
|
||||
// return
|
||||
if (!shuttle.prerequisites_met())
|
||||
to_chat(usr, "<span class='alert'>You have not met the requirements for purchasing this shuttle.</span>")
|
||||
to_chat(usr, span_alert("You have not met the requirements for purchasing this shuttle."))
|
||||
return
|
||||
var/datum/bank_account/bank_account = SSeconomy.get_dep_account(ACCOUNT_CAR)
|
||||
if (bank_account.account_balance < shuttle.credit_cost)
|
||||
return
|
||||
SSshuttle.shuttle_purchased = SHUTTLEPURCHASE_PURCHASED
|
||||
// for(var/datum/round_event_control/shuttle_insurance/insurance_event in SSevents.control)
|
||||
// insurance_event.weight *= 20
|
||||
SSshuttle.unload_preview()
|
||||
SSshuttle.existing_shuttle = SSshuttle.emergency
|
||||
SSshuttle.action_load(shuttle, replace = TRUE)
|
||||
@@ -235,7 +241,7 @@
|
||||
return
|
||||
var/reason = trim(html_encode(params["reason"]), MAX_MESSAGE_LEN)
|
||||
nuke_request(reason, usr)
|
||||
to_chat(usr, "<span class='notice'>Request sent.</span>")
|
||||
to_chat(usr, span_notice("Request sent."))
|
||||
usr.log_message("has requested the nuclear codes from CentCom with reason \"[reason]\"", LOG_SAY)
|
||||
priority_announce("The codes for the on-station nuclear self-destruct have been requested by [usr]. Confirmation or denial of this request will be sent shortly.", "Nuclear Self-Destruct Codes Requested", "commandreport")
|
||||
playsound(src, 'sound/machines/terminal_prompt.ogg', 50, FALSE)
|
||||
@@ -245,7 +251,7 @@
|
||||
return
|
||||
if (!(obj_flags & EMAGGED))
|
||||
return
|
||||
to_chat(usr, "<span class='notice'>Backup routing data restored.</span>")
|
||||
to_chat(usr, span_notice("Backup routing data restored."))
|
||||
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE)
|
||||
obj_flags &= ~EMAGGED
|
||||
if ("sendToOtherSector")
|
||||
@@ -256,7 +262,7 @@
|
||||
if (!COOLDOWN_FINISHED(src, important_action_cooldown))
|
||||
return
|
||||
|
||||
var/message = trim(html_encode(params["message"]), MAX_MESSAGE_LEN)
|
||||
var/message = trim(params["message"], MAX_MESSAGE_LEN)
|
||||
if (!message)
|
||||
return
|
||||
|
||||
@@ -268,12 +274,13 @@
|
||||
var/network_name = CONFIG_GET(string/cross_comms_network)
|
||||
if (network_name)
|
||||
payload["network"] = network_name
|
||||
payload["sender_ckey"] = usr.ckey
|
||||
|
||||
send2otherserver(station_name(), message, "Comms_Console", destination == "all" ? null : list(destination), additional_data = payload)
|
||||
send2otherserver(html_decode(station_name()), message, "Comms_Console", destination == "all" ? null : list(destination), additional_data = payload)
|
||||
minor_announce(message, title = "Outgoing message to allied station")
|
||||
usr.log_talk(message, LOG_SAY, tag = "message to the other server")
|
||||
message_admins("[ADMIN_LOOKUPFLW(usr)] has sent a message to the other server\[s].")
|
||||
deadchat_broadcast(" has sent an outgoing message to the other station(s).</span>", "<span class='bold'>[usr.real_name]", usr)
|
||||
deadchat_broadcast(" has sent an outgoing message to the other station(s).</span>", usr, src.loc, message_type = DEADCHAT_ANNOUNCEMENT)
|
||||
|
||||
COOLDOWN_START(src, important_action_cooldown, IMPORTANT_ACTION_COOLDOWN)
|
||||
if ("setState")
|
||||
@@ -315,7 +322,7 @@
|
||||
authenticated = TRUE
|
||||
authorize_access = get_all_accesses()
|
||||
authorize_name = "Unknown"
|
||||
to_chat(usr, "<span class='warning'>[src] lets out a quiet alarm as its login is overridden.</span>")
|
||||
to_chat(usr, span_warning("[src] lets out a quiet alarm as its login is overridden."))
|
||||
playsound(src, 'sound/machines/terminal_alert.ogg', 25, FALSE)
|
||||
else if(isliving(usr))
|
||||
var/mob/living/L = usr
|
||||
@@ -334,22 +341,36 @@
|
||||
revoke_maint_all_access()
|
||||
log_game("[key_name(usr)] disabled emergency maintenance access.")
|
||||
message_admins("[ADMIN_LOOKUPFLW(usr)] disabled emergency maintenance access.")
|
||||
deadchat_broadcast(" disabled emergency maintenance access at <span class='name'>[get_area_name(usr, TRUE)]</span>.", "<span class='name'>[usr.real_name]</span>", usr)
|
||||
deadchat_broadcast(" disabled emergency maintenance access at [span_name("[get_area_name(usr, TRUE)]")].", usr, src.loc, message_type = DEADCHAT_ANNOUNCEMENT)
|
||||
else
|
||||
make_maint_all_access()
|
||||
log_game("[key_name(usr)] enabled emergency maintenance access.")
|
||||
message_admins("[ADMIN_LOOKUPFLW(usr)] enabled emergency maintenance access.")
|
||||
deadchat_broadcast(" enabled emergency maintenance access at <span class='name'>[get_area_name(usr, TRUE)]</span>.", "<span class='name'>[usr.real_name]</span>", usr)
|
||||
deadchat_broadcast(" enabled emergency maintenance access at [span_name("[get_area_name(usr, TRUE)]")].", usr, src.loc, message_type = DEADCHAT_ANNOUNCEMENT)
|
||||
|
||||
/obj/machinery/computer/communications/ui_data(mob/user)
|
||||
var/list/data = list(
|
||||
"authenticated" = FALSE,
|
||||
"emagged" = FALSE,
|
||||
"hasConnection" = has_communication(),
|
||||
)
|
||||
|
||||
var/ui_state = issilicon(user) ? cyborg_state : state
|
||||
|
||||
var/has_connection = has_communication()
|
||||
data["hasConnection"] = has_connection
|
||||
|
||||
// if(!SSjob.assigned_captain && !SSjob.safe_code_requested && SSid_access.spare_id_safe_code && has_connection)
|
||||
// data["canRequestSafeCode"] = TRUE
|
||||
// data["safeCodeDeliveryWait"] = 0
|
||||
// else
|
||||
// data["canRequestSafeCode"] = FALSE
|
||||
// if(SSjob.safe_code_timer_id && has_connection)
|
||||
// data["safeCodeDeliveryWait"] = timeleft(SSjob.safe_code_timer_id)
|
||||
// data["safeCodeDeliveryArea"] = get_area(SSjob.safe_code_request_loc)
|
||||
// else
|
||||
// data["safeCodeDeliveryWait"] = 0
|
||||
// data["safeCodeDeliveryArea"] = null
|
||||
|
||||
if (authenticated || issilicon(user))
|
||||
data["authenticated"] = TRUE
|
||||
data["canLogOut"] = !issilicon(user)
|
||||
@@ -371,16 +392,17 @@
|
||||
data["importantActionReady"] = COOLDOWN_FINISHED(src, important_action_cooldown)
|
||||
data["shuttleCalled"] = FALSE
|
||||
data["shuttleLastCalled"] = FALSE
|
||||
|
||||
data["aprilFools"] = SSevents.holidays && SSevents.holidays[APRIL_FOOLS]
|
||||
data["alertLevel"] = NUM2SECLEVEL(GLOB.security_level)
|
||||
data["authorizeName"] = authorize_name
|
||||
data["canLogOut"] = !issilicon(user)
|
||||
data["shuttleCanEvacOrFailReason"] = SSshuttle.canEvac(user, TRUE)
|
||||
data["shuttleCanEvacOrFailReason"] = SSshuttle.canEvac(user)
|
||||
|
||||
if (authenticated_as_non_silicon_captain(user))
|
||||
data["canRequestNuke"] = TRUE
|
||||
if (authenticated_as_non_silicon_command(user))
|
||||
data["canMessageAssociates"] = TRUE
|
||||
|
||||
if (can_send_messages_to_other_sectors(user))
|
||||
data["canSendToSectors"] = TRUE
|
||||
|
||||
@@ -428,8 +450,13 @@
|
||||
|
||||
for (var/shuttle_id in SSmapping.shuttle_templates)
|
||||
var/datum/map_template/shuttle/shuttle_template = SSmapping.shuttle_templates[shuttle_id]
|
||||
if (!shuttle_template.can_be_bought || shuttle_template.credit_cost == INFINITY)
|
||||
|
||||
if (shuttle_template.credit_cost == INFINITY)
|
||||
continue
|
||||
|
||||
if (!shuttle_template.can_be_bought)
|
||||
continue
|
||||
|
||||
shuttles += list(list(
|
||||
"name" = shuttle_template.name,
|
||||
"description" = shuttle_template.description,
|
||||
@@ -478,6 +505,7 @@
|
||||
return FALSE
|
||||
if (!authenticated_as_non_silicon_captain(user))
|
||||
return FALSE
|
||||
|
||||
if (SSshuttle.emergency.mode != SHUTTLE_RECALL && SSshuttle.emergency.mode != SHUTTLE_IDLE)
|
||||
return "The shuttle is already in transit."
|
||||
if (SSshuttle.shuttle_purchased == SHUTTLEPURCHASE_PURCHASED)
|
||||
@@ -492,21 +520,38 @@
|
||||
|
||||
return length(CONFIG_GET(keyed_list/cross_server)) > 0
|
||||
|
||||
/**
|
||||
* Call an emergency meeting
|
||||
*
|
||||
* Comm Console wrapper for the Communications subsystem wrapper for the call_emergency_meeting world proc.
|
||||
* Checks to make sure the proc can be called, and handles relevant feedback, logging and timing.
|
||||
* See the SScommunications proc definition for more detail, in short, teleports the entire crew to
|
||||
* the bridge for a meetup. Should only really happen during april fools.
|
||||
* Arguments:
|
||||
* * user - Mob who called the meeting
|
||||
*/
|
||||
/obj/machinery/computer/communications/proc/emergency_meeting(mob/living/user)
|
||||
if(!SScommunications.can_make_emergency_meeting(user))
|
||||
to_chat(user, span_alert("The emergency meeting button doesn't seem to work right now. Please stand by."))
|
||||
return
|
||||
SScommunications.emergency_meeting(user)
|
||||
deadchat_broadcast(" called an emergency meeting from [span_name("[get_area_name(usr, TRUE)]")].", span_name("[user.real_name]"), user, message_type=DEADCHAT_ANNOUNCEMENT)
|
||||
|
||||
/obj/machinery/computer/communications/proc/make_announcement(mob/living/user)
|
||||
var/is_ai = issilicon(user)
|
||||
if(!SScommunications.can_announce(user, is_ai))
|
||||
to_chat(user, "<span class='alert'>Intercomms recharging. Please stand by.</span>")
|
||||
to_chat(user, span_alert("Intercomms recharging. Please stand by."))
|
||||
return
|
||||
var/input = stripped_input(user, "Please choose a message to announce to the station crew.", "What?")
|
||||
if(!input || !user.canUseTopic(src, !issilicon(usr)))
|
||||
return
|
||||
if(!(user.can_speak())) //No more cheating, mime/random mute guy!
|
||||
input = "..."
|
||||
to_chat(user, "<span class='warning'>You find yourself unable to speak.</span>")
|
||||
to_chat(user, span_warning("You find yourself unable to speak."))
|
||||
else
|
||||
input = user.treat_message(input) //Adds slurs and so on. Someone should make this use languages too.
|
||||
SScommunications.make_announcement(user, is_ai, input)
|
||||
deadchat_broadcast(" made a priority announcement from <span class='name'>[get_area_name(usr, TRUE)]</span>.", "<span class='name'>[user.real_name]</span>", user)
|
||||
deadchat_broadcast(" made a priority announcement from [span_name("[get_area_name(usr, TRUE)]")].", user, src.loc, message_type=DEADCHAT_ANNOUNCEMENT)
|
||||
|
||||
/obj/machinery/computer/communications/proc/post_status(command, data1, data2)
|
||||
|
||||
|
||||
+271
-262
@@ -1,3 +1,5 @@
|
||||
#define AHELP_FIRST_MESSAGE "Please adminhelp before leaving the round, even if there are no administrators online!"
|
||||
|
||||
/*
|
||||
* Cryogenic refrigeration unit. Basically a despawner.
|
||||
* Stealing a lot of concepts/code from sleepers due to massive laziness.
|
||||
@@ -5,6 +7,7 @@
|
||||
* since time_entered, which is world.time when the occupant moves in.
|
||||
* ~ Zuhayr
|
||||
*/
|
||||
GLOBAL_LIST_EMPTY(cryopod_computers)
|
||||
|
||||
//Main cryopod console.
|
||||
|
||||
@@ -13,162 +16,113 @@
|
||||
desc = "An interface between crew and the cryogenic storage oversight systems."
|
||||
icon = 'icons/obj/Cryogenic2.dmi'
|
||||
icon_state = "cellconsole_1"
|
||||
icon_keyboard = null
|
||||
circuit = /obj/item/circuitboard/cryopodcontrol
|
||||
density = FALSE
|
||||
interaction_flags_machine = INTERACT_MACHINE_OFFLINE
|
||||
req_one_access = list(ACCESS_HEADS, ACCESS_ARMORY) //Heads of staff or the warden can go here to claim recover items from their department that people went were cryodormed with.
|
||||
req_one_access = list(ACCESS_HEADS, ACCESS_ARMORY) // Heads of staff or the warden can go here to claim recover items from their department that people went were cryodormed with.
|
||||
var/mode = null
|
||||
|
||||
var/menu = 1 //Which menu screen to display
|
||||
|
||||
//Used for logging people entering cryosleep and important items they are carrying.
|
||||
// Used for logging people entering cryosleep and important items they are carrying.
|
||||
var/list/frozen_crew = list()
|
||||
var/list/obj/stored_packages = list()
|
||||
|
||||
var/list/stored_packages = list()
|
||||
/// Does this console store items? if NOT, will dump all items when the user cryo's instead
|
||||
var/allow_items = TRUE
|
||||
|
||||
var/storage_type = "crewmembers"
|
||||
var/storage_name = "Cryogenic Oversight Control"
|
||||
|
||||
/obj/machinery/computer/cryopod/deconstruct()
|
||||
. = ..()
|
||||
for(var/i in stored_packages)
|
||||
var/obj/O = i
|
||||
O.forceMove(drop_location())
|
||||
|
||||
/obj/machinery/computer/cryopod/attack_ai()
|
||||
attack_hand()
|
||||
/obj/machinery/computer/cryopod/Initialize()
|
||||
. = ..()
|
||||
GLOB.cryopod_computers += src
|
||||
|
||||
/obj/machinery/computer/cryopod/ui_interact(mob/user = usr)
|
||||
if(!is_operational())
|
||||
/obj/machinery/computer/cryopod/Destroy()
|
||||
GLOB.cryopod_computers -= src
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/cryopod/update_icon_state()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
icon_state = "cellconsole"
|
||||
return ..()
|
||||
icon_state = "cellconsole_1"
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/cryopod/ui_interact(mob/user, datum/tgui/ui)
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
|
||||
user.set_machine(src)
|
||||
add_fingerprint(user)
|
||||
|
||||
var/dat = ""
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
ui = new(user, src, "CryopodConsole", name)
|
||||
ui.open()
|
||||
|
||||
dat += "<h2>Welcome, [user.real_name].</h2><hr/>"
|
||||
dat += "<br><br>"
|
||||
/obj/machinery/computer/cryopod/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
data["frozen_crew"] = frozen_crew
|
||||
var/list/item_meta = list()
|
||||
|
||||
switch(src.menu)
|
||||
if(1)
|
||||
dat += "<a href='byond://?src=[REF(src)];menu=2'>View crew storage log</a><br><br>"
|
||||
if(allow_items)
|
||||
dat += "<a href='byond://?src=[REF(src)];menu=3'>View objects storage log</a><br><br>"
|
||||
dat += "<a href='byond://?src=[REF(src)];item=1'>Recover object</a><br><br>"
|
||||
dat += "<a href='byond://?src=[REF(src)];allitems=1'>Recover all objects</a><br>"
|
||||
if(2)
|
||||
dat += "<a href='byond://?src=[REF(src)];menu=1'><< Back</a><br><br>"
|
||||
dat += "<h3>Recently stored Crew</h3><br/><hr/><br/>"
|
||||
if(!frozen_crew.len)
|
||||
dat += "There has been no storage usage at this terminal.<br/>"
|
||||
else
|
||||
for(var/person in frozen_crew)
|
||||
dat += "[person]<br/>"
|
||||
dat += "<hr/>"
|
||||
if(3)
|
||||
dat += "<a href='byond://?src=[REF(src)];menu=1'><< Back</a><br><br>"
|
||||
dat += "<h3>Recently stored objects</h3><br/><hr/><br/>"
|
||||
if(!stored_packages.len)
|
||||
dat += "There has been no storage usage at this terminal.<br/>"
|
||||
else
|
||||
for(var/obj/O in stored_packages)
|
||||
dat += "[O.name]<br/>"
|
||||
dat += "<hr/>"
|
||||
for(var/obj/item/storage/box/blue/cryostorage_items/O as anything in stored_packages)
|
||||
item_meta += list(list("name" = O.real_name, "ref" = REF(O))) // i am truely livid about byond lists
|
||||
data["item_meta"] = item_meta
|
||||
|
||||
var/datum/browser/popup = new(user, "cryopod_console", "Cryogenic System Control")
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
var/obj/item/card/id/id_card
|
||||
var/datum/bank_account/current_user
|
||||
if(isliving(user))
|
||||
var/mob/living/person = user
|
||||
id_card = person.get_idcard()
|
||||
if(id_card?.registered_account)
|
||||
current_user = id_card.registered_account
|
||||
if(current_user)
|
||||
data["account_name"] = current_user.account_holder // i do not know why but this uses budget?
|
||||
|
||||
/obj/machinery/computer/cryopod/Topic(href, href_list)
|
||||
return data
|
||||
|
||||
/obj/machinery/computer/cryopod/ui_act(action, params)
|
||||
if(..())
|
||||
return TRUE
|
||||
return
|
||||
|
||||
var/mob/user = usr
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
if(href_list["item"])
|
||||
if(!allowed(user) && !(obj_flags & EMAGGED))
|
||||
to_chat(user, "<span class='warning'>Access Denied.</span>")
|
||||
if(action == "item")
|
||||
if(!allowed(usr) && !(obj_flags & EMAGGED))
|
||||
to_chat(usr, "<span class='warning'>Access Denied.</span>")
|
||||
playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0)
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
if(!allow_items)
|
||||
return
|
||||
|
||||
if(stored_packages.len == 0)
|
||||
to_chat(user, "<span class='notice'>There is nothing to recover from storage.</span>")
|
||||
to_chat(usr, "<span class='notice'>There is nothing to recover from storage.</span>")
|
||||
playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0)
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
var/obj/I = input(user, "Please choose which object to retrieve.","Object recovery",null) as null|anything in stored_packages
|
||||
var/obj/I = locate(params["item"])
|
||||
playsound(src, "terminal_type", 25, 0)
|
||||
|
||||
if(!I)
|
||||
return
|
||||
|
||||
if(!(I in stored_packages))
|
||||
to_chat(user, "<span class='notice'>\The [I] is no longer in storage.</span>")
|
||||
to_chat(usr, "<span class='notice'>\The [I] is no longer in storage.</span>")
|
||||
playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0)
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
visible_message("<span class='notice'>The console beeps happily as it disgorges \the [I].</span>")
|
||||
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
|
||||
|
||||
I.forceMove(drop_location())
|
||||
if(user && Adjacent(user) && user.can_hold_items())
|
||||
user.put_in_hands(I)
|
||||
if(usr && Adjacent(usr) && usr.can_hold_items())
|
||||
usr.put_in_hands(I)
|
||||
stored_packages -= I
|
||||
updateUsrDialog()
|
||||
|
||||
else if(href_list["allitems"])
|
||||
playsound(src, "terminal_type", 25, 0)
|
||||
if(!allowed(user) && !(obj_flags & EMAGGED))
|
||||
to_chat(user, "<span class='warning'>Access Denied.</span>")
|
||||
playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0)
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
if(!allow_items)
|
||||
return
|
||||
|
||||
if(stored_packages.len == 0)
|
||||
to_chat(user, "<span class='notice'>There is nothing to recover from storage.</span>")
|
||||
playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0)
|
||||
return
|
||||
|
||||
visible_message("<span class='notice'>The console beeps happily as it disgorges the desired objects.</span>")
|
||||
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
|
||||
|
||||
for(var/obj/O in stored_packages)
|
||||
O.forceMove(get_turf(src))
|
||||
stored_packages.Cut()
|
||||
updateUsrDialog()
|
||||
|
||||
else if (href_list["menu"])
|
||||
src.menu = text2num(href_list["menu"])
|
||||
playsound(src, "terminal_type", 25, 0)
|
||||
updateUsrDialog()
|
||||
|
||||
ui_interact(usr)
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/item/circuitboard/cryopodcontrol
|
||||
name = "Circuit board (Cryogenic Oversight Console)"
|
||||
build_path = "/obj/machinery/computer/cryopod"
|
||||
|
||||
/obj/machinery/computer/cryopod/contents_explosion()
|
||||
return
|
||||
|
||||
/obj/machinery/computer/cryopod/contents_explosion()
|
||||
return //don't blow everyone's shit up.
|
||||
|
||||
/// The box
|
||||
/obj/item/storage/box/blue/cryostorage_items
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
|
||||
//Cryopods themselves.
|
||||
// Cryopods themselves.
|
||||
/obj/machinery/cryopod
|
||||
name = "cryogenic freezer"
|
||||
desc = "Suited for Cyborgs and Humanoids, the pod is a safe place for personnel affected by the Space Sleep Disorder to get some rest."
|
||||
@@ -181,47 +135,55 @@
|
||||
var/on_store_message = "has entered long-term storage."
|
||||
var/on_store_name = "Cryogenic Oversight"
|
||||
|
||||
// 15 minutes-ish safe period before being despawned.
|
||||
var/time_till_despawn = 15 * 600 // This is reduced by 90% if a player manually enters cryo
|
||||
var/despawn_world_time = null // Used to keep track of the safe period.
|
||||
/// Time until despawn when a mob enters a cryopod. You can cryo other people in pods.
|
||||
var/time_till_despawn = 30 SECONDS
|
||||
/// Cooldown for when it's now safe to try an despawn the player.
|
||||
COOLDOWN_DECLARE(despawn_world_time)
|
||||
|
||||
var/obj/machinery/computer/cryopod/control_computer
|
||||
var/item_storage_type = /obj/item/storage/box/blue/cryostorage_items //with how storage components work this can be anything the player can open or anything with a storage component.
|
||||
var/last_no_computer_message = 0
|
||||
///Weakref to our controller
|
||||
var/datum/weakref/control_computer_weakref
|
||||
COOLDOWN_DECLARE(last_no_computer_message)
|
||||
|
||||
/obj/machinery/cryopod/Initialize(mapload)
|
||||
. = ..()
|
||||
/obj/machinery/cryopod/Initialize()
|
||||
..()
|
||||
return INITIALIZE_HINT_LATELOAD //Gotta populate the cryopod computer GLOB first
|
||||
|
||||
/obj/machinery/cryopod/LateInitialize()
|
||||
update_icon()
|
||||
find_control_computer(mapload)
|
||||
find_control_computer()
|
||||
|
||||
// This is not a good situation
|
||||
/obj/machinery/cryopod/Destroy()
|
||||
control_computer_weakref = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/cryopod/proc/find_control_computer(urgent = FALSE)
|
||||
for(var/obj/machinery/computer/cryopod/C in get_area(src))
|
||||
control_computer = C
|
||||
if(C)
|
||||
return C
|
||||
break
|
||||
for(var/cryo_console as anything in GLOB.cryopod_computers)
|
||||
var/obj/machinery/computer/cryopod/console = cryo_console
|
||||
if(get_area(console) == get_area(src))
|
||||
control_computer_weakref = WEAKREF(console)
|
||||
break
|
||||
|
||||
// Don't send messages unless we *need* the computer, and less than five minutes have passed since last time we messaged
|
||||
if(!control_computer && urgent && last_no_computer_message + 5*60*10 < world.time)
|
||||
if(!control_computer_weakref && urgent && COOLDOWN_FINISHED(src, last_no_computer_message))
|
||||
COOLDOWN_START(src, last_no_computer_message, 5 MINUTES)
|
||||
log_admin("Cryopod in [get_area(src)] could not find control computer!")
|
||||
message_admins("Cryopod in [get_area(src)] could not find control computer!")
|
||||
last_no_computer_message = world.time
|
||||
|
||||
return control_computer != null
|
||||
return control_computer_weakref != null
|
||||
|
||||
/obj/machinery/cryopod/close_machine(mob/user)
|
||||
if(!control_computer)
|
||||
/obj/machinery/cryopod/close_machine(atom/movable/target)
|
||||
if(!control_computer_weakref)
|
||||
find_control_computer(TRUE)
|
||||
if((isnull(user) || istype(user)) && state_open && !panel_open)
|
||||
..(user)
|
||||
if((isnull(target) || isliving(target)) && state_open && !panel_open)
|
||||
..(target)
|
||||
var/mob/living/mob_occupant = occupant
|
||||
investigate_log("Cryogenics machine closed with occupant [key_name(occupant)] by user [key_name(user)].", INVESTIGATE_CRYOGENICS)
|
||||
investigate_log("Cryogenics machine closed with occupant [key_name(occupant)] by user [key_name(target)].", INVESTIGATE_CRYOGENICS)
|
||||
if(mob_occupant && mob_occupant.stat != DEAD)
|
||||
to_chat(occupant, "<span class='boldnotice'>You feel cool air surround you. You go numb as your senses turn inward.</span>")
|
||||
if(mob_occupant.client)//if they're logged in
|
||||
despawn_world_time = world.time + (time_till_despawn * 0.1)
|
||||
else
|
||||
despawn_world_time = world.time + time_till_despawn
|
||||
to_chat(occupant, span_notice("<b>You feel cool air surround you. You go numb as your senses turn inward.</b>"))
|
||||
|
||||
COOLDOWN_START(src, despawn_world_time, time_till_despawn)
|
||||
icon_state = "cryopod"
|
||||
|
||||
/obj/machinery/cryopod/open_machine()
|
||||
@@ -234,8 +196,8 @@
|
||||
|
||||
/obj/machinery/cryopod/container_resist(mob/living/user)
|
||||
investigate_log("Cryogenics machine container resisted by [key_name(user)] with occupant [key_name(occupant)].", INVESTIGATE_CRYOGENICS)
|
||||
visible_message("<span class='notice'>[occupant] emerges from [src]!</span>",
|
||||
"<span class='notice'>You climb out of [src]!</span>")
|
||||
visible_message(span_notice("[occupant] emerges from [src]!"),
|
||||
span_notice("You climb out of [src]!"))
|
||||
open_machine()
|
||||
|
||||
/obj/machinery/cryopod/relaymove(mob/user)
|
||||
@@ -246,36 +208,122 @@
|
||||
return
|
||||
|
||||
var/mob/living/mob_occupant = occupant
|
||||
if(mob_occupant)
|
||||
// Eject dead people
|
||||
if(mob_occupant.stat == DEAD)
|
||||
open_machine()
|
||||
if(mob_occupant.stat == DEAD)
|
||||
open_machine()
|
||||
|
||||
if(!(world.time > despawn_world_time + 100))//+ 10 seconds
|
||||
return
|
||||
if(!mob_occupant.client && COOLDOWN_FINISHED(src, despawn_world_time))
|
||||
if(!control_computer_weakref)
|
||||
find_control_computer(urgent = TRUE)
|
||||
|
||||
if(!mob_occupant.client && mob_occupant.stat < 2) //Occupant is living and has no client.
|
||||
if(!control_computer)
|
||||
find_control_computer(urgent = TRUE)//better hope you found it this time
|
||||
despawn_occupant()
|
||||
|
||||
despawn_occupant()
|
||||
/obj/machinery/cryopod/proc/handle_objectives()
|
||||
var/mob/living/mob_occupant = occupant
|
||||
// Update any existing objectives involving this mob.
|
||||
for(var/datum/objective/objective in GLOB.objectives)
|
||||
// We don't want revs to get objectives that aren't for heads of staff. Letting
|
||||
// them win or lose based on cryo is silly so we remove the objective.
|
||||
if(istype(objective,/datum/objective/mutiny) && objective.target == mob_occupant.mind)
|
||||
objective.team.objectives -= objective
|
||||
qdel(objective)
|
||||
for(var/datum/mind/mind in objective.team.members)
|
||||
to_chat(mind.current, "<BR>[span_userdanger("Your target is no longer within reach. Objective removed!")]")
|
||||
mind.announce_objectives()
|
||||
else if(istype(objective.target) && objective.target == mob_occupant.mind)
|
||||
if(istype(objective, /datum/objective/contract))
|
||||
var/datum/antagonist/traitor/affected_traitor = objective.owner.has_antag_datum(/datum/antagonist/traitor)
|
||||
var/datum/contractor_hub/affected_contractor_hub = affected_traitor.contractor_hub
|
||||
for(var/datum/syndicate_contract/affected_contract as anything in affected_contractor_hub.assigned_contracts)
|
||||
if(affected_contract.contract == objective)
|
||||
affected_contract.generate(affected_contractor_hub.assigned_targets)
|
||||
affected_contractor_hub.assigned_targets.Add(affected_contract.contract.target)
|
||||
to_chat(objective.owner.current, "<BR>[span_userdanger("Contract target out of reach. Contract rerolled.")]")
|
||||
break
|
||||
else
|
||||
var/old_target = objective.target
|
||||
objective.target = null
|
||||
if(!objective)
|
||||
return
|
||||
objective.find_target()
|
||||
if(!objective.target && objective.owner)
|
||||
to_chat(objective.owner.current, "<BR>[span_userdanger("Your target is no longer within reach. Objective removed!")]")
|
||||
for(var/datum/antagonist/antag in objective.owner.antag_datums)
|
||||
antag.objectives -= objective
|
||||
if (!objective.team)
|
||||
objective.update_explanation_text()
|
||||
objective.owner.announce_objectives()
|
||||
to_chat(objective.owner.current, "<BR>[span_userdanger("You get the feeling your target is no longer within reach. Time for Plan [pick("A","B","C","D","X","Y","Z")]. Objectives updated!")]")
|
||||
else
|
||||
var/list/objectivestoupdate
|
||||
for(var/datum/mind/objective_owner in objective.get_owners())
|
||||
to_chat(objective_owner.current, "<BR>[span_userdanger("You get the feeling your target is no longer within reach. Time for Plan [pick("A","B","C","D","X","Y","Z")]. Objectives updated!")]")
|
||||
for(var/datum/objective/update_target_objective in objective_owner.get_all_objectives())
|
||||
LAZYADD(objectivestoupdate, update_target_objective)
|
||||
objectivestoupdate += objective.team.objectives
|
||||
for(var/datum/objective/update_objective in objectivestoupdate)
|
||||
if(update_objective.target != old_target || !istype(update_objective,objective.type))
|
||||
continue
|
||||
update_objective.target = objective.target
|
||||
update_objective.update_explanation_text()
|
||||
to_chat(objective.owner.current, "<BR>[span_userdanger("You get the feeling your target is no longer within reach. Time for Plan [pick("A","B","C","D","X","Y","Z")]. Objectives updated!")]")
|
||||
update_objective.owner.announce_objectives()
|
||||
qdel(objective)
|
||||
|
||||
/obj/machinery/cryopod/proc/should_preserve_item(obj/item/item)
|
||||
for(var/datum/objective_item/steal/possible_item in GLOB.possible_items)
|
||||
if(istype(item, possible_item.targetitem))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
// This function can not be undone; do not call this unless you are sure
|
||||
/obj/machinery/cryopod/proc/despawn_occupant()
|
||||
if(!control_computer)
|
||||
find_control_computer()
|
||||
|
||||
var/mob/living/mob_occupant = occupant
|
||||
var/list/crew_member = list()
|
||||
|
||||
crew_member["name"] = mob_occupant.real_name
|
||||
|
||||
if(mob_occupant.mind)
|
||||
// Handle job slot/tater cleanup.
|
||||
var/job = mob_occupant.mind.assigned_role
|
||||
crew_member["job"] = job
|
||||
SSjob.FreeRole(job)
|
||||
// if(LAZYLEN(mob_occupant.mind.objectives))
|
||||
// mob_occupant.mind.objectives.Cut()
|
||||
mob_occupant.mind.special_role = null
|
||||
else
|
||||
crew_member["job"] = "N/A"
|
||||
|
||||
// Delete them from datacore.
|
||||
var/announce_rank = null
|
||||
for(var/datum/data/record/medical_record as anything in GLOB.data_core.medical)
|
||||
if(medical_record.fields["name"] == mob_occupant.real_name)
|
||||
qdel(medical_record)
|
||||
for(var/datum/data/record/security_record as anything in GLOB.data_core.security)
|
||||
if(security_record.fields["name"] == mob_occupant.real_name)
|
||||
qdel(security_record)
|
||||
for(var/datum/data/record/general_record as anything in GLOB.data_core.general)
|
||||
if(general_record.fields["name"] == mob_occupant.real_name)
|
||||
announce_rank = general_record.fields["rank"]
|
||||
qdel(general_record)
|
||||
|
||||
var/obj/machinery/computer/cryopod/control_computer = control_computer_weakref?.resolve()
|
||||
if(!control_computer)
|
||||
control_computer_weakref = null
|
||||
else
|
||||
control_computer.frozen_crew += list(crew_member)
|
||||
|
||||
// Make an announcement and log the person entering storage.
|
||||
if(GLOB.announcement_systems.len)
|
||||
var/obj/machinery/announcement_system/announcer = pick(GLOB.announcement_systems)
|
||||
announcer.announce("CRYOSTORAGE", mob_occupant.real_name, announce_rank, list())
|
||||
|
||||
visible_message(span_notice("[src] hums and hisses as it moves [mob_occupant.real_name] into storage."))
|
||||
|
||||
/* ============================= */
|
||||
var/list/obj/item/storing = list()
|
||||
var/list/obj/item/destroying = list()
|
||||
var/list/obj/item/destroy_later = list()
|
||||
|
||||
investigate_log("Despawning [key_name(mob_occupant)].", INVESTIGATE_CRYOGENICS)
|
||||
|
||||
var/atom/target_store = (control_computer?.allow_items && control_computer) || src //the double control computer check makes it return the control computer.
|
||||
var/drop_to_ground = !istype(target_store, /obj/machinery/computer/cryopod)
|
||||
|
||||
var/drop_to_ground = !istype(control_computer, /obj/machinery/computer/cryopod) || !control_computer.allow_items
|
||||
var/mind_identity = mob_occupant.mind?.name
|
||||
var/occupant_identity = mob_occupant.real_name
|
||||
|
||||
@@ -296,7 +344,6 @@
|
||||
AM.forceMove(src)
|
||||
R.module.remove_module(I, TRUE)
|
||||
else
|
||||
|
||||
if(ishuman(mob_occupant))
|
||||
var/mob/living/carbon/human/H = mob_occupant
|
||||
if(H.mind && H.client && H.client.prefs && H == H.mind.original_character)
|
||||
@@ -306,145 +353,89 @@
|
||||
if(iscarbon(mob_occupant)) // sorry simp-le-mobs deserve no mercy
|
||||
var/mob/living/carbon/C = mob_occupant
|
||||
gear = C.get_all_gear()
|
||||
for(var/i in gear)
|
||||
var/obj/item/I = i
|
||||
I.forceMove(src)
|
||||
if(!istype(I))
|
||||
destroying += I
|
||||
|
||||
for(var/obj/item/item_content as anything in gear)
|
||||
if(!istype(item_content) || HAS_TRAIT(item_content, TRAIT_NODROP))
|
||||
destroying += item_content
|
||||
continue
|
||||
if(I.item_flags & (DROPDEL | ABSTRACT))
|
||||
destroying += I
|
||||
continue
|
||||
if(HAS_TRAIT(I, TRAIT_NODROP))
|
||||
destroying += I
|
||||
if(item_content.item_flags & (DROPDEL | ABSTRACT))
|
||||
destroying += item_content
|
||||
continue
|
||||
|
||||
// destroying stays in mob for a bit
|
||||
item_content.forceMove(src)
|
||||
|
||||
// WEE WOO SNOWFLAKE TIME
|
||||
if(istype(I, /obj/item/pda))
|
||||
var/obj/item/pda/P = I
|
||||
if(istype(item_content, /obj/item/pda))
|
||||
var/obj/item/pda/P = item_content
|
||||
if((P.owner == mind_identity) || (P.owner == occupant_identity))
|
||||
destroying += P
|
||||
else
|
||||
storing += P
|
||||
else if(istype(I, /obj/item/card/id))
|
||||
var/obj/item/card/id/idcard = I
|
||||
else if(istype(item_content, /obj/item/card/id))
|
||||
var/obj/item/card/id/idcard = item_content
|
||||
if((idcard.registered_name == mind_identity) || (idcard.registered_name == occupant_identity))
|
||||
destroying += idcard
|
||||
else
|
||||
storing += idcard
|
||||
else
|
||||
storing += I
|
||||
storing += item_content
|
||||
|
||||
// get rid of mobs
|
||||
for(var/mob/living/L in mob_occupant.GetAllContents() - mob_occupant)
|
||||
L.forceMove(drop_location())
|
||||
|
||||
if(storing.len)
|
||||
var/obj/O = new item_storage_type
|
||||
var/obj/item/storage/box/blue/cryostorage_items/O = new /obj/item/storage/box/blue/cryostorage_items
|
||||
O.name = "cryogenic retrieval package: [mob_occupant.real_name]"
|
||||
O.real_name = mob_occupant.real_name
|
||||
for(var/i in storing)
|
||||
var/obj/item/I = i
|
||||
I.forceMove(O)
|
||||
O.forceMove(drop_to_ground? target_store.drop_location() : target_store)
|
||||
if((target_store == control_computer) && !drop_to_ground)
|
||||
O.forceMove(drop_to_ground ? control_computer.drop_location() : control_computer)
|
||||
if((control_computer == control_computer) && !drop_to_ground)
|
||||
control_computer.stored_packages += O
|
||||
|
||||
QDEL_LIST(destroying)
|
||||
|
||||
//Update any existing objectives involving this mob.
|
||||
for(var/i in GLOB.objectives)
|
||||
var/datum/objective/O = i
|
||||
// We don't want revs to get objectives that aren't for heads of staff. Letting
|
||||
// them win or lose based on cryo is silly so we remove the objective.
|
||||
if(istype(O,/datum/objective/mutiny) && O.target == mob_occupant.mind)
|
||||
qdel(O)
|
||||
else if(O.target && istype(O.target, /datum/mind))
|
||||
if(O.target != mob_occupant.mind)
|
||||
continue
|
||||
if(O.check_midround_completion())
|
||||
continue
|
||||
if(O.owner && O.owner.current)
|
||||
to_chat(O.owner.current, "<BR><span class='userdanger'>You get the feeling your target is no longer within reach. Time for Plan [pick("A","B","C","D","X","Y","Z")]. Objectives updated!</span>")
|
||||
O.target = null
|
||||
spawn(10) //This should ideally fire after the occupant is deleted.
|
||||
if(!O)
|
||||
return
|
||||
O.find_target()
|
||||
O.update_explanation_text()
|
||||
if(!(O.target))
|
||||
qdel(O)
|
||||
|
||||
if(mob_occupant.mind)
|
||||
//Handle job slot/tater cleanup.
|
||||
if(mob_occupant.mind.assigned_role)
|
||||
var/job = mob_occupant.mind.assigned_role
|
||||
SSjob.FreeRole(job)
|
||||
mob_occupant.mind.special_role = null
|
||||
|
||||
// Delete them from datacore.
|
||||
|
||||
var/announce_rank = null
|
||||
for(var/datum/data/record/R in GLOB.data_core.medical)
|
||||
if((R.fields["name"] == mob_occupant.real_name))
|
||||
qdel(R)
|
||||
for(var/datum/data/record/T in GLOB.data_core.security)
|
||||
if((T.fields["name"] == mob_occupant.real_name))
|
||||
qdel(T)
|
||||
for(var/datum/data/record/G in GLOB.data_core.general)
|
||||
if((G.fields["name"] == mob_occupant.real_name))
|
||||
announce_rank = G.fields["rank"]
|
||||
qdel(G)
|
||||
|
||||
for(var/obj/machinery/computer/cloning/cloner in world)
|
||||
for(var/datum/data/record/R in cloner.records)
|
||||
if(R.fields["name"] == mob_occupant.real_name)
|
||||
cloner.records.Remove(R)
|
||||
|
||||
//Make an announcement and log the person entering storage.
|
||||
if(control_computer)
|
||||
control_computer.frozen_crew += "[mob_occupant.real_name]"
|
||||
|
||||
if(GLOB.announcement_systems.len)
|
||||
var/obj/machinery/announcement_system/announcer = pick(GLOB.announcement_systems)
|
||||
announcer.announce("CRYOSTORAGE", mob_occupant.real_name, announce_rank, list())
|
||||
visible_message("<span class='notice'>\The [src] hums and hisses as it moves [mob_occupant.real_name] into storage.</span>")
|
||||
/* ============================= */
|
||||
|
||||
// Ghost and delete the mob.
|
||||
// they already did ghost verb
|
||||
var/mob/dead/observer/G = mob_occupant.get_ghost(TRUE)
|
||||
if(G)
|
||||
G.voluntary_ghosted = TRUE
|
||||
// they did not ghost verb
|
||||
else
|
||||
mob_occupant.ghostize(FALSE, penalize = TRUE, voluntary = TRUE, cryo = TRUE)
|
||||
|
||||
QDEL_LIST(destroying)
|
||||
handle_objectives()
|
||||
QDEL_NULL(occupant)
|
||||
QDEL_LIST(destroy_later)
|
||||
open_machine()
|
||||
name = initial(name)
|
||||
|
||||
/obj/machinery/cryopod/MouseDrop_T(mob/living/target, mob/user)
|
||||
if(!istype(target) || user.incapacitated() || !target.Adjacent(user) || !Adjacent(user) || !ismob(target) || (!ishuman(user) && !iscyborg(user)) || !istype(user.loc, /turf) || target.buckled)
|
||||
if(!istype(target) || !can_interact(user) || !target.Adjacent(user) || !ismob(target) || isanimal(target) || !istype(user.loc, /turf) || target.buckled)
|
||||
return
|
||||
|
||||
if(occupant)
|
||||
to_chat(user, "<span class='boldnotice'>The cryo pod is already occupied!</span>")
|
||||
to_chat(user, span_notice("[src] is already occupied!"))
|
||||
return
|
||||
|
||||
if(target.stat == DEAD)
|
||||
to_chat(user, "<span class='notice'>Dead people can not be put into cryo.</span>")
|
||||
to_chat(user, span_notice("Dead people can not be put into cryo."))
|
||||
return
|
||||
|
||||
if(target.client && user != target)
|
||||
if(user != target && target.client)
|
||||
if(iscyborg(target))
|
||||
to_chat(user, "<span class='danger'>You can't put [target] into [src]. They're online.</span>")
|
||||
to_chat(user, span_danger("You can't put [target] into [src]. [target.p_theyre(capitalized = TRUE)] online."))
|
||||
else
|
||||
to_chat(user, "<span class='danger'>You can't put [target] into [src]. They're conscious.</span>")
|
||||
to_chat(user, span_danger("You can't put [target] into [src]. [target.p_theyre(capitalized = TRUE)] conscious."))
|
||||
return
|
||||
else if(target.client)
|
||||
if(alert(target,"Would you like to enter cryosleep?",,"Yes","No") == "No")
|
||||
else if(target.client) // mob has client
|
||||
if(tgalert(target, "Would you like to enter cryosleep?", "Enter Cryopod?", "Yes", "No") != "Yes")
|
||||
return
|
||||
|
||||
var/generic_plsnoleave_message = " Please adminhelp before leaving the round, even if there are no administrators online!"
|
||||
|
||||
if(target == user && world.time - target.client.cryo_warned > 5 MINUTES)//if we haven't warned them in the last 5 minutes
|
||||
if(target == user && world.time - target.client.cryo_warned > 5 MINUTES)
|
||||
var/list/caught_string
|
||||
var/addendum = ""
|
||||
if(target.mind.assigned_role in GLOB.command_positions)
|
||||
@@ -462,30 +453,48 @@
|
||||
LAZYADD(caught_string, "Revolutionary")
|
||||
|
||||
if(caught_string)
|
||||
alert(target, "You're a [english_list(caught_string)]![generic_plsnoleave_message][addendum]")
|
||||
tgui_alert(target, "You're a [english_list(caught_string)]! [AHELP_FIRST_MESSAGE][addendum]")
|
||||
target.client.cryo_warned = world.time
|
||||
return
|
||||
|
||||
if(!target || user.incapacitated() || !target.Adjacent(user) || !Adjacent(user) || (!ishuman(user) && !iscyborg(user)) || !istype(user.loc, /turf) || target.buckled)
|
||||
if(!istype(target) || !can_interact(user) || !target.Adjacent(user) || !ismob(target) || isanimal(target) || !istype(user.loc, /turf) || target.buckled)
|
||||
return
|
||||
//rerun the checks in case of shenanigans
|
||||
|
||||
if(target == user)
|
||||
visible_message("[user] starts climbing into the cryo pod.")
|
||||
else
|
||||
visible_message("[user] starts putting [target] into the cryo pod.")
|
||||
// rerun the checks in case of shenanigans
|
||||
|
||||
if(occupant)
|
||||
to_chat(user, "<span class='boldnotice'>\The [src] is in use.</span>")
|
||||
to_chat(user, span_notice("[src] is already occupied!"))
|
||||
return
|
||||
close_machine(target)
|
||||
|
||||
to_chat(target, "<span class='boldnotice'>If you ghost, log out or close your client now, your character will shortly be permanently removed from the round.</span>")
|
||||
name = "[name] ([occupant.name])"
|
||||
log_admin("<span class='notice'>[key_name(target)] entered a stasis pod.</span>")
|
||||
message_admins("[key_name_admin(target)] entered a stasis pod. (<A HREF='?_src_=holder;[HrefToken()];adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)")
|
||||
if(target == user)
|
||||
visible_message("<span class='infoplain'>[user] starts climbing into the cryo pod.</span>")
|
||||
else
|
||||
visible_message("<span class='infoplain'>[user] starts putting [target] into the cryo pod.</span>")
|
||||
|
||||
to_chat(target, span_warning("<b>If you ghost, log out or close your client now, your character will shortly be permanently removed from the round.</b>"))
|
||||
|
||||
log_admin("[key_name(target)] entered a stasis pod.")
|
||||
message_admins("[key_name_admin(target)] entered a stasis pod. [ADMIN_JMP(src)]")
|
||||
add_fingerprint(target)
|
||||
|
||||
//Attacks/effects.
|
||||
close_machine(target)
|
||||
name = "[name] ([target.name])"
|
||||
|
||||
// Attacks/effects.
|
||||
/obj/machinery/cryopod/blob_act()
|
||||
return //Sorta gamey, but we don't really want these to be destroyed.
|
||||
return // Sorta gamey, but we don't really want these to be destroyed.
|
||||
|
||||
#undef AHELP_FIRST_MESSAGE
|
||||
|
||||
/obj/item/circuitboard/cryopodcontrol
|
||||
name = "Circuit board (Cryogenic Oversight Console)"
|
||||
build_path = /obj/machinery/computer/cryopod
|
||||
|
||||
/obj/machinery/computer/cryopod/contents_explosion()
|
||||
return
|
||||
|
||||
/obj/machinery/computer/cryopod/contents_explosion()
|
||||
return //don't blow everyone's shit up.
|
||||
|
||||
/// The box
|
||||
/obj/item/storage/box/blue/cryostorage_items
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
var/real_name = "fire coderbus"
|
||||
|
||||
@@ -407,7 +407,7 @@
|
||||
if(!stat) //Opens only powered doors.
|
||||
open() //Open everything!
|
||||
|
||||
/obj/machinery/door/ex_act(severity, target)
|
||||
/obj/machinery/door/ex_act(severity, target, origin)
|
||||
//if it blows up a wall it should blow up a door
|
||||
..(severity ? max(1, severity - 1) : 0, target)
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
/obj/machinery/door/password/emp_act(severity)
|
||||
return
|
||||
|
||||
/obj/machinery/door/password/ex_act(severity, target)
|
||||
/obj/machinery/door/password/ex_act(severity, target, origin)
|
||||
return
|
||||
|
||||
/obj/machinery/door/password/wave_ex_act(power, datum/wave_explosion/explosion, dir)
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
return ..()
|
||||
|
||||
//"BLAST" doors are obviously stronger than regular doors when it comes to BLASTS.
|
||||
/obj/machinery/door/poddoor/ex_act(severity, target)
|
||||
/obj/machinery/door/poddoor/ex_act(severity, target, origin)
|
||||
if(severity == 3)
|
||||
return
|
||||
..()
|
||||
|
||||
@@ -194,22 +194,19 @@ GLOBAL_LIST_EMPTY(doppler_arrays)
|
||||
|
||||
/*****The Point Calculator*****/
|
||||
|
||||
if(orig_light < 10)
|
||||
if(orig_light < 5)
|
||||
say("Explosion not large enough for research calculations.")
|
||||
return
|
||||
else
|
||||
point_gain = (100000 * orig_light) / (orig_light + 5000)
|
||||
else if(orig_light < BOMB_TARGET_SIZE) // we want to give fewer points if below the target; this curve does that
|
||||
point_gain = (BOMB_TARGET_POINTS * orig_light ** BOMB_SUB_TARGET_EXPONENT) / (BOMB_TARGET_SIZE**BOMB_SUB_TARGET_EXPONENT)
|
||||
else // once we're at the target, switch to a hyperbolic function so we can't go too far above it, but bigger bombs always get more points
|
||||
point_gain = (BOMB_TARGET_POINTS * 2 * orig_light) / (orig_light + BOMB_TARGET_SIZE)
|
||||
|
||||
/*****The Point Capper*****/
|
||||
if(point_gain > linked_techweb.largest_bomb_value)
|
||||
if(point_gain <= TECHWEB_BOMB_POINTCAP || linked_techweb.largest_bomb_value < TECHWEB_BOMB_POINTCAP)
|
||||
var/old_tech_largest_bomb_value = linked_techweb.largest_bomb_value //held so we can pull old before we do math
|
||||
linked_techweb.largest_bomb_value = point_gain
|
||||
point_gain -= old_tech_largest_bomb_value
|
||||
point_gain = min(point_gain,TECHWEB_BOMB_POINTCAP)
|
||||
else
|
||||
linked_techweb.largest_bomb_value = TECHWEB_BOMB_POINTCAP
|
||||
point_gain = 1000
|
||||
var/old_tech_largest_bomb_value = linked_techweb.largest_bomb_value //held so we can pull old before we do math
|
||||
linked_techweb.largest_bomb_value = point_gain
|
||||
point_gain -= old_tech_largest_bomb_value
|
||||
var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_SCI)
|
||||
if(D)
|
||||
D.adjust_money(point_gain)
|
||||
|
||||
+101
-51
@@ -1,8 +1,8 @@
|
||||
/* Holograms!
|
||||
* Contains:
|
||||
* Holopad
|
||||
* Hologram
|
||||
* Other stuff
|
||||
* Holopad
|
||||
* Hologram
|
||||
* Other stuff
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -24,7 +24,6 @@ Possible to do for anyone motivated enough:
|
||||
* Holopad
|
||||
*/
|
||||
|
||||
GLOBAL_LIST_EMPTY(network_holopads)
|
||||
#define HOLOPAD_PASSIVE_POWER_USAGE 1
|
||||
#define HOLOGRAM_POWER_USAGE 2
|
||||
|
||||
@@ -32,6 +31,7 @@ GLOBAL_LIST_EMPTY(network_holopads)
|
||||
name = "holopad"
|
||||
desc = "It's a floor-mounted device for projecting holographic images."
|
||||
icon_state = "holopad0"
|
||||
base_icon_state = "holopad"
|
||||
layer = LOW_OBJ_LAYER
|
||||
plane = FLOOR_PLANE
|
||||
flags_1 = HEAR_1
|
||||
@@ -70,7 +70,7 @@ GLOBAL_LIST_EMPTY(network_holopads)
|
||||
var/obj/effect/overlay/holo_pad_hologram/replay_holo
|
||||
/// Calls will be automatically answered after a couple rings, here for debugging
|
||||
var/static/force_answer_call = FALSE
|
||||
// var/static/list/holopads = list()
|
||||
var/static/list/holopads = list()
|
||||
var/obj/effect/overlay/holoray/ray
|
||||
var/ringing = FALSE
|
||||
var/offset = FALSE
|
||||
@@ -107,26 +107,47 @@ GLOBAL_LIST_EMPTY(network_holopads)
|
||||
new_disk.forceMove(src)
|
||||
disk = new_disk
|
||||
|
||||
/obj/machinery/holopad/tutorial/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
/obj/machinery/holopad/Moved(atom/OldLoc, Dir)
|
||||
. = ..()
|
||||
if(!loc)
|
||||
return
|
||||
// move any relevant holograms, basically non-AI, and rays with the pad
|
||||
if(replay_holo)
|
||||
replay_holo.abstract_move(loc)
|
||||
for(var/i in holorays)
|
||||
var/obj/effect/overlay/holoray/ray = holorays[i]
|
||||
ray.abstract_move(loc)
|
||||
var/list/non_call_masters = masters?.Copy()
|
||||
for(var/datum/holocall/holocall as anything in holo_calls)
|
||||
if(!holocall.user || !LAZYACCESS(masters, holocall.user))
|
||||
continue
|
||||
non_call_masters -= holocall.user
|
||||
// moving the eye moves the holo which updates the ray too
|
||||
holocall.eye.setLoc(locate(clamp(x + (holocall.hologram.x - OldLoc.x), 1, world.maxx), clamp(y + (holocall.hologram.y - OldLoc.y), 1, world.maxy), z))
|
||||
for(var/mob/living/holo_master as anything in non_call_masters)
|
||||
var/obj/effect/holo = masters[holo_master]
|
||||
update_holoray(holo_master, holo.loc)
|
||||
|
||||
/obj/machinery/holopad/tutorial/attack_hand(mob/user, list/modifiers)
|
||||
if(!istype(user))
|
||||
return
|
||||
if(user.incapacitated() || !is_operational())
|
||||
return
|
||||
if(replay_mode)
|
||||
replay_stop()
|
||||
else if(disk && disk.record)
|
||||
else if(disk?.record)
|
||||
replay_start()
|
||||
|
||||
/obj/machinery/holopad/tutorial/HasProximity(atom/movable/AM)
|
||||
if (!isliving(AM))
|
||||
return
|
||||
if(!replay_mode && (disk && disk.record))
|
||||
if(!replay_mode && (disk?.record))
|
||||
replay_start()
|
||||
|
||||
/obj/machinery/holopad/Initialize()
|
||||
. = ..()
|
||||
if(on_network)
|
||||
GLOB.network_holopads += src
|
||||
holopads += src
|
||||
|
||||
/obj/machinery/holopad/Destroy()
|
||||
if(outgoing_call)
|
||||
@@ -146,7 +167,7 @@ GLOBAL_LIST_EMPTY(network_holopads)
|
||||
|
||||
QDEL_NULL(disk)
|
||||
|
||||
GLOB.network_holopads -= src
|
||||
holopads -= src
|
||||
return ..()
|
||||
|
||||
/obj/machinery/holopad/power_change()
|
||||
@@ -172,8 +193,10 @@ GLOBAL_LIST_EMPTY(network_holopads)
|
||||
|
||||
/obj/machinery/holopad/examine(mob/user)
|
||||
. = ..()
|
||||
if(in_range(user, src) || isobserver(user))
|
||||
. += "<span class='notice'>The status display reads: Current projection range: <b>[holo_range]</b> units.</span>"
|
||||
if(isAI(user))
|
||||
. += span_notice("The status display reads: Current projection range: <b>[holo_range]</b> units. Use :h to speak through the projection. Right-click to project or cancel a projection. Alt-click to hangup all active and incomming calls. Ctrl-click to end projection without jumping to your last location.")
|
||||
else if(in_range(user, src) || isobserver(user))
|
||||
. += span_notice("The status display reads: Current projection range: <b>[holo_range]</b> units.")
|
||||
|
||||
/obj/machinery/holopad/attackby(obj/item/P, mob/user, params)
|
||||
if(default_deconstruction_screwdriver(user, "holopad_open", "holopad0", P))
|
||||
@@ -190,11 +213,11 @@ GLOBAL_LIST_EMPTY(network_holopads)
|
||||
|
||||
if(istype(P,/obj/item/disk/holodisk))
|
||||
if(disk)
|
||||
to_chat(user,"<span class='warning'>There's already a disk inside [src]!</span>")
|
||||
to_chat(user,span_warning("There's already a disk inside [src]!"))
|
||||
return
|
||||
if (!user.transferItemToLoc(P,src))
|
||||
return
|
||||
to_chat(user,"<span class='notice'>You insert [P] into [src].</span>")
|
||||
to_chat(user,span_notice("You insert [P] into [src]."))
|
||||
disk = P
|
||||
return
|
||||
|
||||
@@ -242,24 +265,29 @@ GLOBAL_LIST_EMPTY(network_holopads)
|
||||
|
||||
switch(action)
|
||||
if("AIrequest")
|
||||
if(isAI(usr))
|
||||
var/mob/living/silicon/ai/ai_user = usr
|
||||
ai_user.eyeobj.setLoc(get_turf(src))
|
||||
to_chat(usr, span_info("AIs can not request AI presence. Jumping instead."))
|
||||
return
|
||||
if(last_request + 200 < world.time)
|
||||
last_request = world.time
|
||||
to_chat(usr, "<span class='info'>You requested an AI's presence.</span>")
|
||||
to_chat(usr, span_info("You requested an AI's presence."))
|
||||
var/area/area = get_area(src)
|
||||
for(var/mob/living/silicon/ai/AI in GLOB.silicon_mobs)
|
||||
if(!AI.client)
|
||||
continue
|
||||
to_chat(AI, "<span class='info'>Your presence is requested at <a href='?src=[REF(AI)];jumptoholopad=[REF(src)]'>\the [area]</a>.</span>")
|
||||
to_chat(AI, span_info("Your presence is requested at <a href='?src=[REF(AI)];jumptoholopad=[REF(src)]'>\the [area]</a>.</span>")) // <a href='?src=[REF(AI)];project_to_holopad=[REF(src)]'>Project Hologram?</a>"))
|
||||
return TRUE
|
||||
else
|
||||
to_chat(usr, "<span class='info'>A request for AI presence was already sent recently.</span>")
|
||||
to_chat(usr, span_info("A request for AI presence was already sent recently."))
|
||||
return
|
||||
if("holocall")
|
||||
if(outgoing_call)
|
||||
return
|
||||
if(usr.loc == loc)
|
||||
var/list/callnames = list()
|
||||
for(var/I in GLOB.network_holopads)
|
||||
for(var/I in holopads)
|
||||
var/area/A = get_area(I)
|
||||
if(A)
|
||||
LAZYADD(callnames[A], I)
|
||||
@@ -274,7 +302,7 @@ GLOBAL_LIST_EMPTY(network_holopads)
|
||||
calling = TRUE
|
||||
return TRUE
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>You must stand on the holopad to make a call!</span>")
|
||||
to_chat(usr, span_warning("You must stand on the holopad to make a call!"))
|
||||
if("connectcall")
|
||||
var/datum/holocall/call_to_connect = locate(params["holopad"]) in holo_calls
|
||||
if(!QDELETED(call_to_connect))
|
||||
@@ -285,6 +313,12 @@ GLOBAL_LIST_EMPTY(network_holopads)
|
||||
if(!QDELETED(call_to_disconnect))
|
||||
call_to_disconnect.Disconnect(src)
|
||||
return TRUE
|
||||
if("rejectall")
|
||||
for(var/datum/holocall/call_to_reject as anything in holo_calls)
|
||||
if(call_to_reject.connected_holopad == src) // do not kill the current connection
|
||||
continue
|
||||
call_to_reject.Disconnect(src)
|
||||
return TRUE
|
||||
if("disk_eject")
|
||||
if(disk && !replay_mode)
|
||||
disk.forceMove(drop_location())
|
||||
@@ -327,14 +361,13 @@ GLOBAL_LIST_EMPTY(network_holopads)
|
||||
return TRUE
|
||||
|
||||
/**
|
||||
* hangup_all_calls: Disconnects all current holocalls from the holopad
|
||||
*/
|
||||
* hangup_all_calls: Disconnects all current holocalls from the holopad
|
||||
*/
|
||||
/obj/machinery/holopad/proc/hangup_all_calls()
|
||||
for(var/I in holo_calls)
|
||||
var/datum/holocall/HC = I
|
||||
HC.Disconnect(src)
|
||||
|
||||
//do not allow AIs to answer calls or people will use it to meta the AI sattelite
|
||||
/obj/machinery/holopad/attack_ai(mob/living/silicon/ai/user)
|
||||
if (!istype(user))
|
||||
return
|
||||
@@ -343,12 +376,25 @@ GLOBAL_LIST_EMPTY(network_holopads)
|
||||
/*There are pretty much only three ways to interact here.
|
||||
I don't need to check for client since they're clicking on an object.
|
||||
This may change in the future but for now will suffice.*/
|
||||
if(user.eyeobj.loc != src.loc)//Set client eye on the object if it's not already.
|
||||
user.eyeobj.setLoc(get_turf(src))
|
||||
else if(!LAZYLEN(masters) || !masters[user])//If there is no hologram, possibly make one.
|
||||
if(!LAZYLEN(masters) || !masters[user])//If there is no hologram, possibly make one.
|
||||
activate_holo(user)
|
||||
else//If there is a hologram, remove it.
|
||||
else//If there is a hologram, remove it, and jump to your last location.
|
||||
clear_holo(user)
|
||||
// if(user.lastloc)//only jump to your last location if your lastloc is set, which only sets if you projected from a request message.
|
||||
// user.eyeobj.setLoc(user.lastloc)
|
||||
// user.lastloc = null
|
||||
|
||||
/obj/machinery/holopad/AICtrlClick(mob/living/silicon/ai/user)
|
||||
if (!istype(user))
|
||||
return
|
||||
if (!on_network)
|
||||
return
|
||||
if(!LAZYLEN(masters) || !masters[user])//If there is no hologram, then this button does nothing.
|
||||
return
|
||||
else//If there is a hologram, remove it, but dont jump to your last location.
|
||||
// user.lastloc = null
|
||||
clear_holo(user)
|
||||
return
|
||||
|
||||
/obj/machinery/holopad/process()
|
||||
if(LAZYLEN(masters))
|
||||
@@ -378,25 +424,26 @@ GLOBAL_LIST_EMPTY(network_holopads)
|
||||
if(outgoing_call)
|
||||
HC.Disconnect(src)//can't answer calls while calling
|
||||
else
|
||||
playsound(src, 'sound/machines/twobeep.ogg', 100) //bring, bring!
|
||||
playsound(src, 'sound/machines/twobeep.ogg', 100) //bring, bring!
|
||||
ringing = TRUE
|
||||
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/machinery/holopad/proc/activate_holo(mob/living/user)
|
||||
var/mob/living/silicon/ai/AI = user
|
||||
if(!istype(AI))
|
||||
AI = null
|
||||
|
||||
if(is_operational() && (!AI || AI.eyeobj.loc == loc))//If the projector has power and client eye is on it
|
||||
if (AI && istype(AI.current, /obj/machinery/holopad))
|
||||
to_chat(user, "<span class='danger'>ERROR:</span> \black Image feed in progress.")
|
||||
if(is_operational())//If the projector has power
|
||||
if(AI && istype(AI.current, /obj/machinery/holopad))
|
||||
to_chat(user, "[span_danger("ERROR:")] \black Image feed in progress.")
|
||||
return
|
||||
|
||||
var/obj/effect/overlay/holo_pad_hologram/Hologram = new(loc)//Spawn a blank effect at the location.
|
||||
if(AI)
|
||||
Hologram.icon = AI.holo_icon
|
||||
else //make it like real life
|
||||
AI.eyeobj.setLoc(get_turf(src)) //ensure the AI camera moves to the holopad
|
||||
else //make it like real life
|
||||
Hologram.icon = user.icon
|
||||
Hologram.icon_state = user.icon_state
|
||||
Hologram.copy_overlays(user, TRUE)
|
||||
@@ -407,17 +454,17 @@ GLOBAL_LIST_EMPTY(network_holopads)
|
||||
|
||||
Hologram.mouse_opacity = MOUSE_OPACITY_TRANSPARENT//So you can't click on it.
|
||||
Hologram.layer = FLY_LAYER//Above all the other objects/mobs. Or the vast majority of them.
|
||||
Hologram.setAnchored(TRUE)//So space wind cannot drag it.
|
||||
Hologram.set_anchored(TRUE)//So space wind cannot drag it.
|
||||
Hologram.name = "[user.name] (Hologram)"//If someone decides to right click.
|
||||
Hologram.set_light(2) //hologram lighting
|
||||
Hologram.set_light(2) //hologram lighting
|
||||
move_hologram()
|
||||
|
||||
set_holo(user, Hologram)
|
||||
visible_message("<span class='notice'>A holographic image of [user] flickers to life before your eyes!</span>")
|
||||
visible_message(span_notice("A holographic image of [user] flickers to life before your eyes!"))
|
||||
|
||||
return Hologram
|
||||
else
|
||||
to_chat(user, "<span class='danger'>ERROR:</span> Unable to project hologram.")
|
||||
to_chat(user, "[span_danger("ERROR:")] Unable to project hologram.")
|
||||
|
||||
/*This is the proc for special two-way communication between AI and holopad/people talking near holopad.
|
||||
For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
@@ -430,10 +477,13 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
|
||||
for(var/I in holo_calls)
|
||||
var/datum/holocall/HC = I
|
||||
if(HC.connected_holopad == src && speaker != HC.hologram)
|
||||
HC.user.Hear(message, speaker, message_language, raw_message, radio_freq, spans, message_mods)
|
||||
if(HC.connected_holopad == src)
|
||||
if(speaker == HC.hologram && HC.user.client?.prefs.chat_on_map)
|
||||
HC.user.create_chat_message(speaker, message_language, raw_message, spans)
|
||||
else
|
||||
HC.user.Hear(message, speaker, message_language, raw_message, radio_freq, spans, message_mods)
|
||||
|
||||
if(outgoing_call && speaker == outgoing_call.user)
|
||||
if(outgoing_call?.hologram && speaker == outgoing_call.user)
|
||||
outgoing_call.hologram.say(raw_message)
|
||||
|
||||
if(record_mode && speaker == record_user)
|
||||
@@ -447,16 +497,15 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
set_light(2)
|
||||
else
|
||||
set_light(0)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/machinery/holopad/update_icon_state()
|
||||
var/total_users = LAZYLEN(masters) + LAZYLEN(holo_calls)
|
||||
if(ringing)
|
||||
icon_state = "holopad_ringing"
|
||||
else if(total_users || replay_mode)
|
||||
icon_state = "holopad1"
|
||||
else
|
||||
icon_state = "holopad0"
|
||||
icon_state = "[base_icon_state]_ringing"
|
||||
return ..()
|
||||
icon_state = "[base_icon_state][(total_users || replay_mode) ? 1 : 0]"
|
||||
return ..()
|
||||
|
||||
/obj/machinery/holopad/proc/set_holo(mob/living/user, obj/effect/overlay/holo_pad_hologram/h)
|
||||
LAZYSET(masters, user, h)
|
||||
@@ -488,7 +537,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
var/obj/effect/overlay/holo_pad_hologram/h = masters[holo_owner]
|
||||
if(!h || h.HC) //Holocalls can't change source.
|
||||
return FALSE
|
||||
for(var/pad in GLOB.network_holopads)
|
||||
for(var/pad in holopads)
|
||||
var/obj/machinery/holopad/another = pad
|
||||
if(another == src)
|
||||
continue
|
||||
@@ -524,7 +573,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
else
|
||||
transfered = TRUE
|
||||
//All is good.
|
||||
holo.forceMove(new_turf)
|
||||
holo.abstract_move(new_turf)
|
||||
if(!transfered)
|
||||
update_holoray(user,new_turf)
|
||||
return TRUE
|
||||
@@ -565,10 +614,10 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
holder.selected_language = record.language
|
||||
Hologram.mouse_opacity = MOUSE_OPACITY_TRANSPARENT//So you can't click on it.
|
||||
Hologram.layer = FLY_LAYER//Above all the other objects/mobs. Or the vast majority of them.
|
||||
Hologram.setAnchored(TRUE)//So space wind cannot drag it.
|
||||
Hologram.set_anchored(TRUE)//So space wind cannot drag it.
|
||||
Hologram.name = "[record.caller_name] (Hologram)"//If someone decides to right click.
|
||||
Hologram.set_light(2) //hologram lighting
|
||||
visible_message("<span class='notice'>A holographic image of [record.caller_name] flickers to life before your eyes!</span>")
|
||||
Hologram.set_light(2) //hologram lighting
|
||||
visible_message(span_notice("A holographic image of [record.caller_name] flickers to life before your eyes!"))
|
||||
return Hologram
|
||||
|
||||
/obj/machinery/holopad/proc/replay_start()
|
||||
@@ -661,7 +710,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
record_user = null
|
||||
|
||||
/obj/machinery/holopad/proc/record_clear()
|
||||
if(disk && disk.record)
|
||||
if(disk?.record)
|
||||
QDEL_NULL(disk.record)
|
||||
|
||||
/obj/effect/overlay/holo_pad_hologram
|
||||
@@ -673,6 +722,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
Impersonation = null
|
||||
if(!QDELETED(HC))
|
||||
HC.Disconnect(HC.calling_holopad)
|
||||
HC = null
|
||||
return ..()
|
||||
|
||||
/obj/effect/overlay/holo_pad_hologram/Process_Spacemove(movement_dir = 0)
|
||||
|
||||
@@ -45,7 +45,8 @@ Buildable meters
|
||||
if(make_from)
|
||||
make_from_existing(make_from)
|
||||
else
|
||||
pipe_type = _pipe_type
|
||||
if(!initial(src.pipe_type))
|
||||
pipe_type = _pipe_type
|
||||
setDir(_dir)
|
||||
|
||||
update()
|
||||
|
||||
@@ -270,7 +270,7 @@
|
||||
var/range_light = 17
|
||||
var/range_flame = 17
|
||||
|
||||
/obj/item/bombcore/ex_act(severity, target) // Little boom can chain a big boom.
|
||||
/obj/item/bombcore/ex_act(severity, target, origin) // Little boom can chain a big boom.
|
||||
detonate()
|
||||
|
||||
|
||||
|
||||
@@ -84,6 +84,8 @@
|
||||
icon = 'icons/obj/clockwork_objects.dmi'
|
||||
hide = TRUE
|
||||
autolinkers = list("h_relay")
|
||||
flags_1 = DEFAULT_RICOCHET_1 | NODECONSTRUCT_1
|
||||
resistance_flags = INDESTRUCTIBLE
|
||||
|
||||
//Generic preset relay
|
||||
/obj/machinery/telecomms/relay/preset/auto
|
||||
|
||||
@@ -103,6 +103,31 @@ GLOBAL_LIST_INIT(dye_registry, list(
|
||||
DYE_RD = /obj/item/bedsheet/rd,
|
||||
DYE_CMO = /obj/item/bedsheet/cmo,
|
||||
DYE_COSMIC = /obj/item/bedsheet/cosmos
|
||||
),
|
||||
DYE_REGISTRY_DOUBLE_BEDSHEET = list(
|
||||
DYE_RED = /obj/item/bedsheet/red/double,
|
||||
DYE_ORANGE = /obj/item/bedsheet/orange/double,
|
||||
DYE_YELLOW = /obj/item/bedsheet/yellow/double,
|
||||
DYE_GREEN = /obj/item/bedsheet/green/double,
|
||||
DYE_BLUE = /obj/item/bedsheet/blue/double,
|
||||
DYE_PURPLE = /obj/item/bedsheet/purple/double,
|
||||
DYE_BLACK = /obj/item/bedsheet/black/double,
|
||||
DYE_WHITE = /obj/item/bedsheet/double,
|
||||
DYE_RAINBOW = /obj/item/bedsheet/rainbow/double,
|
||||
DYE_MIME = /obj/item/bedsheet/mime/double,
|
||||
DYE_CLOWN = /obj/item/bedsheet/clown/double,
|
||||
DYE_CHAP = /obj/item/bedsheet/chaplain/double,
|
||||
DYE_QM = /obj/item/bedsheet/qm/double,
|
||||
DYE_LAW = /obj/item/bedsheet/black/double,
|
||||
DYE_CAPTAIN = /obj/item/bedsheet/captain/double,
|
||||
DYE_HOP = /obj/item/bedsheet/hop/double,
|
||||
DYE_HOS = /obj/item/bedsheet/hos/double,
|
||||
DYE_CE = /obj/item/bedsheet/ce/double,
|
||||
DYE_RD = /obj/item/bedsheet/rd/double,
|
||||
DYE_CMO = /obj/item/bedsheet/cmo/double,
|
||||
DYE_COSMIC = /obj/item/bedsheet/cosmos/double,
|
||||
DYE_SYNDICATE = /obj/item/bedsheet/syndie/double,
|
||||
DYE_CENTCOM = /obj/item/bedsheet/centcom/double
|
||||
)
|
||||
))
|
||||
|
||||
|
||||
@@ -130,7 +130,11 @@
|
||||
if(isalien(target))
|
||||
new /obj/effect/temp_visual/dir_setting/bloodsplatter/xenosplatter(target.drop_location(), splatter_dir)
|
||||
else
|
||||
new /obj/effect/temp_visual/dir_setting/bloodsplatter(target.drop_location(), splatter_dir)
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
new /obj/effect/temp_visual/dir_setting/bloodsplatter(target.drop_location(), splatter_dir, H.dna.species.exotic_blood_color)
|
||||
else
|
||||
new /obj/effect/temp_visual/dir_setting/bloodsplatter(target.drop_location(), splatter_dir)
|
||||
|
||||
//organs go everywhere
|
||||
if(target_part && prob(10 * drill_level))
|
||||
|
||||
@@ -111,23 +111,23 @@
|
||||
mecha_log_message("Hit by projectile. Type: [Proj.name]([Proj.flag]).", color="red")
|
||||
. = ..()
|
||||
|
||||
/obj/mecha/ex_act(severity, target)
|
||||
/obj/mecha/ex_act(severity, target, origin)
|
||||
mecha_log_message("Affected by explosion of severity: [severity].", color="red")
|
||||
if(prob(deflect_chance))
|
||||
severity++
|
||||
log_append_to_last("Armor saved, changing severity to [severity].")
|
||||
. = ..()
|
||||
|
||||
/obj/mecha/contents_explosion(severity, target)
|
||||
/obj/mecha/contents_explosion(severity, target, origin)
|
||||
severity++
|
||||
for(var/X in equipment)
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME = X
|
||||
ME.ex_act(severity,target)
|
||||
ME.ex_act(severity, target, origin)
|
||||
for(var/Y in trackers)
|
||||
var/obj/item/mecha_parts/mecha_tracking/MT = Y
|
||||
MT.ex_act(severity, target)
|
||||
MT.ex_act(severity, target, origin)
|
||||
if(occupant)
|
||||
occupant.ex_act(severity,target)
|
||||
occupant.ex_act(severity, target, origin)
|
||||
|
||||
/obj/mecha/handle_atom_del(atom/A)
|
||||
if(A == occupant)
|
||||
|
||||
@@ -144,7 +144,7 @@
|
||||
return
|
||||
|
||||
|
||||
/obj/mecha/working/ripley/contents_explosion(severity, target)
|
||||
/obj/mecha/working/ripley/contents_explosion(severity, target, origin)
|
||||
for(var/X in cargo)
|
||||
var/obj/O = X
|
||||
if(prob(30/severity))
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
/obj/effect/anomaly/proc/detonate()
|
||||
return
|
||||
|
||||
/obj/effect/anomaly/ex_act(severity, target)
|
||||
/obj/effect/anomaly/ex_act(severity, target, origin)
|
||||
if(severity == 1)
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
. = ..()
|
||||
|
||||
/obj/effect/countdown/ex_act(severity, target) //immune to explosions
|
||||
/obj/effect/countdown/ex_act(severity, target, origin) //immune to explosions
|
||||
return
|
||||
|
||||
/obj/effect/countdown/syndicatebomb
|
||||
|
||||
@@ -77,10 +77,10 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/effect/decal/cleanable/ex_act()
|
||||
/obj/effect/decal/cleanable/ex_act(severity, target, origin)
|
||||
if(reagents)
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
R.on_ex_act()
|
||||
R.on_ex_act(severity)
|
||||
..()
|
||||
|
||||
/obj/effect/decal/cleanable/fire_act(exposed_temperature, exposed_volume)
|
||||
|
||||
@@ -11,12 +11,12 @@
|
||||
var/gibs_reagent_id = /datum/reagent/liquidgibs
|
||||
var/gibs_bloodtype = "A+"
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/Initialize(mapload, list/datum/disease/diseases)
|
||||
/obj/effect/decal/cleanable/blood/gibs/Initialize(mapload, list/datum/disease/diseases, list/blood_data)
|
||||
. = ..()
|
||||
if(random_icon_states && (icon_state == initial(icon_state)) && length(random_icon_states) > 0)
|
||||
icon_state = pick(random_icon_states)
|
||||
if(gibs_reagent_id)
|
||||
reagents.add_reagent(gibs_reagent_id, 5)
|
||||
reagents.add_reagent(gibs_reagent_id, 5, blood_data)
|
||||
if(gibs_bloodtype)
|
||||
add_blood_DNA(list("Non-human DNA" = gibs_bloodtype), diseases)
|
||||
update_icon()
|
||||
@@ -36,7 +36,7 @@
|
||||
. = ..()
|
||||
return /obj/effect/decal/cleanable/blood/gibs/old
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/ex_act(severity, target)
|
||||
/obj/effect/decal/cleanable/blood/gibs/ex_act(severity, target, origin)
|
||||
return
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/Crossed(mob/living/L)
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
. = ..()
|
||||
setDir(pick(GLOB.cardinals))
|
||||
|
||||
/obj/effect/decal/cleanable/glass/ex_act()
|
||||
/obj/effect/decal/cleanable/glass/ex_act(severity, target, origin)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/decal/cleanable/glass/wave_ex_act(power, datum/wave_explosion/explosion, dir)
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
if (!step_to(src, get_step(src, direction), 0))
|
||||
break
|
||||
|
||||
/obj/effect/decal/cleanable/robot_debris/ex_act()
|
||||
/obj/effect/decal/cleanable/robot_debris/ex_act(severity, target, origin)
|
||||
return
|
||||
|
||||
/obj/effect/decal/cleanable/robot_debris/limb
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
/obj/effect/decal/proc/NeverShouldHaveComeHere(turf/T)
|
||||
return isclosedturf(T) || isgroundlessturf(T)
|
||||
|
||||
/obj/effect/decal/ex_act(severity, target)
|
||||
/obj/effect/decal/ex_act(severity, target, origin)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/decal/fire_act(exposed_temperature, exposed_volume)
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
/obj/effect/experience_pressure_difference()
|
||||
return
|
||||
|
||||
/obj/effect/ex_act(severity, target)
|
||||
/obj/effect/ex_act(severity, target, origin)
|
||||
if(target == src)
|
||||
qdel(src)
|
||||
else
|
||||
@@ -51,7 +51,7 @@
|
||||
/obj/effect/ConveyorMove()
|
||||
return
|
||||
|
||||
/obj/effect/abstract/ex_act(severity, target)
|
||||
/obj/effect/abstract/ex_act(severity, target, origin)
|
||||
return
|
||||
|
||||
/obj/effect/abstract/singularity_pull()
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
return
|
||||
|
||||
// Please stop bombing the Observer-Start landmark.
|
||||
/obj/effect/landmark/ex_act()
|
||||
/obj/effect/landmark/ex_act(severity, target, origin)
|
||||
return
|
||||
|
||||
/obj/effect/landmark/singularity_pull()
|
||||
|
||||
@@ -31,7 +31,10 @@
|
||||
|
||||
var/list/dna_to_add //find the dna to pass to the spawned gibs. do note this can be null if the mob doesn't have blood. add_blood_DNA() has built in null handling.
|
||||
var/body_coloring = ""
|
||||
|
||||
var/list/blood_data_to_add
|
||||
if(source_mob)
|
||||
blood_data_to_add = source_mob.get_blood_data()
|
||||
if(!issilicon(source_mob))
|
||||
dna_to_add = blood_dna || source_mob.get_blood_dna_list() //ez pz
|
||||
if(ishuman(source_mob))
|
||||
@@ -65,7 +68,7 @@
|
||||
if(gibamounts[i])
|
||||
for(var/j = 1, j<= gibamounts[i], j++)
|
||||
var/gibType = gibtypes[i]
|
||||
gib = new gibType(loc, diseases)
|
||||
gib = new gibType(loc, diseases, blood_data_to_add)
|
||||
if(iscarbon(loc))
|
||||
var/mob/living/carbon/digester = loc
|
||||
digester.stomach_contents += gib
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
duration = 5
|
||||
randomdir = FALSE
|
||||
layer = BELOW_MOB_LAYER
|
||||
color = BLOOD_COLOR_HUMAN // set it to red by default because the actual icons are white
|
||||
var/splatter_type = "splatter"
|
||||
|
||||
/obj/effect/temp_visual/dir_setting/bloodsplatter/Initialize(mapload, set_dir, new_color)
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
/obj/effect/temp_visual/singularity_pull()
|
||||
return
|
||||
|
||||
/obj/effect/temp_visual/ex_act()
|
||||
/obj/effect/temp_visual/ex_act(severity, target, origin)
|
||||
return
|
||||
|
||||
/obj/effect/temp_visual/dir_setting
|
||||
|
||||
+95
-43
@@ -46,11 +46,23 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
max_integrity = 200
|
||||
|
||||
obj_flags = NONE
|
||||
///Item flags for the item
|
||||
var/item_flags = NONE
|
||||
|
||||
var/hitsound = null
|
||||
var/usesound = null
|
||||
var/throwhitsound = null
|
||||
///Sound played when you hit something with the item
|
||||
var/hitsound
|
||||
///Played when the item is used, for example tools
|
||||
var/usesound
|
||||
///Used when yate into a mob
|
||||
var/mob_throw_hit_sound
|
||||
///Sound used when equipping the item into a valid slot
|
||||
var/equip_sound
|
||||
///Sound uses when picking the item up (into your hands)
|
||||
var/pickup_sound
|
||||
///Sound uses when dropping the item, or when its thrown.
|
||||
var/drop_sound
|
||||
///Whether or not we use stealthy audio levels for this item's attack sounds
|
||||
var/stealthy_audio = FALSE
|
||||
|
||||
/// Weight class for how much storage capacity it uses and how big it physically is meaning storages can't hold it if their maximum weight class isn't as high as it.
|
||||
var/w_class = WEIGHT_CLASS_NORMAL
|
||||
@@ -129,7 +141,8 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
var/datum/dog_fashion/dog_fashion = null
|
||||
|
||||
//Tooltip vars
|
||||
var/force_string //string form of an item's force. Edit this var only to set a custom force string
|
||||
///string form of an item's force. Edit this var only to set a custom force string
|
||||
var/force_string
|
||||
var/last_force_string_check = 0
|
||||
|
||||
var/trigger_guard = TRIGGER_GUARD_NONE
|
||||
@@ -331,6 +344,9 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
return ..()
|
||||
|
||||
/obj/item/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(!user)
|
||||
return
|
||||
if(anchored)
|
||||
@@ -340,6 +356,8 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
to_chat(user, "<span class='warning'>You are unable to unequip that while wearing other garments over it!</span>")
|
||||
return FALSE
|
||||
|
||||
. = TRUE
|
||||
|
||||
if(resistance_flags & ON_FIRE)
|
||||
var/mob/living/carbon/C = user
|
||||
var/can_handle_hot = FALSE
|
||||
@@ -374,6 +392,8 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
|
||||
//If the item is in a storage item, take it out
|
||||
SEND_SIGNAL(loc, COMSIG_TRY_STORAGE_TAKE, src, user.loc, TRUE)
|
||||
if(QDELETED(src)) //moving it out of the storage to the floor destroyed it.
|
||||
return
|
||||
|
||||
if(throwing)
|
||||
throwing.finalize(FALSE)
|
||||
@@ -381,11 +401,12 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
if(!allow_attack_hand_drop(user) || !user.temporarilyRemoveItemFromInventory(src))
|
||||
return
|
||||
|
||||
remove_outline()
|
||||
. = FALSE
|
||||
pickup(user)
|
||||
add_fingerprint(user)
|
||||
if(!user.put_in_active_hand(src, FALSE, FALSE))
|
||||
user.dropItemToGround(src)
|
||||
return TRUE
|
||||
|
||||
/obj/item/proc/allow_attack_hand_drop(mob/user)
|
||||
return TRUE
|
||||
@@ -453,9 +474,8 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
item_flags &= ~(IN_INVENTORY)
|
||||
item_flags &= ~(IN_STORAGE)
|
||||
SEND_SIGNAL(src, COMSIG_ITEM_DROPPED,user)
|
||||
remove_outline()
|
||||
// if(!silent)
|
||||
// playsound(src, drop_sound, DROP_SOUND_VOLUME, ignore_walls = FALSE)
|
||||
if(!silent)
|
||||
playsound(src, drop_sound, DROP_SOUND_VOLUME, ignore_walls = FALSE)
|
||||
user?.update_equipment_speed_mods()
|
||||
|
||||
// called just as an item is picked up (loc is not yet changed)
|
||||
@@ -702,8 +722,8 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
if(isliving(hit_atom)) //Living mobs handle hit sounds differently.
|
||||
var/volume = get_volume_by_throwforce_and_or_w_class()
|
||||
if (throwforce > 0)
|
||||
if (throwhitsound)
|
||||
playsound(hit_atom, throwhitsound, volume, TRUE, -1)
|
||||
if (mob_throw_hit_sound)
|
||||
playsound(hit_atom, mob_throw_hit_sound, volume, TRUE, -1)
|
||||
else if(hitsound)
|
||||
playsound(hit_atom, hitsound, volume, TRUE, -1)
|
||||
else
|
||||
@@ -711,8 +731,8 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
else
|
||||
playsound(hit_atom, 'sound/weapons/throwtap.ogg', 1, volume, -1)
|
||||
|
||||
// else
|
||||
// playsound(src, drop_sound, YEET_SOUND_VOLUME, ignore_walls = FALSE)
|
||||
else if (drop_sound)
|
||||
playsound(src, drop_sound, YEET_SOUND_VOLUME, ignore_walls = FALSE)
|
||||
return hit_atom.hitby(src, 0, itempush, throwingdatum=throwingdatum)
|
||||
|
||||
/obj/item/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0, datum/callback/callback, force, messy_throw = TRUE)
|
||||
@@ -886,47 +906,55 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
openToolTip(user,src,params,title = name,content = "[desc]<br><b>Force:</b> [force_string]",theme = "")
|
||||
|
||||
/obj/item/MouseEntered(location, control, params)
|
||||
. = ..()
|
||||
SEND_SIGNAL(src, COMSIG_ITEM_MOUSE_ENTER, location, control, params)
|
||||
if((item_flags & IN_INVENTORY || item_flags & IN_STORAGE) && usr?.client.prefs.enable_tips && !QDELETED(src))
|
||||
var/timedelay = max(usr.client.prefs.tip_delay * 0.01, 0.01) // I heard multiplying is faster, also runtimes from very low/negative numbers
|
||||
usr.client.tip_timer = addtimer(CALLBACK(src, .proc/openTip, location, control, params, usr), timedelay, TIMER_STOPPABLE)//timer takes delay in deciseconds, but the pref is in milliseconds. dividing by 100 converts it.
|
||||
var/mob/living/L = usr
|
||||
if(istype(L) && (L.incapacitated() || (current_equipped_slot in L.check_obscured_slots()) || !L.canUnEquip(src)))
|
||||
apply_outline(_size = 3)
|
||||
else
|
||||
apply_outline()
|
||||
if(get(src, /mob) == usr && !QDELETED(src))
|
||||
var/mob/living/L = usr
|
||||
if(usr.client.prefs.enable_tips)
|
||||
var/timedelay = usr.client.prefs.tip_delay/100
|
||||
usr.client.tip_timer = addtimer(CALLBACK(src, .proc/openTip, location, control, params, usr), timedelay, TIMER_STOPPABLE)//timer takes delay in deciseconds, but the pref is in milliseconds. dividing by 100 converts it.
|
||||
if(usr.client.prefs.outline_enabled)
|
||||
if(istype(L) && L.incapacitated())
|
||||
apply_outline(COLOR_RED_GRAY) //if they're dead or handcuffed, let's show the outline as red to indicate that they can't interact with that right now
|
||||
else
|
||||
apply_outline(usr.client.prefs.outline_color) //if the player's alive and well we send the command with no color set, so it uses the theme's color
|
||||
|
||||
/obj/item/MouseDrop(atom/over, src_location, over_location, src_control, over_control, params)
|
||||
. = ..()
|
||||
remove_outline()
|
||||
remove_filter("hover_outline") //get rid of the hover effect in case the mouse exit isn't called if someone drags and drops an item and somthing goes wrong
|
||||
|
||||
/obj/item/MouseExited(location,control,params)
|
||||
/obj/item/MouseExited(location, control, params)
|
||||
SEND_SIGNAL(src, COMSIG_ITEM_MOUSE_EXIT, location, control, params)
|
||||
deltimer(usr.client.tip_timer) //delete any in-progress timer if the mouse is moved off the item before it finishes
|
||||
closeToolTip(usr)
|
||||
remove_outline()
|
||||
remove_filter("hover_outline")
|
||||
|
||||
/obj/item/proc/apply_outline(colour = null, _size=1)
|
||||
if(!(item_flags & IN_INVENTORY || item_flags & IN_STORAGE) || QDELETED(src) || isobserver(usr))
|
||||
/obj/item/proc/apply_outline(outline_color = null)
|
||||
if(get(src, /mob) != usr || QDELETED(src) || isobserver(usr)) //cancel if the item isn't in an inventory, is being deleted, or if the person hovering is a ghost (so that people spectating you don't randomly make your items glow)
|
||||
return
|
||||
if(usr.client)
|
||||
if(!usr.client.prefs.outline_enabled)
|
||||
return
|
||||
if(!colour)
|
||||
if(usr.client)
|
||||
colour = usr.client.prefs.outline_color
|
||||
if(!colour)
|
||||
colour = COLOR_BLUE_GRAY
|
||||
else
|
||||
colour = COLOR_BLUE_GRAY
|
||||
if(outline_filter)
|
||||
filters -= outline_filter
|
||||
outline_filter = filter(type="outline", size=_size, color=colour)
|
||||
filters += outline_filter
|
||||
var/theme = lowertext(usr.client.prefs.UI_style)
|
||||
if(!outline_color) //if we weren't provided with a color, take the theme's color
|
||||
switch(theme) //yeah it kinda has to be this way
|
||||
if("midnight")
|
||||
outline_color = COLOR_THEME_MIDNIGHT
|
||||
if("plasmafire")
|
||||
outline_color = COLOR_THEME_PLASMAFIRE
|
||||
if("retro")
|
||||
outline_color = COLOR_THEME_RETRO //just as garish as the rest of this theme
|
||||
if("slimecore")
|
||||
outline_color = COLOR_THEME_SLIMECORE
|
||||
if("operative")
|
||||
outline_color = COLOR_THEME_OPERATIVE
|
||||
if("clockwork")
|
||||
outline_color = COLOR_THEME_CLOCKWORK //if you want free gbp go fix the fact that clockwork's tooltip css is glass'
|
||||
if("glass")
|
||||
outline_color = COLOR_THEME_GLASS
|
||||
else //this should never happen, hopefully
|
||||
outline_color = COLOR_WHITE
|
||||
if(color)
|
||||
outline_color = COLOR_WHITE //if the item is recolored then the outline will be too, let's make the outline white so it becomes the same color instead of some ugly mix of the theme and the tint
|
||||
|
||||
/obj/item/proc/remove_outline()
|
||||
if(outline_filter)
|
||||
filters -= outline_filter
|
||||
outline_filter = null
|
||||
add_filter("hover_outline", 1, list("type" = "outline", "size" = 1, "color" = outline_color))
|
||||
|
||||
// Called when a mob tries to use the item as a tool.
|
||||
// Handles most checks.
|
||||
@@ -1063,6 +1091,19 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
. = ..()
|
||||
if(var_name == NAMEOF(src, slowdown))
|
||||
set_slowdown(var_value) //don't care if it's a duplicate edit as slowdown'll be set, do it anyways to force normal behavior.
|
||||
|
||||
/obj/item/proc/canStrip(mob/stripper, mob/owner)
|
||||
SHOULD_BE_PURE(TRUE)
|
||||
return !HAS_TRAIT(src, TRAIT_NODROP) && !(item_flags & ABSTRACT)
|
||||
|
||||
/obj/item/proc/doStrip(mob/stripper, mob/owner)
|
||||
if(owner.dropItemToGround(src))
|
||||
if(stripper.can_hold_items())
|
||||
stripper.put_in_hands(src)
|
||||
return TRUE
|
||||
else
|
||||
return FALSE
|
||||
|
||||
/**
|
||||
* Does the current embedding var meet the criteria for being harmless? Namely, does it explicitly define the pain multiplier and jostle pain mult to be 0? If so, return true.
|
||||
*
|
||||
@@ -1221,3 +1262,14 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
/obj/item/proc/on_offer_taken(mob/living/carbon/offerer, mob/living/carbon/taker)
|
||||
if(SEND_SIGNAL(src, COMSIG_ITEM_OFFER_TAKEN, offerer, taker) & COMPONENT_OFFER_INTERRUPT)
|
||||
return TRUE
|
||||
|
||||
/**
|
||||
* Updates all action buttons associated with this item
|
||||
*
|
||||
* Arguments:
|
||||
* * status_only - Update only current availability status of the buttons to show if they are ready or not to use
|
||||
* * force - Force buttons update even if the given button icon state has not changed
|
||||
*/
|
||||
/obj/item/proc/update_action_buttons(status_only = FALSE, force = FALSE)
|
||||
for(var/datum/action/current_action as anything in actions)
|
||||
current_action.UpdateButtonIcon(status_only, force)
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
/obj/item/wallframe/apc/try_build(turf/on_wall, user)
|
||||
if(!..())
|
||||
return
|
||||
var/turf/T = get_turf(on_wall) //the user is not where it needs to be.
|
||||
var/turf/T = get_turf(user)
|
||||
var/area/A = get_area(T)
|
||||
if(A.get_apc())
|
||||
to_chat(user, "<span class='warning'>This area already has an APC!</span>")
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
var/response_timer_id = null
|
||||
var/approval_time = 600
|
||||
var/allow_unicode = FALSE
|
||||
var/admin_approved = FALSE
|
||||
|
||||
var/static/regex/standard_station_regex
|
||||
|
||||
@@ -62,8 +63,32 @@
|
||||
|
||||
to_chat(user, "Your name has been sent to your employers for approval.")
|
||||
// Autoapproves after a certain time
|
||||
response_timer_id = addtimer(CALLBACK(src, .proc/rename_station, new_name, user.name, user.real_name, key_name(user)), approval_time, TIMER_STOPPABLE)
|
||||
to_chat(GLOB.admins, "<span class='adminnotice'><b><font color=orange>CUSTOM STATION RENAME:</font></b>[ADMIN_LOOKUPFLW(user)] proposes to rename the [name_type] to [html_encode(new_name)] (will autoapprove in [DisplayTimeText(approval_time)]). [ADMIN_SMITE(user)] (<A HREF='?_src_=holder;[HrefToken(TRUE)];reject_custom_name=[REF(src)]'>REJECT</A>) [ADMIN_CENTCOM_REPLY(user)]</span>")
|
||||
var/requires_approval = CONFIG_GET(flag/station_name_needs_approval)
|
||||
response_timer_id = addtimer(CALLBACK(src, .proc/check_state, new_name, user.name, user.real_name, key_name(user)), approval_time, TIMER_STOPPABLE)
|
||||
to_chat(GLOB.admins, "<span class='adminnotice'><b><font color=orange>CUSTOM STATION RENAME:</font></b>[ADMIN_LOOKUPFLW(user)] proposes to rename the [name_type] to [html_encode(new_name)] ([requires_approval ? "REQUIRES ADMIN APPROVAL and will autodeny" : "will autoapprove"] in [DisplayTimeText(approval_time)]). [ADMIN_SMITE(user)] (<A HREF='?_src_=holder;[HrefToken(TRUE)];reject_custom_name=[REF(src)]'>REJECT</A>)[requires_approval ? " (<A HREF='?_src_=holder;[HrefToken(TRUE)];approve_custom_name=[REF(src)]'>APPROVE</A>)" : ""] [ADMIN_CENTCOM_REPLY(user)]</span>")
|
||||
|
||||
/obj/item/station_charter/proc/check_state(designation, uname, ureal_name, ukey)
|
||||
var/requires_approval = CONFIG_GET(flag/station_name_needs_approval)
|
||||
if(requires_approval && !admin_approved)
|
||||
var/turf/T = get_turf(src)
|
||||
T.visible_message("<span class='warning'>A note appears on [src], stating this sector requires central command approval for its station names, which was not performed in time for this request. Looks like the change has been auto-rejected.</span>")
|
||||
var/m = "Station rename has been autorejected due to config requiring admin approval."
|
||||
message_admins(m)
|
||||
log_admin(m)
|
||||
else
|
||||
rename_station(designation, uname, ureal_name, ukey)
|
||||
response_timer_id = null
|
||||
admin_approved = FALSE
|
||||
|
||||
/obj/item/station_charter/proc/allow_pass(user)
|
||||
if(!user)
|
||||
return
|
||||
if(!response_timer_id)
|
||||
return
|
||||
admin_approved = TRUE
|
||||
var/m = "[key_name(user)] has approved the proposed station name. It can still be denied prior to the timer expiring."
|
||||
message_admins(m)
|
||||
log_admin(m)
|
||||
|
||||
/obj/item/station_charter/proc/reject_proposed(user)
|
||||
if(!user)
|
||||
@@ -80,6 +105,7 @@
|
||||
|
||||
deltimer(response_timer_id)
|
||||
response_timer_id = null
|
||||
admin_approved = FALSE
|
||||
|
||||
/obj/item/station_charter/proc/rename_station(designation, uname, ureal_name, ukey)
|
||||
set_station_name(designation)
|
||||
|
||||
@@ -266,7 +266,7 @@
|
||||
/obj/effect/chrono_field/singularity_pull()
|
||||
return
|
||||
|
||||
/obj/effect/chrono_field/ex_act()
|
||||
/obj/effect/chrono_field/ex_act(severity, target, origin)
|
||||
return
|
||||
|
||||
/obj/effect/chrono_field/blob_act(obj/structure/blob/B)
|
||||
|
||||
@@ -759,6 +759,8 @@
|
||||
|
||||
if(isobj(target) && !istype(target, /obj/effect/decal/cleanable/crayon/gang))
|
||||
if(actually_paints)
|
||||
if(istype(target, /obj/item/canvas)) //dont color our canvas neon green when im trying to paint please
|
||||
return
|
||||
var/list/hsl = rgb2hsl(hex2num(copytext(paint_color,2,4)),hex2num(copytext(paint_color,4,6)),hex2num(copytext(paint_color,6,8)))
|
||||
var/static/whitelisted = typecacheof(list(/obj/structure/window,
|
||||
/obj/effect/decal/cleanable/crayon,
|
||||
|
||||
@@ -144,8 +144,8 @@
|
||||
/obj/effect/dummy/chameleon/attack_alien()
|
||||
master.disrupt()
|
||||
|
||||
/obj/effect/dummy/chameleon/ex_act(S, T)
|
||||
contents_explosion(S, T)
|
||||
/obj/effect/dummy/chameleon/ex_act(severity, target, origin)
|
||||
contents_explosion(severity, target, origin)
|
||||
master.disrupt()
|
||||
|
||||
/obj/effect/dummy/chameleon/bullet_act()
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
attack_verb = list("blown up", "exploded", "detonated")
|
||||
custom_materials = list(/datum/material/iron=50, /datum/material/glass=30)
|
||||
|
||||
/obj/item/doorCharge/ex_act(severity, target)
|
||||
/obj/item/doorCharge/ex_act(severity, target, origin)
|
||||
switch(severity)
|
||||
if(EXPLODE_DEVASTATE)
|
||||
visible_message("<span class='warning'>[src] detonates!</span>")
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
rad_flags = RAD_NO_CONTAMINATE
|
||||
item_flags = NOBLUDGEON
|
||||
custom_materials = list(/datum/material/iron = 150, /datum/material/glass = 150)
|
||||
|
||||
var/grace = RAD_GRACE_PERIOD
|
||||
@@ -35,17 +36,15 @@
|
||||
. = ..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
soundloop = new(list(src), FALSE)
|
||||
soundloop = new(src, FALSE)
|
||||
|
||||
/obj/item/geiger_counter/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
QDEL_NULL(soundloop)
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/item/geiger_counter/process()
|
||||
update_icon()
|
||||
update_sound()
|
||||
|
||||
/obj/item/geiger_counter/process(delta_time)
|
||||
if(!scanning)
|
||||
current_tick_amount = 0
|
||||
return
|
||||
@@ -64,49 +63,55 @@
|
||||
|
||||
current_tick_amount = 0
|
||||
|
||||
update_appearance()
|
||||
update_sound()
|
||||
|
||||
/obj/item/geiger_counter/examine(mob/user)
|
||||
. = ..()
|
||||
if(!scanning)
|
||||
return
|
||||
. += "<span class='info'>Alt-click it to clear stored radiation levels.</span>"
|
||||
. += span_info("Alt-click it to clear stored radiation levels.")
|
||||
if(obj_flags & EMAGGED)
|
||||
. += "<span class='warning'>The display seems to be incomprehensible.</span>"
|
||||
. += span_warning("The display seems to be incomprehensible.")
|
||||
return
|
||||
switch(radiation_count)
|
||||
if(-INFINITY to RAD_LEVEL_NORMAL)
|
||||
. += "<span class='notice'>Ambient radiation level count reports that all is well.</span>"
|
||||
. += span_notice("Ambient radiation level count reports that all is well.")
|
||||
if(RAD_LEVEL_NORMAL + 1 to RAD_LEVEL_MODERATE)
|
||||
. += "<span class='disarm'>Ambient radiation levels slightly above average.</span>"
|
||||
. += span_alert("Ambient radiation levels slightly above average.")
|
||||
if(RAD_LEVEL_MODERATE + 1 to RAD_LEVEL_HIGH)
|
||||
. += "<span class='warning'>Ambient radiation levels above average.</span>"
|
||||
. += span_warning("Ambient radiation levels above average.")
|
||||
if(RAD_LEVEL_HIGH + 1 to RAD_LEVEL_VERY_HIGH)
|
||||
. += "<span class='danger'>Ambient radiation levels highly above average.</span>"
|
||||
. += span_danger("Ambient radiation levels highly above average.")
|
||||
if(RAD_LEVEL_VERY_HIGH + 1 to RAD_LEVEL_CRITICAL)
|
||||
. += "<span class='suicide'>Ambient radiation levels nearing critical level.</span>"
|
||||
. += span_suicide("Ambient radiation levels nearing critical level.")
|
||||
if(RAD_LEVEL_CRITICAL + 1 to INFINITY)
|
||||
. += "<span class='boldannounce'>Ambient radiation levels above critical level!</span>"
|
||||
. += span_boldannounce("Ambient radiation levels above critical level!")
|
||||
|
||||
. += "<span class='notice'>The last radiation amount detected was [last_tick_amount]</span>"
|
||||
. += span_notice("The last radiation amount detected was [last_tick_amount]")
|
||||
|
||||
/obj/item/geiger_counter/update_icon_state()
|
||||
if(!scanning)
|
||||
icon_state = "geiger_off"
|
||||
else if(obj_flags & EMAGGED)
|
||||
return ..()
|
||||
if(obj_flags & EMAGGED)
|
||||
icon_state = "geiger_on_emag"
|
||||
else
|
||||
switch(radiation_count)
|
||||
if(-INFINITY to RAD_LEVEL_NORMAL)
|
||||
icon_state = "geiger_on_1"
|
||||
if(RAD_LEVEL_NORMAL + 1 to RAD_LEVEL_MODERATE)
|
||||
icon_state = "geiger_on_2"
|
||||
if(RAD_LEVEL_MODERATE + 1 to RAD_LEVEL_HIGH)
|
||||
icon_state = "geiger_on_3"
|
||||
if(RAD_LEVEL_HIGH + 1 to RAD_LEVEL_VERY_HIGH)
|
||||
icon_state = "geiger_on_4"
|
||||
if(RAD_LEVEL_VERY_HIGH + 1 to RAD_LEVEL_CRITICAL)
|
||||
icon_state = "geiger_on_4"
|
||||
if(RAD_LEVEL_CRITICAL + 1 to INFINITY)
|
||||
icon_state = "geiger_on_5"
|
||||
return ..()
|
||||
|
||||
switch(radiation_count)
|
||||
if(-INFINITY to RAD_LEVEL_NORMAL)
|
||||
icon_state = "geiger_on_1"
|
||||
if(RAD_LEVEL_NORMAL + 1 to RAD_LEVEL_MODERATE)
|
||||
icon_state = "geiger_on_2"
|
||||
if(RAD_LEVEL_MODERATE + 1 to RAD_LEVEL_HIGH)
|
||||
icon_state = "geiger_on_3"
|
||||
if(RAD_LEVEL_HIGH + 1 to RAD_LEVEL_VERY_HIGH)
|
||||
icon_state = "geiger_on_4"
|
||||
if(RAD_LEVEL_VERY_HIGH + 1 to RAD_LEVEL_CRITICAL)
|
||||
icon_state = "geiger_on_4"
|
||||
if(RAD_LEVEL_CRITICAL + 1 to INFINITY)
|
||||
icon_state = "geiger_on_5"
|
||||
return ..()
|
||||
|
||||
/obj/item/geiger_counter/proc/update_sound()
|
||||
var/datum/looping_sound/geiger/loop = soundloop
|
||||
@@ -124,21 +129,21 @@
|
||||
if(amount <= RAD_BACKGROUND_RADIATION || !scanning)
|
||||
return
|
||||
current_tick_amount += amount
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/geiger_counter/attack_self(mob/user)
|
||||
scanning = !scanning
|
||||
update_icon()
|
||||
to_chat(user, "<span class='notice'>[icon2html(src, user)] You switch [scanning ? "on" : "off"] [src].</span>")
|
||||
update_appearance()
|
||||
to_chat(user, span_notice("[icon2html(src, user)] You switch [scanning ? "on" : "off"] [src]."))
|
||||
|
||||
/obj/item/geiger_counter/afterattack(atom/target, mob/user)
|
||||
/obj/item/geiger_counter/afterattack(atom/target, mob/living/user)
|
||||
. = ..()
|
||||
if(user.a_intent == INTENT_HELP)
|
||||
if(!(obj_flags & EMAGGED))
|
||||
user.visible_message("<span class='notice'>[user] scans [target] with [src].</span>", "<span class='notice'>You scan [target]'s radiation levels with [src]...</span>")
|
||||
user.visible_message(span_notice("[user] scans [target] with [src]."), span_notice("You scan [target]'s radiation levels with [src]..."))
|
||||
addtimer(CALLBACK(src, .proc/scan, target, user), 20, TIMER_UNIQUE) // Let's not have spamming GetAllContents
|
||||
else
|
||||
user.visible_message("<span class='notice'>[user] scans [target] with [src].</span>", "<span class='danger'>You project [src]'s stored radiation into [target]!</span>")
|
||||
user.visible_message(span_notice("[user] scans [target] with [src]."), span_danger("You project [src]'s stored radiation into [target]!"))
|
||||
target.rad_act(radiation_count)
|
||||
radiation_count = 0
|
||||
return TRUE
|
||||
@@ -156,57 +161,61 @@
|
||||
if(isliving(A))
|
||||
var/mob/living/M = A
|
||||
if(!M.radiation)
|
||||
to_chat(user, "<span class='notice'>[icon2html(src, user)] Radiation levels within normal boundaries.</span>")
|
||||
to_chat(user, span_notice("[icon2html(src, user)] Radiation levels within normal boundaries."))
|
||||
else
|
||||
to_chat(user, "<span class='boldannounce'>[icon2html(src, user)] Subject is irradiated. Radiation levels: [M.radiation] rad.</span>")
|
||||
to_chat(user, span_boldannounce("[icon2html(src, user)] Subject is irradiated. Radiation levels: [M.radiation]."))
|
||||
|
||||
if(rad_strength)
|
||||
to_chat(user, "<span class='boldannounce'>[icon2html(src, user)] Target contains radioactive contamination. Radioactive strength: [rad_strength]</span>")
|
||||
to_chat(user, span_boldannounce("[icon2html(src, user)] Target contains radioactive contamination. Radioactive strength: [rad_strength]"))
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[icon2html(src, user)] Target is free of radioactive contamination.</span>")
|
||||
to_chat(user, span_notice("[icon2html(src, user)] Target is free of radioactive contamination."))
|
||||
|
||||
/obj/item/geiger_counter/attackby(obj/item/I, mob/user, params)
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER && (obj_flags & EMAGGED))
|
||||
if(scanning)
|
||||
to_chat(user, "<span class='warning'>Turn off [src] before you perform this action!</span>")
|
||||
return 0
|
||||
user.visible_message("<span class='notice'>[user] unscrews [src]'s maintenance panel and begins fiddling with its innards...</span>", "<span class='notice'>You begin resetting [src]...</span>")
|
||||
to_chat(user, span_warning("Turn off [src] before you perform this action!"))
|
||||
return FALSE
|
||||
user.visible_message(span_notice("[user] unscrews [src]'s maintenance panel and begins fiddling with its innards..."), span_notice("You begin resetting [src]..."))
|
||||
if(!I.use_tool(src, user, 40, volume=50))
|
||||
return 0
|
||||
user.visible_message("<span class='notice'>[user] refastens [src]'s maintenance panel!</span>", "<span class='notice'>You reset [src] to its factory settings!</span>")
|
||||
return FALSE
|
||||
user.visible_message(span_notice("[user] refastens [src]'s maintenance panel!"), span_notice("You reset [src] to its factory settings!"))
|
||||
obj_flags &= ~EMAGGED
|
||||
radiation_count = 0
|
||||
update_icon()
|
||||
return 1
|
||||
update_appearance()
|
||||
return TRUE
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/geiger_counter/AltClick(mob/living/user)
|
||||
. = ..()
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE))
|
||||
return
|
||||
return ..()
|
||||
if(!scanning)
|
||||
to_chat(usr, "<span class='warning'>[src] must be on to reset its radiation level!</span>")
|
||||
return TRUE
|
||||
to_chat(usr, span_warning("[src] must be on to reset its radiation level!"))
|
||||
return
|
||||
radiation_count = 0
|
||||
to_chat(usr, "<span class='notice'>You flush [src]'s radiation counts, resetting it to normal.</span>")
|
||||
update_icon()
|
||||
return TRUE
|
||||
to_chat(usr, span_notice("You flush [src]'s radiation counts, resetting it to normal."))
|
||||
update_appearance()
|
||||
|
||||
/obj/item/geiger_counter/emag_act(mob/user)
|
||||
. = ..()
|
||||
if(obj_flags & EMAGGED)
|
||||
return
|
||||
if(scanning)
|
||||
to_chat(user, "<span class='warning'>Turn off [src] before you perform this action!</span>")
|
||||
to_chat(user, span_warning("Turn off [src] before you perform this action!"))
|
||||
return
|
||||
to_chat(user, "<span class='warning'>You override [src]'s radiation storing protocols. It will now generate small doses of radiation, and stored rads are now projected into creatures you scan.</span>")
|
||||
to_chat(user, span_warning("You override [src]'s radiation storing protocols. It will now generate small doses of radiation, and stored rads are now projected into creatures you scan."))
|
||||
obj_flags |= EMAGGED
|
||||
return TRUE
|
||||
|
||||
/obj/item/geiger_counter/cyborg
|
||||
var/mob/listeningTo
|
||||
|
||||
/obj/item/geiger_counter/cyborg/cyborg_unequip(mob/user)
|
||||
if(!scanning)
|
||||
return
|
||||
scanning = FALSE
|
||||
update_appearance()
|
||||
|
||||
/obj/item/geiger_counter/cyborg/equipped(mob/user)
|
||||
. = ..()
|
||||
if(listeningTo == user)
|
||||
@@ -217,6 +226,7 @@
|
||||
listeningTo = user
|
||||
|
||||
/obj/item/geiger_counter/cyborg/proc/redirect_rad_act(datum/source, amount)
|
||||
SIGNAL_HANDLER
|
||||
rad_act(amount)
|
||||
|
||||
/obj/item/geiger_counter/cyborg/dropped(mob/user)
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
QDEL_NULL(beaker)
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/portable_chem_mixer/ex_act(severity, target)
|
||||
/obj/item/storage/portable_chem_mixer/ex_act(severity, target, origin)
|
||||
if(severity < 3)
|
||||
..()
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
|
||||
/obj/item/reverse_bear_trap/Initialize()
|
||||
. = ..()
|
||||
soundloop = new(list(src))
|
||||
soundloop2 = new(list(src))
|
||||
soundloop = new(src)
|
||||
soundloop2 = new(src)
|
||||
|
||||
/obj/item/reverse_bear_trap/Destroy()
|
||||
QDEL_NULL(soundloop)
|
||||
@@ -33,16 +33,16 @@
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/reverse_bear_trap/process()
|
||||
/obj/item/reverse_bear_trap/process(delta_time)
|
||||
if(!ticking)
|
||||
return
|
||||
time_left--
|
||||
time_left -= delta_time
|
||||
soundloop2.mid_length = max(0.5, time_left - 5) //beepbeepbeepbeepbeep
|
||||
if(!time_left || !isliving(loc))
|
||||
if(time_left <= 0 || !isliving(loc))
|
||||
playsound(src, 'sound/machines/microwave/microwave-end.ogg', 100, FALSE)
|
||||
soundloop.stop()
|
||||
soundloop2.stop()
|
||||
to_chat(loc, "<span class='userdanger'>*ding*</span>")
|
||||
to_chat(loc, span_userdanger("*ding*"))
|
||||
addtimer(CALLBACK(src, .proc/snap), 2)
|
||||
|
||||
/obj/item/reverse_bear_trap/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
@@ -116,13 +116,22 @@
|
||||
|
||||
/obj/item/reverse_bear_trap/proc/reset()
|
||||
ticking = FALSE
|
||||
update_appearance(UPDATE_OVERLAYS)
|
||||
REMOVE_TRAIT(src, TRAIT_NODROP, REVERSE_BEAR_TRAP_TRAIT)
|
||||
soundloop.stop()
|
||||
soundloop2.stop()
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
|
||||
/obj/item/reverse_bear_trap/update_overlays()
|
||||
. = ..()
|
||||
if(ticking != TRUE)
|
||||
return
|
||||
/// note: this timer overlay increments one frame every second (to simulate a clock ticking). If you want to instead have it do a full cycle in a minute, set the 'delay' of each frame of the icon overlay to 75 rather than 10, and the worn overlay to twice that.
|
||||
// . += "rbt_ticking"
|
||||
|
||||
/obj/item/reverse_bear_trap/proc/arm() //hulen
|
||||
ticking = TRUE
|
||||
update_appearance(UPDATE_OVERLAYS)
|
||||
escape_chance = initial(escape_chance) //we keep these vars until re-arm, for tracking purposes
|
||||
time_left = initial(time_left)
|
||||
ADD_TRAIT(src, TRAIT_NODROP, REVERSE_BEAR_TRAP_TRAIT)
|
||||
|
||||
@@ -325,7 +325,7 @@ GENETICS SCANNER
|
||||
var/breathes = TRUE
|
||||
var/blooded = TRUE
|
||||
if(C.dna && C.dna.species)
|
||||
if(HAS_TRAIT_FROM(C, TRAIT_NOBREATH, SPECIES_TRAIT))
|
||||
if(!HAS_TRAIT_FROM(C, TRAIT_AUXILIARY_LUNGS, SPECIES_TRAIT) && HAS_TRAIT_FROM(C, TRAIT_NOBREATH, SPECIES_TRAIT))
|
||||
breathes = FALSE
|
||||
if(NOBLOOD in C.dna.species.species_traits)
|
||||
blooded = FALSE
|
||||
@@ -434,12 +434,13 @@ GENETICS SCANNER
|
||||
if(R)
|
||||
blood_type = R.name
|
||||
|
||||
|
||||
if((C.scan_blood_volume() + C.integrating_blood) <= (BLOOD_VOLUME_SAFE * C.blood_ratio) && (C.scan_blood_volume() + C.integrating_blood) > (BLOOD_VOLUME_OKAY*C.blood_ratio))
|
||||
msg += "<span class='danger'>LOW blood level [blood_percent] %, [C.scan_blood_volume()] cl[C.integrating_blood? ", with [integrated_blood_percent] % of it integrating, [C.integrating_blood] cl " : ""].</span> <span class='info'>type: [blood_type]</span>\n"
|
||||
msg += "<span class='danger'>LOW [HAS_TRAIT(C, TRAIT_ROBOTIC_ORGANISM) ? "coolant" : "blood"] level [blood_percent] %, [C.scan_blood_volume()] cl[C.integrating_blood? ", with [integrated_blood_percent] % of it integrating, [C.integrating_blood] cl " : ""].</span> <span class='info'>type: [blood_type]</span>\n"
|
||||
else if((C.scan_blood_volume() + C.integrating_blood) <= (BLOOD_VOLUME_OKAY * C.blood_ratio))
|
||||
msg += "<span class='danger'>CRITICAL blood level [blood_percent] %, [C.scan_blood_volume()] cl[C.integrating_blood? ", with [integrated_blood_percent] % of it integrating, [C.integrating_blood] cl " : ""].</span> <span class='info'>type: [blood_type]</span>\n"
|
||||
msg += "<span class='danger'>CRITICAL [HAS_TRAIT(C, TRAIT_ROBOTIC_ORGANISM) ? "coolant" : "blood"] level [blood_percent] %, [C.scan_blood_volume()] cl[C.integrating_blood? ", with [integrated_blood_percent] % of it integrating, [C.integrating_blood] cl " : ""].</span> <span class='info'>type: [blood_type]</span>\n"
|
||||
else
|
||||
msg += "<span class='info'>Blood level [blood_percent] %, [C.scan_blood_volume()] cl[C.integrating_blood? ", with [integrated_blood_percent] % of it integrating, [C.integrating_blood] cl " : ""]. type: [blood_type]</span>\n"
|
||||
msg += "<span class='info'>[HAS_TRAIT(C, TRAIT_ROBOTIC_ORGANISM) ? "Coolant" : "Blood"] level [blood_percent] %, [C.scan_blood_volume()] cl[C.integrating_blood? ", with [integrated_blood_percent] % of it integrating, [C.integrating_blood] cl " : ""]. type: [blood_type]</span>\n"
|
||||
|
||||
|
||||
var/cyberimp_detect
|
||||
@@ -467,7 +468,8 @@ GENETICS SCANNER
|
||||
if(length(reagents))
|
||||
msg += "<span class='notice'>Subject contains the following reagents:</span>\n"
|
||||
for(var/datum/reagent/R in reagents)
|
||||
msg += "<span class='notice'>[R.volume] units of [R.name][R.overdosed == 1 ? "</span> - <span class='boldannounce'>OVERDOSING</span>" : ".</span>"]\n"
|
||||
var/invalid_reagent = is_reagent_processing_invalid(R, M)
|
||||
msg += "<span class='notice'>[invalid_reagent ? "<font color='grey'>" : ""][R.volume] units of [R.name][invalid_reagent ? "</font>" : ""][R.overdosed == 1 ? "</span> - <span class='boldannounce'>OVERDOSING</span>" : ".</span>"]\n"
|
||||
else
|
||||
msg += "<span class='notice'>Subject contains no reagents.</span>\n"
|
||||
|
||||
|
||||
@@ -59,9 +59,6 @@
|
||||
I.play_tool_sound(src, 25)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need to add at least one beaker before locking the [initial(name)] assembly!</span>")
|
||||
else if(stage == READY && !nadeassembly)
|
||||
det_time = det_time == 50 ? 30 : 50 //toggle between 30 and 50
|
||||
to_chat(user, "<span class='notice'>You modify the time delay. It's set for [DisplayTimeText(det_time)].</span>")
|
||||
else if(stage == EMPTY)
|
||||
to_chat(user, "<span class='warning'>You need to add an activation mechanism!</span>")
|
||||
|
||||
|
||||
@@ -135,16 +135,16 @@
|
||||
/obj/item/grenade/tool_act(mob/living/user, obj/item/I, tool_behaviour)
|
||||
if(tool_behaviour == TOOL_SCREWDRIVER)
|
||||
switch(det_time)
|
||||
if ("1")
|
||||
det_time = 10
|
||||
if(1)
|
||||
det_time = 1 SECONDS
|
||||
to_chat(user, "<span class='notice'>You set the [name] for 1 second detonation time.</span>")
|
||||
if ("10")
|
||||
det_time = 30
|
||||
if(1 SECONDS)
|
||||
det_time = 3 SECONDS
|
||||
to_chat(user, "<span class='notice'>You set the [name] for 3 second detonation time.</span>")
|
||||
if ("30")
|
||||
det_time = 50
|
||||
if(3 SECONDS)
|
||||
det_time = 5 SECONDS
|
||||
to_chat(user, "<span class='notice'>You set the [name] for 5 second detonation time.</span>")
|
||||
if ("50")
|
||||
if(5 SECONDS)
|
||||
det_time = 1
|
||||
to_chat(user, "<span class='notice'>You set the [name] for instant detonation.</span>")
|
||||
add_fingerprint(user)
|
||||
|
||||
@@ -20,4 +20,7 @@
|
||||
imp_type = /obj/item/implant/uplink/precharged
|
||||
|
||||
/obj/item/implant/uplink/precharged
|
||||
starting_tc = 10
|
||||
starting_tc = TELECRYSTALS_PRELOADED_IMPLANT
|
||||
|
||||
/obj/item/implant/uplink/starting
|
||||
starting_tc = TELECRYSTALS_DEFAULT - UPLINK_IMPLANT_TELECRYSTAL_COST
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
user.update_inv_hands()
|
||||
loc.assume_air(air_contents)
|
||||
|
||||
/obj/item/latexballon/ex_act(severity, target)
|
||||
/obj/item/latexballon/ex_act(severity, target, origin)
|
||||
burst()
|
||||
switch(severity)
|
||||
if (1)
|
||||
|
||||
@@ -193,7 +193,7 @@
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/saber
|
||||
possible_colors = list("red" = LIGHT_COLOR_RED, "blue" = LIGHT_COLOR_LIGHT_CYAN, "green" = LIGHT_COLOR_GREEN, "purple" = LIGHT_COLOR_LAVENDER)
|
||||
unique_reskin = list("Sword" = "sword0", "saber" = "esaber0")
|
||||
unique_reskin = list("Sword" = "sword0", "Saber" = "esaber0")
|
||||
var/hacked = FALSE
|
||||
var/saber = FALSE
|
||||
|
||||
|
||||
@@ -557,7 +557,7 @@
|
||||
..()
|
||||
balanced = 0
|
||||
|
||||
/obj/item/melee/supermatter_sword/ex_act(severity, target)
|
||||
/obj/item/melee/supermatter_sword/ex_act(severity, target, origin)
|
||||
visible_message("<span class='danger'>The blast wave smacks into [src] and rapidly flashes to ash.</span>",\
|
||||
"<span class='italics'>You hear a loud crack as you are washed with a wave of heat.</span>")
|
||||
consume_everything()
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
/obj/machinery/door/keycard/emp_act(severity)
|
||||
return
|
||||
|
||||
/obj/machinery/door/keycard/ex_act(severity, target)
|
||||
/obj/machinery/door/keycard/ex_act(severity, target, origin)
|
||||
return
|
||||
|
||||
/obj/machinery/door/keycard/try_to_activate_door(mob/user)
|
||||
|
||||
@@ -247,22 +247,28 @@
|
||||
var/final_damage = damage
|
||||
|
||||
if(attack_type & ATTACK_TYPE_MELEE)
|
||||
var/obj/hittingthing = object
|
||||
if(hittingthing.damtype == BURN)
|
||||
if((shield_flags & SHIELD_ENERGY_WEAK))
|
||||
final_damage *= 2
|
||||
else if((shield_flags & SHIELD_ENERGY_STRONG))
|
||||
final_damage *= 0.5
|
||||
if(istype(object, /obj)) //Assumption: non-object attackers are a meleeing mob. Therefore: Assuming physical attack in this case.
|
||||
var/obj/hittingthing = object
|
||||
if(hittingthing.damtype == BURN)
|
||||
if((shield_flags & SHIELD_ENERGY_WEAK))
|
||||
final_damage *= 2
|
||||
else if((shield_flags & SHIELD_ENERGY_STRONG))
|
||||
final_damage *= 0.5
|
||||
|
||||
if(hittingthing.damtype == BRUTE)
|
||||
if(hittingthing.damtype == BRUTE)
|
||||
if((shield_flags & SHIELD_KINETIC_WEAK))
|
||||
final_damage *= 2
|
||||
else if((shield_flags & SHIELD_KINETIC_STRONG))
|
||||
final_damage *= 0.5
|
||||
|
||||
if(hittingthing.damtype == STAMINA || hittingthing.damtype == TOX || hittingthing.damtype == CLONE || hittingthing.damtype == BRAIN || hittingthing.damtype == OXY)
|
||||
final_damage = 0
|
||||
else
|
||||
if((shield_flags & SHIELD_KINETIC_WEAK))
|
||||
final_damage *= 2
|
||||
else if((shield_flags & SHIELD_KINETIC_STRONG))
|
||||
final_damage *= 0.5
|
||||
|
||||
if(hittingthing.damtype == STAMINA || hittingthing.damtype == TOX || hittingthing.damtype == CLONE || hittingthing.damtype == BRAIN || hittingthing.damtype == OXY)
|
||||
final_damage = 0
|
||||
|
||||
if(attack_type & ATTACK_TYPE_PROJECTILE)
|
||||
var/obj/item/projectile/shootingthing = object
|
||||
if(is_energy_reflectable_projectile(shootingthing))
|
||||
|
||||
@@ -488,6 +488,9 @@
|
||||
icon_state = "nanogel"
|
||||
var/being_applied = FALSE //No doafter stacking.
|
||||
|
||||
/obj/item/stack/medical/nanogel/one
|
||||
amount = 1
|
||||
|
||||
/obj/item/stack/medical/nanogel/try_heal(mob/living/M, mob/user, silent = FALSE)
|
||||
if(being_applied)
|
||||
to_chat(user, "<span class='warning'>You are already applying [src]!</span>")
|
||||
|
||||
@@ -24,6 +24,7 @@ GLOBAL_LIST_INIT(metal_recipes, list ( \
|
||||
new/datum/stack_recipe("stool", /obj/structure/chair/stool, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("bar stool", /obj/structure/chair/stool/bar, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("bed", /obj/structure/bed, 2, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("double bed", /obj/structure/bed/double, 4, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
//CIT CHANGE - adds sofas to metal recipe list
|
||||
new/datum/stack_recipe_list("sofas", list( \
|
||||
new /datum/stack_recipe("sofa (middle)", /obj/structure/chair/sofa, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
@@ -396,6 +397,7 @@ GLOBAL_LIST_INIT(cloth_recipes, list ( \
|
||||
new/datum/stack_recipe("rag", /obj/item/reagent_containers/rag, 1), \
|
||||
new/datum/stack_recipe("towel", /obj/item/reagent_containers/rag/towel, 3), \
|
||||
new/datum/stack_recipe("bedsheet", /obj/item/bedsheet, 3), \
|
||||
new/datum/stack_recipe("double bedsheet", /obj/item/bedsheet/double, 6), \
|
||||
new/datum/stack_recipe("empty sandbag", /obj/item/emptysandbag, 4), \
|
||||
new/datum/stack_recipe("padded floor tile", /obj/item/stack/tile/padded, 1, 4, 20), \
|
||||
null, \
|
||||
|
||||
@@ -18,10 +18,10 @@
|
||||
/obj/item/storage/AllowDrop()
|
||||
return TRUE
|
||||
|
||||
/obj/item/storage/contents_explosion(severity, target)
|
||||
/obj/item/storage/contents_explosion(severity, target, origin)
|
||||
var/in_storage = istype(loc, /obj/item/storage)? (max(0, severity - 1)) : (severity)
|
||||
for(var/atom/A in contents)
|
||||
A.ex_act(in_storage, target)
|
||||
A.ex_act(in_storage, target, origin)
|
||||
CHECK_TICK
|
||||
|
||||
//Cyberboss says: "USE THIS TO FILL IT, NOT INITIALIZE OR NEW"
|
||||
|
||||
@@ -368,12 +368,16 @@
|
||||
if(ishuman(hit_atom) && !caught && prob(throw_hit_chance) && thrownby)//if they are a carbon and they didn't catch it
|
||||
baton_stun(hit_atom, thrownby, shoving = TRUE)
|
||||
if(thrownby && !caught)
|
||||
sleep(1)
|
||||
if(!QDELETED(src))
|
||||
throw_at(thrownby, throw_range+2, throw_speed, null, TRUE)
|
||||
throw_back()
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/melee/baton/boomerang/proc/throw_back()
|
||||
set waitfor = FALSE
|
||||
sleep(1)
|
||||
if(!QDELETED(src))
|
||||
throw_at(thrownby, throw_range+2, throw_speed, null, TRUE)
|
||||
|
||||
/obj/item/melee/baton/boomerang/update_icon()
|
||||
if(turned_on)
|
||||
icon_state = "[initial(icon_state)]_active"
|
||||
|
||||
@@ -291,8 +291,8 @@
|
||||
message_admins("Explosive tank rupture! Last key to touch the tank was [src.fingerprintslast].")
|
||||
log_game("Explosive tank rupture! Last key to touch the tank was [src.fingerprintslast].")
|
||||
//Give the gas a chance to build up more pressure through reacting
|
||||
air_contents.react(src)
|
||||
air_contents.react(src)
|
||||
for(var/i in 1 to TANK_POST_FRAGMENT_REACTIONS)
|
||||
air_contents.react(src)
|
||||
|
||||
pressure = air_contents.return_pressure()
|
||||
var/range = (pressure-TANK_FRAGMENT_PRESSURE)/TANK_FRAGMENT_SCALE
|
||||
|
||||
@@ -271,18 +271,7 @@
|
||||
if(resin_cooldown)
|
||||
to_chat(user, "<span class='warning'>Resin launcher is still recharging...</span>")
|
||||
return
|
||||
resin_cooldown = TRUE
|
||||
R.remove_any(100)
|
||||
var/obj/effect/resin_container/A = new (get_turf(src))
|
||||
log_game("[key_name(user)] used Resin Launcher at [AREACOORD(user)].")
|
||||
playsound(src,'sound/items/syringeproj.ogg',40,1)
|
||||
for(var/a=0, a<5, a++)
|
||||
step_towards(A, target)
|
||||
sleep(2)
|
||||
A.Smoke()
|
||||
spawn(100)
|
||||
if(src)
|
||||
resin_cooldown = FALSE
|
||||
launch_resin(target, user)
|
||||
return
|
||||
if(nozzle_mode == RESIN_FOAM)
|
||||
if(!Adj|| !isturf(target))
|
||||
@@ -301,6 +290,21 @@
|
||||
to_chat(user, "<span class='warning'>Resin foam mix is still being synthesized...</span>")
|
||||
return
|
||||
|
||||
/obj/item/extinguisher/mini/nozzle/proc/launch_resin(atom/target, mob/user)
|
||||
set waitfor = FALSE
|
||||
resin_cooldown = TRUE
|
||||
reagents.remove_any(100)
|
||||
var/obj/effect/resin_container/A = new (get_turf(src))
|
||||
log_game("[key_name(user)] used Resin Launcher at [AREACOORD(user)].")
|
||||
playsound(src,'sound/items/syringeproj.ogg',40,1)
|
||||
for(var/a=0, a<5, a++)
|
||||
step_towards(A, target)
|
||||
sleep(2)
|
||||
A.Smoke()
|
||||
spawn(100)
|
||||
if(src)
|
||||
resin_cooldown = FALSE
|
||||
|
||||
/obj/effect/resin_container
|
||||
name = "resin container"
|
||||
desc = "A compacted ball of expansive resin, used to repair the atmosphere in a room, or seal off breaches."
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
throwdamage = 0
|
||||
take_damage(throwdamage, BRUTE, "melee", 1, get_dir(src, AM))
|
||||
|
||||
/obj/ex_act(severity, target)
|
||||
/obj/ex_act(severity, target, origin)
|
||||
if(resistance_flags & INDESTRUCTIBLE)
|
||||
return
|
||||
..() //contents explosion
|
||||
|
||||
@@ -383,3 +383,34 @@
|
||||
|
||||
/obj/proc/plunger_act(obj/item/plunger/P, mob/living/user, reinforced)
|
||||
return
|
||||
|
||||
|
||||
//For returning special data when the object is saved
|
||||
//For example, or silos will return a list of their materials which will be dumped on top of them
|
||||
//Can be customised if you have something that contains something you want saved
|
||||
//If you put an incorrect format it will break outputting, so don't use this if you don't know what you are doing
|
||||
//NOTE: Contents is automatically saved, so if you store your things in the contents var, don't worry about this
|
||||
//====Output Format Examples====:
|
||||
//===Single Object===
|
||||
// "/obj/item/folder/blue"
|
||||
//===Multiple Objects===
|
||||
// "/obj/item/folder/blue,\n
|
||||
// /obj/item/folder/red"
|
||||
//===Single Object with metadata===
|
||||
// "/obj/item/folder/blue{\n
|
||||
// \tdir = 8;\n
|
||||
// \tname = "special folder"\n
|
||||
// \t}"
|
||||
//===Multiple Objects with metadata===
|
||||
// "/obj/item/folder/blue{\n
|
||||
// \tdir = 8;\n
|
||||
// \tname = "special folder"\n
|
||||
// \t},\n
|
||||
// /obj/item/folder/red"
|
||||
//====How to save easily====:
|
||||
// return "[thing.type][generate_tgm_metadata(thing)]"
|
||||
//Where thing is the additional thing you want to same (For example ores inside an ORM)
|
||||
//Just add ,\n between each thing
|
||||
//generate_tgm_metadata(thing) handles everything inside the {} for you
|
||||
/obj/proc/on_object_saved(depth)
|
||||
return ""
|
||||
|
||||
@@ -52,6 +52,8 @@
|
||||
var/author_ckey
|
||||
var/icon_generated = FALSE
|
||||
var/icon/generated_icon
|
||||
///boolean that blocks persistence from saving it. enabled from printing copies, because we do not want to save copies.
|
||||
var/no_save = FALSE
|
||||
|
||||
// Painting overlay offset when framed
|
||||
var/framed_offset_x = 11
|
||||
@@ -370,7 +372,7 @@
|
||||
update_icon()
|
||||
|
||||
/obj/structure/sign/painting/proc/save_persistent()
|
||||
if(!persistence_id || !current_canvas)
|
||||
if(!persistence_id || !current_canvas || current_canvas.no_save)
|
||||
return
|
||||
if(sanitize_filename(persistence_id) != persistence_id)
|
||||
stack_trace("Invalid persistence_id - [persistence_id]")
|
||||
|
||||
@@ -53,6 +53,12 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/bed/post_buckle_mob(mob/living/target)
|
||||
target.pixel_y = target.get_standard_pixel_y_offset(TRUE)
|
||||
|
||||
/obj/structure/bed/double/post_unbuckle_mob(mob/living/target)
|
||||
target.pixel_y = target.get_standard_pixel_y_offset(FALSE)
|
||||
|
||||
/*
|
||||
* Roller beds
|
||||
*/
|
||||
@@ -214,3 +220,24 @@
|
||||
name = "resting contraption"
|
||||
desc = "This looks similar to contraptions from Earth. Could aliens be stealing our technology?"
|
||||
icon_state = "abed"
|
||||
|
||||
//Double Beds, for luxurious sleeping, i.e. the captain and maybe heads- Do use this for ERP
|
||||
/obj/structure/bed/double
|
||||
name = "double bed"
|
||||
desc = "A luxurious double bed, for those too important for small dreams."
|
||||
icon_state = "bed_double"
|
||||
buildstackamount = 4
|
||||
max_buckled_mobs = 2
|
||||
///The mob who buckled to this bed second, to avoid other mobs getting pixel-shifted before he unbuckles.
|
||||
var/mob/living/goldilocks
|
||||
|
||||
/obj/structure/bed/double/post_buckle_mob(mob/living/target)
|
||||
target.pixel_y = target.get_standard_pixel_y_offset(TRUE)
|
||||
if(buckled_mobs.len > 1 && !goldilocks) //Push the second buckled mob a bit higher from the normal lying position
|
||||
target.pixel_y = target.get_standard_pixel_y_offset(FALSE) + 6
|
||||
goldilocks = target
|
||||
|
||||
/obj/structure/bed/double/post_unbuckle_mob(mob/living/target)
|
||||
target.pixel_y = target.get_standard_pixel_y_offset(FALSE)
|
||||
if(target == goldilocks)
|
||||
goldilocks = null
|
||||
|
||||
@@ -4,6 +4,41 @@ BEDSHEETS
|
||||
LINEN BINS
|
||||
*/
|
||||
|
||||
#define BEDSHEET_SINGLE "single"
|
||||
#define BEDSHEET_DOUBLE "double"
|
||||
|
||||
GLOBAL_LIST_INIT(double_bedsheets, list(/obj/item/bedsheet/double,
|
||||
/obj/item/bedsheet/blue/double,
|
||||
/obj/item/bedsheet/green/double,
|
||||
/obj/item/bedsheet/grey/double,
|
||||
/obj/item/bedsheet/orange/double,
|
||||
/obj/item/bedsheet/purple/double,
|
||||
/obj/item/bedsheet/patriot/double,
|
||||
/obj/item/bedsheet/rainbow/double,
|
||||
/obj/item/bedsheet/red/double,
|
||||
/obj/item/bedsheet/yellow/double,
|
||||
/obj/item/bedsheet/mime/double,
|
||||
/obj/item/bedsheet/clown/double,
|
||||
/obj/item/bedsheet/captain/double,
|
||||
/obj/item/bedsheet/rd/double,
|
||||
/obj/item/bedsheet/medical/double,
|
||||
/obj/item/bedsheet/cmo/double,
|
||||
/obj/item/bedsheet/hos/double,
|
||||
/obj/item/bedsheet/hop/double,
|
||||
/obj/item/bedsheet/ce/double,
|
||||
/obj/item/bedsheet/qm/double,
|
||||
/obj/item/bedsheet/chaplain/double,
|
||||
/obj/item/bedsheet/brown/double,
|
||||
/obj/item/bedsheet/black/double,
|
||||
/obj/item/bedsheet/centcom/double,
|
||||
/obj/item/bedsheet/syndie/double,
|
||||
/obj/item/bedsheet/cult/double,
|
||||
/obj/item/bedsheet/wiz/double,
|
||||
/obj/item/bedsheet/nanotrasen/double,
|
||||
/obj/item/bedsheet/ian/double,
|
||||
/obj/item/bedsheet/cosmos/double
|
||||
))
|
||||
|
||||
/obj/item/bedsheet
|
||||
name = "bedsheet"
|
||||
desc = "A surprisingly soft linen bedsheet."
|
||||
@@ -21,10 +56,15 @@ LINEN BINS
|
||||
|
||||
dog_fashion = /datum/dog_fashion/head/ghost
|
||||
var/list/dream_messages = list("white")
|
||||
var/stack_amount = 3
|
||||
var/bedsheet_type = BEDSHEET_SINGLE
|
||||
|
||||
/obj/item/bedsheet/Initialize(mapload)
|
||||
. = ..()
|
||||
AddElement(/datum/element/bed_tuckable, 0, 0, 0)
|
||||
if(bedsheet_type == BEDSHEET_DOUBLE)
|
||||
stack_amount *= 2
|
||||
dying_key = DYE_REGISTRY_DOUBLE_BEDSHEET
|
||||
|
||||
/obj/item/bedsheet/attack(mob/living/M, mob/user)
|
||||
if(!attempt_initiate_surgery(src, M, user))
|
||||
@@ -46,7 +86,7 @@ LINEN BINS
|
||||
|
||||
/obj/item/bedsheet/attackby(obj/item/I, mob/user, params)
|
||||
if(!(flags_1 & HOLOGRAM_1) && (I.tool_behaviour == TOOL_WIRECUTTER || I.get_sharpness()))
|
||||
var/obj/item/stack/sheet/cloth/C = new (get_turf(src), 3)
|
||||
var/obj/item/stack/sheet/cloth/C = new (get_turf(src), stack_amount)
|
||||
transfer_fingerprints_to(C)
|
||||
C.add_fingerprint(user)
|
||||
qdel(src)
|
||||
@@ -247,9 +287,171 @@ LINEN BINS
|
||||
|
||||
/obj/item/bedsheet/random/Initialize()
|
||||
..()
|
||||
var/type = pick(typesof(/obj/item/bedsheet) - (list(/obj/item/bedsheet/random, /obj/item/bedsheet/chameleon) + typesof(/obj/item/bedsheet/unlockable)))
|
||||
new type(loc)
|
||||
return INITIALIZE_HINT_QDEL
|
||||
if(bedsheet_type == BEDSHEET_SINGLE)
|
||||
var/type = pick(typesof(/obj/item/bedsheet) - (list(/obj/item/bedsheet/random, /obj/item/bedsheet/chameleon) + typesof(/obj/item/bedsheet/unlockable) + GLOB.double_bedsheets))
|
||||
new type(loc)
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/item/bedsheet/double
|
||||
icon_state = "double_sheetwhite"
|
||||
dying_key = DYE_REGISTRY_DOUBLE_BEDSHEET
|
||||
bedsheet_type = BEDSHEET_DOUBLE
|
||||
|
||||
/obj/item/bedsheet/blue/double
|
||||
icon_state = "double_sheetblue"
|
||||
dying_key = DYE_REGISTRY_DOUBLE_BEDSHEET
|
||||
bedsheet_type = BEDSHEET_DOUBLE
|
||||
|
||||
/obj/item/bedsheet/green/double
|
||||
icon_state = "double_sheetgreen"
|
||||
dying_key = DYE_REGISTRY_DOUBLE_BEDSHEET
|
||||
bedsheet_type = BEDSHEET_DOUBLE
|
||||
|
||||
/obj/item/bedsheet/grey/double
|
||||
icon_state = "double_sheetgrey"
|
||||
dying_key = DYE_REGISTRY_DOUBLE_BEDSHEET
|
||||
bedsheet_type = BEDSHEET_DOUBLE
|
||||
|
||||
/obj/item/bedsheet/orange/double
|
||||
icon_state = "double_sheetorange"
|
||||
dying_key = DYE_REGISTRY_DOUBLE_BEDSHEET
|
||||
bedsheet_type = BEDSHEET_DOUBLE
|
||||
|
||||
/obj/item/bedsheet/purple/double
|
||||
icon_state = "double_sheetpurple"
|
||||
dying_key = DYE_REGISTRY_DOUBLE_BEDSHEET
|
||||
bedsheet_type = BEDSHEET_DOUBLE
|
||||
|
||||
/obj/item/bedsheet/patriot/double
|
||||
icon_state = "double_sheetUSA"
|
||||
dying_key = DYE_REGISTRY_DOUBLE_BEDSHEET
|
||||
bedsheet_type = BEDSHEET_DOUBLE
|
||||
|
||||
/obj/item/bedsheet/rainbow/double
|
||||
icon_state = "double_sheetrainbow"
|
||||
dying_key = DYE_REGISTRY_DOUBLE_BEDSHEET
|
||||
bedsheet_type = BEDSHEET_DOUBLE
|
||||
|
||||
/obj/item/bedsheet/red/double
|
||||
icon_state = "double_sheetred"
|
||||
dying_key = DYE_REGISTRY_DOUBLE_BEDSHEET
|
||||
bedsheet_type = BEDSHEET_DOUBLE
|
||||
|
||||
/obj/item/bedsheet/yellow/double
|
||||
icon_state = "double_sheetyellow"
|
||||
dying_key = DYE_REGISTRY_DOUBLE_BEDSHEET
|
||||
bedsheet_type = BEDSHEET_DOUBLE
|
||||
|
||||
/obj/item/bedsheet/mime/double
|
||||
icon_state = "double_sheetmime"
|
||||
dying_key = DYE_REGISTRY_DOUBLE_BEDSHEET
|
||||
bedsheet_type = BEDSHEET_DOUBLE
|
||||
|
||||
/obj/item/bedsheet/clown/double
|
||||
icon_state = "double_sheetclown"
|
||||
dying_key = DYE_REGISTRY_DOUBLE_BEDSHEET
|
||||
bedsheet_type = BEDSHEET_DOUBLE
|
||||
|
||||
/obj/item/bedsheet/captain/double
|
||||
icon_state = "double_sheetcaptain"
|
||||
dying_key = DYE_REGISTRY_DOUBLE_BEDSHEET
|
||||
bedsheet_type = BEDSHEET_DOUBLE
|
||||
|
||||
/obj/item/bedsheet/rd/double
|
||||
icon_state = "double_sheetrd"
|
||||
dying_key = DYE_REGISTRY_DOUBLE_BEDSHEET
|
||||
bedsheet_type = BEDSHEET_DOUBLE
|
||||
|
||||
/obj/item/bedsheet/medical/double
|
||||
icon_state = "double_sheetmedical"
|
||||
dying_key = DYE_REGISTRY_DOUBLE_BEDSHEET
|
||||
bedsheet_type = BEDSHEET_DOUBLE
|
||||
|
||||
/obj/item/bedsheet/cmo/double
|
||||
icon_state = "double_sheetcmo"
|
||||
dying_key = DYE_REGISTRY_DOUBLE_BEDSHEET
|
||||
bedsheet_type = BEDSHEET_DOUBLE
|
||||
|
||||
/obj/item/bedsheet/hos/double
|
||||
icon_state = "double_sheethos"
|
||||
dying_key = DYE_REGISTRY_DOUBLE_BEDSHEET
|
||||
bedsheet_type = BEDSHEET_DOUBLE
|
||||
|
||||
/obj/item/bedsheet/hop/double
|
||||
icon_state = "double_sheethop"
|
||||
dying_key = DYE_REGISTRY_DOUBLE_BEDSHEET
|
||||
bedsheet_type = BEDSHEET_DOUBLE
|
||||
|
||||
/obj/item/bedsheet/ce/double
|
||||
icon_state = "double_sheetce"
|
||||
dying_key = DYE_REGISTRY_DOUBLE_BEDSHEET
|
||||
bedsheet_type = BEDSHEET_DOUBLE
|
||||
|
||||
/obj/item/bedsheet/qm/double
|
||||
icon_state = "double_sheetqm"
|
||||
dying_key = DYE_REGISTRY_DOUBLE_BEDSHEET
|
||||
bedsheet_type = BEDSHEET_DOUBLE
|
||||
|
||||
/obj/item/bedsheet/chaplain/double
|
||||
icon_state = "double_sheetchap"
|
||||
dying_key = DYE_REGISTRY_DOUBLE_BEDSHEET
|
||||
bedsheet_type = BEDSHEET_DOUBLE
|
||||
|
||||
/obj/item/bedsheet/brown/double
|
||||
icon_state = "double_sheetbrown"
|
||||
dying_key = DYE_REGISTRY_DOUBLE_BEDSHEET
|
||||
bedsheet_type = BEDSHEET_DOUBLE
|
||||
|
||||
/obj/item/bedsheet/black/double
|
||||
icon_state = "double_sheetblack"
|
||||
dying_key = DYE_REGISTRY_DOUBLE_BEDSHEET
|
||||
bedsheet_type = BEDSHEET_DOUBLE
|
||||
|
||||
/obj/item/bedsheet/centcom/double
|
||||
icon_state = "double_sheetcentcom"
|
||||
dying_key = DYE_REGISTRY_DOUBLE_BEDSHEET
|
||||
bedsheet_type = BEDSHEET_DOUBLE
|
||||
|
||||
/obj/item/bedsheet/syndie/double
|
||||
icon_state = "double_sheetsyndie"
|
||||
dying_key = DYE_REGISTRY_DOUBLE_BEDSHEET
|
||||
bedsheet_type = BEDSHEET_DOUBLE
|
||||
|
||||
/obj/item/bedsheet/cult/double
|
||||
icon_state = "double_sheetcult"
|
||||
dying_key = DYE_REGISTRY_DOUBLE_BEDSHEET
|
||||
bedsheet_type = BEDSHEET_DOUBLE
|
||||
|
||||
/obj/item/bedsheet/wiz/double
|
||||
icon_state = "double_sheetwiz"
|
||||
dying_key = DYE_REGISTRY_DOUBLE_BEDSHEET
|
||||
bedsheet_type = BEDSHEET_DOUBLE
|
||||
|
||||
/obj/item/bedsheet/nanotrasen/double
|
||||
icon_state = "double_sheetNT"
|
||||
dying_key = DYE_REGISTRY_DOUBLE_BEDSHEET
|
||||
bedsheet_type = BEDSHEET_DOUBLE
|
||||
|
||||
/obj/item/bedsheet/ian/double
|
||||
icon_state = "double_sheetian"
|
||||
dying_key = DYE_REGISTRY_DOUBLE_BEDSHEET
|
||||
bedsheet_type = BEDSHEET_DOUBLE
|
||||
|
||||
/obj/item/bedsheet/cosmos/double
|
||||
icon_state = "double_sheetcosmos"
|
||||
dying_key = DYE_REGISTRY_DOUBLE_BEDSHEET
|
||||
bedsheet_type = BEDSHEET_DOUBLE
|
||||
|
||||
/obj/item/bedsheet/random/double
|
||||
icon_state = "random_bedsheet"
|
||||
bedsheet_type = BEDSHEET_DOUBLE
|
||||
|
||||
/obj/item/bedsheet/random/double/Initialize()
|
||||
..()
|
||||
if(bedsheet_type == BEDSHEET_DOUBLE)
|
||||
var/type = pick(GLOB.double_bedsheets)
|
||||
new type(loc)
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/item/bedsheet/chameleon //donator chameleon bedsheet
|
||||
name = "chameleon bedsheet"
|
||||
|
||||
@@ -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", /atom/movable/screen/fullscreen/impaired, 1)
|
||||
user.overlay_fullscreen("remote_view", /atom/movable/screen/fullscreen/scaled/impaired, 1)
|
||||
|
||||
/obj/structure/closet/emp_act(severity)
|
||||
. = ..()
|
||||
@@ -554,9 +554,9 @@
|
||||
if(!QDELETED(lockerelectronics))
|
||||
lockerelectronics.accesses = req_access
|
||||
|
||||
/obj/structure/closet/contents_explosion(severity, target)
|
||||
/obj/structure/closet/contents_explosion(severity, target, origin)
|
||||
for(var/atom/A in contents)
|
||||
A.ex_act(severity, target)
|
||||
A.ex_act(severity, target, origin)
|
||||
CHECK_TICK
|
||||
|
||||
/obj/structure/closet/singularity_act()
|
||||
@@ -672,3 +672,15 @@
|
||||
if(allowed(user))
|
||||
return TRUE
|
||||
to_chat(user, "<span class='notice'>Access denied.</span>")
|
||||
|
||||
/obj/structure/closet/on_object_saved(depth)
|
||||
if(depth >= 10)
|
||||
return ""
|
||||
var/dat = ""
|
||||
for(var/obj/item in contents)
|
||||
var/metadata = generate_tgm_metadata(item)
|
||||
dat += "[dat ? ",\n" : ""][item.type][metadata]"
|
||||
//Save the contents of things inside the things inside us, EG saving the contents of bags inside lockers
|
||||
var/custom_data = item.on_object_saved(depth++)
|
||||
dat += "[custom_data ? ",\n[custom_data]" : ""]"
|
||||
return dat
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
if(.) //if we actually closed the locker
|
||||
recursive_organ_check(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/freezer/ex_act()
|
||||
/obj/structure/closet/secure_closet/freezer/ex_act(severity, target, origin)
|
||||
if(!jones)
|
||||
jones = TRUE
|
||||
else
|
||||
|
||||
@@ -397,7 +397,7 @@
|
||||
data["owner_name"] = payments_acc.account_holder
|
||||
if(showpiece)
|
||||
data["product_name"] = capitalize(showpiece.name)
|
||||
var/base64 = icon2base64(icon(showpiece.icon, showpiece.icon_state))
|
||||
var/base64 = icon2base64(icon(showpiece.icon, showpiece.icon_state, SOUTH, 1))
|
||||
data["product_icon"] = base64
|
||||
data["registered"] = register
|
||||
data["product_cost"] = sale_price
|
||||
|
||||
@@ -32,9 +32,9 @@
|
||||
stored_extinguisher = null
|
||||
return ..()
|
||||
|
||||
/obj/structure/extinguisher_cabinet/contents_explosion(severity, target)
|
||||
/obj/structure/extinguisher_cabinet/contents_explosion(severity, target, origin)
|
||||
if(stored_extinguisher)
|
||||
stored_extinguisher.ex_act(severity, target)
|
||||
stored_extinguisher.ex_act(severity, target, origin)
|
||||
|
||||
/obj/structure/extinguisher_cabinet/handle_atom_del(atom/A)
|
||||
if(A == stored_extinguisher)
|
||||
|
||||
@@ -57,6 +57,7 @@
|
||||
hole_size = LARGE_HOLE
|
||||
|
||||
/obj/structure/fence/attackby(obj/item/W, mob/user)
|
||||
var/current_stage = hole_size
|
||||
if(W.tool_behaviour == TOOL_WIRECUTTER)
|
||||
if(!cuttable)
|
||||
to_chat(user, "<span class='notice'>This section of the fence can't be cut.</span>")
|
||||
@@ -64,7 +65,6 @@
|
||||
if(invulnerable)
|
||||
to_chat(user, "<span class='notice'>This fence is too strong to cut through.</span>")
|
||||
return
|
||||
var/current_stage = hole_size
|
||||
if(current_stage >= MAX_HOLE_SIZE)
|
||||
to_chat(user, "<span class='notice'>This fence has too much cut out of it already.</span>")
|
||||
return
|
||||
@@ -86,6 +86,25 @@
|
||||
|
||||
update_cut_status()
|
||||
|
||||
else if(istype(W, /obj/item/stack/rods) && broken)
|
||||
if(!hole_size)
|
||||
to_chat(user, "<span class='info'>The [src] has no cuts in it!</span>")
|
||||
return
|
||||
var/obj/item/stack/rods/R = W
|
||||
if(do_after(user, CUT_TIME, target = src))
|
||||
if(current_stage == hole_size)
|
||||
switch(--hole_size)
|
||||
if(NO_HOLE)
|
||||
visible_message("<span class='notice'>\The [user] repairs \the [src] fully.</span>")
|
||||
to_chat(user, "<span class='info'>You repaire the [src] back to it's former glory.</span>")
|
||||
climbable = TRUE
|
||||
if(MEDIUM_HOLE)
|
||||
visible_message("<span class='notice'>\The [user] patches up \the [src].</span>")
|
||||
to_chat(user, "<span class='info'>The hole in \the [src] is reduced slightly, though someone could probably sill squeeze though if you don't patch it up more.</span>")
|
||||
climbable = FALSE
|
||||
R.use(1)
|
||||
update_cut_status()
|
||||
|
||||
return TRUE
|
||||
|
||||
/obj/structure/fence/proc/update_cut_status()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#define LOG_BURN_TIMER 150
|
||||
#define LOG_BURN_TIMER 400
|
||||
#define PAPER_BURN_TIMER 5
|
||||
#define MAXIMUM_BURN_TIMER 3000
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
pixel_x = -16
|
||||
resistance_flags = FIRE_PROOF
|
||||
var/lit = FALSE
|
||||
light_color = "#E38C2D"
|
||||
|
||||
var/fuel_added = 0
|
||||
var/flame_expiry_timer
|
||||
@@ -64,6 +65,12 @@
|
||||
</span>")
|
||||
adjust_fuel_timer(PAPER_BURN_TIMER)
|
||||
qdel(T)
|
||||
else if(istype(T,/obj/item/grown/log))
|
||||
user.visible_message("<span class='notice'>[user] tosses some \
|
||||
wood into [src].</span>", "<span class='notice'>You add \
|
||||
some fuel to [src].</span>")
|
||||
adjust_fuel_timer(LOG_BURN_TIMER)
|
||||
qdel(T)
|
||||
else if(try_light(T,user))
|
||||
return
|
||||
else
|
||||
|
||||
@@ -40,6 +40,16 @@
|
||||
density = FALSE
|
||||
pixel_x = -16
|
||||
|
||||
/obj/structure/flora/stump/attackby(obj/item/W, mob/user, params)
|
||||
if((W.tool_behaviour == TOOL_SHOVEL) && params)
|
||||
playsound(src, 'sound/effects/shovel_dig.ogg', 50, 1)
|
||||
if(do_after(user, 20))
|
||||
new /obj/item/grown/log/tree(get_turf(src))
|
||||
user.visible_message("[user] digs up [src].", "<span class='notice'>You dig up [src].</span>")
|
||||
qdel(src)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/flora/tree/pine
|
||||
name = "pine tree"
|
||||
desc = "A coniferous pine tree."
|
||||
|
||||
@@ -78,6 +78,12 @@
|
||||
deconstructible = FALSE
|
||||
layer = EDGED_TURF_LAYER
|
||||
|
||||
/obj/structure/fluff/lightpost/light
|
||||
desc = "That which most enchants the Edinians is the lighting by gas of the boulevards... These humble rows of lamps, shining with a clarity white and pure, have a marvelous effect upon the streets on Nova Edina. Adorned with a cheery garb, in tune with the festive spirits of the city."
|
||||
light_power = 0.8
|
||||
light_range = 10
|
||||
light_color = "#ffeeab"
|
||||
|
||||
/obj/structure/fluff/bus
|
||||
name = "bus"
|
||||
desc = "GO TO SCHOOL. READ A BOOK."
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//Objects that spawn ghosts in as a certain role when they click on it, i.e. away mission bartenders.
|
||||
|
||||
#define spawnOverride TRUE
|
||||
//Preserved terrarium/seed vault: Spawns in seed vault structures in lavaland. Ghosts become plantpeople and are advised to begin growing plants in the room near them.
|
||||
/obj/effect/mob_spawn/human/seed_vault
|
||||
name = "preserved terrarium"
|
||||
@@ -36,6 +36,44 @@
|
||||
|
||||
//Ash walker eggs: Spawns in ash walker dens in lavaland. Ghosts become unbreathing lizards that worship the Necropolis and are advised to retrieve corpses to create more ash walkers.
|
||||
|
||||
/obj/structure/ash_walker_eggshell
|
||||
name = "ash walker egg"
|
||||
desc = "A man-sized yellow egg, spawned from some unfathomable creature. A humanoid silhouette lurks within. The egg shell looks resistant to temperature but otherwise rather brittle."
|
||||
icon = 'icons/mob/lavaland/lavaland_monsters.dmi'
|
||||
icon_state = "large_egg"
|
||||
resistance_flags = LAVA_PROOF | FIRE_PROOF | FREEZE_PROOF
|
||||
max_integrity = 80
|
||||
var/obj/effect/mob_spawn/human/ash_walker/egg
|
||||
|
||||
/obj/structure/ash_walker_eggshell/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) //lifted from xeno eggs
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
if(damage_amount)
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 100, TRUE)
|
||||
else
|
||||
playsound(src, 'sound/weapons/tap.ogg', 50, TRUE)
|
||||
if(BURN)
|
||||
if(damage_amount)
|
||||
playsound(loc, 'sound/items/welder.ogg', 100, TRUE)
|
||||
|
||||
/obj/structure/ash_walker_eggshell/attack_ghost(mob/user) //Pass on ghost clicks to the mob spawner
|
||||
if(egg)
|
||||
egg.attack_ghost(user)
|
||||
. = ..()
|
||||
|
||||
/obj/structure/ash_walker_eggshell/Destroy()
|
||||
if(!egg)
|
||||
return ..()
|
||||
var/mob/living/carbon/human/yolk = new /mob/living/carbon/human/(get_turf(src))
|
||||
yolk.fully_replace_character_name(null,random_unique_lizard_name(gender))
|
||||
yolk.set_species(/datum/species/lizard/ashwalker)
|
||||
yolk.underwear = "Nude"
|
||||
yolk.equipOutfit(/datum/outfit/ashwalker)//this is an authentic mess we're making
|
||||
yolk.update_body()
|
||||
yolk.gib()
|
||||
QDEL_NULL(egg)
|
||||
return ..()
|
||||
|
||||
/obj/effect/mob_spawn/human/ash_walker
|
||||
name = "ash walker egg"
|
||||
desc = "A man-sized yellow egg, spawned from some unfathomable creature. A humanoid silhouette lurks within."
|
||||
@@ -55,12 +93,25 @@
|
||||
You have seen lights in the distance... they foreshadow the arrival of outsiders to your domain. \
|
||||
Ensure your nest remains protected at all costs."
|
||||
assignedrole = "Ash Walker"
|
||||
var/datum/team/ashwalkers/team
|
||||
var/obj/structure/ash_walker_eggshell/eggshell
|
||||
|
||||
/obj/effect/mob_spawn/human/ash_walker/Destroy()
|
||||
eggshell = null
|
||||
return ..()
|
||||
|
||||
/obj/effect/mob_spawn/human/ash_walker/allow_spawn(mob/user, silent = FALSE)
|
||||
if(!(user.key in team.players_spawned) || spawnOverride)//one per person unless you get a bonus spawn
|
||||
return TRUE
|
||||
to_chat(user, span_warning("<b>You have exhausted your usefulness to the Necropolis</b>."))
|
||||
return FALSE
|
||||
|
||||
/obj/effect/mob_spawn/human/ash_walker/special(mob/living/new_spawn)
|
||||
new_spawn.real_name = random_unique_lizard_name(gender)
|
||||
if(is_mining_level(z))
|
||||
to_chat(new_spawn, "<b>Drag the corpses of men and beasts to your nest. It will absorb them to create more of your kind. Glory to the Necropolis!</b>")
|
||||
to_chat(new_spawn, "<b>You can expand the weather proof area provided by your shelters by using the 'New Area' key near the bottom right of your HUD.</b>")
|
||||
to_chat(new_spawn, "<b>Dragging injured ashwalkers to the tentacle or using the sleep verb next to it youself causes the body to remade whole after a short delay!</b>")
|
||||
else
|
||||
to_chat(new_spawn, "<span class='userdanger'>You have been born outside of your natural home! Whether you decide to return home, or make due with your new home is your own decision.</span>")
|
||||
|
||||
@@ -72,10 +123,18 @@
|
||||
H.undershirt = "Nude"
|
||||
H.socks = "Nude"
|
||||
H.update_body()
|
||||
new_spawn.mind.add_antag_datum(/datum/antagonist/ashwalker, team)
|
||||
team.players_spawned += (new_spawn.key)
|
||||
eggshell.egg = null
|
||||
QDEL_NULL(eggshell)
|
||||
|
||||
/obj/effect/mob_spawn/human/ash_walker/Initialize(mapload)
|
||||
/obj/effect/mob_spawn/human/ash_walker/Initialize(mapload, datum/team/ashwalkers/ashteam)
|
||||
. = ..()
|
||||
var/area/A = get_area(src)
|
||||
team = ashteam
|
||||
eggshell = new /obj/structure/ash_walker_eggshell(get_turf(loc))
|
||||
eggshell.egg = src
|
||||
src.forceMove(eggshell)
|
||||
if(A)
|
||||
notify_ghosts("An ash walker egg is ready to hatch in \the [A.name].", source = src, action=NOTIFY_ATTACK, flashwindow = FALSE, ignore_key = POLL_IGNORE_ASHWALKER, ignore_dnr_observers = TRUE)
|
||||
|
||||
|
||||
@@ -91,9 +91,9 @@
|
||||
/obj/structure/guncase/handle_atom_del(atom/A)
|
||||
update_icon()
|
||||
|
||||
/obj/structure/guncase/contents_explosion(severity, target)
|
||||
/obj/structure/guncase/contents_explosion(severity, target, origin)
|
||||
for(var/atom/A in contents)
|
||||
A.ex_act(severity++, target)
|
||||
A.ex_act(severity++, target, origin)
|
||||
CHECK_TICK
|
||||
|
||||
/obj/structure/guncase/shotgun
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
icon_state = "randompile"
|
||||
density = FALSE
|
||||
anchored = TRUE
|
||||
max_integrity = 100
|
||||
var/loot_amount = 5
|
||||
var/delete_on_depletion = FALSE
|
||||
var/can_use_hands = TRUE
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
/obj/machinery/manned_turret/Destroy()
|
||||
target = null
|
||||
target_turf = null
|
||||
..()
|
||||
return ..()
|
||||
|
||||
//BUCKLE HOOKS
|
||||
|
||||
|
||||
@@ -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", /atom/movable/screen/fullscreen/impaired, 2)
|
||||
user.overlay_fullscreen("remote_view", /atom/movable/screen/fullscreen/scaled/impaired, 2)
|
||||
/*
|
||||
* Morgue
|
||||
*/
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#define MAX_NOTICES 5
|
||||
|
||||
/obj/structure/noticeboard
|
||||
name = "notice board"
|
||||
desc = "A board for pinning important notices upon."
|
||||
@@ -7,8 +9,25 @@
|
||||
density = FALSE
|
||||
anchored = TRUE
|
||||
max_integrity = 150
|
||||
/// Current number of a pinned notices
|
||||
var/notices = 0
|
||||
|
||||
/obj/structure/noticeboard/directional/north
|
||||
dir = SOUTH
|
||||
pixel_y = 32
|
||||
|
||||
/obj/structure/noticeboard/directional/south
|
||||
dir = NORTH
|
||||
pixel_y = -32
|
||||
|
||||
/obj/structure/noticeboard/directional/east
|
||||
dir = WEST
|
||||
pixel_x = 32
|
||||
|
||||
/obj/structure/noticeboard/directional/west
|
||||
dir = EAST
|
||||
pixel_x = -32
|
||||
|
||||
/obj/structure/noticeboard/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
@@ -16,7 +35,7 @@
|
||||
return
|
||||
|
||||
for(var/obj/item/I in loc)
|
||||
if(notices > 4)
|
||||
if(notices >= MAX_NOTICES)
|
||||
break
|
||||
if(istype(I, /obj/item/paper))
|
||||
I.forceMove(src)
|
||||
@@ -27,67 +46,84 @@
|
||||
/obj/structure/noticeboard/attackby(obj/item/O, mob/user, params)
|
||||
if(istype(O, /obj/item/paper) || istype(O, /obj/item/photo))
|
||||
if(!allowed(user))
|
||||
to_chat(user, "<span class='info'>You are not authorized to add notices</span>")
|
||||
to_chat(user, span_warning("You are not authorized to add notices!"))
|
||||
return
|
||||
if(notices < 5)
|
||||
if(notices < MAX_NOTICES)
|
||||
if(!user.transferItemToLoc(O, src))
|
||||
return
|
||||
notices++
|
||||
icon_state = "nboard0[notices]"
|
||||
to_chat(user, "<span class='notice'>You pin the [O] to the noticeboard.</span>")
|
||||
to_chat(user, span_notice("You pin the [O] to the noticeboard."))
|
||||
else
|
||||
to_chat(user, "<span class='notice'>The notice board is full</span>")
|
||||
to_chat(user, span_warning("The notice board is full!"))
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/noticeboard/interact(mob/user)
|
||||
ui_interact(user)
|
||||
/obj/structure/noticeboard/ui_state(mob/user)
|
||||
return GLOB.physical_state
|
||||
|
||||
/obj/structure/noticeboard/ui_interact(mob/user)
|
||||
/obj/structure/noticeboard/ui_interact(mob/user, datum/tgui/ui)
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
ui = new(user, src, "NoticeBoard", name)
|
||||
ui.open()
|
||||
|
||||
/obj/structure/noticeboard/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
data["allowed"] = allowed(user)
|
||||
data["items"] = list()
|
||||
for(var/obj/item/content in contents)
|
||||
var/list/content_data = list(
|
||||
name = content.name,
|
||||
ref = REF(content)
|
||||
)
|
||||
data["items"] += list(content_data)
|
||||
return data
|
||||
|
||||
/obj/structure/noticeboard/ui_act(action, params)
|
||||
. = ..()
|
||||
var/auth = allowed(user)
|
||||
var/dat = "<B>[name]</B><BR>"
|
||||
for(var/obj/item/P in src)
|
||||
if(istype(P, /obj/item/paper))
|
||||
dat += "<A href='?src=[REF(src)];read=[REF(P)]'>[P.name]</A> [auth ? "<A href='?src=[REF(src)];write=[REF(P)]'>Write</A> <A href='?src=[REF(src)];remove=[REF(P)]'>Remove</A>" : ""]<BR>"
|
||||
else
|
||||
dat += "<A href='?src=[REF(src)];read=[REF(P)]'>[P.name]</A> [auth ? "<A href='?src=[REF(src)];remove=[REF(P)]'>Remove</A>" : ""]<BR>"
|
||||
user << browse("<HEAD><TITLE>Notices</TITLE></HEAD>[dat]","window=noticeboard")
|
||||
onclose(user, "noticeboard")
|
||||
if(.)
|
||||
return
|
||||
|
||||
/obj/structure/noticeboard/Topic(href, href_list)
|
||||
..()
|
||||
usr.set_machine(src)
|
||||
if(href_list["remove"])
|
||||
if((usr.stat || usr.restrained())) //For when a player is handcuffed while they have the notice window open
|
||||
return
|
||||
var/obj/item/I = locate(href_list["remove"]) in contents
|
||||
if(istype(I) && I.loc == src)
|
||||
I.forceMove(usr.loc)
|
||||
usr.put_in_hands(I)
|
||||
notices--
|
||||
icon_state = "nboard0[notices]"
|
||||
var/obj/item/item = locate(params["ref"]) in contents
|
||||
if(!istype(item) || item.loc != src)
|
||||
return
|
||||
|
||||
if(href_list["write"])
|
||||
if((usr.stat || usr.restrained())) //For when a player is handcuffed while they have the notice window open
|
||||
return
|
||||
var/obj/item/P = locate(href_list["write"]) in contents
|
||||
if(istype(P) && P.loc == src)
|
||||
var/obj/item/I = usr.is_holding_item_of_type(/obj/item/pen)
|
||||
if(I)
|
||||
add_fingerprint(usr)
|
||||
P.attackby(I, usr)
|
||||
var/mob/user = usr
|
||||
|
||||
switch(action)
|
||||
if("examine")
|
||||
if(istype(item, /obj/item/paper))
|
||||
item.ui_interact(user)
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>You'll need something to write with!</span>")
|
||||
user.examinate(item)
|
||||
return TRUE
|
||||
if("remove")
|
||||
if(!allowed(user))
|
||||
return
|
||||
remove_item(item, user)
|
||||
return TRUE
|
||||
|
||||
if(href_list["read"])
|
||||
var/obj/item/I = locate(href_list["read"]) in contents
|
||||
if(istype(I) && I.loc == src)
|
||||
usr.examinate(I)
|
||||
/**
|
||||
* Removes an item from the notice board
|
||||
*
|
||||
* Arguments:
|
||||
* * item - The item that is to be removed
|
||||
* * user - The mob that is trying to get the item removed, if there is one
|
||||
*/
|
||||
/obj/structure/noticeboard/proc/remove_item(obj/item/item, mob/user)
|
||||
item.forceMove(drop_location())
|
||||
if(user)
|
||||
user.put_in_hands(item)
|
||||
balloon_alert(user, "removed from board")
|
||||
notices--
|
||||
icon_state = "nboard0[notices]"
|
||||
|
||||
/obj/structure/noticeboard/deconstruct(disassembled = TRUE)
|
||||
if(!(flags_1 & NODECONSTRUCT_1))
|
||||
new /obj/item/stack/sheet/metal (loc, 1)
|
||||
for(var/obj/item/content in contents)
|
||||
remove_item(content)
|
||||
qdel(src)
|
||||
|
||||
// Notice boards for the heads of staff (plus the qm)
|
||||
@@ -131,3 +167,5 @@
|
||||
name = "Staff Notice Board"
|
||||
desc = "Important notices from the heads of staff."
|
||||
req_access = list(ACCESS_HEADS)
|
||||
|
||||
#undef MAX_NOTICES
|
||||
|
||||
@@ -249,7 +249,7 @@
|
||||
P.setAngle(rotation_angle)
|
||||
return ..()
|
||||
|
||||
/obj/structure/reflector/ex_act()
|
||||
/obj/structure/reflector/ex_act(severity, target, origin)
|
||||
if(admin)
|
||||
return
|
||||
else
|
||||
|
||||
@@ -84,7 +84,7 @@ FLOOR SAFES
|
||||
/obj/structure/safe/blob_act(obj/structure/blob/B)
|
||||
return
|
||||
|
||||
/obj/structure/safe/ex_act(severity, target)
|
||||
/obj/structure/safe/ex_act(severity, target, origin)
|
||||
if(((severity == 2 && target == src) || severity == 1) && explosion_count < BROKEN_THRESHOLD)
|
||||
explosion_count++
|
||||
switch(explosion_count)
|
||||
|
||||
@@ -50,14 +50,14 @@
|
||||
empty_pod(location)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/transit_tube_pod/ex_act(severity, target)
|
||||
/obj/structure/transit_tube_pod/ex_act(severity, target, origin)
|
||||
..()
|
||||
if(!QDELETED(src))
|
||||
empty_pod()
|
||||
|
||||
/obj/structure/transit_tube_pod/contents_explosion(severity, target)
|
||||
/obj/structure/transit_tube_pod/contents_explosion(severity, target, origin)
|
||||
for(var/atom/movable/AM in contents)
|
||||
AM.ex_act(severity, target)
|
||||
AM.ex_act(severity, target, origin)
|
||||
|
||||
/obj/structure/transit_tube_pod/singularity_pull(S, current_size)
|
||||
..()
|
||||
|
||||
@@ -257,7 +257,7 @@
|
||||
|
||||
/obj/machinery/shower/Initialize()
|
||||
. = ..()
|
||||
soundloop = new(list(src), FALSE)
|
||||
soundloop = new(src, FALSE)
|
||||
|
||||
/obj/machinery/shower/Destroy()
|
||||
QDEL_NULL(soundloop)
|
||||
@@ -669,7 +669,7 @@
|
||||
icon_state = "well_3"
|
||||
return TRUE
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need at least tweenty-five pieces of sandstone!</span>")
|
||||
to_chat(user, "<span class='warning'>You need at least twenty-five pieces of sandstone!</span>")
|
||||
return
|
||||
if(steps == 3 && S.tool_behaviour == TOOL_SHOVEL)
|
||||
S.use_tool(src, user, 80, volume=100)
|
||||
|
||||
@@ -70,6 +70,7 @@
|
||||
icon_state = "wood"
|
||||
baseturfs = /turf/closed/indestructible/wood
|
||||
smooth = SMOOTH_TRUE
|
||||
canSmoothWith = list(/obj/structure/falsewall/wood, /turf/closed/wall/mineral/wood, /turf/closed/indestructible/wood)
|
||||
|
||||
/turf/closed/indestructible/oldshuttle/corner
|
||||
icon_state = "corner"
|
||||
|
||||
@@ -34,11 +34,11 @@
|
||||
/turf/open/floor/plating/catwalk_floor/screwdriver_act(mob/living/user, obj/item/tool)
|
||||
. = ..()
|
||||
covered = !covered
|
||||
to_chat(user, span_notice("[!covered ? "You removed the cover!" : "You added the cover!"]"))
|
||||
user.balloon_alert(user, "[!covered ? "cover removed" : "cover added"]")
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/turf/open/floor/plating/catwalk_floor/pry_tile(obj/item/crowbar, mob/user, silent)
|
||||
if(covered)
|
||||
to_chat(user, span_notice("You need to remove the cover first!"))
|
||||
user.balloon_alert(user, "remove cover first!")
|
||||
return FALSE
|
||||
. = ..()
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
if(mapload && prob(66)) // 2/3 instead of 1/3 (default)
|
||||
MakeDirty()
|
||||
|
||||
/turf/open/floor/ex_act(severity, target)
|
||||
/turf/open/floor/ex_act(severity, target, origin)
|
||||
var/shielded = is_shielded()
|
||||
..()
|
||||
if(severity != 1 && shielded && target != src)
|
||||
|
||||
@@ -195,7 +195,7 @@
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/turf/open/floor/plating/foam/ex_act()
|
||||
/turf/open/floor/plating/foam/ex_act(severity, target, origin)
|
||||
..()
|
||||
ScrapeAway(flags = CHANGETURF_INHERIT_AIR)
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
for(var/obj/item/stack/ore/O in src)
|
||||
SEND_SIGNAL(W, COMSIG_PARENT_ATTACKBY, O)
|
||||
|
||||
/turf/open/floor/plating/asteroid/ex_act(severity, target)
|
||||
/turf/open/floor/plating/asteroid/ex_act(severity, target, origin)
|
||||
. = SEND_SIGNAL(src, COMSIG_ATOM_EX_ACT, severity, target)
|
||||
contents_explosion(severity, target)
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user