Merge remote-tracking branch 'citadel/master' into eldritch_affairs
This commit is contained in:
@@ -48,6 +48,8 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
|
||||
icon_state = "space_near"
|
||||
dynamic_lighting = DYNAMIC_LIGHTING_IFSTARLIGHT
|
||||
|
||||
/area/space/station_ruins //Paint this area where you want station ruins to be allowed to spawn
|
||||
|
||||
/area/start
|
||||
name = "start area"
|
||||
icon_state = "start"
|
||||
@@ -849,6 +851,10 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
|
||||
name = "Medbay Treatment Center"
|
||||
icon_state = "exam_room"
|
||||
|
||||
/area/medical/paramedic
|
||||
name = "Paramedic Station"
|
||||
icon_state = "paramedic"
|
||||
|
||||
|
||||
//Security
|
||||
|
||||
@@ -1245,6 +1251,22 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
|
||||
icon_state = "storage_wing"
|
||||
|
||||
|
||||
// Vacant Rooms
|
||||
|
||||
/area/vacant_room
|
||||
name = "Vacant Room"
|
||||
ambientsounds = MAINTENANCE
|
||||
icon_state = "vacant_room"
|
||||
|
||||
/area/vacant_room/office
|
||||
name = "Vacant Office"
|
||||
icon_state = "vacant_room"
|
||||
|
||||
/area/vacant_room/commissary
|
||||
name = "Vacant Commissary"
|
||||
icon_state = "vacant_room"
|
||||
|
||||
|
||||
//AI
|
||||
|
||||
/area/ai_monitored/security/armory
|
||||
@@ -1367,3 +1389,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
|
||||
/area/tcommsat/lounge
|
||||
name = "Telecommunications Satellite Lounge"
|
||||
icon_state = "tcomsatlounge"
|
||||
|
||||
/area/crew_quarters/fitness/pool
|
||||
name = "Pool Area"
|
||||
icon_state = "pool"
|
||||
|
||||
@@ -514,39 +514,6 @@ GLOBAL_LIST_EMPTY(teleportlocs)
|
||||
/client/proc/ResetAmbiencePlayed()
|
||||
played = FALSE
|
||||
|
||||
/atom/proc/has_gravity(turf/T)
|
||||
if(!T || !isturf(T))
|
||||
T = get_turf(src)
|
||||
|
||||
if(!T)
|
||||
return 0
|
||||
|
||||
var/list/forced_gravity = list()
|
||||
SEND_SIGNAL(src, COMSIG_ATOM_HAS_GRAVITY, T, forced_gravity)
|
||||
if(!forced_gravity.len)
|
||||
SEND_SIGNAL(T, COMSIG_TURF_HAS_GRAVITY, src, forced_gravity)
|
||||
if(forced_gravity.len)
|
||||
var/max_grav
|
||||
for(var/i in forced_gravity)
|
||||
max_grav = max(max_grav, i)
|
||||
if(max_grav)
|
||||
return max_grav
|
||||
|
||||
if(isspaceturf(T)) // Turf never has gravity
|
||||
return 0
|
||||
|
||||
var/area/A = get_area(T)
|
||||
if(A.has_gravity) // Areas which always has gravity
|
||||
return A.has_gravity
|
||||
else
|
||||
// There's a gravity generator on our z level
|
||||
if(GLOB.gravity_generators["[T.z]"])
|
||||
var/max_grav = 0
|
||||
for(var/obj/machinery/gravity_generator/main/G in GLOB.gravity_generators["[T.z]"])
|
||||
max_grav = max(G.setting,max_grav)
|
||||
return max_grav
|
||||
return SSmapping.level_trait(T.z, ZTRAIT_GRAVITY)
|
||||
|
||||
/area/proc/setup(a_name)
|
||||
name = a_name
|
||||
power_equip = FALSE
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
/area/ruin/space
|
||||
has_gravity = FALSE
|
||||
blob_allowed = FALSE //Nope, no winning in space as a blob. Gotta eat the station.
|
||||
outdoors = TRUE
|
||||
ambientsounds = SPACE
|
||||
|
||||
/area/ruin/space/has_grav
|
||||
has_gravity = STANDARD_GRAVITY
|
||||
|
||||
+97
-5
@@ -28,7 +28,6 @@
|
||||
var/list/managed_overlays
|
||||
|
||||
var/datum/proximity_monitor/proximity_monitor
|
||||
var/buckle_message_cooldown = 0
|
||||
var/fingerprintslast
|
||||
|
||||
var/list/filter_data //For handling persistent filters
|
||||
@@ -38,6 +37,13 @@
|
||||
var/rad_flags = NONE // Will move to flags_1 when i can be arsed to
|
||||
var/rad_insulation = RAD_NO_INSULATION
|
||||
|
||||
///The custom materials this atom is made of, used by a lot of things like furniture, walls, and floors (if I finish the functionality, that is.)
|
||||
var/list/custom_materials
|
||||
///Bitfield for how the atom handles materials.
|
||||
var/material_flags = NONE
|
||||
///Modifier that raises/lowers the effect of the amount of a material, prevents small and easy to get items from being death machines.
|
||||
var/material_modifier = 1
|
||||
|
||||
var/icon/blood_splatter_icon
|
||||
var/list/fingerprints
|
||||
var/list/fingerprintshidden
|
||||
@@ -89,6 +95,12 @@
|
||||
if (canSmoothWith)
|
||||
canSmoothWith = typelist("canSmoothWith", canSmoothWith)
|
||||
|
||||
var/temp_list = list()
|
||||
for(var/i in custom_materials)
|
||||
temp_list[SSmaterials.GetMaterialRef(i)] = custom_materials[i] //Get the proper instanced version
|
||||
custom_materials = null //Null the list to prepare for applying the materials properly
|
||||
set_custom_materials(temp_list)
|
||||
|
||||
ComponentInitialize()
|
||||
|
||||
return INITIALIZE_HINT_NORMAL
|
||||
@@ -290,6 +302,11 @@
|
||||
if(desc)
|
||||
. += desc
|
||||
|
||||
if(custom_materials)
|
||||
for(var/i in custom_materials)
|
||||
var/datum/material/M = i
|
||||
. += "<u>It is made out of [M.name]</u>."
|
||||
|
||||
if(reagents)
|
||||
if(reagents.reagents_holder_flags & TRANSPARENT)
|
||||
. += "It contains:"
|
||||
@@ -316,9 +333,11 @@
|
||||
/atom/proc/update_icon()
|
||||
// I expect we're going to need more return flags and options in this proc
|
||||
var/signalOut = SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_ICON)
|
||||
. = FALSE
|
||||
|
||||
if(!(signalOut & COMSIG_ATOM_NO_UPDATE_ICON_STATE))
|
||||
update_icon_state()
|
||||
. = TRUE
|
||||
|
||||
if(!(signalOut & COMSIG_ATOM_NO_UPDATE_OVERLAYS))
|
||||
var/list/new_overlays = update_overlays()
|
||||
@@ -328,6 +347,9 @@
|
||||
if(length(new_overlays))
|
||||
managed_overlays = new_overlays
|
||||
add_overlay(new_overlays)
|
||||
. = TRUE
|
||||
|
||||
SEND_SIGNAL(src, COMSIG_ATOM_UPDATED_ICON, signalOut, .)
|
||||
|
||||
/// Updates the icon state of the atom
|
||||
/atom/proc/update_icon_state()
|
||||
@@ -338,11 +360,12 @@
|
||||
. = list()
|
||||
SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_OVERLAYS, .)
|
||||
|
||||
/atom/proc/relaymove(mob/user)
|
||||
if(buckle_message_cooldown <= world.time)
|
||||
buckle_message_cooldown = world.time + 50
|
||||
/atom/proc/relaymove(mob/living/user)
|
||||
if(!istype(user))
|
||||
return //why are you buckling nonliving mobs to atoms?
|
||||
if(user.buckle_message_cooldown <= world.time)
|
||||
user.buckle_message_cooldown = world.time + 50
|
||||
to_chat(user, "<span class='warning'>You can't move while buckled to [src]!</span>")
|
||||
return
|
||||
|
||||
/atom/proc/contents_explosion(severity, target)
|
||||
return //For handling the effects of explosions on contents that would not normally be effected
|
||||
@@ -872,3 +895,72 @@ Proc for attack log creation, because really why not
|
||||
|
||||
/atom/proc/intercept_zImpact(atom/movable/AM, levels = 1)
|
||||
. |= SEND_SIGNAL(src, COMSIG_ATOM_INTERCEPT_Z_FALL, AM, levels)
|
||||
|
||||
///Sets the custom materials for an item.
|
||||
/atom/proc/set_custom_materials(var/list/materials, multiplier = 1)
|
||||
|
||||
if(!materials)
|
||||
materials = custom_materials
|
||||
|
||||
if(custom_materials) //Only runs if custom materials existed at first. Should usually be the case but check anyways
|
||||
for(var/i in custom_materials)
|
||||
var/datum/material/custom_material = SSmaterials.GetMaterialRef(i)
|
||||
custom_material.on_removed(src, material_flags) //Remove the current materials
|
||||
|
||||
if(!length(materials))
|
||||
return
|
||||
|
||||
custom_materials = list() //Reset the list
|
||||
|
||||
for(var/x in materials)
|
||||
var/datum/material/custom_material = SSmaterials.GetMaterialRef(x)
|
||||
|
||||
if(!(material_flags & MATERIAL_NO_EFFECTS))
|
||||
custom_material.on_applied(src, materials[custom_material] * multiplier * material_modifier, material_flags)
|
||||
custom_materials[custom_material] += materials[x] * multiplier
|
||||
|
||||
/**
|
||||
* Returns true if this atom has gravity for the passed in turf
|
||||
*
|
||||
* Sends signals COMSIG_ATOM_HAS_GRAVITY and COMSIG_TURF_HAS_GRAVITY, both can force gravity with
|
||||
* the forced gravity var
|
||||
*
|
||||
* Gravity situations:
|
||||
* * No gravity if you're not in a turf
|
||||
* * No gravity if this atom is in is a space turf
|
||||
* * Gravity if the area it's in always has gravity
|
||||
* * Gravity if there's a gravity generator on the z level
|
||||
* * Gravity if the Z level has an SSMappingTrait for ZTRAIT_GRAVITY
|
||||
* * otherwise no gravity
|
||||
*/
|
||||
/atom/proc/has_gravity(turf/T)
|
||||
if(!T || !isturf(T))
|
||||
T = get_turf(src)
|
||||
|
||||
if(!T)
|
||||
return 0
|
||||
|
||||
var/list/forced_gravity = list()
|
||||
SEND_SIGNAL(src, COMSIG_ATOM_HAS_GRAVITY, T, forced_gravity)
|
||||
if(!forced_gravity.len)
|
||||
SEND_SIGNAL(T, COMSIG_TURF_HAS_GRAVITY, src, forced_gravity)
|
||||
if(forced_gravity.len)
|
||||
var/max_grav
|
||||
for(var/i in forced_gravity)
|
||||
max_grav = max(max_grav, i)
|
||||
return max_grav
|
||||
|
||||
if(isspaceturf(T)) // Turf never has gravity
|
||||
return 0
|
||||
|
||||
var/area/A = get_area(T)
|
||||
if(A.has_gravity) // Areas which always has gravity
|
||||
return A.has_gravity
|
||||
else
|
||||
// There's a gravity generator on our z level
|
||||
if(GLOB.gravity_generators["[T.z]"])
|
||||
var/max_grav = 0
|
||||
for(var/obj/machinery/gravity_generator/main/G in GLOB.gravity_generators["[T.z]"])
|
||||
max_grav = max(G.setting,max_grav)
|
||||
return max_grav
|
||||
return SSmapping.level_trait(T.z, ZTRAIT_GRAVITY)
|
||||
|
||||
+10
-307
@@ -131,7 +131,7 @@
|
||||
return FALSE
|
||||
// Are we trying to pull something we are already pulling? Then enter grab cycle and end.
|
||||
if(AM == pulling)
|
||||
grab_state = state
|
||||
setGrabState(state)
|
||||
if(istype(AM,/mob/living))
|
||||
var/mob/living/AMob = AM
|
||||
AMob.grabbedby(src)
|
||||
@@ -142,7 +142,7 @@
|
||||
AM.pulledby.stop_pulling() //an object can't be pulled by two mobs at once.
|
||||
pulling = AM
|
||||
AM.pulledby = src
|
||||
grab_state = state
|
||||
setGrabState(state)
|
||||
if(ismob(AM))
|
||||
var/mob/M = AM
|
||||
log_combat(src, M, "grabbed", addition="passive grab")
|
||||
@@ -155,10 +155,10 @@
|
||||
pulling.pulledby = null
|
||||
var/mob/living/ex_pulled = pulling
|
||||
pulling = null
|
||||
grab_state = 0
|
||||
setGrabState(0)
|
||||
if(isliving(ex_pulled))
|
||||
var/mob/living/L = ex_pulled
|
||||
L.update_canmove()// mob gets up if it was lyng down in a chokehold
|
||||
L.update_mobility()// mob gets up if it was lyng down in a chokehold
|
||||
|
||||
/atom/movable/proc/Move_Pulled(atom/A)
|
||||
if(!pulling)
|
||||
@@ -194,160 +194,6 @@
|
||||
stop_pulling()
|
||||
return
|
||||
|
||||
////////////////////////////////////////
|
||||
// Here's where we rewrite how byond handles movement except slightly different
|
||||
// To be removed on step_ conversion
|
||||
// All this work to prevent a second bump
|
||||
/atom/movable/Move(atom/newloc, direct=0)
|
||||
. = FALSE
|
||||
if(!newloc || newloc == loc)
|
||||
return
|
||||
|
||||
if(!direct)
|
||||
direct = get_dir(src, newloc)
|
||||
setDir(direct)
|
||||
|
||||
if(!loc.Exit(src, newloc))
|
||||
return
|
||||
|
||||
if(!newloc.Enter(src, src.loc))
|
||||
return
|
||||
|
||||
// Past this is the point of no return
|
||||
var/atom/oldloc = loc
|
||||
var/area/oldarea = get_area(oldloc)
|
||||
var/area/newarea = get_area(newloc)
|
||||
loc = newloc
|
||||
. = TRUE
|
||||
oldloc.Exited(src, newloc)
|
||||
if(oldarea != newarea)
|
||||
oldarea.Exited(src, newloc)
|
||||
|
||||
for(var/i in oldloc)
|
||||
if(i == src) // Multi tile objects
|
||||
continue
|
||||
var/atom/movable/thing = i
|
||||
thing.Uncrossed(src)
|
||||
|
||||
newloc.Entered(src, oldloc)
|
||||
if(oldarea != newarea)
|
||||
newarea.Entered(src, oldloc)
|
||||
|
||||
for(var/i in loc)
|
||||
if(i == src) // Multi tile objects
|
||||
continue
|
||||
var/atom/movable/thing = i
|
||||
thing.Crossed(src)
|
||||
//
|
||||
////////////////////////////////////////
|
||||
|
||||
/atom/movable/Move(atom/newloc, direct)
|
||||
var/atom/movable/pullee = pulling
|
||||
var/turf/T = loc
|
||||
if(pulling)
|
||||
if(pullee && get_dist(src, pullee) > 1)
|
||||
stop_pulling()
|
||||
|
||||
if(pullee && pullee.loc != loc && !isturf(pullee.loc) ) //to be removed once all code that changes an object's loc uses forceMove().
|
||||
log_game("DEBUG:[src]'s pull on [pullee] wasn't broken despite [pullee] being in [pullee.loc]. Pull stopped manually.")
|
||||
stop_pulling()
|
||||
if(!loc || !newloc)
|
||||
return FALSE
|
||||
var/atom/oldloc = loc
|
||||
|
||||
if(loc != newloc)
|
||||
if (!(direct & (direct - 1))) //Cardinal move
|
||||
. = ..()
|
||||
else //Diagonal move, split it into cardinal moves
|
||||
moving_diagonally = FIRST_DIAG_STEP
|
||||
var/first_step_dir
|
||||
// The `&& moving_diagonally` checks are so that a forceMove taking
|
||||
// place due to a Crossed, Bumped, etc. call will interrupt
|
||||
// the second half of the diagonal movement, or the second attempt
|
||||
// at a first half if step() fails because we hit something.
|
||||
if (direct & NORTH)
|
||||
if (direct & EAST)
|
||||
if (step(src, NORTH) && moving_diagonally)
|
||||
first_step_dir = NORTH
|
||||
moving_diagonally = SECOND_DIAG_STEP
|
||||
. = step(src, EAST)
|
||||
else if (moving_diagonally && step(src, EAST))
|
||||
first_step_dir = EAST
|
||||
moving_diagonally = SECOND_DIAG_STEP
|
||||
. = step(src, NORTH)
|
||||
else if (direct & WEST)
|
||||
if (step(src, NORTH) && moving_diagonally)
|
||||
first_step_dir = NORTH
|
||||
moving_diagonally = SECOND_DIAG_STEP
|
||||
. = step(src, WEST)
|
||||
else if (moving_diagonally && step(src, WEST))
|
||||
first_step_dir = WEST
|
||||
moving_diagonally = SECOND_DIAG_STEP
|
||||
. = step(src, NORTH)
|
||||
else if (direct & SOUTH)
|
||||
if (direct & EAST)
|
||||
if (step(src, SOUTH) && moving_diagonally)
|
||||
first_step_dir = SOUTH
|
||||
moving_diagonally = SECOND_DIAG_STEP
|
||||
. = step(src, EAST)
|
||||
else if (moving_diagonally && step(src, EAST))
|
||||
first_step_dir = EAST
|
||||
moving_diagonally = SECOND_DIAG_STEP
|
||||
. = step(src, SOUTH)
|
||||
else if (direct & WEST)
|
||||
if (step(src, SOUTH) && moving_diagonally)
|
||||
first_step_dir = SOUTH
|
||||
moving_diagonally = SECOND_DIAG_STEP
|
||||
. = step(src, WEST)
|
||||
else if (moving_diagonally && step(src, WEST))
|
||||
first_step_dir = WEST
|
||||
moving_diagonally = SECOND_DIAG_STEP
|
||||
. = step(src, SOUTH)
|
||||
if(moving_diagonally == SECOND_DIAG_STEP)
|
||||
if(!.)
|
||||
setDir(first_step_dir)
|
||||
else if (!inertia_moving)
|
||||
inertia_next_move = world.time + inertia_move_delay
|
||||
newtonian_move(direct)
|
||||
moving_diagonally = 0
|
||||
return
|
||||
|
||||
if(!loc || (loc == oldloc && oldloc != newloc))
|
||||
last_move = 0
|
||||
return
|
||||
|
||||
if(.)
|
||||
Moved(oldloc, direct)
|
||||
if(. && pulling && pulling == pullee) //we were pulling a thing and didn't lose it during our move.
|
||||
if(pulling.anchored)
|
||||
stop_pulling()
|
||||
else
|
||||
var/pull_dir = get_dir(src, pulling)
|
||||
//puller and pullee more than one tile away or in diagonal position
|
||||
if(get_dist(src, pulling) > 1 || (moving_diagonally != SECOND_DIAG_STEP && ((pull_dir - 1) & pull_dir)))
|
||||
pulling.Move(T, get_dir(pulling, T)) //the pullee tries to reach our previous position
|
||||
if(pulling && get_dist(src, pulling) > 1) //the pullee couldn't keep up
|
||||
stop_pulling()
|
||||
if(pulledby && moving_diagonally != FIRST_DIAG_STEP && get_dist(src, pulledby) > 1)//separated from our puller and not in the middle of a diagonal move.
|
||||
pulledby.stop_pulling()
|
||||
|
||||
|
||||
last_move = direct
|
||||
setDir(direct)
|
||||
if(. && has_buckled_mobs() && !handle_buckled_mob_movement(loc,direct)) //movement failed due to buckled mob(s)
|
||||
return FALSE
|
||||
|
||||
//Called after a successful Move(). By this point, we've already moved
|
||||
/atom/movable/proc/Moved(atom/OldLoc, Dir, Forced = FALSE)
|
||||
SEND_SIGNAL(src, COMSIG_MOVABLE_MOVED, OldLoc, Dir, Forced)
|
||||
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
|
||||
|
||||
/atom/movable/Destroy(force)
|
||||
QDEL_NULL(proximity_monitor)
|
||||
QDEL_NULL(language_holder)
|
||||
@@ -372,143 +218,6 @@
|
||||
orbiting.end_orbit(src)
|
||||
orbiting = null
|
||||
|
||||
// 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)
|
||||
. = TRUE
|
||||
SEND_SIGNAL(src, COMSIG_MOVABLE_CROSS, AM)
|
||||
return CanPass(AM, AM.loc, TRUE)
|
||||
|
||||
//oldloc = old location on atom, inserted when forceMove is called and ONLY when forceMove is called!
|
||||
/atom/movable/Crossed(atom/movable/AM, oldloc)
|
||||
SEND_SIGNAL(src, COMSIG_MOVABLE_CROSSED, AM)
|
||||
|
||||
/atom/movable/Uncross(atom/movable/AM, atom/newloc)
|
||||
. = ..()
|
||||
if(SEND_SIGNAL(src, COMSIG_MOVABLE_UNCROSS, AM) & COMPONENT_MOVABLE_BLOCK_UNCROSS)
|
||||
return FALSE
|
||||
if(isturf(newloc) && !CheckExit(AM, newloc))
|
||||
return FALSE
|
||||
|
||||
/atom/movable/Uncrossed(atom/movable/AM)
|
||||
SEND_SIGNAL(src, COMSIG_MOVABLE_UNCROSSED, AM)
|
||||
|
||||
/atom/movable/Bump(atom/A)
|
||||
if(!A)
|
||||
CRASH("Bump was called with no argument.")
|
||||
SEND_SIGNAL(src, COMSIG_MOVABLE_BUMP, A)
|
||||
. = ..()
|
||||
if(!QDELETED(throwing))
|
||||
throwing.hit_atom(A)
|
||||
. = TRUE
|
||||
if(QDELETED(A))
|
||||
return
|
||||
A.Bumped(src)
|
||||
|
||||
/atom/movable/proc/forceMove(atom/destination)
|
||||
. = FALSE
|
||||
if(destination)
|
||||
. = doMove(destination)
|
||||
else
|
||||
CRASH("No valid destination passed into forceMove")
|
||||
|
||||
/atom/movable/proc/moveToNullspace()
|
||||
return doMove(null)
|
||||
|
||||
/atom/movable/proc/doMove(atom/destination)
|
||||
. = FALSE
|
||||
if(destination)
|
||||
if(pulledby)
|
||||
pulledby.stop_pulling()
|
||||
var/atom/oldloc = loc
|
||||
var/same_loc = oldloc == destination
|
||||
var/area/old_area = get_area(oldloc)
|
||||
var/area/destarea = get_area(destination)
|
||||
|
||||
loc = destination
|
||||
moving_diagonally = 0
|
||||
|
||||
if(!same_loc)
|
||||
if(oldloc)
|
||||
oldloc.Exited(src, destination)
|
||||
if(old_area && old_area != destarea)
|
||||
old_area.Exited(src, destination)
|
||||
for(var/atom/movable/AM in oldloc)
|
||||
AM.Uncrossed(src)
|
||||
var/turf/oldturf = get_turf(oldloc)
|
||||
var/turf/destturf = get_turf(destination)
|
||||
var/old_z = (oldturf ? oldturf.z : null)
|
||||
var/dest_z = (destturf ? destturf.z : null)
|
||||
if (old_z != dest_z)
|
||||
onTransitZ(old_z, dest_z)
|
||||
destination.Entered(src, oldloc)
|
||||
if(destarea && old_area != destarea)
|
||||
destarea.Entered(src, oldloc)
|
||||
|
||||
for(var/atom/movable/AM in destination)
|
||||
if(AM == src)
|
||||
continue
|
||||
AM.Crossed(src, oldloc)
|
||||
|
||||
Moved(oldloc, NONE, TRUE)
|
||||
. = TRUE
|
||||
|
||||
//If no destination, move the atom into nullspace (don't do this unless you know what you're doing)
|
||||
else
|
||||
. = TRUE
|
||||
if (loc)
|
||||
var/atom/oldloc = loc
|
||||
var/area/old_area = get_area(oldloc)
|
||||
oldloc.Exited(src, null)
|
||||
if(old_area)
|
||||
old_area.Exited(src, null)
|
||||
loc = null
|
||||
|
||||
/atom/movable/proc/onTransitZ(old_z,new_z)
|
||||
SEND_SIGNAL(src, COMSIG_MOVABLE_Z_CHANGED, old_z, new_z)
|
||||
for (var/item in src) // Notify contents of Z-transition. This can be overridden IF we know the items contents do not care.
|
||||
var/atom/movable/AM = item
|
||||
AM.onTransitZ(old_z,new_z)
|
||||
|
||||
/atom/movable/proc/setMovetype(newval)
|
||||
movement_type = newval
|
||||
|
||||
//Called whenever an object moves and by mobs when they attempt to move themselves through space
|
||||
//And when an object or action applies a force on src, see newtonian_move() below
|
||||
//Return 0 to have src start/keep drifting in a no-grav area and 1 to stop/not start drifting
|
||||
//Mobs should return 1 if they should be able to move of their own volition, see client/Move() in mob_movement.dm
|
||||
//movement_dir == 0 when stopping or any dir when trying to move
|
||||
/atom/movable/proc/Process_Spacemove(movement_dir = 0)
|
||||
if(has_gravity(src))
|
||||
return 1
|
||||
|
||||
if(pulledby)
|
||||
return 1
|
||||
|
||||
if(throwing)
|
||||
return 1
|
||||
|
||||
if(!isturf(loc))
|
||||
return 1
|
||||
|
||||
if(locate(/obj/structure/lattice) in range(1, get_turf(src))) //Not realistic but makes pushing things in space easier
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
/atom/movable/proc/newtonian_move(direction) //Only moves the object if it's under no gravity
|
||||
if(!loc || Process_Spacemove(0))
|
||||
inertia_dir = 0
|
||||
return 0
|
||||
|
||||
inertia_dir = direction
|
||||
if(!direction)
|
||||
return 1
|
||||
inertia_last_loc = loc
|
||||
SSspacedrift.processing[src] = src
|
||||
return 1
|
||||
|
||||
/atom/movable/proc/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
|
||||
set waitfor = 0
|
||||
SEND_SIGNAL(src, COMSIG_MOVABLE_IMPACT, hit_atom, throwingdatum)
|
||||
@@ -610,17 +319,6 @@
|
||||
SSthrowing.currentrun[src] = TT
|
||||
TT.tick()
|
||||
|
||||
/atom/movable/proc/handle_buckled_mob_movement(newloc,direct)
|
||||
for(var/m in buckled_mobs)
|
||||
var/mob/living/buckled_mob = m
|
||||
if(!buckled_mob.Move(newloc, direct))
|
||||
forceMove(buckled_mob.loc)
|
||||
last_move = buckled_mob.last_move
|
||||
inertia_dir = last_move
|
||||
buckled_mob.inertia_dir = last_move
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/atom/movable/proc/force_pushed(atom/movable/pusher, force = MOVE_FORCE_DEFAULT, direction)
|
||||
return FALSE
|
||||
|
||||
@@ -639,7 +337,7 @@
|
||||
|
||||
/atom/movable/CanPass(atom/movable/mover, turf/target)
|
||||
if(mover in buckled_mobs)
|
||||
return 1
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
// called when this atom is removed from a storage item, which is passed on as S. The loc variable is already set to the new destination before this is called.
|
||||
@@ -865,6 +563,11 @@
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/// Updates the grab state of the movable
|
||||
/// This exists to act as a hook for behaviour
|
||||
/atom/movable/proc/setGrabState(newstate)
|
||||
grab_state = newstate
|
||||
|
||||
/obj/item/proc/do_pickup_animation(atom/target)
|
||||
set waitfor = FALSE
|
||||
if(!istype(loc, /turf))
|
||||
|
||||
@@ -0,0 +1,307 @@
|
||||
// File for movement procs for atom/movable
|
||||
|
||||
|
||||
////////////////////////////////////////
|
||||
// Here's where we rewrite how byond handles movement except slightly different
|
||||
// To be removed on step_ conversion
|
||||
// All this work to prevent a second bump
|
||||
/atom/movable/Move(atom/newloc, direct=0)
|
||||
. = FALSE
|
||||
if(!newloc || newloc == loc)
|
||||
return
|
||||
|
||||
if(!direct)
|
||||
direct = get_dir(src, newloc)
|
||||
setDir(direct)
|
||||
|
||||
if(!loc.Exit(src, newloc))
|
||||
return
|
||||
|
||||
if(!newloc.Enter(src, src.loc))
|
||||
return
|
||||
|
||||
// Past this is the point of no return
|
||||
var/atom/oldloc = loc
|
||||
var/area/oldarea = get_area(oldloc)
|
||||
var/area/newarea = get_area(newloc)
|
||||
loc = newloc
|
||||
. = TRUE
|
||||
oldloc.Exited(src, newloc)
|
||||
if(oldarea != newarea)
|
||||
oldarea.Exited(src, newloc)
|
||||
|
||||
for(var/i in oldloc)
|
||||
if(i == src) // Multi tile objects
|
||||
continue
|
||||
var/atom/movable/thing = i
|
||||
thing.Uncrossed(src)
|
||||
|
||||
newloc.Entered(src, oldloc)
|
||||
if(oldarea != newarea)
|
||||
newarea.Entered(src, oldloc)
|
||||
|
||||
for(var/i in loc)
|
||||
if(i == src) // Multi tile objects
|
||||
continue
|
||||
var/atom/movable/thing = i
|
||||
thing.Crossed(src)
|
||||
//
|
||||
////////////////////////////////////////
|
||||
|
||||
/atom/movable/Move(atom/newloc, direct)
|
||||
var/atom/movable/pullee = pulling
|
||||
var/turf/T = loc
|
||||
if(pulling)
|
||||
if(pullee && get_dist(src, pullee) > 1)
|
||||
stop_pulling()
|
||||
|
||||
if(pullee && pullee.loc != loc && !isturf(pullee.loc) ) //to be removed once all code that changes an object's loc uses forceMove().
|
||||
log_game("DEBUG:[src]'s pull on [pullee] wasn't broken despite [pullee] being in [pullee.loc]. Pull stopped manually.")
|
||||
stop_pulling()
|
||||
if(!loc || !newloc)
|
||||
return FALSE
|
||||
var/atom/oldloc = loc
|
||||
|
||||
if(loc != newloc)
|
||||
if (!(direct & (direct - 1))) //Cardinal move
|
||||
. = ..()
|
||||
else //Diagonal move, split it into cardinal moves
|
||||
moving_diagonally = FIRST_DIAG_STEP
|
||||
var/first_step_dir
|
||||
// The `&& moving_diagonally` checks are so that a forceMove taking
|
||||
// place due to a Crossed, Bumped, etc. call will interrupt
|
||||
// the second half of the diagonal movement, or the second attempt
|
||||
// at a first half if step() fails because we hit something.
|
||||
if (direct & NORTH)
|
||||
if (direct & EAST)
|
||||
if (step(src, NORTH) && moving_diagonally)
|
||||
first_step_dir = NORTH
|
||||
moving_diagonally = SECOND_DIAG_STEP
|
||||
. = step(src, EAST)
|
||||
else if (moving_diagonally && step(src, EAST))
|
||||
first_step_dir = EAST
|
||||
moving_diagonally = SECOND_DIAG_STEP
|
||||
. = step(src, NORTH)
|
||||
else if (direct & WEST)
|
||||
if (step(src, NORTH) && moving_diagonally)
|
||||
first_step_dir = NORTH
|
||||
moving_diagonally = SECOND_DIAG_STEP
|
||||
. = step(src, WEST)
|
||||
else if (moving_diagonally && step(src, WEST))
|
||||
first_step_dir = WEST
|
||||
moving_diagonally = SECOND_DIAG_STEP
|
||||
. = step(src, NORTH)
|
||||
else if (direct & SOUTH)
|
||||
if (direct & EAST)
|
||||
if (step(src, SOUTH) && moving_diagonally)
|
||||
first_step_dir = SOUTH
|
||||
moving_diagonally = SECOND_DIAG_STEP
|
||||
. = step(src, EAST)
|
||||
else if (moving_diagonally && step(src, EAST))
|
||||
first_step_dir = EAST
|
||||
moving_diagonally = SECOND_DIAG_STEP
|
||||
. = step(src, SOUTH)
|
||||
else if (direct & WEST)
|
||||
if (step(src, SOUTH) && moving_diagonally)
|
||||
first_step_dir = SOUTH
|
||||
moving_diagonally = SECOND_DIAG_STEP
|
||||
. = step(src, WEST)
|
||||
else if (moving_diagonally && step(src, WEST))
|
||||
first_step_dir = WEST
|
||||
moving_diagonally = SECOND_DIAG_STEP
|
||||
. = step(src, SOUTH)
|
||||
if(moving_diagonally == SECOND_DIAG_STEP)
|
||||
if(!.)
|
||||
setDir(first_step_dir)
|
||||
else if (!inertia_moving)
|
||||
inertia_next_move = world.time + inertia_move_delay
|
||||
newtonian_move(direct)
|
||||
moving_diagonally = 0
|
||||
return
|
||||
|
||||
if(!loc || (loc == oldloc && oldloc != newloc))
|
||||
last_move = NONE
|
||||
return
|
||||
|
||||
if(.)
|
||||
last_move = direct
|
||||
setDir(direct)
|
||||
|
||||
if(has_buckled_mobs() && !handle_buckled_mob_movement(loc,direct)) //movement failed due to buckled mob(s)
|
||||
return FALSE
|
||||
|
||||
if(pulling && pulling == pullee) //we were pulling a thing and didn't lose it during our move.
|
||||
if(pulling.anchored)
|
||||
stop_pulling()
|
||||
else
|
||||
var/pull_dir = get_dir(src, pulling)
|
||||
//puller and pullee more than one tile away or in diagonal position
|
||||
if(get_dist(src, pulling) > 1 || (moving_diagonally != SECOND_DIAG_STEP && ((pull_dir - 1) & pull_dir)))
|
||||
pulling.Move(T, get_dir(pulling, T)) //the pullee tries to reach our previous position
|
||||
if(pulling && get_dist(src, pulling) > 1) //the pullee couldn't keep up
|
||||
stop_pulling()
|
||||
if(pulledby && moving_diagonally != FIRST_DIAG_STEP && get_dist(src, pulledby) > 1)//separated from our puller and not in the middle of a diagonal move.
|
||||
pulledby.stop_pulling()
|
||||
|
||||
Moved(oldloc, direct)
|
||||
|
||||
/atom/movable/proc/handle_buckled_mob_movement(newloc,direct)
|
||||
for(var/m in buckled_mobs)
|
||||
var/mob/living/buckled_mob = m
|
||||
if(!buckled_mob.Move(newloc, direct))
|
||||
forceMove(buckled_mob.loc)
|
||||
last_move = buckled_mob.last_move
|
||||
inertia_dir = last_move
|
||||
buckled_mob.inertia_dir = last_move
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
//Called after a successful Move(). By this point, we've already moved
|
||||
/atom/movable/proc/Moved(atom/OldLoc, Dir, Forced = FALSE)
|
||||
SEND_SIGNAL(src, COMSIG_MOVABLE_MOVED, OldLoc, Dir, Forced)
|
||||
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)
|
||||
. = TRUE
|
||||
SEND_SIGNAL(src, COMSIG_MOVABLE_CROSS, AM)
|
||||
return CanPass(AM, AM.loc, TRUE)
|
||||
|
||||
//oldloc = old location on atom, inserted when forceMove is called and ONLY when forceMove is called!
|
||||
/atom/movable/Crossed(atom/movable/AM, oldloc)
|
||||
SEND_SIGNAL(src, COMSIG_MOVABLE_CROSSED, AM)
|
||||
|
||||
/atom/movable/Uncross(atom/movable/AM, atom/newloc)
|
||||
. = ..()
|
||||
if(SEND_SIGNAL(src, COMSIG_MOVABLE_UNCROSS, AM) & COMPONENT_MOVABLE_BLOCK_UNCROSS)
|
||||
return FALSE
|
||||
if(isturf(newloc) && !CheckExit(AM, newloc))
|
||||
return FALSE
|
||||
|
||||
/atom/movable/Uncrossed(atom/movable/AM)
|
||||
SEND_SIGNAL(src, COMSIG_MOVABLE_UNCROSSED, AM)
|
||||
|
||||
/atom/movable/Bump(atom/A)
|
||||
if(!A)
|
||||
CRASH("Bump was called with no argument.")
|
||||
SEND_SIGNAL(src, COMSIG_MOVABLE_BUMP, A)
|
||||
. = ..()
|
||||
if(!QDELETED(throwing))
|
||||
throwing.hit_atom(A)
|
||||
. = TRUE
|
||||
if(QDELETED(A))
|
||||
return
|
||||
A.Bumped(src)
|
||||
|
||||
/atom/movable/proc/onTransitZ(old_z,new_z)
|
||||
SEND_SIGNAL(src, COMSIG_MOVABLE_Z_CHANGED, old_z, new_z)
|
||||
for (var/item in src) // Notify contents of Z-transition. This can be overridden IF we know the items contents do not care.
|
||||
var/atom/movable/AM = item
|
||||
AM.onTransitZ(old_z,new_z)
|
||||
|
||||
/atom/movable/proc/setMovetype(newval)
|
||||
movement_type = newval
|
||||
|
||||
///////////// FORCED MOVEMENT /////////////
|
||||
|
||||
/atom/movable/proc/forceMove(atom/destination)
|
||||
. = FALSE
|
||||
if(destination)
|
||||
. = doMove(destination)
|
||||
else
|
||||
CRASH("No valid destination passed into forceMove")
|
||||
|
||||
/atom/movable/proc/moveToNullspace()
|
||||
return doMove(null)
|
||||
|
||||
/atom/movable/proc/doMove(atom/destination)
|
||||
. = FALSE
|
||||
if(destination)
|
||||
if(pulledby)
|
||||
pulledby.stop_pulling()
|
||||
var/atom/oldloc = loc
|
||||
var/same_loc = oldloc == destination
|
||||
var/area/old_area = get_area(oldloc)
|
||||
var/area/destarea = get_area(destination)
|
||||
|
||||
loc = destination
|
||||
moving_diagonally = 0
|
||||
|
||||
if(!same_loc)
|
||||
if(oldloc)
|
||||
oldloc.Exited(src, destination)
|
||||
if(old_area && old_area != destarea)
|
||||
old_area.Exited(src, destination)
|
||||
for(var/atom/movable/AM in oldloc)
|
||||
AM.Uncrossed(src)
|
||||
var/turf/oldturf = get_turf(oldloc)
|
||||
var/turf/destturf = get_turf(destination)
|
||||
var/old_z = (oldturf ? oldturf.z : null)
|
||||
var/dest_z = (destturf ? destturf.z : null)
|
||||
if (old_z != dest_z)
|
||||
onTransitZ(old_z, dest_z)
|
||||
destination.Entered(src, oldloc)
|
||||
if(destarea && old_area != destarea)
|
||||
destarea.Entered(src, oldloc)
|
||||
|
||||
for(var/atom/movable/AM in destination)
|
||||
if(AM == src)
|
||||
continue
|
||||
AM.Crossed(src, oldloc)
|
||||
|
||||
Moved(oldloc, NONE, TRUE)
|
||||
. = TRUE
|
||||
|
||||
//If no destination, move the atom into nullspace (don't do this unless you know what you're doing)
|
||||
else
|
||||
. = TRUE
|
||||
if (loc)
|
||||
var/atom/oldloc = loc
|
||||
var/area/old_area = get_area(oldloc)
|
||||
oldloc.Exited(src, null)
|
||||
if(old_area)
|
||||
old_area.Exited(src, null)
|
||||
loc = null
|
||||
|
||||
//Called whenever an object moves and by mobs when they attempt to move themselves through space
|
||||
//And when an object or action applies a force on src, see newtonian_move() below
|
||||
//Return 0 to have src start/keep drifting in a no-grav area and 1 to stop/not start drifting
|
||||
//Mobs should return 1 if they should be able to move of their own volition, see client/Move() in mob_movement.dm
|
||||
//movement_dir == 0 when stopping or any dir when trying to move
|
||||
/atom/movable/proc/Process_Spacemove(movement_dir = 0)
|
||||
if(has_gravity(src))
|
||||
return 1
|
||||
|
||||
if(pulledby)
|
||||
return 1
|
||||
|
||||
if(throwing)
|
||||
return 1
|
||||
|
||||
if(!isturf(loc))
|
||||
return 1
|
||||
|
||||
if(locate(/obj/structure/lattice) in range(1, get_turf(src))) //Not realistic but makes pushing things in space easier
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
/atom/movable/proc/newtonian_move(direction) //Only moves the object if it's under no gravity
|
||||
if(!loc || Process_Spacemove(0))
|
||||
inertia_dir = 0
|
||||
return 0
|
||||
|
||||
inertia_dir = direction
|
||||
if(!direction)
|
||||
return 1
|
||||
inertia_last_loc = loc
|
||||
SSspacedrift.processing[src] = src
|
||||
return 1
|
||||
@@ -4,23 +4,17 @@
|
||||
icon = 'icons/obj/machines/nuke.dmi'
|
||||
icon_state = "bananiumbomb_base"
|
||||
|
||||
/obj/machinery/nuclearbomb/syndicate/bananium/update_icon()
|
||||
if(deconstruction_state == NUKESTATE_INTACT)
|
||||
switch(get_nuke_state())
|
||||
if(NUKE_OFF_LOCKED, NUKE_OFF_UNLOCKED)
|
||||
icon_state = "bananiumbomb_base"
|
||||
update_icon_interior()
|
||||
update_icon_lights()
|
||||
if(NUKE_ON_TIMING)
|
||||
cut_overlays()
|
||||
icon_state = "bananiumbomb_timing"
|
||||
if(NUKE_ON_EXPLODING)
|
||||
cut_overlays()
|
||||
icon_state = "bananiumbomb_exploding"
|
||||
else
|
||||
/obj/machinery/nuclearbomb/syndicate/bananium/update_icon_state()
|
||||
if(deconstruction_state != NUKESTATE_INTACT)
|
||||
icon_state = "bananiumbomb_base"
|
||||
update_icon_interior()
|
||||
update_icon_lights()
|
||||
return
|
||||
switch(get_nuke_state())
|
||||
if(NUKE_OFF_LOCKED, NUKE_OFF_UNLOCKED)
|
||||
icon_state = "bananiumbomb_base"
|
||||
if(NUKE_ON_TIMING)
|
||||
icon_state = "bananiumbomb_timing"
|
||||
if(NUKE_ON_EXPLODING)
|
||||
icon_state = "bananiumbomb_exploding"
|
||||
|
||||
/obj/machinery/nuclearbomb/syndicate/bananium/get_cinematic_type(off_station)
|
||||
switch(off_station)
|
||||
|
||||
@@ -40,14 +40,14 @@
|
||||
/obj/item/clothing/shoes/clown_shoes/banana_shoes/combat/Initialize()
|
||||
. = ..()
|
||||
var/datum/component/material_container/bananium = GetComponent(/datum/component/material_container)
|
||||
bananium.insert_amount(max_recharge, MAT_BANANIUM)
|
||||
bananium.insert_amount_mat(max_recharge, /datum/material/bananium)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/clothing/shoes/clown_shoes/banana_shoes/combat/process()
|
||||
var/datum/component/material_container/bananium = GetComponent(/datum/component/material_container)
|
||||
var/bananium_amount = bananium.amount(MAT_BANANIUM)
|
||||
var/bananium_amount = bananium.get_material_amount(/datum/material/bananium)
|
||||
if(bananium_amount < max_recharge)
|
||||
bananium.insert_amount(min(recharge_rate, max_recharge - bananium_amount), MAT_BANANIUM)
|
||||
bananium.insert_amount_mat(min(recharge_rate, max_recharge - bananium_amount), /datum/material/bananium)
|
||||
|
||||
/obj/item/clothing/shoes/clown_shoes/banana_shoes/combat/attack_self(mob/user)
|
||||
ui_action_click(user)
|
||||
|
||||
@@ -672,7 +672,7 @@ GLOBAL_VAR_INIT(dynamic_storyteller_type, /datum/dynamic_storyteller/classic)
|
||||
// Time to inject some threat into the round
|
||||
if(EMERGENCY_ESCAPED_OR_ENDGAMED) // Unless the shuttle is gone
|
||||
return
|
||||
if((world.realtime - SSshuttle.realtimeofstart) > SSshuttle.auto_call) // no rules after shuttle is auto-called
|
||||
if(SSshuttle.endvote_passed) // no rules after shuttle call is voted
|
||||
return
|
||||
message_admins("DYNAMIC: Checking for midround injection.")
|
||||
log_game("DYNAMIC: Checking for midround injection.")
|
||||
@@ -748,7 +748,7 @@ GLOBAL_VAR_INIT(dynamic_storyteller_type, /datum/dynamic_storyteller/classic)
|
||||
return
|
||||
if(EMERGENCY_ESCAPED_OR_ENDGAMED) // No more rules after the shuttle has left
|
||||
return
|
||||
if((world.realtime - SSshuttle.realtimeofstart) > SSshuttle.auto_call) // no rules after shuttle is auto-called
|
||||
if(SSshuttle.endvote_passed) // no rules after shuttle is auto-called
|
||||
return
|
||||
update_playercounts()
|
||||
|
||||
|
||||
@@ -746,7 +746,7 @@
|
||||
Mind.add_antag_datum(ninjadatum)
|
||||
|
||||
if(Ninja.mind != Mind) //something has gone wrong!
|
||||
throw EXCEPTION("Ninja created with incorrect mind")
|
||||
stack_trace("Ninja created with incorrect mind")
|
||||
|
||||
message_admins("[ADMIN_LOOKUPFLW(Ninja)] has been made into a ninja by dynamic.")
|
||||
log_game("[key_name(Ninja)] was spawned as a ninja by dynamic.")
|
||||
|
||||
@@ -57,7 +57,8 @@ Property weights are:
|
||||
mean += 2.5
|
||||
if(CHAOS_MAX)
|
||||
mean += 5
|
||||
GLOB.dynamic_curve_centre += (mean/voters)
|
||||
if(voters)
|
||||
GLOB.dynamic_curve_centre += (mean/voters)
|
||||
GLOB.dynamic_forced_threat_level = forced_threat_level
|
||||
|
||||
/datum/dynamic_storyteller/proc/get_midround_cooldown()
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
anchored = TRUE
|
||||
layer = HIGH_OBJ_LAYER
|
||||
max_integrity = 300
|
||||
integrity_failure = 100
|
||||
integrity_failure = 0.33
|
||||
armor = list("melee" = 20, "bullet" = 50, "laser" = 50, "energy" = 50, "bomb" = 10, "bio" = 100, "rad" = 100, "fire" = 10, "acid" = 70)
|
||||
var/datum/team/gang/gang
|
||||
var/operating = FALSE //false=standby or broken, true=takeover
|
||||
|
||||
@@ -220,11 +220,11 @@ datum/gang_item/clothing/shades //Addition: Why not have cool shades on a gang m
|
||||
cost = 15
|
||||
item_path = /obj/item/ammo_box/magazine/sniper_rounds
|
||||
|
||||
/datum/gang_item/weapon/ammo/sleeper_ammo
|
||||
/*/datum/gang_item/weapon/ammo/sleeper_ammo //no. absolutely no.
|
||||
name = "Illicit Soporific Cartridges"
|
||||
id = "sniper_ammo"
|
||||
cost = 15
|
||||
item_path = /obj/item/ammo_box/magazine/sniper_rounds/soporific
|
||||
cost = 15 //who the fuck thought a ONE-HIT K.O. for 15 gbp IN AN ENVIRONMENT WHERE WE'RE GETTING RID OF HARDSTUNS is a GOOD IDEA
|
||||
item_path = /obj/item/ammo_box/magazine/sniper_rounds/soporific*/
|
||||
|
||||
/datum/gang_item/weapon/machinegun
|
||||
name = "Mounted Machine Gun"
|
||||
|
||||
@@ -54,6 +54,6 @@
|
||||
return
|
||||
var/mob/living/carbon/human/H = gangster_mind.current // we are sure the dude's human cause it's checked in attack()
|
||||
H.silent = max(H.silent, 5)
|
||||
H.Knockdown(100)
|
||||
H.DefaultCombatKnockdown(100)
|
||||
gangster_mind.add_antag_datum(/datum/antagonist/gang, gang)
|
||||
return TRUE
|
||||
@@ -86,8 +86,10 @@ GLOBAL_LIST_EMPTY(objectives)
|
||||
if(M)
|
||||
. += M
|
||||
|
||||
/datum/objective/proc/find_target()
|
||||
/datum/objective/proc/find_target(dupe_search_range, blacklist)
|
||||
var/list/datum/mind/owners = get_owners()
|
||||
if(!dupe_search_range)
|
||||
dupe_search_range = get_owners()
|
||||
var/list/possible_targets = list()
|
||||
var/try_target_late_joiners = FALSE
|
||||
for(var/I in owners)
|
||||
@@ -96,7 +98,8 @@ GLOBAL_LIST_EMPTY(objectives)
|
||||
try_target_late_joiners = TRUE
|
||||
for(var/datum/mind/possible_target in get_crewmember_minds())
|
||||
if(!(possible_target in owners) && ishuman(possible_target.current) && (possible_target.current.stat != DEAD) && is_unique_objective(possible_target))
|
||||
possible_targets += possible_target
|
||||
if(!(possible_target in blacklist))
|
||||
possible_targets += possible_target
|
||||
if(try_target_late_joiners)
|
||||
var/list/all_possible_targets = possible_targets.Copy()
|
||||
for(var/I in all_possible_targets)
|
||||
@@ -314,9 +317,11 @@ GLOBAL_LIST_EMPTY(objectives)
|
||||
|
||||
/datum/objective/hijack
|
||||
name = "hijack"
|
||||
explanation_text = "Hijack the shuttle to ensure no loyalist Nanotrasen crew escape alive and out of custody."
|
||||
team_explanation_text = "Hijack the shuttle to ensure no loyalist Nanotrasen crew escape alive and out of custody. Leave no team member behind."
|
||||
explanation_text = "Hijack the emergency shuttle by hacking its navigational protocols through the control console (alt click emergency shuttle console)."
|
||||
team_explanation_text = "Hijack the emergency shuttle by hacking its navigational protocols through the control console (alt click emergency shuttle console). Leave no team member behind."
|
||||
martyr_compatible = 0 //Technically you won't get both anyway.
|
||||
/// Overrides the hijack speed of any antagonist datum it is on ONLY, no other datums are impacted.
|
||||
var/hijack_speed_override = 1
|
||||
|
||||
/datum/objective/hijack/check_completion() // Requires all owners to escape.
|
||||
if(SSshuttle.emergency.mode != SHUTTLE_ENDGAME)
|
||||
@@ -1073,7 +1078,7 @@ GLOBAL_LIST_EMPTY(cult_contraband)
|
||||
var/mob/living/carbon/human/H = owner
|
||||
H.equip_in_one_of_slots(I, list("backpack" = SLOT_IN_BACKPACK))
|
||||
hoarded_item = I
|
||||
|
||||
|
||||
|
||||
|
||||
GLOBAL_LIST_EMPTY(possible_sabotages)
|
||||
@@ -1090,13 +1095,13 @@ GLOBAL_LIST_EMPTY(possible_sabotages)
|
||||
if(!GLOB.possible_sabotages.len)//Only need to fill the list when it's needed.
|
||||
for(var/I in subtypesof(/datum/sabotage_objective))
|
||||
new I
|
||||
|
||||
|
||||
/datum/objective/sabotage/find_target()
|
||||
var/list/datum/mind/owners = get_owners()
|
||||
var/approved_targets = list()
|
||||
check_sabotages:
|
||||
for(var/datum/sabotage_objective/possible_sabotage in GLOB.possible_sabotages)
|
||||
if(!is_unique_objective(possible_sabotage.sabotage_type) || possible_sabotage.check_conditions())
|
||||
if(!is_unique_objective(possible_sabotage.sabotage_type) || possible_sabotage.check_conditions() || !possible_sabotage.can_run())
|
||||
continue
|
||||
for(var/datum/mind/M in owners)
|
||||
if(M.current.mind.assigned_role in possible_sabotage.excludefromjob)
|
||||
@@ -1153,3 +1158,21 @@ GLOBAL_LIST_EMPTY(possible_sabotages)
|
||||
|
||||
/datum/objective/flavor/wizard
|
||||
flavor_file = "strings/flavor_objectives/wizard.txt"
|
||||
|
||||
/datum/objective/contract
|
||||
var/payout = 0
|
||||
var/payout_bonus = 0
|
||||
var/area/dropoff = null
|
||||
|
||||
/datum/objective/contract/proc/generate_dropoff() // Generate a random valid area on the station that the dropoff will happen.
|
||||
var/found = FALSE
|
||||
while(!found)
|
||||
var/area/dropoff_area = pick(GLOB.sortedAreas)
|
||||
if(dropoff_area && is_station_level(dropoff_area.z) && !dropoff_area.outdoors && !istype(dropoff_area, /area/shuttle/))
|
||||
dropoff = dropoff_area
|
||||
found = TRUE
|
||||
|
||||
/datum/objective/contract/proc/dropoff_check(mob/user, mob/target) // Check if both the contractor and contract target are at the dropoff point.
|
||||
var/area/user_area = get_area(user)
|
||||
var/area/target_area = get_area(target)
|
||||
return (istype(user_area, dropoff) && istype(target_area, dropoff))
|
||||
|
||||
@@ -12,6 +12,9 @@
|
||||
/datum/sabotage_objective/proc/check_conditions()
|
||||
return TRUE
|
||||
|
||||
/datum/sabotage_objective/proc/can_run()
|
||||
return TRUE
|
||||
|
||||
/datum/sabotage_objective/processing
|
||||
var/won = FALSE
|
||||
|
||||
@@ -20,20 +23,20 @@
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
|
||||
/datum/sabotage_objective/processing/proc/check_condition_processing()
|
||||
return 100
|
||||
return 1
|
||||
|
||||
/datum/sabotage_objective/processing/process()
|
||||
check_condition_processing()
|
||||
if(won >= 100)
|
||||
if(won >= 1)
|
||||
STOP_PROCESSING(SSprocessing,src)
|
||||
|
||||
/datum/sabotage_objective/processing/check_conditions()
|
||||
return won
|
||||
|
||||
/datum/sabotage_objective/processing/power_sink
|
||||
name = "Drain at least 1 gigajoule of power using a power sink."
|
||||
name = "Drain at least 100 megajoules of power using a power sink."
|
||||
sabotage_type = "powersink"
|
||||
special_equipment = list(/obj/item/powersink)
|
||||
special_equipment = list(/obj/item/sbeacondrop/powersink)
|
||||
var/sink_found = FALSE
|
||||
var/count = 0
|
||||
|
||||
@@ -44,7 +47,7 @@
|
||||
for(var/datum/powernet/PN in GLOB.powernets)
|
||||
for(var/obj/item/powersink/sink in PN.nodes)
|
||||
sink_found_this_time = TRUE
|
||||
won = max(won,sink.power_drained/1e9)
|
||||
won = max(won,sink.power_drained/1e8)
|
||||
sink_found = sink_found_this_time
|
||||
count = 0
|
||||
return FALSE
|
||||
@@ -79,6 +82,9 @@
|
||||
won = max(1-((S.get_integrity()-50)/50),won)
|
||||
return FALSE
|
||||
|
||||
/datum/sabotage_objective/processing/supermatter/can_run()
|
||||
return (locate(/obj/machinery/power/supermatter_crystal) in GLOB.machines)
|
||||
|
||||
/datum/sabotage_objective/station_integrity
|
||||
name = "Make sure the station is at less than 80% integrity by the end. Smash walls, windows etc. to reach this goal."
|
||||
sabotage_type = "integrity"
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
update_icon()
|
||||
|
||||
// update the icon_state
|
||||
/obj/machinery/bluespace_beacon/update_icon()
|
||||
/obj/machinery/bluespace_beacon/update_icon_state()
|
||||
var/state="floor_beacon"
|
||||
|
||||
if(invisibility)
|
||||
|
||||
@@ -9,16 +9,12 @@
|
||||
var/list/colorlist = list()
|
||||
|
||||
|
||||
/obj/machinery/pdapainter/update_icon()
|
||||
cut_overlays()
|
||||
/obj/machinery/pdapainter/update_icon_state()
|
||||
|
||||
if(stat & BROKEN)
|
||||
icon_state = "[initial(icon_state)]-broken"
|
||||
return
|
||||
|
||||
if(storedpda)
|
||||
add_overlay("[initial(icon_state)]-closed")
|
||||
|
||||
if(powered())
|
||||
icon_state = initial(icon_state)
|
||||
else
|
||||
@@ -26,6 +22,15 @@
|
||||
|
||||
return
|
||||
|
||||
/obj/machinery/pdapainter/update_overlays()
|
||||
. = ..()
|
||||
|
||||
if(stat & BROKEN)
|
||||
return
|
||||
|
||||
if(storedpda)
|
||||
. += "[initial(icon_state)]-closed"
|
||||
|
||||
/obj/machinery/pdapainter/Initialize()
|
||||
. = ..()
|
||||
var/list/blocked = list(
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
reagents.maximum_volume = (500*E)
|
||||
|
||||
|
||||
/obj/machinery/sleeper/update_icon()
|
||||
/obj/machinery/sleeper/update_icon_state()
|
||||
icon_state = initial(icon_state)
|
||||
if(state_open)
|
||||
icon_state += "-open"
|
||||
@@ -264,7 +264,7 @@
|
||||
if(blood_id)
|
||||
data["occupant"]["blood"] = list() // We can start populating this list.
|
||||
var/blood_type = C.dna.blood_type
|
||||
if(blood_id != "blood") // special blood substance
|
||||
if(!(blood_id in GLOB.blood_reagent_types)) // special blood substance
|
||||
var/datum/reagent/R = GLOB.chemical_reagents_list[blood_id]
|
||||
if(R)
|
||||
blood_type = R.name
|
||||
|
||||
@@ -185,7 +185,7 @@ Class Procs:
|
||||
A.forceMove(T)
|
||||
if(isliving(A))
|
||||
var/mob/living/L = A
|
||||
L.update_canmove()
|
||||
L.update_mobility()
|
||||
if(occupant)
|
||||
SEND_SIGNAL(src, COMSIG_MACHINE_EJECT_OCCUPANT, occupant)
|
||||
occupant = null
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
id_tag = INCINERATOR_SYNDICATELAVA_AIRLOCK_SENSOR
|
||||
master_tag = INCINERATOR_SYNDICATELAVA_AIRLOCK_CONTROLLER
|
||||
|
||||
/obj/machinery/airlock_sensor/update_icon()
|
||||
/obj/machinery/airlock_sensor/update_icon_state()
|
||||
if(on)
|
||||
if(alert)
|
||||
icon_state = "airlock_sensor_alert"
|
||||
|
||||
@@ -29,25 +29,25 @@ GLOBAL_LIST_EMPTY(announcement_systems)
|
||||
/obj/machinery/announcement_system/Initialize()
|
||||
. = ..()
|
||||
GLOB.announcement_systems += src
|
||||
radio = new /obj/item/radio/headset/ai(src)
|
||||
radio = new /obj/item/radio/headset/silicon/ai(src)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/announcement_system/update_icon()
|
||||
/obj/machinery/announcement_system/update_icon_state()
|
||||
if(is_operational())
|
||||
icon_state = (panel_open ? "AAS_On_Open" : "AAS_On")
|
||||
else
|
||||
icon_state = (panel_open ? "AAS_Off_Open" : "AAS_Off")
|
||||
|
||||
|
||||
cut_overlays()
|
||||
/obj/machinery/announcement_system/update_overlays()
|
||||
. =..()
|
||||
if(arrivalToggle)
|
||||
add_overlay(greenlight)
|
||||
. += greenlight
|
||||
|
||||
if(newheadToggle)
|
||||
add_overlay(pinklight)
|
||||
. += pinklight
|
||||
|
||||
if(stat & BROKEN)
|
||||
add_overlay(errorlight)
|
||||
. += errorlight
|
||||
|
||||
/obj/machinery/announcement_system/Destroy()
|
||||
QDEL_NULL(radio)
|
||||
|
||||
@@ -19,21 +19,21 @@
|
||||
initial_icon_state = initial(icon_state)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/aug_manipulator/update_icon()
|
||||
cut_overlays()
|
||||
|
||||
/obj/machinery/aug_manipulator/update_icon_state()
|
||||
if(stat & BROKEN)
|
||||
icon_state = "[initial_icon_state]-broken"
|
||||
return
|
||||
|
||||
if(storedpart)
|
||||
add_overlay("[initial_icon_state]-closed")
|
||||
|
||||
if(powered())
|
||||
icon_state = initial_icon_state
|
||||
else
|
||||
icon_state = "[initial_icon_state]-off"
|
||||
|
||||
/obj/machinery/aug_manipulator/update_overlays()
|
||||
. = ..()
|
||||
if(storedpart)
|
||||
. += "[initial_icon_state]-closed"
|
||||
|
||||
/obj/machinery/aug_manipulator/Destroy()
|
||||
QDEL_NULL(storedpart)
|
||||
return ..()
|
||||
|
||||
@@ -47,7 +47,23 @@
|
||||
)
|
||||
|
||||
/obj/machinery/autolathe/Initialize()
|
||||
AddComponent(/datum/component/material_container, list(MAT_METAL, MAT_GLASS), 0, TRUE, null, null, CALLBACK(src, .proc/AfterMaterialInsert))
|
||||
AddComponent(/datum/component/material_container,
|
||||
list(/datum/material/iron,
|
||||
/datum/material/glass,
|
||||
/datum/material/gold,
|
||||
/datum/material/silver,
|
||||
/datum/material/diamond,
|
||||
/datum/material/uranium,
|
||||
/datum/material/plasma,
|
||||
/datum/material/bluespace,
|
||||
/datum/material/bananium,
|
||||
/datum/material/titanium,
|
||||
/datum/material/runite,
|
||||
/datum/material/plastic,
|
||||
/datum/material/adamantine,
|
||||
/datum/material/mythril
|
||||
),
|
||||
0, TRUE, null, null, CALLBACK(src, .proc/AfterMaterialInsert))
|
||||
. = ..()
|
||||
|
||||
wires = new /datum/wires/autolathe(src)
|
||||
@@ -121,15 +137,14 @@
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/machinery/autolathe/proc/AfterMaterialInsert(type_inserted, id_inserted, amount_inserted)
|
||||
if(ispath(type_inserted, /obj/item/stack/ore/bluespace_crystal))
|
||||
/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(item_inserted.custom_materials?.len && item_inserted.custom_materials[SSmaterials.GetMaterialRef(/datum/material/glass)])
|
||||
flick("autolathe_r",src)//plays glass insertion animation by default otherwise
|
||||
else
|
||||
switch(id_inserted)
|
||||
if (MAT_METAL)
|
||||
flick("autolathe_o",src)//plays metal insertion animation
|
||||
if (MAT_GLASS)
|
||||
flick("autolathe_r",src)//plays glass insertion animation
|
||||
flick("autolathe_o",src)//plays metal insertion animation
|
||||
|
||||
use_power(min(1000, amount_inserted / 100))
|
||||
updateUsrDialog()
|
||||
|
||||
@@ -160,18 +175,42 @@
|
||||
/////////////////
|
||||
|
||||
var/coeff = (is_stack ? 1 : prod_coeff) //stacks are unaffected by production coefficient
|
||||
var/metal_cost = being_built.materials[MAT_METAL]
|
||||
var/glass_cost = being_built.materials[MAT_GLASS]
|
||||
var/total_amount = 0
|
||||
|
||||
var/power = max(2000, (metal_cost+glass_cost)*multiplier/5)
|
||||
for(var/MAT in being_built.materials)
|
||||
total_amount += being_built.materials[MAT]
|
||||
|
||||
var/power = max(2000, (total_amount)*multiplier/5) //Change this to use all materials
|
||||
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
if((materials.amount(MAT_METAL) >= metal_cost*multiplier*coeff) && (materials.amount(MAT_GLASS) >= glass_cost*multiplier*coeff))
|
||||
|
||||
var/list/materials_used = list()
|
||||
var/list/custom_materials = list() //These will apply their material effect, This should usually only be one.
|
||||
|
||||
for(var/MAT in being_built.materials)
|
||||
var/datum/material/used_material = MAT
|
||||
var/amount_needed = being_built.materials[MAT] * coeff * multiplier
|
||||
if(istext(used_material)) //This means its a category
|
||||
var/list/list_to_show = list()
|
||||
for(var/i in SSmaterials.materials_by_category[used_material])
|
||||
if(materials.materials[i] > 0)
|
||||
list_to_show += i
|
||||
|
||||
used_material = input("Choose [used_material]", "Custom Material") as null|anything in list_to_show
|
||||
if(!used_material)
|
||||
return //Didn't pick any material, so you can't build shit either.
|
||||
custom_materials[used_material] += amount_needed
|
||||
|
||||
materials_used[used_material] = amount_needed
|
||||
|
||||
if(materials.has_materials(materials_used))
|
||||
busy = TRUE
|
||||
use_power(power)
|
||||
icon_state = "autolathe_n"
|
||||
var/time = is_stack ? 32 : 32*coeff*multiplier
|
||||
addtimer(CALLBACK(src, .proc/make_item, power, metal_cost, glass_cost, multiplier, coeff, is_stack), time)
|
||||
addtimer(CALLBACK(src, .proc/make_item, power, materials_used, custom_materials, multiplier, coeff, is_stack), time)
|
||||
else
|
||||
to_chat(usr, "<span class=\"alert\">Not enough materials for this operation.</span>")
|
||||
|
||||
if(href_list["search"])
|
||||
matching_designs.Cut()
|
||||
@@ -188,12 +227,11 @@
|
||||
|
||||
return
|
||||
|
||||
/obj/machinery/autolathe/proc/make_item(power, metal_cost, glass_cost, multiplier, coeff, is_stack)
|
||||
/obj/machinery/autolathe/proc/make_item(power, var/list/materials_used, var/list/picked_materials, multiplier, coeff, is_stack)
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
var/atom/A = drop_location()
|
||||
use_power(power)
|
||||
var/list/materials_used = list(MAT_METAL=metal_cost*coeff*multiplier, MAT_GLASS=glass_cost*coeff*multiplier)
|
||||
materials.use_amount(materials_used)
|
||||
materials.use_materials(materials_used)
|
||||
|
||||
if(is_stack)
|
||||
var/obj/item/stack/N = new being_built.build_path(A, multiplier)
|
||||
@@ -202,10 +240,11 @@
|
||||
else
|
||||
for(var/i=1, i<=multiplier, i++)
|
||||
var/obj/item/new_item = new being_built.build_path(A)
|
||||
new_item.materials = new_item.materials.Copy()
|
||||
for(var/mat in materials_used)
|
||||
new_item.materials[mat] = materials_used[mat] / multiplier
|
||||
new_item.autolathe_crafted(src)
|
||||
|
||||
if(length(picked_materials))
|
||||
new_item.set_custom_materials(picked_materials, 1 / multiplier) //Ensure we get the non multiplied amount
|
||||
|
||||
icon_state = "autolathe"
|
||||
busy = FALSE
|
||||
updateDialog()
|
||||
@@ -270,7 +309,9 @@
|
||||
|
||||
if(ispath(D.build_path, /obj/item/stack))
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
var/max_multiplier = min(D.maxstack, D.materials[MAT_METAL] ?round(materials.amount(MAT_METAL)/D.materials[MAT_METAL]):INFINITY,D.materials[MAT_GLASS]?round(materials.amount(MAT_GLASS)/D.materials[MAT_GLASS]):INFINITY)
|
||||
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)
|
||||
@@ -302,7 +343,9 @@
|
||||
|
||||
if(ispath(D.build_path, /obj/item/stack))
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
var/max_multiplier = min(D.maxstack, D.materials[MAT_METAL] ?round(materials.amount(MAT_METAL)/D.materials[MAT_METAL]):INFINITY,D.materials[MAT_GLASS]?round(materials.amount(MAT_GLASS)/D.materials[MAT_GLASS]):INFINITY)
|
||||
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)
|
||||
@@ -319,8 +362,10 @@
|
||||
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 = materials.materials[mat_id]
|
||||
dat += "<b>[M.name] amount:</b> [M.amount] cm<sup>3</sup><br>"
|
||||
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
|
||||
|
||||
/obj/machinery/autolathe/proc/can_build(datum/design/D, amount = 1)
|
||||
@@ -329,20 +374,24 @@
|
||||
|
||||
var/coeff = (ispath(D.build_path, /obj/item/stack) ? 1 : prod_coeff)
|
||||
|
||||
var/list/required_materials = list()
|
||||
|
||||
for(var/i in D.materials)
|
||||
required_materials[i] = D.materials[i] * coeff * amount
|
||||
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
if(D.materials[MAT_METAL] && (materials.amount(MAT_METAL) < (D.materials[MAT_METAL] * coeff * amount)))
|
||||
return FALSE
|
||||
if(D.materials[MAT_GLASS] && (materials.amount(MAT_GLASS) < (D.materials[MAT_GLASS] * coeff * amount)))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
return materials.has_materials(required_materials)
|
||||
|
||||
/obj/machinery/autolathe/proc/get_design_cost(datum/design/D)
|
||||
var/coeff = (ispath(D.build_path, /obj/item/stack) ? 1 : prod_coeff)
|
||||
var/dat
|
||||
if(D.materials[MAT_METAL])
|
||||
dat += "[D.materials[MAT_METAL] * coeff] metal "
|
||||
if(D.materials[MAT_GLASS])
|
||||
dat += "[D.materials[MAT_GLASS] * coeff] glass"
|
||||
for(var/i in D.materials)
|
||||
if(istext(i)) //Category handling
|
||||
dat += "[D.materials[i] * coeff] [i]"
|
||||
else
|
||||
var/datum/material/M = i
|
||||
dat += "[D.materials[i] * coeff] [M.name] "
|
||||
return dat
|
||||
|
||||
/obj/machinery/autolathe/proc/reset(wire)
|
||||
|
||||
@@ -54,16 +54,17 @@
|
||||
efficiency = E
|
||||
productivity = P
|
||||
|
||||
/obj/machinery/bloodbankgen/update_icon()
|
||||
cut_overlays()
|
||||
/obj/machinery/bloodbankgen/update_icon_state()
|
||||
if(is_operational())
|
||||
icon_state = "bloodbank-on"
|
||||
icon_state = "bloodbank-[is_operational() ? "on" : "off"]"
|
||||
|
||||
/obj/machinery/bloodbankgen/update_overlays()
|
||||
. = ..()
|
||||
if(panel_open)
|
||||
add_overlay("bloodbank-panel")
|
||||
. += "bloodbank-panel"
|
||||
|
||||
if(src.bag)
|
||||
add_overlay("bloodbag-input")
|
||||
if(bag)
|
||||
. += "bloodbag-input"
|
||||
if(bag.reagents.total_volume)
|
||||
var/mutable_appearance/filling_overlay = mutable_appearance(icon, "input-reagent")
|
||||
|
||||
@@ -85,10 +86,10 @@
|
||||
filling_overlay.icon_state = "input-reagent100"
|
||||
|
||||
filling_overlay.color = list(mix_color_from_reagents(bag.reagents.reagent_list))
|
||||
add_overlay(filling_overlay)
|
||||
. += filling_overlay
|
||||
|
||||
if(src.outbag)
|
||||
add_overlay("bloodbag-output")
|
||||
if(outbag)
|
||||
. += "bloodbag-output"
|
||||
if(outbag.reagents.total_volume)
|
||||
var/mutable_appearance/filling_overlay = mutable_appearance(icon, "output-reagent")
|
||||
|
||||
@@ -110,8 +111,7 @@
|
||||
filling_overlay.icon_state = "output-reagent100"
|
||||
|
||||
filling_overlay.color = list(mix_color_from_reagents(outbag.reagents.reagent_list))
|
||||
add_overlay(filling_overlay)
|
||||
return
|
||||
. += filling_overlay
|
||||
|
||||
/obj/machinery/bloodbankgen/process()
|
||||
if(!is_operational())
|
||||
@@ -274,20 +274,20 @@
|
||||
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/bloodbankgen/proc/detachinput()
|
||||
/obj/machinery/bloodbankgen/proc/detachinput(mob/user)
|
||||
if(bag)
|
||||
bag.forceMove(drop_location())
|
||||
if(usr && Adjacent(usr) && !issiliconoradminghost(usr))
|
||||
usr.put_in_hands(bag)
|
||||
if(user && Adjacent(usr) && user.can_hold_items())
|
||||
user.put_in_hands(bag)
|
||||
bag = null
|
||||
draining = null
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/bloodbankgen/proc/detachoutput()
|
||||
/obj/machinery/bloodbankgen/proc/detachoutput(mob/user)
|
||||
if(outbag)
|
||||
outbag.forceMove(drop_location())
|
||||
if(usr && Adjacent(usr) && !issiliconoradminghost(usr))
|
||||
usr.put_in_hands(outbag)
|
||||
if(user && Adjacent(user) && user.can_hold_items())
|
||||
user.put_in_hands(outbag)
|
||||
outbag = null
|
||||
filling = null
|
||||
update_icon()
|
||||
@@ -325,12 +325,12 @@
|
||||
activateinput()
|
||||
|
||||
else if(href_list["detachinput"])
|
||||
detachinput()
|
||||
detachinput(usr)
|
||||
|
||||
else if(href_list["activateoutput"])
|
||||
activateoutput()
|
||||
|
||||
else if(href_list["detachoutput"])
|
||||
detachoutput()
|
||||
detachoutput(usr)
|
||||
|
||||
updateUsrDialog()
|
||||
|
||||
@@ -265,4 +265,4 @@
|
||||
desc = "Used for building buttons."
|
||||
icon_state = "button"
|
||||
result_path = /obj/machinery/button
|
||||
materials = list(MAT_METAL=MINERAL_MATERIAL_AMOUNT)
|
||||
custom_materials = list(/datum/material/iron = MINERAL_MATERIAL_AMOUNT)
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
armor = list("melee" = 50, "bullet" = 20, "laser" = 20, "energy" = 20, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 90, "acid" = 50)
|
||||
max_integrity = 100
|
||||
integrity_failure = 50
|
||||
integrity_failure = 0.5
|
||||
var/list/network = list("ss13")
|
||||
var/c_tag = null
|
||||
var/status = TRUE
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
desc = "The basic construction for Nanotrasen-Always-Watching-You cameras."
|
||||
icon = 'icons/obj/machines/camera.dmi'
|
||||
icon_state = "cameracase"
|
||||
materials = list(MAT_METAL=400, MAT_GLASS=250)
|
||||
custom_materials = list(/datum/material/iron=400, /datum/material/glass=250)
|
||||
result_path = /obj/structure/camera_assembly
|
||||
|
||||
|
||||
|
||||
@@ -10,18 +10,19 @@
|
||||
circuit = /obj/item/circuitboard/machine/cell_charger
|
||||
pass_flags = PASSTABLE
|
||||
var/obj/item/stock_parts/cell/charging = null
|
||||
var/chargelevel = -1
|
||||
var/charge_rate = 500
|
||||
|
||||
/obj/machinery/cell_charger/update_icon()
|
||||
cut_overlays()
|
||||
if(charging)
|
||||
add_overlay(image(charging.icon, charging.icon_state))
|
||||
add_overlay("ccharger-on")
|
||||
if(!(stat & (BROKEN|NOPOWER)))
|
||||
var/newlevel = round(charging.percent() * 4 / 100)
|
||||
chargelevel = newlevel
|
||||
add_overlay("ccharger-o[newlevel]")
|
||||
/obj/machinery/cell_charger/update_overlays()
|
||||
. += ..()
|
||||
|
||||
if(!charging)
|
||||
return
|
||||
|
||||
. += mutable_appearance(charging.icon, charging.icon_state)
|
||||
. += "ccharger-on"
|
||||
if(!(stat & (BROKEN|NOPOWER)))
|
||||
var/newlevel = round(charging.percent() * 4 / 100)
|
||||
. += "ccharger-o[newlevel]"
|
||||
|
||||
/obj/machinery/cell_charger/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -54,7 +55,6 @@
|
||||
|
||||
charging = W
|
||||
user.visible_message("[user] inserts a cell into [src].", "<span class='notice'>You insert a cell into [src].</span>")
|
||||
chargelevel = -1
|
||||
update_icon()
|
||||
else
|
||||
if(!charging && default_deconstruction_screwdriver(user, icon_state, icon_state, W))
|
||||
@@ -77,7 +77,6 @@
|
||||
/obj/machinery/cell_charger/proc/removecell()
|
||||
charging.update_icon()
|
||||
charging = null
|
||||
chargelevel = -1
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/cell_charger/attack_hand(mob/user)
|
||||
|
||||
@@ -477,51 +477,51 @@
|
||||
|
||||
flesh_number = unattached_flesh.len
|
||||
|
||||
/obj/machinery/clonepod/update_icon()
|
||||
cut_overlays()
|
||||
|
||||
/obj/machinery/clonepod/update_icon_state()
|
||||
if(mess)
|
||||
icon_state = "pod_g"
|
||||
var/image/gib1 = image(CRYOMOBS, "gibup")
|
||||
var/image/gib2 = image(CRYOMOBS, "gibdown")
|
||||
gib1.pixel_y = 27 + round(sin(world.time) * 3)
|
||||
gib1.pixel_x = round(sin(world.time * 3))
|
||||
gib2.pixel_y = 27 + round(cos(world.time) * 3)
|
||||
gib2.pixel_x = round(cos(world.time * 3))
|
||||
add_overlay(gib2)
|
||||
add_overlay(gib1)
|
||||
add_overlay("cover-on")
|
||||
|
||||
else if(occupant)
|
||||
icon_state = "pod_1"
|
||||
|
||||
var/image/occupant_overlay
|
||||
var/completion = (flesh_number - unattached_flesh.len) / flesh_number
|
||||
|
||||
if(unattached_flesh.len <= 0)
|
||||
occupant_overlay = image(occupant.icon, occupant.icon_state)
|
||||
occupant_overlay.copy_overlays(occupant)
|
||||
else
|
||||
occupant_overlay = image(CRYOMOBS, "clone_meat")
|
||||
var/matrix/tform = matrix()
|
||||
tform.Scale(completion)
|
||||
tform.Turn(cos(world.time * 2) * 3)
|
||||
occupant_overlay.transform = tform
|
||||
occupant_overlay.appearance_flags = 0
|
||||
|
||||
occupant_overlay.dir = SOUTH
|
||||
occupant_overlay.pixel_y = 27 + round(sin(world.time) * 3)
|
||||
occupant_overlay.pixel_x = round(sin(world.time * 3))
|
||||
|
||||
add_overlay(occupant_overlay)
|
||||
add_overlay("cover-on")
|
||||
else
|
||||
icon_state = "pod_0"
|
||||
|
||||
if(panel_open)
|
||||
icon_state = "pod_0_maintenance"
|
||||
|
||||
add_overlay("panel")
|
||||
/obj/machinery/clonepod/update_overlays()
|
||||
. = ..()
|
||||
if(mess)
|
||||
var/mutable_appearance/gib1 = mutable_appearance(CRYOMOBS, "gibup")
|
||||
var/mutable_appearance/gib2 = mutable_appearance(CRYOMOBS, "gibdown")
|
||||
gib1.pixel_y = 27 + round(sin(world.time) * 3)
|
||||
gib1.pixel_x = round(sin(world.time * 3))
|
||||
gib2.pixel_y = 27 + round(cos(world.time) * 3)
|
||||
gib2.pixel_x = round(cos(world.time * 3))
|
||||
. += gib2
|
||||
. += gib1
|
||||
else if(occupant)
|
||||
var/mutable_appearance/occupant_overlay
|
||||
var/completion = (flesh_number - unattached_flesh.len) / flesh_number
|
||||
|
||||
if(unattached_flesh.len <= 0)
|
||||
occupant_overlay = mutable_appearance(occupant.icon, occupant.icon_state)
|
||||
occupant_overlay.copy_overlays(occupant)
|
||||
. += "cover-on"
|
||||
else
|
||||
occupant_overlay = mutable_appearance(CRYOMOBS, "clone_meat")
|
||||
var/matrix/tform = matrix()
|
||||
tform.Scale(completion)
|
||||
tform.Turn(cos(world.time * 2) * 3)
|
||||
occupant_overlay.transform = tform
|
||||
occupant_overlay.appearance_flags = NONE
|
||||
|
||||
occupant_overlay.dir = SOUTH
|
||||
occupant_overlay.pixel_y = 27 + round(sin(world.time) * 3)
|
||||
occupant_overlay.pixel_x = round(sin(world.time * 3))
|
||||
|
||||
. += occupant_overlay
|
||||
. += "cover-on"
|
||||
. += "panel"
|
||||
|
||||
/*
|
||||
* Manual -- A big ol' manual.
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
idle_power_usage = 300
|
||||
active_power_usage = 300
|
||||
max_integrity = 200
|
||||
integrity_failure = 100
|
||||
integrity_failure = 0.5
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 40, "acid" = 20)
|
||||
var/brightness_on = 1
|
||||
var/icon_keyboard = "generic_key"
|
||||
@@ -48,13 +48,13 @@
|
||||
icon_state = initial(icon_state)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/computer/update_icon()
|
||||
cut_overlays()
|
||||
/obj/machinery/computer/update_overlays()
|
||||
. = ..()
|
||||
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
|
||||
if(stat & NOPOWER)
|
||||
add_overlay("[icon_keyboard]_off")
|
||||
. += "[icon_keyboard]_off"
|
||||
return
|
||||
add_overlay(icon_keyboard)
|
||||
. += icon_keyboard
|
||||
|
||||
// This whole block lets screens ignore lighting and be visible even in the darkest room
|
||||
// We can't do this for many things that emit light unfortunately because it layers over things that would be on top of it
|
||||
|
||||
@@ -103,21 +103,20 @@
|
||||
add_fingerprint(usr)
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/computer/aifixer/update_icon()
|
||||
..()
|
||||
/obj/machinery/computer/aifixer/update_overlays()
|
||||
. = ..()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
if(active)
|
||||
. += "ai-fixer-on"
|
||||
if (occupier)
|
||||
switch (occupier.stat)
|
||||
if (0)
|
||||
. += "ai-fixer-full"
|
||||
if (2)
|
||||
. += "ai-fixer-404"
|
||||
else
|
||||
if(active)
|
||||
add_overlay("ai-fixer-on")
|
||||
if (occupier)
|
||||
switch (occupier.stat)
|
||||
if (0)
|
||||
add_overlay("ai-fixer-full")
|
||||
if (2)
|
||||
add_overlay("ai-fixer-404")
|
||||
else
|
||||
add_overlay("ai-fixer-empty")
|
||||
. += "ai-fixer-empty"
|
||||
|
||||
/obj/machinery/computer/aifixer/transfer_ai(interaction, mob/user, mob/living/silicon/ai/AI, obj/item/aicard/card)
|
||||
if(!..())
|
||||
|
||||
@@ -217,7 +217,7 @@
|
||||
M.vomit(10, distance = 5)
|
||||
if(ORION_TRAIL_FLUX)
|
||||
if(prob(75))
|
||||
M.Knockdown(60)
|
||||
M.DefaultCombatKnockdown(60)
|
||||
say("A sudden gust of powerful wind slams [M] into the floor!")
|
||||
M.take_bodypart_damage(25)
|
||||
playsound(loc, 'sound/weapons/genhit.ogg', 100, 1)
|
||||
|
||||
@@ -78,23 +78,20 @@
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/machinery/computer/atmos_alert/update_icon()
|
||||
..()
|
||||
cut_overlays()
|
||||
/obj/machinery/computer/atmos_alert/update_overlays()
|
||||
. = ..()
|
||||
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
|
||||
var/overlay_state = icon_screen
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
add_overlay("[icon_keyboard]_off")
|
||||
. |= "[icon_keyboard]_off"
|
||||
return
|
||||
add_overlay(icon_keyboard)
|
||||
. |= icon_keyboard
|
||||
if(priority_alarms.len)
|
||||
overlay_state = "alert:2"
|
||||
add_overlay("alert:2")
|
||||
else if(minor_alarms.len)
|
||||
overlay_state = "alert:1"
|
||||
add_overlay("alert:1")
|
||||
else
|
||||
overlay_state = "alert:0"
|
||||
add_overlay("alert:0")
|
||||
. |= overlay_state
|
||||
SSvis_overlays.add_vis_overlay(src, icon, overlay_state, layer, plane, dir)
|
||||
SSvis_overlays.add_vis_overlay(src, icon, overlay_state, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir, alpha=128)
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
name = "incinerator chamber gas sensor"
|
||||
id_tag = ATMOS_GAS_MONITOR_SENSOR_INCINERATOR
|
||||
|
||||
/obj/machinery/air_sensor/update_icon()
|
||||
/obj/machinery/air_sensor/update_icon_state()
|
||||
icon_state = "gsensor[on]"
|
||||
|
||||
/obj/machinery/air_sensor/process_atmos()
|
||||
|
||||
@@ -175,11 +175,10 @@
|
||||
clockwork = TRUE //it'd look very weird
|
||||
light_power = 0
|
||||
|
||||
/obj/machinery/computer/security/telescreen/update_icon()
|
||||
/obj/machinery/computer/security/telescreen/update_icon_state()
|
||||
icon_state = initial(icon_state)
|
||||
if(stat & BROKEN)
|
||||
icon_state += "b"
|
||||
return
|
||||
|
||||
/obj/machinery/computer/security/telescreen/entertainment
|
||||
name = "entertainment monitor"
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
playsound(src, 'sound/machines/terminal_off.ogg', 25, 0)
|
||||
|
||||
/obj/machinery/computer/camera_advanced/check_eye(mob/user)
|
||||
if( (stat & (NOPOWER|BROKEN)) || (!Adjacent(user) && !user.has_unlimited_silicon_privilege) || user.eye_blind || user.incapacitated() )
|
||||
if( (stat & (NOPOWER|BROKEN)) || (!Adjacent(user) && hasSiliconAccessInArea(user)) || user.eye_blind || user.incapacitated() )
|
||||
user.unset_machine()
|
||||
|
||||
/obj/machinery/computer/camera_advanced/Destroy()
|
||||
|
||||
@@ -194,7 +194,7 @@
|
||||
state = STATE_CANCELSHUTTLE
|
||||
if("cancelshuttle2")
|
||||
if(authenticated)
|
||||
if((world.realtime - SSshuttle.realtimeofstart) > SSshuttle.auto_call) //Citadel Edit Removing auto_call caused recall.
|
||||
if(SSshuttle.endvote_passed) //Citadel Edit - endvote passing = no recalls
|
||||
say("Warning: Emergency shuttle recalls have been blocked by Central Command due to ongoing crew transfer procedures.")
|
||||
else
|
||||
SSshuttle.cancelEvac(usr)
|
||||
|
||||
@@ -40,6 +40,7 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new)
|
||||
jobs["Geneticist"] = 22
|
||||
jobs["Virologist"] = 23
|
||||
jobs["Medical Doctor"] = 24
|
||||
jobs["Paramedic"] = 25
|
||||
jobs["Research Director"] = 30
|
||||
jobs["Scientist"] = 31
|
||||
jobs["Roboticist"] = 32
|
||||
@@ -207,4 +208,4 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new)
|
||||
if ("select_person")
|
||||
AI.ai_camera_track(params["name"])
|
||||
|
||||
#undef SENSORS_UPDATE_PERIOD
|
||||
#undef SENSORS_UPDATE_PERIOD
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
if(5)
|
||||
dat += "<CENTER><B>Virus Database</B></CENTER>"
|
||||
for(var/Dt in typesof(/datum/disease/))
|
||||
var/datum/disease/Dis = new Dt(0)
|
||||
var/datum/disease/Dis = new Dt(FALSE)
|
||||
if(istype(Dis, /datum/disease/advance))
|
||||
continue // TODO (tm): Add advance diseases to the virus database which no one uses.
|
||||
if(!Dis.desc)
|
||||
@@ -248,7 +248,7 @@
|
||||
|
||||
else if(href_list["vir"])
|
||||
var/type = href_list["vir"]
|
||||
var/datum/disease/Dis = new type(0)
|
||||
var/datum/disease/Dis = new type(FALSE)
|
||||
var/AfS = ""
|
||||
for(var/mob/M in Dis.viable_mobtypes)
|
||||
AfS += " [initial(M.name)];"
|
||||
|
||||
@@ -37,12 +37,11 @@
|
||||
dat += "[R.name] |"
|
||||
if(R.stat)
|
||||
dat += " Not Responding |"
|
||||
else if (!R.canmove)
|
||||
else if(R.locked_down)
|
||||
dat += " Locked Down |"
|
||||
else
|
||||
dat += " Operating Normally |"
|
||||
if (!R.canmove)
|
||||
else if(R.cell)
|
||||
if(R.cell)
|
||||
dat += " Battery Installed ([R.cell.charge]/[R.cell.maxcharge]) |"
|
||||
else
|
||||
dat += " No Cell Installed |"
|
||||
@@ -62,7 +61,7 @@
|
||||
dat += "<A href='?src=[REF(src)];magbot=[REF(R)]'>(<font color=blue><i>Hack</i></font>)</A> "
|
||||
else if(IsAdminGhost(user) && !R.emagged)
|
||||
dat += "<A href='?src=[REF(src)];magbot=[REF(R)]'>(<font color=blue><i>Hack</i></font>)</A> "
|
||||
dat += "<A href='?src=[REF(src)];stopbot=[REF(R)]'>(<font color=green><i>[R.canmove ? "Lockdown" : "Release"]</i></font>)</A> "
|
||||
dat += "<A href='?src=[REF(src)];stopbot=[REF(R)]'>(<font color=green><i>[R.locked_down? "Lockdown" : "Release"]</i></font>)</A> "
|
||||
dat += "<A href='?src=[REF(src)];killbot=[REF(R)]'>(<font color=red><i>Destroy</i></font>)</A>"
|
||||
dat += "<BR>"
|
||||
|
||||
@@ -116,14 +115,14 @@
|
||||
if(src.allowed(usr))
|
||||
var/mob/living/silicon/robot/R = locate(href_list["stopbot"]) in GLOB.silicon_mobs
|
||||
if(can_control(usr, R))
|
||||
var/choice = input("Are you certain you wish to [R.canmove ? "lock down" : "release"] [R.name]?") in list("Confirm", "Abort")
|
||||
var/choice = input("Are you certain you wish to [R.locked_down? "lock down" : "release"] [R.name]?") in list("Confirm", "Abort")
|
||||
if(choice == "Confirm" && can_control(usr, R) && !..())
|
||||
message_admins("<span class='notice'>[ADMIN_LOOKUPFLW(usr)] [R.canmove ? "locked down" : "released"] [key_name(R, R.client)][ADMIN_LOOKUPFLW(R)]!</span>")
|
||||
log_game("[key_name(usr)] [R.canmove ? "locked down" : "released"] [key_name(R)]!")
|
||||
R.SetLockdown(!R.lockcharge)
|
||||
to_chat(R, "[!R.lockcharge ? "<span class='notice'>Your lockdown has been lifted!" : "<span class='alert'>You have been locked down!"]</span>")
|
||||
message_admins("<span class='notice'>[ADMIN_LOOKUPFLW(usr)] [R.locked_down? "locked down" : "released"] [key_name(R, R.client)][ADMIN_LOOKUPFLW(R)]!</span>")
|
||||
log_game("[key_name(usr)] [R.locked_down? "locked down" : "released"] [key_name(R)]!")
|
||||
R.SetLockdown(!R.locked_down)
|
||||
to_chat(R, "[!R.locked_down ? "<span class='notice'>Your lockdown has been lifted!" : "<span class='alert'>You have been locked down!"]</span>")
|
||||
if(R.connected_ai)
|
||||
to_chat(R.connected_ai, "[!R.lockcharge ? "<span class='notice'>NOTICE - Cyborg lockdown lifted" : "<span class='alert'>ALERT - Cyborg lockdown detected"]: <a href='?src=[REF(R.connected_ai)];track=[html_encode(R.name)]'>[R.name]</a></span><br>")
|
||||
to_chat(R.connected_ai, "[!R.locked_down ? "<span class='notice'>NOTICE - Cyborg lockdown lifted" : "<span class='alert'>ALERT - Cyborg lockdown detected"]: <a href='?src=[REF(R.connected_ai)];track=[html_encode(R.name)]'>[R.name]</a></span><br>")
|
||||
|
||||
else
|
||||
to_chat(usr, "<span class='danger'>Access Denied.</span>")
|
||||
|
||||
@@ -75,25 +75,23 @@
|
||||
L -= I
|
||||
return !cleared
|
||||
|
||||
/obj/machinery/computer/station_alert/update_icon()
|
||||
..()
|
||||
cut_overlays()
|
||||
/obj/machinery/computer/station_alert/update_overlays()
|
||||
. = ..()
|
||||
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
|
||||
var/overlay_state = icon_screen
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
add_overlay("[icon_keyboard]_off")
|
||||
. |= "[icon_keyboard]_off"
|
||||
return
|
||||
add_overlay(icon_keyboard)
|
||||
. |= icon_keyboard
|
||||
var/active_alarms = FALSE
|
||||
for(var/cat in alarms)
|
||||
var/list/L = alarms[cat]
|
||||
if(L.len)
|
||||
if(length(alarms[cat]))
|
||||
active_alarms = TRUE
|
||||
break
|
||||
if(active_alarms)
|
||||
overlay_state = "alert:2"
|
||||
add_overlay("alert:2")
|
||||
else
|
||||
overlay_state = "alert:0"
|
||||
add_overlay("alert:0")
|
||||
. |= overlay_state
|
||||
SSvis_overlays.add_vis_overlay(src, icon, overlay_state, layer, plane, dir)
|
||||
SSvis_overlays.add_vis_overlay(src, icon, overlay_state, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir, alpha=128)
|
||||
SSvis_overlays.add_vis_overlay(src, icon, overlay_state, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir, alpha=128)
|
||||
@@ -44,8 +44,8 @@ GLOBAL_LIST_INIT(possible_uplinker_IDs, list("Alfa","Bravo","Charlie","Delta","E
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[I] doesn't appear to be an uplink...</span>")
|
||||
|
||||
/obj/machinery/computer/telecrystals/uplinker/update_icon()
|
||||
..()
|
||||
/obj/machinery/computer/telecrystals/uplinker/update_overlays()
|
||||
. = ..()
|
||||
if(uplinkholder)
|
||||
add_overlay("[initial(icon_state)]-closed")
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
|
||||
|
||||
I.forceMove(drop_location())
|
||||
if(user && Adjacent(user) && !issiliconoradminghost(user))
|
||||
if(user && Adjacent(user) && user.can_hold_items())
|
||||
user.put_in_hands(I)
|
||||
frozen_items -= I
|
||||
updateUsrDialog()
|
||||
@@ -287,6 +287,7 @@
|
||||
#define CRYO_PRESERVE 1
|
||||
#define CRYO_OBJECTIVE 2
|
||||
#define CRYO_IGNORE 3
|
||||
#define CRYO_DESTROY_LATER 4
|
||||
|
||||
/obj/machinery/cryopod/proc/should_preserve_item(obj/item/I)
|
||||
for(var/datum/objective_item/steal/T in control_computer.theft_cache)
|
||||
@@ -308,8 +309,8 @@
|
||||
if(iscyborg(mob_occupant))
|
||||
var/mob/living/silicon/robot/R = mob_occupant
|
||||
if(R.mmi?.brain)
|
||||
cryo_items[R.mmi] = CRYO_IGNORE
|
||||
cryo_items[R.mmi.brain] = CRYO_IGNORE
|
||||
cryo_items[R.mmi] = CRYO_DESTROY_LATER
|
||||
cryo_items[R.mmi.brain] = CRYO_DESTROY_LATER
|
||||
for(var/obj/item/I in R.module) // the tools the borg has; metal, glass, guns etc
|
||||
for(var/obj/item/O in I) // the things inside the tools, if anything; mainly for janiborg trash bags
|
||||
cryo_items[O] = should_preserve_item(O)
|
||||
@@ -318,7 +319,7 @@
|
||||
|
||||
//Drop all items into the pod.
|
||||
for(var/obj/item/I in mob_occupant)
|
||||
if(cryo_items[I] == CRYO_IGNORE)
|
||||
if(cryo_items[I] == CRYO_IGNORE || cryo_items[I] ==CRYO_DESTROY_LATER)
|
||||
continue
|
||||
cryo_items[I] = should_preserve_item(I)
|
||||
mob_occupant.transferItemToLoc(I, src, TRUE)
|
||||
@@ -334,17 +335,19 @@
|
||||
if(QDELETED(I)) //edge cases and DROPDEL.
|
||||
continue
|
||||
var/preserve = cryo_items[I]
|
||||
if(preserve == CRYO_IGNORE)
|
||||
if(preserve == CRYO_DESTROY_LATER)
|
||||
continue
|
||||
else if(preserve == CRYO_DESTROY)
|
||||
qdel(I)
|
||||
else if(control_computer?.allow_items)
|
||||
control_computer.frozen_items += I
|
||||
if(preserve == CRYO_OBJECTIVE)
|
||||
control_computer.objective_items += I
|
||||
I.moveToNullspace()
|
||||
else
|
||||
I.forceMove(loc)
|
||||
if(preserve != CRYO_IGNORE)
|
||||
if(preserve == CRYO_DESTROY)
|
||||
qdel(I)
|
||||
else if(control_computer?.allow_items)
|
||||
control_computer.frozen_items += I
|
||||
if(preserve == CRYO_OBJECTIVE)
|
||||
control_computer.objective_items += I
|
||||
I.moveToNullspace()
|
||||
else
|
||||
I.forceMove(loc)
|
||||
cryo_items -= I
|
||||
|
||||
//Update any existing objectives involving this mob.
|
||||
for(var/datum/objective/O in GLOB.objectives)
|
||||
@@ -405,6 +408,10 @@
|
||||
mob_occupant.ghostize(FALSE, penalize = TRUE)
|
||||
|
||||
QDEL_NULL(occupant)
|
||||
for(var/I in cryo_items) //only "CRYO_DESTROY_LATER" atoms are left)
|
||||
var/atom/A = I
|
||||
if(!QDELETED(A))
|
||||
qdel(A)
|
||||
open_machine()
|
||||
name = initial(name)
|
||||
|
||||
@@ -412,6 +419,7 @@
|
||||
#undef CRYO_PRESERVE
|
||||
#undef CRYO_OBJECTIVE
|
||||
#undef CRYO_IGNORE
|
||||
#undef CRYO_DESTROY_LATER
|
||||
|
||||
/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)
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/machinery/jukebox/update_icon()
|
||||
/obj/machinery/jukebox/update_icon_state()
|
||||
if(active)
|
||||
icon_state = "[initial(icon_state)]-active"
|
||||
else
|
||||
@@ -433,5 +433,5 @@
|
||||
. = ..()
|
||||
if(active)
|
||||
for(var/mob/living/M in rangers)
|
||||
if(prob(5+(allowed(M)*4)) && M.canmove)
|
||||
if(prob(5+(allowed(M)*4)) && CHECK_MOBILITY(M, MOBILITY_MOVE))
|
||||
dance(M)
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
desc = "A frame for a defibrillator mount. It can't be removed once it's placed."
|
||||
icon = 'icons/obj/machines/defib_mount.dmi'
|
||||
icon_state = "defibrillator_mount"
|
||||
materials = list(MAT_METAL = 300, MAT_GLASS = 100)
|
||||
custom_materials = list(/datum/material/iron = 300, /datum/material/glass = 100)
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
result_path = /obj/machinery/defibrillator_mount
|
||||
pixel_shift = -28
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
density = TRUE
|
||||
max_integrity = 100
|
||||
var/proj_pass_rate = 50 //How many projectiles will pass the cover. Lower means stronger cover
|
||||
var/material = METAL
|
||||
var/bar_material = METAL
|
||||
|
||||
/obj/structure/barricade/deconstruct(disassembled = TRUE)
|
||||
if(!(flags_1 & NODECONSTRUCT_1))
|
||||
@@ -26,7 +26,7 @@
|
||||
return
|
||||
|
||||
/obj/structure/barricade/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weldingtool) && user.a_intent != INTENT_HARM && material == METAL)
|
||||
if(istype(I, /obj/item/weldingtool) && user.a_intent != INTENT_HARM && bar_material == METAL)
|
||||
if(obj_integrity < max_integrity)
|
||||
if(!I.tool_start_check(user, amount=0))
|
||||
return
|
||||
@@ -61,7 +61,7 @@
|
||||
desc = "This space is blocked off by a wooden barricade."
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
icon_state = "woodenbarricade"
|
||||
material = WOOD
|
||||
bar_material = WOOD
|
||||
var/drop_amount = 3
|
||||
|
||||
/obj/structure/barricade/wooden/attackby(obj/item/I, mob/user)
|
||||
@@ -106,7 +106,7 @@
|
||||
max_integrity = 280
|
||||
proj_pass_rate = 20
|
||||
pass_flags = LETPASSTHROW
|
||||
material = SAND
|
||||
bar_material = SAND
|
||||
climbable = TRUE
|
||||
smooth = SMOOTH_TRUE
|
||||
canSmoothWith = list(/obj/structure/barricade/sandbags, /turf/closed/wall, /turf/closed/wall/r_wall, /obj/structure/falsewall, /obj/structure/falsewall/reinforced, /turf/closed/wall/rust, /turf/closed/wall/r_wall/rust, /obj/structure/barricade/security)
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
if(scan_level >= 3)
|
||||
. += "<span class='notice'>Scanner has been upgraded to support autoprocessing.<span>"
|
||||
|
||||
/obj/machinery/dna_scannernew/update_icon()
|
||||
/obj/machinery/dna_scannernew/update_icon_state()
|
||||
|
||||
//no power or maintenance
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
icon_state = "closed"
|
||||
max_integrity = 300
|
||||
var/normal_integrity = AIRLOCK_INTEGRITY_N
|
||||
integrity_failure = 70
|
||||
integrity_failure = 0.25
|
||||
damage_deflection = AIRLOCK_DAMAGE_DEFLECTION_N
|
||||
autoclose = TRUE
|
||||
secondsElectrified = 0 //How many seconds remain until the door is no longer electrified. -1 if it is permanently electrified until someone fixes it.
|
||||
@@ -469,7 +469,7 @@
|
||||
panel_overlay = get_airlock_overlay("panel_closed", overlays_file)
|
||||
if(welded)
|
||||
weld_overlay = get_airlock_overlay("welded", overlays_file)
|
||||
if(obj_integrity <integrity_failure)
|
||||
if(obj_integrity < integrity_failure * max_integrity)
|
||||
damag_overlay = get_airlock_overlay("sparks_broken", overlays_file, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE)
|
||||
else if(obj_integrity < (0.75 * max_integrity))
|
||||
damag_overlay = get_airlock_overlay("sparks_damaged", overlays_file, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE)
|
||||
@@ -495,7 +495,7 @@
|
||||
panel_overlay = get_airlock_overlay("panel_closed_protected", overlays_file)
|
||||
else
|
||||
panel_overlay = get_airlock_overlay("panel_closed", overlays_file)
|
||||
if(obj_integrity <integrity_failure)
|
||||
if(obj_integrity < integrity_failure * max_integrity)
|
||||
damag_overlay = get_airlock_overlay("sparks_broken", overlays_file, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE)
|
||||
else if(obj_integrity < (0.75 * max_integrity))
|
||||
damag_overlay = get_airlock_overlay("sparks_damaged", overlays_file, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE)
|
||||
@@ -517,7 +517,7 @@
|
||||
panel_overlay = get_airlock_overlay("panel_closed_protected", overlays_file)
|
||||
else
|
||||
panel_overlay = get_airlock_overlay("panel_closed", overlays_file)
|
||||
if(obj_integrity <integrity_failure)
|
||||
if(obj_integrity < integrity_failure * max_integrity)
|
||||
damag_overlay = get_airlock_overlay("sparks_broken", overlays_file, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE)
|
||||
else if(obj_integrity < (0.75 * max_integrity))
|
||||
damag_overlay = get_airlock_overlay("sparks_damaged", overlays_file, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE)
|
||||
@@ -769,7 +769,7 @@
|
||||
if(!istype(H.head, /obj/item/clothing/head/helmet))
|
||||
H.visible_message("<span class='danger'>[user] headbutts the airlock.</span>", \
|
||||
"<span class='userdanger'>You headbutt the airlock!</span>")
|
||||
H.Knockdown(100)
|
||||
H.DefaultCombatKnockdown(100)
|
||||
H.apply_damage(10, BRUTE, BODY_ZONE_HEAD)
|
||||
else
|
||||
visible_message("<span class='danger'>[user] headbutts the airlock. Good thing [user.p_theyre()] wearing a helmet.</span>")
|
||||
@@ -1033,7 +1033,7 @@
|
||||
if(!I.use_tool(src, user, 150, volume=50))
|
||||
to_chat(user, "<span class='warning'>You slip and [charge] detonates!</span>")
|
||||
charge.ex_act(EXPLODE_DEVASTATE)
|
||||
user.Knockdown(60)
|
||||
user.DefaultCombatKnockdown(60)
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] removes [charge] from [src].</span>", \
|
||||
"<span class='notice'>You gently pry out [charge] from [src] and unhook its wires.</span>")
|
||||
|
||||
@@ -508,7 +508,7 @@
|
||||
throwtarget = get_edge_target_turf(src, get_dir(src, get_step_away(L, src)))
|
||||
SEND_SOUND(L, sound(pick('sound/hallucinations/turn_around1.ogg','sound/hallucinations/turn_around2.ogg'),0,1,50))
|
||||
flash_color(L, flash_color="#960000", flash_time=20)
|
||||
L.Knockdown(40)
|
||||
L.DefaultCombatKnockdown(40)
|
||||
L.throw_at(throwtarget, 5, 1)
|
||||
return 0
|
||||
|
||||
|
||||
@@ -230,7 +230,7 @@
|
||||
/obj/machinery/door/proc/unelectrify()
|
||||
secondsElectrified = 0
|
||||
|
||||
/obj/machinery/door/update_icon()
|
||||
/obj/machinery/door/update_icon_state()
|
||||
if(density)
|
||||
icon_state = "door1"
|
||||
else
|
||||
@@ -319,10 +319,10 @@
|
||||
else if(ishuman(L)) //For humans
|
||||
L.adjustBruteLoss(DOOR_CRUSH_DAMAGE)
|
||||
L.emote("scream")
|
||||
L.Knockdown(100)
|
||||
L.DefaultCombatKnockdown(100)
|
||||
else if(ismonkey(L)) //For monkeys
|
||||
L.adjustBruteLoss(DOOR_CRUSH_DAMAGE)
|
||||
L.Knockdown(100)
|
||||
L.DefaultCombatKnockdown(100)
|
||||
else //for simple_animals & borgs
|
||||
L.adjustBruteLoss(DOOR_CRUSH_DAMAGE)
|
||||
var/turf/location = get_turf(src)
|
||||
|
||||
@@ -171,16 +171,20 @@
|
||||
if("closing")
|
||||
flick("door_closing", src)
|
||||
|
||||
/obj/machinery/door/firedoor/update_icon()
|
||||
cut_overlays()
|
||||
/obj/machinery/door/firedoor/update_icon_state()
|
||||
if(density)
|
||||
icon_state = "door_closed"
|
||||
if(welded)
|
||||
add_overlay("welded")
|
||||
else
|
||||
icon_state = "door_open"
|
||||
if(welded)
|
||||
add_overlay("welded_open")
|
||||
|
||||
/obj/machinery/door/firedoor/update_overlays()
|
||||
. = ..()
|
||||
if(!welded)
|
||||
return
|
||||
if(density)
|
||||
. += "welded"
|
||||
else
|
||||
. += "welded_open"
|
||||
|
||||
/obj/machinery/door/firedoor/open()
|
||||
. = ..()
|
||||
@@ -283,8 +287,7 @@
|
||||
if(CONSTRUCTION_NOCIRCUIT)
|
||||
. += "<span class='notice'>There are no <i>firelock electronics</i> in the frame. The frame could be <b>cut</b> apart.</span>"
|
||||
|
||||
/obj/structure/firelock_frame/update_icon()
|
||||
..()
|
||||
/obj/structure/firelock_frame/update_icon_state()
|
||||
icon_state = "frame[constructionStep]"
|
||||
|
||||
/obj/structure/firelock_frame/attackby(obj/item/C, mob/user)
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
else
|
||||
do_animate("deny")
|
||||
|
||||
/obj/machinery/door/password/update_icon()
|
||||
/obj/machinery/door/password/update_icon_state()
|
||||
if(density)
|
||||
icon_state = "closed"
|
||||
else
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
flick("closing", src)
|
||||
playsound(src, 'sound/machines/blastdoor.ogg', 30, 1)
|
||||
|
||||
/obj/machinery/door/poddoor/update_icon()
|
||||
/obj/machinery/door/poddoor/update_icon_state()
|
||||
if(density)
|
||||
icon_state = "closed"
|
||||
else
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
electronics = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/door/window/update_icon()
|
||||
/obj/machinery/door/window/update_icon_state()
|
||||
if(density)
|
||||
icon_state = base_state
|
||||
else
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
density = TRUE
|
||||
|
||||
max_integrity = 250
|
||||
integrity_failure = 80
|
||||
integrity_failure = 0.33
|
||||
|
||||
// These allow for different icons when creating custom dispensers
|
||||
var/icon_off = "off"
|
||||
@@ -50,10 +50,10 @@
|
||||
|
||||
/obj/machinery/droneDispenser/Initialize()
|
||||
. = ..()
|
||||
var/datum/component/material_container/materials = AddComponent(/datum/component/material_container, list(MAT_METAL, MAT_GLASS), MINERAL_MATERIAL_AMOUNT * MAX_STACK_SIZE * 2, TRUE, /obj/item/stack)
|
||||
materials.insert_amount(starting_amount)
|
||||
var/datum/component/material_container/materials = AddComponent(/datum/component/material_container, list(/datum/material/iron, /datum/material/glass), MINERAL_MATERIAL_AMOUNT * MAX_STACK_SIZE * 2, TRUE, /obj/item/stack)
|
||||
materials.insert_amount_mat(starting_amount)
|
||||
materials.precise_insertion = TRUE
|
||||
using_materials = list(MAT_METAL=metal_cost, MAT_GLASS=glass_cost)
|
||||
using_materials = list(/datum/material/iron = metal_cost, /datum/material/glass = glass_cost)
|
||||
|
||||
/obj/machinery/droneDispenser/preloaded
|
||||
starting_amount = 5000
|
||||
@@ -168,7 +168,7 @@
|
||||
update_icon()
|
||||
|
||||
if(DRONE_PRODUCTION)
|
||||
materials.use_amount(using_materials)
|
||||
materials.use_materials(using_materials)
|
||||
if(power_used)
|
||||
use_power(power_used)
|
||||
|
||||
@@ -199,7 +199,7 @@
|
||||
if(istype(a, dispense_type))
|
||||
.++
|
||||
|
||||
/obj/machinery/droneDispenser/update_icon()
|
||||
/obj/machinery/droneDispenser/update_icon_state()
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
icon_state = icon_off
|
||||
else if(mode == DRONE_RECHARGING)
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
busy = FALSE
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/doorButtons/access_button/update_icon()
|
||||
/obj/machinery/doorButtons/access_button/update_icon_state()
|
||||
if(stat & NOPOWER)
|
||||
icon_state = "access_button_off"
|
||||
else
|
||||
@@ -249,7 +249,7 @@
|
||||
else if(A.id_tag == idExterior)
|
||||
exteriorAirlock = A
|
||||
|
||||
/obj/machinery/doorButtons/airlock_controller/update_icon()
|
||||
/obj/machinery/doorButtons/airlock_controller/update_icon_state()
|
||||
if(stat & NOPOWER)
|
||||
icon_state = "access_control_off"
|
||||
return
|
||||
|
||||
@@ -255,7 +255,7 @@
|
||||
new_prog.master = src
|
||||
program = new_prog
|
||||
|
||||
/obj/machinery/embedded_controller/radio/airlock_controller/update_icon()
|
||||
/obj/machinery/embedded_controller/radio/airlock_controller/update_icon_state()
|
||||
if(on && program)
|
||||
if(program.memory["processing"])
|
||||
icon_state = "airlock_control_process"
|
||||
|
||||
@@ -33,8 +33,6 @@
|
||||
popup.set_content(return_text())
|
||||
popup.open()
|
||||
|
||||
/obj/machinery/embedded_controller/update_icon()
|
||||
|
||||
/obj/machinery/embedded_controller/proc/return_text()
|
||||
|
||||
/obj/machinery/embedded_controller/proc/post_signal(datum/signal/signal, comm_line)
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
new_prog.master = src
|
||||
program = new_prog
|
||||
|
||||
/obj/machinery/embedded_controller/radio/simple_vent_controller/update_icon()
|
||||
/obj/machinery/embedded_controller/radio/simple_vent_controller/update_icon_state()
|
||||
if(on && program)
|
||||
icon_state = "airlock_control_standby"
|
||||
else
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
icon = 'icons/obj/monitors.dmi'
|
||||
icon_state = "fire0"
|
||||
max_integrity = 250
|
||||
integrity_failure = 100
|
||||
integrity_failure = 0.4
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 90, "acid" = 30)
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 2
|
||||
@@ -55,10 +55,7 @@
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/firealarm/update_icon()
|
||||
cut_overlays()
|
||||
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
|
||||
|
||||
/obj/machinery/firealarm/update_icon_state()
|
||||
if(panel_open)
|
||||
icon_state = "fire_b[buildstage]"
|
||||
return
|
||||
@@ -72,26 +69,30 @@
|
||||
if(stat & NOPOWER)
|
||||
return
|
||||
|
||||
add_overlay("fire_overlay")
|
||||
/obj/machinery/firealarm/update_overlays()
|
||||
. = ..()
|
||||
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
|
||||
|
||||
. += "fire_overlay"
|
||||
|
||||
if(is_station_level(z))
|
||||
add_overlay("fire_[GLOB.security_level]")
|
||||
. += "fire_[GLOB.security_level]"
|
||||
SSvis_overlays.add_vis_overlay(src, icon, "fire_[GLOB.security_level]", ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir)
|
||||
else
|
||||
add_overlay("fire_[SEC_LEVEL_GREEN]")
|
||||
. += "fire_[SEC_LEVEL_GREEN]"
|
||||
SSvis_overlays.add_vis_overlay(src, icon, "fire_[SEC_LEVEL_GREEN]", ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir)
|
||||
|
||||
var/area/A = src.loc
|
||||
A = A.loc
|
||||
|
||||
if(!detecting || !A.fire)
|
||||
add_overlay("fire_off")
|
||||
. += "fire_off"
|
||||
SSvis_overlays.add_vis_overlay(src, icon, "fire_off", ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir)
|
||||
else if(obj_flags & EMAGGED)
|
||||
add_overlay("fire_emagged")
|
||||
. += "fire_emagged"
|
||||
SSvis_overlays.add_vis_overlay(src, icon, "fire_emagged", ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir)
|
||||
else
|
||||
add_overlay("fire_on")
|
||||
. += "fire_on"
|
||||
SSvis_overlays.add_vis_overlay(src, icon, "fire_on", ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir)
|
||||
|
||||
/obj/machinery/firealarm/emp_act(severity)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "mflash1"
|
||||
max_integrity = 250
|
||||
integrity_failure = 100
|
||||
integrity_failure = 0.4
|
||||
light_color = LIGHT_COLOR_WHITE
|
||||
light_power = FLASH_LIGHT_POWER
|
||||
var/obj/item/assembly/flash/handheld/bulb
|
||||
@@ -115,7 +115,7 @@
|
||||
continue
|
||||
|
||||
if(L.flash_act(affect_silicon = 1))
|
||||
L.Knockdown(strength)
|
||||
L.DefaultCombatKnockdown(strength)
|
||||
flashed = TRUE
|
||||
|
||||
if(flashed)
|
||||
|
||||
@@ -68,7 +68,7 @@ The console is located at computer/gulag_teleporter.dm
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/machinery/gulag_teleporter/update_icon()
|
||||
/obj/machinery/gulag_teleporter/update_icon_state()
|
||||
icon_state = initial(icon_state) + (state_open ? "_open" : "")
|
||||
//no power or maintenance
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
light_color = LIGHT_COLOR_BLUE
|
||||
var/interval = 20
|
||||
var/harvesting = FALSE
|
||||
var/warming_up = FALSE
|
||||
var/list/operation_order = list() //Order of wich we harvest limbs.
|
||||
var/allow_clothing = FALSE
|
||||
var/allow_living = FALSE
|
||||
@@ -27,12 +28,11 @@
|
||||
max_time -= L.rating
|
||||
interval = max(max_time,1)
|
||||
|
||||
/obj/machinery/harvester/update_icon(warming_up)
|
||||
if(warming_up)
|
||||
icon_state = initial(icon_state)+"-charging"
|
||||
return
|
||||
/obj/machinery/harvester/update_icon_state()
|
||||
if(state_open)
|
||||
icon_state = initial(icon_state)+"-open"
|
||||
else if(warming_up)
|
||||
icon_state = initial(icon_state)+"-charging"
|
||||
else if(harvesting)
|
||||
icon_state = initial(icon_state)+"-active"
|
||||
else
|
||||
@@ -43,6 +43,7 @@
|
||||
return
|
||||
. = ..()
|
||||
harvesting = FALSE
|
||||
warming_up = FALSE
|
||||
|
||||
/obj/machinery/harvester/attack_hand(mob/user)
|
||||
if(state_open)
|
||||
@@ -86,13 +87,15 @@
|
||||
return
|
||||
var/mob/living/carbon/C = occupant
|
||||
operation_order = reverseList(C.bodyparts) //Chest and head are first in bodyparts, so we invert it to make them suffer more
|
||||
warming_up = TRUE
|
||||
harvesting = TRUE
|
||||
visible_message("<span class='notice'>The [name] begins warming up!</span>")
|
||||
say("Initializing harvest protocol.")
|
||||
update_icon(TRUE)
|
||||
update_icon()
|
||||
addtimer(CALLBACK(src, .proc/harvest), interval)
|
||||
|
||||
/obj/machinery/harvester/proc/harvest()
|
||||
warming_up = FALSE
|
||||
update_icon()
|
||||
if(!harvesting || state_open || !powered(EQUIP) || !occupant || !iscarbon(occupant))
|
||||
return
|
||||
@@ -127,6 +130,7 @@
|
||||
addtimer(CALLBACK(src, .proc/harvest), interval)
|
||||
|
||||
/obj/machinery/harvester/proc/end_harvesting()
|
||||
warming_up = FALSE
|
||||
harvesting = FALSE
|
||||
open_machine()
|
||||
say("Subject has been successfully harvested.")
|
||||
|
||||
@@ -441,7 +441,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
set_light(0)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/holopad/update_icon()
|
||||
/obj/machinery/holopad/update_icon_state()
|
||||
var/total_users = LAZYLEN(masters) + LAZYLEN(holo_calls)
|
||||
if(ringing)
|
||||
icon_state = "holopad_ringing"
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
QDEL_NULL(beaker)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/iv_drip/update_icon()
|
||||
/obj/machinery/iv_drip/update_icon_state()
|
||||
if(attached)
|
||||
if(mode)
|
||||
icon_state = "injecting"
|
||||
@@ -36,13 +36,14 @@
|
||||
else
|
||||
icon_state = "donateidle"
|
||||
|
||||
cut_overlays()
|
||||
/obj/machinery/iv_drip/update_overlays()
|
||||
. = ..()
|
||||
|
||||
if(beaker)
|
||||
if(attached)
|
||||
add_overlay("beakeractive")
|
||||
. += "beakeractive"
|
||||
else
|
||||
add_overlay("beakeridle")
|
||||
. += "beakeridle"
|
||||
if(beaker.reagents.total_volume)
|
||||
var/mutable_appearance/filling_overlay = mutable_appearance('icons/obj/iv_drip.dmi', "reagent")
|
||||
|
||||
@@ -64,7 +65,7 @@
|
||||
filling_overlay.icon_state = "reagent100"
|
||||
|
||||
filling_overlay.color = mix_color_from_reagents(beaker.reagents.reagent_list)
|
||||
add_overlay(filling_overlay)
|
||||
. += filling_overlay
|
||||
|
||||
/obj/machinery/iv_drip/MouseDrop(mob/living/target)
|
||||
. = ..()
|
||||
@@ -184,7 +185,7 @@
|
||||
if(usr.incapacitated())
|
||||
return
|
||||
if(beaker)
|
||||
if(usr && Adjacent(usr) && !issiliconoradminghost(usr))
|
||||
if(usr && Adjacent(usr) && usr.can_hold_items())
|
||||
if(!usr.put_in_hands(beaker))
|
||||
beaker.forceMove(drop_location())
|
||||
beaker = null
|
||||
@@ -227,9 +228,9 @@
|
||||
desc = "An IV drip with an advanced infusion pump that can both drain blood into and inject liquids from attached containers. Blood packs are processed at an accelerated rate. This one is telescopic, and can be picked up and put down."
|
||||
icon_state = "iv_drip"
|
||||
|
||||
/obj/machinery/iv_drip/telescopic/update_icon()
|
||||
/obj/machinery/iv_drip/telescopic/update_icon_state()
|
||||
..()
|
||||
icon_state = icon_state + "_tele"
|
||||
icon_state += "_tele"
|
||||
|
||||
/obj/machinery/iv_drip/telescopic/AltClick(mob/user)
|
||||
if (attached || beaker || !user.canUseTopic(src, BE_CLOSE))
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
on = area.lightswitch
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/light_switch/update_icon()
|
||||
/obj/machinery/light_switch/update_icon_state()
|
||||
if(stat & NOPOWER)
|
||||
icon_state = "light-p"
|
||||
else
|
||||
|
||||
@@ -138,7 +138,8 @@
|
||||
limb = new buildpath(loc)
|
||||
if(selected_category=="human" || selected_category=="lizard") //Species with greyscale parts should be included here
|
||||
limb.icon = 'icons/mob/human_parts_greyscale.dmi'
|
||||
limb.should_draw_greyscale = TRUE
|
||||
limb.base_bp_icon = DEFAULT_BODYPART_ICON_ORGANIC
|
||||
limb.color_src = MUTCOLORS
|
||||
else
|
||||
limb.icon = 'icons/mob/human_parts.dmi'
|
||||
// Set this limb up using the specias name and body zone
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
update_icon()
|
||||
|
||||
// update the icon_state
|
||||
/obj/machinery/magnetic_module/update_icon()
|
||||
/obj/machinery/magnetic_module/update_icon_state()
|
||||
var/state="floor_magnet"
|
||||
var/onstate=""
|
||||
if(!on)
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
update_icon()
|
||||
|
||||
// update the icon_state
|
||||
/obj/machinery/navbeacon/update_icon()
|
||||
/obj/machinery/navbeacon/update_icon_state()
|
||||
var/state="navbeacon[open]"
|
||||
|
||||
if(invisibility)
|
||||
|
||||
@@ -90,7 +90,8 @@ Buildable meters
|
||||
set name = "Flip Pipe"
|
||||
set src in view(1)
|
||||
|
||||
if ( usr.stat || usr.restrained() || !usr.canmove )
|
||||
var/mob/living/L = usr
|
||||
if(!istype(L) || !CHECK_MOBILITY(L, MOBILITY_USE))
|
||||
return
|
||||
|
||||
do_a_flip()
|
||||
|
||||
@@ -34,7 +34,8 @@
|
||||
/obj/machinery/pipedispenser/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
if(!anchored|| !usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr))
|
||||
var/mob/living/L = usr
|
||||
if(!anchored || !istype(L) || !CHECK_MOBILITY(L, MOBILITY_USE))
|
||||
usr << browse(null, "window=pipedispenser")
|
||||
return 1
|
||||
usr.set_machine(src)
|
||||
@@ -93,14 +94,14 @@
|
||||
|
||||
|
||||
//Allow you to drag-drop disposal pipes and transit tubes into it
|
||||
/obj/machinery/pipedispenser/disposal/MouseDrop_T(obj/structure/pipe, mob/usr)
|
||||
if(!usr.canmove || usr.stat || usr.restrained())
|
||||
/obj/machinery/pipedispenser/disposal/MouseDrop_T(obj/structure/pipe, mob/living/user)
|
||||
if(!istype(user) || !CHECK_MOBILITY(user, MOBILITY_USE))
|
||||
return
|
||||
|
||||
if (!istype(pipe, /obj/structure/disposalconstruct) && !istype(pipe, /obj/structure/c_transit_tube) && !istype(pipe, /obj/structure/c_transit_tube_pod))
|
||||
return
|
||||
|
||||
if (get_dist(usr, src) > 1 || get_dist(src,pipe) > 1 )
|
||||
if (get_dist(user, src) > 1 || get_dist(src,pipe) > 1 )
|
||||
return
|
||||
|
||||
if (pipe.anchored)
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
var/raising= 0 //if the turret is currently opening or closing its cover
|
||||
|
||||
max_integrity = 160 //the turret's health
|
||||
integrity_failure = 80
|
||||
integrity_failure = 0.5
|
||||
armor = list("melee" = 50, "bullet" = 30, "laser" = 30, "energy" = 30, "bomb" = 30, "bio" = 0, "rad" = 0, "fire" = 90, "acid" = 90)
|
||||
|
||||
var/locked = TRUE //if the turret's behaviour control access is locked
|
||||
@@ -99,8 +99,7 @@
|
||||
if(!has_cover)
|
||||
INVOKE_ASYNC(src, .proc/popUp)
|
||||
|
||||
/obj/machinery/porta_turret/update_icon()
|
||||
cut_overlays()
|
||||
/obj/machinery/porta_turret/update_icon_state()
|
||||
if(!anchored)
|
||||
icon_state = "turretCover"
|
||||
return
|
||||
@@ -706,7 +705,7 @@
|
||||
|
||||
/obj/machinery/porta_turret/syndicate/energy/pirate
|
||||
max_integrity = 260
|
||||
integrity_failure = 20
|
||||
integrity_failure = 0.08
|
||||
armor = list("melee" = 50, "bullet" = 30, "laser" = 30, "energy" = 30, "bomb" = 50, "bio" = 0, "rad" = 0, "fire" = 90, "acid" = 90)
|
||||
|
||||
|
||||
@@ -717,7 +716,6 @@
|
||||
return 10 //Syndicate turrets shoot everything not in their faction
|
||||
|
||||
/obj/machinery/porta_turret/syndicate/pod
|
||||
integrity_failure = 20
|
||||
max_integrity = 40
|
||||
stun_projectile = /obj/item/projectile/bullet/syndicate_turret
|
||||
lethal_projectile = /obj/item/projectile/bullet/syndicate_turret
|
||||
@@ -799,7 +797,6 @@
|
||||
|
||||
/obj/machinery/porta_turret/centcom_shuttle/weak
|
||||
max_integrity = 120
|
||||
integrity_failure = 60
|
||||
name = "Old Laser Turret"
|
||||
desc = "A turret built with substandard parts and run down further with age. Still capable of delivering lethal lasers to the odd space carp, but not much else."
|
||||
stun_projectile = /obj/item/projectile/beam/weak/penetrator
|
||||
@@ -972,8 +969,7 @@
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/turretid/update_icon()
|
||||
..()
|
||||
/obj/machinery/turretid/update_icon_state()
|
||||
if(stat & NOPOWER)
|
||||
icon_state = "control_off"
|
||||
else if (enabled)
|
||||
@@ -989,7 +985,7 @@
|
||||
desc = "Used for building turret control panels."
|
||||
icon_state = "apc"
|
||||
result_path = /obj/machinery/turretid
|
||||
materials = list(MAT_METAL=MINERAL_MATERIAL_AMOUNT)
|
||||
custom_materials = list(/datum/material/iron=MINERAL_MATERIAL_AMOUNT)
|
||||
|
||||
/obj/item/gun/proc/get_turret_properties()
|
||||
. = list()
|
||||
|
||||
@@ -10,12 +10,14 @@
|
||||
pass_flags = PASSTABLE
|
||||
var/obj/item/charging = null
|
||||
var/recharge_coeff = 1
|
||||
var/using_power = FALSE //Did we put power into "charging" last process()?
|
||||
|
||||
var/static/list/allowed_devices = typecacheof(list(
|
||||
/obj/item/gun/energy,
|
||||
/obj/item/melee/baton,
|
||||
/obj/item/ammo_box/magazine/recharge,
|
||||
/obj/item/modular_computer,
|
||||
/obj/item/twohanded/electrostaff,
|
||||
/obj/item/gun/ballistic/automatic/magrifle))
|
||||
|
||||
/obj/machinery/recharger/RefreshParts()
|
||||
@@ -44,9 +46,11 @@
|
||||
if (new_charging)
|
||||
START_PROCESSING(SSmachines, src)
|
||||
use_power = ACTIVE_POWER_USE
|
||||
update_icon(scan = TRUE)
|
||||
using_power = TRUE
|
||||
update_icon()
|
||||
else
|
||||
use_power = IDLE_POWER_USE
|
||||
using_power = FALSE
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/recharger/attackby(obj/item/G, mob/user, params)
|
||||
@@ -119,23 +123,23 @@
|
||||
if(stat & (NOPOWER|BROKEN) || !anchored)
|
||||
return PROCESS_KILL
|
||||
|
||||
var/using_power = 0
|
||||
using_power = FALSE
|
||||
if(charging)
|
||||
var/obj/item/stock_parts/cell/C = charging.get_cell()
|
||||
if(C)
|
||||
if(C.charge < C.maxcharge)
|
||||
C.give(C.chargerate * recharge_coeff)
|
||||
use_power(250 * recharge_coeff)
|
||||
using_power = 1
|
||||
update_icon(using_power)
|
||||
using_power = TRUE
|
||||
update_icon()
|
||||
|
||||
if(istype(charging, /obj/item/ammo_box/magazine/recharge))
|
||||
var/obj/item/ammo_box/magazine/recharge/R = charging
|
||||
if(R.stored_ammo.len < R.max_ammo)
|
||||
R.stored_ammo += new R.ammo_type(R)
|
||||
use_power(200 * recharge_coeff)
|
||||
using_power = 1
|
||||
update_icon(using_power)
|
||||
using_power = TRUE
|
||||
update_icon()
|
||||
return
|
||||
else
|
||||
return PROCESS_KILL
|
||||
@@ -160,20 +164,15 @@
|
||||
B.cell.charge = 0
|
||||
|
||||
|
||||
/obj/machinery/recharger/update_icon(using_power = 0, scan) //we have an update_icon() in addition to the stuff in process to make it feel a tiny bit snappier.
|
||||
/obj/machinery/recharger/update_icon_state()
|
||||
if(stat & (NOPOWER|BROKEN) || !anchored)
|
||||
icon_state = "rechargeroff"
|
||||
return
|
||||
if(scan)
|
||||
icon_state = "rechargeroff"
|
||||
return
|
||||
if(panel_open)
|
||||
else if(panel_open)
|
||||
icon_state = "rechargeropen"
|
||||
return
|
||||
if(charging)
|
||||
else if(charging)
|
||||
if(using_power)
|
||||
icon_state = "recharger1"
|
||||
else
|
||||
icon_state = "recharger2"
|
||||
return
|
||||
icon_state = "recharger0"
|
||||
else
|
||||
icon_state = "recharger0"
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
use_power = ACTIVE_POWER_USE
|
||||
add_fingerprint(occupant)
|
||||
|
||||
/obj/machinery/recharge_station/update_icon()
|
||||
/obj/machinery/recharge_station/update_icon_state()
|
||||
if(is_operational())
|
||||
if(state_open)
|
||||
icon_state = "borgcharger0"
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
/obj/machinery/recycler/Initialize()
|
||||
AddComponent(/datum/component/butchering/recycler, 1, amount_produced,amount_produced/5)
|
||||
AddComponent(/datum/component/material_container, list(MAT_METAL, MAT_GLASS, MAT_PLASMA, MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_URANIUM, MAT_BANANIUM, MAT_TITANIUM, MAT_BLUESPACE, MAT_PLASTIC), INFINITY, FALSE, null, null, null, TRUE)
|
||||
AddComponent(/datum/component/material_container, list(/datum/material/iron, /datum/material/glass, /datum/material/silver, /datum/material/plasma, /datum/material/gold, /datum/material/diamond, /datum/material/plastic, /datum/material/uranium, /datum/material/bananium, /datum/material/titanium, /datum/material/bluespace), INFINITY, FALSE, null, null, null, TRUE)
|
||||
. = ..()
|
||||
update_icon()
|
||||
req_one_access = get_all_accesses() + get_all_centcom_access()
|
||||
@@ -77,8 +77,7 @@
|
||||
to_chat(user, "<span class='notice'>You use the cryptographic sequencer on [src].</span>")
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/recycler/update_icon()
|
||||
..()
|
||||
/obj/machinery/recycler/update_icon_state()
|
||||
var/is_powered = !(stat & (BROKEN|NOPOWER))
|
||||
if(safety_mode)
|
||||
is_powered = FALSE
|
||||
|
||||
@@ -60,7 +60,7 @@ GLOBAL_LIST_EMPTY(allConsoles)
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/requests_console/update_icon()
|
||||
/obj/machinery/requests_console/update_icon_state()
|
||||
if(stat & NOPOWER)
|
||||
set_light(0)
|
||||
else
|
||||
|
||||
@@ -208,7 +208,7 @@
|
||||
to_chat(user, "<span class='warning'>You short out the access controller.</span>")
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/shieldgen/update_icon()
|
||||
/obj/machinery/shieldgen/update_icon_state()
|
||||
if(active)
|
||||
icon_state = (stat & BROKEN) ? "shieldonbr":"shieldon"
|
||||
else
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
var/working = 0
|
||||
var/balance = 0 //How much money is in the machine, ready to be CONSUMED.
|
||||
var/jackpots = 0
|
||||
var/list/coinvalues = list()
|
||||
var/list/reels = list(list("", "", "") = 0, list("", "", "") = 0, list("", "", "") = 0, list("", "", "") = 0, list("", "", "") = 0)
|
||||
var/list/symbols = list(SEVEN = 1, "<font color='orange'>&</font>" = 2, "<font color='yellow'>@</font>" = 2, "<font color='green'>$</font>" = 2, "<font color='blue'>?</font>" = 2, "<font color='grey'>#</font>" = 2, "<font color='white'>!</font>" = 2, "<font color='fuchsia'>%</font>" = 2) //if people are winning too much, multiply every number in this list by 2 and see if they are still winning too much.
|
||||
|
||||
@@ -45,10 +44,6 @@
|
||||
|
||||
toggle_reel_spin(0)
|
||||
|
||||
for(var/cointype in typesof(/obj/item/coin))
|
||||
var/obj/item/coin/C = cointype
|
||||
coinvalues["[cointype]"] = initial(C.value)
|
||||
|
||||
/obj/machinery/computer/slot_machine/Destroy()
|
||||
if(balance)
|
||||
give_coins(balance)
|
||||
@@ -61,7 +56,7 @@
|
||||
|
||||
money++ //SPESSH MAJICKS
|
||||
|
||||
/obj/machinery/computer/slot_machine/update_icon()
|
||||
/obj/machinery/computer/slot_machine/update_icon_state()
|
||||
if(stat & NOPOWER)
|
||||
icon_state = "slots0"
|
||||
|
||||
@@ -92,7 +87,7 @@
|
||||
else
|
||||
if(!user.temporarilyRemoveItemFromInventory(C))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You insert a [C.cmineral] coin into [src]'s slot!</span>")
|
||||
to_chat(user, "<span class='notice'>You insert [C] into [src]'s slot!</span>")
|
||||
balance += C.value
|
||||
qdel(C)
|
||||
else
|
||||
@@ -294,19 +289,22 @@
|
||||
|
||||
return amount
|
||||
|
||||
/obj/machinery/computer/slot_machine/proc/dispense(amount = 0, cointype = /obj/item/coin/silver, mob/living/target, throwit = 0)
|
||||
var/value = coinvalues["[cointype]"]
|
||||
/obj/machinery/computer/slot_machine/proc/dispense(amount = 0, cointype = /obj/item/coin/silver, mob/living/target, throwit = FALSE)
|
||||
var/value = GLOB.coin_values[cointype] || GLOB.coin_values[/obj/item/coin/iron]
|
||||
INVOKE_ASYNC(src, .proc/become_rich, amount, value, cointype, target, throwit)
|
||||
return amount % value
|
||||
|
||||
|
||||
while(amount >= value)
|
||||
/obj/machinery/computer/slot_machine/proc/become_rich(amount, value, cointype = /obj/item/coin/silver, mob/living/target, throwit = FALSE)
|
||||
if(value <= 0)
|
||||
return
|
||||
while(amount >= value && !QDELETED(src))
|
||||
var/obj/item/coin/C = new cointype(loc) //DOUBLE THE PAIN
|
||||
amount -= value
|
||||
if(throwit && target)
|
||||
C.throw_at(target, 3, 10)
|
||||
else
|
||||
random_step(C, 2, 40)
|
||||
|
||||
return amount
|
||||
CHECK_TICK
|
||||
|
||||
#undef SEVEN
|
||||
#undef SPIN_TIME
|
||||
|
||||
@@ -53,17 +53,18 @@
|
||||
else
|
||||
. += "There is no power cell installed."
|
||||
if(in_range(user, src) || isobserver(user))
|
||||
. += "<span class='notice'>The status display reads: Temperature range at <b>[settableTemperatureRange]°C</b>.<br>Heating power at <b>[heatingPower*0.001]kJ</b>.<br>Power consumption at <b>[(efficiency*-0.0025)+150]%</b>.<span>" //100%, 75%, 50%, 25%
|
||||
. += "<span class='notice'>The status display reads: Temperature range at <b>[settableTemperatureRange]°C</b>.<br>Heating power at <b>[heatingPower*0.001]kJ</b>.<br>Power consumption at <b>[(efficiency*-0.0025)+150]%</b>.<span>" //100%, 75%, 50%, 25%
|
||||
|
||||
/obj/machinery/space_heater/update_icon()
|
||||
/obj/machinery/space_heater/update_icon_state()
|
||||
if(on)
|
||||
icon_state = "sheater-[mode]"
|
||||
else
|
||||
icon_state = "sheater-off"
|
||||
|
||||
cut_overlays()
|
||||
/obj/machinery/space_heater/update_overlays()
|
||||
. = ..()
|
||||
if(panel_open)
|
||||
add_overlay("sheater-open")
|
||||
. += "sheater-open"
|
||||
|
||||
/obj/machinery/space_heater/process()
|
||||
if(!on || !is_operational())
|
||||
|
||||
@@ -75,6 +75,12 @@
|
||||
suit_type = /obj/item/clothing/suit/space/hardsuit/medical
|
||||
mask_type = /obj/item/clothing/mask/breath
|
||||
|
||||
/obj/machinery/suit_storage_unit/paramedic
|
||||
name = "paramedic suit storage unit"
|
||||
suit_type = /obj/item/clothing/suit/space/eva/paramedic
|
||||
helmet_type = /obj/item/clothing/head/helmet/space/eva/paramedic
|
||||
mask_type = /obj/item/clothing/mask/breath
|
||||
|
||||
/obj/machinery/suit_storage_unit/rd
|
||||
suit_type = /obj/item/clothing/suit/space/hardsuit/rd
|
||||
mask_type = /obj/item/clothing/mask/breath
|
||||
@@ -134,29 +140,28 @@
|
||||
QDEL_NULL(storage)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/suit_storage_unit/update_icon()
|
||||
cut_overlays()
|
||||
|
||||
/obj/machinery/suit_storage_unit/update_overlays()
|
||||
. = ..()
|
||||
if(uv)
|
||||
if(uv_super)
|
||||
add_overlay("super")
|
||||
. += "super"
|
||||
else if(occupant)
|
||||
add_overlay("uvhuman")
|
||||
. += "uvhuman"
|
||||
else
|
||||
add_overlay("uv")
|
||||
. += "uv"
|
||||
else if(state_open)
|
||||
if(stat & BROKEN)
|
||||
add_overlay("broken")
|
||||
. += "broken"
|
||||
else
|
||||
add_overlay("open")
|
||||
. += "open"
|
||||
if(suit)
|
||||
add_overlay("suit")
|
||||
. += "suit"
|
||||
if(helmet)
|
||||
add_overlay("helm")
|
||||
. += "helm"
|
||||
if(storage)
|
||||
add_overlay("storage")
|
||||
. += "storage"
|
||||
else if(occupant)
|
||||
add_overlay("human")
|
||||
. += "human"
|
||||
|
||||
/obj/machinery/suit_storage_unit/power_change()
|
||||
..()
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
. = ..()
|
||||
. += "A digital display on it reads \"[seconds_remaining()]\"."
|
||||
|
||||
/obj/machinery/syndicatebomb/update_icon()
|
||||
/obj/machinery/syndicatebomb/update_icon_state()
|
||||
icon_state = "[initial(icon_state)][active ? "-active" : "-inactive"][open_panel ? "-wires" : ""]"
|
||||
|
||||
/obj/machinery/syndicatebomb/proc/seconds_remaining()
|
||||
|
||||
@@ -35,8 +35,6 @@
|
||||
|
||||
signal.data["compression"] = 0
|
||||
signal.mark_done()
|
||||
if(signal.data["slow"] > 0)
|
||||
sleep(signal.data["slow"]) // simulate the network lag if necessary
|
||||
signal.broadcast()
|
||||
|
||||
/obj/machinery/telecomms/allinone/attackby(obj/item/P, mob/user, params)
|
||||
|
||||
@@ -41,9 +41,6 @@ GLOBAL_VAR_INIT(message_delay, 0) // To make sure restarting the recentmessages
|
||||
return
|
||||
GLOB.recentmessages.Add(signal_message)
|
||||
|
||||
if(signal.data["slow"] > 0)
|
||||
sleep(signal.data["slow"]) // simulate the network lag if necessary
|
||||
|
||||
signal.broadcast()
|
||||
|
||||
if(!GLOB.message_delay)
|
||||
|
||||
@@ -31,17 +31,10 @@
|
||||
if(relay_information(signal, /obj/machinery/telecomms/processor))
|
||||
return
|
||||
|
||||
// failed to send to a processor, relay information anyway
|
||||
signal.data["slow"] += rand(1, 5) // slow the signal down only slightly
|
||||
|
||||
// Try sending it!
|
||||
var/list/try_send = list(signal.server_type, /obj/machinery/telecomms/hub, /obj/machinery/telecomms/broadcaster)
|
||||
|
||||
var/i = 0
|
||||
for(var/send in try_send)
|
||||
if(i)
|
||||
signal.data["slow"] += rand(0, 1) // slow the signal down only slightly
|
||||
i++
|
||||
if(relay_information(signal, send))
|
||||
break
|
||||
|
||||
@@ -79,4 +72,4 @@
|
||||
/obj/machinery/telecomms/bus/preset_one/birdstation
|
||||
name = "Bus"
|
||||
autolinkers = list("processor1", "common")
|
||||
freq_listening = list()
|
||||
freq_listening = list()
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
if(!relay_information(signal, /obj/machinery/telecomms/hub))
|
||||
relay_information(signal, /obj/machinery/telecomms/broadcaster)
|
||||
|
||||
/obj/machinery/telecomms/message_server/update_icon()
|
||||
/obj/machinery/telecomms/message_server/update_icon_state()
|
||||
if((stat & (BROKEN|NOPOWER)))
|
||||
icon_state = "server-nopower"
|
||||
else if (!toggled)
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
if(istype(machine_from, /obj/machinery/telecomms/bus))
|
||||
relay_direct_information(signal, machine_from) // send the signal back to the machine
|
||||
else // no bus detected - send the signal to servers instead
|
||||
signal.data["slow"] += rand(5, 10) // slow the signal down
|
||||
relay_information(signal, signal.server_type)
|
||||
|
||||
//Preset Processors
|
||||
|
||||
@@ -39,11 +39,6 @@ GLOBAL_LIST_EMPTY(telecomms_list)
|
||||
return
|
||||
var/send_count = 0
|
||||
|
||||
// Apply some lag based on traffic rates
|
||||
var/netlag = round(traffic / 50)
|
||||
if(netlag > signal.data["slow"])
|
||||
signal.data["slow"] = netlag
|
||||
|
||||
// Loop through all linked machines and send the signal or copy.
|
||||
for(var/obj/machinery/telecomms/machine in links)
|
||||
if(filter && !istype( machine, filter ))
|
||||
@@ -109,7 +104,7 @@ GLOBAL_LIST_EMPTY(telecomms_list)
|
||||
links |= T
|
||||
T.links |= src
|
||||
|
||||
/obj/machinery/telecomms/update_icon()
|
||||
/obj/machinery/telecomms/update_icon_state()
|
||||
if(on)
|
||||
if(panel_open)
|
||||
icon_state = "[initial(icon_state)]_o"
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
calibrated = FALSE
|
||||
return
|
||||
|
||||
/obj/machinery/teleport/hub/update_icon()
|
||||
/obj/machinery/teleport/hub/update_icon_state()
|
||||
if(panel_open)
|
||||
icon_state = "tele-o"
|
||||
else if(is_ready())
|
||||
@@ -218,7 +218,7 @@
|
||||
if(teleporter_hub)
|
||||
teleporter_hub.update_icon()
|
||||
|
||||
/obj/machinery/teleport/station/update_icon()
|
||||
/obj/machinery/teleport/station/update_icon_state()
|
||||
if(panel_open)
|
||||
icon_state = "controller-o"
|
||||
else if(stat & (BROKEN|NOPOWER))
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
)
|
||||
|
||||
/obj/machinery/autoylathe/Initialize()
|
||||
AddComponent(/datum/component/material_container, list(MAT_METAL, MAT_GLASS, MAT_PLASTIC), 0, TRUE, null, null, CALLBACK(src, .proc/AfterMaterialInsert))
|
||||
AddComponent(/datum/component/material_container, list(/datum/material/iron, /datum/material/glass, /datum/material/plastic), 0, TRUE, null, null, CALLBACK(src, .proc/AfterMaterialInsert))
|
||||
. = ..()
|
||||
|
||||
wires = new /datum/wires/autoylathe(src)
|
||||
@@ -120,18 +120,13 @@
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/machinery/autoylathe/proc/AfterMaterialInsert(type_inserted, id_inserted, amount_inserted)
|
||||
if(ispath(type_inserted, /obj/item/stack/ore/bluespace_crystal))
|
||||
use_power(amount_inserted / 10)
|
||||
/obj/machinery/autoylathe/proc/AfterMaterialInsert(obj/item/item_inserted, id_inserted, amount_inserted)
|
||||
if(item_inserted.custom_materials?.len && item_inserted.custom_materials[SSmaterials.GetMaterialRef(/datum/material/glass)])
|
||||
flick("autolathe_r",src)//plays glass insertion animation by default otherwise
|
||||
else
|
||||
switch(id_inserted)
|
||||
if (MAT_METAL)
|
||||
flick("autolathe_o",src)//plays metal insertion animation
|
||||
if (MAT_GLASS)
|
||||
flick("autolathe_r",src)//plays glass insertion animation
|
||||
if (MAT_PLASTIC)
|
||||
flick("autolathe_o",src)//plays metal insertion animation
|
||||
use_power(amount_inserted / 10)
|
||||
flick("autolathe_o",src)//plays metal insertion animation
|
||||
|
||||
use_power(min(1000, amount_inserted / 100))
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/autoylathe/Topic(href, href_list)
|
||||
@@ -161,18 +156,40 @@
|
||||
/////////////////
|
||||
|
||||
var/coeff = (is_stack ? 1 : prod_coeff) //stacks are unaffected by production coefficient
|
||||
var/metal_cost = being_built.materials[MAT_METAL]
|
||||
var/glass_cost = being_built.materials[MAT_GLASS]
|
||||
var/plastic_cost = being_built.materials[MAT_PLASTIC]
|
||||
var/power = max(2000, (metal_cost+glass_cost+plastic_cost)*multiplier/5)
|
||||
var/total_amount = 0
|
||||
for(var/MAT in being_built.materials)
|
||||
total_amount += being_built.materials[MAT]
|
||||
var/power = max(2000, (total_amount)*multiplier/5) //Change this to use all materials
|
||||
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
if((materials.amount(MAT_METAL) >= metal_cost*multiplier*coeff) && (materials.amount(MAT_GLASS) >= glass_cost*multiplier*coeff) && (materials.amount(MAT_PLASTIC) >= plastic_cost*multiplier*coeff))
|
||||
|
||||
var/list/materials_used = list()
|
||||
var/list/custom_materials = list() //These will apply their material effect, This should usually only be one.
|
||||
|
||||
for(var/MAT in being_built.materials)
|
||||
var/datum/material/used_material = MAT
|
||||
var/amount_needed = being_built.materials[MAT] * coeff * multiplier
|
||||
if(istext(used_material)) //This means its a category
|
||||
var/list/list_to_show = list()
|
||||
for(var/i in SSmaterials.materials_by_category[used_material])
|
||||
if(materials.materials[i] > 0)
|
||||
list_to_show += i
|
||||
|
||||
used_material = input("Choose [used_material]", "Custom Material") as null|anything in list_to_show
|
||||
if(!used_material)
|
||||
return //Didn't pick any material, so you can't build shit either.
|
||||
custom_materials[used_material] += amount_needed
|
||||
|
||||
materials_used[used_material] = amount_needed
|
||||
|
||||
if(materials.has_materials(materials_used))
|
||||
busy = TRUE
|
||||
use_power(power)
|
||||
icon_state = "autolathe_n"
|
||||
var/time = is_stack ? 32 : 32*coeff*multiplier
|
||||
addtimer(CALLBACK(src, .proc/make_item, power, metal_cost, glass_cost, plastic_cost, multiplier, coeff, is_stack), time)
|
||||
addtimer(CALLBACK(src, .proc/make_item, power, materials_used, custom_materials, multiplier, coeff, is_stack), time)
|
||||
else
|
||||
to_chat(usr, "<span class=\"alert\">Not enough materials for this operation.</span>")
|
||||
|
||||
if(href_list["search"])
|
||||
matching_designs.Cut()
|
||||
@@ -189,12 +206,11 @@
|
||||
|
||||
return
|
||||
|
||||
/obj/machinery/autoylathe/proc/make_item(power, metal_cost, glass_cost, plastic_cost, multiplier, coeff, is_stack)
|
||||
/obj/machinery/autoylathe/proc/make_item(power, list/materials_used, list/picked_materials, multiplier, coeff, is_stack)
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
var/atom/A = drop_location()
|
||||
use_power(power)
|
||||
var/list/materials_used = list(MAT_METAL=metal_cost*coeff*multiplier, MAT_GLASS=glass_cost*coeff*multiplier, MAT_PLASTIC=plastic_cost*coeff*multiplier)
|
||||
materials.use_amount(materials_used)
|
||||
materials.use_materials(materials_used)
|
||||
|
||||
if(is_stack)
|
||||
var/obj/item/stack/N = new being_built.build_path(A, multiplier)
|
||||
@@ -203,10 +219,9 @@
|
||||
else
|
||||
for(var/i=1, i<=multiplier, i++)
|
||||
var/obj/item/new_item = new being_built.build_path(A)
|
||||
new_item.materials = new_item.materials.Copy()
|
||||
for(var/mat in materials_used)
|
||||
new_item.materials[mat] = materials_used[mat] / multiplier
|
||||
new_item.autoylathe_crafted(src)
|
||||
if(length(picked_materials))
|
||||
new_item.set_custom_materials(picked_materials, 1 / multiplier) //Ensure we get the non multiplied amount
|
||||
icon_state = "autolathe"
|
||||
busy = FALSE
|
||||
updateDialog()
|
||||
@@ -265,7 +280,9 @@
|
||||
|
||||
if(ispath(D.build_path, /obj/item/stack))
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
var/max_multiplier = min(D.maxstack, D.materials[MAT_METAL] ?round(materials.amount(MAT_METAL)/D.materials[MAT_METAL]):INFINITY,D.materials[MAT_GLASS] ?round(materials.amount(MAT_GLASS)/D.materials[MAT_GLASS]):INFINITY,D.materials[MAT_PLASTIC] ?round(materials.amount(MAT_PLASTIC)/D.materials[MAT_PLASTIC]):INFINITY)
|
||||
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)
|
||||
@@ -297,7 +314,9 @@
|
||||
|
||||
if(ispath(D.build_path, /obj/item/stack))
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
var/max_multiplier = min(D.maxstack, D.materials[MAT_METAL] ?round(materials.amount(MAT_METAL)/D.materials[MAT_METAL]):INFINITY,D.materials[MAT_GLASS] ?round(materials.amount(MAT_GLASS)/D.materials[MAT_GLASS]):INFINITY,D.materials[MAT_PLASTIC] ?round(materials.amount(MAT_PLASTIC)/D.materials[MAT_PLASTIC]):INFINITY)
|
||||
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)
|
||||
@@ -314,8 +333,10 @@
|
||||
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 = materials.materials[mat_id]
|
||||
dat += "<b>[M.name] amount:</b> [M.amount] cm<sup>3</sup><br>"
|
||||
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
|
||||
|
||||
/obj/machinery/autoylathe/proc/can_build(datum/design/D, amount = 1)
|
||||
@@ -324,24 +345,24 @@
|
||||
|
||||
var/coeff = (ispath(D.build_path, /obj/item/stack) ? 1 : prod_coeff)
|
||||
|
||||
var/list/required_materials = list()
|
||||
|
||||
for(var/i in D.materials)
|
||||
required_materials[i] = D.materials[i] * coeff * amount
|
||||
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
if(D.materials[MAT_METAL] && (materials.amount(MAT_METAL) < (D.materials[MAT_METAL] * coeff * amount)))
|
||||
return FALSE
|
||||
if(D.materials[MAT_GLASS] && (materials.amount(MAT_GLASS) < (D.materials[MAT_GLASS] * coeff * amount)))
|
||||
return FALSE
|
||||
if(D.materials[MAT_PLASTIC] && (materials.amount(MAT_PLASTIC) < (D.materials[MAT_PLASTIC] * coeff * amount)))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
return materials.has_materials(required_materials)
|
||||
|
||||
/obj/machinery/autoylathe/proc/get_design_cost(datum/design/D)
|
||||
var/coeff = (ispath(D.build_path, /obj/item/stack) ? 1 : prod_coeff)
|
||||
var/dat
|
||||
if(D.materials[MAT_METAL])
|
||||
dat += "[D.materials[MAT_METAL] * coeff] metal "
|
||||
if(D.materials[MAT_GLASS])
|
||||
dat += "[D.materials[MAT_GLASS] * coeff] glass "
|
||||
if(D.materials[MAT_PLASTIC])
|
||||
dat += "[D.materials[MAT_PLASTIC] * coeff] plastic"
|
||||
for(var/i in D.materials)
|
||||
if(istext(i)) //Category handling
|
||||
dat += "[D.materials[i] * coeff] [i]"
|
||||
else
|
||||
var/datum/material/M = i
|
||||
dat += "[D.materials[i] * coeff] [M.name] "
|
||||
return dat
|
||||
|
||||
/obj/machinery/autoylathe/proc/reset(wire)
|
||||
|
||||
@@ -38,8 +38,7 @@
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/transformer/update_icon()
|
||||
..()
|
||||
/obj/machinery/transformer/update_icon_state()
|
||||
if(stat & (BROKEN|NOPOWER) || cooldown == 1)
|
||||
icon_state = "separator-AO0"
|
||||
else
|
||||
|
||||
@@ -199,8 +199,7 @@
|
||||
|
||||
|
||||
|
||||
/obj/machinery/washing_machine/update_icon()
|
||||
cut_overlays()
|
||||
/obj/machinery/washing_machine/update_icon_state()
|
||||
if(busy)
|
||||
icon_state = "wm_running_[bloody_mess]"
|
||||
else if(bloody_mess)
|
||||
@@ -208,8 +207,11 @@
|
||||
else
|
||||
var/full = contents.len ? 1 : 0
|
||||
icon_state = "wm_[state_open]_[full]"
|
||||
|
||||
/obj/machinery/washing_machine/update_overlays()
|
||||
. = ..()
|
||||
if(panel_open)
|
||||
add_overlay("wm_panel")
|
||||
. += "wm_panel"
|
||||
|
||||
/obj/machinery/washing_machine/attackby(obj/item/W, mob/user, params)
|
||||
if(panel_open && !busy && default_unfasten_wrench(user, W))
|
||||
|
||||
@@ -226,8 +226,7 @@
|
||||
return
|
||||
if(M.health > 0)
|
||||
M.adjustOxyLoss(-1)
|
||||
M.AdjustStun(-80)
|
||||
M.AdjustKnockdown(-80)
|
||||
M.AdjustAllImmobility(-80)
|
||||
M.AdjustUnconscious(-80)
|
||||
if(M.reagents.get_reagent_amount(/datum/reagent/medicine/epinephrine) < 5)
|
||||
M.reagents.add_reagent(/datum/reagent/medicine/epinephrine, 5)
|
||||
@@ -527,7 +526,8 @@
|
||||
range = MELEE|RANGED
|
||||
equip_cooldown = 0
|
||||
var/obj/item/gun/medbeam/mech/medigun
|
||||
materials = list(MAT_METAL = 15000, MAT_GLASS = 8000, MAT_PLASMA = 3000, MAT_GOLD = 8000, MAT_DIAMOND = 2000)
|
||||
custom_materials = list(/datum/material/iron = 15000, /datum/material/glass = 8000, /datum/material/plasma = 3000, /datum/material/gold = 8000, /datum/material/diamond = 2000)
|
||||
material_flags = MATERIAL_NO_EFFECTS
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/medical/mechmedbeam/Initialize()
|
||||
. = ..()
|
||||
|
||||
@@ -388,7 +388,7 @@
|
||||
/obj/item/mecha_parts/mecha_equipment/generator/get_equip_info()
|
||||
var/output = ..()
|
||||
if(output)
|
||||
return "[output] \[[fuel]: [round(fuel.amount*fuel.perunit,0.1)] cm<sup>3</sup>\] - <a href='?src=[REF(src)];toggle=1'>[equip_ready?"A":"Dea"]ctivate</a>"
|
||||
return "[output] \[[fuel]: [round(fuel.amount*fuel.mats_per_stack,0.1)] cm<sup>3</sup>\] - <a href='?src=[REF(src)];toggle=1'>[equip_ready?"A":"Dea"]ctivate</a>"
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/generator/action(target)
|
||||
if(chassis)
|
||||
@@ -398,9 +398,9 @@
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/generator/proc/load_fuel(var/obj/item/stack/sheet/P)
|
||||
if(P.type == fuel.type && P.amount > 0)
|
||||
var/to_load = max(max_fuel - fuel.amount*fuel.perunit,0)
|
||||
var/to_load = max(max_fuel - fuel.amount*fuel.mats_per_stack,0)
|
||||
if(to_load)
|
||||
var/units = min(max(round(to_load / P.perunit),1),P.amount)
|
||||
var/units = min(max(round(to_load / P.mats_per_stack),1),P.amount)
|
||||
fuel.amount += units
|
||||
P.use(units)
|
||||
occupant_message("[units] unit\s of [fuel] successfully loaded.")
|
||||
@@ -454,7 +454,7 @@
|
||||
if(cur_charge < chassis.cell.maxcharge)
|
||||
use_fuel = fuel_per_cycle_active
|
||||
chassis.give_power(power_per_cycle)
|
||||
fuel.amount -= min(use_fuel/fuel.perunit,fuel.amount)
|
||||
fuel.amount -= min(use_fuel/fuel.mats_per_stack,fuel.amount)
|
||||
update_equip_info()
|
||||
return 1
|
||||
|
||||
|
||||
@@ -177,7 +177,7 @@
|
||||
M.SetSleeping(0)
|
||||
M.stuttering += 20
|
||||
M.adjustEarDamage(0, 30)
|
||||
M.Knockdown(60)
|
||||
M.DefaultCombatKnockdown(60)
|
||||
if(prob(30))
|
||||
M.Stun(200)
|
||||
M.Unconscious(80)
|
||||
|
||||
@@ -128,11 +128,11 @@
|
||||
else
|
||||
recharge_port = null
|
||||
|
||||
/obj/machinery/computer/mech_bay_power_console/update_icon()
|
||||
..()
|
||||
/obj/machinery/computer/mech_bay_power_console/update_overlays()
|
||||
. = ..()
|
||||
if(!recharge_port || !recharge_port.recharging_mech || !recharge_port.recharging_mech.cell || !(recharge_port.recharging_mech.cell.charge < recharge_port.recharging_mech.cell.maxcharge) || stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
add_overlay("recharge_comp_on")
|
||||
. += "recharge_comp_on"
|
||||
|
||||
/obj/machinery/computer/mech_bay_power_console/Initialize()
|
||||
. = ..()
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/Initialize()
|
||||
var/datum/component/material_container/materials = AddComponent(/datum/component/material_container,
|
||||
list(MAT_METAL, MAT_GLASS, MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_PLASMA, MAT_URANIUM, MAT_BANANIUM, MAT_TITANIUM, MAT_BLUESPACE), 0,
|
||||
list(/datum/material/iron, /datum/material/glass, /datum/material/silver, /datum/material/gold, /datum/material/diamond, /datum/material/plasma, /datum/material/uranium, /datum/material/bananium, /datum/material/titanium, /datum/material/bluespace), 0,
|
||||
TRUE, /obj/item/stack, CALLBACK(src, .proc/is_insertion_ready), CALLBACK(src, .proc/AfterMaterialInsert))
|
||||
materials.precise_insertion = TRUE
|
||||
stored_research = new
|
||||
@@ -109,7 +109,8 @@
|
||||
var/i = 0
|
||||
var/output
|
||||
for(var/c in D.materials)
|
||||
output += "[i?" | ":null][get_resource_cost_w_coeff(D, c)] [material2name(c)]"
|
||||
var/datum/material/M = c
|
||||
output += "[i?" | ":null][get_resource_cost_w_coeff(D, M)] [M.name]"
|
||||
i++
|
||||
return output
|
||||
|
||||
@@ -117,20 +118,22 @@
|
||||
var/output
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
for(var/mat_id in materials.materials)
|
||||
var/datum/material/M = materials.materials[mat_id]
|
||||
output += "<span class=\"res_name\">[M.name]: </span>[M.amount] cm³"
|
||||
if(M.amount >= MINERAL_MATERIAL_AMOUNT)
|
||||
output += "<span style='font-size:80%;'>- Remove \[<a href='?src=[REF(src)];remove_mat=1;material=[mat_id]'>1</a>\]"
|
||||
if(M.amount >= (MINERAL_MATERIAL_AMOUNT * 10))
|
||||
output += " | \[<a href='?src=[REF(src)];remove_mat=10;material=[mat_id]'>10</a>\]"
|
||||
output += " | \[<a href='?src=[REF(src)];remove_mat=50;material=[mat_id]'>All</a>\]</span>"
|
||||
var/datum/material/M = mat_id
|
||||
var/amount = materials.materials[mat_id]
|
||||
output += "<span class=\"res_name\">[M.name]: </span>[amount] cm³"
|
||||
if(amount >= MINERAL_MATERIAL_AMOUNT)
|
||||
output += "<span style='font-size:80%;'>- Remove \[<a href='?src=[REF(src)];remove_mat=1;material=[REF(mat_id)]'>1</a>\]"
|
||||
if(amount >= (MINERAL_MATERIAL_AMOUNT * 10))
|
||||
output += " | \[<a href='?src=[REF(src)];remove_mat=10;material=[REF(M)]'>10</a>\]"
|
||||
output += " | \[<a href='?src=[REF(src)];remove_mat=50;material=[REF(M)]'>All</a>\]</span>"
|
||||
output += "<br/>"
|
||||
return output
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/get_resources_w_coeff(datum/design/D)
|
||||
var/list/resources = list()
|
||||
for(var/R in D.materials)
|
||||
resources[R] = get_resource_cost_w_coeff(D, R)
|
||||
var/datum/material/M = R
|
||||
resources[M] = get_resource_cost_w_coeff(D, M)
|
||||
return resources
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/check_resources(datum/design/D)
|
||||
@@ -147,7 +150,7 @@
|
||||
var/list/res_coef = get_resources_w_coeff(D)
|
||||
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
materials.use_amount(res_coef)
|
||||
materials.use_materials(res_coef)
|
||||
add_overlay("fab-active")
|
||||
use_power = ACTIVE_POWER_USE
|
||||
updateUsrDialog()
|
||||
@@ -158,7 +161,8 @@
|
||||
|
||||
var/location = get_step(src,(dir))
|
||||
var/obj/item/I = new D.build_path(location)
|
||||
I.materials = res_coef
|
||||
I.material_flags |= MATERIAL_NO_EFFECTS //Find a better way to do this.
|
||||
I.set_custom_materials(res_coef)
|
||||
say("\The [I] is complete.")
|
||||
being_built = null
|
||||
|
||||
@@ -251,7 +255,7 @@
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/get_resource_cost_w_coeff(datum/design/D, resource, roundto = 1)
|
||||
/obj/machinery/mecha_part_fabricator/proc/get_resource_cost_w_coeff(datum/design/D, var/datum/material/resource, roundto = 1)
|
||||
return round(D.materials[resource]*component_coeff, roundto)
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/get_construction_time_w_coeff(datum/design/D, roundto = 1) //aran
|
||||
@@ -390,7 +394,8 @@
|
||||
|
||||
if(href_list["remove_mat"] && href_list["material"])
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
materials.retrieve_sheets(text2num(href_list["remove_mat"]), href_list["material"])
|
||||
var/datum/material/Mat = locate(href_list["material"])
|
||||
materials.retrieve_sheets(text2num(href_list["remove_mat"]), Mat)
|
||||
|
||||
updateUsrDialog()
|
||||
return
|
||||
@@ -400,10 +405,10 @@
|
||||
materials.retrieve_all()
|
||||
..()
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/AfterMaterialInsert(type_inserted, id_inserted, amount_inserted)
|
||||
var/stack_name = material2name(id_inserted)
|
||||
add_overlay("fab-load-[stack_name]")
|
||||
addtimer(CALLBACK(src, /atom/proc/cut_overlay, "fab-load-[stack_name]"), 10)
|
||||
/obj/machinery/mecha_part_fabricator/proc/AfterMaterialInsert(item_inserted, id_inserted, amount_inserted)
|
||||
var/datum/material/M = id_inserted
|
||||
add_overlay("fab-load-[M.name]")
|
||||
addtimer(CALLBACK(src, /atom/proc/cut_overlay, "fab-load-[M.name]"), 10)
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/attackby(obj/item/W, mob/user, params)
|
||||
@@ -415,9 +420,6 @@
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/material2name(ID)
|
||||
return copytext_char(ID,2)
|
||||
|
||||
/obj/machinery/mecha_part_fabricator/proc/is_insertion_ready(mob/user)
|
||||
if(panel_open)
|
||||
to_chat(user, "<span class='warning'>You can't load [src] while it's opened!</span>")
|
||||
|
||||
@@ -755,7 +755,7 @@
|
||||
AI.cancel_camera()
|
||||
AI.controlled_mech = src
|
||||
AI.remote_control = src
|
||||
AI.canmove = 1 //Much easier than adding AI checks! Be sure to set this back to 0 if you decide to allow an AI to leave a mech somehow.
|
||||
AI.mobility_flags = MOBILITY_FLAGS_DEFAULT //Much easier than adding AI checks! Be sure to set this back to 0 if you decide to allow an AI to leave a mech somehow.
|
||||
AI.can_shunt = 0 //ONE AI ENTERS. NO AI LEAVES.
|
||||
to_chat(AI, AI.can_dominate_mechs ? "<span class='announce'>Takeover of [name] complete! You are now loaded onto the onboard computer. Do not attempt to leave the station sector!</span>" :\
|
||||
"<span class='notice'>You have been uploaded to a mech's onboard computer.</span>")
|
||||
@@ -927,7 +927,7 @@
|
||||
brainmob.forceMove(src) //should allow relaymove
|
||||
brainmob.reset_perspective(src)
|
||||
brainmob.remote_control = src
|
||||
brainmob.update_canmove()
|
||||
brainmob.update_mobility()
|
||||
brainmob.update_mouse_pointer()
|
||||
icon_state = initial(icon_state)
|
||||
update_icon()
|
||||
@@ -941,7 +941,6 @@
|
||||
/obj/mecha/container_resist(mob/living/user)
|
||||
go_out()
|
||||
|
||||
|
||||
/obj/mecha/Exited(atom/movable/M, atom/newloc)
|
||||
if(occupant && occupant == M) // The occupant exited the mech without calling go_out()
|
||||
go_out(TRUE, newloc)
|
||||
@@ -993,7 +992,7 @@
|
||||
L.reset_perspective()
|
||||
mmi.mecha = null
|
||||
mmi.update_icon()
|
||||
L.canmove = 0
|
||||
L.mobility_flags = NONE
|
||||
icon_state = initial(icon_state)+"-open"
|
||||
setDir(dir_in)
|
||||
|
||||
|
||||
@@ -45,16 +45,6 @@
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/mecha/working/ripley/update_icon()
|
||||
..()
|
||||
var/datum/component/armor_plate/C = GetComponent(/datum/component/armor_plate)
|
||||
if (C.amount)
|
||||
cut_overlays()
|
||||
if(C.amount < 3)
|
||||
add_overlay(occupant ? "ripley-g" : "ripley-g-open")
|
||||
else
|
||||
add_overlay(occupant ? "ripley-g-full" : "ripley-g-full-open")
|
||||
|
||||
/obj/mecha/working/ripley/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/armor_plate,3,/obj/item/stack/sheet/animalhide/goliath_hide,list("melee" = 10, "bullet" = 5, "laser" = 5))
|
||||
|
||||
@@ -36,8 +36,7 @@
|
||||
|
||||
//procs that handle the actual buckling and unbuckling
|
||||
/atom/movable/proc/buckle_mob(mob/living/M, force = FALSE, check_loc = TRUE)
|
||||
if(!buckled_mobs)
|
||||
buckled_mobs = list()
|
||||
LAZYINITLIST(buckled_mobs)
|
||||
|
||||
if(!istype(M))
|
||||
return FALSE
|
||||
@@ -66,7 +65,7 @@
|
||||
M.buckled = src
|
||||
M.setDir(dir)
|
||||
buckled_mobs |= M
|
||||
M.update_canmove()
|
||||
M.update_mobility()
|
||||
M.throw_alert("buckled", /obj/screen/alert/restrained/buckled)
|
||||
post_buckle_mob(M)
|
||||
|
||||
@@ -85,7 +84,7 @@
|
||||
. = buckled_mob
|
||||
buckled_mob.buckled = null
|
||||
buckled_mob.anchored = initial(buckled_mob.anchored)
|
||||
buckled_mob.update_canmove()
|
||||
buckled_mob.update_mobility()
|
||||
buckled_mob.clear_alert("buckled")
|
||||
buckled_mobs -= buckled_mob
|
||||
SEND_SIGNAL(src, COMSIG_MOVABLE_UNBUCKLE, buckled_mob, force)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user