Merge branch 'master' of https://github.com/PolarisSS13/Polaris into 3/14/2017_makeshift_armor

This commit is contained in:
Neerti
2017-04-14 03:54:23 -04:00
534 changed files with 17904 additions and 11078 deletions

View File

@@ -19,7 +19,7 @@
var/hibernate = 0 //Do we even process?
var/scrubbing = 1 //0 = siphoning, 1 = scrubbing
var/list/scrubbing_gas = list("carbon_dioxide")
var/list/scrubbing_gas = list("carbon_dioxide", "phoron")
var/panic = 0 //is this scrubber panicked?

View File

@@ -228,13 +228,16 @@ mob/living/carbon/human/airflow_hit(atom/A)
var/b_loss = airflow_speed * vsc.airflow_damage
var/blocked = run_armor_check(BP_HEAD,"melee")
apply_damage(b_loss/3, BRUTE, BP_HEAD, blocked, 0, "Airflow")
var/soaked = get_armor_soak(BP_HEAD,"melee")
apply_damage(b_loss/3, BRUTE, BP_HEAD, blocked, soaked, 0, "Airflow")
blocked = run_armor_check(BP_TORSO,"melee")
apply_damage(b_loss/3, BRUTE, BP_TORSO, blocked, 0, "Airflow")
soaked = get_armor_soak(BP_TORSO,"melee")
apply_damage(b_loss/3, BRUTE, BP_TORSO, blocked, soaked, 0, "Airflow")
blocked = run_armor_check(BP_GROIN,"melee")
apply_damage(b_loss/3, BRUTE, BP_GROIN, blocked, 0, "Airflow")
soaked = get_armor_soak(BP_GROIN,"melee")
apply_damage(b_loss/3, BRUTE, BP_GROIN, blocked, soaked, 0, "Airflow")
if(airflow_speed > 10)
Paralyse(round(airflow_speed * vsc.airflow_stun))

View File

@@ -180,7 +180,8 @@ Class Procs:
air_master.mark_zone_update(B)
/connection_edge/zone/recheck()
if(!A.air.compare(B.air))
// Edges with only one side being vacuum need processing no matter how close.
if(!A.air.compare(B.air, vacuum_exception = 1))
air_master.mark_edge_active(src)
//Helper proc to get connections for a zone.
@@ -235,7 +236,10 @@ Class Procs:
air_master.mark_zone_update(A)
/connection_edge/unsimulated/recheck()
if(!A.air.compare(air))
// Edges with only one side being vacuum need processing no matter how close.
// Note: This handles the glaring flaw of a room holding pressure while exposed to space, but
// does not specially handle the less common case of a simulated room exposed to an unsimulated pressurized turf.
if(!A.air.compare(air, vacuum_exception = 1))
air_master.mark_edge_active(src)
proc/ShareHeat(datum/gas_mixture/A, datum/gas_mixture/B, connecting_tiles)

View File

@@ -95,14 +95,14 @@ obj/var/phoronproof = 0
return
//Burn skin if exposed.
if(vsc.plc.SKIN_BURNS)
if(vsc.plc.SKIN_BURNS && (species.breath_type != "phoron"))
if(!pl_head_protected() || !pl_suit_protected())
burn_skin(0.75)
if(prob(20)) src << "<span class='danger'>Your skin burns!</span>"
updatehealth()
//Burn eyes if exposed.
if(vsc.plc.EYE_BURNS)
if(vsc.plc.EYE_BURNS && (species.breath_type != "phoron"))
if(!head)
if(!wear_mask)
burn_eyes()
@@ -118,22 +118,12 @@ obj/var/phoronproof = 0
burn_eyes()
//Genetic Corruption
if(vsc.plc.GENETIC_CORRUPTION)
if(vsc.plc.GENETIC_CORRUPTION && (species.breath_type != "phoron"))
if(rand(1,10000) < vsc.plc.GENETIC_CORRUPTION)
randmutb(src)
src << "<span class='danger'>High levels of toxins cause you to spontaneously mutate!</span>"
domutcheck(src,null)
/mob/living/carbon/human/vox/pl_effects()
//Handles all the bad things phoron can do to Vox.
//Contamination
if(vsc.plc.CLOTH_CONTAMINATION) contaminate()
//Anything else requires them to not be dead.
if(stat >= 2)
return
/mob/living/carbon/human/proc/burn_eyes()
var/obj/item/organ/internal/eyes/E = internal_organs_by_name[O_EYES]
if(E)

View File

@@ -180,3 +180,14 @@
#define ROLE_SYNTHETIC "synthetic"
#define ROLE_UNKNOWN "unknown"
#define ROLE_EVERYONE "everyone"
// Canonical spellings of TSCs, so typos never have to happen again due to human error.
#define TSC_NT "NanoTrasen"
#define TSC_HEPH "Hephaestus" // Because everyone misspells it
#define TSC_VM "Vey Med"
#define TSC_ZH "Zeng-Hu"
#define TSC_WT "Ward-Takahashi"
#define TSC_BC "Bishop Cybernetics"
#define TSC_MORPH "Morpheus"
#define TSC_XION "Xion" // Not really needed but consistancy I guess.
#define TSC_GIL "Gilthari"

View File

@@ -26,11 +26,13 @@
#define BORGXRAY 0x4
#define BORGMATERIAL 8
#define STANCE_IDLE 1
#define STANCE_ALERT 2
#define STANCE_ATTACK 3
#define STANCE_ATTACKING 4
#define STANCE_TIRED 5
#define STANCE_IDLE 1 // Looking for targets if hostile. Does idle wandering.
#define STANCE_ALERT 2 // Bears
#define STANCE_ATTACK 3 // Attempting to get into attack position
#define STANCE_ATTACKING 4 // Doing attacks
#define STANCE_TIRED 5 // Bears
#define STANCE_FOLLOW 6 // Following somone
#define STANCE_BUSY 7 // Do nothing on life ticks (Other code is running)
#define LEFT 1
#define RIGHT 2
@@ -139,7 +141,7 @@
#define INCAPACITATION_STUNNED 8
#define INCAPACITATION_FORCELYING 16 //needs a better name - represents being knocked down BUT still conscious.
#define INCAPACITATION_KNOCKOUT 32
#define INCAPACITATION_NONE 0
#define INCAPACITATION_DEFAULT (INCAPACITATION_RESTRAINED|INCAPACITATION_BUCKLED_FULLY)
#define INCAPACITATION_KNOCKDOWN (INCAPACITATION_KNOCKOUT|INCAPACITATION_FORCELYING)

View File

@@ -7,13 +7,12 @@
#define PROCESS_STATUS_HUNG 6
// Process time thresholds
#define PROCESS_DEFAULT_HANG_WARNING_TIME 300 // 30 seconds
#define PROCESS_DEFAULT_HANG_ALERT_TIME 600 // 60 seconds
#define PROCESS_DEFAULT_HANG_RESTART_TIME 900 // 90 seconds
#define PROCESS_DEFAULT_SCHEDULE_INTERVAL 50 // 50 ticks
#define PROCESS_DEFAULT_SLEEP_INTERVAL 8 // 1/8th of a tick
#define PROCESS_DEFAULT_HANG_WARNING_TIME 300 // 30 seconds
#define PROCESS_DEFAULT_HANG_ALERT_TIME 600 // 60 seconds
#define PROCESS_DEFAULT_HANG_RESTART_TIME 900 // 90 seconds
#define PROCESS_DEFAULT_SCHEDULE_INTERVAL 50 // 50 ticks
#define PROCESS_DEFAULT_SLEEP_INTERVAL 20 // 20% of a tick
#define PROCESS_DEFAULT_DEFER_USAGE 90 // 90% of a tick
// SCHECK macros
// This references src directly to work around a weird bug with try/catch
#define SCHECK_EVERY(this_many_calls) if(++src.calls_since_last_scheck >= this_many_calls) sleepCheck()
#define SCHECK sleepCheck()
// Sleep check macro
#define SCHECK if(world.tick_usage >= next_sleep_usage) defer()

View File

@@ -52,4 +52,4 @@
#define INNATE 64 // All mobs can be assumed to speak and understand this language. (audible emotes)
#define NO_TALK_MSG 128 // Do not show the "\The [speaker] talks into \the [radio]" message
#define NO_STUTTER 256 // No stuttering, slurring, or other speech problems
#define ALT_TRANSMIT 512 // Language is not based on vision or sound (Todo: add this into the say code and use it for the rootspeak languages)
#define ALT_TRANSMIT 512 // Language is not based on vision or sound (Todo: add this into the say code and use it for the rootspeak languages)

View File

@@ -7,4 +7,7 @@
#define TURF_HAS_EDGES 64
#define TURF_HAS_CORNERS 128
#define TURF_IS_FRAGILE 256
#define TURF_ACID_IMMUNE 512
#define TURF_ACID_IMMUNE 512
#define isCardinal(x) (x == NORTH || x == SOUTH || x == EAST || x == WEST)
#define isDiagonal(x) (x == NORTHEAST || x == SOUTHEAST || x == NORTHWEST || x == SOUTHWEST)

View File

@@ -51,12 +51,13 @@ var/global/list/facial_hair_styles_list = list() //stores /datum/sprite_accessor
var/global/list/facial_hair_styles_male_list = list()
var/global/list/facial_hair_styles_female_list = list()
var/global/list/skin_styles_female_list = list() //unused
var/global/list/body_marking_styles_list = list() //stores /datum/sprite_accessory/marking indexed by name
//Underwear
var/datum/category_collection/underwear/global_underwear = new()
//Backpacks
var/global/list/backbaglist = list("Nothing", "Backpack", "Satchel", "Satchel Alt", "Messenger Bag")
var/global/list/pdachoicelist = list("Default", "Slim", "Old")
var/global/list/pdachoicelist = list("Default", "Slim", "Old", "Rugged")
var/global/list/exclude_jobs = list(/datum/job/ai,/datum/job/cyborg)
// Visual nets
@@ -141,6 +142,12 @@ var/global/list/string_slot_flags = list(
facial_hair_styles_male_list += H.name
facial_hair_styles_female_list += H.name
//Body markings - Initialise all /datum/sprite_accessory/marking into an list indexed by marking name
paths = typesof(/datum/sprite_accessory/marking) - /datum/sprite_accessory/marking
for(var/path in paths)
var/datum/sprite_accessory/marking/M = new path()
body_marking_styles_list[M.name] = M
//Surgery Steps - Initialize all /datum/surgery_step into a list
paths = typesof(/datum/surgery_step)-/datum/surgery_step
for(var/T in paths)

View File

@@ -793,6 +793,26 @@ proc // Creates a single icon from a given /atom or /image. Only the first argu
alpha_mask.Blend(image_overlay,ICON_OR)//OR so they are lumped together in a nice overlay.
return alpha_mask//And now return the mask.
//getFlatIcon but generates an icon that can face ALL four directions. The only four.
/proc/getCompoundIcon(atom/A)
var/icon/north = getFlatIcon(A,defdir=NORTH,always_use_defdir=1)
var/icon/south = getFlatIcon(A,defdir=SOUTH,always_use_defdir=1)
var/icon/east = getFlatIcon(A,defdir=EAST,always_use_defdir=1)
var/icon/west = getFlatIcon(A,defdir=WEST,always_use_defdir=1)
//Starts with a blank icon because of byond bugs.
var/icon/full = icon('icons/effects/effects.dmi', "icon_state"="nothing")
full.Insert(north,dir=NORTH)
full.Insert(south,dir=SOUTH)
full.Insert(east,dir=EAST)
full.Insert(west,dir=WEST)
qdel(north)
qdel(south)
qdel(east)
qdel(west)
return full
/mob/proc/AddCamoOverlay(atom/A)//A is the atom which we are using as the overlay.
var/icon/opacity_icon = new(A.icon, A.icon_state)//Don't really care for overlays/underlays.
//Now we need to culculate overlays+underlays and add them together to form an image for a mask.

View File

@@ -63,12 +63,12 @@ proc/random_facial_hair_style(gender, species = "Human")
return f_style
proc/sanitize_name(name, species = "Human")
proc/sanitize_name(name, species = "Human", robot = 0)
var/datum/species/current_species
if(species)
current_species = all_species[species]
return current_species ? current_species.sanitize_name(name) : sanitizeName(name)
return current_species ? current_species.sanitize_name(name, robot) : sanitizeName(name, MAX_NAME_LEN, robot)
proc/random_name(gender, species = "Human")

View File

@@ -85,7 +85,7 @@
// 0 .. 9
if(48 to 57) //Numbers
if(!last_char_group) continue //suppress at start of string
if(!allow_numbers) continue
if(!allow_numbers) continue // If allow_numbers is 0, then don't do this.
output += ascii2text(ascii_char)
number_of_alphanumeric++
last_char_group = 3

View File

@@ -753,9 +753,6 @@ proc/GaussRandRound(var/sigma,var/roundto)
C.x_pos = (T.x - trg_min_x)
C.y_pos = (T.y - trg_min_y)
var/list/fromupdate = new/list()
var/list/toupdate = new/list()
moving:
for (var/turf/T in refined_src)
var/datum/coords/C_src = refined_src[T]
@@ -763,19 +760,40 @@ proc/GaussRandRound(var/sigma,var/roundto)
var/datum/coords/C_trg = refined_trg[B]
if(C_src.x_pos == C_trg.x_pos && C_src.y_pos == C_trg.y_pos)
var/old_dir1 = T.dir
var/old_icon_state1 = T.icon_state
var/old_icon1 = T.icon
var/old_overlays = T.overlays.Copy()
var/old_underlays = T.underlays.Copy()
//You can stay, though.
if(istype(T,/turf/space))
refined_src -= T
refined_trg -= B
continue moving
var/turf/X = B.ChangeTurf(T.type)
X.set_dir(old_dir1)
X.icon_state = old_icon_state1
X.icon = old_icon1 //Shuttle floors are in shuttle.dmi while the defaults are floors.dmi
X.overlays = old_overlays
X.underlays = old_underlays
var/turf/X //New Destination Turf
//Are we doing shuttlework? Just to save another type check later.
var/shuttlework = 0
//Shuttle turfs handle their own fancy moving.
if(istype(T,/turf/simulated/shuttle))
shuttlework = 1
var/turf/simulated/shuttle/SS = T
if(!SS.landed_holder) SS.landed_holder = new(turf = SS)
X = SS.landed_holder.land_on(B)
//Generic non-shuttle turf move.
else
var/old_dir1 = T.dir
var/old_icon_state1 = T.icon_state
var/old_icon1 = T.icon
var/old_overlays = T.overlays.Copy()
var/old_underlays = T.underlays.Copy()
X = B.ChangeTurf(T.type)
X.set_dir(old_dir1)
X.icon_state = old_icon_state1
X.icon = old_icon1
X.overlays = old_overlays
X.underlays = old_underlays
//Move the air from source to dest
var/turf/simulated/ST = T
if(istype(ST) && ST.zone)
var/turf/simulated/SX = X
@@ -784,55 +802,22 @@ proc/GaussRandRound(var/sigma,var/roundto)
SX.air.copy_from(ST.zone.air)
ST.zone.remove(ST)
/* Quick visual fix for some weird shuttle corner artefacts when on transit space tiles */
if(direction && findtext(X.icon_state, "swall_s"))
// Spawn a new shuttle corner object
var/obj/corner = new()
corner.loc = X
corner.density = 1
corner.anchored = 1
corner.icon = X.icon
corner.icon_state = replacetext(X.icon_state, "_s", "_f")
corner.tag = "delete me"
corner.name = "wall"
// Find a new turf to take on the property of
var/turf/nextturf = get_step(corner, direction)
if(!nextturf || !istype(nextturf, /turf/space))
nextturf = get_step(corner, turn(direction, 180))
// Take on the icon of a neighboring scrolling space icon
X.icon = nextturf.icon
X.icon_state = nextturf.icon_state
//Move the objects. Not forceMove because the object isn't "moving" really, it's supposed to be on the "same" turf.
for(var/obj/O in T)
// Reset the shuttle corners
if(O.tag == "delete me")
X.icon = 'icons/turf/shuttle.dmi'
X.icon_state = replacetext(O.icon_state, "_f", "_s") // revert the turf to the old icon_state
X.name = "wall"
qdel(O) // prevents multiple shuttle corners from stacking
continue
if(!istype(O,/obj)) continue
O.loc = X
//Move the mobs unless it's an AI eye or other eye type.
for(var/mob/M in T)
if(!istype(M,/mob) || istype(M, /mob/observer/eye)) continue // If we need to check for more mobs, I'll add a variable
if(istype(M, /mob/observer/eye)) continue // If we need to check for more mobs, I'll add a variable
M.loc = X
// var/area/AR = X.loc
if(shuttlework)
var/turf/simulated/shuttle/SS = T
SS.landed_holder.leave_turf()
// if(AR.lighting_use_dynamic) //TODO: rewrite this code so it's not messed by lighting ~Carn
// X.opacity = !X.opacity
// X.SetOpacity(!X.opacity)
else if(turftoleave)
T.ChangeTurf(turftoleave)
toupdate += X
if(turftoleave)
fromupdate += T.ChangeTurf(turftoleave)
else
T.ChangeTurf(get_base_turf_by_area(T))
@@ -840,7 +825,6 @@ proc/GaussRandRound(var/sigma,var/roundto)
refined_trg -= B
continue moving
proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0)
if(!original)
return null

View File

@@ -341,6 +341,7 @@
var/mob/living/carbon/C = usr
C.swap_hand()
else
var/turf/T = screen_loc2turf("screen-loc", get_turf(usr))
T.Click(location, control, params)
var/turf/T = screen_loc2turf(screen_loc, get_turf(usr))
if(T)
T.Click(location, control, params)
. = 1

View File

@@ -48,7 +48,10 @@
// This controls how often the process will yield (call sleep(0)) while it is running.
// Every concurrent process should sleep periodically while running in order to allow other
// processes to execute concurrently.
var/tmp/sleep_interval
var/tmp/sleep_interval = PROCESS_DEFAULT_SLEEP_INTERVAL
// Defer usage; the tick usage at which this process will defer until the next tick
var/tmp/defer_usage = PROCESS_DEFAULT_DEFER_USAGE
// hang_warning_time - this is the time (in 1/10 seconds) after which the server will begin to show "maybe hung" in the context window
var/tmp/hang_warning_time = PROCESS_DEFAULT_HANG_WARNING_TIME
@@ -59,19 +62,13 @@
// hang_restart_time - After this much time(in 1/10 seconds), the server will automatically kill and restart the process.
var/tmp/hang_restart_time = PROCESS_DEFAULT_HANG_RESTART_TIME
// How many times in the current run has the process deferred work till the next tick?
var/tmp/cpu_defer_count = 0
// How many SCHECKs have been skipped (to limit btime calls)
var/tmp/calls_since_last_scheck = 0
// Number of deciseconds to delay before starting the process
var/start_delay = 0
/**
* recordkeeping vars
*/
// Records the time (1/10s timeoftick) at which the process last finished sleeping
var/tmp/last_slept = 0
// Records the time (1/10s timeofgame) at which the process last began running
var/tmp/run_start = 0
@@ -85,11 +82,29 @@
var/tmp/last_object
// How many times in the current run has the process deferred work till the next tick?
var/tmp/cpu_defer_count = 0
// Counts the number of times an exception has occurred; gets reset after 10
var/tmp/list/exceptions = list()
// Number of deciseconds to delay before starting the process
var/start_delay = 0
// The next tick_usage the process will sleep at
var/tmp/next_sleep_usage
// Last run duration, in seconds
var/tmp/last_run_time = 0
// Last 20 run durations
var/tmp/list/last_twenty_run_times = list()
// Highest run duration, in seconds
var/tmp/highest_run_time = 0
// Tick usage at start of current run (updates upon deferring)
var/tmp/tick_usage_start
// Accumulated tick usage from before each deferral
var/tmp/tick_usage_accumulated = 0
/datum/controller/process/New(var/datum/controller/processScheduler/scheduler)
..()
@@ -97,9 +112,6 @@
previousStatus = "idle"
idle()
name = "process"
schedule_interval = 50
sleep_interval = world.tick_lag / PROCESS_DEFAULT_SLEEP_INTERVAL
last_slept = 0
run_start = 0
ticks = 0
last_task = 0
@@ -112,6 +124,10 @@
// Initialize defer count
cpu_defer_count = 0
// Prepare usage tracking (defer() updates these)
tick_usage_start = world.tick_usage
tick_usage_accumulated = 0
running()
main.processStarted(src)
@@ -119,11 +135,23 @@
/datum/controller/process/proc/finished()
ticks++
recordRunTime()
idle()
main.processFinished(src)
onFinish()
/datum/controller/process/proc/recordRunTime()
// Convert from tick usage (100/tick) to seconds of CPU time used
var/total_usage = (tick_usage_accumulated + (world.tick_usage - tick_usage_start)) / 1000 * world.tick_lag
last_run_time = total_usage
if(total_usage > highest_run_time)
highest_run_time = total_usage
if(last_twenty_run_times.len == 20)
last_twenty_run_times.Cut(1, 2)
last_twenty_run_times += total_usage
/datum/controller/process/proc/doWork()
/datum/controller/process/proc/setup()
@@ -183,10 +211,9 @@
// This should del
del(src)
// Do not call this directly - use SHECK or SCHECK_EVERY
/datum/controller/process/proc/sleepCheck(var/tickId = 0)
calls_since_last_scheck = 0
if (killed)
// Do not call this directly - use SHECK
/datum/controller/process/proc/defer()
if(killed)
// The kill proc is the only place where killed is set.
// The kill proc should have deleted this datum, and all sleeping procs that are
// owned by it.
@@ -196,15 +223,14 @@
handleHung()
CRASH("Process [name] hung and was restarted.")
if (main.getCurrentTickElapsedTime() > main.timeAllowance)
tick_usage_accumulated += (world.tick_usage - tick_usage_start)
if(world.tick_usage < defer_usage)
sleep(0)
else
sleep(world.tick_lag)
cpu_defer_count++
last_slept = 0
else
if (TimeOfTick > last_slept + sleep_interval)
// If we haven't slept in sleep_interval deciseconds, sleep to allow other work to proceed.
sleep(0)
last_slept = TimeOfTick
tick_usage_start = world.tick_usage
next_sleep_usage = min(world.tick_usage + sleep_interval, defer_usage)
/datum/controller/process/proc/update()
// Clear delta
@@ -231,14 +257,14 @@
return
/datum/controller/process/proc/getContext()
return "<tr><td>[name]</td><td>[main.averageRunTime(src)]</td><td>[main.last_run_time[src]]</td><td>[main.highest_run_time[src]]</td><td>[ticks]</td></tr>\n"
return "<tr><td>[name]</td><td>[getAverageRunTime()]</td><td>[last_run_time]</td><td>[highest_run_time]</td><td>[ticks]</td></tr>\n"
/datum/controller/process/proc/getContextData()
return list(
"name" = name,
"averageRunTime" = main.averageRunTime(src),
"lastRunTime" = main.last_run_time[src],
"highestRunTime" = main.highest_run_time[src],
"averageRunTime" = getAverageRunTime(),
"lastRunTime" = last_run_time,
"highestRunTime" = highest_run_time,
"ticks" = ticks,
"schedule" = schedule_interval,
"status" = getStatusText(),
@@ -286,7 +312,6 @@
name = target.name
schedule_interval = target.schedule_interval
sleep_interval = target.sleep_interval
last_slept = 0
run_start = 0
times_killed = target.times_killed
ticks = target.ticks
@@ -309,21 +334,31 @@
disabled = 0
/datum/controller/process/proc/getAverageRunTime()
return main.averageRunTime(src)
var/t = 0
var/c = 0
for(var/time in last_twenty_run_times)
t += time
c++
if(c > 0)
return t / c
return c
/datum/controller/process/proc/getLastRunTime()
return main.getProcessLastRunTime(src)
return last_run_time
/datum/controller/process/proc/getHighestRunTime()
return main.getProcessHighestRunTime(src)
return highest_run_time
/datum/controller/process/proc/getTicks()
return ticks
/datum/controller/process/proc/statProcess()
var/averageRunTime = round(getAverageRunTime(), 0.1)/10
var/lastRunTime = round(getLastRunTime(), 0.1)/10
var/highestRunTime = round(getHighestRunTime(), 0.1)/10
stat("[name]", "T#[getTicks()] | AR [averageRunTime] | LR [lastRunTime] | HR [highestRunTime] | D [cpu_defer_count]")
var/averageRunTime = round(getAverageRunTime(), 0.001)
var/lastRunTime = round(last_run_time, 0.001)
var/highestRunTime = round(highest_run_time, 0.001)
var/deferTime = round(cpu_defer_count / 10 * world.tick_lag, 0.01)
stat("[name]", "T#[getTicks()] | AR [averageRunTime] | LR [lastRunTime] | HR [highestRunTime] | D [deferTime]")
/datum/controller/process/proc/catchException(var/exception/e, var/thrower)
if(istype(e)) // Real runtimes go to the real error handler

View File

@@ -20,18 +20,6 @@ var/global/datum/controller/processScheduler/processScheduler
// Process last queued times (world time)
var/tmp/datum/controller/process/list/last_queued = new
// Process last start times (real time)
var/tmp/datum/controller/process/list/last_start = new
// Process last run durations
var/tmp/datum/controller/process/list/last_run_time = new
// Per process list of the last 20 durations
var/tmp/datum/controller/process/list/last_twenty_run_times = new
// Process highest run time
var/tmp/datum/controller/process/list/highest_run_time = new
// How long to sleep between runs (set to tick_lag in New)
var/tmp/scheduler_sleep_interval
@@ -41,22 +29,12 @@ var/global/datum/controller/processScheduler/processScheduler
// Setup for these processes will be deferred until all the other processes are set up.
var/tmp/list/deferredSetupList = new
var/tmp/currentTick = 0
var/tmp/timeAllowance = 0
var/tmp/cpuAverage = 0
var/tmp/timeAllowanceMax = 0
/datum/controller/processScheduler/New()
..()
// When the process scheduler is first new'd, tick_lag may be wrong, so these
// get re-initialized when the process scheduler is started.
// (These are kept here for any processes that decide to process before round start)
scheduler_sleep_interval = world.tick_lag
timeAllowance = world.tick_lag * 0.5
timeAllowanceMax = world.tick_lag
/**
* deferSetupFor
@@ -88,20 +66,12 @@ var/global/datum/controller/processScheduler/processScheduler
isRunning = 1
// tick_lag will have been set by now, so re-initialize these
scheduler_sleep_interval = world.tick_lag
timeAllowance = world.tick_lag * 0.5
timeAllowanceMax = world.tick_lag
updateStartDelays()
spawn(0)
process()
/datum/controller/processScheduler/proc/process()
updateCurrentTickData()
for(var/i=world.tick_lag,i<world.tick_lag*50,i+=world.tick_lag)
spawn(i) updateCurrentTickData()
while(isRunning)
// Hopefully spawning this for 50 ticks in the future will make it the first thing in the queue.
spawn(world.tick_lag*50) updateCurrentTickData()
checkRunningProcesses()
queueProcesses()
runQueuedProcesses()
@@ -148,20 +118,6 @@ var/global/datum/controller/processScheduler/processScheduler
process.idle()
idle.Add(process)
// init recordkeeping vars
last_start.Add(process)
last_start[process] = 0
last_run_time.Add(process)
last_run_time[process] = 0
last_twenty_run_times.Add(process)
last_twenty_run_times[process] = list()
highest_run_time.Add(process)
highest_run_time[process] = 0
// init starts and stops record starts
recordStart(process, 0)
recordEnd(process, 0)
// Set up process
process.setup()
@@ -178,24 +134,9 @@ var/global/datum/controller/processScheduler/processScheduler
queued.Remove(oldProcess)
idle.Add(newProcess)
last_start.Remove(oldProcess)
last_start.Add(newProcess)
last_start[newProcess] = 0
last_run_time.Add(newProcess)
last_run_time[newProcess] = last_run_time[oldProcess]
last_run_time.Remove(oldProcess)
last_twenty_run_times.Add(newProcess)
last_twenty_run_times[newProcess] = last_twenty_run_times[oldProcess]
last_twenty_run_times.Remove(oldProcess)
highest_run_time.Add(newProcess)
highest_run_time[newProcess] = highest_run_time[oldProcess]
highest_run_time.Remove(oldProcess)
recordStart(newProcess, 0)
recordEnd(newProcess, 0)
newProcess.last_run_time = oldProcess.last_run_time
newProcess.last_twenty_run_times = oldProcess.last_twenty_run_times
newProcess.highest_run_time = oldProcess.highest_run_time
nameToProcessMap[newProcess.name] = newProcess
@@ -210,11 +151,10 @@ var/global/datum/controller/processScheduler/processScheduler
/datum/controller/processScheduler/proc/processStarted(var/datum/controller/process/process)
setRunningProcessState(process)
recordStart(process)
last_queued[process] = world.time
/datum/controller/processScheduler/proc/processFinished(var/datum/controller/process/process)
setIdleProcessState(process)
recordEnd(process)
/datum/controller/processScheduler/proc/setIdleProcessState(var/datum/controller/process/process)
if (process in running)
@@ -243,63 +183,6 @@ var/global/datum/controller/processScheduler/processScheduler
if (!(process in running))
running += process
/datum/controller/processScheduler/proc/recordStart(var/datum/controller/process/process, var/time = null)
if (isnull(time))
time = TimeOfGame
last_queued[process] = world.time
last_start[process] = time
else
last_queued[process] = (time == 0 ? 0 : world.time)
last_start[process] = time
/datum/controller/processScheduler/proc/recordEnd(var/datum/controller/process/process, var/time = null)
if (isnull(time))
time = TimeOfGame
var/lastRunTime = time - last_start[process]
if(lastRunTime < 0)
lastRunTime = 0
recordRunTime(process, lastRunTime)
/**
* recordRunTime
* Records a run time for a process
*/
/datum/controller/processScheduler/proc/recordRunTime(var/datum/controller/process/process, time)
last_run_time[process] = time
if(time > highest_run_time[process])
highest_run_time[process] = time
var/list/lastTwenty = last_twenty_run_times[process]
if (lastTwenty.len == 20)
lastTwenty.Cut(1, 2)
lastTwenty.len++
lastTwenty[lastTwenty.len] = time
/**
* averageRunTime
* returns the average run time (over the last 20) of the process
*/
/datum/controller/processScheduler/proc/averageRunTime(var/datum/controller/process/process)
var/lastTwenty = last_twenty_run_times[process]
var/t = 0
var/c = 0
for(var/time in lastTwenty)
t += time
c++
if(c > 0)
return t / c
return c
/datum/controller/processScheduler/proc/getProcessLastRunTime(var/datum/controller/process/process)
return last_run_time[process]
/datum/controller/processScheduler/proc/getProcessHighestRunTime(var/datum/controller/process/process)
return highest_run_time[process]
/datum/controller/processScheduler/proc/getStatusData()
var/list/data = new
@@ -338,34 +221,12 @@ var/global/datum/controller/processScheduler/processScheduler
var/datum/controller/process/process = nameToProcessMap[processName]
process.disable()
/datum/controller/processScheduler/proc/getCurrentTickElapsedTime()
if (world.time > currentTick)
updateCurrentTickData()
return 0
else
return TimeOfTick
/datum/controller/processScheduler/proc/updateCurrentTickData()
if (world.time > currentTick)
// New tick!
currentTick = world.time
updateTimeAllowance()
cpuAverage = (world.cpu + cpuAverage + cpuAverage) / 3
/datum/controller/processScheduler/proc/updateTimeAllowance()
// Time allowance goes down linearly with world.cpu.
var/tmp/error = cpuAverage - 100
var/tmp/timeAllowanceDelta = SIMPLE_SIGN(error) * -0.5 * world.tick_lag * max(0, 0.001 * abs(error))
//timeAllowance = world.tick_lag * min(1, 0.5 * ((200/max(1,cpuAverage)) - 1))
timeAllowance = min(timeAllowanceMax, max(0, timeAllowance + timeAllowanceDelta))
/datum/controller/processScheduler/proc/statProcesses()
if(!isRunning)
stat("Processes", "Scheduler not running")
return
stat("Processes", "[processes.len] (R [running.len] / Q [queued.len] / I [idle.len])")
stat(null, "[round(cpuAverage, 0.1)] CPU, [round(timeAllowance, 0.1)/10] TA")
for(var/datum/controller/process/p in processes)
p.statProcess()

View File

@@ -14,7 +14,7 @@
/datum/controller/process/mob/doWork()
for(last_object in mob_list)
var/mob/M = last_object
if(isnull(M.gcDestroyed))
if(M && isnull(M.gcDestroyed))
try
M.Life()
catch(var/exception/e)

View File

@@ -11,7 +11,7 @@
/datum/controller/process/obj/doWork()
for(last_object in processing_objects)
var/datum/O = last_object
if(isnull(O.gcDestroyed))
if(O && isnull(O.gcDestroyed))
try
O:process()
catch(var/exception/e)

View File

@@ -25,6 +25,21 @@
catchException(e, last_object)
SCHECK
// We've been restarted, probably due to having a massive list of tasks.
// Lets copy over the task list as safely as we can and try to chug thru it...
// Note: We won't be informed about tasks being destroyed, but this is the best we can do.
/datum/controller/process/scheduler/copyStateFrom(var/datum/controller/process/scheduler/target)
scheduled_tasks = list()
for(var/st in target.scheduled_tasks)
if(!deleted(st) && istype(st, /datum/scheduled_task))
schedule(st)
scheduler = src
// We are being killed. Least we can do is deregister all those events we registered
/datum/controller/process/scheduler/onKill()
for(var/st in scheduled_tasks)
destroyed_event.unregister(st, src)
/datum/controller/process/scheduler/statProcess()
..()
stat(null, "[scheduled_tasks.len] task\s")
@@ -130,4 +145,4 @@
/proc/repeat_scheduled_task(var/trigger_delay, var/datum/scheduled_task/st)
st.trigger_time = world.time + trigger_delay
scheduler.schedule(st)
scheduler.schedule(st)

View File

@@ -108,6 +108,7 @@ var/const/ERT_FREQ = 1345
var/const/AI_FREQ = 1343
var/const/DTH_FREQ = 1341
var/const/SYND_FREQ = 1213
var/const/RAID_FREQ = 1277
var/const/ENT_FREQ = 1461 //entertainment frequency. This is not a diona exclusive frequency.
// department channels
@@ -133,6 +134,7 @@ var/list/radiochannels = list(
"Response Team" = ERT_FREQ,
"Special Ops" = DTH_FREQ,
"Mercenary" = SYND_FREQ,
"Raider" = RAID_FREQ,
"Supply" = SUP_FREQ,
"Service" = SRV_FREQ,
"AI Private" = AI_FREQ,
@@ -145,7 +147,7 @@ var/list/radiochannels = list(
var/list/CENT_FREQS = list(ERT_FREQ, DTH_FREQ)
// Antag channels, i.e. Syndicate
var/list/ANTAG_FREQS = list(SYND_FREQ)
var/list/ANTAG_FREQS = list(SYND_FREQ, RAID_FREQ)
//Department channels, arranged lexically
var/list/DEPT_FREQS = list(AI_FREQ, COMM_FREQ, ENG_FREQ, ENT_FREQ, MED_FREQ, SEC_FREQ, SCI_FREQ, SRV_FREQ, SUP_FREQ)

View File

@@ -94,6 +94,7 @@ var/list/gamemode_cache = list()
var/allow_extra_antags = 0
var/guests_allowed = 1
var/debugparanoid = 0
var/panic_bunker = 0
var/serverurl
var/server

View File

@@ -84,6 +84,8 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
if(istype(A, /area/hallway))
A.readyalert()
atc.reroute_traffic(yes = 1)
//calls the shuttle for a routine crew transfer
/datum/emergency_shuttle_controller/proc/call_transfer()
if(!can_call()) return
@@ -98,6 +100,7 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
shuttle.move_time = SHUTTLE_TRANSIT_DURATION
priority_announcement.Announce(replacetext(replacetext(using_map.shuttle_called_message, "%dock_name%", "[using_map.dock_name]"), "%ETA%", "[estimated_time] minute\s"))
atc.shift_ending()
//recalls the shuttle
/datum/emergency_shuttle_controller/proc/recall()

View File

@@ -74,6 +74,10 @@
name = "request console electronics"
path =/obj/item/weapon/circuitboard/request
/datum/category_item/autolathe/engineering/pipelayer
name = "pipe layer electronics"
path =/obj/item/weapon/circuitboard/pipelayer
/datum/category_item/autolathe/engineering/motor
name = "motor"
path =/obj/item/weapon/stock_parts/motor

View File

@@ -14,6 +14,11 @@
name = "welding tool"
path =/obj/item/weapon/weldingtool
/datum/category_item/autolathe/tools/electric_welder
name = "electric welding tool"
path =/obj/item/weapon/weldingtool/electric/unloaded
hidden = 1
/datum/category_item/autolathe/tools/screwdriver
name = "screwdriver"
path =/obj/item/weapon/screwdriver

View File

@@ -11,7 +11,7 @@
name = "Inflatable barriers"
contains = list(/obj/item/weapon/storage/briefcase/inflatable = 3)
cost = 20
containertype = /obj/structure/closet/crate
containertype = /obj/structure/closet/crate/engineering
containername = "Inflatable Barrier Crate"
/datum/supply_packs/atmos/canister_empty

View File

@@ -78,7 +78,7 @@
/obj/item/clothing/under/scratch,
/obj/item/clothing/under/wedding/bride_white,
/obj/item/clothing/suit/chef,
/obj/item/clothing/suit/apron/overalls,
/obj/item/clothing/suit/storage/apron/overalls,
/obj/item/clothing/under/redcoat,
/obj/item/clothing/under/kilt
)

View File

@@ -18,7 +18,7 @@
name = "Superconducting Magnetic Coil"
contains = list(/obj/item/weapon/smes_coil)
cost = 75
containertype = /obj/structure/closet/crate
containertype = /obj/structure/closet/crate/engineering
containername = "Superconducting Magnetic Coil crate"
/datum/supply_packs/eng/electrical
@@ -30,9 +30,18 @@
/obj/item/weapon/cell/high = 2
)
cost = 10
containertype = /obj/structure/closet/crate
containertype = /obj/structure/closet/crate/engineering/electrical
containername = "Electrical maintenance crate"
/datum/supply_packs/eng/e_welders
name = "Electric welder crate"
contains = list(
/obj/item/weapon/weldingtool/electric = 3
)
cost = 15
containertype = /obj/structure/closet/crate/engineering/electrical
containername = "Electric welder crate"
/datum/supply_packs/eng/mechanical
name = "Mechanical maintenance crate"
contains = list(
@@ -42,7 +51,7 @@
/obj/item/clothing/head/hardhat
)
cost = 10
containertype = /obj/structure/closet/crate
containertype = /obj/structure/closet/crate/engineering
containername = "Mechanical maintenance crate"
/datum/supply_packs/eng/fueltank
@@ -61,34 +70,35 @@
/obj/item/weapon/paper/solar
)
cost = 20
containertype = /obj/structure/closet/crate
containertype = /obj/structure/closet/crate/engineering
containername = "Solar pack crate"
/datum/supply_packs/eng/engine
name = "Emitter crate"
contains = list(/obj/machinery/power/emitter = 2)
cost = 10
containertype = /obj/structure/closet/crate/secure
containertype = /obj/structure/closet/crate/secure/engineering
containername = "Emitter crate"
access = access_ce
/datum/supply_packs/eng/engine/field_gen
name = "Field Generator crate"
contains = list(/obj/machinery/field_generator = 2)
containertype = /obj/structure/closet/crate/secure
containertype = /obj/structure/closet/crate/secure/engineering
containername = "Field Generator crate"
access = access_ce
/datum/supply_packs/eng/engine/sing_gen
name = "Singularity Generator crate"
contains = list(/obj/machinery/the_singularitygen)
containertype = /obj/structure/closet/crate/secure
containertype = /obj/structure/closet/crate/secure/engineering
containername = "Singularity Generator crate"
access = access_ce
/datum/supply_packs/eng/engine/collector
name = "Collector crate"
contains = list(/obj/machinery/power/rad_collector = 3)
containertype = /obj/structure/closet/crate/secure/engineering
containername = "Collector crate"
/datum/supply_packs/eng/engine/PA
@@ -103,7 +113,7 @@
/obj/structure/particle_accelerator/power_box,
/obj/structure/particle_accelerator/end_cap
)
containertype = /obj/structure/closet/crate/secure
containertype = /obj/structure/closet/crate/secure/engineering
containername = "Particle Accelerator crate"
access = access_ce
@@ -111,7 +121,7 @@
contains = list(/obj/item/weapon/circuitboard/shield_gen)
name = "Bubble shield generator circuitry"
cost = 30
containertype = /obj/structure/closet/crate/secure
containertype = /obj/structure/closet/crate/secure/engineering
containername = "bubble shield generator circuitry crate"
access = access_ce
@@ -119,7 +129,7 @@
contains = list(/obj/item/weapon/circuitboard/shield_gen_ex)
name = "Hull shield generator circuitry"
cost = 30
containertype = /obj/structure/closet/crate/secure
containertype = /obj/structure/closet/crate/secure/engineering
containername = "hull shield generator circuitry crate"
access = access_ce
@@ -127,7 +137,7 @@
contains = list(/obj/item/weapon/circuitboard/shield_cap)
name = "Bubble shield capacitor circuitry"
cost = 30
containertype = /obj/structure/closet/crate/secure
containertype = /obj/structure/closet/crate/secure/engineering
containername = "shield capacitor circuitry crate"
access = access_ce
@@ -169,7 +179,7 @@
name = "P.A.C.M.A.N. portable generator parts"
cost = 25
containername = "P.A.C.M.A.N. Portable Generator Construction Kit"
containertype = /obj/structure/closet/crate/secure
containertype = /obj/structure/closet/crate/secure/engineering
access = access_tech_storage
contains = list(
/obj/item/weapon/stock_parts/micro_laser,
@@ -182,7 +192,7 @@
name = "Super P.A.C.M.A.N. portable generator parts"
cost = 35
containername = "Super P.A.C.M.A.N. portable generator construction kit"
containertype = /obj/structure/closet/crate/secure
containertype = /obj/structure/closet/crate/secure/engineering
access = access_tech_storage
contains = list(
/obj/item/weapon/stock_parts/micro_laser,

View File

@@ -51,7 +51,7 @@
/obj/item/weapon/material/minihoe,
/obj/item/device/analyzer/plant_analyzer,
/obj/item/clothing/gloves/botanic_leather,
/obj/item/clothing/suit/apron,
/obj/item/clothing/suit/storage/apron,
/obj/item/weapon/material/minihoe,
/obj/item/weapon/storage/box/botanydisk
)
@@ -141,9 +141,10 @@
access = access_hydroponics
/datum/supply_packs/hydro/tray
name = "Empty hydroponics tray"
cost = 20
name = "Empty hydroponics trays"
cost = 50
containertype = /obj/structure/closet/crate/hydroponics
containername = "Hydroponics tray crate"
contains = list(/obj/machinery/portable_atmospherics/hydroponics{anchored = 0})
access = access_hydroponics
contains = list(/obj/machinery/portable_atmospherics/hydroponics{anchored = 0} = 3)
access = access_hydroponics

View File

@@ -66,6 +66,27 @@
containername = "Surgery crate"
access = access_medical
/datum/supply_packs/med/deathalarm
name = "Death Alarm crate"
contains = list(
/obj/item/weapon/storage/box/cdeathalarm_kit,
/obj/item/weapon/storage/box/cdeathalarm_kit
)
cost = 40
containertype = "/obj/structure/closet/crate/secure"
containername = "Death Alarm crate"
access = access_medical
/datum/supply_packs/med/clotting
name = "Clotting Medicine crate"
contains = list(
/obj/item/weapon/storage/firstaid/clotting
)
cost = 40
containertype = "/obj/structure/closet/crate/secure"
containername = "Clotting Medicine crate"
access = access_medical
/datum/supply_packs/med/sterile
name = "Sterile equipment crate"
contains = list(
@@ -106,7 +127,7 @@
/obj/item/clothing/mask/surgical,
/obj/item/clothing/shoes/white,
/obj/item/weapon/cartridge/cmo,
/obj/item/clothing/gloves/latex,
/obj/item/clothing/gloves/sterile/latex,
/obj/item/device/healthanalyzer,
/obj/item/device/flashlight/pen,
/obj/item/weapon/reagent_containers/syringe
@@ -129,7 +150,7 @@
/obj/item/weapon/storage/firstaid/adv,
/obj/item/clothing/shoes/white,
/obj/item/weapon/cartridge/medical,
/obj/item/clothing/gloves/latex,
/obj/item/clothing/gloves/sterile/latex,
/obj/item/device/healthanalyzer,
/obj/item/device/flashlight/pen,
/obj/item/weapon/reagent_containers/syringe
@@ -151,7 +172,7 @@
/obj/item/clothing/mask/surgical,
/obj/item/clothing/shoes/white,
/obj/item/weapon/cartridge/chemistry,
/obj/item/clothing/gloves/latex,
/obj/item/clothing/gloves/sterile/latex,
/obj/item/weapon/reagent_containers/dropper,
/obj/item/device/healthanalyzer,
/obj/item/weapon/storage/box/pillbottles,
@@ -178,7 +199,7 @@
/obj/item/clothing/accessory/stethoscope,
/obj/item/weapon/storage/firstaid/adv,
/obj/item/clothing/shoes/boots/jackboots,
/obj/item/clothing/gloves/latex,
/obj/item/clothing/gloves/sterile/latex,
/obj/item/device/healthanalyzer,
/obj/item/weapon/cartridge/medical,
/obj/item/device/flashlight/pen,

View File

@@ -74,6 +74,14 @@
containername = "Energy marksman crate"
access = access_armory
/datum/supply_packs/munitions/burstlaser
name = "Burst laser crate"
contains = list(/obj/item/weapon/gun/energy/gun/burst = 2)
cost = 50
containertype = /obj/structure/closet/crate/secure
containername = "Burst laser crate"
access = access_armory
/datum/supply_packs/munitions/ionweapons
name = "Electromagnetic weapons crate"
contains = list(
@@ -85,6 +93,17 @@
containername = "electromagnetic weapons crate"
access = access_armory
/datum/supply_packs/munitions/ionpistols
name = "Electromagnetic pistols crate"
contains = list(
/obj/item/weapon/gun/energy/ionrifle/pistol = 2,
/obj/item/weapon/storage/box/emps
)
cost = 30
containertype = /obj/structure/closet/crate/secure
containername = "electromagnetic weapons crate"
access = access_armory
/datum/supply_packs/randomised/munitions/automatic
name = "Automatic weapon crate"
num_contained = 2

View File

@@ -20,7 +20,7 @@
/obj/item/weapon/cell/high = 2
)
cost = 10
containertype = /obj/structure/closet/crate/secure/gear
containertype = /obj/structure/closet/crate/secure/science
containername = "Robotics assembly"
access = access_robotics
@@ -39,7 +39,7 @@
name = "All robolimb blueprints"
contains = list(
/obj/item/weapon/disk/limb/bishop,
/obj/item/weapon/disk/limb/hesphiastos,
/obj/item/weapon/disk/limb/hephaestus,
/obj/item/weapon/disk/limb/morpheus,
/obj/item/weapon/disk/limb/veymed,
/obj/item/weapon/disk/limb/wardtakahashi,
@@ -56,7 +56,7 @@
name = "Morpheus robolimb blueprints"
contains = list(/obj/item/weapon/disk/limb/morpheus)
cost = 20
containertype = /obj/structure/closet/crate/secure/gear
containertype = /obj/structure/closet/crate/secure/science
containername = "Robolimb blueprints (Morpheus)"
access = access_robotics
@@ -64,15 +64,23 @@
name = "Xion robolimb blueprints"
contains = list(/obj/item/weapon/disk/limb/xion)
cost = 20
containertype = /obj/structure/closet/crate/secure/gear
containertype = /obj/structure/closet/crate/secure/science
containername = "Robolimb blueprints (Xion)"
access = access_robotics
/datum/supply_packs/robotics/robolimbs/hephaestus
name = "Hephaestus robolimb blueprints"
contains = list(/obj/item/weapon/disk/limb/hephaestus)
cost = 35
containertype = /obj/structure/closet/crate/secure/science
containername = "Robolimb blueprints (Hephaestus)"
access = access_robotics
/datum/supply_packs/robotics/robolimbs/wardtakahashi
name = "Ward-Takahashi robolimb blueprints"
contains = list(/obj/item/weapon/disk/limb/wardtakahashi)
cost = 35
containertype = /obj/structure/closet/crate/secure/gear
containertype = /obj/structure/closet/crate/secure/science
containername = "Robolimb blueprints (Ward-Takahashi)"
access = access_robotics
@@ -80,7 +88,7 @@
name = "Zeng Hu robolimb blueprints"
contains = list(/obj/item/weapon/disk/limb/zenghu)
cost = 35
containertype = /obj/structure/closet/crate/secure/gear
containertype = /obj/structure/closet/crate/secure/science
containername = "Robolimb blueprints (Zeng Hu)"
access = access_robotics
@@ -88,7 +96,7 @@
name = "Bishop robolimb blueprints"
contains = list(/obj/item/weapon/disk/limb/bishop)
cost = 70
containertype = /obj/structure/closet/crate/secure/gear
containertype = /obj/structure/closet/crate/secure/science
containername = "Robolimb blueprints (Bishop)"
access = access_robotics
@@ -96,7 +104,7 @@
name = "Vey-Med robolimb blueprints"
contains = list(/obj/item/weapon/disk/limb/veymed)
cost = 70
containertype = /obj/structure/closet/crate/secure/gear
containertype = /obj/structure/closet/crate/secure/science
containername = "Robolimb blueprints (Vey-Med)"
access = access_robotics
@@ -108,7 +116,7 @@
/obj/item/weapon/circuitboard/mecha/ripley/peripherals
)
cost = 25
containertype = /obj/structure/closet/crate/secure
containertype = /obj/structure/closet/crate/secure/science
containername = "APLU \"Ripley\" Circuit Crate"
access = access_robotics
@@ -119,7 +127,7 @@
/obj/item/weapon/circuitboard/mecha/odysseus/main
)
cost = 25
containertype = /obj/structure/closet/crate/secure
containertype = /obj/structure/closet/crate/secure/science
containername = "\"Odysseus\" Circuit Crate"
access = access_robotics
@@ -133,7 +141,7 @@
)
name = "Random APLU modkit"
cost = 200
containertype = /obj/structure/closet/crate
containertype = /obj/structure/closet/crate/science
containername = "heavy crate"
/datum/supply_packs/randomised/robotics/exosuit_mod/durand
@@ -150,4 +158,14 @@
/obj/item/device/kit/paint/gygax/darkgygax,
/obj/item/device/kit/paint/gygax/recitence
)
name = "Random Gygax exosuit modkit"
name = "Random Gygax exosuit modkit"
/datum/supply_packs/robotics/jumper_cables
name = "Jumper kit crate"
contains = list(
/obj/item/device/defib_kit/jumper_kit = 4
)
cost = 30
containertype = /obj/structure/closet/crate/secure/science
containername = "Jumper kit crate"
access = access_robotics

View File

@@ -32,6 +32,7 @@
name = "Exotic seeds crate"
contains = list(
/obj/item/seeds/replicapod = 2,
/obj/item/seeds/ambrosiavulgarisseed = 2,
/obj/item/seeds/libertymycelium,
/obj/item/seeds/reishimycelium,
/obj/item/seeds/random = 6,
@@ -41,4 +42,3 @@
containertype = /obj/structure/closet/crate/hydroponics
containername = "Exotic Seeds crate"
access = access_hydroponics

View File

@@ -367,7 +367,7 @@
/obj/item/clothing/shoes/white = 3,
/obj/item/clothing/mask/gas = 3,
/obj/item/weapon/tank/oxygen = 3,
/obj/item/clothing/gloves/latex,
/obj/item/clothing/gloves/sterile/latex,
/obj/item/weapon/storage/box/gloves
)
cost = 50

View File

@@ -8,6 +8,11 @@
icon_state = "undershirt"
has_color = TRUE
/datum/category_item/underwear/undershirt/shirt_long
name = "Long Shirt"
icon_state = "undershirt_long"
has_color = TRUE
/datum/category_item/underwear/undershirt/shirt_fem
name = "Babydoll shirt"
icon_state = "undershirt_fem"

View File

@@ -11,13 +11,9 @@
log_and_message_admins("has triggered a falsified [src]", user)
/datum/uplink_item/abstract/announcements/fake_centcom
item_cost = DEFAULT_TELECRYSTAL_AMOUNT / 3
/datum/uplink_item/abstract/announcements/fake_centcom/New()
..()
spawn(2)
name = "[command_name()] Update Announcement"
desc = "Causes a falsified [command_name()] Update. Triggers immediately after supplying additional data."
name = "Command Update Announcement"
desc = "Causes a falsified Command Update. Triggers immediately after supplying additional data."
item_cost = 40
/datum/uplink_item/abstract/announcements/fake_centcom/extra_args(var/mob/user)
var/title = sanitize(input("Enter your announcement title.", "Announcement Title") as null|text)

View File

@@ -19,6 +19,16 @@
item_cost = 5
path = /obj/item/weapon/storage/box/ambrosia
/datum/uplink_item/item/medical/clotting
name = "Clotting Medicine injector"
item_cost = 10
path = /obj/item/weapon/reagent_containers/hypospray/autoinjector/clotting
/datum/uplink_item/item/medical/bonemeds
name = "Bone Repair injector"
item_cost = 10
path = /obj/item/weapon/reagent_containers/hypospray/autoinjector/bonemed
/datum/uplink_item/item/medical/ambrosiadeusseeds
name = "Box of 7x ambrosia deus seed packets"
item_cost = 10

View File

@@ -58,11 +58,6 @@
item_cost = 15
path = /obj/item/device/encryptionkey/binary
/datum/uplink_item/item/tools/packagebomb
name = "Package Bomb (Small)"
item_cost = 20
path = /obj/item/weapon/storage/box/syndie_kit/demolitions
/datum/uplink_item/item/tools/hacking_tool
name = "Door Hacking Tool"
item_cost = 20
@@ -81,6 +76,11 @@
item_cost = 30
path = /obj/item/clothing/glasses/thermal/syndi
/datum/uplink_item/item/tools/packagebomb
name = "Package Bomb (Small)"
item_cost = 30
path = /obj/item/weapon/storage/box/syndie_kit/demolitions
/datum/uplink_item/item/tools/powersink
name = "Powersink (DANGER!)"
item_cost = 40
@@ -88,13 +88,13 @@
/datum/uplink_item/item/tools/packagebomb/large
name = "Package Bomb (Large)"
item_cost = 40
item_cost = 60
path = /obj/item/weapon/storage/box/syndie_kit/demolitions_heavy
/*
/datum/uplink_item/item/tools/packagebomb/huge
name = "Package Bomb (Huge)
item_cost = 60
item_cost = 100
path = /obj/item/weapon/storage/box/syndie_kit/demolitions_super_heavy
*/

View File

@@ -1,7 +1,7 @@
/datum/wires/jukebox
random = 1
holder_type = /obj/machinery/media/jukebox
wire_count = 7
wire_count = 11
var/const/WIRE_POWER = 1
var/const/WIRE_HACK = 2
@@ -10,6 +10,10 @@ var/const/WIRE_SPEEDDOWN = 8
var/const/WIRE_REVERSE = 16
var/const/WIRE_NOTHING1 = 32
var/const/WIRE_NOTHING2 = 64
var/const/WIRE_START = 128
var/const/WIRE_STOP = 256
var/const/WIRE_PREV = 512
var/const/WIRE_NEXT = 1024
/datum/wires/jukebox/CanUse(var/mob/living/L)
var/obj/machinery/media/jukebox/A = holder
@@ -40,6 +44,14 @@ var/const/WIRE_NOTHING2 = 64
holder.visible_message("<span class='notice'>\icon[holder] The speakers squeaks.</span>")
if(WIRE_SPEEDDOWN)
holder.visible_message("<span class='notice'>\icon[holder] The speakers rumble.</span>")
if(WIRE_START)
A.StartPlaying()
if(WIRE_STOP)
A.StopPlaying()
if(WIRE_PREV)
A.PrevTrack()
if(WIRE_NEXT)
A.NextTrack()
else
A.shock(usr, 10) // The nothing wires give a chance to shock just for fun

View File

@@ -11,8 +11,7 @@
switch(alert("Travel back to ss13?",,"Yes","No"))
if("Yes")
if(user.z != src.z) return
user.loc.loc.Exited(user)
user.loc = pick(latejoin)
user.forceMove(pick(latejoin))
if("No")
return

View File

@@ -290,19 +290,21 @@
/obj/item/weapon/module
icon = 'icons/obj/module.dmi'
icon_state = "std_module"
item_state = "std_mod"
w_class = ITEMSIZE_SMALL
item_state = "electronic"
flags = CONDUCT
var/mtype = 1 // 1=electronic 2=hardware
/obj/item/weapon/module/card_reader
name = "card reader module"
icon_state = "card_mod"
item_state = "std_mod"
desc = "An electronic module for reading data and ID cards."
/obj/item/weapon/module/power_control
name = "power control module"
icon_state = "power_mod"
item_state = "std_mod"
desc = "Heavy-duty switching circuits for power control."
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
@@ -321,11 +323,13 @@
/obj/item/weapon/module/cell_power
name = "power cell regulator module"
icon_state = "power_mod"
item_state = "std_mod"
desc = "A converter and regulator allowing the use of power cells."
/obj/item/weapon/module/cell_power
name = "power cell charger module"
icon_state = "power_mod"
item_state = "std_mod"
desc = "Charging circuits for power cells."

View File

@@ -107,6 +107,7 @@
candidates -= player
log_debug("[key_name(player)] is not eligible to become a [role_text]: Only ghosts may join as this role! They have been removed from the draft.")
else if(config.use_age_restriction_for_antags && player.current.client.player_age < minimum_player_age)
candidates -= player
log_debug("[key_name(player)] is not eligible to become a [role_text]: Is only [player.current.client.player_age] day\s old, has to be [minimum_player_age] day\s!")
else if(istype(player.current, /mob/living/voice))
candidates -= player

View File

@@ -43,12 +43,15 @@
/datum/antagonist/proc/create_radio(var/freq, var/mob/living/carbon/human/player)
var/obj/item/device/radio/R
if(freq == SYND_FREQ)
R = new/obj/item/device/radio/headset/syndicate(player)
else
R = new/obj/item/device/radio/headset(player)
switch(freq)
if(SYND_FREQ)
R = new/obj/item/device/radio/headset/syndicate(player)
if(RAID_FREQ)
R = new/obj/item/device/radio/headset/raider(player)
else
R = new/obj/item/device/radio/headset(player)
R.set_frequency(freq)
R.set_frequency(freq)
player.equip_to_slot_or_del(R, slot_l_ear)
return R

View File

@@ -232,7 +232,7 @@ var/datum/antagonist/raider/raiders
W.handle_item_insertion(id)
player.equip_to_slot_or_del(W, slot_wear_id)
spawn_money(rand(50,150)*10,W)
create_radio(SYND_FREQ, player)
create_radio(RAID_FREQ, player)
return 1

View File

@@ -52,6 +52,7 @@ var/datum/antagonist/renegade/renegades
/obj/item/weapon/gun/projectile/shotgun/pump/combat,
/obj/item/weapon/gun/projectile/shotgun/doublebarrel,
/obj/item/weapon/gun/projectile/revolver/judge,
/obj/item/weapon/gun/projectile/revolver/lemat,
list(/obj/item/weapon/gun/projectile/shotgun/doublebarrel/pellet, /obj/item/weapon/gun/projectile/shotgun/doublebarrel/sawn),
list(/obj/item/weapon/gun/projectile/deagle, /obj/item/weapon/gun/projectile/deagle/gold, /obj/item/weapon/gun/projectile/deagle/camo),
list(/obj/item/weapon/gun/projectile/revolver/detective, /obj/item/weapon/gun/projectile/revolver/deckard),

View File

@@ -299,9 +299,9 @@ its easier to just keep the beam vertical.
//Deal with gloves the pass finger/palm prints.
if(!ignoregloves)
if(H.gloves != src)
if(prob(75) && istype(H.gloves, /obj/item/clothing/gloves/latex))
if(prob(75) && istype(H.gloves, /obj/item/clothing/gloves/sterile))
return 0
else if(H.gloves && !istype(H.gloves, /obj/item/clothing/gloves/latex))
else if(H.gloves && !istype(H.gloves, /obj/item/clothing/gloves/sterile))
return 0
//More adminstuffz

View File

@@ -125,8 +125,17 @@
if(A:lying) continue
src.throw_impact(A,speed)
if(isobj(A))
if(A.density && !A.throwpass) // **TODO: Better behaviour for windows which are dense, but shouldn't always stop movement
src.throw_impact(A,speed)
if(!A.density || A.throwpass)
continue
// Special handling of windows, which are dense but block only from some directions
if(istype(A, /obj/structure/window))
var/obj/structure/window/W = A
if (!W.is_full_window() && !(turn(src.last_move, 180) & A.dir))
continue
// Same thing for (closed) windoors, which have the same problem
else if(istype(A, /obj/machinery/door/window) && !(turn(src.last_move, 180) & A.dir))
continue
src.throw_impact(A,speed)
/atom/movable/proc/throw_at(atom/target, range, speed, thrower)
if(!target || !src) return 0

View File

@@ -84,6 +84,7 @@ var/global/list/datum/dna/gene/dna_genes[0]
// New stuff
var/species = "Human"
var/list/body_markings = list()
// Make a copy of this strand.
// USE THIS WHEN COPYING STUFF OR YOU'LL GET CORRUPTION!
@@ -93,6 +94,7 @@ var/global/list/datum/dna/gene/dna_genes[0]
new_dna.b_type=b_type
new_dna.real_name=real_name
new_dna.species=species
new_dna.body_markings=body_markings.Copy()
for(var/b=1;b<=DNA_SE_LENGTH;b++)
new_dna.SE[b]=SE[b]
if(b<=DNA_UI_LENGTH)
@@ -152,6 +154,11 @@ var/global/list/datum/dna/gene/dna_genes[0]
SetUIValueRange(DNA_UI_HAIR_STYLE, hair, hair_styles_list.len, 1)
SetUIValueRange(DNA_UI_BEARD_STYLE, beard, facial_hair_styles_list.len,1)
body_markings.Cut()
for(var/obj/item/organ/external/E in character.organs)
if(E.markings.len)
body_markings[E.organ_tag] = E.markings.Copy()
UpdateUI()
// Set a DNA UI block's raw value.

View File

@@ -156,6 +156,13 @@
else
H.gender = MALE
//Body markings
for(var/tag in dna.body_markings)
var/obj/item/organ/external/E = H.organs_by_name[tag]
if(E)
var/list/marklist = dna.body_markings[tag]
E.markings = marklist.Copy()
//Hair
var/hair = dna.GetUIValueRange(DNA_UI_HAIR_STYLE,hair_styles_list.len)
if((0 < hair) && (hair <= hair_styles_list.len))

View File

@@ -61,7 +61,7 @@
T:UpdateDamageIcon()
feedback_add_details("changeling_powers","A[stage]")
if(!do_mob(src, T, 150))
if(!do_mob(src, T, 150) || G.state != GRAB_KILL)
src << "<span class='warning'>Our absorption of [T] has been interrupted!</span>"
changeling.isabsorbing = 0
return

View File

@@ -28,6 +28,7 @@
C.reagents.clear_reagents()
C.ingested.clear_reagents()
var/heal_amount = 5
if(src.mind.changeling.recursive_enhancement)
heal_amount = heal_amount * 2
@@ -38,5 +39,17 @@
C.adjustToxLoss(-heal_amount)
sleep(10)
for(var/obj/item/organ/external/E in C.organs)
var/obj/item/organ/external/G = E
if(G.germ_level)
var/germ_heal = heal_amount * 100
G.germ_level = min(0, G.germ_level - germ_heal)
for(var/obj/item/organ/internal/I in C.internal_organs)
var/obj/item/organ/internal/G = I
if(G.germ_level)
var/germ_heal = heal_amount * 100
G.germ_level = min(0, G.germ_level - germ_heal)
feedback_add_details("changeling_powers","AP")
return 1

View File

@@ -35,6 +35,8 @@
src << "<span class='danger'>You can't speak!</span>"
return 0
src.break_cloak() //No more invisible shrieking
changeling.chem_charges -= 20
var/range = 4
if(src.mind.changeling.recursive_enhancement)
@@ -71,6 +73,12 @@
L.on = 1
L.broken()
/* src.verbs -= /mob/proc/changeling_resonant_shriek
spawn(30 SECONDS)
src << "<span class='notice'>We are ready to use our resonant shriek once more.</span>"
src.verbs |= /mob/proc/changeling_resonant_shriek
Ability Cooldowns don't work properly right now, need to redo this when they are */
feedback_add_details("changeling_powers","RS")
return 1
@@ -93,13 +101,19 @@
src << "<span class='danger'>You can't speak!</span>"
return 0
src.break_cloak() //No more invisible shrieking
changeling.chem_charges -= 20
var/range_heavy = 2
var/range_light = 5
var/range_heavy = 1
var/range_med = 2
var/range_light = 4
var/range_long = 6
if(src.mind.changeling.recursive_enhancement)
range_heavy = range_heavy * 2
range_med = range_med * 2
range_light = range_light * 2
range_long = range_long * 2
src << "<span class='notice'>We are extra loud.</span>"
src.mind.changeling.recursive_enhancement = 0
@@ -111,4 +125,10 @@
L.on = 1
L.broken()
empulse(get_turf(src), range_heavy, range_light, 1)
/* src.verbs -= /mob/proc/changeling_dissonant_shriek
spawn(30 SECONDS)
src << "<span class='notice'>We are ready to use our dissonant shriek once more.</span>"
src.verbs |= /mob/proc/changeling_dissonant_shriek
Ability Cooldowns don't work properly right now, need to redo this when they are */
return 1

View File

@@ -231,7 +231,7 @@ var/list/sacrificed = list()
if(T)
T.hotspot_expose(700,125)
var/rune = src // detaching the proc - in theory
empulse(U, (range_red - 2), range_red)
empulse(U, (range_red - 3), (range_red - 2), (range_red - 1), range_red)
qdel(rune)
return

View File

@@ -350,6 +350,11 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is
M << "<br>"
M.add_ion_law("THE STATION IS [who2pref] [who2]")
if(botEmagChance)
for(var/mob/living/bot/bot in machines)
if(prob(botEmagChance))
bot.emag_act(1)
/*
var/apcnum = 0

View File

@@ -254,7 +254,7 @@
..()
// Best case scenario: Comparable to a low-yield EMP grenade.
// Worst case scenario: Comparable to a standard yield EMP grenade.
empulse(src, rand(2, 4), rand(4, 10))
empulse(src, rand(1, 3), rand(2, 4), rand(3, 7), rand(5, 10))
//Station buster Tunguska
/obj/effect/meteor/tunguska

View File

@@ -126,7 +126,7 @@
safe_blink(src, range = 6)
src << "<span class='warning'>You're teleported against your will!</span>"
if(4)
emp_act(2)
emp_act(3)
if(51 to 100) //Severe
rng = rand(0,3)

View File

@@ -39,7 +39,7 @@
/mob/living/simple_animal/hostile/carp,
/mob/living/simple_animal/hostile/scarybat,
/mob/living/simple_animal/hostile/viscerator,
/mob/living/simple_animal/hostile/retaliate/malf_drone,
/mob/living/simple_animal/hostile/malf_drone,
/mob/living/simple_animal/hostile/giant_spider,
/mob/living/simple_animal/hostile/hivebot,
/mob/living/simple_animal/hostile/diyaab, //Doubt these will get used but might as well,

View File

@@ -32,5 +32,18 @@
H.adjustToxLoss(-heal_power / 5)
H.adjustCloneLoss(-heal_power / 5)
H.radiation = max(host.radiation - ( (heal_power * 2) / 5), 0)
for(var/obj/item/organ/external/E in H.organs)
var/obj/item/organ/external/G = E
if(G.germ_level)
var/germ_heal = heal_power * 10
G.germ_level = min(0, G.germ_level - germ_heal)
for(var/obj/item/organ/internal/I in H.internal_organs)
var/obj/item/organ/internal/G = I
if(G.germ_level)
var/germ_heal = heal_power * 10
G.germ_level = min(0, G.germ_level - germ_heal)
sleep(1 SECOND)
on_expire()

View File

@@ -23,7 +23,7 @@
..()
/obj/item/weapon/spell/spawner/pulsar/on_throw_cast(atom/hit_atom, mob/user)
empulse(hit_atom, 1, 1, log=1)
empulse(hit_atom, 1, 1, 1, 1, log=1)
/obj/effect/temporary_effect/pulsar
name = "pulsar"
@@ -44,7 +44,7 @@
/obj/effect/temporary_effect/pulsar/proc/pulse_loop()
while(pulses_remaining)
sleep(2 SECONDS)
empulse(src, heavy_range = 1, light_range = 2, log = 1)
empulse(src, 1, 1, 2, 2, log = 1)
pulses_remaining--
qdel(src)

View File

@@ -22,7 +22,7 @@
"Chick" = /mob/living/simple_animal/chick,
"Crab" = /mob/living/simple_animal/crab,
"Parrot" = /mob/living/simple_animal/parrot,
"Goat" = /mob/living/simple_animal/hostile/retaliate/goat,
"Goat" = /mob/living/simple_animal/retaliate/goat,
"Cat" = /mob/living/simple_animal/cat,
"Kitten" = /mob/living/simple_animal/cat/kitten,
"Corgi" = /mob/living/simple_animal/corgi,

View File

@@ -23,41 +23,41 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
ideal_character_age = 70 // Old geezer captains ftw
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/captain(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/cap(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
if(5) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/messenger/com(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/captain(H), slot_w_uniform)
if(H.age>49)
// Since we can have something other than the default uniform at this
// point, check if we can actually attach the medal
var/obj/item/clothing/uniform = H.w_uniform
var/obj/item/clothing/accessory/medal/gold/captain/medal = new()
/datum/job/captain/equip(var/mob/living/carbon/human/H, var/alt_title)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/captain(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/cap(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
if(5) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/messenger/com(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/captain(H), slot_w_uniform)
if(H.age>49)
// Since we can have something other than the default uniform at this
// point, check if we can actually attach the medal
var/obj/item/clothing/uniform = H.w_uniform
var/obj/item/clothing/accessory/medal/gold/captain/medal = new()
if(uniform && uniform.can_attach_accessory(medal))
uniform.attach_accessory(null, medal)
else
qdel(medal)
H.equip_to_slot_or_del(new /obj/item/device/pda/captain(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/head/caphat(H), slot_head)
H.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(H), slot_glasses)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H), slot_l_hand)
if(uniform && uniform.can_attach_accessory(medal))
uniform.attach_accessory(null, medal)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H.back), slot_in_backpack)
qdel(medal)
H.equip_to_slot_or_del(new /obj/item/device/pda/captain(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/head/caphat(H), slot_head)
H.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(H), slot_glasses)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H), slot_l_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H.back), slot_in_backpack)
H.implant_loyalty()
H.implant_loyalty()
return 1
return 1
get_access()
return get_all_station_access()
/datum/job/captain/get_access()
return get_all_station_access()
@@ -95,22 +95,24 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
access_hop, access_RC_announce, access_keycard_auth, access_gateway)
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/hop(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/norm(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/head_of_personnel(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/heads/hop(H), slot_belt)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H), slot_l_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H.back), slot_in_backpack)
H.implant_loyalty()
return 1
/datum/job/hop/equip(var/mob/living/carbon/human/H, var/alt_title)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/hop(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/norm(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/head_of_personnel(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/heads/hop(H), slot_belt)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H), slot_l_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H.back), slot_in_backpack)
H.implant_loyalty()
return 1
/datum/job/secretary
title = "Command Secretary"
@@ -131,7 +133,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
access = list(access_heads)
minimal_access = list(access_heads)
/datum/job/secretary/equip(var/mob/living/carbon/human/H)
/datum/job/secretary/equip(var/mob/living/carbon/human/H, var/alt_title)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_com(H), slot_l_ear)
switch(H.backbag)

View File

@@ -15,17 +15,22 @@
alt_titles = list("Barista")
equip(var/mob/living/carbon/human/H)
if(!H) return 0
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/norm(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
if(5) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/messenger(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_service(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/bartender(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/pda/bar(H), slot_belt)
/datum/job/bartender/equip(var/mob/living/carbon/human/H, var/alt_title)
if(!H) return 0
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/norm(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
if(5) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/messenger(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_service(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/bartender(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/pda/bar(H), slot_belt)
if(has_alt_title(H, alt_title,"Bartender"))
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/permit/gun/bar(H), slot_l_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/permit/gun/bar(H.back), slot_in_backpack)
return 1
@@ -46,15 +51,15 @@
alt_titles = list("Cook")
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_service(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chef(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/chef(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/head/chefhat(H), slot_head)
H.equip_to_slot_or_del(new /obj/item/device/pda/chef(H), slot_belt)
return 1
/datum/job/chef/equip(var/mob/living/carbon/human/H, var/alt_title)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_service(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chef(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/chef(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/head/chefhat(H), slot_head)
H.equip_to_slot_or_del(new /obj/item/device/pda/chef(H), slot_belt)
return 1
@@ -74,21 +79,21 @@
alt_titles = list("Hydroponicist")
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_service(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/hydroponics(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/gloves/botanic_leather(H), slot_gloves)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/apron(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/device/analyzer/plant_analyzer(H), slot_s_store)
H.equip_to_slot_or_del(new /obj/item/device/pda/botanist(H), slot_belt)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/hydroponics(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/hyd(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
if(5) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/messenger/hyd(H), slot_back)
return 1
/datum/job/hydro/equip(var/mob/living/carbon/human/H, var/alt_title)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_service(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/hydroponics(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/gloves/botanic_leather(H), slot_gloves)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/apron(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/device/analyzer/plant_analyzer(H), slot_s_store)
H.equip_to_slot_or_del(new /obj/item/device/pda/botanist(H), slot_belt)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/hydroponics(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/hyd(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
if(5) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/messenger/hyd(H), slot_back)
return 1
@@ -112,16 +117,16 @@
ideal_character_age = 40
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_cargo(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/cargo(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/quartermaster(H), slot_belt)
// H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
H.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(H), slot_glasses)
H.equip_to_slot_or_del(new /obj/item/weapon/clipboard(H), slot_l_hand)
return 1
/datum/job/qm/equip(var/mob/living/carbon/human/H, var/alt_title)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_cargo(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/cargo(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/quartermaster(H), slot_belt)
// H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
H.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(H), slot_glasses)
H.equip_to_slot_or_del(new /obj/item/weapon/clipboard(H), slot_l_hand)
return 1
@@ -139,14 +144,14 @@
access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_mining, access_mining_station)
minimal_access = list(access_maint_tunnels, access_cargo, access_cargo_bot, access_mailsorting)
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_cargo(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/cargotech(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/cargo(H), slot_belt)
// H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
return 1
/datum/job/cargo_tech/equip(var/mob/living/carbon/human/H, var/alt_title)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_cargo(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/cargotech(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/cargo(H), slot_belt)
// H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
return 1
@@ -166,27 +171,27 @@
minimal_access = list(access_mining, access_mining_station, access_mailsorting)
alt_titles = list("Drill Technician","Prospector")
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_cargo (H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/industrial(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/eng(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
if(5) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/messenger/engi(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/miner(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/pda/shaftminer(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
// H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/crowbar(H), slot_l_hand)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/bag/ore(H), slot_l_store)
else
H.equip_to_slot_or_del(new /obj/item/weapon/crowbar(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/bag/ore(H), slot_in_backpack)
return 1
/datum/job/mining/equip(var/mob/living/carbon/human/H, var/alt_title)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_cargo (H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/industrial(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/eng(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
if(5) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/messenger/engi(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/miner(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/pda/shaftminer(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
// H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/crowbar(H), slot_l_hand)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/bag/ore(H), slot_l_store)
else
H.equip_to_slot_or_del(new /obj/item/weapon/crowbar(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/bag/ore(H), slot_in_backpack)
return 1
equip_survival(var/mob/living/carbon/human/H)
/datum/job/mining/equip_survival(var/mob/living/carbon/human/H)
if(!H) return 0
H.species.equip_survival_gear(H,1)
return 1
@@ -207,13 +212,13 @@
alt_titles = list("Custodian", "Sanitation Technician")
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_service(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/janitor(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/janitor(H), slot_belt)
return 1
/datum/job/janitor/equip(var/mob/living/carbon/human/H, var/alt_title)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_service(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/janitor(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/janitor(H), slot_belt)
return 1
@@ -234,13 +239,13 @@
alt_titles = list("Journalist", "Professor", "Historian", "Writer")
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/clothing/under/suit_jacket/red(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/pda/librarian(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/weapon/barcodescanner(H), slot_l_hand)
return 1
/datum/job/librarian/equip(var/mob/living/carbon/human/H, var/alt_title)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/clothing/under/suit_jacket/red(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/pda/librarian(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/weapon/barcodescanner(H), slot_l_hand)
return 1
@@ -261,22 +266,22 @@
minimal_access = list(access_lawyer, access_sec_doors, access_heads)
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/ia(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/norm(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
if(5) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/messenger(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/internalaffairs(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/internalaffairs(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses/big(H), slot_glasses)
H.equip_to_slot_or_del(new /obj/item/device/pda/lawyer(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/briefcase(H), slot_l_hand)
/datum/job/lawyer/equip(var/mob/living/carbon/human/H, var/alt_title)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/ia(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/norm(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
if(5) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/messenger(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/internalaffairs(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/internalaffairs(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses/big(H), slot_glasses)
H.equip_to_slot_or_del(new /obj/item/device/pda/lawyer(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/briefcase(H), slot_l_hand)
H.implant_loyalty()
H.implant_loyalty()
return 1
return 1

View File

@@ -15,146 +15,146 @@
alt_titles = list("Counselor")
equip(var/mob/living/carbon/human/H, var/alt_title, var/ask_questions = TRUE)
if(!H) return 0
/datum/job/chaplain/equip(var/mob/living/carbon/human/H, var/alt_title, var/ask_questions = TRUE)
if(!H) return 0
var/obj/item/weapon/storage/bible/B = new /obj/item/weapon/storage/bible(H) //BS12 EDIT
H.equip_to_slot_or_del(B, slot_l_hand)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chaplain(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/pda/chaplain(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
if(!ask_questions)
return 1
spawn(0)
var/religion_name = "Christianity"
var/new_religion = sanitize(input(H, "You are the crew services officer. Would you like to change your religion? Default is Christianity, in SPACE.", "Name change", religion_name), MAX_NAME_LEN)
if (!new_religion)
new_religion = religion_name
switch(lowertext(new_religion))
if("christianity")
B.name = pick("The Holy Bible","The Dead Sea Scrolls")
if("satanism")
B.name = "The Unholy Bible"
if("cthulu")
B.name = "The Necronomicon"
if("islam")
B.name = "Quran"
if("scientology")
B.name = pick("The Biography of L. Ron Hubbard","Dianetics")
if("chaos")
B.name = "The Book of Lorgar"
if("imperium")
B.name = "Uplifting Primer"
if("toolboxia")
B.name = "Toolbox Manifesto"
if("homosexuality")
B.name = "Guys Gone Wild"
//if("lol", "wtf", "gay", "penis", "ass", "poo", "badmin", "shitmin", "deadmin", "cock", "cocks")
// B.name = pick("Woodys Got Wood: The Aftermath", "War of the Cocks", "Sweet Bro and Hella Jef: Expanded Edition")
// H.setBrainLoss(100) // starts off retarded as fuck
if("science")
B.name = pick("Principle of Relativity", "Quantum Enigma: Physics Encounters Consciousness", "Programming the Universe", "Quantum Physics and Theology", "String Theory for Dummies", "How To: Build Your Own Warp Drive", "The Mysteries of Bluespace", "Playing God: Collector's Edition")
else
B.name = "The Holy Book of [new_religion]"
feedback_set_details("religion_name","[new_religion]")
spawn(1)
var/deity_name = "Space Jesus"
var/new_deity = sanitize(input(H, "Would you like to change your deity? Default is Space Jesus.", "Name change", deity_name), MAX_NAME_LEN)
if ((length(new_deity) == 0) || (new_deity == "Space Jesus") )
new_deity = deity_name
B.deity_name = new_deity
var/accepted = 0
var/outoftime = 0
spawn(200) // 20 seconds to choose
outoftime = 1
var/new_book_style = "Bible"
while(!accepted)
if(!B) break // prevents possible runtime errors
new_book_style = input(H,"Which bible style would you like?") in list("Bible", "Koran", "Scrapbook", "Creeper", "White Bible", "Holy Light", "Athiest", "Tome", "The King in Yellow", "Ithaqua", "Scientology", "the bible melts", "Necronomicon")
switch(new_book_style)
if("Koran")
B.icon_state = "koran"
B.item_state = "koran"
for(var/area/chapel/main/A in world)
for(var/turf/T in A.contents)
if(T.icon_state == "carpetsymbol")
T.set_dir(4)
if("Scrapbook")
B.icon_state = "scrapbook"
B.item_state = "scrapbook"
if("Creeper")
B.icon_state = "creeper"
B.item_state = "syringe_kit"
if("White Bible")
B.icon_state = "white"
B.item_state = "syringe_kit"
if("Holy Light")
B.icon_state = "holylight"
B.item_state = "syringe_kit"
if("Athiest")
B.icon_state = "athiest"
B.item_state = "syringe_kit"
for(var/area/chapel/main/A in world)
for(var/turf/T in A.contents)
if(T.icon_state == "carpetsymbol")
T.set_dir(10)
if("Tome")
B.icon_state = "tome"
B.item_state = "syringe_kit"
if("The King in Yellow")
B.icon_state = "kingyellow"
B.item_state = "kingyellow"
if("Ithaqua")
B.icon_state = "ithaqua"
B.item_state = "ithaqua"
if("Scientology")
B.icon_state = "scientology"
B.item_state = "scientology"
for(var/area/chapel/main/A in world)
for(var/turf/T in A.contents)
if(T.icon_state == "carpetsymbol")
T.set_dir(8)
if("the bible melts")
B.icon_state = "melted"
B.item_state = "melted"
if("Necronomicon")
B.icon_state = "necronomicon"
B.item_state = "necronomicon"
else
// if christian bible, revert to default
B.icon_state = "bible"
B.item_state = "bible"
for(var/area/chapel/main/A in world)
for(var/turf/T in A.contents)
if(T.icon_state == "carpetsymbol")
T.set_dir(2)
H.update_inv_l_hand() // so that it updates the bible's item_state in his hand
switch(input(H,"Look at your bible - is this what you want?") in list("Yes","No"))
if("Yes")
accepted = 1
if("No")
if(outoftime)
H << "Welp, out of time, buddy. You're stuck. Next time choose faster."
accepted = 1
if(ticker)
ticker.Bible_icon_state = B.icon_state
ticker.Bible_item_state = B.item_state
ticker.Bible_name = B.name
ticker.Bible_deity_name = B.deity_name
feedback_set_details("religion_deity","[new_deity]")
feedback_set_details("religion_book","[new_book_style]")
var/obj/item/weapon/storage/bible/B = new /obj/item/weapon/storage/bible(H) //BS12 EDIT
H.equip_to_slot_or_del(B, slot_l_hand)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chaplain(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/pda/chaplain(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
if(!ask_questions)
return 1
spawn(0)
var/religion_name = "Christianity"
var/new_religion = sanitize(input(H, "You are the crew services officer. Would you like to change your religion? Default is Christianity, in SPACE.", "Name change", religion_name), MAX_NAME_LEN)
if (!new_religion)
new_religion = religion_name
switch(lowertext(new_religion))
if("christianity")
B.name = pick("The Holy Bible","The Dead Sea Scrolls")
if("satanism")
B.name = "The Unholy Bible"
if("cthulu")
B.name = "The Necronomicon"
if("islam")
B.name = "Quran"
if("scientology")
B.name = pick("The Biography of L. Ron Hubbard","Dianetics")
if("chaos")
B.name = "The Book of Lorgar"
if("imperium")
B.name = "Uplifting Primer"
if("toolboxia")
B.name = "Toolbox Manifesto"
if("homosexuality")
B.name = "Guys Gone Wild"
//if("lol", "wtf", "gay", "penis", "ass", "poo", "badmin", "shitmin", "deadmin", "cock", "cocks")
// B.name = pick("Woodys Got Wood: The Aftermath", "War of the Cocks", "Sweet Bro and Hella Jef: Expanded Edition")
// H.setBrainLoss(100) // starts off retarded as fuck
if("science")
B.name = pick("Principle of Relativity", "Quantum Enigma: Physics Encounters Consciousness", "Programming the Universe", "Quantum Physics and Theology", "String Theory for Dummies", "How To: Build Your Own Warp Drive", "The Mysteries of Bluespace", "Playing God: Collector's Edition")
else
B.name = "The Holy Book of [new_religion]"
feedback_set_details("religion_name","[new_religion]")
spawn(1)
var/deity_name = "Space Jesus"
var/new_deity = sanitize(input(H, "Would you like to change your deity? Default is Space Jesus.", "Name change", deity_name), MAX_NAME_LEN)
if ((length(new_deity) == 0) || (new_deity == "Space Jesus") )
new_deity = deity_name
B.deity_name = new_deity
var/accepted = 0
var/outoftime = 0
spawn(200) // 20 seconds to choose
outoftime = 1
var/new_book_style = "Bible"
while(!accepted)
if(!B) break // prevents possible runtime errors
new_book_style = input(H,"Which bible style would you like?") in list("Bible", "Koran", "Scrapbook", "Creeper", "White Bible", "Holy Light", "Athiest", "Tome", "The King in Yellow", "Ithaqua", "Scientology", "the bible melts", "Necronomicon")
switch(new_book_style)
if("Koran")
B.icon_state = "koran"
B.item_state = "koran"
for(var/area/chapel/main/A in world)
for(var/turf/T in A.contents)
if(T.icon_state == "carpetsymbol")
T.set_dir(4)
if("Scrapbook")
B.icon_state = "scrapbook"
B.item_state = "scrapbook"
if("Creeper")
B.icon_state = "creeper"
B.item_state = "syringe_kit"
if("White Bible")
B.icon_state = "white"
B.item_state = "syringe_kit"
if("Holy Light")
B.icon_state = "holylight"
B.item_state = "syringe_kit"
if("Athiest")
B.icon_state = "athiest"
B.item_state = "syringe_kit"
for(var/area/chapel/main/A in world)
for(var/turf/T in A.contents)
if(T.icon_state == "carpetsymbol")
T.set_dir(10)
if("Tome")
B.icon_state = "tome"
B.item_state = "syringe_kit"
if("The King in Yellow")
B.icon_state = "kingyellow"
B.item_state = "kingyellow"
if("Ithaqua")
B.icon_state = "ithaqua"
B.item_state = "ithaqua"
if("Scientology")
B.icon_state = "scientology"
B.item_state = "scientology"
for(var/area/chapel/main/A in world)
for(var/turf/T in A.contents)
if(T.icon_state == "carpetsymbol")
T.set_dir(8)
if("the bible melts")
B.icon_state = "melted"
B.item_state = "melted"
if("Necronomicon")
B.icon_state = "necronomicon"
B.item_state = "necronomicon"
else
// if christian bible, revert to default
B.icon_state = "bible"
B.item_state = "bible"
for(var/area/chapel/main/A in world)
for(var/turf/T in A.contents)
if(T.icon_state == "carpetsymbol")
T.set_dir(2)
H.update_inv_l_hand() // so that it updates the bible's item_state in his hand
switch(input(H,"Look at your bible - is this what you want?") in list("Yes","No"))
if("Yes")
accepted = 1
if("No")
if(outoftime)
H << "Welp, out of time, buddy. You're stuck. Next time choose faster."
accepted = 1
if(ticker)
ticker.Bible_icon_state = B.icon_state
ticker.Bible_item_state = B.item_state
ticker.Bible_name = B.name
ticker.Bible_deity_name = B.deity_name
feedback_set_details("religion_deity","[new_deity]")
feedback_set_details("religion_book","[new_book_style]")
return 1
/datum/job/chaplain/equip_preview(var/mob/living/carbon/human/H, var/alt_title)
return equip(H, alt_title, FALSE)

View File

@@ -28,26 +28,26 @@
minimal_player_age = 7
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/ce(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/industrial(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/eng(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
if(5) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/messenger/engi(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chief_engineer(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/pda/heads/ce(H), slot_l_store)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/boots/workboots(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/head/hardhat/white(H), slot_head)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/utility/full(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
return 1
/datum/job/chief_engineer/equip(var/mob/living/carbon/human/H, var/alt_title)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/ce(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/industrial(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/eng(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
if(5) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/messenger/engi(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chief_engineer(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/pda/heads/ce(H), slot_l_store)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/boots/workboots(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/head/hardhat/white(H), slot_head)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/utility/full(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
return 1
equip_survival(var/mob/living/carbon/human/H)
if(!H) return 0
H.species.equip_survival_gear(H,1)
return 1
/datum/job/chief_engineer/equip_survival(var/mob/living/carbon/human/H, var/alt_title)
if(!H) return 0
H.species.equip_survival_gear(H,1)
return 1
/datum/job/engineer
@@ -67,26 +67,26 @@
alt_titles = list("Maintenance Technician","Engine Technician","Electrician")
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_eng(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/industrial(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/eng(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
if(5) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/messenger/engi(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/engineer(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/boots/workboots(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/utility/full(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/head/hardhat(H), slot_head)
H.equip_to_slot_or_del(new /obj/item/device/t_scanner(H), slot_r_store)
H.equip_to_slot_or_del(new /obj/item/device/pda/engineering(H), slot_l_store)
return 1
/datum/job/engineer/equip(var/mob/living/carbon/human/H, var/alt_title)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_eng(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/industrial(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/eng(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
if(5) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/messenger/engi(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/engineer(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/boots/workboots(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/utility/full(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/head/hardhat(H), slot_head)
H.equip_to_slot_or_del(new /obj/item/device/t_scanner(H), slot_r_store)
H.equip_to_slot_or_del(new /obj/item/device/pda/engineering(H), slot_l_store)
return 1
equip_survival(var/mob/living/carbon/human/H)
if(!H) return 0
H.species.equip_survival_gear(H,1)
return 1
/datum/job/engineer/equip_survival(var/mob/living/carbon/human/H)
if(!H) return 0
H.species.equip_survival_gear(H,1)
return 1
/datum/job/atmos
@@ -106,21 +106,21 @@
minimal_player_age = 3
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_eng(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/norm(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
if(5) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/messenger/engi(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/atmospheric_technician(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/boots/workboots(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/atmos(H), slot_l_store)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/utility/atmostech/(H), slot_belt)
return 1
/datum/job/atmos/equip(var/mob/living/carbon/human/H, var/alt_title)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_eng(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/norm(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
if(5) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/messenger/engi(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/atmospheric_technician(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/boots/workboots(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/atmos(H), slot_l_store)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/utility/atmostech/(H), slot_belt)
return 1
equip_survival(var/mob/living/carbon/human/H)
if(!H) return 0
H.species.equip_survival_gear(H,1)
return 1
/datum/job/atmos/equip_survival(var/mob/living/carbon/human/H)
if(!H) return 0
H.species.equip_survival_gear(H,1)
return 1

View File

@@ -23,21 +23,21 @@
minimal_player_age = 10
ideal_character_age = 50
equip(var/mob/living/carbon/human/H, var/alt_title)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/cmo(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/medic(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/med(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
if(5) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/messenger/med(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chief_medical_officer(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/heads/cmo(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/adv(H), slot_l_hand)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/cmo(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/device/healthanalyzer(H), slot_s_store)
return 1
/datum/job/cmo/equip(var/mob/living/carbon/human/H, var/alt_title)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/cmo(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/medic(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/med(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
if(5) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/messenger/med(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chief_medical_officer(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/heads/cmo(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/adv(H), slot_l_hand)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/cmo(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/device/healthanalyzer(H), slot_s_store)
return 1
/datum/job/doctor
title = "Medical Doctor"
@@ -55,50 +55,50 @@
minimal_access = list(access_medical, access_medical_equip, access_morgue, access_surgery, access_virology, access_eva)
alt_titles = list("Surgeon","Emergency Physician","Nurse","Virologist")
equip(var/mob/living/carbon/human/H, var/alt_title)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_med(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/adv(H), slot_l_hand)
/datum/job/doctor/equip(var/mob/living/carbon/human/H, var/alt_title)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_med(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/adv(H), slot_l_hand)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/medic(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/med(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
if(5) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/messenger/med(H), slot_back)
if(has_alt_title(H, alt_title,"Emergency Physician"))
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/fr_jacket(H), slot_wear_suit)
else if(has_alt_title(H, alt_title,"Surgeon"))
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical/blue(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/head/surgery/blue(H), slot_head)
else if(has_alt_title(H, alt_title,"Virologist"))
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/virologist(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/virologist(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/mask/surgical(H), slot_wear_mask)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/medic(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/med(H), slot_back)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/virology(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/vir(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
if(5) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/messenger/med(H), slot_back)
if(has_alt_title(H, alt_title,"Emergency Physician"))
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/fr_jacket(H), slot_wear_suit)
else if(has_alt_title(H, alt_title,"Surgeon"))
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical/blue(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/head/surgery/blue(H), slot_head)
else if(has_alt_title(H, alt_title,"Virologist"))
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/virologist(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/virologist(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/mask/surgical(H), slot_wear_mask)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/virology(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/vir(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
if(5) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/messenger/viro(H), slot_back)
else if(has_alt_title(H, alt_title,"Medical Doctor"))
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat(H), slot_wear_suit)
else if(has_alt_title(H, alt_title,"Nurse"))
if(H.gender == FEMALE)
if(prob(50))
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/nursesuit(H), slot_w_uniform)
else
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/nurse(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/head/nursehat(H), slot_head)
if(5) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/messenger/viro(H), slot_back)
else if(has_alt_title(H, alt_title,"Medical Doctor"))
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat(H), slot_wear_suit)
else if(has_alt_title(H, alt_title,"Nurse"))
if(H.gender == FEMALE)
if(prob(50))
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/nursesuit(H), slot_w_uniform)
else
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical/purple(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/nurse(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/head/nursehat(H), slot_head)
else
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/device/pda/medical(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/device/healthanalyzer(H), slot_s_store)
return 1
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical/purple(H), slot_w_uniform)
else
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/device/pda/medical(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/device/healthanalyzer(H), slot_s_store)
return 1
@@ -121,19 +121,19 @@
minimal_player_age = 3
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_med(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chemist(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/chemist(H), slot_belt)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/chemistry(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/chem(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
if(5) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/messenger/chem(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/chemist(H), slot_wear_suit)
return 1
/datum/job/chemist/equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_med(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chemist(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/chemist(H), slot_belt)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/chemistry(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/chem(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
if(5) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/messenger/chem(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/chemist(H), slot_wear_suit)
return 1
/* I'm commenting out Geneticist so you can't actually see it in the job menu, given that you can't play as one - Jon.
@@ -151,19 +151,19 @@
access = list(access_medical, access_morgue, access_surgery, access_chemistry, access_virology, access_genetics, access_research)
minimal_access = list(access_medical, access_morgue, access_genetics, access_research)
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_medsci(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/geneticist(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/geneticist(H), slot_belt)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/genetics(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/gen(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/genetics(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/device/flashlight/pen(H), slot_s_store)
return 1
/datum/job/geneticist/equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_medsci(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/geneticist(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/geneticist(H), slot_belt)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/genetics(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/gen(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/genetics(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/device/flashlight/pen(H), slot_s_store)
return 1
*/
/datum/job/psychiatrist
@@ -182,23 +182,23 @@
minimal_access = list(access_medical, access_medical_equip, access_psychiatrist)
alt_titles = list("Psychologist")
equip(var/mob/living/carbon/human/H, var/alt_title)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_med(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/norm(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
if(5) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/messenger(H), slot_back)
if(has_alt_title(H, alt_title,"Psychiatrist"))
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/psych(H), slot_w_uniform)
else if(has_alt_title(H, alt_title,"Psychologist"))
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/psych/turtleneck(H), slot_w_uniform)
else
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/laceup(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/medical(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat(H), slot_wear_suit)
/datum/job/psychiatrist/equip(var/mob/living/carbon/human/H, var/alt_title)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_med(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/norm(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
if(5) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/messenger(H), slot_back)
if(has_alt_title(H, alt_title,"Psychiatrist"))
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/psych(H), slot_w_uniform)
else if(has_alt_title(H, alt_title,"Psychologist"))
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/psych/turtleneck(H), slot_w_uniform)
else
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/laceup(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/medical(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat(H), slot_wear_suit)
/datum/job/Paramedic
@@ -217,29 +217,29 @@
minimal_access = list(access_medical, access_medical_equip, access_morgue, access_eva, access_maint_tunnels, access_external_airlocks)
alt_titles = list("Emergency Medical Technician")
equip(var/mob/living/carbon/human/H, var/alt_title)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_med(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/boots/jackboots(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/adv(H), slot_l_hand)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/medic(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/med(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
if(5) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/messenger/med(H), slot_back)
if(has_alt_title(H, alt_title,"Emergency Medical Technician"))
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical/paramedic(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/fr_jacket(H), slot_wear_suit)
else if(has_alt_title(H, alt_title,"Paramedic"))
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical/black(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/fr_jacket(H), slot_wear_suit)
else
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/medical/emt(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/device/pda/medical(H), slot_l_store)
return 1
/datum/job/Paramedic/equip(var/mob/living/carbon/human/H, var/alt_title)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_med(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/boots/jackboots(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/adv(H), slot_l_hand)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/medic(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/med(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
if(5) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/messenger/med(H), slot_back)
if(has_alt_title(H, alt_title,"Emergency Medical Technician"))
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical/paramedic(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/fr_jacket(H), slot_wear_suit)
else if(has_alt_title(H, alt_title,"Paramedic"))
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical/black(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/fr_jacket(H), slot_wear_suit)
else
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/medical/emt(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/device/pda/medical(H), slot_l_store)
return 1
equip_survival(var/mob/living/carbon/human/H)
if(!H) return 0
H.species.equip_survival_gear(H,1)
return 1
/datum/job/Paramedic/equip_survival(var/mob/living/carbon/human/H)
if(!H) return 0
H.species.equip_survival_gear(H,1)
return 1

View File

@@ -26,20 +26,20 @@
minimal_player_age = 14
ideal_character_age = 50
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/rd(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/research_director(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/pda/heads/rd(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/weapon/clipboard(H), slot_l_hand)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/toxins(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/tox(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
if(5) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/messenger/tox(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat(H), slot_wear_suit)
return 1
/datum/job/rd/equip(var/mob/living/carbon/human/H, var/alt_title)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/rd(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/research_director(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/pda/heads/rd(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/weapon/clipboard(H), slot_l_hand)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/toxins(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/tox(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
if(5) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/messenger/tox(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat(H), slot_wear_suit)
return 1
@@ -61,19 +61,19 @@
minimal_player_age = 14
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sci(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/scientist(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/science(H), slot_belt)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/toxins(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/tox(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
if(5) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/messenger/tox(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/science(H), slot_wear_suit)
return 1
/datum/job/scientist/equip(var/mob/living/carbon/human/H, var/alt_title)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sci(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/scientist(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/science(H), slot_belt)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/toxins(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/tox(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
if(5) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/messenger/tox(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/science(H), slot_wear_suit)
return 1
/datum/job/xenobiologist
title = "Xenobiologist"
@@ -93,19 +93,19 @@
minimal_player_age = 14
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sci(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/scientist(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/science(H), slot_belt)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/toxins(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/tox(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
if(5) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/messenger/tox(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/science(H), slot_wear_suit)
return 1
/datum/job/xenobiologist/equip(var/mob/living/carbon/human/H, var/alt_title)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sci(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/scientist(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/science(H), slot_belt)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/toxins(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/tox(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
if(5) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/messenger/tox(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/science(H), slot_wear_suit)
return 1
/datum/job/roboticist
title = "Roboticist"
@@ -125,14 +125,14 @@
minimal_player_age = 7
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sci(H), slot_l_ear)
if(H.backbag == 2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
if(H.backbag == 3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/norm(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/roboticist(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/roboticist(H), slot_r_store)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/utility/full(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat(H), slot_wear_suit)
return 1
/datum/job/roboticist/equip(var/mob/living/carbon/human/H, var/alt_title)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sci(H), slot_l_ear)
if(H.backbag == 2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
if(H.backbag == 3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/norm(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/roboticist(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/roboticist(H), slot_r_store)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/utility/full(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat(H), slot_wear_suit)
return 1

View File

@@ -20,30 +20,30 @@
access_forensics_lockers, access_morgue, access_maint_tunnels, access_all_personal_lockers,
access_research, access_engine, access_mining, access_medical, access_construction, access_mailsorting,
access_heads, access_hos, access_RC_announce, access_keycard_auth, access_gateway, access_external_airlocks)
alt_titles = list("Commander")
alt_titles = list("Commander", "Chief of Security")
minimum_character_age = 25
minimal_player_age = 14
equip(var/mob/living/carbon/human/H)
if(!H) return 0
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/security(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/sec(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
if(5) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/messenger/sec(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/hos(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/head_of_security(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/boots/jackboots(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/heads/hos(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
// H.equip_to_slot_or_del(new /obj/item/clothing/mask/gas(H), slot_wear_mask) //Grab one from the armory you donk
H.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses/sechud(H), slot_glasses)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_l_store)
else
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack)
H.implant_loyalty()
return 1
/datum/job/hos/equip(var/mob/living/carbon/human/H, var/alt_title)
if(!H) return 0
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/security(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/sec(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
if(5) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/messenger/sec(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/hos(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/head_of_security(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/boots/jackboots(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/heads/hos(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
// H.equip_to_slot_or_del(new /obj/item/clothing/mask/gas(H), slot_wear_mask) //Grab one from the armory you donk
H.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses/sechud(H), slot_glasses)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_l_store)
else
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack)
H.implant_loyalty()
return 1
@@ -63,26 +63,26 @@
minimal_access = list(access_security, access_eva, access_sec_doors, access_brig, access_armory, access_maint_tunnels, access_external_airlocks)
minimal_player_age = 5
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/security(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/sec(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
if(5) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/messenger/sec(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/warden(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/boots/jackboots(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/warden(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
H.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses/sechud(H), slot_glasses)
// H.equip_to_slot_or_del(new /obj/item/clothing/mask/gas(H), slot_wear_mask) //Grab one from the armory you donk
H.equip_to_slot_or_del(new /obj/item/device/flash(H), slot_l_store)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_l_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack)
return 1
/datum/job/warden/equip(var/mob/living/carbon/human/H, var/alt_title)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/security(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/sec(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
if(5) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/messenger/sec(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/warden(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/boots/jackboots(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/warden(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
H.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses/sechud(H), slot_glasses)
// H.equip_to_slot_or_del(new /obj/item/clothing/mask/gas(H), slot_wear_mask) //Grab one from the armory you donk
H.equip_to_slot_or_del(new /obj/item/device/flash(H), slot_l_store)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_l_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack)
return 1
@@ -102,31 +102,32 @@
minimal_access = list(access_security, access_sec_doors, access_forensics_lockers, access_morgue, access_maint_tunnels, access_eva, access_external_airlocks)
economic_modifier = 5
minimal_player_age = 3
equip(var/mob/living/carbon/human/H, var/alt_title)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/norm(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
if(5) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/messenger(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/under/det(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/laceup(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/detective(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
H.equip_to_slot_or_del(new /obj/item/weapon/flame/lighter/zippo(H), slot_l_store)
if(H.backbag == 1)//Why cant some of these things spawn in his office?
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/evidence(H), slot_l_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/evidence(H), slot_in_backpack)
if(has_alt_title(H, alt_title,"Forensic Technician"))
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/forensics/blue(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/briefcase/crimekit, slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/det_trench(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/head/det(H), slot_head)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/briefcase/crimekit(H), slot_r_hand)
return 1
/datum/job/detective/equip(var/mob/living/carbon/human/H, var/alt_title)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/norm(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
if(5) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/messenger(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/under/det(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/laceup(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/detective(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
H.equip_to_slot_or_del(new /obj/item/weapon/flame/lighter/zippo(H), slot_l_store)
if(H.backbag == 1)//Why cant some of these things spawn in his office?
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/evidence(H), slot_l_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/evidence(H), slot_in_backpack)
if(has_alt_title(H, alt_title,"Forensic Technician"))
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/forensics/blue(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/briefcase/crimekit, slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/det_trench(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/head/det(H), slot_head)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/briefcase/crimekit(H), slot_r_hand)
return 1
@@ -146,22 +147,23 @@
access = list(access_security, access_eva, access_sec_doors, access_brig, access_maint_tunnels, access_morgue, access_external_airlocks)
minimal_access = list(access_security, access_eva, access_sec_doors, access_brig, access_maint_tunnels, access_external_airlocks)
minimal_player_age = 3
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/security(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/sec(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
if(5) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/messenger/sec(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/security(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/boots/jackboots(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/security(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_s_store)
H.equip_to_slot_or_del(new /obj/item/device/flash(H), slot_l_store)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_l_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack)
return 1
/datum/job/officer/equip(var/mob/living/carbon/human/H, var/alt_title)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/security(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/sec(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
if(5) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/messenger/sec(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/security(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/boots/jackboots(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/security(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_s_store)
H.equip_to_slot_or_del(new /obj/item/device/flash(H), slot_l_store)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_l_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack)
return 1

View File

@@ -403,13 +403,13 @@ var/global/datum/controller/occupations/job_master
if(!S)
S = locate("start*[rank]") // use old stype
if(istype(S, /obj/effect/landmark/start) && istype(S.loc, /turf))
H.loc = S.loc
H.forceMove(S.loc)
else
LateSpawn(H, rank)
// Moving wheelchair if they have one
if(H.buckled && istype(H.buckled, /obj/structure/bed/chair/wheelchair))
H.buckled.loc = H.loc
H.buckled.forceMove(H.loc)
H.buckled.set_dir(H.dir)
// If they're head, give them the account info for their department
@@ -614,12 +614,12 @@ var/global/datum/controller/occupations/job_master
if(spawnpos && istype(spawnpos))
if(spawnpos.check_job_spawning(rank))
H.loc = pick(spawnpos.turfs)
H.forceMove(pick(spawnpos.turfs))
. = spawnpos.msg
else
H << "Your chosen spawnpoint ([spawnpos.display_name]) is unavailable for your chosen job. Spawning you at the Arrivals shuttle instead."
H.loc = pick(latejoin)
H.forceMove(pick(latejoin))
. = "has arrived on the station"
else
H.loc = pick(latejoin)
H.forceMove(pick(latejoin))
. = "has arrived on the station"

View File

@@ -335,17 +335,16 @@
organStatus["bleeding"] = 1
if(E.status & ORGAN_DEAD)
organStatus["dead"] = 1
for(var/datum/wound/W in E.wounds)
if(W.internal)
organStatus["internalBleeding"] = 1
break
organData["status"] = organStatus
if(istype(E, /obj/item/organ/external/chest) && H.is_lung_ruptured())
organData["lungRuptured"] = 1
for(var/datum/wound/W in E.wounds)
if(W.internal)
organData["internalBleeding"] = 1
break
extOrganData.Add(list(organData))
occupantData["extOrgan"] = extOrganData

View File

@@ -93,7 +93,7 @@
req_access = list(access_rd, access_atmospherics, access_engine_equip)
TLV["oxygen"] = list(-1.0, -1.0,-1.0,-1.0) // Partial pressure, kpa
TLV["carbon dioxide"] = list(-1.0, -1.0, 5, 10) // Partial pressure, kpa
TLV["phoron"] = list(-1.0, -1.0, 0.2, 0.5) // Partial pressure, kpa
TLV["phoron"] = list(-1.0, -1.0, 0, 0.5) // Partial pressure, kpa
TLV["other"] = list(-1.0, -1.0, 0.5, 1.0) // Partial pressure, kpa
TLV["pressure"] = list(0,ONE_ATMOSPHERE*0.10,ONE_ATMOSPHERE*1.40,ONE_ATMOSPHERE*1.60) /* kpa */
TLV["temperature"] = list(20, 40, 140, 160) // K
@@ -121,7 +121,7 @@
// breathable air according to human/Life()
TLV["oxygen"] = list(16, 19, 135, 140) // Partial pressure, kpa
TLV["carbon dioxide"] = list(-1.0, -1.0, 5, 10) // Partial pressure, kpa
TLV["phoron"] = list(-1.0, -1.0, 0.2, 0.5) // Partial pressure, kpa
TLV["phoron"] = list(-1.0, -1.0, 0, 0.5) // Partial pressure, kpa
TLV["other"] = list(-1.0, -1.0, 0.5, 1.0) // Partial pressure, kpa
TLV["pressure"] = list(ONE_ATMOSPHERE * 0.80, ONE_ATMOSPHERE * 0.90, ONE_ATMOSPHERE * 1.10, ONE_ATMOSPHERE * 1.20) /* kpa */
TLV["temperature"] = list(T0C - 26, T0C, T0C + 40, T0C + 66) // K
@@ -758,6 +758,7 @@
user << "<span class='notice'>You [ locked ? "lock" : "unlock"] the Air Alarm interface.</span>"
else
user << "<span class='warning'>Access denied.</span>"
return
return ..()
/obj/machinery/alarm/power_change()

View File

@@ -348,7 +348,7 @@ update_flag
"\[N2O\]" = "redws", \
"\[N2\]" = "red", \
"\[O2\]" = "blue", \
"\[Phoron\]" = "purple", \
"\[Phoron\]" = "orangeps", \
"\[CO2\]" = "black", \
"\[Air\]" = "grey", \
"\[CAUTION\]" = "yellow", \

View File

@@ -117,7 +117,7 @@
clonemind.transfer_to(H)
H.ckey = R.ckey
H << "<span class='notice'><b>Consciousness slowly creeps over you as your body regenerates.</b><br><i>So this is what cloning feels like?</i></span>"
to_chat(H, "<span class='warning'><b>Consciousness slowly creeps over you as your body regenerates.</b><br><b><font size='3'>Your recent memories are fuzzy, and it's hard to remember anything from today...</font></b></span><br><span class='notice'><i>So this is what cloning feels like?</i></span>")
// -- Mode/mind specific stuff goes here
callHook("clone", list(H))

View File

@@ -66,7 +66,11 @@
if(1)
num_of_prizes = rand(1,4)
if(2)
num_of_prizes = rand(1,3)
if(3)
num_of_prizes = rand(0,2)
if(4)
num_of_prizes = rand(0,1)
for(num_of_prizes; num_of_prizes > 0; num_of_prizes--)
empprize = pickweight(prizes)
new empprize(src.loc)

View File

@@ -305,7 +305,7 @@
if(subject.isSynthetic())
scantemp = "Error: Majority of subject is non-organic."
return
if (subject.suiciding == 1)
if (subject.suiciding)
scantemp = "Error: Subject's brain is not responding to scanning stimuli."
return
if ((!subject.ckey) || (!subject.client))

View File

@@ -35,10 +35,12 @@
var/stat_msg1
var/stat_msg2
var/datum/lore/atc_controller/ATC
var/datum/announcement/priority/crew_announcement = new
/obj/machinery/computer/communications/New()
..()
ATC = atc
crew_announcement.newscast = 1
/obj/machinery/computer/communications/process()
@@ -130,6 +132,8 @@
if("messagelist")
src.currmsg = 0
src.state = STATE_MESSAGELIST
if("toggleatc")
src.ATC.squelched = !src.ATC.squelched
if("viewmessage")
src.state = STATE_VIEWMESSAGE
if (!src.currmsg)
@@ -311,6 +315,7 @@
else
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=login'>Log In</A> \]"
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=messagelist'>Message List</A> \]"
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=toggleatc'>[ATC.squelched ? "Enable" : "Disable"] ATC Relay</A> \]"
if(STATE_CALLSHUTTLE)
dat += "Are you sure you want to call the shuttle? \[ <A HREF='?src=\ref[src];operation=callshuttle2'>OK</A> | <A HREF='?src=\ref[src];operation=main'>Cancel</A> \]"
if(STATE_CANCELSHUTTLE)
@@ -374,6 +379,7 @@
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=ai-callshuttle'>Call Emergency Shuttle</A> \]"
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=ai-messagelist'>Message List</A> \]"
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=ai-status'>Set Status Display</A> \]"
dat += "<BR>\[ <A HREF='?src=\ref[src];operation=toggleatc'>[ATC.squelched ? "Enable" : "Disable"] ATC Relay</A> \]"
if(STATE_CALLSHUTTLE)
dat += "Are you sure you want to call the shuttle? \[ <A HREF='?src=\ref[src];operation=ai-callshuttle2'>OK</A> | <A HREF='?src=\ref[src];operation=ai-main'>Cancel</A> \]"
if(STATE_MESSAGELIST)

View File

@@ -37,7 +37,16 @@
/obj/machinery/door/airlock/attack_generic(var/mob/user, var/damage)
if(stat & (BROKEN|NOPOWER))
if(damage >= 10)
if(src.density)
if(src.locked || src.welded)
visible_message("<span class='danger'>\The [user] begins breaking into \the [src] internals!</span>")
if(do_after(user,10 SECONDS,src))
src.locked = 0
src.welded = 0
update_icon()
open(1)
if(prob(25))
src.shock(user, 100)
else if(src.density)
visible_message("<span class='danger'>\The [user] forces \the [src] open!</span>")
open(1)
else
@@ -329,6 +338,18 @@
secured_wires = 1
assembly_type = /obj/structure/door_assembly/door_assembly_highsecurity
/obj/machinery/door/airlock/voidcraft
name = "voidcraft hatch"
desc = "It's an extra resilient airlock intended for spacefaring vessels."
icon = 'icons/obj/doors/shuttledoors.dmi'
explosion_resistance = 20
assembly_type = /obj/structure/door_assembly/door_assembly_voidcraft
// Airlock opens from top-bottom instead of left-right.
/obj/machinery/door/airlock/voidcraft/vertical
icon = 'icons/obj/doors/shuttledoors_vertical.dmi'
assembly_type = /obj/structure/door_assembly/door_assembly_voidcraft/vertical
/*
About the new airlock wires panel:
* An airlock wire dialog can be accessed by the normal way or by using wirecutters or a multitool on the door while the wire-panel is open. This would show the following wires, which you can either wirecut/mend or send a multitool pulse through. There are 9 wires.

View File

@@ -13,12 +13,12 @@
if(src.locked) return
..()
return
/obj/machinery/door/unpowered/emag_act()
return -1
/obj/machinery/door/unpowered/shuttle
icon = 'icons/turf/shuttle.dmi'
icon = 'icons/turf/shuttle_white.dmi'
name = "door"
icon_state = "door1"
opacity = 1

View File

@@ -269,4 +269,24 @@ datum/track/New(var/title_name, var/audio)
playing = 1
update_use_power(2)
update_icon()
update_icon()
// Advance to the next track - Don't start playing it unless we were already playing
/obj/machinery/media/jukebox/proc/NextTrack()
if(!tracks.len) return
var/curTrackIndex = max(1, tracks.Find(current_track))
var/newTrackIndex = (curTrackIndex % tracks.len) + 1 // Loop back around if past end
current_track = tracks[newTrackIndex]
if(playing)
StartPlaying()
updateDialog()
// Advance to the next track - Don't start playing it unless we were already playing
/obj/machinery/media/jukebox/proc/PrevTrack()
if(!tracks.len) return
var/curTrackIndex = max(1, tracks.Find(current_track))
var/newTrackIndex = curTrackIndex == 1 ? tracks.len : curTrackIndex - 1
current_track = tracks[newTrackIndex]
if(playing)
StartPlaying()
updateDialog()

View File

@@ -1,52 +1,45 @@
// Navigation beacon for AI robots
// Functions as a transponder: looks for incoming signal matching
var/global/list/navbeacons // no I don't like putting this in, but it will do for now
var/global/list/navbeacons = list() // no I don't like putting this in, but it will do for now
/obj/machinery/navbeacon
icon = 'icons/obj/objects.dmi'
icon_state = "navbeacon0-f"
name = "navigation beacon"
desc = "A radio beacon used for bot navigation."
desc = "A beacon used for bot navigation."
level = 1 // underfloor
layer = 2.5
anchored = 1
var/open = 0 // true if cover is open
var/locked = 1 // true if controls are locked
var/freq = 1445 // radio frequency
var/freq = null // DEPRECATED we don't use radios anymore!
var/location = "" // location response text
var/list/codes // assoc. list of transponder codes
var/codes_txt = "" // codes as set on map: "tag1;tag2" or "tag1=value;tag2=value"
var/codes_txt // DEPRECATED codes as set on map: "tag1;tag2" or "tag1=value;tag2=value"
var/list/codes = list() // assoc. list of transponder codes
req_access = list(access_engine)
/obj/machinery/navbeacon/New()
..()
set_codes()
set_codes_from_txt(codes_txt)
if(freq)
warning("[src] at [x],[y],[z] has deprecated var freq=[freq]. Replace it with proper type.")
var/turf/T = loc
hide(!T.is_plating())
// add beacon to MULE bot beacon list
if(freq == 1400)
if(!navbeacons)
navbeacons = new()
navbeacons += src
spawn(5) // must wait for map loading to finish
if(radio_controller)
radio_controller.add_object(src, freq, RADIO_NAVBEACONS)
navbeacons += src
// set the transponder codes assoc list from codes_txt
/obj/machinery/navbeacon/proc/set_codes()
// DEPRECATED - This is kept only for compatibilty with old map files! Do not use this!
// Instead, you should replace the map instance with one of the appropriate navbeacon subtypes.
// See the bottom of this file for a list of subtypes, make your own examples if your map needs more
/obj/machinery/navbeacon/proc/set_codes_from_txt()
if(!codes_txt)
return
warning("[src] at [x],[y],[z] in [get_area(src)] is using the deprecated 'codes_txt' mapping method. Replace it with proper type.")
codes = new()
codes = list()
var/list/entries = splittext(codes_txt, ";") // entries are separated by semicolons
for(var/e in entries)
var/index = findtext(e, "=") // format is "key=value"
if(index)
@@ -56,6 +49,8 @@ var/global/list/navbeacons // no I don't like putting this in, but it will do
else
codes[e] = "1"
/obj/machinery/navbeacon/hides_under_flooring()
return 1
// called when turf state changes
// hide the object if turf is intact
@@ -73,38 +68,6 @@ var/global/list/navbeacons // no I don't like putting this in, but it will do
else
icon_state = "[state]"
// look for a signal of the form "findbeacon=X"
// where X is any
// or the location
// or one of the set transponder keys
// if found, return a signal
/obj/machinery/navbeacon/receive_signal(datum/signal/signal)
var/request = signal.data["findbeacon"]
if(request && ((request in codes) || request == "any" || request == location))
spawn(1)
post_signal()
// return a signal giving location and transponder codes
/obj/machinery/navbeacon/proc/post_signal()
var/datum/radio_frequency/frequency = radio_controller.return_frequency(freq)
if(!frequency) return
var/datum/signal/signal = new()
signal.source = src
signal.transmission_method = 1
signal.data["beacon"] = location
for(var/key in codes)
signal.data[key] = codes[key]
frequency.post_signal(src, signal, filter = RADIO_NAVBEACONS)
/obj/machinery/navbeacon/attackby(var/obj/item/I, var/mob/user)
var/turf/T = loc
if(!T.is_plating())
@@ -117,7 +80,7 @@ var/global/list/navbeacons // no I don't like putting this in, but it will do
updateicon()
else if(istype(I, /obj/item/weapon/card/id)||istype(I, /obj/item/device/pda))
else if(I.GetID())
if(open)
if(allowed(user))
locked = !locked
@@ -153,8 +116,7 @@ var/global/list/navbeacons // no I don't like putting this in, but it will do
if(locked && !ai)
t = {"<TT><B>Navigation Beacon</B><HR><BR>
<i>(swipe card to unlock controls)</i><BR>
Frequency: [format_frequency(freq)]<BR><HR>
<i>(swipe card to unlock controls)</i><BR><HR>
Location: [location ? location : "(none)"]</A><BR>
Transponder Codes:<UL>"}
@@ -165,14 +127,7 @@ Transponder Codes:<UL>"}
else
t = {"<TT><B>Navigation Beacon</B><HR><BR>
<i>(swipe card to lock controls)</i><BR>
Frequency:
<A href='byond://?src=\ref[src];freq=-10'>-</A>
<A href='byond://?src=\ref[src];freq=-2'>-</A>
[format_frequency(freq)]
<A href='byond://?src=\ref[src];freq=2'>+</A>
<A href='byond://?src=\ref[src];freq=10'>+</A><BR>
<HR>
<i>(swipe card to lock controls)</i><BR><HR>
Location: <A href='byond://?src=\ref[src];locedit=1'>[location ? location : "(none)"]</A><BR>
Transponder Codes:<UL>"}
@@ -195,11 +150,7 @@ Transponder Codes:<UL>"}
if(open && !locked)
usr.set_machine(src)
if(href_list["freq"])
freq = sanitize_frequency(freq + text2num(href_list["freq"]))
updateDialog()
else if(href_list["locedit"])
if(href_list["locedit"])
var/newloc = sanitize(input("Enter New Location", "Navigation Beacon", location) as text|null)
if(newloc)
location = newloc
@@ -248,6 +199,41 @@ Transponder Codes:<UL>"}
/obj/machinery/navbeacon/Destroy()
navbeacons.Remove(src)
if(radio_controller)
radio_controller.remove_object(src, freq)
..()
//
// Nav Beacon Mapping
// These subtypes are what you should actually put into maps! they will make your life much easier.
//
// Developer Note: navbeacons do not HAVE to use these subtypes. They are purely for mapping convenience.
// You can feel free to construct them in-game as just /obj/machinery/navbeacon and they will work just
// fine, and you can define your own specific types for every instance on map if you want (BayStation does)
// This design is a compromise that means you can do mapping without every single one being its own type
// but with it still being easy to map ~ Leshana
//
// Mulebot delivery destinations
/obj/machinery/navbeacon/delivery/north
codes = list("delivery" = 1, "dir" = NORTH)
/obj/machinery/navbeacon/delivery/south
codes = list("delivery" = 1, "dir" = SOUTH)
/obj/machinery/navbeacon/delivery/east
codes = list("delivery" = 1, "dir" = EAST)
/obj/machinery/navbeacon/delivery/west
codes = list("delivery" = 1, "dir" = WEST)
// For part of the patrol route
// You MUST set "location"
// You MUST set "next_patrol"
/obj/machinery/navbeacon/patrol
var/next_patrol
/obj/machinery/navbeacon/patrol/New()
codes = list("patrol" = 1, "next_patrol" = next_patrol)
..()

View File

@@ -1,57 +1,104 @@
/obj/machinery/pipelayer
name = "automatic pipe layer"
icon = 'icons/obj/stationobjs.dmi'
icon_state = "pipe_d"
density = 1
var/turf/old_turf
var/old_dir
var/on = 0
var/a_dis = 0
var/P_type = 0
var/P_type_t = ""
var/max_metal = 50
var/metal = 10
var/obj/item/weapon/wrench/W
circuit = /obj/item/weapon/circuitboard/pipelayer
var/turf/old_turf // Last turf we were on.
var/old_dir // Last direction we were facing.
var/on = 0 // Pipelaying online?
var/a_dis = 0 // Auto-dismantling - If enabled it will remove floor tiles
var/P_type = 0 // Currently selected pipe type
var/P_type_t = "" // Name of currently selected pipe type
var/max_metal = 50 // Max capacity for internal metal storage
var/metal = 0 // Current amount in internal metal storage
var/pipe_cost = 0.25 // Cost in steel for each pipe.
var/obj/item/weapon/wrench/W // Internal wrench used for wrenching down the pipes
var/list/Pipes = list("regular pipes"=0,"scrubbers pipes"=31,"supply pipes"=29,"heat exchange pipes"=2)
/obj/machinery/pipelayer/New()
W = new(src)
..()
default_apply_parts()
update_icon()
/obj/machinery/pipelayer/Destroy()
qdel(W)
W = null
..()
/obj/machinery/pipelayer/RefreshParts()
var/mb_rating = 0
for(var/obj/item/weapon/stock_parts/matter_bin/M in component_parts)
mb_rating += M.rating
max_metal = mb_rating * initial(max_metal)
/obj/machinery/pipelayer/dismantle()
eject_metal()
..()
// Whenever we move, if enabled try and lay pipe
/obj/machinery/pipelayer/Move(new_turf,M_Dir)
..()
if(on && a_dis)
dismantleFloor(old_turf)
layPipe(old_turf,M_Dir,old_dir)
layPipe(old_turf, M_Dir, old_dir)
old_turf = new_turf
old_dir = turn(M_Dir,180)
old_dir = turn(M_Dir, 180)
/obj/machinery/pipelayer/attack_hand(mob/user as mob)
if(!metal&&!on)
if(..())
return
if(panel_open)
if(metal < 1)
user << "\The [src] is empty."
return
var/answer = alert(user, "Do you want to eject all the metal in \the [src]?", , "Yes","No")
if(answer == "Yes")
var/amount_ejected = eject_metal()
user.visible_message("<span class='notice'>[user] removes [amount_ejected] sheet\s of [DEFAULT_WALL_MATERIAL] from the \the [src].</span>",
"<span class='notice'>You remove [amount_ejected] sheet\s of [DEFAULT_WALL_MATERIAL] from \the [src].</span>")
return
if(!metal && !on)
user << "<span class='warning'>\The [src] doesn't work without metal.</span>"
return
on=!on
on = !on
old_turf = get_turf(src)
old_dir = dir
user.visible_message("<span class='notice'>[user] has [!on?"de":""]activated \the [src].</span>", "<span class='notice'>You [!on?"de":""]activate \the [src].</span>")
return
/obj/machinery/pipelayer/attackby(var/obj/item/W as obj, var/mob/user as mob)
if (istype(W, /obj/item/weapon/wrench))
if(default_deconstruction_screwdriver(user, W))
return
if(default_deconstruction_crowbar(user, W))
return
if(default_part_replacement(user, W))
return
if (!panel_open && iswrench(W))
P_type_t = input("Choose pipe type", "Pipe type") as null|anything in Pipes
P_type = Pipes[P_type_t]
user.visible_message("<span class='notice'>[user] has set \the [src] to manufacture [P_type_t].</span>", "<span class='notice'>You set \the [src] to manufacture [P_type_t].</span>")
return
if(istype(W, /obj/item/weapon/crowbar))
a_dis=!a_dis
if(!panel_open && iscrowbar(W))
a_dis = !a_dis
user.visible_message("<span class='notice'>[user] has [!a_dis?"de":""]activated auto-dismantling.</span>", "<span class='notice'>You [!a_dis?"de":""]activate auto-dismantling.</span>")
return
if(istype(W, /obj/item/pipe))
// NOTE - We must check for matter, otherwise the (free) pipe dispenser can be used to get infinite steel.
if(!W.matter || W.matter[DEFAULT_WALL_MATERIAL] < pipe_cost * SHEET_MATERIAL_AMOUNT)
user << "<span class='warning'>\The [W] doesn't contain enough [DEFAULT_WALL_MATERIAL] to recycle.</span>"
else if(metal + pipe_cost > max_metal)
user << "<span class='notice'>\The [src] is full.</span>"
else
user.drop_from_inventory(W)
metal += pipe_cost
usr << "<span class='notice'>You recycle \the [W].</span>"
qdel(W)
return
if(istype(W, /obj/item/stack/material) && W.get_material_name() == DEFAULT_WALL_MATERIAL)
var/result = load_metal(W)
if(isnull(result))
user << "<span class='warning'>Unable to load [W] - no metal found.</span>"
@@ -59,23 +106,8 @@
user << "<span class='notice'>\The [src] is full.</span>"
else
user.visible_message("<span class='notice'>[user] has loaded metal into \the [src].</span>", "<span class='notice'>You load metal into \the [src]</span>")
return
if(istype(W, /obj/item/weapon/screwdriver))
if(metal)
var/m = round(input(usr,"Please specify the amount of metal to remove","Remove metal",min(round(metal),50)) as num, 1)
m = min(m, 50)
m = min(m, round(metal))
m = round(m)
if(m)
use_metal(m)
var/obj/item/stack/material/steel/MM = new (get_turf(src))
MM.amount = m
user.visible_message("<span class='notice'>[user] removes [m] sheet\s of metal from the \the [src].</span>", "<span class='notice'>You remove [m] sheet\s of metal from \the [src]</span>")
else
user << "\The [src] is empty."
return
..()
/obj/machinery/pipelayer/examine(mob/user)
@@ -83,7 +115,7 @@
user << "\The [src] has [metal] sheet\s, is set to produce [P_type_t], and auto-dismantling is [!a_dis?"de":""]activated."
/obj/machinery/pipelayer/proc/reset()
on=0
on = 0
return
/obj/machinery/pipelayer/proc/load_metal(var/obj/item/stack/MM)
@@ -100,12 +132,22 @@
return
/obj/machinery/pipelayer/proc/use_metal(amount)
if(!metal || metal<amount)
if(!metal || metal < amount)
visible_message("\The [src] deactivates as its metal source depletes.")
return
metal-=amount
metal -= amount
return 1
/obj/machinery/pipelayer/proc/eject_metal()
var/amount_ejected = 0
while (metal >= 1)
var/material/M = get_material_by_name(DEFAULT_WALL_MATERIAL)
var/obj/item/stack/material/S = new M.stack_type(get_turf(src))
S.amount = min(metal, S.max_amount)
metal -= S.amount
amount_ejected += S.amount
return amount_ejected
/obj/machinery/pipelayer/proc/dismantleFloor(var/turf/new_turf)
if(istype(new_turf, /turf/simulated/floor))
var/turf/simulated/floor/T = new_turf
@@ -114,11 +156,11 @@
return new_turf.is_plating()
/obj/machinery/pipelayer/proc/layPipe(var/turf/w_turf,var/M_Dir,var/old_dir)
if(!on || !(M_Dir in list(1, 2, 4, 8)) || M_Dir==old_dir)
if(!on || !(M_Dir in list(NORTH, SOUTH, EAST, WEST)) || M_Dir==old_dir)
return reset()
if(!use_metal(0.25))
if(!use_metal(pipe_cost))
return reset()
var/fdirn = turn(M_Dir,180)
var/fdirn = turn(M_Dir, 180)
var/p_type
var/p_dir
@@ -130,6 +172,8 @@
p_dir=M_Dir
var/obj/item/pipe/P = new (w_turf, pipe_type=p_type, dir=p_dir)
// We used metal to make these, so should be reclaimable!
P.matter = list(DEFAULT_WALL_MATERIAL = pipe_cost * SHEET_MATERIAL_AMOUNT)
P.attackby(W , src)
return 1

View File

@@ -441,7 +441,7 @@ var/list/turret_icons
else
take_damage(initial(health) * 8) //should instakill most turrets
if(3)
take_damage(initial(health) * 8 / 3)
take_damage(initial(health) * 8 / 3) //Level 4 is too weak to bother turrets
/obj/machinery/porta_turret/proc/die() //called when the turret dies, ie, health <= 0
health = 0

View File

@@ -8,7 +8,7 @@ obj/machinery/recharger
idle_power_usage = 4
active_power_usage = 40000 //40 kW
var/obj/item/charging = null
var/list/allowed_devices = list(/obj/item/weapon/gun/energy, /obj/item/weapon/melee/baton, /obj/item/device/laptop, /obj/item/weapon/cell, /obj/item/device/flashlight, /obj/item/device/electronic_assembly)
var/list/allowed_devices = list(/obj/item/weapon/gun/energy, /obj/item/weapon/melee/baton, /obj/item/device/laptop, /obj/item/weapon/cell, /obj/item/device/flashlight, /obj/item/device/electronic_assembly, /obj/item/weapon/weldingtool/electric)
var/icon_state_charged = "recharger2"
var/icon_state_charging = "recharger1"
var/icon_state_idle = "recharger0" //also when unpowered
@@ -33,19 +33,19 @@ obj/machinery/recharger
if(allowed)
if(charging)
user << "<span class='warning'>\A [charging] is already charging here.</span>"
to_chat(user, "<span class='warning'>\A [charging] is already charging here.</span>")
return
// Checks to make sure he's not in space doing it, and that the area got proper power.
if(!powered())
user << "<span class='warning'>The [name] blinks red as you try to insert the item!</span>"
to_chat(user, "<span class='warning'>The [name] blinks red as you try to insert the item!</span>")
return
if(istype(G, /obj/item/weapon/gun/energy))
var/obj/item/weapon/gun/energy/E = G
if(!E.power_supply)
user << "<span class='notice'>Your gun has no power cell.</span>"
to_chat(user, "<span class='notice'>Your gun has no power cell.</span>")
return
if(E.self_recharge)
user << "<span class='notice'>Your gun has no recharge port.</span>"
to_chat(user, "<span class='notice'>Your gun has no recharge port.</span>")
return
if(istype(G, /obj/item/weapon/gun/energy/staff))
return
@@ -65,16 +65,22 @@ obj/machinery/recharger
if(!assembly.battery)
to_chat(user, "<span class='warning'>The assembly doesn't have a power cell.</span>")
return
if(istype(G, /obj/item/weapon/weldingtool/electric))
var/obj/item/weapon/weldingtool/electric/welder = G
if(!welder.power_supply)
to_chat(user, "<span class='notice'>Your welder has no power cell.</span>")
return
user.drop_item()
G.loc = src
charging = G
update_icon()
else if(portable && istype(G, /obj/item/weapon/wrench))
if(charging)
user << "<span class='warning'>Remove [charging] first!</span>"
to_chat(user, "<span class='warning'>Remove [charging] first!</span>")
return
anchored = !anchored
user << "You [anchored ? "attached" : "detached"] the recharger."
to_chat(user, "You [anchored ? "attached" : "detached"] the recharger.")
playsound(loc, 'sound/items/Ratchet.ogg', 75, 1)
else if(default_deconstruction_screwdriver(user, G))
return
@@ -208,8 +214,8 @@ obj/machinery/recharger
name = "wall recharger"
icon = 'icons/obj/stationobjs.dmi'
icon_state = "wrecharger0"
active_power_usage = 25000 //25 kW , It's more specialized than the standalone recharger (guns and batons only) so make it more powerful
allowed_devices = list(/obj/item/weapon/gun/energy, /obj/item/weapon/melee/baton, /obj/item/weapon/cell/device)
active_power_usage = 25000 //25 kW , It's more specialized than the standalone recharger (guns, batons, and flashlights only) so make it more powerful
allowed_devices = list(/obj/item/weapon/gun/energy, /obj/item/weapon/melee/baton, /obj/item/device/flashlight, /obj/item/weapon/cell/device)
icon_state_charged = "wrecharger2"
icon_state_charging = "wrecharger1"
icon_state_idle = "wrecharger0"

View File

@@ -374,6 +374,8 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
blackbox.msg_deathsquad += blackbox_msg
if(SYND_FREQ)
blackbox.msg_syndicate += blackbox_msg
if(RAID_FREQ)
blackbox.msg_raider += blackbox_msg
if(SUP_FREQ)
blackbox.msg_cargo += blackbox_msg
if(SRV_FREQ)
@@ -554,6 +556,8 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
blackbox.msg_deathsquad += blackbox_msg
if(SYND_FREQ)
blackbox.msg_syndicate += blackbox_msg
if(RAID_FREQ)
blackbox.msg_raider += blackbox_msg
if(SUP_FREQ)
blackbox.msg_cargo += blackbox_msg
if(SRV_FREQ)

View File

@@ -755,7 +755,7 @@
products = list(/obj/item/weapon/reagent_containers/food/snacks/candy = 6,/obj/item/weapon/reagent_containers/food/drinks/dry_ramen = 6,/obj/item/weapon/reagent_containers/food/snacks/chips =6,
/obj/item/weapon/reagent_containers/food/snacks/sosjerky = 6,/obj/item/weapon/reagent_containers/food/snacks/no_raisin = 6,/obj/item/weapon/reagent_containers/food/snacks/spacetwinkie = 6,
/obj/item/weapon/reagent_containers/food/snacks/cheesiehonkers = 6, /obj/item/weapon/reagent_containers/food/snacks/tastybread = 6, /obj/item/weapon/reagent_containers/food/snacks/skrellsnacks = 3)
contraband = list(/obj/item/weapon/reagent_containers/food/snacks/syndicake = 6)
contraband = list(/obj/item/weapon/reagent_containers/food/snacks/syndicake = 6,/obj/item/weapon/reagent_containers/food/snacks/unajerky = 6,)
prices = list(/obj/item/weapon/reagent_containers/food/snacks/candy = 1,/obj/item/weapon/reagent_containers/food/drinks/dry_ramen = 5,/obj/item/weapon/reagent_containers/food/snacks/chips = 1,
/obj/item/weapon/reagent_containers/food/snacks/sosjerky = 2,/obj/item/weapon/reagent_containers/food/snacks/no_raisin = 1,/obj/item/weapon/reagent_containers/food/snacks/spacetwinkie = 1,
/obj/item/weapon/reagent_containers/food/snacks/cheesiehonkers = 1, /obj/item/weapon/reagent_containers/food/snacks/tastybread = 2, /obj/item/weapon/reagent_containers/food/snacks/skrellsnacks = 4)

View File

@@ -105,7 +105,7 @@
proc/shock()
var/obj/mecha/M = in_mecha()
if(M)
M.emp_act(2)
M.emp_act(4)
qdel(src)
proc/get_mecha_log()

View File

@@ -333,7 +333,7 @@ steam.start() -- spawns the effect
spawn(0)
var/turf/T = get_turf(src.holder)
if(T != src.oldposition)
if(istype(T, /turf/simulated))
if(isturf(T))
var/obj/effect/effect/ion_trails/I = PoolOrNew(/obj/effect/effect/ion_trails, src.oldposition)
src.oldposition = T
I.set_dir(src.holder.dir)

View File

@@ -194,7 +194,7 @@
new /obj/item/clothing/under/waiter(src.loc)
var/CHOICE= pick( /obj/item/clothing/head/kitty, /obj/item/clothing/head/rabbitears)
new CHOICE(src.loc)
new /obj/item/clothing/suit/apron(src.loc)
new /obj/item/clothing/suit/storage/apron(src.loc)
delete_me = 1
/obj/effect/landmark/costume/pirate/New()

View File

@@ -95,10 +95,8 @@
Trigger(var/atom/movable/A)
if(teleport_x && teleport_y && teleport_z)
A.x = teleport_x
A.y = teleport_y
A.z = teleport_z
var/turf/T = locate(teleport_x, teleport_y, teleport_z)
A.forceMove(T)
/* Random teleporter, teleports atoms to locations ranging from teleport_x - teleport_x_offset, etc */
@@ -110,8 +108,5 @@
Trigger(var/atom/movable/A)
if(teleport_x && teleport_y && teleport_z)
if(teleport_x_offset && teleport_y_offset && teleport_z_offset)
A.x = rand(teleport_x, teleport_x_offset)
A.y = rand(teleport_y, teleport_y_offset)
A.z = rand(teleport_z, teleport_z_offset)
var/turf/T = locate(rand(teleport_x, teleport_x_offset), rand(teleport_y, teleport_y_offset), rand(teleport_z, teleport_z_offset))
A.forceMove(T)

View File

@@ -0,0 +1,20 @@
// This artificially splits a ZAS zone, useful if you wish to prevent massive super-zones which can cause lag.
/obj/effect/zone_divider
name = "zone divider"
icon = 'icons/mob/screen1.dmi'
icon_state = "x3"
invisibility = 101 //nope, can't see this
anchored = 1
density = 0
opacity = 0
/obj/effect/zone_divider/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
// Special case to prevent us from being part of a zone during the first air master tick.
// We must merge ourselves into a zone on next tick. This will cause a bit of lag on
// startup, but it can't really be helped you know?
if(air_master && air_master.current_cycle == 0)
spawn(1)
air_master.mark_for_update(get_turf(src))
return 0
return !air_group // Anything except zones can pass

View File

@@ -4,17 +4,17 @@
// #define EMPDEBUG 10
proc/empulse(turf/epicenter, heavy_range, light_range, log=0)
proc/empulse(turf/epicenter, first_range, second_range, third_range, fourth_range, log=0)
if(!epicenter) return
if(!istype(epicenter, /turf))
epicenter = get_turf(epicenter.loc)
if(log)
message_admins("EMP with size ([heavy_range], [light_range]) in area [epicenter.loc.name] ")
log_game("EMP with size ([heavy_range], [light_range]) in area [epicenter.loc.name] ")
message_admins("EMP with size ([first_range], [second_range], [third_range], [fourth_range]) in area [epicenter.loc.name] ")
log_game("EMP with size ([first_range], [second_range], [third_range], [fourth_range]) in area [epicenter.loc.name] ")
if(heavy_range > 1)
if(first_range > 1)
var/obj/effect/overlay/pulse = PoolOrNew(/obj/effect/overlay, epicenter)
pulse.icon = 'icons/effects/effects.dmi'
pulse.icon_state = "emppulse"
@@ -23,28 +23,50 @@ proc/empulse(turf/epicenter, heavy_range, light_range, log=0)
spawn(20)
qdel(pulse)
if(heavy_range > light_range)
light_range = heavy_range
if(first_range > second_range)
second_range = first_range
if(second_range > third_range)
third_range = second_range
if(third_range > fourth_range)
fourth_range = third_range
for(var/mob/M in range(heavy_range, epicenter))
for(var/mob/M in range(first_range, epicenter))
M << 'sound/effects/EMPulse.ogg'
for(var/atom/T in range(light_range, epicenter))
for(var/atom/T in range(fourth_range, epicenter))
#ifdef EMPDEBUG
var/time = world.timeofday
#endif
var/distance = get_dist(epicenter, T)
if(distance < 0)
distance = 0
if(distance < heavy_range)
//Worst effects, really hurts
if(distance < first_range)
T.emp_act(1)
else if(distance == heavy_range)
else if(distance == first_range)
if(prob(50))
T.emp_act(1)
else
T.emp_act(2)
else if(distance <= light_range)
//Slightly less painful
else if(distance <= second_range)
T.emp_act(2)
else if(distance == second_range)
if(prob(50))
T.emp_act(2)
else
T.emp_act(3)
//Even less slightly less painful
else if(distance <= third_range)
T.emp_act(3)
else if(distance == third_range)
if(prob(50))
T.emp_act(2)
else
T.emp_act(3)
//This should be more or less harmless
else if(distance <= fourth_range)
T.emp_act(4)
#ifdef EMPDEBUG
if((world.timeofday - time) >= EMPDEBUG)
log_and_message_admins("EMPDEBUG: [T.name] - [T.type] - took [world.timeofday - time]ds to process emp_act()!")

View File

@@ -44,6 +44,7 @@
var/slowdown = 0 // How much clothing is slowing you down. Negative values speeds you up
var/canremove = 1 //Mostly for Ninja code at this point but basically will not allow the item to be removed if set to 0. /N
var/list/armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
var/list/armorsoak = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
var/list/allowed = null //suit storage stuff.
var/obj/item/device/uplink/hidden/hidden_uplink = null // All items can have an uplink hidden inside, just remember to add the triggers.
var/zoomdevicename = null //name used for message when binoculars/scope is used

View File

@@ -113,6 +113,7 @@
a hostile enviroment."
icon = 'icons/obj/cryobag.dmi'
icon_state = "bodybag_folded"
item_state = "bodybag_cryo_folded"
origin_tech = list(TECH_BIO = 4)
/obj/item/bodybag/cryobag/attack_self(mob/user)

View File

@@ -419,6 +419,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if(1) icon = 'icons/obj/pda.dmi'
if(2) icon = 'icons/obj/pda_slim.dmi'
if(3) icon = 'icons/obj/pda_old.dmi'
if(4) icon = 'icons/obj/pda_rugged.dmi'
else
icon = 'icons/obj/pda_old.dmi'
log_debug("Invalid switch for PDA, defaulting to old PDA icons. [pdachoice] chosen.")
@@ -998,7 +999,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
M.apply_damage( rand(30,60) , BURN)
message += "You feel a searing heat! Your [P] is burning!"
if(i>=20 && i<=25) //EMP
empulse(P.loc, 3, 6, 1)
empulse(P.loc, 1, 2, 4, 6, 1)
message += "Your [P] emits a wave of electromagnetic energy!"
if(i>=25 && i<=40) //Smoke
var/datum/effect/effect/system/smoke_spread/chem/S = new /datum/effect/effect/system/smoke_spread/chem

View File

@@ -2,7 +2,7 @@
name = "inteliCard"
icon = 'icons/obj/pda.dmi'
icon_state = "aicard" // aicard-full
item_state = "electronic"
item_state = "aicard"
w_class = ITEMSIZE_SMALL
slot_flags = SLOT_BELT
show_messages = 0

View File

@@ -213,6 +213,17 @@ var/global/list/obj/item/device/communicator/all_communicators = list()
update_icon()
ui_interact(user)
// Proc: MouseDrop()
//Same thing PDAs do
/obj/item/device/communicator/MouseDrop(obj/over_object as obj)
var/mob/M = usr
if (!(src.loc == usr) || (src.loc && src.loc.loc == usr))
return
if(!istype(over_object, /obj/screen))
return attack_self(M)
return
// Proc: attack_ghost()
// Parameters: 1 (user - the ghost clicking on the device)
// Description: Recreates the known_devices list, so that the ghost looking at the device can see themselves, then calls ..() so that NanoUI appears.

View File

@@ -8,6 +8,8 @@
var/state //0 off, 1 open, 2 working, 3 dead
var/uses = 2 //Calculates initial uses based on starting cell size
var/use_on_synthetic = 0 //If 1, this is only useful on FBPs, if 0, this is only useful on fleshies
var/pad_name = "defib pads" //Just the name given for some cosmetic things
var/chance = 75 //Percent chance of working
var/charge_cost //Set in New() based on uses
var/obj/item/weapon/cell/cell //The size is mostly irrelevant, see 'uses'
@@ -32,13 +34,31 @@
if(istype(onto) && Adjacent(usr) && !usr.restrained() && !usr.stat)
var/mob/living/carbon/human/user = usr
//<--Feel free to code clothing checks right here
user.visible_message("<span class='warning'>[user] begins applying defib pads to [onto].</span>",
"<span class='warning'>You begin applying defib pads to [onto].</span>")
if(can_defib(onto))
user.visible_message("<span class='warning'>[user] begins applying [pad_name] to [onto].</span>",
"<span class='warning'>You begin applying [pad_name] to [onto].</span>")
if(do_after(user, 100, onto))
patient = onto
statechange(1,patient)
user.visible_message("<span class='warning'>[user] applies defib pads to [onto].</span>",
"<span class='warning'>You finish applying defib pads to [onto].</span>")
user.visible_message("<span class='warning'>[user] applies [pad_name] to [onto].</span>",
"<span class='warning'>You finish applying [pad_name] to [onto].</span>")
//can_defib() check is where all of the qualifying conditions should go
//Could probably toss in checks here for damage, organs, etc, but for now I'll leave it as just this
/obj/item/device/defib_kit/proc/can_defib(var/mob/living/carbon/human/target)
var/mob/living/carbon/human/user = usr
if(use_on_synthetic && !target.isSynthetic())
to_chat(user, "[src] isn't designed for organics!")
return 0
else if(!use_on_synthetic && target.isSynthetic())
to_chat(user, "[src] isn't designed for synthetics!")
return 0
else if(!target.isSynthetic() && ((world.time - target.timeofdeath) > (10 MINUTES)))//Can only revive organics within a few minutes
to_chat(user, "There is no spark of life in [target.name], they've been dead too long to revive this way.")
return 0
return 1
/obj/item/device/defib_kit/attackby(var/obj/item/A as obj, mob/living/user as mob)
..()
@@ -94,7 +114,7 @@
//Patient moved too far
if(patient && !(get_dist(src,patient) <= 1)) //You separated the kit and pads too far
audible_message("<span class='warning'>There's a clatter as the defib pads are yanked off of [patient].</span>")
audible_message("<span class='warning'>There is a clatter as the [pad_name] are yanked off of [patient].</span>")
statechange(0)
patient = null
return
@@ -111,7 +131,7 @@
patient.visible_message("<span class='warning'>[patient] convulses!</span>")
playsound(src.loc, 'sound/effects/sparks2.ogg', 75, 1)
//Actual rezzing code
if(prob(chance) && ((world.time - patient.timeofdeath) < (10 MINUTES))) //Can only revive within a few minutes
if(prob(chance))
if(!patient.client && patient.mind) //Don't force the dead person to come back if they don't want to.
for(var/mob/observer/dead/ghost in player_list)
if(ghost.mind == patient.mind)
@@ -155,3 +175,10 @@
break
return
/obj/item/device/defib_kit/jumper_kit
name = "jumper cable kit"
desc = "This Morpheus-branded FBP defib kit is a semi-automated model. Apply cables, step back, wait."
icon_state = "jumper_kit"
use_on_synthetic = 1
pad_name = "jumper cables"

View File

@@ -181,6 +181,38 @@
else
return ..()
/obj/item/device/flashlight/MouseDrop(obj/over_object as obj)
if(!canremove)
return
if (ishuman(usr) || issmall(usr)) //so monkeys can take off their backpacks -- Urist
if (istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech. why?
return
if (!( istype(over_object, /obj/screen) ))
return ..()
//makes sure that the thing is equipped, so that we can't drag it into our hand from miles away.
//there's got to be a better way of doing this.
if (!(src.loc == usr) || (src.loc && src.loc.loc == usr))
return
if (( usr.restrained() ) || ( usr.stat ))
return
if ((src.loc == usr) && !(istype(over_object, /obj/screen)) && !usr.unEquip(src))
return
switch(over_object.name)
if("r_hand")
usr.u_equip(src)
usr.put_in_r_hand(src)
if("l_hand")
usr.u_equip(src)
usr.put_in_l_hand(src)
src.add_fingerprint(usr)
/obj/item/device/flashlight/attackby(obj/item/weapon/W, mob/user as mob)
if(power_use)
if(istype(W, /obj/item/weapon/cell))
@@ -210,6 +242,26 @@
w_class = ITEMSIZE_TINY
power_use = 0
/obj/item/device/flashlight/color //Default color is blue, just roll with it.
name = "blue flashlight"
desc = "A hand-held emergency light. This one is blue."
icon_state = "flashlight_blue"
/obj/item/device/flashlight/color/red
name = "red flashlight"
desc = "A hand-held emergency light. This one is red."
icon_state = "flashlight_red"
/obj/item/device/flashlight/color/orange
name = "orange flashlight"
desc = "A hand-held emergency light. This one is orange."
icon_state = "flashlight_orange"
/obj/item/device/flashlight/color/yellow
name = "yellow flashlight"
desc = "A hand-held emergency light. This one is yellow."
icon_state = "flashlight_yellow"
/obj/item/device/flashlight/maglight
name = "maglight"
desc = "A very, very heavy duty flashlight."

View File

@@ -45,8 +45,6 @@
icon = 'icons/obj/janitor.dmi'
icon_state = "lightreplacer0"
item_state = "electronic"
flags = CONDUCT
slot_flags = SLOT_BELT
origin_tech = list(TECH_MAGNET = 3, TECH_MATERIAL = 2)

View File

@@ -2,7 +2,6 @@
name = "megaphone"
desc = "A device used to project your voice. Loudly."
icon_state = "megaphone"
item_state = "radio"
w_class = ITEMSIZE_SMALL
flags = CONDUCT

View File

@@ -4,7 +4,6 @@
name = "power sink"
desc = "A nulling power sink which drains energy from electrical systems."
icon_state = "powersink0"
item_state = "electronic"
w_class = ITEMSIZE_LARGE
flags = CONDUCT
throwforce = 5

Some files were not shown because too many files have changed in this diff Show More