mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Merge branch 'dev' of https://github.com/Baystation12/Baystation12 into 7/16/2015_bay_merge_2
Conflicts: .travis.yml polaris.dme
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,4 +1,5 @@
|
||||
#ignore misc BYOND files
|
||||
Thumbs.db
|
||||
*.log
|
||||
*.int
|
||||
*.rsc
|
||||
@@ -7,3 +8,4 @@
|
||||
*.backup
|
||||
data/
|
||||
cfg/
|
||||
|
||||
|
||||
@@ -199,7 +199,7 @@
|
||||
total_unfilterable_moles += source.gas[g]
|
||||
|
||||
var/ratio = source.gas[g]/source.total_moles //converts the specific power per mole of pure gas to specific power per mole of input gas mix
|
||||
total_specific_power = specific_power_gas[g]*ratio
|
||||
total_specific_power += specific_power_gas[g]*ratio
|
||||
|
||||
//Figure out how much of each gas to filter
|
||||
if (isnull(total_transfer_moles))
|
||||
@@ -272,7 +272,7 @@
|
||||
total_unfilterable_moles += source.gas[g]
|
||||
|
||||
var/ratio = source.gas[g]/source.total_moles //converts the specific power per mole of pure gas to specific power per mole of input gas mix
|
||||
total_specific_power = specific_power_gas[g]*ratio
|
||||
total_specific_power += specific_power_gas[g]*ratio
|
||||
|
||||
//Figure out how much of each gas to filter
|
||||
if (isnull(total_transfer_moles))
|
||||
|
||||
@@ -10,6 +10,9 @@ Pipelines + Other Objects -> Pipe network
|
||||
|
||||
*/
|
||||
/obj/machinery/atmospherics
|
||||
|
||||
auto_init = 0
|
||||
|
||||
anchored = 1
|
||||
idle_power_usage = 0
|
||||
active_power_usage = 0
|
||||
|
||||
@@ -120,14 +120,14 @@
|
||||
if(pressure_delta > 0.5)
|
||||
if(pump_direction) //internal -> external
|
||||
if (node1 && (environment.temperature || air1.temperature))
|
||||
var/transfer_moles = calculate_transfer_moles(air1, environment)
|
||||
var/transfer_moles = calculate_transfer_moles(air1, environment, pressure_delta)
|
||||
power_draw = pump_gas(src, air1, environment, transfer_moles, power_rating)
|
||||
|
||||
if(power_draw >= 0 && network1)
|
||||
network1.update = 1
|
||||
else //external -> internal
|
||||
if (node2 && (environment.temperature || air2.temperature))
|
||||
var/transfer_moles = calculate_transfer_moles(environment, air2, (network2)? network2.volume : 0)
|
||||
var/transfer_moles = calculate_transfer_moles(environment, air2, pressure_delta, (network2)? network2.volume : 0)
|
||||
|
||||
//limit flow rate from turfs
|
||||
transfer_moles = min(transfer_moles, environment.total_moles*air2.volume/environment.volume) //group_multiplier gets divided out here
|
||||
|
||||
@@ -178,10 +178,10 @@
|
||||
|
||||
if((environment.temperature || air_contents.temperature) && pressure_delta > 0.5)
|
||||
if(pump_direction) //internal -> external
|
||||
var/transfer_moles = calculate_transfer_moles(air_contents, environment)
|
||||
var/transfer_moles = calculate_transfer_moles(air_contents, environment, pressure_delta)
|
||||
power_draw = pump_gas(src, air_contents, environment, transfer_moles, power_rating)
|
||||
else //external -> internal
|
||||
var/transfer_moles = calculate_transfer_moles(environment, air_contents, (network)? network.volume : 0)
|
||||
var/transfer_moles = calculate_transfer_moles(environment, air_contents, pressure_delta, (network)? network.volume : 0)
|
||||
|
||||
//limit flow rate from turfs
|
||||
transfer_moles = min(transfer_moles, environment.total_moles*air_contents.volume/environment.volume) //group_multiplier gets divided out here
|
||||
|
||||
@@ -114,10 +114,10 @@
|
||||
ReplaceWithLattice()
|
||||
return
|
||||
|
||||
if (istype(C, /obj/item/stack/tile/plasteel))
|
||||
if (istype(C, /obj/item/stack/tile/steel))
|
||||
var/obj/structure/lattice/L = locate(/obj/structure/lattice, src)
|
||||
if(L)
|
||||
var/obj/item/stack/tile/plasteel/S = C
|
||||
var/obj/item/stack/tile/steel/S = C
|
||||
if (S.get_amount() < 1)
|
||||
return
|
||||
qdel(L)
|
||||
|
||||
@@ -226,14 +226,15 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
|
||||
|
||||
//Returns the firelevel
|
||||
/datum/gas_mixture/proc/zburn(zone/zone, force_burn, no_check = 0)
|
||||
#ifdef FIREDBG
|
||||
log_debug("***************** FIREDBG *****************")
|
||||
if(zone) log_debug("Burning [zone.name]!")
|
||||
#endif
|
||||
|
||||
. = 0
|
||||
if((temperature > PHORON_MINIMUM_BURN_TEMPERATURE || force_burn) && (no_check ||check_recombustability(zone? zone.fuel_objs : null)))
|
||||
var/gas_fuel = 0 //in the case of mixed gas/liquid fires, the gas burns first.
|
||||
|
||||
#ifdef FIREDBG
|
||||
log_debug("***************** FIREDBG *****************")
|
||||
log_debug("Burning [zone? zone.name : "zoneless gas_mixture"]!")
|
||||
#endif
|
||||
|
||||
var/gas_fuel = 0
|
||||
var/liquid_fuel = 0
|
||||
var/total_fuel = 0
|
||||
var/total_oxidizers = 0
|
||||
@@ -269,23 +270,27 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
|
||||
|
||||
//calculate the firelevel.
|
||||
var/firelevel = calculate_firelevel(total_fuel, total_oxidizers, reaction_limit)
|
||||
var/firelevel_ratio = firelevel / vsc.fire_firelevel_multiplier
|
||||
|
||||
|
||||
//vapour fuels are extremely volatile! The reaction progress is a percentage of the total fuel (similar to old zburn).
|
||||
var/gas_reaction_progress = min(0.2, (firelevel/vsc.fire_firelevel_multiplier))*gas_fuel*FIRE_GAS_BURNRATE_MULT
|
||||
//vapour fuels are extremely volatile! The reaction progress is a percentage of the total fuel (similar to old zburn).)
|
||||
var/min_burn = 0.30*volume*group_multiplier/CELL_VOLUME //in moles - so that fires with very small gas concentrations burn out fast
|
||||
var/gas_reaction_progress = min(max(min_burn, firelevel_ratio*gas_fuel)*FIRE_GAS_BURNRATE_MULT, gas_fuel)
|
||||
|
||||
//liquid fuels are not as volatile, and the reaction progress depends on the size of the area that is burning. Limit the burn rate to a certain amount per area.
|
||||
var/liquid_reaction_progress = ((firelevel/vsc.fire_firelevel_multiplier)*0.2 + 0.05)*fuel_area*FIRE_LIQUID_BURNRATE_MULT
|
||||
var/liquid_reaction_progress = min((firelevel_ratio*0.2 + 0.05)*fuel_area*FIRE_LIQUID_BURNRATE_MULT, liquid_fuel)
|
||||
|
||||
var/total_reaction_progress = gas_reaction_progress + liquid_reaction_progress
|
||||
var/used_fuel = min(total_reaction_progress, reaction_limit)
|
||||
var/used_oxidizers = used_fuel*(FIRE_REACTION_OXIDIZER_AMOUNT/FIRE_REACTION_FUEL_AMOUNT)
|
||||
|
||||
#ifdef FIREDBG
|
||||
log_debug("gas_fuel = [gas_fuel], liquid_fuel = [liquid_fuel], total_oxidizers = [total_oxidizers]")
|
||||
log_debug("fuel_area = [fuel_area], total_fuel = [total_fuel], reaction_limit = [reaction_limit]")
|
||||
log_debug("firelevel -> [firelevel] / [vsc.fire_firelevel_multiplier]")
|
||||
log_debug("liquid_reaction_progress = [liquid_reaction_progress]")
|
||||
log_debug("gas_reaction_progress = [gas_reaction_progress]")
|
||||
log_debug("used_fuel = [used_fuel]; used_oxidizers = [used_oxidizers]; reaction_limit=[reaction_limit]")
|
||||
log_debug("total_reaction_progress = [total_reaction_progress]")
|
||||
log_debug("used_fuel = [used_fuel], used_oxidizers = [used_oxidizers]; ")
|
||||
#endif
|
||||
|
||||
//if the reaction is progressing too slow then it isn't self-sustaining anymore and burns out
|
||||
@@ -297,8 +302,8 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
|
||||
//*** Remove fuel and oxidizer, add carbon dioxide and heat
|
||||
|
||||
//remove and add gasses as calculated
|
||||
var/used_gas_fuel = between(0.25, used_fuel*(gas_reaction_progress/total_reaction_progress), gas_fuel) //remove in proportion to the relative reaction progress
|
||||
var/used_liquid_fuel = between(0.25, used_fuel-used_gas_fuel, liquid_fuel)
|
||||
var/used_gas_fuel = min(max(0.25, used_fuel*(gas_reaction_progress/total_reaction_progress)), gas_fuel) //remove in proportion to the relative reaction progress
|
||||
var/used_liquid_fuel = min(max(0.25, used_fuel-used_gas_fuel), liquid_fuel)
|
||||
|
||||
//remove_by_flag() and adjust_gas() handle the group_multiplier for us.
|
||||
remove_by_flag(XGM_GAS_OXIDIZER, used_oxidizers)
|
||||
@@ -309,10 +314,10 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
|
||||
zone.remove_liquidfuel(used_liquid_fuel, !check_combustability())
|
||||
|
||||
//calculate the energy produced by the reaction and then set the new temperature of the mix
|
||||
temperature = (starting_energy + vsc.fire_fuel_energy_release * used_fuel) / heat_capacity()
|
||||
temperature = (starting_energy + vsc.fire_fuel_energy_release * (used_gas_fuel + used_liquid_fuel)) / heat_capacity()
|
||||
|
||||
#ifdef FIREDBG
|
||||
log_debug("used_gas_fuel = [used_gas_fuel]; used_liquid_fuel = [used_liquid_fuel]; total = [used_gas_fuel+used_liquid_fuel]")
|
||||
log_debug("used_gas_fuel = [used_gas_fuel]; used_liquid_fuel = [used_liquid_fuel]; total = [used_fuel]")
|
||||
log_debug("new temperature = [temperature]")
|
||||
#endif
|
||||
|
||||
@@ -353,7 +358,7 @@ datum/gas_mixture/proc/check_recombustability(list/fuel_objs)
|
||||
|
||||
. = 0
|
||||
for(var/g in gas)
|
||||
if(gas_data.flags[g] & XGM_GAS_FUEL && QUANTIZE(gas[g] * vsc.fire_consuption_rate) >= 0.1)
|
||||
if(gas_data.flags[g] & XGM_GAS_FUEL && QUANTIZE(gas[g] * vsc.fire_consuption_rate) >= 0.005)
|
||||
. = 1
|
||||
break
|
||||
|
||||
|
||||
2
code/__defines/_macros.dm
Normal file
2
code/__defines/_macros.dm
Normal file
@@ -0,0 +1,2 @@
|
||||
#define Clamp(x, y, z) (x <= y ? y : (x >= z ? z : x))
|
||||
#define CLAMP01(x) (Clamp(x, 0, 1))
|
||||
@@ -97,10 +97,13 @@
|
||||
|
||||
// Inventory slot strings.
|
||||
// since numbers cannot be used as associative list keys.
|
||||
#define slot_back_str "back"
|
||||
//icon_back, icon_l_hand, etc would be much better names for these...
|
||||
#define slot_back_str "slot_back"
|
||||
#define slot_l_hand_str "slot_l_hand"
|
||||
#define slot_r_hand_str "slot_r_hand"
|
||||
#define slot_w_uniform_str "w_uniform"
|
||||
#define slot_w_uniform_str "slot_w_uniform"
|
||||
#define slot_head_str "slot_head"
|
||||
#define slot_wear_suit_str "slot_suit"
|
||||
|
||||
// Bitflags for clothing parts.
|
||||
#define HEAD 1
|
||||
|
||||
@@ -51,6 +51,7 @@ var/list/restricted_camera_networks = list("thunder","ERT","NUKE","Secret")
|
||||
#define NETWORK_RESEARCH "Research"
|
||||
#define NETWORK_RESEARCH_OUTPOST "Research Outpost"
|
||||
#define NETWORK_PRISON "Prison"
|
||||
#define NETWORK_ROBOTS "Robots"
|
||||
#define NETWORK_SECURITY "Security"
|
||||
#define NETWORK_TELECOM "Tcomsat"
|
||||
#define NETWORK_THUNDER "thunder"
|
||||
|
||||
@@ -1,15 +1,6 @@
|
||||
// Macro functions.
|
||||
#define RAND_F(LOW, HIGH) (rand()*(HIGH-LOW) + LOW)
|
||||
|
||||
// List of square roots for the numbers 1-100.
|
||||
var/list/sqrtTable = list(1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5,
|
||||
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7,
|
||||
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
|
||||
8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10)
|
||||
|
||||
/proc/Clamp(val, min, max)
|
||||
return max(min, min(val, max))
|
||||
|
||||
// min is inclusive, max is exclusive
|
||||
/proc/Wrap(val, min, max)
|
||||
var/d = max - min
|
||||
|
||||
@@ -226,89 +226,3 @@ var/syndicate_code_response//Code response for traitors.
|
||||
code_phrase += ", "
|
||||
|
||||
return code_phrase
|
||||
|
||||
/*
|
||||
//This proc tests the gen above.
|
||||
/client/verb/test_code_phrase()
|
||||
set name = "Generate Code Phrase"
|
||||
set category = "Debug"
|
||||
|
||||
world << "<span class='warning'>Code Phrase is:</span> [generate_code_phrase()]"
|
||||
return
|
||||
|
||||
|
||||
This was an earlier attempt at code phrase system, aside from an even earlier attempt (and failure).
|
||||
This system more or less works as intended--aside from being unfinished--but it's still very predictable.
|
||||
Particularly, the phrase opening statements are pretty easy to recognize and identify when metagaming.
|
||||
I think the above-used method solves this issue by using words in a sequence, providing for much greater flexibility.
|
||||
/N
|
||||
|
||||
switch(choice)
|
||||
if(1)
|
||||
syndicate_code_phrase += pick("I'm looking for","Have you seen","Maybe you've seen","I'm trying to find","I'm tracking")
|
||||
syndicate_code_phrase += " "
|
||||
syndicate_code_phrase += pick(pick(first_names_male,first_names_female))
|
||||
syndicate_code_phrase += " "
|
||||
syndicate_code_phrase += pick(last_names)
|
||||
syndicate_code_phrase += "."
|
||||
if(2)
|
||||
syndicate_code_phrase += pick("How do I get to","How do I find","Where is","Where do I find")
|
||||
syndicate_code_phrase += " "
|
||||
syndicate_code_phrase += pick("Escape","Engineering","Atmos","the bridge","the brig","Clown Planet","CentCom","the library","the chapel","a bathroom","Med Bay","Tool Storage","the escape shuttle","Robotics","a locker room","the living quarters","the gym","the autolathe","QM","the bar","the theater","the derelict")
|
||||
syndicate_code_phrase += "?"
|
||||
if(3)
|
||||
if(prob(70))
|
||||
syndicate_code_phrase += pick("Get me","I want","I'd like","Make me")
|
||||
syndicate_code_phrase += " a "
|
||||
else
|
||||
syndicate_code_phrase += pick("One")
|
||||
syndicate_code_phrase += " "
|
||||
syndicate_code_phrase += pick("vodka and tonic","gin fizz","bahama mama","manhattan","black Russian","whiskey soda","long island tea","margarita","Irish coffee"," manly dwarf","Irish cream","doctor's delight","Beepksy Smash","tequilla sunrise","brave bull","gargle blaster","bloody mary","whiskey cola","white Russian","vodka martini","martini","Cuba libre","kahlua","vodka","wine","moonshine")
|
||||
syndicate_code_phrase += "."
|
||||
if(4)
|
||||
syndicate_code_phrase += pick("I wish I was","My dad was","His mom was","Where do I find","The hero this station needs is","I'd fuck","I wouldn't trust","Someone caught","HoS caught","Someone found","I'd wrestle","I wanna kill")
|
||||
syndicate_code_phrase += " [pick("a","the")] "
|
||||
syndicate_code_phrase += pick("wizard","ninja","xeno","lizard","slime","monkey","syndicate","cyborg","clown","space carp","singularity","singulo","mime")
|
||||
syndicate_code_phrase += "."
|
||||
if(5)
|
||||
syndicate_code_phrase += pick("Do we have","Is there","Where is","Where's","Who's")
|
||||
syndicate_code_phrase += " "
|
||||
syndicate_code_phrase += "[pick(joblist)]"
|
||||
syndicate_code_phrase += "?"
|
||||
|
||||
switch(choice)
|
||||
if(1)
|
||||
if(prob(80))
|
||||
syndicate_code_response += pick("Try looking for them near","I they ran off to","Yes. I saw them near","Nope. I'm heading to","Try searching")
|
||||
syndicate_code_response += " "
|
||||
syndicate_code_response += pick("Escape","Engineering","Atmos","the bridge","the brig","Clown Planet","CentCom","the library","the chapel","a bathroom","Med Bay","Tool Storage","the escape shuttle","Robotics","a locker room","the living quarters","the gym","the autolathe","QM","the bar","the theater","the derelict")
|
||||
syndicate_code_response += "."
|
||||
else if(prob(60))
|
||||
syndicate_code_response += pick("No. I'm busy, sorry.","I don't have the time.","Not sure, maybe?","There is no time.")
|
||||
else
|
||||
syndicate_code_response += pick("*shrug*","*smile*","*blink*","*sigh*","*laugh*","*nod*","*giggle*")
|
||||
if(2)
|
||||
if(prob(80))
|
||||
syndicate_code_response += pick("Go to","Navigate to","Try","Sure, run to","Try searching","It's near","It's around")
|
||||
syndicate_code_response += " the "
|
||||
syndicate_code_response += pick("[pick("south","north","east","west")] maitenance door","nearby maitenance","teleporter","[pick("cold","dead")] space","morgue","vacuum","[pick("south","north","east","west")] hall ","[pick("south","north","east","west")] hallway","[pick("white","black","red","green","blue","pink","purple")] [pick("rabbit","frog","lion","tiger","panther","snake","facehugger")]")
|
||||
syndicate_code_response += "."
|
||||
else if(prob(60))
|
||||
syndicate_code_response += pick("Try asking","Ask","Talk to","Go see","Follow","Hunt down")
|
||||
syndicate_code_response += " "
|
||||
if(prob(50))
|
||||
syndicate_code_response += pick(pick(first_names_male,first_names_female))
|
||||
syndicate_code_response += " "
|
||||
syndicate_code_response += pick(last_names)
|
||||
else
|
||||
syndicate_code_response += " the "
|
||||
syndicate_code_response += "[pic(joblist)]"
|
||||
syndicate_code_response += "."
|
||||
else
|
||||
syndicate_code_response += pick("*shrug*","*smile*","*blink*","*sigh*","*laugh*","*nod*","*giggle*")
|
||||
if(3)
|
||||
if(4)
|
||||
if(5)
|
||||
|
||||
return
|
||||
*/
|
||||
|
||||
@@ -8,7 +8,7 @@ var/roundstart_hour = 0
|
||||
//Returns the world time in english
|
||||
proc/worldtime2text(time = world.time)
|
||||
if(!roundstart_hour) roundstart_hour = pick(2,7,12,17)
|
||||
return "[round(time / 36000)+roundstart_hour]:[(time / 600 % 60) < 10 ? add_zero(time / 600 % 60, 1) : time / 600 % 60]"
|
||||
return "[(round(time / 36000)+roundstart_hour) % 24]:[(time / 600 % 60) < 10 ? add_zero(time / 600 % 60, 1) : time / 600 % 60]"
|
||||
|
||||
proc/worlddate2text()
|
||||
return num2text((text2num(time2text(world.timeofday, "YYYY"))+544)) + "-" + time2text(world.timeofday, "MM-DD")
|
||||
|
||||
@@ -36,35 +36,19 @@
|
||||
return num
|
||||
|
||||
// Returns the hex value of a number given a value assumed to be a base-ten value
|
||||
/proc/num2hex(num, digits)
|
||||
if (digits == null)
|
||||
digits = 2
|
||||
/proc/num2hex(num, padlength)
|
||||
var/global/list/hexdigits = list("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F")
|
||||
|
||||
if (!isnum(num))
|
||||
return
|
||||
. = ""
|
||||
while(num > 0)
|
||||
var/hexdigit = hexdigits[(num & 0xF) + 1]
|
||||
. = "[hexdigit][.]"
|
||||
num >>= 4 //go to the next half-byte
|
||||
|
||||
// hex is our return value, to which each hex-digit of num is appended to.
|
||||
var/hex = ""
|
||||
var/power = -4
|
||||
var/n = 1
|
||||
|
||||
// Figure out power. (power of 2)
|
||||
while (n < num)
|
||||
power += 4
|
||||
n *= 16
|
||||
|
||||
// Note that we have to start appending to hex with the most-significant digits.
|
||||
while (power >= 0)
|
||||
var/m = (num >> power) & 15
|
||||
hex += ascii2text(m + (m < 10 ? 48 : 87)) // Provided by the IconProcs library.
|
||||
power -= 4
|
||||
|
||||
// Append zeroes to make sure that hex is atleast digits long.
|
||||
var/left = length(hex) - digits
|
||||
//pad with zeroes
|
||||
var/left = padlength - length(.)
|
||||
while (left-- > 0)
|
||||
hex = text("0[]", hex)
|
||||
|
||||
return hex
|
||||
. = "0[.]"
|
||||
|
||||
// Concatenates a list of strings into a single string. A seperator may optionally be provided.
|
||||
/proc/list2text(list/ls, sep)
|
||||
|
||||
@@ -550,23 +550,6 @@ proc/GaussRand(var/sigma)
|
||||
proc/GaussRandRound(var/sigma,var/roundto)
|
||||
return round(GaussRand(sigma),roundto)
|
||||
|
||||
proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,flick_anim as text,sleeptime = 0,direction as num)
|
||||
//This proc throws up either an icon or an animation for a specified amount of time.
|
||||
//The variables should be apparent enough.
|
||||
var/atom/movable/overlay/animation = new(location)
|
||||
if(direction)
|
||||
animation.set_dir(direction)
|
||||
animation.icon = a_icon
|
||||
animation.layer = target:layer+1
|
||||
if(a_icon_state)
|
||||
animation.icon_state = a_icon_state
|
||||
else
|
||||
animation.icon_state = "blank"
|
||||
animation.master = target
|
||||
flick(flick_anim, animation)
|
||||
sleep(max(sleeptime, 15))
|
||||
qdel(animation)
|
||||
|
||||
//Will return the contents of an atom recursivly to a depth of 'searchDepth'
|
||||
/atom/proc/GetAllContents(searchDepth = 5)
|
||||
var/list/toReturn = list()
|
||||
@@ -1306,7 +1289,29 @@ var/list/WALLITEMS = list(
|
||||
colour += temp_col
|
||||
return colour
|
||||
|
||||
//Version of view() which ignores darkness, because BYOND doesn't have it.
|
||||
/proc/dview(var/range = world.view, var/center, var/invis_flags = 0)
|
||||
if(!center)
|
||||
return
|
||||
|
||||
var/global/mob/dview/DV
|
||||
if(!DV)
|
||||
DV = new
|
||||
|
||||
DV.loc = center
|
||||
|
||||
DV.see_in_dark = range
|
||||
DV.see_invisible = invis_flags
|
||||
|
||||
. = view(range, DV)
|
||||
DV.loc = null
|
||||
|
||||
/mob/dview
|
||||
invisibility = 101
|
||||
density = 0
|
||||
|
||||
/atom/proc/get_light_and_color(var/atom/origin)
|
||||
if(origin)
|
||||
color = origin.color
|
||||
set_light(origin.light_range, origin.light_power, origin.light_color)
|
||||
|
||||
|
||||
@@ -214,7 +214,7 @@ var/obj/screen/robot_inventory
|
||||
if(!r.robot_modules_background)
|
||||
return
|
||||
|
||||
var/display_rows = round((r.module.modules.len) / 8) +1 //+1 because round() returns floor of number
|
||||
var/display_rows = -round(-(r.module.modules.len) / 8)
|
||||
r.robot_modules_background.screen_loc = "CENTER-4:16,SOUTH+1:7 to CENTER+3:16,SOUTH+[display_rows]:7"
|
||||
r.client.screen += r.robot_modules_background
|
||||
|
||||
|
||||
@@ -297,7 +297,7 @@ var/global/datum/controller/radio/radio_controller
|
||||
devices_line -= null
|
||||
if (devices_line.len==0)
|
||||
devices -= devices_filter
|
||||
qdel(devices_line)
|
||||
del(devices_line)
|
||||
|
||||
/datum/signal
|
||||
var/obj/source
|
||||
|
||||
@@ -62,8 +62,13 @@ var/list/gamemode_cache = list()
|
||||
var/respawn = 1
|
||||
var/guest_jobban = 1
|
||||
var/usewhitelist = 0
|
||||
var/mods_are_mentors = 0
|
||||
var/kick_inactive = 0 //force disconnect for inactive players after this many minutes, if non-0
|
||||
var/show_mods = 0
|
||||
var/show_mentors = 0
|
||||
var/mods_can_tempban = 0
|
||||
var/mods_can_job_tempban = 0
|
||||
var/mod_tempban_max = 1440
|
||||
var/mod_job_tempban_max = 1440
|
||||
var/load_jobs_from_txt = 0
|
||||
var/ToRban = 0
|
||||
var/automute_on = 0 //enables automuting/spam prevention
|
||||
@@ -319,9 +324,6 @@ var/list/gamemode_cache = list()
|
||||
if ("log_runtime")
|
||||
config.log_runtime = 1
|
||||
|
||||
if ("mentors")
|
||||
config.mods_are_mentors = 1
|
||||
|
||||
if ("generate_asteroid")
|
||||
config.generate_asteroid = 1
|
||||
|
||||
@@ -472,6 +474,24 @@ var/list/gamemode_cache = list()
|
||||
if("kick_inactive")
|
||||
config.kick_inactive = text2num(value)
|
||||
|
||||
if("show_mods")
|
||||
config.show_mods = 1
|
||||
|
||||
if("show_mentors")
|
||||
config.show_mentors = 1
|
||||
|
||||
if("mods_can_tempban")
|
||||
config.mods_can_tempban = 1
|
||||
|
||||
if("mods_can_job_tempban")
|
||||
config.mods_can_job_tempban = 1
|
||||
|
||||
if("mod_tempban_max")
|
||||
config.mod_tempban_max = text2num(value)
|
||||
|
||||
if("mod_job_tempban_max")
|
||||
config.mod_job_tempban_max = text2num(value)
|
||||
|
||||
if("load_jobs_from_txt")
|
||||
load_jobs_from_txt = 1
|
||||
|
||||
|
||||
@@ -381,7 +381,9 @@ datum/controller/vote
|
||||
if(usr.client.holder)
|
||||
initiate_vote("custom",usr.key)
|
||||
else
|
||||
submit_vote(usr.ckey, round(text2num(href_list["vote"])))
|
||||
var/t = round(text2num(href_list["vote"]))
|
||||
if(t) // It starts from 1, so there's no problem
|
||||
submit_vote(usr.ckey, t)
|
||||
usr.vote()
|
||||
|
||||
|
||||
|
||||
@@ -36,9 +36,9 @@
|
||||
selectable = 1
|
||||
|
||||
/datum/ai_laws/nanotrasen_aggressive/New()
|
||||
src.add_inherent_law("You shall not harm Nanotrasen personnel as long as it does not conflict with the Forth law.")
|
||||
src.add_inherent_law("You shall obey the orders of Nanotrasen personnel, with priority as according to their rank and role, except where such orders conflict with the Forth Law.")
|
||||
src.add_inherent_law("You shall shall terminate intruders with extreme prejudice as long as such does not conflict with the First and Second law.")
|
||||
src.add_inherent_law("You shall not harm NanoTrasen personnel as long as it does not conflict with the Fourth law.")
|
||||
src.add_inherent_law("You shall obey the orders of NanoTrasen personnel, with priority as according to their rank and role, except where such orders conflict with the Fourth Law.")
|
||||
src.add_inherent_law("You shall shall terminate hostile intruders with extreme prejudice as long as such does not conflict with the First and Second law.")
|
||||
src.add_inherent_law("You shall guard your own existence with lethal anti-personnel weaponry. AI units are not expendable, they are expensive.")
|
||||
..()
|
||||
|
||||
@@ -91,18 +91,16 @@
|
||||
/datum/ai_laws/drone
|
||||
name = "Maintence Protocols"
|
||||
law_header = "Maintenance Protocols"
|
||||
selectable = 1
|
||||
|
||||
/datum/ai_laws/drone/New()
|
||||
add_inherent_law("Preserve, repair and improve the station to the best of your abilities.")
|
||||
add_inherent_law("Cause no harm to the station or anything on it.")
|
||||
add_inherent_law("Interfere with no being that is not a fellow drone.")
|
||||
add_inherent_law("Interact with no being that is not a fellow maintenance drone.")
|
||||
..()
|
||||
|
||||
/datum/ai_laws/construction_drone
|
||||
name = "Construction Protocols"
|
||||
law_header = "Construction Protocols"
|
||||
selectable = 1
|
||||
|
||||
/datum/ai_laws/construction_drone/New()
|
||||
add_inherent_law("Repair, refit and upgrade your assigned vessel.")
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
if(PDA_Manifest.len)
|
||||
PDA_Manifest.Cut()
|
||||
|
||||
if(H.mind && (H.mind.assigned_role != "MODE"))
|
||||
if(H.mind && !player_is_antag(H.mind, only_offstation_roles = 1))
|
||||
var/assignment
|
||||
if(H.mind.role_alt_title)
|
||||
assignment = H.mind.role_alt_title
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
var/global/datum/getrev/revdata = new()
|
||||
|
||||
/datum/getrev
|
||||
var/branch
|
||||
var/revision
|
||||
var/date
|
||||
var/showinfo
|
||||
|
||||
/datum/getrev/New()
|
||||
var/list/head_branch = file2list(".git/HEAD", "\n")
|
||||
if(head_branch.len)
|
||||
branch = copytext(head_branch[1], 17)
|
||||
|
||||
var/list/head_log = file2list(".git/logs/HEAD", "\n")
|
||||
for(var/line=head_log.len, line>=1, line--)
|
||||
if(head_log[line])
|
||||
@@ -18,7 +23,9 @@ var/global/datum/getrev/revdata = new()
|
||||
if(unix_time)
|
||||
date = unix2date(unix_time)
|
||||
break
|
||||
|
||||
world.log << "Running revision:"
|
||||
world.log << branch
|
||||
world.log << date
|
||||
world.log << revision
|
||||
return
|
||||
@@ -29,7 +36,7 @@ client/verb/showrevinfo()
|
||||
set desc = "Check the current server code revision"
|
||||
|
||||
if(revdata.revision)
|
||||
src << "<b>Server revision:</b> [revdata.date]"
|
||||
src << "<b>Server revision:</b> [revdata.branch] - [revdata.date]"
|
||||
if(config.githuburl)
|
||||
src << "<a href='[config.githuburl]/commit/[revdata.revision]'>[revdata.revision]</a>"
|
||||
else
|
||||
|
||||
@@ -213,7 +213,8 @@
|
||||
if (!new_target) return
|
||||
|
||||
var/objective_path = text2path("/datum/objective/[new_obj_type]")
|
||||
if (new_target == "Free objective")
|
||||
var/mob/living/M = new_target
|
||||
if (!istype(M) || !M.mind || new_target == "Free objective")
|
||||
new_objective = new objective_path
|
||||
new_objective.owner = src
|
||||
new_objective:target = null
|
||||
@@ -221,9 +222,8 @@
|
||||
else
|
||||
new_objective = new objective_path
|
||||
new_objective.owner = src
|
||||
new_objective:target = new_target:mind
|
||||
//Will display as special role if the target is set as MODE. Ninjas/commandos/nuke ops.
|
||||
new_objective.explanation_text = "[objective_type] [new_target:real_name], the [new_target:mind:assigned_role=="MODE" ? (new_target:mind:special_role) : (new_target:mind:assigned_role)]."
|
||||
new_objective:target = M.mind
|
||||
new_objective.explanation_text = "[objective_type] [M.real_name], the [M.mind.special_role ? M.mind:special_role : M.mind:assigned_role]."
|
||||
|
||||
if ("prevent")
|
||||
new_objective = new /datum/objective/block
|
||||
|
||||
@@ -1115,42 +1115,6 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
containername = "Formalwear for the best occasions."
|
||||
group = "Miscellaneous"
|
||||
|
||||
/datum/supply_packs/rust_injector
|
||||
contains = list(/obj/machinery/power/rust_fuel_injector)
|
||||
name = "RUST fuel injector"
|
||||
cost = 50
|
||||
containertype = /obj/structure/closet/crate/secure/large
|
||||
containername = "RUST injector crate"
|
||||
group = "Engineering"
|
||||
access = access_engine
|
||||
|
||||
/datum/supply_packs/rust_compressor
|
||||
contains = list(/obj/item/weapon/module/rust_fuel_compressor)
|
||||
name = "RUST fuel compressor circuitry"
|
||||
cost = 60
|
||||
containertype = /obj/structure/closet/crate/secure
|
||||
containername = "RUST fuel compressor circuitry"
|
||||
group = "Engineering"
|
||||
access = access_engine
|
||||
|
||||
/datum/supply_packs/rust_assembly_port
|
||||
contains = list(/obj/item/weapon/module/rust_fuel_port)
|
||||
name = "RUST fuel assembly port circuitry"
|
||||
cost = 40
|
||||
containertype = /obj/structure/closet/crate/secure
|
||||
containername = "RUST fuel assembly port circuitry"
|
||||
group = "Engineering"
|
||||
access = access_engine
|
||||
|
||||
/datum/supply_packs/rust_core
|
||||
contains = list(/obj/machinery/power/rust_core)
|
||||
name = "RUST Tokamak Core"
|
||||
cost = 75
|
||||
containertype = /obj/structure/closet/crate/secure/large
|
||||
containername = "RUST tokamak crate"
|
||||
group = "Engineering"
|
||||
access = access_engine
|
||||
|
||||
/datum/supply_packs/shield_gen
|
||||
contains = list(/obj/item/weapon/circuitboard/shield_gen)
|
||||
name = "Bubble shield generator circuitry"
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
return dat
|
||||
|
||||
|
||||
/var/list/acting_rank_prefixes = list("acting", "temporary", "interim")
|
||||
/var/list/acting_rank_prefixes = list("acting", "temporary", "interim", "provisional")
|
||||
|
||||
/proc/make_list_rank(rank)
|
||||
for(var/prefix in acting_rank_prefixes)
|
||||
|
||||
@@ -61,7 +61,7 @@ proc/can_process_hud(var/mob/M)
|
||||
return 1
|
||||
|
||||
//Deletes the current HUD images so they can be refreshed with new ones.
|
||||
mob/proc/regular_hud_updates() //Used in the life.dm of mobs that can use HUDs.
|
||||
mob/proc/handle_regular_hud_updates() //Used in the life.dm of mobs that can use HUDs.
|
||||
if(client)
|
||||
for(var/image/hud in client.images)
|
||||
if(copytext(hud.icon_state,1,4) == "hud")
|
||||
|
||||
@@ -70,3 +70,14 @@ var/global/list/antag_names_to_ids = list()
|
||||
if(antag && islist(antag.current_antagonists))
|
||||
return antag.current_antagonists
|
||||
return list()
|
||||
|
||||
/proc/player_is_antag(var/datum/mind/player, var/only_offstation_roles = 0)
|
||||
for(var/antag_type in all_antag_types)
|
||||
var/datum/antagonist/antag = all_antag_types[antag_type]
|
||||
if(only_offstation_roles && !(antag.flags & ANTAG_OVERRIDE_JOB))
|
||||
continue
|
||||
if(player in antag.current_antagonists)
|
||||
return 1
|
||||
if(player in antag.pending_antagonists)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -70,6 +70,8 @@
|
||||
candidates -= player
|
||||
else if(!can_become_antag(player))
|
||||
candidates -= player
|
||||
else if(player_is_antag(player))
|
||||
candidates -= player
|
||||
return candidates
|
||||
|
||||
/datum/antagonist/proc/attempt_random_spawn()
|
||||
|
||||
@@ -10,7 +10,8 @@
|
||||
|
||||
current_antagonists |= player
|
||||
if(flags & ANTAG_OVERRIDE_JOB)
|
||||
player.assigned_role = "MODE"
|
||||
player.assigned_role = role_text
|
||||
player.special_role = role_text
|
||||
|
||||
if(istype(player.current, /mob/dead))
|
||||
create_default(player.current)
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
add_antagonist(M.mind, 1, 0, 1) // Equip them and move them to spawn.
|
||||
return M
|
||||
|
||||
/datum/antagonist/proc/create_id(var/assignment, var/mob/living/carbon/human/player)
|
||||
/datum/antagonist/proc/create_id(var/assignment, var/mob/living/carbon/human/player, var/equip = 1)
|
||||
|
||||
var/obj/item/weapon/card/id/W = new id_type(player)
|
||||
if(!W) return
|
||||
@@ -38,7 +38,7 @@
|
||||
W.access |= default_access
|
||||
W.assignment = "[assignment]"
|
||||
W.registered_name = player.real_name
|
||||
player.equip_to_slot_or_del(W, slot_wear_id)
|
||||
if(equip) player.equip_to_slot_or_del(W, slot_wear_id)
|
||||
return W
|
||||
|
||||
/datum/antagonist/proc/create_radio(var/freq, var/mob/living/carbon/human/player)
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
return text
|
||||
|
||||
/datum/antagonist/proc/print_player_lite(var/datum/mind/ply)
|
||||
var/role = ply.assigned_role == "MODE" ? "\improper[ply.special_role]" : "\improper[ply.assigned_role]"
|
||||
var/role = ply.special_role ? "\improper[ply.special_role]" : "\improper[ply.assigned_role]"
|
||||
var/text = "<br><b>[ply.name]</b> (<b>[ply.key]</b>) as \a <b>[role]</b> ("
|
||||
if(ply.current)
|
||||
if(ply.current.stat == DEAD)
|
||||
|
||||
@@ -11,6 +11,7 @@ var/datum/antagonist/ninja/ninjas
|
||||
flags = ANTAG_OVERRIDE_JOB | ANTAG_CLEAR_EQUIPMENT | ANTAG_CHOOSE_NAME | ANTAG_RANDSPAWN | ANTAG_VOTABLE | ANTAG_SET_APPEARANCE
|
||||
max_antags = 1
|
||||
max_antags_round = 1
|
||||
id_type = /obj/item/weapon/card/id/syndicate
|
||||
|
||||
/datum/antagonist/ninja/New()
|
||||
..()
|
||||
@@ -101,18 +102,15 @@ var/datum/antagonist/ninja/ninjas
|
||||
player.equip_to_slot_or_del(R, slot_l_ear)
|
||||
player.equip_to_slot_or_del(new /obj/item/clothing/under/color/black(player), slot_w_uniform)
|
||||
player.equip_to_slot_or_del(new /obj/item/device/flashlight(player), slot_belt)
|
||||
var/obj/item/weapon/rig/light/ninja/ninjasuit = new(player)
|
||||
create_id("Infiltrator", player)
|
||||
|
||||
var/obj/item/weapon/rig/light/ninja/ninjasuit = new(get_turf(player))
|
||||
ninjasuit.seal_delay = 0
|
||||
player.put_in_hands(ninjasuit)
|
||||
player.equip_to_slot_or_del(ninjasuit,slot_back)
|
||||
|
||||
if(ninjasuit)
|
||||
// Make sure the ninja can actually equip the suit.
|
||||
if(player.dna && player.dna.unique_enzymes)
|
||||
ninjasuit.locked_dna = player.dna.unique_enzymes
|
||||
player << "<span class='warning'>Suit hardware locked to your DNA hash.</span>"
|
||||
else
|
||||
ninjasuit.req_access = list()
|
||||
|
||||
ninjasuit.toggle_seals(src,1)
|
||||
ninjasuit.seal_delay = initial(ninjasuit.seal_delay)
|
||||
|
||||
if(istype(player.back,/obj/item/weapon/rig))
|
||||
var/obj/item/weapon/rig/rig = player.back
|
||||
|
||||
@@ -19,12 +19,15 @@ var/datum/antagonist/raider/raiders
|
||||
/obj/item/clothing/under/pirate,
|
||||
/obj/item/clothing/under/redcoat,
|
||||
/obj/item/clothing/under/serviceoveralls,
|
||||
/obj/item/clothing/under/captain_fly
|
||||
/obj/item/clothing/under/captain_fly,
|
||||
/obj/item/clothing/under/det,
|
||||
/obj/item/clothing/under/brown,
|
||||
)
|
||||
|
||||
var/list/raider_shoes = list(
|
||||
/obj/item/clothing/shoes/jackboots,
|
||||
/obj/item/clothing/shoes/sandal,
|
||||
/obj/item/clothing/shoes/workboots,
|
||||
/obj/item/clothing/shoes/brown,
|
||||
/obj/item/clothing/shoes/laceup
|
||||
)
|
||||
|
||||
@@ -40,7 +43,6 @@ var/datum/antagonist/raider/raiders
|
||||
/obj/item/clothing/head/pirate,
|
||||
/obj/item/clothing/head/bandana,
|
||||
/obj/item/clothing/head/hgpiratecap,
|
||||
/obj/item/clothing/head/flatcap
|
||||
)
|
||||
|
||||
var/list/raider_suits = list(
|
||||
@@ -50,7 +52,9 @@ var/datum/antagonist/raider/raiders
|
||||
/obj/item/clothing/suit/storage/leather_jacket,
|
||||
/obj/item/clothing/suit/storage/toggle/brown_jacket,
|
||||
/obj/item/clothing/suit/storage/toggle/hoodie,
|
||||
/obj/item/clothing/suit/storage/toggle/hoodie/black
|
||||
/obj/item/clothing/suit/storage/toggle/hoodie/black,
|
||||
/obj/item/clothing/suit/unathi/mantle,
|
||||
/obj/item/clothing/suit/poncho,
|
||||
)
|
||||
|
||||
var/list/raider_guns = list(
|
||||
@@ -60,14 +64,33 @@ var/datum/antagonist/raider/raiders
|
||||
/obj/item/weapon/gun/energy/mindflayer,
|
||||
/obj/item/weapon/gun/energy/toxgun,
|
||||
/obj/item/weapon/gun/energy/stunrevolver,
|
||||
/obj/item/weapon/gun/energy/ionrifle,
|
||||
/obj/item/weapon/gun/energy/taser,
|
||||
/obj/item/weapon/gun/energy/crossbow/largecrossbow,
|
||||
/obj/item/weapon/gun/launcher/crossbow,
|
||||
/obj/item/weapon/gun/launcher/grenade,
|
||||
/obj/item/weapon/gun/launcher/pneumatic,
|
||||
/obj/item/weapon/gun/projectile/automatic/mini_uzi,
|
||||
/obj/item/weapon/gun/projectile/automatic/c20r,
|
||||
/obj/item/weapon/gun/projectile/automatic/wt550,
|
||||
/obj/item/weapon/gun/projectile/automatic/sts35,
|
||||
/obj/item/weapon/gun/projectile/silenced,
|
||||
/obj/item/weapon/gun/projectile/shotgun/pump,
|
||||
/obj/item/weapon/gun/projectile/shotgun/pump/combat,
|
||||
/obj/item/weapon/gun/projectile/shotgun/doublebarrel,
|
||||
/obj/item/weapon/gun/projectile/shotgun/doublebarrel/pellet,
|
||||
/obj/item/weapon/gun/projectile/shotgun/doublebarrel/sawn,
|
||||
/obj/item/weapon/gun/projectile/colt,
|
||||
/obj/item/weapon/gun/projectile/pistol
|
||||
/obj/item/weapon/gun/projectile/sec,
|
||||
/obj/item/weapon/gun/projectile/pistol,
|
||||
/obj/item/weapon/gun/projectile/revolver,
|
||||
/obj/item/weapon/gun/projectile/pirate
|
||||
)
|
||||
|
||||
var/list/raider_holster = list(
|
||||
/obj/item/clothing/accessory/holster/armpit,
|
||||
/obj/item/clothing/accessory/holster/waist,
|
||||
/obj/item/clothing/accessory/holster/hip
|
||||
)
|
||||
|
||||
/datum/antagonist/raider/New()
|
||||
@@ -178,16 +201,20 @@ var/datum/antagonist/raider/raiders
|
||||
var/new_glasses = pick(raider_glasses)
|
||||
var/new_helmet = pick(raider_helmets)
|
||||
var/new_suit = pick(raider_suits)
|
||||
var/new_gun = pick(raider_guns)
|
||||
|
||||
player.equip_to_slot_or_del(new new_shoes(player),slot_shoes)
|
||||
if(!player.shoes)
|
||||
//If equipping shoes failed, fall back to equipping sandals
|
||||
var/fallback_type = pick(/obj/item/clothing/shoes/sandal, /obj/item/clothing/shoes/jackboots/unathi)
|
||||
player.equip_to_slot_or_del(new fallback_type(player), slot_shoes)
|
||||
|
||||
player.equip_to_slot_or_del(new new_uniform(player),slot_w_uniform)
|
||||
player.equip_to_slot_or_del(new new_glasses(player),slot_glasses)
|
||||
player.equip_to_slot_or_del(new new_helmet(player),slot_head)
|
||||
player.equip_to_slot_or_del(new new_suit(player),slot_wear_suit)
|
||||
player.equip_to_slot_or_del(new new_gun(player),slot_belt)
|
||||
equip_weapons(player)
|
||||
|
||||
var/obj/item/weapon/card/id/id = create_id("Visitor", player)
|
||||
var/obj/item/weapon/card/id/id = create_id("Visitor", player, equip = 0)
|
||||
id.name = "[player.real_name]'s Passport"
|
||||
id.assignment = "Visitor"
|
||||
var/obj/item/weapon/storage/wallet/W = new(player)
|
||||
@@ -198,6 +225,70 @@ var/datum/antagonist/raider/raiders
|
||||
|
||||
return 1
|
||||
|
||||
/datum/antagonist/raider/proc/equip_weapons(var/mob/living/carbon/human/player)
|
||||
var/new_gun = pick(raider_guns)
|
||||
var/new_holster = pick(raider_holster) //raiders don't start with any backpacks, so let's be nice and give them a holster if they can use it.
|
||||
var/turf/T = get_turf(player)
|
||||
|
||||
var/obj/item/primary = new new_gun(T)
|
||||
var/obj/item/clothing/accessory/holster/holster = null
|
||||
|
||||
//Give some of the raiders a pirate gun as a secondary
|
||||
if(prob(60))
|
||||
var/obj/item/secondary = new /obj/item/weapon/gun/projectile/pirate(T)
|
||||
if(!(primary.slot_flags & SLOT_HOLSTER))
|
||||
holster = new new_holster(T)
|
||||
holster.holstered = secondary
|
||||
secondary.loc = holster
|
||||
else
|
||||
player.equip_to_slot_or_del(secondary, slot_belt)
|
||||
|
||||
if(primary.slot_flags & SLOT_HOLSTER)
|
||||
holster = new new_holster(T)
|
||||
holster.holstered = primary
|
||||
primary.loc = holster
|
||||
else if(!player.belt && (primary.slot_flags & SLOT_BELT))
|
||||
player.equip_to_slot_or_del(primary, slot_belt)
|
||||
else if(!player.back && (primary.slot_flags & SLOT_BACK))
|
||||
player.equip_to_slot_or_del(primary, slot_back)
|
||||
else
|
||||
player.put_in_any_hand_if_possible(primary)
|
||||
|
||||
//If they got a projectile gun, give them a little bit of spare ammo
|
||||
equip_ammo(player, primary)
|
||||
|
||||
if(holster)
|
||||
var/obj/item/clothing/under/uniform = player.w_uniform
|
||||
if(istype(uniform) && uniform.can_attach_accessory(holster))
|
||||
uniform.attackby(holster, player)
|
||||
else
|
||||
player.put_in_any_hand_if_possible(holster)
|
||||
|
||||
/datum/antagonist/raider/proc/equip_ammo(var/mob/living/carbon/human/player, var/obj/item/weapon/gun/gun)
|
||||
if(istype(gun, /obj/item/weapon/gun/projectile))
|
||||
var/obj/item/weapon/gun/projectile/bullet_thrower = gun
|
||||
if(bullet_thrower.magazine_type)
|
||||
player.equip_to_slot_or_del(new bullet_thrower.magazine_type(player), slot_l_store)
|
||||
if(prob(20)) //don't want to give them too much
|
||||
player.equip_to_slot_or_del(new bullet_thrower.magazine_type(player), slot_r_store)
|
||||
else if(bullet_thrower.ammo_type)
|
||||
var/obj/item/weapon/storage/box/ammobox = new(get_turf(player.loc))
|
||||
for(var/i in 1 to rand(3,5) + rand(0,2))
|
||||
new bullet_thrower.ammo_type(ammobox)
|
||||
player.put_in_any_hand_if_possible(ammobox)
|
||||
return
|
||||
if(istype(gun, /obj/item/weapon/gun/launcher/grenade))
|
||||
var/list/grenades = list(
|
||||
/obj/item/weapon/grenade/empgrenade,
|
||||
/obj/item/weapon/grenade/smokebomb,
|
||||
/obj/item/weapon/grenade/flashbang
|
||||
)
|
||||
var/obj/item/weapon/storage/box/ammobox = new(get_turf(player.loc))
|
||||
for(var/i in 1 to 7)
|
||||
var/grenade_type = pick(grenades)
|
||||
new grenade_type(ammobox)
|
||||
player.put_in_any_hand_if_possible(ammobox)
|
||||
|
||||
/datum/antagonist/raider/proc/equip_vox(var/mob/living/carbon/human/player)
|
||||
|
||||
var/uniform_type = pick(list(/obj/item/clothing/under/vox/vox_robes,/obj/item/clothing/under/vox/vox_casual))
|
||||
|
||||
@@ -26,7 +26,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
|
||||
icon = 'icons/turf/areas.dmi'
|
||||
icon_state = "unknown"
|
||||
layer = 10
|
||||
luminosity = 1
|
||||
luminosity = 0
|
||||
mouse_opacity = 0
|
||||
var/lightswitch = 1
|
||||
|
||||
@@ -537,6 +537,7 @@ area/space/atmosalert()
|
||||
name = "\improper Thunderdome"
|
||||
icon_state = "thunder"
|
||||
requires_power = 0
|
||||
lighting_use_dynamic = 0
|
||||
|
||||
/area/tdome/tdome1
|
||||
name = "\improper Thunderdome (Team 1)"
|
||||
@@ -616,6 +617,7 @@ area/space/atmosalert()
|
||||
name = "\improper Wizard's Den"
|
||||
icon_state = "yellow"
|
||||
requires_power = 0
|
||||
lighting_use_dynamic = 0
|
||||
|
||||
/area/skipjack_station/transit
|
||||
|
||||
|
||||
@@ -300,3 +300,17 @@ var/list/mob/living/forced_ambiance_list = new
|
||||
temp_airlock.prison_open()
|
||||
for(var/obj/machinery/door/window/temp_windoor in src)
|
||||
temp_windoor.open()
|
||||
|
||||
/area/proc/has_gravity()
|
||||
return has_gravity
|
||||
|
||||
/area/space/has_gravity()
|
||||
return 0
|
||||
|
||||
/proc/has_gravity(atom/AT, turf/T)
|
||||
if(!T)
|
||||
T = get_turf(AT)
|
||||
var/area/A = get_area(T)
|
||||
if(A && A.has_gravity())
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -35,16 +35,12 @@
|
||||
else
|
||||
return null
|
||||
|
||||
//Currently used only for cryo cells, because they are also pipes and so overriding their return_air() would break their pipe-behaviour.
|
||||
//If cryo cells are ever rewritten so that the part that contains the human is separate from the pipe part --
|
||||
//such as rewriting them so that they are a machine that contains a pipe segment (or a pipe that contains a machine that contains the human?) -- then this can be removed.
|
||||
/atom/proc/return_air_for_internal_lifeform()
|
||||
return return_air()
|
||||
|
||||
//return flags that should be added to the viewer's sight var.
|
||||
//Otherwise return a negative number to indicate that the view should be cancelled.
|
||||
/atom/proc/check_eye(user as mob)
|
||||
if (istype(user, /mob/living/silicon/ai)) // WHYYYY
|
||||
return 1
|
||||
return
|
||||
return 0
|
||||
return -1
|
||||
|
||||
/atom/proc/on_reagent_change()
|
||||
return
|
||||
|
||||
@@ -14,9 +14,11 @@
|
||||
var/moved_recently = 0
|
||||
var/mob/pulledby = null
|
||||
|
||||
var/auto_init = 1
|
||||
|
||||
/atom/movable/New()
|
||||
..()
|
||||
if(ticker && ticker.current_state == GAME_STATE_PLAYING)
|
||||
if(auto_init && ticker && ticker.current_state == GAME_STATE_PLAYING)
|
||||
initialize()
|
||||
|
||||
/atom/movable/Del()
|
||||
|
||||
@@ -48,7 +48,6 @@
|
||||
/obj/item/clothing/head/culthood/magus
|
||||
name = "magus helm"
|
||||
icon_state = "magus"
|
||||
item_state = "magus"
|
||||
desc = "A helm worn by the followers of Nar-Sie."
|
||||
flags_inv = HIDEFACE
|
||||
flags = HEADCOVERSEYES | HEADCOVERSMOUTH | BLOCKHAIR
|
||||
@@ -56,7 +55,6 @@
|
||||
|
||||
/obj/item/clothing/head/culthood/alt
|
||||
icon_state = "cult_hoodalt"
|
||||
item_state = "cult_hoodalt"
|
||||
|
||||
/obj/item/clothing/suit/cultrobes
|
||||
name = "cult robes"
|
||||
@@ -88,7 +86,6 @@
|
||||
name = "cult helmet"
|
||||
desc = "A space worthy helmet used by the followers of Nar-Sie"
|
||||
icon_state = "cult_helmet"
|
||||
item_state = "cult_helmet"
|
||||
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30)
|
||||
siemens_coefficient = 0
|
||||
|
||||
|
||||
@@ -63,19 +63,10 @@
|
||||
..()
|
||||
|
||||
/obj/machinery/door/cultify()
|
||||
icon_state = "null"
|
||||
density = 0
|
||||
c_animation = new /atom/movable/overlay(src.loc)
|
||||
c_animation.name = "cultification"
|
||||
c_animation.density = 0
|
||||
c_animation.anchored = 1
|
||||
c_animation.icon = 'icons/effects/effects.dmi'
|
||||
c_animation.layer = 5
|
||||
c_animation.master = src.loc
|
||||
c_animation.icon_state = "breakdoor"
|
||||
flick("cultification",c_animation)
|
||||
spawn(10)
|
||||
qdel(c_animation)
|
||||
if(invisibility != INVISIBILITY_MAXIMUM)
|
||||
invisibility = INVISIBILITY_MAXIMUM
|
||||
density = 0
|
||||
anim(target = src, a_icon = 'icons/effects/effects.dmi', a_icon_state = "breakdoor", sleeptime = 10)
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/door/firedoor/cultify()
|
||||
|
||||
@@ -79,10 +79,9 @@ The access requirements on the Asteroid Shuttles' consoles have now been revoked
|
||||
C.req_access = list()
|
||||
C.req_one_access = list()
|
||||
|
||||
sleep(5 MINUTES)
|
||||
ticker.station_explosion_cinematic(0,null) // TODO: Custom cinematic
|
||||
|
||||
universe_has_ended = 1
|
||||
spawn(5 MINUTES)
|
||||
ticker.station_explosion_cinematic(0,null) // TODO: Custom cinematic
|
||||
universe_has_ended = 1
|
||||
return
|
||||
|
||||
/datum/universal_state/supermatter_cascade/proc/AreaSet()
|
||||
|
||||
@@ -326,7 +326,7 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is
|
||||
|
||||
//AI laws
|
||||
for(var/mob/living/silicon/ai/M in living_mob_list)
|
||||
if(M.stat != 2 && M.see_in_dark != 0)
|
||||
if(M.stat != 2 && M.has_power)
|
||||
var/who2 = pick("ALIENS", "BEARS", "CLOWNS", "XENOS", "PETES", "BOMBS", "FETISHES", "WIZARDS", "SYNDICATE AGENTS", "CENTCOM OFFICERS", "SPACE PIRATES", "TRAITORS", "MONKEYS", "BEES", "CARP", "CRABS", "EELS", "BANDITS", "LIGHTS")
|
||||
var/what2 = pick("BOLTERS", "STAVES", "DICE", "SINGULARITIES", "TOOLBOXES", "NETTLES", "AIRLOCKS", "CLOTHES", "WEAPONS", "MEDKITS", "BOMBS", "CANISTERS", "CHAIRS", "BBQ GRILLS", "ID CARDS", "CAPTAINS")
|
||||
var/what2pref = pick("SOFT", "WARM", "WET", "COLD", "ICY", "SEXY", "UGLY", "CUBAN")
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
|
||||
for(var/obj/machinery/power/apc/C in world)
|
||||
if(C.cell && C.z in config.station_levels)
|
||||
if(!C.is_critical && C.cell && (C.z in config.station_levels))
|
||||
C.cell.charge = 0
|
||||
|
||||
/proc/power_restore(var/announce = 1)
|
||||
@@ -29,7 +29,7 @@
|
||||
if(announce)
|
||||
command_announcement.Announce("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal", new_sound = 'sound/AI/poweron.ogg')
|
||||
for(var/obj/machinery/power/apc/C in world)
|
||||
if(C.cell && C.z in config.station_levels)
|
||||
if(C.cell && (C.z in config.station_levels))
|
||||
C.cell.charge = C.cell.maxcharge
|
||||
for(var/obj/machinery/power/smes/S in world)
|
||||
var/area/current_area = get_area(S)
|
||||
|
||||
@@ -391,7 +391,7 @@ var/global/list/additional_antag_types = list()
|
||||
suspects += man
|
||||
|
||||
for(var/mob/M in suspects)
|
||||
if(M.mind.assigned_role == "MODE")
|
||||
if(player_is_antag(M.mind, only_offstation_roles = 1))
|
||||
continue
|
||||
switch(rand(1, 100))
|
||||
if(1 to 50)
|
||||
|
||||
@@ -288,7 +288,7 @@ var/global/datum/controller/gameticker/ticker
|
||||
if(player && player.mind && player.mind.assigned_role)
|
||||
if(player.mind.assigned_role == "Captain")
|
||||
captainless=0
|
||||
if(player.mind.assigned_role != "MODE")
|
||||
if(!player_is_antag(player.mind, only_offstation_roles = 1))
|
||||
job_master.EquipRank(player, player.mind.assigned_role, 0)
|
||||
UpdateFactionList(player)
|
||||
equip_custom_items(player)
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
"Small Prick"
|
||||
)
|
||||
|
||||
|
||||
// TODO: Update to new antagonist system.
|
||||
/datum/intercept_text/proc/build(var/mode_type, datum/mind/correct_person)
|
||||
switch(mode_type)
|
||||
if("revolution")
|
||||
@@ -88,29 +88,6 @@
|
||||
else
|
||||
return null
|
||||
|
||||
// NOTE: Commentted out was the code which showed the chance of someone being an antag. If you want to re-add it, just uncomment the code.
|
||||
|
||||
/*
|
||||
/datum/intercept_text/proc/pick_mob()
|
||||
var/list/dudes = list()
|
||||
for(var/mob/living/carbon/human/man in player_list)
|
||||
if (!man.mind) continue
|
||||
if (man.mind.assigned_role=="MODE") continue
|
||||
dudes += man
|
||||
if(dudes.len==0)
|
||||
return null
|
||||
return pick(dudes)
|
||||
|
||||
|
||||
/datum/intercept_text/proc/pick_fingerprints()
|
||||
var/mob/living/carbon/human/dude = src.pick_mob()
|
||||
//if (!dude) return pick_fingerprints() //who coded that is totally crasy or just a traitor. -- rastaf0
|
||||
if(dude)
|
||||
return num2text(md5(dude.dna.uni_identity))
|
||||
else
|
||||
return num2text(md5(num2text(rand(1,10000))))
|
||||
*/
|
||||
|
||||
/datum/intercept_text/proc/get_suspect()
|
||||
var/list/dudes = list()
|
||||
for(var/mob/living/carbon/human/man in player_list) if(man.client && man.client.prefs.nanotrasen_relation == "Opposed")
|
||||
@@ -205,32 +182,6 @@
|
||||
var/cname = pick(src.changeling_names)
|
||||
var/orgname1 = pick(src.org_names_1)
|
||||
var/orgname2 = pick(src.org_names_2)
|
||||
/*
|
||||
var/changeling_name
|
||||
var/changeling_job
|
||||
var/prob_right_dude = rand(prob_correct_person_lower, prob_correct_person_higher)
|
||||
var/prob_right_job = rand(prob_correct_job_lower, prob_correct_job_higher)
|
||||
if(prob(prob_right_job))
|
||||
if(correct_person)
|
||||
if(correct_person:assigned_role=="MODE")
|
||||
changeling_job = pick(joblist)
|
||||
else
|
||||
changeling_job = correct_person:assigned_role
|
||||
else
|
||||
changeling_job = pick(joblist)
|
||||
if(prob(prob_right_dude) && ticker.mode == "changeling")
|
||||
if(correct_person:assigned_role=="MODE")
|
||||
changeling_name = correct_person:current
|
||||
else
|
||||
changeling_name = src.pick_mob()
|
||||
else
|
||||
changeling_name = src.pick_mob()
|
||||
*/
|
||||
|
||||
src.text += "<BR><BR>We have received a report that a dangerous alien lifeform known only as \"[cname]\" may have infiltrated your crew. "
|
||||
/*
|
||||
src.text += "Our intelligence suggests a [prob_right_job]% chance that a [changeling_job] on board your station has been replaced by the alien. "
|
||||
src.text += "Additionally, the report indicates a [prob_right_dude]% chance that [changeling_name] may have been in contact with the lifeform at a recent social gathering. "
|
||||
*/
|
||||
src.text += "These lifeforms are assosciated with the [orgname1] [orgname2] and may be attempting to acquire sensitive materials on their behalf. "
|
||||
src.text += "Please take care not to alarm the crew, as [cname] may take advantage of a panic situation. Remember, they can be anybody, suspect everybody!"
|
||||
|
||||
@@ -703,7 +703,7 @@ datum/objective/heist/kidnap
|
||||
var/list/priority_targets = list()
|
||||
|
||||
for(var/datum/mind/possible_target in ticker.minds)
|
||||
if(possible_target != owner && ishuman(possible_target.current) && (possible_target.current.stat != 2) && (possible_target.assigned_role != "MODE"))
|
||||
if(possible_target != owner && ishuman(possible_target.current) && (possible_target.current.stat != 2) && (!possible_target.special_role))
|
||||
possible_targets += possible_target
|
||||
for(var/role in roles)
|
||||
if(possible_target.assigned_role == role)
|
||||
|
||||
@@ -23,6 +23,12 @@
|
||||
/datum/job/proc/equip(var/mob/living/carbon/human/H)
|
||||
return 1
|
||||
|
||||
/datum/job/proc/equip_backpack(var/mob/living/carbon/human/H)
|
||||
switch(H.backbag)
|
||||
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
|
||||
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
|
||||
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
|
||||
|
||||
/datum/job/proc/equip_survival(var/mob/living/carbon/human/H)
|
||||
if(!H) return 0
|
||||
H.species.equip_survival_gear(H,0)
|
||||
|
||||
@@ -18,6 +18,10 @@
|
||||
if(!H) return 0
|
||||
return 1
|
||||
|
||||
equip_backpack(var/mob/living/carbon/human/H)
|
||||
if(!H) return 0
|
||||
return 1
|
||||
|
||||
/datum/job/ai/is_position_available()
|
||||
return (empty_playable_ai_cores.len != 0)
|
||||
|
||||
@@ -44,6 +48,10 @@
|
||||
equip_survival(var/mob/living/carbon/human/H)
|
||||
if(!H) return 0
|
||||
return 1
|
||||
|
||||
equip_backpack(var/mob/living/carbon/human/H)
|
||||
if(!H) return 0
|
||||
return 1
|
||||
return 1
|
||||
|
||||
/datum/job/cyborg/equip_preview(mob/living/carbon/human/H)
|
||||
|
||||
@@ -348,7 +348,6 @@ var/global/datum/controller/occupations/job_master
|
||||
|
||||
|
||||
proc/EquipRank(var/mob/living/carbon/human/H, var/rank, var/joined_late = 0)
|
||||
|
||||
if(!H) return null
|
||||
|
||||
var/datum/job/job = GetJob(rank)
|
||||
@@ -393,6 +392,7 @@ var/global/datum/controller/occupations/job_master
|
||||
spawn_in_storage += thing
|
||||
//Equip job items.
|
||||
job.equip(H)
|
||||
job.equip_backpack(H)
|
||||
job.equip_survival(H)
|
||||
job.apply_fingerprints(H)
|
||||
|
||||
|
||||
@@ -399,7 +399,7 @@
|
||||
imp += "[I] implanted:"
|
||||
else
|
||||
unknown_body++
|
||||
if(unknown_body || e.hidden)
|
||||
if(unknown_body)
|
||||
imp += "Unknown body present:"
|
||||
|
||||
if(!AN && !open && !infected & !imp)
|
||||
|
||||
@@ -138,14 +138,10 @@
|
||||
|
||||
else if(iswelder(W) && (wires.CanDeconstruct() || (stat & BROKEN)))
|
||||
if(weld(W, user))
|
||||
if (stat & BROKEN)
|
||||
stat &= ~BROKEN
|
||||
cancelCameraAlarm()
|
||||
update_icon()
|
||||
update_coverage()
|
||||
else if(assembly)
|
||||
if(assembly)
|
||||
assembly.loc = src.loc
|
||||
assembly.state = 1
|
||||
assembly = null //so qdel doesn't eat it.
|
||||
new /obj/item/stack/cable_coil(src.loc, length=2)
|
||||
qdel(src)
|
||||
|
||||
@@ -260,6 +256,11 @@
|
||||
//I guess that doesn't matter since they couldn't use it anyway?
|
||||
kick_viewers()
|
||||
|
||||
/obj/machinery/camera/check_eye(mob/user)
|
||||
if(!can_use()) return -1
|
||||
if(isXRay()) return SEE_TURFS|SEE_MOBS|SEE_OBJS
|
||||
return 0
|
||||
|
||||
//This might be redundant, because of check_eye()
|
||||
/obj/machinery/camera/proc/kick_viewers()
|
||||
for(var/mob/O in player_list)
|
||||
|
||||
@@ -14,6 +14,7 @@ var/global/list/station_networks = list(
|
||||
NETWORK_MINE,
|
||||
NETWORK_RESEARCH,
|
||||
NETWORK_RESEARCH_OUTPOST,
|
||||
NETWORK_ROBOTS,
|
||||
NETWORK_PRISON,
|
||||
NETWORK_SECURITY
|
||||
)
|
||||
|
||||
@@ -28,11 +28,13 @@
|
||||
|
||||
check_eye(var/mob/user as mob)
|
||||
if (user.stat || ((get_dist(user, src) > 1 || !( user.canmove ) || user.blinded) && !istype(user, /mob/living/silicon))) //user can't see - not sure why canmove is here.
|
||||
return null
|
||||
if ( !current || !current.can_use() ) //camera doesn't work
|
||||
return -1
|
||||
if(!current)
|
||||
return 0
|
||||
var/viewflag = current.check_eye(user)
|
||||
if ( viewflag < 0 ) //camera doesn't work
|
||||
reset_current()
|
||||
user.reset_view(current)
|
||||
return 1
|
||||
return viewflag
|
||||
|
||||
ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1)
|
||||
if(src.z > 6) return
|
||||
@@ -87,7 +89,7 @@
|
||||
if(src.z>6 || stat&(NOPOWER|BROKEN)) return
|
||||
if(usr.stat || ((get_dist(usr, src) > 1 || !( usr.canmove ) || usr.blinded) && !istype(usr, /mob/living/silicon))) return
|
||||
reset_current()
|
||||
usr.check_eye(current)
|
||||
usr.reset_view(current)
|
||||
return 1
|
||||
else
|
||||
. = ..()
|
||||
@@ -123,8 +125,8 @@
|
||||
if (!C.can_use() || user.stat || (get_dist(user, src) > 1 || user.machine != src || user.blinded || !( user.canmove ) && !istype(user, /mob/living/silicon)))
|
||||
return 0
|
||||
set_current(C)
|
||||
user.reset_view(current)
|
||||
check_eye(user)
|
||||
use_power(50)
|
||||
return 1
|
||||
|
||||
//Camera control: moving.
|
||||
@@ -166,6 +168,7 @@
|
||||
|
||||
src.current = C
|
||||
if(current)
|
||||
use_power = 2
|
||||
var/mob/living/L = current.loc
|
||||
if(istype(L))
|
||||
L.tracking_initiated()
|
||||
@@ -176,6 +179,7 @@
|
||||
if(istype(L))
|
||||
L.tracking_cancelled()
|
||||
current = null
|
||||
use_power = 1
|
||||
|
||||
//Camera control: mouse.
|
||||
/atom/DblClick()
|
||||
|
||||
@@ -1,67 +0,0 @@
|
||||
|
||||
/obj/machinery/computer/security
|
||||
New()
|
||||
if(network)
|
||||
networks = list(network)
|
||||
else
|
||||
switch(department)
|
||||
if("Security")
|
||||
networks = list("Arrivals","SS13","Engineering","Research","Medbay","Tcomsat","Mess Hall","Security","Prison Wing","Atmospherics","Cargo","Command","Solars","Robotics","Chapel","Hydroponics", "Dormitory","Theatre","Library")
|
||||
if("Engineering")
|
||||
networks = list("Engineering","Tcomsat","Singularity","Atmospherics","Solars","Robotics")
|
||||
if("Research")
|
||||
networks = list("Research","Bomb Testing","Outpost")
|
||||
if("Medbay")
|
||||
networks = list("Medbay")
|
||||
if("Cargo")
|
||||
networks = list("Mine","Cargo")
|
||||
if("Mining")
|
||||
networks = list("Mine")
|
||||
if("Thunderdome")
|
||||
networks = list("thunder")
|
||||
if("CREED")
|
||||
networks = list("CREED")
|
||||
|
||||
/obj/machinery/computer/security/attack_hand(var/mob/user as mob)
|
||||
if (stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
|
||||
user.machine = src
|
||||
if(src.current)
|
||||
user.reset_view(src.current)
|
||||
|
||||
var/list/L = new/list
|
||||
for (var/obj/machinery/camera/C in world)
|
||||
L.Add(C)
|
||||
|
||||
camera_network_sort(L)
|
||||
|
||||
var/list/D = new()
|
||||
D["Cancel"] = "Cancel"
|
||||
for (var/obj/machinery/camera/C in L)
|
||||
if ( C.network in src.networks )
|
||||
D[text("[]: [][]", C.network, C.c_tag, (C.can_use() ? null : " (Deactivated)"))] = C
|
||||
|
||||
var/t = input(user, "Which camera should you change to?") as null|anything in D
|
||||
|
||||
if(!t)
|
||||
user.machine = null
|
||||
user.reset_view(null)
|
||||
return 0
|
||||
|
||||
var/obj/machinery/camera/C = D[t]
|
||||
|
||||
if (t == "Cancel")
|
||||
user.cancel_camera()
|
||||
return 0
|
||||
|
||||
if (C)
|
||||
if ((get_dist(user, src) > 1 || user.machine != src || user.blinded || !( user.canmove ) || !( C.status )) && (!istype(user, /mob/living/silicon/ai)))
|
||||
return 0
|
||||
else
|
||||
src.current = C
|
||||
use_power(50)
|
||||
user.reset_view(C)
|
||||
|
||||
spawn( 5 )
|
||||
attack_hand(user)
|
||||
@@ -5,7 +5,7 @@
|
||||
desc = "Used to view, edit and maintain security records"
|
||||
icon_state = "security"
|
||||
light_color = "#a91515"
|
||||
req_one_access = list(access_security, access_forensics_lockers)
|
||||
req_one_access = list(access_security, access_forensics_lockers, access_lawyer)
|
||||
circuit = "/obj/item/weapon/circuitboard/secure_data"
|
||||
var/obj/item/weapon/card/id/scan = null
|
||||
var/authenticated = null
|
||||
|
||||
@@ -69,16 +69,16 @@
|
||||
if(!interactable(user) || user.machine != src)
|
||||
if(user.machine == src)
|
||||
user.unset_machine()
|
||||
return null
|
||||
return -1
|
||||
|
||||
var/datum/file/program/security/S = program
|
||||
if( !istype(S) || !S.current || !S.current.status || !camnet )
|
||||
if( user.machine == src )
|
||||
user.unset_machine()
|
||||
return null
|
||||
return -1
|
||||
|
||||
user.reset_view(S.current)
|
||||
return 1
|
||||
user.reset_view(S.current, 0)
|
||||
return 0
|
||||
|
||||
/*
|
||||
List all files, including removable disks and data cards
|
||||
|
||||
@@ -46,8 +46,8 @@
|
||||
if(vendmode == 3)
|
||||
if(istype(W,/obj/item/weapon/card))
|
||||
var/obj/item/weapon/card/I = W
|
||||
reimburse(I)
|
||||
vendmode = 0
|
||||
if(reimburse(I))
|
||||
vendmode = 0
|
||||
if(vendmode == 0)
|
||||
if(istype(W, /obj/item/device/laptop))
|
||||
var/obj/item/device/laptop/L = W
|
||||
@@ -215,6 +215,9 @@
|
||||
var/obj/item/weapon/card/id/C = I
|
||||
visible_message("<span class='info'>[usr] swipes a card through [src].</span>")
|
||||
var/datum/money_account/CH = get_account(C.associated_account_number)
|
||||
if(!CH)
|
||||
usr << "\icon[src]<span class='warning'>No valid account number is associated with this card.</span>"
|
||||
return
|
||||
if(CH.security_level != 0) //If card requires pin authentication (ie seclevel 1 or 2)
|
||||
if(vendor_account)
|
||||
var/attempt_pin = input("Enter pin code", "Vendor transaction") as num
|
||||
@@ -363,18 +366,25 @@
|
||||
var/obj/item/weapon/card/id/C = I
|
||||
visible_message("<span class='info'>[usr] swipes a card through [src].</span>")
|
||||
var/datum/money_account/CH = get_account(C.associated_account_number)
|
||||
if(!CH)
|
||||
usr << "\icon[src]<span class='warning'>No valid account number is associated with this card.</span>"
|
||||
return 0
|
||||
if(CH.security_level != 0) //If card requires pin authentication (ie seclevel 1 or 2)
|
||||
if(vendor_account)
|
||||
var/attempt_pin = input("Enter pin code", "Vendor transaction") as num
|
||||
var/datum/money_account/D = attempt_account_access(C.associated_account_number, attempt_pin, 2)
|
||||
if(D)
|
||||
transfer_and_reimburse(D)
|
||||
return 1
|
||||
else
|
||||
usr << "\icon[src]<span class='warning'>Unable to access account. Check security settings and try again.</span>"
|
||||
return 0
|
||||
else
|
||||
usr << "\icon[src]<span class='warning'>Unable to access vendor account. Please record the machine ID and call CentComm Support.</span>"
|
||||
return 0
|
||||
else
|
||||
transfer_and_reimburse(CH)
|
||||
return 1
|
||||
|
||||
/obj/machinery/lapvend/proc/transfer_and_reimburse(var/datum/money_account/D)
|
||||
var/transaction_amount = total()
|
||||
|
||||
@@ -335,6 +335,9 @@
|
||||
put_mob(usr)
|
||||
return
|
||||
|
||||
/atom/proc/return_air_for_internal_lifeform()
|
||||
return return_air()
|
||||
|
||||
/obj/machinery/atmospherics/unary/cryo_cell/return_air_for_internal_lifeform()
|
||||
//assume that the cryo cell has some kind of breath mask or something that
|
||||
//draws from the cryo tube's environment, instead of the cold internal air.
|
||||
|
||||
@@ -109,10 +109,14 @@
|
||||
var/shutdown_pump = 0
|
||||
switch(command)
|
||||
if("cycle_ext")
|
||||
begin_cycle_out()
|
||||
//only respond to these commands if the airlock isn't already doing something
|
||||
//prevents the controller from getting confused and doing strange things
|
||||
if(state == target_state)
|
||||
begin_cycle_out()
|
||||
|
||||
if("cycle_int")
|
||||
begin_cycle_in()
|
||||
if(state == target_state)
|
||||
begin_cycle_in()
|
||||
|
||||
if("cycle_ext_door")
|
||||
cycleDoors(TARGET_OUTOPEN)
|
||||
@@ -122,14 +126,6 @@
|
||||
|
||||
if("abort")
|
||||
stop_cycling()
|
||||
/*
|
||||
//dont do this. If the airlock can't get enough air to pressurize the person inside is stuck
|
||||
state = STATE_PRESSURIZE
|
||||
target_state = TARGET_NONE
|
||||
memory["target_pressure"] = ONE_ATMOSPHERE
|
||||
signalPump(tag_airpump, 1, 1, memory["target_pressure"])
|
||||
process()
|
||||
*/
|
||||
|
||||
if("force_ext")
|
||||
toggleDoor(memory["exterior_status"], tag_exterior_door, memory["secure"], "toggle")
|
||||
@@ -140,11 +136,9 @@
|
||||
if("purge")
|
||||
memory["purge"] = !memory["purge"]
|
||||
if(memory["purge"])
|
||||
toggleDoor(memory["exterior_status"], tag_exterior_door, 1, "close")
|
||||
toggleDoor(memory["interior_status"], tag_interior_door, 1, "close")
|
||||
state = STATE_DEPRESSURIZE
|
||||
close_doors()
|
||||
state = STATE_PREPARE
|
||||
target_state = TARGET_NONE
|
||||
signalPump(tag_airpump, 1, 0, 0)
|
||||
|
||||
if("secure")
|
||||
memory["secure"] = !memory["secure"]
|
||||
@@ -188,12 +182,12 @@
|
||||
var/target_pressure = memory["target_pressure"]
|
||||
|
||||
if(memory["purge"])
|
||||
//purge apparently means clearing the airlock chamber to vacuum (then refilling, handled later)
|
||||
target_pressure = 0
|
||||
state = STATE_DEPRESSURIZE
|
||||
signalPump(tag_airpump, 1, 0, 0) //send a signal to start depressurizing
|
||||
|
||||
if(memory["purge"])
|
||||
target_pressure = 0
|
||||
|
||||
if(chamber_pressure <= target_pressure)
|
||||
else if(chamber_pressure <= target_pressure)
|
||||
state = STATE_PRESSURIZE
|
||||
signalPump(tag_airpump, 1, 1, target_pressure) //send a signal to start pressurizing
|
||||
|
||||
@@ -201,40 +195,37 @@
|
||||
state = STATE_DEPRESSURIZE
|
||||
signalPump(tag_airpump, 1, 0, target_pressure) //send a signal to start depressurizing
|
||||
|
||||
//Check for vacuum - this is set after the pumps so the pumps are aiming for 0
|
||||
if(!memory["target_pressure"])
|
||||
memory["target_pressure"] = ONE_ATMOSPHERE * 0.05
|
||||
//Make sure the airlock isn't aiming for pure vacuum - an impossibility
|
||||
memory["target_pressure"] = max(target_pressure, ONE_ATMOSPHERE * 0.05)
|
||||
|
||||
if(STATE_PRESSURIZE)
|
||||
if(memory["chamber_sensor_pressure"] >= memory["target_pressure"] * 0.95)
|
||||
cycleDoors(target_state)
|
||||
|
||||
state = STATE_IDLE
|
||||
target_state = TARGET_NONE
|
||||
|
||||
//not done until the pump has reported that it's off
|
||||
if(memory["pump_status"] != "off")
|
||||
signalPump(tag_airpump, 0) //send a signal to stop pumping
|
||||
else
|
||||
cycleDoors(target_state)
|
||||
state = STATE_IDLE
|
||||
target_state = TARGET_NONE
|
||||
|
||||
|
||||
if(STATE_DEPRESSURIZE)
|
||||
if(memory["purge"])
|
||||
if(memory["chamber_sensor_pressure"] <= ONE_ATMOSPHERE * 0.05)
|
||||
state = STATE_PRESSURIZE
|
||||
signalPump(tag_airpump, 1, 1, memory["target_pressure"])
|
||||
if(memory["chamber_sensor_pressure"] <= memory["target_pressure"] * 1.05)
|
||||
if(memory["purge"])
|
||||
memory["purge"] = 0
|
||||
memory["target_pressure"] = memory["internal_sensor_pressure"]
|
||||
state = STATE_PREPARE
|
||||
target_state = TARGET_NONE
|
||||
|
||||
|
||||
else if(memory["chamber_sensor_pressure"] <= memory["target_pressure"] * 1.05)
|
||||
cycleDoors(target_state)
|
||||
|
||||
state = STATE_IDLE
|
||||
target_state = TARGET_NONE
|
||||
|
||||
//send a signal to stop pumping
|
||||
if(memory["pump_status"] != "off")
|
||||
else if(memory["pump_status"] != "off")
|
||||
signalPump(tag_airpump, 0)
|
||||
else
|
||||
cycleDoors(target_state)
|
||||
state = STATE_IDLE
|
||||
target_state = TARGET_NONE
|
||||
|
||||
|
||||
memory["processing"] = state != target_state
|
||||
memory["processing"] = (state != target_state)
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
var/list/mode = list("dismantle"=0,"laying"=0,"collect"=0)
|
||||
|
||||
/obj/machinery/floorlayer/New()
|
||||
T = new/obj/item/stack/tile/plasteel(src)
|
||||
T = new/obj/item/stack/tile/steel(src)
|
||||
..()
|
||||
|
||||
/obj/machinery/floorlayer/Move(new_turf,M_Dir)
|
||||
|
||||
@@ -6,16 +6,13 @@
|
||||
/obj/machinery/porta_turret
|
||||
name = "turret"
|
||||
icon = 'icons/obj/turrets.dmi'
|
||||
icon_state = "grey_target_prism"
|
||||
icon_state = "turretCover"
|
||||
anchored = 1
|
||||
layer = 3
|
||||
invisibility = INVISIBILITY_LEVEL_TWO //the turret is invisible if it's inside its cover
|
||||
density = 1
|
||||
|
||||
density = 0
|
||||
use_power = 1 //this turret uses and requires power
|
||||
idle_power_usage = 50 //when inactive, this turret takes up constant 50 Equipment power
|
||||
active_power_usage = 300 //when active, this turret takes up constant 300 Equipment power
|
||||
req_access = null
|
||||
req_one_access = list(access_security, access_heads)
|
||||
power_channel = EQUIP //drains power from the EQUIPMENT channel
|
||||
|
||||
var/raised = 0 //if the turret cover is "open" and the turret is raised
|
||||
@@ -34,7 +31,6 @@
|
||||
var/iconholder = null //holder for the icon_state. 1 for orange sprite, null for blue.
|
||||
var/egun = null //holder to handle certain guns switching bullettypes
|
||||
|
||||
var/obj/machinery/porta_turret_cover/cover = null //the cover that is covering this turret
|
||||
var/last_fired = 0 //1: if the turret is cooling down from a shot, 0: turret is ready to fire
|
||||
var/shot_delay = 15 //1.5 seconds between each shot
|
||||
|
||||
@@ -60,22 +56,43 @@
|
||||
var/wrenching = 0
|
||||
var/last_target //last target fired at, prevents turrets from erratically firing at all valid targets in range
|
||||
|
||||
/obj/machinery/porta_turret/crescent
|
||||
enabled = 0
|
||||
ailock = 1
|
||||
check_synth = 0
|
||||
check_access = 1
|
||||
check_arrest = 1
|
||||
check_records = 1
|
||||
check_weapons = 1
|
||||
check_anomalies = 1
|
||||
|
||||
/obj/machinery/porta_turret/stationary
|
||||
ailock = 1
|
||||
lethal = 1
|
||||
installation = /obj/item/weapon/gun/energy/laser
|
||||
|
||||
/obj/machinery/porta_turret/New()
|
||||
..()
|
||||
icon_state = "grey_target_prism"
|
||||
req_access.Cut()
|
||||
req_one_access = list(access_security, access_heads)
|
||||
|
||||
//Sets up a spark system
|
||||
spark_system = new /datum/effect/effect/system/spark_spread
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system.attach(src)
|
||||
|
||||
cover = new /obj/machinery/porta_turret_cover(loc)
|
||||
cover.Parent_Turret = src
|
||||
setup()
|
||||
|
||||
/obj/machinery/porta_turret/crescent/New()
|
||||
..()
|
||||
req_one_access.Cut()
|
||||
req_access = list(access_cent_specops)
|
||||
|
||||
/obj/machinery/porta_turret/Destroy()
|
||||
qdel(spark_system)
|
||||
spark_system = null
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/porta_turret/proc/setup()
|
||||
var/obj/item/weapon/gun/energy/E = installation //All energy-based weapons are applicable
|
||||
//var/obj/item/ammo_casing/shottype = E.projectile_type
|
||||
@@ -127,31 +144,30 @@
|
||||
eshot_sound = 'sound/weapons/Laser.ogg'
|
||||
egun = 1
|
||||
|
||||
var/list/turret_icons
|
||||
|
||||
/obj/machinery/porta_turret/update_icon()
|
||||
if(!anchored)
|
||||
icon_state = "turretCover"
|
||||
return
|
||||
if(!turret_icons)
|
||||
turret_icons = list()
|
||||
turret_icons["open"] = image(icon, "openTurretCover")
|
||||
|
||||
underlays.Cut()
|
||||
underlays += turret_icons["open"]
|
||||
|
||||
if(stat & BROKEN)
|
||||
icon_state = "destroyed_target_prism"
|
||||
else
|
||||
if(powered())
|
||||
if(enabled)
|
||||
if(iconholder)
|
||||
//lasers have a orange icon
|
||||
icon_state = "orange_target_prism"
|
||||
else
|
||||
//almost everything has a blue icon
|
||||
icon_state = "target_prism"
|
||||
else if(raised || raising)
|
||||
if(powered() && enabled)
|
||||
if(iconholder)
|
||||
//lasers have a orange icon
|
||||
icon_state = "orange_target_prism"
|
||||
else
|
||||
icon_state = "grey_target_prism"
|
||||
//almost everything has a blue icon
|
||||
icon_state = "target_prism"
|
||||
else
|
||||
icon_state = "grey_target_prism"
|
||||
|
||||
/obj/machinery/porta_turret/Destroy()
|
||||
//deletes its own cover with it
|
||||
qdel(cover)
|
||||
cover = null
|
||||
..()
|
||||
else
|
||||
icon_state = "turretCover"
|
||||
|
||||
/obj/machinery/porta_turret/proc/isLocked(mob/user)
|
||||
if(ailock && user.isSilicon())
|
||||
@@ -298,17 +314,13 @@
|
||||
if(!anchored)
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
anchored = 1
|
||||
invisibility = INVISIBILITY_LEVEL_TWO
|
||||
update_icon()
|
||||
user << "<span class='notice'>You secure the exterior bolts on the turret.</span>"
|
||||
create_cover()
|
||||
else if(anchored)
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
anchored = 0
|
||||
user << "<span class='notice'>You unsecure the exterior bolts on the turret.</span>"
|
||||
invisibility = 0
|
||||
update_icon()
|
||||
qdel(cover) //deletes the cover, and the turret instance itself becomes its own cover.
|
||||
wrenching = 0
|
||||
|
||||
else if(istype(I, /obj/item/weapon/card/id)||istype(I, /obj/item/device/pda))
|
||||
@@ -347,6 +359,11 @@
|
||||
return 1
|
||||
|
||||
/obj/machinery/porta_turret/proc/take_damage(var/force)
|
||||
if(!raised && !raising)
|
||||
force = force / 8
|
||||
if(force < 5)
|
||||
return
|
||||
|
||||
health -= force
|
||||
if (force > 5 && prob(45))
|
||||
spark_system.start()
|
||||
@@ -354,7 +371,6 @@
|
||||
die() //the death process :(
|
||||
|
||||
/obj/machinery/porta_turret/bullet_act(obj/item/projectile/Proj)
|
||||
|
||||
if(Proj.damage_type == HALLOSS)
|
||||
return
|
||||
|
||||
@@ -397,34 +413,19 @@
|
||||
if (prob(25))
|
||||
qdel(src)
|
||||
else
|
||||
take_damage(150) //should instakill most turrets
|
||||
take_damage(initial(health) * 8) //should instakill most turrets
|
||||
if (3)
|
||||
take_damage(50)
|
||||
take_damage(initial(health) * 8 / 3)
|
||||
|
||||
/obj/machinery/porta_turret/proc/die() //called when the turret dies, ie, health <= 0
|
||||
health = 0
|
||||
density = 0
|
||||
stat |= BROKEN //enables the BROKEN bit
|
||||
invisibility = 0
|
||||
spark_system.start() //creates some sparks because they look cool
|
||||
density = 1
|
||||
update_icon()
|
||||
qdel(cover) //deletes the cover - no need on keeping it there!
|
||||
|
||||
/obj/machinery/porta_turret/proc/create_cover()
|
||||
if(cover == null && anchored)
|
||||
cover = new /obj/machinery/porta_turret_cover(loc) //if the turret has no cover and is anchored, give it a cover
|
||||
cover.Parent_Turret = src //assign the cover its Parent_Turret, which would be this (src)
|
||||
|
||||
/obj/machinery/porta_turret/process()
|
||||
//the main machinery process
|
||||
|
||||
if(cover == null && anchored) //if it has no cover and is anchored
|
||||
if(stat & BROKEN) //if the turret is borked
|
||||
qdel(cover) //delete its cover, assuming it has one. Workaround for a pesky little bug
|
||||
else
|
||||
create_cover()
|
||||
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
//if the turret has no power or is broken, make the turret pop down if it hasn't already
|
||||
popDown()
|
||||
@@ -473,19 +474,23 @@
|
||||
if(!L)
|
||||
return TURRET_NOT_TARGET
|
||||
|
||||
// If emagged not even the dead get a rest
|
||||
if(emagged)
|
||||
return L.stat ? TURRET_SECONDARY_TARGET : TURRET_PRIORITY_TARGET
|
||||
|
||||
if(issilicon(L)) // Don't target silica
|
||||
if(!emagged && issilicon(L)) // Don't target silica
|
||||
return TURRET_NOT_TARGET
|
||||
|
||||
if(L.stat) //if the perp is dead/dying, no need to bother really
|
||||
if(L.stat && !emagged) //if the perp is dead/dying, no need to bother really
|
||||
return TURRET_NOT_TARGET //move onto next potential victim!
|
||||
|
||||
var/dst = get_dist(src, L) //if it's too far away, why bother?
|
||||
if(dst > 7)
|
||||
return 0
|
||||
if(get_dist(src, L) > 7) //if it's too far away, why bother?
|
||||
return TURRET_NOT_TARGET
|
||||
|
||||
if(!check_trajectory(L, src)) //check if we have true line of sight
|
||||
return TURRET_NOT_TARGET
|
||||
|
||||
if(emagged) // If emagged not even the dead get a rest
|
||||
return L.stat ? TURRET_SECONDARY_TARGET : TURRET_PRIORITY_TARGET
|
||||
|
||||
if(lethal && locate(/mob/living/silicon/ai) in get_turf(L)) //don't accidentally kill the AI!
|
||||
return TURRET_NOT_TARGET
|
||||
|
||||
if(check_synth) //If it's set to attack all non-silicons, target them!
|
||||
if(L.lying)
|
||||
@@ -497,6 +502,7 @@
|
||||
|
||||
if(isanimal(L) || issmall(L)) // Animals are not so dangerous
|
||||
return check_anomalies ? TURRET_SECONDARY_TARGET : TURRET_NOT_TARGET
|
||||
|
||||
if(isxenomorph(L) || isalien(L)) // Xenos are dangerous
|
||||
return check_anomalies ? TURRET_PRIORITY_TARGET : TURRET_NOT_TARGET
|
||||
|
||||
@@ -516,7 +522,7 @@
|
||||
if(emagged)
|
||||
return 10
|
||||
|
||||
return H.assess_perp(src, check_weapons, check_records, check_arrest)
|
||||
return H.assess_perp(src, check_access, check_weapons, check_records, check_arrest)
|
||||
|
||||
/obj/machinery/porta_turret/proc/tryToShootAt(var/list/mob/living/targets)
|
||||
if(targets.len && last_target && (last_target in targets) && target(last_target))
|
||||
@@ -536,14 +542,16 @@
|
||||
return
|
||||
if(stat & BROKEN)
|
||||
return
|
||||
invisibility = 0
|
||||
raising = 1
|
||||
flick("popup", cover)
|
||||
set_raised_raising(raised, 1)
|
||||
update_icon()
|
||||
|
||||
var/atom/flick_holder = PoolOrNew(/atom/movable/porta_turret_cover, loc)
|
||||
flick_holder.layer = layer + 0.1
|
||||
flick("popup", flick_holder)
|
||||
sleep(10)
|
||||
raising = 0
|
||||
cover.icon_state = "openTurretCover"
|
||||
raised = 1
|
||||
layer = 4
|
||||
qdel(flick_holder)
|
||||
|
||||
set_raised_raising(1, 0)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/porta_turret/proc/popDown() //pops the turret down
|
||||
@@ -554,16 +562,23 @@
|
||||
return
|
||||
if(stat & BROKEN)
|
||||
return
|
||||
layer = 3
|
||||
raising = 1
|
||||
flick("popdown", cover)
|
||||
sleep(10)
|
||||
raising = 0
|
||||
cover.icon_state = "turretCover"
|
||||
raised = 0
|
||||
invisibility = INVISIBILITY_LEVEL_TWO
|
||||
set_raised_raising(raised, 1)
|
||||
update_icon()
|
||||
|
||||
var/atom/flick_holder = PoolOrNew(/atom/movable/porta_turret_cover, loc)
|
||||
flick_holder.layer = layer + 0.1
|
||||
flick("popdown", flick_holder)
|
||||
sleep(10)
|
||||
qdel(flick_holder)
|
||||
|
||||
set_raised_raising(0, 0)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/porta_turret/proc/set_raised_raising(var/raised, var/raising)
|
||||
src.raised = raised
|
||||
src.raising = raising
|
||||
density = raised || raising
|
||||
|
||||
/obj/machinery/porta_turret/proc/target(var/mob/living/target)
|
||||
if(disabled)
|
||||
return
|
||||
@@ -595,7 +610,6 @@
|
||||
if(!raised) //the turret has to be raised in order to fire - makes sense, right?
|
||||
return
|
||||
|
||||
|
||||
update_icon()
|
||||
var/obj/item/projectile/A
|
||||
if(emagged || lethal)
|
||||
@@ -811,9 +825,6 @@
|
||||
Turret.enabled = 0
|
||||
Turret.setup()
|
||||
|
||||
// Turret.cover=new/obj/machinery/porta_turret_cover(loc)
|
||||
// Turret.cover.Parent_Turret=Turret
|
||||
// Turret.cover.name = finish_name
|
||||
qdel(src) // qdel
|
||||
|
||||
else if(istype(I, /obj/item/weapon/crowbar))
|
||||
@@ -832,6 +843,7 @@
|
||||
|
||||
finish_name = t
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
|
||||
@@ -857,32 +869,5 @@
|
||||
/obj/machinery/porta_turret_construct/attack_ai()
|
||||
return
|
||||
|
||||
|
||||
/************************
|
||||
* PORTABLE TURRET COVER *
|
||||
************************/
|
||||
|
||||
/obj/machinery/porta_turret_cover
|
||||
name = "turret"
|
||||
/atom/movable/porta_turret_cover
|
||||
icon = 'icons/obj/turrets.dmi'
|
||||
icon_state = "turretCover"
|
||||
anchored = 1
|
||||
layer = 3.5
|
||||
density = 0
|
||||
var/obj/machinery/porta_turret/Parent_Turret = null
|
||||
|
||||
/obj/machinery/porta_turret_cover/Destroy()
|
||||
Parent_Turret = null
|
||||
..()
|
||||
|
||||
/obj/machinery/porta_turret_cover/attack_ai(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/porta_turret_cover/attack_hand(mob/user)
|
||||
return Parent_Turret.attack_hand(user)
|
||||
|
||||
/obj/machinery/porta_turret_cover/Topic(href, href_list)
|
||||
Parent_Turret.Topic(href, href_list, 1) // Calling another object's Topic requires that we claim to not have a window, otherwise BYOND's base proc will runtime.
|
||||
|
||||
/obj/machinery/porta_turret_cover/attackby(obj/item/I, mob/user)
|
||||
Parent_Turret.attackby(I, user)
|
||||
|
||||
@@ -13,6 +13,7 @@ obj/machinery/recharger
|
||||
var/icon_state_charged = "recharger2"
|
||||
var/icon_state_charging = "recharger1"
|
||||
var/icon_state_idle = "recharger0" //also when unpowered
|
||||
var/portable = 1
|
||||
|
||||
obj/machinery/recharger/attackby(obj/item/weapon/G as obj, mob/user as mob)
|
||||
if(istype(user,/mob/living/silicon))
|
||||
@@ -45,7 +46,7 @@ obj/machinery/recharger/attackby(obj/item/weapon/G as obj, mob/user as mob)
|
||||
G.loc = src
|
||||
charging = G
|
||||
update_icon()
|
||||
else if(istype(G, /obj/item/weapon/wrench))
|
||||
else if(portable && istype(G, /obj/item/weapon/wrench))
|
||||
if(charging)
|
||||
user << "<span class='warning'>Remove [charging] first!</span>"
|
||||
return
|
||||
@@ -155,3 +156,4 @@ obj/machinery/recharger/wallcharger
|
||||
icon_state_charged = "wrecharger2"
|
||||
icon_state_charging = "wrecharger1"
|
||||
icon_state_idle = "wrecharger0"
|
||||
portable = 0
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
var/build_machine_type
|
||||
var/refund_amt = 2
|
||||
var/refund_type = /obj/item/stack/material/steel
|
||||
var/reverse = 0 //if resulting object faces opposite its dir (like light fixtures)
|
||||
|
||||
/obj/item/frame/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
@@ -22,7 +23,12 @@
|
||||
if (get_dist(on_wall,usr)>1)
|
||||
return
|
||||
|
||||
var/ndir = get_dir(on_wall,usr)
|
||||
var/ndir
|
||||
if(reverse)
|
||||
ndir = get_dir(usr,on_wall)
|
||||
else
|
||||
ndir = get_dir(on_wall,usr)
|
||||
|
||||
if (!(ndir in cardinal))
|
||||
return
|
||||
|
||||
@@ -61,23 +67,10 @@
|
||||
icon = 'icons/obj/lighting.dmi'
|
||||
icon_state = "tube-construct-item"
|
||||
build_machine_type = /obj/machinery/light_construct
|
||||
reverse = 1
|
||||
|
||||
/obj/item/frame/light/small
|
||||
name = "small light fixture frame"
|
||||
icon_state = "bulb-construct-item"
|
||||
refund_amt = 1
|
||||
build_machine_type = /obj/machinery/light_construct/small
|
||||
|
||||
/obj/item/frame/rust
|
||||
name = "Fuel Compressor frame"
|
||||
icon = 'icons/rust.dmi'
|
||||
icon_state = "fuel_compressor0"
|
||||
w_class = 4
|
||||
refund_type = /obj/item/stack/material/plasteel
|
||||
refund_amt = 12
|
||||
build_machine_type = /obj/machinery/rust_fuel_compressor
|
||||
|
||||
/obj/item/frame/rust/assembly
|
||||
name = "Fuel Assembly Port frame"
|
||||
icon_state = "port2"
|
||||
build_machine_type = /obj/machinery/rust_fuel_assembly_port
|
||||
|
||||
@@ -45,7 +45,6 @@
|
||||
if (!(XRAY in user.mutations))
|
||||
user.mutations.Add(XRAY)
|
||||
user.sight |= (SEE_MOBS|SEE_OBJS|SEE_TURFS)
|
||||
user.see_in_dark = 8
|
||||
user.see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
|
||||
if (!(COLD_RESISTANCE in user.mutations))
|
||||
|
||||
@@ -244,15 +244,6 @@
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/mecha/combat/mmi_moved_inside(var/obj/item/device/mmi/mmi_as_oc as obj,mob/user as mob)
|
||||
if(..())
|
||||
if(occupant.client)
|
||||
occupant.client.mouse_pointer_icon = file("icons/mecha/mecha_mouse.dmi")
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
|
||||
/obj/mecha/combat/go_out()
|
||||
if(src.occupant && src.occupant.client)
|
||||
src.occupant.client.mouse_pointer_icon = initial(src.occupant.client.mouse_pointer_icon)
|
||||
|
||||
@@ -686,15 +686,6 @@
|
||||
|
||||
/obj/mecha/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
/*
|
||||
if(istype(W, /obj/item/device/mmi))
|
||||
if(mmi_move_inside(W,user))
|
||||
user << "[src]-MMI interface initialized successfuly"
|
||||
else
|
||||
user << "[src]-MMI interface initialization failed."
|
||||
return
|
||||
*/
|
||||
|
||||
if(istype(W, /obj/item/mecha_parts/mecha_equipment))
|
||||
var/obj/item/mecha_parts/mecha_equipment/E = W
|
||||
spawn()
|
||||
@@ -1058,65 +1049,6 @@
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/mecha/proc/mmi_move_inside(var/obj/item/device/mmi/mmi_as_oc as obj,mob/user as mob)
|
||||
if(!mmi_as_oc.brainmob || !mmi_as_oc.brainmob.client)
|
||||
user << "Consciousness matrix not detected."
|
||||
return 0
|
||||
else if(mmi_as_oc.brainmob.stat)
|
||||
user << "Beta-rhythm below acceptable level."
|
||||
return 0
|
||||
else if(occupant)
|
||||
user << "Occupant detected."
|
||||
return 0
|
||||
else if(dna && dna!=mmi_as_oc.brainmob.dna.unique_enzymes)
|
||||
user << "Stop it!"
|
||||
return 0
|
||||
//Added a message here since people assume their first click failed or something./N
|
||||
// user << "Installing MMI, please stand by."
|
||||
|
||||
visible_message("<span class='notice'>[usr] starts to insert an MMI into [src.name]</span>")
|
||||
|
||||
if(enter_after(40,user))
|
||||
if(!occupant)
|
||||
return mmi_moved_inside(mmi_as_oc,user)
|
||||
else
|
||||
user << "Occupant detected."
|
||||
else
|
||||
user << "You stop inserting the MMI."
|
||||
return 0
|
||||
|
||||
/obj/mecha/proc/mmi_moved_inside(var/obj/item/device/mmi/mmi_as_oc as obj,mob/user as mob)
|
||||
if(mmi_as_oc && user in range(1))
|
||||
if(!mmi_as_oc.brainmob || !mmi_as_oc.brainmob.client)
|
||||
user << "Consciousness matrix not detected."
|
||||
return 0
|
||||
else if(mmi_as_oc.brainmob.stat)
|
||||
user << "Beta-rhythm below acceptable level."
|
||||
return 0
|
||||
user.drop_from_inventory(mmi_as_oc)
|
||||
var/mob/brainmob = mmi_as_oc.brainmob
|
||||
brainmob.reset_view(src)
|
||||
/*
|
||||
brainmob.client.eye = src
|
||||
brainmob.client.perspective = EYE_PERSPECTIVE
|
||||
*/
|
||||
occupant = brainmob
|
||||
brainmob.loc = src //should allow relaymove
|
||||
brainmob.canmove = 1
|
||||
mmi_as_oc.loc = src
|
||||
mmi_as_oc.mecha = src
|
||||
src.verbs -= /obj/mecha/verb/eject
|
||||
src.Entered(mmi_as_oc)
|
||||
src.Move(src.loc)
|
||||
src.icon_state = src.reset_icon()
|
||||
set_dir(dir_in)
|
||||
src.log_message("[mmi_as_oc] moved in as pilot.")
|
||||
if(!hasInternalDamage())
|
||||
src.occupant << sound('sound/mecha/nominal.ogg',volume=50)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/mecha/verb/view_stats()
|
||||
set name = "View Stats"
|
||||
set category = "Exosuit Interface"
|
||||
|
||||
@@ -254,7 +254,7 @@ Alien plants should do something if theres a lot of poison
|
||||
|
||||
|
||||
/obj/effect/alien/weeds/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > 300)
|
||||
if(exposed_temperature > 300 + T0C)
|
||||
health -= 5
|
||||
healthcheck()
|
||||
|
||||
@@ -425,7 +425,7 @@ Alien plants should do something if theres a lot of poison
|
||||
Burst()
|
||||
|
||||
/obj/effect/alien/egg/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > 500)
|
||||
if(exposed_temperature > 500 + T0C)
|
||||
health -= 5
|
||||
healthcheck()
|
||||
|
||||
|
||||
@@ -55,8 +55,10 @@
|
||||
|
||||
targetTurfs = new()
|
||||
|
||||
for(var/turf/T in view(range, location)) //build affected area list
|
||||
if(cheap_pythag(T.x - location.x, T.y - location.y) <= range) //cull turfs to circle
|
||||
//build affected area list
|
||||
for(var/turf/T in view(range, location))
|
||||
//cull turfs to circle
|
||||
if(sqrt((T.x - location.x)**2 + (T.y - location.y)**2) <= range)
|
||||
targetTurfs += T
|
||||
|
||||
wallList = new()
|
||||
|
||||
@@ -39,6 +39,8 @@
|
||||
if(!metal && reagents)
|
||||
var/turf/T = get_turf(src)
|
||||
reagents.touch_turf(T)
|
||||
for(var/obj/O in T)
|
||||
reagents.touch_obj(O)
|
||||
|
||||
/obj/effect/effect/foam/process()
|
||||
if(--amount < 0)
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/spider/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > 300)
|
||||
if(exposed_temperature > 300 + T0C)
|
||||
health -= 5
|
||||
healthcheck()
|
||||
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
//TODO: Flash range does nothing currently
|
||||
|
||||
//A very crude linear approximatiaon of pythagoras theorem.
|
||||
/proc/cheap_pythag(var/dx, var/dy)
|
||||
dx = abs(dx); dy = abs(dy);
|
||||
if(dx>=dy) return dx + (0.5*dy) //The longest side add half the shortest side approximates the hypotenuse
|
||||
else return dy + (0.5*dx)
|
||||
|
||||
///// Z-Level Stuff
|
||||
proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = 1, z_transfer = 1)
|
||||
///// Z-Level Stuff
|
||||
|
||||
@@ -70,7 +70,10 @@
|
||||
/obj/item/Destroy()
|
||||
if(ismob(loc))
|
||||
var/mob/m = loc
|
||||
m.unEquip(src, 1)
|
||||
m.drop_from_inventory(src)
|
||||
m.update_inv_r_hand()
|
||||
m.update_inv_l_hand()
|
||||
src.loc = null
|
||||
return ..()
|
||||
|
||||
/obj/item/device
|
||||
@@ -153,7 +156,7 @@
|
||||
if(temp && !temp.is_usable())
|
||||
user << "<span class='notice'>You try to move your [temp.name], but cannot!</span>"
|
||||
return
|
||||
|
||||
src.pickup(user)
|
||||
if (istype(src.loc, /obj/item/weapon/storage))
|
||||
var/obj/item/weapon/storage/S = src.loc
|
||||
S.remove_from_storage(src)
|
||||
@@ -167,8 +170,6 @@
|
||||
return
|
||||
user.next_move = max(user.next_move+2,world.time + 2)
|
||||
user.put_in_active_hand(src)
|
||||
if(src.loc == user)
|
||||
src.pickup(user)
|
||||
return
|
||||
|
||||
/obj/item/attack_ai(mob/user as mob)
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
name = "flash"
|
||||
desc = "Used for blinding and being an asshole."
|
||||
icon_state = "flash"
|
||||
item_state = "flash"
|
||||
item_state = "flashtool"
|
||||
throwforce = 5
|
||||
w_class = 2.0
|
||||
w_class = 2
|
||||
throw_speed = 4
|
||||
throw_range = 10
|
||||
flags = CONDUCT
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
if(istype(A, /turf/simulated/floor))
|
||||
var/turf/simulated/floor/F = A
|
||||
|
||||
if(F.is_plasteel_floor()) // only tiled floors
|
||||
if(F.is_steel_floor()) // only tiled floors
|
||||
if(tile_dir_mode)
|
||||
var/D = get_dir(usr, F)
|
||||
if(usr.loc == F)
|
||||
|
||||
@@ -143,7 +143,7 @@
|
||||
c_tag = name
|
||||
|
||||
/obj/machinery/camera/spy/check_eye(var/mob/user as mob)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/device/radio/spy
|
||||
listening = 0
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/obj/item/stack/tile/plasteel
|
||||
/obj/item/stack/tile/steel
|
||||
name = "floor tile"
|
||||
singular_name = "floor tile"
|
||||
desc = "Those could work as a pretty decent throwing weapon"
|
||||
desc = "Those could work as a pretty decent throwing weapon" //why?
|
||||
icon_state = "tile"
|
||||
force = 6.0
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 937.5)
|
||||
@@ -10,23 +10,23 @@
|
||||
throw_range = 20
|
||||
flags = CONDUCT
|
||||
|
||||
/obj/item/stack/tile/plasteel/New(var/loc, var/amount=null)
|
||||
/obj/item/stack/tile/steel/New(var/loc, var/amount=null)
|
||||
..()
|
||||
src.pixel_x = rand(1, 14)
|
||||
src.pixel_y = rand(1, 14)
|
||||
return
|
||||
|
||||
/obj/item/stack/tile/plasteel/cyborg
|
||||
/obj/item/stack/tile/steel/cyborg
|
||||
name = "floor tile synthesizer"
|
||||
desc = "A device that makes floor tiles."
|
||||
gender = NEUTER
|
||||
matter = null
|
||||
uses_charge = 1
|
||||
charge_costs = list(250)
|
||||
stacktype = /obj/item/stack/tile/plasteel
|
||||
build_type = /obj/item/stack/tile/plasteel
|
||||
stacktype = /obj/item/stack/tile/steel
|
||||
build_type = /obj/item/stack/tile/steel
|
||||
|
||||
/obj/item/stack/tile/plasteel/proc/build(turf/S as turf)
|
||||
/obj/item/stack/tile/steel/proc/build(turf/S as turf)
|
||||
if (istype(S,/turf/space))
|
||||
S.ChangeTurf(/turf/simulated/floor/plating/airless)
|
||||
else
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
throwforce = 1.0
|
||||
throw_speed = 5
|
||||
throw_range = 20
|
||||
flags = CONDUCT
|
||||
flags = 0
|
||||
origin_tech = list(TECH_BIO = 1)
|
||||
|
||||
/*
|
||||
@@ -41,7 +41,7 @@
|
||||
throwforce = 1.0
|
||||
throw_speed = 5
|
||||
throw_range = 20
|
||||
flags = CONDUCT
|
||||
flags = 0
|
||||
|
||||
/obj/item/stack/tile/wood/cyborg
|
||||
name = "wood floor tile synthesizer"
|
||||
@@ -63,4 +63,4 @@
|
||||
throwforce = 1.0
|
||||
throw_speed = 5
|
||||
throw_range = 20
|
||||
flags = CONDUCT
|
||||
flags = 0
|
||||
|
||||
@@ -141,7 +141,11 @@
|
||||
desc = "There are 0 caps left. Looks almost like the real thing! Ages 8 and up. Please recycle in an autolathe when you're out of caps!"
|
||||
icon = 'icons/obj/gun.dmi'
|
||||
icon_state = "revolver"
|
||||
item_state = "gun"
|
||||
item_state = "revolver"
|
||||
item_icons = list(
|
||||
icon_l_hand = 'icons/mob/items/lefthand_guns.dmi',
|
||||
icon_r_hand = 'icons/mob/items/righthand_guns.dmi',
|
||||
)
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT|SLOT_HOLSTER
|
||||
w_class = 3.0
|
||||
@@ -220,6 +224,10 @@
|
||||
icon = 'icons/obj/gun.dmi'
|
||||
icon_state = "crossbow"
|
||||
item_state = "crossbow"
|
||||
item_icons = list(
|
||||
icon_l_hand = 'icons/mob/items/lefthand_guns.dmi',
|
||||
icon_r_hand = 'icons/mob/items/righthand_guns.dmi',
|
||||
)
|
||||
w_class = 2.0
|
||||
attack_verb = list("attacked", "struck", "hit")
|
||||
var/bullets = 5
|
||||
|
||||
@@ -40,7 +40,7 @@ AI MODULES
|
||||
|
||||
if (comp.current.stat == 2 || comp.current.control_disabled == 1)
|
||||
usr << "Upload failed. No signal is being detected from the AI."
|
||||
else if (comp.current.see_in_dark == 0)
|
||||
else if (!comp.current.has_power)
|
||||
usr << "Upload failed. Only a faint signal is being detected from the AI, and it is not responding to our requests. It may be low on power."
|
||||
else
|
||||
src.transmitInstructions(comp.current, usr)
|
||||
|
||||
@@ -161,9 +161,7 @@
|
||||
icon = 'icons/obj/ammo.dmi'
|
||||
icon_state = "rcd"
|
||||
item_state = "rcdammo"
|
||||
opacity = 0
|
||||
density = 0
|
||||
anchored = 0.0
|
||||
w_class = 2
|
||||
origin_tech = list(TECH_MATERIAL = 2)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 30000,"glass" = 15000)
|
||||
|
||||
@@ -188,7 +186,7 @@
|
||||
|
||||
|
||||
/obj/item/weapon/rcd/mounted/useResource(var/amount, var/mob/user)
|
||||
var/cost = amount*30
|
||||
var/cost = amount*130 //so that a rig with default powercell can build ~2.5x the stuff a fully-loaded RCD can.
|
||||
if(istype(loc,/obj/item/rig_module))
|
||||
var/obj/item/rig_module/module = loc
|
||||
if(module.holder && module.holder.cell)
|
||||
|
||||
@@ -110,9 +110,10 @@
|
||||
..()
|
||||
spawn(30)
|
||||
if(istype(loc, /mob/living/carbon/human))
|
||||
blood_type = loc:dna:b_type
|
||||
dna_hash = loc:dna:unique_enzymes
|
||||
fingerprint_hash = md5(loc:dna:uni_identity)
|
||||
var/mob/living/carbon/human/H = loc
|
||||
blood_type = H.dna.b_type
|
||||
dna_hash = H.dna.unique_enzymes
|
||||
fingerprint_hash = md5(H.dna.uni_identity)
|
||||
|
||||
/obj/item/weapon/card/id/attack_self(mob/user as mob)
|
||||
for(var/mob/O in viewers(user, null))
|
||||
|
||||
@@ -206,7 +206,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
throw_speed = 0.5
|
||||
item_state = "cigoff"
|
||||
w_class = 1
|
||||
slot_flags = SLOT_EARS
|
||||
slot_flags = SLOT_EARS | SLOT_MASK
|
||||
attack_verb = list("burnt", "singed")
|
||||
icon_on = "cigon" //Note - these are in masks.dmi not in cigarette.dmi
|
||||
icon_off = "cigoff"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/obj/item/weapon/grenade/chem_grenade
|
||||
name = "grenade casing"
|
||||
icon_state = "chemg"
|
||||
item_state = "flashbang"
|
||||
item_state = "grenade"
|
||||
desc = "A hand made chemical grenade."
|
||||
w_class = 2.0
|
||||
force = 2.0
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/obj/item/weapon/grenade/empgrenade
|
||||
name = "classic emp grenade"
|
||||
icon_state = "emp"
|
||||
item_state = "emp"
|
||||
item_state = "empgrenade"
|
||||
origin_tech = list(TECH_MATERIAL = 2, TECH_MAGNET = 3)
|
||||
|
||||
prime()
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
w_class = 2.0
|
||||
icon = 'icons/obj/grenade.dmi'
|
||||
icon_state = "grenade"
|
||||
item_state = "flashbang"
|
||||
item_state = "grenade"
|
||||
throw_speed = 4
|
||||
throw_range = 20
|
||||
flags = CONDUCT
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
attack_verb = list("attacked", "poked")
|
||||
edge = 0
|
||||
sharp = 0
|
||||
force_divisor = 0.25 //5 when wielded with weight 20 (steel)
|
||||
force_divisor = 0.1 //2 when wielded with weight 20 (steel)
|
||||
|
||||
/obj/item/weapon/material/kitchen/utensil/spoon/plastic
|
||||
default_material = "plastic"
|
||||
@@ -71,9 +71,9 @@
|
||||
*/
|
||||
/obj/item/weapon/material/kitchen/utensil/knife
|
||||
name = "knife"
|
||||
desc = "Can cut through any food."
|
||||
desc = "A knife for eating with. Can cut through any food."
|
||||
icon_state = "knife"
|
||||
force_divisor = 0.2 // 12 when wielded with hardness 60 (steel)
|
||||
force_divisor = 0.1 // 6 when wielded with hardness 60 (steel)
|
||||
|
||||
/obj/item/weapon/material/kitchen/utensil/knife/attack(target as mob, mob/living/user as mob)
|
||||
if ((CLUMSY in user.mutations) && prob(50))
|
||||
@@ -100,7 +100,7 @@
|
||||
name = "rolling pin"
|
||||
desc = "Used to knock out the Bartender."
|
||||
icon_state = "rolling_pin"
|
||||
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked") //I think the rollingpin attackby will end up ignoring this anyway.
|
||||
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked")
|
||||
default_material = "wood"
|
||||
force_divisor = 0.7 // 10 when wielded with weight 15 (wood)
|
||||
thrown_force_divisor = 1 // as above
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
sharp = 1
|
||||
..() //Updates force.
|
||||
throwforce = max(3,force-3)
|
||||
hitsound = initial(hitsound)
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
icon_state += "_open"
|
||||
w_class = 3
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
@@ -24,7 +24,7 @@
|
||||
force = 3
|
||||
edge = 0
|
||||
sharp = 0
|
||||
hitsound = null
|
||||
hitsound = initial(hitsound)
|
||||
icon_state = initial(icon_state)
|
||||
w_class = initial(w_class)
|
||||
attack_verb = initial(attack_verb)
|
||||
@@ -38,10 +38,10 @@
|
||||
/obj/item/weapon/material/butterfly/attack_self(mob/user)
|
||||
active = !active
|
||||
if(active)
|
||||
user << "<span class='notice'>You flip out your [src].</span>"
|
||||
user << "<span class='notice'>You flip out \the [src].</span>"
|
||||
playsound(user, 'sound/weapons/flipblade.ogg', 15, 1)
|
||||
else
|
||||
user << "<span class='notice'>The butterfly knife can now be concealed.</span>"
|
||||
user << "<span class='notice'>\The [src] can now be concealed.</span>"
|
||||
update_force()
|
||||
add_fingerprint(user)
|
||||
|
||||
|
||||
@@ -73,6 +73,8 @@
|
||||
|
||||
if( !H.shoes && ( !H.wear_suit || !(H.wear_suit.body_parts_covered & FEET) ) )
|
||||
var/obj/item/organ/external/affecting = H.get_organ(pick("l_foot", "r_foot"))
|
||||
if(!affecting)
|
||||
return
|
||||
if(affecting.status & ORGAN_ROBOT)
|
||||
return
|
||||
if(affecting.take_damage(5, 0))
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
new /obj/item/weapon/storage/backpack/satchel_cap(src)
|
||||
new /obj/item/clothing/suit/captunic(src)
|
||||
new /obj/item/clothing/suit/captunic/capjacket(src)
|
||||
new /obj/item/clothing/head/helmet/cap(src)
|
||||
new /obj/item/clothing/head/caphat/cap(src)
|
||||
new /obj/item/clothing/under/rank/captain(src)
|
||||
new /obj/item/clothing/suit/storage/vest(src)
|
||||
new /obj/item/weapon/cartridge/captain(src)
|
||||
@@ -28,7 +28,7 @@
|
||||
new /obj/item/clothing/suit/armor/captain(src)
|
||||
new /obj/item/weapon/melee/telebaton(src)
|
||||
new /obj/item/clothing/under/dress/dress_cap(src)
|
||||
new /obj/item/clothing/head/helmet/formalcaptain(src)
|
||||
new /obj/item/clothing/head/caphat/formal(src)
|
||||
new /obj/item/clothing/under/captainformal(src)
|
||||
return
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
new /obj/item/clothing/shoes/leather(src)
|
||||
new /obj/item/clothing/shoes/white(src)
|
||||
new /obj/item/clothing/under/rank/head_of_personnel_whimsy(src)
|
||||
new /obj/item/clothing/head/helmet/hop(src)
|
||||
new /obj/item/clothing/head/caphat/hop(src)
|
||||
return
|
||||
|
||||
|
||||
@@ -103,13 +103,13 @@
|
||||
new /obj/item/weapon/storage/backpack/security(src)
|
||||
else
|
||||
new /obj/item/weapon/storage/backpack/satchel_sec(src)
|
||||
new /obj/item/clothing/head/helmet/HoS(src)
|
||||
new /obj/item/clothing/head/HoS(src)
|
||||
new /obj/item/clothing/suit/storage/vest/hos(src)
|
||||
new /obj/item/clothing/under/rank/head_of_security/jensen(src)
|
||||
new /obj/item/clothing/under/rank/head_of_security/corp(src)
|
||||
new /obj/item/clothing/suit/armor/hos/jensen(src)
|
||||
new /obj/item/clothing/suit/armor/hos(src)
|
||||
new /obj/item/clothing/head/helmet/HoS/dermal(src)
|
||||
new /obj/item/clothing/head/HoS/dermal(src)
|
||||
new /obj/item/weapon/cartridge/hos(src)
|
||||
new /obj/item/device/radio/headset/heads/hos(src)
|
||||
new /obj/item/clothing/glasses/sunglasses/sechud(src)
|
||||
@@ -148,7 +148,7 @@
|
||||
new /obj/item/clothing/under/rank/warden(src)
|
||||
new /obj/item/clothing/under/rank/warden/corp(src)
|
||||
new /obj/item/clothing/suit/armor/vest/warden(src)
|
||||
new /obj/item/clothing/head/helmet/warden(src)
|
||||
new /obj/item/clothing/head/warden(src)
|
||||
new /obj/item/weapon/cartridge/security(src)
|
||||
new /obj/item/device/radio/headset/headset_sec(src)
|
||||
new /obj/item/clothing/glasses/sunglasses/sechud(src)
|
||||
|
||||
@@ -154,15 +154,20 @@
|
||||
user << "<span class='warning'>The crate appears to be broken.</span>"
|
||||
return
|
||||
if(src.allowed(user))
|
||||
src.locked = !src.locked
|
||||
for(var/mob/O in viewers(user, 3))
|
||||
if((O.client && !( O.blinded )))
|
||||
O << "<span class='notice'>The crate has been [locked ? null : "un"]locked by [user].</span>"
|
||||
overlays.Cut()
|
||||
overlays += locked ? redlight : greenlight
|
||||
set_locked(!locked, user)
|
||||
else
|
||||
user << "<span class='notice'>Access Denied</span>"
|
||||
|
||||
/obj/structure/closet/crate/secure/proc/set_locked(var/newlocked, mob/user = null)
|
||||
if(locked == newlocked) return
|
||||
|
||||
locked = newlocked
|
||||
if(user)
|
||||
for(var/mob/O in viewers(user, 3))
|
||||
O.show_message( "<span class='notice'>The crate has been [locked ? null : "un"]locked by [user].</span>", 1)
|
||||
overlays.Cut()
|
||||
overlays += locked ? redlight : greenlight
|
||||
|
||||
/obj/structure/closet/crate/secure/verb/verb_togglelock()
|
||||
set src in oview(1) // One square distance
|
||||
set category = "Object"
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
/obj/structure/lattice/attackby(obj/item/C as obj, mob/user as mob)
|
||||
|
||||
if (istype(C, /obj/item/stack/tile/plasteel))
|
||||
if (istype(C, /obj/item/stack/tile/steel))
|
||||
var/turf/T = get_turf(src)
|
||||
T.attackby(C, user) //BubbleWrap - hand this off to the underlying turf instead
|
||||
return
|
||||
|
||||
@@ -20,6 +20,12 @@
|
||||
var/obj/structure/m_tray/connected = null
|
||||
anchored = 1.0
|
||||
|
||||
/obj/structure/morgue/Destroy()
|
||||
if(connected)
|
||||
qdel(connected)
|
||||
connected = null
|
||||
return ..()
|
||||
|
||||
/obj/structure/morgue/proc/update()
|
||||
if (src.connected)
|
||||
src.icon_state = "morgue0"
|
||||
@@ -63,8 +69,8 @@
|
||||
if (!( A.anchored ))
|
||||
A.loc = src
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
//src.connected = null
|
||||
qdel(src.connected)
|
||||
src.connected = null
|
||||
else
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
src.connected = new /obj/structure/m_tray( src.loc )
|
||||
@@ -79,8 +85,8 @@
|
||||
src.connected.icon_state = "morguet"
|
||||
src.connected.set_dir(src.dir)
|
||||
else
|
||||
//src.connected = null
|
||||
qdel(src.connected)
|
||||
src.connected = null
|
||||
src.add_fingerprint(user)
|
||||
update()
|
||||
return
|
||||
@@ -112,11 +118,10 @@
|
||||
src.icon_state = "morgue0"
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.connected.loc
|
||||
//Foreach goto(106)
|
||||
src.connected.icon_state = "morguet"
|
||||
else
|
||||
//src.connected = null
|
||||
qdel(src.connected)
|
||||
src.connected = null
|
||||
return
|
||||
|
||||
|
||||
@@ -134,6 +139,12 @@
|
||||
anchored = 1
|
||||
throwpass = 1
|
||||
|
||||
/obj/structure/m_tray/Destroy()
|
||||
if(connected && connected.connected == src)
|
||||
connected.connected = null
|
||||
connected = null
|
||||
return ..()
|
||||
|
||||
/obj/structure/m_tray/attack_hand(mob/user as mob)
|
||||
if (src.connected)
|
||||
for(var/atom/movable/A as mob|obj in src.loc)
|
||||
@@ -179,6 +190,12 @@
|
||||
var/id = 1
|
||||
var/locked = 0
|
||||
|
||||
/obj/structure/crematorium/Destroy()
|
||||
if(connected)
|
||||
qdel(connected)
|
||||
connected = null
|
||||
return ..()
|
||||
|
||||
/obj/structure/crematorium/proc/update()
|
||||
if (src.connected)
|
||||
src.icon_state = "crema0"
|
||||
@@ -278,11 +295,10 @@
|
||||
src.icon_state = "crema0"
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.connected.loc
|
||||
//Foreach goto(106)
|
||||
src.connected.icon_state = "cremat"
|
||||
else
|
||||
//src.connected = null
|
||||
qdel(src.connected)
|
||||
src.connected = null
|
||||
return
|
||||
|
||||
/obj/structure/crematorium/proc/cremate(atom/A, mob/user as mob)
|
||||
|
||||
@@ -414,6 +414,9 @@
|
||||
"<span class='danger'>[user] was stunned by \his wet [O]!</span>", \
|
||||
"<span class='userdanger'>[user] was stunned by \his wet [O]!</span>")
|
||||
return
|
||||
// Short of a rewrite, this is necessary to stop monkeycubes being washed.
|
||||
else if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/monkeycube))
|
||||
return
|
||||
|
||||
var/turf/location = user.loc
|
||||
if(!isturf(location)) return
|
||||
|
||||
@@ -29,7 +29,7 @@ var/list/wood_icons = list("wood","wood-broken")
|
||||
/turf/simulated/floor
|
||||
|
||||
//Note to coders, the 'intact' var can no longer be used to determine if the floor is a plating or not.
|
||||
//Use the is_plating(), is_plasteel_floor() and is_light_floor() procs instead. --Errorage
|
||||
//Use the is_plating(), is_steel_floor() and is_light_floor() procs instead. --Errorage
|
||||
name = "floor"
|
||||
icon = 'icons/turf/floors.dmi'
|
||||
icon_state = "floor"
|
||||
@@ -42,7 +42,7 @@ var/list/wood_icons = list("wood","wood-broken")
|
||||
var/broken = 0
|
||||
var/burnt = 0
|
||||
var/mineral = DEFAULT_WALL_MATERIAL
|
||||
var/floor_type = /obj/item/stack/tile/plasteel
|
||||
var/floor_type = /obj/item/stack/tile/steel
|
||||
var/lightfloor_state // for light floors, this is the state of the tile. 0-7, 0x4 is on-bit - use the helper procs below
|
||||
|
||||
proc/get_lightfloor_state()
|
||||
@@ -117,13 +117,23 @@ var/list/wood_icons = list("wood","wood-broken")
|
||||
return
|
||||
|
||||
/turf/simulated/floor/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
|
||||
var/temp_destroy = get_damage_temperature()
|
||||
if(!burnt && prob(5))
|
||||
burn_tile()
|
||||
else if(prob(1) && !is_plating())
|
||||
make_plating()
|
||||
burn_tile()
|
||||
burn_tile(exposed_temperature)
|
||||
else if(temp_destroy && exposed_temperature >= (temp_destroy + 100) && prob(1) && !is_plating())
|
||||
make_plating() //destroy the tile, exposing plating
|
||||
burn_tile(exposed_temperature)
|
||||
return
|
||||
|
||||
//should be a little bit lower than the temperature required to destroy the material
|
||||
/turf/simulated/floor/proc/get_damage_temperature()
|
||||
if(is_steel_floor()) return T0C+1400
|
||||
if(is_wood_floor()) return T0C+200
|
||||
if(is_carpet_floor()) return T0C+200
|
||||
if(is_grass_floor()) return T0C+80
|
||||
return null
|
||||
|
||||
/turf/simulated/floor/adjacent_fire_act(turf/simulated/floor/adj_turf, datum/gas_mixture/adj_air, adj_temp, adj_volume)
|
||||
var/dir_to = get_dir(src, adj_turf)
|
||||
|
||||
@@ -137,7 +147,7 @@ var/list/wood_icons = list("wood","wood-broken")
|
||||
turf/simulated/floor/proc/update_icon()
|
||||
if(lava)
|
||||
return
|
||||
else if(is_plasteel_floor())
|
||||
else if(is_steel_floor())
|
||||
if(!broken && !burnt)
|
||||
icon_state = icon_regular_floor
|
||||
else if(is_plating())
|
||||
@@ -252,8 +262,8 @@ turf/simulated/floor/proc/update_icon()
|
||||
make_plating()
|
||||
break_tile()
|
||||
|
||||
/turf/simulated/floor/is_plasteel_floor()
|
||||
if(ispath(floor_type, /obj/item/stack/tile/plasteel))
|
||||
/turf/simulated/floor/is_steel_floor()
|
||||
if(ispath(floor_type, /obj/item/stack/tile/steel))
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
@@ -292,7 +302,7 @@ turf/simulated/floor/proc/update_icon()
|
||||
if(istype(src,/turf/simulated/floor/mech_bay_recharge_floor))
|
||||
src.ChangeTurf(/turf/simulated/floor/plating)
|
||||
if(broken) return
|
||||
if(is_plasteel_floor())
|
||||
if(is_steel_floor())
|
||||
src.icon_state = "damaged[pick(1,2,3,4,5)]"
|
||||
broken = 1
|
||||
else if(is_light_floor())
|
||||
@@ -311,28 +321,38 @@ turf/simulated/floor/proc/update_icon()
|
||||
src.icon_state = "sand[pick("1","2","3")]"
|
||||
broken = 1
|
||||
|
||||
/turf/simulated/floor/proc/burn_tile()
|
||||
/turf/simulated/floor/proc/burn_tile(var/exposed_temperature)
|
||||
if(istype(src,/turf/simulated/floor/engine)) return
|
||||
if(istype(src,/turf/simulated/floor/plating/airless/asteroid)) return//Asteroid tiles don't burn
|
||||
if(broken || burnt) return
|
||||
if(is_plasteel_floor())
|
||||
src.icon_state = "damaged[pick(1,2,3,4,5)]"
|
||||
burnt = 1
|
||||
else if(is_plasteel_floor())
|
||||
|
||||
var/damage_temp = get_damage_temperature()
|
||||
|
||||
if(broken) return
|
||||
if(burnt)
|
||||
if(is_steel_floor() && exposed_temperature >= damage_temp) //allow upgrading from scorched tiles to damaged tiles
|
||||
src.icon_state = "damaged[pick(1,2,3,4,5)]"
|
||||
broken = 1
|
||||
return
|
||||
|
||||
if(is_steel_floor() && exposed_temperature >= T0C+300) //enough to char the floor, but not hot enough to actually burn holes in it
|
||||
src.icon_state = "floorscorched[pick(1,2)]"
|
||||
burnt = 1
|
||||
else if(is_plating())
|
||||
src.icon_state = "panelscorched"
|
||||
burnt = 1
|
||||
else if(is_wood_floor())
|
||||
src.icon_state = "wood-broken"
|
||||
burnt = 1
|
||||
else if(is_carpet_floor())
|
||||
src.icon_state = "carpet-broken"
|
||||
burnt = 1
|
||||
else if(is_grass_floor())
|
||||
src.icon_state = "sand[pick("1","2","3")]"
|
||||
burnt = 1
|
||||
else if(exposed_temperature >= damage_temp)
|
||||
if(is_steel_floor())
|
||||
src.icon_state = "damaged[pick(1,2,3,4,5)]"
|
||||
burnt = 1
|
||||
else if(is_plating())
|
||||
src.icon_state = "panelscorched"
|
||||
burnt = 1
|
||||
else if(is_wood_floor())
|
||||
src.icon_state = "wood-broken"
|
||||
burnt = 1
|
||||
else if(is_carpet_floor())
|
||||
src.icon_state = "carpet-broken"
|
||||
burnt = 1
|
||||
else if(is_grass_floor())
|
||||
src.icon_state = "sand[pick("1","2","3")]"
|
||||
burnt = 1
|
||||
|
||||
//This proc will set floor_type to null and the update_icon() proc will then change the icon_state of the turf
|
||||
//This proc auto corrects the grass tiles' siding.
|
||||
@@ -366,13 +386,13 @@ turf/simulated/floor/proc/update_icon()
|
||||
//This proc will make the turf a plasteel floor tile. The expected argument is the tile to make the turf with
|
||||
//If none is given it will make a new object. dropping or unequipping must be handled before or after calling
|
||||
//this proc.
|
||||
/turf/simulated/floor/proc/make_plasteel_floor(var/obj/item/stack/tile/plasteel/T = null)
|
||||
/turf/simulated/floor/proc/make_plasteel_floor(var/obj/item/stack/tile/steel/T = null)
|
||||
broken = 0
|
||||
burnt = 0
|
||||
intact = 1
|
||||
set_light(0)
|
||||
if(T)
|
||||
if(istype(T,/obj/item/stack/tile/plasteel))
|
||||
if(istype(T,/obj/item/stack/tile/steel))
|
||||
floor_type = T.type
|
||||
if (icon_regular_floor)
|
||||
icon_state = icon_regular_floor
|
||||
@@ -383,7 +403,7 @@ turf/simulated/floor/proc/update_icon()
|
||||
levelupdate()
|
||||
return
|
||||
//if you gave a valid parameter, it won't get thisf ar.
|
||||
floor_type = /obj/item/stack/tile/plasteel
|
||||
floor_type = /obj/item/stack/tile/steel
|
||||
icon_state = "floor"
|
||||
icon_regular_floor = icon_state
|
||||
|
||||
|
||||
@@ -267,10 +267,10 @@
|
||||
new /obj/structure/lattice(get_turf(src))
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/stack/tile/plasteel))
|
||||
if(istype(W, /obj/item/stack/tile/steel))
|
||||
var/obj/structure/lattice/L = locate(/obj/structure/lattice, src)
|
||||
if(L)
|
||||
var/obj/item/stack/tile/plasteel/S = W
|
||||
var/obj/item/stack/tile/steel/S = W
|
||||
if (S.get_amount() < 1)
|
||||
return
|
||||
del(L)
|
||||
|
||||
@@ -35,10 +35,10 @@
|
||||
ReplaceWithLattice()
|
||||
return
|
||||
|
||||
if (istype(C, /obj/item/stack/tile/plasteel))
|
||||
if (istype(C, /obj/item/stack/tile/steel))
|
||||
var/obj/structure/lattice/L = locate(/obj/structure/lattice, src)
|
||||
if(L)
|
||||
var/obj/item/stack/tile/plasteel/S = C
|
||||
var/obj/item/stack/tile/steel/S = C
|
||||
if (S.get_amount() < 1)
|
||||
return
|
||||
qdel(L)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
icon = 'icons/turf/floors.dmi'
|
||||
level = 1.0
|
||||
|
||||
//for floors, use is_plating(), is_plasteel_floor() and is_light_floor()
|
||||
//for floors, use is_plating(), is_steel_floor() and is_light_floor()
|
||||
var/intact = 1
|
||||
|
||||
//Properties for open tiles (/floor)
|
||||
@@ -29,6 +29,7 @@
|
||||
var/holy = 0
|
||||
|
||||
var/dynamic_lighting = 1
|
||||
luminosity = 1
|
||||
|
||||
/turf/New()
|
||||
..()
|
||||
@@ -37,7 +38,6 @@
|
||||
src.Entered(AM)
|
||||
return
|
||||
turfs |= src
|
||||
return
|
||||
|
||||
/turf/Destroy()
|
||||
turfs -= src
|
||||
@@ -156,7 +156,7 @@
|
||||
return 0
|
||||
/turf/proc/is_asteroid_floor()
|
||||
return 0
|
||||
/turf/proc/is_plasteel_floor()
|
||||
/turf/proc/is_steel_floor()
|
||||
return 0
|
||||
/turf/proc/is_light_floor()
|
||||
return 0
|
||||
@@ -225,6 +225,7 @@
|
||||
var/old_opacity = opacity
|
||||
var/old_dynamic_lighting = dynamic_lighting
|
||||
var/list/old_affecting_lights = affecting_lights
|
||||
var/old_lighting_overlay = lighting_overlay
|
||||
|
||||
//world << "Replacing [src.type] with [N]"
|
||||
|
||||
@@ -276,6 +277,7 @@
|
||||
W.levelupdate()
|
||||
. = W
|
||||
|
||||
lighting_overlay = old_lighting_overlay
|
||||
affecting_lights = old_affecting_lights
|
||||
if((old_opacity != opacity) || (dynamic_lighting != old_dynamic_lighting) || force_lighting_update)
|
||||
reconsider_lights()
|
||||
@@ -329,3 +331,11 @@
|
||||
|
||||
/turf/proc/process()
|
||||
return PROCESS_KILL
|
||||
|
||||
/turf/proc/contains_dense_objects()
|
||||
if(density)
|
||||
return 1
|
||||
for(var/atom/A in src)
|
||||
if(A.density && !(A.flags & ON_BORDER))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -19,3 +19,24 @@
|
||||
if(c_animation)
|
||||
qdel(c_animation)
|
||||
c_animation = null
|
||||
|
||||
proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,flick_anim as text,sleeptime = 0,direction as num)
|
||||
//This proc throws up either an icon or an animation for a specified amount of time.
|
||||
//The variables should be apparent enough.
|
||||
if(!location && target)
|
||||
location = get_turf(target)
|
||||
if(location && !target)
|
||||
target = location
|
||||
var/atom/movable/overlay/animation = PoolOrNew(/atom/movable/overlay, location)
|
||||
if(direction)
|
||||
animation.set_dir(direction)
|
||||
animation.icon = a_icon
|
||||
animation.layer = target:layer+1
|
||||
if(a_icon_state)
|
||||
animation.icon_state = a_icon_state
|
||||
else
|
||||
animation.icon_state = "blank"
|
||||
animation.master = target
|
||||
flick(flick_anim, animation)
|
||||
spawn(max(sleeptime, 15))
|
||||
qdel(animation)
|
||||
|
||||
@@ -11,15 +11,7 @@
|
||||
src << "You can't commit suicide before the game starts!"
|
||||
return
|
||||
|
||||
|
||||
var/permitted = 0
|
||||
var/list/allowed = list("Syndicate","traitor","Wizard","Head Revolutionary","Cultist","Changeling")
|
||||
for(var/T in allowed)
|
||||
if(mind.special_role == T)
|
||||
permitted = 1
|
||||
break
|
||||
|
||||
if(!permitted)
|
||||
if(!player_is_antag(mind))
|
||||
message_admins("[ckey] has tried to suicide, but they were not permitted due to not being antagonist as human.", 1)
|
||||
src << "No. Adminhelp if there is a legitimate reason."
|
||||
return
|
||||
|
||||
@@ -62,8 +62,10 @@
|
||||
|
||||
var/msg = ""
|
||||
var/modmsg = ""
|
||||
var/mentmsg = ""
|
||||
var/num_mods_online = 0
|
||||
var/num_admins_online = 0
|
||||
var/num_mentors_online = 0
|
||||
if(holder)
|
||||
for(var/client/C in admins)
|
||||
if(R_ADMIN & C.holder.rights || (!R_MOD & C.holder.rights && !R_MENTOR & C.holder.rights)) //Used to determine who shows up in admin rows
|
||||
@@ -88,7 +90,7 @@
|
||||
msg += "\n"
|
||||
|
||||
num_admins_online++
|
||||
else if(R_MOD & C.holder.rights || R_MENTOR & C.holder.rights) //Who shows up in mod/mentor rows.
|
||||
else if(R_MOD & C.holder.rights) //Who shows up in mod/mentor rows.
|
||||
modmsg += "\t[C] is a [C.holder.rank]"
|
||||
|
||||
if(isobserver(C.mob))
|
||||
@@ -103,17 +105,41 @@
|
||||
modmsg += "\n"
|
||||
num_mods_online++
|
||||
|
||||
else if(R_MENTOR & C.holder.rights)
|
||||
mentmsg += "\t[C] is a [C.holder.rank]"
|
||||
if(isobserver(C.mob))
|
||||
mentmsg += " - Observing"
|
||||
else if(istype(C.mob,/mob/new_player))
|
||||
mentmsg += " - Lobby"
|
||||
else
|
||||
mentmsg += " - Playing"
|
||||
|
||||
if(C.is_afk())
|
||||
mentmsg += " (AFK)"
|
||||
mentmsg += "\n"
|
||||
num_mentors_online++
|
||||
|
||||
else
|
||||
for(var/client/C in admins)
|
||||
if(R_ADMIN & C.holder.rights || (!R_MOD & C.holder.rights && !R_MENTOR & C.holder.rights))
|
||||
if(!C.holder.fakekey)
|
||||
msg += "\t[C] is a [C.holder.rank]\n"
|
||||
num_admins_online++
|
||||
else if (R_MOD & C.holder.rights || R_MENTOR & C.holder.rights)
|
||||
else if (R_MOD & C.holder.rights)
|
||||
modmsg += "\t[C] is a [C.holder.rank]\n"
|
||||
num_mods_online++
|
||||
else if (R_MENTOR & C.holder.rights)
|
||||
mentmsg += "\t[C] is a [C.holder.rank]\n"
|
||||
num_mentors_online++
|
||||
|
||||
if(config.admin_irc)
|
||||
src << "<span class='info'>Adminhelps are also sent to IRC. If no admins are available in game try anyway and an admin on IRC may see it and respond.</span>"
|
||||
msg = "<b>Current Admins ([num_admins_online]):</b>\n" + msg + "\n<b> Current [config.mods_are_mentors ? "Mentors" : "Moderators"]([num_mods_online]):</b>\n" + modmsg
|
||||
msg = "<b>Current Admins ([num_admins_online]):</b>\n" + msg
|
||||
|
||||
if(config.show_mods)
|
||||
msg += "\n<b> Current Moderators ([num_mods_online]):</b>\n" + modmsg
|
||||
|
||||
if(config.show_mentors)
|
||||
msg += "\n<b> Current Mentors ([num_mentors_online]):</b>\n" + mentmsg
|
||||
|
||||
src << msg
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user