Merge branch 'master' into upstream-merge-31727

This commit is contained in:
deathride58
2017-12-10 21:51:51 +00:00
committed by GitHub
205 changed files with 2604 additions and 1534 deletions
+65 -53
View File
@@ -1,14 +1,5 @@
#define FIRE_DAMAGE_MODIFIER 0.0215 //Higher values result in more external fire damage to the skin (default 0.0215)
#define AIR_DAMAGE_MODIFIER 2.025 //More means less damage from hot air scalding lungs, less = more damage. (default 2.025)
#define MOLES_CELLSTANDARD (ONE_ATMOSPHERE*CELL_VOLUME/(T20C*R_IDEAL_GAS_EQUATION)) //moles in a 2.5 m^3 cell at 101.325 Pa and 20 degC
#define M_CELL_WITH_RATIO (MOLES_CELLSTANDARD * 0.005)
#define O2STANDARD 0.21
#define N2STANDARD 0.79
#define MOLES_O2STANDARD (MOLES_CELLSTANDARD*O2STANDARD) // O2 standard value (21%)
#define MOLES_N2STANDARD (MOLES_CELLSTANDARD*N2STANDARD) // N2 standard value (79%)
//indices of values in gas lists. used by listmos.
//LISTMOS
//indices of values in gas lists.
#define MOLES 1
#define ARCHIVE 2
#define GAS_META 3
@@ -19,32 +10,35 @@
#define META_GAS_DANGER 5
#define META_GAS_ID 6
//stuff you should probably leave well alone!
//ATMOS
#define CELL_VOLUME 2500 //liters in a cell
#define BREATH_VOLUME 0.5 //liters in a normal breath
#define BREATH_PERCENTAGE (BREATH_VOLUME/CELL_VOLUME) //Amount of air to take a from a tile
#define HUMAN_NEEDED_OXYGEN (MOLES_CELLSTANDARD*BREATH_PERCENTAGE*0.16) //Amount of air needed before pass out/suffocation commences
#define NORMPIPERATE 30 //pipe-insulation rate divisor
#define HEATPIPERATE 8 //heat-exch pipe insulation
#define FLOWFRAC 0.99 //fraction of gas transfered per process
#define TANK_MELT_TEMPERATURE 1000000
#define TANK_LEAK_PRESSURE (30.*ONE_ATMOSPHERE) //Tank starts leaking
#define TANK_RUPTURE_PRESSURE (35.*ONE_ATMOSPHERE) //Tank spills all contents into atmosphere
#define TANK_FRAGMENT_PRESSURE (40.*ONE_ATMOSPHERE) //Boom 3x3 base explosion
#define TANK_FRAGMENT_SCALE (6.*ONE_ATMOSPHERE) //+1 for each SCALE kPa aboe threshold
#define MINIMUM_AIR_RATIO_TO_SUSPEND 0.1 //Ratio of air that must move to/from a tile to reset group processing
#define MINIMUM_AIR_RATIO_TO_MOVE 0.001 //Minimum ratio of air that must move to/from a tile
#define MINIMUM_AIR_TO_SUSPEND (MOLES_CELLSTANDARD*MINIMUM_AIR_RATIO_TO_SUSPEND) //Minimum amount of air that has to move before a group processing can be suspended
#define MINIMUM_MOLES_DELTA_TO_MOVE (MOLES_CELLSTANDARD*MINIMUM_AIR_RATIO_TO_MOVE) //Either this must be active
#define EXCITED_GROUP_BREAKDOWN_CYCLES 4
#define EXCITED_GROUP_DISMANTLE_CYCLES 16
#define MINIMUM_TEMPERATURE_TO_MOVE (T20C+100) //or this (or both, obviously)
#define MINIMUM_TEMPERATURE_RATIO_TO_SUSPEND 0.012
//stuff you should probably leave well alone!
#define MOLES_CELLSTANDARD (ONE_ATMOSPHERE*CELL_VOLUME/(T20C*R_IDEAL_GAS_EQUATION)) //moles in a 2.5 m^3 cell at 101.325 Pa and 20 degC
#define M_CELL_WITH_RATIO (MOLES_CELLSTANDARD * 0.005) //compared against for superconductivity
#define O2STANDARD 0.21 //percentage of oxygen in a normal mixture of air
#define N2STANDARD 0.79 //same but for nitrogen
#define MOLES_O2STANDARD (MOLES_CELLSTANDARD*O2STANDARD) // O2 standard value (21%)
#define MOLES_N2STANDARD (MOLES_CELLSTANDARD*N2STANDARD) // N2 standard value (79%)
#define CELL_VOLUME 2500 //liters in a cell
#define BREATH_VOLUME 0.5 //liters in a normal breath
#define BREATH_PERCENTAGE (BREATH_VOLUME/CELL_VOLUME) //Amount of air to take a from a tile
#define HUMAN_NEEDED_OXYGEN (MOLES_CELLSTANDARD*BREATH_PERCENTAGE*0.16) //Amount of air needed before pass out/suffocation commences
//EXCITED GROUPS
#define EXCITED_GROUP_BREAKDOWN_CYCLES 4 //number of FULL air controller ticks before an excited group breaks down (averages gas contents across turfs)
#define EXCITED_GROUP_DISMANTLE_CYCLES 16 //number of FULL air controller ticks before an excited group dismantles and removes its turfs from active
#define MINIMUM_AIR_RATIO_TO_SUSPEND 0.1 //Ratio of air that must move to/from a tile to reset group processing
#define MINIMUM_AIR_RATIO_TO_MOVE 0.001 //Minimum ratio of air that must move to/from a tile
#define MINIMUM_AIR_TO_SUSPEND (MOLES_CELLSTANDARD*MINIMUM_AIR_RATIO_TO_SUSPEND) //Minimum amount of air that has to move before a group processing can be suspended
#define MINIMUM_MOLES_DELTA_TO_MOVE (MOLES_CELLSTANDARD*MINIMUM_AIR_RATIO_TO_MOVE) //Either this must be active
#define MINIMUM_TEMPERATURE_TO_MOVE (T20C+100) //or this (or both, obviously)
#define MINIMUM_TEMPERATURE_DELTA_TO_SUSPEND 4 //Minimum temperature difference before group processing is suspended
#define MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER 0.5 //Minimum temperature difference before the gas temperatures are just set to be equal
#define MINIMUM_TEMPERATURE_FOR_SUPERCONDUCTION T20C+10
#define MINIMUM_TEMPERATURE_START_SUPERCONDUCTION T20C+200
//HEAT TRANSFER COEFFICIENTS
//Must be between 0 and 1. Values closer to 1 equalize temperature faster
//Should not exceed 0.4 else strange heat flow occur
#define FLOOR_HEAT_TRANSFER_COEFFICIENT 0.4
#define WALL_HEAT_TRANSFER_COEFFICIENT 0.0
#define DOOR_HEAT_TRANSFER_COEFFICIENT 0.0
@@ -52,20 +46,31 @@
#define OPEN_HEAT_TRANSFER_COEFFICIENT 0.4
#define WINDOW_HEAT_TRANSFER_COEFFICIENT 0.1 //a hack for now
#define HEAT_CAPACITY_VACUUM 7000 //a hack to help make vacuums "cold", sacrificing realism for gameplay
//Must be between 0 and 1. Values closer to 1 equalize temperature faster
//Should not exceed 0.4 else strange heat flow occur
//FIRE
#define FIRE_MINIMUM_TEMPERATURE_TO_SPREAD 150+T0C
#define FIRE_MINIMUM_TEMPERATURE_TO_EXIST 100+T0C
#define FIRE_SPREAD_RADIOSITY_SCALE 0.85
#define FIRE_GROWTH_RATE 40000 //For small fires
#define CARBON_LIFEFORM_FIRE_RESISTANCE 200+T0C //Resistance to fire damage
#define CARBON_LIFEFORM_FIRE_DAMAGE 4 //Fire damage
#define PLASMA_MINIMUM_BURN_TEMPERATURE 100+T0C
//GASES
#define MIN_TOXIC_GAS_DAMAGE 1
#define MAX_TOXIC_GAS_DAMAGE 10
#define MOLES_GAS_VISIBLE 0.5 //Moles in a standard cell after which gases are visible
#define STOP_REACTIONS 2
#define PLASMA_MINIMUM_BURN_TEMPERATURE 100+T0C
#define GAS_STIM_MINIMUM 0.002
//REACTIONS
//return values for reactions (bitflags)
#define NO_REACTION 0
#define REACTING 1
#define STOP_REACTIONS 2
//HUMANS
//Hurty numbers
#define FIRE_DAMAGE_MODIFIER 0.0215 //Higher values result in more external fire damage to the skin
#define AIR_DAMAGE_MODIFIER 2.025 //More means less damage from hot air scalding lungs, less = more damage
// Pressure limits.
#define HAZARD_HIGH_PRESSURE 550 //This determins at what pressure the ultra-high pressure red icon is displayed. (This one is set as a constant)
@@ -107,65 +112,71 @@
#define SHOES_MIN_TEMP_PROTECT 2.0 //For gloves
#define SHOES_MAX_TEMP_PROTECT 1500 //For gloves
#define PRESSURE_DAMAGE_COEFFICIENT 4 //The amount of pressure damage someone takes is equal to (pressure / HAZARD_HIGH_PRESSURE)*PRESSURE_DAMAGE_COEFFICIENT, with the maximum of MAX_PRESSURE_DAMAGE
#define MAX_HIGH_PRESSURE_DAMAGE 4
#define LOW_PRESSURE_DAMAGE 4 //The amount of damage someone takes when in a low pressure area (The pressure threshold is so low that it doesn't make sense to do any calculations, so it just applies this flat value).
#define COLD_SLOWDOWN_FACTOR 20 //Humans are slowed by the difference between bodytemp and BODYTEMP_COLD_DAMAGE_LIMIT divided by this
// Atmos pipe limits
//PIPES
//Atmos pipe limits
#define MAX_OUTPUT_PRESSURE 4500 // (kPa) What pressure pumps and powered equipment max out at.
#define MAX_TRANSFER_RATE 200 // (L/s) Maximum speed powered equipment can work at.
//Atmos machinery pipenet stuff
// used for device_type vars; used by DEVICE_TYPE_LOOP
//used for device_type vars; used by DEVICE_TYPE_LOOP
#define UNARY 1
#define BINARY 2
#define TRINARY 3
#define QUATERNARY 4
// this is the standard for loop used by all sorts of atmos machinery procs
//TODO: finally remove this bullshit
//this is the standard for loop used by all sorts of atmos machinery procs
#define DEVICE_TYPE_LOOP var/I in 1 to device_type
// defines for the various machinery lists
// NODE_I, AIR_I, PARENT_I are used within DEVICE_TYPE_LOOP
//defines for the various machinery lists
//NODE_I, AIR_I, PARENT_I are used within DEVICE_TYPE_LOOP
// nodes list - all atmos machinery
//nodes list - all atmos machinery
#define NODE1 nodes[1]
#define NODE2 nodes[2]
#define NODE3 nodes[3]
#define NODE4 nodes[4]
#define NODE_I nodes[I]
// airs list - components only
//airs list - components only
#define AIR1 airs[1]
#define AIR2 airs[2]
#define AIR3 airs[3]
#define AIR_I airs[I]
// parents list - components only
//parents list - components only
#define PARENT1 parents[1]
#define PARENT2 parents[2]
#define PARENT3 parents[3]
#define PARENT_I parents[I]
//Tanks
#define TANK_MAX_RELEASE_PRESSURE (ONE_ATMOSPHERE*3)
#define TANK_MIN_RELEASE_PRESSURE 0
#define TANK_DEFAULT_RELEASE_PRESSURE 16
//TANKS
#define TANK_MELT_TEMPERATURE 1000000 //temperature in kelvins at which a tank will start to melt
#define TANK_LEAK_PRESSURE (30.*ONE_ATMOSPHERE) //Tank starts leaking
#define TANK_RUPTURE_PRESSURE (35.*ONE_ATMOSPHERE) //Tank spills all contents into atmosphere
#define TANK_FRAGMENT_PRESSURE (40.*ONE_ATMOSPHERE) //Boom 3x3 base explosion
#define TANK_FRAGMENT_SCALE (6.*ONE_ATMOSPHERE) //+1 for each SCALE kPa aboe threshold
#define TANK_MAX_RELEASE_PRESSURE (ONE_ATMOSPHERE*3)
#define TANK_MIN_RELEASE_PRESSURE 0
#define TANK_DEFAULT_RELEASE_PRESSURE 16
//CANATMOSPASS
#define ATMOS_PASS_YES 1
#define ATMOS_PASS_NO 0
#define ATMOS_PASS_PROC -1 //ask CanAtmosPass()
#define ATMOS_PASS_DENSITY -2 //just check density
#define CANATMOSPASS(A, O) ( A.CanAtmosPass == ATMOS_PASS_PROC ? A.CanAtmosPass(O) : ( A.CanAtmosPass == ATMOS_PASS_DENSITY ? !A.density : A.CanAtmosPass ) )
//LAVALAND
#define LAVALAND_EQUIPMENT_EFFECT_PRESSURE 50 //what pressure you have to be under to increase the effect of equipment meant for lavaland
#define LAVALAND_DEFAULT_ATMOS "o2=14;n2=23;TEMP=300"
//MULTIPIPES
//IF YOU EVER CHANGE THESE CHANGE SPRITES TO MATCH.
#define PIPING_LAYER_MIN 1
#define PIPING_LAYER_MAX 3
@@ -179,6 +190,7 @@
#define PIPING_DEFAULT_LAYER_ONLY 4 //can only exist at PIPING_LAYER_DEFAULT
#define PIPING_CARDINAL_AUTONORMALIZE 8 //north/south east/west doesn't matter, auto normalize on build.
//HELPERS
#define THERMAL_ENERGY(gas) (gas.temperature * gas.heat_capacity())
#define ADD_GAS(gas_id, out_list)\
+4
View File
@@ -77,6 +77,10 @@
#define COMSIG_MACHINE_PROCESS "machine_process" //from machinery subsystem fire(): ()
#define COMSIG_MACHINE_PROCESS_ATMOS "machine_process_atmos" //from air subsystem process_atmos_machinery(): ()
// /mob/living/carbon/human signals
#define COMSIG_HUMAN_MELEE_UNARMED_ATTACK "human_melee_unarmed_attack" //from mob/living/carbon/human/UnarmedAttack(): (atom/target)
#define COMSIG_HUMAN_MELEE_UNARMED_ATTACKBY "human_melee_unarmed_attackby" //from mob/living/carbon/human/UnarmedAttack(): (mob/living/carbon/human/attacker)
#define CALTROP_BYPASS_SHOES 1
#define CALTROP_IGNORE_WALKERS 2
+16 -16
View File
@@ -9,6 +9,16 @@
* Misc
*/
#define LAZYINITLIST(L) if (!L) L = list()
#define UNSETEMPTY(L) if (L && !L.len) L = null
#define LAZYREMOVE(L, I) if(L) { L -= I; if(!L.len) { L = null; } }
#define LAZYADD(L, I) if(!L) { L = list(); } L += I;
#define LAZYACCESS(L, I) (L ? (isnum(I) ? (I > 0 && I <= L.len ? L[I] : null) : L[I]) : null)
#define LAZYSET(L, K, V) if(!L) { L = list(); } L[K] = V;
#define LAZYLEN(L) length(L)
#define LAZYCLEARLIST(L) if(L) L.Cut()
#define SANITIZE_LIST(L) ( islist(L) ? L : list() )
//Returns a list in plain english as a string
/proc/english_list(list/input, nothing_text = "nothing", and_text = " and ", comma_text = ", ", final_comma_text = "" )
var/total = input.len
@@ -32,7 +42,7 @@
//Returns list element or null. Should prevent "index out of bounds" error.
/proc/listgetindex(list/L, index)
if(istype(L))
if(LAZYLEN(L))
if(isnum(index) && IsInteger(index))
if(IsInRange(index,1,L.len))
return L[index]
@@ -42,7 +52,7 @@
//Return either pick(list) or null if list is not of type /list or is empty
/proc/safepick(list/L)
if(istype(L) && L.len)
if(LAZYLEN(L))
return pick(L)
//Checks if the list is empty
@@ -53,7 +63,7 @@
//Checks for specific types in a list
/proc/is_type_in_list(atom/A, list/L)
if(!L || !L.len || !A)
if(!LAZYLEN(L) || !A)
return FALSE
for(var/type in L)
if(istype(A, type))
@@ -62,7 +72,7 @@
//Checks for specific types in specifically structured (Assoc "type" = TRUE) lists ('typecaches')
/proc/is_type_in_typecache(atom/A, list/L)
if(!L || !L.len || !A)
if(!LAZYLEN(L) || !A)
return FALSE
if(ispath(A))
@@ -72,7 +82,7 @@
//Checks for a string in a list
/proc/is_string_in_list(string, list/L)
if(!L || !L.len || !string)
if(!LAZYLEN(L) || !string)
return
for(var/V in L)
if(string == V)
@@ -81,7 +91,7 @@
//Removes a string from a list
/proc/remove_strings_from_list(string, list/L)
if(!L || !L.len || !string)
if(!LAZYLEN(L) || !string)
return
for(var/V in L)
if(V == string)
@@ -486,16 +496,6 @@
//Picks from the list, with some safeties, and returns the "default" arg if it fails
#define DEFAULTPICK(L, default) ((islist(L) && length(L)) ? pick(L) : default)
#define LAZYINITLIST(L) if (!L) L = list()
#define UNSETEMPTY(L) if (L && !L.len) L = null
#define LAZYREMOVE(L, I) if(L) { L -= I; if(!L.len) { L = null; } }
#define LAZYADD(L, I) if(!L) { L = list(); } L += I;
#define LAZYACCESS(L, I) (L ? (isnum(I) ? (I > 0 && I <= L.len ? L[I] : null) : L[I]) : null)
#define LAZYSET(L, K, V) if(!L) { L = list(); } L[K] = V;
#define LAZYLEN(L) length(L)
#define LAZYCLEARLIST(L) if(L) L.Cut()
#define SANITIZE_LIST(L) ( islist(L) ? L : list() )
/* Definining a counter as a series of key -> numeric value entries
* All these procs modify in place.
-19
View File
@@ -326,25 +326,6 @@
return M
return null
// Will return a list of active candidates. It increases the buffer 5 times until it finds a candidate which is active within the buffer.
/proc/get_candidates(be_special_type, afk_bracket = CONFIG_GET(number/inactivity_period), jobbanType)
var/list/candidates = list()
// Keep looping until we find a non-afk candidate within the time bracket (we limit the bracket to 10 minutes (6000))
var/afk_period = CONFIG_GET(number/afk_period)
while(!candidates.len && afk_bracket < afk_period)
for(var/mob/dead/observer/G in GLOB.player_list)
if(G.client != null)
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
if(!G.client.is_afk(afk_bracket) && (be_special_type in G.client.prefs.be_special))
if (jobbanType)
if(!(jobban_isbanned(G, jobbanType) || jobban_isbanned(G, "Syndicate")))
candidates += G.client
else
candidates += G.client
afk_bracket += 600 // Add a minute to the bracket, for every attempt
return candidates
/proc/considered_alive(datum/mind/M, enforce_human = TRUE)
if(M && M.current)
if(enforce_human)
+1 -1
View File
@@ -198,7 +198,7 @@ GLOBAL_LIST_INIT(sqrtTable, list(1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4,
var/list/screen_loc_Y = splittext(screen_loc_params[2],":")
var/x = (text2num(screen_loc_X[1]) * 32 + text2num(screen_loc_X[2]) - 32)
var/y = (text2num(screen_loc_Y[1]) * 32 + text2num(screen_loc_Y[2]) - 32)
var/list/screenview = getviewsize(client)
var/list/screenview = getviewsize(client.view)
var/screenviewX = screenview[1] * world.icon_size
var/screenviewY = screenview[2] * world.icon_size
var/ox = round(screenviewX/2) - client.pixel_x //"origin" x
+17 -24
View File
@@ -14,30 +14,23 @@
//breaks when hittin invalid characters thereafter
/proc/hex2num(hex)
. = 0
if(istext(hex))
var/negative = 0
var/len = length(hex)
for(var/i=1, i<=len, i++)
var/num = text2ascii(hex,i)
switch(num)
if(48 to 57)
num -= 48 //0-9
if(97 to 102)
num -= 87 //a-f
if(65 to 70)
num -= 55 //A-F
if(45)
negative = 1//-
else
if(num)
break
else
continue
. *= 16
. += num
if(negative)
. *= -1
return .
var/place = 1
for(var/i in length(hex) to 1 step -1)
var/num = text2ascii(hex, i)
switch(num)
if(48 to 57)
num -= 48 //0-9
if(97 to 102)
num -= 87 //a-f
if(65 to 70)
num -= 55 //A-F
if(45)
return . * -1 // -
else
CRASH("Malformed hex number")
. += num * place
place *= 16
//Returns the hex value of a decimal number
//len == length of returned string
-1
View File
@@ -35,4 +35,3 @@ GLOBAL_PROTECT(MAX_EX_FLASH_RANGE)
GLOBAL_VAR_INIT(MAX_EX_FLAME_RANGE, 14)
GLOBAL_PROTECT(MAX_EX_FLAME_RANGE)
GLOBAL_VAR_INIT(DYN_EX_SCALE, 0.5)
+27 -17
View File
@@ -285,7 +285,7 @@
if(!stat && mind && iscarbon(A) && A != src)
var/datum/antagonist/changeling/C = mind.has_antag_datum(/datum/antagonist/changeling)
if(C && C.chosen_sting)
C.chosen_sting.try_to_sting(src,A)
C.chosen_sting.try_to_sting(src,A)
next_click = world.time + 5
return
swap_hand()
@@ -349,7 +349,7 @@
if(!stat && mind && iscarbon(A) && A != src)
var/datum/antagonist/changeling/C = mind.has_antag_datum(/datum/antagonist/changeling)
if(C && C.chosen_sting)
C.chosen_sting.try_to_sting(src,A)
C.chosen_sting.try_to_sting(src,A)
next_click = world.time + 5
return
..()
@@ -433,28 +433,38 @@
else
setDir(WEST)
//debug
/obj/screen/proc/scale_to(x1,y1)
if(!y1)
y1 = x1
var/matrix/M = new
M.Scale(x1,y1)
transform = M
/obj/screen/click_catcher
icon = 'icons/mob/screen_gen.dmi'
icon_state = "flash"
icon_state = "catcher"
plane = CLICKCATCHER_PLANE
mouse_opacity = MOUSE_OPACITY_OPAQUE
screen_loc = "CENTER"
#define MAX_SAFE_BYOND_ICON_SCALE_TILES (MAX_SAFE_BYOND_ICON_SCALE_PX / world.icon_size)
#define MAX_SAFE_BYOND_ICON_SCALE_PX 33 * 32 //Not using world.icon_size on purpose.
/obj/screen/click_catcher/proc/UpdateGreed(view_size_x = 15, view_size_y = 15)
var/icon/newicon = icon('icons/mob/screen_gen.dmi', "flash")
if(view_size_x > 32 || view_size_y > 32)
newicon.Scale(16 * world.icon_size,16 * world.icon_size)
icon = newicon
var/tx = ((view_size_x - 1)*0.5)/16
var/ty = ((view_size_y - 1)*0.5)/16
var/matrix/M = new
M.Scale(tx, ty)
transform = M
screen_loc = "CENTER-16,CENTER-16"
else
screen_loc = "CENTER-[(view_size_x-1)*0.5],CENTER-[(view_size_y-1)*0.5]"
newicon.Scale(view_size_x * world.icon_size,view_size_y * world.icon_size)
icon = newicon
var/icon/newicon = icon('icons/mob/screen_gen.dmi', "catcher")
var/ox = min(MAX_SAFE_BYOND_ICON_SCALE_TILES, view_size_x)
var/oy = min(MAX_SAFE_BYOND_ICON_SCALE_TILES, view_size_y)
var/px = view_size_x * world.icon_size
var/py = view_size_y * world.icon_size
var/sx = min(MAX_SAFE_BYOND_ICON_SCALE_PX, px)
var/sy = min(MAX_SAFE_BYOND_ICON_SCALE_PX, py)
newicon.Scale(sx, sy)
icon = newicon
screen_loc = "CENTER-[(ox-1)*0.5],CENTER-[(oy-1)*0.5]"
var/matrix/M = new
M.Scale(px/sx, py/sy)
transform = M
/obj/screen/click_catcher/Click(location, control, params)
var/list/modifiers = params2list(params)
+49 -28
View File
@@ -11,7 +11,7 @@
attack_verb = list("poked", "jabbed", "hit")
light_color = "#37FFF7"
var/light_brightness = 3
actions_types = list(/datum/action/item_action/pick_color)
actions_types = list()
/obj/item/toy/sword/cx/attack_self(mob/user)
active = !( active )
@@ -57,18 +57,21 @@
var/mob/M = loc
M.update_inv_hands()
/obj/item/toy/sword/cx/ui_action_click(mob/user, var/datum/action/A)
if(istype(A, /datum/action/item_action/pick_color))
if(alert("Are you sure you want to recolor your blade?", "Confirm Repaint", "Yes", "No") == "Yes")
var/energy_color_input = input(usr,"Choose Energy Color") as color|null
if(energy_color_input)
light_color = sanitize_hexcolor(energy_color_input, desired_format=6, include_crunch=1)
update_icon()
update_light()
A.UpdateButtonIcon()
/obj/item/toy/sword/cx/AltClick(mob/living/user)
if(user.incapacitated() || !istype(user))
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
return
if(!in_range(src, user))
return
if(user.incapacitated() || !istype(user) || !in_range(src, user))
return
else
..()
if(alert("Are you sure you want to recolor your blade?", "Confirm Repaint", "Yes", "No") == "Yes")
var/energy_color_input = input(usr,"Choose Energy Color") as color|null
if(energy_color_input)
light_color = sanitize_hexcolor(energy_color_input, desired_format=6, include_crunch=1)
update_icon()
update_light()
/obj/item/toy/sword/cx/worn_overlays(isinhands, icon_file)
. = ..()
@@ -79,7 +82,21 @@
. += blade_inhand
/obj/item/toy/sword/cx/attackby(obj/item/W, mob/living/user, params)
return //NO MORE MAKING DUAL ESWORDS
if(istype(W, /obj/item/toy/sword/cx))
if((W.flags_1 & NODROP_1) || (flags_1 & NODROP_1))
to_chat(user, "<span class='warning'>\the [flags_1 & NODROP_1 ? src : W] is stuck to your hand, you can't attach it to \the [flags_1 & NODROP_1 ? W : src]!</span>")
return
else
to_chat(user, "<span class='notice'>You combine the two plastic swords, making a single supermassive toy! You're fake-cool.</span>")
new /obj/item/twohanded/hypereutactic/toy(user.loc)
qdel(W)
qdel(src)
else
return ..()
/obj/item/toy/sword/cx/examine(mob/user)
..()
to_chat(user, "<span class='notice'>Alt-click to recolor it.</span>")
/*///autolathe memes/// I really need to stop doing this and find a proper way of adding in my toys
@@ -124,7 +141,7 @@
origin_tech = "combat=3;magnets=4"
block_chance = 60
light_color = "#37FFF7"
actions_types = list(/datum/action/item_action/pick_color)
actions_types = list()
/obj/item/melee/transforming/energy/sword/cx/transform_weapon(mob/living/user, supress_message_text)
active = !active //I'd use a ..() here but it'd inherit from the regular esword's proc instead, so SPAGHETTI CODE
@@ -152,9 +169,6 @@
update_icon()
transform_messages(user, supress_message_text)
add_fingerprint(user)
for(var/X in actions)
var/datum/action/A = X
A.UpdateButtonIcon()
return TRUE
/obj/item/melee/transforming/energy/sword/cx/transform_messages(mob/living/user, supress_message_text)
@@ -181,18 +195,25 @@
var/mob/M = loc
M.update_inv_hands()
/obj/item/melee/transforming/energy/sword/cx/ui_action_click(mob/user, var/datum/action/A)
if(istype(A, /datum/action/item_action/pick_color))
if(alert("Are you sure you want to recolor your blade?", "Confirm Repaint", "Yes", "No") == "Yes")
var/energy_color_input = input(usr,"Choose Energy Color") as color|null
if(energy_color_input)
light_color = sanitize_hexcolor(energy_color_input, desired_format=6, include_crunch=1)
update_icon()
update_light()
A.UpdateButtonIcon()
/obj/item/melee/transforming/energy/sword/cx/AltClick(mob/living/user)
if(user.incapacitated() || !istype(user))
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
return
if(!in_range(src, user))
return
if(user.incapacitated() || !istype(user) || !in_range(src, user))
return
else
..()
if(alert("Are you sure you want to recolor your blade?", "Confirm Repaint", "Yes", "No") == "Yes")
var/energy_color_input = input(usr,"Choose Energy Color") as color|null
if(energy_color_input)
light_color = sanitize_hexcolor(energy_color_input, desired_format=6, include_crunch=1)
update_icon()
update_light()
/obj/item/melee/transforming/energy/sword/cx/examine(mob/user)
..()
to_chat(user, "<span class='notice'>Alt-click to recolor it.</span>")
/obj/item/melee/transforming/energy/sword/cx/worn_overlays(isinhands, icon_file)
. = ..()
+53 -39
View File
@@ -16,17 +16,20 @@
/obj/item/clothing/neck/cloak/inferno
name = "Kiara's Cloak"
desc = "The design on this seems a little too familiar."
icon = 'icons/obj/clothing/cloaks.dmi'
icon_state = "infcloak"
item_state = "infcloak"
icon = 'icons/obj/custom.dmi'
icon_state = "infcloak-i"
icon_override = 'icons/obj/custom.dmi'
item_state = "infcloak-w"
w_class = WEIGHT_CLASS_SMALL
body_parts_covered = CHEST|GROIN|LEGS|ARMS
/obj/item/clothing/neck/petcollar/inferno
name = "Kiara's Collar"
desc = "A soft black collar that seems to stretch to fit whoever wears it."
icon_state = "infcollar"
item_state = "infcollar"
icon = 'icons/obj/custom.dmi'
icon_state = "infcollar-i"
icon_override = 'icons/obj/custom.dmi'
item_state = "infcollar-w"
item_color = null
tagname = null
@@ -43,7 +46,7 @@
/obj/item/lighter/gold
name = "\improper Engraved Zippo"
desc = "A shiny and relatively expensive zippo lighter. There's a small etched in verse on the bottom that reads, 'No Gods, No Masters, Only Man.'"
icon = 'icons/obj/cigarettes.dmi'
icon = 'icons/obj/custom.dmi'
icon_state = "gold_zippo"
item_state = "gold_zippo"
w_class = WEIGHT_CLASS_TINY
@@ -58,16 +61,20 @@
/obj/item/clothing/neck/scarf/zomb //Default white color, same functionality as beanies.
name = "A special scarf"
icon_state = "zombscarf"
icon = 'icons/obj/custom.dmi'
icon_state = "zombscarf-i"
desc = "A fashionable collar"
item_color = "zombscarf"
icon_override = 'icons/obj/custom.dmi'
item_color = "zombscarf-w"
dog_fashion = /datum/dog_fashion/head
/obj/item/clothing/suit/toggle/labcoat/mad/red
name = "\improper The Mad's labcoat"
desc = "An oddly special looking coat."
icon_state = "labred"
item_state = "labred"
icon = 'icons/obj/custom.dmi'
icon_state = "labred-i"
icon_override = 'icons/obj/custom.dmi'
item_state = "labred-w"
/*PLACEHOLDER*/
@@ -86,17 +93,17 @@
/obj/item/clothing/neck/cloak/carrot
name = "carrot cloak"
desc = "A cloak in the shape and color of a carrot!"
icon = 'icons/obj/clothing/cloaks.dmi'
icon_override = 'icons/mob/citadel/suit.dmi'
icon_state = "carrotcloak"
item_state = "carrotcloak"
icon = 'icons/obj/custom.dmi'
icon_override = 'icons/obj/custom.dmi'
icon_state = "carrotcloak-i"
item_state = "carrotcloak-w"
w_class = WEIGHT_CLASS_SMALL
body_parts_covered = CHEST|GROIN|LEGS|ARMS
/obj/item/toy/plush/tree
name = "christmass tree plushie"
desc = "A festive plush that squeeks when you squeeze it!"
icon = 'icons/obj/plushes.dmi'
icon = 'icons/obj/custom.dmi'
icon_state = "pine_c"
item_state = "pine_c"
w_class = WEIGHT_CLASS_SMALL
@@ -107,10 +114,10 @@
/obj/item/clothing/neck/cloak/festive
name = "Celebratory Cloak of Morozko"
desc = " It probably will protect from snow, charcoal or elves."
icon = 'icons/obj/clothing/cloaks.dmi'
icon_override = 'icons/mob/citadel/suit.dmi'
icon_state = "festivecloak"
item_state = "festiveloak"
icon = 'icons/obj/custom.dmi'
icon_state = "festive-i"
item_state = "festive-w"
icon_override = 'icons/obj/custom.dmi'
w_class = WEIGHT_CLASS_SMALL
body_parts_covered = CHEST|GROIN|LEGS|ARMS
@@ -119,9 +126,10 @@
/obj/item/clothing/mask/luchador/zigfie
name = "Alboroto Rosa mask"
icon = 'icons/mob/mask.dmi'
icon_state = "lucharzigfie"
item_state = "lucharzigfie"
icon = 'icons/obj/custom.dmi'
icon_state = "lucharzigfie-i"
icon_override = 'icons/obj/custom.dmi'
item_state = "lucharzigfie-w"
/*PLACEHOLDER*/
@@ -159,8 +167,10 @@
/obj/item/clothing/suit/trenchcoat/green
name = "Reece's Great Coat"
desc = "You would swear this was in your nightmares after eating too many veggies."
icon_state = "hos-g"
item_state = "hos-g"
icon = 'icons/obj/custom.dmi'
icon_state = "hos-g-i"
icon_override = 'icons/obj/custom.dmi'
item_state = "hos-g-w"
body_parts_covered = CHEST|GROIN|ARMS|LEGS
@@ -170,14 +180,15 @@
desc = "Every good russian spaceman knows it's a good idea to bring along a couple of pints of whiskey wherever they go."
icon = 'icons/obj/custom.dmi'
icon_state = "russianflask"
item_state = "russianflask"
volume = 60
/obj/item/clothing/mask/gas/stalker
name = "S.T.A.L.K.E.R. mask"
desc = "Smells like reactor four."
item_state = "stalker"
icon_state = "stalker"
icon = 'icons/obj/custom.dmi'
item_state = "stalker-w"
icon_override = 'icons/obj/custom.dmi'
icon_state = "stalker-i"
/*Sylas*/
@@ -185,8 +196,9 @@
name = "collar"
desc = "It's a collar..."
icon = 'icons/obj/custom.dmi'
icon_state = "petcollar-stripe"
item_color = "petcollar-stripe"
icon_state = "petcollar-stripe-i"
icon_override = 'icons/obj/custom.dmi'
item_state = "petcollar-stripe-w"
tagname = null
@@ -194,17 +206,21 @@
/obj/item/clothing/under/singery/custom
name = "bluish performer's outfit"
desc = "Just looking at this makes you want to sing."
icon_state = "ssing"
item_state = "ssing"
item_color = "ssing"
icon = 'icons/obj/custom.dmi'
icon_state = "singer-i"
icon_override = 'icons/obj/custom.dmi'
item_state = "singer-w"
item_color = "singer-i"
fitted = NO_FEMALE_UNIFORM
alternate_worn_layer = ABOVE_SHOES_LAYER
can_adjust = 0
/obj/item/clothing/shoes/sneakers/pink
icon_state = "pink"
item_state = "pink"
icon = 'icons/obj/custom.dmi'
icon_state = "pink-i"
icon_override = 'icons/obj/custom.dmi'
item_state = "pink-w"
/*Fractious*/
@@ -212,10 +228,8 @@
/obj/item/clothing/suit/vermillion
name = "vermillion clothing"
desc = "Some clothing."
icon_state = "vermillion-w"
item_state = "vermillion-i"
icon_state = "vermillion-i"
item_state = "vermillion-w"
body_parts_covered = CHEST|GROIN|LEGS|ARMS|HANDS
icon = 'icons/obj/custom.dmi'
icon_override = 'icons/obj/custom.dmi'
@@ -168,7 +168,10 @@ GLOBAL_PROTECT(config_dir)
mode_names[M.config_tag] = M.name
probabilities[M.config_tag] = M.probability
mode_reports[M.config_tag] = M.generate_report()
mode_false_report_weight[M.config_tag] = M.false_report_weight
if(M.probability)
mode_false_report_weight[M.config_tag] = M.false_report_weight
else
mode_false_report_weight[M.config_tag] = 1
if(M.votable)
votable_modes += M.config_tag
qdel(M)
@@ -208,9 +208,9 @@ CONFIG_DEF(string/panic_server_name)
/datum/config_entry/string/panic_server_name/ValidateAndSet(str_val)
return str_val != "\[Put the name here\]" && ..()
CONFIG_DEF(string/panic_address) //Reconnect a player this linked server if this server isn't accepting new players
CONFIG_DEF(string/panic_server_address) //Reconnect a player this linked server if this server isn't accepting new players
/datum/config_entry/string/panic_address/ValidateAndSet(str_val)
/datum/config_entry/string/panic_server_address/ValidateAndSet(str_val)
return str_val != "byond://address:port" && ..()
CONFIG_DEF(string/invoke_youtubedl)
@@ -377,7 +377,7 @@ CONFIG_TWEAK(number/mc_tick_rate/ValidateAndSet(str_val))
CONFIG_DEF(flag/resume_after_initializations)
CONFIG_TWEAK(flag/ValidateAndSet(str_val))
CONFIG_TWEAK(flag/resume_after_initializations/ValidateAndSet(str_val))
. = ..()
if(. && Master.current_runlevel)
world.sleep_offline = !value
@@ -385,3 +385,6 @@ CONFIG_TWEAK(flag/ValidateAndSet(str_val))
CONFIG_DEF(number/rounds_until_hard_restart)
value = -1
min_val = 0
CONFIG_DEF(string/default_view)
value = "15x15"
@@ -263,4 +263,4 @@ CONFIG_DEF(number/emergency_shuttle_autocall_threshold)
max_val = 1
integer = FALSE
CONFIG_DEF(flag/ic_printing)
CONFIG_DEF(flag/ic_printing)
+11 -4
View File
@@ -33,8 +33,8 @@ SUBSYSTEM_DEF(ticker)
SCRIPTURE_APPLICATION = FALSE) //list of clockcult scripture states for announcements
var/delay_end = 0 //if set true, the round will not restart on it's own
var/admin_delay_notice = "" //a message to display to anyone who tries to restart the world after a delay
var/ready_for_reboot = FALSE //all roundend preparation done with, all that's left is reboot
var/triai = 0 //Global holder for Triumvirate
var/tipped = 0 //Did we broadcast the tip of the day yet?
@@ -584,10 +584,17 @@ SUBSYSTEM_DEF(ticker)
SSblackbox.Seal()
sleep(50)
if(mode.station_was_nuked)
Reboot("Station destroyed by Nuclear Device.", "nuke")
ready_for_reboot = TRUE
standard_reboot()
/datum/controller/subsystem/ticker/proc/standard_reboot()
if(ready_for_reboot)
if(mode.station_was_nuked)
Reboot("Station destroyed by Nuclear Device.", "nuke")
else
Reboot("Round ended.", "proper completion")
else
Reboot("Round ended.", "proper completion")
CRASH("Attempted standard reboot without ticker roundend completion")
/datum/controller/subsystem/ticker/proc/send_tip_of_the_round()
var/m
+9
View File
@@ -41,5 +41,14 @@ SUBSYSTEM_DEF(weather)
if(W.name == weather_name && W.target_z == Z)
W.telegraph()
/datum/controller/subsystem/weather/proc/is_weather_affecting_area(area/A, weather_datum_type)
for(var/V in processing)
var/datum/weather/W = V
if(!istype(W, weather_datum_type))
continue
if(A in W.impacted_areas)
return TRUE
return FALSE
/datum/controller/subsystem/weather/proc/make_z_eligible(zlevel)
eligible_zlevels |= zlevel
+8 -7
View File
@@ -71,7 +71,7 @@
var/datum/objective/escape/escape_objective = new
escape_objective.owner = owner
objectives += escape_objective
if(31 to 60)
var/datum/objective/steal/steal_objective = new
steal_objective.owner = owner
@@ -103,8 +103,8 @@
if (!(locate(/datum/objective/hijack) in owner.objectives))
var/datum/objective/hijack/hijack_objective = new
hijack_objective.owner = owner
objectives += hijack_objective
objectives += hijack_objective
for(var/datum/objective/O in objectives)
owner.objectives += O
@@ -128,7 +128,7 @@
if(H.age < wiz_age)
H.age = wiz_age
H.equipOutfit(outfit_type)
/datum/antagonist/wizard/greet()
to_chat(owner, "<span class='boldannounce'>You are the Space Wizard!</span>")
to_chat(owner, "<B>The Space Wizards Federation has given you the following tasks:</B>")
@@ -208,7 +208,7 @@
owner.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/knock(null))
owner.AddSpell(new /obj/effect/proc_holder/spell/targeted/mind_transfer(null))
to_chat(owner, "<B>Your service has not gone unrewarded, however. Studying under [master.current.real_name], you have learned stealthy, robeless spells. You are able to cast knock and mindswap.")
/datum/antagonist/wizard/apprentice/create_objectives()
var/datum/objective/protect/new_objective = new /datum/objective/protect
new_objective.owner = owner
@@ -221,6 +221,7 @@
/datum/antagonist/wizard/apprentice/imposter
name = "Wizard Imposter"
allow_rename = FALSE
move_to_lair = FALSE
/datum/antagonist/wizard/apprentice/imposter/greet()
to_chat(owner, "<B>You are an imposter! Trick and confuse the crew to misdirect malice from your handsome original!</B>")
@@ -266,7 +267,7 @@
/datum/antagonist/wizard/academy/equip_wizard()
. = ..()
owner.AddSpell(new /obj/effect/proc_holder/spell/targeted/ethereal_jaunt)
owner.AddSpell(new /obj/effect/proc_holder/spell/targeted/projectile/magic_missile)
owner.AddSpell(new /obj/effect/proc_holder/spell/aimed/fireball)
@@ -274,7 +275,7 @@
var/mob/living/M = owner.current
if(!istype(M))
return
var/obj/item/implant/exile/Implant = new/obj/item/implant/exile(M)
Implant.implant(M)
+1 -1
View File
@@ -28,7 +28,7 @@
/datum/brain_trauma/severe/blindness
name = "Cerebral Blindness"
desc = "Patient's brain is no longer connected to its eyes."
scan_desc = "extensive damage to the brain's frontal lobe"
scan_desc = "extensive damage to the brain's occipital lobe"
gain_text = "<span class='warning'>You can't see!</span>"
lose_text = "<span class='notice'>Your vision returns.</span>"
+9 -1
View File
@@ -10,13 +10,21 @@
gain_text = "<span class='notice'>You feel a higher power inside your mind...</span>"
lose_text = "<span class='warning'>The divine presence leaves your head, no longer interested.</span>"
var/next_speech = 0
var/inspiration = FALSE
/datum/brain_trauma/special/godwoken/on_life()
..()
if(!inspiration && world.time > next_speech && prob(4))
to_chat(owner, "<span class='notice'>[pick("You feel inspired!","You feel power course through you...","You feel something within you itching to speak...")]</span>")
inspiration = TRUE
/datum/brain_trauma/special/godwoken/on_say(message)
if(world.time > next_speech && prob(10))
if(world.time > next_speech && inspiration)
playsound(get_turf(owner), 'sound/magic/clockwork/invoke_general.ogg', 300, 1, 5)
var/cooldown = voice_of_god(message, owner, list("colossus","yell"), 2)
cooldown *= 0.33
next_speech = world.time + cooldown
inspiration = FALSE
return ""
else
return message
+60
View File
@@ -0,0 +1,60 @@
/datum/component/caltrop
var/min_damage
var/max_damage
var/probability
var/flags
var/cooldown = 0
/datum/component/caltrop/Initialize(_min_damage = 0, _max_damage = 0, _probability = 100, _flags = NONE)
min_damage = _min_damage
max_damage = max(_min_damage, _max_damage)
probability = _probability
flags = _flags
RegisterSignal(list(COMSIG_MOVABLE_CROSSED), .proc/Crossed)
/datum/component/caltrop/proc/Crossed(atom/movable/AM)
var/atom/A = parent
if(!A.has_gravity())
return
if(!prob(probability))
return
if(ishuman(AM))
var/mob/living/carbon/human/H = AM
if(PIERCEIMMUNE in H.dna.species.species_traits)
return
if((flags & CALTROP_IGNORE_WALKERS) && H.m_intent == MOVE_INTENT_WALK)
return
var/picked_def_zone = pick("l_leg", "r_leg")
var/obj/item/bodypart/O = H.get_bodypart(picked_def_zone)
if(!istype(O))
return
if(O.status == BODYPART_ROBOTIC)
return
var/feetCover = (H.wear_suit && (H.wear_suit.body_parts_covered & FEET)) || (H.w_uniform && (H.w_uniform.body_parts_covered & FEET))
if(!(flags & CALTROP_BYPASS_SHOES) && (H.shoes || feetCover))
return
if((H.movement_type & FLYING) || H.buckled)
return
var/damage = rand(min_damage, max_damage)
H.apply_damage(damage, BRUTE, picked_def_zone)
if(cooldown < world.time - 10) //cooldown to avoid message spam.
if(!H.incapacitated(ignore_restraints = TRUE))
H.visible_message("<span class='danger'>[H] steps on [A].</span>", \
"<span class='userdanger'>You step on [A]!</span>")
else
H.visible_message("<span class='danger'>[H] slides on [A]!</span>", \
"<span class='userdanger'>You slide on [A]!</span>")
cooldown = world.time
H.Knockdown(60)
+1 -1
View File
@@ -58,7 +58,7 @@
return
. = COMPONENT_NO_AFTERATTACK
var/datum/callback/pc = precondition
if(pc && !pc.Invoke())
if(pc && !pc.Invoke(user))
return
var/material_amount = get_item_material_amount(I)
if(!material_amount)
+326 -326
View File
@@ -1,326 +1,326 @@
/datum/component/riding
var/next_vehicle_move = 0 //used for move delays
var/vehicle_move_delay = 2 //tick delay between movements, lower = faster, higher = slower
var/keytype
var/slowed = FALSE
var/slowvalue = 1
var/list/riding_offsets = list() //position_of_user = list(dir = list(px, py)), or RIDING_OFFSET_ALL for a generic one.
var/list/directional_vehicle_layers = list() //["[DIRECTION]"] = layer. Don't set it for a direction for default, set a direction to null for no change.
var/list/directional_vehicle_offsets = list() //same as above but instead of layer you have a list(px, py)
var/list/allowed_turf_typecache
var/list/forbid_turf_typecache //allow typecache for only certain turfs, forbid to allow all but those. allow only certain turfs will take precedence.
var/allow_one_away_from_valid_turf = TRUE //allow moving one tile away from a valid turf but not more.
var/override_allow_spacemove = FALSE
var/drive_verb = "drive"
var/ride_check_rider_incapacitated = FALSE
var/ride_check_rider_restrained = FALSE
var/ride_check_ridden_incapacitated = FALSE
/datum/component/riding/Initialize()
if(!ismovableatom(parent))
. = COMPONENT_INCOMPATIBLE
CRASH("RIDING COMPONENT ASSIGNED TO NON ATOM MOVABLE!")
RegisterSignal(COMSIG_MOVABLE_BUCKLE, .proc/vehicle_mob_buckle)
RegisterSignal(COMSIG_MOVABLE_UNBUCKLE, .proc/vehicle_mob_unbuckle)
RegisterSignal(COMSIG_MOVABLE_MOVED, .proc/vehicle_moved)
/datum/component/riding/proc/vehicle_mob_unbuckle(mob/living/M, force = FALSE)
restore_position(M)
unequip_buckle_inhands(M)
/datum/component/riding/proc/vehicle_mob_buckle(mob/living/M, force = FALSE)
handle_vehicle_offsets()
/datum/component/riding/proc/handle_vehicle_layer()
var/atom/movable/AM = parent
var/static/list/defaults = list(TEXT_NORTH = OBJ_LAYER, TEXT_SOUTH = ABOVE_MOB_LAYER, TEXT_EAST = ABOVE_MOB_LAYER, TEXT_WEST = ABOVE_MOB_LAYER)
. = defaults["[AM.dir]"]
if(directional_vehicle_layers["[AM.dir]"])
. = directional_vehicle_layers["[AM.dir]"]
if(isnull(.)) //you can set it to null to not change it.
. = AM.layer
AM.layer = .
/datum/component/riding/proc/set_vehicle_dir_layer(dir, layer)
directional_vehicle_layers["[dir]"] = layer
/datum/component/riding/proc/vehicle_moved()
var/atom/movable/AM = parent
for(var/i in AM.buckled_mobs)
ride_check(i)
handle_vehicle_offsets()
handle_vehicle_layer()
/datum/component/riding/proc/ride_check(mob/living/M)
var/atom/movable/AM = parent
var/mob/AMM = AM
if((ride_check_rider_restrained && M.restrained(TRUE)) || (ride_check_rider_incapacitated && M.incapacitated(FALSE, TRUE)) || (ride_check_ridden_incapacitated && istype(AMM) && AMM.incapacitated(FALSE, TRUE)))
AM.visible_message("<span class='warning'>[M] falls off of [AM]!</span>")
AM.unbuckle_mob(M)
return TRUE
/datum/component/riding/proc/force_dismount(mob/living/M)
var/atom/movable/AM = parent
AM.unbuckle_mob(M)
/datum/component/riding/proc/handle_vehicle_offsets()
var/atom/movable/AM = parent
var/AM_dir = "[AM.dir]"
var/passindex = 0
if(AM.has_buckled_mobs())
for(var/m in AM.buckled_mobs)
passindex++
var/mob/living/buckled_mob = m
var/list/offsets = get_offsets(passindex)
var/rider_dir = get_rider_dir(passindex)
buckled_mob.setDir(rider_dir)
dir_loop:
for(var/offsetdir in offsets)
if(offsetdir == AM_dir)
var/list/diroffsets = offsets[offsetdir]
buckled_mob.pixel_x = diroffsets[1]
if(diroffsets.len >= 2)
buckled_mob.pixel_y = diroffsets[2]
if(diroffsets.len == 3)
buckled_mob.layer = diroffsets[3]
break dir_loop
var/list/static/default_vehicle_pixel_offsets = list(TEXT_NORTH = list(0, 0), TEXT_SOUTH = list(0, 0), TEXT_EAST = list(0, 0), TEXT_WEST = list(0, 0))
var/px = default_vehicle_pixel_offsets[AM_dir]
var/py = default_vehicle_pixel_offsets[AM_dir]
if(directional_vehicle_offsets[AM_dir])
if(isnull(directional_vehicle_offsets[AM_dir]))
px = AM.pixel_x
py = AM.pixel_y
else
px = directional_vehicle_offsets[AM_dir][1]
py = directional_vehicle_offsets[AM_dir][2]
AM.pixel_x = px
AM.pixel_y = py
/datum/component/riding/proc/set_vehicle_dir_offsets(dir, x, y)
directional_vehicle_offsets["[dir]"] = list(x, y)
//Override this to set your vehicle's various pixel offsets
/datum/component/riding/proc/get_offsets(pass_index) // list(dir = x, y, layer)
. = list(TEXT_NORTH = list(0, 0), TEXT_SOUTH = list(0, 0), TEXT_EAST = list(0, 0), TEXT_WEST = list(0, 0))
if(riding_offsets["[pass_index]"])
. = riding_offsets["[pass_index]"]
else if(riding_offsets["[RIDING_OFFSET_ALL]"])
. = riding_offsets["[RIDING_OFFSET_ALL]"]
/datum/component/riding/proc/set_riding_offsets(index, list/offsets)
if(!islist(offsets))
return FALSE
riding_offsets["[index]"] = offsets
//Override this to set the passengers/riders dir based on which passenger they are.
//ie: rider facing the vehicle's dir, but passenger 2 facing backwards, etc.
/datum/component/riding/proc/get_rider_dir(pass_index)
var/atom/movable/AM = parent
return AM.dir
//KEYS
/datum/component/riding/proc/keycheck(mob/user)
return !keytype || user.is_holding_item_of_type(keytype)
//BUCKLE HOOKS
/datum/component/riding/proc/restore_position(mob/living/buckled_mob)
if(buckled_mob)
buckled_mob.pixel_x = 0
buckled_mob.pixel_y = 0
if(buckled_mob.client)
buckled_mob.client.change_view(world.view)
//MOVEMENT
/datum/component/riding/proc/turf_check(turf/next, turf/current)
if(allowed_turf_typecache && !allowed_turf_typecache[next.type])
return (allow_one_away_from_valid_turf && allowed_turf_typecache[current.type])
else if(forbid_turf_typecache && forbid_turf_typecache[next.type])
return (allow_one_away_from_valid_turf && !forbid_turf_typecache[current.type])
return TRUE
/datum/component/riding/proc/handle_ride(mob/user, direction)
var/atom/movable/AM = parent
if(user.incapacitated())
Unbuckle(user)
return
if(world.time < next_vehicle_move)
return
next_vehicle_move = world.time + vehicle_move_delay
if(keycheck(user))
var/turf/next = get_step(AM, direction)
var/turf/current = get_turf(AM)
if(!istype(next) || !istype(current))
return //not happening.
if(!turf_check(next, current))
to_chat(user, "Your \the [AM] can not go onto [next]!")
return
if(!Process_Spacemove(direction) || !isturf(AM.loc))
return
step(AM, direction)
handle_vehicle_layer()
handle_vehicle_offsets()
else
to_chat(user, "<span class='notice'>You'll need the keys in one of your hands to [drive_verb] [AM].</span>")
/datum/component/riding/proc/Unbuckle(atom/movable/M)
addtimer(CALLBACK(parent, /atom/movable/.proc/unbuckle_mob, M), 0, TIMER_UNIQUE)
/datum/component/riding/proc/Process_Spacemove(direction)
var/atom/movable/AM = parent
return override_allow_spacemove || AM.has_gravity()
/datum/component/riding/proc/account_limbs(mob/living/M)
if(M.get_num_legs() < 2 && !slowed)
vehicle_move_delay = vehicle_move_delay + slowvalue
slowed = TRUE
else if(slowed)
vehicle_move_delay = vehicle_move_delay - slowvalue
slowed = FALSE
///////Yes, I said humans. No, this won't end well...//////////
/datum/component/riding/human
/datum/component/riding/human/Initialize()
. = ..()
RegisterSignal(COMSIG_HUMAN_MELEE_UNARMED_ATTACK, .proc/on_host_unarmed_melee)
/datum/component/riding/human/proc/on_host_unarmed_melee(atom/target)
var/mob/living/carbon/human/AM = parent
if(AM.a_intent == INTENT_DISARM && (target in AM.buckled_mobs))
force_dismount(target)
/datum/component/riding/human/handle_vehicle_layer()
var/atom/movable/AM = parent
if(AM.buckled_mobs && AM.buckled_mobs.len)
if(AM.dir == SOUTH)
AM.layer = ABOVE_MOB_LAYER
else
AM.layer = OBJ_LAYER
else
AM.layer = MOB_LAYER
/datum/component/riding/human/force_dismount(mob/living/user)
var/atom/movable/AM = parent
AM.unbuckle_mob(user)
user.Knockdown(60)
user.visible_message("<span class='warning'>[AM] pushes [user] off of them!</span>")
/datum/component/riding/cyborg
/datum/component/riding/cyborg/ride_check(mob/user)
var/atom/movable/AM = parent
if(user.incapacitated())
var/kick = TRUE
if(iscyborg(AM))
var/mob/living/silicon/robot/R = AM
if(R.module && R.module.ride_allow_incapacitated)
kick = FALSE
if(kick)
to_chat(user, "<span class='userdanger'>You fall off of [AM]!</span>")
Unbuckle(user)
return
if(iscarbon(user))
var/mob/living/carbon/carbonuser = user
if(!carbonuser.get_num_arms())
Unbuckle(user)
to_chat(user, "<span class='userdanger'>You can't grab onto [AM] with no hands!</span>")
return
/datum/component/riding/cyborg/handle_vehicle_layer()
var/atom/movable/AM = parent
if(AM.buckled_mobs && AM.buckled_mobs.len)
if(AM.dir == SOUTH)
AM.layer = ABOVE_MOB_LAYER
else
AM.layer = OBJ_LAYER
else
AM.layer = MOB_LAYER
/datum/component/riding/cyborg/get_offsets(pass_index) // list(dir = x, y, layer)
return list(TEXT_NORTH = list(0, 4), TEXT_SOUTH = list(0, 4), TEXT_EAST = list(-6, 3), TEXT_WEST = list( 6, 3))
/datum/component/riding/cyborg/handle_vehicle_offsets()
var/atom/movable/AM = parent
if(AM.has_buckled_mobs())
for(var/mob/living/M in AM.buckled_mobs)
M.setDir(AM.dir)
if(iscyborg(AM))
var/mob/living/silicon/robot/R = AM
if(istype(R.module))
M.pixel_x = R.module.ride_offset_x[dir2text(AM.dir)]
M.pixel_y = R.module.ride_offset_y[dir2text(AM.dir)]
else
..()
/datum/component/riding/cyborg/force_dismount(mob/living/M)
var/atom/movable/AM = parent
AM.unbuckle_mob(M)
var/turf/target = get_edge_target_turf(AM, AM.dir)
var/turf/targetm = get_step(get_turf(AM), AM.dir)
M.Move(targetm)
M.visible_message("<span class='warning'>[M] is thrown clear of [AM]!</span>")
M.throw_at(target, 14, 5, AM)
M.Knockdown(60)
/datum/component/riding/proc/equip_buckle_inhands(mob/living/carbon/human/user, amount_required = 1)
var/atom/movable/AM = parent
var/amount_equipped = 0
for(var/amount_needed = amount_required, amount_needed > 0, amount_needed--)
var/obj/item/riding_offhand/inhand = new /obj/item/riding_offhand(user)
inhand.rider = user
inhand.parent = AM
if(user.put_in_hands(inhand, TRUE))
amount_equipped++
else
break
if(amount_equipped >= amount_required)
return TRUE
else
unequip_buckle_inhands(user)
return FALSE
/datum/component/riding/proc/unequip_buckle_inhands(mob/living/carbon/user)
var/atom/movable/AM = parent
for(var/obj/item/riding_offhand/O in user.contents)
if(O.parent != AM)
CRASH("RIDING OFFHAND ON WRONG MOB")
continue
if(O.selfdeleting)
continue
else
qdel(O)
return TRUE
/obj/item/riding_offhand
name = "offhand"
icon = 'icons/obj/items_and_weapons.dmi'
icon_state = "offhand"
w_class = WEIGHT_CLASS_HUGE
flags_1 = ABSTRACT_1 | DROPDEL_1 | NOBLUDGEON_1
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
var/mob/living/carbon/rider
var/mob/living/parent
var/selfdeleting = FALSE
/obj/item/riding_offhand/dropped()
selfdeleting = TRUE
. = ..()
/obj/item/riding_offhand/equipped()
if(loc != rider)
selfdeleting = TRUE
qdel(src)
. = ..()
/obj/item/riding_offhand/Destroy()
var/atom/movable/AM = parent
if(selfdeleting)
if(rider in AM.buckled_mobs)
AM.unbuckle_mob(rider)
. = ..()
/datum/component/riding
var/next_vehicle_move = 0 //used for move delays
var/vehicle_move_delay = 2 //tick delay between movements, lower = faster, higher = slower
var/keytype
var/slowed = FALSE
var/slowvalue = 1
var/list/riding_offsets = list() //position_of_user = list(dir = list(px, py)), or RIDING_OFFSET_ALL for a generic one.
var/list/directional_vehicle_layers = list() //["[DIRECTION]"] = layer. Don't set it for a direction for default, set a direction to null for no change.
var/list/directional_vehicle_offsets = list() //same as above but instead of layer you have a list(px, py)
var/list/allowed_turf_typecache
var/list/forbid_turf_typecache //allow typecache for only certain turfs, forbid to allow all but those. allow only certain turfs will take precedence.
var/allow_one_away_from_valid_turf = TRUE //allow moving one tile away from a valid turf but not more.
var/override_allow_spacemove = FALSE
var/drive_verb = "drive"
var/ride_check_rider_incapacitated = FALSE
var/ride_check_rider_restrained = FALSE
var/ride_check_ridden_incapacitated = FALSE
/datum/component/riding/Initialize()
if(!ismovableatom(parent))
. = COMPONENT_INCOMPATIBLE
CRASH("RIDING COMPONENT ASSIGNED TO NON ATOM MOVABLE!")
RegisterSignal(COMSIG_MOVABLE_BUCKLE, .proc/vehicle_mob_buckle)
RegisterSignal(COMSIG_MOVABLE_UNBUCKLE, .proc/vehicle_mob_unbuckle)
RegisterSignal(COMSIG_MOVABLE_MOVED, .proc/vehicle_moved)
/datum/component/riding/proc/vehicle_mob_unbuckle(mob/living/M, force = FALSE)
restore_position(M)
unequip_buckle_inhands(M)
/datum/component/riding/proc/vehicle_mob_buckle(mob/living/M, force = FALSE)
handle_vehicle_offsets()
/datum/component/riding/proc/handle_vehicle_layer()
var/atom/movable/AM = parent
var/static/list/defaults = list(TEXT_NORTH = OBJ_LAYER, TEXT_SOUTH = ABOVE_MOB_LAYER, TEXT_EAST = ABOVE_MOB_LAYER, TEXT_WEST = ABOVE_MOB_LAYER)
. = defaults["[AM.dir]"]
if(directional_vehicle_layers["[AM.dir]"])
. = directional_vehicle_layers["[AM.dir]"]
if(isnull(.)) //you can set it to null to not change it.
. = AM.layer
AM.layer = .
/datum/component/riding/proc/set_vehicle_dir_layer(dir, layer)
directional_vehicle_layers["[dir]"] = layer
/datum/component/riding/proc/vehicle_moved()
var/atom/movable/AM = parent
for(var/i in AM.buckled_mobs)
ride_check(i)
handle_vehicle_offsets()
handle_vehicle_layer()
/datum/component/riding/proc/ride_check(mob/living/M)
var/atom/movable/AM = parent
var/mob/AMM = AM
if((ride_check_rider_restrained && M.restrained(TRUE)) || (ride_check_rider_incapacitated && M.incapacitated(FALSE, TRUE)) || (ride_check_ridden_incapacitated && istype(AMM) && AMM.incapacitated(FALSE, TRUE)))
AM.visible_message("<span class='warning'>[M] falls off of [AM]!</span>")
AM.unbuckle_mob(M)
return TRUE
/datum/component/riding/proc/force_dismount(mob/living/M)
var/atom/movable/AM = parent
AM.unbuckle_mob(M)
/datum/component/riding/proc/handle_vehicle_offsets()
var/atom/movable/AM = parent
var/AM_dir = "[AM.dir]"
var/passindex = 0
if(AM.has_buckled_mobs())
for(var/m in AM.buckled_mobs)
passindex++
var/mob/living/buckled_mob = m
var/list/offsets = get_offsets(passindex)
var/rider_dir = get_rider_dir(passindex)
buckled_mob.setDir(rider_dir)
dir_loop:
for(var/offsetdir in offsets)
if(offsetdir == AM_dir)
var/list/diroffsets = offsets[offsetdir]
buckled_mob.pixel_x = diroffsets[1]
if(diroffsets.len >= 2)
buckled_mob.pixel_y = diroffsets[2]
if(diroffsets.len == 3)
buckled_mob.layer = diroffsets[3]
break dir_loop
var/list/static/default_vehicle_pixel_offsets = list(TEXT_NORTH = list(0, 0), TEXT_SOUTH = list(0, 0), TEXT_EAST = list(0, 0), TEXT_WEST = list(0, 0))
var/px = default_vehicle_pixel_offsets[AM_dir]
var/py = default_vehicle_pixel_offsets[AM_dir]
if(directional_vehicle_offsets[AM_dir])
if(isnull(directional_vehicle_offsets[AM_dir]))
px = AM.pixel_x
py = AM.pixel_y
else
px = directional_vehicle_offsets[AM_dir][1]
py = directional_vehicle_offsets[AM_dir][2]
AM.pixel_x = px
AM.pixel_y = py
/datum/component/riding/proc/set_vehicle_dir_offsets(dir, x, y)
directional_vehicle_offsets["[dir]"] = list(x, y)
//Override this to set your vehicle's various pixel offsets
/datum/component/riding/proc/get_offsets(pass_index) // list(dir = x, y, layer)
. = list(TEXT_NORTH = list(0, 0), TEXT_SOUTH = list(0, 0), TEXT_EAST = list(0, 0), TEXT_WEST = list(0, 0))
if(riding_offsets["[pass_index]"])
. = riding_offsets["[pass_index]"]
else if(riding_offsets["[RIDING_OFFSET_ALL]"])
. = riding_offsets["[RIDING_OFFSET_ALL]"]
/datum/component/riding/proc/set_riding_offsets(index, list/offsets)
if(!islist(offsets))
return FALSE
riding_offsets["[index]"] = offsets
//Override this to set the passengers/riders dir based on which passenger they are.
//ie: rider facing the vehicle's dir, but passenger 2 facing backwards, etc.
/datum/component/riding/proc/get_rider_dir(pass_index)
var/atom/movable/AM = parent
return AM.dir
//KEYS
/datum/component/riding/proc/keycheck(mob/user)
return !keytype || user.is_holding_item_of_type(keytype)
//BUCKLE HOOKS
/datum/component/riding/proc/restore_position(mob/living/buckled_mob)
if(buckled_mob)
buckled_mob.pixel_x = 0
buckled_mob.pixel_y = 0
if(buckled_mob.client)
buckled_mob.client.change_view(CONFIG_GET(string/default_view))
//MOVEMENT
/datum/component/riding/proc/turf_check(turf/next, turf/current)
if(allowed_turf_typecache && !allowed_turf_typecache[next.type])
return (allow_one_away_from_valid_turf && allowed_turf_typecache[current.type])
else if(forbid_turf_typecache && forbid_turf_typecache[next.type])
return (allow_one_away_from_valid_turf && !forbid_turf_typecache[current.type])
return TRUE
/datum/component/riding/proc/handle_ride(mob/user, direction)
var/atom/movable/AM = parent
if(user.incapacitated())
Unbuckle(user)
return
if(world.time < next_vehicle_move)
return
next_vehicle_move = world.time + vehicle_move_delay
if(keycheck(user))
var/turf/next = get_step(AM, direction)
var/turf/current = get_turf(AM)
if(!istype(next) || !istype(current))
return //not happening.
if(!turf_check(next, current))
to_chat(user, "Your \the [AM] can not go onto [next]!")
return
if(!Process_Spacemove(direction) || !isturf(AM.loc))
return
step(AM, direction)
handle_vehicle_layer()
handle_vehicle_offsets()
else
to_chat(user, "<span class='notice'>You'll need the keys in one of your hands to [drive_verb] [AM].</span>")
/datum/component/riding/proc/Unbuckle(atom/movable/M)
addtimer(CALLBACK(parent, /atom/movable/.proc/unbuckle_mob, M), 0, TIMER_UNIQUE)
/datum/component/riding/proc/Process_Spacemove(direction)
var/atom/movable/AM = parent
return override_allow_spacemove || AM.has_gravity()
/datum/component/riding/proc/account_limbs(mob/living/M)
if(M.get_num_legs() < 2 && !slowed)
vehicle_move_delay = vehicle_move_delay + slowvalue
slowed = TRUE
else if(slowed)
vehicle_move_delay = vehicle_move_delay - slowvalue
slowed = FALSE
///////Yes, I said humans. No, this won't end well...//////////
/datum/component/riding/human
/datum/component/riding/human/Initialize()
. = ..()
RegisterSignal(COMSIG_HUMAN_MELEE_UNARMED_ATTACK, .proc/on_host_unarmed_melee)
/datum/component/riding/human/proc/on_host_unarmed_melee(atom/target)
var/mob/living/carbon/human/AM = parent
if(AM.a_intent == INTENT_DISARM && (target in AM.buckled_mobs))
force_dismount(target)
/datum/component/riding/human/handle_vehicle_layer()
var/atom/movable/AM = parent
if(AM.buckled_mobs && AM.buckled_mobs.len)
if(AM.dir == SOUTH)
AM.layer = ABOVE_MOB_LAYER
else
AM.layer = OBJ_LAYER
else
AM.layer = MOB_LAYER
/datum/component/riding/human/force_dismount(mob/living/user)
var/atom/movable/AM = parent
AM.unbuckle_mob(user)
user.Knockdown(60)
user.visible_message("<span class='warning'>[AM] pushes [user] off of them!</span>")
/datum/component/riding/cyborg
/datum/component/riding/cyborg/ride_check(mob/user)
var/atom/movable/AM = parent
if(user.incapacitated())
var/kick = TRUE
if(iscyborg(AM))
var/mob/living/silicon/robot/R = AM
if(R.module && R.module.ride_allow_incapacitated)
kick = FALSE
if(kick)
to_chat(user, "<span class='userdanger'>You fall off of [AM]!</span>")
Unbuckle(user)
return
if(iscarbon(user))
var/mob/living/carbon/carbonuser = user
if(!carbonuser.get_num_arms())
Unbuckle(user)
to_chat(user, "<span class='userdanger'>You can't grab onto [AM] with no hands!</span>")
return
/datum/component/riding/cyborg/handle_vehicle_layer()
var/atom/movable/AM = parent
if(AM.buckled_mobs && AM.buckled_mobs.len)
if(AM.dir == SOUTH)
AM.layer = ABOVE_MOB_LAYER
else
AM.layer = OBJ_LAYER
else
AM.layer = MOB_LAYER
/datum/component/riding/cyborg/get_offsets(pass_index) // list(dir = x, y, layer)
return list(TEXT_NORTH = list(0, 4), TEXT_SOUTH = list(0, 4), TEXT_EAST = list(-6, 3), TEXT_WEST = list( 6, 3))
/datum/component/riding/cyborg/handle_vehicle_offsets()
var/atom/movable/AM = parent
if(AM.has_buckled_mobs())
for(var/mob/living/M in AM.buckled_mobs)
M.setDir(AM.dir)
if(iscyborg(AM))
var/mob/living/silicon/robot/R = AM
if(istype(R.module))
M.pixel_x = R.module.ride_offset_x[dir2text(AM.dir)]
M.pixel_y = R.module.ride_offset_y[dir2text(AM.dir)]
else
..()
/datum/component/riding/cyborg/force_dismount(mob/living/M)
var/atom/movable/AM = parent
AM.unbuckle_mob(M)
var/turf/target = get_edge_target_turf(AM, AM.dir)
var/turf/targetm = get_step(get_turf(AM), AM.dir)
M.Move(targetm)
M.visible_message("<span class='warning'>[M] is thrown clear of [AM]!</span>")
M.throw_at(target, 14, 5, AM)
M.Knockdown(60)
/datum/component/riding/proc/equip_buckle_inhands(mob/living/carbon/human/user, amount_required = 1)
var/atom/movable/AM = parent
var/amount_equipped = 0
for(var/amount_needed = amount_required, amount_needed > 0, amount_needed--)
var/obj/item/riding_offhand/inhand = new /obj/item/riding_offhand(user)
inhand.rider = user
inhand.parent = AM
if(user.put_in_hands(inhand, TRUE))
amount_equipped++
else
break
if(amount_equipped >= amount_required)
return TRUE
else
unequip_buckle_inhands(user)
return FALSE
/datum/component/riding/proc/unequip_buckle_inhands(mob/living/carbon/user)
var/atom/movable/AM = parent
for(var/obj/item/riding_offhand/O in user.contents)
if(O.parent != AM)
CRASH("RIDING OFFHAND ON WRONG MOB")
continue
if(O.selfdeleting)
continue
else
qdel(O)
return TRUE
/obj/item/riding_offhand
name = "offhand"
icon = 'icons/obj/items_and_weapons.dmi'
icon_state = "offhand"
w_class = WEIGHT_CLASS_HUGE
flags_1 = ABSTRACT_1 | DROPDEL_1 | NOBLUDGEON_1
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
var/mob/living/carbon/rider
var/mob/living/parent
var/selfdeleting = FALSE
/obj/item/riding_offhand/dropped()
selfdeleting = TRUE
. = ..()
/obj/item/riding_offhand/equipped()
if(loc != rider)
selfdeleting = TRUE
qdel(src)
. = ..()
/obj/item/riding_offhand/Destroy()
var/atom/movable/AM = parent
if(selfdeleting)
if(rider in AM.buckled_mobs)
AM.unbuckle_mob(rider)
. = ..()
+204 -204
View File
@@ -1,204 +1,204 @@
GLOBAL_LIST_EMPTY(uplinks)
/**
* Uplinks
*
* All /obj/item(s) have a hidden_uplink var. By default it's null. Give the item one with 'new(src') (it must be in it's contents). Then add 'uses.'
* Use whatever conditionals you want to check that the user has an uplink, and then call interact() on their uplink.
* You might also want the uplink menu to open if active. Check if the uplink is 'active' and then interact() with it.
**/
/datum/component/uplink
dupe_mode = COMPONENT_DUPE_UNIQUE
var/name = "syndicate uplink"
var/active = FALSE
var/lockable = TRUE
var/locked = TRUE
var/telecrystals
var/selected_cat
var/owner = null
var/datum/game_mode/gamemode
var/spent_telecrystals = 0
var/datum/uplink_purchase_log/purchase_log
var/list/uplink_items
var/hidden_crystals = 0
/datum/component/uplink/Initialize(_owner, _lockable = TRUE, _enabled = FALSE, datum/game_mode/_gamemode, starting_tc = 20)
if(!isitem(parent))
return COMPONENT_INCOMPATIBLE
GLOB.uplinks += src
uplink_items = get_uplink_items(gamemode)
RegisterSignal(COMSIG_PARENT_ATTACKBY, .proc/OnAttackBy)
RegisterSignal(COMSIG_ITEM_ATTACK_SELF, .proc/interact)
owner = _owner
if(owner)
LAZYINITLIST(GLOB.uplink_purchase_logs_by_key)
if(GLOB.uplink_purchase_logs_by_key[owner])
purchase_log = GLOB.uplink_purchase_logs_by_key[owner]
else
purchase_log = new(owner, src)
lockable = _lockable
active = _enabled
gamemode = _gamemode
telecrystals = starting_tc
if(!lockable)
active = TRUE
locked = FALSE
/datum/component/uplink/InheritComponent(datum/component/uplink/U)
lockable |= U.lockable
active |= U.active
if(!gamemode)
gamemode = U.gamemode
telecrystals += U.telecrystals
if(purchase_log && U.purchase_log)
purchase_log.MergeWithAndDel(U.purchase_log)
/datum/component/uplink/Destroy()
GLOB.uplinks -= src
gamemode = null
return ..()
/datum/component/uplink/proc/LoadTC(mob/user, obj/item/stack/telecrystal/TC, silent = FALSE)
if(!silent)
to_chat(user, "<span class='notice'>You slot [TC] into [parent] and charge its internal uplink.</span>")
var/amt = TC.amount
telecrystals += amt
TC.use(amt)
/datum/component/uplink/proc/set_gamemode(_gamemode)
gamemode = _gamemode
uplink_items = get_uplink_items(gamemode)
/datum/component/uplink/proc/OnAttackBy(obj/item/I, mob/user)
if(!active)
return //no hitting everyone/everything just to try to slot tcs in!
if(istype(I, /obj/item/stack/telecrystal))
LoadTC(user, I)
for(var/item in subtypesof(/datum/uplink_item))
var/datum/uplink_item/UI = item
var/path = null
if(initial(UI.refund_path))
path = initial(UI.refund_path)
else
path = initial(UI.item)
var/cost = 0
if(initial(UI.refund_amount))
cost = initial(UI.refund_amount)
else
cost = initial(UI.cost)
var/refundable = initial(UI.refundable)
if(I.type == path && refundable && I.check_uplink_validity())
telecrystals += cost
spent_telecrystals -= cost
to_chat(user, "<span class='notice'>[I] refunded.</span>")
qdel(I)
return
/datum/component/uplink/proc/interact(mob/user)
if(locked)
return
active = TRUE
if(user)
ui_interact(user)
/datum/component/uplink/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.inventory_state)
active = TRUE
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "uplink", name, 450, 750, master_ui, state)
ui.set_autoupdate(FALSE) // This UI is only ever opened by one person, and never is updated outside of user input.
ui.set_style("syndicate")
ui.open()
/datum/component/uplink/ui_data(mob/user)
if(!user.mind)
return
var/list/data = list()
data["telecrystals"] = telecrystals
data["lockable"] = lockable
data["categories"] = list()
for(var/category in uplink_items)
var/list/cat = list(
"name" = category,
"items" = (category == selected_cat ? list() : null))
if(category == selected_cat)
for(var/item in uplink_items[category])
var/datum/uplink_item/I = uplink_items[category][item]
if(I.limited_stock == 0)
continue
if(I.restricted_roles.len)
var/is_inaccessible = 1
for(var/R in I.restricted_roles)
if(R == user.mind.assigned_role)
is_inaccessible = 0
if(is_inaccessible)
continue
cat["items"] += list(list(
"name" = I.name,
"cost" = I.cost,
"desc" = I.desc,
))
data["categories"] += list(cat)
return data
/datum/component/uplink/ui_act(action, params)
if(!active)
return
switch(action)
if("buy")
var/item = params["item"]
var/list/buyable_items = list()
for(var/category in uplink_items)
buyable_items += uplink_items[category]
if(item in buyable_items)
var/datum/uplink_item/I = buyable_items[item]
MakePurchase(usr, I)
. = TRUE
if("lock")
active = FALSE
locked = TRUE
telecrystals += hidden_crystals
hidden_crystals = 0
SStgui.close_uis(src)
if("select")
selected_cat = params["category"]
return TRUE
/datum/component/uplink/proc/MakePurchase(mob/user, datum/uplink_item/U)
if(!istype(U))
return
if (!user || user.incapacitated())
return
if(telecrystals < U.cost || U.limited_stock == 0)
return
telecrystals -= U.cost
var/atom/A = U.spawn_item(get_turf(user), src, user)
if(U.purchase_log_vis && purchase_log)
var/obj/item/storage/box/B = A
var/list/atom/logging = list()
if(istype(B) && B.contents.len > 0)
logging |= list(B)
else
logging |= A
for(var/atom/_logging in logging)
purchase_log.LogPurchase(_logging, U.cost)
if(U.limited_stock > 0)
U.limited_stock -= 1
SSblackbox.record_feedback("nested tally", "traitor_uplink_items_bought", 1, list("[initial(U.name)]", "[U.cost]"))
if(ishuman(user) && istype(A, /obj/item))
var/mob/living/carbon/human/H = user
if(H.put_in_hands(A))
to_chat(H, "[A] materializes into your hands!")
else
to_chat(H, "\The [A] materializes onto the floor.")
return TRUE
GLOBAL_LIST_EMPTY(uplinks)
/**
* Uplinks
*
* All /obj/item(s) have a hidden_uplink var. By default it's null. Give the item one with 'new(src') (it must be in it's contents). Then add 'uses.'
* Use whatever conditionals you want to check that the user has an uplink, and then call interact() on their uplink.
* You might also want the uplink menu to open if active. Check if the uplink is 'active' and then interact() with it.
**/
/datum/component/uplink
dupe_mode = COMPONENT_DUPE_UNIQUE
var/name = "syndicate uplink"
var/active = FALSE
var/lockable = TRUE
var/locked = TRUE
var/telecrystals
var/selected_cat
var/owner = null
var/datum/game_mode/gamemode
var/spent_telecrystals = 0
var/datum/uplink_purchase_log/purchase_log
var/list/uplink_items
var/hidden_crystals = 0
/datum/component/uplink/Initialize(_owner, _lockable = TRUE, _enabled = FALSE, datum/game_mode/_gamemode, starting_tc = 20)
if(!isitem(parent))
return COMPONENT_INCOMPATIBLE
GLOB.uplinks += src
uplink_items = get_uplink_items(gamemode)
RegisterSignal(COMSIG_PARENT_ATTACKBY, .proc/OnAttackBy)
RegisterSignal(COMSIG_ITEM_ATTACK_SELF, .proc/interact)
owner = _owner
if(owner)
LAZYINITLIST(GLOB.uplink_purchase_logs_by_key)
if(GLOB.uplink_purchase_logs_by_key[owner])
purchase_log = GLOB.uplink_purchase_logs_by_key[owner]
else
purchase_log = new(owner, src)
lockable = _lockable
active = _enabled
gamemode = _gamemode
telecrystals = starting_tc
if(!lockable)
active = TRUE
locked = FALSE
/datum/component/uplink/InheritComponent(datum/component/uplink/U)
lockable |= U.lockable
active |= U.active
if(!gamemode)
gamemode = U.gamemode
telecrystals += U.telecrystals
if(purchase_log && U.purchase_log)
purchase_log.MergeWithAndDel(U.purchase_log)
/datum/component/uplink/Destroy()
GLOB.uplinks -= src
gamemode = null
return ..()
/datum/component/uplink/proc/LoadTC(mob/user, obj/item/stack/telecrystal/TC, silent = FALSE)
if(!silent)
to_chat(user, "<span class='notice'>You slot [TC] into [parent] and charge its internal uplink.</span>")
var/amt = TC.amount
telecrystals += amt
TC.use(amt)
/datum/component/uplink/proc/set_gamemode(_gamemode)
gamemode = _gamemode
uplink_items = get_uplink_items(gamemode)
/datum/component/uplink/proc/OnAttackBy(obj/item/I, mob/user)
if(!active)
return //no hitting everyone/everything just to try to slot tcs in!
if(istype(I, /obj/item/stack/telecrystal))
LoadTC(user, I)
for(var/item in subtypesof(/datum/uplink_item))
var/datum/uplink_item/UI = item
var/path = null
if(initial(UI.refund_path))
path = initial(UI.refund_path)
else
path = initial(UI.item)
var/cost = 0
if(initial(UI.refund_amount))
cost = initial(UI.refund_amount)
else
cost = initial(UI.cost)
var/refundable = initial(UI.refundable)
if(I.type == path && refundable && I.check_uplink_validity())
telecrystals += cost
spent_telecrystals -= cost
to_chat(user, "<span class='notice'>[I] refunded.</span>")
qdel(I)
return
/datum/component/uplink/proc/interact(mob/user)
if(locked)
return
active = TRUE
if(user)
ui_interact(user)
/datum/component/uplink/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.inventory_state)
active = TRUE
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "uplink", name, 450, 750, master_ui, state)
ui.set_autoupdate(FALSE) // This UI is only ever opened by one person, and never is updated outside of user input.
ui.set_style("syndicate")
ui.open()
/datum/component/uplink/ui_data(mob/user)
if(!user.mind)
return
var/list/data = list()
data["telecrystals"] = telecrystals
data["lockable"] = lockable
data["categories"] = list()
for(var/category in uplink_items)
var/list/cat = list(
"name" = category,
"items" = (category == selected_cat ? list() : null))
if(category == selected_cat)
for(var/item in uplink_items[category])
var/datum/uplink_item/I = uplink_items[category][item]
if(I.limited_stock == 0)
continue
if(I.restricted_roles.len)
var/is_inaccessible = 1
for(var/R in I.restricted_roles)
if(R == user.mind.assigned_role)
is_inaccessible = 0
if(is_inaccessible)
continue
cat["items"] += list(list(
"name" = I.name,
"cost" = I.cost,
"desc" = I.desc,
))
data["categories"] += list(cat)
return data
/datum/component/uplink/ui_act(action, params)
if(!active)
return
switch(action)
if("buy")
var/item = params["item"]
var/list/buyable_items = list()
for(var/category in uplink_items)
buyable_items += uplink_items[category]
if(item in buyable_items)
var/datum/uplink_item/I = buyable_items[item]
MakePurchase(usr, I)
. = TRUE
if("lock")
active = FALSE
locked = TRUE
telecrystals += hidden_crystals
hidden_crystals = 0
SStgui.close_uis(src)
if("select")
selected_cat = params["category"]
return TRUE
/datum/component/uplink/proc/MakePurchase(mob/user, datum/uplink_item/U)
if(!istype(U))
return
if (!user || user.incapacitated())
return
if(telecrystals < U.cost || U.limited_stock == 0)
return
telecrystals -= U.cost
var/atom/A = U.spawn_item(get_turf(user), src, user)
if(U.purchase_log_vis && purchase_log)
var/obj/item/storage/box/B = A
var/list/atom/logging = list()
if(istype(B) && B.contents.len > 0)
logging |= list(B)
else
logging |= A
for(var/atom/_logging in logging)
purchase_log.LogPurchase(_logging, U.cost)
if(U.limited_stock > 0)
U.limited_stock -= 1
SSblackbox.record_feedback("nested tally", "traitor_uplink_items_bought", 1, list("[initial(U.name)]", "[U.cost]"))
if(ishuman(user) && istype(A, /obj/item))
var/mob/living/carbon/human/H = user
if(H.put_in_hands(A))
to_chat(H, "[A] materializes into your hands!")
else
to_chat(H, "\The [A] materializes onto the floor.")
return TRUE
+1 -9
View File
@@ -104,15 +104,7 @@
else
atomsnowflake += "<b>[D]</b>"
var/formatted_type = "[type]"
if(length(formatted_type) > 25)
var/middle_point = length(formatted_type) / 2
var/splitpoint = findtext(formatted_type,"/",middle_point)
if(splitpoint)
formatted_type = "[copytext(formatted_type,1,splitpoint)]<br>[copytext(formatted_type,splitpoint)]"
else
formatted_type = "Type too long" //No suitable splitpoint (/) found.
var/formatted_type = replacetext("[type]", "/", "<wbr>/")
var/marked
if(holder && holder.marked_datum && holder.marked_datum == D)
marked = "<br><font size='1' color='red'><b>Marked Object</b></font>"
+1
View File
@@ -171,6 +171,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
/area/maintenance/department/science/xenobiology
name = "Xenobiology Maintenance"
icon_state = "xenomaint"
xenobiology_compatible = TRUE
//Maintenance - Generic
+1
View File
@@ -61,6 +61,7 @@
var/list/cameras
var/list/firealarms
var/firedoors_last_closed_on = 0
var/xenobiology_compatible = FALSE //Can the Xenobio management console transverse this area by default?
/*Adding a wizard area teleport list because motherfucking lag -- Urist*/
/*I am far too lazy to make it a proper list of areas so I'll just make it run the usual telepot routine at the start of the game*/
@@ -1,8 +1,8 @@
/datum/round_event_control/borer
name = "Borer"
typepath = /datum/round_event/borer
weight = 10 //Default weight
max_occurrences = 1
weight = 0
max_occurrences = 0
min_players = 20 //10 is MINIMUM needed, but this is not a gamemode that does well in lowpop
earliest_start = 24000 //40 min, double default timer
@@ -411,6 +411,11 @@
revenant = null
qdel(src)
/obj/item/ectoplasm/revenant/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is inhaling [src]! It looks like [user.p_theyre()] trying to visit the shadow realm!</span>")
scatter()
return (OXYLOSS)
/obj/item/ectoplasm/revenant/Destroy()
if(!QDELETED(revenant))
qdel(revenant)
+14 -5
View File
@@ -551,16 +551,25 @@ This is here to make the tiles around the station mininuke change when it's arme
/obj/item/disk/nuclear/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is going delta! It looks like [user.p_theyre()] trying to commit suicide!</span>")
playsound(user.loc, 'sound/machines/alarm.ogg', 50, -1, 1)
playsound(src, 'sound/machines/alarm.ogg', 50, -1, 1)
for(var/i in 1 to 100)
addtimer(CALLBACK(user, /atom/proc/add_atom_colour, (i % 2)? "#00FF00" : "#FF0000", ADMIN_COLOUR_PRIORITY), i)
addtimer(CALLBACK(user, /atom/proc/remove_atom_colour, ADMIN_COLOUR_PRIORITY), 101)
addtimer(CALLBACK(user, /atom/proc/visible_message, "<span class='suicide'>[user] was destroyed by the nuclear blast!</span>"), 101)
addtimer(CALLBACK(user, /mob/living/proc/adjustOxyLoss, 200), 101)
addtimer(CALLBACK(user, /mob/proc/death, 0), 101)
addtimer(CALLBACK(src, .proc/manual_suicide, user), 101)
return MANUAL_SUICIDE
/obj/item/disk/proc/manual_suicide(mob/living/user)
user.remove_atom_colour(ADMIN_COLOUR_PRIORITY)
user.visible_message("<span class='suicide'>[user] was destroyed by the nuclear blast!</span>")
user.adjustOxyLoss(200)
user.death(0)
/obj/item/disk/fakenucleardisk
name = "cheap plastic imitation of the nuclear authentication disk"
desc = "Broken dreams and a faint odor of cheese."
icon_state = "nucleardisk"
/obj/item/disk/fakenucleardisk/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is pretending to go delta! It looks like [user.p_theyre()] trying to commit suicide!</span>")
playsound(src, 'sound/machines/alarm.ogg', 30, -1, 1)
addtimer(CALLBACK(src, .proc/manual_suicide, user), 101)
return MANUAL_SUICIDE
+3
View File
@@ -897,6 +897,9 @@
to_chat(user,"<span class='warning'>[src] suddenly vanishes!</span>")
qdel(src)
/obj/item/spellbook/oneuse/random
icon_state = "random_book"
/obj/item/spellbook/oneuse/random/Initialize()
..()
var/static/banned_spells = list(/obj/item/spellbook/oneuse/mimery_blockade, /obj/item/spellbook/oneuse/mimery_guns)
+5 -2
View File
@@ -138,7 +138,7 @@
if(isnull(amount))
amount = 0
var/atom/temp = new typepath(null)
var/atom/temp = typepath
var/datum/data/vending_product/R = new /datum/data/vending_product()
R.product_name = initial(temp.name)
R.product_path = typepath
@@ -638,7 +638,8 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C
/obj/item/reagent_containers/food/drinks/bottle/cream = 4, /obj/item/reagent_containers/food/drinks/soda_cans/tonic = 8,
/obj/item/reagent_containers/food/drinks/soda_cans/cola = 8, /obj/item/reagent_containers/food/drinks/soda_cans/sodawater = 15,
/obj/item/reagent_containers/food/drinks/drinkingglass = 30, /obj/item/reagent_containers/food/drinks/ice = 10,
/obj/item/reagent_containers/food/drinks/drinkingglass/shotglass = 12, /obj/item/reagent_containers/food/drinks/flask = 3)
/obj/item/reagent_containers/food/drinks/drinkingglass/shotglass = 12, /obj/item/reagent_containers/food/drinks/flask = 3,
/obj/item/reagent_containers/food/drinks/beer = 6)
contraband = list(/obj/item/reagent_containers/food/drinks/mug/tea = 12)
product_slogans = "I hope nobody asks me for a bloody cup o' tea...;Alcohol is humanity's friend. Would you abandon a friend?;Quite delighted to serve you!;Is nobody thirsty on this station?"
product_ads = "Drink up!;Booze is good for you!;Alcohol is humanity's best friend.;Quite delighted to serve you!;Care for a nice, cold beer?;Nothing cures you like booze!;Have a sip!;Have a drink!;Have a beer!;Beer is good for you!;Only the finest alcohol!;Best quality booze since 2053!;Award-winning wine!;Maximum alcohol!;Man loves beer.;A toast for progress!"
@@ -678,6 +679,7 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C
/obj/machinery/vending/snack/random
name = "\improper Random Snackies"
icon_state = "random_snack"
desc = "Uh oh!"
/obj/machinery/vending/snack/random/Initialize()
@@ -730,6 +732,7 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C
/obj/machinery/vending/cola/random
name = "\improper Random Drinkies"
icon_state = "random_cola"
desc = "Uh oh!"
/obj/machinery/vending/cola/random/Initialize()
+4 -2
View File
@@ -34,9 +34,11 @@
"Misc"
)
var/datum/component/material_container/materials
/obj/machinery/mecha_part_fabricator/Initialize()
var/datum/component/material_container/materials = AddComponent(/datum/component/material_container,
list(MAT_METAL, MAT_GLASS, MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_PLASMA, MAT_URANIUM, MAT_BANANIUM, MAT_TITANIUM, MAT_BLUESPACE),
materials = AddComponent(/datum/component/material_container,
list(MAT_METAL, MAT_GLASS, MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_PLASMA, MAT_URANIUM, MAT_BANANIUM, MAT_TITANIUM, MAT_BLUESPACE), 0,
FALSE, list(/obj/item/stack, /obj/item/ore/bluespace_crystal), CALLBACK(src, .proc/is_insertion_ready), CALLBACK(src, .proc/AfterMaterialInsert))
materials.precise_insertion = TRUE
return ..()
+2 -2
View File
@@ -970,7 +970,7 @@
setDir(dir_in)
if(L && L.client)
L.client.change_view(world.view)
L.client.change_view(CONFIG_GET(string/default_view))
zoom_mode = 0
/////////////////////////
@@ -1042,4 +1042,4 @@ GLOBAL_VAR_INIT(year_integer, text2num(year)) // = 2013???
/obj/mecha/update_remote_sight(mob/living/user)
if(occupant_sight_flags)
if(user == occupant)
user.sight |= occupant_sight_flags
user.sight |= occupant_sight_flags
+1 -1
View File
@@ -244,7 +244,7 @@
owner.client.change_view(12)
SEND_SOUND(owner, sound('sound/mecha/imag_enh.ogg',volume=50))
else
owner.client.change_view(world.view) //world.view - default mob view size
owner.client.change_view(CONFIG_GET(string/default_view)) //world.view - default mob view size
UpdateButtonIcon()
/datum/action/innate/mecha/mech_switch_damtype
+10
View File
@@ -20,6 +20,16 @@
R.add_fingerprint(user)
qdel(src)
/obj/item/bodybag/suicide_act(mob/user)
if(isopenturf(user.loc))
user.visible_message("<span class='suicide'>[user] is crawling into [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
var/obj/structure/closet/body_bag/R = new unfoldedbag_path(user.loc)
R.add_fingerprint(user)
qdel(src)
user.forceMove(R)
playsound(src, 'sound/items/zip.ogg', 15, 1, -3)
return (OXYLOSS)
..()
// Bluespace bodybag
+2
View File
@@ -25,9 +25,11 @@
/obj/item/lipstick/random
name = "lipstick"
icon_state = "random_lipstick"
/obj/item/lipstick/random/New()
..()
icon_state = "lipstick"
colour = pick("red","purple","lime","black","green","blue","white")
name = "[colour] lipstick"
+63 -55
View File
@@ -18,11 +18,11 @@
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 50)
var/on = FALSE //if the paddles are equipped (1) or on the defib (0)
var/safety = 1 //if you can zap people with the defibs on harm mode
var/powered = 0 //if there's a cell in the defib with enough power for a revive, blocks paddles from reviving otherwise
var/safety = TRUE //if you can zap people with the defibs on harm mode
var/powered = FALSE //if there's a cell in the defib with enough power for a revive, blocks paddles from reviving otherwise
var/obj/item/twohanded/shockpaddles/paddles
var/obj/item/stock_parts/cell/high/cell
var/combat = 0 //can we revive through space suits?
var/combat = FALSE //can we revive through space suits?
var/grab_ghost = FALSE // Do we pull the ghost back into their body?
/obj/item/defibrillator/get_cell()
@@ -49,11 +49,11 @@
/obj/item/defibrillator/proc/update_power()
if(cell)
if(cell.charge < paddles.revivecost)
powered = 0
powered = FALSE
else
powered = 1
else
powered = 0
powered = FALSE
/obj/item/defibrillator/proc/update_overlays()
cut_overlays()
@@ -98,8 +98,8 @@
..()
/obj/item/defibrillator/MouseDrop(obj/over_object)
if(ismob(src.loc))
var/mob/M = src.loc
if(ismob(loc))
var/mob/M = loc
if(!M.incapacitated() && istype(over_object, /obj/screen/inventory/hand))
var/obj/screen/inventory/hand/H = over_object
M.putItemFromInventoryInHandIfPossible(src, H.held_index)
@@ -134,23 +134,23 @@
/obj/item/defibrillator/emag_act(mob/user)
if(safety)
safety = 0
safety = FALSE
to_chat(user, "<span class='warning'>You silently disable [src]'s safety protocols with the cryptographic sequencer.</span>")
else
safety = 1
safety = TRUE
to_chat(user, "<span class='notice'>You silently enable [src]'s safety protocols with the cryptographic sequencer.</span>")
/obj/item/defibrillator/emp_act(severity)
if(cell)
deductcharge(1000 / severity)
if(safety)
safety = 0
src.visible_message("<span class='notice'>[src] beeps: Safety protocols disabled!</span>")
playsound(get_turf(src), 'sound/machines/defib_saftyOff.ogg', 50, 0)
safety = FALSE
visible_message("<span class='notice'>[src] beeps: Safety protocols disabled!</span>")
playsound(src, 'sound/machines/defib_saftyOff.ogg', 50, 0)
else
safety = 1
src.visible_message("<span class='notice'>[src] beeps: Safety protocols enabled!</span>")
playsound(get_turf(src), 'sound/machines/defib_saftyOn.ogg', 50, 0)
safety = TRUE
visible_message("<span class='notice'>[src] beeps: Safety protocols enabled!</span>")
playsound(src, 'sound/machines/defib_saftyOn.ogg', 50, 0)
update_icon()
..()
@@ -167,7 +167,7 @@
to_chat(user, "<span class='warning'>You need a free hand to hold the paddles!</span>")
update_icon()
return
paddles.loc = user
paddles.forceMove(user)
else
//Remove from their hands and back onto the defib unit
paddles.unwield()
@@ -207,25 +207,25 @@
/obj/item/defibrillator/proc/deductcharge(chrgdeductamt)
if(cell)
if(cell.charge < (paddles.revivecost+chrgdeductamt))
powered = 0
powered = FALSE
update_icon()
if(cell.use(chrgdeductamt))
update_icon()
return 1
return TRUE
else
update_icon()
return 0
return FALSE
/obj/item/defibrillator/proc/cooldowncheck(mob/user)
spawn(50)
if(cell)
if(cell.charge >= paddles.revivecost)
user.visible_message("<span class='notice'>[src] beeps: Unit ready.</span>")
playsound(get_turf(src), 'sound/machines/defib_ready.ogg', 50, 0)
playsound(src, 'sound/machines/defib_ready.ogg', 50, 0)
else
user.visible_message("<span class='notice'>[src] beeps: Charge depleted.</span>")
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
paddles.cooldown = 0
playsound(src, 'sound/machines/defib_failed.ogg', 50, 0)
paddles.cooldown = FALSE
paddles.update_icon()
update_icon()
@@ -240,7 +240,7 @@
/obj/item/defibrillator/compact/item_action_slot_check(slot, mob/user)
if(slot == user.getBeltSlot())
return 1
return TRUE
/obj/item/defibrillator/compact/loaded/Initialize()
. = ..()
@@ -251,8 +251,8 @@
/obj/item/defibrillator/compact/combat
name = "combat defibrillator"
desc = "A belt-equipped blood-red defibrillator that can be rapidly deployed. Does not have the restrictions or safeties of conventional defibrillators and can revive through space suits."
combat = 1
safety = 0
combat = TRUE
safety = FALSE
/obj/item/defibrillator/compact/combat/loaded/Initialize()
. = ..()
@@ -280,24 +280,24 @@
w_class = WEIGHT_CLASS_BULKY
var/revivecost = 1000
var/cooldown = 0
var/cooldown = FALSE
var/busy = FALSE
var/obj/item/defibrillator/defib
var/req_defib = 1
var/combat = 0 //If it penetrates armor and gives additional functionality
var/req_defib = TRUE
var/combat = FALSE //If it penetrates armor and gives additional functionality
var/grab_ghost = FALSE
var/tlimit = DEFIB_TIME_LIMIT * 10
/obj/item/twohanded/shockpaddles/proc/recharge(var/time)
if(req_defib || !time)
return
cooldown = 1
cooldown = TRUE
update_icon()
sleep(time)
var/turf/T = get_turf(src)
T.audible_message("<span class='notice'>[src] beeps: Unit is recharged.</span>")
playsound(T, 'sound/machines/defib_ready.ogg', 50, 0)
cooldown = 0
playsound(src, 'sound/machines/defib_ready.ogg', 50, 0)
cooldown = FALSE
update_icon()
/obj/item/twohanded/shockpaddles/New(mainunit)
@@ -318,7 +318,7 @@
user.visible_message("<span class='danger'>[user] is putting the live paddles on [user.p_their()] chest! It looks like [user.p_theyre()] trying to commit suicide!</span>")
if(req_defib)
defib.deductcharge(revivecost)
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
playsound(src, 'sound/machines/defib_zap.ogg', 50, 1, -1)
return (OXYLOSS)
/obj/item/twohanded/shockpaddles/dropped(mob/user)
@@ -336,12 +336,12 @@
/obj/item/twohanded/shockpaddles/proc/check_defib_exists(mainunit, mob/living/carbon/human/M, obj/O)
if(!req_defib)
return 1 //If it doesn't need a defib, just say it exists
return TRUE //If it doesn't need a defib, just say it exists
if (!mainunit || !istype(mainunit, /obj/item/defibrillator)) //To avoid weird issues from admin spawns
qdel(O)
return 0
return FALSE
else
return 1
return TRUE
/obj/item/twohanded/shockpaddles/attack(mob/M, mob/user)
@@ -349,7 +349,7 @@
return
if(req_defib && !defib.powered)
user.visible_message("<span class='notice'>[defib] beeps: Unit is unpowered.</span>")
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
playsound(src, 'sound/machines/defib_failed.ogg', 50, 0)
return
if(!wielded)
if(iscyborg(user))
@@ -397,6 +397,13 @@
var/obj/item/organ/brain/BR = H.getorgan(/obj/item/organ/brain)
return (!H.suiciding && !(H.disabilities & NOCLONE) && !H.hellbound && ((world.time - H.timeofdeath) < tlimit) && (H.getBruteLoss() < 180) && (H.getFireLoss() < 180) && H.getorgan(/obj/item/organ/heart) && BR && !BR.damaged_brain)
/obj/item/twohanded/shockpaddles/proc/shock_touching(dmg, mob/H)
if(isliving(H.pulledby)) //CLEAR!
var/mob/living/M = H.pulledby
if(M.electrocute_act(30, src))
M.visible_message("<span class='danger'>[M] is electrocuted by their contact with [H]!</span>")
M.emote("scream")
/obj/item/twohanded/shockpaddles/proc/do_disarm(mob/living/M, mob/living/user)
if(req_defib && defib.safety)
return
@@ -408,12 +415,12 @@
M.adjustStaminaLoss(50)
M.Knockdown(100)
M.updatehealth() //forces health update before next life tick
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
playsound(src, 'sound/machines/defib_zap.ogg', 50, 1, -1)
M.emote("gasp")
add_logs(user, M, "stunned", src)
if(req_defib)
defib.deductcharge(revivecost)
cooldown = 1
cooldown = TRUE
busy = FALSE
update_icon()
if(req_defib)
@@ -434,7 +441,7 @@
user.visible_message("<span class='notice'>[user] places [src] on [H]'s chest.</span>",
"<span class='warning'>You place [src] on [H]'s chest and begin to charge them.</span>")
var/turf/T = get_turf(defib)
playsound(get_turf(src), 'sound/machines/defib_charge.ogg', 50, 0)
playsound(src, 'sound/machines/defib_charge.ogg', 50, 0)
if(req_defib)
T.audible_message("<span class='warning'>\The [defib] lets out an urgent beep and lets out a steadily rising hum...</span>")
else
@@ -446,14 +453,15 @@
return
if(H && H.stat == DEAD)
to_chat(user, "<span class='warning'>[H] is dead.</span>")
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
playsound(src, 'sound/machines/defib_failed.ogg', 50, 0)
busy = FALSE
update_icon()
return
user.visible_message("<span class='boldannounce'><i>[user] shocks [H] with \the [src]!</span>", "<span class='warning'>You shock [H] with \the [src]!</span>")
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 100, 1, -1)
playsound(loc, 'sound/weapons/egloves.ogg', 100, 1, -1)
playsound(src, 'sound/machines/defib_zap.ogg', 100, 1, -1)
playsound(src, 'sound/weapons/egloves.ogg', 100, 1, -1)
H.emote("scream")
shock_touching(45, H)
if(H.can_heartattack() && !H.undergoing_cardiac_arrest())
if(!H.stat)
H.visible_message("<span class='warning'>[H] thrashes wildly, clutching at their chest!</span>",
@@ -465,7 +473,7 @@
H.Jitter(100)
if(req_defib)
defib.deductcharge(revivecost)
cooldown = 1
cooldown = TRUE
busy = FALSE
update_icon()
if(!req_defib)
@@ -481,7 +489,7 @@
update_icon()
if(do_after(user, 30, target = H)) //beginning to place the paddles on patient's chest to allow some time for people to move away to stop the process
user.visible_message("<span class='notice'>[user] places [src] on [H]'s chest.</span>", "<span class='warning'>You place [src] on [H]'s chest.</span>")
playsound(get_turf(src), 'sound/machines/defib_charge.ogg', 50, 0)
playsound(src, 'sound/machines/defib_charge.ogg', 75, 0)
var/tplus = world.time - H.timeofdeath
// past this much time the patient is unrecoverable
// (in deciseconds)
@@ -493,20 +501,20 @@
if(do_after(user, 20, target = H)) //placed on chest and short delay to shock for dramatic effect, revive time is 5sec total
for(var/obj/item/carried_item in H.contents)
if(istype(carried_item, /obj/item/clothing/suit/space))
if((!src.combat && !req_defib) || (req_defib && !defib.combat))
if((!combat && !req_defib) || (req_defib && !defib.combat))
user.audible_message("<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Patient's chest is obscured. Operation aborted.</span>")
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
playsound(src, 'sound/machines/defib_failed.ogg', 50, 0)
busy = FALSE
update_icon()
return
if(H.stat == DEAD)
H.visible_message("<span class='warning'>[H]'s body convulses a bit.</span>")
playsound(get_turf(src), "bodyfall", 50, 1)
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
playsound(src, "bodyfall", 50, 1)
playsound(src, 'sound/machines/defib_zap.ogg', 75, 1, -1)
total_brute = H.getBruteLoss()
total_burn = H.getFireLoss()
var/failed = null
shock_touching(30, H)
var/failed
if (H.suiciding || (H.disabilities & NOCLONE))
failed = "<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Recovery of patient impossible. Further attempts futile.</span>"
@@ -527,7 +535,7 @@
if(failed)
user.visible_message(failed)
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
playsound(src, 'sound/machines/defib_failed.ogg', 50, 0)
else
//If the body has been fixed so that they would not be in crit when defibbed, give them oxyloss to put them back into crit
if (H.health > HALFWAYCRITDEATH)
@@ -541,7 +549,7 @@
H.adjustBruteLoss((mobhealth - HALFWAYCRITDEATH) * (total_brute / overall_damage), 0)
H.updatehealth() // Previous "adjust" procs don't update health, so we do it manually.
user.visible_message("<span class='notice'>[req_defib ? "[defib]" : "[src]"] pings: Resuscitation successful.</span>")
playsound(get_turf(src), 'sound/machines/defib_success.ogg', 50, 0)
playsound(src, 'sound/machines/defib_success.ogg', 50, 0)
H.set_heartattack(FALSE)
H.revive()
H.emote("gasp")
@@ -559,16 +567,16 @@
recharge(60)
else if (!H.getorgan(/obj/item/organ/heart))
user.visible_message("<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Patient's heart is missing. Operation aborted.</span>")
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
playsound(src, 'sound/machines/defib_failed.ogg', 50, 0)
else if(H.undergoing_cardiac_arrest())
H.set_heartattack(FALSE)
user.visible_message("<span class='notice'>[req_defib ? "[defib]" : "[src]"] pings: Patient's heart is now beating again.</span>")
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
playsound(src, 'sound/machines/defib_zap.ogg', 50, 1, -1)
else
user.visible_message("<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Patient is not in a valid state. Operation aborted.</span>")
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
playsound(src, 'sound/machines/defib_failed.ogg', 50, 0)
busy = FALSE
update_icon()
@@ -488,16 +488,14 @@
/obj/item/device/flashlight/glowstick/random
name = "random colored glowstick"
icon_state = "random_glowstick"
color = null
/obj/item/device/flashlight/glowstick/random/Initialize()
var/list/glowtypes = typesof(/obj/item/device/flashlight/glowstick)
glowtypes -= /obj/item/device/flashlight/glowstick/random
var/obj/item/device/flashlight/glowstick/glowtype = pick(glowtypes)
name = initial(glowtype.name)
color = initial(glowtype.color)
. = ..()
var/T = pick(typesof(/obj/item/device/flashlight/glowstick) - /obj/item/device/flashlight/glowstick/random)
new T(loc)
return INITIALIZE_HINT_QDEL
/obj/item/device/flashlight/spotlight //invisible lighting source
name = "disco light"
@@ -289,6 +289,9 @@
fix()
//Random colour tapes
/obj/item/device/tape/random
icon_state = "random_tape"
/obj/item/device/tape/random/New()
icon_state = "tape_[pick("white", "blue", "red", "yellow", "purple")]"
..()
@@ -1,31 +1,31 @@
// A collection of pre-set uplinks, for admin spawns.
/obj/item/device/radio/uplink/Initialize(mapload, _owner, _tc_amount = 20)
. = ..()
icon_state = "radio"
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
LoadComponent(/datum/component/uplink, _owner, FALSE, TRUE, null, _tc_amount)
/obj/item/device/radio/uplink/nuclear/Initialize()
. = ..()
GET_COMPONENT(hidden_uplink, /datum/component/uplink)
hidden_uplink.set_gamemode(/datum/game_mode/nuclear)
/obj/item/device/multitool/uplink/Initialize(mapload, _owner, _tc_amount = 20)
. = ..()
LoadComponent(/datum/component/uplink, _owner, FALSE, TRUE, null, _tc_amount)
/obj/item/pen/uplink/Initialize(mapload, _owner, _tc_amount = 20)
. = ..()
LoadComponent(/datum/component/uplink)
traitor_unlock_degrees = 360
/obj/item/device/radio/uplink/old
name = "dusty radio"
desc = "A dusty looking radio."
/obj/item/device/radio/uplink/old/Initialize(mapload, _owner, _tc_amount = 10)
. = ..()
GET_COMPONENT(hidden_uplink, /datum/component/uplink)
hidden_uplink.name = "dusty radio"
// A collection of pre-set uplinks, for admin spawns.
/obj/item/device/radio/uplink/Initialize(mapload, _owner, _tc_amount = 20)
. = ..()
icon_state = "radio"
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
LoadComponent(/datum/component/uplink, _owner, FALSE, TRUE, null, _tc_amount)
/obj/item/device/radio/uplink/nuclear/Initialize()
. = ..()
GET_COMPONENT(hidden_uplink, /datum/component/uplink)
hidden_uplink.set_gamemode(/datum/game_mode/nuclear)
/obj/item/device/multitool/uplink/Initialize(mapload, _owner, _tc_amount = 20)
. = ..()
LoadComponent(/datum/component/uplink, _owner, FALSE, TRUE, null, _tc_amount)
/obj/item/pen/uplink/Initialize(mapload, _owner, _tc_amount = 20)
. = ..()
LoadComponent(/datum/component/uplink)
traitor_unlock_degrees = 360
/obj/item/device/radio/uplink/old
name = "dusty radio"
desc = "A dusty looking radio."
/obj/item/device/radio/uplink/old/Initialize(mapload, _owner, _tc_amount = 10)
. = ..()
GET_COMPONENT(hidden_uplink, /datum/component/uplink)
hidden_uplink.name = "dusty radio"
+12 -8
View File
@@ -30,6 +30,10 @@
if(special_die == "100")
new /obj/item/dice/d100(src)
/obj/item/storage/pill_bottle/dice/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is gambling with death! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return (OXYLOSS)
/obj/item/dice //depreciated d6, use /obj/item/dice/d6 if you actually want a d6
name = "die"
desc = "A die with six sides. Basic and servicable."
@@ -47,6 +51,10 @@
update_icon()
..()
/obj/item/dice/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is gambling with death! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return (OXYLOSS)
/obj/item/dice/d1
name = "d1"
desc = "A die with one side. Deterministic!"
@@ -65,6 +73,10 @@
icon_state = "d4"
sides = 4
/obj/item/dice/d4/Initialize(mapload)
. = ..()
AddComponent(/datum/component/caltrop, 4)
/obj/item/dice/d6
name = "d6"
@@ -174,14 +186,6 @@
else if(!src.throwing) //Dice was thrown and is coming to rest
visible_message("<span class='notice'>[src] rolls to a stop, landing on [result]. [comment]</span>")
/obj/item/dice/d4/Crossed(mob/living/carbon/human/H)
if(istype(H) && !H.shoes)
if(PIERCEIMMUNE in H.dna.species.species_traits)
return 0
to_chat(H, "<span class='userdanger'>You step on the D4!</span>")
H.apply_damage(4,BRUTE,(pick("l_leg", "r_leg")))
H.Knockdown(60)
/obj/item/dice/update_icon()
cut_overlays()
add_overlay("[src.icon_state][src.result]")
@@ -129,6 +129,9 @@
//random clusterbuster spawner
/obj/item/grenade/clusterbuster/random
icon_state = "random_clusterbang"
/obj/item/grenade/clusterbuster/random/New()
var/real_type = pick(subtypesof(/obj/item/grenade/clusterbuster))
new real_type(loc)
@@ -1,49 +1,49 @@
/obj/item/implant/uplink
name = "uplink implant"
desc = "Sneeki breeki."
icon = 'icons/obj/radio.dmi'
icon_state = "radio"
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
var/starting_tc = 0
/obj/item/implant/uplink/Initialize(mapload, _owner)
. = ..()
LoadComponent(/datum/component/uplink, _owner, TRUE, FALSE, null, starting_tc)
/obj/item/implant/uplink/implant(mob/living/target, mob/user, silent = 0)
GET_COMPONENT(hidden_uplink, /datum/component/uplink)
if(hidden_uplink)
for(var/X in target.implants)
if(istype(X, type))
var/obj/item/implant/imp_e = X
GET_COMPONENT_FROM(their_hidden_uplink, /datum/component/uplink, imp_e)
if(their_hidden_uplink)
their_hidden_uplink.telecrystals += hidden_uplink.telecrystals
qdel(src)
return TRUE
else
qdel(imp_e) //INFERIOR AND EMPTY!
if(..())
if(hidden_uplink)
hidden_uplink.owner = "[user.key]"
return TRUE
return FALSE
/obj/item/implant/uplink/activate()
GET_COMPONENT(hidden_uplink, /datum/component/uplink)
if(hidden_uplink)
hidden_uplink.locked = FALSE
hidden_uplink.interact(usr)
/obj/item/implanter/uplink
name = "implanter (uplink)"
imp_type = /obj/item/implant/uplink
/obj/item/implanter/uplink/precharged
name = "implanter (precharged uplink)"
imp_type = /obj/item/implant/uplink/precharged
/obj/item/implant/uplink/precharged
starting_tc = 10
/obj/item/implant/uplink
name = "uplink implant"
desc = "Sneeki breeki."
icon = 'icons/obj/radio.dmi'
icon_state = "radio"
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
var/starting_tc = 0
/obj/item/implant/uplink/Initialize(mapload, _owner)
. = ..()
LoadComponent(/datum/component/uplink, _owner, TRUE, FALSE, null, starting_tc)
/obj/item/implant/uplink/implant(mob/living/target, mob/user, silent = 0)
GET_COMPONENT(hidden_uplink, /datum/component/uplink)
if(hidden_uplink)
for(var/X in target.implants)
if(istype(X, type))
var/obj/item/implant/imp_e = X
GET_COMPONENT_FROM(their_hidden_uplink, /datum/component/uplink, imp_e)
if(their_hidden_uplink)
their_hidden_uplink.telecrystals += hidden_uplink.telecrystals
qdel(src)
return TRUE
else
qdel(imp_e) //INFERIOR AND EMPTY!
if(..())
if(hidden_uplink)
hidden_uplink.owner = "[user.key]"
return TRUE
return FALSE
/obj/item/implant/uplink/activate()
GET_COMPONENT(hidden_uplink, /datum/component/uplink)
if(hidden_uplink)
hidden_uplink.locked = FALSE
hidden_uplink.interact(usr)
/obj/item/implanter/uplink
name = "implanter (uplink)"
imp_type = /obj/item/implant/uplink
/obj/item/implanter/uplink/precharged
name = "implanter (precharged uplink)"
imp_type = /obj/item/implant/uplink/precharged
/obj/item/implant/uplink/precharged
starting_tc = 10
+194
View File
@@ -0,0 +1,194 @@
#define pet_carrier_full(carrier) carrier.occupants.len >= carrier.max_occupants || carrier.occupant_weight >= carrier.max_occupant_weight
//Used to transport little animals without having to drag them across the station.
//Comes with a handy lock to prevent them from running off.
/obj/item/pet_carrier
name = "pet carrier"
desc = "A big white-and-blue pet carrier. Good for carrying <s>meat to the chef</s> cute animals around."
icon = 'icons/obj/pet_carrier.dmi'
icon_state = "pet_carrier_open"
item_state = "pet_carrier"
lefthand_file = 'icons/mob/inhands/items_lefthand.dmi'
righthand_file = 'icons/mob/inhands/items_righthand.dmi'
force = 5
attack_verb = list("bashed", "carried")
w_class = WEIGHT_CLASS_BULKY
throw_speed = 2
throw_range = 3
materials = list(MAT_METAL = 7500, MAT_GLASS = 100)
var/open = TRUE
var/locked = FALSE
var/list/occupants = list()
var/occupant_weight = 0
var/max_occupants = 3 //Hard-cap so you can't have infinite mice or something in one carrier
var/max_occupant_weight = MOB_SIZE_SMALL //This is calculated from the mob sizes of occupants
/obj/item/pet_carrier/Destroy()
if(occupants.len)
for(var/V in occupants)
remove_occupant(V)
return ..()
/obj/item/pet_carrier/Exited(atom/movable/occupant)
if(occupant in occupants && isliving(occupant))
var/mob/living/L = occupant
occupants -= occupant
occupant_weight -= L.mob_size
/obj/item/pet_carrier/handle_atom_del(atom/A)
if(A in occupants && isliving(A))
var/mob/living/L = A
occupants -= L
occupant_weight -= L.mob_size
..()
/obj/item/pet_carrier/examine(mob/user)
..()
if(occupants.len)
for(var/V in occupants)
var/mob/living/L = V
to_chat(user, "<span class='notice'>It has [L] inside.</span>")
else
to_chat(user, "<span class='notice'>It has nothing inside.</span>")
if(user.canUseTopic(src))
to_chat(user, "<span class='notice'>Activate it in your hand to [open ? "close" : "open"] its door.</span>")
if(!open)
to_chat(user, "<span class='notice'>Alt-click to [locked ? "unlock" : "lock"] its door.</span>")
/obj/item/pet_carrier/attack_self(mob/living/user)
if(open)
to_chat(user, "<span class='notice'>You close [src]'s door.</span>")
playsound(user, 'sound/effects/bin_close.ogg', 50, TRUE)
open = FALSE
else
if(locked)
to_chat(user, "<span class='warning'>[src] is locked!</span>")
return
to_chat(user, "<span class='notice'>You open [src]'s door.</span>")
playsound(user, 'sound/effects/bin_open.ogg', 50, TRUE)
open = TRUE
update_icon()
/obj/item/pet_carrier/AltClick(mob/living/user)
if(open || !user.canUseTopic(src, be_close=TRUE))
return
locked = !locked
to_chat(user, "<span class='notice'>You flip the lock switch [locked ? "down" : "up"].</span>")
if(locked)
playsound(user, 'sound/machines/boltsdown.ogg', 30, TRUE)
else
playsound(user, 'sound/machines/boltsup.ogg', 30, TRUE)
update_icon()
/obj/item/pet_carrier/attack(mob/living/target, mob/living/user)
if(user.a_intent == INTENT_HARM)
return ..()
if(!open)
to_chat(user, "<span class='warning'>You need to open [src]'s door!</span>")
return
if(target.mob_size > max_occupant_weight)
if(ishuman(target))
var/mob/living/carbon/human/H = target
if(iscatperson(H))
to_chat(user, "<span class='warning'>You'd need a lot of catnip and treats, plus maybe a laser pointer, for that to work.</span>")
else
to_chat(user, "<span class='warning'>Humans, generally, do not fit into pet carriers.</span>")
else
to_chat(user, "<span class='warning'>You get the feeling [target] isn't meant for a [name].</span>")
return
if(user == target)
to_chat(user, "<span class='warning'>Why would you ever do that?</span>")
return
load_occupant(user, target)
/obj/item/pet_carrier/relaymove(mob/living/user, direction)
if(open)
loc.visible_message("<span class='notice'>[user] climbs out of [src]!</span>", \
"<span class='warning'>[user] jumps out of [src]!</span>")
remove_occupant(user)
return
else if(!locked)
loc.visible_message("<span class='notice'>[user] pushes open the door to [src]!</span>", \
"<span class='warning'>[user] pushes open the door of [src]!</span>")
open = TRUE
update_icon()
return
else if(user.client)
container_resist(user)
/obj/item/pet_carrier/container_resist(mob/living/user)
user.changeNext_move(CLICK_CD_BREAKOUT)
user.last_special = world.time + CLICK_CD_BREAKOUT
if(user.mob_size <= MOB_SIZE_SMALL)
to_chat(user, "<span class='notice'>You poke a limb through [src]'s bars and start fumbling for the lock switch... (This will take some time.)</span>")
to_chat(loc, "<span class='warning'>You see [user] reach through the bars and fumble for the lock switch!</span>")
if(!do_after(user, rand(300, 400), target = user) || open || !locked || !user in occupants)
return
loc.visible_message("<span class='warning'>[user] flips the lock switch on [src] by reaching through!</span>", ignored_mob = user)
to_chat(user, "<span class='boldannounce'>Bingo! The lock pops open!</span>")
locked = FALSE
playsound(src, 'sound/machines/boltsup.ogg', 30, TRUE)
update_icon()
else
loc.visible_message("<span class='warning'>[src] starts rattling as something pushes against the door!</span>", ignored_mob = user)
to_chat(user, "<span class='notice'>You start pushing out of [src]... (This will take about 20 seconds.)</span>")
if(!do_after(user, 200, target = user) || open || !locked || !user in occupants)
return
loc.visible_message("<span class='warning'>[user] shoves out of [src]!</span>", ignored_mob = user)
to_chat(user, "<span class='notice'>You shove open [src]'s door against the lock's resistance and fall out!</span>")
locked = FALSE
open = TRUE
update_icon()
remove_occupant(user)
/obj/item/pet_carrier/update_icon()
cut_overlay("unlocked")
cut_overlay("locked")
if(open)
icon_state = initial(icon_state)
else
icon_state = "pet_carrier_[!occupants.len ? "closed" : "occupied"]"
add_overlay("[locked ? "" : "un"]locked")
/obj/item/pet_carrier/MouseDrop(atom/over_atom)
if(isopenturf(over_atom) && usr.Adjacent(over_atom) && open && occupants.len)
usr.visible_message("<span class='notice'>[usr] unloads [src].</span>", \
"<span class='notice'>You unload [src] onto [over_atom].</span>")
for(var/V in occupants)
remove_occupant(V, over_atom)
/obj/item/pet_carrier/proc/load_occupant(mob/living/user, mob/living/target)
if(pet_carrier_full(src))
to_chat(user, "<span class='warning'>[src] is already carrying too much!</span>")
return
user.visible_message("<span class='notice'>[user] starts loading [target] into [src].</span>", \
"<span class='notice'>You start loading [target] into [src]...</span>", ignored_mob = target)
to_chat(target, "<span class='userdanger'>[user] starts loading you into their [name]!</span>")
if(!do_mob(user, target, 30))
return
if(target in occupants)
return
if(pet_carrier_full(src)) //Run the checks again, just in case
to_chat(user, "<span class='warning'>[src] is already carrying too much!</span>")
return
user.visible_message("<span class='notice'>[user] loads [target] into [src]!</span>", \
"<span class='notice'>You load [target] into [src].</span>", ignored_mob = target)
to_chat(target, "<span class='userdanger'>[user] loads you into their [name]!</span>")
add_occupant(target)
/obj/item/pet_carrier/proc/add_occupant(mob/living/occupant)
if(occupant in occupants || !istype(occupant))
return
occupant.forceMove(src)
occupants += occupant
occupant_weight += occupant.mob_size
/obj/item/pet_carrier/proc/remove_occupant(mob/living/occupant, turf/new_turf)
if(!occupant in occupants || !istype(occupant))
return
occupant.forceMove(new_turf ? new_turf : drop_location())
occupants -= occupant
occupant_weight -= occupant.mob_size
occupant.setDir(SOUTH)
#undef pet_carrier_full
@@ -113,6 +113,10 @@
origin_tech = "biotech=2"
self_delay = 20
/obj/item/stack/medical/bruise_pack/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is bludgeoning [user.p_them()]self with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return (BRUTELOSS)
/obj/item/stack/medical/gauze
name = "medical gauze"
desc = "A roll of elastic cloth that is extremely effective at stopping bleeding, but does not heal wounds."
+2 -24
View File
@@ -205,6 +205,7 @@ GLOBAL_LIST_INIT(prglass_recipes, list ( \
/obj/item/shard/Initialize()
. = ..()
AddComponent(/datum/component/caltrop, force)
icon_state = pick("large", "medium", "small")
switch(icon_state)
if("small")
@@ -257,27 +258,4 @@ GLOBAL_LIST_INIT(prglass_recipes, list ( \
/obj/item/shard/Crossed(mob/AM)
if(istype(AM) && has_gravity(loc))
playsound(loc, 'sound/effects/glass_step.ogg', 50, 1)
if(ishuman(AM))
var/mob/living/carbon/human/H = AM
if(PIERCEIMMUNE in H.dna.species.species_traits)
return
var/picked_def_zone = pick("l_leg", "r_leg")
var/obj/item/bodypart/O = H.get_bodypart(picked_def_zone)
if(!istype(O))
return
if(O.status == BODYPART_ROBOTIC)
return
var/feetCover = (H.wear_suit && H.wear_suit.body_parts_covered & FEET) || (H.w_uniform && H.w_uniform.body_parts_covered & FEET)
if(H.shoes || feetCover || H.movement_type & FLYING || H.buckled)
return
H.apply_damage(5, BRUTE, picked_def_zone)
if(cooldown < world.time - 10) //cooldown to avoid message spam.
if(!H.incapacitated())
H.visible_message("<span class='danger'>[H] steps in the broken glass!</span>", \
"<span class='userdanger'>You step in the broken glass!</span>")
else
H.visible_message("<span class='danger'>[H] slides on the broken glass!</span>", \
"<span class='userdanger'>You slide on the broken glass!</span>")
cooldown = world.time
H.Knockdown(60)
. = ..()
@@ -167,6 +167,10 @@
usr.s_active.close(usr)
src.show_to(usr)
/obj/item/storage/pill_bottle/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is trying to get the cap off [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return (TOXLOSS)
/obj/item/storage/pill_bottle/charcoal
name = "bottle of charcoal pills"
desc = "Contains pills used to counter toxins."
@@ -72,6 +72,9 @@
else
return ..()
/obj/item/storage/wallet/random
icon_state = "random_wallet"
/obj/item/storage/wallet/random/PopulateContents()
var/item1_type = pick( /obj/item/stack/spacecash/c10, /obj/item/stack/spacecash/c100, /obj/item/stack/spacecash/c1000, /obj/item/stack/spacecash/c20, /obj/item/stack/spacecash/c200, /obj/item/stack/spacecash/c50, /obj/item/stack/spacecash/c500)
var/item2_type
@@ -86,3 +89,4 @@
new item2_type(src)
if(item3_type)
new item3_type(src)
update_icon()
+4
View File
@@ -34,6 +34,10 @@
cooldown = world.time
flick(pulseicon, src)
radiation_pulse(src, 400, 2)
/obj/item/nuke_core/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is rubbing [src] against [user.p_them()]self! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return (TOXLOSS)
//nuke core box, for carrying the core
/obj/item/nuke_core_container
+2 -2
View File
@@ -37,8 +37,8 @@
/obj/item/vending_refill/boozeomat
machine_name = "Booze-O-Mat"
icon_state = "refill_booze"
charges = list(54, 4, 0)//of 159 standard, 12 contraband
init_charges = list(54, 4, 0)
charges = list(58, 4, 0)//of 174 standard, 12 contraband
init_charges = list(58, 4, 0)
/obj/item/vending_refill/coffee
machine_name = "Solar's Best Hot Drinks"
+1 -1
View File
@@ -398,7 +398,7 @@
icon_state = "ectoplasm"
/obj/item/ectoplasm/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is inhaling [src]! It looks like [user.p_theyre()] trying to visit the astral plane.</span>")
user.visible_message("<span class='suicide'>[user] is inhaling [src]! It looks like [user.p_theyre()] trying to visit the astral plane!</span>")
return (OXYLOSS)
/obj/item/mounted_chainsaw
+1 -1
View File
@@ -225,7 +225,7 @@ LINEN BINS
/obj/item/bedsheet/random
icon_state = "sheetrainbow"
icon_state = "random_bedsheet"
item_color = "rainbow"
name = "random bedsheet"
desc = "If you're reading this description ingame, something has gone wrong! Honk!"
@@ -73,6 +73,7 @@
new /obj/item/device/autosurgeon/cmo(src)
new /obj/item/door_remote/chief_medical_officer(src)
new /obj/item/clothing/neck/petcollar(src)
new /obj/item/pet_carrier(src)
/obj/structure/closet/secure_closet/animal
name = "animal control"
@@ -12,6 +12,7 @@
new /obj/item/storage/backpack/satchel/cap(src)
new /obj/item/clothing/neck/cloak/cap(src)
new /obj/item/clothing/neck/petcollar(src)
new /obj/item/pet_carrier(src)
new /obj/item/storage/backpack/duffelbag/captain(src)
new /obj/item/clothing/head/crown/fancy(src)
new /obj/item/clothing/suit/captunic(src)
@@ -53,6 +54,7 @@
new /obj/item/restraints/handcuffs/cable/zipties(src)
new /obj/item/gun/energy/e_gun/cx(src)
new /obj/item/clothing/neck/petcollar(src)
new /obj/item/pet_carrier(src)
new /obj/item/door_remote/civillian(src)
/obj/structure/closet/secure_closet/hos
+3
View File
@@ -285,10 +285,13 @@
user.remove_alt_appearance("sneaking_mission")
/obj/item/twohanded/required/kirbyplants/random
icon = 'icons/obj/flora/_flora.dmi'
icon_state = "random_plant"
var/list/static/states
/obj/item/twohanded/required/kirbyplants/random/Initialize()
. = ..()
icon = 'icons/obj/flora/plants.dmi'
if(!states)
generate_states()
icon_state = pick(states)
+1 -1
View File
@@ -26,7 +26,7 @@
update_icon()
/obj/structure/grille/update_icon()
if(QDELETED(src))
if(QDELETED(src) || broken)
return
var/ratio = obj_integrity / max_integrity
@@ -37,7 +37,7 @@
buckled_mob.pixel_x = 0
buckled_mob.pixel_y = 0
if(buckled_mob.client)
buckled_mob.client.change_view(world.view)
buckled_mob.client.change_view(CONFIG_GET(string/default_view))
anchored = FALSE
. = ..()
STOP_PROCESSING(SSfastprocess, src)
+7
View File
@@ -1,3 +1,5 @@
#define MAX_DENT_DECALS 15
/turf/closed/wall
name = "wall"
desc = "A huge chunk of metal used to separate rooms."
@@ -297,6 +299,9 @@
return FALSE
/turf/closed/wall/proc/add_dent(denttype, x=rand(-8, 8), y=rand(-8, 8))
if(LAZYLEN(dent_decals) >= MAX_DENT_DECALS)
return
var/mutable_appearance/decal = pick(dent_decal_list[denttype])
decal.pixel_x = x
decal.pixel_y = y
@@ -304,3 +309,5 @@
cut_overlay(dent_decals)
LAZYADD(dent_decals, decal)
add_overlay(dent_decals)
#undef MAX_DENT_DECALS
+2
View File
@@ -393,6 +393,8 @@
log_admin("[key_name(usr)] [msg]")
message_admins("[key_name_admin(usr)] [msg]")
href_list["secrets"] = "check_antagonist"
if(SSticker.ready_for_reboot && !SSticker.delay_end) //we undelayed after standard reboot would occur
SSticker.standard_reboot()
else if(href_list["end_round"])
if(!check_rights(R_ADMIN))
@@ -1,6 +1,9 @@
/proc/machine_upgrade(obj/machinery/M in world)
set name = "Tweak Component Ratings"
set category = "Debug"
if (!istype(M))
return
var/new_rating = input("Enter new rating:","Num") as num
if(new_rating && M.component_parts)
for(var/obj/item/stock_parts/P in M.component_parts)
+2 -2
View File
@@ -651,10 +651,10 @@ Traitors and the like can also be revived with the previous role mostly intact.
set name = "Change View Range"
set desc = "switches between 1x and custom views"
if(view == world.view)
if(view == CONFIG_GET(string/default_view))
change_view(input("Select view range:", "FUCK YE", 7) in list(1,2,3,4,5,6,7,8,9,10,11,12,13,14,128))
else
change_view(world.view)
change_view(CONFIG_GET(string/default_view))
log_admin("[key_name(usr)] changed their view range to [view].")
//message_admins("\blue [key_name_admin(usr)] changed their view range to [view].") //why? removed by order of XSI
@@ -7,7 +7,7 @@
//list of open turfs adjacent to us
var/list/atmos_adjacent_turfs
//bitfield of dirs in which we are superconducitng
var/atmos_supeconductivity = 0
var/atmos_supeconductivity = NONE
//used to determine whether we should archive
var/archived_cycle = 0
@@ -25,8 +25,7 @@
var/pressure_direction = 0
var/datum/excited_group/excited_group
var/excited = 0
var/recently_active = 0
var/excited = FALSE
var/datum/gas_mixture/turf/air
var/obj/effect/hotspot/active_hotspot
@@ -54,10 +53,10 @@
/turf/open/assume_air(datum/gas_mixture/giver) //use this for machines to adjust air
if(!giver)
return 0
return FALSE
air.merge(giver)
update_visuals()
return 1
return TRUE
/turf/open/remove_air(amount)
var/datum/gas_mixture/ours = return_air()
@@ -83,7 +82,7 @@
/turf/temperature_expose()
if(temperature > heat_capacity)
to_be_destroyed = 1
to_be_destroyed = TRUE
/turf/proc/archive()
temperature_archived = temperature
@@ -102,7 +101,7 @@
#if DM_VERSION >= 513
#warning 512 is stable now for sure, remove the old code
#endif
#if DM_VERSION >= 512
if (atmos_overlay_types)
for(var/overlay in atmos_overlay_types-new_overlay_types) //doesn't remove overlays that would only be added
@@ -175,64 +174,48 @@
for(var/t in adjacent_turfs)
var/turf/open/enemy_tile = t
if(fire_count > enemy_tile.current_cycle)
enemy_tile.archive()
if(fire_count <= enemy_tile.current_cycle)
continue
enemy_tile.archive()
/******************* GROUP HANDLING START *****************************************************************/
/******************* GROUP HANDLING START *****************************************************************/
var/should_share_air = FALSE
var/datum/gas_mixture/enemy_air = enemy_tile.air
if(enemy_tile.excited)
//cache for sanic speed
var/datum/excited_group/enemy_excited_group = enemy_tile.excited_group
if(our_excited_group)
if(enemy_excited_group)
if(our_excited_group != enemy_excited_group)
//combine groups (this also handles updating the excited_group var of all involved turfs)
our_excited_group.merge_groups(enemy_excited_group)
our_excited_group = excited_group //update our cache
should_share_air = TRUE
else
if((recently_active == 1 && enemy_tile.recently_active == 1) || our_air.compare(enemy_air))
our_excited_group.add_turf(enemy_tile) //add enemy to our group
should_share_air = TRUE
var/should_share_air = FALSE
var/datum/gas_mixture/enemy_air = enemy_tile.air
//cache for sanic speed
var/datum/excited_group/enemy_excited_group = enemy_tile.excited_group
if(our_excited_group && enemy_excited_group)
if(our_excited_group != enemy_excited_group)
//combine groups (this also handles updating the excited_group var of all involved turfs)
our_excited_group.merge_groups(enemy_excited_group)
our_excited_group = excited_group //update our cache
should_share_air = TRUE
else if(our_air.compare(enemy_air))
if(!enemy_tile.excited)
SSair.add_to_active(enemy_tile)
var/datum/excited_group/EG = our_excited_group || enemy_excited_group || new
if(!our_excited_group)
EG.add_turf(src)
if(!enemy_excited_group)
EG.add_turf(enemy_tile)
our_excited_group = excited_group
should_share_air = TRUE
//air sharing
if(should_share_air)
var/difference = our_air.share(enemy_air, adjacent_turfs_length)
if(difference)
if(difference > 0)
consider_pressure_difference(enemy_tile, difference)
else
if(enemy_excited_group)
if((recently_active == 1 && enemy_tile.recently_active == 1) || our_air.compare(enemy_air))
enemy_excited_group.add_turf(src) //join self to enemy group
our_excited_group = excited_group //update our cache
should_share_air = TRUE
else
if((recently_active == 1 && enemy_tile.recently_active == 1) || our_air.compare(enemy_air))
var/datum/excited_group/EG = new //generate new group
EG.add_turf(src)
EG.add_turf(enemy_tile)
our_excited_group = excited_group //update our cache
should_share_air = TRUE
else
if(our_air.compare(enemy_air)) //compare if
SSair.add_to_active(enemy_tile) //excite enemy
if(our_excited_group)
our_excited_group.add_turf(enemy_tile) //add enemy to group
else
var/datum/excited_group/EG = new //generate new group
EG.add_turf(src)
EG.add_turf(enemy_tile)
our_excited_group = excited_group //update our cache
should_share_air = TRUE
//air sharing
if(should_share_air)
var/difference = our_air.share(enemy_air, adjacent_turfs_length)
if(difference)
if(difference > 0)
consider_pressure_difference(enemy_tile, difference)
else
enemy_tile.consider_pressure_difference(src, -difference)
LAST_SHARE_CHECK
enemy_tile.consider_pressure_difference(src, -difference)
LAST_SHARE_CHECK
/******************* GROUP HANDLING FINISH *********************************************************************/
/******************* GROUP HANDLING FINISH *********************************************************************/
if (planet_atmos) //share our air with the "atmosphere" "above" the turf
var/datum/gas_mixture/G = new
@@ -250,12 +233,8 @@
update_visuals()
var/remove = TRUE
if(our_air.temperature > MINIMUM_TEMPERATURE_START_SUPERCONDUCTION)
if(consider_superconductivity(starting = 1))
remove = FALSE
if ((!our_excited_group && remove) || (cached_atmos_cooldown > (EXCITED_GROUP_DISMANTLE_CYCLES * 2)))
if((!our_excited_group && !(our_air.temperature > MINIMUM_TEMPERATURE_START_SUPERCONDUCTION && consider_superconductivity(starting = TRUE))) \
|| (cached_atmos_cooldown > (EXCITED_GROUP_DISMANTLE_CYCLES * 2)))
SSair.remove_from_active(src)
atmos_cooldown = cached_atmos_cooldown
@@ -279,9 +258,9 @@
var/const/PROBABILITY_OFFSET = 25
var/const/PROBABILITY_BASE_PRECENT = 75
set waitfor = 0
. = 0
. = FALSE
if (!anchored && !pulledby)
. = 1
. = TRUE
if (last_high_pressure_movement_air_cycle < SSair.times_fired)
var/move_prob = 100
if (pressure_resistance > 0)
@@ -304,7 +283,6 @@
/datum/excited_group/proc/add_turf(turf/open/T)
turf_list += T
T.excited_group = src
T.recently_active = 1
reset_cooldowns()
/datum/excited_group/proc/merge_groups(datum/excited_group/E)
@@ -328,25 +306,27 @@
dismantle_cooldown = 0
//argument is so world start can clear out any turf differences quickly.
/datum/excited_group/proc/self_breakdown(space_is_all_consuming = 0)
/datum/excited_group/proc/self_breakdown(space_is_all_consuming = FALSE)
var/datum/gas_mixture/A = new
//make local for sanic speed
var/list/A_gases = A.gases
var/list/turf_list = src.turf_list
var/turflen = turf_list.len
var/space_in_group = 0
var/space_in_group = FALSE
for(var/t in turf_list)
var/turf/open/T = t
if (space_is_all_consuming && !space_in_group && istype(T.air, /datum/gas_mixture/immutable/space))
space_in_group = 1
space_in_group = TRUE
qdel(A)
A = new/datum/gas_mixture/immutable/space()
A = new /datum/gas_mixture/immutable/space()
A_gases = A.gases //update the cache
break
A.merge(T.air)
for(var/id in A_gases)
A_gases[id][MOLES] = A_gases[id][MOLES]/turflen
A_gases[id][MOLES] /= turflen
for(var/t in turf_list)
var/turf/open/T = t
@@ -359,8 +339,7 @@
/datum/excited_group/proc/dismantle()
for(var/t in turf_list)
var/turf/open/T = t
T.excited = 0
T.recently_active = 0
T.excited = FALSE
T.excited_group = null
SSair.active_turfs -= T
garbage_collect()
@@ -432,7 +411,7 @@
//Make sure still hot enough to continue conducting heat
if(temp < MINIMUM_TEMPERATURE_FOR_SUPERCONDUCTION)
SSair.active_super_conductivity -= src
return 0
return FALSE
/turf/open/finish_superconduction()
//Conduct with air on my tile if I have it
@@ -442,21 +421,21 @@
/turf/proc/consider_superconductivity()
if(!thermal_conductivity)
return 0
return FALSE
SSair.active_super_conductivity |= src
return 1
return TRUE
/turf/open/consider_superconductivity(starting)
if(air.temperature < (starting?MINIMUM_TEMPERATURE_START_SUPERCONDUCTION:MINIMUM_TEMPERATURE_FOR_SUPERCONDUCTION))
return 0
return FALSE
if(air.heat_capacity() < M_CELL_WITH_RATIO) // Was: MOLES_CELLSTANDARD*0.1*0.05 Since there are no variables here we can make this a constant.
return 0
return FALSE
return ..()
/turf/closed/consider_superconductivity(starting)
if(temperature < (starting?MINIMUM_TEMPERATURE_START_SUPERCONDUCTION:MINIMUM_TEMPERATURE_FOR_SUPERCONDUCTION))
return 0
return FALSE
return ..()
/turf/proc/radiate_to_spess() //Radiate excess tile heat to space
@@ -465,7 +444,7 @@
if((heat_capacity > 0) && (abs(delta_temperature) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER))
var/heat = thermal_conductivity*delta_temperature* \
(heat_capacity*700000/(heat_capacity+700000)) //700000 is the heat_capacity from a space turf, hardcoded here
(heat_capacity*HEAT_CAPACITY_VACUUM/(heat_capacity+HEAT_CAPACITY_VACUUM))
temperature -= heat/heat_capacity
/turf/open/proc/temperature_share_open_to_solid(turf/sharer)
@@ -1,5 +1,3 @@
#define NO_REACTION 0
#define REACTING 1
//Plasma fire properties
#define OXYGEN_BURN_RATE_BASE 1.4
#define PLASMA_BURN_RATE_DELTA 9
@@ -359,9 +357,6 @@
if(new_heat_capacity > MINIMUM_HEAT_CAPACITY)
air.temperature = max(((air.temperature*old_heat_capacity - energy_taken)/new_heat_capacity),TCMB)
#undef REACTING
#undef NO_REACTION
#undef OXYGEN_BURN_RATE_BASE
#undef PLASMA_BURN_RATE_DELTA
#undef PLASMA_UPPER_TEMPERATURE
@@ -386,4 +381,4 @@
#undef CATALYST_COEFFICENT
#undef FUSION_PURITY_THRESHOLD
#undef FUSION_HEAT_DROPOFF
#undef NOBLIUM_FORMATION_ENERGY
#undef NOBLIUM_FORMATION_ENERGY
@@ -356,6 +356,9 @@
. = TRUE
if("threshold")
var/env = params["env"]
if(text2path(env))
env = text2path(env)
var/name = params["var"]
var/datum/tlv/tlv = TLV[env]
if(isnull(tlv))
@@ -17,6 +17,8 @@
var/list/json = json_decode(file2text(json_file))
shenanigans = json["phrases"]
#define TIMEWASTE_MEDAL "Overextended The Joke"
/obj/structure/speaking_tile/interact(mob/user)
if(!isliving(user) || speaking)
return
@@ -45,11 +47,11 @@
SpeakPeace(list("Alright maybe that's <b>too</b> boring.", "I can't keep manually typing these lines out though.", "It's hard to explain but the code structure I'm using is kind of terrible."))
if(10)
SpeakPeace(list("Oh I have an idea!", "Lets outsource this endless banter to Poly!", "Then you'll be able to keep listening to this without getting bored!"))
if(isnull(shenanigans))
if(isnull(shenanigans) || !shenanigans.len)
shenanigans = list("Except the poly file is missing...")
if(11 to 14, 16 to 50, 52 to 99, 103 to 107, 109 to 203, 205 to 249, 252 to 665, 667 to 999, 1001 to 5642)
SpeakPeace(list(pick(shenanigans),pick(shenanigans),pick(shenanigans)))
if(times_spoken_to * 0.1 == round(times_spoken_to * 0.1))
if(times_spoken_to % 10 == 0)
SpeakPeace(list("That's [times_spoken_to] times you've spoken to me by the way."))
if(15)
SpeakPeace(list("See? Isn't this fun?","Now you can mash this for hours without getting bored.","Anyway I'll leave you it."))
@@ -79,6 +81,7 @@
if(1000)
SpeakPeace(list("The ends exists somewhere beyond meaningful milestones.", "There will be no more messages until then.", "You disgust me."))
if(5643)
UnlockMedal(TIMEWASTE_MEDAL,user.client)
var/obj/item/reagent_containers/food/drinks/trophy/gold_cup/never_ends = new(get_turf(user))
never_ends.name = "Overextending The Joke: First Place"
never_ends.desc = "And so we are left alone with our regrets."
@@ -87,7 +90,7 @@
speaking = FALSE
times_spoken_to++
#undef TIMEWASTE_MEDAL
/obj/structure/speaking_tile/proc/SpeakPeace(list/statements)
for(var/i in 1 to statements.len)
say("<span class='deadsay'>[statements[i]]</span>")
+1 -1
View File
@@ -442,7 +442,7 @@ GLOBAL_LIST(external_rsc_urls)
message_admins("<span class='adminnotice'>Failed Login: [key] - New account attempting to connect during panic bunker</span>")
to_chat(src, "Sorry but the server is currently not accepting connections from never before seen players.")
var/list/connectiontopic_a = params2list(connectiontopic)
var/list/panic_addr = CONFIG_GET(string/panic_address)
var/list/panic_addr = CONFIG_GET(string/panic_server_address)
if(panic_addr && !connectiontopic_a["redirect"])
var/panic_name = CONFIG_GET(string/panic_server_name)
to_chat(src, "<span class='notice'>Sending you to [panic_name ? panic_name : panic_addr].</span>")
+3 -5
View File
@@ -119,11 +119,9 @@
death(0)
/mob/living/silicon/pai/verb/suicide()
set category = "pAI Commands"
set desc = "Kill yourself and become a ghost (You will receive a confirmation prompt)"
set name = "pAI Suicide"
var/answer = input("REALLY kill yourself? This action can't be undone.", "Suicide", "No") in list ("Yes", "No")
if(answer == "Yes")
set hidden = 1
var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No")
if(confirm == "Yes")
var/turf/T = get_turf(src.loc)
T.visible_message("<span class='notice'>[src] flashes a message across its screen, \"Wiping core files. Please acquire a new personality to continue using pAI device functions.\"</span>", null, \
"<span class='notice'>[src] bleeps electronically.</span>")
@@ -8,7 +8,8 @@
/obj/item/clothing/glasses/meson/engine
name = "engineering scanner goggles"
desc = "Goggles used by engineers. The Meson Scanner mode lets you see basic structural and terrain layouts through walls, the T-ray Scanner mode lets you see underfloor objects such as cables and pipes, and the Radiation Scanner mode let's you see objects contaminated by radiation."
icon_state = "trayson"
icon_state = "trayson-meson"
item_state = "trayson-meson"
actions_types = list(/datum/action/item_action/toggle_mode)
origin_tech = "materials=3;magnets=3;engineering=3;plasmatech=3"
@@ -117,14 +118,22 @@
flick_overlay(pic, list(user.client), 8)
/obj/item/clothing/glasses/meson/engine/update_icon()
icon_state = "[initial(icon_state)]-[mode]"
if(istype(loc, /mob/living/carbon/human/))
var/mob/living/carbon/human/user = loc
if(user.glasses == src)
icon_state = "trayson-[mode]"
update_mob()
/obj/item/clothing/glasses/meson/engine/proc/update_mob()
item_state = icon_state
if(isliving(loc))
var/mob/living/user = loc
if(user.get_item_by_slot(slot_glasses) == src)
user.update_inv_glasses()
else
user.update_inv_hands()
/obj/item/clothing/glasses/meson/engine/tray //atmos techs have lived far too long without tray goggles while those damned engineers get their dual-purpose gogles all to themselves
name = "optical t-ray scanner"
icon_state = "trayson-t-ray"
item_state = "trayson-t-ray"
desc = "Used by engineering staff to see underfloor objects such as cables and pipes."
origin_tech = "materials=3;magnets=2;engineering=2"
+1 -1
View File
@@ -188,7 +188,7 @@
/obj/item/clothing/gloves/color/random
name = "random gloves"
desc = "These gloves are supposed to be a random color..."
icon_state = "white"
icon_state = "random_gloves"
item_state = "wgloves"
item_color = "mime"
+25 -23
View File
@@ -856,21 +856,22 @@
return TRUE
/obj/item/clothing/suit/space/hardsuit/flightsuit/proc/unlock_suit(mob/wearer)
if(suittoggled)
usermessage("You must retract the helmet before unlocking your suit!", "boldwarning")
return FALSE
if(pack && pack.flight)
usermessage("You must shut off the flight-pack before unlocking your suit!", "boldwarning")
return FALSE
if(deployedpack)
usermessage("Your flightpack must be fully retracted first!", "boldwarning")
return FALSE
if(deployedshoes)
usermessage("Your flight shoes must be fully retracted first!", "boldwarning")
return FALSE
if(wearer)
user.visible_message("<span class='notice'>[wearer]'s flight suit detaches from their body, becoming nothing more then a bulky metal skeleton.</span>")
playsound(src.loc, 'sound/items/rped.ogg', 65, 1)
if(user)
if(suittoggled)
usermessage("You must retract the helmet before unlocking your suit!", "boldwarning")
return FALSE
if(pack && pack.flight)
usermessage("You must shut off the flight-pack before unlocking your suit!", "boldwarning")
return FALSE
if(deployedpack)
usermessage("Your flightpack must be fully retracted first!", "boldwarning")
return FALSE
if(deployedshoes)
usermessage("Your flight shoes must be fully retracted first!", "boldwarning")
return FALSE
if(wearer)
user.visible_message("<span class='notice'>[wearer]'s flight suit detaches from their body, becoming nothing more then a bulky metal skeleton.</span>")
playsound(src, 'sound/items/rped.ogg', 65, 1)
resync()
strip_delay = initial(strip_delay)
locked = FALSE
@@ -911,7 +912,7 @@
user.update_inv_wear_suit()
user.visible_message("<span class='notice'>[user]'s [pack.name] detaches from their back and retracts into their [src]!</span>")
pack.forceMove(src)
playsound(src.loc, 'sound/mecha/mechmove03.ogg', 50, 1)
playsound(src, 'sound/mecha/mechmove03.ogg', 50, 1)
deployedpack = FALSE
/obj/item/clothing/suit/space/hardsuit/flightsuit/proc/extend_flightshoes(forced = FALSE)
@@ -936,7 +937,7 @@
/obj/item/clothing/suit/space/hardsuit/flightsuit/proc/retract_flightshoes(forced = FALSE)
shoes.flags_1 &= ~NODROP_1
playsound(src.loc, 'sound/mecha/mechmove03.ogg', 50, 1)
playsound(src, 'sound/mecha/mechmove03.ogg', 50, 1)
if(user)
user.transferItemToLoc(shoes, src, TRUE)
user.update_inv_wear_suit()
@@ -1092,15 +1093,16 @@
/obj/item/clothing/head/helmet/space/hardsuit/flightsuit/dropped(mob/living/carbon/human/wearer)
..()
for(var/hudtype in datahuds)
var/datum/atom_hud/H = GLOB.huds[hudtype]
H.remove_hud_from(wearer)
if(zoom)
toggle_zoom(wearer, TRUE)
if(wearer)
for(var/hudtype in datahuds)
var/datum/atom_hud/H = GLOB.huds[hudtype]
H.remove_hud_from(wearer)
if(zoom)
toggle_zoom(wearer, TRUE)
/obj/item/clothing/head/helmet/space/hardsuit/flightsuit/proc/toggle_zoom(mob/living/user, force_off = FALSE)
if(zoom || force_off)
user.client.change_view(world.view)
user.client.change_view(CONFIG_GET(string/default_view))
to_chat(user, "<span class='boldnotice'>Disabling smart zooming image enhancement...</span>")
zoom = FALSE
return FALSE
+1 -3
View File
@@ -6,11 +6,9 @@
alertadmins = 0
/datum/round_event/camera_failure
startWhen = 1
endWhen = 2
fakeable = FALSE
/datum/round_event/camera_failure/tick()
/datum/round_event/camera_failure/start()
var/iterations = 1
var/obj/machinery/camera/C = pick(GLOB.cameranet.cameras)
while(prob(round(100/iterations)))
+13 -14
View File
@@ -11,29 +11,29 @@
/datum/round_event/wizard/cursed_items/start()
var/item_set = pick("wizardmimic", "swords", "bigfatdoobie", "boxing", "voicemodulators", "catgirls2015")
var/list/wearslots = list(slot_wear_suit, slot_shoes, slot_head, slot_wear_mask, slot_gloves, slot_ears)
var/list/loadout = list()
var/list/loadout[slots_amt]
var/ruins_spaceworthiness
var/ruins_wizard_loadout
loadout.len = 7
switch(item_set)
if("wizardmimic")
loadout = list(/obj/item/clothing/suit/wizrobe, /obj/item/clothing/shoes/sandal/magic, /obj/item/clothing/head/wizard)
loadout[slot_wear_suit] = /obj/item/clothing/suit/wizrobe
loadout[slot_shoes] = /obj/item/clothing/shoes/sandal/magic
loadout[slot_head] = /obj/item/clothing/head/wizard
ruins_spaceworthiness = 1
if("swords")
loadout[5] = /obj/item/katana/cursed
loadout[slot_hands] = /obj/item/katana/cursed
if("bigfatdoobie")
loadout[4] = /obj/item/clothing/mask/cigarette/rollie/trippy
loadout[slot_wear_mask] = /obj/item/clothing/mask/cigarette/rollie/trippy
ruins_spaceworthiness = 1
if("boxing")
loadout[4] = /obj/item/clothing/mask/luchador
loadout[6] = /obj/item/clothing/gloves/boxing
loadout[slot_wear_mask] = /obj/item/clothing/mask/luchador
loadout[slot_gloves] = /obj/item/clothing/gloves/boxing
ruins_spaceworthiness = 1
if("voicemodulators")
loadout[4] = /obj/item/clothing/mask/chameleon
loadout[slot_wear_mask] = /obj/item/clothing/mask/chameleon
if("catgirls2015")
loadout[3] = /obj/item/clothing/head/kitty
loadout[slot_head] = /obj/item/clothing/head/kitty
ruins_spaceworthiness = 1
ruins_wizard_loadout = 1
@@ -44,14 +44,13 @@
continue
if(item_set == "catgirls2015") //Wizard code means never having to say you're sorry
H.gender = FEMALE
var/list/slots = list(H.wear_suit, H.shoes, H.head, H.wear_mask, H.gloves, H.ears) //add new slots as needed to back
for(var/i in 1 to loadout.len)
if(loadout[i])
var/obj/item/J = loadout[i]
var/obj/item/I = new J //dumb but required because of byond throwing a fit anytime new gets too close to a list
H.temporarilyRemoveItemFromInventory(slots[i], TRUE)
H.equip_to_slot_or_del(I, wearslots[i])
I.flags_1 |= NODROP_1
H.dropItemToGround(H.get_item_by_slot(i), TRUE)
H.equip_to_slot_or_del(I, i)
I.flags_1 |= NODROP_1 | DROPDEL_1
I.name = "cursed " + I.name
for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
+3 -4
View File
@@ -6,12 +6,11 @@
earliest_start = 0
/datum/round_event/wizard/imposter/start()
for(var/datum/mind/M in SSticker.mode.wizards)
if(!ishuman(M.current))
continue
var/mob/living/carbon/human/W = M.current
var/list/candidates = get_candidates(ROLE_WIZARD)
var/list/candidates = pollGhostCandidates("Would you like to be an imposter wizard?", ROLE_WIZARD)
if(!candidates)
return //Sad Trombone
var/client/C = pick(candidates)
@@ -28,10 +27,10 @@
var/datum/antagonist/wizard/master = M.has_antag_datum(/datum/antagonist/wizard)
if(!master.wiz_team)
master.create_wiz_team()
var/datum/antagonist/wizard/apprentice/imposter = new(I.mind)
var/datum/antagonist/wizard/apprentice/imposter/imposter = new(I.mind)
imposter.master = M
imposter.wiz_team = master.wiz_team
master.wiz_team += imposter
master.wiz_team.add_member(imposter)
I.mind.add_antag_datum(imposter)
//Remove if possible
SSticker.mode.apprentices += I.mind
+1 -1
View File
@@ -22,7 +22,7 @@
for(var/mob/living/carbon/human/H in GLOB.carbon_list) //yes, even the dead
H.set_species(new_species)
H.real_name = new_species.random_name(H.gender,1)
H.real_name = H.dna.species.random_name(H.gender,1)
H.dna.unique_enzymes = H.dna.generate_unique_enzymes()
to_chat(H, "<span class='notice'>You feel somehow... different?</span>")
if(!all_the_same)
+16 -15
View File
@@ -115,6 +115,7 @@
I.Blend(B.broken_outline, ICON_OVERLAY, rand(5), 1)
I.SwapColor(rgb(255, 0, 220, 255), rgb(0, 0, 0, 0))
B.icon = I
B.name = "broken [name]"
if(prob(33))
new/obj/item/shard(drop_location())
playsound(src, "shatter", 70, 1)
@@ -186,7 +187,7 @@
// Formatting is the same as food.
/obj/item/reagent_containers/food/drinks/coffee
name = "Robust Coffee"
name = "robust coffee"
desc = "Careful, the beverage you're about to enjoy is extremely hot."
icon_state = "coffee"
list_reagents = list("coffee" = 30)
@@ -195,7 +196,7 @@
isGlass = FALSE
/obj/item/reagent_containers/food/drinks/ice
name = "Ice Cup"
name = "ice cup"
desc = "Careful, cold ice, do not chew."
icon_state = "coffee"
list_reagents = list("ice" = 30)
@@ -216,12 +217,12 @@
icon_state = "tea_empty"
/obj/item/reagent_containers/food/drinks/mug/tea
name = "Duke Purple Tea"
name = "Duke Purple tea"
desc = "An insult to Duke Purple is an insult to the Space Queen! Any proper gentleman will fight you, if you sully this tea."
list_reagents = list("tea" = 30)
/obj/item/reagent_containers/food/drinks/mug/coco
name = "Dutch Hot Coco"
name = "Dutch hot coco"
desc = "Made in Space South America."
list_reagents = list("hot_coco" = 30, "sugar" = 5)
foodtype = SUGAR
@@ -230,7 +231,7 @@
/obj/item/reagent_containers/food/drinks/dry_ramen
name = "Cup Ramen"
name = "cup ramen"
desc = "Just add 10ml of water, self heats! A taste that reminds you of your school years."
icon_state = "ramen"
list_reagents = list("dry_ramen" = 30)
@@ -238,7 +239,7 @@
isGlass = FALSE
/obj/item/reagent_containers/food/drinks/beer
name = "Space Beer"
name = "space beer"
desc = "Beer. In space."
icon_state = "beer"
list_reagents = list("beer" = 30)
@@ -282,7 +283,7 @@
I.Blend(B.broken_outline, ICON_OVERLAY, rand(5), 1)
I.SwapColor(rgb(255, 0, 220, 255), rgb(0, 0, 0, 0))
B.icon = I
B.name = "broken carton"
B.name = "broken [name]"
B.force = 0
B.throwforce = 0
B.desc = "A carton with the bottom half burst open. Might give you a papercut."
@@ -420,28 +421,28 @@
foodtype = SUGAR
/obj/item/reagent_containers/food/drinks/soda_cans/tonic
name = "T-Borg's Tonic Water"
name = "T-Borg's tonic water"
desc = "Quinine tastes funny, but at least it'll keep that Space Malaria away."
icon_state = "tonic"
list_reagents = list("tonic" = 50)
foodtype = ALCOHOL
/obj/item/reagent_containers/food/drinks/soda_cans/sodawater
name = "Soda Water"
name = "soda water"
desc = "A can of soda water. Why not make a scotch and soda?"
icon_state = "sodawater"
list_reagents = list("sodawater" = 50)
/obj/item/reagent_containers/food/drinks/soda_cans/lemon_lime
name = "Orange Soda"
name = "orange soda"
desc = "You wanted ORANGE. It gave you Lemon Lime."
icon_state = "lemon-lime"
list_reagents = list("lemon_lime" = 30)
foodtype = FRUIT
/obj/item/reagent_containers/food/drinks/soda_cans/lemon_lime/New()
..()
name = "Lemon-Lime Soda"
/obj/item/reagent_containers/food/drinks/soda_cans/lemon_lime/Initialize()
. = ..()
name = "lemon-lime soda"
/obj/item/reagent_containers/food/drinks/soda_cans/space_up
name = "Space-Up!"
@@ -485,14 +486,14 @@
list_reagents = list("pwr_game" = 30)
/obj/item/reagent_containers/food/drinks/soda_cans/shamblers
name = "Shambler's Juice"
name = "Shambler's juice"
desc = "~Shake me up some of that Shambler's Juice!~"
icon_state = "shamblers"
list_reagents = list("shamblers" = 30)
foodtype = SUGAR | JUNKFOOD
/obj/item/reagent_containers/food/drinks/soda_cans/air
name = "Canned Air"
name = "canned air"
desc = "There is no air shortage. Do not drink."
icon_state = "air"
list_reagents = list("nitrogen" = 24, "oxygen" = 6)
@@ -35,10 +35,10 @@
new/obj/item/shard(drop_location())
playsound(src, "shatter", 70, 1)
else
B.name = "broken carton"
B.force = 0
B.throwforce = 0
B.desc = "A carton with the bottom half burst open. Might give you a papercut."
B.name = "broken [name]"
transfer_fingerprints_to(B)
qdel(src)
@@ -119,7 +119,7 @@
//Keeping this here for now, I'll ask if I should keep it here.
/obj/item/broken_bottle
name = "Broken Bottle"
name = "broken bottle"
desc = "A bottle with a sharp broken bottom."
icon = 'icons/obj/drinks.dmi'
icon_state = "broken_bottle"
@@ -135,37 +135,37 @@
sharpness = IS_SHARP
/obj/item/reagent_containers/food/drinks/bottle/gin
name = "Griffeater Gin"
name = "Griffeater gin"
desc = "A bottle of high quality gin, produced in the New London Space Station."
icon_state = "ginbottle"
list_reagents = list("gin" = 100)
/obj/item/reagent_containers/food/drinks/bottle/whiskey
name = "Uncle Git's Special Reserve"
name = "Uncle Git's special reserve"
desc = "A premium single-malt whiskey, gently matured inside the tunnels of a nuclear shelter. TUNNEL WHISKEY RULES."
icon_state = "whiskeybottle"
list_reagents = list("whiskey" = 100)
/obj/item/reagent_containers/food/drinks/bottle/vodka
name = "Tunguska Triple Distilled"
name = "Tunguska triple distilled"
desc = "Aah, vodka. Prime choice of drink AND fuel by Russians worldwide."
icon_state = "vodkabottle"
list_reagents = list("vodka" = 100)
/obj/item/reagent_containers/food/drinks/bottle/vodka/badminka
name = "Badminka Vodka"
name = "Badminka vodka"
desc = "The label's written in Cyrillic. All you can make out is the name and a word that looks vaguely like 'Vodka'."
icon_state = "badminka"
list_reagents = list("vodka" = 100)
/obj/item/reagent_containers/food/drinks/bottle/tequila
name = "Caccavo Guaranteed Quality Tequila"
name = "Caccavo guaranteed quality tequila"
desc = "Made from premium petroleum distillates, pure thalidomide and other fine quality ingredients!"
icon_state = "tequilabottle"
list_reagents = list("tequila" = 100)
/obj/item/reagent_containers/food/drinks/bottle/bottleofnothing
name = "Bottle of Nothing"
name = "bottle of nothing"
desc = "A bottle filled with nothing."
icon_state = "bottleofnothing"
list_reagents = list("nothing" = 100)
@@ -178,13 +178,13 @@
list_reagents = list("patron" = 100)
/obj/item/reagent_containers/food/drinks/bottle/rum
name = "Captain Pete's Cuban Spiced Rum"
name = "Captain Pete's Cuban spiced rum"
desc = "This isn't just rum, oh no. It's practically GRIFF in a bottle."
icon_state = "rumbottle"
list_reagents = list("rum" = 100)
/obj/item/reagent_containers/food/drinks/bottle/holywater
name = "Flask of Holy Water"
name = "flask of holy water"
desc = "A flask of the chaplain's holy water."
icon_state = "holyflask"
list_reagents = list("holywater" = 100)
@@ -195,39 +195,39 @@
list_reagents = list("hell_water" = 100)
/obj/item/reagent_containers/food/drinks/bottle/vermouth
name = "Goldeneye Vermouth"
name = "Goldeneye vermouth"
desc = "Sweet, sweet dryness~"
icon_state = "vermouthbottle"
list_reagents = list("vermouth" = 100)
/obj/item/reagent_containers/food/drinks/bottle/kahlua
name = "Robert Robust's Coffee Liqueur"
name = "Robert Robust's coffee liqueur"
desc = "A widely known, Mexican coffee-flavoured liqueur. In production since 1936, HONK."
icon_state = "kahluabottle"
list_reagents = list("kahlua" = 100)
foodtype = VEGETABLES
/obj/item/reagent_containers/food/drinks/bottle/goldschlager
name = "College Girl Goldschlager"
name = "College Girl goldschlager"
desc = "Because they are the only ones who will drink 100 proof cinnamon schnapps."
icon_state = "goldschlagerbottle"
list_reagents = list("goldschlager" = 100)
/obj/item/reagent_containers/food/drinks/bottle/cognac
name = "Chateau De Baton Premium Cognac"
name = "Chateau de Baton premium cognac"
desc = "A sweet and strongly alchoholic drink, made after numerous distillations and years of maturing. You might as well not scream 'SHITCURITY' this time."
icon_state = "cognacbottle"
list_reagents = list("cognac" = 100)
/obj/item/reagent_containers/food/drinks/bottle/wine
name = "Doublebeard Bearded Special Wine"
name = "Doublebeard's bearded special wine"
desc = "A faint aura of unease and asspainery surrounds the bottle."
icon_state = "winebottle"
list_reagents = list("wine" = 100)
foodtype = FRUIT | ALCOHOL
/obj/item/reagent_containers/food/drinks/bottle/absinthe
name = "Extra-Strong Absinthe"
name = "extra-strong absinthe"
desc = "An strong alcoholic drink brewed and distributed by"
icon_state = "absinthebottle"
list_reagents = list("absinthe" = 100)
@@ -272,7 +272,7 @@
/obj/item/reagent_containers/food/drinks/bottle/absinthe/premium
name = "Gwyn's Premium Absinthe"
name = "Gwyn's premium absinthe"
desc = "A potent alcoholic beverage, almost makes you forget the ash in your lungs."
icon_state = "absinthepremium"
@@ -280,7 +280,7 @@
return
/obj/item/reagent_containers/food/drinks/bottle/lizardwine
name = "Bottle of lizard wine"
name = "bottle of lizard wine"
desc = "An alcoholic beverage from Space China, made by infusing lizard tails in ethanol. Inexplicably popular among command staff."
icon_state = "lizardwine"
list_reagents = list("lizardwine" = 100)
@@ -302,7 +302,7 @@
//////////////////////////JUICES AND STUFF ///////////////////////
/obj/item/reagent_containers/food/drinks/bottle/orangejuice
name = "Orange Juice"
name = "orange juice"
desc = "Full of vitamins and deliciousness!"
icon_state = "orangejuice"
item_state = "carton"
@@ -313,7 +313,7 @@
foodtype = FRUIT
/obj/item/reagent_containers/food/drinks/bottle/cream
name = "Milk Cream"
name = "milk cream"
desc = "It's cream. Made from milk. What else did you think you'd find in there?"
icon_state = "cream"
item_state = "carton"
@@ -324,7 +324,7 @@
foodtype = DAIRY
/obj/item/reagent_containers/food/drinks/bottle/tomatojuice
name = "Tomato Juice"
name = "tomato juice"
desc = "Well, at least it LOOKS like tomato juice. You can't tell with all that redness."
icon_state = "tomatojuice"
item_state = "carton"
@@ -335,7 +335,7 @@
foodtype = VEGETABLES
/obj/item/reagent_containers/food/drinks/bottle/limejuice
name = "Lime Juice"
name = "lime juice"
desc = "Sweet-sour goodness."
icon_state = "limejuice"
item_state = "carton"
@@ -380,7 +380,7 @@
foodtype = VEGETABLES | FRIED | DAIRY
/obj/item/reagent_containers/food/snacks/cubannachos
name = "cuban nachos"
name = "Cuban nachos"
desc = "That's some dangerously spicy nachos."
icon_state = "cubannachos"
bonus_reagents = list("nutriment" = 2, "vitamin" = 3)
@@ -4,7 +4,7 @@
/obj/item/reagent_containers/food/snacks/donut
name = "donut"
desc = "Goes great with Robust Coffee."
desc = "Goes great with robust coffee."
icon_state = "donut1"
bitesize = 5
bonus_reagents = list("sugar" = 1)
@@ -58,6 +58,7 @@
/obj/structure/beebox/premade/New()
..()
icon_state = "beebox"
var/datum/reagent/R = null
if(random_reagent)
R = pick(subtypesof(/datum/reagent))
@@ -80,6 +81,7 @@
/obj/structure/beebox/premade/random
icon_state = "random_beebox"
random_reagent = TRUE
+7
View File
@@ -14,6 +14,13 @@
mutatelist = list(/obj/item/seeds/watermelon/holy)
reagents_add = list("water" = 0.2, "vitamin" = 0.04, "nutriment" = 0.2)
/obj/item/seeds/watermelon/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is swallowing [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
user.gib()
new product(drop_location())
qdel(src)
return MANUAL_SUICIDE
/obj/item/reagent_containers/food/snacks/grown/watermelon
seed = /obj/item/seeds/watermelon
name = "watermelon"
+2 -2
View File
@@ -16,9 +16,9 @@
randomize_stats()
..()
if(prob(60))
add_random_reagents()
add_random_reagents(1, 3)
if(prob(50))
add_random_traits()
add_random_traits(1, 2)
add_random_plant_type(35)
/obj/item/reagent_containers/food/snacks/grown/random
@@ -207,6 +207,15 @@
spawn_flags = IC_SPAWN_RESEARCH
origin_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2, TECH_BIO = 1)
/obj/item/integrated_circuit/output/sound/vox
name = "ai vox sound circuit"
desc = "Takes a sound name as an input, and will play said sound when pulsed. This circuit is often found in AI announcement systems."
spawn_flags = IC_SPAWN_RESEARCH
/obj/item/integrated_circuit/output/sound/vox/Initialize()
.= ..()
sounds = GLOB.vox_sounds
extended_desc = "The first input pin determines which sound is used. It uses the AI Vox Broadcast word list. So either experiment to find words that work, or ask the AI to help in figuring them out. The second pin determines the volume of sound that is played, and the third determines if the frequency of the sound will vary with each activation."
/obj/item/integrated_circuit/output/text_to_speech
name = "text-to-speech circuit"
+5
View File
@@ -1,3 +1,6 @@
/obj/item/book/manual/random
icon_state = "random_book"
/obj/item/book/manual/random/Initialize()
..()
var/static/banned_books = list(/obj/item/book/manual/random, /obj/item/book/manual/nuclear, /obj/item/book/manual/wiki)
@@ -6,6 +9,7 @@
return INITIALIZE_HINT_QDEL
/obj/item/book/random
icon_state = "random_book"
var/amount = 1
var/category = null
@@ -20,6 +24,7 @@
/obj/structure/bookcase/random
var/category = null
var/book_count = 2
icon_state = "random_bookcase"
anchored = TRUE
state = 2
+4 -12
View File
@@ -137,18 +137,10 @@
regrowth_time_low = 4800
regrowth_time_high = 7200
/obj/structure/flora/ash/cacti/Crossed(mob/AM)
if(ishuman(AM) && has_gravity(loc) && prob(70))
var/mob/living/carbon/human/H = AM
if(!H.shoes && !H.lying) //ouch, my feet.
var/picked_def_zone = pick("l_leg", "r_leg")
var/obj/item/bodypart/O = H.get_bodypart(picked_def_zone)
if(!istype(O) || (PIERCEIMMUNE in H.dna.species.species_traits))
return
H.apply_damage(rand(3, 6), BRUTE, picked_def_zone)
H.Knockdown(40)
H.visible_message("<span class='danger'>[H] steps on a cactus!</span>", \
"<span class='userdanger'>You step on a cactus!</span>")
/obj/structure/flora/ash/cacti/Initialize(mapload)
. = ..()
// min dmg 3, max dmg 6, prob(70)
AddComponent(/datum/component/caltrop, 3, 6, 70)
/obj/item/reagent_containers/food/snacks/grown/ash_flora
name = "mushroom shavings"
+3 -3
View File
@@ -320,7 +320,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(mind.current.key && copytext(mind.current.key,1,2)!="@") //makes sure we don't accidentally kick any clients
to_chat(usr, "<span class='warning'>Another consciousness is in your body...It is resisting you.</span>")
return
client.change_view(world.view)
client.change_view(CONFIG_GET(string/default_view))
SStgui.on_transfer(src, mind.current) // Transfer NanoUIs.
mind.current.key = key
return 1
@@ -456,7 +456,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
set desc = "Change your view range."
var/max_view = client.prefs.unlock_content ? GHOST_MAX_VIEW_RANGE_MEMBER : GHOST_MAX_VIEW_RANGE_DEFAULT
if(client.view == world.view)
if(client.view == CONFIG_GET(string/default_view))
var/list/views = list()
for(var/i in 7 to max_view)
views |= i
@@ -464,7 +464,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(new_view)
client.change_view(Clamp(new_view, 7, max_view))
else
client.change_view(world.view)
client.change_view(CONFIG_GET(string/default_view))
/mob/dead/observer/verb/add_view_range(input as num)
set name = "Add View Range"
+2 -1
View File
@@ -817,7 +817,8 @@
return (GLOB.cameranet && GLOB.cameranet.checkTurfVis(get_turf_pixel(A))) || apc_override
//AI is carded/shunted
//view(src) returns nothing for carded/shunted AIs and they have x-ray vision so just use get_dist
return get_dist(src, A) <= client.view
var/list/viewscale = getviewsize(client.view)
return get_dist(src, A) <= max(viewscale[1]*0.5,viewscale[2]*0.5)
/mob/living/silicon/ai/proc/relay_speech(message, atom/movable/speaker, datum/language/message_language, raw_message, radio_freq, list/spans, message_mode)
raw_message = lang_treat(speaker, message_language, raw_message, spans, message_mode)
@@ -114,12 +114,14 @@
. = ..()
var/datum/action/innate/pai/software/SW = new
var/datum/action/innate/pai/shell/AS = new /datum/action/innate/pai/shell
var/datum/action/innate/pai/chassis/AC = new /datum/action/innate/pai/chassis
var/datum/action/innate/pai/rest/AR = new /datum/action/innate/pai/rest
var/datum/action/innate/pai/light/AL = new /datum/action/innate/pai/light
var/datum/action/language_menu/ALM = new
SW.Grant(src)
AS.Grant(src)
AC.Grant(src)
AR.Grant(src)
@@ -200,6 +202,15 @@
return 0
P = owner
/datum/action/innate/pai/software
name = "Software Interface"
button_icon_state = "pai"
background_icon_state = "bg_tech"
/datum/action/innate/pai/software/Trigger()
..()
P.paiInterface()
/datum/action/innate/pai/shell
name = "Toggle Holoform"
button_icon_state = "pai_holoform"
@@ -22,9 +22,7 @@
"remote signaller" = 5,
)
/mob/living/silicon/pai/verb/paiInterface()
set category = "pAI Commands"
set name = "Software Interface"
/mob/living/silicon/pai/proc/paiInterface()
var/dat = ""
var/left_part = ""
var/right_part = softwareMenu()
@@ -1,21 +1,21 @@
/mob/living/silicon/robot/Process_Spacemove(movement_dir = 0)
if(ionpulse())
return 1
return ..()
/mob/living/silicon/robot/movement_delay()
. = ..()
var/static/config_robot_delay
if(isnull(config_robot_delay))
config_robot_delay = CONFIG_GET(number/robot_delay)
. += speed + config_robot_delay
/mob/living/silicon/robot/mob_negates_gravity()
return magpulse
/mob/living/silicon/robot/mob_has_gravity()
return ..() || mob_negates_gravity()
/mob/living/silicon/robot/experience_pressure_difference(pressure_difference, direction)
if(!magpulse)
return ..()
/mob/living/silicon/robot/Process_Spacemove(movement_dir = 0)
if(ionpulse())
return 1
return ..()
/mob/living/silicon/robot/movement_delay()
. = ..()
var/static/config_robot_delay
if(isnull(config_robot_delay))
config_robot_delay = CONFIG_GET(number/robot_delay)
. += speed + config_robot_delay
/mob/living/silicon/robot/mob_negates_gravity()
return magpulse
/mob/living/silicon/robot/mob_has_gravity()
return ..() || mob_negates_gravity()
/mob/living/silicon/robot/experience_pressure_difference(pressure_difference, direction)
if(!magpulse)
return ..()
+3 -3
View File
@@ -10,14 +10,14 @@
var/mob/living/silicon/S = src
desig = trim_left(S.designation + " " + S.job)
var/message_a = say_quote(message, get_spans())
var/rendered = "<span class='binarysay'>Robotic Talk, <span class='name'>[name]</span> <span class='message'>[message_a]</span></span>"
var/rendered = "Robotic Talk, <span class='name'>[name]</span> <span class='message'>[message_a]</span>"
for(var/mob/M in GLOB.player_list)
if(M.binarycheck())
if(isAI(M))
var/renderedAI = "<span class='binarysay'>Robotic Talk, <a href='?src=[REF(M)];track=[html_encode(name)]'><span class='name'>[name] ([desig])</span></a> <span class='message'>[message_a]</span></span>"
to_chat(M, renderedAI)
else
to_chat(M, rendered)
to_chat(M, "<span class='binarysay'>[rendered]</span>")
if(isobserver(M))
var/following = src
// If the AI talks on binary chat, we still want to follow
@@ -26,7 +26,7 @@
var/mob/living/silicon/ai/ai = src
following = ai.eyeobj
var/link = FOLLOW_LINK(M, following)
to_chat(M, "[link] [rendered]")
to_chat(M, "<span class='binarysay'>[link] [rendered]</span>")
/mob/living/silicon/binarycheck()
return 1
@@ -9,8 +9,8 @@
gender = MALE
speak = list("Meow!", "Esp!", "Purr!", "HSSSSS")
speak_emote = list("purrs", "meows")
emote_hear = list("meows", "mews")
emote_see = list("shakes its head", "shivers")
emote_hear = list("meows.", "mews.")
emote_see = list("shakes its head.", "shivers.")
speak_chance = 1
turns_per_move = 5
see_in_dark = 6
@@ -22,7 +22,7 @@
unsuitable_atmos_damage = 1
animal_species = /mob/living/simple_animal/pet/cat
childtype = list(/mob/living/simple_animal/pet/cat/kitten)
butcher_results = list(/obj/item/reagent_containers/food/snacks/meat/slab = 2)
butcher_results = list(/obj/item/reagent_containers/food/snacks/meat/slab = 2, /obj/item/organ/ears/cat = 1, /obj/item/organ/tail/cat = 1)
response_help = "pets"
response_disarm = "gently pushes aside"
response_harm = "kicks"
+1 -1
View File
@@ -46,7 +46,7 @@
if(client)
client.click_intercept = null
client.change_view(world.view) // Resets the client.view in case it was changed.
client.change_view(CONFIG_GET(string/default_view)) // Resets the client.view in case it was changed.
if(!GLOB.individual_log_list[ckey])
GLOB.individual_log_list[ckey] = logging
+11 -13
View File
@@ -2,7 +2,7 @@
//
// consists of light fixtures (/obj/machinery/light) and light tube/bulb items (/obj/item/light)
#define LIGHT_EMERGENCY_POWER_USE 0.2 //How much power emergency lights will consume per tick
// status values shared between lighting fixtures and items
#define LIGHT_OK 0
#define LIGHT_EMPTY 1
@@ -284,7 +284,6 @@
return ..()
/obj/machinery/light/update_icon()
switch(status) // set icon_states
if(LIGHT_OK)
if(emergency_mode)
@@ -293,18 +292,17 @@
icon_state = "[base_state][on]"
if(LIGHT_EMPTY)
icon_state = "[base_state]-empty"
on = FALSE
if(LIGHT_BURNED)
icon_state = "[base_state]-burned"
on = FALSE
if(LIGHT_BROKEN)
icon_state = "[base_state]-broken"
on = FALSE
return
// update the icon_state and luminosity of the light depending on its state
/obj/machinery/light/proc/update(trigger = 1)
switch(status)
if(LIGHT_BROKEN,LIGHT_BURNED,LIGHT_EMPTY)
on = FALSE
emergency_mode = FALSE
if(on)
if(!light || light.light_range != brightness)
@@ -318,7 +316,7 @@
else
use_power = ACTIVE_POWER_USE
set_light(brightness, 1, "#FFFFFF")
else if(has_emergency_power() && !turned_off())
else if(has_emergency_power(LIGHT_EMERGENCY_POWER_USE) && !turned_off())
use_power = IDLE_POWER_USE
emergency_mode = TRUE
else
@@ -338,8 +336,8 @@
/obj/machinery/light/process()
if(has_power() && cell)
cell.charge = min(cell.maxcharge, cell.charge + 0.2) //Recharge emergency power automatically while not using it
if(emergency_mode && !use_emergency_power(0.2))
cell.charge = min(cell.maxcharge, cell.charge + LIGHT_EMERGENCY_POWER_USE) //Recharge emergency power automatically while not using it
if(emergency_mode && !use_emergency_power(LIGHT_EMERGENCY_POWER_USE))
update(FALSE) //Disables emergency mode and sets the color to normal
/obj/machinery/light/proc/burn_out()
@@ -494,7 +492,7 @@
// if a light is turned off, it won't activate emergency power
/obj/machinery/light/proc/turned_off()
var/area/A = get_area(src)
return !A.lightswitch && A.power_light
return !A.lightswitch && A.power_light || !flickering
// returns whether this light has power
// true if area has power and lightswitch is on
@@ -511,7 +509,7 @@
return status == LIGHT_OK
// attempts to use power from the installed emergency cell, returns true if it does and false if it doesn't
/obj/machinery/light/proc/use_emergency_power(pwr = 0.2)
/obj/machinery/light/proc/use_emergency_power(pwr = LIGHT_EMERGENCY_POWER_USE)
if(!has_emergency_power(pwr))
return FALSE
if(cell.charge > 300) //it's meant to handle 120 W, ya doofus
@@ -678,7 +676,7 @@
force = 2
throwforce = 5
w_class = WEIGHT_CLASS_TINY
var/status = 0 // LIGHT_OK, LIGHT_BURNED or LIGHT_BROKEN
var/status = LIGHT_OK // LIGHT_OK, LIGHT_BURNED or LIGHT_BROKEN
var/base_state
var/switchcount = 0 // number of times switched
materials = list(MAT_GLASS=100)
@@ -761,7 +759,7 @@
/obj/item/light/proc/shatter()
if(status == LIGHT_OK || status == LIGHT_BURNED)
src.visible_message("<span class='danger'>[name] shatters.</span>","<span class='italics'>You hear a small glass object shatter.</span>")
visible_message("<span class='danger'>[name] shatters.</span>","<span class='italics'>You hear a small glass object shatter.</span>")
status = LIGHT_BROKEN
force = 5
playsound(src.loc, 'sound/effects/glasshit.ogg', 75, 1)
+1 -1
View File
@@ -335,7 +335,7 @@
buckled_mob.pixel_x = 0
buckled_mob.pixel_y = 0
if(buckled_mob.client)
buckled_mob.client.change_view(world.view)
buckled_mob.client.change_view(CONFIG_GET(string/default_view))
auto.Remove(buckled_mob)
. = ..()
+1 -1
View File
@@ -500,7 +500,7 @@
user.client.pixel_x = world.icon_size*_x
user.client.pixel_y = world.icon_size*_y
else
user.client.change_view(world.view)
user.client.change_view(CONFIG_GET(string/default_view))
user.client.pixel_x = 0
user.client.pixel_y = 0
return zoomed
@@ -223,7 +223,7 @@
/obj/item/gun/ballistic/automatic/ar
name = "\improper NT-ARG 'Boarder'"
desc = "A robust assault rile used by Nanotrasen fighting forces."
desc = "A robust assault rifle used by Nanotrasen fighting forces."
icon_state = "arg"
item_state = "arg"
slot_flags = 0
+2 -2
View File
@@ -179,7 +179,7 @@
zoom_animating = 0
animate(current_user.client, pixel_x = 0, pixel_y = 0, 0, FALSE, LINEAR_EASING, ANIMATION_END_NOW)
zoom_current_view_increase = 0
current_user.client.change_view(world.view)
current_user.client.change_view(CONFIG_GET(string/default_view))
zooming_angle = 0
current_zoom_x = 0
current_zoom_y = 0
@@ -358,8 +358,8 @@
if(lastfire > world.time + delay)
return
lastfire = world.time
. = ..()
stop_aiming()
return ..()
/obj/item/gun/energy/beam_rifle/proc/sync_ammo()
for(var/obj/item/ammo_casing/energy/beam_rifle/AC in contents)
@@ -59,6 +59,11 @@
recharge()
dispensable_reagents = sortList(dispensable_reagents)
/obj/machinery/chem_dispenser/Destroy()
QDEL_NULL(beaker)
QDEL_NULL(cell)
return ..()
/obj/machinery/chem_dispenser/process()
if(recharged < 0)
@@ -303,6 +308,7 @@
if(beaker)
beaker.forceMove(drop_location())
beaker = null
return ..()
/obj/machinery/chem_dispenser/drinks
name = "soda dispenser"
@@ -13,6 +13,28 @@
var/heater_coefficient = 0.1
var/on = FALSE
/obj/machinery/chem_heater/Destroy()
QDEL_NULL(beaker)
return ..()
/obj/machinery/chem_heater/handle_atom_del(atom/A)
. = ..()
if(A == beaker)
beaker = null
update_icon()
/obj/machinery/chem_heater/update_icon()
if(beaker)
icon_state = "mixer1b"
else
icon_state = "mixer0b"
/obj/machinery/chem_heater/proc/eject_beaker()
if(beaker)
beaker.forceMove(drop_location())
beaker = null
update_icon()
/obj/machinery/chem_heater/RefreshParts()
heater_coefficient = 0.1
for(var/obj/item/stock_parts/micro_laser/M in component_parts)
@@ -52,12 +74,13 @@
return
beaker = I
to_chat(user, "<span class='notice'>You add [I] to [src].</span>")
icon_state = "mixer1b"
update_icon()
return
return ..()
/obj/machinery/chem_heater/on_deconstruction()
eject_beaker()
return ..()
/obj/machinery/chem_heater/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
@@ -108,10 +131,3 @@
on = FALSE
eject_beaker()
. = TRUE
/obj/machinery/chem_heater/proc/eject_beaker()
if(beaker)
beaker.forceMove(drop_location())
beaker.reagents.handle_reactions()
beaker = null
icon_state = "mixer0b"
@@ -13,7 +13,7 @@
var/obj/item/reagent_containers/beaker = null
var/obj/item/storage/pill_bottle/bottle = null
var/mode = 1
var/condi = 0
var/condi = FALSE
var/screen = "home"
var/analyzeVars[0]
var/useramount = 30 // Last used amount
@@ -23,6 +23,11 @@
add_overlay("waitlight")
. = ..()
/obj/machinery/chem_master/Destroy()
QDEL_NULL(beaker)
QDEL_NULL(bottle)
return ..()
/obj/machinery/chem_master/RefreshParts()
reagents.maximum_volume = 0
for(var/obj/item/reagent_containers/glass/beaker/B in component_parts)
@@ -44,10 +49,22 @@
if(A == beaker)
beaker = null
reagents.clear_reagents()
icon_state = "mixer0"
update_icon()
else if(A == bottle)
bottle = null
/obj/machinery/chem_master/update_icon()
if(beaker)
icon_state = "mixer1"
else
icon_state = "mixer0"
/obj/machinery/chem_master/proc/eject_beaker()
if(beaker)
beaker.forceMove(drop_location())
adjust_item_drop_location(beaker)
beaker = null
update_icon()
/obj/machinery/chem_master/blob_act(obj/structure/blob/B)
if (prob(50))
@@ -61,15 +78,6 @@
/obj/machinery/chem_master/attackby(obj/item/I, mob/user, params)
if(default_deconstruction_screwdriver(user, "mixer0_nopower", "mixer0", I))
if(beaker)
beaker.forceMove(drop_location())
adjust_item_drop_location(beaker)
beaker = null
reagents.clear_reagents()
if(bottle)
bottle.forceMove(drop_location())
adjust_item_drop_location(bottle)
bottle = null
return
else if(exchange_parts(user, I))
@@ -94,7 +102,7 @@
beaker = I
to_chat(user, "<span class='notice'>You add [I] to [src].</span>")
src.updateUsrDialog()
icon_state = "mixer1"
update_icon()
else if(!condi && istype(I, /obj/item/storage/pill_bottle))
if(bottle)
@@ -109,6 +117,13 @@
else
return ..()
/obj/machinery/chem_master/on_deconstruction()
eject_beaker()
if(bottle)
bottle.forceMove(drop_location())
adjust_item_drop_location(bottle)
bottle = null
return ..()
/obj/machinery/chem_master/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
@@ -154,13 +169,8 @@
return
switch(action)
if("eject")
if(beaker)
beaker.forceMove(drop_location())
adjust_item_drop_location(beaker)
beaker = null
reagents.clear_reagents()
icon_state = "mixer0"
. = TRUE
eject_beaker()
. = TRUE
if("ejectp")
if(bottle)
@@ -348,7 +358,7 @@
#if DM_VERSION >= 513
#warning 512 is definitely stable now, remove the old code
#endif
#if DM_VERSION >= 512
. += hex2num(md5[i])
#else
@@ -361,4 +371,4 @@
/obj/machinery/chem_master/condimaster
name = "CondiMaster 3000"
desc = "Used to create condiments and other cooking supplies."
condi = 1
condi = TRUE
@@ -25,6 +25,12 @@
QDEL_NULL(beaker)
return ..()
/obj/machinery/computer/pandemic/handle_atom_del(atom/A)
. = ..()
if(A == beaker)
beaker = null
update_icon()
/obj/machinery/computer/pandemic/proc/get_by_index(thing, index)
if(!beaker || !beaker.reagents)
return
@@ -121,9 +127,10 @@
add_overlay("waitlight")
/obj/machinery/computer/pandemic/proc/eject_beaker()
beaker.forceMove(drop_location())
beaker = null
update_icon()
if(beaker)
beaker.forceMove(drop_location())
beaker = null
update_icon()
/obj/machinery/computer/pandemic/ui_interact(mob/user, ui_key = "main", datum/tgui/ui, force_open = FALSE, datum/tgui/master_ui, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
@@ -159,8 +166,7 @@
return
switch(action)
if("eject_beaker")
if(beaker)
eject_beaker()
eject_beaker()
. = TRUE
if("empty_beaker")
if(beaker)
@@ -236,7 +242,5 @@
return ..()
/obj/machinery/computer/pandemic/on_deconstruction()
if(beaker)
beaker.forceMove(drop_location())
beaker = null
eject_beaker()
. = ..()

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