Merge remote-tracking branch 'refs/remotes/Citadel-Station-13/master' into screenshake
This commit is contained in:
@@ -354,6 +354,7 @@
|
||||
|
||||
output += "<form method='GET' action='?src=\ref[src]'><b>Add custom ban:</b> (ONLY use this if you can't ban through any other method)"
|
||||
output += "<input type='hidden' name='src' value='\ref[src]'>"
|
||||
output += HrefTokenFormField()
|
||||
output += "<table width='100%'><tr>"
|
||||
output += "<td><b>Ban type:</b><select name='dbbanaddtype'>"
|
||||
output += "<option value=''>--</option>"
|
||||
@@ -387,6 +388,7 @@
|
||||
|
||||
output += "<form method='GET' action='?src=\ref[src]'><b>Search:</b> "
|
||||
output += "<input type='hidden' name='src' value='\ref[src]'>"
|
||||
output += HrefTokenFormField()
|
||||
output += "<b>Ckey:</b> <input type='text' name='dbsearchckey' value='[playerckey]'>"
|
||||
output += "<b>Admin ckey:</b> <input type='text' name='dbsearchadmin' value='[adminckey]'>"
|
||||
output += "<input type='submit' value='search'>"
|
||||
|
||||
@@ -380,8 +380,6 @@
|
||||
else
|
||||
dat+="I'm sorry to break your immersion. This shit's bugged. Report this bug to Agouri, polyxenitopalidou@gmail.com"
|
||||
|
||||
//to_chat(world, "Channelname: [src.admincaster_feed_channel.channel_name] [src.admincaster_feed_channel.author]")
|
||||
//to_chat(world, "Msg: [src.admincaster_feed_message.author] [src.admincaster_feed_message.body]")
|
||||
usr << browse(dat, "window=admincaster_main;size=400x600")
|
||||
onclose(usr, "admincaster_main")
|
||||
|
||||
@@ -433,7 +431,7 @@
|
||||
else
|
||||
rebootconfirm = TRUE
|
||||
if(rebootconfirm)
|
||||
var result = input(usr, "Select reboot method", "World Reboot", options[1]) as null|anything in options
|
||||
var/result = input(usr, "Select reboot method", "World Reboot", options[1]) as null|anything in options
|
||||
if(result)
|
||||
SSblackbox.add_details("admin_verb","Reboot World") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
switch(result)
|
||||
|
||||
@@ -27,7 +27,8 @@ GLOBAL_LIST_INIT(admin_verbs_admin, world.AVerbsAdmin())
|
||||
return list(
|
||||
/client/proc/invisimin, /*allows our mob to go invisible/visible*/
|
||||
// /datum/admins/proc/show_traitor_panel, /*interface which shows a mob's mind*/ -Removed due to rare practical use. Moved to debug verbs ~Errorage
|
||||
/datum/admins/proc/show_player_panel, /*shows an interface for individual players, with various links (links require additional flags_1*/
|
||||
/datum/admins/proc/show_player_panel, /*shows an interface for individual players, with various links (links require additional flags*/
|
||||
/datum/verbs/menu/Admin/verb/playerpanel,
|
||||
/client/proc/game_panel, /*game panel, allows to change game-mode etc*/
|
||||
/client/proc/check_ai_laws, /*shows AI and borg laws*/
|
||||
/datum/admins/proc/toggleooc, /*toggles ooc on/off for everyone*/
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
create_mob_html = file2text('html/create_object.html')
|
||||
create_mob_html = replacetext(create_mob_html, "null /* object types */", "\"[mobjs]\"")
|
||||
|
||||
user << browse(replacetext(create_mob_html, "/* ref src */", "\ref[src];[HrefToken()]"), "window=create_mob;size=425x475")
|
||||
user << browse(create_panel_helper(create_mob_html), "window=create_mob;size=425x475")
|
||||
|
||||
/proc/randomize_human(mob/living/carbon/human/H)
|
||||
H.gender = pick(MALE, FEMALE)
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
/datum/admins/proc/create_panel_helper(template)
|
||||
var/final_html = replacetext(template, "/* ref src */", "\ref[src];[HrefToken()]")
|
||||
final_html = replacetext(final_html,"/* hreftokenfield */","[HrefTokenFormField()]")
|
||||
return final_html
|
||||
|
||||
/datum/admins/proc/create_object(mob/user)
|
||||
var/static/create_object_html = null
|
||||
if (!create_object_html)
|
||||
@@ -6,7 +11,7 @@
|
||||
create_object_html = file2text('html/create_object.html')
|
||||
create_object_html = replacetext(create_object_html, "null /* object types */", "\"[objectjs]\"")
|
||||
|
||||
user << browse(replacetext(create_object_html, "/* ref src */", "\ref[src];[HrefToken()]"), "window=create_object;size=425x475")
|
||||
user << browse(create_panel_helper(create_object_html), "window=create_object;size=425x475")
|
||||
|
||||
/datum/admins/proc/quick_create_object(mob/user)
|
||||
var/static/list/create_object_forms = list(
|
||||
@@ -23,4 +28,4 @@
|
||||
html_form = replacetext(html_form, "null /* object types */", "\"[objectjs]\"")
|
||||
create_object_forms[path] = html_form
|
||||
|
||||
user << browse(replacetext(html_form, "/* ref src */", "\ref[src];[HrefToken()]"), "window=qco[path];size=425x475")
|
||||
user << browse(create_panel_helper(html_form), "window=qco[path];size=425x475")
|
||||
|
||||
@@ -6,4 +6,4 @@
|
||||
create_turf_html = file2text('html/create_object.html')
|
||||
create_turf_html = replacetext(create_turf_html, "null /* object types */", "\"[turfjs]\"")
|
||||
|
||||
user << browse(replacetext(create_turf_html, "/* ref src */", "\ref[src];[HrefToken()]"), "window=create_turf;size=425x475")
|
||||
user << browse(create_panel_helper(create_turf_html), "window=create_turf;size=425x475")
|
||||
|
||||
@@ -40,7 +40,7 @@ GLOBAL_PROTECT(href_token)
|
||||
for(var/I in 1 to 32)
|
||||
. += "[rand(10)]"
|
||||
|
||||
/proc/HrefToken(forceGlobal = FALSE)
|
||||
/proc/RawHrefToken(forceGlobal = FALSE)
|
||||
var/tok = GLOB.href_token
|
||||
if(!forceGlobal && usr)
|
||||
var/client/C = usr.client
|
||||
@@ -49,7 +49,13 @@ GLOBAL_PROTECT(href_token)
|
||||
var/datum/admins/holder = C.holder
|
||||
if(holder)
|
||||
tok = holder.href_token
|
||||
return "admin_token=[tok]"
|
||||
return tok
|
||||
|
||||
/proc/HrefToken(forceGlobal = FALSE)
|
||||
return "admin_token=[RawHrefToken(forceGlobal)]"
|
||||
|
||||
/proc/HrefTokenFormField(forceGlobal = FALSE)
|
||||
return "<input type='hidden' name='admin_token' value='[RawHrefToken(forceGlobal)]'>"
|
||||
|
||||
/datum/admins/proc/associate(client/C)
|
||||
if(IsAdminAdvancedProcCall())
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
if(!query_text || length(query_text) < 1)
|
||||
return
|
||||
|
||||
//to_chat(world, query_text)
|
||||
|
||||
var/list/query_list = SDQL2_tokenize(query_text)
|
||||
|
||||
|
||||
@@ -211,7 +211,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
|
||||
return ..()
|
||||
|
||||
/datum/admin_help/proc/AddInteraction(formatted_message)
|
||||
if(heard_by_no_admins && usr && usr.client != initiator)
|
||||
if(heard_by_no_admins && usr && usr.ckey != initiator_ckey)
|
||||
heard_by_no_admins = FALSE
|
||||
send2irc(initiator_ckey, "Ticket #[id]: Answered by [key_name(usr)]")
|
||||
_interactions += "[gameTimestamp()]: [formatted_message]"
|
||||
|
||||
@@ -108,8 +108,6 @@
|
||||
var/list/cached_gases = air.gases //this speeds things up because accessing datum vars is slow
|
||||
var/temperature = air.temperature
|
||||
var/list/cached_results = air.reaction_results
|
||||
|
||||
//to_chat(world, "pre [temperature], [cached_gases["o2"][MOLES]], [cached_gases["plasma"][MOLES]]")
|
||||
cached_results[id] = 0
|
||||
|
||||
//General volatile gas burn
|
||||
@@ -165,8 +163,6 @@
|
||||
if(new_heat_capacity > MINIMUM_HEAT_CAPACITY)
|
||||
air.temperature = (temperature*old_heat_capacity + energy_released)/new_heat_capacity
|
||||
|
||||
//to_chat(world, "post [temperature], [cached_gases["o2"][MOLES]], [cached_gases["plasma"][MOLES]]")
|
||||
|
||||
//let the floor know a fire is happening
|
||||
if(istype(location))
|
||||
temperature = air.temperature
|
||||
@@ -201,7 +197,6 @@
|
||||
//Fusion wont occur if the level of impurities is too high.
|
||||
return NO_REACTION
|
||||
|
||||
//to_chat(world, "pre [temperature, [cached_gases["plasma"][MOLES]], [cached_gases["co2"][MOLES]])
|
||||
var/old_heat_capacity = air.heat_capacity()
|
||||
var/carbon_efficency = min(cached_gases["plasma"][MOLES]/cached_gases["co2"][MOLES],MAX_CARBON_EFFICENCY)
|
||||
var/reaction_energy = air.thermal_energy()
|
||||
@@ -226,7 +221,6 @@
|
||||
if(new_heat_capacity > MINIMUM_HEAT_CAPACITY)
|
||||
air.temperature = max(((temperature*old_heat_capacity + reaction_energy)/new_heat_capacity),TCMB)
|
||||
//Prevents whatever mechanism is causing it to hit negative temperatures.
|
||||
//to_chat(world, "post [temperature], [cached_gases["plasma"][MOLES]], [cached_gases["co2"][MOLES]])
|
||||
return REACTING
|
||||
|
||||
#undef REACTING
|
||||
|
||||
@@ -415,7 +415,6 @@
|
||||
signal.data["sigtype"] = "command"
|
||||
|
||||
radio_connection.post_signal(src, signal, GLOB.RADIO_FROM_AIRALARM)
|
||||
// to_chat(world, text("Signal [] Broadcasted to []", command, target))
|
||||
|
||||
return 1
|
||||
|
||||
@@ -709,6 +708,16 @@
|
||||
qdel(W)
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/device/electroadaptive_pseudocircuit))
|
||||
var/obj/item/device/electroadaptive_pseudocircuit/P = W
|
||||
if(!P.adapt_circuit(user, 25))
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] fabricates a circuit and places it into [src].</span>", \
|
||||
"<span class='notice'>You adapt an air alarm circuit and slot it into the assembly.</span>")
|
||||
buildstage = 1
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/wrench))
|
||||
to_chat(user, "<span class='notice'>You detach \the [src] from the wall.</span>")
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
|
||||
@@ -1,70 +1,63 @@
|
||||
//node2, air2, network2 correspond to input
|
||||
//node1, air1, network1 correspond to output
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/circulator
|
||||
name = "circulator/heat exchanger"
|
||||
desc = "A gas circulator pump and heat exchanger."
|
||||
icon_state = "circ1-off"
|
||||
|
||||
var/side = CIRC_LEFT
|
||||
var/status = 0
|
||||
|
||||
var/last_pressure_delta = 0
|
||||
|
||||
//node2, air2, network2 correspond to input
|
||||
//node1, air1, network1 correspond to output
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/circulator
|
||||
name = "circulator/heat exchanger"
|
||||
desc = "A gas circulator pump and heat exchanger."
|
||||
icon_state = "circ1-off"
|
||||
|
||||
var/side = CIRC_LEFT
|
||||
var/status = 0
|
||||
|
||||
var/last_pressure_delta = 0
|
||||
|
||||
anchored = TRUE
|
||||
density = TRUE
|
||||
|
||||
var/global/const/CIRC_LEFT = 1
|
||||
var/global/const/CIRC_RIGHT = 2
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/circulator/proc/return_transfer_air()
|
||||
|
||||
var/datum/gas_mixture/air1 = AIR1
|
||||
var/datum/gas_mixture/air2 = AIR2
|
||||
|
||||
var/output_starting_pressure = air1.return_pressure()
|
||||
var/input_starting_pressure = air2.return_pressure()
|
||||
|
||||
if(output_starting_pressure >= input_starting_pressure-10)
|
||||
//Need at least 10 KPa difference to overcome friction in the mechanism
|
||||
last_pressure_delta = 0
|
||||
return null
|
||||
|
||||
//Calculate necessary moles to transfer using PV = nRT
|
||||
if(air2.temperature>0)
|
||||
var/pressure_delta = (input_starting_pressure - output_starting_pressure)/2
|
||||
|
||||
var/transfer_moles = pressure_delta*air1.volume/(air2.temperature * R_IDEAL_GAS_EQUATION)
|
||||
|
||||
last_pressure_delta = pressure_delta
|
||||
|
||||
//to_chat(world, "pressure_delta = [pressure_delta]; transfer_moles = [transfer_moles];")
|
||||
|
||||
//Actually transfer the gas
|
||||
var/datum/gas_mixture/removed = air2.remove(transfer_moles)
|
||||
|
||||
update_parents()
|
||||
|
||||
return removed
|
||||
|
||||
else
|
||||
last_pressure_delta = 0
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/circulator/process_atmos()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/circulator/update_icon()
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
icon_state = "circ[side]-p"
|
||||
else if(last_pressure_delta > 0)
|
||||
if(last_pressure_delta > ONE_ATMOSPHERE)
|
||||
icon_state = "circ[side]-run"
|
||||
else
|
||||
icon_state = "circ[side]-slow"
|
||||
else
|
||||
icon_state = "circ[side]-off"
|
||||
|
||||
return 1
|
||||
var/global/const/CIRC_LEFT = 1
|
||||
var/global/const/CIRC_RIGHT = 2
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/circulator/proc/return_transfer_air()
|
||||
|
||||
var/datum/gas_mixture/air1 = AIR1
|
||||
var/datum/gas_mixture/air2 = AIR2
|
||||
|
||||
var/output_starting_pressure = air1.return_pressure()
|
||||
var/input_starting_pressure = air2.return_pressure()
|
||||
|
||||
if(output_starting_pressure >= input_starting_pressure-10)
|
||||
//Need at least 10 KPa difference to overcome friction in the mechanism
|
||||
last_pressure_delta = 0
|
||||
return null
|
||||
|
||||
//Calculate necessary moles to transfer using PV = nRT
|
||||
if(air2.temperature>0)
|
||||
var/pressure_delta = (input_starting_pressure - output_starting_pressure)/2
|
||||
|
||||
var/transfer_moles = pressure_delta*air1.volume/(air2.temperature * R_IDEAL_GAS_EQUATION)
|
||||
|
||||
last_pressure_delta = pressure_delta
|
||||
var/datum/gas_mixture/removed = air2.remove(transfer_moles)
|
||||
|
||||
update_parents()
|
||||
|
||||
return removed
|
||||
|
||||
else
|
||||
last_pressure_delta = 0
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/circulator/process_atmos()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/circulator/update_icon()
|
||||
if(!is_operational())
|
||||
icon_state = "circ[side]-p"
|
||||
else if(last_pressure_delta > 0)
|
||||
if(last_pressure_delta > ONE_ATMOSPHERE)
|
||||
icon_state = "circ[side]-run"
|
||||
else
|
||||
icon_state = "circ[side]-slow"
|
||||
else
|
||||
icon_state = "circ[side]-off"
|
||||
|
||||
@@ -1,211 +1,207 @@
|
||||
/*
|
||||
Acts like a normal vent, but has an input AND output.
|
||||
*/
|
||||
#define EXT_BOUND 1
|
||||
#define INPUT_MIN 2
|
||||
#define OUTPUT_MAX 4
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/dp_vent_pump
|
||||
icon = 'icons/obj/atmospherics/components/unary_devices.dmi' //We reuse the normal vent icons!
|
||||
icon_state = "dpvent_map"
|
||||
|
||||
//node2 is output port
|
||||
//node1 is input port
|
||||
|
||||
name = "dual-port air vent"
|
||||
desc = "Has a valve and pump attached to it. There are two ports."
|
||||
|
||||
level = 1
|
||||
var/frequency = 0
|
||||
var/id = null
|
||||
var/datum/radio_frequency/radio_connection
|
||||
|
||||
/*
|
||||
Acts like a normal vent, but has an input AND output.
|
||||
*/
|
||||
#define EXT_BOUND 1
|
||||
#define INPUT_MIN 2
|
||||
#define OUTPUT_MAX 4
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/dp_vent_pump
|
||||
icon = 'icons/obj/atmospherics/components/unary_devices.dmi' //We reuse the normal vent icons!
|
||||
icon_state = "dpvent_map"
|
||||
|
||||
//node2 is output port
|
||||
//node1 is input port
|
||||
|
||||
name = "dual-port air vent"
|
||||
desc = "Has a valve and pump attached to it. There are two ports."
|
||||
|
||||
level = 1
|
||||
var/frequency = 0
|
||||
var/id = null
|
||||
var/datum/radio_frequency/radio_connection
|
||||
|
||||
var/on = FALSE
|
||||
var/pump_direction = 1 //0 = siphoning, 1 = releasing
|
||||
|
||||
var/external_pressure_bound = ONE_ATMOSPHERE
|
||||
var/input_pressure_min = 0
|
||||
var/output_pressure_max = 0
|
||||
|
||||
var/pressure_checks = EXT_BOUND
|
||||
//EXT_BOUND: Do not pass external_pressure_bound
|
||||
//INPUT_MIN: Do not pass input_pressure_min
|
||||
//OUTPUT_MAX: Do not pass output_pressure_max
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/dp_vent_pump/on
|
||||
on = TRUE
|
||||
icon_state = "dpvent_map_on"
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/dp_vent_pump/Destroy()
|
||||
var/pump_direction = 1 //0 = siphoning, 1 = releasing
|
||||
|
||||
var/external_pressure_bound = ONE_ATMOSPHERE
|
||||
var/input_pressure_min = 0
|
||||
var/output_pressure_max = 0
|
||||
|
||||
var/pressure_checks = EXT_BOUND
|
||||
//EXT_BOUND: Do not pass external_pressure_bound
|
||||
//INPUT_MIN: Do not pass input_pressure_min
|
||||
//OUTPUT_MAX: Do not pass output_pressure_max
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/dp_vent_pump/on
|
||||
on = TRUE
|
||||
icon_state = "dpvent_map_on"
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/dp_vent_pump/Destroy()
|
||||
SSradio.remove_object(src, frequency)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume
|
||||
name = "large dual-port air vent"
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/on
|
||||
on = TRUE
|
||||
icon_state = "dpvent_map_on"
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/New()
|
||||
..()
|
||||
var/datum/gas_mixture/air1 = AIR1
|
||||
var/datum/gas_mixture/air2 = AIR2
|
||||
air1.volume = 1000
|
||||
air2.volume = 1000
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/dp_vent_pump/update_icon_nopipes()
|
||||
cut_overlays()
|
||||
if(showpipe)
|
||||
add_overlay(getpipeimage('icons/obj/atmospherics/components/unary_devices.dmi', "dpvent_cap"))
|
||||
|
||||
if(!on || stat & (NOPOWER|BROKEN))
|
||||
icon_state = "vent_off"
|
||||
return
|
||||
|
||||
if(pump_direction)
|
||||
icon_state = "vent_out"
|
||||
else
|
||||
icon_state = "vent_in"
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/dp_vent_pump/process_atmos()
|
||||
..()
|
||||
|
||||
if(!on)
|
||||
return FALSE
|
||||
var/datum/gas_mixture/air1 = AIR1
|
||||
var/datum/gas_mixture/air2 = AIR2
|
||||
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
var/environment_pressure = environment.return_pressure()
|
||||
|
||||
if(pump_direction) //input -> external
|
||||
var/pressure_delta = 10000
|
||||
|
||||
if(pressure_checks&EXT_BOUND)
|
||||
pressure_delta = min(pressure_delta, (external_pressure_bound - environment_pressure))
|
||||
if(pressure_checks&INPUT_MIN)
|
||||
pressure_delta = min(pressure_delta, (air1.return_pressure() - input_pressure_min))
|
||||
|
||||
if(pressure_delta > 0)
|
||||
if(air1.temperature > 0)
|
||||
var/transfer_moles = pressure_delta*environment.volume/(air1.temperature * R_IDEAL_GAS_EQUATION)
|
||||
|
||||
var/datum/gas_mixture/removed = air1.remove(transfer_moles)
|
||||
//Removed can be null if there is no atmosphere in air1
|
||||
if(!removed)
|
||||
return FALSE
|
||||
|
||||
loc.assume_air(removed)
|
||||
air_update_turf()
|
||||
|
||||
var/datum/pipeline/parent1 = PARENT1
|
||||
parent1.update = 1
|
||||
|
||||
else //external -> output
|
||||
var/pressure_delta = 10000
|
||||
|
||||
if(pressure_checks&EXT_BOUND)
|
||||
pressure_delta = min(pressure_delta, (environment_pressure - external_pressure_bound))
|
||||
if(pressure_checks&INPUT_MIN)
|
||||
pressure_delta = min(pressure_delta, (output_pressure_max - air2.return_pressure()))
|
||||
|
||||
if(pressure_delta > 0)
|
||||
if(environment.temperature > 0)
|
||||
var/transfer_moles = pressure_delta*air2.volume/(environment.temperature * R_IDEAL_GAS_EQUATION)
|
||||
|
||||
var/datum/gas_mixture/removed = loc.remove_air(transfer_moles)
|
||||
//removed can be null if there is no air in the location
|
||||
if(!removed)
|
||||
return FALSE
|
||||
|
||||
air2.merge(removed)
|
||||
air_update_turf()
|
||||
|
||||
var/datum/pipeline/parent2 = PARENT2
|
||||
parent2.update = 1
|
||||
|
||||
return TRUE
|
||||
|
||||
//Radio remote control
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/dp_vent_pump/proc/set_frequency(new_frequency)
|
||||
SSradio.remove_object(src, frequency)
|
||||
frequency = new_frequency
|
||||
if(frequency)
|
||||
radio_connection = SSradio.add_object(src, frequency, filter = GLOB.RADIO_ATMOSIA)
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/dp_vent_pump/proc/broadcast_status()
|
||||
if(!radio_connection)
|
||||
return 0
|
||||
|
||||
var/datum/signal/signal = new
|
||||
signal.transmission_method = 1 //radio signal
|
||||
signal.source = src
|
||||
|
||||
signal.data = list(
|
||||
"tag" = id,
|
||||
"device" = "ADVP",
|
||||
"power" = on,
|
||||
"direction" = pump_direction?("release"):("siphon"),
|
||||
"checks" = pressure_checks,
|
||||
"input" = input_pressure_min,
|
||||
"output" = output_pressure_max,
|
||||
"external" = external_pressure_bound,
|
||||
"sigtype" = "status"
|
||||
)
|
||||
radio_connection.post_signal(src, signal, filter = GLOB.RADIO_ATMOSIA)
|
||||
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/dp_vent_pump/atmosinit()
|
||||
..()
|
||||
if(frequency)
|
||||
set_frequency(frequency)
|
||||
broadcast_status()
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/dp_vent_pump/receive_signal(datum/signal/signal)
|
||||
|
||||
if(!signal.data["tag"] || (signal.data["tag"] != id) || (signal.data["sigtype"]!="command"))
|
||||
return 0
|
||||
if("power" in signal.data)
|
||||
on = text2num(signal.data["power"])
|
||||
|
||||
if("power_toggle" in signal.data)
|
||||
on = !on
|
||||
|
||||
if("set_direction" in signal.data)
|
||||
pump_direction = text2num(signal.data["set_direction"])
|
||||
|
||||
if("checks" in signal.data)
|
||||
pressure_checks = text2num(signal.data["checks"])
|
||||
|
||||
if("purge" in signal.data)
|
||||
pressure_checks &= ~1
|
||||
pump_direction = 0
|
||||
|
||||
if("stabalize" in signal.data)
|
||||
pressure_checks |= 1
|
||||
pump_direction = 1
|
||||
|
||||
if("set_input_pressure" in signal.data)
|
||||
input_pressure_min = Clamp(text2num(signal.data["set_input_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
|
||||
if("set_output_pressure" in signal.data)
|
||||
output_pressure_max = Clamp(text2num(signal.data["set_output_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
|
||||
if("set_external_pressure" in signal.data)
|
||||
external_pressure_bound = Clamp(text2num(signal.data["set_external_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
|
||||
if("status" in signal.data)
|
||||
spawn(2)
|
||||
broadcast_status()
|
||||
return //do not update_icon
|
||||
//if(signal.data["tag"])
|
||||
spawn(2)
|
||||
broadcast_status()
|
||||
update_icon()
|
||||
|
||||
#undef EXT_BOUND
|
||||
#undef INPUT_MIN
|
||||
#undef OUTPUT_MAX
|
||||
return ..()
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume
|
||||
name = "large dual-port air vent"
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/on
|
||||
on = TRUE
|
||||
icon_state = "dpvent_map_on"
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume/New()
|
||||
..()
|
||||
var/datum/gas_mixture/air1 = AIR1
|
||||
var/datum/gas_mixture/air2 = AIR2
|
||||
air1.volume = 1000
|
||||
air2.volume = 1000
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/dp_vent_pump/update_icon_nopipes()
|
||||
cut_overlays()
|
||||
if(showpipe)
|
||||
add_overlay(getpipeimage('icons/obj/atmospherics/components/unary_devices.dmi', "dpvent_cap"))
|
||||
|
||||
if(!on || !is_operational())
|
||||
icon_state = "vent_off"
|
||||
return
|
||||
|
||||
if(pump_direction)
|
||||
icon_state = "vent_out"
|
||||
else
|
||||
icon_state = "vent_in"
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/dp_vent_pump/process_atmos()
|
||||
..()
|
||||
|
||||
if(!on)
|
||||
return
|
||||
var/datum/gas_mixture/air1 = AIR1
|
||||
var/datum/gas_mixture/air2 = AIR2
|
||||
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
var/environment_pressure = environment.return_pressure()
|
||||
|
||||
if(pump_direction) //input -> external
|
||||
var/pressure_delta = 10000
|
||||
|
||||
if(pressure_checks&EXT_BOUND)
|
||||
pressure_delta = min(pressure_delta, (external_pressure_bound - environment_pressure))
|
||||
if(pressure_checks&INPUT_MIN)
|
||||
pressure_delta = min(pressure_delta, (air1.return_pressure() - input_pressure_min))
|
||||
|
||||
if(pressure_delta > 0)
|
||||
if(air1.temperature > 0)
|
||||
var/transfer_moles = pressure_delta*environment.volume/(air1.temperature * R_IDEAL_GAS_EQUATION)
|
||||
|
||||
var/datum/gas_mixture/removed = air1.remove(transfer_moles)
|
||||
//Removed can be null if there is no atmosphere in air1
|
||||
if(!removed)
|
||||
return
|
||||
|
||||
loc.assume_air(removed)
|
||||
air_update_turf()
|
||||
|
||||
var/datum/pipeline/parent1 = PARENT1
|
||||
parent1.update = 1
|
||||
|
||||
else //external -> output
|
||||
var/pressure_delta = 10000
|
||||
|
||||
if(pressure_checks&EXT_BOUND)
|
||||
pressure_delta = min(pressure_delta, (environment_pressure - external_pressure_bound))
|
||||
if(pressure_checks&INPUT_MIN)
|
||||
pressure_delta = min(pressure_delta, (output_pressure_max - air2.return_pressure()))
|
||||
|
||||
if(pressure_delta > 0)
|
||||
if(environment.temperature > 0)
|
||||
var/transfer_moles = pressure_delta*air2.volume/(environment.temperature * R_IDEAL_GAS_EQUATION)
|
||||
|
||||
var/datum/gas_mixture/removed = loc.remove_air(transfer_moles)
|
||||
//removed can be null if there is no air in the location
|
||||
if(!removed)
|
||||
return
|
||||
|
||||
air2.merge(removed)
|
||||
air_update_turf()
|
||||
|
||||
var/datum/pipeline/parent2 = PARENT2
|
||||
parent2.update = 1
|
||||
|
||||
//Radio remote control
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/dp_vent_pump/proc/set_frequency(new_frequency)
|
||||
SSradio.remove_object(src, frequency)
|
||||
frequency = new_frequency
|
||||
if(frequency)
|
||||
radio_connection = SSradio.add_object(src, frequency, filter = GLOB.RADIO_ATMOSIA)
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/dp_vent_pump/proc/broadcast_status()
|
||||
if(!radio_connection)
|
||||
return
|
||||
|
||||
var/datum/signal/signal = new
|
||||
signal.transmission_method = 1 //radio signal
|
||||
signal.source = src
|
||||
|
||||
signal.data = list(
|
||||
"tag" = id,
|
||||
"device" = "ADVP",
|
||||
"power" = on,
|
||||
"direction" = pump_direction?("release"):("siphon"),
|
||||
"checks" = pressure_checks,
|
||||
"input" = input_pressure_min,
|
||||
"output" = output_pressure_max,
|
||||
"external" = external_pressure_bound,
|
||||
"sigtype" = "status"
|
||||
)
|
||||
radio_connection.post_signal(src, signal, filter = GLOB.RADIO_ATMOSIA)
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/dp_vent_pump/atmosinit()
|
||||
..()
|
||||
if(frequency)
|
||||
set_frequency(frequency)
|
||||
broadcast_status()
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/dp_vent_pump/receive_signal(datum/signal/signal)
|
||||
if(!signal.data["tag"] || (signal.data["tag"] != id) || (signal.data["sigtype"]!="command"))
|
||||
return
|
||||
|
||||
if("power" in signal.data)
|
||||
on = text2num(signal.data["power"])
|
||||
|
||||
if("power_toggle" in signal.data)
|
||||
on = !on
|
||||
|
||||
if("set_direction" in signal.data)
|
||||
pump_direction = text2num(signal.data["set_direction"])
|
||||
|
||||
if("checks" in signal.data)
|
||||
pressure_checks = text2num(signal.data["checks"])
|
||||
|
||||
if("purge" in signal.data)
|
||||
pressure_checks &= ~1
|
||||
pump_direction = 0
|
||||
|
||||
if("stabalize" in signal.data)
|
||||
pressure_checks |= 1
|
||||
pump_direction = 1
|
||||
|
||||
if("set_input_pressure" in signal.data)
|
||||
input_pressure_min = Clamp(text2num(signal.data["set_input_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
|
||||
if("set_output_pressure" in signal.data)
|
||||
output_pressure_max = Clamp(text2num(signal.data["set_output_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
|
||||
if("set_external_pressure" in signal.data)
|
||||
external_pressure_bound = Clamp(text2num(signal.data["set_external_pressure"]),0,ONE_ATMOSPHERE*50)
|
||||
|
||||
if("status" in signal.data)
|
||||
spawn(2)
|
||||
broadcast_status()
|
||||
return //do not update_icon
|
||||
//if(signal.data["tag"])
|
||||
spawn(2)
|
||||
broadcast_status()
|
||||
update_icon()
|
||||
|
||||
#undef EXT_BOUND
|
||||
#undef INPUT_MIN
|
||||
#undef OUTPUT_MAX
|
||||
|
||||
@@ -12,7 +12,7 @@ Passive gate is similar to the regular pump except:
|
||||
name = "passive gate"
|
||||
desc = "A one-way air valve that does not require power."
|
||||
|
||||
can_unwrench = 1
|
||||
can_unwrench = TRUE
|
||||
|
||||
var/on = FALSE
|
||||
var/target_pressure = ONE_ATMOSPHERE
|
||||
@@ -36,7 +36,7 @@ Passive gate is similar to the regular pump except:
|
||||
/obj/machinery/atmospherics/components/binary/passive_gate/process_atmos()
|
||||
..()
|
||||
if(!on)
|
||||
return 0
|
||||
return
|
||||
|
||||
var/datum/gas_mixture/air1 = AIR1
|
||||
var/datum/gas_mixture/air2 = AIR2
|
||||
@@ -47,7 +47,7 @@ Passive gate is similar to the regular pump except:
|
||||
if(output_starting_pressure >= min(target_pressure,input_starting_pressure-10))
|
||||
//No need to pump gas if target is already reached or input pressure is too low
|
||||
//Need at least 10 KPa difference to overcome friction in the mechanism
|
||||
return 1
|
||||
return
|
||||
|
||||
//Calculate necessary moles to transfer using PV = nRT
|
||||
if((air1.total_moles() > 0) && (air1.temperature>0))
|
||||
@@ -73,7 +73,7 @@ Passive gate is similar to the regular pump except:
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/passive_gate/proc/broadcast_status()
|
||||
if(!radio_connection)
|
||||
return 0
|
||||
return
|
||||
|
||||
var/datum/signal/signal = new
|
||||
signal.transmission_method = 1 //radio signal
|
||||
@@ -89,8 +89,6 @@ Passive gate is similar to the regular pump except:
|
||||
|
||||
radio_connection.post_signal(src, signal, filter = GLOB.RADIO_ATMOSIA)
|
||||
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/passive_gate/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
@@ -137,7 +135,7 @@ Passive gate is similar to the regular pump except:
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/passive_gate/receive_signal(datum/signal/signal)
|
||||
if(!signal.data["tag"] || (signal.data["tag"] != id) || (signal.data["sigtype"]!="command"))
|
||||
return 0
|
||||
return
|
||||
|
||||
var/old_on = on //for logging
|
||||
|
||||
@@ -159,16 +157,14 @@ Passive gate is similar to the regular pump except:
|
||||
|
||||
broadcast_status()
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/passive_gate/power_change()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/passive_gate/can_unwrench(mob/user)
|
||||
if(..())
|
||||
if(on)
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench [src], turn it off first!</span>")
|
||||
else
|
||||
return 1
|
||||
. = ..()
|
||||
if(. && on)
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench [src], turn it off first!</span>")
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
name = "gas pump"
|
||||
desc = "A pump that moves gas by pressure."
|
||||
|
||||
can_unwrench = 1
|
||||
can_unwrench = TRUE
|
||||
|
||||
var/on = FALSE
|
||||
var/target_pressure = ONE_ATMOSPHERE
|
||||
@@ -36,7 +36,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
return ..()
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/pump/update_icon_nopipes()
|
||||
if(stat & NOPOWER)
|
||||
if(!is_operational())
|
||||
icon_state = "pump_off"
|
||||
return
|
||||
|
||||
@@ -44,10 +44,8 @@ Thus, the two variables affect pump operation are set in New():
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/pump/process_atmos()
|
||||
// ..()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return 0
|
||||
if(!on)
|
||||
return 0
|
||||
if(!on || !is_operational())
|
||||
return
|
||||
|
||||
var/datum/gas_mixture/air1 = AIR1
|
||||
var/datum/gas_mixture/air2 = AIR2
|
||||
@@ -56,7 +54,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
|
||||
if((target_pressure - output_starting_pressure) < 0.01)
|
||||
//No need to pump gas if target is already reached!
|
||||
return 1
|
||||
return
|
||||
|
||||
//Calculate necessary moles to transfer using PV=nRT
|
||||
if((air1.total_moles() > 0) && (air1.temperature>0))
|
||||
@@ -69,8 +67,6 @@ Thus, the two variables affect pump operation are set in New():
|
||||
|
||||
update_parents()
|
||||
|
||||
return 1
|
||||
|
||||
//Radio remote control
|
||||
/obj/machinery/atmospherics/components/binary/pump/proc/set_frequency(new_frequency)
|
||||
SSradio.remove_object(src, frequency)
|
||||
@@ -80,7 +76,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/pump/proc/broadcast_status()
|
||||
if(!radio_connection)
|
||||
return 0
|
||||
return
|
||||
|
||||
var/datum/signal/signal = new
|
||||
signal.transmission_method = 1 //radio signal
|
||||
@@ -96,8 +92,6 @@ Thus, the two variables affect pump operation are set in New():
|
||||
|
||||
radio_connection.post_signal(src, signal, filter = GLOB.RADIO_ATMOSIA)
|
||||
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/pump/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
@@ -121,8 +115,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
if("power")
|
||||
on = !on
|
||||
investigate_log("Pump, [src.name], was turned [on ? "on" : "off"] by [key_name(usr)] at [x], [y], [z], [A]", INVESTIGATE_ATMOS)
|
||||
message_admins("Pump, [src.name], turned [on ? "on" : "off"] by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)]")
|
||||
log_admin("[key_name(usr)] manipulated a pump at [x], [y], [z]")
|
||||
message_admins("Pump, [src.name], turned [on ? "on" : "off"] by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)], [A]")
|
||||
. = TRUE
|
||||
if("pressure")
|
||||
var/pressure = params["pressure"]
|
||||
@@ -139,8 +132,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
if(.)
|
||||
target_pressure = Clamp(pressure, 0, MAX_OUTPUT_PRESSURE)
|
||||
investigate_log("Pump, [src.name], was set to [target_pressure] kPa by [key_name(usr)] at [x], [y], [z], [A]", INVESTIGATE_ATMOS)
|
||||
message_admins("Pump, [src.name], was set to [target_pressure] kPa by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)]")
|
||||
log_admin("[key_name(usr)] manipulated a pump at [x], [y], [z]")
|
||||
message_admins("Pump, [src.name], was set to [target_pressure] kPa by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)], [A]")
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/pump/atmosinit()
|
||||
@@ -150,7 +142,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/pump/receive_signal(datum/signal/signal)
|
||||
if(!signal.data["tag"] || (signal.data["tag"] != id) || (signal.data["sigtype"]!="command"))
|
||||
return 0
|
||||
return
|
||||
|
||||
var/old_on = on //for logging
|
||||
|
||||
@@ -172,21 +164,18 @@ Thus, the two variables affect pump operation are set in New():
|
||||
|
||||
broadcast_status()
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/pump/power_change()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/pump/can_unwrench(mob/user)
|
||||
if(..())
|
||||
var/turf/T = get_turf(src)
|
||||
var/area/A = get_area(src)
|
||||
if(!(stat & NOPOWER) && on)
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench [src], turn it off first!</span>")
|
||||
else
|
||||
investigate_log("Pump, [src.name], was unwrenched by [key_name(usr)] at [x], [y], [z], [A]", INVESTIGATE_ATMOS)
|
||||
message_admins("Pump, [src.name], was unwrenched by [ADMIN_LOOKUPFLW(user)] at [ADMIN_COORDJMP(T)]")
|
||||
log_admin("[key_name(usr)] unwrenched a pump at [x], [y], [z]")
|
||||
return 1
|
||||
|
||||
. = ..()
|
||||
var/area/A = get_area(src)
|
||||
if(. && on && is_operational())
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench [src], turn it off first!</span>")
|
||||
return FALSE
|
||||
else
|
||||
investigate_log("Pump, [src.name], was unwrenched by [key_name(usr)] at [x], [y], [z], [A]", INVESTIGATE_ATMOS)
|
||||
message_admins("Pump, [src.name], was unwrenched by [ADMIN_LOOKUPFLW(user)] at [A]")
|
||||
return TRUE
|
||||
|
||||
@@ -7,7 +7,7 @@ It's like a regular ol' straight pipe, but you can turn it on and off.
|
||||
name = "manual valve"
|
||||
desc = "A pipe valve"
|
||||
|
||||
can_unwrench = 1
|
||||
can_unwrench = TRUE
|
||||
|
||||
var/frequency = 0
|
||||
var/id = null
|
||||
@@ -57,8 +57,7 @@ It's like a regular ol' straight pipe, but you can turn it on and off.
|
||||
var/turf/T = get_turf(src)
|
||||
var/area/A = get_area(src)
|
||||
investigate_log("Valve, [src.name], was manipiulated by [key_name(usr)] at [x], [y], [z], [A]", "atmos")
|
||||
message_admins("Valve, [src.name], was manipulated by [ADMIN_LOOKUPFLW(user)] at [ADMIN_COORDJMP(T)]")
|
||||
log_admin("[key_name(usr)] manipulated a manual valve at [x], [y], [z]")
|
||||
message_admins("Valve, [src.name], was manipulated by [ADMIN_LOOKUPFLW(user)] at [ADMIN_COORDJMP(T)], [A]")
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/valve/digital // can be controlled by AI
|
||||
@@ -71,7 +70,7 @@ It's like a regular ol' straight pipe, but you can turn it on and off.
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/valve/digital/update_icon_nopipes(animation)
|
||||
if(stat & NOPOWER)
|
||||
if(!is_operational())
|
||||
normalize_dir()
|
||||
icon_state = "dvalve_nopower"
|
||||
return
|
||||
|
||||
@@ -17,7 +17,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
name = "volumetric gas pump"
|
||||
desc = "A pump that moves gas by volume."
|
||||
|
||||
can_unwrench = 1
|
||||
can_unwrench = TRUE
|
||||
|
||||
var/on = FALSE
|
||||
var/transfer_rate = MAX_TRANSFER_RATE
|
||||
@@ -34,7 +34,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
on = TRUE
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/volume_pump/update_icon_nopipes()
|
||||
if(stat & NOPOWER)
|
||||
if(!is_operational())
|
||||
icon_state = "volpump_off"
|
||||
return
|
||||
|
||||
@@ -42,10 +42,8 @@ Thus, the two variables affect pump operation are set in New():
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/volume_pump/process_atmos()
|
||||
// ..()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
if(!on || !is_operational())
|
||||
return
|
||||
if(!on)
|
||||
return 0
|
||||
|
||||
var/datum/gas_mixture/air1 = AIR1
|
||||
var/datum/gas_mixture/air2 = AIR2
|
||||
@@ -56,7 +54,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
var/output_starting_pressure = air2.return_pressure()
|
||||
|
||||
if((input_starting_pressure < 0.01) || (output_starting_pressure > 9000))
|
||||
return 1
|
||||
return
|
||||
|
||||
var/transfer_ratio = min(1, transfer_rate/air1.volume)
|
||||
|
||||
@@ -66,8 +64,6 @@ Thus, the two variables affect pump operation are set in New():
|
||||
|
||||
update_parents()
|
||||
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/volume_pump/proc/set_frequency(new_frequency)
|
||||
SSradio.remove_object(src, frequency)
|
||||
frequency = new_frequency
|
||||
@@ -76,7 +72,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/volume_pump/proc/broadcast_status()
|
||||
if(!radio_connection)
|
||||
return 0
|
||||
return
|
||||
|
||||
var/datum/signal/signal = new
|
||||
signal.transmission_method = 1 //radio signal
|
||||
@@ -91,8 +87,6 @@ Thus, the two variables affect pump operation are set in New():
|
||||
)
|
||||
radio_connection.post_signal(src, signal)
|
||||
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/volume_pump/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
@@ -116,14 +110,12 @@ Thus, the two variables affect pump operation are set in New():
|
||||
if(..())
|
||||
return
|
||||
var/turf/T = get_turf(src)
|
||||
//var/area/A = get_area(src)
|
||||
var/area/A = get_area(src)
|
||||
switch(action)
|
||||
if("power")
|
||||
on = !on
|
||||
investigate_log("Volume Pump, [src.name], was turned [on ? "on" : "off"] by [key_name(usr)] at [x], [y], [z], [loc.loc]", INVESTIGATE_ATMOS)
|
||||
message_admins("Volume Pump, [src.name], turned [on ? "on" : "off"] by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)]")
|
||||
log_admin("[key_name(usr)] manipulated a volume pump at [x], [y], [z]")
|
||||
|
||||
investigate_log("Volume Pump, [src.name], was turned [on ? "on" : "off"] by [key_name(usr)] at [x], [y], [z], [A]", INVESTIGATE_ATMOS)
|
||||
message_admins("Volume Pump, [src.name], turned [on ? "on" : "off"] by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)], [A]")
|
||||
. = TRUE
|
||||
if("rate")
|
||||
var/rate = params["rate"]
|
||||
@@ -139,14 +131,13 @@ Thus, the two variables affect pump operation are set in New():
|
||||
. = TRUE
|
||||
if(.)
|
||||
transfer_rate = Clamp(rate, 0, MAX_TRANSFER_RATE)
|
||||
investigate_log("Volume Pump, [src.name], was set to [transfer_rate] L/s by [key_name(usr)] at [x], [y], [z], [loc.loc]", INVESTIGATE_ATMOS)
|
||||
message_admins("Volume Pump, [src.name], was set to [transfer_rate] L/s by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)]")
|
||||
log_admin("[key_name(usr)] manipulated a volume pump at [x], [y], [z]")
|
||||
investigate_log("Volume Pump, [src.name], was set to [transfer_rate] L/s by [key_name(usr)] at [x], [y], [z], [A]", INVESTIGATE_ATMOS)
|
||||
message_admins("Volume Pump, [src.name], was set to [transfer_rate] L/s by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)], [A]")
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/volume_pump/receive_signal(datum/signal/signal)
|
||||
if(!signal.data["tag"] || (signal.data["tag"] != id) || (signal.data["sigtype"]!="command"))
|
||||
return 0
|
||||
return
|
||||
|
||||
var/old_on = on //for logging
|
||||
|
||||
@@ -169,22 +160,18 @@ Thus, the two variables affect pump operation are set in New():
|
||||
|
||||
broadcast_status()
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/volume_pump/power_change()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/volume_pump/can_unwrench(mob/user)
|
||||
if(..())
|
||||
var/turf/T = get_turf(src)
|
||||
//var/area/A = get_area(src)
|
||||
if(!(stat & NOPOWER) && on)
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench [src], turn it off first!</span>")
|
||||
else
|
||||
investigate_log("Volume Pump, [src.name], was unwrenched by [key_name(usr)] at [x], [y], [z], [loc.loc]", INVESTIGATE_ATMOS)
|
||||
message_admins("Volume Pump, [src.name], was unwrenched by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)]")
|
||||
log_admin("[key_name(usr)] unwrenched a volume pump at [x], [y], [z]")
|
||||
|
||||
return 1
|
||||
|
||||
. = ..()
|
||||
var/area/A = get_area(src)
|
||||
if(. && on && is_operational())
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench [src], turn it off first!</span>")
|
||||
return FALSE
|
||||
else
|
||||
investigate_log("Volume Pump, [src.name], was unwrenched by [key_name(usr)] at [x], [y], [z], [A]", INVESTIGATE_ATMOS)
|
||||
message_admins("Volume Pump, [src.name], was unwrenched by [ADMIN_LOOKUPFLW(usr)] at [A]")
|
||||
return
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "gas filter"
|
||||
icon_state = "filter_off"
|
||||
density = FALSE
|
||||
can_unwrench = 1
|
||||
can_unwrench = TRUE
|
||||
var/on = FALSE
|
||||
var/target_pressure = ONE_ATMOSPHERE
|
||||
var/filter_type = ""
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
/obj/machinery/atmospherics/components/trinary/filter/flipped
|
||||
icon_state = "filter_off_f"
|
||||
flipped = 1
|
||||
flipped = TRUE
|
||||
|
||||
// These two filter types have critical_machine flagged to on and thus causes the area they are in to be exempt from the Grid Check event.
|
||||
|
||||
@@ -43,27 +43,21 @@
|
||||
..()
|
||||
|
||||
/obj/machinery/atmospherics/components/trinary/filter/update_icon_nopipes()
|
||||
|
||||
if(!(stat & NOPOWER) && on && NODE1 && NODE2 && NODE3)
|
||||
if(on && NODE1 && NODE2 && NODE3 && is_operational())
|
||||
icon_state = "filter_on[flipped?"_f":""]"
|
||||
return
|
||||
|
||||
icon_state = "filter_off[flipped?"_f":""]"
|
||||
|
||||
/obj/machinery/atmospherics/components/trinary/filter/power_change()
|
||||
var/old_stat = stat
|
||||
..()
|
||||
if(stat & NOPOWER)
|
||||
on = FALSE
|
||||
if(old_stat != stat)
|
||||
if(stat != old_stat)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/components/trinary/filter/process_atmos()
|
||||
..()
|
||||
if(!on)
|
||||
return 0
|
||||
if(!(NODE1 && NODE2 && NODE3))
|
||||
return 0
|
||||
if(!on || !(NODE1 && NODE2 && NODE3) || !is_operational())
|
||||
return
|
||||
|
||||
var/datum/gas_mixture/air1 = AIR1
|
||||
var/datum/gas_mixture/air2 = AIR2
|
||||
@@ -73,7 +67,7 @@
|
||||
|
||||
if(output_starting_pressure >= target_pressure)
|
||||
//No need to mix if target is already full!
|
||||
return 1
|
||||
return
|
||||
|
||||
//Calculate necessary moles to transfer using PV=nRT
|
||||
|
||||
@@ -113,8 +107,6 @@
|
||||
|
||||
update_parents()
|
||||
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/components/trinary/filter/atmosinit()
|
||||
set_frequency(frequency)
|
||||
return ..()
|
||||
@@ -167,3 +159,10 @@
|
||||
investigate_log("was set to filter [filter_name] by [key_name(usr)]", INVESTIGATE_ATMOS)
|
||||
. = TRUE
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/components/trinary/filter/can_unwrench(mob/user)
|
||||
. = ..()
|
||||
if(. && on && is_operational())
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench [src], turn it off first!</span>")
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
density = FALSE
|
||||
|
||||
name = "gas mixer"
|
||||
can_unwrench = 1
|
||||
can_unwrench = TRUE
|
||||
|
||||
var/on = FALSE
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
/obj/machinery/atmospherics/components/trinary/mixer/flipped
|
||||
icon_state = "mixer_off_f"
|
||||
flipped = 1
|
||||
flipped = TRUE
|
||||
|
||||
/obj/machinery/atmospherics/components/trinary/mixer/update_icon()
|
||||
cut_overlays()
|
||||
@@ -29,18 +29,15 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/atmospherics/components/trinary/mixer/update_icon_nopipes()
|
||||
if(!(stat & NOPOWER) && on && NODE1 && NODE2 && NODE3)
|
||||
if(on && NODE1 && NODE2 && NODE3 && is_operational())
|
||||
icon_state = "mixer_on[flipped?"_f":""]"
|
||||
return
|
||||
|
||||
icon_state = "mixer_off[flipped?"_f":""]"
|
||||
|
||||
/obj/machinery/atmospherics/components/trinary/mixer/power_change()
|
||||
var/old_stat = stat
|
||||
..()
|
||||
if(stat & NOPOWER)
|
||||
on = FALSE
|
||||
if(old_stat != stat)
|
||||
if(stat != old_stat)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/components/trinary/mixer/New()
|
||||
@@ -51,10 +48,8 @@
|
||||
|
||||
/obj/machinery/atmospherics/components/trinary/mixer/process_atmos()
|
||||
..()
|
||||
if(!on)
|
||||
return 0
|
||||
if(!(NODE1 && NODE2 && NODE3))
|
||||
return 0
|
||||
if(!on || !(NODE1 && NODE2 && NODE3) && !is_operational())
|
||||
return
|
||||
|
||||
var/datum/gas_mixture/air1 = AIR1
|
||||
var/datum/gas_mixture/air2 = AIR2
|
||||
@@ -64,7 +59,7 @@
|
||||
|
||||
if(output_starting_pressure >= target_pressure)
|
||||
//No need to mix if target is already full!
|
||||
return 1
|
||||
return
|
||||
|
||||
//Calculate necessary moles to transfer using PV=nRT
|
||||
|
||||
@@ -114,7 +109,7 @@
|
||||
var/datum/pipeline/parent3 = PARENT3
|
||||
parent3.update = TRUE
|
||||
|
||||
return TRUE
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/components/trinary/mixer/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
@@ -167,4 +162,12 @@
|
||||
node1_concentration = max(0, min(1, node1_concentration - value))
|
||||
investigate_log("was set to [node2_concentration] % on node 2 by [key_name(usr)]", INVESTIGATE_ATMOS)
|
||||
. = TRUE
|
||||
update_icon()
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/components/trinary/filter/can_unwrench(mob/user)
|
||||
. = ..()
|
||||
if(. && on && is_operational())
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench [src], turn it off first!</span>")
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
device_type = TRINARY
|
||||
layer = GAS_FILTER_LAYER
|
||||
|
||||
var/flipped = 0
|
||||
var/flipped = FALSE
|
||||
|
||||
/obj/machinery/atmospherics/components/trinary/SetInitDirections()
|
||||
switch(dir)
|
||||
@@ -44,4 +44,4 @@ Housekeeping and pipe network stuff
|
||||
node1_connect = turn(node1_connect, 180)
|
||||
node3_connect = turn(node3_connect, 180)
|
||||
|
||||
return list(node1_connect, node2_connect, node3_connect)
|
||||
return list(node1_connect, node2_connect, node3_connect)
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
occupant_overlay.dir = SOUTH
|
||||
occupant_overlay.pixel_y = 22
|
||||
|
||||
if(on && is_operational() && !running_bob_anim)
|
||||
if(on && !running_bob_anim && is_operational())
|
||||
icon_state = "pod-on"
|
||||
running_bob_anim = TRUE
|
||||
run_bob_anim(TRUE, occupant_overlay)
|
||||
@@ -349,7 +349,7 @@
|
||||
data["cellTemperature"] = round(air1.temperature, 1)
|
||||
|
||||
data["isBeakerLoaded"] = beaker ? TRUE : FALSE
|
||||
var beakerContents = list()
|
||||
var/beakerContents = list()
|
||||
if(beaker && beaker.reagents && beaker.reagents.reagent_list.len)
|
||||
for(var/datum/reagent/R in beaker.reagents.reagent_list)
|
||||
beakerContents += list(list("name" = R.name, "volume" = R.volume))
|
||||
@@ -378,6 +378,8 @@
|
||||
if("ejectbeaker")
|
||||
if(beaker)
|
||||
beaker.forceMove(loc)
|
||||
if(Adjacent(usr) && !issilicon(usr))
|
||||
usr.put_in_hands(beaker)
|
||||
beaker = null
|
||||
. = TRUE
|
||||
update_icon()
|
||||
@@ -394,4 +396,11 @@
|
||||
/obj/machinery/atmospherics/components/unary/cryo_cell/can_see_pipes()
|
||||
return 0 //you can't see the pipe network when inside a cryo cell.
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/cryo_cell/return_temperature()
|
||||
var/datum/gas_mixture/G = AIR1
|
||||
|
||||
if(G.total_moles() > 10)
|
||||
return G.temperature
|
||||
return ..()
|
||||
|
||||
#undef CRYOMOBS
|
||||
|
||||
@@ -10,12 +10,7 @@
|
||||
var/update_cycle
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/generator_input/update_icon()
|
||||
if(NODE1)
|
||||
icon_state = "intact"
|
||||
else
|
||||
icon_state = "exposed"
|
||||
|
||||
return
|
||||
icon_state = NODE1 ? "intact" : "exposed"
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/generator_input/proc/return_exchange_air()
|
||||
return AIR1
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
name = "heat exchanger"
|
||||
desc = "Exchanges heat between two input gases. Setup for fast heat transfer"
|
||||
|
||||
can_unwrench = 1
|
||||
can_unwrench = TRUE
|
||||
|
||||
layer = LOW_OBJ_LAYER
|
||||
|
||||
@@ -20,8 +20,6 @@
|
||||
else
|
||||
icon_state = "he_exposed"
|
||||
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/heat_exchanger/atmosinit()
|
||||
if(!partner)
|
||||
var/partner_connect = turn(dir,180)
|
||||
@@ -36,11 +34,8 @@
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/heat_exchanger/process_atmos()
|
||||
..()
|
||||
if(!partner)
|
||||
return 0
|
||||
|
||||
if(SSair.times_fired <= update_cycle)
|
||||
return 0
|
||||
if(!partner || SSair.times_fired <= update_cycle)
|
||||
return
|
||||
|
||||
update_cycle = SSair.times_fired
|
||||
partner.update_cycle = SSair.times_fired
|
||||
@@ -67,5 +62,3 @@
|
||||
|
||||
if(abs(other_old_temperature-partner_air_contents.temperature) > 1)
|
||||
partner.update_parents()
|
||||
|
||||
return 1
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
if(showpipe)
|
||||
add_overlay(getpipeimage(icon, "inje_cap", initialize_directions))
|
||||
|
||||
if(!NODE1 || !on || stat & (NOPOWER|BROKEN))
|
||||
if(!NODE1 || !on || !is_operational())
|
||||
icon_state = "inje_off"
|
||||
return
|
||||
|
||||
@@ -47,8 +47,8 @@
|
||||
..()
|
||||
injecting = 0
|
||||
|
||||
if(!on || stat & (NOPOWER|BROKEN))
|
||||
return 0
|
||||
if(!on || !is_operational())
|
||||
return
|
||||
|
||||
var/datum/gas_mixture/air_contents = AIR1
|
||||
|
||||
@@ -62,11 +62,9 @@
|
||||
|
||||
update_parents()
|
||||
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/outlet_injector/proc/inject()
|
||||
if(on || injecting || stat & (NOPOWER|BROKEN))
|
||||
return 0
|
||||
if(on || injecting || !is_operational())
|
||||
return
|
||||
|
||||
var/datum/gas_mixture/air_contents = AIR1
|
||||
|
||||
@@ -91,7 +89,7 @@
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/outlet_injector/proc/broadcast_status()
|
||||
if(!radio_connection)
|
||||
return 0
|
||||
return
|
||||
|
||||
var/datum/signal/signal = new
|
||||
signal.transmission_method = 1 //radio signal
|
||||
@@ -108,8 +106,6 @@
|
||||
|
||||
radio_connection.post_signal(src, signal)
|
||||
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/outlet_injector/atmosinit()
|
||||
set_frequency(frequency)
|
||||
broadcast_status()
|
||||
@@ -117,7 +113,7 @@
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/outlet_injector/receive_signal(datum/signal/signal)
|
||||
if(!signal.data["tag"] || (signal.data["tag"] != id) || (signal.data["sigtype"]!="command"))
|
||||
return 0
|
||||
return
|
||||
|
||||
if("power" in signal.data)
|
||||
on = text2num(signal.data["power"])
|
||||
@@ -139,8 +135,6 @@
|
||||
broadcast_status()
|
||||
return //do not update_icon
|
||||
|
||||
//log_admin("DEBUG \[[world.timeofday]\]: outlet_injector/receive_signal: unknown command \"[signal.data["command"]]\"\n[signal.debug_print()]")
|
||||
//return
|
||||
spawn(2)
|
||||
broadcast_status()
|
||||
update_icon()
|
||||
@@ -188,9 +182,8 @@
|
||||
broadcast_status()
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/outlet_injector/can_unwrench(mob/user)
|
||||
if(..())
|
||||
if (!(stat & NOPOWER|BROKEN) && on)
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench [src], turn it off first!</span>")
|
||||
else
|
||||
return 1
|
||||
. = ..()
|
||||
if(. && on && is_operational())
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench [src], turn it off first!</span>")
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
if(showpipe)
|
||||
add_overlay(getpipeimage('icons/obj/atmospherics/components/unary_devices.dmi', "scrub_cap", initialize_directions)) //it works for now
|
||||
|
||||
if(!NODE1 || !on || stat & BROKEN)
|
||||
if(!NODE1 || !on || !is_operational())
|
||||
icon_state = "o2gen_off"
|
||||
return
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
desc = "For connecting portables devices related to atmospherics control."
|
||||
icon = 'icons/obj/atmospherics/components/unary_devices.dmi'
|
||||
icon_state = "connector_map" //Only for mapping purposes, so mappers can see direction
|
||||
can_unwrench = 1
|
||||
can_unwrench = TRUE
|
||||
var/obj/machinery/portable_atmospherics/connected_device
|
||||
use_power = NO_POWER_USE
|
||||
level = 0
|
||||
@@ -29,11 +29,10 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/portables_connector/can_unwrench(mob/user)
|
||||
if(..())
|
||||
if(connected_device)
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench [src], detach [connected_device] first!</span>")
|
||||
else
|
||||
return 1
|
||||
. = ..()
|
||||
if(. && connected_device)
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench [src], detach [connected_device] first!</span>")
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/portables_connector/portableConnectorReturnAir()
|
||||
return connected_device.portableConnectorReturnAir()
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
icon_state = icon_state_on
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/thermomachine/update_icon_nopipes()
|
||||
cut_overlays()
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
desc = "Has a valve and pump attached to it."
|
||||
icon_state = "vent_map"
|
||||
use_power = IDLE_POWER_USE
|
||||
can_unwrench = 1
|
||||
can_unwrench = TRUE
|
||||
welded = FALSE
|
||||
level = 1
|
||||
layer = GAS_SCRUBBER_LAYER
|
||||
@@ -92,7 +92,7 @@
|
||||
icon_state = "vent_welded"
|
||||
return
|
||||
|
||||
if(!NODE1 || !on || stat & (NOPOWER|BROKEN))
|
||||
if(!NODE1 || !on || !is_operational())
|
||||
icon_state = "vent_off"
|
||||
return
|
||||
|
||||
@@ -103,12 +103,12 @@
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/vent_pump/process_atmos()
|
||||
..()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
if(!is_operational())
|
||||
return
|
||||
if (!NODE1)
|
||||
if(!NODE1)
|
||||
on = FALSE
|
||||
if(!on || welded)
|
||||
return 0
|
||||
return
|
||||
|
||||
var/datum/gas_mixture/air_contents = AIR1
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
@@ -150,8 +150,6 @@
|
||||
air_update_turf()
|
||||
update_parents()
|
||||
|
||||
return 1
|
||||
|
||||
//Radio remote control
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/vent_pump/proc/set_frequency(new_frequency)
|
||||
@@ -162,7 +160,7 @@
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/vent_pump/proc/broadcast_status()
|
||||
if(!radio_connection)
|
||||
return 0
|
||||
return
|
||||
|
||||
var/datum/signal/signal = new
|
||||
signal.transmission_method = 1 //radio signal
|
||||
@@ -189,8 +187,6 @@
|
||||
|
||||
radio_connection.post_signal(src, signal, radio_filter_out)
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/vent_pump/atmosinit()
|
||||
//some vents work his own spesial way
|
||||
@@ -202,11 +198,11 @@
|
||||
..()
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/vent_pump/receive_signal(datum/signal/signal)
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
if(!is_operational())
|
||||
return
|
||||
//log_admin("DEBUG \[[world.timeofday]\]: /obj/machinery/atmospherics/components/unary/vent_pump/receive_signal([signal.debug_print()])")
|
||||
if(!signal.data["tag"] || (signal.data["tag"] != id_tag) || (signal.data["sigtype"]!="command"))
|
||||
return 0
|
||||
return
|
||||
|
||||
if("purge" in signal.data)
|
||||
pressure_checks &= ~EXT_BOUND
|
||||
@@ -257,7 +253,6 @@
|
||||
//log_admin("DEBUG \[[world.timeofday]\]: vent_pump/receive_signal: unknown command \"[signal.data["command"]]\"\n[signal.debug_print()]")
|
||||
broadcast_status()
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/vent_pump/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weldingtool))
|
||||
@@ -266,7 +261,8 @@
|
||||
playsound(loc, WT.usesound, 40, 1)
|
||||
to_chat(user, "<span class='notice'>You begin welding the vent...</span>")
|
||||
if(do_after(user, 20*W.toolspeed, target = src))
|
||||
if(!src || !WT.isOn()) return
|
||||
if(!src || !WT.isOn())
|
||||
return
|
||||
playsound(src.loc, 'sound/items/welder2.ogg', 50, 1)
|
||||
if(!welded)
|
||||
user.visible_message("[user] welds the vent shut.", "<span class='notice'>You weld the vent shut.</span>", "<span class='italics'>You hear welding.</span>")
|
||||
@@ -282,11 +278,10 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/vent_pump/can_unwrench(mob/user)
|
||||
if(..())
|
||||
if(!(stat & NOPOWER) && on)
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench [src], turn it off first!</span>")
|
||||
else
|
||||
return 1
|
||||
. = ..()
|
||||
if(. && on && is_operational())
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench [src], turn it off first!</span>")
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/vent_pump/examine(mob/user)
|
||||
..()
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 10
|
||||
active_power_usage = 60
|
||||
can_unwrench = 1
|
||||
can_unwrench = TRUE
|
||||
welded = FALSE
|
||||
level = 1
|
||||
layer = GAS_SCRUBBER_LAYER
|
||||
@@ -17,12 +17,12 @@
|
||||
var/on = FALSE
|
||||
var/scrubbing = SCRUBBING //0 = siphoning, 1 = scrubbing
|
||||
|
||||
var/scrub_CO2 = 1
|
||||
var/scrub_Toxins = 0
|
||||
var/scrub_N2O = 0
|
||||
var/scrub_BZ = 0
|
||||
var/scrub_Freon = 0
|
||||
var/scrub_WaterVapor = 0
|
||||
var/scrub_CO2 = TRUE
|
||||
var/scrub_Toxins = FALSE
|
||||
var/scrub_N2O = FALSE
|
||||
var/scrub_BZ = FALSE
|
||||
var/scrub_Freon = FALSE
|
||||
var/scrub_WaterVapor = FALSE
|
||||
|
||||
|
||||
var/volume_rate = 200
|
||||
@@ -58,12 +58,8 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/vent_scrubber/auto_use_power()
|
||||
if(!powered(power_channel))
|
||||
return 0
|
||||
if(!on || welded)
|
||||
return 0
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return 0
|
||||
if(!on || welded || !is_operational() || !powered(power_channel))
|
||||
return FALSE
|
||||
|
||||
var/amount = idle_power_usage
|
||||
|
||||
@@ -86,7 +82,7 @@
|
||||
if(widenet)
|
||||
amount += amount * (adjacent_turfs.len * (adjacent_turfs.len / 2))
|
||||
use_power(amount, power_channel)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/vent_scrubber/update_icon_nopipes()
|
||||
cut_overlays()
|
||||
@@ -97,7 +93,7 @@
|
||||
icon_state = "scrub_welded"
|
||||
return
|
||||
|
||||
if(!NODE1 || !on || stat & (NOPOWER|BROKEN))
|
||||
if(!NODE1 || !on || !is_operational())
|
||||
icon_state = "scrub_off"
|
||||
return
|
||||
|
||||
@@ -113,7 +109,7 @@
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/vent_scrubber/proc/broadcast_status()
|
||||
if(!radio_connection)
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
var/datum/signal/signal = new
|
||||
signal.transmission_method = 1 //radio signal
|
||||
@@ -143,7 +139,7 @@
|
||||
|
||||
radio_connection.post_signal(src, signal, radio_filter_out)
|
||||
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/vent_scrubber/atmosinit()
|
||||
radio_filter_in = frequency==initial(frequency)?(GLOB.RADIO_FROM_AIRALARM):null
|
||||
@@ -156,20 +152,21 @@
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/vent_scrubber/process_atmos()
|
||||
..()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
if (!NODE1)
|
||||
if(!is_operational())
|
||||
return FALSE
|
||||
if(!NODE1)
|
||||
on = FALSE
|
||||
if(!on || welded)
|
||||
return 0
|
||||
return FALSE
|
||||
scrub(loc)
|
||||
if(widenet)
|
||||
for (var/turf/tile in adjacent_turfs)
|
||||
for(var/turf/tile in adjacent_turfs)
|
||||
scrub(tile)
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/vent_scrubber/proc/scrub(var/turf/tile)
|
||||
if (!istype(tile))
|
||||
return 0
|
||||
if(!istype(tile))
|
||||
return FALSE
|
||||
|
||||
var/datum/gas_mixture/environment = tile.return_air()
|
||||
var/datum/gas_mixture/air_contents = AIR1
|
||||
@@ -189,8 +186,8 @@
|
||||
//Take a gas sample
|
||||
var/datum/gas_mixture/removed = tile.remove_air(transfer_moles)
|
||||
//Nothing left to remove from the tile
|
||||
if (isnull(removed))
|
||||
return
|
||||
if(isnull(removed))
|
||||
return FALSE
|
||||
var/list/removed_gases = removed.gases
|
||||
|
||||
//Filter it
|
||||
@@ -199,39 +196,39 @@
|
||||
filtered_out.temperature = removed.temperature
|
||||
|
||||
if(scrub_Toxins && removed_gases["plasma"])
|
||||
filtered_out.assert_gas("plasma")
|
||||
filtered_out.add_gas("plasma")
|
||||
filtered_gases["plasma"][MOLES] = removed_gases["plasma"][MOLES]
|
||||
removed.gases["plasma"][MOLES] = 0
|
||||
|
||||
if(scrub_CO2 && removed_gases["co2"])
|
||||
filtered_out.assert_gas("co2")
|
||||
filtered_out.gases["co2"][MOLES] = removed_gases["co2"][MOLES]
|
||||
removed.gases["co2"][MOLES] = 0
|
||||
filtered_out.add_gas("co2")
|
||||
filtered_gases["co2"][MOLES] = removed_gases["co2"][MOLES]
|
||||
removed_gases["co2"][MOLES] = 0
|
||||
|
||||
if(removed_gases["agent_b"])
|
||||
filtered_out.assert_gas("agent_b")
|
||||
filtered_out.gases["agent_b"][MOLES] = removed_gases["agent_b"][MOLES]
|
||||
removed.gases["agent_b"][MOLES] = 0
|
||||
filtered_out.add_gas("agent_b")
|
||||
filtered_gases["agent_b"][MOLES] = removed_gases["agent_b"][MOLES]
|
||||
removed_gases["agent_b"][MOLES] = 0
|
||||
|
||||
if(scrub_N2O && removed_gases["n2o"])
|
||||
filtered_out.assert_gas("n2o")
|
||||
filtered_out.gases["n2o"][MOLES] = removed_gases["n2o"][MOLES]
|
||||
removed.gases["n2o"][MOLES] = 0
|
||||
filtered_out.add_gas("n2o")
|
||||
filtered_gases["n2o"][MOLES] = removed_gases["n2o"][MOLES]
|
||||
removed_gases["n2o"][MOLES] = 0
|
||||
|
||||
if(scrub_BZ && removed_gases["bz"])
|
||||
filtered_out.assert_gas("bz")
|
||||
filtered_out.gases["bz"][MOLES] = removed_gases["bz"][MOLES]
|
||||
removed.gases["bz"][MOLES] = 0
|
||||
filtered_out.add_gas("bz")
|
||||
filtered_gases["bz"][MOLES] = removed_gases["bz"][MOLES]
|
||||
removed_gases["bz"][MOLES] = 0
|
||||
|
||||
if(scrub_Freon && removed_gases["freon"])
|
||||
filtered_out.assert_gas("freon")
|
||||
filtered_out.gases["freon"][MOLES] = removed_gases["freon"][MOLES]
|
||||
removed.gases["freon"][MOLES] = 0
|
||||
filtered_out.add_gas("freon")
|
||||
filtered_gases["freon"][MOLES] = removed_gases["freon"][MOLES]
|
||||
removed_gases["freon"][MOLES] = 0
|
||||
|
||||
if(scrub_WaterVapor && removed_gases["water_vapor"])
|
||||
filtered_out.assert_gas("water_vapor")
|
||||
filtered_out.gases["water_vapor"][MOLES] = removed_gases["water_vapor"][MOLES]
|
||||
removed.gases["water_vapor"][MOLES] = 0
|
||||
filtered_out.add_gas("water_vapor")
|
||||
filtered_gases["water_vapor"][MOLES] = removed_gases["water_vapor"][MOLES]
|
||||
removed_gases["water_vapor"][MOLES] = 0
|
||||
|
||||
removed.garbage_collect()
|
||||
|
||||
@@ -242,8 +239,8 @@
|
||||
tile.air_update_turf()
|
||||
|
||||
else //Just siphoning all air
|
||||
if (air_contents.return_pressure()>=50*ONE_ATMOSPHERE)
|
||||
return
|
||||
if(air_contents.return_pressure()>=50*ONE_ATMOSPHERE)
|
||||
return FALSE
|
||||
|
||||
var/transfer_moles = environment.total_moles()*(volume_rate/environment.volume)
|
||||
|
||||
@@ -254,7 +251,7 @@
|
||||
|
||||
update_parents()
|
||||
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
|
||||
//There is no easy way for an object to be notified of changes to atmos can pass flags_1
|
||||
@@ -273,7 +270,7 @@
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/vent_scrubber/receive_signal(datum/signal/signal)
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
if(!is_operational())
|
||||
return
|
||||
if(!signal.data["tag"] || (signal.data["tag"] != id_tag) || (signal.data["sigtype"]!="command"))
|
||||
return 0
|
||||
@@ -363,11 +360,10 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/vent_scrubber/can_unwrench(mob/user)
|
||||
if(..())
|
||||
if (!(stat & NOPOWER) && on)
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench [src], turn it off first!</span>")
|
||||
else
|
||||
return 1
|
||||
. = ..()
|
||||
if(. && on && is_operational())
|
||||
to_chat(user, "<span class='warning'>You cannot unwrench [src], turn it off first!</span>")
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/vent_scrubber/can_crawl_through()
|
||||
return !welded
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
var/list/obj/machinery/atmospherics/pipe/members
|
||||
var/list/obj/machinery/atmospherics/components/other_atmosmch
|
||||
|
||||
var/update = 1
|
||||
var/update = TRUE
|
||||
|
||||
/datum/pipeline/New()
|
||||
other_airs = list()
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
/datum/pipeline/process()
|
||||
if(update)
|
||||
update = 0
|
||||
update = FALSE
|
||||
reconcile_air()
|
||||
update = air.react()
|
||||
|
||||
@@ -114,6 +114,7 @@
|
||||
other_airs.Add(E.other_airs)
|
||||
E.members.Cut()
|
||||
E.other_atmosmch.Cut()
|
||||
update = TRUE
|
||||
qdel(E)
|
||||
|
||||
/obj/machinery/atmospherics/proc/addMember(obj/machinery/atmospherics/A)
|
||||
@@ -195,7 +196,7 @@
|
||||
(partial_heat_capacity*target.heat_capacity/(partial_heat_capacity+target.heat_capacity))
|
||||
|
||||
air.temperature -= heat/total_heat_capacity
|
||||
update = 1
|
||||
update = TRUE
|
||||
|
||||
/datum/pipeline/proc/return_air()
|
||||
. = other_airs + air
|
||||
|
||||
@@ -9,10 +9,13 @@
|
||||
var/times_spoken_to = 0
|
||||
var/list/shenanigans = list()
|
||||
|
||||
/obj/structure/speaking_tile/New()
|
||||
var/savefile/S = new /savefile("data/npc_saves/Poly.sav")
|
||||
S["phrases"] >> shenanigans
|
||||
..()
|
||||
/obj/structure/speaking_tile/Initialize()
|
||||
. = ..()
|
||||
var/json_file = file("data/npc_saves/Poly.json")
|
||||
if(!fexists(json_file))
|
||||
return
|
||||
var/list/json = json_decode(file2text(json_file))
|
||||
shenanigans = json["phrases"]
|
||||
|
||||
/obj/structure/speaking_tile/interact(mob/user)
|
||||
if(!isliving(user) || speaking)
|
||||
@@ -118,4 +121,4 @@
|
||||
..()
|
||||
|
||||
/obj/effect/landmark/error
|
||||
name = "error"
|
||||
name = "error"
|
||||
@@ -1643,7 +1643,11 @@
|
||||
/obj/item/toy/talking/griffin,
|
||||
/obj/item/toy/nuke,
|
||||
/obj/item/toy/minimeteor,
|
||||
/obj/item/toy/carpplushie,
|
||||
/obj/item/toy/plush/carpplushie,
|
||||
/obj/item/toy/plush/lizardplushie,
|
||||
/obj/item/toy/plush/snakeplushie,
|
||||
/obj/item/toy/plush/nukeplushie,
|
||||
/obj/item/toy/plush/slimeplushie,
|
||||
/obj/item/coin/antagtoken,
|
||||
/obj/item/stack/tile/fakespace/loaded,
|
||||
/obj/item/gun/ballistic/shotgun/toy/crossbow,
|
||||
|
||||
@@ -5,59 +5,39 @@
|
||||
desc = "Lost prototype of advanced clown tech. Powered by bananium, these shoes leave a trail of chaos in their wake."
|
||||
icon_state = "clown_prototype_off"
|
||||
var/on = FALSE
|
||||
var/datum/material_container/bananium
|
||||
actions_types = list(/datum/action/item_action/toggle)
|
||||
|
||||
/obj/item/clothing/shoes/clown_shoes/banana_shoes/New()
|
||||
..()
|
||||
bananium = new/datum/material_container(src,list(MAT_BANANIUM),200000)
|
||||
/obj/item/clothing/shoes/clown_shoes/banana_shoes/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/material_container, list(MAT_BANANIUM), 200000, TRUE)
|
||||
AddComponent(/datum/component/squeak, list('sound/items/bikehorn.ogg'=1), 75)
|
||||
|
||||
/obj/item/clothing/shoes/clown_shoes/banana_shoes/step_action()
|
||||
. = ..()
|
||||
if(on)
|
||||
if(footstep > 1)//honks when its on
|
||||
playsound(src, 'sound/items/bikehorn.ogg', 75, 1)
|
||||
footstep = 0
|
||||
else
|
||||
footstep++
|
||||
|
||||
new/obj/item/grown/bananapeel/specialpeel(get_step(src,turn(usr.dir, 180))) //honk
|
||||
GET_COMPONENT(bananium, /datum/component/material_container)
|
||||
bananium.use_amount_type(100, MAT_BANANIUM)
|
||||
if(bananium.amount(MAT_BANANIUM) < 100)
|
||||
on = !on
|
||||
flags_1 &= ~NOSLIP_1
|
||||
update_icon()
|
||||
to_chat(loc, "<span class='warning'>You ran out of bananium!</span>")
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/clothing/shoes/clown_shoes/banana_shoes/attack_self(mob/user)
|
||||
GET_COMPONENT(bananium, /datum/component/material_container)
|
||||
var/sheet_amount = bananium.retrieve_all()
|
||||
if(sheet_amount)
|
||||
to_chat(user, "<span class='notice'>You retrieve [sheet_amount] sheets of bananium from the prototype shoes.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You cannot retrieve any bananium from the prototype shoes.</span>")
|
||||
|
||||
/obj/item/clothing/shoes/clown_shoes/banana_shoes/attackby(obj/item/O, mob/user, params)
|
||||
if(!bananium.get_item_material_amount(O))
|
||||
to_chat(user, "<span class='notice'>This item has no bananium!</span>")
|
||||
return
|
||||
if(!user.dropItemToGround(O))
|
||||
to_chat(user, "<span class='notice'>You can't drop [O]!</span>")
|
||||
return
|
||||
|
||||
var/bananium_amount = bananium.insert_item(O)
|
||||
if(bananium_amount)
|
||||
to_chat(user, "<span class='notice'>You insert [O] into the prototype shoes.</span>")
|
||||
qdel(O)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You are unable to insert more bananium!</span>")
|
||||
|
||||
/obj/item/clothing/shoes/clown_shoes/banana_shoes/examine(mob/user)
|
||||
..()
|
||||
var/ban_amt = bananium.amount(MAT_BANANIUM)
|
||||
to_chat(user, "<span class='notice'>The shoes are [on ? "enabled" : "disabled"]. There is [ban_amt ? ban_amt : "no"] bananium left.</span>")
|
||||
to_chat(user, "<span class='notice'>The shoes are [on ? "enabled" : "disabled"]</span>")
|
||||
|
||||
/obj/item/clothing/shoes/clown_shoes/banana_shoes/ui_action_click(mob/user)
|
||||
GET_COMPONENT(bananium, /datum/component/material_container)
|
||||
if(bananium.amount(MAT_BANANIUM))
|
||||
on = !on
|
||||
update_icon()
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/obj/item/clothing/shoes/proc/step_action() //this was made to rewrite clown shoes squeaking
|
||||
SendSignal(COMSIG_SHOES_STEP_ACTION)
|
||||
|
||||
/obj/item/clothing/shoes/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is bashing [user.p_their()] own head in with [src]! Ain't that a kick in the head?</span>")
|
||||
@@ -79,15 +80,11 @@
|
||||
item_state = "clown_shoes"
|
||||
slowdown = SHOES_SLOWDOWN+1
|
||||
item_color = "clown"
|
||||
var/footstep = 1 //used for squeeks whilst walking
|
||||
pockets = /obj/item/storage/internal/pocket/shoes/clown
|
||||
|
||||
/obj/item/clothing/shoes/clown_shoes/step_action()
|
||||
if(footstep > 1)
|
||||
playsound(src, "clownstep", 50, 1)
|
||||
footstep = 0
|
||||
else
|
||||
footstep++
|
||||
/obj/item/clothing/shoes/clown_shoes/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/squeak, list('sound/effects/clownstep1.ogg'=1,'sound/effects/clownstep2.ogg'=1), 50)
|
||||
|
||||
/obj/item/clothing/shoes/clown_shoes/jester
|
||||
name = "jester shoes"
|
||||
|
||||
@@ -204,9 +204,9 @@
|
||||
category = CAT_WEAPONRY
|
||||
subcategory = CAT_WEAPON
|
||||
|
||||
/datum/crafting_recipe/meteorshot
|
||||
name = "Meteorshot Shell"
|
||||
result = /obj/item/ammo_casing/shotgun/meteorshot
|
||||
/datum/crafting_recipe/meteorslug
|
||||
name = "Meteorslug Shell"
|
||||
result = /obj/item/ammo_casing/shotgun/meteorslug
|
||||
reqs = list(/obj/item/ammo_casing/shotgun/techshell = 1,
|
||||
/obj/item/rcd_ammo = 1,
|
||||
/obj/item/stock_parts/manipulator = 2)
|
||||
@@ -228,7 +228,7 @@
|
||||
|
||||
/datum/crafting_recipe/dragonsbreath
|
||||
name = "Dragonsbreath Shell"
|
||||
result = /obj/item/ammo_casing/shotgun/incendiary/dragonsbreath
|
||||
result = /obj/item/ammo_casing/shotgun/dragonsbreath
|
||||
reqs = list(/obj/item/ammo_casing/shotgun/techshell = 1, /datum/reagent/phosphorus = 5)
|
||||
tools = list(/obj/item/screwdriver)
|
||||
time = 5
|
||||
@@ -270,17 +270,6 @@
|
||||
category = CAT_WEAPONRY
|
||||
subcategory = CAT_AMMO
|
||||
|
||||
/datum/crafting_recipe/improvisedslugoverload
|
||||
name = "Overload Improvised Shell"
|
||||
result = /obj/item/ammo_casing/shotgun/improvised/overload
|
||||
reqs = list(/obj/item/ammo_casing/shotgun/improvised = 1,
|
||||
/datum/reagent/blackpowder = 10,
|
||||
/datum/reagent/toxin/plasma = 20)
|
||||
tools = list(/obj/item/screwdriver)
|
||||
time = 5
|
||||
category = CAT_WEAPONRY
|
||||
subcategory = CAT_AMMO
|
||||
|
||||
/datum/crafting_recipe/laserslug
|
||||
name = "Laser Slug Shell"
|
||||
result = /obj/item/ammo_casing/shotgun/laserslug
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
..()
|
||||
if(FESTIVE_SEASON in SSevents.holidays)
|
||||
new tree(get_turf(src))
|
||||
qdel(src)
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/effect/landmark/xmastree/rdrod
|
||||
name = "festivus pole spawner"
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
/mob/living/simple_animal/hostile/carp/ranged/Initialize()
|
||||
projectiletype = pick(allowed_projectile_types)
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/carp/ranged/chaos
|
||||
name = "chaos magicarp"
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
/obj/item/toy/foamblade,
|
||||
/obj/item/toy/prize/ripley,
|
||||
/obj/item/toy/prize/honk,
|
||||
/obj/item/toy/carpplushie,
|
||||
/obj/item/toy/plush/carpplushie,
|
||||
/obj/item/toy/redbutton,
|
||||
/obj/item/clothing/head/collectable/rabbitears)
|
||||
new won(where)
|
||||
|
||||
@@ -485,7 +485,6 @@ Since Ramadan is an entire month that lasts 29.5 days on average, the start and
|
||||
begin_day += 31
|
||||
begin_month-- //begins in march, ends in april
|
||||
|
||||
// to_chat(world, "Easter calculates to be on [begin_day] of [begin_month] ([days_early] early) to [end_day] of [end_month] ([days_extra] extra) for 20[yy]")
|
||||
return ..()
|
||||
|
||||
/datum/holiday/easter/celebrate()
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
name = "bookcase"
|
||||
icon = 'icons/obj/library.dmi'
|
||||
icon_state = "bookempty"
|
||||
anchored = FALSE
|
||||
density = TRUE
|
||||
anchored = FALSE
|
||||
density = TRUE
|
||||
opacity = 0
|
||||
resistance_flags = FLAMMABLE
|
||||
max_integrity = 200
|
||||
@@ -25,12 +25,12 @@
|
||||
|
||||
|
||||
/obj/structure/bookcase/Initialize(mapload)
|
||||
..()
|
||||
. = ..()
|
||||
if(!mapload)
|
||||
return
|
||||
state = 2
|
||||
icon_state = "book-0"
|
||||
anchored = TRUE
|
||||
anchored = TRUE
|
||||
for(var/obj/item/I in loc)
|
||||
if(istype(I, /obj/item/book))
|
||||
I.loc = src
|
||||
@@ -44,7 +44,7 @@
|
||||
playsound(loc, I.usesound, 100, 1)
|
||||
if(do_after(user, 20*I.toolspeed, target = src))
|
||||
to_chat(user, "<span class='notice'>You wrench the frame into place.</span>")
|
||||
anchored = TRUE
|
||||
anchored = TRUE
|
||||
state = 1
|
||||
if(istype(I, /obj/item/crowbar))
|
||||
playsound(loc, I.usesound, 100, 1)
|
||||
@@ -63,7 +63,7 @@
|
||||
if(istype(I, /obj/item/wrench))
|
||||
playsound(loc, I.usesound, 100, 1)
|
||||
to_chat(user, "<span class='notice'>You unwrench the frame.</span>")
|
||||
anchored = FALSE
|
||||
anchored = FALSE
|
||||
state = 0
|
||||
|
||||
if(2)
|
||||
@@ -317,4 +317,4 @@
|
||||
to_chat(user, "<font color=green>Computer has been associated with this unit.</font>")
|
||||
else
|
||||
to_chat(user, "<font color=red>No associated computer found. Only local scans will function properly.</font>")
|
||||
to_chat(user, "\n")
|
||||
to_chat(user, "\n")
|
||||
@@ -1,18 +1,18 @@
|
||||
/obj/item/book/manual/random/Initialize()
|
||||
. = ..()
|
||||
..()
|
||||
var/static/banned_books = list(/obj/item/book/manual/random, /obj/item/book/manual/nuclear, /obj/item/book/manual/wiki)
|
||||
var/newtype = pick(subtypesof(/obj/item/book/manual) - banned_books)
|
||||
new newtype(loc)
|
||||
qdel(src)
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/item/book/random
|
||||
var/amount = 1
|
||||
var/category = null
|
||||
|
||||
/obj/item/book/random/Initialize()
|
||||
. = ..()
|
||||
..()
|
||||
create_random_books(amount, src.loc, TRUE, category)
|
||||
qdel(src)
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/item/book/random/triple
|
||||
amount = 3
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
new /obj/item/clothing/suit/hooded/ian_costume(src)
|
||||
if(67 to 68)
|
||||
for(var/i in 1 to rand(4, 7))
|
||||
var /newitem = pick(subtypesof(/obj/item/stock_parts) - /obj/item/stock_parts/subspace)
|
||||
var/newitem = pick(subtypesof(/obj/item/stock_parts) - /obj/item/stock_parts/subspace)
|
||||
new newitem(src)
|
||||
if(69 to 70)
|
||||
for(var/i in 1 to 5)
|
||||
|
||||
@@ -66,7 +66,6 @@
|
||||
density = TRUE
|
||||
anchored = TRUE
|
||||
var/obj/machinery/mineral/CONSOLE = null
|
||||
var/datum/material_container/materials
|
||||
var/on = FALSE
|
||||
var/selected_material = MAT_METAL
|
||||
var/selected_alloy = null
|
||||
@@ -75,12 +74,11 @@
|
||||
/obj/machinery/mineral/processing_unit/Initialize()
|
||||
. = ..()
|
||||
proximity_monitor = new(src, 1)
|
||||
materials = new(src, list(MAT_METAL, MAT_GLASS, MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_PLASMA, MAT_URANIUM, MAT_BANANIUM, MAT_TITANIUM, MAT_BLUESPACE),INFINITY)
|
||||
AddComponent(/datum/component/material_container, list(MAT_METAL, MAT_GLASS, MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_PLASMA, MAT_URANIUM, MAT_BANANIUM, MAT_TITANIUM, MAT_BLUESPACE), INFINITY)
|
||||
files = new /datum/research/smelter(src)
|
||||
|
||||
/obj/machinery/mineral/processing_unit/Destroy()
|
||||
CONSOLE = null
|
||||
QDEL_NULL(materials)
|
||||
QDEL_NULL(files)
|
||||
return ..()
|
||||
|
||||
@@ -89,6 +87,7 @@
|
||||
process_ore(AM)
|
||||
|
||||
/obj/machinery/mineral/processing_unit/proc/process_ore(obj/item/ore/O)
|
||||
GET_COMPONENT(materials, /datum/component/material_container)
|
||||
var/material_amount = materials.get_item_material_amount(O)
|
||||
if(!materials.has_space(material_amount))
|
||||
unload_mineral(O)
|
||||
@@ -100,6 +99,7 @@
|
||||
|
||||
/obj/machinery/mineral/processing_unit/proc/get_machine_data()
|
||||
var/dat = "<b>Smelter control console</b><br><br>"
|
||||
GET_COMPONENT(materials, /datum/component/material_container)
|
||||
for(var/mat_id in materials.materials)
|
||||
var/datum/material/M = materials.materials[mat_id]
|
||||
dat += "<span class=\"res_name\">[M.name]: </span>[M.amount] cm³"
|
||||
@@ -165,6 +165,7 @@
|
||||
continue*/
|
||||
|
||||
/obj/machinery/mineral/processing_unit/proc/smelt_ore()
|
||||
GET_COMPONENT(materials, /datum/component/material_container)
|
||||
var/datum/material/mat = materials.materials[selected_material]
|
||||
if(mat)
|
||||
var/sheets_to_remove = (mat.amount >= (MINERAL_MATERIAL_AMOUNT * SMELT_AMOUNT) ) ? SMELT_AMOUNT : round(mat.amount / MINERAL_MATERIAL_AMOUNT)
|
||||
@@ -187,6 +188,7 @@
|
||||
on = FALSE
|
||||
return
|
||||
|
||||
GET_COMPONENT(materials, /datum/component/material_container)
|
||||
materials.use_amount(alloy.materials, amount)
|
||||
|
||||
generate_mineral(alloy.build_path)
|
||||
@@ -197,6 +199,7 @@
|
||||
|
||||
var/build_amount = SMELT_AMOUNT
|
||||
|
||||
GET_COMPONENT(materials, /datum/component/material_container)
|
||||
|
||||
for(var/mat_id in D.materials)
|
||||
var/M = D.materials[mat_id]
|
||||
@@ -214,6 +217,7 @@
|
||||
unload_mineral(O)
|
||||
|
||||
/obj/machinery/mineral/processing_unit/on_deconstruction()
|
||||
GET_COMPONENT(materials, /datum/component/material_container)
|
||||
materials.retrieve_all()
|
||||
..()
|
||||
|
||||
|
||||
@@ -22,17 +22,15 @@
|
||||
var/list/ore_values = list(MAT_GLASS = 1, MAT_METAL = 1, MAT_PLASMA = 15, MAT_SILVER = 16, MAT_GOLD = 18, MAT_TITANIUM = 30, MAT_URANIUM = 30, MAT_DIAMOND = 50, MAT_BLUESPACE = 50, MAT_BANANIUM = 60)
|
||||
var/message_sent = FALSE
|
||||
var/list/ore_buffer = list()
|
||||
var/datum/material_container/materials
|
||||
var/datum/research/files
|
||||
var/obj/item/disk/design_disk/inserted_disk
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/Initialize()
|
||||
. = ..()
|
||||
materials = new(src, list(MAT_METAL, MAT_GLASS, MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_PLASMA, MAT_URANIUM, MAT_BANANIUM, MAT_TITANIUM, MAT_BLUESPACE),INFINITY)
|
||||
AddComponent(/datum/component/material_container, list(MAT_METAL, MAT_GLASS, MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_PLASMA, MAT_URANIUM, MAT_BANANIUM, MAT_TITANIUM, MAT_BLUESPACE),INFINITY)
|
||||
files = new /datum/research/smelter(src)
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/Destroy()
|
||||
QDEL_NULL(materials)
|
||||
QDEL_NULL(files)
|
||||
return ..()
|
||||
|
||||
@@ -57,6 +55,7 @@
|
||||
if(O && O.refined_type)
|
||||
points += O.points * point_upgrade
|
||||
|
||||
GET_COMPONENT(materials, /datum/component/material_container)
|
||||
var/material_amount = materials.get_item_material_amount(O)
|
||||
|
||||
if(!material_amount)
|
||||
@@ -75,6 +74,7 @@
|
||||
|
||||
var/build_amount = 0
|
||||
|
||||
GET_COMPONENT(materials, /datum/component/material_container)
|
||||
for(var/mat_id in D.materials)
|
||||
var/M = D.materials[mat_id]
|
||||
var/datum/material/redemption_mat = materials.materials[mat_id]
|
||||
@@ -110,6 +110,7 @@
|
||||
|
||||
var/has_minerals = FALSE
|
||||
|
||||
GET_COMPONENT(materials, /datum/component/material_container)
|
||||
for(var/mat_id in materials.materials)
|
||||
var/datum/material/M = materials.materials[mat_id]
|
||||
var/mineral_amount = M.amount / MINERAL_MATERIAL_AMOUNT
|
||||
@@ -148,6 +149,7 @@
|
||||
/obj/machinery/mineral/ore_redemption/attackby(obj/item/W, mob/user, params)
|
||||
if(exchange_parts(user, W))
|
||||
return
|
||||
GET_COMPONENT(materials, /datum/component/material_container)
|
||||
if(default_pry_open(W))
|
||||
materials.retrieve_all()
|
||||
return
|
||||
@@ -181,16 +183,10 @@
|
||||
if(user.transferItemToLoc(W, src))
|
||||
inserted_disk = W
|
||||
return TRUE
|
||||
|
||||
if(istype(W, /obj/item/stack/sheet))
|
||||
var/obj/item/stack/sheet/S = W
|
||||
var/inserted = materials.insert_stack(S, S.amount)
|
||||
to_chat(user, "<span class='notice'>You add [inserted] [S] sheets to \the [src].</span>")
|
||||
return
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/on_deconstruction()
|
||||
GET_COMPONENT(materials, /datum/component/material_container)
|
||||
materials.retrieve_all()
|
||||
..()
|
||||
|
||||
@@ -213,6 +209,7 @@
|
||||
data["claimedPoints"] = inserted_id.mining_points
|
||||
|
||||
data["materials"] = list()
|
||||
GET_COMPONENT(materials, /datum/component/material_container)
|
||||
for(var/mat_id in materials.materials)
|
||||
var/datum/material/M = materials.materials[mat_id]
|
||||
var/sheet_amount = M.amount ? M.amount / MINERAL_MATERIAL_AMOUNT : "0"
|
||||
@@ -236,6 +233,7 @@
|
||||
/obj/machinery/mineral/ore_redemption/ui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
GET_COMPONENT(materials, /datum/component/material_container)
|
||||
switch(action)
|
||||
if("Eject")
|
||||
if(!inserted_id)
|
||||
|
||||
+95
-99
@@ -1,107 +1,103 @@
|
||||
/**********************Mint**************************/
|
||||
|
||||
|
||||
/obj/machinery/mineral/mint
|
||||
name = "coin press"
|
||||
icon = 'icons/obj/economy.dmi'
|
||||
icon_state = "coinpress0"
|
||||
/**********************Mint**************************/
|
||||
|
||||
|
||||
/obj/machinery/mineral/mint
|
||||
name = "coin press"
|
||||
icon = 'icons/obj/economy.dmi'
|
||||
icon_state = "coinpress0"
|
||||
density = TRUE
|
||||
anchored = TRUE
|
||||
var/datum/material_container/materials
|
||||
var/newCoins = 0 //how many coins the machine made in it's last load
|
||||
var/newCoins = 0 //how many coins the machine made in it's last load
|
||||
var/processing = FALSE
|
||||
var/chosen = MAT_METAL //which material will be used to make coins
|
||||
var/coinsToProduce = 10
|
||||
speed_process = 1
|
||||
|
||||
|
||||
var/chosen = MAT_METAL //which material will be used to make coins
|
||||
var/coinsToProduce = 10
|
||||
speed_process = 1
|
||||
|
||||
|
||||
/obj/machinery/mineral/mint/Initialize()
|
||||
. = ..()
|
||||
materials = new /datum/material_container(src,
|
||||
list(MAT_METAL, MAT_PLASMA, MAT_SILVER, MAT_GOLD, MAT_URANIUM, MAT_DIAMOND, MAT_BANANIUM),
|
||||
max_amt = MINERAL_MATERIAL_AMOUNT*50)
|
||||
|
||||
/obj/machinery/mineral/mint/Destroy()
|
||||
QDEL_NULL(materials)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/mineral/mint/process()
|
||||
var/turf/T = get_step(src, input_dir)
|
||||
if(!T)
|
||||
return
|
||||
|
||||
for(var/obj/item/stack/sheet/O in T)
|
||||
materials.insert_stack(O, O.amount)
|
||||
|
||||
/obj/machinery/mineral/mint/attack_hand(mob/user)
|
||||
var/dat = "<b>Coin Press</b><br>"
|
||||
|
||||
for(var/mat_id in materials.materials)
|
||||
var/datum/material/M = materials.materials[mat_id]
|
||||
if(!M.amount && chosen != mat_id)
|
||||
continue
|
||||
dat += "<br><b>[M.name] amount:</b> [M.amount] cm<sup>3</sup> "
|
||||
if (chosen == mat_id)
|
||||
dat += "<b>Chosen</b>"
|
||||
else
|
||||
dat += "<A href='?src=\ref[src];choose=[mat_id]'>Choose</A>"
|
||||
|
||||
var/datum/material/M = materials.materials[chosen]
|
||||
|
||||
dat += "<br><br>Will produce [coinsToProduce] [lowertext(M.name)] coins if enough materials are available.<br>"
|
||||
dat += "<A href='?src=\ref[src];chooseAmt=-10'>-10</A> "
|
||||
dat += "<A href='?src=\ref[src];chooseAmt=-5'>-5</A> "
|
||||
dat += "<A href='?src=\ref[src];chooseAmt=-1'>-1</A> "
|
||||
dat += "<A href='?src=\ref[src];chooseAmt=1'>+1</A> "
|
||||
dat += "<A href='?src=\ref[src];chooseAmt=5'>+5</A> "
|
||||
dat += "<A href='?src=\ref[src];chooseAmt=10'>+10</A> "
|
||||
|
||||
dat += "<br><br>In total this machine produced <font color='green'><b>[newCoins]</b></font> coins."
|
||||
dat += "<br><A href='?src=\ref[src];makeCoins=[1]'>Make coins</A>"
|
||||
user << browse(dat, "window=mint")
|
||||
|
||||
/obj/machinery/mineral/mint/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
if(processing==1)
|
||||
to_chat(usr, "<span class='notice'>The machine is processing.</span>")
|
||||
return
|
||||
if(href_list["choose"])
|
||||
if(materials.materials[href_list["choose"]])
|
||||
chosen = href_list["choose"]
|
||||
if(href_list["chooseAmt"])
|
||||
coinsToProduce = Clamp(coinsToProduce + text2num(href_list["chooseAmt"]), 0, 1000)
|
||||
if(href_list["makeCoins"])
|
||||
var/temp_coins = coinsToProduce
|
||||
AddComponent(/datum/component/material_container, list(MAT_METAL, MAT_PLASMA, MAT_SILVER, MAT_GOLD, MAT_URANIUM, MAT_DIAMOND, MAT_BANANIUM), MINERAL_MATERIAL_AMOUNT * 50)
|
||||
|
||||
/obj/machinery/mineral/mint/process()
|
||||
var/turf/T = get_step(src, input_dir)
|
||||
if(!T)
|
||||
return
|
||||
|
||||
GET_COMPONENT(materials, /datum/component/material_container)
|
||||
for(var/obj/item/stack/sheet/O in T)
|
||||
materials.insert_stack(O, O.amount)
|
||||
|
||||
/obj/machinery/mineral/mint/attack_hand(mob/user)
|
||||
var/dat = "<b>Coin Press</b><br>"
|
||||
|
||||
GET_COMPONENT(materials, /datum/component/material_container)
|
||||
for(var/mat_id in materials.materials)
|
||||
var/datum/material/M = materials.materials[mat_id]
|
||||
if(!M.amount && chosen != mat_id)
|
||||
continue
|
||||
dat += "<br><b>[M.name] amount:</b> [M.amount] cm<sup>3</sup> "
|
||||
if (chosen == mat_id)
|
||||
dat += "<b>Chosen</b>"
|
||||
else
|
||||
dat += "<A href='?src=\ref[src];choose=[mat_id]'>Choose</A>"
|
||||
|
||||
var/datum/material/M = materials.materials[chosen]
|
||||
|
||||
dat += "<br><br>Will produce [coinsToProduce] [lowertext(M.name)] coins if enough materials are available.<br>"
|
||||
dat += "<A href='?src=\ref[src];chooseAmt=-10'>-10</A> "
|
||||
dat += "<A href='?src=\ref[src];chooseAmt=-5'>-5</A> "
|
||||
dat += "<A href='?src=\ref[src];chooseAmt=-1'>-1</A> "
|
||||
dat += "<A href='?src=\ref[src];chooseAmt=1'>+1</A> "
|
||||
dat += "<A href='?src=\ref[src];chooseAmt=5'>+5</A> "
|
||||
dat += "<A href='?src=\ref[src];chooseAmt=10'>+10</A> "
|
||||
|
||||
dat += "<br><br>In total this machine produced <font color='green'><b>[newCoins]</b></font> coins."
|
||||
dat += "<br><A href='?src=\ref[src];makeCoins=[1]'>Make coins</A>"
|
||||
user << browse(dat, "window=mint")
|
||||
|
||||
/obj/machinery/mineral/mint/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
if(processing==1)
|
||||
to_chat(usr, "<span class='notice'>The machine is processing.</span>")
|
||||
return
|
||||
GET_COMPONENT(materials, /datum/component/material_container)
|
||||
if(href_list["choose"])
|
||||
if(materials.materials[href_list["choose"]])
|
||||
chosen = href_list["choose"]
|
||||
if(href_list["chooseAmt"])
|
||||
coinsToProduce = Clamp(coinsToProduce + text2num(href_list["chooseAmt"]), 0, 1000)
|
||||
if(href_list["makeCoins"])
|
||||
var/temp_coins = coinsToProduce
|
||||
processing = TRUE
|
||||
icon_state = "coinpress1"
|
||||
var/coin_mat = MINERAL_MATERIAL_AMOUNT * 0.2
|
||||
var/datum/material/M = materials.materials[chosen]
|
||||
if(!M || !M.coin_type)
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
while(coinsToProduce > 0 && materials.use_amount_type(coin_mat, chosen))
|
||||
create_coins(M.coin_type)
|
||||
coinsToProduce--
|
||||
newCoins++
|
||||
src.updateUsrDialog()
|
||||
sleep(5)
|
||||
|
||||
icon_state = "coinpress0"
|
||||
icon_state = "coinpress1"
|
||||
var/coin_mat = MINERAL_MATERIAL_AMOUNT * 0.2
|
||||
var/datum/material/M = materials.materials[chosen]
|
||||
if(!M || !M.coin_type)
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
while(coinsToProduce > 0 && materials.use_amount_type(coin_mat, chosen))
|
||||
create_coins(M.coin_type)
|
||||
coinsToProduce--
|
||||
newCoins++
|
||||
src.updateUsrDialog()
|
||||
sleep(5)
|
||||
|
||||
icon_state = "coinpress0"
|
||||
processing = FALSE
|
||||
coinsToProduce = temp_coins
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/mineral/mint/proc/create_coins(P)
|
||||
var/turf/T = get_step(src,output_dir)
|
||||
if(T)
|
||||
var/obj/item/O = new P(src)
|
||||
var/obj/item/storage/bag/money/M = locate(/obj/item/storage/bag/money, T)
|
||||
if(!M)
|
||||
M = new /obj/item/storage/bag/money(src)
|
||||
unload_mineral(M)
|
||||
coinsToProduce = temp_coins
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/mineral/mint/proc/create_coins(P)
|
||||
var/turf/T = get_step(src,output_dir)
|
||||
if(T)
|
||||
var/obj/item/O = new P(src)
|
||||
var/obj/item/storage/bag/money/M = locate(/obj/item/storage/bag/money, T)
|
||||
if(!M)
|
||||
M = new /obj/item/storage/bag/money(src)
|
||||
unload_mineral(M)
|
||||
O.loc = M
|
||||
@@ -329,6 +329,9 @@
|
||||
if(SSshuttle.arrivals.damaged && config.arrivals_shuttle_require_safe_latejoin)
|
||||
src << alert("The arrivals shuttle is currently malfunctioning! You cannot join.")
|
||||
return FALSE
|
||||
|
||||
if(config.arrivals_shuttle_require_undocked)
|
||||
SSshuttle.arrivals.RequireUndocked(src)
|
||||
arrivals_docked = SSshuttle.arrivals.mode != SHUTTLE_CALL
|
||||
|
||||
//Remove the player from the join queue if he was in one and reset the timer
|
||||
|
||||
@@ -711,9 +711,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
update_icon()
|
||||
|
||||
/mob/dead/observer/canUseTopic(atom/movable/AM,be_close = FALSE)
|
||||
if(check_rights(R_ADMIN, 0))
|
||||
return 1
|
||||
return
|
||||
return IsAdminGhost(usr)
|
||||
|
||||
/mob/dead/observer/is_literate()
|
||||
return 1
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
create_internal_organs()
|
||||
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/mob/living/carbon/alien/create_internal_organs()
|
||||
internal_organs += new /obj/item/organ/brain/alien
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
/mob/living/carbon/alien/humanoid/drone/Initialize()
|
||||
AddAbility(new/obj/effect/proc_holder/alien/evolve(null))
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/drone/create_internal_organs()
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/repulse/xeno(src))
|
||||
AddAbility(new /obj/effect/proc_holder/alien/royal/praetorian/evolve())
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/mob/living/carbon/alien/humanoid/royal/praetorian/create_internal_organs()
|
||||
internal_organs += new /obj/item/organ/alien/plasmavessel/large
|
||||
@@ -48,4 +48,4 @@
|
||||
return 1
|
||||
else
|
||||
to_chat(user, "<span class='notice'>We already have an alive queen.</span>")
|
||||
return 0
|
||||
return 0
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
/mob/living/carbon/alien/humanoid/sentinel/Initialize()
|
||||
AddAbility(new /obj/effect/proc_holder/alien/sneak)
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/mob/living/carbon/alien/humanoid/sentinel/create_internal_organs()
|
||||
internal_organs += new /obj/item/organ/alien/plasmavessel
|
||||
@@ -18,4 +18,4 @@
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/sentinel/movement_delay()
|
||||
. = ..()
|
||||
. = ..()
|
||||
@@ -18,12 +18,13 @@
|
||||
var/drooling = 0 //For Neruotoxic spit overlays
|
||||
bodyparts = list(/obj/item/bodypart/chest/alien, /obj/item/bodypart/head/alien, /obj/item/bodypart/l_arm/alien,
|
||||
/obj/item/bodypart/r_arm/alien, /obj/item/bodypart/r_leg/alien, /obj/item/bodypart/l_leg/alien)
|
||||
devourable = TRUE
|
||||
|
||||
|
||||
//This is fine right now, if we're adding organ specific damage this needs to be updated
|
||||
/mob/living/carbon/alien/humanoid/Initialize()
|
||||
AddAbility(new/obj/effect/proc_holder/alien/regurgitate(null))
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/mob/living/carbon/alien/humanoid/movement_delay()
|
||||
. = ..()
|
||||
@@ -42,7 +43,7 @@
|
||||
<HR>"}
|
||||
for(var/i in 1 to held_items.len)
|
||||
var/obj/item/I = get_item_for_held_index(i)
|
||||
dat += "<BR><B>[get_held_index_name(i)]:</B><A href='?src=\ref[src];item=[slot_hands];hand_index=[i]'>[(I && !(I.flags_1 & ABSTRACT_1)) ? I : "<font color=grey>Empty</font>"]</a>"
|
||||
dat += "<BR><B>[get_held_index_name(i)]:</B><A href='?src=\ref[src];item=[slot_hands];hand_index=[i]'>[(I && !(I.flags_1 & ABSTRACT_1)) ? I : "<font color=grey>Empty</font>"]</a>"
|
||||
dat += "<BR><A href='?src=\ref[src];pouches=1'>Empty Pouches</A>"
|
||||
|
||||
if(handcuffed)
|
||||
@@ -120,4 +121,4 @@
|
||||
/mob/living/carbon/alien/humanoid/check_breath(datum/gas_mixture/breath)
|
||||
if(breath && breath.total_moles() > 0 && !sneaking)
|
||||
playsound(get_turf(src), pick('sound/voice/lowHiss2.ogg', 'sound/voice/lowHiss3.ogg', 'sound/voice/lowHiss4.ogg'), 50, 0, -5)
|
||||
..()
|
||||
..()
|
||||
@@ -4,7 +4,7 @@
|
||||
icon_state = "larva0"
|
||||
pass_flags = PASSTABLE | PASSMOB
|
||||
mob_size = MOB_SIZE_SMALL
|
||||
density = FALSE
|
||||
density = FALSE
|
||||
|
||||
maxHealth = 25
|
||||
health = 25
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
AddAbility(new/obj/effect/proc_holder/alien/hide(null))
|
||||
AddAbility(new/obj/effect/proc_holder/alien/larva_evolve(null))
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/mob/living/carbon/alien/larva/create_internal_organs()
|
||||
internal_organs += new /obj/item/organ/alien/plasmavessel/small/tiny
|
||||
@@ -65,4 +65,4 @@
|
||||
|
||||
/mob/living/carbon/alien/larva/stripPanelEquip(obj/item/what, mob/who)
|
||||
to_chat(src, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
return
|
||||
return
|
||||
@@ -297,6 +297,10 @@
|
||||
|
||||
|
||||
/mob/living/carbon/proc/cuff_resist(obj/item/I, breakouttime = 600, cuff_break = 0)
|
||||
if(I.being_removed)
|
||||
to_chat(src, "<span class='warning'>You're already attempting to remove [I]!</span>")
|
||||
return
|
||||
I.being_removed = TRUE
|
||||
breakouttime = I.breakouttime
|
||||
var/displaytime = breakouttime / 600
|
||||
if(!cuff_break)
|
||||
@@ -318,6 +322,7 @@
|
||||
|
||||
else if(cuff_break == INSTANT_CUFFBREAK)
|
||||
clear_cuffs(I, cuff_break)
|
||||
I.being_removed = FALSE
|
||||
|
||||
/mob/living/carbon/proc/uncuff()
|
||||
if (handcuffed)
|
||||
|
||||
@@ -87,12 +87,16 @@
|
||||
/// SNPC voice handling
|
||||
|
||||
/mob/living/carbon/human/interactive/proc/loadVoice()
|
||||
var/json_file = file("data/npc_saves/snpc.json")
|
||||
if(!fexists(json_file))
|
||||
return
|
||||
var/list/json = list()
|
||||
json = json_decode(file2text(json_file))
|
||||
knownStrings = json["knownStrings"]
|
||||
if(fexists("data/npc_saves/snpc.sav"))
|
||||
var/savefile/S = new /savefile("data/npc_saves/snpc.sav")
|
||||
S["knownStrings"] >> knownStrings
|
||||
fdel(S)
|
||||
else
|
||||
var/json_file = file("data/npc_saves/snpc.json")
|
||||
if(!fexists(json_file))
|
||||
return
|
||||
var/list/json = json_decode(file2text(json_file))
|
||||
knownStrings = json["knownStrings"]
|
||||
if(isnull(knownStrings))
|
||||
knownStrings = list()
|
||||
|
||||
@@ -1618,4 +1622,4 @@
|
||||
TRAITS |= TRAIT_ROBUST
|
||||
TRAITS |= TRAIT_SMART
|
||||
faction += "bot_power"
|
||||
. = ..()
|
||||
. = ..()
|
||||
@@ -111,6 +111,10 @@
|
||||
randname += " [pick(GLOB.last_names)]"
|
||||
|
||||
return randname
|
||||
|
||||
//Called when cloning, copies some vars that should be kept
|
||||
/datum/species/proc/copy_properties_from(datum/species/old_species)
|
||||
return
|
||||
|
||||
|
||||
//Please override this locally if you want to define when what species qualifies for what rank if human authority is enforced.
|
||||
@@ -1721,4 +1725,4 @@
|
||||
|
||||
#undef COLD_DAMAGE_LEVEL_1
|
||||
#undef COLD_DAMAGE_LEVEL_2
|
||||
#undef COLD_DAMAGE_LEVEL_3
|
||||
#undef COLD_DAMAGE_LEVEL_3
|
||||
@@ -7,3 +7,7 @@
|
||||
mutanttongue = /obj/item/organ/tongue/abductor
|
||||
var/scientist = 0 // vars to not pollute spieces list with castes
|
||||
var/team = 1
|
||||
|
||||
/datum/species/abductor/copy_properties_from(datum/species/abductor/old_species)
|
||||
scientist = old_species.scientist
|
||||
team = old_species.team
|
||||
|
||||
@@ -18,11 +18,10 @@
|
||||
if(H.dna && H.dna.species &&((H.dna.features["wings"] != "Angel") && ("wings" in H.dna.species.mutant_bodyparts)))
|
||||
H.dna.features["wings"] = "Angel"
|
||||
H.update_body()
|
||||
if(ishuman(H)&& !fly)
|
||||
if(ishuman(H) && !fly)
|
||||
fly = new
|
||||
fly.Grant(H)
|
||||
|
||||
|
||||
/datum/species/angel/on_species_loss(mob/living/carbon/human/H)
|
||||
if(fly)
|
||||
fly.Remove(H)
|
||||
@@ -66,7 +65,7 @@
|
||||
/datum/action/innate/flight
|
||||
name = "Toggle Flight"
|
||||
check_flags = AB_CHECK_CONSCIOUS|AB_CHECK_STUN
|
||||
icon_icon = 'icons/mob/actions/actions_items.dmi'
|
||||
icon_icon = 'icons/mob/actions/actions_items.dmi'
|
||||
button_icon_state = "flight"
|
||||
|
||||
/datum/action/innate/flight/Activate()
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
exotic_blood = "slimejelly"
|
||||
damage_overlay_type = ""
|
||||
var/datum/action/innate/regenerate_limbs/regenerate_limbs
|
||||
toxic_food = NONE
|
||||
liked_food = MEAT
|
||||
|
||||
/datum/species/jelly/on_species_loss(mob/living/carbon/C)
|
||||
@@ -60,6 +59,7 @@
|
||||
name = "Regenerate Limbs"
|
||||
check_flags = AB_CHECK_CONSCIOUS
|
||||
button_icon_state = "slimeheal"
|
||||
icon_icon = 'icons/mob/actions/actions_slime.dmi'
|
||||
background_icon_state = "bg_alien"
|
||||
|
||||
/datum/action/innate/regenerate_limbs/IsAvailable()
|
||||
@@ -128,7 +128,7 @@
|
||||
/datum/species/jelly/slime/on_species_gain(mob/living/carbon/C, datum/species/old_species)
|
||||
..()
|
||||
if(ishuman(C))
|
||||
/* slime_split = new
|
||||
/* slime_split = new
|
||||
slime_split.Grant(C)
|
||||
swap_body = new
|
||||
swap_body.Grant(C) */
|
||||
@@ -140,6 +140,10 @@
|
||||
|
||||
C.faction |= "slime"
|
||||
|
||||
//If you're cloned you get your body pool back
|
||||
/datum/species/jelly/slime/copy_properties_from(datum/species/jelly/slime/old_species)
|
||||
bodies = old_species.bodies
|
||||
|
||||
/datum/species/jelly/slime/spec_life(mob/living/carbon/human/H)
|
||||
if(H.blood_volume >= BLOOD_VOLUME_SLIME_SPLIT)
|
||||
if(prob(5))
|
||||
@@ -154,6 +158,7 @@
|
||||
name = "Split Body"
|
||||
check_flags = AB_CHECK_CONSCIOUS
|
||||
button_icon_state = "slimesplit"
|
||||
icon_icon = 'icons/mob/actions/actions_slime.dmi'
|
||||
background_icon_state = "bg_alien"
|
||||
|
||||
/datum/action/innate/split_body/IsAvailable()
|
||||
@@ -220,6 +225,7 @@
|
||||
name = "Swap Body"
|
||||
check_flags = AB_CHECK_CONSCIOUS
|
||||
button_icon_state = "slimeswap"
|
||||
icon_icon = 'icons/mob/actions/actions_slime.dmi'
|
||||
background_icon_state = "bg_alien"
|
||||
|
||||
/datum/action/innate/swap_body/Activate()
|
||||
@@ -326,4 +332,4 @@
|
||||
M.transfer_to(dupe)
|
||||
dupe.visible_message("<span class='notice'>[dupe] blinks and looks \
|
||||
around.</span>",
|
||||
"<span class='notice'>...and move this one instead.</span>")
|
||||
"<span class='notice'>...and move this one instead.</span>")
|
||||
@@ -30,7 +30,7 @@
|
||||
burnmod = 1.5
|
||||
blacklisted = TRUE
|
||||
no_equip = list(slot_wear_mask, slot_wear_suit, slot_gloves, slot_shoes, slot_w_uniform, slot_s_store)
|
||||
species_traits = list(NOBREATH,RESISTCOLD,RESISTPRESSURE,NOGUNS,NOBLOOD,RADIMMUNE,VIRUSIMMUNE,PIERCEIMMUNE,NODISMEMBER,NO_UNDERWEAR,NOHUNGER)
|
||||
species_traits = list(NOBREATH,RESISTCOLD,RESISTPRESSURE,NOGUNS,NOBLOOD,RADIMMUNE,VIRUSIMMUNE,PIERCEIMMUNE,NODISMEMBER,NO_UNDERWEAR,NOHUNGER,NO_DNA_COPY,NOTRANSSTING)
|
||||
mutanteyes = /obj/item/organ/eyes/night_vision/nightmare
|
||||
var/obj/effect/proc_holder/spell/targeted/shadowwalk/shadowwalk
|
||||
|
||||
|
||||
@@ -1,121 +1,121 @@
|
||||
/datum/species/synth
|
||||
name = "Synth" //inherited from the real species, for health scanners and things
|
||||
id = "synth"
|
||||
say_mod = "beep boops" //inherited from a user's real species
|
||||
sexes = 0
|
||||
species_traits = list(NOTRANSSTING,NOBREATH,VIRUSIMMUNE,NODISMEMBER,NOHUNGER) //all of these + whatever we inherit from the real species
|
||||
dangerous_existence = 1
|
||||
blacklisted = 1
|
||||
meat = null
|
||||
damage_overlay_type = "synth"
|
||||
limbs_id = "synth"
|
||||
var/list/initial_species_traits = list(NOTRANSSTING,NOBREATH,VIRUSIMMUNE,NODISMEMBER,NOHUNGER) //for getting these values back for assume_disguise()
|
||||
var/disguise_fail_health = 75 //When their health gets to this level their synthflesh partially falls off
|
||||
var/datum/species/fake_species = null //a species to do most of our work for us, unless we're damaged
|
||||
|
||||
/datum/species/synth/military
|
||||
name = "Military Synth"
|
||||
id = "military_synth"
|
||||
armor = 25
|
||||
punchdamagelow = 10
|
||||
punchdamagehigh = 19
|
||||
punchstunthreshold = 14 //about 50% chance to stun
|
||||
disguise_fail_health = 50
|
||||
|
||||
/datum/species/synth/on_species_gain(mob/living/carbon/human/H, datum/species/old_species)
|
||||
..()
|
||||
assume_disguise(old_species, H)
|
||||
|
||||
/datum/species/synth/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H)
|
||||
if(chem.id == "synthflesh")
|
||||
chem.reaction_mob(H, TOUCH, 2 ,0) //heal a little
|
||||
H.reagents.remove_reagent(chem.id, REAGENTS_METABOLISM)
|
||||
return 1
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/datum/species/synth/proc/assume_disguise(datum/species/S, mob/living/carbon/human/H)
|
||||
if(S && !istype(S, type))
|
||||
name = S.name
|
||||
say_mod = S.say_mod
|
||||
sexes = S.sexes
|
||||
species_traits = initial_species_traits.Copy()
|
||||
species_traits.Add(S.species_traits)
|
||||
attack_verb = S.attack_verb
|
||||
attack_sound = S.attack_sound
|
||||
miss_sound = S.miss_sound
|
||||
meat = S.meat
|
||||
mutant_bodyparts = S.mutant_bodyparts.Copy()
|
||||
mutant_organs = S.mutant_organs.Copy()
|
||||
default_features = S.default_features.Copy()
|
||||
nojumpsuit = S.nojumpsuit
|
||||
no_equip = S.no_equip.Copy()
|
||||
limbs_id = S.limbs_id
|
||||
use_skintones = S.use_skintones
|
||||
fixed_mut_color = S.fixed_mut_color
|
||||
hair_color = S.hair_color
|
||||
fake_species = new S.type
|
||||
else
|
||||
name = initial(name)
|
||||
say_mod = initial(say_mod)
|
||||
species_traits = initial_species_traits.Copy()
|
||||
attack_verb = initial(attack_verb)
|
||||
attack_sound = initial(attack_sound)
|
||||
miss_sound = initial(miss_sound)
|
||||
mutant_bodyparts = list()
|
||||
default_features = list()
|
||||
nojumpsuit = initial(nojumpsuit)
|
||||
no_equip = list()
|
||||
qdel(fake_species)
|
||||
fake_species = null
|
||||
meat = initial(meat)
|
||||
limbs_id = "synth"
|
||||
use_skintones = 0
|
||||
sexes = 0
|
||||
fixed_mut_color = ""
|
||||
hair_color = ""
|
||||
|
||||
for(var/X in H.bodyparts) //propagates the damage_overlay changes
|
||||
var/obj/item/bodypart/BP = X
|
||||
BP.update_limb()
|
||||
H.update_body_parts() //to update limb icon cache with the new damage overlays
|
||||
|
||||
//Proc redirects:
|
||||
//Passing procs onto the fake_species, to ensure we look as much like them as possible
|
||||
|
||||
/datum/species/synth/handle_hair(mob/living/carbon/human/H, forced_colour)
|
||||
if(fake_species)
|
||||
fake_species.handle_hair(H, forced_colour)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/datum/species/synth/handle_body(mob/living/carbon/human/H)
|
||||
if(fake_species)
|
||||
fake_species.handle_body(H)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/datum/species/synth/handle_mutant_bodyparts(mob/living/carbon/human/H, forced_colour)
|
||||
if(fake_species)
|
||||
fake_species.handle_body(H,forced_colour)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/datum/species/synth/get_spans()
|
||||
if(fake_species)
|
||||
return fake_species.get_spans()
|
||||
return list()
|
||||
|
||||
|
||||
/datum/species/synth/handle_speech(message, mob/living/carbon/human/H)
|
||||
if(H.health > disguise_fail_health)
|
||||
if(fake_species)
|
||||
return fake_species.handle_speech(message,H)
|
||||
else
|
||||
return ..()
|
||||
else
|
||||
/datum/species/synth
|
||||
name = "Synth" //inherited from the real species, for health scanners and things
|
||||
id = "synth"
|
||||
say_mod = "beep boops" //inherited from a user's real species
|
||||
sexes = 0
|
||||
species_traits = list(NOTRANSSTING,NOBREATH,VIRUSIMMUNE,NODISMEMBER,NOHUNGER) //all of these + whatever we inherit from the real species
|
||||
dangerous_existence = 1
|
||||
blacklisted = 1
|
||||
meat = null
|
||||
damage_overlay_type = "synth"
|
||||
limbs_id = "synth"
|
||||
var/list/initial_species_traits = list(NOTRANSSTING,NOBREATH,VIRUSIMMUNE,NODISMEMBER,NOHUNGER,NO_DNA_COPY) //for getting these values back for assume_disguise()
|
||||
var/disguise_fail_health = 75 //When their health gets to this level their synthflesh partially falls off
|
||||
var/datum/species/fake_species = null //a species to do most of our work for us, unless we're damaged
|
||||
|
||||
/datum/species/synth/military
|
||||
name = "Military Synth"
|
||||
id = "military_synth"
|
||||
armor = 25
|
||||
punchdamagelow = 10
|
||||
punchdamagehigh = 19
|
||||
punchstunthreshold = 14 //about 50% chance to stun
|
||||
disguise_fail_health = 50
|
||||
|
||||
/datum/species/synth/on_species_gain(mob/living/carbon/human/H, datum/species/old_species)
|
||||
..()
|
||||
assume_disguise(old_species, H)
|
||||
|
||||
/datum/species/synth/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H)
|
||||
if(chem.id == "synthflesh")
|
||||
chem.reaction_mob(H, TOUCH, 2 ,0) //heal a little
|
||||
H.reagents.remove_reagent(chem.id, REAGENTS_METABOLISM)
|
||||
return 1
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/datum/species/synth/proc/assume_disguise(datum/species/S, mob/living/carbon/human/H)
|
||||
if(S && !istype(S, type))
|
||||
name = S.name
|
||||
say_mod = S.say_mod
|
||||
sexes = S.sexes
|
||||
species_traits = initial_species_traits.Copy()
|
||||
species_traits.Add(S.species_traits)
|
||||
attack_verb = S.attack_verb
|
||||
attack_sound = S.attack_sound
|
||||
miss_sound = S.miss_sound
|
||||
meat = S.meat
|
||||
mutant_bodyparts = S.mutant_bodyparts.Copy()
|
||||
mutant_organs = S.mutant_organs.Copy()
|
||||
default_features = S.default_features.Copy()
|
||||
nojumpsuit = S.nojumpsuit
|
||||
no_equip = S.no_equip.Copy()
|
||||
limbs_id = S.limbs_id
|
||||
use_skintones = S.use_skintones
|
||||
fixed_mut_color = S.fixed_mut_color
|
||||
hair_color = S.hair_color
|
||||
fake_species = new S.type
|
||||
else
|
||||
name = initial(name)
|
||||
say_mod = initial(say_mod)
|
||||
species_traits = initial_species_traits.Copy()
|
||||
attack_verb = initial(attack_verb)
|
||||
attack_sound = initial(attack_sound)
|
||||
miss_sound = initial(miss_sound)
|
||||
mutant_bodyparts = list()
|
||||
default_features = list()
|
||||
nojumpsuit = initial(nojumpsuit)
|
||||
no_equip = list()
|
||||
qdel(fake_species)
|
||||
fake_species = null
|
||||
meat = initial(meat)
|
||||
limbs_id = "synth"
|
||||
use_skintones = 0
|
||||
sexes = 0
|
||||
fixed_mut_color = ""
|
||||
hair_color = ""
|
||||
|
||||
for(var/X in H.bodyparts) //propagates the damage_overlay changes
|
||||
var/obj/item/bodypart/BP = X
|
||||
BP.update_limb()
|
||||
H.update_body_parts() //to update limb icon cache with the new damage overlays
|
||||
|
||||
//Proc redirects:
|
||||
//Passing procs onto the fake_species, to ensure we look as much like them as possible
|
||||
|
||||
/datum/species/synth/handle_hair(mob/living/carbon/human/H, forced_colour)
|
||||
if(fake_species)
|
||||
fake_species.handle_hair(H, forced_colour)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/datum/species/synth/handle_body(mob/living/carbon/human/H)
|
||||
if(fake_species)
|
||||
fake_species.handle_body(H)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/datum/species/synth/handle_mutant_bodyparts(mob/living/carbon/human/H, forced_colour)
|
||||
if(fake_species)
|
||||
fake_species.handle_body(H,forced_colour)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/datum/species/synth/get_spans()
|
||||
if(fake_species)
|
||||
return fake_species.get_spans()
|
||||
return list()
|
||||
|
||||
|
||||
/datum/species/synth/handle_speech(message, mob/living/carbon/human/H)
|
||||
if(H.health > disguise_fail_health)
|
||||
if(fake_species)
|
||||
return fake_species.handle_speech(message,H)
|
||||
else
|
||||
return ..()
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#define REGENERATION_DELAY 60 // After taking damage, how long it takes for automatic regeneration to begin
|
||||
|
||||
/datum/species/zombie
|
||||
// 1spooky
|
||||
name = "High Functioning Zombie"
|
||||
@@ -6,7 +8,7 @@
|
||||
sexes = 0
|
||||
blacklisted = 1
|
||||
meat = /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/zombie
|
||||
species_traits = list(NOBREATH,RESISTCOLD,RESISTPRESSURE,NOBLOOD,RADIMMUNE,NOZOMBIE,EASYDISMEMBER,EASYLIMBATTACHMENT)
|
||||
species_traits = list(NOBREATH,RESISTCOLD,RESISTPRESSURE,NOBLOOD,RADIMMUNE,NOZOMBIE,EASYDISMEMBER,EASYLIMBATTACHMENT,NOTRANSSTING)
|
||||
mutant_organs = list(/obj/item/organ/tongue/zombie)
|
||||
var/static/list/spooks = list('sound/hallucinations/growl1.ogg','sound/hallucinations/growl2.ogg','sound/hallucinations/growl3.ogg','sound/hallucinations/veryfar_noise.ogg','sound/hallucinations/wail.ogg')
|
||||
disliked_food = NONE
|
||||
@@ -20,14 +22,21 @@
|
||||
armor = 20 // 120 damage to KO a zombie, which kills it
|
||||
speedmod = 2
|
||||
mutanteyes = /obj/item/organ/eyes/night_vision/zombie
|
||||
var/regen_cooldown = 0
|
||||
|
||||
/datum/species/zombie/infectious/spec_stun(mob/living/carbon/human/H,amount)
|
||||
. = min(2, amount)
|
||||
|
||||
/datum/species/zombie/infectious/apply_damage(damage, damagetype = BRUTE, def_zone = null, blocked, mob/living/carbon/human/H)
|
||||
. = ..()
|
||||
if(.)
|
||||
regen_cooldown = world.time + REGENERATION_DELAY
|
||||
|
||||
/datum/species/zombie/infectious/spec_life(mob/living/carbon/C)
|
||||
. = ..()
|
||||
C.a_intent = INTENT_HARM // THE SUFFERING MUST FLOW
|
||||
C.heal_overall_damage(4,4)
|
||||
if(regen_cooldown < world.time)
|
||||
C.heal_overall_damage(4,4)
|
||||
if(prob(4))
|
||||
playsound(C, pick(spooks), 50, TRUE, 10)
|
||||
if(C.InCritical())
|
||||
@@ -56,3 +65,5 @@
|
||||
sexes = 0
|
||||
meat = /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/zombie
|
||||
mutant_organs = list(/obj/item/organ/tongue/zombie)
|
||||
|
||||
#undef REGENERATION_DELAY
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
var/ancestor_chain = 1
|
||||
var/relic_hat //Note: these two are paths
|
||||
var/relic_mask
|
||||
var/memory_saved = 0
|
||||
var/memory_saved = FALSE
|
||||
var/list/pet_monkey_names = list("Pun Pun", "Bubbles", "Mojo", "George", "Darwin", "Aldo", "Caeser", "Kanzi", "Kong", "Terk", "Grodd", "Mala", "Bojangles", "Coco", "Able", "Baker", "Scatter", "Norbit", "Travis")
|
||||
var/list/rare_pet_monkey_names = list("Professor Bobo", "Deempisi's Revenge", "Furious George", "King Louie", "Dr. Zaius", "Jimmy Rustles", "Dinner", "Lanky")
|
||||
|
||||
@@ -32,25 +32,33 @@
|
||||
equip_to_slot_or_del(new relic_mask, slot_wear_mask)
|
||||
|
||||
/mob/living/carbon/monkey/punpun/Life()
|
||||
if(SSticker.current_state == GAME_STATE_FINISHED && !memory_saved)
|
||||
Write_Memory(0)
|
||||
if(!stat && SSticker.current_state == GAME_STATE_FINISHED && !memory_saved)
|
||||
Write_Memory(FALSE, FALSE)
|
||||
memory_saved = TRUE
|
||||
..()
|
||||
|
||||
/mob/living/carbon/monkey/punpun/death(gibbed)
|
||||
if(!memory_saved || gibbed)
|
||||
Write_Memory(1,gibbed)
|
||||
if(!memory_saved)
|
||||
Write_Memory(TRUE, gibbed)
|
||||
..()
|
||||
|
||||
/mob/living/carbon/monkey/punpun/proc/Read_Memory()
|
||||
var/json_file = file("data/npc_saves/Punpun.json")
|
||||
if(!fexists(json_file))
|
||||
return
|
||||
var/list/json = list()
|
||||
json = json_decode(file2text(json_file))
|
||||
ancestor_name = json["ancestor_name"]
|
||||
ancestor_chain = json["ancestor_chain"]
|
||||
relic_hat = json["relic_hat"]
|
||||
relic_mask = json["relic_hat"]
|
||||
if(fexists("data/npc_saves/Punpun.sav")) //legacy compatability to convert old format to new
|
||||
var/savefile/S = new /savefile("data/npc_saves/Punpun.sav")
|
||||
S["ancestor_name"] >> ancestor_name
|
||||
S["ancestor_chain"] >> ancestor_chain
|
||||
S["relic_hat"] >> relic_hat
|
||||
S["relic_mask"] >> relic_mask
|
||||
fdel("data/npc_saves/Punpun.sav")
|
||||
else
|
||||
var/json_file = file("data/npc_saves/Punpun.json")
|
||||
if(!fexists(json_file))
|
||||
return
|
||||
var/list/json = json_decode(file2text(json_file))
|
||||
ancestor_name = json["ancestor_name"]
|
||||
ancestor_chain = json["ancestor_chain"]
|
||||
relic_hat = json["relic_hat"]
|
||||
relic_mask = json["relic_hat"]
|
||||
|
||||
/mob/living/carbon/monkey/punpun/proc/Write_Memory(dead, gibbed)
|
||||
var/json_file = file("data/npc_saves/Punpun.json")
|
||||
@@ -60,14 +68,10 @@
|
||||
file_data["ancestor_chain"] = null
|
||||
file_data["relic_hat"] = null
|
||||
file_data["relic_mask"] = null
|
||||
if(dead)
|
||||
file_data["ancestor_name"] = ancestor_name
|
||||
file_data["ancestor_chain"] = ancestor_chain + 1
|
||||
file_data["relic_hat"] = head ? head.type : null
|
||||
file_data["relic_mask"] = wear_mask ? wear_mask.type : null
|
||||
if(!ancestor_name)
|
||||
file_data["ancestor_name"] = name
|
||||
else
|
||||
file_data["ancestor_name"] = ancestor_name ? ancestor_name : name
|
||||
file_data["ancestor_chain"] = dead ? ancestor_chain + 1 : ancestor_chain
|
||||
file_data["relic_hat"] = head ? head.type : null
|
||||
file_data["relic_mask"] = wear_mask ? wear_mask.type : null
|
||||
fdel(json_file)
|
||||
WRITE_FILE(json_file, json_encode(file_data))
|
||||
if(!dead)
|
||||
memory_saved = 1
|
||||
WRITE_FILE(json_file, json_encode(file_data))
|
||||
@@ -544,11 +544,14 @@
|
||||
if(!force_moving)
|
||||
..(pressure_difference, direction, pressure_resistance_prob_delta)
|
||||
|
||||
/mob/living/proc/can_resist()
|
||||
return !((next_move > world.time) || incapacitated(ignore_restraints = TRUE))
|
||||
|
||||
/mob/living/verb/resist()
|
||||
set name = "Resist"
|
||||
set category = "IC"
|
||||
|
||||
if(!isliving(src) || next_move > world.time || incapacitated(ignore_restraints = 1))
|
||||
if(!can_resist())
|
||||
return
|
||||
changeNext_move(CLICK_CD_RESIST)
|
||||
|
||||
@@ -709,30 +712,24 @@
|
||||
floating = 0 // If we were without gravity, the bouncing animation got stopped, so we make sure to restart it in next life().
|
||||
|
||||
/mob/living/proc/get_temperature(datum/gas_mixture/environment)
|
||||
var/loc_temp = T0C
|
||||
if(istype(loc, /obj/mecha))
|
||||
var/obj/mecha/M = loc
|
||||
loc_temp = M.return_temperature()
|
||||
|
||||
else if(istype(loc, /obj/structure/transit_tube_pod))
|
||||
loc_temp = environment.temperature
|
||||
|
||||
var/loc_temp = environment ? environment.temperature : T0C
|
||||
if(isobj(loc))
|
||||
var/obj/oloc = loc
|
||||
var/obj_temp = oloc.return_temperature()
|
||||
if(obj_temp != null)
|
||||
loc_temp = obj_temp
|
||||
/* if(ismob(loc))
|
||||
var/mob/living/mloc = loc
|
||||
var/mob_temp = mloc.return_temperature()
|
||||
if(mloc == DEAD)
|
||||
loc_temp = get_turf(loc) //wew
|
||||
else
|
||||
loc_temp = mob_temp
|
||||
*/
|
||||
//just gunna ommit this for now, it's on the 'to figgur out' list.
|
||||
else if(isspaceturf(get_turf(src)))
|
||||
var/turf/heat_turf = get_turf(src)
|
||||
loc_temp = heat_turf.temperature
|
||||
|
||||
else if(istype(loc, /obj/machinery/atmospherics/components/unary/cryo_cell))
|
||||
var/obj/machinery/atmospherics/components/unary/cryo_cell/C = loc
|
||||
var/datum/gas_mixture/G = C.AIR1
|
||||
|
||||
if(G.total_moles() < 10)
|
||||
loc_temp = environment.temperature
|
||||
else
|
||||
loc_temp = G.temperature
|
||||
|
||||
else
|
||||
loc_temp = environment.temperature
|
||||
|
||||
return loc_temp
|
||||
|
||||
/mob/living/proc/get_standard_pixel_x_offset(lying = 0)
|
||||
|
||||
@@ -114,9 +114,6 @@ GLOBAL_DATUM_INIT(cameranet, /datum/cameranet, new)
|
||||
var/y1 = max(0, T.y - (CHUNK_SIZE / 2)) & ~(CHUNK_SIZE - 1)
|
||||
var/x2 = min(world.maxx, T.x + (CHUNK_SIZE / 2)) & ~(CHUNK_SIZE - 1)
|
||||
var/y2 = min(world.maxy, T.y + (CHUNK_SIZE / 2)) & ~(CHUNK_SIZE - 1)
|
||||
|
||||
//to_chat(world, "X1: [x1] - Y1: [y1] - X2: [x2] - Y2: [y2]")
|
||||
|
||||
for(var/x = x1; x <= x2; x += CHUNK_SIZE)
|
||||
for(var/y = y1; y <= y2; y += CHUNK_SIZE)
|
||||
if(chunkGenerated(x, y, T.z))
|
||||
@@ -161,4 +158,4 @@ GLOBAL_DATUM_INIT(cameranet, /datum/cameranet, new)
|
||||
if(cameranet.chunkGenerated(x, y, z))
|
||||
var/datum/camerachunk/chunk = cameranet.getCameraChunk(x, y, z)
|
||||
usr.client.debug_variables(chunk)
|
||||
*/
|
||||
*/
|
||||
|
||||
@@ -307,6 +307,7 @@
|
||||
/obj/item/device/analyzer,
|
||||
/obj/item/device/assembly/signaler/cyborg,
|
||||
/obj/item/areaeditor/blueprints/cyborg,
|
||||
/obj/item/device/electroadaptive_pseudocircuit,
|
||||
/obj/item/stack/sheet/metal/cyborg,
|
||||
/obj/item/stack/sheet/glass/cyborg,
|
||||
/obj/item/stack/sheet/rglass/cyborg,
|
||||
@@ -679,4 +680,4 @@
|
||||
/datum/robot_energy_storage/beacon
|
||||
max_energy = 30
|
||||
recharge_rate = 1
|
||||
name = "Marker Beacon Storage"
|
||||
name = "Marker Beacon Storage"
|
||||
@@ -432,7 +432,6 @@
|
||||
return
|
||||
if(on)
|
||||
var/speed = (wires.is_cut(WIRE_MOTOR1) ? 0 : 1) + (wires.is_cut(WIRE_MOTOR2) ? 0 : 2)
|
||||
//to_chat(world, "speed: [speed]")
|
||||
var/num_steps = 0
|
||||
switch(speed)
|
||||
if(0)
|
||||
@@ -474,8 +473,6 @@
|
||||
path -= next
|
||||
return
|
||||
if(isturf(next))
|
||||
//to_chat(world, "at ([x],[y]) moving to ([next.x],[next.y])")
|
||||
|
||||
if(bloodiness)
|
||||
var/obj/effect/decal/cleanable/blood/tracks/B = new(loc)
|
||||
if(blood_DNA && blood_DNA.len)
|
||||
@@ -497,7 +494,6 @@
|
||||
var/moved = step_towards(src, next) // attempt to move
|
||||
if(cell) cell.use(1)
|
||||
if(moved && oldloc!=loc) // successful move
|
||||
//to_chat(world, "Successful move.")
|
||||
blockcount = 0
|
||||
path -= loc
|
||||
|
||||
@@ -508,7 +504,6 @@
|
||||
|
||||
else // failed to move
|
||||
|
||||
//to_chat(world, "Unable to move.")
|
||||
blockcount++
|
||||
mode = BOT_BLOCKED
|
||||
if(blockcount == 3)
|
||||
@@ -528,16 +523,13 @@
|
||||
return
|
||||
else
|
||||
buzz(ANNOYED)
|
||||
//to_chat(world, "Bad turf.")
|
||||
mode = BOT_NAV
|
||||
return
|
||||
else
|
||||
//to_chat(world, "No path.")
|
||||
mode = BOT_NAV
|
||||
return
|
||||
|
||||
if(BOT_NAV) // calculate new path
|
||||
//to_chat(world, "Calc new path.")
|
||||
mode = BOT_WAIT_FOR_NAV
|
||||
spawn(0)
|
||||
calc_path()
|
||||
|
||||
@@ -65,10 +65,9 @@
|
||||
/mob/living/simple_animal/bot/secbot/Initialize()
|
||||
. = ..()
|
||||
icon_state = "secbot[on]"
|
||||
spawn(3)
|
||||
var/datum/job/detective/J = new/datum/job/detective
|
||||
access_card.access += J.get_access()
|
||||
prev_access = access_card.access
|
||||
var/datum/job/detective/J = new/datum/job/detective
|
||||
access_card.access += J.get_access()
|
||||
prev_access = access_card.access
|
||||
|
||||
//SECHUD
|
||||
var/datum/atom_hud/secsensor = GLOB.huds[DATA_HUD_SECURITY_ADVANCED]
|
||||
@@ -225,21 +224,25 @@ Auto Patrol: []"},
|
||||
playsound(loc, 'sound/weapons/cablecuff.ogg', 30, 1, -2)
|
||||
C.visible_message("<span class='danger'>[src] is trying to put zipties on [C]!</span>",\
|
||||
"<span class='userdanger'>[src] is trying to put zipties on you!</span>")
|
||||
spawn(60)
|
||||
if( !Adjacent(C) || !isturf(C.loc) ) //if he's in a closet or not adjacent, we cancel cuffing.
|
||||
return
|
||||
if(!C.handcuffed)
|
||||
C.handcuffed = new /obj/item/restraints/handcuffs/cable/zipties/used(C)
|
||||
C.update_handcuffed()
|
||||
playsound(loc, pick('sound/voice/bgod.ogg', 'sound/voice/biamthelaw.ogg', 'sound/voice/bsecureday.ogg', 'sound/voice/bradio.ogg', 'sound/voice/binsult.ogg', 'sound/voice/bcreep.ogg'), 50, 0)
|
||||
back_to_idle()
|
||||
addtimer(CALLBACK(src, .proc/attempt_handcuff, C), 60)
|
||||
|
||||
/mob/living/simple_animal/bot/secbot/proc/attempt_handcuff(mob/living/carbon/C)
|
||||
if( !Adjacent(C) || !isturf(C.loc) ) //if he's in a closet or not adjacent, we cancel cuffing.
|
||||
return
|
||||
if(!C.handcuffed)
|
||||
C.handcuffed = new /obj/item/restraints/handcuffs/cable/zipties/used(C)
|
||||
C.update_handcuffed()
|
||||
playsound(src, "law", 50, 0)
|
||||
back_to_idle()
|
||||
|
||||
/mob/living/simple_animal/bot/secbot/proc/update_onsprite()
|
||||
icon_state = "secbot[on]"
|
||||
|
||||
/mob/living/simple_animal/bot/secbot/proc/stun_attack(mob/living/carbon/C)
|
||||
var/judgement_criteria = judgement_criteria()
|
||||
playsound(loc, 'sound/weapons/egloves.ogg', 50, 1, -1)
|
||||
icon_state = "secbot-c"
|
||||
spawn(2)
|
||||
icon_state = "secbot[on]"
|
||||
addtimer(CALLBACK(src, .proc/update_onsprite), 2)
|
||||
var/threat = 5
|
||||
if(ishuman(C))
|
||||
C.stuttering = 5
|
||||
@@ -352,15 +355,13 @@ Auto Patrol: []"},
|
||||
target = null
|
||||
last_found = world.time
|
||||
frustration = 0
|
||||
spawn(0)
|
||||
handle_automated_action() //ensure bot quickly responds
|
||||
INVOKE_ASYNC(src, .proc/handle_automated_action)
|
||||
|
||||
/mob/living/simple_animal/bot/secbot/proc/back_to_hunt()
|
||||
anchored = FALSE
|
||||
frustration = 0
|
||||
mode = BOT_HUNT
|
||||
spawn(0)
|
||||
handle_automated_action() //ensure bot quickly responds
|
||||
INVOKE_ASYNC(src, .proc/handle_automated_action)
|
||||
// look for a criminal in view of the bot
|
||||
|
||||
/mob/living/simple_animal/bot/secbot/proc/look_for_perp()
|
||||
@@ -385,8 +386,7 @@ Auto Patrol: []"},
|
||||
playsound(loc, pick('sound/voice/bcriminal.ogg', 'sound/voice/bjustice.ogg', 'sound/voice/bfreeze.ogg'), 50, 0)
|
||||
visible_message("<b>[src]</b> points at [C.name]!")
|
||||
mode = BOT_HUNT
|
||||
spawn(0)
|
||||
handle_automated_action() // ensure bot quickly responds to a perp
|
||||
INVOKE_ASYNC(src, .proc/handle_automated_action)
|
||||
break
|
||||
else
|
||||
continue
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
var/mob/living/simple_animal/mouse/movement_target
|
||||
gold_core_spawnable = 2
|
||||
devourable = TRUE
|
||||
no_vore = FALSE
|
||||
|
||||
/mob/living/simple_animal/pet/cat/Initialize()
|
||||
. = ..()
|
||||
@@ -84,7 +85,7 @@
|
||||
var/list/family = list()//var restored from savefile, has count of each child type
|
||||
var/list/children = list()//Actual mob instances of children
|
||||
var/cats_deployed = 0
|
||||
var/memory_saved = 0
|
||||
var/memory_saved = FALSE
|
||||
|
||||
/mob/living/simple_animal/pet/cat/Runtime/Initialize()
|
||||
if(prob(5))
|
||||
@@ -99,6 +100,7 @@
|
||||
Deploy_The_Cats()
|
||||
if(!stat && SSticker.current_state == GAME_STATE_FINISHED && !memory_saved)
|
||||
Write_Memory()
|
||||
memory_saved = TRUE
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/pet/cat/Runtime/make_babies()
|
||||
@@ -109,21 +111,26 @@
|
||||
|
||||
/mob/living/simple_animal/pet/cat/Runtime/death()
|
||||
if(!memory_saved)
|
||||
Write_Memory(1)
|
||||
Write_Memory(TRUE)
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/pet/cat/Runtime/proc/Read_Memory()
|
||||
var/json_file = file("data/npc_saves/Runtime.json")
|
||||
if(!fexists(json_file))
|
||||
return
|
||||
var/list/json = list()
|
||||
json = json_decode(file2text(json_file))
|
||||
family = json["family"]
|
||||
if(fexists("data/npc_saves/Runtime.sav")) //legacy compatability to convert old format to new
|
||||
var/savefile/S = new /savefile("data/npc_saves/Runtime.sav")
|
||||
S["family"] >> family
|
||||
fdel("data/npc_saves/Runtime.sav")
|
||||
else
|
||||
var/json_file = file("data/npc_saves/Runtime.json")
|
||||
if(!fexists(json_file))
|
||||
return
|
||||
var/list/json = json_decode(file2text(json_file))
|
||||
family = json["family"]
|
||||
if(isnull(family))
|
||||
family = list()
|
||||
|
||||
/mob/living/simple_animal/pet/cat/Runtime/proc/Write_Memory(dead)
|
||||
var/json_file = file("data/npc_saves/Runtime.json")
|
||||
var/list/file_data = list()
|
||||
family = list()
|
||||
if(!dead)
|
||||
for(var/mob/living/simple_animal/pet/cat/kitten/C in children)
|
||||
@@ -133,9 +140,9 @@
|
||||
family[C.type] += 1
|
||||
else
|
||||
family[C.type] = 1
|
||||
file_data["family"] = family
|
||||
fdel(json_file)
|
||||
WRITE_FILE(json_file, json_encode(family))
|
||||
memory_saved = 1
|
||||
WRITE_FILE(json_file, json_encode(file_data))
|
||||
|
||||
/mob/living/simple_animal/pet/cat/Runtime/proc/Deploy_The_Cats()
|
||||
cats_deployed = 1
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
speak_chance = 1
|
||||
turns_per_move = 10
|
||||
devourable = TRUE
|
||||
no_vore = FALSE
|
||||
|
||||
//Corgis and pugs are now under one dog subtype
|
||||
|
||||
@@ -291,7 +292,7 @@
|
||||
gold_core_spawnable = 0
|
||||
var/age = 0
|
||||
var/record_age = 1
|
||||
var/memory_saved = 0
|
||||
var/memory_saved = FALSE
|
||||
var/saved_head //path
|
||||
|
||||
/mob/living/simple_animal/pet/dog/corgi/Ian/Initialize()
|
||||
@@ -307,7 +308,7 @@
|
||||
P.real_name = "Ian"
|
||||
P.gender = MALE
|
||||
P.desc = "It's the HoP's beloved corgi puppy."
|
||||
Write_Memory(0)
|
||||
Write_Memory(FALSE)
|
||||
qdel(src)
|
||||
else if(age == record_age)
|
||||
icon_state = "old_corgi"
|
||||
@@ -317,24 +318,31 @@
|
||||
turns_per_move = 20
|
||||
|
||||
/mob/living/simple_animal/pet/dog/corgi/Ian/Life()
|
||||
if(SSticker.current_state == GAME_STATE_FINISHED && !memory_saved)
|
||||
Write_Memory(0)
|
||||
if(!stat && SSticker.current_state == GAME_STATE_FINISHED && !memory_saved)
|
||||
Write_Memory(FALSE)
|
||||
memory_saved = TRUE
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/pet/dog/corgi/Ian/death()
|
||||
if(!memory_saved)
|
||||
Write_Memory(1)
|
||||
Write_Memory(TRUE)
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/pet/dog/corgi/Ian/proc/Read_Memory()
|
||||
var/json_file = file("data/npc_saves/Ian.json")
|
||||
if(!fexists(json_file))
|
||||
return
|
||||
var/list/json = list()
|
||||
json = json_decode(file2text(json_file))
|
||||
age = json["age"]
|
||||
record_age = json["record_age"]
|
||||
saved_head = json["saved_head"]
|
||||
if(fexists("data/npc_saves/Ian.sav")) //legacy compatability to convert old format to new
|
||||
var/savefile/S = new /savefile("data/npc_saves/Ian.sav")
|
||||
S["age"] >> age
|
||||
S["record_age"] >> record_age
|
||||
S["saved_head"] >> saved_head
|
||||
fdel("data/npc_saves/Ian.sav")
|
||||
else
|
||||
var/json_file = file("data/npc_saves/Ian.json")
|
||||
if(!fexists(json_file))
|
||||
return
|
||||
var/list/json = json_decode(file2text(json_file))
|
||||
age = json["age"]
|
||||
record_age = json["record_age"]
|
||||
saved_head = json["saved_head"]
|
||||
if(isnull(age))
|
||||
age = 0
|
||||
if(isnull(record_age))
|
||||
@@ -349,14 +357,18 @@
|
||||
file_data["age"] = age + 1
|
||||
if((age + 1) > record_age)
|
||||
file_data["record_age"] = record_age + 1
|
||||
else
|
||||
file_data["record_age"] = record_age
|
||||
if(inventory_head)
|
||||
file_data["saved_head"] = inventory_head.type
|
||||
else
|
||||
file_data["saved_head"] = null
|
||||
else
|
||||
file_data["age"] = 0
|
||||
file_data["record_age"] = record_age
|
||||
file_data["saved_head"] = null
|
||||
fdel(json_file)
|
||||
WRITE_FILE(json_file, json_encode(file_data))
|
||||
memory_saved = 1
|
||||
|
||||
/mob/living/simple_animal/pet/dog/corgi/Ian/Life()
|
||||
..()
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
blood_volume = BLOOD_VOLUME_NORMAL
|
||||
var/obj/item/udder/udder = null
|
||||
devourable = TRUE
|
||||
no_vore = FALSE
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/goat/Initialize()
|
||||
udder = new()
|
||||
@@ -119,6 +120,7 @@
|
||||
gold_core_spawnable = 2
|
||||
blood_volume = BLOOD_VOLUME_NORMAL
|
||||
devourable = TRUE
|
||||
no_vore = FALSE
|
||||
|
||||
/mob/living/simple_animal/cow/Initialize()
|
||||
udder = new()
|
||||
@@ -251,6 +253,7 @@
|
||||
gold_core_spawnable = 2
|
||||
var/static/chicken_count = 0
|
||||
devourable = TRUE
|
||||
no_vore = FALSE
|
||||
|
||||
/mob/living/simple_animal/chicken/Initialize()
|
||||
. = ..()
|
||||
@@ -275,7 +278,6 @@
|
||||
user.drop_item()
|
||||
qdel(O)
|
||||
eggsleft += rand(1, 4)
|
||||
//to_chat(world, eggsleft)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[name] doesn't seem hungry!</span>")
|
||||
else
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
devourable = TRUE
|
||||
var/mob/living/simple_animal/mouse/movement_target
|
||||
var/turns_since_scan = 0
|
||||
no_vore = FALSE
|
||||
|
||||
/mob/living/simple_animal/pet/fox/Life()
|
||||
//MICE!
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
|
||||
/mob/living/simple_animal/mouse/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/squeak, list('sound/effects/mousesqueek.ogg'=1), 100)
|
||||
if(!body_color)
|
||||
body_color = pick( list("brown","gray","white") )
|
||||
icon_state = "mouse_[body_color]"
|
||||
@@ -58,7 +59,6 @@
|
||||
if(!stat)
|
||||
var/mob/M = AM
|
||||
to_chat(M, "<span class='notice'>[icon2html(src, M)] Squeek!</span>")
|
||||
playsound(src, 'sound/effects/mousesqueek.ogg', 100, 1)
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/mouse/handle_automated_action()
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
speak_chance = 1
|
||||
turns_per_move = 10
|
||||
icon = 'icons/mob/penguins.dmi'
|
||||
no_vore = FALSE
|
||||
|
||||
/mob/living/simple_animal/pet/penguin/emperor
|
||||
name = "Emperor penguin"
|
||||
|
||||
@@ -35,6 +35,8 @@
|
||||
gold_core_spawnable = 0
|
||||
death_sound = 'sound/voice/hiss6.ogg'
|
||||
deathmessage = "lets out a waning guttural screech, green blood bubbling from its maw..."
|
||||
devourable = TRUE
|
||||
no_vore = FALSE
|
||||
|
||||
/mob/living/simple_animal/hostile/alien/drone
|
||||
name = "alien drone"
|
||||
|
||||
@@ -36,6 +36,8 @@
|
||||
|
||||
faction = list("russian")
|
||||
gold_core_spawnable = 1
|
||||
devourable = TRUE
|
||||
no_vore = FALSE
|
||||
|
||||
//SPACE BEARS! SQUEEEEEEEE~ OW! FUCK! IT BIT MY HAND OFF!!
|
||||
/mob/living/simple_animal/hostile/bear/Hudson
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
maxHealth = 25
|
||||
health = 25
|
||||
devourable = TRUE
|
||||
no_vore = FALSE
|
||||
|
||||
harm_intent_damage = 8
|
||||
obj_damage = 50
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
melee_damage_upper = 18
|
||||
damage_coeff = list(BRUTE = 1, BURN = 1.5, TOX = 1.5, CLONE = 0, STAMINA = 0, OXY = 1.5)
|
||||
obj_damage = 20
|
||||
environment_smash = 2
|
||||
environment_smash = ENVIRONMENT_SMASH_WALLS
|
||||
attacktext = "pummels"
|
||||
attack_sound = 'sound/weapons/punch1.ogg'
|
||||
dextrous = TRUE
|
||||
@@ -32,7 +32,11 @@
|
||||
stat_attack = UNCONSCIOUS
|
||||
minbodytemp = 270
|
||||
maxbodytemp = 350
|
||||
unique_name = TRUE
|
||||
var/list/gorilla_overlays[GORILLA_TOTAL_LAYERS]
|
||||
var/oogas = 0
|
||||
devourable = TRUE
|
||||
no_vore = FALSE
|
||||
|
||||
// Gorillas like to dismember limbs from unconcious mobs.
|
||||
// Returns null when the target is not an unconcious carbon mob; a list of limbs (possibly empty) otherwise.
|
||||
@@ -49,6 +53,8 @@
|
||||
return parts
|
||||
|
||||
/mob/living/simple_animal/hostile/gorilla/AttackingTarget()
|
||||
if(client)
|
||||
oogaooga()
|
||||
var/list/parts = target_bodyparts(target)
|
||||
if(parts)
|
||||
if(!parts.len)
|
||||
@@ -61,7 +67,7 @@
|
||||
var/mob/living/L = target
|
||||
if(prob(80))
|
||||
var/atom/throw_target = get_edge_target_turf(L, dir)
|
||||
L.throw_at(throw_target, rand(1,2), 7, src)
|
||||
L.throw_at(throw_target, rand(1,2), 7, src)
|
||||
else
|
||||
L.Knockdown(20)
|
||||
visible_message("<span class='danger'>[src] knocks [L] down!</span>")
|
||||
@@ -70,8 +76,30 @@
|
||||
var/list/parts = target_bodyparts(target)
|
||||
return ..() && !istype(the_target, /mob/living/carbon/monkey) && (!parts || parts.len > 3)
|
||||
|
||||
/mob/living/simple_animal/hostile/gorilla/CanSmashTurfs(turf/T)
|
||||
return iswallturf(T)
|
||||
|
||||
/mob/living/simple_animal/hostile/gorilla/gib(no_brain)
|
||||
if(!no_brain)
|
||||
var/mob/living/brain/B = new(drop_location())
|
||||
B.name = real_name
|
||||
B.real_name = real_name
|
||||
if(mind)
|
||||
mind.transfer_to(B)
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/hostile/gorilla/handle_automated_speech(override)
|
||||
if(speak_chance && (override || prob(speak_chance)))
|
||||
playsound(src, "sound/creatures/gorilla.ogg", 200)
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/hostile/gorilla/can_use_guns(obj/item/G)
|
||||
to_chat(src, "<span class='warning'>Your meaty finger is much too large for the trigger guard!</span>")
|
||||
return FALSE
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/gorilla/proc/oogaooga()
|
||||
oogas++
|
||||
if(oogas >= rand(2,6))
|
||||
playsound(src, "sound/creatures/gorilla.ogg", 200)
|
||||
oogas = 0
|
||||
|
||||
@@ -228,6 +228,9 @@
|
||||
if(!target || !CanAttack(target))
|
||||
LoseTarget()
|
||||
return 0
|
||||
if(ismob(target.loc))
|
||||
LoseTarget()
|
||||
return 0
|
||||
if(target in possible_targets)
|
||||
if(target.z != z)
|
||||
LoseTarget()
|
||||
@@ -366,23 +369,26 @@
|
||||
P.original = targeted_atom
|
||||
P.fire()
|
||||
return P
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/proc/CanSmashTurfs(turf/T)
|
||||
return iswallturf(T) || ismineralturf(T)
|
||||
|
||||
/mob/living/simple_animal/hostile/proc/DestroySurroundings()
|
||||
if(environment_smash)
|
||||
EscapeConfinement()
|
||||
for(var/dir in GLOB.cardinals)
|
||||
var/turf/T = get_step(targets_from, dir)
|
||||
if(iswallturf(T) || ismineralturf(T))
|
||||
if(CanSmashTurfs(T))
|
||||
if(T.Adjacent(targets_from))
|
||||
T.attack_animal(src)
|
||||
for(var/a in T)
|
||||
var/atom/A = a
|
||||
if(!A.Adjacent(targets_from))
|
||||
continue
|
||||
if(is_type_in_typecache(A, environment_target_typecache))
|
||||
if(is_type_in_typecache(A, environment_target_typecache) && !A.IsObscured())
|
||||
A.attack_animal(src)
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/proc/EscapeConfinement()
|
||||
if(buckled)
|
||||
buckled.attack_animal(src)
|
||||
|
||||
@@ -250,7 +250,7 @@ Difficulty: Very Hard
|
||||
use_power = NO_POWER_USE
|
||||
var/memory_saved = FALSE
|
||||
var/list/stored_items = list()
|
||||
var/static/list/blacklist = typecacheof(list(/obj/item/spellbook))
|
||||
var/list/blacklist = list()
|
||||
|
||||
/obj/machinery/smartfridge/black_box/update_icon()
|
||||
return
|
||||
@@ -276,6 +276,7 @@ Difficulty: Very Hard
|
||||
..()
|
||||
if(!memory_saved && SSticker.current_state == GAME_STATE_FINISHED)
|
||||
WriteMemory()
|
||||
memory_saved = TRUE
|
||||
|
||||
/obj/machinery/smartfridge/black_box/proc/WriteMemory()
|
||||
var/json_file = file("data/npc_saves/Blackbox.json")
|
||||
@@ -287,15 +288,18 @@ Difficulty: Very Hard
|
||||
file_data["data"] = stored_items
|
||||
fdel(json_file)
|
||||
WRITE_FILE(json_file, json_encode(file_data))
|
||||
memory_saved = TRUE
|
||||
|
||||
/obj/machinery/smartfridge/black_box/proc/ReadMemory()
|
||||
var/json_file = file("data/npc_saves/Blackbox.json")
|
||||
if(!fexists(json_file))
|
||||
return
|
||||
var/list/json = list()
|
||||
json = json_decode(file2text(json_file))
|
||||
stored_items = json["data"]
|
||||
if(fexists("data/npc_saves/Blackbox.sav")) //legacy compatability to convert old format to new
|
||||
var/savefile/S = new /savefile("data/npc_saves/Blackbox.sav")
|
||||
S["stored_items"] >> stored_items
|
||||
fdel("data/npc_saves/Blackbox.sav")
|
||||
else
|
||||
var/json_file = file("data/npc_saves/Blackbox.json")
|
||||
if(!fexists(json_file))
|
||||
return
|
||||
var/list/json = json_decode(file2text(json_file))
|
||||
stored_items = json["data"]
|
||||
if(isnull(stored_items))
|
||||
stored_items = list()
|
||||
|
||||
@@ -789,4 +793,4 @@ Difficulty: Very Hard
|
||||
#undef ACTIVATE_WEAPON
|
||||
#undef ACTIVATE_MAGIC
|
||||
|
||||
#undef MEDAL_PREFIX
|
||||
#undef MEDAL_PREFIX
|
||||
@@ -60,6 +60,7 @@ Difficulty: Medium
|
||||
score_type = DRAKE_SCORE
|
||||
deathmessage = "collapses into a pile of bones, its flesh sloughing away."
|
||||
death_sound = 'sound/magic/demon_dies.ogg'
|
||||
no_vore = FALSE
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/dragon/Initialize()
|
||||
. = ..()
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
/mob/living/simple_animal/hostile/megafauna/dragon
|
||||
vore_active = TRUE
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/dragon/Initialize()
|
||||
// Create and register 'stomachs'
|
||||
var/datum/belly/megafauna/dragon/maw/maw = new(src)
|
||||
var/datum/belly/megafauna/dragon/gullet/gullet = new(src)
|
||||
var/datum/belly/megafauna/dragon/gut/gut = new(src)
|
||||
for(var/datum/belly/X in list(maw, gullet, gut))
|
||||
vore_organs[X.name] = X
|
||||
// Connect 'stomachs' together
|
||||
maw.transferlocation = gullet
|
||||
gullet.transferlocation = gut
|
||||
vore_selected = maw.name // NPC eats into maw
|
||||
return ..()
|
||||
|
||||
/datum/belly/megafauna/dragon
|
||||
human_prey_swallow_time = 50 // maybe enough to switch targets if distracted
|
||||
nonhuman_prey_swallow_time = 50
|
||||
|
||||
/datum/belly/megafauna/dragon/maw
|
||||
name = "maw"
|
||||
inside_flavor = "The maw of the dreaded Ash drake closes around you, engulfing you into a swelteringly hot, disgusting enviroment. The acidic saliva tingles over your form while that tongue pushes you further back...towards the dark gullet beyond."
|
||||
vore_verb = "scoop"
|
||||
vore_sound = 'sound/vore/pred/taurswallow.ogg'
|
||||
swallow_time = 20
|
||||
escapechance = 25
|
||||
// From above, will transfer into gullet
|
||||
transferchance = 25
|
||||
autotransferchance = 66
|
||||
autotransferwait = 200
|
||||
|
||||
/datum/belly/megafauna/dragon/gullet
|
||||
name = "gullet"
|
||||
inside_flavor = "A ripple of muscle and arching of the tongue pushes you down like any other food. No choice in the matter, you're simply consumed. The dark ambiance of the outside world is replaced with working, wet flesh. Your only light being what you brought with you."
|
||||
swallow_time = 60 // costs extra time to eat directly to here
|
||||
escapechance = 5
|
||||
// From above, will transfer into gut
|
||||
transferchance = 25
|
||||
autotransferchance = 50
|
||||
autotransferwait = 200
|
||||
|
||||
/datum/belly/megafauna/dragon/gut
|
||||
name = "stomach"
|
||||
vore_capacity = 5 //I doubt this many people will actually last in the gut, but...
|
||||
inside_flavor = "With a rush of burning ichor greeting you, you're introduced to the Drake's stomach. Wrinkled walls greedily grind against you, acidic slimes working into your body as you become fuel and nutriton for a superior predator. All that's left is your body's willingness to resist your destiny."
|
||||
digest_mode = DM_DRAGON
|
||||
digest_burn = 5
|
||||
swallow_time = 100 // costs extra time to eat directly to here
|
||||
escapechance = 0
|
||||
@@ -89,11 +89,15 @@
|
||||
. = ..()
|
||||
if(. && isliving(target))
|
||||
var/mob/living/L = target
|
||||
if(L.stat != DEAD)
|
||||
if(!client && ranged && ranged_cooldown <= world.time)
|
||||
OpenFire()
|
||||
if(L.stat >= SOFT_CRIT)
|
||||
if(vore_active == TRUE && L.devourable == TRUE)
|
||||
dragon_feeding(src,L)
|
||||
else if(L.stat == DEAD)
|
||||
devour(L)
|
||||
else
|
||||
devour(L)
|
||||
if(L.stat != DEAD)
|
||||
if(!client && ranged && ranged_cooldown <= world.time)
|
||||
OpenFire()
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/proc/devour(mob/living/L)
|
||||
if(!L)
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
var/pre_attack = 0
|
||||
var/pre_attack_icon = "Goliath_preattack"
|
||||
loot = list(/obj/item/stack/sheet/animalhide/goliath_hide)
|
||||
no_vore = FALSE
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/goliath/Life()
|
||||
. = ..()
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
cap_color = rgb(rand(0, 255), rand(0, 255), rand(0, 255))
|
||||
UpdateMushroomCap()
|
||||
health = maxHealth
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/mushroom/adjustHealth(amount, updating_health = TRUE, forced = FALSE) //Possibility to flee from a fight just to make it more visually interesting
|
||||
if(!retreat_distance && prob(33))
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
minimum_distance = 5
|
||||
icon_state = "stickmanranged"
|
||||
icon_living = "stickmanranged"
|
||||
casingtype = /obj/item/ammo_casing/c45nostamina
|
||||
casingtype = /obj/item/ammo_casing/c45/nostamina
|
||||
projectilesound = 'sound/misc/bang.ogg'
|
||||
loot = list(/obj/item/gun/ballistic/automatic/pistol/stickman)
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
minimum_distance = 5
|
||||
icon_state = "syndicateranged"
|
||||
icon_living = "syndicateranged"
|
||||
casingtype = /obj/item/ammo_casing/c45nostamina
|
||||
casingtype = /obj/item/ammo_casing/c45/nostamina
|
||||
projectilesound = 'sound/weapons/gunshot_smg.ogg'
|
||||
loot = list(/obj/effect/gibspawner/human)
|
||||
|
||||
|
||||
@@ -60,6 +60,7 @@
|
||||
movement_type = FLYING
|
||||
gold_core_spawnable = 2
|
||||
devourable = TRUE
|
||||
no_vore = FALSE
|
||||
|
||||
var/parrot_damage_upper = 10
|
||||
var/parrot_state = PARROT_WANDER //Hunt for a perch when created
|
||||
@@ -296,7 +297,7 @@
|
||||
else
|
||||
parrot_state |= PARROT_FLEE //Otherwise, fly like a bat out of hell!
|
||||
drop_held_item(0)
|
||||
if(!stat && M.a_intent == INTENT_HELP)
|
||||
if(stat != DEAD && M.a_intent == INTENT_HELP)
|
||||
handle_automated_speech(1) //assured speak/emote
|
||||
return
|
||||
|
||||
@@ -872,7 +873,7 @@
|
||||
speak = list("Poly wanna cracker!", ":e Check the crystal, you chucklefucks!",":e Wire the solars, you lazy bums!",":e WHO TOOK THE DAMN HARDSUITS?",":e OH GOD ITS ABOUT TO DELAMINATE CALL THE SHUTTLE")
|
||||
gold_core_spawnable = 0
|
||||
speak_chance = 3
|
||||
var/memory_saved = 0
|
||||
var/memory_saved = FALSE
|
||||
var/rounds_survived = 0
|
||||
var/longest_survival = 0
|
||||
var/longest_deathstreak = 0
|
||||
@@ -903,50 +904,62 @@
|
||||
rounds_survived = max(++rounds_survived,1)
|
||||
if(rounds_survived > longest_survival)
|
||||
longest_survival = rounds_survived
|
||||
Write_Memory()
|
||||
Write_Memory(FALSE)
|
||||
memory_saved = TRUE
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/parrot/Poly/death(gibbed)
|
||||
if(!memory_saved)
|
||||
var/go_ghost = 0
|
||||
if(rounds_survived == longest_survival || rounds_survived == longest_deathstreak || prob(0.666))
|
||||
go_ghost = 1
|
||||
rounds_survived = min(--rounds_survived,0)
|
||||
if(rounds_survived < longest_deathstreak)
|
||||
longest_deathstreak = rounds_survived
|
||||
Write_Memory()
|
||||
if(go_ghost)
|
||||
var/mob/living/simple_animal/parrot/Poly/ghost/G = new(loc)
|
||||
if(mind)
|
||||
mind.transfer_to(G)
|
||||
else
|
||||
G.key = key
|
||||
Write_Memory(TRUE)
|
||||
if(rounds_survived == longest_survival || rounds_survived == longest_deathstreak || prob(0.666))
|
||||
var/mob/living/simple_animal/parrot/Poly/ghost/G = new(loc)
|
||||
if(mind)
|
||||
mind.transfer_to(G)
|
||||
else
|
||||
G.key = key
|
||||
..(gibbed)
|
||||
|
||||
/mob/living/simple_animal/parrot/Poly/proc/Read_Memory()
|
||||
var/json_file = file("data/npc_saves/Poly.json")
|
||||
if(!fexists(json_file))
|
||||
return
|
||||
var/list/json = list()
|
||||
json = json_decode(file2text(json_file))
|
||||
speech_buffer = json["phrases"]
|
||||
rounds_survived = json["roundssurvived"]
|
||||
longest_survival = json["longestsurvival"]
|
||||
longest_deathstreak = json["longestdeathstreak"]
|
||||
if(fexists("data/npc_saves/Poly.sav")) //legacy compatability to convert old format to new
|
||||
var/savefile/S = new /savefile("data/npc_saves/Poly.sav")
|
||||
S["phrases"] >> speech_buffer
|
||||
S["roundssurvived"] >> rounds_survived
|
||||
S["longestsurvival"] >> longest_survival
|
||||
S["longestdeathstreak"] >> longest_deathstreak
|
||||
fdel("data/npc_saves/Poly.sav")
|
||||
else
|
||||
var/json_file = file("data/npc_saves/Poly.json")
|
||||
if(!fexists(json_file))
|
||||
return
|
||||
var/list/json = json_decode(file2text(json_file))
|
||||
speech_buffer = json["phrases"]
|
||||
rounds_survived = json["roundssurvived"]
|
||||
longest_survival = json["longestsurvival"]
|
||||
longest_deathstreak = json["longestdeathstreak"]
|
||||
if(!islist(speech_buffer))
|
||||
speech_buffer = list()
|
||||
|
||||
/mob/living/simple_animal/parrot/Poly/proc/Write_Memory()
|
||||
/mob/living/simple_animal/parrot/Poly/proc/Write_Memory(dead)
|
||||
var/json_file = file("data/npc_saves/Poly.json")
|
||||
var/list/file_data = list()
|
||||
if(islist(speech_buffer))
|
||||
file_data["phrases"] = speech_buffer
|
||||
file_data["roundssurvived"] = rounds_survived
|
||||
file_data["longestsurvival"] = longest_survival
|
||||
file_data["longestdeathstreak"] = longest_deathstreak
|
||||
if(dead)
|
||||
file_data["roundssurvived"] = min(rounds_survived - 1, 0)
|
||||
file_data["longestsurvival"] = longest_survival
|
||||
if(rounds_survived - 1 < longest_deathstreak)
|
||||
file_data["longestdeathstreak"] = rounds_survived - 1
|
||||
else
|
||||
file_data["longestdeathstreak"] = longest_deathstreak
|
||||
else
|
||||
file_data["roundssurvived"] = rounds_survived + 1
|
||||
if(rounds_survived + 1 > longest_survival)
|
||||
file_data["longestsurvival"] = rounds_survived + 1
|
||||
else
|
||||
file_data["longestsurvival"] = longest_survival
|
||||
file_data["longestdeathstreak"] = longest_deathstreak
|
||||
fdel(json_file)
|
||||
WRITE_FILE(json_file, json_encode(file_data))
|
||||
memory_saved = 1
|
||||
|
||||
/mob/living/simple_animal/parrot/Poly/ghost
|
||||
name = "The Ghost of Poly"
|
||||
@@ -958,7 +971,7 @@
|
||||
butcher_results = list(/obj/item/ectoplasm = 1)
|
||||
|
||||
/mob/living/simple_animal/parrot/Poly/ghost/Initialize()
|
||||
memory_saved = 1 //At this point nothing is saved
|
||||
memory_saved = TRUE //At this point nothing is saved
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/parrot/Poly/ghost/handle_automated_speech()
|
||||
@@ -983,4 +996,4 @@
|
||||
loc = H
|
||||
H.ContractDisease(P)
|
||||
parrot_interest = null
|
||||
H.visible_message("<span class='danger'>[src] dive bombs into [H]'s chest and vanishes!</span>", "<span class='userdanger'>[src] dive bombs into your chest, vanishing! This can't be good!</span>")
|
||||
H.visible_message("<span class='danger'>[src] dive bombs into [H]'s chest and vanishes!</span>", "<span class='userdanger'>[src] dive bombs into your chest, vanishing! This can't be good!</span>")
|
||||
@@ -85,6 +85,8 @@
|
||||
//domestication
|
||||
var/tame = 0
|
||||
|
||||
no_vore = TRUE
|
||||
|
||||
/mob/living/simple_animal/Initialize()
|
||||
. = ..()
|
||||
GLOB.simple_animals += src
|
||||
@@ -231,7 +233,6 @@
|
||||
if( abs(areatemp - bodytemperature) > 40 )
|
||||
var/diff = areatemp - bodytemperature
|
||||
diff = diff / 5
|
||||
//to_chat(world, "changed from [bodytemperature] by [diff] to [bodytemperature + diff]")
|
||||
bodytemperature += diff
|
||||
|
||||
if(!environment_is_safe(environment))
|
||||
|
||||
@@ -4,15 +4,15 @@
|
||||
devourable = FALSE //insurance because who knows.
|
||||
var/vore_active = FALSE // If vore behavior is enabled for this mob
|
||||
|
||||
var/vore_capacity = 1 // The capacity (in people) this person can hold
|
||||
var/vore_default_mode = DM_DIGEST // Default bellymode (DM_DIGEST, DM_HOLD, DM_ABSORB)
|
||||
var/vore_digest_chance = 25 // Chance to switch to digest mode if resisted
|
||||
var/vore_absorb_chance = 0 // Chance to switch to absorb mode if resisted
|
||||
var/vore_escape_chance = 25 // Chance of resisting out of mob
|
||||
|
||||
var/vore_stomach_name // The name for the first belly if not "stomach"
|
||||
var/vore_stomach_flavor // The flavortext for the first belly if not the default
|
||||
|
||||
var/vore_fullness = 0 // How "full" the belly is (controls icons)
|
||||
|
||||
|
||||
// Release belly contents beforey being gc'd!
|
||||
/mob/living/simple_animal/Destroy()
|
||||
@@ -22,6 +22,37 @@
|
||||
prey_excludes.Cut()
|
||||
. = ..()
|
||||
|
||||
|
||||
// Update fullness based on size & quantity of belly contents
|
||||
/mob/living/simple_animal/proc/update_fullness(var/atom/movable/M)
|
||||
var/new_fullness = 0
|
||||
for(var/I in vore_organs)
|
||||
var/datum/belly/B = vore_organs[I]
|
||||
if (!(M in B.internal_contents))
|
||||
return FALSE // Nothing's inside
|
||||
new_fullness += M
|
||||
|
||||
vore_fullness = new_fullness
|
||||
|
||||
|
||||
/mob/living/simple_animal/proc/swallow_check()
|
||||
for(var/I in vore_organs)
|
||||
var/datum/belly/B = vore_organs[I]
|
||||
if(vore_active)
|
||||
update_fullness()
|
||||
if(!vore_fullness)
|
||||
// Nothing
|
||||
return
|
||||
else
|
||||
addtimer(CALLBACK(src, .proc/swallow_mob), B.swallow_time)
|
||||
|
||||
/mob/living/simple_animal/proc/swallow_mob()
|
||||
for(var/I in vore_organs)
|
||||
var/datum/belly/B = vore_organs[I]
|
||||
for(var/mob/living/M in B.internal_contents)
|
||||
B.transfer_contents(M, B.transferlocation)
|
||||
|
||||
|
||||
/mob/living/simple_animal/death()
|
||||
for(var/I in vore_organs)
|
||||
var/datum/belly/B = vore_organs[I]
|
||||
@@ -69,4 +100,3 @@
|
||||
"The stomach glorps and gurgles as it tries to work you into slop.")
|
||||
src.vore_organs[B.name] = B
|
||||
src.vore_selected = B.name
|
||||
|
||||
|
||||
@@ -546,6 +546,35 @@
|
||||
to_chat(user, "<span class='notice'>You place the power control board inside the frame.</span>")
|
||||
qdel(W)
|
||||
|
||||
else if(istype(W, /obj/item/device/electroadaptive_pseudocircuit) && opened)
|
||||
var/obj/item/device/electroadaptive_pseudocircuit/P = W
|
||||
if(!has_electronics)
|
||||
if(stat & BROKEN)
|
||||
to_chat(user, "<span class='warning'>[src]'s frame is too damaged to support a circuit.</span>")
|
||||
return
|
||||
if(!P.adapt_circuit(user, 50))
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] fabricates a circuit and places it into [src].</span>", \
|
||||
"<span class='notice'>You adapt a power control board and click it into place in [src]'s guts.</span>")
|
||||
has_electronics = TRUE
|
||||
locked = TRUE
|
||||
else if(!cell)
|
||||
if(stat & MAINT)
|
||||
to_chat(user, "<span class='warning'>There's no connector for a power cell.</span>")
|
||||
return
|
||||
if(!P.adapt_circuit(user, 500))
|
||||
return
|
||||
var/obj/item/stock_parts/cell/crap/empty/C = new(src)
|
||||
C.forceMove(src)
|
||||
cell = C
|
||||
chargecount = 0
|
||||
user.visible_message("<span class='notice'>[user] fabricates a weak power cell and places it into [src].</span>", \
|
||||
"<span class='warning'>Your [P.name] whirrs with strain as you create a weak power cell and place it into [src]!</span>")
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] has both electronics and a cell.</span>")
|
||||
return
|
||||
|
||||
else if (istype(W, /obj/item/weldingtool) && opened && has_electronics==0 && !terminal)
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if (WT.get_fuel() < 3)
|
||||
|
||||
@@ -82,24 +82,16 @@
|
||||
return
|
||||
|
||||
if(powernet)
|
||||
//to_chat(world, "cold_circ and hot_circ pass")
|
||||
|
||||
var/datum/gas_mixture/cold_air = cold_circ.return_transfer_air()
|
||||
var/datum/gas_mixture/hot_air = hot_circ.return_transfer_air()
|
||||
|
||||
//to_chat(world, "hot_air = [hot_air]; cold_air = [cold_air];")
|
||||
|
||||
if(cold_air && hot_air)
|
||||
|
||||
//to_chat(world, "hot_air = [hot_air] temperature = [hot_air.temperature]; cold_air = [cold_air] temperature = [hot_air.temperature];")
|
||||
|
||||
//to_chat(world, "coldair and hotair pass")
|
||||
var/cold_air_heat_capacity = cold_air.heat_capacity()
|
||||
var/hot_air_heat_capacity = hot_air.heat_capacity()
|
||||
|
||||
var/delta_temperature = hot_air.temperature - cold_air.temperature
|
||||
|
||||
//to_chat(world, "delta_temperature = [delta_temperature]; cold_air_heat_capacity = [cold_air_heat_capacity]; hot_air_heat_capacity = [hot_air_heat_capacity]")
|
||||
|
||||
if(delta_temperature > 0 && cold_air_heat_capacity > 0 && hot_air_heat_capacity > 0)
|
||||
var/efficiency = 0.65
|
||||
@@ -109,13 +101,9 @@
|
||||
var/heat = energy_transfer*(1-efficiency)
|
||||
lastgen += energy_transfer*efficiency
|
||||
|
||||
//to_chat(world, "lastgen = [lastgen]; heat = [heat]; delta_temperature = [delta_temperature]; hot_air_heat_capacity = [hot_air_heat_capacity]; cold_air_heat_capacity = [cold_air_heat_capacity];")
|
||||
|
||||
hot_air.temperature = hot_air.temperature - energy_transfer/hot_air_heat_capacity
|
||||
cold_air.temperature = cold_air.temperature + heat/cold_air_heat_capacity
|
||||
|
||||
//to_chat(world, "POWER: [lastgen] W generated at [efficiency*100]% efficiency and sinks sizes [cold_air_heat_capacity], [hot_air_heat_capacity]")
|
||||
|
||||
//add_avail(lastgen) This is done in process now
|
||||
// update icon overlays only if displayed level has changed
|
||||
|
||||
|
||||
@@ -1,100 +1,126 @@
|
||||
// .357 (Syndie Revolver)
|
||||
|
||||
/obj/item/ammo_casing/a357
|
||||
name = ".357 bullet casing"
|
||||
desc = "A .357 bullet casing."
|
||||
caliber = "357"
|
||||
projectile_type = /obj/item/projectile/bullet
|
||||
projectile_type = /obj/item/projectile/bullet/a357
|
||||
|
||||
// 7.62 (Nagant Rifle)
|
||||
|
||||
/obj/item/ammo_casing/a762
|
||||
name = "7.62 bullet casing"
|
||||
desc = "A 7.62 bullet casing."
|
||||
icon_state = "762-casing"
|
||||
caliber = "a762"
|
||||
projectile_type = /obj/item/projectile/bullet
|
||||
projectile_type = /obj/item/projectile/bullet/a762
|
||||
|
||||
/obj/item/ammo_casing/a762/enchanted
|
||||
projectile_type = /obj/item/projectile/bullet/weakbullet3
|
||||
projectile_type = /obj/item/projectile/bullet/a762_enchanted
|
||||
|
||||
/obj/item/ammo_casing/a50
|
||||
desc = "A .50AE bullet casing."
|
||||
caliber = ".50"
|
||||
projectile_type = /obj/item/projectile/bullet
|
||||
|
||||
/obj/item/ammo_casing/c38
|
||||
desc = "A .38 bullet casing."
|
||||
caliber = "38"
|
||||
projectile_type = /obj/item/projectile/bullet/weakbullet2
|
||||
|
||||
/obj/item/ammo_casing/c10mm
|
||||
desc = "A 10mm bullet casing."
|
||||
caliber = "10mm"
|
||||
projectile_type = /obj/item/projectile/bullet/midbullet3
|
||||
|
||||
/obj/item/ammo_casing/c10mm/ap
|
||||
projectile_type = /obj/item/projectile/bullet/midbullet3/ap
|
||||
|
||||
/obj/item/ammo_casing/c10mm/fire
|
||||
projectile_type = /obj/item/projectile/bullet/midbullet3/fire
|
||||
|
||||
/obj/item/ammo_casing/c10mm/hp
|
||||
projectile_type = /obj/item/projectile/bullet/midbullet3/hp
|
||||
|
||||
/obj/item/ammo_casing/c9mm
|
||||
desc = "A 9mm bullet casing."
|
||||
caliber = "9mm"
|
||||
projectile_type = /obj/item/projectile/bullet/weakbullet3
|
||||
|
||||
/obj/item/ammo_casing/c9mmap
|
||||
desc = "A 9mm bullet casing."
|
||||
caliber = "9mm"
|
||||
projectile_type =/obj/item/projectile/bullet/armourpiercing
|
||||
|
||||
/obj/item/ammo_casing/c9mmtox
|
||||
desc = "A 9mm bullet casing."
|
||||
caliber = "9mm"
|
||||
projectile_type = /obj/item/projectile/bullet/toxinbullet
|
||||
|
||||
/obj/item/ammo_casing/c9mminc
|
||||
desc = "A 9mm bullet casing."
|
||||
caliber = "9mm"
|
||||
projectile_type = /obj/item/projectile/bullet/incendiary/firebullet
|
||||
|
||||
/obj/item/ammo_casing/c46x30mm
|
||||
desc = "A 4.6x30mm bullet casing."
|
||||
caliber = "4.6x30mm"
|
||||
projectile_type = /obj/item/projectile/bullet/weakbullet3
|
||||
|
||||
/obj/item/ammo_casing/c46x30mmap
|
||||
desc = "A 4.6x30mm bullet casing."
|
||||
caliber = "4.6x30mm"
|
||||
projectile_type =/obj/item/projectile/bullet/armourpiercing
|
||||
|
||||
/obj/item/ammo_casing/c46x30mmtox
|
||||
desc = "A 4.6x30mm bullet casing."
|
||||
caliber = "4.6x30mm"
|
||||
projectile_type = /obj/item/projectile/bullet/toxinbullet
|
||||
|
||||
/obj/item/ammo_casing/c46x30mminc
|
||||
desc = "A 4.6x30mm bullet casing."
|
||||
caliber = "4.6x30mm"
|
||||
projectile_type = /obj/item/projectile/bullet/incendiary/firebullet
|
||||
|
||||
/obj/item/ammo_casing/c45
|
||||
desc = "A .45 bullet casing."
|
||||
caliber = ".45"
|
||||
projectile_type = /obj/item/projectile/bullet/midbullet
|
||||
|
||||
/obj/item/ammo_casing/c45nostamina
|
||||
desc = "A .45 bullet casing."
|
||||
caliber = ".45"
|
||||
projectile_type = /obj/item/projectile/bullet/midbullet3
|
||||
// 7.62x38mmR (Nagant Revolver)
|
||||
|
||||
/obj/item/ammo_casing/n762
|
||||
name = "7.62x38mmR bullet casing"
|
||||
desc = "A 7.62x38mmR bullet casing."
|
||||
caliber = "n762"
|
||||
projectile_type = /obj/item/projectile/bullet
|
||||
projectile_type = /obj/item/projectile/bullet/n762
|
||||
|
||||
// .50AE (Desert Eagle)
|
||||
|
||||
/obj/item/ammo_casing/a50AE
|
||||
name = ".50AE bullet casing"
|
||||
desc = "A .50AE bullet casing."
|
||||
caliber = ".50"
|
||||
projectile_type = /obj/item/projectile/bullet/a50AE
|
||||
|
||||
// .38 (Detective's Gun)
|
||||
|
||||
/obj/item/ammo_casing/c38
|
||||
name = ".38 bullet casing"
|
||||
desc = "A .38 bullet casing."
|
||||
caliber = "38"
|
||||
projectile_type = /obj/item/projectile/bullet/c38
|
||||
|
||||
// 10mm (Stechkin)
|
||||
|
||||
/obj/item/ammo_casing/c10mm
|
||||
name = ".10mm bullet casing"
|
||||
desc = "A 10mm bullet casing."
|
||||
caliber = "10mm"
|
||||
projectile_type = /obj/item/projectile/bullet/c10mm
|
||||
|
||||
/obj/item/ammo_casing/c10mm/ap
|
||||
name = ".10mm armor-piercing bullet casing"
|
||||
desc = "A 10mm armor-piercing bullet casing."
|
||||
projectile_type = /obj/item/projectile/bullet/c10mm_ap
|
||||
|
||||
/obj/item/ammo_casing/c10mm/hp
|
||||
name = ".10mm hollow-point bullet casing"
|
||||
desc = "A 10mm hollow-point bullet casing."
|
||||
projectile_type = /obj/item/projectile/bullet/c10mm_hp
|
||||
|
||||
/obj/item/ammo_casing/c10mm/fire
|
||||
name = ".10mm incendiary bullet casing"
|
||||
desc = "A 10mm incendiary bullet casing."
|
||||
projectile_type = /obj/item/projectile/bullet/incendiary/c10mm
|
||||
|
||||
// 9mm (Stechkin APS)
|
||||
|
||||
/obj/item/ammo_casing/c9mm
|
||||
name = "9mm bullet casing"
|
||||
desc = "A 9mm bullet casing."
|
||||
caliber = "9mm"
|
||||
projectile_type = /obj/item/projectile/bullet/c9mm
|
||||
|
||||
/obj/item/ammo_casing/c9mm/ap
|
||||
name = "9mm armor-piercing bullet casing"
|
||||
desc = "A 9mm armor-piercing bullet casing."
|
||||
projectile_type =/obj/item/projectile/bullet/c9mm_ap
|
||||
|
||||
/obj/item/ammo_casing/c9mm/inc
|
||||
name = "9mm incendiary bullet casing"
|
||||
desc = "A 9mm incendiary bullet casing."
|
||||
projectile_type = /obj/item/projectile/bullet/incendiary/c9mm
|
||||
|
||||
// 4.6x30mm (Autorifles)
|
||||
|
||||
/obj/item/ammo_casing/c46x30mm
|
||||
name = "4.6x30mm bullet casing"
|
||||
desc = "A 4.6x30mm bullet casing."
|
||||
caliber = "4.6x30mm"
|
||||
projectile_type = /obj/item/projectile/bullet/c46x30mm
|
||||
|
||||
/obj/item/ammo_casing/c46x30mm/ap
|
||||
name = "4.6x30mm armor-piercing bullet casing"
|
||||
desc = "A 4.6x30mm armor-piercing bullet casing."
|
||||
projectile_type = /obj/item/projectile/bullet/c46x30mm_ap
|
||||
|
||||
/obj/item/ammo_casing/c46x30mm/inc
|
||||
name = "4.6x30mm incendiary bullet casing"
|
||||
desc = "A 4.6x30mm incendiary bullet casing."
|
||||
projectile_type = /obj/item/projectile/bullet/incendiary/c46x30mm
|
||||
|
||||
// .45 (M1911)
|
||||
|
||||
/obj/item/ammo_casing/c45
|
||||
name = ".45 bullet casing"
|
||||
desc = "A .45 bullet casing."
|
||||
caliber = ".45"
|
||||
projectile_type = /obj/item/projectile/bullet/c45
|
||||
|
||||
/obj/item/ammo_casing/c45/nostamina
|
||||
projectile_type = /obj/item/projectile/bullet/c45_nostamina
|
||||
|
||||
// 5.56mm (M-90gl Carbine)
|
||||
|
||||
/obj/item/ammo_casing/a556
|
||||
name = "5.56mm bullet casing"
|
||||
desc = "A 5.56mm bullet casing."
|
||||
caliber = "a556"
|
||||
projectile_type = /obj/item/projectile/bullet/heavybullet
|
||||
projectile_type = /obj/item/projectile/bullet/a556
|
||||
|
||||
// 40mm (Grenade Launcher)
|
||||
|
||||
/obj/item/ammo_casing/a40mm
|
||||
name = "40mm HE shell"
|
||||
@@ -103,148 +129,93 @@
|
||||
icon_state = "40mmHE"
|
||||
projectile_type = /obj/item/projectile/bullet/a40mm
|
||||
|
||||
// .50 (Sniper)
|
||||
|
||||
|
||||
/////SNIPER ROUNDS
|
||||
|
||||
/obj/item/ammo_casing/point50
|
||||
/obj/item/ammo_casing/p50
|
||||
name = ".50 bullet casing"
|
||||
desc = "A .50 bullet casing."
|
||||
caliber = ".50"
|
||||
projectile_type = /obj/item/projectile/bullet/sniper
|
||||
projectile_type = /obj/item/projectile/bullet/p50
|
||||
icon_state = ".50"
|
||||
|
||||
/obj/item/ammo_casing/soporific
|
||||
/obj/item/ammo_casing/p50/soporific
|
||||
name = ".50 soporific bullet casing"
|
||||
desc = "A .50 bullet casing, specialised in sending the target to sleep, instead of hell."
|
||||
caliber = ".50"
|
||||
projectile_type = /obj/item/projectile/bullet/sniper/soporific
|
||||
projectile_type = /obj/item/projectile/bullet/p50/soporific
|
||||
icon_state = "sleeper"
|
||||
|
||||
/obj/item/ammo_casing/haemorrhage
|
||||
desc = "A .50 bullet casing, specialised in causing massive bloodloss."
|
||||
caliber = ".50"
|
||||
projectile_type = /obj/item/projectile/bullet/sniper/haemorrhage
|
||||
icon_state = ".50"
|
||||
|
||||
/obj/item/ammo_casing/penetrator
|
||||
/obj/item/ammo_casing/p50/penetrator
|
||||
name = ".50 penetrator round bullet casing"
|
||||
desc = "A .50 caliber penetrator round casing."
|
||||
caliber = ".50"
|
||||
projectile_type = /obj/item/projectile/bullet/sniper/penetrator
|
||||
icon_state = ".50"
|
||||
projectile_type = /obj/item/projectile/bullet/p50/penetrator
|
||||
|
||||
/obj/item/ammo_casing/point50/gang
|
||||
desc = "A black market .50 bullet casing."
|
||||
projectile_type = /obj/item/projectile/bullet/sniper/gang
|
||||
|
||||
/obj/item/ammo_casing/point50/gang/sleeper
|
||||
desc = "Am illegally modified tranquilizer round."
|
||||
projectile_type = /obj/item/projectile/bullet/sniper/gang/sleeper
|
||||
icon_state = "sleeper"
|
||||
|
||||
/// SAW ROUNDS
|
||||
// 1.95x129mm (SAW)
|
||||
|
||||
/obj/item/ammo_casing/mm195x129
|
||||
name = "1.95x129mm bullet casing"
|
||||
desc = "A 1.95x129mm bullet casing."
|
||||
icon_state = "762-casing"
|
||||
caliber = "mm195129"
|
||||
projectile_type = /obj/item/projectile/bullet/saw
|
||||
|
||||
/obj/item/ammo_casing/mm195x129/bleeding
|
||||
desc = "A 1.95x129mm bullet casing with specialized inner-casing, that when it makes contact with a target, releases tiny shrapnel to induce internal bleeding."
|
||||
icon_state = "762-casing"
|
||||
projectile_type = /obj/item/projectile/bullet/saw/bleeding
|
||||
|
||||
/obj/item/ammo_casing/mm195x129/hollow
|
||||
desc = "A 1.95x129mm bullet casing designed to cause more damage to unarmored targets."
|
||||
projectile_type = /obj/item/projectile/bullet/saw/hollow
|
||||
projectile_type = /obj/item/projectile/bullet/mm195x129
|
||||
|
||||
/obj/item/ammo_casing/mm195x129/ap
|
||||
name = "1.95x129mm armor-piercing bullet casing"
|
||||
desc = "A 1.95x129mm bullet casing designed with a hardened-tipped core to help penetrate armored targets."
|
||||
projectile_type = /obj/item/projectile/bullet/saw/ap
|
||||
projectile_type = /obj/item/projectile/bullet/mm195x129_ap
|
||||
|
||||
/obj/item/ammo_casing/mm195x129/hollow
|
||||
name = "1.95x129mm hollow-point bullet casing"
|
||||
desc = "A 1.95x129mm bullet casing designed to cause more damage to unarmored targets."
|
||||
projectile_type = /obj/item/projectile/bullet/mm195x129_hp
|
||||
|
||||
/obj/item/ammo_casing/mm195x129/incen
|
||||
name = "1.95x129mm incendiary bullet casing"
|
||||
desc = "A 1.95x129mm bullet casing designed with a chemical-filled capsule on the tip that when bursted, reacts with the atmosphere to produce a fireball, engulfing the target in flames. "
|
||||
projectile_type = /obj/item/projectile/bullet/saw/incen
|
||||
projectile_type = /obj/item/projectile/bullet/incendiary/mm195x129
|
||||
|
||||
|
||||
|
||||
|
||||
//SHOTGUN ROUNDS
|
||||
// Shotgun
|
||||
|
||||
/obj/item/ammo_casing/shotgun
|
||||
name = "shotgun slug"
|
||||
desc = "A 12 gauge lead slug."
|
||||
icon_state = "blshell"
|
||||
caliber = "shotgun"
|
||||
projectile_type = /obj/item/projectile/bullet
|
||||
projectile_type = /obj/item/projectile/bullet/shotgun_slug
|
||||
materials = list(MAT_METAL=4000)
|
||||
|
||||
|
||||
/obj/item/ammo_casing/shotgun/buckshot
|
||||
name = "buckshot shell"
|
||||
desc = "A 12 gauge buckshot shell."
|
||||
icon_state = "gshell"
|
||||
projectile_type = /obj/item/projectile/bullet/pellet
|
||||
pellets = 6
|
||||
variance = 25
|
||||
|
||||
/obj/item/ammo_casing/shotgun/rubbershot
|
||||
name = "rubber shot"
|
||||
desc = "A shotgun casing filled with densely-packed rubber balls, used to incapacitate crowds from a distance."
|
||||
icon_state = "bshell"
|
||||
projectile_type = /obj/item/projectile/bullet/rpellet
|
||||
pellets = 6
|
||||
variance = 25
|
||||
materials = list(MAT_METAL=4000)
|
||||
|
||||
|
||||
/obj/item/ammo_casing/shotgun/beanbag
|
||||
name = "beanbag slug"
|
||||
desc = "A weak beanbag slug for riot control."
|
||||
icon_state = "bshell"
|
||||
projectile_type = /obj/item/projectile/bullet/weakbullet
|
||||
projectile_type = /obj/item/projectile/bullet/shotgun_beanbag
|
||||
materials = list(MAT_METAL=250)
|
||||
|
||||
/obj/item/ammo_casing/shotgun/incendiary
|
||||
name = "incendiary slug"
|
||||
desc = "An incendiary-coated shotgun slug."
|
||||
icon_state = "ishell"
|
||||
projectile_type = /obj/item/projectile/bullet/incendiary/shotgun
|
||||
|
||||
/obj/item/ammo_casing/shotgun/improvised
|
||||
name = "improvised shell"
|
||||
desc = "An extremely weak shotgun shell with multiple small pellets made out of metal shards."
|
||||
icon_state = "improvshell"
|
||||
projectile_type = /obj/item/projectile/bullet/pellet/weak
|
||||
materials = list(MAT_METAL=250)
|
||||
pellets = 10
|
||||
variance = 25
|
||||
|
||||
|
||||
/obj/item/ammo_casing/shotgun/improvised/overload
|
||||
name = "overloaded improvised shell"
|
||||
desc = "An extremely weak shotgun shell with multiple small pellets made out of metal shards. This one has been packed with even more \
|
||||
propellant. It's like playing russian roulette, with a shotgun."
|
||||
icon_state = "improvshell"
|
||||
projectile_type = /obj/item/projectile/bullet/pellet/overload
|
||||
materials = list(MAT_METAL=250)
|
||||
/obj/item/ammo_casing/shotgun/dragonsbreath
|
||||
name = "dragonsbreath shell"
|
||||
desc = "A shotgun shell which fires a spread of incendiary pellets."
|
||||
icon_state = "ishell2"
|
||||
projectile_type = /obj/item/projectile/bullet/incendiary/shotgun/dragonsbreath
|
||||
pellets = 4
|
||||
variance = 40
|
||||
|
||||
variance = 35
|
||||
|
||||
/obj/item/ammo_casing/shotgun/stunslug
|
||||
name = "taser slug"
|
||||
desc = "A stunning taser slug."
|
||||
icon_state = "stunshell"
|
||||
projectile_type = /obj/item/projectile/bullet/stunshot
|
||||
projectile_type = /obj/item/projectile/bullet/shotgun_stunslug
|
||||
materials = list(MAT_METAL=250)
|
||||
|
||||
|
||||
/obj/item/ammo_casing/shotgun/meteorshot
|
||||
name = "meteorshot shell"
|
||||
/obj/item/ammo_casing/shotgun/meteorslug
|
||||
name = "meteorslug shell"
|
||||
desc = "A shotgun shell rigged with CMC technology, which launches a massive slug when fired."
|
||||
icon_state = "mshell"
|
||||
projectile_type = /obj/item/projectile/bullet/meteorshot
|
||||
|
||||
/obj/item/ammo_casing/shotgun/breaching
|
||||
name = "breaching shell"
|
||||
desc = "An economic version of the meteorshot, utilizing similar technologies. Great for busting down doors."
|
||||
icon_state = "mshell"
|
||||
projectile_type = /obj/item/projectile/bullet/meteorshot/weak
|
||||
projectile_type = /obj/item/projectile/bullet/shotgun_meteorslug
|
||||
|
||||
/obj/item/ammo_casing/shotgun/pulseslug
|
||||
name = "pulse slug"
|
||||
@@ -252,27 +223,39 @@
|
||||
energy blast. While the heat and power drain limit it to one use, it can still allow an operator to engage targets that ballistic ammunition \
|
||||
would have difficulty with."
|
||||
icon_state = "pshell"
|
||||
projectile_type = /obj/item/projectile/beam/pulse/shot
|
||||
|
||||
/obj/item/ammo_casing/shotgun/incendiary
|
||||
name = "incendiary slug"
|
||||
desc = "An incendiary-coated shotgun slug."
|
||||
icon_state = "ishell"
|
||||
projectile_type = /obj/item/projectile/bullet/incendiary/shell
|
||||
projectile_type = /obj/item/projectile/beam/pulse/shotgun
|
||||
|
||||
/obj/item/ammo_casing/shotgun/frag12
|
||||
name = "FRAG-12 slug"
|
||||
desc = "A high explosive breaching round for a 12 gauge shotgun."
|
||||
icon_state = "heshell"
|
||||
projectile_type = /obj/item/projectile/bullet/frag12
|
||||
projectile_type = /obj/item/projectile/bullet/shotgun_frag12
|
||||
|
||||
/obj/item/ammo_casing/shotgun/incendiary/dragonsbreath
|
||||
name = "dragonsbreath shell"
|
||||
desc = "A shotgun shell which fires a spread of incendiary pellets."
|
||||
icon_state = "ishell2"
|
||||
projectile_type = /obj/item/projectile/bullet/incendiary/shell/dragonsbreath
|
||||
pellets = 4
|
||||
variance = 35
|
||||
/obj/item/ammo_casing/shotgun/buckshot
|
||||
name = "buckshot shell"
|
||||
desc = "A 12 gauge buckshot shell."
|
||||
icon_state = "gshell"
|
||||
projectile_type = /obj/item/projectile/bullet/pellet/shotgun_buckshot
|
||||
pellets = 6
|
||||
variance = 25
|
||||
|
||||
/obj/item/ammo_casing/shotgun/rubbershot
|
||||
name = "rubber shot"
|
||||
desc = "A shotgun casing filled with densely-packed rubber balls, used to incapacitate crowds from a distance."
|
||||
icon_state = "bshell"
|
||||
projectile_type = /obj/item/projectile/bullet/pellet/shotgun_rubbershot
|
||||
pellets = 6
|
||||
variance = 25
|
||||
materials = list(MAT_METAL=4000)
|
||||
|
||||
/obj/item/ammo_casing/shotgun/improvised
|
||||
name = "improvised shell"
|
||||
desc = "An extremely weak shotgun shell with multiple small pellets made out of metal shards."
|
||||
icon_state = "improvshell"
|
||||
projectile_type = /obj/item/projectile/bullet/pellet/shotgun_improvised
|
||||
materials = list(MAT_METAL=250)
|
||||
pellets = 10
|
||||
variance = 25
|
||||
|
||||
/obj/item/ammo_casing/shotgun/ion
|
||||
name = "ion shell"
|
||||
@@ -319,4 +302,4 @@
|
||||
reagents.add_reagent("spore", 6)
|
||||
reagents.add_reagent("mutetoxin", 6) //;HELP OPS IN MAINT
|
||||
reagents.add_reagent("coniine", 6)
|
||||
reagents.add_reagent("sodium_thiopental", 6)
|
||||
reagents.add_reagent("sodium_thiopental", 6)
|
||||
@@ -85,7 +85,7 @@
|
||||
..()
|
||||
|
||||
/obj/item/ammo_casing/energy/c3dbullet
|
||||
projectile_type = /obj/item/projectile/bullet/midbullet3
|
||||
projectile_type = /obj/item/projectile/bullet/c3d
|
||||
select_name = "spraydown"
|
||||
fire_sound = 'sound/weapons/gunshot_smg.ogg'
|
||||
e_cost = 20
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
|
||||
|
||||
|
||||
///////////EXTERNAL MAGAZINES////////////////
|
||||
|
||||
/obj/item/ammo_box/magazine/m10mm
|
||||
@@ -72,25 +70,16 @@
|
||||
/obj/item/ammo_box/magazine/wt550m9/wtap
|
||||
name = "wt550 magazine (Armour Piercing 4.6x30mm)"
|
||||
icon_state = "46x30mmtA-20"
|
||||
ammo_type = /obj/item/ammo_casing/c46x30mmap
|
||||
ammo_type = /obj/item/ammo_casing/c46x30mm/ap
|
||||
|
||||
/obj/item/ammo_box/magazine/wt550m9/wtap/update_icon()
|
||||
..()
|
||||
icon_state = "46x30mmtA-[round(ammo_count(),4)]"
|
||||
|
||||
/obj/item/ammo_box/magazine/wt550m9/wttx
|
||||
name = "wt550 magazine (Toxin Tipped 4.6x30mm)"
|
||||
icon_state = "46x30mmtT-20"
|
||||
ammo_type = /obj/item/ammo_casing/c46x30mmtox
|
||||
|
||||
/obj/item/ammo_box/magazine/wt550m9/wttx/update_icon()
|
||||
..()
|
||||
icon_state = "46x30mmtT-[round(ammo_count(),4)]"
|
||||
|
||||
/obj/item/ammo_box/magazine/wt550m9/wtic
|
||||
name = "wt550 magazine (Incindiary 4.6x30mm)"
|
||||
icon_state = "46x30mmtI-20"
|
||||
ammo_type = /obj/item/ammo_casing/c46x30mminc
|
||||
ammo_type = /obj/item/ammo_casing/c46x30mm/inc
|
||||
|
||||
/obj/item/ammo_box/magazine/wt550m9/wtic/update_icon()
|
||||
..()
|
||||
@@ -120,15 +109,11 @@
|
||||
|
||||
/obj/item/ammo_box/magazine/smgm9mm/ap
|
||||
name = "SMG magazine (Armour Piercing 9mm)"
|
||||
ammo_type = /obj/item/ammo_casing/c9mmap
|
||||
|
||||
/obj/item/ammo_box/magazine/smgm9mm/toxin
|
||||
name = "SMG magazine (Toxin Tipped 9mm)"
|
||||
ammo_type = /obj/item/ammo_casing/c9mmtox
|
||||
ammo_type = /obj/item/ammo_casing/c9mm/ap
|
||||
|
||||
/obj/item/ammo_box/magazine/smgm9mm/fire
|
||||
name = "SMG Magazine (Incindiary 9mm)"
|
||||
ammo_type = /obj/item/ammo_casing/c9mminc
|
||||
ammo_type = /obj/item/ammo_casing/c9mm/inc
|
||||
|
||||
/obj/item/ammo_box/magazine/pistolm9mm
|
||||
name = "pistol magazine (9mm)"
|
||||
@@ -145,7 +130,7 @@
|
||||
name = "SMG magazine (.45)"
|
||||
icon_state = "c20r45-24"
|
||||
origin_tech = "combat=2"
|
||||
ammo_type = /obj/item/ammo_casing/c45nostamina
|
||||
ammo_type = /obj/item/ammo_casing/c45/nostamina
|
||||
caliber = ".45"
|
||||
max_ammo = 24
|
||||
|
||||
@@ -164,7 +149,7 @@
|
||||
name = "handgun magazine (.50ae)"
|
||||
icon_state = "50ae"
|
||||
origin_tech = "combat=2"
|
||||
ammo_type = /obj/item/ammo_casing/a50
|
||||
ammo_type = /obj/item/ammo_casing/a50AE
|
||||
caliber = ".50"
|
||||
max_ammo = 7
|
||||
multiple_sprites = 1
|
||||
@@ -212,17 +197,17 @@
|
||||
/obj/item/ammo_box/magazine/m12g/dragon
|
||||
name = "shotgun magazine (12g dragon's breath)"
|
||||
icon_state = "m12gf"
|
||||
ammo_type = /obj/item/ammo_casing/shotgun/incendiary/dragonsbreath
|
||||
ammo_type = /obj/item/ammo_casing/shotgun/dragonsbreath
|
||||
|
||||
/obj/item/ammo_box/magazine/m12g/bioterror
|
||||
name = "shotgun magazine (12g bioterror)"
|
||||
icon_state = "m12gt"
|
||||
ammo_type = /obj/item/ammo_casing/shotgun/dart/bioterror
|
||||
|
||||
/obj/item/ammo_box/magazine/m12g/breach
|
||||
name = "shotgun magazine (12g breacher slugs)"
|
||||
/obj/item/ammo_box/magazine/m12g/meteor
|
||||
name = "shotgun magazine (12g meteor slugs)"
|
||||
icon_state = "m12gbc"
|
||||
ammo_type = /obj/item/ammo_casing/shotgun/breaching
|
||||
ammo_type = /obj/item/ammo_casing/shotgun/meteorslug
|
||||
|
||||
|
||||
//// SNIPER MAGAZINES
|
||||
@@ -231,7 +216,7 @@
|
||||
name = "sniper rounds (.50)"
|
||||
icon_state = ".50mag"
|
||||
origin_tech = "combat=6;syndicate=2"
|
||||
ammo_type = /obj/item/ammo_casing/point50
|
||||
ammo_type = /obj/item/ammo_casing/p50
|
||||
max_ammo = 6
|
||||
caliber = ".50"
|
||||
|
||||
@@ -246,37 +231,17 @@
|
||||
desc = "Soporific sniper rounds, designed for happy days and dead quiet nights..."
|
||||
icon_state = "soporific"
|
||||
origin_tech = "combat=6;syndicate=3"
|
||||
ammo_type = /obj/item/ammo_casing/soporific
|
||||
ammo_type = /obj/item/ammo_casing/p50/soporific
|
||||
max_ammo = 3
|
||||
caliber = ".50"
|
||||
|
||||
/obj/item/ammo_box/magazine/sniper_rounds/haemorrhage
|
||||
name = "sniper rounds (Bleed)"
|
||||
desc = "Haemorrhage sniper rounds, leaves your target in a pool of crimson pain"
|
||||
icon_state = "haemorrhage"
|
||||
ammo_type = /obj/item/ammo_casing/haemorrhage
|
||||
max_ammo = 5
|
||||
caliber = ".50"
|
||||
|
||||
/obj/item/ammo_box/magazine/sniper_rounds/penetrator
|
||||
name = "sniper rounds (penetrator)"
|
||||
desc = "An extremely powerful round capable of passing straight through cover and anyone unfortunate enough to be behind it."
|
||||
ammo_type = /obj/item/ammo_casing/penetrator
|
||||
ammo_type = /obj/item/ammo_casing/p50/penetrator
|
||||
origin_tech = "combat=6;syndicate=3"
|
||||
max_ammo = 5
|
||||
|
||||
/obj/item/ammo_box/magazine/sniper_rounds/gang
|
||||
name = "black market sniper rounds (.50)"
|
||||
icon_state = ".50mag"
|
||||
origin_tech = "combat=6"
|
||||
ammo_type = /obj/item/ammo_casing/point50/gang
|
||||
|
||||
/obj/item/ammo_box/magazine/sniper_rounds/gang/sleeper
|
||||
name = "illegally modified tranquilizer round"
|
||||
icon_state = "soporific"
|
||||
origin_tech = "combat=6"
|
||||
ammo_type = /obj/item/ammo_casing/point50/gang/sleeper
|
||||
|
||||
//// SAW MAGAZINES
|
||||
|
||||
/obj/item/ammo_box/magazine/mm195x129
|
||||
@@ -287,11 +252,6 @@
|
||||
caliber = "mm195129"
|
||||
max_ammo = 50
|
||||
|
||||
/obj/item/ammo_box/magazine/mm195x129/bleeding
|
||||
name = "box magazine (Bleeding 1.95x129mm)"
|
||||
origin_tech = "combat=3"
|
||||
ammo_type = /obj/item/ammo_casing/mm195x129/bleeding
|
||||
|
||||
/obj/item/ammo_box/magazine/mm195x129/hollow
|
||||
name = "box magazine (Hollow-Point 1.95x129mm)"
|
||||
origin_tech = "combat=3"
|
||||
|
||||
@@ -384,11 +384,6 @@
|
||||
pin = /obj/item/device/firing_pin/implant/pindicate
|
||||
origin_tech = "combat=7;syndicate=6"
|
||||
|
||||
/obj/item/gun/ballistic/automatic/sniper_rifle/gang
|
||||
name = "black market sniper rifle"
|
||||
desc = "A long ranged weapon that does significant damage. It is well worn from years of service."
|
||||
mag_type = /obj/item/ammo_box/magazine/sniper_rounds/gang
|
||||
|
||||
// Old Semi-Auto Rifle //
|
||||
|
||||
/obj/item/gun/ballistic/automatic/surplus
|
||||
|
||||
@@ -324,7 +324,6 @@
|
||||
|
||||
//Split Y+Pixel_Y up into list(Y, Pixel_Y)
|
||||
var/list/screen_loc_Y = splittext(screen_loc_params[2],":")
|
||||
// to_chat(world, "X: [screen_loc_X[1]] PixelX: [screen_loc_X[2]] / Y: [screen_loc_Y[1]] PixelY: [screen_loc_Y[2]]")
|
||||
var/x = text2num(screen_loc_X[1]) * 32 + text2num(screen_loc_X[2]) - 32
|
||||
var/y = text2num(screen_loc_Y[1]) * 32 + text2num(screen_loc_Y[2]) - 32
|
||||
|
||||
@@ -333,9 +332,7 @@
|
||||
|
||||
var/ox = round(screenview/2) - user.client.pixel_x //"origin" x
|
||||
var/oy = round(screenview/2) - user.client.pixel_y //"origin" y
|
||||
// to_chat(world, "Pixel position: [x] [y]")
|
||||
angle = Atan2(y - oy, x - ox)
|
||||
// to_chat(world, "Angle: [angle]")
|
||||
return list(angle, p_x, p_y)
|
||||
|
||||
/obj/item/projectile/Crossed(atom/movable/AM) //A mob moving on a tile with a projectile is hit by it.
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
if(isturf(target) || istype(target, /obj/structure/))
|
||||
target.ex_act(EXPLODE_HEAVY)
|
||||
|
||||
/obj/item/projectile/beam/pulse/shot
|
||||
/obj/item/projectile/beam/pulse/shotgun
|
||||
damage = 40
|
||||
|
||||
/obj/item/projectile/beam/pulse/heavy
|
||||
|
||||
@@ -3,105 +3,238 @@
|
||||
icon_state = "bullet"
|
||||
damage = 60
|
||||
damage_type = BRUTE
|
||||
nodamage = 0
|
||||
nodamage = FALSE
|
||||
flag = "bullet"
|
||||
hitsound_wall = "ricochet"
|
||||
impact_effect_type = /obj/effect/temp_visual/impact_effect
|
||||
|
||||
/obj/item/projectile/bullet/weakbullet //beanbag, heavy stamina damage
|
||||
damage = 5
|
||||
stamina = 80
|
||||
|
||||
/obj/item/projectile/bullet/weakbullet2 //detective revolver instastuns, but multiple shots are better for keeping punks down
|
||||
damage = 15
|
||||
knockdown = 30
|
||||
stamina = 50
|
||||
|
||||
/obj/item/projectile/bullet/weakbullet3
|
||||
damage = 20
|
||||
|
||||
/obj/item/projectile/bullet/toxinbullet
|
||||
damage = 15
|
||||
damage_type = TOX
|
||||
|
||||
/obj/item/projectile/bullet/incendiary/firebullet
|
||||
damage = 10
|
||||
|
||||
/obj/item/projectile/bullet/armourpiercing
|
||||
damage = 15
|
||||
armour_penetration = 40
|
||||
|
||||
/obj/item/projectile/bullet/pellet
|
||||
name = "pellet"
|
||||
damage = 12.5
|
||||
|
||||
/obj/item/projectile/bullet/pellet/Range()
|
||||
..()
|
||||
damage += -0.75
|
||||
if(damage < 0)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/projectile/bullet/pellet/weak
|
||||
damage = 6
|
||||
|
||||
/obj/item/projectile/bullet/pellet/weak/New()
|
||||
range = rand(1, 8)
|
||||
..()
|
||||
|
||||
/obj/item/projectile/bullet/pellet/weak/on_range()
|
||||
do_sparks(1, TRUE, src)
|
||||
..()
|
||||
|
||||
/obj/item/projectile/bullet/pellet/overload
|
||||
damage = 3
|
||||
|
||||
/obj/item/projectile/bullet/pellet/overload/New()
|
||||
range = rand(1, 10)
|
||||
..()
|
||||
|
||||
/obj/item/projectile/bullet/pellet/overload/on_hit(atom/target, blocked = FALSE)
|
||||
..()
|
||||
explosion(target, 0, 0, 2)
|
||||
|
||||
/obj/item/projectile/bullet/pellet/overload/on_range()
|
||||
explosion(src, 0, 0, 2)
|
||||
do_sparks(3, TRUE, src)
|
||||
..()
|
||||
|
||||
/obj/item/projectile/bullet/midbullet
|
||||
/obj/item/projectile/bullet/incendiary
|
||||
damage = 20
|
||||
stamina = 65 //two round bursts from the c20r knocks people down
|
||||
var/fire_stacks = 4
|
||||
|
||||
/obj/item/projectile/bullet/incendiary/on_hit(atom/target, blocked = FALSE)
|
||||
. = ..()
|
||||
if(iscarbon(target))
|
||||
var/mob/living/carbon/M = target
|
||||
M.adjust_fire_stacks(fire_stacks)
|
||||
M.IgniteMob()
|
||||
|
||||
/obj/item/projectile/bullet/midbullet2
|
||||
damage = 25
|
||||
/obj/item/projectile/bullet/incendiary/Move()
|
||||
. = ..()
|
||||
var/turf/location = get_turf(src)
|
||||
if(location)
|
||||
new /obj/effect/hotspot(location)
|
||||
location.hotspot_expose(700, 50, 1)
|
||||
|
||||
/obj/item/projectile/bullet/midbullet3
|
||||
// .357 (Syndie Revolver)
|
||||
|
||||
/obj/item/projectile/bullet/a357
|
||||
name = ".357 bullet"
|
||||
damage = 60
|
||||
|
||||
// 7.62 (Nagant Rifle)
|
||||
|
||||
/obj/item/projectile/bullet/a762
|
||||
name = "7.62 bullet"
|
||||
damage = 60
|
||||
|
||||
/obj/item/projectile/bullet/a762_enchanted
|
||||
name = "enchanted 7.62 bullet"
|
||||
damage = 5
|
||||
stamina = 80
|
||||
|
||||
// 7.62x38mmR (Nagant Revolver)
|
||||
|
||||
/obj/item/projectile/bullet/n762
|
||||
name = "7.62x38mmR bullet"
|
||||
damage = 60
|
||||
|
||||
// .50AE (Desert Eagle)
|
||||
|
||||
/obj/item/projectile/bullet/a50AE
|
||||
name = ".50AE bullet"
|
||||
damage = 60
|
||||
|
||||
// .38 (Detective's Gun)
|
||||
|
||||
/obj/item/projectile/bullet/c38
|
||||
name = ".38 bullet"
|
||||
damage = 15
|
||||
knockdown = 30
|
||||
stamina = 50
|
||||
|
||||
// 10mm (Stechkin)
|
||||
|
||||
/obj/item/projectile/bullet/c10mm
|
||||
name = "10mm bullet"
|
||||
damage = 30
|
||||
|
||||
/obj/item/projectile/bullet/midbullet3/hp
|
||||
damage = 40
|
||||
armour_penetration = -50
|
||||
|
||||
/obj/item/projectile/bullet/midbullet3/ap
|
||||
/obj/item/projectile/bullet/c10mm_ap
|
||||
name = "10mm armor-piercing bullet"
|
||||
damage = 27
|
||||
armour_penetration = 40
|
||||
|
||||
/obj/item/projectile/bullet/midbullet3/fire/on_hit(atom/target, blocked = FALSE)
|
||||
if(..(target, blocked))
|
||||
var/mob/living/M = target
|
||||
M.adjust_fire_stacks(1)
|
||||
M.IgniteMob()
|
||||
/obj/item/projectile/bullet/c10mm_hp
|
||||
name = "10mm hollow-point bullet"
|
||||
damage = 40
|
||||
armour_penetration = -50
|
||||
|
||||
/obj/item/projectile/bullet/heavybullet
|
||||
/obj/item/projectile/bullet/incendiary/c10mm
|
||||
name = "10mm incendiary bullet"
|
||||
damage = 15
|
||||
fire_stacks = 2
|
||||
|
||||
// 9mm (Stechkin APS)
|
||||
|
||||
/obj/item/projectile/bullet/c9mm
|
||||
name = "9mm bullet"
|
||||
damage = 20
|
||||
|
||||
/obj/item/projectile/bullet/c9mm_ap
|
||||
name = "9mm armor-piercing bullet"
|
||||
damage = 15
|
||||
armour_penetration = 40
|
||||
|
||||
/obj/item/projectile/bullet/incendiary/c9mm
|
||||
name = "9mm incendiary bullet"
|
||||
damage = 10
|
||||
fire_stacks = 1
|
||||
|
||||
// 4.6x30mm (Autorifles)
|
||||
|
||||
/obj/item/projectile/bullet/c46x30mm
|
||||
desc = "4.6x30mm bullet"
|
||||
damage = 20
|
||||
|
||||
/obj/item/projectile/bullet/c46x30mm_ap
|
||||
name = "4.6x30mm armor-piercing bullet"
|
||||
damage = 15
|
||||
armour_penetration = 40
|
||||
|
||||
/obj/item/projectile/bullet/incendiary/c46x30mm
|
||||
name = "4.6x30mm incendiary bullet"
|
||||
damage = 10
|
||||
fire_stacks = 1
|
||||
|
||||
// .45 (M1911)
|
||||
|
||||
/obj/item/projectile/bullet/c45
|
||||
name = ".45 bullet"
|
||||
damage = 20
|
||||
stamina = 65
|
||||
|
||||
/obj/item/projectile/bullet/c45_nostamina
|
||||
name = ".45 bullet"
|
||||
damage = 20
|
||||
|
||||
// 5.56mm (M-90gl Carbine)
|
||||
|
||||
/obj/item/projectile/bullet/a556
|
||||
name = "5.56mm bullet"
|
||||
damage = 35
|
||||
|
||||
/obj/item/projectile/bullet/rpellet
|
||||
damage = 3
|
||||
stamina = 25
|
||||
// 40mm (Grenade Launcher
|
||||
|
||||
/obj/item/projectile/bullet/stunshot //taser slugs for shotguns, nothing special
|
||||
name = "stunshot"
|
||||
/obj/item/projectile/bullet/a40mm
|
||||
name ="40mm grenade"
|
||||
desc = "USE A WEEL GUN"
|
||||
icon_state= "bolter"
|
||||
damage = 60
|
||||
|
||||
/obj/item/projectile/bullet/a40mm/on_hit(atom/target, blocked = FALSE)
|
||||
..()
|
||||
explosion(target, -1, 0, 2, 1, 0, flame_range = 3)
|
||||
return TRUE
|
||||
|
||||
// .50 (Sniper)
|
||||
|
||||
/obj/item/projectile/bullet/p50
|
||||
name =".50 bullet"
|
||||
speed = 0 //360 alwaysscope.
|
||||
damage = 70
|
||||
knockdown = 100
|
||||
dismemberment = 50
|
||||
armour_penetration = 50
|
||||
var/breakthings = TRUE
|
||||
|
||||
/obj/item/projectile/bullet/p50/on_hit(atom/target, blocked = 0)
|
||||
if((blocked != 100) && (!ismob(target) && breakthings))
|
||||
target.ex_act(rand(1,2))
|
||||
return ..()
|
||||
|
||||
/obj/item/projectile/bullet/p50/soporific
|
||||
name =".50 soporific bullet"
|
||||
armour_penetration = 0
|
||||
nodamage = TRUE
|
||||
dismemberment = 0
|
||||
knockdown = 0
|
||||
breakthings = FALSE
|
||||
|
||||
/obj/item/projectile/bullet/p50/soporific/on_hit(atom/target, blocked = FALSE)
|
||||
if((blocked != 100) && isliving(target))
|
||||
var/mob/living/L = target
|
||||
L.Sleeping(400)
|
||||
return ..()
|
||||
|
||||
/obj/item/projectile/bullet/p50/penetrator
|
||||
name =".50 penetrator bullet"
|
||||
icon_state = "gauss"
|
||||
name = "penetrator round"
|
||||
damage = 60
|
||||
forcedodge = TRUE
|
||||
dismemberment = 0 //It goes through you cleanly.
|
||||
knockdown = 0
|
||||
breakthings = FALSE
|
||||
|
||||
// 1.95x129mm (SAW)
|
||||
|
||||
/obj/item/projectile/bullet/mm195x129
|
||||
name = "1.95x129mm bullet"
|
||||
damage = 45
|
||||
armour_penetration = 5
|
||||
|
||||
/obj/item/projectile/bullet/mm195x129_ap
|
||||
name = "1.95x129mm armor-piercing bullet"
|
||||
damage = 40
|
||||
armour_penetration = 75
|
||||
|
||||
/obj/item/projectile/bullet/mm195x129_hp
|
||||
name = "1.95x129mm hollow-point bullet"
|
||||
damage = 60
|
||||
armour_penetration = -60
|
||||
|
||||
/obj/item/projectile/bullet/incendiary/mm195x129
|
||||
name = "1.95x129mm incendiary bullet"
|
||||
damage = 15
|
||||
fire_stacks = 3
|
||||
|
||||
// Shotgun
|
||||
|
||||
/obj/item/projectile/bullet/shotgun_slug
|
||||
name = "12g shotgun slug"
|
||||
damage = 60
|
||||
|
||||
/obj/item/projectile/bullet/shotgun_beanbag
|
||||
name = "beanbag slug"
|
||||
damage = 5
|
||||
stamina = 80
|
||||
|
||||
/obj/item/projectile/bullet/incendiary/shotgun
|
||||
name = "incendiary slug"
|
||||
damage = 20
|
||||
|
||||
/obj/item/projectile/bullet/incendiary/shotgun/dragonsbreath
|
||||
name = "dragonsbreath pellet"
|
||||
damage = 5
|
||||
|
||||
/obj/item/projectile/bullet/shotgun_stunslug
|
||||
name = "stunslug"
|
||||
damage = 5
|
||||
knockdown = 100
|
||||
stutter = 5
|
||||
@@ -110,47 +243,90 @@
|
||||
icon_state = "spark"
|
||||
color = "#FFFF00"
|
||||
|
||||
/obj/item/projectile/bullet/incendiary/on_hit(atom/target, blocked = FALSE)
|
||||
. = ..()
|
||||
if(iscarbon(target))
|
||||
var/mob/living/carbon/M = target
|
||||
M.adjust_fire_stacks(4)
|
||||
M.IgniteMob()
|
||||
|
||||
|
||||
/obj/item/projectile/bullet/incendiary/shell
|
||||
name = "incendiary slug"
|
||||
damage = 20
|
||||
|
||||
/obj/item/projectile/bullet/incendiary/shell/Move()
|
||||
..()
|
||||
var/turf/location = get_turf(src)
|
||||
if(location)
|
||||
new /obj/effect/hotspot(location)
|
||||
location.hotspot_expose(700, 50, 1)
|
||||
|
||||
/obj/item/projectile/bullet/incendiary/shell/dragonsbreath
|
||||
name = "dragonsbreath round"
|
||||
damage = 5
|
||||
|
||||
|
||||
/obj/item/projectile/bullet/meteorshot
|
||||
name = "meteor"
|
||||
/obj/item/projectile/bullet/shotgun_meteorslug
|
||||
name = "meteorslug"
|
||||
icon = 'icons/obj/meteor.dmi'
|
||||
icon_state = "dust"
|
||||
damage = 30
|
||||
knockdown = 160
|
||||
damage = 20
|
||||
knockdown = 80
|
||||
hitsound = 'sound/effects/meteorimpact.ogg'
|
||||
|
||||
/obj/item/projectile/bullet/meteorshot/weak
|
||||
damage = 10
|
||||
knockdown = 80
|
||||
/obj/item/projectile/bullet/shotgun_meteorslug/on_hit(atom/target, blocked = FALSE)
|
||||
. = ..()
|
||||
if(ismovableatom(target))
|
||||
var/atom/movable/M = target
|
||||
var/atom/throw_target = get_edge_target_turf(M, get_dir(src, get_step_away(M, src)))
|
||||
M.throw_at(throw_target, 3, 2)
|
||||
|
||||
/obj/item/projectile/bullet/shotgun_meteorslug/Initialize()
|
||||
. = ..()
|
||||
SpinAnimation()
|
||||
|
||||
/obj/item/projectile/bullet/shotgun_frag12
|
||||
name ="frag12 slug"
|
||||
damage = 25
|
||||
knockdown = 50
|
||||
|
||||
/obj/item/projectile/bullet/shotgun_frag12/on_hit(atom/target, blocked = FALSE)
|
||||
..()
|
||||
explosion(target, -1, 0, 1)
|
||||
return TRUE
|
||||
|
||||
/obj/item/projectile/bullet/pellet/shotgun_buckshot
|
||||
name = "buckshot pellet"
|
||||
damage = 12.5
|
||||
|
||||
/obj/item/projectile/bullet/pellet/shotgun_rubbershot
|
||||
damage = 3
|
||||
stamina = 25
|
||||
|
||||
/obj/item/projectile/bullet/pellet/shotgun_improvised
|
||||
damage = 6
|
||||
|
||||
/obj/item/projectile/bullet/pellet/shotgun_improvised/Initialize()
|
||||
. = ..()
|
||||
range = rand(1, 8)
|
||||
|
||||
/obj/item/projectile/bullet/pellet/shotgun_improvised/on_range()
|
||||
do_sparks(1, TRUE, src)
|
||||
..()
|
||||
|
||||
// Scattershot
|
||||
|
||||
/obj/item/projectile/bullet/scattershot
|
||||
damage = 20
|
||||
stamina = 65
|
||||
|
||||
// LMD (exosuits)
|
||||
|
||||
/obj/item/projectile/bullet/lmg
|
||||
damage = 20
|
||||
|
||||
// Turrets
|
||||
|
||||
/obj/item/projectile/bullet/manned_turret
|
||||
damage = 20
|
||||
|
||||
/obj/item/projectile/bullet/syndicate_turret
|
||||
damage = 20
|
||||
|
||||
// FNX-99 (Mechs)
|
||||
|
||||
/obj/item/projectile/bullet/incendiary/fnx99
|
||||
damage = 20
|
||||
|
||||
// C3D (Borgs)
|
||||
|
||||
/obj/item/projectile/bullet/c3d
|
||||
damage = 20
|
||||
|
||||
// Honker
|
||||
|
||||
/obj/item/projectile/bullet/honker
|
||||
damage = 0
|
||||
knockdown = 60
|
||||
forcedodge = 1
|
||||
nodamage = 1
|
||||
forcedodge = TRUE
|
||||
nodamage = TRUE
|
||||
hitsound = 'sound/items/bikehorn.ogg'
|
||||
icon = 'icons/obj/hydroponics/harvest.dmi'
|
||||
icon_state = "banana"
|
||||
@@ -160,17 +336,7 @@
|
||||
..()
|
||||
SpinAnimation()
|
||||
|
||||
/obj/item/projectile/bullet/meteorshot/on_hit(atom/target, blocked = FALSE)
|
||||
. = ..()
|
||||
if(ismovableatom(target))
|
||||
var/atom/movable/M = target
|
||||
var/atom/throw_target = get_edge_target_turf(M, get_dir(src, get_step_away(M, src)))
|
||||
M.throw_at(throw_target, 3, 2)
|
||||
|
||||
/obj/item/projectile/bullet/meteorshot/New()
|
||||
..()
|
||||
SpinAnimation()
|
||||
|
||||
// Mime
|
||||
|
||||
/obj/item/projectile/bullet/mime
|
||||
damage = 20
|
||||
@@ -181,6 +347,7 @@
|
||||
var/mob/living/carbon/M = target
|
||||
M.silent = max(M.silent, 10)
|
||||
|
||||
// Darts
|
||||
|
||||
/obj/item/projectile/bullet/dart
|
||||
name = "dart"
|
||||
@@ -210,7 +377,7 @@
|
||||
..(target, blocked)
|
||||
reagents.set_reacting(TRUE)
|
||||
reagents.handle_reactions()
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/item/projectile/bullet/dart/metalfoam/New()
|
||||
..()
|
||||
@@ -223,18 +390,7 @@
|
||||
name = "syringe"
|
||||
icon_state = "syringeproj"
|
||||
|
||||
/obj/item/projectile/bullet/neurotoxin
|
||||
name = "neurotoxin spit"
|
||||
icon_state = "neurotoxin"
|
||||
damage = 5
|
||||
damage_type = TOX
|
||||
knockdown = 100
|
||||
|
||||
/obj/item/projectile/bullet/neurotoxin/on_hit(atom/target, blocked = FALSE)
|
||||
if(isalien(target))
|
||||
knockdown = 0
|
||||
nodamage = 1
|
||||
. = ..() // Execute the rest of the code.
|
||||
// DNA injector
|
||||
|
||||
/obj/item/projectile/bullet/dnainjector
|
||||
name = "\improper DNA injector"
|
||||
@@ -261,121 +417,3 @@
|
||||
QDEL_NULL(injector)
|
||||
return ..()
|
||||
|
||||
//// SNIPER BULLETS
|
||||
|
||||
/obj/item/projectile/bullet/sniper
|
||||
speed = 0 //360 alwaysscope.
|
||||
damage = 70
|
||||
knockdown = 100
|
||||
dismemberment = 50
|
||||
armour_penetration = 50
|
||||
var/breakthings = TRUE
|
||||
|
||||
/obj/item/projectile/bullet/sniper/on_hit(atom/target, blocked = FALSE)
|
||||
if((blocked != 100) && (!ismob(target) && breakthings))
|
||||
target.ex_act(rand(1,2))
|
||||
return ..()
|
||||
|
||||
/obj/item/projectile/bullet/sniper/gang
|
||||
damage = 55
|
||||
knockdown = 20
|
||||
dismemberment = 15
|
||||
armour_penetration = 25
|
||||
|
||||
/obj/item/projectile/bullet/sniper/gang/sleeper
|
||||
nodamage = 1
|
||||
knockdown = 0
|
||||
dismemberment = 0
|
||||
breakthings = FALSE
|
||||
|
||||
/obj/item/projectile/bullet/sniper/gang/sleeper/on_hit(atom/target, blocked = FALSE)
|
||||
if((blocked != 100) && isliving(target))
|
||||
var/mob/living/L = target
|
||||
L.blur_eyes(8)
|
||||
if(L.staminaloss >= 40)
|
||||
L.Sleeping(400)
|
||||
else
|
||||
L.adjustStaminaLoss(55)
|
||||
return 1
|
||||
|
||||
/obj/item/projectile/bullet/sniper/soporific
|
||||
armour_penetration = 0
|
||||
nodamage = 1
|
||||
dismemberment = 0
|
||||
knockdown = 0
|
||||
breakthings = FALSE
|
||||
|
||||
/obj/item/projectile/bullet/sniper/soporific/on_hit(atom/target, blocked = FALSE)
|
||||
if((blocked != 100) && isliving(target))
|
||||
var/mob/living/L = target
|
||||
L.Sleeping(400)
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/projectile/bullet/sniper/haemorrhage
|
||||
armour_penetration = 15
|
||||
damage = 15
|
||||
dismemberment = 0
|
||||
knockdown = 0
|
||||
breakthings = FALSE
|
||||
|
||||
/obj/item/projectile/bullet/sniper/haemorrhage/on_hit(atom/target, blocked = FALSE)
|
||||
if((blocked != 100) && iscarbon(target))
|
||||
var/mob/living/carbon/C = target
|
||||
C.bleed(100)
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/projectile/bullet/sniper/penetrator
|
||||
icon_state = "gauss"
|
||||
name = "penetrator round"
|
||||
damage = 60
|
||||
forcedodge = 1
|
||||
dismemberment = 0 //It goes through you cleanly.
|
||||
knockdown = 0
|
||||
breakthings = FALSE
|
||||
|
||||
|
||||
|
||||
//// SAW BULLETS
|
||||
|
||||
|
||||
/obj/item/projectile/bullet/saw
|
||||
damage = 45
|
||||
armour_penetration = 5
|
||||
|
||||
/obj/item/projectile/bullet/saw/bleeding
|
||||
damage = 20
|
||||
armour_penetration = 0
|
||||
|
||||
/obj/item/projectile/bullet/saw/bleeding/on_hit(atom/target, blocked = FALSE)
|
||||
. = ..()
|
||||
if((blocked != 100) && iscarbon(target))
|
||||
var/mob/living/carbon/C = target
|
||||
C.bleed(35)
|
||||
|
||||
/obj/item/projectile/bullet/saw/hollow
|
||||
damage = 60
|
||||
armour_penetration = -60
|
||||
|
||||
/obj/item/projectile/bullet/saw/ap
|
||||
damage = 40
|
||||
armour_penetration = 75
|
||||
|
||||
/obj/item/projectile/bullet/saw/incen
|
||||
damage = 7
|
||||
armour_penetration = 0
|
||||
|
||||
/obj/item/projectile/bullet/saw/incen/Move()
|
||||
..()
|
||||
var/turf/location = get_turf(src)
|
||||
if(location)
|
||||
new /obj/effect/hotspot(location)
|
||||
location.hotspot_expose(700, 50, 1)
|
||||
|
||||
/obj/item/projectile/bullet/saw/incen/on_hit(atom/target, blocked = FALSE)
|
||||
. = ..()
|
||||
if(iscarbon(target))
|
||||
var/mob/living/carbon/M = target
|
||||
M.adjust_fire_stacks(3)
|
||||
M.IgniteMob()
|
||||
|
||||
@@ -32,17 +32,6 @@
|
||||
explosion(target, -1, 0, 2)
|
||||
return 1
|
||||
|
||||
/obj/item/projectile/bullet/a40mm
|
||||
name ="40mm grenade"
|
||||
desc = "USE A WEEL GUN"
|
||||
icon_state= "bolter"
|
||||
damage = 60
|
||||
|
||||
/obj/item/projectile/bullet/a40mm/on_hit(atom/target, blocked = FALSE)
|
||||
..()
|
||||
explosion(target, -1, 0, 2, 1, 0, flame_range = 3)
|
||||
return 1
|
||||
|
||||
/obj/item/projectile/bullet/a84mm
|
||||
name ="anti-armour rocket"
|
||||
desc = "USE A WEEL GUN"
|
||||
@@ -184,16 +173,6 @@
|
||||
qdel(src)
|
||||
gun.create_portal(src, get_turf(src))
|
||||
|
||||
/obj/item/projectile/bullet/frag12
|
||||
name ="explosive slug"
|
||||
damage = 25
|
||||
knockdown = 50
|
||||
|
||||
/obj/item/projectile/bullet/frag12/on_hit(atom/target, blocked = FALSE)
|
||||
..()
|
||||
explosion(target, -1, 0, 1)
|
||||
return 1
|
||||
|
||||
/obj/item/projectile/plasma
|
||||
name = "plasma blast"
|
||||
icon_state = "plasmacutter"
|
||||
@@ -616,3 +595,19 @@
|
||||
|
||||
/obj/item/projectile/hallucination/death/hal_apply_effect()
|
||||
new /datum/hallucination/death(hal_target, TRUE)
|
||||
|
||||
// Neurotoxin
|
||||
|
||||
/obj/item/projectile/bullet/neurotoxin
|
||||
name = "neurotoxin spit"
|
||||
icon_state = "neurotoxin"
|
||||
damage = 5
|
||||
damage_type = TOX
|
||||
knockdown = 100
|
||||
|
||||
/obj/item/projectile/bullet/neurotoxin/on_hit(atom/target, blocked = FALSE)
|
||||
if(isalien(target))
|
||||
knockdown = 0
|
||||
nodamage = TRUE
|
||||
return ..()
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user