Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into tggenetics
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
|
||||
|
||||
@@ -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
|
||||
|
||||
+59
-8
@@ -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
|
||||
@@ -98,7 +97,7 @@
|
||||
|
||||
var/temp_list = list()
|
||||
for(var/i in custom_materials)
|
||||
temp_list[getmaterialref(i)] = custom_materials[i] //Get the proper instanced version
|
||||
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)
|
||||
|
||||
@@ -334,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()
|
||||
@@ -346,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()
|
||||
@@ -356,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
|
||||
@@ -899,7 +904,7 @@ Proc for attack log creation, because really why not
|
||||
|
||||
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 = getmaterialref(i)
|
||||
var/datum/material/custom_material = SSmaterials.GetMaterialRef(i)
|
||||
custom_material.on_removed(src, material_flags) //Remove the current materials
|
||||
|
||||
if(!length(materials))
|
||||
@@ -908,8 +913,54 @@ Proc for attack log creation, because really why not
|
||||
custom_materials = list() //Reset the list
|
||||
|
||||
for(var/x in materials)
|
||||
var/datum/material/custom_material = getmaterialref(x)
|
||||
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)
|
||||
|
||||
@@ -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.")
|
||||
|
||||
@@ -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)
|
||||
@@ -1075,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)
|
||||
@@ -1092,7 +1095,7 @@ 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()
|
||||
@@ -1155,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))
|
||||
|
||||
@@ -23,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
|
||||
|
||||
@@ -47,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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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 ..()
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
/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[getmaterialref(/datum/material/glass)])
|
||||
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
|
||||
flick("autolathe_o",src)//plays metal insertion animation
|
||||
|
||||
@@ -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())
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -480,51 +480,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.
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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")
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
. = ..()
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -970,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)
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/autoylathe/proc/AfterMaterialInsert(obj/item/item_inserted, id_inserted, amount_inserted)
|
||||
if(item_inserted.custom_materials?.len && item_inserted.custom_materials[getmaterialref(/datum/material/glass)])
|
||||
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
|
||||
flick("autolathe_o",src)//plays metal insertion animation
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
. = ..()
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
|
||||
/obj/effect/anomaly/grav/proc/gravShock(mob/living/A)
|
||||
if(boing && isliving(A) && !A.stat)
|
||||
A.Knockdown(40)
|
||||
A.DefaultCombatKnockdown(40)
|
||||
var/atom/target = get_edge_target_turf(A, get_dir(src, get_step_away(A, src)))
|
||||
A.throw_at(target, 5, 1)
|
||||
boing = 0
|
||||
|
||||
@@ -409,6 +409,21 @@
|
||||
desc = "A poster advertising a movie about some masked men."
|
||||
icon_state = "poster44"
|
||||
|
||||
/obj/structure/sign/poster/contraband/buzzfuzz
|
||||
name = "Buzz Fuzz"
|
||||
desc = "A poster advertising the newest drink \"Buzz Fuzz\" with its iconic slogan of ~A Hive of Flavour~."
|
||||
icon_state = "poster45"
|
||||
|
||||
/obj/structure/sign/poster/contraband/scum
|
||||
name = "Security are Scum"
|
||||
desc = "Anti-security propaganda. Features a human NanoTrasen security officer being shot in the head, with the words 'Scum' and a short inciteful manifesto. Used to anger security."
|
||||
icon_state = "poster46"
|
||||
|
||||
/obj/structure/sign/poster/contraband/syndicate_logo
|
||||
name = "Syndicate"
|
||||
desc = "A poster decipting a snake shaped into an ominous 'S'!"
|
||||
icon_state = "poster47"
|
||||
|
||||
/obj/structure/sign/poster/official
|
||||
poster_item_name = "motivational poster"
|
||||
poster_item_desc = "An official Nanotrasen-issued poster to foster a compliant and obedient workforce. It comes with state-of-the-art adhesive backing, for easy pinning to any vertical surface."
|
||||
@@ -595,4 +610,49 @@
|
||||
desc = "This informational poster teaches the viewer what carbon dioxide is."
|
||||
icon_state = "poster35_legit"
|
||||
|
||||
/obj/structure/sign/poster/official/spiderlings
|
||||
name = "Spiderlings"
|
||||
desc = "This poster informs the crew of the dangers of spiderlings."
|
||||
icon_state = "poster36_legit"
|
||||
|
||||
/obj/structure/sign/poster/official/duelshotgun
|
||||
name = "Cycler Shotgun Ad"
|
||||
desc = "A poster advertising an advanced dual magazine tubes shotgun, boasting about how easy it is to swap between the two tubes."
|
||||
icon_state = "poster37_legit"
|
||||
|
||||
/obj/structure/sign/poster/official/fashion
|
||||
name = "Fashion!"
|
||||
desc = "An advertisement for 'Fashion!', a popular fashion magazine, depicting a woman with a black dress with a golden trim, she also has a red poppy in her hair."
|
||||
icon_state = "poster38_legit"
|
||||
|
||||
/obj/structure/sign/poster/official/pda_ad600
|
||||
name = "NT PDA600 Ad"
|
||||
desc = "A poster advertising an old discounted Nanotrasen PDA. This is the old 600 model, it has a small screen and suffered from security and networking issues."
|
||||
icon_state = "poster39_legit"
|
||||
|
||||
/obj/structure/sign/poster/official/pda_ad800
|
||||
name = "NT PDA800 Ad"
|
||||
desc = "An advertisement on an old Nanotrasen PDA model. The 800 fixed a lot of security flaws that the 600 had; it also had large touchscreen and hot-swappable cartridges."
|
||||
icon_state = "poster40_legit"
|
||||
|
||||
/obj/structure/sign/poster/official/hydro_ad
|
||||
name = "Hydroponics Tray"
|
||||
desc = "An advertisement for hydroponics trays. Space Station 13's botanical department uses a slightly newer model, but the principles are the same. From left to right: Green means the plant is done, red means the plant is unhealthy, flashing red means pests or weeds, yellow means the plant needs nutriment and blue means the plant needs water."
|
||||
icon_state = "poster41_legit"
|
||||
|
||||
/obj/structure/sign/poster/official/medical_green_cross
|
||||
name = "Medical"
|
||||
desc = "A green cross, one of the interplanetary symbol of health and aid. It has a bunch of common languages at the top with translations." // Didn't the American Heart Foundation trademark red crosses? I'm playing it safe with green, not that they'll notice spacegame13 poster.
|
||||
icon_state = "poster42_legit"
|
||||
|
||||
/obj/structure/sign/poster/official/nt_storm_officer
|
||||
name = "NT Storm Ad"
|
||||
desc = "An advertisement for NanoTrasen Storm. A premium infantry helmet, This is the officer variant. I comes with a better radio, better HUD software and better targeting sensors."
|
||||
icon_state = "poster43_legit"
|
||||
|
||||
/obj/structure/sign/poster/official/nt_storm
|
||||
name = "NT Storm Ad"
|
||||
desc = "An advertisement for NanoTrasen Storm. A premium infantry helmet, It contains a rebreather and full head coverage for use on harsh environments where the air isn't always safe to breathe."
|
||||
icon_state = "poster44_legit"
|
||||
|
||||
#undef PLACE_SPEED
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
if(gibs_reagent_id)
|
||||
reagents.add_reagent(gibs_reagent_id, 5)
|
||||
if(gibs_bloodtype)
|
||||
add_blood_DNA(list("Non-human DNA" = gibs_bloodtype, diseases))
|
||||
add_blood_DNA(list("Non-human DNA" = gibs_bloodtype), diseases)
|
||||
update_icon()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/update_icon()
|
||||
|
||||
@@ -104,4 +104,5 @@
|
||||
if(explosion_message)
|
||||
location.visible_message("<span class='danger'>The solution violently explodes!</span>", \
|
||||
"<span class='italics'>You hear an explosion!</span>")
|
||||
dyn_explosion(location, amount, flashing_factor)
|
||||
dyn_explosion(location, amount, flashing_factor)
|
||||
|
||||
|
||||
@@ -151,6 +151,10 @@ INITIALIZE_IMMEDIATE(/obj/effect/landmark)
|
||||
name = "Medical Doctor"
|
||||
icon_state = "Medical Doctor"
|
||||
|
||||
/obj/effect/landmark/start/paramedic
|
||||
name = "Paramedic"
|
||||
icon_state = "Paramedic"
|
||||
|
||||
/obj/effect/landmark/start/scientist
|
||||
name = "Scientist"
|
||||
icon_state = "Scientist"
|
||||
@@ -502,8 +506,3 @@ INITIALIZE_IMMEDIATE(/obj/effect/landmark/start/new_player)
|
||||
/obj/effect/landmark/stationroom/box/engine/New()
|
||||
. = ..()
|
||||
templates = CONFIG_GET(keyed_list/box_random_engine)
|
||||
|
||||
// Landmark for the mining station
|
||||
/obj/effect/landmark/stationroom/lavaland/station
|
||||
templates = list("Public Mining Base" = 3)
|
||||
icon = 'icons/rooms/Lavaland/Mining.dmi'
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
/obj/effect/mine/stun/mineEffect(mob/living/victim)
|
||||
if(isliving(victim))
|
||||
victim.Knockdown(stun_time)
|
||||
victim.DefaultCombatKnockdown(stun_time)
|
||||
|
||||
/obj/effect/mine/kickmine
|
||||
name = "kick mine"
|
||||
|
||||
@@ -61,10 +61,11 @@
|
||||
if(AM in T.affecting)
|
||||
return
|
||||
|
||||
if(ismob(AM))
|
||||
var/mob/M = AM
|
||||
if(isliving(AM))
|
||||
var/mob/living/M = AM
|
||||
if(immobilize)
|
||||
M.canmove = 0
|
||||
ADD_TRAIT(M, TRAIT_MOBILITY_NOMOVE, src)
|
||||
M.update_mobility()
|
||||
|
||||
affecting.Add(AM)
|
||||
while(AM && !stopthrow)
|
||||
@@ -98,10 +99,11 @@
|
||||
|
||||
affecting.Remove(AM)
|
||||
|
||||
if(ismob(AM))
|
||||
var/mob/M = AM
|
||||
if(isliving(AM))
|
||||
var/mob/living/M = AM
|
||||
if(immobilize)
|
||||
M.canmove = 1
|
||||
REMOVE_TRAIT(M, TRAIT_MOBILITY_NOMOVE, src)
|
||||
M.update_mobility()
|
||||
|
||||
/* Stops things thrown by a thrower, doesn't do anything */
|
||||
|
||||
|
||||
@@ -139,13 +139,6 @@
|
||||
/obj/effect/temp_visual/dir_setting/curse/hand
|
||||
icon_state = "cursehand"
|
||||
|
||||
/obj/effect/temp_visual/dir_setting/curse/hand/Initialize(mapload, set_dir, handedness)
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/projectile/curse_hand/update_icon()
|
||||
icon_state = "[icon_state][handedness]"
|
||||
|
||||
/obj/effect/temp_visual/wizard
|
||||
name = "water"
|
||||
icon = 'icons/mob/mob.dmi'
|
||||
@@ -474,7 +467,7 @@
|
||||
else
|
||||
update_icon()
|
||||
|
||||
/obj/effect/constructing_effect/update_icon()
|
||||
/obj/effect/constructing_effect/update_icon_state()
|
||||
icon_state = "rcd"
|
||||
if (delay < 10)
|
||||
icon_state += "_shortest"
|
||||
|
||||
@@ -175,14 +175,13 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if(!isturf(loc) || usr.stat || usr.restrained() || !usr.canmove)
|
||||
var/mob/living/L = usr
|
||||
if(!istype(L) || !isturf(loc) || !CHECK_MOBILITY(L, MOBILITY_USE))
|
||||
return
|
||||
|
||||
var/turf/T = src.loc
|
||||
|
||||
src.loc = null
|
||||
|
||||
src.loc = T
|
||||
var/turf/T = loc
|
||||
loc = null
|
||||
loc = T
|
||||
|
||||
/obj/item/examine(mob/user) //This might be spammy. Remove?
|
||||
. = ..()
|
||||
@@ -378,6 +377,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
qdel(src)
|
||||
item_flags &= ~IN_INVENTORY
|
||||
SEND_SIGNAL(src, COMSIG_ITEM_DROPPED,user)
|
||||
user.update_equipment_speed_mods()
|
||||
|
||||
// called just as an item is picked up (loc is not yet changed)
|
||||
/obj/item/proc/pickup(mob/user)
|
||||
@@ -423,6 +423,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
if(item_action_slot_check(slot, user, A)) //some items only give their actions buttons when in a specific slot.
|
||||
A.Grant(user)
|
||||
item_flags |= IN_INVENTORY
|
||||
user.update_equipment_speed_mods()
|
||||
|
||||
//sometimes we only want to grant the item's action if it's equipped in a specific slot.
|
||||
/obj/item/proc/item_action_slot_check(slot, mob/user, datum/action/A)
|
||||
@@ -544,7 +545,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
to_chat(M, "<span class='danger'>You drop what you're holding and clutch at your eyes!</span>")
|
||||
M.adjust_blurriness(10)
|
||||
M.Unconscious(20)
|
||||
M.Knockdown(40)
|
||||
M.DefaultCombatKnockdown(40)
|
||||
if (prob(eyes.damage - 10 + 1))
|
||||
M.become_blind(EYE_DAMAGE)
|
||||
to_chat(M, "<span class='danger'>You go blind!</span>")
|
||||
|
||||
@@ -552,8 +552,8 @@ RLD
|
||||
explosion(src, 0, 0, 3, 1, flame_range = 1)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/construction/rcd/update_icon()
|
||||
..()
|
||||
/obj/item/construction/rcd/update_overlays()
|
||||
. = ..()
|
||||
if(has_ammobar)
|
||||
var/ratio = CEILING((matter / max_matter) * ammo_sections, 1)
|
||||
cut_overlays() //To prevent infinite stacking of overlays
|
||||
@@ -707,11 +707,10 @@ RLD
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/construction/rld/update_icon()
|
||||
..()
|
||||
/obj/item/construction/rld/update_overlays()
|
||||
. = ..()
|
||||
var/ratio = CEILING((matter / max_matter) * ammo_sections, 1)
|
||||
cut_overlays() //To prevent infinite stacking of overlays
|
||||
add_overlay("rld_light[ratio]")
|
||||
. += "rld_light[ratio]"
|
||||
|
||||
/obj/item/construction/rld/attack_self(mob/user)
|
||||
..()
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
name = "rapid cable layer"
|
||||
desc = "A device used to rapidly deploy cables. It has screws on the side which can be removed to slide off the cables. Do not use without insulation!"
|
||||
icon = 'icons/obj/tools.dmi'
|
||||
icon_state = "rcl-empty"
|
||||
item_state = "rcl-0"
|
||||
icon_state = "rcl"
|
||||
item_state = "rcl"
|
||||
var/obj/structure/cable/last
|
||||
var/obj/item/stack/cable_coil/loaded
|
||||
opacity = FALSE
|
||||
@@ -23,6 +23,14 @@
|
||||
var/datum/radial_menu/persistent/wiring_gui_menu
|
||||
var/mob/listeningTo
|
||||
|
||||
/obj/item/twohanded/rcl/Initialize()
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/twohanded/rcl/ComponentInitialize()
|
||||
. = ..()
|
||||
AddElement(/datum/element/update_icon_updates_onmob)
|
||||
|
||||
/obj/item/twohanded/rcl/attackby(obj/item/W, mob/user)
|
||||
if(istype(W, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/C = W
|
||||
@@ -90,34 +98,28 @@
|
||||
QDEL_NULL(wiring_gui_menu)
|
||||
return ..()
|
||||
|
||||
/obj/item/twohanded/rcl/update_icon()
|
||||
if(!loaded)
|
||||
icon_state = "rcl-empty"
|
||||
item_state = "rcl-empty"
|
||||
/obj/item/twohanded/rcl/update_icon_state()
|
||||
icon_state = initial(icon_state)
|
||||
item_state = initial(item_state)
|
||||
if(!loaded || !loaded.amount)
|
||||
icon_state += "-empty"
|
||||
item_state += "-0"
|
||||
|
||||
/obj/item/twohanded/rcl/update_overlays()
|
||||
. = ..()
|
||||
if(!loaded || !loaded.amount)
|
||||
return
|
||||
cut_overlays()
|
||||
var/cable_amount = 0
|
||||
switch(loaded.amount)
|
||||
if(61 to INFINITY)
|
||||
cable_amount = 3
|
||||
if(31 to 60)
|
||||
cable_amount = 2
|
||||
if(1 to 30)
|
||||
cable_amount = 1
|
||||
else
|
||||
cable_amount = 0
|
||||
|
||||
var/mutable_appearance/cable_overlay = mutable_appearance(icon, "rcl-[cable_amount]")
|
||||
var/mutable_appearance/cable_overlay = mutable_appearance(icon, "[initial(icon_state)]-[CEILING(loaded.amount/(max_amount/3), 1)]")
|
||||
cable_overlay.color = GLOB.cable_colors[colors[current_color_index]]
|
||||
if(cable_amount >= 1)
|
||||
icon_state = "rcl"
|
||||
item_state = "rcl"
|
||||
add_overlay(cable_overlay)
|
||||
else
|
||||
icon_state = "rcl-empty"
|
||||
item_state = "rcl-0"
|
||||
add_overlay(cable_overlay)
|
||||
. += cable_overlay
|
||||
|
||||
/obj/item/twohanded/rcl/worn_overlays(isinhands, icon_file, style_flags = NONE)
|
||||
. = ..()
|
||||
if(!isinhands || !(loaded?.amount))
|
||||
return
|
||||
var/mutable_appearance/cable_overlay = mutable_appearance(icon, "rcl-[CEILING(loaded.amount/(max_amount/3), 1)]")
|
||||
cable_overlay.color = GLOB.cable_colors[colors[current_color_index]]
|
||||
. += cable_overlay
|
||||
|
||||
/obj/item/twohanded/rcl/proc/is_empty(mob/user, loud = 1)
|
||||
update_icon()
|
||||
@@ -289,18 +291,6 @@ obj/item/twohanded/rcl/proc/getMobhook(mob/to_hook)
|
||||
|
||||
wiringGuiUpdate(user)
|
||||
|
||||
|
||||
/obj/item/twohanded/rcl/pre_loaded/Initialize() //Comes preloaded with cable, for testing stuff
|
||||
. = ..()
|
||||
loaded = new()
|
||||
loaded.max_amount = max_amount
|
||||
loaded.amount = max_amount
|
||||
update_icon()
|
||||
|
||||
/obj/item/twohanded/rcl/Initialize()
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/twohanded/rcl/ui_action_click(mob/user, action)
|
||||
if(istype(action, /datum/action/item_action/rcl_col))
|
||||
current_color_index++;
|
||||
@@ -319,37 +309,15 @@ obj/item/twohanded/rcl/proc/getMobhook(mob/to_hook)
|
||||
else //open the menu
|
||||
showWiringGui(user)
|
||||
|
||||
/obj/item/twohanded/rcl/pre_loaded/Initialize() //Comes preloaded with cable, for testing stuff
|
||||
loaded = new()
|
||||
loaded.max_amount = max_amount
|
||||
loaded.amount = max_amount
|
||||
return ..()
|
||||
|
||||
/obj/item/twohanded/rcl/ghetto
|
||||
actions_types = list()
|
||||
max_amount = 30
|
||||
name = "makeshift rapid cable layer"
|
||||
icon_state = "rclg"
|
||||
ghetto = TRUE
|
||||
|
||||
/obj/item/twohanded/rcl/ghetto/update_icon()
|
||||
if(!loaded)
|
||||
icon_state = "rclg-empty"
|
||||
item_state = "rclg-0"
|
||||
return
|
||||
cut_overlays()
|
||||
var/cable_amount = 0
|
||||
switch(loaded.amount)
|
||||
if(20 to INFINITY)
|
||||
cable_amount = 3
|
||||
if(10 to 19)
|
||||
cable_amount = 2
|
||||
if(1 to 9)
|
||||
cable_amount = 1
|
||||
else
|
||||
cable_amount = 0
|
||||
|
||||
var/mutable_appearance/cable_overlay = mutable_appearance(icon, "rcl-[cable_amount]")
|
||||
cable_overlay.color = GLOB.cable_colors[colors[current_color_index]]
|
||||
if(cable_amount >= 1)
|
||||
icon_state = "rclg"
|
||||
item_state = "rclg"
|
||||
add_overlay(cable_overlay)
|
||||
else
|
||||
icon_state = "rclg-empty"
|
||||
item_state = "rclg-0"
|
||||
add_overlay(cable_overlay)
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user