Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into Ghommie-cit595
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
|
||||
|
||||
|
||||
+11
-34
@@ -63,6 +63,9 @@
|
||||
var/xenobiology_compatible = FALSE //Can the Xenobio management console transverse this area by default?
|
||||
var/list/canSmoothWithAreas //typecache to limit the areas that atoms in this area can smooth with
|
||||
|
||||
/// Color on minimaps, if it's null (which is default) it makes one at random.
|
||||
var/minimap_color
|
||||
|
||||
/**
|
||||
* These two vars allow for multiple unique areas to be linked to a master area
|
||||
* and share some functionalities such as APC powernet nodes, fire alarms etc, without sacrificing
|
||||
@@ -96,7 +99,14 @@ GLOBAL_LIST_EMPTY(teleportlocs)
|
||||
// ===
|
||||
|
||||
/area/New()
|
||||
// This interacts with the map loader, so it needs to be set immediately
|
||||
if(!minimap_color) // goes in New() because otherwise it doesn't fucking work
|
||||
// generate one using the icon_state
|
||||
if(icon_state && icon_state != "unknown")
|
||||
var/icon/I = new(icon, icon_state, dir)
|
||||
I.Scale(1,1)
|
||||
minimap_color = I.GetPixel(1,1)
|
||||
else // no icon state? use random.
|
||||
minimap_color = rgb(rand(50,70),rand(50,70),rand(50,70)) // This interacts with the map loader, so it needs to be set immediately
|
||||
// rather than waiting for atoms to initialize.
|
||||
if (unique)
|
||||
GLOB.areas_by_type[type] = src
|
||||
@@ -514,39 +524,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
|
||||
|
||||
+54
-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)
|
||||
|
||||
@@ -361,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
|
||||
@@ -904,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))
|
||||
@@ -913,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
|
||||
@@ -2,6 +2,7 @@
|
||||
ruletype = "Event"
|
||||
var/typepath // typepath of the event
|
||||
var/triggering
|
||||
var/earliest_start = 20 MINUTES
|
||||
|
||||
/datum/dynamic_ruleset/event/get_blackbox_info()
|
||||
var/list/ruleset_data = list()
|
||||
@@ -25,8 +26,10 @@
|
||||
|
||||
return E
|
||||
|
||||
/datum/dynamic_ruleset/event/ready(forced = FALSE) // same as midround cause we're still using enemy system
|
||||
/datum/dynamic_ruleset/event/ready(forced = FALSE)
|
||||
if (!forced)
|
||||
if(earliest_start >= world.time-SSticker.round_start_time)
|
||||
return FALSE
|
||||
var/job_check = 0
|
||||
if (enemy_roles.len > 0)
|
||||
for (var/mob/M in mode.current_players[CURRENT_LIVING_PLAYERS])
|
||||
@@ -56,6 +59,7 @@
|
||||
required_enemies = list(2,2,1,1,0,0,0,0,0,0)
|
||||
weight = 5
|
||||
cost = 10
|
||||
earliest_start = 30 MINUTES
|
||||
blocking_rules = list(/datum/dynamic_ruleset/roundstart/nuclear,/datum/dynamic_ruleset/midround/from_ghosts/nuclear)
|
||||
requirements = list(70,60,50,50,40,40,40,30,20,15)
|
||||
property_weights = list("story_potential" = 1, "trust" = 1, "chaos" = 1)
|
||||
@@ -157,17 +161,18 @@
|
||||
required_enemies = list(3,3,3,3,3,3,3,3,3,3)
|
||||
cost = 15
|
||||
weight = 3
|
||||
earliest_start = 25 MINUTES
|
||||
repeatable_weight_decrease = 2
|
||||
requirements = list(60,50,40,30,30,30,30,30,30,30)
|
||||
high_population_requirement = 30
|
||||
property_weights = list("extended" = -2)
|
||||
|
||||
/datum/dynamic_ruleset/event/meteor_wave/ready()
|
||||
if(mode.threat_level > 40 && mode.threat >= 25 && prob(20))
|
||||
if(world.time-SSticker.round_start_time > 35 MINUTES && mode.threat_level > 40 && mode.threat >= 25 && prob(30))
|
||||
name = "Meteor Wave: Threatening"
|
||||
cost = 25
|
||||
typepath = /datum/round_event/meteor_wave/threatening
|
||||
else if(mode.threat_level > 50 && mode.threat >= 40 && prob(30))
|
||||
else if(world.time-SSticker.round_start_time > 45 MINUTES && mode.threat_level > 50 && mode.threat >= 40 && prob(30))
|
||||
name = "Meteor Wave: Catastrophic"
|
||||
cost = 40
|
||||
typepath = /datum/round_event/meteor_wave/catastrophic
|
||||
@@ -280,6 +285,7 @@
|
||||
cost = 4
|
||||
requirements = list(10,10,10,10,10,10,10,10,10,10)
|
||||
high_population_requirement = 10
|
||||
earliest_start = 10 MINUTES
|
||||
repeatable = TRUE
|
||||
property_weights = list("extended" = 1)
|
||||
|
||||
@@ -324,6 +330,7 @@
|
||||
requirements = list(5,5,5,5,5,5,5,5,5,5)
|
||||
high_population_requirement = 5
|
||||
repeatable = TRUE
|
||||
earliest_start = 0 MINUTES
|
||||
property_weights = list("extended" = 1)
|
||||
always_max_weight = TRUE
|
||||
|
||||
@@ -381,3 +388,67 @@
|
||||
requirements = list(5,5,5,5,5,5,5,5,5,5)
|
||||
high_population_requirement = 5
|
||||
property_weights = list("extended" = 1,"chaos" = 1)
|
||||
|
||||
/datum/dynamic_ruleset/event/portal_storm_syndicate
|
||||
name = "Portal Storm"
|
||||
config_tag = "portal_storm"
|
||||
typepath = /datum/round_event/portal_storm/syndicate_shocktroop
|
||||
cost = 10
|
||||
weight = 1
|
||||
enemy_roles = list("Head of Security","Security Officer","AI","Captain","Shaft Miner")
|
||||
required_enemies = list(2,2,2,2,2,2,2,2,2,2)
|
||||
requirements = list(101,101,101,30,30,30,30,30,30,30)
|
||||
high_population_requirement = 30
|
||||
earliest_start = 30 MINUTES
|
||||
property_weights = list("teamwork" = 1,"chaos" = 1, "extended" = -1)
|
||||
|
||||
/datum/dynamic_ruleset/event/wormholes
|
||||
name = "Wormholes"
|
||||
config_tag = "wormhole"
|
||||
typepath = /datum/round_event/wormholes
|
||||
cost = 3
|
||||
weight = 4
|
||||
enemy_roles = list("AI","Medical Doctor","Station Engineer","Head of Personnel","Captain")
|
||||
required_enemies = list(2,2,2,2,2,2,2,2,2,2)
|
||||
requirements = list(5,5,5,5,5,5,5,5,5,5)
|
||||
high_population_requirement = 5
|
||||
property_weights = list("extended" = 1)
|
||||
|
||||
/datum/dynamic_ruleset/event/swarmers
|
||||
name = "Swarmers"
|
||||
config_tag = "swarmer"
|
||||
typepath = /datum/round_event/spawn_swarmer
|
||||
cost = 10
|
||||
weight = 1
|
||||
earliest_start = 30 MINUTES
|
||||
enemy_roles = list("AI","Security Officer","Head of Security","Captain","Station Engineer","Atmos Technician","Chief Engineer")
|
||||
required_enemies = list(4,4,4,4,3,3,2,2,1,1)
|
||||
requirements = list(101,101,101,101,101,101,101,101,101,101)
|
||||
high_population_requirement = 5
|
||||
property_weights = list("extended" = -2)
|
||||
|
||||
/datum/dynamic_ruleset/event/sentient_disease
|
||||
name = "Sentient Disease"
|
||||
config_tag = "sentient_disease"
|
||||
typepath = /datum/round_event/ghost_role/sentient_disease
|
||||
enemy_roles = list("Virologist","Chief Medical Officer","Captain","Chemist")
|
||||
required_enemies = list(2,1,1,1,0,0,0,0,0,0)
|
||||
required_candidates = 1
|
||||
weight = 4
|
||||
cost = 5
|
||||
requirements = list(30,30,20,20,15,10,10,10,10,5) // yes, it can even happen in "extended"!
|
||||
property_weights = list("story_potential" = 1, "extended" = 1, "valid" = -2)
|
||||
high_population_requirement = 5
|
||||
|
||||
/datum/dynamic_ruleset/event/revenant
|
||||
name = "Revenant"
|
||||
config_tag = "revenant"
|
||||
typepath = /datum/round_event/ghost_role/revenant
|
||||
enemy_roles = list("Chief Engineer","Station Engineer","Captain","Chaplain","AI")
|
||||
required_enemies = list(2,1,1,1,0,0,0,0,0,0)
|
||||
required_candidates = 1
|
||||
weight = 4
|
||||
cost = 5
|
||||
requirements = list(30,30,30,30,20,15,15,15,15,15)
|
||||
high_population_requirement = 15
|
||||
property_weights = list("story_potential" = -2, "extended" = -1)
|
||||
|
||||
@@ -523,88 +523,6 @@
|
||||
log_game("DYNAMIC: [key_name(S)] was spawned as a Nightmare by the midround ruleset.")
|
||||
return S
|
||||
|
||||
//////////////////////////////////////////////
|
||||
// //
|
||||
// SENTIENT DISEASE //
|
||||
// //
|
||||
//////////////////////////////////////////////
|
||||
|
||||
|
||||
/datum/dynamic_ruleset/midround/from_ghosts/sentient_disease
|
||||
name = "Sentient Disease"
|
||||
config_tag = "sentient_disease"
|
||||
antag_flag = ROLE_ALIEN
|
||||
enemy_roles = list("Virologist","Chief Medical Officer","Captain","Chemist")
|
||||
required_enemies = list(2,1,1,1,0,0,0,0,0,0)
|
||||
required_candidates = 1
|
||||
weight = 4
|
||||
cost = 5
|
||||
requirements = list(30,30,20,20,15,10,10,10,10,5) // yes, it can even happen in "extended"!
|
||||
property_weights = list("story_potential" = 1, "extended" = 1, "valid" = -2)
|
||||
high_population_requirement = 5
|
||||
|
||||
/datum/dynamic_ruleset/midround/from_ghosts/sentient_disease/generate_ruleset_body(mob/applicant)
|
||||
var/mob/camera/disease/virus = new /mob/camera/disease(SSmapping.get_station_center())
|
||||
applicant.transfer_ckey(virus, FALSE)
|
||||
INVOKE_ASYNC(virus, /mob/camera/disease/proc/pick_name)
|
||||
message_admins("[ADMIN_LOOKUPFLW(virus)] has been made into a sentient disease by the midround ruleset.")
|
||||
log_game("[key_name(virus)] was spawned as a sentient disease by the midround ruleset.")
|
||||
return virus
|
||||
|
||||
//////////////////////////////////////////////
|
||||
// //
|
||||
// REVENANT //
|
||||
// //
|
||||
//////////////////////////////////////////////
|
||||
|
||||
|
||||
/datum/dynamic_ruleset/midround/from_ghosts/revenant
|
||||
name = "Revenant"
|
||||
config_tag = "revenant"
|
||||
antag_flag = ROLE_REVENANT
|
||||
enemy_roles = list("Chief Engineer","Station Engineer","Captain","Chaplain","AI")
|
||||
required_enemies = list(2,1,1,1,0,0,0,0,0,0)
|
||||
required_candidates = 1
|
||||
weight = 4
|
||||
cost = 5
|
||||
requirements = list(30,30,30,30,20,15,15,15,15,15)
|
||||
high_population_requirement = 15
|
||||
property_weights = list("story_potential" = -2, "extended" = -1)
|
||||
var/list/spawn_locs = list()
|
||||
|
||||
/datum/dynamic_ruleset/midround/from_ghosts/revenant/acceptable(population = 0,threat = 0)
|
||||
var/deadMobs = 0
|
||||
for(var/mob/M in GLOB.dead_mob_list)
|
||||
deadMobs++
|
||||
if(deadMobs < REVENANT_SPAWN_THRESHOLD)
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/datum/dynamic_ruleset/midround/from_ghosts/revenant/ready(forced = FALSE)
|
||||
for(var/mob/living/L in GLOB.dead_mob_list) //look for any dead bodies
|
||||
var/turf/T = get_turf(L)
|
||||
if(T && is_station_level(T.z))
|
||||
spawn_locs += T
|
||||
if(!spawn_locs.len || spawn_locs.len < 15) //look for any morgue trays, crematoriums, ect if there weren't alot of dead bodies on the station to pick from
|
||||
for(var/obj/structure/bodycontainer/bc in GLOB.bodycontainers)
|
||||
var/turf/T = get_turf(bc)
|
||||
if(T && is_station_level(T.z))
|
||||
spawn_locs += T
|
||||
if(!spawn_locs.len) //If we can't find any valid spawnpoints, try the carp spawns
|
||||
for(var/obj/effect/landmark/carpspawn/L in GLOB.landmarks_list)
|
||||
if(isturf(L.loc))
|
||||
spawn_locs += L.loc
|
||||
if(!spawn_locs.len) //If we can't find THAT, then just give up and cry
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/datum/dynamic_ruleset/midround/from_ghosts/revenant/generate_ruleset_body(mob/applicant)
|
||||
var/mob/living/simple_animal/revenant/revvie = new(pick(spawn_locs))
|
||||
applicant.transfer_ckey(revvie, FALSE)
|
||||
message_admins("[ADMIN_LOOKUPFLW(revvie)] has been made into a revenant by the midround ruleset.")
|
||||
log_game("[key_name(revvie)] was spawned as a revenant by the midround ruleset.")
|
||||
return revvie
|
||||
|
||||
//////////////////////////////////////////////
|
||||
// //
|
||||
// SLAUGHTER DEMON //
|
||||
@@ -668,11 +586,11 @@
|
||||
required_candidates = 2
|
||||
weight = 8
|
||||
cost = 10
|
||||
requirements = list(101,101,70,50,40,30,30,20,15,15)
|
||||
requirements = list(101,101,70,50,40,30,30,30,30,30)
|
||||
blocking_rules = list(/datum/dynamic_ruleset/roundstart/nuclear,/datum/dynamic_ruleset/midround/from_ghosts/nuclear)
|
||||
high_population_requirement = 15
|
||||
var/datum/team/abductor_team/team
|
||||
property_weights = list("story_potential" = 1, "extended" = -2, "valid" = 1, "trust" = -1, "chaos" = 2)
|
||||
property_weights = list("extended" = -2, "valid" = 1, "trust" = -1, "chaos" = 2)
|
||||
repeatable_weight_decrease = 4
|
||||
repeatable = TRUE
|
||||
|
||||
@@ -742,11 +660,12 @@
|
||||
var/datum/antagonist/ninja/ninjadatum = new
|
||||
ninjadatum.helping_station = pick(TRUE,FALSE)
|
||||
if(ninjadatum.helping_station)
|
||||
mode.refund_threat(5)
|
||||
mode.refund_threat(cost+5)
|
||||
mode.log_threat("Ninja was helping station; [cost+5] cost refunded.")
|
||||
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.")
|
||||
|
||||
@@ -623,8 +623,7 @@
|
||||
config_tag = "clownops"
|
||||
antag_datum = /datum/antagonist/nukeop/clownop
|
||||
antag_leader_datum = /datum/antagonist/nukeop/leader/clownop
|
||||
requirements = list(101,101,101,101,101,101,101,101,101,101)
|
||||
high_population_requirement = 101
|
||||
weight = 1
|
||||
property_weights = list("trust" = 2, "chaos" = 2, "extended" = -2, "story_potential" = 2, "valid" = 2)
|
||||
|
||||
|
||||
|
||||
@@ -1,16 +1,22 @@
|
||||
/datum/dynamic_storyteller
|
||||
var/name = "none"
|
||||
var/config_tag = null
|
||||
var/desc = "A coder's idiocy."
|
||||
var/list/property_weights = list()
|
||||
var/curve_centre = 0
|
||||
var/curve_width = 1.8
|
||||
var/name = "none" // Name for voting.
|
||||
var/config_tag = null // Config tag for config weights.
|
||||
var/desc = "A coder's idiocy." // Description for voting.
|
||||
var/list/property_weights = list() // See below.
|
||||
var/curve_centre = 0 // As GLOB.dynamic_curve_centre.
|
||||
var/curve_width = 1.8 // As GLOB.dynamic_curve_width.
|
||||
var/forced_threat_level = -1
|
||||
/*
|
||||
NO_ASSASSIN: Will not have permanent assassination targets.
|
||||
WAROPS_ALWAYS_ALLOWED: Can always do warops, regardless of threat level.
|
||||
USE_PREF_WEIGHTS: Will use peoples' preferences to change the threat centre.
|
||||
*/
|
||||
var/flags = 0
|
||||
var/weight = 3 // how many rounds need to have been recently played for this storyteller to be left out of the vote
|
||||
var/event_frequency_lower = 6 MINUTES
|
||||
var/event_frequency_upper = 20 MINUTES
|
||||
var/datum/game_mode/dynamic/mode = null
|
||||
var/weight = 3 // Weights for randomly picking storyteller. Multiplied by score after voting.
|
||||
var/event_frequency_lower = 6 MINUTES // How rare events will be, at least.
|
||||
var/event_frequency_upper = 20 MINUTES // How rare events will be, at most.
|
||||
var/pop_antag_ratio = 5 // How many non-antags there should be vs antags.
|
||||
var/datum/game_mode/dynamic/mode = null // Cached as soon as it's made, by dynamic.
|
||||
|
||||
/**
|
||||
Property weights are:
|
||||
@@ -80,7 +86,7 @@ Property weights are:
|
||||
var/chance = 0
|
||||
// If the high pop override is in effect, we reduce the impact of population on the antag injection chance
|
||||
var/high_pop_factor = (mode.current_players[CURRENT_LIVING_PLAYERS].len >= GLOB.dynamic_high_pop_limit)
|
||||
var/max_pop_per_antag = max(5,15 - round(mode.threat_level/10) - round(mode.current_players[CURRENT_LIVING_PLAYERS].len/(high_pop_factor ? 10 : 5)))
|
||||
var/max_pop_per_antag = max(pop_antag_ratio,15 - round(mode.threat_level/10) - round(mode.current_players[CURRENT_LIVING_PLAYERS].len/(high_pop_factor ? 10 : 5)))
|
||||
if (!mode.current_players[CURRENT_LIVING_ANTAGS].len)
|
||||
chance += 80 // No antags at all? let's boost those odds!
|
||||
else
|
||||
@@ -173,12 +179,13 @@ Property weights are:
|
||||
name = "Chaotic"
|
||||
config_tag = "chaotic"
|
||||
curve_centre = 10
|
||||
desc = "Chaos: high. Variation: high. Likely antags: clock cult, revs, wizard."
|
||||
desc = "High chaos modes. Revs, wizard, clock cult. Multiple antags at once. Chaos is kept up all round."
|
||||
property_weights = list("extended" = -1, "chaos" = 10)
|
||||
weight = 1
|
||||
event_frequency_lower = 2 MINUTES
|
||||
event_frequency_upper = 10 MINUTES
|
||||
flags = WAROPS_ALWAYS_ALLOWED
|
||||
pop_antag_ratio = 4
|
||||
var/refund_cooldown = 0
|
||||
|
||||
/datum/dynamic_storyteller/cowabunga/get_midround_cooldown()
|
||||
@@ -189,14 +196,14 @@ Property weights are:
|
||||
|
||||
/datum/dynamic_storyteller/cowabunga/do_process()
|
||||
if(refund_cooldown < world.time)
|
||||
mode.refund_threat(20)
|
||||
mode.log_threat("Cowabunga it is. Refunded 20 threat. Threat is now [mode.threat].")
|
||||
refund_cooldown = world.time + 600 SECONDS
|
||||
mode.refund_threat(40)
|
||||
mode.log_threat("Chaotic storyteller refunded 40 threat. Threat is now [mode.threat].")
|
||||
refund_cooldown = world.time + 1200 SECONDS
|
||||
|
||||
/datum/dynamic_storyteller/team
|
||||
name = "Teamwork"
|
||||
config_tag = "teamwork"
|
||||
desc = "Chaos: high. Variation: low. Likely antags: nukies, clockwork cult, wizard, blob, xenomorph."
|
||||
desc = "Modes where the crew must band together. Nukies, xenos, blob. Only one antag threat at once."
|
||||
curve_centre = 2
|
||||
curve_width = 1.5
|
||||
weight = 2
|
||||
@@ -209,56 +216,71 @@ Property weights are:
|
||||
/datum/dynamic_storyteller/conversion
|
||||
name = "Conversion"
|
||||
config_tag = "conversion"
|
||||
desc = "Chaos: high. Variation: medium. Likely antags: cults, bloodsuckers, revs."
|
||||
desc = "Conversion antags. Cults, revs."
|
||||
curve_centre = 3
|
||||
curve_width = 1
|
||||
weight = 2
|
||||
weight = 0
|
||||
flags = WAROPS_ALWAYS_ALLOWED
|
||||
property_weights = list("valid" = 1, "conversion" = 20)
|
||||
|
||||
/datum/dynamic_storyteller/classic
|
||||
name = "Random"
|
||||
config_tag = "random"
|
||||
desc = "Chaos: varies. Variation: highest. No special weights attached."
|
||||
weight = 6
|
||||
flags = USE_PREF_WEIGHTS
|
||||
desc = "No special weights attached. Anything goes."
|
||||
weight = 4
|
||||
curve_width = 4
|
||||
pop_antag_ratio = 7
|
||||
flags = USE_PREF_WEIGHTS
|
||||
|
||||
/datum/dynamic_storyteller/memes
|
||||
name = "Story"
|
||||
config_tag = "story"
|
||||
desc = "Chaos: varies. Variation: high. Likely antags: abductors, nukies, wizard, traitor."
|
||||
weight = 4
|
||||
flags = USE_PREF_WEIGHTS
|
||||
curve_width = 4
|
||||
desc = "Antags with options for loadouts and gimmicks. Traitor, wizard, nukies."
|
||||
weight = 2
|
||||
curve_width = 2
|
||||
pop_antag_ratio = 7
|
||||
property_weights = list("story_potential" = 10)
|
||||
|
||||
/datum/dynamic_storyteller/suspicion
|
||||
name = "Intrigue"
|
||||
config_tag = "intrigue"
|
||||
desc = "Chaos: low. Variation: high. Likely antags: traitor, bloodsucker. Rare: revs, blood cult."
|
||||
weight = 4
|
||||
flags = USE_PREF_WEIGHTS
|
||||
curve_width = 4
|
||||
desc = "Antags that instill distrust in the crew. Traitors, bloodsuckers."
|
||||
weight = 2
|
||||
curve_width = 2
|
||||
pop_antag_ratio = 7
|
||||
property_weights = list("trust" = -5)
|
||||
|
||||
/datum/dynamic_storyteller/liteextended
|
||||
name = "Calm"
|
||||
config_tag = "calm"
|
||||
desc = "Chaos: low. Variation: medium. Likely antags: bloodsuckers, traitors, sentient disease, revenant."
|
||||
desc = "Low-chaos round. Few antags. No conversion."
|
||||
curve_centre = -3
|
||||
curve_width = 0.5
|
||||
flags = NO_ASSASSIN
|
||||
weight = 1
|
||||
pop_antag_ratio = 10
|
||||
property_weights = list("extended" = 1, "chaos" = -1, "valid" = -1, "story_potential" = 1, "conversion" = -10)
|
||||
|
||||
/datum/dynamic_storyteller/no_antag
|
||||
name = "Extended"
|
||||
config_tag = "semiextended"
|
||||
desc = "No standard antags. Threatening events may still spawn."
|
||||
curve_centre = -5
|
||||
curve_width = 0.5
|
||||
flags = NO_ASSASSIN
|
||||
weight = 2
|
||||
property_weights = list("extended" = 1, "chaos" = -1, "valid" = -1, "story_potential" = 1, "conversion" = -10)
|
||||
weight = 1
|
||||
property_weights = list("extended" = 2)
|
||||
|
||||
/datum/dynamic_storyteller/liteextended/get_injection_chance(dry_run = FALSE)
|
||||
return ..()/2
|
||||
/datum/dynamic_storyteller/no_antag/roundstart_draft()
|
||||
return list()
|
||||
|
||||
/datum/dynamic_storyteller/no_antag/get_injection_chance(dry_run)
|
||||
return 0
|
||||
|
||||
/datum/dynamic_storyteller/extended
|
||||
name = "Extended"
|
||||
name = "Super Extended"
|
||||
config_tag = "extended"
|
||||
desc = "Chaos: none. Variation: none. Likely antags: none."
|
||||
desc = "No antags. No dangerous events."
|
||||
curve_centre = -20
|
||||
weight = 0
|
||||
curve_width = 0.5
|
||||
|
||||
@@ -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,18 +23,18 @@
|
||||
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/sbeacondrop/powersink)
|
||||
var/sink_found = FALSE
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
if(!charging)
|
||||
return
|
||||
|
||||
. += image(charging.icon, charging.icon_state)
|
||||
. += mutable_appearance(charging.icon, charging.icon_state)
|
||||
. += "ccharger-on"
|
||||
if(!(stat & (BROKEN|NOPOWER)))
|
||||
var/newlevel = round(charging.percent() * 4 / 100)
|
||||
|
||||
@@ -77,6 +77,8 @@
|
||||
name = "cloning data disk"
|
||||
icon_state = "datadisk0" //Gosh I hope syndies don't mistake them for the nuke disk.
|
||||
var/list/fields = list()
|
||||
var/list/mutations = list()
|
||||
var/max_mutations = 6
|
||||
var/read_only = 0 //Well,it's still a floppy disk
|
||||
|
||||
//Disk stuff.
|
||||
@@ -129,7 +131,7 @@
|
||||
return examine(user)
|
||||
|
||||
//Start growing a human clone in the pod!
|
||||
/obj/machinery/clonepod/proc/growclone(ckey, clonename, ui, se, mindref, datum/species/mrace, list/features, factions, list/quirks)
|
||||
/obj/machinery/clonepod/proc/growclone(ckey, clonename, ui, mutation_index, mindref, datum/species/mrace, list/features, factions, list/quirks)
|
||||
if(panel_open)
|
||||
return FALSE
|
||||
if(mess || attempting)
|
||||
@@ -165,8 +167,9 @@
|
||||
|
||||
var/mob/living/carbon/human/H = new /mob/living/carbon/human(src)
|
||||
|
||||
H.hardset_dna(ui, se, H.real_name, null, mrace, features)
|
||||
H.randmutb() //100% bad mutation. Can be cured with mutadone.
|
||||
H.hardset_dna(ui, mutation_index, H.real_name, null, mrace, features)
|
||||
|
||||
H.easy_randmut(NEGATIVE+MINOR_NEGATIVE) //100% bad mutation. Can be cured with mutadone.
|
||||
|
||||
H.silent = 20 //Prevents an extreme edge case where clones could speak if they said something at exactly the right moment.
|
||||
occupant = H
|
||||
@@ -491,29 +494,29 @@
|
||||
/obj/machinery/clonepod/update_overlays()
|
||||
. = ..()
|
||||
if(mess)
|
||||
var/image/gib1 = image(CRYOMOBS, "gibup")
|
||||
var/image/gib2 = image(CRYOMOBS, "gibdown")
|
||||
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
|
||||
. += "cover-on"
|
||||
else if(occupant)
|
||||
var/image/occupant_overlay
|
||||
var/mutable_appearance/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 = mutable_appearance(occupant.icon, occupant.icon_state)
|
||||
occupant_overlay.copy_overlays(occupant)
|
||||
. += "cover-on"
|
||||
else
|
||||
occupant_overlay = image(CRYOMOBS, "clone_meat")
|
||||
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 = 0
|
||||
occupant_overlay.appearance_flags = NONE
|
||||
|
||||
occupant_overlay.dir = SOUTH
|
||||
occupant_overlay.pixel_y = 27 + round(sin(world.time) * 3)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -485,7 +485,7 @@
|
||||
R.fields["id"] = copytext_char(md5(mob_occupant.real_name), 2, 6)
|
||||
R.fields["UE"] = dna.unique_enzymes
|
||||
R.fields["UI"] = dna.uni_identity
|
||||
R.fields["SE"] = dna.struc_enzymes
|
||||
R.fields["SE"] = dna.mutation_index
|
||||
R.fields["blood_type"] = dna.blood_type
|
||||
R.fields["features"] = dna.features
|
||||
R.fields["factions"] = mob_occupant.faction
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
var/message_cooldown = 0
|
||||
var/ai_message_cooldown = 0
|
||||
var/tmp_alertlevel = 0
|
||||
var/static/security_level_cd // used to stop mass spam.
|
||||
var/const/STATE_DEFAULT = 1
|
||||
var/const/STATE_CALLSHUTTLE = 2
|
||||
var/const/STATE_CANCELSHUTTLE = 3
|
||||
@@ -94,16 +95,18 @@
|
||||
I = pda.id
|
||||
if (I && istype(I))
|
||||
if(ACCESS_CAPTAIN in I.access)
|
||||
if(security_level_cd > world.time)
|
||||
to_chat(usr, "<span class='warning'>Security level protocols are currently on cooldown. Please stand by.</span>")
|
||||
return
|
||||
var/old_level = GLOB.security_level
|
||||
if(!tmp_alertlevel)
|
||||
tmp_alertlevel = SEC_LEVEL_GREEN
|
||||
if(tmp_alertlevel < SEC_LEVEL_GREEN)
|
||||
tmp_alertlevel = SEC_LEVEL_GREEN
|
||||
if(tmp_alertlevel == SEC_LEVEL_BLUE)
|
||||
tmp_alertlevel = SEC_LEVEL_BLUE
|
||||
if(tmp_alertlevel > SEC_LEVEL_AMBER)
|
||||
tmp_alertlevel = SEC_LEVEL_AMBER //Cannot engage delta with this
|
||||
set_security_level(tmp_alertlevel)
|
||||
security_level_cd = world.time + 15 SECONDS
|
||||
if(GLOB.security_level != old_level)
|
||||
to_chat(usr, "<span class='notice'>Authorization confirmed. Modifying security level.</span>")
|
||||
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
|
||||
@@ -376,19 +379,21 @@
|
||||
if("ai-announce")
|
||||
make_announcement(usr, 1)
|
||||
if("ai-securitylevel")
|
||||
if(security_level_cd > world.time)
|
||||
to_chat(usr, "<span class='warning'>Security level protocols are currently on cooldown. Please stand by.</span>")
|
||||
return
|
||||
tmp_alertlevel = text2num( href_list["newalertlevel"] )
|
||||
if(!tmp_alertlevel)
|
||||
tmp_alertlevel = 0
|
||||
tmp_alertlevel = SEC_LEVEL_GREEN
|
||||
var/old_level = GLOB.security_level
|
||||
if(!tmp_alertlevel)
|
||||
tmp_alertlevel = SEC_LEVEL_GREEN
|
||||
if(tmp_alertlevel < SEC_LEVEL_GREEN)
|
||||
tmp_alertlevel = SEC_LEVEL_GREEN
|
||||
if(tmp_alertlevel == SEC_LEVEL_BLUE)
|
||||
tmp_alertlevel = SEC_LEVEL_BLUE
|
||||
if(tmp_alertlevel > SEC_LEVEL_AMBER)
|
||||
tmp_alertlevel = SEC_LEVEL_AMBER //Cannot engage delta with this
|
||||
set_security_level(tmp_alertlevel)
|
||||
security_level_cd = world.time + 15 SECONDS
|
||||
if(GLOB.security_level != old_level)
|
||||
//Only notify people if an actual change happened
|
||||
var/security_level = get_security_level()
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
#define INJECTOR_TIMEOUT 100
|
||||
#define REJUVENATORS_INJECT 15
|
||||
#define REJUVENATORS_MAX 90
|
||||
#define NUMBER_OF_BUFFERS 3
|
||||
#define SCRAMBLE_TIMEOUT 600
|
||||
#define JOKER_TIMEOUT 12000 //20 minutes
|
||||
#define JOKER_UPGRADE 1800
|
||||
|
||||
#define RADIATION_STRENGTH_MAX 15
|
||||
#define RADIATION_STRENGTH_MULTIPLIER 1 //larger has a more range
|
||||
#define RADIATION_STRENGTH_MULTIPLIER 1 //larger has more range
|
||||
|
||||
#define RADIATION_DURATION_MAX 30
|
||||
#define RADIATION_ACCURACY_MULTIPLIER 3 //larger is less accurate
|
||||
|
||||
|
||||
#define RADIATION_IRRADIATION_MULTIPLIER 1 //multiplier for how much radiation a test subject receives
|
||||
|
||||
#define SCANNER_ACTION_SE 1
|
||||
@@ -23,22 +25,44 @@
|
||||
icon_keyboard = "med_key"
|
||||
density = TRUE
|
||||
circuit = /obj/item/circuitboard/computer/scan_consolenew
|
||||
var/radduration = 2
|
||||
var/radstrength = 1
|
||||
|
||||
var/list/buffer[NUMBER_OF_BUFFERS]
|
||||
|
||||
var/injectorready = 0 //world timer cooldown var
|
||||
var/current_screen = "mainmenu"
|
||||
var/obj/machinery/dna_scannernew/connected = null
|
||||
var/obj/item/disk/data/diskette = null
|
||||
var/list/delayed_action = null
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 10
|
||||
active_power_usage = 400
|
||||
|
||||
light_color = LIGHT_COLOR_BLUE
|
||||
|
||||
var/datum/techweb/stored_research
|
||||
var/max_storage = 6
|
||||
var/combine
|
||||
var/radduration = 2
|
||||
var/radstrength = 1
|
||||
var/max_chromosomes = 6
|
||||
|
||||
///Amount of mutations we can store
|
||||
var/list/buffer[NUMBER_OF_BUFFERS]
|
||||
///mutations we have stored
|
||||
var/list/stored_mutations = list()
|
||||
///chromosomes we have stored
|
||||
var/list/stored_chromosomes = list()
|
||||
///combinations of injectors for the 'injector selection'. format is list("Elsa" = list(Cryokinesis, Geladikinesis), "The Hulk" = list(Hulk, Gigantism), etc) Glowy and the gang being an initialized datum
|
||||
var/list/injector_selection = list()
|
||||
///max amount of selections you can make
|
||||
var/max_injector_selections = 2
|
||||
///hard-cap on the advanced dna injector
|
||||
var/max_injector_mutations = 10
|
||||
///the max instability of the advanced injector.
|
||||
var/max_injector_instability = 50
|
||||
|
||||
var/injectorready = 0 //world timer cooldown var
|
||||
var/jokerready = 0
|
||||
var/scrambleready = 0
|
||||
var/current_screen = "mainmenu"
|
||||
var/current_mutation //what block are we inspecting? only used when screen = "info"
|
||||
var/current_storage //what storage block are we looking at?
|
||||
var/obj/machinery/dna_scannernew/connected = null
|
||||
var/obj/item/disk/data/diskette = null
|
||||
var/list/delayed_action = null
|
||||
|
||||
/obj/machinery/computer/scan_consolenew/attackby(obj/item/I, mob/user, params)
|
||||
if (istype(I, /obj/item/disk/data)) //INSERT SOME DISKETTES
|
||||
if (!src.diskette)
|
||||
@@ -48,6 +72,28 @@
|
||||
to_chat(user, "<span class='notice'>You insert [I].</span>")
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
if (istype(I, /obj/item/chromosome))
|
||||
if(LAZYLEN(stored_chromosomes) < max_chromosomes)
|
||||
I.forceMove(src)
|
||||
stored_chromosomes += I
|
||||
to_chat(user, "<span class='notice'>You insert [I].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You cannot store any more chromosomes!</span>")
|
||||
return
|
||||
if(istype(I, /obj/item/dnainjector/activator))
|
||||
var/obj/item/dnainjector/activator/A = I
|
||||
if(A.used)
|
||||
to_chat(user,"<span class='notice'>Recycled [I].</span>")
|
||||
if(A.research)
|
||||
var/c_typepath = generate_chromosome()
|
||||
var/obj/item/chromosome/CM = new c_typepath (drop_location())
|
||||
to_chat(user,"<span class='notice'>Recycled [I].</span>")
|
||||
if((LAZYLEN(stored_chromosomes) < max_chromosomes) && prob(60))
|
||||
CM.forceMove(src)
|
||||
stored_chromosomes += CM
|
||||
to_chat(user,"<span class='notice'>[capitalize(CM.name)] added to storage.</span>")
|
||||
qdel(I)
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -58,12 +104,26 @@
|
||||
if(!isnull(connected))
|
||||
break
|
||||
injectorready = world.time + INJECTOR_TIMEOUT
|
||||
scrambleready = world.time + SCRAMBLE_TIMEOUT
|
||||
jokerready = world.time + JOKER_TIMEOUT
|
||||
|
||||
stored_research = SSresearch.science_tech
|
||||
|
||||
/obj/machinery/computer/scan_consolenew/examine(mob/user)
|
||||
. = ..()
|
||||
if(jokerready < world.time)
|
||||
. += "<span class='notice'>JOKER algorithm available.</span>"
|
||||
else
|
||||
. += "<span class='notice'>JOKER algorithm available in about [round(0.00166666667 * (jokerready - world.time))] minutes."
|
||||
|
||||
/obj/machinery/computer/scan_consolenew/ui_interact(mob/user, last_change)
|
||||
. = ..()
|
||||
if(!user)
|
||||
return
|
||||
var/datum/browser/popup = new(user, "scannernew", "DNA Modifier Console", 800, 630) // Set up the popup browser window
|
||||
if(user.client)
|
||||
var/datum/asset/simple/assets = get_asset_datum(/datum/asset/simple/genetics)
|
||||
assets.send(user.client)
|
||||
if(!(in_range(src, user) || hasSiliconAccessInArea(user)))
|
||||
popup.close()
|
||||
return
|
||||
@@ -88,8 +148,6 @@
|
||||
occupant_status += "</div></div>"
|
||||
occupant_status += "<div class='line'><div class='statusLabel'>Health:</div><div class='progressBar'><div style='width: [viable_occupant.health]%;' class='progressFill good'></div></div><div class='statusValue'>[viable_occupant.health] %</div></div>"
|
||||
occupant_status += "<div class='line'><div class='statusLabel'>Radiation Level:</div><div class='progressBar'><div style='width: [viable_occupant.radiation/(RAD_MOB_SAFE/100)]%;' class='progressFill bad'></div></div><div class='statusValue'>[viable_occupant.radiation/(RAD_MOB_SAFE/100)] %</div></div>"
|
||||
var/rejuvenators = viable_occupant.reagents.get_reagent_amount(/datum/reagent/medicine/potass_iodide)
|
||||
occupant_status += "<div class='line'><div class='statusLabel'>Rejuvenators:</div><div class='progressBar'><div style='width: [round((rejuvenators / REJUVENATORS_MAX) * 100)]%;' class='progressFill highlight'></div></div><div class='statusValue'>[rejuvenators] units</div></div>"
|
||||
occupant_status += "<div class='line'><div class='statusLabel'>Unique Enzymes :</div><div class='statusValue'><span class='highlight'>[viable_occupant.dna.unique_enzymes]</span></div></div>"
|
||||
occupant_status += "<div class='line'><div class='statusLabel'>Last Operation:</div><div class='statusValue'>[last_change ? last_change : "----"]</div></div>"
|
||||
else
|
||||
@@ -147,28 +205,61 @@
|
||||
buttons += "<a href='?src=[REF(src)];task=togglelock;'>[connected.locked ? "Unlock" : "Lock"] Scanner</a>"
|
||||
else
|
||||
buttons += "<span class='linkOff'>Open Scanner</span> <span class='linkOff'>Lock Scanner</span>"
|
||||
if(viable_occupant)
|
||||
buttons += "<a href='?src=[REF(src)];task=rejuv'>Inject Rejuvenators</a>"
|
||||
if(viable_occupant && (scrambleready < world.time))
|
||||
buttons += "<a href='?src=[REF(src)];task=scramble'>Scramble DNA</a>"
|
||||
else
|
||||
buttons += "<span class='linkOff'>Inject Rejuvenators</span>"
|
||||
buttons += "<span class='linkOff'>Scramble DNA</span>"
|
||||
if(diskette)
|
||||
buttons += "<a href='?src=[REF(src)];task=ejectdisk'>Eject Disk</a>"
|
||||
buttons += "<a href='?src=[REF(src)];task=screen;text=disk;'>Disk</a>"
|
||||
else
|
||||
buttons += "<span class='linkOff'>Eject Disk</span>"
|
||||
if(current_screen == "buffer")
|
||||
buttons += "<a href='?src=[REF(src)];task=screen;text=mainmenu;'>Radiation Emitter Menu</a>"
|
||||
buttons += "<span class='linkOff'>Disk</span>"
|
||||
if(current_screen == "mutations")
|
||||
buttons += "<span class='linkOff'>Mutations</span>"
|
||||
else
|
||||
buttons += "<a href='?src=[REF(src)];task=screen;text=buffer;'>Buffer Menu</a>"
|
||||
|
||||
buttons += "<a href='?src=[REF(src)];task=screen;text=mutations;'>Mutations</a>"
|
||||
if((current_screen == "mainmenu") || !current_screen)
|
||||
buttons += "<span class='linkOff'>Genetic Sequencer</span>"
|
||||
else
|
||||
buttons += "<a href='?src=[REF(src)];task=screen;text=mainmenu;'>Genetic Sequencer</a>"
|
||||
if(current_screen == "ui")
|
||||
buttons += "<span class='linkOff'>Unique Identifiers</span>"
|
||||
else
|
||||
buttons += "<a href='?src=[REF(src)];task=screen;text=ui;'>Unique Identifiers</a>"
|
||||
if(current_screen == "advinjector")
|
||||
buttons += "<span class='linkOff'>Adv. Injectors</span>"
|
||||
else
|
||||
buttons += "<a href='?src=[REF(src)];task=screen;text=advinjector;'>Adv. Injectors</a>"
|
||||
switch(current_screen)
|
||||
if("working")
|
||||
temp_html += status
|
||||
temp_html += "<h1>System Busy</h1>"
|
||||
temp_html += "Working ... Please wait ([DisplayTimeText(radduration*10)])"
|
||||
if("buffer")
|
||||
if("ui")
|
||||
temp_html += status
|
||||
temp_html += buttons
|
||||
temp_html += "<h1>Buffer Menu</h1>"
|
||||
temp_html += "<h1>Unique Identifiers</h1>"
|
||||
temp_html += "<a href='?src=[REF(src)];task=setstrength;num=[radstrength-1];'>--</a> <a href='?src=[REF(src)];task=setstrength;'>Output Level</a> <a href='?src=[REF(src)];task=setstrength;num=[radstrength+1];'>++</a>"
|
||||
temp_html += "<br><a href='?src=[REF(src)];task=setduration;num=[radduration-1];'>--</a> <a href='?src=[REF(src)];task=setduration;'>Pulse Duration</a> <a href='?src=[REF(src)];task=setduration;num=[radduration+1];'>++</a>"
|
||||
temp_html += "<h3>Irradiate Subject</h3>"
|
||||
temp_html += "<div class='line'><div class='statusLabel'>Unique Identifier:</div><div class='statusValue'><div class='clearBoth'>"
|
||||
var/max_line_len = 7*DNA_BLOCK_SIZE
|
||||
if(viable_occupant)
|
||||
temp_html += "<div class='dnaBlockNumber'>1</div>"
|
||||
var/char = ""
|
||||
var/ui_text = viable_occupant.dna.uni_identity
|
||||
var/len_byte = length(ui_text)
|
||||
var/char_it = 0
|
||||
for(var/byte_it = 1, byte_it <= len_byte, byte_it += length(char))
|
||||
char_it++
|
||||
char = ui_text[byte_it]
|
||||
temp_html += "<a class='dnaBlock' href='?src=[REF(src)];task=pulseui;num=[char_it];'>[char]</a>"
|
||||
if((char_it % max_line_len) == 0)
|
||||
temp_html += "</div><div class='clearBoth'>"
|
||||
if((char_it % DNA_BLOCK_SIZE) == 0 && byte_it < len_byte)
|
||||
temp_html += "<div class='dnaBlockNumber'>[(char_it / DNA_BLOCK_SIZE) + 1]</div>"
|
||||
else
|
||||
temp_html += "---------"
|
||||
temp_html += "</div></div><br><h1>Buffer Menu</h1>"
|
||||
|
||||
if(istype(buffer))
|
||||
for(var/i=1, i<=buffer.len, i++)
|
||||
@@ -188,7 +279,6 @@
|
||||
temp_html += "<span class='linkOff'>Save to Disk</span>"
|
||||
else
|
||||
var/ui = buffer_slot["UI"]
|
||||
var/se = buffer_slot["SE"]
|
||||
var/ue = buffer_slot["UE"]
|
||||
var/name = buffer_slot["name"]
|
||||
var/label = buffer_slot["label"]
|
||||
@@ -234,19 +324,6 @@
|
||||
temp_html += "<a href='?src=[REF(src)];task=injector;num=[i];text=mixed'>UI+UE Injector</a>"
|
||||
else
|
||||
temp_html += "<span class='linkOff'>UI+UE Injector</span>"
|
||||
if(se)
|
||||
temp_html += "<br>\tSE: [se] "
|
||||
if(viable_occupant)
|
||||
temp_html += "<a href='?src=[REF(src)];task=transferbuffer;num=[i];text=se'>Occupant</a>"
|
||||
else
|
||||
temp_html += "<span class='linkOff'>Occupant</span>"
|
||||
temp_html += "<a href='?src=[REF(src)];task=setdelayed;num=[i];delayaction=[SCANNER_ACTION_SE]'>Occupant:Delayed</a>"
|
||||
if(injectorready < world.time )
|
||||
temp_html += "<a href='?src=[REF(src)];task=injector;num=[i];text=se'>Injector</a>"
|
||||
else
|
||||
temp_html += "<span class='linkOff'>Injector</span>"
|
||||
else
|
||||
temp_html += "<br>\tSE: No Data"
|
||||
if(viable_occupant)
|
||||
temp_html += "<br><a href='?src=[REF(src)];task=setbuffer;num=[i];'>Save to Buffer</a>"
|
||||
else
|
||||
@@ -260,58 +337,225 @@
|
||||
temp_html += "<a href='?src=[REF(src)];task=savedisk;num=[i];'>Save to Disk</a>"
|
||||
else
|
||||
temp_html += "<span class='linkOff'>Save to Disk</span>"
|
||||
if("disk")
|
||||
temp_html += status
|
||||
temp_html += buttons
|
||||
if(diskette)
|
||||
temp_html += "<h3>[diskette.name]</h3><br>"
|
||||
temp_html += "<a href='?src=[REF(src)];task=ejectdisk'>Eject Disk</a><br>"
|
||||
if(LAZYLEN(diskette.mutations))
|
||||
temp_html += "<table>"
|
||||
for(var/datum/mutation/human/A in diskette.mutations)
|
||||
temp_html += "<tr><td><span class='linkOff'>[A.name]</span></td>"
|
||||
temp_html += "<td><a href='?src=[REF(src)];task=deletediskmut;num=[diskette.mutations.Find(A)];'>Delete</a></td>"
|
||||
if(LAZYLEN(stored_mutations) < max_storage)
|
||||
temp_html += "<td><a href='?src=[REF(src)];task=importdiskmut;num=[diskette.mutations.Find(A)];'>Import</a></td>"
|
||||
else
|
||||
temp_html += "<td><td><span class='linkOff'>Import</span></td>"
|
||||
temp_html += "</tr>"
|
||||
temp_html += "</table>"
|
||||
else
|
||||
temp_html += "<br>Load diskette to start ----------"
|
||||
if("info")
|
||||
if(LAZYLEN(stored_mutations))
|
||||
if(LAZYLEN(stored_mutations) >= current_storage)
|
||||
var/datum/mutation/human/HM = stored_mutations[current_storage]
|
||||
if(HM)
|
||||
temp_html += display_sequence(HM.type, current_storage)
|
||||
else
|
||||
current_screen = "mainmenu"
|
||||
if("mutations")
|
||||
temp_html += status
|
||||
temp_html += buttons
|
||||
temp_html += "<h3>Mutation Storage:<br></h3>"
|
||||
temp_html += "<table>"
|
||||
for(var/datum/mutation/human/HM in stored_mutations)
|
||||
var/i = stored_mutations.Find(HM)
|
||||
temp_html += "<tr><td><a href='?src=[REF(src)];task=inspectstorage;num=[i]'>[HM.name]</a></td>"
|
||||
temp_html += "<td><a href='?src=[REF(src)];task=exportdiskmut;path=[HM.type]'>Export</a></td>"
|
||||
temp_html += "<td><a href='?src=[REF(src)];task=deletemut;num=[i]'>Delete</a></td>"
|
||||
if(combine == HM.type)
|
||||
temp_html += "<td><span class='linkOff'>Combine</span></td></tr>"
|
||||
else
|
||||
temp_html += "<td><a href='?src=[REF(src)];task=combine;num=[i]'>Combine</a></td></tr>"
|
||||
temp_html += "</table><br>"
|
||||
temp_html += "<h3>Chromosome Storage:<br></h3>"
|
||||
temp_html += "<table>"
|
||||
for(var/i in 1 to stored_chromosomes.len)
|
||||
var/obj/item/chromosome/CM = stored_chromosomes[i]
|
||||
temp_html += "<td><a href='?src=[REF(src)];task=ejectchromosome;num=[i]'>[CM.name]</a></td><br>"
|
||||
temp_html += "</table>"
|
||||
if("advinjector")
|
||||
temp_html += status
|
||||
temp_html += buttons
|
||||
temp_html += "<div class='line'><div class='statusLabel'><b>Advanced Injectors:</b></div></div><br>"
|
||||
temp_html += "<div class='statusLine'><a href='?src=[REF(src)];task=add_advinjector;'>New Selection</a></div>"
|
||||
for(var/A in injector_selection)
|
||||
temp_html += "<div class='statusDisplay'><b>[A]</b>"
|
||||
var/list/true_selection = injector_selection[A]
|
||||
temp_html += "<br>"
|
||||
for(var/B in true_selection)
|
||||
var/datum/mutation/human/HM = B
|
||||
var/mutcolor
|
||||
switch(HM.quality)
|
||||
if(POSITIVE)
|
||||
mutcolor = "good"
|
||||
if(MINOR_NEGATIVE)
|
||||
mutcolor = "average"
|
||||
if(NEGATIVE)
|
||||
mutcolor = "bad"
|
||||
temp_html += "<div class='statusLine'><span class='[mutcolor]'>[HM.name] </span>"
|
||||
temp_html += "<a href='?src=[REF(src)];task=remove_from_advinjector;injector=[A];path=[HM.type];'>Remove</a></div>"
|
||||
if (injectorready < world.time)
|
||||
temp_html += "<div class='statusLine'> <a href='?src=[REF(src)];task=advinjector;injector=[A];'>Print Advanced Injector</a>"
|
||||
else
|
||||
temp_html += "<div class='statusLine'> <span class='linkOff'>Print Advanced Injector</span>"
|
||||
temp_html += "<a href='?src=[REF(src)];task=remove_advinjector;injector=[A];'>Remove Injector</a></div>"
|
||||
temp_html += "<br></div>"
|
||||
else
|
||||
temp_html += status
|
||||
temp_html += buttons
|
||||
temp_html += "<h1>Radiation Emitter Menu</h1>"
|
||||
|
||||
temp_html += "<a href='?src=[REF(src)];task=setstrength;num=[radstrength-1];'>--</a> <a href='?src=[REF(src)];task=setstrength;'>Output Level</a> <a href='?src=[REF(src)];task=setstrength;num=[radstrength+1];'>++</a>"
|
||||
temp_html += "<br><a href='?src=[REF(src)];task=setduration;num=[radduration-1];'>--</a> <a href='?src=[REF(src)];task=setduration;'>Pulse Duration</a> <a href='?src=[REF(src)];task=setduration;num=[radduration+1];'>++</a>"
|
||||
|
||||
temp_html += "<h3>Irradiate Subject</h3>"
|
||||
temp_html += "<div class='line'><div class='statusLabel'>Unique Identifier:</div><div class='statusValue'><div class='clearBoth'>"
|
||||
|
||||
var/max_line_len = 7*DNA_BLOCK_SIZE
|
||||
temp_html += "<div class='line'><div class='statusLabel'>Genetic Sequence:</div><br>"
|
||||
if(viable_occupant)
|
||||
temp_html += "<div class='dnaBlockNumber'>1</div>"
|
||||
var/char = ""
|
||||
var/ui_text = viable_occupant.dna.uni_identity
|
||||
var/len_byte = length(ui_text)
|
||||
var/char_it = 0
|
||||
for(var/byte_it = 1, byte_it <= len_byte, byte_it += length(char))
|
||||
char_it++
|
||||
char = ui_text[byte_it]
|
||||
temp_html += "<a class='dnaBlock' href='?src=[REF(src)];task=pulseui;num=[char_it];'>[char]</a>"
|
||||
if((char_it % max_line_len) == 0)
|
||||
temp_html += "</div><div class='clearBoth'>"
|
||||
if((char_it % DNA_BLOCK_SIZE) == 0 && byte_it < len_byte)
|
||||
temp_html += "<div class='dnaBlockNumber'>[(char_it / DNA_BLOCK_SIZE) + 1]</div>"
|
||||
if(viable_occupant)
|
||||
for(var/A in get_mutation_list())
|
||||
temp_html += display_inactive_sequence(A)
|
||||
temp_html += "<br>"
|
||||
else
|
||||
temp_html += "----"
|
||||
if(viable_occupant && (current_mutation in get_mutation_list(viable_occupant)))
|
||||
temp_html += display_sequence(current_mutation)
|
||||
temp_html += "</div><br>"
|
||||
else
|
||||
temp_html += "----"
|
||||
temp_html += "</div></div></div><br>"
|
||||
|
||||
temp_html += "<br><div class='line'><div class='statusLabel'>Structural Enzymes:</div><div class='statusValue'><div class='clearBoth'>"
|
||||
if(viable_occupant)
|
||||
temp_html += "<div class='dnaBlockNumber'>1</div>"
|
||||
var/char = ""
|
||||
var/se_text = viable_occupant.dna.struc_enzymes
|
||||
var/len_byte = length(se_text)
|
||||
var/char_it = 0
|
||||
for(var/byte_it = 1, byte_it <= len_byte, byte_it += length(char))
|
||||
char_it++
|
||||
char = se_text[byte_it]
|
||||
temp_html += "<a class='dnaBlock' href='?src=[REF(src)];task=pulsese;num=[char_it];'>[char]</a>"
|
||||
if((char_it % max_line_len) == 0)
|
||||
temp_html += "</div><div class='clearBoth'>"
|
||||
if((char_it % DNA_BLOCK_SIZE) == 0 && byte_it < len_byte)
|
||||
temp_html += "<div class='dnaBlockNumber'>[(char_it / DNA_BLOCK_SIZE) + 1]</div>"
|
||||
else
|
||||
temp_html += "----"
|
||||
temp_html += "</div></div></div>"
|
||||
temp_html += "----------"
|
||||
|
||||
popup.set_content(temp_html.Join())
|
||||
popup.open()
|
||||
|
||||
/obj/machinery/computer/scan_consolenew/proc/display_inactive_sequence(mutation)
|
||||
var/temp_html = ""
|
||||
var/class = "unselected"
|
||||
var/mob/living/carbon/viable_occupant = get_viable_occupant()
|
||||
if(!viable_occupant)
|
||||
return
|
||||
|
||||
var/location = viable_occupant.dna.mutation_index.Find(mutation) //We do this because we dont want people using sysexp or similair tools to just read the mutations.
|
||||
|
||||
if(!location) //Do this only when needed, dont make a list with mutations for every iteration if you dont need to
|
||||
var/list/mutations = get_mutation_list(TRUE)
|
||||
if(mutation in mutations)
|
||||
location = mutations.Find(mutation)
|
||||
if(mutation == current_mutation)
|
||||
class = "selected"
|
||||
if(location > DNA_MUTATION_BLOCKS)
|
||||
temp_html += "<a class='clean' href='?src=[REF(src)];task=inspect;num=[location];'><img class='[class]' src='dna_extra.gif' width = '65' alt='Extra Mutation'></a>"
|
||||
else if(mutation in stored_research.discovered_mutations)
|
||||
temp_html += "<a class='clean' href='?src=[REF(src)];task=inspect;num=[location];'><img class='[class]' src='dna_discovered.gif' width = '65' alt='Discovered Mutation'></a>"
|
||||
else
|
||||
temp_html += "<a class='clean' clean href='?src=[REF(src)];task=inspect;num=[location];'><img class='[class]' src='dna_undiscovered.gif' width = '65' alt=Undiscovered Mutation'></a>"
|
||||
return temp_html
|
||||
|
||||
/obj/machinery/computer/scan_consolenew/proc/display_sequence(mutation, storage_slot) //Storage slot is for when viewing from the stored mutations
|
||||
var/temp_html = ""
|
||||
if(!mutation)
|
||||
temp_html += "ERR-"
|
||||
return
|
||||
var/mut_name = "Unknown gene"
|
||||
var/mut_desc = "No information available."
|
||||
var/alias
|
||||
var/discovered = FALSE
|
||||
var/active = FALSE
|
||||
var/scrambled = FALSE
|
||||
var/instability
|
||||
var/mob/living/carbon/viable_occupant = get_viable_occupant()
|
||||
var/datum/mutation/human/HM = get_valid_mutation(mutation)
|
||||
|
||||
if(viable_occupant)
|
||||
var/datum/mutation/human/M = viable_occupant.dna.get_mutation(mutation)
|
||||
if(M)
|
||||
scrambled = M.scrambled
|
||||
active = TRUE
|
||||
var/datum/mutation/human/A = GET_INITIALIZED_MUTATION(mutation)
|
||||
alias = A.alias
|
||||
if(active && !scrambled)
|
||||
discover(mutation)
|
||||
if(stored_research && (mutation in stored_research.discovered_mutations))
|
||||
mut_name = A.name
|
||||
mut_desc = A.desc
|
||||
discovered = TRUE
|
||||
instability = A.instability
|
||||
var/extra
|
||||
if(viable_occupant && !(storage_slot || viable_occupant.dna.mutation_in_sequence(mutation)))
|
||||
extra = TRUE
|
||||
|
||||
if(discovered && !scrambled)
|
||||
var/mutcolor
|
||||
switch(A.quality)
|
||||
if(POSITIVE)
|
||||
mutcolor = "good"
|
||||
if(MINOR_NEGATIVE)
|
||||
mutcolor = "average"
|
||||
if(NEGATIVE)
|
||||
mutcolor = "bad"
|
||||
if(HM)
|
||||
instability *= GET_MUTATION_STABILIZER(HM)
|
||||
temp_html += "<div class='statusDisplay'><div class='statusLine'><span class='[mutcolor]'><b>[mut_name]</b></span><small> ([alias])</small><br>"
|
||||
temp_html += "<div class='statusLine'>Instability : [round(instability)]</span><br>"
|
||||
else
|
||||
temp_html += "<div class='statusDisplay'><div class='statusLine'><b>[alias]</b><br>"
|
||||
temp_html += "<div class='statusLine'>[mut_desc]<br></div>"
|
||||
if(active && !storage_slot)
|
||||
if(HM?.can_chromosome && (HM in viable_occupant.dna.mutations))
|
||||
var/i = viable_occupant.dna.mutations.Find(HM)
|
||||
var/chromosome_name = "<a href='?src=[REF(src)];task=applychromosome;path=[mutation];num=[i];'>----</a>"
|
||||
if(HM.chromosome_name)
|
||||
chromosome_name = HM.chromosome_name
|
||||
temp_html += "<div class='statusLine'>Chromosome status: [chromosome_name]<br></div>"
|
||||
temp_html += "<div class='statusLine'>Sequence:<br><br></div>"
|
||||
if(!scrambled)
|
||||
for(var/block in 1 to A.blocks)
|
||||
var/whole_sequence = get_valid_gene_string(mutation)
|
||||
var/sequence = copytext(whole_sequence, 1+(block-1)*(DNA_SEQUENCE_LENGTH*2),(DNA_SEQUENCE_LENGTH*2*block+1))
|
||||
temp_html += "<div class='statusLine'><table class='statusDisplay'><tr>"
|
||||
for(var/i in 1 to DNA_SEQUENCE_LENGTH)
|
||||
var/num = 1+(i-1)*2
|
||||
var/genenum = num+(DNA_SEQUENCE_LENGTH*2*(block-1))
|
||||
temp_html += "<td><div class='statusLine'><span class='dnaBlockNumber'><a href='?src=[REF(src)];task=pulsegene;num=[genenum];path=[mutation];'>[sequence[num]]</span></a></div></td>"
|
||||
temp_html += "</tr><tr>"
|
||||
for(var/i in 1 to DNA_SEQUENCE_LENGTH)
|
||||
temp_html += "<td><div class='statusLine'>|</div></td>"
|
||||
temp_html += "</tr><tr>"
|
||||
for(var/i in 1 to DNA_SEQUENCE_LENGTH)
|
||||
var/num = i*2
|
||||
var/genenum = num+(DNA_SEQUENCE_LENGTH*2*(block-1))
|
||||
temp_html += "<td><div class='statusLine'><span class='dnaBlockNumber'><a href='?src=[REF(src)];task=pulsegene;num=[genenum];path=[mutation];'>[sequence[num]]</span></a></div></td>"
|
||||
temp_html += "</tr></table></div>"
|
||||
temp_html += "<br><br><br><br><br>"
|
||||
else
|
||||
temp_html = "<div class='statusLine'>Sequence unreadable due to unpredictable mutation.</div>"
|
||||
if((active || storage_slot) && (injectorready < world.time) && !scrambled)
|
||||
temp_html += "<a href='?src=[REF(src)];task=activator;path=[mutation];slot=[storage_slot];'>Print Activator</a>"
|
||||
temp_html += "<a href='?src=[REF(src)];task=mutator;path=[mutation];slot;=[storage_slot];'>Print Mutator</a>"
|
||||
else
|
||||
temp_html += "<span class='linkOff'>Print Activator</span>"
|
||||
temp_html += "<span class='linkOff'>Print Mutator</span>"
|
||||
temp_html += "<br><div class='statusLine'>"
|
||||
if(storage_slot)
|
||||
temp_html += "<a href='?src=[REF(src)];task=deletemut;num=[storage_slot];'>Delete</a>"
|
||||
if((LAZYLEN(stored_mutations) < max_storage) && diskette && !diskette.read_only)
|
||||
temp_html += "<a href='?src=[REF(src)];task=exportdiskmut;path=[mutation];'>Export</a>"
|
||||
else
|
||||
temp_html += "<span class='linkOff'>Export</span>"
|
||||
temp_html += "<a href='?src=[REF(src)];task=screen;text=mutations;'>Back</a>"
|
||||
else if(active && !scrambled)
|
||||
temp_html += "<a href='?src=[REF(src)];task=savemut;path=[mutation];'>Store</a>"
|
||||
temp_html += "<a href='?src=[REF(src)];task=expand_advinjector;path=[mutation];'>Adv. Injector</a>"
|
||||
if(extra || scrambled)
|
||||
temp_html += "<a href='?src=[REF(src)];task=nullify;'>Nullify</a>"
|
||||
else
|
||||
temp_html += "<span class='linkOff'>Nullify</span>"
|
||||
temp_html += "</div></div>"
|
||||
return temp_html
|
||||
|
||||
/obj/machinery/computer/scan_consolenew/Topic(href, href_list)
|
||||
if(..())
|
||||
@@ -350,13 +594,15 @@
|
||||
radstrength = WRAP(num, 1, RADIATION_STRENGTH_MAX+1)
|
||||
if("screen")
|
||||
current_screen = href_list["text"]
|
||||
if("rejuv")
|
||||
if(viable_occupant && viable_occupant.reagents)
|
||||
var/potassiodide_amount = viable_occupant.reagents.get_reagent_amount(/datum/reagent/medicine/potass_iodide)
|
||||
var/can_add = max(min(REJUVENATORS_MAX - potassiodide_amount, REJUVENATORS_INJECT), 0)
|
||||
viable_occupant.reagents.add_reagent(/datum/reagent/medicine/potass_iodide, can_add)
|
||||
if("scramble")
|
||||
if(viable_occupant && (scrambleready < world.time))
|
||||
viable_occupant.dna.remove_all_mutations(list(MUT_NORMAL, MUT_EXTRA))
|
||||
viable_occupant.dna.generate_dna_blocks()
|
||||
scrambleready = world.time + SCRAMBLE_TIMEOUT
|
||||
to_chat(usr,"<span class'notice'>DNA scrambled.</span>")
|
||||
viable_occupant.radiation += RADIATION_STRENGTH_MULTIPLIER*50/(connected.damage_coeff ** 2)
|
||||
if("setbufferlabel")
|
||||
var/text = sanitize(input(usr, "Input a new label:", "Input an Text", null) as text|null)
|
||||
var/text = sanitize(input(usr, "Input a new label:", "Input a Text", null) as text|null)
|
||||
if(num && text)
|
||||
num = CLAMP(num, 1, NUMBER_OF_BUFFERS)
|
||||
var/list/buffer_slot = buffer[num]
|
||||
@@ -368,7 +614,6 @@
|
||||
buffer[num] = list(
|
||||
"label"="Buffer[num]:[viable_occupant.real_name]",
|
||||
"UI"=viable_occupant.dna.uni_identity,
|
||||
"SE"=viable_occupant.dna.struc_enzymes,
|
||||
"UE"=viable_occupant.dna.unique_enzymes,
|
||||
"name"=viable_occupant.real_name,
|
||||
"blood_type"=viable_occupant.dna.blood_type
|
||||
@@ -382,8 +627,6 @@
|
||||
if("transferbuffer")
|
||||
if(num && viable_occupant)
|
||||
switch(href_list["text"]) //Numbers are this high because other way upgrading laser is just not worth the hassle, and i cant think of anything better to inmrove
|
||||
if("se")
|
||||
apply_buffer(SCANNER_ACTION_SE,num)
|
||||
if("ui")
|
||||
apply_buffer(SCANNER_ACTION_UI,num)
|
||||
if("ue")
|
||||
@@ -397,28 +640,6 @@
|
||||
if(istype(buffer_slot))
|
||||
var/obj/item/dnainjector/timed/I
|
||||
switch(href_list["text"])
|
||||
if("se")
|
||||
if(buffer_slot["SE"])
|
||||
I = new /obj/item/dnainjector/timed(loc)
|
||||
var/powers = 0
|
||||
for(var/datum/mutation/human/HM in GLOB.good_mutations + GLOB.bad_mutations + GLOB.not_good_mutations)
|
||||
if(HM.check_block_string(buffer_slot["SE"]))
|
||||
I.add_mutations.Add(HM)
|
||||
if(HM in GLOB.good_mutations)
|
||||
powers += 1
|
||||
if(HM in GLOB.bad_mutations + GLOB.not_good_mutations)
|
||||
powers -= 1 //To prevent just unlocking everything to get all powers to a syringe for max tech
|
||||
else
|
||||
I.remove_mutations.Add(HM)
|
||||
var/time_coeff
|
||||
for(var/datum/mutation/human/HM in I.add_mutations)
|
||||
if(!time_coeff)
|
||||
time_coeff = HM.time_coeff
|
||||
continue
|
||||
time_coeff = min(time_coeff,HM.time_coeff)
|
||||
if(connected)
|
||||
I.duration = I.duration * time_coeff * connected.damage_coeff
|
||||
I.damage_coeff = connected.damage_coeff
|
||||
if("ui")
|
||||
if(buffer_slot["UI"])
|
||||
I = new /obj/item/dnainjector/timed(loc)
|
||||
@@ -457,7 +678,7 @@
|
||||
if("setdelayed")
|
||||
if(num)
|
||||
delayed_action = list("action"=text2num(href_list["delayaction"]),"buffer"=num)
|
||||
if("pulseui","pulsese")
|
||||
if("pulseui")
|
||||
if(num && viable_occupant && connected)
|
||||
radduration = WRAP(radduration, 1, RADIATION_DURATION_MAX+1)
|
||||
radstrength = WRAP(radstrength, 1, RADIATION_STRENGTH_MAX+1)
|
||||
@@ -469,7 +690,7 @@
|
||||
ui_interact(usr)
|
||||
|
||||
sleep(radduration*10)
|
||||
current_screen = "mainmenu"
|
||||
current_screen = "ui"
|
||||
|
||||
if(viable_occupant && connected && connected.occupant==viable_occupant)
|
||||
viable_occupant.radiation += (RADIATION_IRRADIATION_MULTIPLIER*radduration*radstrength)/(connected.damage_coeff ** 2) //Read comment in "transferbuffer" section above for explanation
|
||||
@@ -478,7 +699,7 @@
|
||||
var/len = length_char(viable_occupant.dna.uni_identity)
|
||||
num = WRAP(num, 1, len+1)
|
||||
num = randomize_radiation_accuracy(num, radduration + (connected.precision_coeff ** 2), len) //Each manipulator level above 1 makes randomization as accurate as selected time + manipulator lvl^2
|
||||
//Value is this high for the same reason as with laser - not worth the hassle of upgrading if the bonus is low
|
||||
//Value is this high for the same reason as with laser - not worth the hassle of upgrading if the bonus is low
|
||||
var/block = round((num-1)/DNA_BLOCK_SIZE)+1
|
||||
var/subblock = num - block*DNA_BLOCK_SIZE
|
||||
last_change = "UI #[block]-[subblock]; "
|
||||
@@ -490,35 +711,229 @@
|
||||
|
||||
viable_occupant.dna.uni_identity = copytext_char(viable_occupant.dna.uni_identity, 1, num) + hex + copytext_char(viable_occupant.dna.uni_identity, num + 1)
|
||||
viable_occupant.updateappearance(mutations_overlay_update=1)
|
||||
if("pulsese")
|
||||
var/len = length(viable_occupant.dna.struc_enzymes)
|
||||
num = WRAP(num, 1, len+1)
|
||||
num = randomize_radiation_accuracy(num, radduration + (connected.precision_coeff ** 2), len)
|
||||
|
||||
var/block = round((num-1)/DNA_BLOCK_SIZE)+1
|
||||
var/subblock = num - block*DNA_BLOCK_SIZE
|
||||
last_change = "SE #[block]-[subblock]; "
|
||||
|
||||
var/hex = copytext_char(viable_occupant.dna.struc_enzymes, num, num+1)
|
||||
last_change += "[hex]"
|
||||
hex = scramble(hex, radstrength, radduration)
|
||||
last_change += "->[hex]"
|
||||
|
||||
viable_occupant.dna.struc_enzymes = copytext_char(viable_occupant.dna.struc_enzymes, 1, num) + hex + copytext_char(viable_occupant.dna.struc_enzymes, num + 1)
|
||||
viable_occupant.domutcheck()
|
||||
else
|
||||
current_screen = "mainmenu"
|
||||
|
||||
if(connected)
|
||||
connected.locked = locked_state
|
||||
if("inspect")
|
||||
if(viable_occupant)
|
||||
var/list/mutations = get_mutation_list(TRUE)
|
||||
if(current_mutation == mutations[num])
|
||||
current_mutation = null
|
||||
else
|
||||
current_mutation = mutations[num]
|
||||
|
||||
if("inspectstorage")
|
||||
current_storage = num
|
||||
current_screen = "info"
|
||||
if("savemut")
|
||||
if(viable_occupant)
|
||||
var/succes
|
||||
if(LAZYLEN(stored_mutations) < max_storage)
|
||||
var/mutation = text2path(href_list["path"])
|
||||
if(ispath(mutation, /datum/mutation/human)) //sanity checks
|
||||
var/datum/mutation/human/HM = viable_occupant.dna.get_mutation(mutation)
|
||||
if(HM)
|
||||
var/datum/mutation/human/A = new HM.type()
|
||||
A.copy_mutation(HM)
|
||||
succes = TRUE
|
||||
stored_mutations += A
|
||||
to_chat(usr,"<span class='notice'>Mutation succesfully stored.</span>")
|
||||
if(!succes) //we can exactly return here
|
||||
to_chat(usr,"<span class='warning'>Mutation storage is full.</span>")
|
||||
if("deletemut")
|
||||
var/datum/mutation/human/HM = stored_mutations[num]
|
||||
if(HM)
|
||||
stored_mutations.Remove(HM)
|
||||
qdel(HM)
|
||||
current_screen = "mutations"
|
||||
if("activator")
|
||||
if(injectorready < world.time)
|
||||
var/mutation = text2path(href_list["path"])
|
||||
if(ispath(mutation, /datum/mutation/human))
|
||||
var/datum/mutation/human/HM = get_valid_mutation(mutation)
|
||||
if(HM)
|
||||
var/obj/item/dnainjector/activator/I = new /obj/item/dnainjector/activator(loc)
|
||||
I.add_mutations += new HM.type (copymut = HM)
|
||||
I.name = "[HM.name] activator"
|
||||
I.research = TRUE
|
||||
if(connected)
|
||||
I.damage_coeff = connected.damage_coeff*4
|
||||
injectorready = world.time + INJECTOR_TIMEOUT * (1 - 0.1 * connected.precision_coeff) //precision_coeff being the matter bin rating
|
||||
else
|
||||
injectorready = world.time + INJECTOR_TIMEOUT
|
||||
if("mutator")
|
||||
if(injectorready < world.time)
|
||||
var/mutation = text2path(href_list["path"])
|
||||
if(ispath(mutation, /datum/mutation/human))
|
||||
var/datum/mutation/human/HM = get_valid_mutation(mutation)
|
||||
if(HM)
|
||||
var/obj/item/dnainjector/activator/I = new /obj/item/dnainjector/activator(loc)
|
||||
I.add_mutations += new HM.type (copymut = HM)
|
||||
I.doitanyway = TRUE
|
||||
I.name = "[HM.name] injector"
|
||||
if(connected)
|
||||
I.damage_coeff = connected.damage_coeff
|
||||
injectorready = world.time + INJECTOR_TIMEOUT * 5 * (1 - 0.1 * connected.precision_coeff)
|
||||
else
|
||||
injectorready = world.time + INJECTOR_TIMEOUT * 5
|
||||
|
||||
if("advinjector")
|
||||
var/selection = href_list["injector"]
|
||||
if(injectorready < world.time)
|
||||
if(injector_selection.Find(selection))
|
||||
var/list/true_selection = injector_selection[selection]
|
||||
if(LAZYLEN(injector_selection))
|
||||
var/obj/item/dnainjector/activator/I = new /obj/item/dnainjector/activator(loc)
|
||||
for(var/A in true_selection)
|
||||
var/datum/mutation/human/HM = A
|
||||
I.add_mutations += new HM.type (copymut = HM)
|
||||
I.doitanyway = TRUE
|
||||
I.name = "Advanced [selection] injector"
|
||||
if(connected)
|
||||
I.damage_coeff = connected.damage_coeff
|
||||
injectorready = world.time + INJECTOR_TIMEOUT * 8 * (1 - 0.1 * connected.precision_coeff)
|
||||
else
|
||||
injectorready = world.time + INJECTOR_TIMEOUT * 8
|
||||
if("nullify")
|
||||
if(viable_occupant)
|
||||
var/datum/mutation/human/A = viable_occupant.dna.get_mutation(current_mutation)
|
||||
if(A && (!viable_occupant.dna.mutation_in_sequence(current_mutation) || A.scrambled))
|
||||
viable_occupant.dna.remove_mutation(current_mutation)
|
||||
current_screen = "mainmenu"
|
||||
current_mutation = null
|
||||
if("pulsegene")
|
||||
if(current_screen != "info")
|
||||
var/path = text2path(href_list["path"])
|
||||
if(viable_occupant && num && (path in viable_occupant.dna.mutation_index))
|
||||
var/list/genes = list("A","T","G","C","X")
|
||||
if(jokerready < world.time)
|
||||
genes += "JOKER"
|
||||
var/sequence = GET_GENE_STRING(path, viable_occupant.dna)
|
||||
var/original = sequence[num]
|
||||
var/new_gene = input("From [original] to-", "New block", original) as null|anything in genes
|
||||
if(!new_gene)
|
||||
new_gene = original
|
||||
if(viable_occupant == get_viable_occupant()) //No cheesing
|
||||
if((new_gene == "JOKER") && (jokerready < world.time))
|
||||
var/true_genes = GET_SEQUENCE(current_mutation)
|
||||
new_gene = true_genes[num]
|
||||
jokerready = world.time + JOKER_TIMEOUT - (JOKER_UPGRADE * (connected.precision_coeff-1))
|
||||
sequence = copytext(sequence, 1, num) + new_gene + copytext(sequence, num+1, length(sequence)+1)
|
||||
viable_occupant.dna.mutation_index[path] = sequence
|
||||
viable_occupant.radiation += RADIATION_STRENGTH_MULTIPLIER/connected.damage_coeff
|
||||
viable_occupant.domutcheck()
|
||||
if("exportdiskmut")
|
||||
if(diskette && !diskette.read_only)
|
||||
var/path = text2path(href_list["path"])
|
||||
if(ispath(path, /datum/mutation/human))
|
||||
var/datum/mutation/human/A = get_valid_mutation(path)
|
||||
if(A && diskette && (LAZYLEN(diskette.mutations) < diskette.max_mutations))
|
||||
var/datum/mutation/human/HM = new A.type()
|
||||
diskette.mutations += HM
|
||||
HM.copy_mutation(A)
|
||||
to_chat(usr, "<span class='notice'>Succesfully written [A.name] to [diskette.name].</span>")
|
||||
if("deletediskmut")
|
||||
if(diskette && !diskette.read_only)
|
||||
if(num && (LAZYLEN(diskette.mutations) >= num))
|
||||
var/datum/mutation/human/A = diskette.mutations[num]
|
||||
diskette.mutations.Remove(A)
|
||||
qdel(A)
|
||||
if("importdiskmut")
|
||||
if(diskette && (LAZYLEN(diskette.mutations) >= num))
|
||||
if(LAZYLEN(stored_mutations) < max_storage)
|
||||
var/datum/mutation/human/A = diskette.mutations[num]
|
||||
var/datum/mutation/human/HM = new A.type()
|
||||
HM.copy_mutation(A)
|
||||
stored_mutations += HM
|
||||
to_chat(usr,"<span class='notice'>Succesfully written [A.name] to storage.")
|
||||
if("combine")
|
||||
if(num && (LAZYLEN(stored_mutations) >= num))
|
||||
if(LAZYLEN(stored_mutations) < max_storage)
|
||||
var/datum/mutation/human/A = stored_mutations[num]
|
||||
var/path = A.type
|
||||
if(combine)
|
||||
var/result_path = get_mixed_mutation(combine, path)
|
||||
if(result_path)
|
||||
stored_mutations += new result_path()
|
||||
to_chat(usr, "<span class='boldnotice'>Succes! New mutation has been added to storage</span>")
|
||||
discover(result_path)
|
||||
combine = null
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>Failed. No mutation could be created.</span>")
|
||||
combine = null
|
||||
else
|
||||
combine = path
|
||||
to_chat(usr,"<span class='notice'>Selected [A.name] for combining</span>")
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>Not enough space to store potential mutation.</span>")
|
||||
if("ejectchromosome")
|
||||
if(LAZYLEN(stored_chromosomes) <= num)
|
||||
var/obj/item/chromosome/CM = stored_chromosomes[num]
|
||||
CM.forceMove(drop_location())
|
||||
adjust_item_drop_location(CM)
|
||||
stored_chromosomes -= CM
|
||||
if("applychromosome")
|
||||
if(viable_occupant && (LAZYLEN(viable_occupant.dna.mutations) <= num))
|
||||
var/datum/mutation/human/HM = viable_occupant.dna.mutations[num]
|
||||
var/list/chromosomes = list()
|
||||
for(var/obj/item/chromosome/CM in stored_chromosomes)
|
||||
if(CM.can_apply(HM))
|
||||
chromosomes += CM
|
||||
if(chromosomes.len)
|
||||
var/obj/item/chromosome/CM = input("Select a chromosome to apply", "Apply Chromosome") as null|anything in sortNames(chromosomes)
|
||||
if(CM)
|
||||
to_chat(usr, "<span class='notice'>You apply [CM] to [HM.name].</span>")
|
||||
stored_chromosomes -= CM
|
||||
CM.apply(HM)
|
||||
if("expand_advinjector")
|
||||
var/mutation = text2path(href_list["path"])
|
||||
var/datum/mutation/human/HM = get_valid_mutation(mutation)
|
||||
if(HM && LAZYLEN(injector_selection))
|
||||
var/which_injector = input(usr, "Select Adv. Injector", "Advanced Injectors") as null|anything in injector_selection
|
||||
if(injector_selection.Find(which_injector))
|
||||
var/list/true_selection = injector_selection[which_injector]
|
||||
var/total_instability
|
||||
for(var/B in true_selection)
|
||||
var/datum/mutation/human/mootacion = B
|
||||
total_instability += mootacion.instability
|
||||
total_instability += HM.instability
|
||||
if((total_instability > max_injector_instability) || (true_selection.len + 1) > max_injector_mutations)
|
||||
to_chat(usr, "<span class='warning'>Adding more mutations would make the advanced injector too unstable!</span>")
|
||||
else
|
||||
true_selection += HM //reminder that this works. because I keep forgetting this works
|
||||
if("remove_from_advinjector")
|
||||
var/mutation = text2path(href_list["path"])
|
||||
var/selection = href_list["injector"]
|
||||
if(injector_selection.Find(selection))
|
||||
var/list/true_selection = injector_selection[selection]
|
||||
for(var/B in true_selection)
|
||||
var/datum/mutation/human/HM = B
|
||||
if(HM.type == mutation)
|
||||
true_selection -= HM
|
||||
break
|
||||
|
||||
if("remove_advinjector")
|
||||
var/selection = href_list["injector"]
|
||||
for(selection in injector_selection)
|
||||
if(selection == selection)
|
||||
injector_selection.Remove(selection)
|
||||
|
||||
if("add_advinjector")
|
||||
if(LAZYLEN(injector_selection) < max_injector_selections)
|
||||
var/new_selection = input(usr, "Enter Adv. Injector name", "Advanced Injectors") as text|null
|
||||
if(new_selection && !(new_selection in injector_selection))
|
||||
injector_selection[new_selection] = list()
|
||||
|
||||
|
||||
ui_interact(usr,last_change)
|
||||
|
||||
/obj/machinery/computer/scan_consolenew/proc/scramble(input,rs,rd)
|
||||
/obj/machinery/computer/scan_consolenew/proc/scramble(input,rs,rd) //hexadecimal genetics. dont confuse with scramble button
|
||||
var/length = length(input)
|
||||
var/ran = gaussian(0, rs*RADIATION_STRENGTH_MULTIPLIER)
|
||||
if(ran == 0)
|
||||
ran = pick(-1,1) //hacky, statistically should almost never happen. 0-change makes people mad though
|
||||
ran = pick(-1,1) //hacky, statistically should almost never happen. 0-chance makes people mad though
|
||||
else if(ran < 0)
|
||||
ran = round(ran) //negative, so floor it
|
||||
else
|
||||
@@ -547,10 +962,6 @@
|
||||
//Each laser level reduces damage by lvl^2, so no effect on 1 lvl, 4 times less damage on 2 and 9 times less damage on 3
|
||||
//Numbers are this high because other way upgrading laser is just not worth the hassle, and i cant think of anything better to inmrove
|
||||
switch(action)
|
||||
if(SCANNER_ACTION_SE)
|
||||
if(buffer_slot["SE"])
|
||||
viable_occupant.dna.struc_enzymes = buffer_slot["SE"]
|
||||
viable_occupant.domutcheck()
|
||||
if(SCANNER_ACTION_UI)
|
||||
if(buffer_slot["UI"])
|
||||
viable_occupant.dna.uni_identity = buffer_slot["UI"]
|
||||
@@ -572,15 +983,54 @@
|
||||
viable_occupant.dna.blood_type = buffer_slot["blood_type"]
|
||||
|
||||
/obj/machinery/computer/scan_consolenew/proc/on_scanner_close()
|
||||
if(delayed_action && connected)
|
||||
if(delayed_action && get_viable_occupant())
|
||||
to_chat(connected.occupant, "<span class='notice'>[src] activates!</span>")
|
||||
apply_buffer(delayed_action["action"],delayed_action["buffer"])
|
||||
delayed_action = null //or make it stick + reset button ?
|
||||
|
||||
/obj/machinery/computer/scan_consolenew/proc/get_valid_mutation(mutation)
|
||||
var/mob/living/carbon/C = get_viable_occupant()
|
||||
if(C)
|
||||
var/datum/mutation/human/HM = C.dna.get_mutation(mutation)
|
||||
if(HM)
|
||||
return HM
|
||||
for(var/datum/mutation/human/A in stored_mutations)
|
||||
if(A.type == mutation)
|
||||
return A
|
||||
|
||||
|
||||
/obj/machinery/computer/scan_consolenew/proc/get_mutation_list(include_storage) //Returns a list of the mutation index types and any extra mutations
|
||||
var/mob/living/carbon/viable_occupant = get_viable_occupant()
|
||||
var/list/paths = list()
|
||||
if(viable_occupant)
|
||||
for(var/A in viable_occupant.dna.mutation_index)
|
||||
paths += A
|
||||
for(var/datum/mutation/human/A in viable_occupant.dna.mutations)
|
||||
if(A.class == MUT_EXTRA)
|
||||
paths += A.type
|
||||
if(include_storage)
|
||||
for(var/datum/mutation/human/A in stored_mutations)
|
||||
paths += A.type
|
||||
return paths
|
||||
|
||||
/obj/machinery/computer/scan_consolenew/proc/get_valid_gene_string(mutation)
|
||||
var/mob/living/carbon/C = get_viable_occupant()
|
||||
if(C && (mutation in C.dna.mutation_index))
|
||||
return GET_GENE_STRING(mutation, C.dna)
|
||||
else if(C && (LAZYLEN(C.dna.mutations)))
|
||||
for(var/datum/mutation/human/A in C.dna.mutations)
|
||||
if(A.type == mutation)
|
||||
return GET_SEQUENCE(mutation)
|
||||
for(var/datum/mutation/human/A in stored_mutations)
|
||||
if(A.type == mutation)
|
||||
return GET_SEQUENCE(mutation)
|
||||
|
||||
/obj/machinery/computer/scan_consolenew/proc/discover(mutation)
|
||||
if(stored_research && !(mutation in stored_research.discovered_mutations))
|
||||
stored_research.discovered_mutations += mutation
|
||||
return TRUE
|
||||
/////////////////////////// DNA MACHINES
|
||||
#undef INJECTOR_TIMEOUT
|
||||
#undef REJUVENATORS_INJECT
|
||||
#undef REJUVENATORS_MAX
|
||||
#undef NUMBER_OF_BUFFERS
|
||||
|
||||
#undef RADIATION_STRENGTH_MAX
|
||||
|
||||
@@ -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>")
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
precision_coeff = 0
|
||||
for(var/obj/item/stock_parts/scanning_module/P in component_parts)
|
||||
scan_level += P.rating
|
||||
for(var/obj/item/stock_parts/manipulator/P in component_parts)
|
||||
for(var/obj/item/stock_parts/matter_bin/P in component_parts)
|
||||
precision_coeff = P.rating
|
||||
for(var/obj/item/stock_parts/micro_laser/P in component_parts)
|
||||
damage_coeff = P.rating
|
||||
|
||||
@@ -428,7 +428,7 @@
|
||||
else
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/door/airlock/update_icon_state(state=0, override=0)
|
||||
/obj/machinery/door/airlock/update_icon(state=0, override=0)
|
||||
if(operating && !override)
|
||||
return
|
||||
switch(state)
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
internal_radio = FALSE
|
||||
|
||||
//Start growing a human clone in the pod!
|
||||
/obj/machinery/clonepod/experimental/growclone(ckey, clonename, ui, se, datum/species/mrace, list/features, factions)
|
||||
/obj/machinery/clonepod/experimental/growclone(clonename, ui, mutation_index, mindref, last_death, blood_type, datum/species/mrace, list/features, factions, list/quirks)
|
||||
if(panel_open)
|
||||
return FALSE
|
||||
if(mess || attempting)
|
||||
@@ -20,15 +20,15 @@
|
||||
|
||||
var/mob/living/carbon/human/H = new /mob/living/carbon/human(src)
|
||||
|
||||
H.hardset_dna(ui, se, H.real_name, null, mrace, features)
|
||||
H.hardset_dna(ui, mutation_index, H.real_name, blood_type, mrace, features)
|
||||
|
||||
if(efficiency > 2)
|
||||
var/list/unclean_mutations = (GLOB.not_good_mutations|GLOB.bad_mutations)
|
||||
H.dna.remove_mutation_group(unclean_mutations)
|
||||
if(efficiency > 5 && prob(20))
|
||||
H.randmutvg()
|
||||
H.easy_randmut(POSITIVE)
|
||||
if(efficiency < 3 && prob(50))
|
||||
var/mob/M = H.randmutb()
|
||||
var/mob/M = H.easy_randmut(NEGATIVE+MINOR_NEGATIVE)
|
||||
if(ismob(M))
|
||||
H = M
|
||||
|
||||
@@ -42,18 +42,17 @@
|
||||
icon_state = "pod_1"
|
||||
//Get the clone body ready
|
||||
maim_clone(H)
|
||||
ADD_TRAIT(H, TRAIT_STABLEHEART, CLONING_POD_TRAIT)
|
||||
ADD_TRAIT(H, TRAIT_STABLELIVER, CLONING_POD_TRAIT)
|
||||
ADD_TRAIT(H, TRAIT_EMOTEMUTE, CLONING_POD_TRAIT)
|
||||
ADD_TRAIT(H, TRAIT_MUTE, CLONING_POD_TRAIT)
|
||||
ADD_TRAIT(H, TRAIT_NOBREATH, CLONING_POD_TRAIT)
|
||||
ADD_TRAIT(H, TRAIT_NOCRITDAMAGE, CLONING_POD_TRAIT)
|
||||
ADD_TRAIT(H, TRAIT_STABLEHEART, "cloning")
|
||||
ADD_TRAIT(H, TRAIT_EMOTEMUTE, "cloning")
|
||||
ADD_TRAIT(H, TRAIT_MUTE, "cloning")
|
||||
ADD_TRAIT(H, TRAIT_NOBREATH, "cloning")
|
||||
ADD_TRAIT(H, TRAIT_NOCRITDAMAGE, "cloning")
|
||||
H.Unconscious(80)
|
||||
|
||||
var/list/candidates = pollCandidatesForMob("Do you want and agree to play as a [clonename]'s defective clone, respect their character and not engage in ERP without permission from the original?", null, null, null, 100, H, POLL_IGNORE_CLONE)
|
||||
var/list/candidates = pollCandidatesForMob("Do you want to play as [clonename]'s defective clone?", null, null, null, 100, H)
|
||||
if(LAZYLEN(candidates))
|
||||
var/mob/dead/observer/C = pick(candidates)
|
||||
C.transfer_ckey(H)
|
||||
H.key = C.key
|
||||
|
||||
if(grab_ghost_when == CLONER_FRESH_CLONE)
|
||||
H.grab_ghost()
|
||||
@@ -293,6 +292,7 @@
|
||||
temp = "<font class='bad'>Cloning cycle already in progress.</font>"
|
||||
playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0)
|
||||
else
|
||||
pod.growclone(null, mob_occupant.real_name, dna.uni_identity, dna.struc_enzymes, clone_species, dna.features, mob_occupant.faction)
|
||||
pod.growclone(mob_occupant.real_name, dna.uni_identity, dna.mutation_index, null, null, dna.blood_type, clone_species, dna.features, mob_occupant.faction)
|
||||
temp = "[mob_occupant.real_name] => <font class='good'>Cloning data sent to pod.</font>"
|
||||
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
|
||||
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
continue
|
||||
|
||||
if(L.flash_act(affect_silicon = 1))
|
||||
L.Knockdown(strength)
|
||||
L.DefaultCombatKnockdown(strength)
|
||||
flashed = TRUE
|
||||
|
||||
if(flashed)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -63,7 +63,7 @@ Buildable meters
|
||||
if(make_from.flipped)
|
||||
do_a_flip()
|
||||
|
||||
/obj/item/pipe/dropped()
|
||||
/obj/item/pipe/dropped(mob/user)
|
||||
if(loc)
|
||||
setPipingLayer(piping_layer)
|
||||
return ..()
|
||||
@@ -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()
|
||||
@@ -224,7 +225,7 @@ Buildable meters
|
||||
to_chat(user, "<span class='notice'>You fasten the meter to the [loc.name].</span>")
|
||||
qdel(src)
|
||||
|
||||
/obj/item/pipe_meter/dropped()
|
||||
/obj/item/pipe_meter/dropped(mob/user)
|
||||
. = ..()
|
||||
if(loc)
|
||||
setAttachLayer(piping_layer)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -705,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)
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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 ))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -283,13 +283,13 @@
|
||||
/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/proc/get_charge()
|
||||
if(equip_ready) //disabled
|
||||
return
|
||||
var/area/A = get_base_area(chassis)
|
||||
var/pow_chan = get_power_channel(A)
|
||||
var/area/A = get_area(chassis)
|
||||
var/pow_chan = get_MUTATION_POWER_channel(A)
|
||||
if(pow_chan)
|
||||
return 1000 //making magic
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/proc/get_power_channel(var/area/A)
|
||||
/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/proc/get_MUTATION_POWER_channel(var/area/A)
|
||||
var/pow_chan
|
||||
if(A)
|
||||
for(var/c in use_channels)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -320,11 +320,7 @@
|
||||
clearInternalDamage(MECHA_INT_CONTROL_LOST)
|
||||
|
||||
/obj/mecha/narsie_act()
|
||||
if(occupant)
|
||||
var/mob/living/L = occupant
|
||||
go_out(TRUE)
|
||||
if(L)
|
||||
L.narsie_act()
|
||||
emp_act(EMP_HEAVY)
|
||||
|
||||
/obj/mecha/ratvar_act()
|
||||
if((GLOB.ratvar_awakens || GLOB.clockwork_gateway_activated) && occupant)
|
||||
|
||||
@@ -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
|
||||
@@ -138,13 +138,13 @@
|
||||
name = "flux wave anomaly"
|
||||
icon_state = "electricity2"
|
||||
density = TRUE
|
||||
var/canshock = 0
|
||||
var/canshock = FALSE
|
||||
var/shockdamage = 20
|
||||
var/explosive = TRUE
|
||||
|
||||
/obj/effect/anomaly/flux/anomalyEffect()
|
||||
..()
|
||||
canshock = 1
|
||||
canshock = TRUE
|
||||
for(var/mob/living/M in range(0, src))
|
||||
mobShock(M)
|
||||
|
||||
@@ -159,18 +159,8 @@
|
||||
|
||||
/obj/effect/anomaly/flux/proc/mobShock(mob/living/M)
|
||||
if(canshock && istype(M))
|
||||
canshock = 0 //Just so you don't instakill yourself if you slam into the anomaly five times in a second.
|
||||
if(iscarbon(M))
|
||||
if(ishuman(M))
|
||||
M.electrocute_act(shockdamage, "[name]", safety=1)
|
||||
return
|
||||
M.electrocute_act(shockdamage, "[name]")
|
||||
return
|
||||
else
|
||||
M.adjustFireLoss(shockdamage)
|
||||
M.visible_message("<span class='danger'>[M] was shocked by \the [name]!</span>", \
|
||||
"<span class='userdanger'>You feel a powerful shock coursing through your body!</span>", \
|
||||
"<span class='italics'>You hear a heavy electrical crack.</span>")
|
||||
canshock = FALSE //Just so you don't instakill yourself if you slam into the anomaly five times in a second.
|
||||
M.electrocute_act(shockdamage, "[name]", flags = SHOCK_NOGLOVES)
|
||||
|
||||
/obj/effect/anomaly/flux/detonate()
|
||||
if(explosive)
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
take_damage(5, BURN, 0, 0)
|
||||
|
||||
/obj/structure/spider/stickyweb
|
||||
var/genetic = FALSE
|
||||
icon_state = "stickyweb1"
|
||||
|
||||
/obj/structure/spider/stickyweb/Initialize()
|
||||
@@ -36,6 +37,8 @@
|
||||
. = ..()
|
||||
|
||||
/obj/structure/spider/stickyweb/CanPass(atom/movable/mover, turf/target)
|
||||
if (genetic)
|
||||
return
|
||||
if(istype(mover, /mob/living/simple_animal/hostile/poison/giant_spider))
|
||||
return TRUE
|
||||
else if(isliving(mover))
|
||||
@@ -48,6 +51,27 @@
|
||||
return prob(30)
|
||||
return TRUE
|
||||
|
||||
/obj/structure/spider/stickyweb/genetic //for the spider genes in genetics
|
||||
genetic = TRUE
|
||||
var/mob/living/allowed_mob
|
||||
|
||||
/obj/structure/spider/stickyweb/genetic/Initialize(mapload, allowedmob)
|
||||
allowed_mob = allowedmob
|
||||
. = ..()
|
||||
|
||||
/obj/structure/spider/stickyweb/genetic/CanPass(atom/movable/mover, turf/target)
|
||||
. = ..() //this is the normal spider web return aka a spider would make this TRUE
|
||||
if(mover == allowed_mob)
|
||||
return TRUE
|
||||
else if(isliving(mover)) //we change the spider to not be able to go through here
|
||||
if(mover.pulledby == allowed_mob)
|
||||
return TRUE
|
||||
if(prob(50))
|
||||
to_chat(mover, "<span class='danger'>You get stuck in \the [src] for a moment.</span>")
|
||||
return FALSE
|
||||
else if(istype(mover, /obj/item/projectile))
|
||||
return prob(30)
|
||||
|
||||
/obj/structure/spider/eggcluster
|
||||
name = "egg cluster"
|
||||
desc = "They seem to pulse slightly with an inner life."
|
||||
|
||||
@@ -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 */
|
||||
|
||||
|
||||
@@ -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>")
|
||||
@@ -849,3 +850,9 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
if (HAS_TRAIT(src, TRAIT_NODROP))
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/proc/embedded(mob/living/carbon/human/embedded_mob)
|
||||
return
|
||||
|
||||
/obj/item/proc/unembedded()
|
||||
return
|
||||
@@ -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,10 @@
|
||||
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)
|
||||
@@ -105,7 +109,15 @@
|
||||
. = ..()
|
||||
if(!loaded || !loaded.amount)
|
||||
return
|
||||
var/mutable_appearance/cable_overlay = mutable_appearance(icon, "rcl-[max(CEILING(loaded.amount/(max_amount/3), 1), 3)]")
|
||||
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]]
|
||||
. += 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_file, "rcl-[CEILING(loaded.amount/(max_amount/3), 1)]")
|
||||
cable_overlay.color = GLOB.cable_colors[colors[current_color_index]]
|
||||
. += cable_overlay
|
||||
|
||||
@@ -279,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++;
|
||||
@@ -309,10 +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"
|
||||
item_state = "rclg"
|
||||
ghetto = TRUE
|
||||
|
||||
@@ -66,8 +66,8 @@
|
||||
if(iswallturf(T))
|
||||
T.attackby(src, user, params)
|
||||
|
||||
var/metal_amt = round(custom_materials[getmaterialref(/datum/material/iron)]/MINERAL_MATERIAL_AMOUNT)
|
||||
var/glass_amt = round(custom_materials[getmaterialref(/datum/material/glass)]/MINERAL_MATERIAL_AMOUNT)
|
||||
var/metal_amt = round(custom_materials[SSmaterials.GetMaterialRef(/datum/material/iron)]/MINERAL_MATERIAL_AMOUNT)
|
||||
var/glass_amt = round(custom_materials[SSmaterials.GetMaterialRef(/datum/material/glass)]/MINERAL_MATERIAL_AMOUNT)
|
||||
|
||||
if(istype(W, /obj/item/wrench) && (metal_amt || glass_amt))
|
||||
to_chat(user, "<span class='notice'>You dismantle [src].</span>")
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
/obj/item/chromosome
|
||||
name = "blank chromosome"
|
||||
icon = 'icons/obj/chromosomes.dmi'
|
||||
icon_state = ""
|
||||
desc = "A tube holding chromosomic data."
|
||||
force = 0
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
|
||||
var/stabilizer_coeff = 1 //lower is better, affects genetic stability
|
||||
var/synchronizer_coeff = 1 //lower is better, affects chance to backfire
|
||||
var/power_coeff = 1 //higher is better, affects "strength"
|
||||
var/energy_coeff = 1 //lower is better. affects recharge time
|
||||
|
||||
var/weight = 5
|
||||
|
||||
/obj/item/chromosome/proc/can_apply(datum/mutation/human/HM)
|
||||
if(!HM || !(HM.can_chromosome == CHROMOSOME_NONE))
|
||||
return FALSE
|
||||
if((stabilizer_coeff != 1) && (HM.stabilizer_coeff != -1)) //if the chromosome is 1, we dont change anything. If the mutation is -1, we cant change it. sorry
|
||||
return TRUE
|
||||
if((synchronizer_coeff != 1) && (HM.synchronizer_coeff != -1))
|
||||
return TRUE
|
||||
if((power_coeff != 1) && (HM.power_coeff != -1))
|
||||
return TRUE
|
||||
if((energy_coeff != 1) && (HM.energy_coeff != -1))
|
||||
return TRUE
|
||||
|
||||
/obj/item/chromosome/proc/apply(datum/mutation/human/HM)
|
||||
if(HM.stabilizer_coeff != -1)
|
||||
HM.stabilizer_coeff = stabilizer_coeff
|
||||
if(HM.synchronizer_coeff != -1)
|
||||
HM.synchronizer_coeff = synchronizer_coeff
|
||||
if(HM.power_coeff != -1)
|
||||
HM.power_coeff = power_coeff
|
||||
if(HM.energy_coeff != -1)
|
||||
HM.energy_coeff = energy_coeff
|
||||
HM.can_chromosome = 2
|
||||
HM.chromosome_name = name
|
||||
HM.modify()
|
||||
qdel(src)
|
||||
|
||||
/proc/generate_chromosome()
|
||||
var/static/list/chromosomes
|
||||
if(!chromosomes)
|
||||
chromosomes = list()
|
||||
for(var/A in subtypesof(/obj/item/chromosome))
|
||||
var/obj/item/chromosome/CM = A
|
||||
if(!initial(CM.weight))
|
||||
break
|
||||
chromosomes[A] = initial(CM.weight)
|
||||
return pickweight(chromosomes)
|
||||
|
||||
|
||||
/obj/item/chromosome/stabilizer
|
||||
name = "stabilizer chromosome"
|
||||
desc = "A chromosome that adjusts to the body to reduce genetic damage by 20%."
|
||||
icon_state = "stabilizer"
|
||||
stabilizer_coeff = 0.8
|
||||
weight = 1
|
||||
|
||||
/obj/item/chromosome/synchronizer
|
||||
name = "synchronizer chromosome"
|
||||
desc = "A chromosome that gives the mind more controle over the mutation, reducing knockback and downsides by 50%."
|
||||
icon_state = "synchronizer"
|
||||
synchronizer_coeff = 0.5
|
||||
|
||||
/obj/item/chromosome/power
|
||||
name = "power chromosome"
|
||||
desc = "A power chromosome for boosting certain mutation's power by 50%."
|
||||
icon_state = "power"
|
||||
power_coeff = 1.5
|
||||
|
||||
/obj/item/chromosome/energy
|
||||
name = "energetic chromosome"
|
||||
desc = "A chromosome that reduces cooldown on action based mutations by 50%."
|
||||
icon_state = "energy"
|
||||
energy_coeff = 0.5
|
||||
|
||||
/obj/item/chromosome/reinforcer
|
||||
name = "reinforcement chromosome"
|
||||
desc = "Renders the mutation immune to mutadone."
|
||||
icon_state = "reinforcer"
|
||||
weight = 3
|
||||
|
||||
/obj/item/chromosome/reinforcer/can_apply(datum/mutation/human/HM)
|
||||
if(!HM || !(HM.can_chromosome == CHROMOSOME_NONE))
|
||||
return FALSE
|
||||
return !HM.mutadone_proof
|
||||
|
||||
/obj/item/chromosome/reinforcer/apply(datum/mutation/human/HM)
|
||||
HM.mutadone_proof = TRUE
|
||||
..()
|
||||
@@ -18,15 +18,11 @@
|
||||
/obj/item/chrono_eraser/proc/pass_mind(datum/mind/M)
|
||||
erased_minds += M
|
||||
|
||||
/obj/item/chrono_eraser/dropped()
|
||||
/obj/item/chrono_eraser/dropped(mob/user)
|
||||
..()
|
||||
if(PA)
|
||||
qdel(PA)
|
||||
|
||||
/obj/item/chrono_eraser/Destroy()
|
||||
dropped()
|
||||
return ..()
|
||||
|
||||
/obj/item/chrono_eraser/ui_action_click(mob/user)
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
|
||||
@@ -856,7 +856,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
if(prob(5))//small chance for the vape to break and deal damage if it's emagged
|
||||
playsound(get_turf(src), 'sound/effects/pop_expl.ogg', 50, 0)
|
||||
M.apply_damage(20, BURN, BODY_ZONE_HEAD)
|
||||
M.Knockdown(300, 1, 0)
|
||||
M.DefaultCombatKnockdown(300, 1, 0)
|
||||
var/datum/effect_system/spark_spread/sp = new /datum/effect_system/spark_spread
|
||||
sp.set_up(5, 1, src)
|
||||
sp.start()
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
build_path = /obj/machinery/dna_scannernew
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/scanning_module = 1,
|
||||
/obj/item/stock_parts/manipulator = 1,
|
||||
/obj/item/stock_parts/matter_bin = 1,
|
||||
/obj/item/stock_parts/micro_laser = 1,
|
||||
/obj/item/stack/sheet/glass = 1,
|
||||
/obj/item/stack/cable_coil = 2)
|
||||
|
||||
@@ -694,7 +694,7 @@
|
||||
C.blind_eyes(1)
|
||||
if(C.get_eye_protection() <= 0) // no eye protection? ARGH IT BURNS.
|
||||
C.confused = max(C.confused, 3)
|
||||
C.Knockdown(60)
|
||||
C.DefaultCombatKnockdown(60)
|
||||
if(ishuman(C) && actually_paints)
|
||||
var/mob/living/carbon/human/H = C
|
||||
H.lip_style = "spray_face"
|
||||
|
||||
@@ -242,10 +242,8 @@
|
||||
if(slot == user.getBeltSlot())
|
||||
return TRUE
|
||||
|
||||
/obj/item/defibrillator/compact/loaded/Initialize()
|
||||
. = ..()
|
||||
cell = new(src)
|
||||
update_power()
|
||||
/obj/item/defibrillator/compact/loaded
|
||||
cell = /obj/item/stock_parts/cell/high
|
||||
|
||||
/obj/item/defibrillator/compact/combat
|
||||
name = "combat defibrillator"
|
||||
@@ -451,7 +449,7 @@
|
||||
M.visible_message("<span class='danger'>[user] zaps [M] with [src]!</span>", \
|
||||
"<span class='userdanger'>[user] zaps [M] with [src]!</span>")
|
||||
M.adjustStaminaLoss(50)
|
||||
M.Knockdown(100)
|
||||
M.DefaultCombatKnockdown(100)
|
||||
M.updatehealth() //forces health update before next life tick
|
||||
playsound(src, 'sound/machines/defib_zap.ogg', 50, 1, -1)
|
||||
M.emote("gasp")
|
||||
@@ -508,7 +506,7 @@
|
||||
H.set_heartattack(TRUE)
|
||||
H.apply_damage(50, BURN, BODY_ZONE_CHEST)
|
||||
log_combat(user, H, "overloaded the heart of", defib)
|
||||
H.Knockdown(100)
|
||||
H.DefaultCombatKnockdown(100)
|
||||
H.Jitter(100)
|
||||
if(req_defib)
|
||||
defib.deductcharge(revivecost)
|
||||
|
||||
@@ -9,7 +9,6 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
#define PDA_SCANNER_HALOGEN 4
|
||||
#define PDA_SCANNER_GAS 5
|
||||
#define PDA_SPAM_DELAY 2 MINUTES
|
||||
#define PDA_STANDARD_OVERLAYS list("pda-r", "blank", "id_overlay", "insert_overlay", "light_overlay", "pai_overlay")
|
||||
|
||||
//pda icon overlays list defines
|
||||
#define PDA_OVERLAY_ALERT 1
|
||||
@@ -33,14 +32,14 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
|
||||
|
||||
//Main variables
|
||||
var/owner = null // String name of owner
|
||||
var/default_cartridge = 0 // Access level defined by cartridge
|
||||
var/obj/item/cartridge/cartridge = null //current cartridge
|
||||
var/mode = 0 //Controls what menu the PDA will display. 0 is hub; the rest are either built in or based on cartridge.
|
||||
var/list/overlays_icons = list('icons/obj/pda_alt.dmi' = list("pda-r", "screen_default", "id_overlay", "insert_overlay", "light_overlay", "pai_overlay"))
|
||||
var/current_overlays = PDA_STANDARD_OVERLAYS
|
||||
var/static/list/standard_overlays_icons = list("pda-r", "blank", "id_overlay", "insert_overlay", "light_overlay", "pai_overlay")
|
||||
var/list/current_overlays //set on Initialize.
|
||||
|
||||
//variables exclusively used on 'update_overlays' (which should never be called directly, and 'update_icon' doesn't use args anyway)
|
||||
var/new_overlays = FALSE
|
||||
@@ -164,7 +163,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
overlays_x_offset = new_offsets[1]
|
||||
overlays_y_offset = new_offsets[2]
|
||||
if(!(icon in overlays_icons))
|
||||
current_overlays = PDA_STANDARD_OVERLAYS
|
||||
current_overlays = standard_overlays_icons
|
||||
return
|
||||
current_overlays = overlays_icons[icon]
|
||||
|
||||
@@ -227,9 +226,11 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
. = ..()
|
||||
if(new_overlays)
|
||||
set_new_overlays()
|
||||
. += new_alert ? current_overlays[PDA_OVERLAY_ALERT] : current_overlays[PDA_OVERLAY_SCREEN]
|
||||
var/mutable_appearance/overlay = new()
|
||||
var/screen_state = new_alert ? current_overlays[PDA_OVERLAY_ALERT] : current_overlays[PDA_OVERLAY_SCREEN]
|
||||
var/mutable_appearance/overlay = mutable_appearance(icon, screen_state)
|
||||
overlay.pixel_x = overlays_x_offset
|
||||
overlay.pixel_y = overlays_y_offset
|
||||
. += new /mutable_appearance(overlay)
|
||||
if(id)
|
||||
overlay.icon_state = current_overlays[PDA_OVERLAY_ID]
|
||||
. += new /mutable_appearance(overlay)
|
||||
@@ -241,7 +242,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
. += new /mutable_appearance(overlay)
|
||||
if(pai)
|
||||
overlay.icon_state = "[current_overlays[PDA_OVERLAY_PAI]][pai.pai ? "" : "_off"]"
|
||||
. += new /mutable_appearance(overlay)
|
||||
. += overlay
|
||||
new_overlays = FALSE
|
||||
new_alert = FALSE
|
||||
|
||||
@@ -469,7 +470,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
var/mob/living/U = usr
|
||||
//Looking for master was kind of pointless since PDAs don't appear to have one.
|
||||
|
||||
if(usr.canUseTopic(src, BE_CLOSE, FALSE, NO_TK) && !href_list["close"])
|
||||
if(usr.canUseTopic(src, BE_CLOSE, FALSE, NO_TK, FALSE) && !href_list["close"])
|
||||
add_fingerprint(U)
|
||||
U.set_machine(src)
|
||||
|
||||
@@ -757,7 +758,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
var/t = stripped_input(U, "Please enter message", name)
|
||||
if (!t || toff)
|
||||
return
|
||||
if(!U.canUseTopic(src, BE_CLOSE))
|
||||
if(!U.canUseTopic(src, BE_CLOSE, FALSE, NO_TK, FALSE))
|
||||
return
|
||||
if(emped)
|
||||
t = Gibberish(t, 100)
|
||||
@@ -1223,7 +1224,6 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
#undef PDA_SCANNER_HALOGEN
|
||||
#undef PDA_SCANNER_GAS
|
||||
#undef PDA_SPAM_DELAY
|
||||
#undef PDA_STANDARD_OVERLAYS
|
||||
|
||||
#undef PDA_OVERLAY_ALERT
|
||||
#undef PDA_OVERLAY_SCREEN
|
||||
|
||||
@@ -193,8 +193,6 @@
|
||||
/obj/item/pda/curator
|
||||
name = "curator PDA"
|
||||
icon_state = "pda-library"
|
||||
overlays_icons = list('icons/obj/pda.dmi' = list("pda-r-library","blank","id_overlay","insert_overlay", "light_overlay", "pai_overlay"),
|
||||
'icons/obj/pda_alt.dmi' = list("pda-r","screen_default","id_overlay","insert_overlay", "light_overlay", "pai_overlay"))
|
||||
current_overlays = list("pda-r-library","blank","id_overlay","insert_overlay", "light_overlay", "pai_overlay")
|
||||
default_cartridge = /obj/item/cartridge/curator
|
||||
inserted_item = /obj/item/pen/fountain
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
var/obj/item/cigbutt/butt = /obj/item/cigbutt
|
||||
saved_appearance = initial(butt.appearance)
|
||||
|
||||
/obj/item/chameleon/dropped()
|
||||
/obj/item/chameleon/dropped(mob/user)
|
||||
..()
|
||||
disrupt()
|
||||
|
||||
|
||||
@@ -218,7 +218,7 @@
|
||||
/obj/item/geiger_counter/cyborg/proc/redirect_rad_act(datum/source, amount)
|
||||
rad_act(amount)
|
||||
|
||||
/obj/item/geiger_counter/cyborg/dropped()
|
||||
/obj/item/geiger_counter/cyborg/dropped(mob/user)
|
||||
. = ..()
|
||||
if(listeningTo)
|
||||
UnregisterSignal(listeningTo, COMSIG_ATOM_RAD_ACT)
|
||||
|
||||
@@ -289,3 +289,29 @@
|
||||
item_state = "electronic"
|
||||
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
|
||||
|
||||
/obj/item/choice_beacon/music
|
||||
name = "instrument delivery beacon"
|
||||
desc = "Summon your tool of art."
|
||||
icon_state = "gangtool-red"
|
||||
|
||||
/obj/item/choice_beacon/music/generate_display_names()
|
||||
var/static/list/instruments
|
||||
if(!instruments)
|
||||
instruments = list()
|
||||
var/list/templist = list(/obj/item/instrument/violin,
|
||||
/obj/item/instrument/piano_synth,
|
||||
/obj/item/instrument/guitar,
|
||||
/obj/item/instrument/eguitar,
|
||||
/obj/item/instrument/glockenspiel,
|
||||
/obj/item/instrument/accordion,
|
||||
/obj/item/instrument/trumpet,
|
||||
/obj/item/instrument/saxophone,
|
||||
/obj/item/instrument/trombone,
|
||||
/obj/item/instrument/recorder,
|
||||
/obj/item/instrument/harmonica
|
||||
)
|
||||
for(var/V in templist)
|
||||
var/atom/A = V
|
||||
instruments[initial(A.name)] = A
|
||||
return instruments
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
//chance to actually hit the eyes depends on internal component
|
||||
if(prob(effectchance * diode.rating))
|
||||
S.flash_act(affect_silicon = 1)
|
||||
S.Knockdown(rand(100,200))
|
||||
S.DefaultCombatKnockdown(rand(100,200))
|
||||
to_chat(S, "<span class='danger'>Your sensors were overloaded by a laser!</span>")
|
||||
outmsg = "<span class='notice'>You overload [S] by shining [src] at [S.p_their()] sensors.</span>"
|
||||
else
|
||||
@@ -152,8 +152,7 @@
|
||||
if(prob(50))
|
||||
C.visible_message("<span class='notice'>[C] pounces on the light!</span>","<span class='warning'>LIGHT!</span>")
|
||||
C.Move(targloc)
|
||||
C.resting = TRUE
|
||||
C.update_canmove()
|
||||
C.set_resting(TRUE)
|
||||
else
|
||||
C.visible_message("<span class='notice'>[C] looks uninterested in your games.</span>","<span class='warning'>You spot [user] shining [src] at you. How insulting!</span>")
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
s.set_up(3, 1, L)
|
||||
s.start()
|
||||
|
||||
L.Knockdown(100)
|
||||
L.DefaultCombatKnockdown(100)
|
||||
|
||||
if(master)
|
||||
master.receive_signal()
|
||||
@@ -192,7 +192,7 @@ Code:
|
||||
s.set_up(3, 1, L)
|
||||
s.start()
|
||||
|
||||
L.Knockdown(100)
|
||||
L.DefaultCombatKnockdown(100)
|
||||
|
||||
if(master)
|
||||
master.receive_signal()
|
||||
|
||||
@@ -150,7 +150,10 @@ SLIME SCANNER
|
||||
msg += "\n\t<span class='alert'>Subject appears to have [M.getCloneLoss() > 30 ? "Severe" : "Minor"] cellular damage.</span>"
|
||||
if(advanced)
|
||||
msg += "\n\t<span class='info'>Cellular Damage Level: [M.getCloneLoss()].</span>"
|
||||
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(advanced && H.has_dna())
|
||||
msg += "\n\t<span class='info'>Genetic Stability: [H.dna.stability]%.</span>"
|
||||
|
||||
to_chat(user, msg)
|
||||
msg = ""
|
||||
@@ -326,8 +329,8 @@ SLIME SCANNER
|
||||
breathes = FALSE
|
||||
if(NOBLOOD in C.dna.species.species_traits)
|
||||
blooded = FALSE
|
||||
var/has_liver = (!(NOLIVER in C.dna.species.species_traits))
|
||||
var/has_stomach = (!(NOSTOMACH in C.dna.species.species_traits))
|
||||
var/has_liver = C.dna && !(NOLIVER in C.dna.species.species_traits)
|
||||
var/has_stomach = C.dna && !(NOSTOMACH in C.dna.species.species_traits)
|
||||
if(!M.getorganslot(ORGAN_SLOT_EYES))
|
||||
msg += "\t<span class='alert'><b>Subject does not have eyes.</b></span>\n"
|
||||
if(!M.getorganslot(ORGAN_SLOT_EARS))
|
||||
@@ -484,7 +487,8 @@ SLIME SCANNER
|
||||
set name = "Switch Verbosity"
|
||||
set category = "Object"
|
||||
|
||||
if(usr.stat || !usr.canmove || usr.restrained())
|
||||
var/mob/living/L = usr
|
||||
if(!istype(L) || !CHECK_MOBILITY(L, MOBILITY_USE))
|
||||
return
|
||||
|
||||
mode = !mode
|
||||
@@ -775,3 +779,104 @@ SLIME SCANNER
|
||||
var/response = SEND_SIGNAL(M, COMSIG_NANITE_SCAN, user, TRUE)
|
||||
if(!response)
|
||||
to_chat(user, "<span class='info'>No nanites detected in the subject.</span>")
|
||||
|
||||
/obj/item/sequence_scanner
|
||||
name = "genetic sequence scanner"
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "gene"
|
||||
item_state = "healthanalyzer"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
desc = "A hand-held scanner for analyzing someones gene sequence on the fly. Hold near a DNA console to update the internal database."
|
||||
flags_1 = CONDUCT_1
|
||||
item_flags = NOBLUDGEON
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
throwforce = 3
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
custom_materials = list(/datum/material/iron=200)
|
||||
var/list/discovered = list() //hit a dna console to update the scanners database
|
||||
var/list/buffer
|
||||
var/ready = TRUE
|
||||
var/cooldown = 200
|
||||
|
||||
/obj/item/sequence_scanner/attack(mob/living/M, mob/living/carbon/human/user)
|
||||
add_fingerprint(user)
|
||||
if (!HAS_TRAIT(M, TRAIT_RADIMMUNE)) //no scanning if its a husk or DNA-less Species
|
||||
user.visible_message("<span class='notice'>[user] analyzes [M]'s genetic sequence.</span>", \
|
||||
"<span class='notice'>You analyze [M]'s genetic sequence.</span>")
|
||||
gene_scan(M, user)
|
||||
|
||||
else
|
||||
user.visible_message("<span class='notice'>[user] failed to analyse [M]'s genetic sequence.</span>", "<span class='warning'>[M] has no readable genetic sequence!</span>")
|
||||
|
||||
/obj/item/sequence_scanner/attack_self(mob/user)
|
||||
display_sequence(user)
|
||||
|
||||
/obj/item/sequence_scanner/attack_self_tk(mob/user)
|
||||
return
|
||||
|
||||
/obj/item/sequence_scanner/afterattack(obj/O, mob/user, proximity)
|
||||
. = ..()
|
||||
if(!istype(O) || !proximity)
|
||||
return
|
||||
|
||||
if(istype(O, /obj/machinery/computer/scan_consolenew))
|
||||
var/obj/machinery/computer/scan_consolenew/C = O
|
||||
if(C.stored_research)
|
||||
to_chat(user, "<span class='notice'>[name] linked to central research database.</span>")
|
||||
discovered = C.stored_research.discovered_mutations
|
||||
else
|
||||
to_chat(user,"<span class='warning'>No database to update from.</span>")
|
||||
|
||||
/obj/item/sequence_scanner/proc/gene_scan(mob/living/carbon/C, mob/living/user)
|
||||
if(!iscarbon(C) || !C.has_dna())
|
||||
return
|
||||
buffer = C.dna.mutation_index
|
||||
to_chat(user, "<span class='notice'>Subject [C.name]'s DNA sequence has been saved to buffer.</span>")
|
||||
if(LAZYLEN(buffer))
|
||||
for(var/A in buffer)
|
||||
to_chat(user, "<span class='notice'>[get_display_name(A)]</span>")
|
||||
|
||||
|
||||
/obj/item/sequence_scanner/proc/display_sequence(mob/living/user)
|
||||
if(!LAZYLEN(buffer) || !ready)
|
||||
return
|
||||
var/list/options = list()
|
||||
for(var/A in buffer)
|
||||
options += get_display_name(A)
|
||||
|
||||
var/answer = input(user, "Analyze Potential", "Sequence Analyzer") as null|anything in sortList(options)
|
||||
if(answer && ready && user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
var/sequence
|
||||
for(var/A in buffer) //this physically hurts but i dont know what anything else short of an assoc list
|
||||
if(get_display_name(A) == answer)
|
||||
sequence = buffer[A]
|
||||
break
|
||||
|
||||
if(sequence)
|
||||
var/display
|
||||
for(var/i in 0 to length_char(sequence) / DNA_MUTATION_BLOCKS-1)
|
||||
if(i)
|
||||
display += "-"
|
||||
display += copytext_char(sequence, 1 + i*DNA_MUTATION_BLOCKS, DNA_MUTATION_BLOCKS*(1+i) + 1)
|
||||
|
||||
to_chat(user, "<span class='boldnotice'>[display]</span><br>")
|
||||
|
||||
ready = FALSE
|
||||
icon_state = "[icon_state]_recharging"
|
||||
addtimer(CALLBACK(src, .proc/recharge), cooldown, TIMER_UNIQUE)
|
||||
|
||||
/obj/item/sequence_scanner/proc/recharge()
|
||||
icon_state = initial(icon_state)
|
||||
ready = TRUE
|
||||
|
||||
/obj/item/sequence_scanner/proc/get_display_name(mutation)
|
||||
var/datum/mutation/human/HM = GET_INITIALIZED_MUTATION(mutation)
|
||||
if(!HM)
|
||||
return "ERROR"
|
||||
if(mutation in discovered)
|
||||
return "[HM.name] ([HM.alias])"
|
||||
else
|
||||
return HM.alias
|
||||
@@ -44,7 +44,7 @@ effective or pretty fucking useless.
|
||||
for(var/mob/living/carbon/human/M in urange(10, user, 1))
|
||||
if(prob(50))
|
||||
|
||||
M.Knockdown(rand(200,400))
|
||||
M.DefaultCombatKnockdown(rand(200,400))
|
||||
to_chat(M, "<span class='userdanger'>You feel a tremendous, paralyzing wave flood your mind.</span>")
|
||||
|
||||
else
|
||||
|
||||
@@ -63,10 +63,10 @@
|
||||
if(attached_device)
|
||||
attached_device.holder_movement()
|
||||
|
||||
/obj/item/transfer_valve/dropped()
|
||||
/obj/item/transfer_valve/dropped(mob/user)
|
||||
. = ..()
|
||||
if(attached_device)
|
||||
attached_device.dropped()
|
||||
attached_device.dropped(user)
|
||||
|
||||
/obj/item/transfer_valve/on_found(mob/finder)
|
||||
if(attached_device)
|
||||
|
||||
@@ -14,33 +14,25 @@
|
||||
var/list/add_mutations = list()
|
||||
var/list/remove_mutations = list()
|
||||
|
||||
var/list/add_mutations_static = list()
|
||||
var/list/remove_mutations_static = list()
|
||||
|
||||
var/used = 0
|
||||
|
||||
/obj/item/dnainjector/attack_paw(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/item/dnainjector/proc/prepare()
|
||||
for(var/mut_key in add_mutations_static)
|
||||
add_mutations.Add(GLOB.mutations_list[mut_key])
|
||||
for(var/mut_key in remove_mutations_static)
|
||||
remove_mutations.Add(GLOB.mutations_list[mut_key])
|
||||
|
||||
/obj/item/dnainjector/proc/inject(mob/living/carbon/M, mob/user)
|
||||
prepare()
|
||||
|
||||
if(M.has_dna() && !HAS_TRAIT(M, TRAIT_RADIMMUNE) && !HAS_TRAIT(M, TRAIT_NOCLONE))
|
||||
M.radiation += rand(20/(damage_coeff ** 2),50/(damage_coeff ** 2))
|
||||
var/log_msg = "[key_name(user)] injected [key_name(M)] with the [name]"
|
||||
for(var/datum/mutation/human/HM in remove_mutations)
|
||||
HM.force_lose(M)
|
||||
for(var/datum/mutation/human/HM in add_mutations)
|
||||
if(HM.name == RACEMUT)
|
||||
for(var/HM in remove_mutations)
|
||||
M.dna.remove_mutation(HM)
|
||||
for(var/HM in add_mutations)
|
||||
if(HM == RACEMUT)
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] injected [key_name_admin(M)] with the [name] <span class='danger'>(MONKEY)</span>")
|
||||
log_msg += " (MONKEY)"
|
||||
HM.force_give(M)
|
||||
if(M.dna.mutation_in_sequence(HM))
|
||||
M.dna.activate_mutation(HM)
|
||||
else
|
||||
M.dna.add_mutation(HM, MUT_EXTRA)
|
||||
if(fields)
|
||||
if(fields["name"] && fields["UE"] && fields["blood_type"])
|
||||
M.real_name = fields["name"]
|
||||
@@ -90,123 +82,123 @@
|
||||
/obj/item/dnainjector/antihulk
|
||||
name = "\improper DNA injector (Anti-Hulk)"
|
||||
desc = "Cures green skin."
|
||||
remove_mutations_static = list(HULK)
|
||||
remove_mutations = list(HULK)
|
||||
|
||||
/obj/item/dnainjector/hulkmut
|
||||
name = "\improper DNA injector (Hulk)"
|
||||
desc = "This will make you big and strong, but give you a bad skin condition."
|
||||
add_mutations_static = list(HULK)
|
||||
add_mutations = list(HULK)
|
||||
|
||||
/obj/item/dnainjector/xraymut
|
||||
name = "\improper DNA injector (X-ray)"
|
||||
desc = "Finally you can see what the Captain does."
|
||||
add_mutations_static = list(XRAY)
|
||||
add_mutations = list(XRAY)
|
||||
|
||||
/obj/item/dnainjector/antixray
|
||||
name = "\improper DNA injector (Anti-X-ray)"
|
||||
desc = "It will make you see harder."
|
||||
remove_mutations_static = list(XRAY)
|
||||
remove_mutations = list(XRAY)
|
||||
|
||||
/////////////////////////////////////
|
||||
/obj/item/dnainjector/antiglasses
|
||||
name = "\improper DNA injector (Anti-Glasses)"
|
||||
desc = "Toss away those glasses!"
|
||||
remove_mutations_static = list(BADSIGHT)
|
||||
remove_mutations = list(BADSIGHT)
|
||||
|
||||
/obj/item/dnainjector/glassesmut
|
||||
name = "\improper DNA injector (Glasses)"
|
||||
desc = "Will make you need dorkish glasses."
|
||||
add_mutations_static = list(BADSIGHT)
|
||||
add_mutations = list(BADSIGHT)
|
||||
|
||||
/obj/item/dnainjector/epimut
|
||||
name = "\improper DNA injector (Epi.)"
|
||||
desc = "Shake shake shake the room!"
|
||||
add_mutations_static = list(EPILEPSY)
|
||||
add_mutations = list(EPILEPSY)
|
||||
|
||||
/obj/item/dnainjector/antiepi
|
||||
name = "\improper DNA injector (Anti-Epi.)"
|
||||
desc = "Will fix you up from shaking the room."
|
||||
remove_mutations_static = list(EPILEPSY)
|
||||
remove_mutations = list(EPILEPSY)
|
||||
////////////////////////////////////
|
||||
/obj/item/dnainjector/anticough
|
||||
name = "\improper DNA injector (Anti-Cough)"
|
||||
desc = "Will stop that awful noise."
|
||||
remove_mutations_static = list(COUGH)
|
||||
remove_mutations = list(COUGH)
|
||||
|
||||
/obj/item/dnainjector/coughmut
|
||||
name = "\improper DNA injector (Cough)"
|
||||
desc = "Will bring forth a sound of horror from your throat."
|
||||
add_mutations_static = list(COUGH)
|
||||
add_mutations = list(COUGH)
|
||||
|
||||
/obj/item/dnainjector/antidwarf
|
||||
name = "\improper DNA injector (Anti-Dwarfism)"
|
||||
desc = "Helps you grow big and strong."
|
||||
remove_mutations_static = list(DWARFISM)
|
||||
remove_mutations = list(DWARFISM)
|
||||
|
||||
/obj/item/dnainjector/dwarf
|
||||
name = "\improper DNA injector (Dwarfism)"
|
||||
desc = "It's a small world after all."
|
||||
add_mutations_static = list(DWARFISM)
|
||||
add_mutations = list(DWARFISM)
|
||||
|
||||
/obj/item/dnainjector/clumsymut
|
||||
name = "\improper DNA injector (Clumsy)"
|
||||
desc = "Makes clown minions."
|
||||
add_mutations_static = list(CLOWNMUT)
|
||||
add_mutations = list(CLOWNMUT)
|
||||
|
||||
/obj/item/dnainjector/anticlumsy
|
||||
name = "\improper DNA injector (Anti-Clumsy)"
|
||||
desc = "Apply this for Security Clown."
|
||||
remove_mutations_static = list(CLOWNMUT)
|
||||
remove_mutations = list(CLOWNMUT)
|
||||
|
||||
/obj/item/dnainjector/antitour
|
||||
name = "\improper DNA injector (Anti-Tour.)"
|
||||
desc = "Will cure Tourette's."
|
||||
remove_mutations_static = list(TOURETTES)
|
||||
remove_mutations = list(TOURETTES)
|
||||
|
||||
/obj/item/dnainjector/tourmut
|
||||
name = "\improper DNA injector (Tour.)"
|
||||
desc = "Gives you a nasty case of Tourette's."
|
||||
add_mutations_static = list(TOURETTES)
|
||||
add_mutations = list(TOURETTES)
|
||||
|
||||
/obj/item/dnainjector/stuttmut
|
||||
name = "\improper DNA injector (Stutt.)"
|
||||
desc = "Makes you s-s-stuttterrr."
|
||||
add_mutations_static = list(NERVOUS)
|
||||
add_mutations = list(NERVOUS)
|
||||
|
||||
/obj/item/dnainjector/antistutt
|
||||
name = "\improper DNA injector (Anti-Stutt.)"
|
||||
desc = "Fixes that speaking impairment."
|
||||
remove_mutations_static = list(NERVOUS)
|
||||
remove_mutations = list(NERVOUS)
|
||||
|
||||
/obj/item/dnainjector/antifire
|
||||
name = "\improper DNA injector (Anti-Fire)"
|
||||
desc = "Cures fire."
|
||||
remove_mutations_static = list(COLDRES)
|
||||
remove_mutations = list(SPACEMUT)
|
||||
|
||||
/obj/item/dnainjector/firemut
|
||||
name = "\improper DNA injector (Fire)"
|
||||
desc = "Gives you fire."
|
||||
add_mutations_static = list(COLDRES)
|
||||
add_mutations = list(SPACEMUT)
|
||||
|
||||
/obj/item/dnainjector/blindmut
|
||||
name = "\improper DNA injector (Blind)"
|
||||
desc = "Makes you not see anything."
|
||||
add_mutations_static = list(BLINDMUT)
|
||||
add_mutations = list(BLINDMUT)
|
||||
|
||||
/obj/item/dnainjector/antiblind
|
||||
name = "\improper DNA injector (Anti-Blind)"
|
||||
desc = "IT'S A MIRACLE!!!"
|
||||
remove_mutations_static = list(BLINDMUT)
|
||||
remove_mutations = list(BLINDMUT)
|
||||
|
||||
/obj/item/dnainjector/antitele
|
||||
name = "\improper DNA injector (Anti-Tele.)"
|
||||
desc = "Will make you not able to control your mind."
|
||||
remove_mutations_static = list(TK)
|
||||
remove_mutations = list(TK)
|
||||
|
||||
/obj/item/dnainjector/telemut
|
||||
name = "\improper DNA injector (Tele.)"
|
||||
desc = "Super brain man!"
|
||||
add_mutations_static = list(TK)
|
||||
add_mutations = list(TK)
|
||||
|
||||
/obj/item/dnainjector/telemut/darkbundle
|
||||
name = "\improper DNA injector"
|
||||
@@ -215,100 +207,258 @@
|
||||
/obj/item/dnainjector/deafmut
|
||||
name = "\improper DNA injector (Deaf)"
|
||||
desc = "Sorry, what did you say?"
|
||||
add_mutations_static = list(DEAFMUT)
|
||||
add_mutations = list(DEAFMUT)
|
||||
|
||||
/obj/item/dnainjector/antideaf
|
||||
name = "\improper DNA injector (Anti-Deaf)"
|
||||
desc = "Will make you hear once more."
|
||||
remove_mutations_static = list(DEAFMUT)
|
||||
remove_mutations = list(DEAFMUT)
|
||||
|
||||
/obj/item/dnainjector/h2m
|
||||
name = "\improper DNA injector (Human > Monkey)"
|
||||
desc = "Will make you a flea bag."
|
||||
add_mutations_static = list(RACEMUT)
|
||||
add_mutations = list(RACEMUT)
|
||||
|
||||
/obj/item/dnainjector/m2h
|
||||
name = "\improper DNA injector (Monkey > Human)"
|
||||
desc = "Will make you...less hairy."
|
||||
remove_mutations_static = list(RACEMUT)
|
||||
remove_mutations = list(RACEMUT)
|
||||
|
||||
/obj/item/dnainjector/antichameleon
|
||||
name = "\improper DNA injector (Anti-Chameleon)"
|
||||
remove_mutations_static = list(CHAMELEON)
|
||||
remove_mutations = list(CHAMELEON)
|
||||
|
||||
/obj/item/dnainjector/chameleonmut
|
||||
name = "\improper DNA injector (Chameleon)"
|
||||
add_mutations_static = list(CHAMELEON)
|
||||
add_mutations = list(CHAMELEON)
|
||||
|
||||
/obj/item/dnainjector/antiwacky
|
||||
name = "\improper DNA injector (Anti-Wacky)"
|
||||
remove_mutations_static = list(WACKY)
|
||||
remove_mutations = list(WACKY)
|
||||
|
||||
/obj/item/dnainjector/wackymut
|
||||
name = "\improper DNA injector (Wacky)"
|
||||
add_mutations_static = list(WACKY)
|
||||
add_mutations = list(WACKY)
|
||||
|
||||
/obj/item/dnainjector/antimute
|
||||
name = "\improper DNA injector (Anti-Mute)"
|
||||
remove_mutations_static = list(MUT_MUTE)
|
||||
remove_mutations = list(MUT_MUTE)
|
||||
|
||||
/obj/item/dnainjector/mutemut
|
||||
name = "\improper DNA injector (Mute)"
|
||||
add_mutations_static = list(MUT_MUTE)
|
||||
add_mutations = list(MUT_MUTE)
|
||||
|
||||
/obj/item/dnainjector/antismile
|
||||
name = "\improper DNA injector (Anti-Smile)"
|
||||
remove_mutations_static = list(SMILE)
|
||||
remove_mutations = list(SMILE)
|
||||
|
||||
/obj/item/dnainjector/smilemut
|
||||
name = "\improper DNA injector (Smile)"
|
||||
add_mutations_static = list(SMILE)
|
||||
add_mutations = list(SMILE)
|
||||
|
||||
/obj/item/dnainjector/unintelligiblemut
|
||||
name = "\improper DNA injector (Unintelligible)"
|
||||
add_mutations_static = list(UNINTELLIGIBLE)
|
||||
add_mutations = list(UNINTELLIGIBLE)
|
||||
|
||||
/obj/item/dnainjector/antiunintelligible
|
||||
name = "\improper DNA injector (Anti-Unintelligible)"
|
||||
remove_mutations_static = list(UNINTELLIGIBLE)
|
||||
remove_mutations = list(UNINTELLIGIBLE)
|
||||
|
||||
/obj/item/dnainjector/swedishmut
|
||||
name = "\improper DNA injector (Swedish)"
|
||||
add_mutations_static = list(SWEDISH)
|
||||
add_mutations = list(SWEDISH)
|
||||
|
||||
/obj/item/dnainjector/antiswedish
|
||||
name = "\improper DNA injector (Anti-Swedish)"
|
||||
remove_mutations_static = list(SWEDISH)
|
||||
remove_mutations = list(SWEDISH)
|
||||
|
||||
/obj/item/dnainjector/chavmut
|
||||
name = "\improper DNA injector (Chav)"
|
||||
add_mutations_static = list(CHAV)
|
||||
add_mutations = list(CHAV)
|
||||
|
||||
/obj/item/dnainjector/antichav
|
||||
name = "\improper DNA injector (Anti-Chav)"
|
||||
remove_mutations_static = list(CHAV)
|
||||
remove_mutations = list(CHAV)
|
||||
|
||||
/obj/item/dnainjector/elvismut
|
||||
name = "\improper DNA injector (Elvis)"
|
||||
add_mutations_static = list(ELVIS)
|
||||
add_mutations = list(ELVIS)
|
||||
|
||||
/obj/item/dnainjector/antielvis
|
||||
name = "\improper DNA injector (Anti-Elvis)"
|
||||
remove_mutations_static = list(ELVIS)
|
||||
remove_mutations = list(ELVIS)
|
||||
|
||||
/obj/item/dnainjector/lasereyesmut
|
||||
name = "\improper DNA injector (Laser Eyes)"
|
||||
add_mutations_static = list(LASEREYES)
|
||||
add_mutations = list(LASEREYES)
|
||||
|
||||
/obj/item/dnainjector/antilasereyes
|
||||
name = "\improper DNA injector (Anti-Laser Eyes)"
|
||||
remove_mutations_static = list(LASEREYES)
|
||||
remove_mutations = list(LASEREYES)
|
||||
|
||||
/obj/item/dnainjector/void
|
||||
name = "\improper DNA injector (Void)"
|
||||
add_mutations = list(VOID)
|
||||
|
||||
/obj/item/dnainjector/antivoid
|
||||
name = "\improper DNA injector (Anti-Void)"
|
||||
remove_mutations = list(VOID)
|
||||
|
||||
/obj/item/dnainjector/antenna
|
||||
name = "\improper DNA injector (Antenna)"
|
||||
add_mutations = list(ANTENNA)
|
||||
|
||||
/obj/item/dnainjector/antiantenna
|
||||
name = "\improper DNA injector (Anti-Antenna)"
|
||||
remove_mutations = list(ANTENNA)
|
||||
|
||||
/obj/item/dnainjector/paranoia
|
||||
name = "\improper DNA injector (Paranoia)"
|
||||
add_mutations = list(PARANOIA)
|
||||
|
||||
/obj/item/dnainjector/antiparanoia
|
||||
name = "\improper DNA injector (Anti-Paranoia)"
|
||||
remove_mutations = list(PARANOIA)
|
||||
|
||||
/obj/item/dnainjector/mindread
|
||||
name = "\improper DNA injector (Mindread)"
|
||||
add_mutations = list(MINDREAD)
|
||||
|
||||
/obj/item/dnainjector/antimindread
|
||||
name = "\improper DNA injector (Anti-Mindread)"
|
||||
remove_mutations = list(MINDREAD)
|
||||
|
||||
/obj/item/dnainjector/radioactive
|
||||
name = "\improper DNA injector (Radioactive)"
|
||||
add_mutations = list(RADIOACTIVE)
|
||||
|
||||
/obj/item/dnainjector/antiradioactive
|
||||
name = "\improper DNA injector (Anti-Radioactive)"
|
||||
remove_mutations = list(RADIOACTIVE)
|
||||
/obj/item/dnainjector/olfaction
|
||||
name = "\improper DNA injector (Olfaction)"
|
||||
add_mutations = list(OLFACTION)
|
||||
|
||||
/obj/item/dnainjector/antiolfaction
|
||||
name = "\improper DNA injector (Anti-Olfaction)"
|
||||
remove_mutations = list(OLFACTION)
|
||||
|
||||
/obj/item/dnainjector/insulated
|
||||
name = "\improper DNA injector (Insulated)"
|
||||
add_mutations = list(INSULATED)
|
||||
|
||||
/obj/item/dnainjector/antiinsulated
|
||||
name = "\improper DNA injector (Anti-Insulated)"
|
||||
remove_mutations = list(INSULATED)
|
||||
|
||||
/obj/item/dnainjector/shock
|
||||
name = "\improper DNA injector (Shock Touch)"
|
||||
add_mutations = list(SHOCKTOUCH)
|
||||
|
||||
/obj/item/dnainjector/antishock
|
||||
name = "\improper DNA injector (Anti-Shock Touch)"
|
||||
remove_mutations = list(SHOCKTOUCH)
|
||||
|
||||
/obj/item/dnainjector/spacialinstability
|
||||
name = "\improper DNA injector (Spacial Instability)"
|
||||
add_mutations = list(BADBLINK)
|
||||
|
||||
/obj/item/dnainjector/antispacialinstability
|
||||
name = "\improper DNA injector (Anti-Spacial Instability)"
|
||||
remove_mutations = list(BADBLINK)
|
||||
|
||||
/obj/item/dnainjector/acidflesh
|
||||
name = "\improper DNA injector (Acid Flesh)"
|
||||
add_mutations = list(ACIDFLESH)
|
||||
|
||||
/obj/item/dnainjector/antiacidflesh
|
||||
name = "\improper DNA injector (Acid Flesh)"
|
||||
remove_mutations = list(ACIDFLESH)
|
||||
|
||||
/obj/item/dnainjector/gigantism
|
||||
name = "\improper DNA injector (Gigantism)"
|
||||
add_mutations = list(GIGANTISM)
|
||||
|
||||
/obj/item/dnainjector/antigigantism
|
||||
name = "\improper DNA injector (Anti-Gigantism)"
|
||||
remove_mutations = list(GIGANTISM)
|
||||
|
||||
/obj/item/dnainjector/spastic
|
||||
name = "\improper DNA injector (Spastic)"
|
||||
add_mutations = list(SPASTIC)
|
||||
|
||||
/obj/item/dnainjector/antispastic
|
||||
name = "\improper DNA injector (Anti-Spastic)"
|
||||
remove_mutations = list(SPASTIC)
|
||||
|
||||
/obj/item/dnainjector/geladikinesis
|
||||
name = "\improper DNA injector (Geladikinesis)"
|
||||
add_mutations = list(GELADIKINESIS)
|
||||
|
||||
/obj/item/dnainjector/antigeladikinesis
|
||||
name = "\improper DNA injector (Anti-Geladikinesis)"
|
||||
remove_mutations = list(GELADIKINESIS)
|
||||
|
||||
/obj/item/dnainjector/cryokinesis
|
||||
name = "\improper DNA injector (Cryokinesis)"
|
||||
add_mutations = list(CRYOKINESIS)
|
||||
|
||||
/obj/item/dnainjector/anticryokinesis
|
||||
name = "\improper DNA injector (Anti-Cryokinesis)"
|
||||
remove_mutations = list(CRYOKINESIS)
|
||||
|
||||
/obj/item/dnainjector/thermal
|
||||
name = "\improper DNA injector (Thermal Vision)"
|
||||
add_mutations = list(THERMAL)
|
||||
|
||||
/obj/item/dnainjector/antithermal
|
||||
name = "\improper DNA injector (Anti-Thermal Vision)"
|
||||
remove_mutations = list(THERMAL)
|
||||
|
||||
/obj/item/dnainjector/glow
|
||||
name = "\improper DNA injector (Glowy)"
|
||||
add_mutations = list(GLOWY)
|
||||
|
||||
/obj/item/dnainjector/removeglow
|
||||
name = "\improper DNA injector (Anti-Glowy)"
|
||||
remove_mutations = list(GLOWY)
|
||||
|
||||
/obj/item/dnainjector/antiglow
|
||||
name = "\improper DNA injector (Antiglowy)"
|
||||
add_mutations = list(ANTIGLOWY)
|
||||
|
||||
/obj/item/dnainjector/removeantiglow
|
||||
name = "\improper DNA injector (Anti-Antiglowy)"
|
||||
remove_mutations = list(ANTIGLOWY)
|
||||
|
||||
/obj/item/dnainjector/firebreath
|
||||
name = "\improper DNA injector (Firebreath)"
|
||||
add_mutations = list(FIREBREATH)
|
||||
|
||||
/obj/item/dnainjector/antifirebreath
|
||||
name = "\improper DNA injector (Anti-Firebreath)"
|
||||
remove_mutations = list(FIREBREATH)
|
||||
|
||||
/obj/item/dnainjector/tonguespike
|
||||
name = "\improper DNA injector (Tongue Spike)"
|
||||
add_mutations = list(TONGUESPIKE)
|
||||
|
||||
/obj/item/dnainjector/antitonguespike
|
||||
name = "\improper DNA injector (Anti-Tongue Spike)"
|
||||
remove_mutations = list(TONGUESPIKE)
|
||||
|
||||
/obj/item/dnainjector/spiderweb
|
||||
name = "\improper DNA injector (Spider Web)"
|
||||
add_mutations = list(SPIDER_WEB)
|
||||
|
||||
/obj/item/dnainjector/antispiderweb
|
||||
name = "\improper DNA injector (Anti-Spider Web)"
|
||||
remove_mutations = list(SPIDER_WEB)
|
||||
|
||||
/obj/item/dnainjector/timed
|
||||
var/duration = 600
|
||||
|
||||
/obj/item/dnainjector/timed/inject(mob/living/carbon/M, mob/user)
|
||||
prepare()
|
||||
if(M.stat == DEAD) //prevents dead people from having their DNA changed
|
||||
to_chat(user, "<span class='notice'>You can't modify [M]'s DNA while [M.p_theyre()] dead.</span>")
|
||||
return FALSE
|
||||
@@ -317,23 +467,22 @@
|
||||
M.radiation += rand(20/(damage_coeff ** 2),50/(damage_coeff ** 2))
|
||||
var/log_msg = "[key_name(user)] injected [key_name(M)] with the [name]"
|
||||
var/endtime = world.time+duration
|
||||
for(var/datum/mutation/human/HM in remove_mutations)
|
||||
if(HM.name == RACEMUT)
|
||||
for(var/mutation in remove_mutations)
|
||||
if(mutation == RACEMUT)
|
||||
if(ishuman(M))
|
||||
continue
|
||||
M = HM.force_lose(M)
|
||||
M = M.dna.remove_mutation(mutation)
|
||||
else
|
||||
HM.force_lose(M)
|
||||
for(var/datum/mutation/human/HM in add_mutations)
|
||||
if((HM in M.dna.mutations) && !(M.dna.temporary_mutations[HM.name]))
|
||||
M.dna.remove_mutation(mutation)
|
||||
for(var/mutation in add_mutations)
|
||||
if(M.dna.get_mutation(mutation))
|
||||
continue //Skip permanent mutations we already have.
|
||||
if(HM.name == RACEMUT && ishuman(M))
|
||||
if(mutation == RACEMUT && ishuman(M))
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] injected [key_name_admin(M)] with the [name] <span class='danger'>(MONKEY)</span>")
|
||||
log_msg += " (MONKEY)"
|
||||
M = HM.force_give(M)
|
||||
M = M.dna.add_mutation(mutation, MUT_OTHER, endtime)
|
||||
else
|
||||
HM.force_give(M)
|
||||
M.dna.temporary_mutations[HM.name] = endtime
|
||||
M.dna.add_mutation(mutation, MUT_OTHER, endtime)
|
||||
if(fields)
|
||||
if(fields["name"] && fields["UE"] && fields["blood_type"])
|
||||
if(!M.dna.previous["name"])
|
||||
@@ -361,9 +510,41 @@
|
||||
/obj/item/dnainjector/timed/hulk
|
||||
name = "\improper DNA injector (Hulk)"
|
||||
desc = "This will make you big and strong, but give you a bad skin condition."
|
||||
add_mutations_static = list(HULK)
|
||||
add_mutations = list(HULK)
|
||||
|
||||
/obj/item/dnainjector/timed/h2m
|
||||
name = "\improper DNA injector (Human > Monkey)"
|
||||
desc = "Will make you a flea bag."
|
||||
add_mutations_static = list(RACEMUT)
|
||||
add_mutations = list(RACEMUT)
|
||||
|
||||
/obj/item/dnainjector/activator
|
||||
name = "\improper DNA activator"
|
||||
desc = "Activates the current mutation on injection, if the subject has it."
|
||||
var/doitanyway = FALSE
|
||||
var/research = FALSE //Set to true to get expended and filled injectors for chromosomes
|
||||
var/filled = FALSE
|
||||
|
||||
/obj/item/dnainjector/activator/inject(mob/living/carbon/M, mob/user)
|
||||
if(M.has_dna() && !HAS_TRAIT(M, TRAIT_RADIMMUNE) && !HAS_TRAIT(M,TRAIT_NOCLONE))
|
||||
M.radiation += rand(20/(damage_coeff ** 2),50/(damage_coeff ** 2))
|
||||
var/log_msg = "[key_name(user)] injected [key_name(M)] with the [name]"
|
||||
for(var/mutation in add_mutations)
|
||||
var/datum/mutation/human/HM = mutation
|
||||
if(istype(HM, /datum/mutation/human))
|
||||
mutation = HM.type
|
||||
if(!M.dna.activate_mutation(HM))
|
||||
if(!doitanyway)
|
||||
log_msg += "(FAILED)"
|
||||
else
|
||||
M.dna.add_mutation(HM, MUT_EXTRA)
|
||||
name = "expended [name]"
|
||||
else if(research && M.client)
|
||||
filled = TRUE
|
||||
name = "filled [name]"
|
||||
else
|
||||
name = "expended [name]"
|
||||
log_msg += "([mutation])"
|
||||
log_attack("[log_msg] [loc_name(user)]")
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
/obj/item/book/granter/proc/turn_page(mob/user)
|
||||
playsound(user, pick('sound/effects/pageturn1.ogg','sound/effects/pageturn2.ogg','sound/effects/pageturn3.ogg'), 30, 1)
|
||||
if(do_after(user,50, user))
|
||||
if(do_after(user,50, TRUE, user))
|
||||
if(remarks.len)
|
||||
to_chat(user, "<span class='notice'>[pick(remarks)]</span>")
|
||||
else
|
||||
@@ -53,7 +53,7 @@
|
||||
on_reading_stopped()
|
||||
reading = FALSE
|
||||
return
|
||||
if(do_after(user,50, user))
|
||||
if(do_after(user,50, TRUE, user))
|
||||
on_reading_finished(user)
|
||||
reading = FALSE
|
||||
return TRUE
|
||||
@@ -294,7 +294,7 @@
|
||||
/obj/item/book/granter/spell/knock/recoil(mob/living/user)
|
||||
..()
|
||||
to_chat(user,"<span class='warning'>You're knocked down!</span>")
|
||||
user.Knockdown(40)
|
||||
user.DefaultCombatKnockdown(40)
|
||||
|
||||
/obj/item/book/granter/spell/barnyard
|
||||
spell = /obj/effect/proc_holder/spell/targeted/barnyardcurse
|
||||
@@ -402,10 +402,11 @@
|
||||
martialname = "sleeping carp"
|
||||
desc = "A scroll filled with strange markings. It seems to be drawings of some sort of martial art."
|
||||
greet = "<span class='sciradio'>You have learned the ancient martial art of the Sleeping Carp! Your hand-to-hand combat has become much more effective, and you are now able to deflect any projectiles \
|
||||
directed toward you. However, you are also unable to use any ranged weaponry. You can learn more about your newfound art by using the Recall Teachings verb in the Sleeping Carp tab.</span>"
|
||||
directed toward you while in Throw Mode. Your body is also honed to protect you from damage and punctures, and even briefly survive space. \
|
||||
However, you are also unable to use any ranged weaponry, and some medical supplies will prove useless to you. You can learn more about your newfound art by using the Recall Teachings verb in the Sleeping Carp tab.</span>"
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state = "scroll2"
|
||||
remarks = list("I must prove myself worthy to the masters of the sleeping carp...", "Stance means everything...", "Focus... And you'll be able to incapacitate any foe in seconds...", "I must pierce armor for maximum damage...", "I don't think this would combine with other martial arts...", "Grab them first so they don't retaliate...", "I must prove myself worthy of this power...")
|
||||
remarks = list("Wait, a high protein diet is really all it takes to become bulletproof...?", "Overwhelming force, immovable object...", "Focus... And you'll be able to incapacitate any foe in seconds...", "I must pierce armor for maximum damage...", "I don't think this would combine with other martial arts...", "Become one with the carp...", "Glub...")
|
||||
|
||||
/obj/item/book/granter/martial/carp/onlearned(mob/living/carbon/user)
|
||||
..()
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
M.show_message("<span class='warning'>BANG</span>", MSG_AUDIBLE)
|
||||
var/distance = get_dist(get_turf(M), source)
|
||||
if(!distance || loc == M || loc == M.loc) //Stop allahu akbarring rooms with this.
|
||||
M.Knockdown(200)
|
||||
M.DefaultCombatKnockdown(200)
|
||||
M.soundbang_act(1, 200, 10, 15)
|
||||
else
|
||||
M.soundbang_act(1, max(200/max(1,distance), 60), rand(0, 5))
|
||||
@@ -41,4 +41,4 @@
|
||||
return
|
||||
var/distance = get_dist(get_turf(M), source)
|
||||
if(M.flash_act(affect_silicon = 1))
|
||||
M.Knockdown(max(200/max(1,distance), 60))
|
||||
M.DefaultCombatKnockdown(max(200/max(1,distance), 60))
|
||||
|
||||
@@ -283,6 +283,7 @@
|
||||
if(!C.legcuffed && C.get_num_legs(FALSE) >= 2) //beartrap can't cuff your leg if there's already a beartrap or legcuffs, or you don't have two legs.
|
||||
C.legcuffed = src
|
||||
forceMove(C)
|
||||
C.update_equipment_speed_mods()
|
||||
C.update_inv_legcuffed()
|
||||
SSblackbox.record_feedback("tally", "handcuffs", 1, type)
|
||||
else if(isanimal(L))
|
||||
@@ -341,15 +342,25 @@
|
||||
/obj/item/restraints/legcuffs/bola/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
|
||||
if(..() || !iscarbon(hit_atom))//if it gets caught or the target can't be cuffed,
|
||||
return//abort
|
||||
var/mob/living/carbon/C = hit_atom
|
||||
ensnare(hit_atom)
|
||||
|
||||
/**
|
||||
* Attempts to legcuff someone with the bola
|
||||
*
|
||||
* Arguments:
|
||||
* * C - the carbon that we will try to ensnare
|
||||
*/
|
||||
/obj/item/restraints/legcuffs/bola/proc/ensnare(mob/living/carbon/C)
|
||||
if(!C.legcuffed && C.get_num_legs(FALSE) >= 2)
|
||||
visible_message("<span class='danger'>\The [src] ensnares [C]!</span>")
|
||||
C.legcuffed = src
|
||||
forceMove(C)
|
||||
C.update_equipment_speed_mods()
|
||||
C.update_inv_legcuffed()
|
||||
SSblackbox.record_feedback("tally", "handcuffs", 1, type)
|
||||
to_chat(C, "<span class='userdanger'>\The [src] ensnares you!</span>")
|
||||
C.Knockdown(knockdown)
|
||||
playsound(src, 'sound/effects/snap.ogg', 50, TRUE)
|
||||
|
||||
/obj/item/restraints/legcuffs/bola/tactical//traitor variant
|
||||
name = "reinforced bola"
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
master.emote("scream")
|
||||
master.remove_status_effect(STATUS_EFFECT_HISGRACE)
|
||||
REMOVE_TRAIT(src, TRAIT_NODROP, HIS_GRACE_TRAIT)
|
||||
master.Knockdown(60)
|
||||
master.DefaultCombatKnockdown(60)
|
||||
master.adjustBruteLoss(master.maxHealth)
|
||||
playsound(master, 'sound/effects/splat.ogg', 100, 0)
|
||||
else
|
||||
|
||||
@@ -51,43 +51,37 @@
|
||||
item_state = "knight_hospitaller"
|
||||
// CITADEL CHANGES ENDS HERE
|
||||
|
||||
/obj/item/holybeacon
|
||||
/obj/item/choice_beacon/holy
|
||||
name = "armaments beacon"
|
||||
desc = "Contains a set of armaments for the chaplain."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "gangtool-red"
|
||||
item_state = "radio"
|
||||
|
||||
/obj/item/holybeacon/attack_self(mob/user)
|
||||
if(user.mind && (user.mind.isholy) && !GLOB.holy_armor_type)
|
||||
beacon_armor(user)
|
||||
/obj/item/choice_beacon/holy/canUseBeacon(mob/living/user)
|
||||
if(user.mind && user.mind.isholy)
|
||||
return ..()
|
||||
else
|
||||
playsound(src, 'sound/machines/buzz-sigh.ogg', 40, 1)
|
||||
return FALSE
|
||||
|
||||
/obj/item/holybeacon/proc/beacon_armor(mob/M)
|
||||
var/list/holy_armor_list = typesof(/obj/item/storage/box/holy)
|
||||
var/list/display_names = list()
|
||||
for(var/V in holy_armor_list)
|
||||
var/atom/A = V
|
||||
display_names += list(initial(A.name) = A)
|
||||
/obj/item/choice_beacon/holy/generate_display_names()
|
||||
var/static/list/holy_item_list
|
||||
if(!holy_item_list)
|
||||
holy_item_list = list()
|
||||
var/list/templist = typesof(/obj/item/storage/box/holy)
|
||||
for(var/V in templist)
|
||||
var/atom/A = V
|
||||
holy_item_list[initial(A.name)] = A
|
||||
return holy_item_list
|
||||
|
||||
var/choice = input(M,"What holy armor kit would you like to order?","Holy Armor Theme") as null|anything in display_names
|
||||
var/turf/T = get_turf(M)
|
||||
if(!T || QDELETED(src) || !choice || M.stat || !in_range(M, src) || M.restrained() || !M.canmove || GLOB.holy_armor_type)
|
||||
/obj/item/choice_beacon/holy/spawn_option(obj/choice,mob/living/M)
|
||||
if(!GLOB.holy_armor_type)
|
||||
..()
|
||||
playsound(src, 'sound/effects/pray_chaplain.ogg', 40, 1)
|
||||
SSblackbox.record_feedback("tally", "chaplain_armor", 1, "[choice]")
|
||||
GLOB.holy_armor_type = choice
|
||||
else
|
||||
to_chat(M, "<span class='warning'>A selection has already been made. Self-Destructing...</span>")
|
||||
return
|
||||
|
||||
var/index = display_names.Find(choice)
|
||||
var/A = holy_armor_list[index]
|
||||
|
||||
GLOB.holy_armor_type = A
|
||||
var/holy_armor_box = new A(T)
|
||||
|
||||
SSblackbox.record_feedback("tally", "chaplain_armor", 1, "[choice]")
|
||||
|
||||
if(holy_armor_box)
|
||||
qdel(src)
|
||||
M.put_in_hands(holy_armor_box)
|
||||
|
||||
/obj/item/storage/box/holy
|
||||
name = "Templar Kit"
|
||||
|
||||
@@ -244,7 +238,7 @@
|
||||
if(user.mind && (user.mind.isholy) && !reskinned)
|
||||
reskin_holy_weapon(user)
|
||||
|
||||
/obj/item/nullrod/proc/reskin_holy_weapon(mob/M)
|
||||
/obj/item/nullrod/proc/reskin_holy_weapon(mob/living/L)
|
||||
if(GLOB.holy_weapon_type)
|
||||
return
|
||||
var/obj/item/holy_weapon
|
||||
@@ -255,8 +249,8 @@
|
||||
if (initial(rodtype.chaplain_spawnable))
|
||||
display_names[initial(rodtype.name)] = rodtype
|
||||
|
||||
var/choice = input(M,"What theme would you like for your holy weapon?","Holy Weapon Theme") as null|anything in display_names
|
||||
if(QDELETED(src) || !choice || M.stat || !in_range(M, src) || M.restrained() || !M.canmove || reskinned)
|
||||
var/choice = input(L, "What theme would you like for your holy weapon?","Holy Weapon Theme") as null|anything in display_names
|
||||
if(QDELETED(src) || !choice || !in_range(L, src) || !CHECK_MOBILITY(L, MOBILITY_USE) || reskinned)
|
||||
return
|
||||
|
||||
var/A = display_names[choice] // This needs to be on a separate var as list member access is not allowed for new
|
||||
@@ -269,7 +263,7 @@
|
||||
if(holy_weapon)
|
||||
holy_weapon.reskinned = TRUE
|
||||
qdel(src)
|
||||
M.put_in_active_hand(holy_weapon)
|
||||
L.put_in_active_hand(holy_weapon)
|
||||
|
||||
/obj/item/nullrod/proc/jedi_spin(mob/living/user)
|
||||
for(var/i in list(NORTH,SOUTH,EAST,WEST,EAST,SOUTH,NORTH,SOUTH,EAST,WEST,EAST,SOUTH))
|
||||
@@ -674,7 +668,7 @@
|
||||
add_fingerprint(user)
|
||||
if((HAS_TRAIT(user, TRAIT_CLUMSY)) && prob(50))
|
||||
to_chat(user, "<span class ='warning'>You club yourself over the head with [src].</span>")
|
||||
user.Knockdown(60)
|
||||
user.DefaultCombatKnockdown(60)
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
H.apply_damage(2*force, BRUTE, BODY_ZONE_HEAD)
|
||||
|
||||
@@ -71,8 +71,7 @@
|
||||
if(stimulant)
|
||||
if(isliving(loc))
|
||||
var/mob/living/L = loc
|
||||
L.SetStun(0)
|
||||
L.SetKnockdown(0)
|
||||
L.SetAllImmobility(0)
|
||||
L.SetSleeping(0)
|
||||
L.SetUnconscious(0)
|
||||
L.reagents.add_reagent(/datum/reagent/medicine/muscle_stimulant, CLAMP(5 - L.reagents.get_reagent_amount(/datum/reagent/medicine/muscle_stimulant), 0, 5)) //If you don't have legs or get bola'd, tough luck!
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
return
|
||||
if(message && imp_in.stat == CONSCIOUS)
|
||||
imp_in.visible_message("<span class='warning'>[imp_in] doubles over in pain!</span>")
|
||||
imp_in.Knockdown(140)
|
||||
imp_in.DefaultCombatKnockdown(140)
|
||||
|
||||
/obj/item/implant/explosive/proc/boom_goes_the_weasel()
|
||||
explosion(get_turf(imp_in ? imp_in : src), heavy, medium, weak, weak, flame_range = weak)
|
||||
|
||||
@@ -138,6 +138,12 @@
|
||||
throwforce = 15
|
||||
custom_materials = null
|
||||
|
||||
/obj/item/kitchen/knife/combat/bone/plastic
|
||||
name = "plastic knife"
|
||||
desc = "A plastic knife. Rather harmless to anything."
|
||||
force = 1
|
||||
bayonet = FALSE
|
||||
|
||||
/obj/item/kitchen/knife/combat/cyborg
|
||||
name = "cyborg knife"
|
||||
icon = 'icons/obj/items_cyborg.dmi'
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
var/brightness_on = 3
|
||||
total_mass = 0.4 //Survival flashlights typically weigh around 5 ounces.
|
||||
|
||||
|
||||
/obj/item/melee/transforming/energy/Initialize()
|
||||
. = ..()
|
||||
total_mass_on = (total_mass_on ? total_mass_on : (w_class_on * 0.75))
|
||||
@@ -107,8 +106,12 @@
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/transform_weapon(mob/living/user, supress_message_text)
|
||||
. = ..()
|
||||
if(. && active && item_color)
|
||||
icon_state = "sword[item_color]"
|
||||
if(active)
|
||||
if(. && item_color)
|
||||
icon_state = "sword[item_color]"
|
||||
AddElement(/datum/element/sword_point)
|
||||
else
|
||||
RemoveElement(/datum/element/sword_point)
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
if(active)
|
||||
@@ -267,11 +270,6 @@
|
||||
altafterattack(A, user, TRUE, params)
|
||||
return TRUE
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/cx/altafterattack(atom/target, mob/living/carbon/user, proximity_flag, click_parameters) //does right click memes
|
||||
if(istype(user))
|
||||
user.visible_message("<span class='notice'>[user] points the tip of [src] at [target].</span>", "<span class='notice'>You point the tip of [src] at [target].</span>")
|
||||
return TRUE
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/cx/transform_weapon(mob/living/user, supress_message_text)
|
||||
active = !active //I'd use a ..() here but it'd inherit from the regular esword's proc instead, so SPAGHETTI CODE
|
||||
if(active) //also I'd need to rip out the iconstate changing bits
|
||||
|
||||
@@ -73,6 +73,7 @@
|
||||
/obj/item/melee/sabre/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/butchering, 30, 95, 5) //fast and effective, but as a sword, it might damage the results.
|
||||
AddElement(/datum/element/sword_point)
|
||||
|
||||
/obj/item/melee/sabre/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
if(attack_type == PROJECTILE_ATTACK)
|
||||
@@ -180,13 +181,60 @@
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
force = 12 //9 hit crit
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
var/cooldown = 13
|
||||
var/on = TRUE
|
||||
var/last_hit = 0
|
||||
var/stun_stam_cost_coeff = 1.25
|
||||
var/hardstun_ds = 1
|
||||
var/hardstun_ds = TRUE
|
||||
var/softstun_ds = 0
|
||||
var/stam_dmg = 30
|
||||
var/cooldown_check = 0 // Used internally, you don't want to modify
|
||||
var/cooldown = 13 // Default wait time until can stun again.
|
||||
var/stun_time_silicon = 60 // How long it stuns silicons for - 6 seconds.
|
||||
var/affect_silicon = FALSE // Does it stun silicons.
|
||||
var/on_sound // "On" sound, played when switching between able to stun or not.
|
||||
var/on_stun_sound = "sound/effects/woodhit.ogg" // Default path to sound for when we stun.
|
||||
var/stun_animation = TRUE // Do we animate the "hit" when stunning.
|
||||
var/on = TRUE // Are we on or off
|
||||
var/on_icon_state // What is our sprite when turned on
|
||||
var/off_icon_state // What is our sprite when turned off
|
||||
var/on_item_state // What is our in-hand sprite when turned on
|
||||
var/force_on // Damage when on - not stunning
|
||||
var/force_off // Damage when off - not stunning
|
||||
var/weight_class_on // What is the new size class when turned on
|
||||
|
||||
/obj/item/melee/classic_baton/Initialize()
|
||||
. = ..()
|
||||
|
||||
// Description for trying to stun when still on cooldown.
|
||||
/obj/item/melee/classic_baton/proc/get_wait_description()
|
||||
return
|
||||
|
||||
// Description for when turning their baton "on"
|
||||
/obj/item/melee/classic_baton/proc/get_on_description()
|
||||
. = list()
|
||||
.["local_on"] = "<span class ='warning'>You extend the baton.</span>"
|
||||
.["local_off"] = "<span class ='notice'>You collapse the baton.</span>"
|
||||
return .
|
||||
|
||||
// Default message for stunning mob.
|
||||
/obj/item/melee/classic_baton/proc/get_stun_description(mob/living/target, mob/living/user)
|
||||
. = list()
|
||||
.["visible"] = "<span class ='danger'>[user] has knocked down [target] with [src]!</span>"
|
||||
.["local"] = "<span class ='danger'>[user] has knocked down [target] with [src]!</span>"
|
||||
return .
|
||||
|
||||
// Default message for stunning a silicon.
|
||||
/obj/item/melee/classic_baton/proc/get_silicon_stun_description(mob/living/target, mob/living/user)
|
||||
. = list()
|
||||
.["visible"] = "<span class='danger'>[user] pulses [target]'s sensors with the baton!</span>"
|
||||
.["local"] = "<span class='danger'>You pulse [target]'s sensors with the baton!</span>"
|
||||
return .
|
||||
|
||||
// Are we applying any special effects when we stun to carbon
|
||||
/obj/item/melee/classic_baton/proc/additional_effects_carbon(mob/living/target, mob/living/user)
|
||||
return
|
||||
|
||||
// Are we applying any special effects when we stun to silicon
|
||||
/obj/item/melee/classic_baton/proc/additional_effects_silicon(mob/living/target, mob/living/user)
|
||||
return
|
||||
|
||||
/obj/item/melee/classic_baton/attack(mob/living/target, mob/living/user)
|
||||
if(!on)
|
||||
@@ -199,7 +247,7 @@
|
||||
add_fingerprint(user)
|
||||
if((HAS_TRAIT(user, TRAIT_CLUMSY)) && prob(50))
|
||||
to_chat(user, "<span class ='danger'>You club yourself over the head.</span>")
|
||||
user.Knockdown(60 * force)
|
||||
user.DefaultCombatKnockdown(60 * force)
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
H.apply_damage(2*force, BRUTE, BODY_ZONE_HEAD)
|
||||
@@ -207,15 +255,28 @@
|
||||
user.take_bodypart_damage(2*force)
|
||||
return
|
||||
if(iscyborg(target))
|
||||
..()
|
||||
if(user.a_intent != INTENT_HARM) // We don't stun if we're on harm.
|
||||
if(affect_silicon)
|
||||
var/list/desc = get_silicon_stun_description(target, user)
|
||||
target.flash_act(affect_silicon = TRUE)
|
||||
target.Stun(stun_time_silicon)
|
||||
additional_effects_silicon(target, user)
|
||||
user.visible_message(desc["visible"], desc["local"])
|
||||
playsound(get_turf(src), on_stun_sound, 100, TRUE, -1)
|
||||
if(stun_animation)
|
||||
user.do_attack_animation(target)
|
||||
else
|
||||
..()
|
||||
else
|
||||
..()
|
||||
return
|
||||
if(!isliving(target))
|
||||
return
|
||||
if (user.a_intent == INTENT_HARM)
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
if(!..() || !iscyborg(target))
|
||||
return
|
||||
else
|
||||
if(last_hit < world.time)
|
||||
if(cooldown_check < world.time)
|
||||
if(target.check_shields(src, 0, "[user]'s [name]", MELEE_ATTACK))
|
||||
playsound(target, 'sound/weapons/genhit.ogg', 50, 1)
|
||||
return
|
||||
@@ -223,18 +284,25 @@
|
||||
var/mob/living/carbon/human/H = target
|
||||
if(check_martial_counter(H, user))
|
||||
return
|
||||
playsound(get_turf(src), 'sound/effects/woodhit.ogg', 75, 1, -1)
|
||||
target.Knockdown(softstun_ds, TRUE, FALSE, hardstun_ds, stam_dmg)
|
||||
var/list/desc = get_stun_description(target, user)
|
||||
if(stun_animation)
|
||||
user.do_attack_animation(target)
|
||||
playsound(get_turf(src), on_stun_sound, 75, 1, -1)
|
||||
target.DefaultCombatKnockdown(softstun_ds, TRUE, FALSE, hardstun_ds, stam_dmg)
|
||||
additional_effects_carbon(target, user)
|
||||
log_combat(user, target, "stunned", src)
|
||||
src.add_fingerprint(user)
|
||||
target.visible_message("<span class ='danger'>[user] has knocked down [target] with [src]!</span>", \
|
||||
"<span class ='userdanger'>[user] has knocked down [target] with [src]!</span>")
|
||||
add_fingerprint(user)
|
||||
target.visible_message(desc["visible"], desc["local"])
|
||||
if(!iscarbon(user))
|
||||
target.LAssailant = null
|
||||
else
|
||||
target.LAssailant = user
|
||||
last_hit = world.time + cooldown
|
||||
target.LAssailant = WEAKREF(user)
|
||||
cooldown_check = world.time + cooldown
|
||||
user.adjustStaminaLossBuffered(getweight())//CIT CHANGE - makes swinging batons cost stamina
|
||||
else
|
||||
var/wait_desc = get_wait_description()
|
||||
if(wait_desc)
|
||||
to_chat(user, wait_desc)
|
||||
|
||||
/obj/item/melee/classic_baton/telescopic
|
||||
name = "telescopic baton"
|
||||
@@ -249,6 +317,13 @@
|
||||
item_flags = NONE
|
||||
force = 0
|
||||
on = FALSE
|
||||
on_sound = 'sound/weapons/batonextend.ogg'
|
||||
on_icon_state = "telebaton_1"
|
||||
off_icon_state = "telebaton_0"
|
||||
on_item_state = "nullrod"
|
||||
force_on = 10
|
||||
force_off = 0
|
||||
weight_class_on = WEIGHT_CLASS_BULKY
|
||||
total_mass = TOTAL_MASS_NORMAL_ITEM
|
||||
|
||||
/obj/item/melee/classic_baton/telescopic/suicide_act(mob/user)
|
||||
@@ -259,7 +334,7 @@
|
||||
if(!on)
|
||||
src.attack_self(user)
|
||||
else
|
||||
playsound(loc, 'sound/weapons/batonextend.ogg', 50, 1)
|
||||
playsound(loc, on_sound, 50, 1)
|
||||
add_fingerprint(user)
|
||||
sleep(3)
|
||||
if (H && !QDELETED(H))
|
||||
@@ -271,25 +346,57 @@
|
||||
|
||||
/obj/item/melee/classic_baton/telescopic/attack_self(mob/user)
|
||||
on = !on
|
||||
var/list/desc = get_on_description()
|
||||
if(on)
|
||||
to_chat(user, "<span class ='warning'>You extend the baton.</span>")
|
||||
icon_state = "telebaton_1"
|
||||
item_state = "nullrod"
|
||||
w_class = WEIGHT_CLASS_BULKY //doesnt fit in backpack when its on for balance
|
||||
force = 10 //stunbaton damage
|
||||
to_chat(user, desc["local_on"])
|
||||
icon_state = on_icon_state
|
||||
item_state = on_item_state
|
||||
w_class = weight_class_on
|
||||
force = force_on
|
||||
attack_verb = list("smacked", "struck", "cracked", "beaten")
|
||||
else
|
||||
to_chat(user, "<span class ='notice'>You collapse the baton.</span>")
|
||||
icon_state = "telebaton_0"
|
||||
to_chat(user, desc["local_off"])
|
||||
icon_state = off_icon_state
|
||||
item_state = null //no sprite for concealment even when in hand
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
force = 0 //not so robust now
|
||||
force = force_off
|
||||
attack_verb = list("hit", "poked")
|
||||
|
||||
playsound(src.loc, 'sound/weapons/batonextend.ogg', 50, 1)
|
||||
playsound(src.loc, on_sound, 50, 1)
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/melee/classic_baton/telescopic/contractor_baton
|
||||
name = "contractor baton"
|
||||
desc = "A compact, specialised baton assigned to Syndicate contractors. Applies light electrical shocks to targets."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "contractor_baton_0"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi'
|
||||
item_state = null
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
item_flags = NONE
|
||||
force = 5
|
||||
cooldown = 20
|
||||
stam_dmg = 45 //4 hit stamcrit
|
||||
affect_silicon = TRUE
|
||||
on_sound = 'sound/weapons/contractorbatonextend.ogg'
|
||||
on_stun_sound = 'sound/effects/contractorbatonhit.ogg'
|
||||
on_icon_state = "contractor_baton_1"
|
||||
off_icon_state = "contractor_baton_0"
|
||||
on_item_state = "contractor_baton"
|
||||
force_on = 16
|
||||
force_off = 5
|
||||
weight_class_on = WEIGHT_CLASS_NORMAL
|
||||
|
||||
/obj/item/melee/classic_baton/telescopic/contractor_baton/get_wait_description()
|
||||
return "<span class='danger'>The baton is still charging!</span>"
|
||||
|
||||
/obj/item/melee/classic_baton/telescopic/contractor_baton/additional_effects_carbon(mob/living/target, mob/living/user)
|
||||
target.Jitter(20)
|
||||
target.apply_effect(EFFECT_STUTTER, 20)
|
||||
target.apply_status_effect(/datum/status_effect/electrostaff, 30) //knockdown, disarm, and slowdown, the unholy triumvirate of stam combat
|
||||
|
||||
/obj/item/melee/supermatter_sword
|
||||
name = "supermatter sword"
|
||||
desc = "In a station full of bad ideas, this might just be the worst."
|
||||
@@ -514,7 +621,7 @@
|
||||
item_state = "mace_greyscale"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi'
|
||||
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR //Material type changes the prefix as well as the color.
|
||||
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS //Material type changes the prefix as well as the color.
|
||||
custom_materials = list(/datum/material/iron = 12000) //Defaults to an Iron Mace.
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
force = 14
|
||||
|
||||
@@ -12,6 +12,95 @@
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
attack_verb = list("warned", "cautioned", "smashed")
|
||||
|
||||
/obj/item/choice_beacon
|
||||
name = "choice beacon"
|
||||
desc = "Hey, why are you viewing this?!! Please let Centcom know about this odd occurance."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "gangtool-blue"
|
||||
item_state = "radio"
|
||||
|
||||
/obj/item/choice_beacon/attack_self(mob/user)
|
||||
if(canUseBeacon(user))
|
||||
generate_options(user)
|
||||
|
||||
/obj/item/choice_beacon/proc/generate_display_names() // return the list that will be used in the choice selection. entries should be in (type.name = type) fashion. see choice_beacon/hero for how this is done.
|
||||
return list()
|
||||
|
||||
/obj/item/choice_beacon/proc/canUseBeacon(mob/living/user)
|
||||
if(user.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
return TRUE
|
||||
else
|
||||
playsound(src, 'sound/machines/buzz-sigh.ogg', 40, 1)
|
||||
return FALSE
|
||||
|
||||
/obj/item/choice_beacon/proc/generate_options(mob/living/M)
|
||||
var/list/display_names = generate_display_names()
|
||||
if(!display_names.len)
|
||||
return
|
||||
var/choice = input(M,"Which item would you like to order?","Select an Item") as null|anything in display_names
|
||||
if(!choice || !M.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
return
|
||||
|
||||
spawn_option(display_names[choice],M)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/choice_beacon/proc/spawn_option(obj/choice,mob/living/M)
|
||||
var/obj/new_item = new choice()
|
||||
var/obj/structure/closet/supplypod/bluespacepod/pod = new()
|
||||
pod.explosionSize = list(0,0,0,0)
|
||||
new_item.forceMove(pod)
|
||||
var/msg = "<span class='danger'>After making your selection, you notice a strange target on the ground. It might be best to step back!</span>"
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(istype(H.ears, /obj/item/radio/headset))
|
||||
msg = "You hear something crackle in your ears for a moment before a voice speaks. \"Please stand by for a message from Central Command. Message as follows: <span class='bold'>Item request received. Your package is inbound, please stand back from the landing site.</span> Message ends.\""
|
||||
to_chat(M, msg)
|
||||
|
||||
new /obj/effect/abstract/DPtarget(get_turf(src), pod)
|
||||
|
||||
/obj/item/choice_beacon/hero
|
||||
name = "heroic beacon"
|
||||
desc = "To summon heroes from the past to protect the future."
|
||||
|
||||
/obj/item/choice_beacon/hero/generate_display_names()
|
||||
var/static/list/hero_item_list
|
||||
if(!hero_item_list)
|
||||
hero_item_list = list()
|
||||
var/list/templist = typesof(/obj/item/storage/box/hero) //we have to convert type = name to name = type, how lovely!
|
||||
for(var/V in templist)
|
||||
var/atom/A = V
|
||||
hero_item_list[initial(A.name)] = A
|
||||
return hero_item_list
|
||||
|
||||
|
||||
/obj/item/storage/box/hero
|
||||
name = "Courageous Tomb Raider - 1940's."
|
||||
|
||||
/obj/item/storage/box/hero/PopulateContents()
|
||||
new /obj/item/clothing/head/fedora/curator(src)
|
||||
new /obj/item/clothing/suit/curator(src)
|
||||
new /obj/item/clothing/under/rank/curator/treasure_hunter(src)
|
||||
new /obj/item/clothing/shoes/workboots/mining(src)
|
||||
new /obj/item/melee/curator_whip(src)
|
||||
|
||||
/obj/item/storage/box/hero/astronaut
|
||||
name = "First Man on the Moon - 1960's."
|
||||
|
||||
/obj/item/storage/box/hero/astronaut/PopulateContents()
|
||||
new /obj/item/clothing/suit/space/nasavoid(src)
|
||||
new /obj/item/clothing/head/helmet/space/nasavoid(src)
|
||||
new /obj/item/tank/internals/emergency_oxygen/double(src)
|
||||
new /obj/item/gps(src)
|
||||
|
||||
/obj/item/storage/box/hero/scottish
|
||||
name = "Braveheart, the Scottish rebel - 1300's."
|
||||
|
||||
/obj/item/storage/box/hero/scottish/PopulateContents()
|
||||
new /obj/item/clothing/under/kilt(src)
|
||||
new /obj/item/claymore/weak/ceremonial(src)
|
||||
new /obj/item/toy/crayon/spraycan(src)
|
||||
new /obj/item/clothing/shoes/sandal(src)
|
||||
|
||||
/obj/item/skub
|
||||
desc = "It's skub."
|
||||
name = "skub"
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
var/active = FALSE
|
||||
var/atom/movable/target //The thing we're searching for
|
||||
var/minimum_range = 0 //at what range the pinpointer declares you to be at your destination
|
||||
var/ignore_suit_sensor_level = FALSE // Do we find people even if their suit sensors are turned off
|
||||
var/alert = FALSE // TRUE to display things more seriously
|
||||
|
||||
/obj/item/pinpointer/Initialize()
|
||||
@@ -77,6 +78,8 @@
|
||||
name = "crew pinpointer"
|
||||
desc = "A handheld tracking device that points to crew suit sensors."
|
||||
icon_state = "pinpointer_crew"
|
||||
var/has_owner = FALSE
|
||||
var/pinpointer_owner = null
|
||||
|
||||
/obj/item/pinpointer/crew/proc/trackable(mob/living/carbon/human/H)
|
||||
var/turf/here = get_turf(src)
|
||||
@@ -84,7 +87,7 @@
|
||||
var/obj/item/clothing/under/U = H.w_uniform
|
||||
|
||||
// Suit sensors must be on maximum.
|
||||
if(!U.has_sensor || U.sensor_mode < SENSOR_COORDS)
|
||||
if(!U.has_sensor || U.sensor_mode < SENSOR_COORDS && !ignore_suit_sensor_level)
|
||||
return FALSE
|
||||
|
||||
var/turf/there = get_turf(H)
|
||||
@@ -101,7 +104,11 @@
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if (has_owner && !pinpointer_owner)
|
||||
pinpointer_owner = user
|
||||
if (pinpointer_owner && pinpointer_owner != user)
|
||||
to_chat(user, "<span class='notice'>The pinpointer doesn't respond. It seems to only recognise its owner.</span>")
|
||||
return
|
||||
var/list/name_counts = list()
|
||||
var/list/names = list()
|
||||
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
if(pressureSetting >= 3 && iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
C.visible_message("<span class='warning'>[C] is thrown down by the force of the cannon!</span>", "<span class='userdanger'>[src] slams into your shoulder, knocking you down!")
|
||||
C.Knockdown(60)
|
||||
C.DefaultCombatKnockdown(60)
|
||||
|
||||
/obj/item/pneumatic_cannon/proc/fire_items(turf/target, mob/user)
|
||||
if(fire_mode == PCANNON_FIREALL)
|
||||
|
||||
@@ -64,8 +64,7 @@
|
||||
/obj/item/banner/proc/inspiration(mob/living/carbon/human/H)
|
||||
H.adjustBruteLoss(-15)
|
||||
H.adjustFireLoss(-15)
|
||||
H.AdjustStun(-40)
|
||||
H.AdjustKnockdown(-40)
|
||||
H.AdjustAllImmobility(-40)
|
||||
H.AdjustUnconscious(-40)
|
||||
playsound(H, 'sound/magic/staff_healing.ogg', 25, FALSE)
|
||||
|
||||
@@ -315,3 +314,9 @@
|
||||
desc = "This one is rusted."
|
||||
force = 30
|
||||
armour_penetration = 15
|
||||
|
||||
/obj/item/claymore/weak/ceremonial
|
||||
desc = "A rusted claymore, once at the heart of a powerful scottish clan struck down and oppressed by tyrants, it has been passed down the ages as a symbol of defiance."
|
||||
force = 15
|
||||
block_chance = 30
|
||||
armour_penetration = 5
|
||||
@@ -20,7 +20,7 @@
|
||||
return
|
||||
|
||||
user.do_attack_animation(M)
|
||||
M.Knockdown(100)
|
||||
M.DefaultCombatKnockdown(100)
|
||||
M.apply_effect(EFFECT_STUTTER, 5)
|
||||
|
||||
M.visible_message("<span class='danger'>[user] has prodded [M] with [src]!</span>", \
|
||||
@@ -81,8 +81,7 @@
|
||||
user.visible_message("<span class='notice'>[user] hugs [M] to make [M.p_them()] feel better!</span>", \
|
||||
"<span class='notice'>You hug [M] to make [M.p_them()] feel better!</span>")
|
||||
if(M.resting && !M.recoveringstam)
|
||||
M.resting = FALSE
|
||||
M.update_canmove()
|
||||
M.set_resting(FALSE, TRUE)
|
||||
else
|
||||
user.visible_message("<span class='notice'>[user] pets [M]!</span>", \
|
||||
"<span class='notice'>You pet [M]!</span>")
|
||||
@@ -100,9 +99,8 @@
|
||||
else
|
||||
user.visible_message("<span class='warning'>[user] hugs [M] in a firm bear-hug! [M] looks uncomfortable...</span>", \
|
||||
"<span class='warning'>You hug [M] firmly to make [M.p_them()] feel better! [M] looks uncomfortable...</span>")
|
||||
if(M.resting && !M.recoveringstam)
|
||||
M.resting = FALSE
|
||||
M.update_canmove()
|
||||
if(!CHECK_MOBILITY(M, MOBILITY_STAND) && !M.recoveringstam)
|
||||
M.set_resting(FALSE, TRUE)
|
||||
else
|
||||
user.visible_message("<span class='warning'>[user] bops [M] on the head!</span>", \
|
||||
"<span class='warning'>You bop [M] on the head!</span>")
|
||||
@@ -111,10 +109,9 @@
|
||||
if(scooldown < world.time)
|
||||
if(M.health >= 0)
|
||||
if(ishuman(M)||ismonkey(M))
|
||||
M.electrocute_act(5, "[user]", safety = 1)
|
||||
M.electrocute_act(5, "[user]", flags = SHOCK_NOGLOVES)
|
||||
user.visible_message("<span class='userdanger'>[user] electrocutes [M] with [user.p_their()] touch!</span>", \
|
||||
"<span class='danger'>You electrocute [M] with your touch!</span>")
|
||||
M.update_canmove()
|
||||
else
|
||||
if(!iscyborg(M))
|
||||
M.adjustFireLoss(10)
|
||||
@@ -326,7 +323,7 @@
|
||||
C.stuttering += 10
|
||||
C.Jitter(10)
|
||||
if(2)
|
||||
C.Knockdown(40)
|
||||
C.DefaultCombatKnockdown(40)
|
||||
C.confused += 10
|
||||
C.stuttering += 15
|
||||
C.Jitter(25)
|
||||
@@ -360,7 +357,7 @@
|
||||
/obj/item/borg/lollipop/equipped()
|
||||
check_amount()
|
||||
|
||||
/obj/item/borg/lollipop/dropped()
|
||||
/obj/item/borg/lollipop/dropped(mob/user)
|
||||
check_amount()
|
||||
|
||||
/obj/item/borg/lollipop/proc/check_amount() //Doesn't even use processing ticks.
|
||||
@@ -623,7 +620,7 @@
|
||||
return host.loc
|
||||
return null
|
||||
|
||||
/obj/item/borg/projectile_dampen/dropped()
|
||||
/obj/item/borg/projectile_dampen/dropped(mob/user)
|
||||
. = ..()
|
||||
host = loc
|
||||
|
||||
|
||||
@@ -317,8 +317,7 @@
|
||||
O.robot_suit = src
|
||||
|
||||
if(!locomotion)
|
||||
O.lockcharge = 1
|
||||
O.update_canmove()
|
||||
O.SetLockdown(TRUE)
|
||||
to_chat(O, "<span class='warning'>Error: Servo motors unresponsive.</span>")
|
||||
|
||||
else
|
||||
@@ -356,8 +355,7 @@
|
||||
forceMove(O)
|
||||
O.robot_suit = src
|
||||
if(!locomotion)
|
||||
O.lockcharge = TRUE
|
||||
O.update_canmove()
|
||||
O.SetLockdown(TRUE)
|
||||
|
||||
else if(istype(W, /obj/item/pen))
|
||||
to_chat(user, "<span class='warning'>You need to use a multitool to name [src]!</span>")
|
||||
|
||||
@@ -577,7 +577,7 @@
|
||||
return FALSE
|
||||
|
||||
R.notransform = TRUE
|
||||
var/prev_lockcharge = R.lockcharge
|
||||
var/prev_locked_down = R.locked_down
|
||||
R.SetLockdown(1)
|
||||
R.anchored = TRUE
|
||||
var/datum/effect_system/smoke_spread/smoke = new
|
||||
@@ -587,7 +587,7 @@
|
||||
for(var/i in 1 to 4)
|
||||
playsound(R, pick('sound/items/drill_use.ogg', 'sound/items/jaws_cut.ogg', 'sound/items/jaws_pry.ogg', 'sound/items/welder.ogg', 'sound/items/ratchet.ogg'), 80, 1, -1)
|
||||
sleep(12)
|
||||
if(!prev_lockcharge)
|
||||
if(!prev_locked_down)
|
||||
R.SetLockdown(0)
|
||||
R.anchored = FALSE
|
||||
R.notransform = FALSE
|
||||
|
||||
@@ -237,3 +237,19 @@
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
item_flags = SLOWS_WHILE_IN_HAND
|
||||
transparent = FALSE
|
||||
|
||||
/obj/item/shield/riot/implant
|
||||
name = "riot tower shield"
|
||||
desc = "A massive shield that can block a lot of attacks and can take a lot of abuse before breaking." //It cant break unless it is removed from the implant
|
||||
item_state = "metal"
|
||||
icon_state = "metal"
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
block_chance = 30 //May be big but hard to move around to block.
|
||||
slowdown = 1
|
||||
transparent = FALSE
|
||||
item_flags = SLOWS_WHILE_IN_HAND
|
||||
|
||||
/obj/item/shield/riot/implant/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
if(attack_type == PROJECTILE_ATTACK)
|
||||
final_block_chance = 60 //Massive shield
|
||||
return ..()
|
||||
|
||||
@@ -33,6 +33,12 @@ GLOBAL_LIST_INIT(metal_recipes, list ( \
|
||||
new /datum/stack_recipe("sofa (corner)", /obj/structure/chair/sofa/corner, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
)), \
|
||||
//END OF CIT CHANGES
|
||||
new/datum/stack_recipe_list("fancy sofas", list( \
|
||||
new /datum/stack_recipe("sofa (middle)", /obj/structure/chair/sofa/corp, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new /datum/stack_recipe("sofa (left)", /obj/structure/chair/sofa/corp/left, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new /datum/stack_recipe("sofa (right)", /obj/structure/chair/sofa/corp/right, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new /datum/stack_recipe("sofa (corner)", /obj/structure/chair/sofa/corp/corner, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
)), \
|
||||
null, \
|
||||
new/datum/stack_recipe_list("office chairs", list( \
|
||||
new/datum/stack_recipe("dark office chair", /obj/structure/chair/office/dark, 5, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
@@ -42,8 +48,10 @@ GLOBAL_LIST_INIT(metal_recipes, list ( \
|
||||
new/datum/stack_recipe("beige comfy chair", /obj/structure/chair/comfy/beige, 2, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("black comfy chair", /obj/structure/chair/comfy/black, 2, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("brown comfy chair", /obj/structure/chair/comfy/brown, 2, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("green comfy chair", /obj/structure/chair/comfy/green, 2, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("lime comfy chair", /obj/structure/chair/comfy/lime, 2, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("teal comfy chair", /obj/structure/chair/comfy/teal, 2, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("purple comfy chair", /obj/structure/chair/comfy/purple, 2, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
)), \
|
||||
null, \
|
||||
new/datum/stack_recipe("rack parts", /obj/item/rack_parts), \
|
||||
@@ -96,6 +104,21 @@ GLOBAL_LIST_INIT(metal_recipes, list ( \
|
||||
new/datum/stack_recipe("extinguisher cabinet frame", /obj/item/wallframe/extinguisher_cabinet, 2), \
|
||||
new/datum/stack_recipe("button frame", /obj/item/wallframe/button, 1), \
|
||||
null, \
|
||||
new /datum/stack_recipe_list("chess pieces", list( \
|
||||
new /datum/stack_recipe("White Pawn", /obj/structure/chess/whitepawn, 2, time = 10, one_per_turf = 1, on_floor = 1), \
|
||||
new /datum/stack_recipe("White Rook", /obj/structure/chess/whiterook, 2, time = 10, one_per_turf = 1, on_floor = 1), \
|
||||
new /datum/stack_recipe("White Knight", /obj/structure/chess/whiteknight, 2, time = 10, one_per_turf = 1, on_floor = 1), \
|
||||
new /datum/stack_recipe("White Bishop", /obj/structure/chess/whitebishop, 2, time = 10, one_per_turf = 1, on_floor = 1), \
|
||||
new /datum/stack_recipe("White Queen", /obj/structure/chess/whitequeen, 2, time = 10, one_per_turf = 1, on_floor = 1), \
|
||||
new /datum/stack_recipe("White King", /obj/structure/chess/whiteking, 2, time = 10, one_per_turf = 1, on_floor = 1), \
|
||||
new /datum/stack_recipe("Black Pawn", /obj/structure/chess/blackpawn, 2, time = 10, one_per_turf = 1, on_floor = 1), \
|
||||
new /datum/stack_recipe("Black Rook", /obj/structure/chess/blackrook, 2, time = 10, one_per_turf = 1, on_floor = 1), \
|
||||
new /datum/stack_recipe("Black Knight", /obj/structure/chess/blackknight, 2, time = 10, one_per_turf = 1, on_floor = 1), \
|
||||
new /datum/stack_recipe("Black Bishop", /obj/structure/chess/blackbishop, 2, time = 10, one_per_turf = 1, on_floor = 1), \
|
||||
new /datum/stack_recipe("Black Queen", /obj/structure/chess/blackqueen, 2, time = 10, one_per_turf = 1, on_floor = 1), \
|
||||
new /datum/stack_recipe("Black King", /obj/structure/chess/blackking, 2, time = 10, one_per_turf = 1, on_floor = 1), \
|
||||
)), \
|
||||
null, \
|
||||
new/datum/stack_recipe("iron door", /obj/structure/mineral_door/iron, 20, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
new/datum/stack_recipe("floodlight frame", /obj/structure/floodlight_frame, 5, one_per_turf = TRUE, on_floor = TRUE), \
|
||||
))
|
||||
@@ -206,6 +229,7 @@ GLOBAL_LIST_INIT(wood_recipes, list ( \
|
||||
null, \
|
||||
new/datum/stack_recipe("rifle stock", /obj/item/weaponcrafting/stock, 10, time = 40), \
|
||||
new/datum/stack_recipe("rolling pin", /obj/item/kitchen/rollingpin, 2, time = 30), \
|
||||
new/datum/stack_recipe("wooden bucket", /obj/item/reagent_containers/glass/bucket/wood, 2, time = 30), \
|
||||
new/datum/stack_recipe("wooden buckler", /obj/item/shield/riot/buckler, 20, time = 40), \
|
||||
new/datum/stack_recipe("baseball bat", /obj/item/melee/baseball_bat, 5, time = 15),\
|
||||
null, \
|
||||
@@ -347,6 +371,7 @@ GLOBAL_LIST_INIT(cloth_recipes, list ( \
|
||||
new/datum/stack_recipe("black gloves", /obj/item/clothing/gloves/color/black, 3), \
|
||||
null, \
|
||||
new/datum/stack_recipe("blindfold", /obj/item/clothing/glasses/sunglasses/blindfold, 2), \
|
||||
null, \
|
||||
))
|
||||
|
||||
/obj/item/stack/sheet/cloth
|
||||
@@ -439,6 +464,7 @@ GLOBAL_LIST_INIT(cardboard_recipes, list ( \
|
||||
new /datum/stack_recipe("egg box", /obj/item/storage/fancy/egg_box), \
|
||||
new /datum/stack_recipe("donk-pockets box", /obj/item/storage/box/donkpockets), \
|
||||
new /datum/stack_recipe("monkey cube box", /obj/item/storage/box/monkeycubes), \
|
||||
new /datum/stack_recipe("nugget box", /obj/item/storage/fancy/nugget_box), \
|
||||
new /datum/stack_recipe("box (internals)", /obj/item/storage/box/otwo), \
|
||||
null, \
|
||||
new /datum/stack_recipe("security-styled box", /obj/item/storage/box/seclooking), \
|
||||
@@ -738,6 +764,7 @@ GLOBAL_LIST_INIT(plastic_recipes, list(
|
||||
new /datum/stack_recipe("opaque plastic flaps", /obj/structure/plasticflaps/opaque, 5, one_per_turf = TRUE, on_floor = TRUE, time = 40), \
|
||||
new /datum/stack_recipe("water bottle", /obj/item/reagent_containers/glass/beaker/waterbottle/empty), \
|
||||
new /datum/stack_recipe("large water bottle", /obj/item/reagent_containers/glass/beaker/waterbottle/large/empty,3), \
|
||||
new /datum/stack_recipe("shower curtain", /obj/structure/curtain, 10, time = 10, one_per_turf = 1, on_floor = 1), \
|
||||
new /datum/stack_recipe("wet floor sign", /obj/item/caution, 2)))
|
||||
|
||||
/obj/item/stack/sheet/plastic
|
||||
@@ -790,6 +817,7 @@ new /datum/stack_recipe("paper frame door", /obj/structure/mineral_door/paperfra
|
||||
/obj/item/stack/sheet/cotton
|
||||
name = "raw cotton bundle"
|
||||
desc = "A bundle of raw cotton ready to be spun on the loom."
|
||||
max_amount = 80
|
||||
singular_name = "raw cotton ball"
|
||||
icon_state = "sheet-cotton"
|
||||
is_fabric = TRUE
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
merge_type = type
|
||||
if(custom_materials && custom_materials.len)
|
||||
for(var/i in custom_materials)
|
||||
custom_materials[getmaterialref(i)] = mats_per_stack * amount
|
||||
custom_materials[SSmaterials.GetMaterialRef(i)] = mats_per_stack * amount
|
||||
. = ..()
|
||||
if(merge)
|
||||
for(var/obj/item/stack/S in loc)
|
||||
@@ -57,7 +57,7 @@
|
||||
var/list/temp_recipes = get_main_recipes()
|
||||
recipes = temp_recipes.Copy()
|
||||
if(material_type)
|
||||
var/datum/material/M = getmaterialref(material_type) //First/main material
|
||||
var/datum/material/M = SSmaterials.GetMaterialRef(material_type) //First/main material
|
||||
for(var/i in M.categories)
|
||||
switch(i)
|
||||
if(MAT_CATEGORY_RIGID)
|
||||
@@ -225,7 +225,7 @@
|
||||
if(R.applies_mats && custom_materials && custom_materials.len)
|
||||
var/list/used_materials = list()
|
||||
for(var/i in custom_materials)
|
||||
used_materials[getmaterialref(i)] = R.req_amount / R.res_amount * (MINERAL_MATERIAL_AMOUNT / custom_materials.len)
|
||||
used_materials[SSmaterials.GetMaterialRef(i)] = R.req_amount / R.res_amount * (MINERAL_MATERIAL_AMOUNT / custom_materials.len)
|
||||
O.set_custom_materials(used_materials)
|
||||
|
||||
//START: oh fuck i'm so sorry
|
||||
@@ -347,7 +347,7 @@
|
||||
src.amount += amount
|
||||
if(custom_materials && custom_materials.len)
|
||||
for(var/i in custom_materials)
|
||||
custom_materials[getmaterialref(i)] = MINERAL_MATERIAL_AMOUNT * src.amount
|
||||
custom_materials[SSmaterials.GetMaterialRef(i)] = MINERAL_MATERIAL_AMOUNT * src.amount
|
||||
set_custom_materials() //Refresh
|
||||
update_icon()
|
||||
update_weight()
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
RegisterSignal(user, COMSIG_MOVABLE_MOVED, .proc/Pickup_ores)
|
||||
listeningTo = user
|
||||
|
||||
/obj/item/storage/bag/ore/dropped()
|
||||
/obj/item/storage/bag/ore/dropped(mob/user)
|
||||
. = ..()
|
||||
if(listeningTo)
|
||||
UnregisterSignal(listeningTo, COMSIG_MOVABLE_MOVED)
|
||||
@@ -246,7 +246,8 @@
|
||||
set name = "Activate Seed Extraction"
|
||||
set category = "Object"
|
||||
set desc = "Activate to convert your plants into plantable seeds."
|
||||
if(usr.stat || !usr.canmove || usr.restrained())
|
||||
var/mob/living/L = usr
|
||||
if(istype(L) && !CHECK_MOBILITY(L, MOBILITY_USE))
|
||||
return
|
||||
for(var/obj/item/O in contents)
|
||||
seedify(O, 1)
|
||||
@@ -353,7 +354,7 @@
|
||||
|
||||
if(ishuman(M) || ismonkey(M))
|
||||
if(prob(10))
|
||||
M.Knockdown(40)
|
||||
M.DefaultCombatKnockdown(40)
|
||||
update_icon()
|
||||
|
||||
/obj/item/storage/bag/tray/update_overlays()
|
||||
|
||||
@@ -1333,7 +1333,7 @@
|
||||
/obj/item/storage/box/beakers/bluespace=1,\
|
||||
/obj/item/storage/box/beakers/variety=1,\
|
||||
/obj/item/storage/box/material=1,\
|
||||
/obj/item/storage/belt/medical/surgery_belt_adv
|
||||
/obj/item/storage/belt/medical/surgery_belt_adv=1
|
||||
)
|
||||
generate_items_inside(items_inside, src)
|
||||
|
||||
|
||||
@@ -170,7 +170,7 @@
|
||||
. = ..()
|
||||
if(!fancy_open || !contents.len)
|
||||
return
|
||||
. *= "[icon_state]_open"
|
||||
. += "[icon_state]_open"
|
||||
var/cig_position = 1
|
||||
for(var/C in contents)
|
||||
var/mutable_appearance/inserted_overlay = mutable_appearance(icon)
|
||||
@@ -357,6 +357,20 @@
|
||||
STR.max_items = 8
|
||||
STR.can_hold = typecacheof(list(/obj/item/reagent_containers/food/snacks/tinychocolate))
|
||||
|
||||
/obj/item/storage/fancy/nugget_box
|
||||
name = "nugget box"
|
||||
desc = "A cardboard box used for holding chicken nuggies."
|
||||
icon = 'icons/obj/food/containers.dmi'
|
||||
icon_state = "nuggetbox"
|
||||
icon_type = "nugget"
|
||||
spawn_type = /obj/item/reagent_containers/food/snacks/nugget
|
||||
|
||||
/obj/item/storage/fancy/nugget_box/ComponentInitialize()
|
||||
. = ..()
|
||||
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
|
||||
STR.max_items = 6
|
||||
STR.can_hold = typecacheof(list(/obj/item/reagent_containers/food/snacks/nugget))
|
||||
|
||||
/*
|
||||
* Ring Box
|
||||
*/
|
||||
|
||||
@@ -397,3 +397,96 @@
|
||||
/obj/item/storage/box/syndie_kit/revolver/PopulateContents()
|
||||
new /obj/item/gun/ballistic/revolver(src)
|
||||
new /obj/item/ammo_box/a357(src)
|
||||
|
||||
/obj/item/storage/box/syndie_kit/contract_kit
|
||||
name = "contractor kit"
|
||||
desc = "Supplied to Syndicate contractors in active mission areas."
|
||||
|
||||
/obj/item/storage/box/syndicate/contractor_loadout
|
||||
name = "standard loadout"
|
||||
desc = "Supplied to Syndicate contractors, providing their specialised space suit and chameleon uniform."
|
||||
icon_state = "syndiebox"
|
||||
illustration = "writing_syndie"
|
||||
|
||||
/obj/item/paper/contractor_guide
|
||||
name = "Contractor Guide"
|
||||
|
||||
/obj/item/paper/contractor_guide/Initialize()
|
||||
info = {"<p>Welcome agent, congratulations on your new position as contractor. On top of your already assigned objectives,
|
||||
this kit will provide you contracts to take on for TC payments.</p>
|
||||
<p>Provided within, we give your specialist contractor space suit. It's even more compact, being able to fit into a pocket, and faster than the
|
||||
Syndicate space suit available to you on the uplink. We also provide your chameleon jumpsuit and mask, both of which can be changed
|
||||
to any form you need for the moment. The cigarettes are a special blend - it'll heal your injuries slowly overtime.</p>
|
||||
<p>The three additional items, apart from the tablet and loadout box, have been randomly selected from what we had available. We hope
|
||||
they're useful to you for you mission.</p>
|
||||
<p>The contractor hub, available at the top right of the uplink, will provide you unique items and abilities. These are bought using Contractor Rep,
|
||||
with two Rep being provided each time you complete a contract.</p>
|
||||
<h3>Using the tablet</h3>
|
||||
<ol>
|
||||
<li>Open the Syndicate Contract Uplink program.</li>
|
||||
<li>Assign yourself.</li>
|
||||
<li>Here, you can accept a contract, and redeem your TC payments from completed contracts.</li>
|
||||
<li>The payment number shown in brackets is the bonus you'll recieve when bringing your target <b>alive</b>. You recieve the
|
||||
other number regardless of if they were alive or dead.</li>
|
||||
<li>Contracts are completed by bringing the target to designated dropoff, calling for extraction, and putting them
|
||||
inside the pod.</li>
|
||||
</ol>
|
||||
<p>Be careful when accepting a contract. While you'll be able to see the location of the dropoff point, cancelling will make it
|
||||
unavailable to take on again.</p>
|
||||
<p>The tablet can also be recharged at any cell charger.</p>
|
||||
<h3>Extracting</h3>
|
||||
<ol>
|
||||
<li>Make sure both yourself and your target are at the dropoff.</li>
|
||||
<li>Call the extraction, and stand back from the drop point</li>
|
||||
<li>If it fails, make sure your target is inside, and there's a free space for the pod to land.</li>
|
||||
<li>Grab your target, and drag them into the pod.</li>
|
||||
</ol>
|
||||
<h3>Ransoms</h3>
|
||||
<p>We need your target for our own reasons, but we ransom them back to your mission area once their use is served. They will return back
|
||||
from where you sent them off from in several minutes time. You will be paid in TC for your services.</p>
|
||||
|
||||
<p>Good luck agent. You can burn this document with the supplied lighter.</p>"}
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/box/syndicate/contractor_loadout/PopulateContents()
|
||||
new /obj/item/clothing/head/helmet/space/syndicate/contract(src)
|
||||
new /obj/item/clothing/suit/space/syndicate/contract(src)
|
||||
new /obj/item/clothing/under/chameleon(src)
|
||||
new /obj/item/clothing/mask/chameleon(src)
|
||||
new /obj/item/card/id/syndicate(src)
|
||||
new /obj/item/storage/fancy/cigarettes/cigpack_syndicate(src)
|
||||
new /obj/item/lighter(src)
|
||||
|
||||
/obj/item/storage/box/syndie_kit/contract_kit/PopulateContents()
|
||||
new /obj/item/modular_computer/tablet/syndicate_contract_uplink/preset/uplink(src)
|
||||
new /obj/item/storage/box/syndicate/contractor_loadout(src)
|
||||
new /obj/item/melee/classic_baton/telescopic/contractor_baton(src)
|
||||
var/list/item_list = list( // All 4 TC or less - some nukeops only items, but fit nicely to the theme.
|
||||
/obj/item/storage/backpack/duffelbag/syndie/x4,
|
||||
/obj/item/storage/box/syndie_kit/throwing_weapons,
|
||||
/obj/item/gun/syringe/syndicate,
|
||||
/obj/item/pen/edagger,
|
||||
/obj/item/pen/sleepy,
|
||||
/obj/item/flashlight/emp,
|
||||
/obj/item/reagent_containers/syringe/mulligan,
|
||||
/obj/item/clothing/shoes/chameleon/noslip,
|
||||
/obj/item/storage/firstaid/tactical,
|
||||
/obj/item/storage/backpack/duffelbag/syndie/surgery,
|
||||
/obj/item/encryptionkey/syndicate,
|
||||
/obj/item/clothing/glasses/thermal/syndi,
|
||||
/obj/item/slimepotion/slime/sentience/nuclear,
|
||||
/obj/item/storage/box/syndie_kit/imp_radio,
|
||||
/obj/item/storage/box/syndie_kit/imp_uplink,
|
||||
/obj/item/clothing/gloves/krav_maga/combatglovesplus,
|
||||
/obj/item/gun/ballistic/automatic/c20r/toy/unrestricted/riot,
|
||||
/obj/item/reagent_containers/syringe/stimulants,
|
||||
/obj/item/storage/box/syndie_kit/imp_freedom
|
||||
)
|
||||
var/obj/item1 = pick_n_take(item_list)
|
||||
var/obj/item2 = pick_n_take(item_list)
|
||||
var/obj/item3 = pick_n_take(item_list)
|
||||
new item1(src) // Create three, non repeat items from the list.
|
||||
new item2(src)
|
||||
new item3(src)
|
||||
new /obj/item/paper/contractor_guide(src) //Paper guide
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
/obj/item/melee/baton/examine(mob/user)
|
||||
. = ..()
|
||||
. += "<span class='notice'>Right click attack while in combat mode to disarm instead of stun.</span>"
|
||||
. += "<span class='notice'>Right click attack while in combat mode or attack while in disarm intent to disarm instead of stun.</span>"
|
||||
|
||||
/obj/item/melee/baton/get_cell()
|
||||
. = cell
|
||||
@@ -149,6 +149,8 @@
|
||||
|
||||
//return TRUE to interrupt attack chain.
|
||||
/obj/item/melee/baton/proc/common_baton_melee(mob/M, mob/living/user, disarming = FALSE)
|
||||
if(user.a_intent == INTENT_DISARM)
|
||||
disarming = TRUE //override if they're in disarm intent.
|
||||
if(iscyborg(M) || !isliving(M)) //can't baton cyborgs
|
||||
return FALSE
|
||||
if(status && HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50))
|
||||
@@ -191,7 +193,7 @@
|
||||
|
||||
if(!disarming)
|
||||
if(knockdown)
|
||||
L.Knockdown(50, override_stamdmg = 0) //knockdown
|
||||
L.DefaultCombatKnockdown(50, override_stamdmg = 0) //knockdown
|
||||
L.adjustStaminaLoss(stunpwr)
|
||||
else
|
||||
L.drop_all_held_items() //no knockdown/stamina damage, instead disarm.
|
||||
@@ -218,7 +220,7 @@
|
||||
user.visible_message("<span class='danger'>[user] accidentally hits [user.p_them()]self with [src]!</span>", \
|
||||
"<span class='userdanger'>You accidentally hit yourself with [src]!</span>")
|
||||
SEND_SIGNAL(user, COMSIG_LIVING_MINOR_SHOCK)
|
||||
user.Knockdown(stamforce*6)
|
||||
user.DefaultCombatKnockdown(stamforce*6)
|
||||
playsound(loc, 'sound/weapons/egloves.ogg', 50, 1, -1)
|
||||
deductcharge(hitcost)
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user