Merge branch 'master' into upstream-merge-31855

This commit is contained in:
LetterJay
2017-10-30 23:31:13 -04:00
committed by GitHub
343 changed files with 18223 additions and 3145 deletions
+9 -5
View File
@@ -6,7 +6,7 @@
if(!SSdbcore.Connect())
to_chat(src, "<span class='danger'>Failed to establish database connection.</span>")
return
var/polltype = input("Choose poll type.","Poll Type") in list("Single Option","Text Reply","Rating","Multiple Choice", "Instant Runoff Voting")|null
var/polltype = input("Choose poll type.","Poll Type") as null|anything in list("Single Option","Text Reply","Rating","Multiple Choice", "Instant Runoff Voting")
var/choice_amount = 0
switch(polltype)
if("Single Option")
@@ -18,10 +18,14 @@
if("Multiple Choice")
polltype = POLLTYPE_MULTI
choice_amount = input("How many choices should be allowed?","Select choice amount") as num|null
if(choice_amount == 0)
to_chat(src, "Multiple choice poll must have at least one choice allowed.")
else if (choice_amount == null)
return
switch(choice_amount)
if(0)
to_chat(src, "Multiple choice poll must have at least one choice allowed.")
return
if(1)
polltype = POLLTYPE_OPTION
if(null)
return
if ("Instant Runoff Voting")
polltype = POLLTYPE_IRV
else
+21 -2
View File
@@ -237,6 +237,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
. += " (<A HREF='?_src_=holder;[HrefToken(TRUE)];ahelp=[ref_src];ahelp_action=icissue'>IC</A>)"
. += " (<A HREF='?_src_=holder;[HrefToken(TRUE)];ahelp=[ref_src];ahelp_action=close'>CLOSE</A>)"
. += " (<A HREF='?_src_=holder;[HrefToken(TRUE)];ahelp=[ref_src];ahelp_action=resolve'>RSLVE</A>)"
. += " (<A HREF='?_src_=holder;[HrefToken(TRUE)];ahelp=[ref_src];ahelp_action=handleissue'>HANDLE</A>)"
//private
/datum/admin_help/proc/LinkedReplyName(ref_src)
@@ -382,6 +383,22 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
AddInteraction("Marked as IC issue by [key_name]")
Resolve(silent = TRUE)
//Let the initiator know their ahelp is being handled
/datum/admin_help/proc/HandleIssue(key_name = key_name_admin(usr))
if(state != AHELP_ACTIVE)
return
var/msg = "<span class ='adminhelp'>Your ticket is now being handled by an admin. Please be patient.</span>"
if(initiator)
to_chat(initiator, msg)
SSblackbox.inc("ahelp_handleissue")
msg = "Ticket [TicketHref("#[id]")] is being handled by [key_name]"
message_admins(msg)
log_admin_private(msg)
AddInteraction("Being handled by [key_name]")
//Show the ticket panel
/datum/admin_help/proc/TicketPanel()
var/list/dat = list("<html><head><title>Ticket #[id]</title></head>")
@@ -442,6 +459,8 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
Close()
if("resolve")
Resolve()
if("handleissue")
HandleIssue()
if("reopen")
Reopen()
@@ -489,9 +508,9 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
return
if(handle_spam_prevention(msg,MUTE_ADMINHELP))
return
msg = trim(msg)
if(!msg)
return
+27 -8
View File
@@ -82,6 +82,7 @@
var/valueholder = "derp"
var/objholder = /obj/structure/closet
var/atom/movable/stored = null
var/list/preview = list()
/datum/buildmode/New(client/c)
create_buttons()
@@ -94,6 +95,8 @@
holder.screen -= buttons
holder.click_intercept = null
holder.show_popup_menus = 1
usr.client.images -= preview
preview.Cut()
qdel(src)
return
@@ -150,6 +153,7 @@
if(AREA_BUILDMODE)
dat += "***********************************************************"
dat += "Left Mouse Button on turf/obj/mob = Select corner"
dat += "Right Mouse Button on turf/obj/mob = Reset corner selection"
dat += "Right Mouse Button on buildmode button = Select generator"
dat += "***********************************************************"
if(COPY_BUILDMODE)
@@ -338,13 +342,20 @@
throw_atom.throw_at(object, 10, 1,user)
log_admin("Build Mode: [key_name(user)] threw [throw_atom] at [object] ([object.x],[object.y],[object.z])")
if(AREA_BUILDMODE)
if(!cornerA)
cornerA = get_turf(object)
return
if(cornerA && !cornerB)
cornerB = get_turf(object)
if(left_click) //rectangular
if(!cornerA)
cornerA = get_turf(object)
preview += image('icons/turf/overlays.dmi',cornerA,"greenOverlay")
usr.client.images -= preview
usr.client.images += preview
return
if(cornerA && !cornerB)
cornerB = get_turf(object)
preview += image('icons/turf/overlays.dmi',cornerB,"blueOverlay")
usr.client.images -= preview
usr.client.images += preview
to_chat(user, "<span class='boldwarning'>Region selected, if you're happy with your selection left click again, otherwise right click.</span>")
return
if(cornerA && cornerB)
if(!generator_path)
to_chat(user, "<span class='warning'>Select generator type first.</span>")
@@ -354,10 +365,18 @@
if(GLOB.reloading_map)
to_chat(user, "<span class='boldwarning'>You are already reloading an area! Please wait for it to fully finish loading before trying to load another!</span>")
return
G.defineRegion(cornerA,cornerB,1)
G.generate()
G.defineRegion(cornerA, cornerB, 1)
for(var/t in G.map)
preview += image('icons/turf/overlays.dmi', t ,"redOverlay")
usr.client.images -= preview
usr.client.images += preview
var/confirm = alert("Are you sure you want run the map generator?", "Run generator", "Yes", "No")
if(confirm == "Yes")
G.generate()
cornerA = null
cornerB = null
usr.client.images -= preview
preview.Cut()
return
//Something wrong - Reset
cornerA = null
+43 -2
View File
@@ -128,8 +128,10 @@ GLOBAL_PROTECT(LastAdminCalledProc)
/world/proc/WrapAdminProcCall(target, procname, list/arguments)
if(target == GLOBAL_PROC)
return call(procname)(arglist(arguments))
else
else if(target != world)
return call(target, procname)(arglist(arguments))
else
log_admin_private("[key_name(usr)] attempted to call world/proc/[procname] with arguments: [english_list(arguments)]")
/proc/IsAdminAdvancedProcCall()
#ifdef TESTING
@@ -778,7 +780,7 @@ GLOBAL_PROTECT(LastAdminCalledProc)
/client/proc/cmd_display_init_log()
set category = "Debug"
set name = "Display Initialzie() Log"
set name = "Display Initialize() Log"
set desc = "Displays a list of things that didn't handle Initialize() properly"
usr << browse(replacetext(SSatoms.InitLog(), "\n", "<br>"), "window=initlog")
@@ -871,3 +873,42 @@ GLOBAL_PROTECT(LastAdminCalledProc)
message_admins("<span class='adminnotice'>[key_name_admin(src)] pumped a random event.</span>")
SSblackbox.add_details("admin_verb","Pump Random Event")
log_admin("[key_name(src)] pumped a random event.")
/client/proc/start_line_profiling()
set category = "Profile"
set name = "Start Line Profiling"
set desc = "Starts tracking line by line profiling for code lines that support it"
PROFILE_START
message_admins("<span class='adminnotice'>[key_name_admin(src)] started line by line profiling.</span>")
SSblackbox.add_details("admin_verb","Start Line Profiling")
log_admin("[key_name(src)] started line by line profiling.")
/client/proc/stop_line_profiling()
set category = "Profile"
set name = "Stops Line Profiling"
set desc = "Stops tracking line by line profiling for code lines that support it"
PROFILE_STOP
message_admins("<span class='adminnotice'>[key_name_admin(src)] stopped line by line profiling.</span>")
SSblackbox.add_details("admin_verb","stop Line Profiling")
log_admin("[key_name(src)] stopped line by line profiling.")
/client/proc/show_line_profiling()
set category = "Profile"
set name = "Show Line Profiling"
set desc = "Shows tracked profiling info from code lines that support it"
var/sortlist = list(
"Avg time" = /proc/cmp_profile_avg_time_dsc,
"Total Time" = /proc/cmp_profile_time_dsc,
"Call Count" = /proc/cmp_profile_count_dsc
)
var/sort = input(src, "Sort type?", "Sort Type", "Avg time") as null|anything in sortlist
if (!sort)
return
sort = sortlist[sort]
profile_show(src, sort)
+4 -1
View File
@@ -42,7 +42,10 @@ GLOBAL_LIST_INIT(admin_verbs_debug_mapping, list(
/client/proc/print_pointers,
/client/proc/cmd_show_at_list,
/client/proc/cmd_show_at_markers,
/client/proc/manipulate_organs
/client/proc/manipulate_organs,
/client/proc/start_line_profiling,
/client/proc/stop_line_profiling,
/client/proc/show_line_profiling
))
/obj/effect/debugging/mapfix_marker
@@ -14,10 +14,10 @@
var/oxy = air_contents.gases[/datum/gas/oxygen] ? air_contents.gases[/datum/gas/oxygen][MOLES] : 0
var/tox = air_contents.gases[/datum/gas/plasma] ? air_contents.gases[/datum/gas/plasma][MOLES] : 0
var/trit = air_contents.gases[/datum/gas/tritium] ? air_contents.gases[/datum/gas/tritium][MOLES] : 0
if(active_hotspot)
if(soh)
if(tox > 0.5 && oxy > 0.5)
if((tox > 0.5 || trit > 0.5) && oxy > 0.5)
if(active_hotspot.temperature < exposed_temperature)
active_hotspot.temperature = exposed_temperature
if(active_hotspot.volume < exposed_volume)
@@ -26,11 +26,11 @@
var/igniting = 0
if((exposed_temperature > PLASMA_MINIMUM_BURN_TEMPERATURE) && tox > 0.5)
if((exposed_temperature > PLASMA_MINIMUM_BURN_TEMPERATURE) && (tox > 0.5 || trit > 0.5))
igniting = 1
if(igniting)
if(oxy < 0.5 || tox < 0.5)
if(oxy < 0.5)
return 0
active_hotspot = new /obj/effect/hotspot(src)
@@ -112,7 +112,7 @@
qdel(src)
return
if(!(location.air) || !location.air.gases[/datum/gas/plasma] || !location.air.gases[/datum/gas/oxygen] || location.air.gases[/datum/gas/plasma][MOLES] < 0.5 || location.air.gases[/datum/gas/oxygen][MOLES] < 0.5)
if(!(location.air) || !(location.air.gases[/datum/gas/plasma] || location.air.gases[/datum/gas/tritium]) || !location.air.gases[/datum/gas/oxygen] || (location.air.gases[/datum/gas/plasma][MOLES] < 0.5 && location.air.gases[/datum/gas/tritium][MOLES] < 0.5) || location.air.gases[/datum/gas/oxygen][MOLES] < 0.5)
qdel(src)
return
@@ -6,7 +6,6 @@ What are the archived variables for?
#define MINIMUM_HEAT_CAPACITY 0.0003
#define QUANTIZE(variable) (round(variable,0.0000001))/*I feel the need to document what happens here. Basically this is used to catch most rounding errors, however it's previous value made it so that
once gases got hot enough, most procedures wouldnt occur due to the fact that the mole counts would get rounded away. Thus, we lowered it a few orders of magnititude */
GLOBAL_LIST_INIT(meta_gas_info, meta_gas_list()) //see ATMOSPHERICS/gas_types.dm
GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache())
@@ -401,6 +400,7 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache())
/datum/gas_mixture/react(turf/open/dump_location)
. = 0
reaction_results = new
var/list/cached_gases = gases
@@ -438,6 +438,9 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache())
*/
. |= reaction.react(src, dump_location)
//to_chat(world,reaction.name)
if (. & STOP_REACTIONS)
break
if(.)
garbage_collect()
if(temperature < TCMB) //just for safety
@@ -58,7 +58,7 @@ GLOBAL_LIST_INIT(hardcoded_gases, list(/datum/gas/oxygen, /datum/gas/nitrogen, /
specific_heat = 200
name = "Plasma"
gas_overlay = "plasma"
moles_visible = MOLES_PLASMA_VISIBLE
moles_visible = MOLES_GAS_VISIBLE
dangerous = TRUE
/datum/gas/water_vapor
@@ -66,14 +66,14 @@ GLOBAL_LIST_INIT(hardcoded_gases, list(/datum/gas/oxygen, /datum/gas/nitrogen, /
specific_heat = 40
name = "Water Vapor"
gas_overlay = "water_vapor"
moles_visible = MOLES_PLASMA_VISIBLE
moles_visible = MOLES_GAS_VISIBLE
/datum/gas/freon
id = "freon"
/datum/gas/hypernoblium
id = "nob"
specific_heat = 2000
name = "Freon"
name = "Hyper-noblium"
gas_overlay = "freon"
moles_visible = MOLES_PLASMA_VISIBLE
moles_visible = MOLES_GAS_VISIBLE
dangerous = TRUE
/datum/gas/nitrous_oxide
@@ -84,15 +84,21 @@ GLOBAL_LIST_INIT(hardcoded_gases, list(/datum/gas/oxygen, /datum/gas/nitrogen, /
moles_visible = 1
dangerous = TRUE
/datum/gas/oxygen_agent_b
id = "agent_b"
specific_heat = 300
name = "Oxygen Agent B"
/datum/gas/brown_gas //This is nitric oxide, but given generic name to avoid confusion with nitrous oxide(N20 vs. NO2)
id = "browns"
specific_heat = 20
name = "Brown Gas"
gas_overlay = "browns"
moles_visible = MOLES_GAS_VISIBLE
dangerous = TRUE
/datum/gas/volatile_fuel
id = "v_fuel"
specific_heat = 30
name = "Volatile Fuel"
/datum/gas/tritium
id = "tritium"
specific_heat = 10
name = "Tritium"
gas_overlay = "tritium"
moles_visible = MOLES_GAS_VISIBLE
dangerous = TRUE
/datum/gas/bz
id = "bz"
@@ -100,6 +106,16 @@ GLOBAL_LIST_INIT(hardcoded_gases, list(/datum/gas/oxygen, /datum/gas/nitrogen, /
name = "BZ"
dangerous = TRUE
/datum/gas/stimulum
id = "stim"
specific_heat = 5
name = "Stimulum"
/datum/gas/pluoxium
id = "pluox"
specific_heat = 80
name = "Pluoxium"
/obj/effect/overlay/gas
icon = 'icons/effects/tile_effects.dmi'
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
@@ -1,6 +1,33 @@
#define NO_REACTION 0
#define REACTING 1
//Plasma fire properties
#define OXYGEN_BURN_RATE_BASE 1.4
#define PLASMA_BURN_RATE_DELTA 9
#define PLASMA_UPPER_TEMPERATURE 1370+T0C
#define PLASMA_MINIMUM_OXYGEN_NEEDED 2
#define PLASMA_MINIMUM_OXYGEN_PLASMA_RATIO 30
#define PLASMA_OXYGEN_FULLBURN 10
#define FIRE_CARBON_ENERGY_RELEASED 100000 //Amount of heat released per mole of burnt carbon into the tile
#define FIRE_PLASMA_ENERGY_RELEASED 3000000 //Amount of heat released per mole of burnt plasma into the tile
//General assmos defines.
#define WATER_VAPOR_FREEZE 200
#define BROWNS_FORMATION_ENERGY 100000
#define TRITIUM_BURN_OXY_FACTOR 100
#define TRITIUM_BURN_TRIT_FACTOR 10
#define SUPER_SATURATION_THRESHOLD 96
#define STIMULUM_HEAT_SCALE 100000
#define STIMULUM_FIRST_RISE 0.65
#define STIMULUM_FIRST_DROP 0.065
#define STIMULUM_SECOND_RISE 0.0009
#define STIMULUM_ABSOLUTE_DROP 0.00000335
#define REACTION_OPPRESSION_THRESHOLD 5
//Plasma fusion properties
#define PLASMA_BINDING_ENERGY 3000000
#define MAX_CATALYST_EFFICENCY 9
#define PLASMA_FUSED_COEFFICENT 0.08
#define CATALYST_COEFFICENT 0.01
#define FUSION_PURITY_THRESHOLD 0.9
#define FUSION_HEAT_DROPOFF 20000+T0C
/datum/controller/subsystem/air/var/list/gas_reactions //this is our singleton of all reactions
/proc/init_gas_reactions()
@@ -35,48 +62,15 @@
/datum/gas_reaction/proc/react(datum/gas_mixture/air, atom/location)
return NO_REACTION
//agent b: converts hot co2 and agent b to oxygen. requires plasma as a catalyst. endothermic
/datum/gas_reaction/agent_b
priority = 2
name = "Agent B"
id = "agent_b"
/datum/gas_reaction/nobliumsupression
priority = INFINITY
name = "Hyper-Noblium Reaction Supression"
id = "nobstop"
/datum/gas_reaction/nobliumsupression/init_reqs()
min_requirements = list(/datum/gas/hypernoblium = REACTION_OPPRESSION_THRESHOLD)
/datum/gas_reaction/agent_b/init_reqs()
min_requirements = list(
"TEMP" = 900,
/datum/gas/oxygen_agent_b = MINIMUM_HEAT_CAPACITY,
/datum/gas/plasma = MINIMUM_HEAT_CAPACITY,
/datum/gas/carbon_dioxide = MINIMUM_HEAT_CAPACITY
)
/datum/gas_reaction/agent_b/react(datum/gas_mixture/air)
var/list/cached_gases = air.gases
var/reaction_rate = min(cached_gases[/datum/gas/carbon_dioxide][MOLES]*0.75, cached_gases[/datum/gas/plasma][MOLES]*0.25, cached_gases[/datum/gas/oxygen_agent_b][MOLES]*0.05)
cached_gases[/datum/gas/carbon_dioxide][MOLES] -= reaction_rate
cached_gases[/datum/gas/oxygen_agent_b][MOLES] -= reaction_rate*0.05
ASSERT_GAS(/datum/gas/oxygen, air) //only need to assert oxygen, as this reaction doesn't occur without the other gases existing
cached_gases[/datum/gas/oxygen][MOLES] += reaction_rate
air.temperature -= (reaction_rate*20000)/air.heat_capacity()
return REACTING
//freon: does a freezy thing?
/datum/gas_reaction/freon
priority = 1
name = "Freon"
id = "freon"
/datum/gas_reaction/freon/init_reqs()
min_requirements = list(/datum/gas/freon = MOLES_PLASMA_VISIBLE)
/datum/gas_reaction/freon/react(datum/gas_mixture/air, turf/open/location)
. = NO_REACTION
if(location && location.freon_gas_act())
. = REACTING
/datum/gas_reaction/nobliumsupression/react()
return STOP_REACTIONS
//water vapor: puts out fires?
/datum/gas_reaction/water_vapor
@@ -85,12 +79,15 @@
id = "vapor"
/datum/gas_reaction/water_vapor/init_reqs()
min_requirements = list(/datum/gas/water_vapor = MOLES_PLASMA_VISIBLE)
min_requirements = list(/datum/gas/water_vapor = MOLES_GAS_VISIBLE)
/datum/gas_reaction/water_vapor/react(datum/gas_mixture/air, turf/open/location)
. = NO_REACTION
if(location && location.water_vapor_gas_act())
air.gases[/datum/gas/water_vapor][MOLES] -= MOLES_PLASMA_VISIBLE
if (air.temperature <= WATER_VAPOR_FREEZE)
if(location && location.freon_gas_act())
. = REACTING
else if(location && location.water_vapor_gas_act())
air.gases[/datum/gas/water_vapor][MOLES] -= MOLES_GAS_VISIBLE
. = REACTING
//fire: combustion of plasma and volatile fuel (treated as hydrocarbons). creates hotspots. exothermic
@@ -100,7 +97,7 @@
id = "fire"
/datum/gas_reaction/fire/init_reqs()
min_requirements = list("TEMP" = FIRE_MINIMUM_TEMPERATURE_TO_EXIST) //doesn't include plasma reqs b/c of volatile fuel stuff - consider finally axing volatile fuel
min_requirements = list("TEMP" = FIRE_MINIMUM_TEMPERATURE_TO_EXIST) //doesn't include plasma reqs b/c of other, rarer, burning gases.
/datum/gas_reaction/fire/react(datum/gas_mixture/air, turf/open/location)
var/energy_released = 0
@@ -111,23 +108,23 @@
cached_results[id] = 0
//General volatile gas burn
if(cached_gases[/datum/gas/volatile_fuel] && cached_gases[/datum/gas/volatile_fuel][MOLES])
if(cached_gases[/datum/gas/tritium] && cached_gases[/datum/gas/tritium][MOLES])
var/burned_fuel
if(!cached_gases[/datum/gas/oxygen])
burned_fuel = 0
else if(cached_gases[/datum/gas/oxygen][MOLES] < cached_gases[/datum/gas/volatile_fuel][MOLES])
burned_fuel = cached_gases[/datum/gas/oxygen][MOLES]
cached_gases[/datum/gas/volatile_fuel][MOLES] -= burned_fuel
cached_gases[/datum/gas/oxygen][MOLES] = 0
else if(cached_gases[/datum/gas/oxygen][MOLES] < cached_gases[/datum/gas/tritium][MOLES])
burned_fuel = cached_gases[/datum/gas/oxygen][MOLES]/TRITIUM_BURN_OXY_FACTOR
cached_gases[/datum/gas/tritium][MOLES] -= burned_fuel
else
burned_fuel = cached_gases[/datum/gas/volatile_fuel][MOLES]
cached_gases[/datum/gas/oxygen][MOLES] -= cached_gases[/datum/gas/volatile_fuel][MOLES]
burned_fuel = cached_gases[/datum/gas/tritium][MOLES]*TRITIUM_BURN_TRIT_FACTOR
cached_gases[/datum/gas/tritium][MOLES] -= cached_gases[/datum/gas/tritium][MOLES]/TRITIUM_BURN_TRIT_FACTOR
cached_gases[/datum/gas/oxygen][MOLES] -= cached_gases[/datum/gas/tritium][MOLES]
if(burned_fuel)
energy_released += FIRE_CARBON_ENERGY_RELEASED * burned_fuel
ASSERT_GAS(/datum/gas/carbon_dioxide, air)
cached_gases[/datum/gas/carbon_dioxide][MOLES] += burned_fuel
cached_gases[/datum/gas/carbon_dioxide][MOLES] += burned_fuel/TRITIUM_BURN_OXY_FACTOR
cached_results[id] += burned_fuel
@@ -137,6 +134,7 @@
var/oxygen_burn_rate = 0
//more plasma released at higher temperatures
var/temperature_scale
var/super_saturation
if(temperature > PLASMA_UPPER_TEMPERATURE)
temperature_scale = 1
else
@@ -144,15 +142,25 @@
if(temperature_scale > 0)
var/o2 = cached_gases[/datum/gas/oxygen] ? cached_gases[/datum/gas/oxygen][MOLES] : 0
oxygen_burn_rate = OXYGEN_BURN_RATE_BASE - temperature_scale
if (o2 > cached_gases[/datum/gas/plasma][MOLES]*PLASMA_OXYGEN_FULLBURN)
plasma_burn_rate = (cached_gases[/datum/gas/plasma][MOLES]*temperature_scale)/PLASMA_BURN_RATE_DELTA
if(o2 / cached_gases[/datum/gas/plasma][MOLES] > SUPER_SATURATION_THRESHOLD) //supersaturation. Form Tritium.
super_saturation = TRUE
if(o2 > cached_gases[/datum/gas/plasma][MOLES]*PLASMA_OXYGEN_FULLBURN)
plasma_burn_rate = (cached_gases[/datum/gas/plasma][MOLES]*temperature_scale)/PLASMA_BURN_RATE_DELTA
else
plasma_burn_rate = (temperature_scale*(o2/PLASMA_OXYGEN_FULLBURN))/PLASMA_BURN_RATE_DELTA
if(plasma_burn_rate > MINIMUM_HEAT_CAPACITY)
ASSERT_GAS(/datum/gas/carbon_dioxide, air) //don't need to assert o2, since if it isn't present we'll never reach this point anyway
cached_gases[/datum/gas/plasma][MOLES] = QUANTIZE(cached_gases[/datum/gas/plasma][MOLES] - plasma_burn_rate)
cached_gases[/datum/gas/oxygen][MOLES] = QUANTIZE(cached_gases[/datum/gas/oxygen][MOLES] - (plasma_burn_rate * oxygen_burn_rate))
cached_gases[/datum/gas/carbon_dioxide][MOLES] += plasma_burn_rate
if (super_saturation)
ASSERT_GAS(/datum/gas/tritium,air)
cached_gases[/datum/gas/tritium][MOLES] += plasma_burn_rate
else
ASSERT_GAS(/datum/gas/carbon_dioxide,air)
cached_gases[/datum/gas/carbon_dioxide][MOLES] += plasma_burn_rate
energy_released += FIRE_PLASMA_ENERGY_RELEASED * (plasma_burn_rate)
@@ -175,9 +183,9 @@
return cached_results[id] ? REACTING : NO_REACTION
//fusion: a terrible idea that was fun to try. turns co2 and plasma into REALLY HOT oxygen and nitrogen. super exothermic lol
//fusion: a terrible idea that was fun but broken. Now reworked to be less broken and more interesting.
/datum/gas_reaction/fusion
exclude = TRUE
exclude = FALSE
priority = 2
name = "Plasmic Fusion"
id = "fusion"
@@ -186,35 +194,37 @@
min_requirements = list(
"ENER" = PLASMA_BINDING_ENERGY * 10,
/datum/gas/plasma = MINIMUM_HEAT_CAPACITY,
/datum/gas/carbon_dioxide = MINIMUM_HEAT_CAPACITY
/datum/gas/tritium = MINIMUM_HEAT_CAPACITY
)
/datum/gas_reaction/fusion/react(datum/gas_mixture/air)
var/list/cached_gases = air.gases
var/temperature = air.temperature
if((cached_gases[/datum/gas/plasma][MOLES]+cached_gases[/datum/gas/carbon_dioxide][MOLES])/air.total_moles() < FUSION_PURITY_THRESHOLD)
//Fusion wont occur if the level of impurities is too high.
if(((cached_gases[/datum/gas/plasma][MOLES]+cached_gases[/datum/gas/tritium][MOLES])/air.total_moles() < FUSION_PURITY_THRESHOLD) || air.return_pressure() < 10*ONE_ATMOSPHERE)
//Fusion wont occur if the level of impurities is too high or if there is too little pressure.
return NO_REACTION
var/old_heat_capacity = air.heat_capacity()
var/carbon_efficency = min(cached_gases[/datum/gas/plasma][MOLES]/cached_gases[/datum/gas/carbon_dioxide][MOLES],MAX_CARBON_EFFICENCY)
var/catalyst_efficency = max(min(cached_gases[/datum/gas/plasma][MOLES]/cached_gases[/datum/gas/tritium][MOLES],MAX_CATALYST_EFFICENCY)-(temperature/FUSION_HEAT_DROPOFF),1)
var/reaction_energy = THERMAL_ENERGY(air)
var/moles_impurities = air.total_moles()-(cached_gases[/datum/gas/plasma][MOLES]+cached_gases[/datum/gas/carbon_dioxide][MOLES])
var/moles_impurities = air.total_moles()-(cached_gases[/datum/gas/plasma][MOLES]+cached_gases[/datum/gas/tritium][MOLES])
var/plasma_fused = (PLASMA_FUSED_COEFFICENT*carbon_efficency)*(temperature/PLASMA_BINDING_ENERGY)
var/carbon_catalyzed = (CARBON_CATALYST_COEFFICENT*carbon_efficency)*(temperature/PLASMA_BINDING_ENERGY)
var/oxygen_added = carbon_catalyzed
var/nitrogen_added = (plasma_fused-oxygen_added)-(THERMAL_ENERGY(air)/PLASMA_BINDING_ENERGY)
var/plasma_fused = (PLASMA_FUSED_COEFFICENT*catalyst_efficency)*(temperature/PLASMA_BINDING_ENERGY)*4
var/tritium_catalyzed = (CATALYST_COEFFICENT*catalyst_efficency)*(temperature/PLASMA_BINDING_ENERGY)
var/oxygen_added = tritium_catalyzed
var/waste_added = (plasma_fused-oxygen_added)-((air.total_moles()*air.heat_capacity())/PLASMA_BINDING_ENERGY)
reaction_energy = max(reaction_energy+((catalyst_efficency*cached_gases[/datum/gas/plasma][MOLES])/((moles_impurities/catalyst_efficency)+2)*10)+((plasma_fused/((moles_impurities/catalyst_efficency)))*PLASMA_BINDING_ENERGY),0)
reaction_energy = max(reaction_energy+((carbon_efficency*cached_gases[/datum/gas/plasma][MOLES])/((moles_impurities/carbon_efficency)+2)*10)+((plasma_fused/(moles_impurities/carbon_efficency))*PLASMA_BINDING_ENERGY),0)
air.assert_gases(/datum/gas/oxygen, /datum/gas/nitrogen)
cached_gases[/datum/gas/plasma][MOLES] -= plasma_fused
cached_gases[/datum/gas/carbon_dioxide][MOLES] -= carbon_catalyzed
air.assert_gases(/datum/gas/oxygen, /datum/gas/nitrogen, /datum/gas/water_vapor, /datum/gas/nitrous_oxide, /datum/gas/brown_gas)
//Fusion produces an absurd amount of waste products now, requiring active filtration.
cached_gases[/datum/gas/plasma][MOLES] = max(cached_gases[/datum/gas/plasma][MOLES] - plasma_fused,0)
cached_gases[/datum/gas/tritium][MOLES] = max(cached_gases[/datum/gas/tritium][MOLES] - tritium_catalyzed,0)
cached_gases[/datum/gas/oxygen][MOLES] += oxygen_added
cached_gases[/datum/gas/nitrogen][MOLES] += nitrogen_added
cached_gases[/datum/gas/nitrogen][MOLES] += waste_added
cached_gases[/datum/gas/water_vapor][MOLES] += waste_added
cached_gases[/datum/gas/nitrous_oxide][MOLES] += waste_added
cached_gases[/datum/gas/brown_gas][MOLES] += waste_added
if(reaction_energy > 0)
var/new_heat_capacity = air.heat_capacity()
@@ -223,5 +233,152 @@
//Prevents whatever mechanism is causing it to hit negative temperatures.
return REACTING
/datum/gas_reaction/brownsformation //The formation of brown gas. Endothermic. Requires N2O as a catalyst.
priority = 3
name = "Brown Gas formation"
id = "brownsformation"
/datum/gas_reaction/brownsformation/init_reqs()
min_requirements = list(
/datum/gas/oxygen = 20,
/datum/gas/nitrogen = 20,
/datum/gas/nitrous_oxide = 5,
"TEMP" = FIRE_MINIMUM_TEMPERATURE_TO_EXIST*400
)
/datum/gas_reaction/brownsformation/react(datum/gas_mixture/air)
var/list/cached_gases = air.gases
var/temperature = air.temperature
var/old_heat_capacity = air.heat_capacity()
var/heat_efficency = temperature/(FIRE_MINIMUM_TEMPERATURE_TO_EXIST*100)
var/energy_used = heat_efficency*BROWNS_FORMATION_ENERGY
ASSERT_GAS(/datum/gas/brown_gas,air)
cached_gases[/datum/gas/oxygen][MOLES] -= heat_efficency
cached_gases[/datum/gas/nitrogen][MOLES] -= heat_efficency
cached_gases[/datum/gas/brown_gas][MOLES] += heat_efficency*2
if(energy_used > 0)
var/new_heat_capacity = air.heat_capacity()
if(new_heat_capacity > MINIMUM_HEAT_CAPACITY)
air.temperature = max(((temperature*old_heat_capacity - energy_used)/new_heat_capacity),TCMB)
return REACTING
/datum/gas_reaction/bzformation //Formation of BZ by combining plasma and tritium at low pressures. Exothermic.
priority = 4
name = "BZ Gas formation"
id = "bzformation"
/datum/gas_reaction/bzformation/init_reqs()
min_requirements = list(
/datum/gas/tritium = 10,
/datum/gas/plasma = 10
)
/datum/gas_reaction/bzformation/react(datum/gas_mixture/air)
var/list/cached_gases = air.gases
var/temperature = air.temperature
var/pressure = air.return_pressure()
var/old_heat_capacity = air.heat_capacity()
var/reaction_efficency = 1/((pressure/(0.1*ONE_ATMOSPHERE))*(max(cached_gases[/datum/gas/plasma][MOLES]/cached_gases[/datum/gas/tritium][MOLES],1)))
var/energy_released = 2*reaction_efficency*FIRE_CARBON_ENERGY_RELEASED
ASSERT_GAS(/datum/gas/bz,air)
cached_gases[/datum/gas/bz][MOLES]+= reaction_efficency
cached_gases[/datum/gas/tritium][MOLES] = max(cached_gases[/datum/gas/tritium][MOLES]- 2*reaction_efficency,0)
cached_gases[/datum/gas/plasma][MOLES] = max(cached_gases[/datum/gas/plasma][MOLES] - reaction_efficency,0)
if(energy_released > 0)
var/new_heat_capacity = air.heat_capacity()
if(new_heat_capacity > MINIMUM_HEAT_CAPACITY)
air.temperature = max(((temperature*old_heat_capacity + energy_released)/new_heat_capacity),TCMB)
return REACTING
/datum/gas_reaction/stimformation //Stimulum formation follows a strange pattern of how effective it will be at a given temperature, having some multiple peaks and some large dropoffs. Exo and endo thermic.
priority = 5
name = "Stimulum formation"
id = "stimformation"
/datum/gas_reaction/stimformation/init_reqs()
min_requirements = list(
/datum/gas/tritium = 30,
/datum/gas/plasma = 10,
/datum/gas/bz = 20,
/datum/gas/brown_gas = 30,
"TEMP" = STIMULUM_HEAT_SCALE/2)
/datum/gas_reaction/stimformation/react(datum/gas_mixture/air)
var/list/cached_gases = air.gases
var/old_heat_capacity = air.heat_capacity()
var/heat_scale = air.temperature/STIMULUM_HEAT_SCALE
var/stim_energy_change
stim_energy_change =heat_scale + (STIMULUM_FIRST_RISE(heat_scale**2)) - (STIMULUM_FIRST_DROP(heat_scale**3)) + (STIMULUM_SECOND_RISE(heat_scale**4)) - (STIMULUM_ABSOLUTE_DROP(heat_scale**5))
ASSERT_GAS(/datum/gas/stimulum,air)
cached_gases[/datum/gas/stimulum][MOLES]+= heat_scale/10
cached_gases[/datum/gas/tritium][MOLES] = max(cached_gases[/datum/gas/tritium][MOLES]- heat_scale,0)
cached_gases[/datum/gas/plasma][MOLES] = max(cached_gases[/datum/gas/plasma][MOLES]- heat_scale,0)
cached_gases[/datum/gas/brown_gas][MOLES] = max(cached_gases[/datum/gas/brown_gas][MOLES]- heat_scale,0)
if(stim_energy_change)
var/new_heat_capacity = air.heat_capacity()
if(new_heat_capacity > MINIMUM_HEAT_CAPACITY)
air.temperature = max(((air.temperature*old_heat_capacity + stim_energy_change)/new_heat_capacity),TCMB)
return REACTING
/datum/gas_reaction/nobliumformation //Hyper-Nobelium formation is extrememly endothermic, but requires high temperatures to start. Due to its high mass, hyper-nobelium uses large amounts of nitrogen and tritium. BZ can be used as a catalyst to make it less endothermic.
priority = 6
name = "Hyper-Noblium condensation"
id = "nobformation"
/datum/gas_reaction/nobliumformation/init_reqs()
min_requirements = list(
/datum/gas/nitrogen = 10,
/datum/gas/tritium = 5,
"TEMP" = 5000000)
/datum/gas_reaction/nobliumformation/react(datum/gas_mixture/air)
var/list/cached_gases = air.gases
air.assert_gases(/datum/gas/hypernoblium,/datum/gas/bz)
var/old_heat_capacity = air.heat_capacity()
var/nob_formed = (cached_gases[/datum/gas/nitrogen][MOLES]*cached_gases[/datum/gas/tritium][MOLES])/100
var/energy_taken = nob_formed*(10000000/(max(cached_gases[/datum/gas/bz][MOLES],1)))
cached_gases[/datum/gas/tritium][MOLES] = max(cached_gases[/datum/gas/tritium][MOLES]- 10*nob_formed,0)
cached_gases[/datum/gas/nitrogen][MOLES] = max(cached_gases[/datum/gas/nitrogen][MOLES]- 20*nob_formed,0)
cached_gases[/datum/gas/hypernoblium][MOLES]+= nob_formed
if (nob_formed)
var/new_heat_capacity = air.heat_capacity()
if(new_heat_capacity > MINIMUM_HEAT_CAPACITY)
air.temperature = max(((air.temperature*old_heat_capacity - energy_taken)/new_heat_capacity),TCMB)
#undef REACTING
#undef NO_REACTION
#undef OXYGEN_BURN_RATE_BASE
#undef PLASMA_BURN_RATE_DELTA
#undef PLASMA_UPPER_TEMPERATURE
#undef PLASMA_MINIMUM_OXYGEN_NEEDED
#undef PLASMA_MINIMUM_OXYGEN_PLASMA_RATIO
#undef PLASMA_OXYGEN_FULLBURN
#undef FIRE_CARBON_ENERGY_RELEASED
#undef FIRE_PLASMA_ENERGY_RELEASED
#undef WATER_VAPOR_FREEZE
#undef BROWNS_FORMATION_ENERGY
#undef TRITIUM_BURN_OXY_FACTOR
#undef SUPER_SATURATION_THRESHOLD
#undef STIMULUM_HEAT_SCALE
#undef STIMULUM_FIRST_RISE
#undef STIMULUM_FIRST_DROP
#undef STIMULUM_SECOND_RISE
#undef STIMULUM_ABSOLUTE_DROP
#undef REACTION_OPPRESSION_THRESHOLD
#undef PLASMA_BINDING_ENERGY
#undef MAX_CATALYST_EFFICENCY
#undef PLASMA_FUSED_COEFFICENT
#undef CATALYST_COEFFICENT
#undef FUSION_PURITY_THRESHOLD
#undef FUSION_HEAT_DROPOFF
+53 -33
View File
@@ -5,10 +5,10 @@
var/max2
/datum/tlv/New(min2 as num, min1 as num, max1 as num, max2 as num)
src.min2 = min2
src.min1 = min1
src.max1 = max1
src.max2 = max2
if(min2) src.min2 = min2
if(min1) src.min1 = min1
if(max1) src.max1 = max1
if(max2) src.max2 = max2
/datum/tlv/proc/get_danger_level(val as num)
if(max2 != -1 && val >= max2)
@@ -21,6 +21,18 @@
return 1
return 0
/datum/tlv/no_checks
min2 = -1
min1 = -1
max1 = -1
max2 = -1
/datum/tlv/dangerous
min2 = -1
min1 = -1
max1 = 0.2
max2 = 0.5
/obj/item/electronics/airalarm
name = "air alarm electronics"
icon_state = "airalarm_electronics"
@@ -78,25 +90,33 @@
/datum/gas/oxygen = new/datum/tlv(16, 19, 135, 140), // Partial pressure, kpa
/datum/gas/nitrogen = new/datum/tlv(-1, -1, 1000, 1000), // Partial pressure, kpa
/datum/gas/carbon_dioxide = new/datum/tlv(-1, -1, 5, 10), // Partial pressure, kpa
/datum/gas/plasma = new/datum/tlv(-1, -1, 0.2, 0.5), // Partial pressure, kpa
/datum/gas/nitrous_oxide = new/datum/tlv(-1, -1, 0.2, 0.5), // Partial pressure, kpa
/datum/gas/bz = new/datum/tlv(-1, -1, 0.2, 0.5),
/datum/gas/freon = new/datum/tlv(-1, -1, 0.2, 0.5),
/datum/gas/water_vapor = new/datum/tlv(-1, -1, 0.2, 0.5)
/datum/gas/plasma = new/datum/tlv/dangerous, // Partial pressure, kpa
/datum/gas/nitrous_oxide = new/datum/tlv/dangerous, // Partial pressure, kpa
/datum/gas/bz = new/datum/tlv/dangerous,
/datum/gas/hypernoblium = new/datum/tlv/dangerous,
/datum/gas/water_vapor = new/datum/tlv/dangerous,
/datum/gas/tritium = new/datum/tlv/dangerous,
/datum/gas/stimulum = new/datum/tlv/dangerous,
/datum/gas/brown_gas = new/datum/tlv/dangerous,
/datum/gas/pluoxium = new/datum/tlv/dangerous
)
/obj/machinery/airalarm/server // No checks here.
TLV = list(
"pressure" = new/datum/tlv(-1, -1, -1, -1),
"temperature" = new/datum/tlv(-1, -1, -1, -1),
/datum/gas/oxygen = new/datum/tlv(-1, -1, -1, -1),
/datum/gas/nitrogen = new/datum/tlv(-1, -1, -1, -1),
/datum/gas/carbon_dioxide = new/datum/tlv(-1, -1, -1, -1),
/datum/gas/plasma = new/datum/tlv(-1, -1, -1, -1),
/datum/gas/nitrous_oxide = new/datum/tlv(-1, -1, -1, -1),
/datum/gas/bz = new/datum/tlv(-1, -1, -1, -1),
/datum/gas/freon = new/datum/tlv(-1, -1, -1, -1),
/datum/gas/water_vapor = new/datum/tlv(-1, -1, -1, -1)
"pressure" = new/datum/tlv/no_checks,
"temperature" = new/datum/tlv/no_checks,
/datum/gas/oxygen = new/datum/tlv/no_checks,
/datum/gas/nitrogen = new/datum/tlv/no_checks,
/datum/gas/carbon_dioxide = new/datum/tlv/no_checks,
/datum/gas/plasma = new/datum/tlv/no_checks,
/datum/gas/nitrous_oxide = new/datum/tlv/no_checks,
/datum/gas/bz = new/datum/tlv/no_checks,
/datum/gas/hypernoblium = new/datum/tlv/no_checks,
/datum/gas/water_vapor = new/datum/tlv/no_checks,
/datum/gas/tritium = new/datum/tlv/no_checks,
/datum/gas/stimulum = new/datum/tlv/no_checks,
/datum/gas/brown_gas = new/datum/tlv/no_checks,
/datum/gas/pluoxium = new/datum/tlv/no_checks
)
/obj/machinery/airalarm/kitchen_cold_room // Copypasta: to check temperatures.
@@ -106,11 +126,15 @@
/datum/gas/oxygen = new/datum/tlv(16, 19, 135, 140), // Partial pressure, kpa
/datum/gas/nitrogen = new/datum/tlv(-1, -1, 1000, 1000), // Partial pressure, kpa
/datum/gas/carbon_dioxide = new/datum/tlv(-1, -1, 5, 10), // Partial pressure, kpa
/datum/gas/plasma = new/datum/tlv(-1, -1, 0.2, 0.5), // Partial pressure, kpa
/datum/gas/nitrous_oxide = new/datum/tlv(-1, -1, 0.2, 0.5), // Partial pressure, kpa
/datum/gas/bz = new/datum/tlv(-1, -1, 0.2, 0.5),
/datum/gas/freon = new/datum/tlv(-1, -1, 0.2, 0.5),
/datum/gas/water_vapor = new/datum/tlv(-1, -1, 0.2, 0.5)
/datum/gas/plasma = new/datum/tlv/dangerous, // Partial pressure, kpa
/datum/gas/nitrous_oxide = new/datum/tlv/dangerous, // Partial pressure, kpa
/datum/gas/bz = new/datum/tlv/dangerous,
/datum/gas/hypernoblium = new/datum/tlv/dangerous,
/datum/gas/water_vapor = new/datum/tlv/dangerous,
/datum/gas/tritium = new/datum/tlv/dangerous,
/datum/gas/stimulum = new/datum/tlv/dangerous,
/datum/gas/brown_gas = new/datum/tlv/dangerous,
/datum/gas/pluoxium = new/datum/tlv/dangerous
)
/obj/machinery/airalarm/engine
@@ -256,8 +280,7 @@
"filter_co2" = info["filter_co2"],
"filter_toxins" = info["filter_toxins"],
"filter_n2o" = info["filter_n2o"],
"filter_bz" = info["filter_bz"],
"filter_freon" = info["filter_freon"],
"filter_rare" = info["filter_rare"],
"filter_water_vapor" = info["filter_water_vapor"]
))
data["mode"] = mode
@@ -314,7 +337,7 @@
if(usr.has_unlimited_silicon_privilege && !wires.is_cut(WIRE_IDSCAN))
locked = !locked
. = TRUE
if("power", "co2_scrub", "tox_scrub", "n2o_scrub", "bz_scrub", "freon_scrub","water_vapor_scrub", "widenet", "scrubbing")
if("power", "co2_scrub", "tox_scrub", "n2o_scrub", "rare_scrub","water_vapor_scrub", "widenet", "scrubbing")
send_signal(device_id, list("[action]" = text2num(params["val"])))
. = TRUE
if("excheck")
@@ -433,8 +456,7 @@
"co2_scrub" = 1,
"tox_scrub" = 0,
"n2o_scrub" = 0,
"bz_scrub" = 0,
"freon_scrub"= 0,
"rare_scrub"= 0,
"water_vapor_scrub"= 0,
"scrubbing" = 1,
"widenet" = 0,
@@ -452,8 +474,7 @@
"co2_scrub" = 1,
"tox_scrub" = 1,
"n2o_scrub" = 1,
"bz_scrub" = 1,
"freon_scrub"= 1,
"rare_scrub"= 1,
"water_vapor_scrub"= 1,
"scrubbing" = 1,
"widenet" = 1,
@@ -484,8 +505,7 @@
"co2_scrub" = 1,
"tox_scrub" = 0,
"n2o_scrub" = 0,
"bz_scrub" = 0,
"freon_scrub"= 0,
"rare_scrub"= 0,
"water_vapor_scrub"= 0,
"scrubbing" = 1,
"widenet" = 0,
@@ -36,6 +36,9 @@ Pipelines + Other Objects -> Pipe network
var/device_type = 0
var/list/obj/machinery/atmospherics/nodes
var/construction_type
var/pipe_state //icon_state as a pipe item
/obj/machinery/atmospherics/examine(mob/user)
..()
if(is_type_in_list(src, GLOB.ventcrawl_machinery) && isliving(user))
@@ -239,7 +242,7 @@ Pipelines + Other Objects -> Pipe network
/obj/machinery/atmospherics/deconstruct(disassembled = TRUE)
if(!(flags_1 & NODECONSTRUCT_1))
if(can_unwrench)
var/obj/item/pipe/stored = new(loc, piping_layer, dir, src)
var/obj/item/pipe/stored = new construction_type(loc, null, dir, src)
stored.setPipingLayer(piping_layer)
if(!disassembled)
stored.obj_integrity = stored.max_integrity * 0.5
@@ -271,7 +274,7 @@ Pipelines + Other Objects -> Pipe network
if(unconnected & direction)
underlays += getpipeimage('icons/obj/atmospherics/components/binary_devices.dmi', "pipe_exposed", direction)
/obj/machinery/atmospherics/on_construction(pipe_type, obj_color, set_layer)
/obj/machinery/atmospherics/on_construction(obj_color, set_layer)
if(can_unwrench)
add_atom_colour(obj_color, FIXED_COLOUR_PRIORITY)
pipe_color = obj_color
@@ -21,6 +21,9 @@ Passive gate is similar to the regular pump except:
var/id = null
var/datum/radio_frequency/radio_connection
construction_type = /obj/item/pipe/directional
pipe_state = "passivegate"
/obj/machinery/atmospherics/components/binary/passive_gate/Destroy()
SSradio.remove_object(src,frequency)
return ..()
@@ -167,4 +170,3 @@ Passive gate is similar to the regular pump except:
if(. && on)
to_chat(user, "<span class='warning'>You cannot unwrench [src], turn it off first!</span>")
return FALSE
@@ -26,6 +26,9 @@ Thus, the two variables affect pump operation are set in New():
var/id = null
var/datum/radio_frequency/radio_connection
construction_type = /obj/item/pipe/directional
pipe_state = "pump"
/obj/machinery/atmospherics/components/binary/pump/on
on = TRUE
@@ -15,6 +15,9 @@ It's like a regular ol' straight pipe, but you can turn it on and off.
var/open = FALSE
var/valve_type = "m" //lets us have a nice, clean, OOP update_icon_nopipes()
construction_type = /obj/item/pipe/binary
pipe_state = "mvalve"
/obj/machinery/atmospherics/components/binary/valve/open
open = TRUE
@@ -65,6 +68,7 @@ It's like a regular ol' straight pipe, but you can turn it on and off.
desc = "A digitally controlled valve."
icon_state = "dvalve_map"
valve_type = "d"
pipe_state = "dvalve"
/obj/machinery/atmospherics/components/binary/valve/digital/attack_ai(mob/user)
return src.attack_hand(user)
@@ -26,6 +26,9 @@ Thus, the two variables affect pump operation are set in New():
var/id = null
var/datum/radio_frequency/radio_connection
construction_type = /obj/item/pipe/directional
pipe_state = "volumepump"
/obj/machinery/atmospherics/components/binary/volume_pump/Destroy()
SSradio.remove_object(src,frequency)
return ..()
@@ -10,6 +10,9 @@
var/frequency = 0
var/datum/radio_frequency/radio_connection
construction_type = /obj/item/pipe/trinary/flippable
pipe_state = "filter"
/obj/machinery/atmospherics/components/trinary/filter/flipped
icon_state = "filter_off_f"
flipped = TRUE
@@ -12,6 +12,9 @@
var/node1_concentration = 0.5
var/node2_concentration = 0.5
construction_type = /obj/item/pipe/trinary/flippable
pipe_state = "mixer"
//node 3 is the outlet, nodes 1 & 2 are intakes
/obj/machinery/atmospherics/components/trinary/mixer/flipped
@@ -171,4 +174,3 @@
if(. && on && is_operational())
to_chat(user, "<span class='warning'>You cannot unwrench [src], turn it off first!</span>")
return FALSE
@@ -12,6 +12,8 @@
var/obj/machinery/atmospherics/components/unary/heat_exchanger/partner = null
var/update_cycle
pipe_state = "heunary"
/obj/machinery/atmospherics/components/unary/heat_exchanger/update_icon()
if(NODE1)
icon_state = "he_intact"
@@ -18,6 +18,8 @@
level = 1
layer = GAS_SCRUBBER_LAYER
pipe_state = "injector"
/obj/machinery/atmospherics/components/unary/outlet_injector/Destroy()
SSradio.remove_object(src,frequency)
return ..()
@@ -188,4 +190,3 @@
if(. && on && is_operational())
to_chat(user, "<span class='warning'>You cannot unwrench [src], turn it off first!</span>")
return FALSE
@@ -9,6 +9,7 @@
level = 0
layer = GAS_FILTER_LAYER
pipe_flags = PIPING_ONE_PER_TURF
pipe_state = "connector"
/obj/machinery/atmospherics/components/unary/portables_connector/New()
..()
@@ -28,9 +28,6 @@
icon_state = "orange"
gas_type = /datum/gas/plasma
/obj/machinery/atmospherics/components/unary/tank/oxygen_agent_b
icon_state = "orange_2"
gas_type = /datum/gas/oxygen_agent_b
/obj/machinery/atmospherics/components/unary/tank/oxygen
icon_state = "blue"
@@ -4,6 +4,7 @@
initialize_directions = SOUTH
device_type = UNARY
pipe_flags = PIPING_ONE_PER_TURF
construction_type = /obj/item/pipe/directional
/obj/machinery/atmospherics/components/unary/SetInitDirections()
initialize_directions = dir
@@ -31,6 +31,8 @@
var/radio_filter_out
var/radio_filter_in
pipe_state = "uvent"
/obj/machinery/atmospherics/components/unary/vent_pump/on
on = TRUE
icon_state = "vent_map_on"
@@ -20,8 +20,7 @@
var/scrub_CO2 = TRUE
var/scrub_Toxins = FALSE
var/scrub_N2O = FALSE
var/scrub_BZ = FALSE
var/scrub_Freon = FALSE
var/scrub_Rare = FALSE
var/scrub_WaterVapor = FALSE
@@ -34,6 +33,8 @@
var/radio_filter_out
var/radio_filter_in
pipe_state = "scrubber"
/obj/machinery/atmospherics/components/unary/vent_scrubber/New()
..()
if(!id_tag)
@@ -70,9 +71,7 @@
amount += idle_power_usage
if(scrub_N2O)
amount += idle_power_usage
if(scrub_BZ)
amount += idle_power_usage
if(scrub_Freon)
if(scrub_Rare)
amount += idle_power_usage
if(scrub_WaterVapor)
amount += idle_power_usage
@@ -125,8 +124,7 @@
"filter_co2" = scrub_CO2,
"filter_toxins" = scrub_Toxins,
"filter_n2o" = scrub_N2O,
"filter_bz" = scrub_BZ,
"filter_freon" = scrub_Freon,
"filter_rare" =scrub_Rare,
"filter_water_vapor" = scrub_WaterVapor,
"sigtype" = "status"
)
@@ -198,37 +196,52 @@
filtered_out.temperature = removed.temperature
if(scrub_Toxins && removed_gases[/datum/gas/plasma])
ADD_GAS(/datum/gas/plasma, filtered_out.gases)
ADD_GAS(/datum/gas/plasma, filtered_gases)
filtered_gases[/datum/gas/plasma][MOLES] = removed_gases[/datum/gas/plasma][MOLES]
removed_gases[/datum/gas/plasma][MOLES] = 0
if(scrub_CO2 && removed_gases[/datum/gas/carbon_dioxide])
ADD_GAS(/datum/gas/carbon_dioxide, filtered_out.gases)
ADD_GAS(/datum/gas/carbon_dioxide, filtered_gases)
filtered_gases[/datum/gas/carbon_dioxide][MOLES] = removed_gases[/datum/gas/carbon_dioxide][MOLES]
removed_gases[/datum/gas/carbon_dioxide][MOLES] = 0
if(removed_gases[/datum/gas/oxygen_agent_b])
ADD_GAS(/datum/gas/oxygen_agent_b, filtered_out.gases)
filtered_gases[/datum/gas/oxygen_agent_b][MOLES] = removed_gases[/datum/gas/oxygen_agent_b][MOLES]
removed_gases[/datum/gas/oxygen_agent_b][MOLES] = 0
if(scrub_N2O && removed_gases[/datum/gas/nitrous_oxide])
ADD_GAS(/datum/gas/nitrous_oxide, filtered_out.gases)
ADD_GAS(/datum/gas/nitrous_oxide, filtered_gases)
filtered_gases[/datum/gas/nitrous_oxide][MOLES] = removed_gases[/datum/gas/nitrous_oxide][MOLES]
removed_gases[/datum/gas/nitrous_oxide][MOLES] = 0
if(scrub_BZ && removed_gases[/datum/gas/bz])
ADD_GAS(/datum/gas/bz, filtered_out.gases)
if(scrub_Rare && removed_gases[/datum/gas/bz])
ADD_GAS(/datum/gas/bz, filtered_gases)
filtered_gases[/datum/gas/bz][MOLES] = removed_gases[/datum/gas/bz][MOLES]
removed_gases[/datum/gas/bz][MOLES] = 0
if(scrub_Freon && removed_gases[/datum/gas/freon])
ADD_GAS(/datum/gas/freon, filtered_out.gases)
filtered_gases[/datum/gas/freon][MOLES] = removed_gases[/datum/gas/freon][MOLES]
removed_gases[/datum/gas/freon][MOLES] = 0
if(scrub_Rare && removed_gases[/datum/gas/hypernoblium])
ADD_GAS(/datum/gas/hypernoblium, filtered_gases)
filtered_gases[/datum/gas/hypernoblium][MOLES] = removed_gases[/datum/gas/hypernoblium][MOLES]
removed_gases[/datum/gas/hypernoblium][MOLES] = 0
if(scrub_Rare && removed_gases[/datum/gas/stimulum])
ADD_GAS(/datum/gas/stimulum, filtered_gases)
filtered_gases[/datum/gas/stimulum][MOLES] = removed_gases[/datum/gas/stimulum][MOLES]
removed_gases[/datum/gas/stimulum][MOLES] = 0
if(scrub_Rare && removed_gases[/datum/gas/pluoxium])
ADD_GAS(/datum/gas/pluoxium, filtered_gases)
filtered_gases[/datum/gas/pluoxium][MOLES] = removed_gases[/datum/gas/pluoxium][MOLES]
removed_gases[/datum/gas/pluoxium][MOLES] = 0
if(scrub_Rare && removed_gases[/datum/gas/brown_gas])
ADD_GAS(/datum/gas/brown_gas, filtered_gases)
filtered_gases[/datum/gas/brown_gas][MOLES] = removed_gases[/datum/gas/brown_gas][MOLES]
removed_gases[/datum/gas/brown_gas][MOLES] = 0
if(scrub_Rare && removed_gases[/datum/gas/tritium])
ADD_GAS(/datum/gas/tritium, filtered_gases)
filtered_gases[/datum/gas/tritium][MOLES] = removed_gases[/datum/gas/tritium][MOLES]
removed_gases[/datum/gas/tritium][MOLES] = 0
if(scrub_WaterVapor && removed_gases[/datum/gas/water_vapor])
ADD_GAS(/datum/gas/water_vapor, filtered_out.gases)
ADD_GAS(/datum/gas/water_vapor, filtered_gases)
filtered_gases[/datum/gas/water_vapor][MOLES] = removed_gases[/datum/gas/water_vapor][MOLES]
removed_gases[/datum/gas/water_vapor][MOLES] = 0
@@ -303,15 +316,10 @@
if("toggle_n2o_scrub" in signal.data)
scrub_N2O = !scrub_N2O
if("bz_scrub" in signal.data)
scrub_BZ = text2num(signal.data["bz_scrub"])
if("toggle_bz_scrub" in signal.data)
scrub_BZ = !scrub_BZ
if("freon_scrub" in signal.data)
scrub_Freon = text2num(signal.data["freon_scrub"])
if("toggle_freon_scrub" in signal.data)
scrub_Freon = !scrub_Freon
if("rare_scrub" in signal.data)
scrub_Rare = text2num(signal.data["rare_scrub"])
if("toggle_rare_scrub" in signal.data)
scrub_Rare = !scrub_Rare
if("water_vapor_scrub" in signal.data)
scrub_WaterVapor = text2num(signal.data["water_vapor_scrub"])
@@ -173,21 +173,6 @@
overlay_color = "#FAFF00"
spawn_id = /datum/gas/bz
/obj/machinery/atmospherics/miner/freon
name = "\improper Freon Gas Miner"
overlay_color = "#00FFE5"
spawn_id = /datum/gas/freon
/obj/machinery/atmospherics/miner/volatile_fuel
name = "\improper Volatile Fuel Gas Miner"
overlay_color = "#564040"
spawn_id = /datum/gas/volatile_fuel
/obj/machinery/atmospherics/miner/agent_b
name = "\improper Agent B Gas Miner"
overlay_color = "#E81E24"
spawn_id = /datum/gas/oxygen_agent_b
/obj/machinery/atmospherics/miner/water_vapor
name = "\improper Water Vapor Gas Miner"
overlay_color = "#99928E"
@@ -13,6 +13,9 @@
initialize_directions_he = SOUTH
device_type = BINARY
construction_type = /obj/item/pipe/directional
pipe_state = "junction"
/obj/machinery/atmospherics/pipe/heat_exchanging/junction/SetInitDirections()
switch(dir)
@@ -43,4 +46,4 @@
return 0
init_dir = H.initialize_directions_he
if(init_dir & get_dir(target,src))
return 1
return 1
@@ -10,6 +10,9 @@
device_type = TRINARY
construction_type = /obj/item/pipe/trinary
pipe_state = "he_manifold"
/obj/machinery/atmospherics/pipe/heat_exchanging/manifold/SetInitDirections()
switch(dir)
if(NORTH)
@@ -44,6 +47,9 @@
device_type = QUATERNARY
construction_type = /obj/item/pipe/quaternary
pipe_state = "he_manifold4w"
/obj/machinery/atmospherics/pipe/heat_exchanging/manifold4w/SetInitDirections()
initialize_directions_he = initial(initialize_directions_he)
@@ -57,4 +63,4 @@
//Add non-broken pieces
for(DEVICE_TYPE_LOOP)
if(NODE_I)
add_overlay(getpipeimage('icons/obj/atmospherics/pipes/heat.dmi', "manifold_intact[invis]", get_dir(src, NODE_I)))
add_overlay(getpipeimage('icons/obj/atmospherics/pipes/heat.dmi', "manifold_intact[invis]", get_dir(src, NODE_I)))
@@ -9,6 +9,9 @@
device_type = BINARY
construction_type = /obj/item/pipe/binary/bendable
pipe_state = "he"
/obj/machinery/atmospherics/pipe/heat_exchanging/simple/SetInitDirections()
if(dir in GLOB.diagonals)
initialize_directions_he = dir
@@ -30,4 +33,4 @@
/obj/machinery/atmospherics/pipe/heat_exchanging/simple/update_icon()
normalize_dir()
..()
..()
@@ -11,6 +11,8 @@
volume = 260
var/list/front_nodes
var/list/back_nodes
construction_type = /obj/item/pipe/binary
pipe_state = "layer_manifold"
/obj/machinery/atmospherics/pipe/layer_manifold/Initialize()
front_nodes = list()
@@ -31,17 +33,7 @@
A.build_network()
/obj/machinery/atmospherics/pipe/layer_manifold/proc/get_all_connected_nodes()
var/list/obj/machinery/atmospherics/all_connected = list()
for(var/obj/machinery/atmospherics/I in front_nodes)
all_connected[I] = I
for(var/obj/machinery/atmospherics/I in back_nodes)
all_connected[I] = I
for(var/obj/machinery/atmospherics/I in nodes)
all_connected[I] = I
var/list/obj/machinery/atmospherics/returnlist = list()
for(var/obj/machinery/atmospherics/A in all_connected)
returnlist += all_connected[A]
return returnlist
return front_nodes + back_nodes + nodes
/obj/machinery/atmospherics/pipe/layer_manifold/update_icon() //HEAVILY WIP FOR UPDATE ICONS!!
layer = (initial(layer) + (PIPING_LAYER_MAX * PIPING_LAYER_LCHANGE)) //This is above everything else.
@@ -13,6 +13,9 @@
device_type = TRINARY
construction_type = /obj/item/pipe/trinary
pipe_state = "manifold"
/obj/machinery/atmospherics/pipe/manifold/SetInitDirections()
switch(dir)
if(NORTH)
@@ -168,4 +171,4 @@
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold/brown/hidden
level = PIPE_HIDDEN_LEVEL
level = PIPE_HIDDEN_LEVEL
@@ -12,6 +12,9 @@
device_type = QUATERNARY
construction_type = /obj/item/pipe/quaternary
pipe_state = "manifold4w"
/obj/machinery/atmospherics/pipe/manifold4w/SetInitDirections()
initialize_directions = initial(initialize_directions)
@@ -160,4 +163,4 @@
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/manifold4w/brown/hidden
level = PIPE_HIDDEN_LEVEL
level = PIPE_HIDDEN_LEVEL
@@ -16,6 +16,9 @@ The regular pipe you see everywhere, including bent ones.
device_type = BINARY
construction_type = /obj/item/pipe/binary/bendable
pipe_state = "simple"
/obj/machinery/atmospherics/pipe/simple/SetInitDirections()
normalize_cardinal_directions()
if(dir in GLOB.diagonals)
@@ -158,4 +161,4 @@ The regular pipe you see everywhere, including bent ones.
layer = GAS_PIPE_VISIBLE_LAYER
/obj/machinery/atmospherics/pipe/simple/brown/hidden
level = PIPE_HIDDEN_LEVEL
level = PIPE_HIDDEN_LEVEL
@@ -43,7 +43,6 @@
"n2o" = /obj/machinery/portable_atmospherics/canister/nitrous_oxide,
"bz" = /obj/machinery/portable_atmospherics/canister/bz,
"air" = /obj/machinery/portable_atmospherics/canister/air,
"freon" = /obj/machinery/portable_atmospherics/canister/freon,
"water vapor" = /obj/machinery/portable_atmospherics/canister/water_vapor,
"caution" = /obj/machinery/portable_atmospherics/canister,
)
@@ -79,11 +78,6 @@
icon_state = "orange"
gas_type = /datum/gas/plasma
/obj/machinery/portable_atmospherics/canister/agent_b
name = "agent b canister"
desc = "Oxygen Agent B. You're not quite sure what it does."
gas_type = /datum/gas/oxygen_agent_b
/obj/machinery/portable_atmospherics/canister/bz
name = "BZ canister"
desc = "BZ, a powerful hallucinogenic nerve agent."
@@ -101,12 +95,30 @@
desc = "Pre-mixed air."
icon_state = "grey"
/obj/machinery/portable_atmospherics/canister/freon
name = "freon canister"
desc = "Freon. Great for the atmosphere!"
icon_state = "freon"
gas_type = /datum/gas/freon
starter_temp = 120
/obj/machinery/portable_atmospherics/canister/tritium
name = "tritium canister"
desc = "Tritium. Inhalation might cause irradiation."
gas_type = /datum/gas/tritium
/obj/machinery/portable_atmospherics/canister/nob
name = "hyper-noblium canister"
desc = "Hyper-Noblium. More noble than all other gases."
gas_type = /datum/gas/hypernoblium
/obj/machinery/portable_atmospherics/canister/browns
name = "brown gas canister"
desc = "Browns gas. Feels great 'til the acid eats your lungs."
gas_type = /datum/gas/brown_gas
/obj/machinery/portable_atmospherics/canister/stimulum
name = "stimulum canister"
desc = "Stimulum. High energy gas, high energy people."
gas_type = /datum/gas/stimulum
/obj/machinery/portable_atmospherics/canister/pluoxium
name = "pluoxium canister"
desc = "Pluoxium. Like oxygen, but more bang for your buck."
gas_type = /datum/gas/pluoxium
/obj/machinery/portable_atmospherics/canister/water_vapor
name = "water vapor canister"
@@ -115,6 +127,7 @@
gas_type = /datum/gas/water_vapor
filled = 1
/obj/machinery/portable_atmospherics/canister/proc/get_time_left()
if(timing)
. = round(max(0, valve_timer - world.time) / 10, 1)
@@ -402,7 +415,7 @@
var/gas = air_contents.gases[id]
if(!gas[GAS_META][META_GAS_DANGER])
continue
if(gas[MOLES] > (gas[GAS_META][META_GAS_MOLES_VISIBLE] || MOLES_PLASMA_VISIBLE)) //if moles_visible is undefined, default to plasma visibility
if(gas[MOLES] > (gas[GAS_META][META_GAS_MOLES_VISIBLE] || MOLES_GAS_VISIBLE)) //if moles_visible is undefined, default to default visibility
danger[gas[GAS_META][META_GAS_NAME]] = gas[MOLES] //ex. "plasma" = 20
if(danger.len)
@@ -7,7 +7,7 @@
var/volume_rate = 1000
volume = 1000
var/list/scrubbing = list(/datum/gas/plasma, /datum/gas/carbon_dioxide, /datum/gas/nitrous_oxide, /datum/gas/oxygen_agent_b, /datum/gas/bz, /datum/gas/freon, /datum/gas/water_vapor)
var/list/scrubbing = list(/datum/gas/plasma, /datum/gas/carbon_dioxide, /datum/gas/nitrous_oxide, /datum/gas/bz, /datum/gas/brown_gas, /datum/gas/tritium, /datum/gas/hypernoblium, /datum/gas/water_vapor)
/obj/machinery/portable_atmospherics/scrubber/Destroy()
var/turf/T = get_turf(src)
+18
View File
@@ -130,6 +130,10 @@
var/backpack_contents = -1
var/suit_store = -1
var/hair_style
var/facial_hair_style
var/skin_tone
/obj/effect/mob_spawn/human/Initialize()
if(ispath(outfit))
outfit = new outfit()
@@ -147,6 +151,20 @@
H.underwear = "Nude"
H.undershirt = "Nude"
H.socks = "Nude"
if(hair_style)
H.hair_style = hair_style
else
H.hair_style = random_hair_style(gender)
if(facial_hair_style)
H.facial_hair_style = facial_hair_style
else
H.facial_hair_style = random_facial_hair_style(gender)
if(skin_tone)
H.skin_tone = skin_tone
else
H.skin_tone = random_skin_tone()
H.update_hair()
H.update_body()
if(outfit)
var/static/list/slots = list("uniform", "r_hand", "l_hand", "suit", "shoes", "gloves", "ears", "glasses", "mask", "head", "belt", "r_pocket", "l_pocket", "back", "id", "neck", "backpack_contents", "suit_store")
for(var/slot in slots)
-17
View File
@@ -937,23 +937,6 @@
crate_type = /obj/structure/closet/crate/secure/science
dangerous = TRUE
/datum/supply_pack/science/bz_canister
name = "BZ Canister"
cost = 2000
access_any = list(ACCESS_RD, ACCESS_ATMOSPHERICS)
contains = list(/obj/machinery/portable_atmospherics/canister/bz)
crate_name = "bz canister crate"
crate_type = /obj/structure/closet/crate/secure/science
dangerous = TRUE
/datum/supply_pack/science/freon_canister
name = "Freon Canister"
cost = 6000
access_any = list(ACCESS_RD, ACCESS_ATMOSPHERICS)
contains = list(/obj/machinery/portable_atmospherics/canister/freon)
crate_name = "freon canister crate"
crate_type = /obj/structure/closet/crate/secure/science
dangerous = TRUE
/datum/supply_pack/science/research
name = "Machine Prototype Crate"
+100 -110
View File
@@ -45,7 +45,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
var/allow_midround_antag = 1
var/preferred_map = null
var/pda_style = MONO
var/uses_glasses_colour = 0
var/screenshake = 100
@@ -228,7 +228,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "<HR>"
switch(current_tab)
if (0) // Character Settings#
if (0) // Character Settings
if(path)
var/savefile/S = new /savefile(path)
if(S)
@@ -279,17 +279,6 @@ GLOBAL_LIST_EMPTY(preferences_datums)
// dat += "<b>Size:</b> <a href='?_src_=prefs;preference=character_size;task=input'>[character_size]</a><BR>"
dat += "<br>"
dat += "<h2>Body</h2>"
dat += "<a href='?_src_=prefs;preference=all;task=random'>Random Body</A> "
dat += "<a href='?_src_=prefs;preference=all'>Always Random Body: [be_random_body ? "Yes" : "No"]</A><br>"
dat += "<table width='100%'><tr><td width='24%' valign='top'>"
if(CONFIG_GET(flag/join_with_mutant_race))
dat += "<b>Species:</b><BR><a href='?_src_=prefs;preference=species;task=input'>[pref_species.name]</a><BR>"
else
dat += "<b>Species:</b> Human<BR>"
dat += "<b>Underwear:</b><BR><a href ='?_src_=prefs;preference=underwear;task=input'>[underwear]</a><BR>"
dat += "<b>Undershirt:</b><BR><a href ='?_src_=prefs;preference=undershirt;task=input'>[undershirt]</a><BR>"
dat += "<b>Socks:</b><BR><a href ='?_src_=prefs;preference=socks;task=input'>[socks]</a><BR>"
@@ -337,79 +326,79 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "</td>"
if(CONFIG_GET(flag/join_with_mutant_race)) //We don't allow mutant bodyparts for humans either unless this is true.
if((MUTCOLORS in pref_species.species_traits) || (MUTCOLORS_PARTSONLY in pref_species.species_traits))
if((MUTCOLORS in pref_species.species_traits) || (MUTCOLORS_PARTSONLY in pref_species.species_traits))
dat += "<td valign='top' width='14%'>"
dat += "<td valign='top' width='14%'>"
dat += "<h3>Mutant Color</h3>"
dat += "<h3>Mutant Color</h3>"
dat += "<span style='border: 1px solid #161616; background-color: #[features["mcolor"]];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=mutant_color;task=input'>Change</a><BR>"
dat += "<span style='border: 1px solid #161616; background-color: #[features["mcolor"]];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=mutant_color;task=input'>Change</a><BR>"
dat += "</td>"
dat += "</td>"
if("tail_lizard" in pref_species.mutant_bodyparts)
dat += "<td valign='top' width='7%'>"
if("tail_lizard" in pref_species.mutant_bodyparts)
dat += "<td valign='top' width='7%'>"
dat += "<h3>Tail</h3>"
dat += "<h3>Tail</h3>"
dat += "<a href='?_src_=prefs;preference=tail_lizard;task=input'>[features["tail_lizard"]]</a><BR>"
dat += "<a href='?_src_=prefs;preference=tail_lizard;task=input'>[features["tail_lizard"]]</a><BR>"
dat += "</td>"
dat += "</td>"
if("snout" in pref_species.mutant_bodyparts)
dat += "<td valign='top' width='7%'>"
if("snout" in pref_species.mutant_bodyparts)
dat += "<td valign='top' width='7%'>"
dat += "<h3>Snout</h3>"
dat += "<h3>Snout</h3>"
dat += "<a href='?_src_=prefs;preference=snout;task=input'>[features["snout"]]</a><BR>"
dat += "<a href='?_src_=prefs;preference=snout;task=input'>[features["snout"]]</a><BR>"
dat += "</td>"
dat += "</td>"
if("horns" in pref_species.mutant_bodyparts)
dat += "<td valign='top' width='7%'>"
if("horns" in pref_species.mutant_bodyparts)
dat += "<td valign='top' width='7%'>"
dat += "<h3>Horns</h3>"
dat += "<h3>Horns</h3>"
dat += "<a href='?_src_=prefs;preference=horns;task=input'>[features["horns"]]</a><BR>"
dat += "<a href='?_src_=prefs;preference=horns;task=input'>[features["horns"]]</a><BR>"
dat += "</td>"
dat += "</td>"
if("frills" in pref_species.mutant_bodyparts)
dat += "<td valign='top' width='7%'>"
if("frills" in pref_species.mutant_bodyparts)
dat += "<td valign='top' width='7%'>"
dat += "<h3>Frills</h3>"
dat += "<h3>Frills</h3>"
dat += "<a href='?_src_=prefs;preference=frills;task=input'>[features["frills"]]</a><BR>"
dat += "<a href='?_src_=prefs;preference=frills;task=input'>[features["frills"]]</a><BR>"
dat += "</td>"
dat += "</td>"
if("spines" in pref_species.mutant_bodyparts)
dat += "<td valign='top' width='7%'>"
if("spines" in pref_species.mutant_bodyparts)
dat += "<td valign='top' width='7%'>"
dat += "<h3>Spines</h3>"
dat += "<h3>Spines</h3>"
dat += "<a href='?_src_=prefs;preference=spines;task=input'>[features["spines"]]</a><BR>"
dat += "<a href='?_src_=prefs;preference=spines;task=input'>[features["spines"]]</a><BR>"
dat += "</td>"
dat += "</td>"
if("body_markings" in pref_species.mutant_bodyparts)
dat += "<td valign='top' width='7%'>"
if("body_markings" in pref_species.mutant_bodyparts)
dat += "<td valign='top' width='7%'>"
dat += "<h3>Body Markings</h3>"
dat += "<h3>Body Markings</h3>"
dat += "<a href='?_src_=prefs;preference=body_markings;task=input'>[features["body_markings"]]</a><BR>"
dat += "<a href='?_src_=prefs;preference=body_markings;task=input'>[features["body_markings"]]</a><BR>"
dat += "</td>"
if("legs" in pref_species.mutant_bodyparts)
dat += "<td valign='top' width='7%'>"
dat += "</td>"
if("legs" in pref_species.mutant_bodyparts)
dat += "<td valign='top' width='7%'>"
dat += "<h3>Legs</h3>"
dat += "<h3>Legs</h3>"
dat += "<a href='?_src_=prefs;preference=legs;task=input'>[features["legs"]]</a><BR>"
dat += "<a href='?_src_=prefs;preference=legs;task=input'>[features["legs"]]</a><BR>"
dat += "</td>"
dat += "</td>"
if(CONFIG_GET(flag/join_with_mutant_humans))
if("tail_human" in pref_species.mutant_bodyparts)
@@ -574,61 +563,60 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "[features["flavor_text"]]"
else
dat += "[TextPreview(features["flavor_text"])]...<BR>"
if(CONFIG_GET(flag/join_with_mutant_race))//really don't need this check, but fuck un-tabbing all those lines
dat += "<h2>Body</h2>"
dat += "<b>Gender:</b> <a href='?_src_=prefs;preference=gender'>[gender == MALE ? "Male" : "Female"]</a><BR>"
dat += "<b>Species:</b><a href='?_src_=prefs;preference=species;task=input'>[pref_species.id]</a><BR>"
dat += "<a href='?_src_=prefs;preference=all;task=random'>Random Body</A><BR>"
dat += "<a href='?_src_=prefs;preference=all'>Always Random Body: [be_random_body ? "Yes" : "No"]</A><BR>"
if((MUTCOLORS in pref_species.species_traits) || (MUTCOLORS_PARTSONLY in pref_species.species_traits))
dat += "<b>Primary Color: </b><span style='border: 1px solid #161616; background-color: #[features["mcolor"]];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=mutant_color;task=input'>Change</a><BR>"
dat += "<b>Secondary Color: </b><span style='border: 1px solid #161616; background-color: #[features["mcolor2"]];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=mutant_color2;task=input'>Change</a><BR>"
dat += "<b>Tertiary Color: </b><span style='border: 1px solid #161616; background-color: #[features["mcolor3"]];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=mutant_color3;task=input'>Change</a><BR>"
if(pref_species.use_skintones)
dat += "<b>Skin Tone: </b><a href='?_src_=prefs;preference=s_tone;task=input'>[skin_tone]</a><BR>"
dat += "<b>Genitals Use Skintone:</b><a href='?_src_=prefs;preference=genital_colour'>[features["genitals_use_skintone"] == TRUE ? "Enabled" : "Disabled"]</a><BR>"
dat += "<h2>Body</h2>"
dat += "<b>Gender:</b> <a href='?_src_=prefs;preference=gender'>[gender == MALE ? "Male" : "Female"]</a><BR>"
dat += "<b>Species:</b><a href='?_src_=prefs;preference=species;task=input'>[pref_species.id]</a><BR>"
dat += "<a href='?_src_=prefs;preference=all;task=random'>Random Body</A><BR>"
dat += "<a href='?_src_=prefs;preference=all'>Always Random Body: [be_random_body ? "Yes" : "No"]</A><BR>"
if((MUTCOLORS in pref_species.species_traits) || (MUTCOLORS_PARTSONLY in pref_species.species_traits))
dat += "<b>Primary Color: </b><span style='border: 1px solid #161616; background-color: #[features["mcolor"]];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=mutant_color;task=input'>Change</a><BR>"
dat += "<b>Secondary Color: </b><span style='border: 1px solid #161616; background-color: #[features["mcolor2"]];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=mutant_color2;task=input'>Change</a><BR>"
dat += "<b>Tertiary Color: </b><span style='border: 1px solid #161616; background-color: #[features["mcolor3"]];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=mutant_color3;task=input'>Change</a><BR>"
if(pref_species.use_skintones)
dat += "<b>Skin Tone: </b><a href='?_src_=prefs;preference=s_tone;task=input'>[skin_tone]</a><BR>"
dat += "<b>Genitals Use Skintone:</b><a href='?_src_=prefs;preference=genital_colour'>[features["genitals_use_skintone"] == TRUE ? "Enabled" : "Disabled"]</a><BR>"
if(HAIR in pref_species.species_traits)
dat += "<b>Hair Style: </b><a href='?_src_=prefs;preference=hair_style;task=input'>[hair_style]</a><BR>"
dat += "<b>Hair Color: </b><span style='border:1px solid #161616; background-color: #[hair_color];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=hair;task=input'>Change</a><BR>"
dat += "<b>Facial Hair Style: </b><a href='?_src_=prefs;preference=facial_hair_style;task=input'>[facial_hair_style]</a><BR>"
dat += "<b>Facial Hair Color: </b><span style='border: 1px solid #161616; background-color: #[facial_hair_color];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=facial;task=input'>Change</a><BR>"
if(EYECOLOR in pref_species.species_traits)
dat += "<b>Eye Color: </b><span style='border: 1px solid #161616; background-color: #[eye_color];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=eyes;task=input'>Change</a><BR>"
if("tail_lizard" in pref_species.mutant_bodyparts)
dat += "<b>Tail: </b><a href='?_src_=prefs;preference=tail_lizard;task=input'>[features["tail_lizard"]]</a><BR>"
else if("mam_tail" in pref_species.mutant_bodyparts)
dat += "<b>Tail: </b><a href='?_src_=prefs;preference=mam_tail;task=input'>[features["mam_tail"]]</a><BR>"
else if("tail_human" in pref_species.mutant_bodyparts)
dat += "<b>Tail: </b><a href='?_src_=prefs;preference=tail_human;task=input'>[features["tail_human"]]</a><BR>"
if("snout" in pref_species.mutant_bodyparts)
dat += "<b>Snout: </b><a href='?_src_=prefs;preference=snout;task=input'>[features["snout"]]</a><BR>"
if("horns" in pref_species.mutant_bodyparts)
dat += "<b>Snout: </b><a href='?_src_=prefs;preference=horns;task=input'>[features["horns"]]</a><BR>"
if("frills" in pref_species.mutant_bodyparts)
dat += "<b>Frills: </b><a href='?_src_=prefs;preference=frills;task=input'>[features["frills"]]</a><BR>"
if("spines" in pref_species.mutant_bodyparts)
dat += "<b>Spines: </b><a href='?_src_=prefs;preference=spines;task=input'>[features["spines"]]</a><BR>"
if("body_markings" in pref_species.mutant_bodyparts)
dat += "<b>Body Markings: </b><a href='?_src_=prefs;preference=body_markings;task=input'>[features["body_markings"]]</a><BR>"
else if("mam_body_markings" in pref_species.mutant_bodyparts)
dat += "<b>Body Markings: </b><a href='?_src_=prefs;preference=mam_body_markings;task=input'>[features["mam_body_markings"]]</a><BR>"
if("mam_ears" in pref_species.mutant_bodyparts)
dat += "<b>Ears: </b><a href='?_src_=prefs;preference=mam_ears;task=input'>[features["mam_ears"]]</a><BR>"
else if("ears" in pref_species.mutant_bodyparts)
dat += "<b>Ears: </b><a href='?_src_=prefs;preference=ears;task=input'>[features["ears"]]</a><BR>"
if("legs" in pref_species.mutant_bodyparts)
dat += "<b>Legs: </b><a href='?_src_=prefs;preference=legs;task=input'>[features["legs"]]</a><BR>"
if("taur" in pref_species.mutant_bodyparts)
dat += "<b>Taur: </b><a href='?_src_=prefs;preference=taur;task=input'>[features["taur"]]</a><BR>"
if("wings" in pref_species.mutant_bodyparts && GLOB.r_wings_list.len >1)
dat += "<b>Wings: </b><a href='?_src_=prefs;preference=wings;task=input'>[features["wings"]]</a><BR>"
if("xenohead" in pref_species.mutant_bodyparts)
dat += "<b>Caste: </b><a href='?_src_=prefs;preference=xenohead;task=input'>[features["xenohead"]]</a><BR>"
if("xenotail" in pref_species.mutant_bodyparts)
dat += "<b>Tail: </b><a href='?_src_=prefs;preference=xenotail;task=input'>[features["xenotail"]]</a><BR>"
if("xenodorsal" in pref_species.mutant_bodyparts)
dat += "<b>Dorsal Tubes: </b><a href='?_src_=prefs;preference=xenodorsal;task=input'>[features["xenodorsal"]]</a><BR>"
if(HAIR in pref_species.species_traits)
dat += "<b>Hair Style: </b><a href='?_src_=prefs;preference=hair_style;task=input'>[hair_style]</a><BR>"
dat += "<b>Hair Color: </b><span style='border:1px solid #161616; background-color: #[hair_color];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=hair;task=input'>Change</a><BR>"
dat += "<b>Facial Hair Style: </b><a href='?_src_=prefs;preference=facial_hair_style;task=input'>[facial_hair_style]</a><BR>"
dat += "<b>Facial Hair Color: </b><span style='border: 1px solid #161616; background-color: #[facial_hair_color];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=facial;task=input'>Change</a><BR>"
if(EYECOLOR in pref_species.species_traits)
dat += "<b>Eye Color: </b><span style='border: 1px solid #161616; background-color: #[eye_color];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=eyes;task=input'>Change</a><BR>"
if("tail_lizard" in pref_species.mutant_bodyparts)
dat += "<b>Tail: </b><a href='?_src_=prefs;preference=tail_lizard;task=input'>[features["tail_lizard"]]</a><BR>"
else if("mam_tail" in pref_species.mutant_bodyparts)
dat += "<b>Tail: </b><a href='?_src_=prefs;preference=mam_tail;task=input'>[features["mam_tail"]]</a><BR>"
else if("tail_human" in pref_species.mutant_bodyparts)
dat += "<b>Tail: </b><a href='?_src_=prefs;preference=tail_human;task=input'>[features["tail_human"]]</a><BR>"
if("snout" in pref_species.mutant_bodyparts)
dat += "<b>Snout: </b><a href='?_src_=prefs;preference=snout;task=input'>[features["snout"]]</a><BR>"
if("horns" in pref_species.mutant_bodyparts)
dat += "<b>Snout: </b><a href='?_src_=prefs;preference=horns;task=input'>[features["horns"]]</a><BR>"
if("frills" in pref_species.mutant_bodyparts)
dat += "<b>Frills: </b><a href='?_src_=prefs;preference=frills;task=input'>[features["frills"]]</a><BR>"
if("spines" in pref_species.mutant_bodyparts)
dat += "<b>Spines: </b><a href='?_src_=prefs;preference=spines;task=input'>[features["spines"]]</a><BR>"
if("body_markings" in pref_species.mutant_bodyparts)
dat += "<b>Body Markings: </b><a href='?_src_=prefs;preference=body_markings;task=input'>[features["body_markings"]]</a><BR>"
else if("mam_body_markings" in pref_species.mutant_bodyparts)
dat += "<b>Body Markings: </b><a href='?_src_=prefs;preference=mam_body_markings;task=input'>[features["mam_body_markings"]]</a><BR>"
if("mam_ears" in pref_species.mutant_bodyparts)
dat += "<b>Ears: </b><a href='?_src_=prefs;preference=mam_ears;task=input'>[features["mam_ears"]]</a><BR>"
else if("ears" in pref_species.mutant_bodyparts)
dat += "<b>Ears: </b><a href='?_src_=prefs;preference=ears;task=input'>[features["ears"]]</a><BR>"
if("legs" in pref_species.mutant_bodyparts)
dat += "<b>Legs: </b><a href='?_src_=prefs;preference=legs;task=input'>[features["legs"]]</a><BR>"
if("taur" in pref_species.mutant_bodyparts)
dat += "<b>Taur: </b><a href='?_src_=prefs;preference=taur;task=input'>[features["taur"]]</a><BR>"
if("wings" in pref_species.mutant_bodyparts && GLOB.r_wings_list.len >1)
dat += "<b>Wings: </b><a href='?_src_=prefs;preference=wings;task=input'>[features["wings"]]</a><BR>"
if("xenohead" in pref_species.mutant_bodyparts)
dat += "<b>Caste: </b><a href='?_src_=prefs;preference=xenohead;task=input'>[features["xenohead"]]</a><BR>"
if("xenotail" in pref_species.mutant_bodyparts)
dat += "<b>Tail: </b><a href='?_src_=prefs;preference=xenotail;task=input'>[features["xenotail"]]</a><BR>"
if("xenodorsal" in pref_species.mutant_bodyparts)
dat += "<b>Dorsal Tubes: </b><a href='?_src_=prefs;preference=xenodorsal;task=input'>[features["xenodorsal"]]</a><BR>"
dat += "</td><td width='300px' height='300px' valign='top'>"
@@ -1188,7 +1176,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if("species")
var/result = input(user, "Select a species", "Species Selection") as null|anything in CONFIG_GET(keyed_flag_list/roundstart_races)
var/result = input(user, "Select a species", "Species Selection") as null|anything in GLOB.roundstart_races
if(result)
var/newtype = GLOB.species_list[result]
@@ -1826,10 +1814,12 @@ GLOBAL_LIST_EMPTY(preferences_datums)
character.dna.features = features.Copy() //Flavor text is now a DNA feature
character.dna.real_name = character.real_name
var/datum/species/chosen_species
if(pref_species != /datum/species/human && CONFIG_GET(flag/join_with_mutant_race))
if(pref_species.id in GLOB.roundstart_races)
chosen_species = pref_species.type
else
chosen_species = /datum/species/human
pref_species = new /datum/species/human
save_character()
character.set_species(chosen_species, icon_update=0)
//citadel code
+1 -6
View File
@@ -294,14 +294,9 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
//Species
var/species_id
S["species"] >> species_id
var/list/roundstart_races = CONFIG_GET(keyed_flag_list/roundstart_races)
if(species_id && (species_id in roundstart_races) && CONFIG_GET(flag/join_with_mutant_race))
if(species_id)
var/newtype = GLOB.species_list[species_id]
pref_species = new newtype()
else if (roundstart_races.len)
var/rando_race = pick(roundstart_races)
if (rando_race)
pref_species = new rando_race()
if(!S["features["mcolor"]"] || S["features["mcolor"]"] == "#000")
WRITE_FILE(S["features["mcolor"]"] , "#FFF")
+7 -7
View File
@@ -4,12 +4,12 @@
set category = "OOC"
if(GLOB.say_disabled) //This is here to try to identify lag problems
usr << "<span class='danger'> Speech is currently admin-disabled.</span>"
to_chat(usr, "<span class='danger'> Speech is currently admin-disabled.</span>")
return
if(!mob) return
if(IsGuestKey(key))
src << "Guests may not use OOC."
to_chat(src, "Guests may not use OOC.")
return
msg = copytext(sanitize(msg), 1, MAX_MESSAGE_LEN)
@@ -17,23 +17,23 @@
return
if(!(prefs.toggles & CHAT_OOC))
src << "<span class='danger'> You have OOC muted.</span>"
to_chat(src, "<span class='danger'> You have OOC muted.</span>")
return
if(!holder)
if(!GLOB.ooc_allowed)
src << "<span class='danger'> OOC is globally muted</span>"
to_chat(src, "<span class='danger'> OOC is globally muted</span>")
return
if(!GLOB.dooc_allowed && (mob.stat == DEAD))
usr << "<span class='danger'> OOC for dead mobs has been turned off.</span>"
to_chat(usr, "<span class='danger'> OOC for dead mobs has been turned off.</span>")
return
if(prefs.muted & MUTE_OOC)
src << "<span class='danger'> You cannot use OOC (muted).</span>"
to_chat(src, "<span class='danger'> You cannot use OOC (muted).</span>")
return
if(handle_spam_prevention(msg,MUTE_OOC))
return
if(findtext(msg, "byond://"))
src << "<B>Advertising other servers is not allowed.</B>"
to_chat(src, "<B>Advertising other servers is not allowed.</B>")
log_admin("[key_name(src)] has attempted to advertise in LOOC: [msg]")
return
+3 -3
View File
@@ -59,8 +59,8 @@
var/heart_strength = "<span class='danger'>no</span>"
var/lung_strength = "<span class='danger'>no</span>"
var/obj/item/organ/heart/heart = M.getorganslot("heart")
var/obj/item/organ/lungs/lungs = M.getorganslot("lungs")
var/obj/item/organ/heart/heart = M.getorganslot(ORGAN_SLOT_HEART)
var/obj/item/organ/lungs/lungs = M.getorganslot(ORGAN_SLOT_LUNGS)
if(!(M.stat == DEAD || (M.status_flags&FAKEDEATH)))
if(heart && istype(heart))
@@ -179,4 +179,4 @@
desc = "Damn, it feels good to be a gangster."
icon = 'icons/obj/clothing/neck.dmi'
icon_state = "bling"
item_color = "bling"
item_color = "bling"
+34 -3
View File
@@ -13,6 +13,20 @@
item_color = "engineering" //Determines used sprites: hardsuit[on]-[color] and hardsuit[on]-[color]2 (lying down sprite)
actions_types = list(/datum/action/item_action/toggle_helmet_light)
var/rad_count = 0
var/rad_record = 0
var/grace_count = 0
var/datum/looping_sound/geiger/soundloop
/obj/item/clothing/head/helmet/space/hardsuit/Initialize()
. = ..()
soundloop = new(list(), FALSE, TRUE)
soundloop.volume = 5
START_PROCESSING(SSobj, src)
/obj/item/clothing/head/helmet/space/hardsuit/Destroy()
. = ..()
STOP_PROCESSING(SSobj, src)
/obj/item/clothing/head/helmet/space/hardsuit/attack_self(mob/user)
on = !on
@@ -31,6 +45,7 @@
..()
if(suit)
suit.RemoveHelmet()
soundloop.stop(user)
/obj/item/clothing/head/helmet/space/hardsuit/item_action_slot_check(slot)
if(slot == slot_head)
@@ -41,8 +56,11 @@
if(slot != slot_head)
if(suit)
suit.RemoveHelmet()
soundloop.stop(user)
else
qdel(src)
else
soundloop.start(user)
/obj/item/clothing/head/helmet/space/hardsuit/proc/display_visor_message(var/msg)
var/mob/wearer = loc
@@ -50,9 +68,22 @@
wearer.show_message("[icon2html(src, wearer)]<b><span class='robot'>[msg]</span></b>", 1)
/obj/item/clothing/head/helmet/space/hardsuit/rad_act(severity)
..()
if(severity > RAD_AMOUNT_EXTREME)
display_visor_message("Radiation pulse detected! Magnitude: <span class='green'>[severity]</span> RADs.")
. = ..()
rad_count += severity
/obj/item/clothing/head/helmet/space/hardsuit/process()
if(!rad_count)
grace_count++
if(grace_count == 2)
soundloop.last_radiation = 0
return
grace_count = 0
rad_record -= rad_record/5
rad_record += rad_count/5
rad_count = 0
soundloop.last_radiation = rad_record
/obj/item/clothing/head/helmet/space/hardsuit/emp_act(severity)
..()
+3 -2
View File
@@ -112,8 +112,9 @@
item_state = "bombsuit_white"
/*
* Radiation protection
*/
* Radiation protection
*/
/obj/item/clothing/head/radiation
name = "radiation hood"
icon_state = "rad"
+1 -1
View File
@@ -40,7 +40,7 @@
/datum/round_event_control/proc/canSpawnEvent(var/players_amt, var/gamemode)
if(occurrences >= max_occurrences)
return FALSE
if(earliest_start >= world.time)
if(earliest_start >= world.time-SSticker.round_start_time)
return FALSE
if(wizardevent != SSevents.wizardmode)
return FALSE
+2 -78
View File
@@ -10,12 +10,8 @@
..()
for(var/mob/living/carbon/human/H in GLOB.mob_list)
var/obj/item/storage/backpack/b = locate() in H.contents
new /obj/item/storage/spooky(b)
if(ishuman(H) || islizard(H))
if(prob(50))
H.set_species(/datum/species/skeleton)
else
H.set_species(/datum/species/zombie)
if(b)
new /obj/item/storage/spooky(b)
for(var/mob/living/simple_animal/pet/dog/corgi/Ian/Ian in GLOB.mob_list)
Ian.place_on_head(new /obj/item/bedsheet(Ian))
@@ -26,77 +22,6 @@
/datum/round_event/spooky/announce()
priority_announce(pick("RATTLE ME BONES!","THE RIDE NEVER ENDS!", "A SKELETON POPS OUT!", "SPOOKY SCARY SKELETONS!", "CREWMEMBERS BEWARE, YOU'RE IN FOR A SCARE!") , "THE CALL IS COMING FROM INSIDE THE HOUSE")
//Eyeball migration
/datum/round_event_control/carp_migration/eyeballs
name = "Eyeball Migration"
typepath = /datum/round_event/carp_migration/eyeballs
holidayID = HALLOWEEN
weight = 25
earliest_start = 0
/datum/round_event/carp_migration/eyeballs/start()
for(var/obj/effect/landmark/carpspawn/C in GLOB.landmarks_list)
new /mob/living/simple_animal/hostile/carp/eyeball(C.loc)
//Pumpking meteors waves
/datum/round_event_control/meteor_wave/spooky
name = "Pumpkin Wave"
typepath = /datum/round_event/meteor_wave/spooky
holidayID = HALLOWEEN
weight = 20
max_occurrences = 2
/datum/round_event/meteor_wave/spooky
endWhen = 40
/datum/round_event/meteor_wave/spooky/tick()
if(IsMultiple(activeFor, 4))
spawn_meteors(3, GLOB.meteorsSPOOKY) //meteor list types defined in gamemode/meteor/meteors.dm
//Creepy clown invasion
/datum/round_event_control/creepy_clowns
name = "Clowns"
typepath = /datum/round_event/creepy_clowns
holidayID = HALLOWEEN
weight = 20
earliest_start = 0
/datum/round_event/creepy_clowns
endWhen = 40
/datum/round_event/creepy_clowns/start()
for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
if(!H.client || !istype(H))
return
to_chat(H, "<span class='danger'>Honk...</span>")
SEND_SOUND(H, sound('sound/spookoween/scary_clown_appear.ogg'))
var/turf/T = get_turf(H)
if(T)
new /obj/effect/hallucination/simple/clown(T, H, 50)
/datum/round_event/creepy_clowns/tick()
if(IsMultiple(activeFor, 4))
for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
if (prob(66))
playsound(H.loc, pick('sound/spookoween/scary_horn.ogg','sound/spookoween/scary_horn2.ogg', 'sound/spookoween/scary_horn3.ogg'), 100, 1)
if (prob(33))
var/turf/T = get_turf(H)
if(T)
new /obj/effect/hallucination/simple/clown(T, H, 25)
else if (prob(25))
var/turf/T = get_turf(H)
if(T)
new /obj/effect/hallucination/simple/clown/scary(T, H, 25)
else if (prob(5))
var/turf/T = get_turf(H)
if(T)
spawn_atom_to_turf(/obj/effect/mob_spawn/human/clown/corpse, H, 1)
else if (prob(1))
spawn_atom_to_turf(/mob/living/simple_animal/hostile/retaliate/clown, H, 1)
/datum/round_event/creepy_clowns/announce()
priority_announce("Honk... Honk... honk... HONK! HONK! HONKHONKHONKHONKHONK", "HONK!", 'sound/spookoween/scary_horn.ogg')
//spooky foods (you can't actually make these when it's not halloween)
/obj/item/reagent_containers/food/snacks/sugarcookie/spookyskull
name = "skull cookie"
@@ -110,7 +35,6 @@
icon = 'icons/obj/halloween_items.dmi'
icon_state = "coffincookie"
//spooky items
/obj/item/storage/spooky
+13 -5
View File
@@ -124,7 +124,14 @@
"You're the vomit to my flyperson.",
"You must be liquid dark matter, because you're pulling me closer.",
"Not even sorium can drive me away from you.",
"Wanna make like a borg and do some heavy petting?" )
"Wanna make like a borg and do some heavy petting?",
"Are you powering the station? Because you super matter to me.",
"I wish science could make me a bag of holding you.",
"Let's call the emergency CUDDLE.",
"I must be tripping on BZ, because I saw an angel walk by.",
"Wanna empty out my tool storage?",
"Did you visit the medbay after you fell from heaven?",
"Are you wearing space pants? Wanna not be?" )
/obj/item/valentine/attackby(obj/item/W, mob/user, params)
..()
@@ -174,8 +181,9 @@
"A heart-shaped candy that reads: WAG MY TAIL",
"A heart-shaped candy that reads: VALIDTINES",
"A heart-shaped candy that reads: FACEHUGGER",
"A heart-shaped candy that reads: DOMINATOR",
"A heart-shaped candy that reads: GET TESLA'D",
"A heart-shaped candy that reads: COCK CULT",
"A heart-shaped candy that reads: PET ME")
"A heart-shaped candy that reads: BOX OF HUGS",
"A heart-shaped candy that reads: REEBE MINE",
"A heart-shaped candy that reads: PET ME",
"A heart-shaped candy that reads: TO THE DORMS",
"A heart-shaped candy that reads: DIS MEMBER")
icon_state = pick("candyheart", "candyheart2", "candyheart3", "candyheart4")
+72 -68
View File
@@ -1,68 +1,72 @@
// Normal strength
/datum/round_event_control/meteor_wave
name = "Meteor Wave: Normal"
typepath = /datum/round_event/meteor_wave
weight = 4
min_players = 5
max_occurrences = 3
/datum/round_event/meteor_wave
startWhen = 6
endWhen = 66
announceWhen = 1
var/list/wave_type
var/wave_name = "normal"
/datum/round_event/meteor_wave/New()
..()
if(!wave_type)
determine_wave_type()
/datum/round_event/meteor_wave/proc/determine_wave_type()
if(!wave_name)
wave_name = pickweight(list(
"normal" = 50,
"threatening" = 40,
"catastrophic" = 10))
switch(wave_name)
if("normal")
wave_type = GLOB.meteors_normal
if("threatening")
wave_type = GLOB.meteors_threatening
if("catastrophic")
wave_type = GLOB.meteors_catastrophic
if("meaty")
wave_type = GLOB.meteorsB
if("space dust")
wave_type = GLOB.meteorsC
else
WARNING("Wave name of [wave_name] not recognised.")
kill()
/datum/round_event/meteor_wave/announce()
priority_announce("Meteors have been detected on collision course with the station.", "Meteor Alert", 'sound/ai/meteors.ogg')
/datum/round_event/meteor_wave/tick()
if(IsMultiple(activeFor, 3))
spawn_meteors(5, wave_type) //meteor list types defined in gamemode/meteor/meteors.dm
/datum/round_event_control/meteor_wave/threatening
name = "Meteor Wave: Threatening"
typepath = /datum/round_event/meteor_wave/threatening
weight = 2
min_players = 5
max_occurrences = 3
/datum/round_event/meteor_wave/threatening
wave_name = "threatening"
/datum/round_event_control/meteor_wave/catastrophic
name = "Meteor Wave: Catastrophic"
typepath = /datum/round_event/meteor_wave/catastrophic
weight = 1
min_players = 5
max_occurrences = 3
/datum/round_event/meteor_wave/catastrophic
wave_name = "catastrophic"
// Normal strength
/datum/round_event_control/meteor_wave
name = "Meteor Wave: Normal"
typepath = /datum/round_event/meteor_wave
weight = 4
min_players = 5
max_occurrences = 3
/datum/round_event/meteor_wave
startWhen = 6
endWhen = 66
announceWhen = 1
var/list/wave_type
var/wave_name = "normal"
/datum/round_event/meteor_wave/New()
..()
if(!wave_type)
determine_wave_type()
/datum/round_event/meteor_wave/proc/determine_wave_type()
if(SSevents.holidays && SSevents.holidays[HALLOWEEN])
wave_name = "halloween"
if(!wave_name)
wave_name = pickweight(list(
"normal" = 50,
"threatening" = 40,
"catastrophic" = 10))
switch(wave_name)
if("normal")
wave_type = GLOB.meteors_normal
if("threatening")
wave_type = GLOB.meteors_threatening
if("catastrophic")
wave_type = GLOB.meteors_catastrophic
if("meaty")
wave_type = GLOB.meteorsB
if("space dust")
wave_type = GLOB.meteorsC
if("halloween")
wave_type = GLOB.meteorsSPOOKY
else
WARNING("Wave name of [wave_name] not recognised.")
kill()
/datum/round_event/meteor_wave/announce()
priority_announce("Meteors have been detected on collision course with the station.", "Meteor Alert", 'sound/ai/meteors.ogg')
/datum/round_event/meteor_wave/tick()
if(IsMultiple(activeFor, 3))
spawn_meteors(5, wave_type) //meteor list types defined in gamemode/meteor/meteors.dm
/datum/round_event_control/meteor_wave/threatening
name = "Meteor Wave: Threatening"
typepath = /datum/round_event/meteor_wave/threatening
weight = 2
min_players = 5
max_occurrences = 3
/datum/round_event/meteor_wave/threatening
wave_name = "threatening"
/datum/round_event_control/meteor_wave/catastrophic
name = "Meteor Wave: Catastrophic"
typepath = /datum/round_event/meteor_wave/catastrophic
weight = 1
min_players = 5
max_occurrences = 3
/datum/round_event/meteor_wave/catastrophic
wave_name = "catastrophic"
+1 -1
View File
@@ -272,7 +272,7 @@
/datum/holiday/halloween
name = HALLOWEEN
begin_day = 30
begin_day = 28
begin_month = OCTOBER
end_day = 2
end_month = NOVEMBER
+1 -1
View File
@@ -106,7 +106,7 @@
slowdown = 2
/turf/open/floor/holofloor/snow/cold
initial_gas_mix = "freon=7500;TEMP=0"
initial_gas_mix = "nob=7500;TEMP=2.7"
/turf/open/floor/holofloor/asteroid
name = "asteroid sand"
+1 -1
View File
@@ -48,7 +48,7 @@ Head of Security
gloves = /obj/item/clothing/gloves/color/black/hos
head = /obj/item/clothing/head/HoS/beret
glasses = /obj/item/clothing/glasses/hud/security/sunglasses
suit_store = /obj/item/gun/energy/e_gun
suit_store = /obj/item/gun/energy/e_gun/cx
r_pocket = /obj/item/device/assembly/flash/handheld
l_pocket = /obj/item/restraints/handcuffs
backpack_contents = list(/obj/item/melee/baton/loaded=1)
+4 -13
View File
@@ -56,10 +56,11 @@
if (top_atom)
LAZYREMOVE(top_atom.light_sources, src)
if (needs_update)
GLOB.lighting_update_lights -= src
. = ..()
if(!force)
return QDEL_HINT_IWILLGC
// Yes this doesn't align correctly on anything other than 4 width tabs.
// If you want it to go switch everybody to elastic tab stops.
@@ -270,8 +271,6 @@
source_turf.luminosity = Ceiling(light_range)
for(T in view(Ceiling(light_range), source_turf))
for (thing in T.get_corners(source_turf))
if(!thing)
continue
C = thing
corners[C] = 0
turfs += T
@@ -293,8 +292,6 @@
LAZYINITLIST(effect_str)
if (needs_update == LIGHTING_VIS_UPDATE)
for (thing in corners - effect_str) // New corners
if(!thing)
continue
C = thing
LAZYADD(C.affecting, src)
if (!C.active)
@@ -304,8 +301,6 @@
else
L = corners - effect_str
for (thing in L) // New corners
if(!thing)
continue
C = thing
LAZYADD(C.affecting, src)
if (!C.active)
@@ -314,8 +309,6 @@
APPLY_CORNER(C)
for (thing in corners - L) // Existing corners
if(!thing)
continue
C = thing
if (!C.active)
effect_str[C] = 0
@@ -324,8 +317,6 @@
L = effect_str - corners
for (thing in L) // Old, now gone, corners.
if(!thing)
continue
C = thing
REMOVE_CORNER(C)
LAZYREMOVE(C.affecting, src)
@@ -480,6 +480,8 @@
client.prefs.copy_to(H)
H.dna.update_dna_identity()
if(mind)
if(transfer_after)
mind.late_joiner = TRUE
mind.active = 0 //we wish to transfer the key manually
mind.transfer_to(H) //won't transfer key since the mind is not active
@@ -14,7 +14,7 @@
facial_hair_color = hair_color
eye_color = random_eye_color()
if(!pref_species)
var/rando_race = pick(CONFIG_GET(keyed_flag_list/roundstart_races))
var/rando_race = pick(GLOB.roundstart_races)
pref_species = new rando_race()
features = random_features()
age = rand(AGE_MIN,AGE_MAX)
@@ -59,7 +59,7 @@
if(previewJob && !nude)
mannequin.job = previewJob.title
previewJob.equip(mannequin, TRUE)
mannequin.compile_overlays()
COMPILE_OVERLAYS(mannequin)
CHECK_TICK
preview_icon = icon('icons/effects/effects.dmi', "nothing")
preview_icon.Scale(48+32, 16+32)
+17 -19
View File
@@ -216,25 +216,23 @@
. = list()
if(!bloodtype)
return
switch(bloodtype)
if("A-")
return list("A-", "O-")
if("A+")
return list("A-", "A+", "O-", "O+")
if("B-")
return list("B-", "O-")
if("B+")
return list("B-", "B+", "O-", "O+")
if("AB-")
return list("A-", "B-", "O-", "AB-")
if("AB+")
return list("A-", "A+", "B-", "B+", "O-", "O+", "AB-", "AB+")
if("O-")
return list("O-")
if("O+")
return list("O-", "O+")
if("L")
return list("L")
var/static/list/bloodtypes_safe = list(
"A-" = list("A-", "O-"),
"A+" = list("A-", "A+", "O-", "O+"),
"B-" = list("B-", "O-"),
"B+" = list("B-", "B+", "O-", "O+"),
"AB-" = list("A-", "B-", "O-", "AB-"),
"AB+" = list("A-", "A+", "B-", "B+", "O-", "O+", "AB-", "AB+"),
"O-" = list("O-"),
"O+" = list("O-", "O+"),
"L" = list("L"),
"U" = list("A-", "A+", "B-", "B+", "O-", "O+", "AB-", "AB+", "L", "U")
)
var/safe = bloodtypes_safe[bloodtype]
if(safe)
. = safe
//to add a splatter of blood or other mob liquid.
/mob/living/proc/add_splatter_floor(turf/T, small_drip)
+1 -1
View File
@@ -19,7 +19,7 @@
/mob/living/brain/proc/create_dna()
stored_dna = new /datum/dna/stored(src)
if(!stored_dna.species)
var/rando_race = pick(CONFIG_GET(keyed_flag_list/roundstart_races))
var/rando_race = pick(GLOB.roundstart_races)
stored_dna.species = new rando_race()
/mob/living/brain/Destroy()
+2 -2
View File
@@ -6,7 +6,7 @@
throw_range = 5
layer = ABOVE_MOB_LAYER
zone = "head"
slot = "brain"
slot = ORGAN_SLOT_BRAIN
vital = TRUE
origin_tech = "biotech=5"
attack_verb = list("attacked", "slapped", "whacked")
@@ -70,7 +70,7 @@
C.dna.copy_dna(brainmob.stored_dna)
if(L.disabilities & NOCLONE)
brainmob.disabilities |= NOCLONE //This is so you can't just decapitate a husked guy and clone them without needing to get a new body
var/obj/item/organ/zombie_infection/ZI = L.getorganslot("zombie_infection")
var/obj/item/organ/zombie_infection/ZI = L.getorganslot(ORGAN_SLOT_ZOMBIE)
if(ZI)
brainmob.set_species(ZI.old_species) //For if the brain is cloned
if(L.mind && L.mind.current)
+3 -3
View File
@@ -224,7 +224,7 @@
internal = null
update_internals_hud_icon(0)
else if(ITEM && istype(ITEM, /obj/item/tank))
if((wear_mask && (wear_mask.flags_1 & MASKINTERNALS_1)) || getorganslot("breathing_tube"))
if((wear_mask && (wear_mask.flags_1 & MASKINTERNALS_1)) || getorganslot(ORGAN_SLOT_BREATHING_TUBE))
internal = ITEM
update_internals_hud_icon(1)
@@ -523,7 +523,7 @@
sight = initial(sight)
lighting_alpha = initial(lighting_alpha)
var/obj/item/organ/eyes/E = getorganslot("eye_sight")
var/obj/item/organ/eyes/E = getorganslot(ORGAN_SLOT_EYES)
if(!E)
update_tint()
else
@@ -580,7 +580,7 @@
if(wear_mask)
. += wear_mask.tint
var/obj/item/organ/eyes/E = getorganslot("eye_sight")
var/obj/item/organ/eyes/E = getorganslot(ORGAN_SLOT_EYES)
if(E)
. += E.tint
@@ -14,7 +14,7 @@
var/obj/item/clothing/mask/MFP = src.wear_mask
number += MFP.flash_protect
var/obj/item/organ/eyes/E = getorganslot("eye_sight")
var/obj/item/organ/eyes/E = getorganslot(ORGAN_SLOT_EYES)
if(!E)
number = INFINITY //Can't get flashed without eyes
else
@@ -28,7 +28,7 @@
number += 1
if(head && (head.flags_2 & BANG_PROTECT_2))
number += 1
var/obj/item/organ/ears/E = getorganslot("ears")
var/obj/item/organ/ears/E = getorganslot(ORGAN_SLOT_EARS)
if(!E)
number = INFINITY
else
@@ -279,7 +279,7 @@
var/damage = intensity - get_eye_protection()
if(.) // we've been flashed
var/obj/item/organ/eyes/eyes = getorganslot("eye_sight")
var/obj/item/organ/eyes/eyes = getorganslot(ORGAN_SLOT_EYES)
if (!eyes)
return
if(visual)
@@ -323,7 +323,7 @@
/mob/living/carbon/soundbang_act(intensity = 1, stun_pwr = 20, damage_pwr = 5, deafen_pwr = 15)
var/ear_safety = get_ear_protection()
var/obj/item/organ/ears/ears = getorganslot("ears")
var/obj/item/organ/ears/ears = getorganslot(ORGAN_SLOT_EARS)
var/effect_amount = intensity - ear_safety
if(effect_amount > 0)
if(stun_pwr)
@@ -363,6 +363,6 @@
/mob/living/carbon/can_hear()
. = FALSE
var/obj/item/organ/ears/ears = getorganslot("ears")
var/obj/item/organ/ears/ears = getorganslot(ORGAN_SLOT_EARS)
if(istype(ears) && !ears.deaf)
. = TRUE
@@ -39,7 +39,7 @@
return 1
// Do we have a jetpack implant (and is it on)?
var/obj/item/organ/cyberimp/chest/thrusters/T = getorganslot("thrusters")
var/obj/item/organ/cyberimp/chest/thrusters/T = getorganslot(ORGAN_SLOT_THRUSTERS)
if(istype(T) && movement_dir && T.allow_thrust(0.01))
return 1
@@ -20,7 +20,7 @@
if(stat == DEAD)
return
stop_sound_channel(CHANNEL_HEARTBEAT)
var/obj/item/organ/heart/H = getorganslot("heart")
var/obj/item/organ/heart/H = getorganslot(ORGAN_SLOT_HEART)
if(H)
H.beat = BEAT_NONE
+13 -13
View File
@@ -270,13 +270,13 @@
if(ishuman(usr))
var/mob/living/carbon/human/H = usr
var/perpname = get_face_name(get_id_name(""))
if(istype(H.glasses, /obj/item/clothing/glasses/hud) || istype(H.getorganslot("eye_hud"), /obj/item/organ/cyberimp/eyes/hud))
if(istype(H.glasses, /obj/item/clothing/glasses/hud) || istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/hud))
var/datum/data/record/R = find_record("name", perpname, GLOB.data_core.general)
if(href_list["photo_front"] || href_list["photo_side"])
if(R)
if(!H.canUseHUD())
return
else if(!istype(H.glasses, /obj/item/clothing/glasses/hud) && !istype(H.getorganslot("eye_hud"), /obj/item/organ/cyberimp/eyes/hud/medical))
else if(!istype(H.glasses, /obj/item/clothing/glasses/hud) && !istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/hud/medical))
return
var/obj/item/photo/P = null
if(href_list["photo_front"])
@@ -287,13 +287,13 @@
P.show(H)
if(href_list["hud"] == "m")
if(istype(H.glasses, /obj/item/clothing/glasses/hud/health) || istype(H.getorganslot("eye_hud"), /obj/item/organ/cyberimp/eyes/hud/medical))
if(istype(H.glasses, /obj/item/clothing/glasses/hud/health) || istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/hud/medical))
if(href_list["p_stat"])
var/health_status = input(usr, "Specify a new physical status for this person.", "Medical HUD", R.fields["p_stat"]) in list("Active", "Physically Unfit", "*Unconscious*", "*Deceased*", "Cancel")
if(R)
if(!H.canUseHUD())
return
else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/health) && !istype(H.getorganslot("eye_hud"), /obj/item/organ/cyberimp/eyes/hud/medical))
else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/health) && !istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/hud/medical))
return
if(health_status && health_status != "Cancel")
R.fields["p_stat"] = health_status
@@ -303,7 +303,7 @@
if(R)
if(!H.canUseHUD())
return
else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/health) && !istype(H.getorganslot("eye_hud"), /obj/item/organ/cyberimp/eyes/hud/medical))
else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/health) && !istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/hud/medical))
return
if(health_status && health_status != "Cancel")
R.fields["m_stat"] = health_status
@@ -352,7 +352,7 @@
to_chat(usr, "<span class='danger'>Gathered data is inconsistent with the analysis, possible cause: poisoning.</span>")
if(href_list["hud"] == "s")
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.getorganslot("eye_hud"), /obj/item/organ/cyberimp/eyes/hud/security))
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/hud/security))
if(usr.stat || usr == src) //|| !usr.canmove || usr.restrained()) Fluff: Sechuds have eye-tracking technology and sets 'arrest' to people that the wearer looks and blinks at.
return //Non-fluff: This allows sec to set people to arrest as they get disarmed or beaten
// Checks the user has security clearence before allowing them to change arrest status via hud, comment out to enable all access
@@ -379,7 +379,7 @@
if(setcriminal != "Cancel")
if(R)
if(H.canUseHUD())
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.getorganslot("eye_hud"), /obj/item/organ/cyberimp/eyes/hud/security))
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/hud/security))
investigate_log("[src.key] has been set from [R.fields["criminal"]] to [setcriminal] by [usr.name] ([usr.key]).", INVESTIGATE_RECORDS)
R.fields["criminal"] = setcriminal
sec_hud_set_security_status()
@@ -389,7 +389,7 @@
if(R)
if(!H.canUseHUD())
return
else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/security) && !istype(H.getorganslot("eye_hud"), /obj/item/organ/cyberimp/eyes/hud/security))
else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/security) && !istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/hud/security))
return
to_chat(usr, "<b>Name:</b> [R.fields["name"]] <b>Criminal Status:</b> [R.fields["criminal"]]")
to_chat(usr, "<b>Minor Crimes:</b>")
@@ -418,7 +418,7 @@
return
else if(!H.canUseHUD())
return
else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/security) && !istype(H.getorganslot("eye_hud"), /obj/item/organ/cyberimp/eyes/hud/security))
else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/security) && !istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/hud/security))
return
var/crime = GLOB.data_core.createCrimeEntry(t1, t2, allowed_access, worldtime2text())
GLOB.data_core.addMinorCrime(R.fields["id"], crime)
@@ -433,7 +433,7 @@
return
else if (!H.canUseHUD())
return
else if (!istype(H.glasses, /obj/item/clothing/glasses/hud/security) && !istype(H.getorganslot("eye_hud"), /obj/item/organ/cyberimp/eyes/hud/security))
else if (!istype(H.glasses, /obj/item/clothing/glasses/hud/security) && !istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/hud/security))
return
var/crime = GLOB.data_core.createCrimeEntry(t1, t2, allowed_access, worldtime2text())
GLOB.data_core.addMajorCrime(R.fields["id"], crime)
@@ -444,7 +444,7 @@
if(R)
if(!H.canUseHUD())
return
else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/security) && !istype(H.getorganslot("eye_hud"), /obj/item/organ/cyberimp/eyes/hud/security))
else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/security) && !istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/hud/security))
return
to_chat(usr, "<b>Comments/Log:</b>")
var/counter = 1
@@ -462,7 +462,7 @@
return
else if(!H.canUseHUD())
return
else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/security) && !istype(H.getorganslot("eye_hud"), /obj/item/organ/cyberimp/eyes/hud/security))
else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/security) && !istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/hud/security))
return
var/counter = 1
while(R.fields[text("com_[]", counter)])
@@ -637,7 +637,7 @@
return 0
var/they_breathe = (!(NOBREATH in C.dna.species.species_traits))
var/they_lung = C.getorganslot("lungs")
var/they_lung = C.getorganslot(ORGAN_SLOT_LUNGS)
if(C.health > HEALTH_THRESHOLD_CRIT)
return
@@ -451,7 +451,7 @@
siemens_coeff = gloves_siemens_coeff
if(undergoing_cardiac_arrest() && !illusion)
if(shock_damage * siemens_coeff >= 1 && prob(25))
var/obj/item/organ/heart/heart = getorganslot("heart")
var/obj/item/organ/heart/heart = getorganslot(ORGAN_SLOT_HEART)
heart.beating = TRUE
if(stat == CONSCIOUS)
to_chat(src, "<span class='notice'>You feel your heart beating again!</span>")
@@ -45,14 +45,15 @@
return
else
//No oldFP or it's a different kind of blood
S.bloody_shoes[S.blood_state] = max(0, S.bloody_shoes[S.blood_state]-BLOOD_LOSS_PER_STEP)
var/obj/effect/decal/cleanable/blood/footprints/FP = new /obj/effect/decal/cleanable/blood/footprints(T)
FP.blood_state = S.blood_state
FP.entered_dirs |= dir
FP.bloodiness = S.bloody_shoes[S.blood_state]
if(S.blood_DNA && S.blood_DNA.len)
FP.transfer_blood_dna(S.blood_DNA)
FP.update_icon()
S.bloody_shoes[S.blood_state] = max(0, S.bloody_shoes[S.blood_state] - BLOOD_LOSS_PER_STEP)
if (S.bloody_shoes[S.blood_state] > BLOOD_LOSS_IN_SPREAD)
var/obj/effect/decal/cleanable/blood/footprints/FP = new /obj/effect/decal/cleanable/blood/footprints(T)
FP.blood_state = S.blood_state
FP.entered_dirs |= dir
FP.bloodiness = S.bloody_shoes[S.blood_state] - BLOOD_LOSS_IN_SPREAD
if(S.blood_DNA && S.blood_DNA.len)
FP.transfer_blood_dna(S.blood_DNA)
FP.update_icon()
update_inv_shoes()
//End bloody footprints
@@ -225,7 +225,7 @@
/mob/living/carbon/human/wear_mask_update(obj/item/clothing/C, toggle_off = 1)
if((C.flags_inv & (HIDEHAIR|HIDEFACIALHAIR)) || (initial(C.flags_inv) & (HIDEHAIR|HIDEFACIALHAIR)))
update_hair()
if(toggle_off && internal && !getorganslot("breathing_tube"))
if(toggle_off && internal && !getorganslot(ORGAN_SLOT_BREATHING_TUBE))
update_internals_hud_icon(0)
internal = null
if(C.flags_inv & HIDEEYES)
+3 -3
View File
@@ -93,7 +93,7 @@
#define HUMAN_CRIT_MAX_OXYLOSS (SSmobs.wait/30)
/mob/living/carbon/human/check_breath(datum/gas_mixture/breath)
var/L = getorganslot("lungs")
var/L = getorganslot(ORGAN_SLOT_LUNGS)
if(!L)
if(health >= HEALTH_THRESHOLD_CRIT)
@@ -338,7 +338,7 @@
/mob/living/carbon/human/proc/undergoing_cardiac_arrest()
if(!can_heartattack())
return FALSE
var/obj/item/organ/heart/heart = getorganslot("heart")
var/obj/item/organ/heart/heart = getorganslot(ORGAN_SLOT_HEART)
if(istype(heart) && heart.beating)
return FALSE
return TRUE
@@ -347,7 +347,7 @@
if(!can_heartattack())
return FALSE
var/obj/item/organ/heart/heart = getorganslot("heart")
var/obj/item/organ/heart/heart = getorganslot(ORGAN_SLOT_HEART)
if(!istype(heart))
return
+1 -1
View File
@@ -49,7 +49,7 @@
CHECK_DNA_AND_SPECIES(src)
// how do species that don't breathe talk? magic, that's what.
if(!(NOBREATH in dna.species.species_traits) && !getorganslot("lungs"))
if(!(NOBREATH in dna.species.species_traits) && !getorganslot(ORGAN_SLOT_LUNGS))
return 0
if(mind)
return !mind.miming
+30 -14
View File
@@ -1,5 +1,7 @@
// This code handles different species in the game.
GLOBAL_LIST_EMPTY(roundstart_races)
#define HEAT_DAMAGE_LEVEL_1 2
#define HEAT_DAMAGE_LEVEL_2 3
#define HEAT_DAMAGE_LEVEL_3 8
@@ -12,7 +14,6 @@
var/id // if the game needs to manually check your race to do something not included in a proc here, it will use this
var/limbs_id //this is used if you want to use a different species limb sprites. Mainly used for angels as they look like humans.
var/name // this is the fluff name. these will be left generic (such as 'Lizardperson' for the lizard race) so servers can change them to whatever
var/roundstart = 0 // can this mob be chosen at roundstart? (assuming the config option is checked?)
var/default_color = "#FFF" // if alien colors are disabled, this is the color that will be used by that race
var/sexes = 1 // whether or not the race has sexual characteristics. at the moment this is only 0 for skeletons and shadows
@@ -65,6 +66,7 @@
var/breathid = "o2"
var/obj/item/organ/brain/mutant_brain = /obj/item/organ/brain
var/obj/item/organ/heart/mutant_heart = /obj/item/organ/heart
var/obj/item/organ/eyes/mutanteyes = /obj/item/organ/eyes
var/obj/item/organ/ears/mutantears = /obj/item/organ/ears
var/obj/item/mutanthands
@@ -92,6 +94,20 @@
..()
/proc/generate_selectable_species()
for(var/I in subtypesof(/datum/species))
var/datum/species/S = new I
if(S.check_roundstart_eligible())
GLOB.roundstart_races += S.id
qdel(S)
if(!GLOB.roundstart_races.len)
GLOB.roundstart_races += "human"
/datum/species/proc/check_roundstart_eligible()
if(id in (CONFIG_GET(keyed_flag_list/roundstart_races)))
return TRUE
return FALSE
/datum/species/proc/random_name(gender,unique,lastname)
if(unique)
return random_unique_name(gender)
@@ -122,15 +138,15 @@
//Will regenerate missing organs
/datum/species/proc/regenerate_organs(mob/living/carbon/C,datum/species/old_species,replace_current=TRUE)
var/obj/item/organ/brain/brain = C.getorganslot("brain")
var/obj/item/organ/heart/heart = C.getorganslot("heart")
var/obj/item/organ/lungs/lungs = C.getorganslot("lungs")
var/obj/item/organ/appendix/appendix = C.getorganslot("appendix")
var/obj/item/organ/eyes/eyes = C.getorganslot("eye_sight")
var/obj/item/organ/ears/ears = C.getorganslot("ears")
var/obj/item/organ/tongue/tongue = C.getorganslot("tongue")
var/obj/item/organ/liver/liver = C.getorganslot("liver")
var/obj/item/organ/stomach/stomach = C.getorganslot("stomach")
var/obj/item/organ/brain/brain = C.getorganslot(ORGAN_SLOT_BRAIN)
var/obj/item/organ/heart/heart = C.getorganslot(ORGAN_SLOT_HEART)
var/obj/item/organ/lungs/lungs = C.getorganslot(ORGAN_SLOT_LUNGS)
var/obj/item/organ/appendix/appendix = C.getorganslot(ORGAN_SLOT_APPENDIX)
var/obj/item/organ/eyes/eyes = C.getorganslot(ORGAN_SLOT_EYES)
var/obj/item/organ/ears/ears = C.getorganslot(ORGAN_SLOT_EARS)
var/obj/item/organ/tongue/tongue = C.getorganslot(ORGAN_SLOT_TONGUE)
var/obj/item/organ/liver/liver = C.getorganslot(ORGAN_SLOT_LIVER)
var/obj/item/organ/stomach/stomach = C.getorganslot(ORGAN_SLOT_STOMACH)
var/should_have_brain = TRUE
var/should_have_heart = !(NOBLOOD in species_traits)
@@ -154,7 +170,7 @@
heart.Remove(C,1)
QDEL_NULL(heart)
if(should_have_heart && !heart)
heart = new()
heart = new mutant_heart()
heart.Insert(C)
if(lungs && (replace_current || !should_have_lungs))
@@ -1152,7 +1168,7 @@
if(radiation > RAD_MOB_VOMIT && prob(RAD_MOB_VOMIT_PROB))
H.vomit(10, TRUE)
if(radiation > RAD_MOB_MUTATE)
if(prob(1))
to_chat(H, "<span class='danger'>You mutate!</span>")
@@ -1204,7 +1220,7 @@
if(!gravity)
var/obj/item/tank/jetpack/J = H.back
var/obj/item/clothing/suit/space/hardsuit/C = H.wear_suit
var/obj/item/organ/cyberimp/chest/thrusters/T = H.getorganslot("thrusters")
var/obj/item/organ/cyberimp/chest/thrusters/T = H.getorganslot(ORGAN_SLOT_THRUSTERS)
if(!istype(J) && istype(C))
J = C.jetpack
if(istype(J) && J.full_speed && J.allow_thrust(0.01, H)) //Prevents stacking
@@ -1260,7 +1276,7 @@
return 1
else
var/we_breathe = (!(NOBREATH in user.dna.species.species_traits))
var/we_lung = user.getorganslot("lungs")
var/we_lung = user.getorganslot(ORGAN_SLOT_LUNGS)
if(we_breathe && we_lung)
user.do_cpr(target)
@@ -30,6 +30,7 @@
head.flags_1 = HEAR_1
head.throwforce = 25
myhead = new /obj/item/dullahan_relay (head, H)
H.put_in_hands(head)
/datum/species/dullahan/on_species_loss(mob/living/carbon/human/H)
if(myhead)
@@ -93,6 +94,10 @@
actions_types = list(/datum/action/item_action/organ_action/dullahan)
zone = "abstract"
/datum/action/item_action/organ_action/dullahan
name = "Toggle Perspective"
desc = "Switch between seeing normally from your head, or blindly from your body."
/datum/action/item_action/organ_action/dullahan/Trigger()
. = ..()
var/obj/item/organ/eyes/dullahan/DE = target
@@ -8,7 +8,6 @@
attack_verb = "claw"
attack_sound = 'sound/weapons/slash.ogg'
miss_sound = 'sound/weapons/slashmiss.ogg'
roundstart = 1
liked_food = MEAT | FRIED
disliked_food = TOXIC
@@ -31,7 +30,6 @@
attack_verb = "peck"
attack_sound = 'sound/weapons/slash.ogg'
miss_sound = 'sound/weapons/slashmiss.ogg'
roundstart = 1
liked_food = MEAT | FRUIT
disliked_food = TOXIC
@@ -53,7 +51,6 @@
attack_verb = "bite"
attack_sound = 'sound/weapons/bite.ogg'
miss_sound = 'sound/weapons/slashmiss.ogg'
roundstart = 1
liked_food = MEAT
disliked_food = TOXIC
@@ -75,7 +72,6 @@
attack_verb = "flutter" //wat?
attack_sound = 'sound/weapons/slash.ogg'
miss_sound = 'sound/weapons/slashmiss.ogg'
roundstart = 1
liked_food = MEAT | FRUIT
disliked_food = TOXIC
@@ -105,7 +101,6 @@
skinned_type = /obj/item/stack/sheet/animalhide/xeno
exotic_bloodtype = "L"
damage_overlay_type = "xeno"
roundstart = 1
liked_food = MEAT
//Praise the Omnissiah, A challange worthy of my skills - HS
@@ -138,7 +133,6 @@
meat = /obj/item/reagent_containers/food/snacks/meat/slab/xeno
skinned_type = /obj/item/stack/sheet/animalhide/xeno
// safe_toxins_max = 32 //Too much of anything is bad.
roundstart = 0
// whitelisted = 1
// whitelist = list("talkingcactus") //testing whitelisting
@@ -182,7 +176,6 @@
punchdamagehigh = 14
punchstunthreshold = 13
blacklisted = 1
roundstart = 0
whitelist = 1
whitelist = list("talkingcactus")
@@ -233,7 +226,6 @@
attack_verb = "bite"
attack_sound = 'sound/weapons/bite.ogg'
miss_sound = 'sound/weapons/slashmiss.ogg'
// roundstart = 1
whitelisted = 1
whitelist = list("rubyflamewing")
blacklisted = 0
@@ -248,4 +240,3 @@
attack_verb = "claw"
attack_sound = 'sound/weapons/slash.ogg'
miss_sound = 'sound/weapons/slashmiss.ogg'
roundstart = 1
@@ -22,6 +22,7 @@
limbs_id = "golem"
fixed_mut_color = "aaa"
var/info_text = "As an <span class='danger'>Iron Golem</span>, you don't have any special traits."
var/random_eligible = TRUE //If false, the golem subtype can't be made through golem mutation toxin
var/prefix = "Iron"
var/list/special_names
@@ -44,11 +45,20 @@
name = "Random Golem"
blacklisted = FALSE
dangerous_existence = FALSE
var/static/list/random_golem_types
/datum/species/golem/random/on_species_gain(mob/living/carbon/C, datum/species/old_species)
..()
var/list/golem_types = typesof(/datum/species/golem) - src.type
var/datum/species/golem/golem_type = pick(golem_types)
if(!random_golem_types)
random_golem_types = subtypesof(/datum/species/golem) - type
for(var/V in random_golem_types)
var/datum/species/golem/G = V
if(!initial(G.random_eligible))
random_golem_types -= G
to_chat(world, "Excluding golem type [initial(G.id)]")
else
to_chat(world, "Allowing golem type [initial(G.id)]")
var/datum/species/golem/golem_type = pick(random_golem_types)
var/mob/living/carbon/human/H = C
H.set_species(golem_type)
to_chat(H, "[initial(golem_type.info_text)]")
@@ -419,6 +429,7 @@
if(ishuman(C))
unstable_teleport = new
unstable_teleport.Grant(C)
last_teleport = world.time
/datum/species/golem/bluespace/on_species_loss(mob/living/carbon/C)
if(unstable_teleport)
@@ -479,6 +490,11 @@
var/banana_cooldown = 100
var/active = null
/datum/species/golem/bananium/on_species_gain(mob/living/carbon/C, datum/species/old_species)
..()
last_banana = world.time
last_honk = world.time
/datum/species/golem/bananium/random_name(gender,unique,lastname)
var/clown_name = pick(GLOB.clown_names)
var/golem_name = "[uppertext(clown_name)]"
@@ -553,10 +569,13 @@
. = ..()
C.faction |= "cult"
phase_shift = new
phase_shift.charge_counter = 0
C.AddSpell(phase_shift)
abyssal_gaze = new
abyssal_gaze.charge_counter = 0
C.AddSpell(abyssal_gaze)
dominate = new
dominate.charge_counter = 0
C.AddSpell(dominate)
/datum/species/golem/runic/on_species_loss(mob/living/carbon/C)
@@ -587,7 +606,7 @@
info_text = "<span class='bold alloy'>As a </span><span class='bold brass'>clockwork golem</span><span class='bold alloy'>, you are faster than \
other types of golem (being a machine), and are immune to electric shocks.</span>"
species_traits = list(NO_UNDERWEAR, NOTRANSSTING, NOBREATH, NOZOMBIE, VIRUSIMMUNE, RADIMMUNE, NOBLOOD, RESISTCOLD, RESISTPRESSURE, PIERCEIMMUNE)
armor = 40 //Reinforced, but also slim to allow for fast movement
armor = 20 //Reinforced, but much less so to allow for fast movement
attack_verb = "smash"
attack_sound = 'sound/magic/clockwork/anima_fragment_attack.ogg'
sexes = FALSE
@@ -629,7 +648,8 @@
has_corpse = TRUE
blacklisted = TRUE
dangerous_existence = TRUE
random_eligible = FALSE
/datum/species/golem/cloth
name = "Cloth Golem"
id = "cloth golem"
@@ -645,6 +665,11 @@
punchdamagehigh = 8 // not as heavy as stone
prefix = "Cloth"
/datum/species/golem/cloth/check_roundstart_eligible()
if(SSevents.holidays && SSevents.holidays[HALLOWEEN])
return TRUE
return ..()
/datum/species/golem/cloth/random_name(gender,unique,lastname)
var/pharaoh_name = pick("Neferkare", "Hudjefa", "Khufu", "Mentuhotep", "Ahmose", "Amenhotep", "Thutmose", "Hatshepsut", "Tutankhamun", "Ramses", "Seti", \
"Merenptah", "Djer", "Semerkhet", "Nynetjer", "Khafre", "Pepi", "Intef", "Ay") //yes, Ay was an actual pharaoh
@@ -13,7 +13,6 @@
disliked_food = NONE
liked_food = NONE
toxic_food = NONE
roundstart = TRUE
/datum/species/pod/on_species_gain(mob/living/carbon/C, datum/species/old_species)
@@ -1,4 +1,5 @@
#define HEART_RESPAWN_THRESHHOLD 40
#define HEART_SPECIAL_SHADOWIFY 2
/datum/species/shadow
// Humans cursed to stay in the darkness, lest their life forces drain. They regain health in shadow and die in light.
@@ -24,6 +25,10 @@
else if (light_amount < SHADOW_SPECIES_LIGHT_THRESHOLD) //heal in the dark
H.heal_overall_damage(1,1)
/datum/species/shadow/check_roundstart_eligible()
if(SSevents.holidays && SSevents.holidays[HALLOWEEN])
return TRUE
return ..()
/datum/species/shadow/nightmare
name = "Nightmare"
@@ -60,7 +65,8 @@
return -1
return 0
/datum/species/shadow/nightmare/check_roundstart_eligible()
return FALSE
//Organs
@@ -111,14 +117,15 @@
/obj/item/organ/heart/nightmare/Insert(mob/living/carbon/M, special = 0)
..()
blade = new/obj/item/light_eater
M.put_in_hands(blade)
if(special != HEART_SPECIAL_SHADOWIFY)
blade = new/obj/item/light_eater
M.put_in_hands(blade)
START_PROCESSING(SSobj, src)
/obj/item/organ/heart/nightmare/Remove(mob/living/carbon/M, special = 0)
STOP_PROCESSING(SSobj, src)
respawn_progress = 0
if(blade)
if(blade && special != HEART_SPECIAL_SHADOWIFY)
QDEL_NULL(blade)
M.visible_message("<span class='warning'>\The [blade] disintegrates!</span>")
..()
@@ -141,6 +148,13 @@
playsound(owner,'sound/effects/singlebeat.ogg',40,1)
if(respawn_progress >= HEART_RESPAWN_THRESHHOLD)
owner.revive(full_heal = TRUE)
if(!(owner.dna.species.id == "shadow" || owner.dna.species.id == "nightmare"))
var/mob/living/carbon/old_owner = owner
Remove(owner, HEART_SPECIAL_SHADOWIFY)
old_owner.set_species(/datum/species/shadow)
Insert(old_owner, HEART_SPECIAL_SHADOWIFY)
to_chat(owner, "<span class='userdanger'>You feel the shadows invade your skin, leaping into the center of your chest! You're alive!</span>")
SEND_SOUND(owner, sound('sound/effects/ghost.ogg'))
owner.visible_message("<span class='warning'>[owner] staggers to their feet!</span>")
playsound(owner, 'sound/hallucinations/far_noise.ogg', 50, 1)
respawn_progress = 0
@@ -193,4 +207,5 @@
O.burn()
playsound(src, 'sound/items/welder.ogg', 50, 1)
#undef HEART_SPECIAL_SHADOWIFY
#undef HEART_RESPAWN_THRESHHOLD
@@ -11,3 +11,8 @@
damage_overlay_type = ""//let's not show bloody wounds or burns over bones.
disliked_food = NONE
liked_food = NONE
/datum/species/skeleton/check_roundstart_eligible()
if(SSevents.holidays && SSevents.holidays[HALLOWEEN])
return TRUE
return ..()
@@ -118,4 +118,4 @@
else
return ..()
else
return ..()
return ..()
@@ -0,0 +1,125 @@
/datum/species/vampire
name = "vampire"
id = "vampire"
default_color = "FFFFFF"
species_traits = list(EYECOLOR,HAIR,FACEHAIR,LIPS,NOHUNGER,NOBREATH,DRINKSBLOOD)
mutant_bodyparts = list("tail_human", "ears", "wings")
default_features = list("mcolor" = "FFF", "tail_human" = "None", "ears" = "None", "wings" = "None")
exotic_bloodtype = "U"
use_skintones = TRUE
mutant_heart = /obj/item/organ/heart/vampire
mutanttongue = /obj/item/organ/tongue/vampire
blacklisted = TRUE
limbs_id = "human"
skinned_type = /obj/item/stack/sheet/animalhide/human
var/info_text = "You are a <span class='danger'>Vampire</span>. You will slowly but constantly lose blood if outside of a coffin. If inside a coffin, you will slowly heal. You may gain more blood by grabbing a live victim and using your drain ability."
/datum/species/vampire/check_roundstart_eligible()
if(SSevents.holidays && SSevents.holidays[HALLOWEEN])
return TRUE
return FALSE
/datum/species/vampire/on_species_gain(mob/living/carbon/human/C, datum/species/old_species)
. = ..()
to_chat(C, "[info_text]")
C.skin_tone = "albino"
C.update_body(0)
var/obj/effect/proc_holder/spell/targeted/shapeshift/bat/B = new
C.AddSpell(B)
/datum/species/vampire/on_species_loss(mob/living/carbon/C)
. = ..()
if(C.mind)
for(var/S in C.mind.spell_list)
var/obj/effect/proc_holder/spell/S2 = S
if(S2.type == /obj/effect/proc_holder/spell/targeted/shapeshift/bat)
C.mind.spell_list.Remove(S2)
qdel(S2)
/datum/species/vampire/spec_life(mob/living/carbon/human/C)
. = ..()
if(istype(C.loc, /obj/structure/closet/coffin))
C.heal_overall_damage(4,4)
C.adjustToxLoss(-4)
C.adjustOxyLoss(-4)
C.adjustCloneLoss(-4)
return
C.blood_volume -= 0.75
if(C.blood_volume <= BLOOD_VOLUME_SURVIVE)
to_chat(C, "<span class='danger'>You ran out of blood!</span>")
C.dust()
var/area/A = get_area(C)
if(istype(A, /area/chapel))
to_chat(C, "<span class='danger'>You don't belong here!</span>")
C.adjustFireLoss(20)
C.adjust_fire_stacks(6)
C.IgniteMob()
/obj/item/organ/tongue/vampire
name = "vampire tongue"
actions_types = list(/datum/action/item_action/organ_action/vampire)
color = "#1C1C1C"
var/drain_cooldown = 0
#define VAMP_DRAIN_AMOUNT 50
/datum/action/item_action/organ_action/vampire
name = "Drain Victim"
desc = "Leech blood from any carbon victim you are passively grabbing."
/datum/action/item_action/organ_action/vampire/Trigger()
. = ..()
if(iscarbon(owner))
var/mob/living/carbon/H = owner
var/obj/item/organ/tongue/vampire/V = target
if(V.drain_cooldown >= world.time)
to_chat(H, "<span class='notice'>You just drained blood, wait a few seconds.</span>")
return
if(H.pulling && iscarbon(H.pulling))
var/mob/living/carbon/victim = H.pulling
if(H.blood_volume >= BLOOD_VOLUME_MAXIMUM)
to_chat(H, "<span class='notice'>You're already full!</span>")
return
if(victim.stat == DEAD)
to_chat(H, "<span class='notice'>You need a living victim!</span>")
return
if(!victim.blood_volume || (victim.dna && ((NOBLOOD in victim.dna.species.species_traits) || victim.dna.species.exotic_blood)))
to_chat(H, "<span class='notice'>[victim] doesn't have blood!</span>")
return
V.drain_cooldown = world.time + 30
if(!do_after(H, 30, target = victim))
return
var/blood_volume_difference = BLOOD_VOLUME_MAXIMUM - H.blood_volume //How much capacity we have left to absorb blood
var/drained_blood = min(victim.blood_volume, VAMP_DRAIN_AMOUNT, blood_volume_difference)
to_chat(victim, "<span class='danger'>[H] is draining your blood!</span>")
to_chat(H, "<span class='notice'>You drain some blood!</span>")
playsound(H, 'sound/items/drink.ogg', 30, 1, -2)
victim.blood_volume = Clamp(victim.blood_volume - drained_blood, 0, BLOOD_VOLUME_MAXIMUM)
H.blood_volume = Clamp(H.blood_volume + drained_blood, 0, BLOOD_VOLUME_MAXIMUM)
if(!victim.blood_volume)
to_chat(H, "<span class='warning'>You finish off [victim]'s blood supply!</span>")
#undef VAMP_DRAIN_AMOUNT
/obj/item/organ/heart/vampire
name = "vampire heart"
actions_types = list(/datum/action/item_action/organ_action/vampire_heart)
color = "#1C1C1C"
/datum/action/item_action/organ_action/vampire_heart
name = "Check Blood Level"
desc = "Check how much blood you have remaining."
/datum/action/item_action/organ_action/vampire_heart/Trigger()
. = ..()
if(iscarbon(owner))
var/mob/living/carbon/H = owner
to_chat(H, "<span class='notice'>Current blood level: [H.blood_volume]/[BLOOD_VOLUME_MAXIMUM].</span>")
/obj/effect/proc_holder/spell/targeted/shapeshift/bat
name = "Bat Form"
desc = "Take on the shape a space bat."
invocation = "Squeak!"
charge_max = 50
cooldown_min = 50
shapeshift_type = /mob/living/simple_animal/hostile/retaliate/bat
@@ -14,6 +14,11 @@
disliked_food = NONE
liked_food = NONE
/datum/species/zombie/check_roundstart_eligible()
if(SSevents.holidays && SSevents.holidays[HALLOWEEN])
return TRUE
return ..()
/datum/species/zombie/infectious
name = "Infectious Zombie"
id = "memezombies"
@@ -24,6 +29,10 @@
mutanteyes = /obj/item/organ/eyes/night_vision/zombie
var/regen_cooldown = 0
/datum/species/zombie/infectious/check_roundstart_eligible()
return FALSE
/datum/species/zombie/infectious/spec_stun(mob/living/carbon/human/H,amount)
. = min(2, amount)
@@ -52,7 +61,7 @@
// Infection organ needs to be handled separately from mutant_organs
// because it persists through species transitions
var/obj/item/organ/zombie_infection/infection
infection = C.getorganslot("zombie_infection")
infection = C.getorganslot(ORGAN_SLOT_ZOMBIE)
if(!infection)
infection = new()
infection.Insert(C)
+17 -7
View File
@@ -58,7 +58,7 @@
var/datum/gas_mixture/breath
if(!getorganslot("breathing_tube"))
if(!getorganslot(ORGAN_SLOT_BREATHING_TUBE))
if(health <= HEALTH_THRESHOLD_FULLCRIT || (pulledby && pulledby.grab_state >= GRAB_KILL))
losebreath++ //You can't breath at all when in critical or when being choked, so you're going to miss a breath
@@ -110,7 +110,7 @@
if((status_flags & GODMODE))
return
var/lungs = getorganslot("lungs")
var/lungs = getorganslot(ORGAN_SLOT_LUNGS)
if(!lungs)
adjustOxyLoss(2)
@@ -203,6 +203,16 @@
hallucination += 20
else if(bz_partialpressure > 0.01)
hallucination += 5//Removed at 2 per tick so this will slowly build up
//TRITIUM
if(breath_gases[/datum/gas/tritium])
var/tritium_partialpressure = (breath_gases[/datum/gas/tritium][MOLES]/breath.total_moles())*breath_pressure
radiation += tritium_partialpressure/10
//Brown Gas
if (breath_gases[/datum/gas/brown_gas])
var/browns_partialpressure = (breath_gases[/datum/gas/brown_gas][MOLES]/breath.total_moles())*breath_pressure
adjustFireLoss(browns_partialpressure/4)
breath.garbage_collect()
@@ -220,7 +230,7 @@
if(internal.loc != src)
internal = null
update_internals_hud_icon(0)
else if ((!wear_mask || !(wear_mask.flags_1 & MASKINTERNALS_1)) && !getorganslot("breathing_tube"))
else if ((!wear_mask || !(wear_mask.flags_1 & MASKINTERNALS_1)) && !getorganslot(ORGAN_SLOT_BREATHING_TUBE))
internal = null
update_internals_hud_icon(0)
else
@@ -391,7 +401,7 @@
/////////
/mob/living/carbon/proc/handle_liver()
var/obj/item/organ/liver/liver = getorganslot("liver")
var/obj/item/organ/liver/liver = getorganslot(ORGAN_SLOT_LIVER)
if((!dna && !liver) || (NOLIVER in dna.species.species_traits))
return
if(liver)
@@ -404,17 +414,17 @@
liver_failure()
/mob/living/carbon/proc/undergoing_liver_failure()
var/obj/item/organ/liver/liver = getorganslot("liver")
var/obj/item/organ/liver/liver = getorganslot(ORGAN_SLOT_LIVER)
if(liver && liver.failing)
return TRUE
/mob/living/carbon/proc/return_liver_damage()
var/obj/item/organ/liver/liver = getorganslot("liver")
var/obj/item/organ/liver/liver = getorganslot(ORGAN_SLOT_LIVER)
if(liver)
return liver.damage
/mob/living/carbon/proc/applyLiverDamage(var/d)
var/obj/item/organ/liver/L = getorganslot("liver")
var/obj/item/organ/liver/L = getorganslot(ORGAN_SLOT_LIVER)
if(L)
L.damage += d
@@ -140,7 +140,7 @@
return protection
/mob/living/carbon/monkey/IsVocal()
if(!getorganslot("lungs"))
if(!getorganslot(ORGAN_SLOT_LUNGS))
return 0
return 1
+3 -3
View File
@@ -1,6 +1,6 @@
/mob/living/carbon/treat_message(message)
message = ..(message)
var/obj/item/organ/tongue/T = getorganslot("tongue")
var/obj/item/organ/tongue/T = getorganslot(ORGAN_SLOT_TONGUE)
if(!T) //hoooooouaah!
var/regex/tongueless_lower = new("\[gdntke]+", "g")
var/regex/tongueless_upper = new("\[GDNTKE]+", "g")
@@ -21,7 +21,7 @@
/mob/living/carbon/get_spans()
. = ..()
var/obj/item/organ/tongue/T = getorganslot("tongue")
var/obj/item/organ/tongue/T = getorganslot(ORGAN_SLOT_TONGUE)
if(T)
. |= T.get_spans()
@@ -30,7 +30,7 @@
. |= I.get_held_item_speechspans(src)
/mob/living/carbon/could_speak_in_language(datum/language/dt)
var/obj/item/organ/tongue/T = getorganslot("tongue")
var/obj/item/organ/tongue/T = getorganslot(ORGAN_SLOT_TONGUE)
if(T)
. = T.could_speak_in_language(dt)
else
@@ -3,7 +3,7 @@
// eye damage, eye_blind, eye_blurry, druggy, BLIND disability, NEARSIGHT disability, and HUSK disability.
/mob/living/carbon/damage_eyes(amount)
var/obj/item/organ/eyes/eyes = getorganslot("eye_sight")
var/obj/item/organ/eyes/eyes = getorganslot(ORGAN_SLOT_EYES)
if (!eyes)
return
if(amount>0)
@@ -15,7 +15,7 @@
overlay_fullscreen("eye_damage", /obj/screen/fullscreen/impaired, 1)
/mob/living/carbon/set_eye_damage(amount)
var/obj/item/organ/eyes/eyes = getorganslot("eye_sight")
var/obj/item/organ/eyes/eyes = getorganslot(ORGAN_SLOT_EYES)
if (!eyes)
return
eyes.eye_damage = max(amount,0)
@@ -28,7 +28,7 @@
clear_fullscreen("eye_damage")
/mob/living/carbon/adjust_eye_damage(amount)
var/obj/item/organ/eyes/eyes = getorganslot("eye_sight")
var/obj/item/organ/eyes/eyes = getorganslot(ORGAN_SLOT_EYES)
if (!eyes)
return
eyes.eye_damage = max(eyes.eye_damage+amount, 0)
+9 -6
View File
@@ -898,14 +898,17 @@
to_chat(G, "<span class='holoparasite'>Your summoner has changed form!</span>")
/mob/living/rad_act(amount)
amount = max(amount-RAD_BACKGROUND_RADIATION, 0)
if(!amount || amount < RAD_MOB_SKIN_PROTECTION)
return
if(amount)
var/blocked = getarmor(null, "rad")
amount -= RAD_BACKGROUND_RADIATION // This will always be at least 1 because of how skin protection is calculated
apply_effect(amount * RAD_MOB_COEFFICIENT, IRRADIATE, blocked)
if(amount > RAD_AMOUNT_EXTREME)
apply_damage((amount-RAD_AMOUNT_EXTREME)/RAD_AMOUNT_EXTREME, BURN, null, blocked)
var/blocked = getarmor(null, "rad")
if(amount > RAD_BURN_THRESHOLD)
apply_damage((amount-RAD_BURN_THRESHOLD)/RAD_BURN_THRESHOLD, BURN, null, blocked)
apply_effect((amount*RAD_MOB_COEFFICIENT)/max(1, (radiation**2)*RAD_OVERDOSE_REDUCTION), IRRADIATE, blocked)
/mob/living/proc/fakefireextinguish()
return
+4 -11
View File
@@ -338,18 +338,11 @@
/mob/living/ratvar_act()
if(status_flags & GODMODE)
return
if(stat != DEAD && !is_servant_of_ratvar(src))
for(var/obj/item/implant/mindshield/M in implants)
qdel(M)
if(!add_servant_of_ratvar(src))
to_chat(src, "<span class='userdanger'>A blinding light boils you alive! <i>Run!</i></span>")
adjustFireLoss(35)
if(src)
adjust_fire_stacks(1)
IgniteMob()
return FALSE
return TRUE
to_chat(src, "<span class='userdanger'>A blinding light boils you alive! <i>Run!</i></span>")
adjust_fire_stacks(20)
IgniteMob()
return FALSE
//called when the mob receives a bright flash
+1 -1
View File
@@ -362,7 +362,7 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
if(message_mode == MODE_VOCALCORDS)
if(iscarbon(src))
var/mob/living/carbon/C = src
var/obj/item/organ/vocal_cords/V = C.getorganslot("vocal_cords")
var/obj/item/organ/vocal_cords/V = C.getorganslot(ORGAN_SLOT_VOICE)
if(V && V.can_speak_with())
V.handle_speech(message) //message
V.speak_with(message) //action
@@ -352,10 +352,9 @@
/obj/item/soap/tongue,
/obj/item/device/analyzer/nose,
/obj/item/device/dogborg/sleeper/K9,
/obj/item/pinpointer/crew)
emag_modules = list(/obj/item/gun/energy/laser/cyborg,
/obj/item/gun/energy/disabler/cyborg,
/obj/item/pinpointer/nuke)
/obj/item/pinpointer/crew)
emag_modules = list(/obj/item/gun/energy/laser/cyborg)
ratvar_modules = list(/obj/item/clockwork/slab/cyborg/security,
/obj/item/clockwork/weapon/ratvarian_spear)
cyborg_base_icon = "k9"
@@ -408,7 +407,6 @@
/obj/item/robot_module/scrubpup
name = "Janitor"
basic_modules = list(
/obj/item/device/assembly/flash/cyborg,
/obj/item/dogborg/jaws/small,
/obj/item/device/analyzer/nose,
/obj/item/soap/tongue/scrubpup,
@@ -422,6 +420,7 @@
moduleselect_icon = "scrubpup"
feedback_key = "cyborg_scrubpup"
hat_offset = INFINITY
clean_on_move = TRUE
/obj/item/robot_module/scrubpup/respawn_consumable(mob/living/silicon/robot/R, coeff = 1)
..()
@@ -12,6 +12,8 @@
name = "Syndicate Operative"
id_job = "Operative"
id_access_list = list(ACCESS_SYNDICATE)
hair_style = "Bald"
facial_hair_style = "Shaved"
outfit = /datum/outfit/syndicatesoldiercorpse
/datum/outfit/syndicatesoldiercorpse
@@ -31,6 +33,8 @@
name = "Syndicate Commando"
id_job = "Operative"
id_access_list = list(ACCESS_SYNDICATE)
hair_style = "Bald"
facial_hair_style = "Shaved"
outfit = /datum/outfit/syndicatecommandocorpse
/datum/outfit/syndicatecommandocorpse
@@ -50,6 +54,8 @@
name = "Syndicate Stormtrooper"
id_job = "Operative"
id_access_list = list(ACCESS_SYNDICATE)
hair_style = "Bald"
facial_hair_style = "Shaved"
outfit = /datum/outfit/syndicatestormtroopercorpse
/datum/outfit/syndicatestormtroopercorpse
@@ -67,11 +73,16 @@
/obj/effect/mob_spawn/human/clown/corpse
roundstart = FALSE
instant = TRUE
skin_tone = "caucasian1"
hair_style = "Bald"
facial_hair_style = "Shaved"
/obj/effect/mob_spawn/human/corpse/pirate
name = "Pirate"
skin_tone = "Caucasian1" //all pirates are white because it's easier that way
outfit = /datum/outfit/piratecorpse
hair_style = "Bald"
facial_hair_style = "Shaved"
/datum/outfit/piratecorpse
name = "Pirate Corpse"
@@ -94,12 +105,17 @@
/obj/effect/mob_spawn/human/corpse/russian
name = "Russian"
outfit = /datum/outfit/russiancorpse
hair_style = "Bald"
facial_hair_style = "Shaved"
/datum/outfit/russiancorpse
name = "Russian Corpse"
uniform = /obj/item/clothing/under/soviet
shoes = /obj/item/clothing/shoes/jackboots
head = /obj/item/clothing/head/bearpelt
gloves = /obj/item/clothing/gloves/color/black
mask = /obj/item/clothing/mask/gas
/obj/effect/mob_spawn/human/corpse/russian/ranged
@@ -109,6 +125,7 @@
name = "Ranged Russian Corpse"
head = /obj/item/clothing/head/ushanka
/obj/effect/mob_spawn/human/corpse/russian/ranged/trooper
outfit = /datum/outfit/russiancorpse/ranged/trooper
@@ -119,8 +136,8 @@
shoes = /obj/item/clothing/shoes/combat
gloves = /obj/item/clothing/gloves/combat
ears = /obj/item/device/radio/headset
mask = /obj/item/clothing/mask/balaclava
head = /obj/item/clothing/head/helmet/alt
mask = /obj/item/clothing/mask/balaclava
/obj/effect/mob_spawn/human/corpse/russian/ranged/officer
@@ -131,7 +148,7 @@
name = "Russian Officer Corpse"
uniform = /obj/item/clothing/under/rank/security/navyblue/russian
suit = /obj/item/clothing/suit/security/officer/russian
shoes = /obj/item/clothing/shoes/laceup
shoes = /obj/item/clothing/shoes/combat
ears = /obj/item/device/radio/headset
head = /obj/item/clothing/head/ushanka
@@ -139,6 +156,9 @@
/obj/effect/mob_spawn/human/corpse/wizard
name = "Space Wizard Corpse"
outfit = /datum/outfit/wizardcorpse
hair_style = "Bald"
facial_hair_style = "Long Beard"
skin_tone = "Caucasian1"
/datum/outfit/wizardcorpse
name = "Space Wizard Corpse"
@@ -153,6 +173,8 @@
id_job = "Private Security Force"
id_access = "Security Officer"
outfit = /datum/outfit/nanotrasensoldiercorpse2
hair_style = "Bald"
facial_hair_style = "Shaved"
/datum/outfit/nanotrasensoldiercorpse2
name = "NT Private Security Officer Corpse"
@@ -206,6 +206,7 @@
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
minbodytemp = 0
maxbodytemp = 1500
poison_type = "frost_oil"
color = rgb(114,228,250)
gold_core_spawnable = 0
@@ -214,6 +215,7 @@
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
minbodytemp = 0
maxbodytemp = 1500
poison_type = "frost_oil"
color = rgb(114,228,250)
gold_core_spawnable = 0
@@ -222,6 +224,7 @@
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
minbodytemp = 0
maxbodytemp = 1500
poison_type = "frost_oil"
color = rgb(114,228,250)
gold_core_spawnable = 0
@@ -616,7 +616,7 @@ Difficulty: Very Hard
pass_flags = PASSTABLE | PASSGRILLE | PASSMOB
ventcrawler = VENTCRAWLER_ALWAYS
mob_size = MOB_SIZE_TINY
gold_core_spawnable = 0
gold_core_spawnable = TRUE
verb_say = "warps"
verb_ask = "floats inquisitively"
verb_exclaim = "zaps"
@@ -634,7 +634,6 @@ Difficulty: Very Hard
environment_smash = ENVIRONMENT_SMASH_NONE
AIStatus = AI_OFF
stop_automated_movement = 1
gold_core_spawnable = TRUE
var/heal_power = 5
/mob/living/simple_animal/hostile/lightgeist/Initialize()
@@ -34,4 +34,7 @@
//Space bats need no air to fly in.
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
minbodytemp = 0
minbodytemp = 0
/mob/living/simple_animal/hostile/retaliate/bat/Process_Spacemove(movement_dir = 0)
return 1
@@ -23,7 +23,7 @@
environment_smash = ENVIRONMENT_SMASH_NONE
del_on_death = 0
/mob/living/simple_animal/hostile/retaliate/nanotrasenpeace
/mob/living/simple_animal/hostile/retaliate/nanotrasenpeace //this should be in a different file
name = "Nanotrasen Private Security Officer"
desc = "An officer part of Nanotrasen's private security force."
icon = 'icons/mob/simple_human.dmi'
+1 -1
View File
@@ -8,7 +8,7 @@
return DEFAULT_TASTE_SENSITIVITY
/mob/living/carbon/get_taste_sensitivity()
var/obj/item/organ/tongue/tongue = getorganslot("tongue")
var/obj/item/organ/tongue/tongue = getorganslot(ORGAN_SLOT_TONGUE)
if(istype(tongue))
. = tongue.taste_sensitivity
else
+4 -1
View File
@@ -4,6 +4,8 @@
GLOB.living_mob_list -= src
GLOB.all_clockwork_mobs -= src
GLOB.mob_directory -= tag
for (var/alert in alerts)
clear_alert(alert, TRUE)
if(observers && observers.len)
for(var/M in observers)
var/mob/dead/observe = M
@@ -31,6 +33,7 @@
continue
var/datum/atom_hud/alternate_appearance/AA = v
AA.onNewMob(src)
hook_vr("mob_new",list(src))
. = ..()
/atom/proc/prepare_huds()
@@ -389,7 +392,7 @@
pulling = null
grab_state = 0
update_pull_hud_icon()
if(isliving(ex_pulled))
var/mob/living/L = ex_pulled
L.update_canmove()// mob gets up if it was lyng down in a chokehold
+44 -75
View File
@@ -1,3 +1,14 @@
GLOBAL_LIST_INIT(cable_colors, list(
"yellow" = "#ffff00",
"green" = "#00aa00",
"blue" = "#1919c8",
"pink" = "#ff3cc8",
"orange" = "#ff8000",
"cyan" = "#00ffff",
"white" = "#ffffff",
"red" = "#ff0000"
))
///////////////////////////////
//CABLE STRUCTURE
///////////////////////////////
@@ -23,61 +34,52 @@ By design, d1 is the smallest direction and d2 is the highest
*/
/obj/structure/cable
level = 1 //is underfloor
anchored =1
on_blueprints = TRUE
var/datum/powernet/powernet
name = "power cable"
desc = "A flexible, superconducting insulated cable for heavy-duty power transfer."
icon = 'icons/obj/power_cond/power_cond_red.dmi'
icon = 'icons/obj/power_cond/cables.dmi'
icon_state = "0-1"
level = 1 //is underfloor
layer = WIRE_LAYER //Above hidden pipes, GAS_PIPE_HIDDEN_LAYER
anchored = TRUE
on_blueprints = TRUE
var/d1 = 0 // cable direction 1 (see above)
var/d2 = 1 // cable direction 2 (see above)
layer = WIRE_LAYER //Above hidden pipes, GAS_PIPE_HIDDEN_LAYER
var/cable_color = "red"
var/datum/powernet/powernet
var/obj/item/stack/cable_coil/stored
var/cable_color = "red"
/obj/structure/cable/yellow
cable_color = "yellow"
icon = 'icons/obj/power_cond/power_cond_yellow.dmi'
/obj/structure/cable/green
cable_color = "green"
icon = 'icons/obj/power_cond/power_cond_green.dmi'
/obj/structure/cable/blue
cable_color = "blue"
icon = 'icons/obj/power_cond/power_cond_blue.dmi'
/obj/structure/cable/pink
cable_color = "pink"
icon = 'icons/obj/power_cond/power_cond_pink.dmi'
/obj/structure/cable/orange
cable_color = "orange"
icon = 'icons/obj/power_cond/power_cond_orange.dmi'
/obj/structure/cable/cyan
cable_color = "cyan"
icon = 'icons/obj/power_cond/power_cond_cyan.dmi'
/obj/structure/cable/white
cable_color = "white"
icon = 'icons/obj/power_cond/power_cond_white.dmi'
// the power cable object
/obj/structure/cable/Initialize()
/obj/structure/cable/Initialize(mapload, param_color)
. = ..()
// ensure d1 & d2 reflect the icon_state for entering and exiting cable
var/dash = findtext(icon_state, "-")
d1 = text2num( copytext( icon_state, 1, dash ) )
d2 = text2num( copytext( icon_state, dash+1 ) )
var/turf/T = get_turf(src) // hide if turf is not intact
if(level==1)
hide(T.intact)
GLOB.cable_list += src //add it to the global cable list
@@ -87,6 +89,12 @@ By design, d1 is the smallest direction and d2 is the highest
else
stored = new/obj/item/stack/cable_coil(null,1,cable_color)
var/list/cable_colors = GLOB.cable_colors
cable_color = param_color || cable_color || pick(cable_colors)
if(cable_colors[cable_color])
cable_color = cable_colors[cable_color]
update_icon()
/obj/structure/cable/Destroy() // called when a cable is deleted
if(powernet)
cut_cable_from_powernet() // update the powernets
@@ -115,6 +123,7 @@ By design, d1 is the smallest direction and d2 is the highest
icon_state = "[d1]-[d2]-f"
else
icon_state = "[d1]-[d2]"
add_atom_colour(cable_color, FIXED_COLOUR_PRIORITY)
/obj/structure/cable/proc/handlecable(obj/item/W, mob/user, params)
var/turf/T = get_turf(src)
@@ -175,26 +184,6 @@ By design, d1 is the smallest direction and d2 is the highest
if(current_size >= STAGE_FIVE)
deconstruct()
/obj/structure/cable/proc/cableColor(colorC = "red")
cable_color = colorC
switch(colorC)
if("red")
icon = 'icons/obj/power_cond/power_cond_red.dmi'
if("yellow")
icon = 'icons/obj/power_cond/power_cond_yellow.dmi'
if("green")
icon = 'icons/obj/power_cond/power_cond_green.dmi'
if("blue")
icon = 'icons/obj/power_cond/power_cond_blue.dmi'
if("pink")
icon = 'icons/obj/power_cond/power_cond_pink.dmi'
if("orange")
icon = 'icons/obj/power_cond/power_cond_orange.dmi'
if("cyan")
icon = 'icons/obj/power_cond/power_cond_cyan.dmi'
if("white")
icon = 'icons/obj/power_cond/power_cond_white.dmi'
/obj/structure/cable/proc/update_stored(length = 1, colorC = "red")
stored.amount = length
stored.item_color = colorC
@@ -456,8 +445,8 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe("cable restrai
name = "cable coil"
gender = NEUTER //That's a cable coil sounds better than that's some cable coils
icon = 'icons/obj/power.dmi'
icon_state = "coil_red"
item_state = "coil_red"
icon_state = "coil"
item_state = "coil"
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
max_amount = MAXCOIL
@@ -497,8 +486,12 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe("cable restrai
. = ..()
if(new_amount) // MAXCOIL by default
amount = new_amount
if(param_color)
item_color = param_color
var/list/cable_colors = GLOB.cable_colors
item_color = param_color || item_color || pick(cable_colors)
if(cable_colors[item_color])
item_color = cable_colors[item_color]
pixel_x = rand(-2,2)
pixel_y = rand(-2,2)
update_icon()
@@ -528,18 +521,9 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe("cable restrai
/obj/item/stack/cable_coil/update_icon()
if(!item_color)
item_color = pick("red", "yellow", "blue", "green")
item_state = "coil_[item_color]"
if(amount == 1)
icon_state = "coil_[item_color]1"
name = "cable piece"
else if(amount == 2)
icon_state = "coil_[item_color]2"
name = "cable piece"
else
icon_state = "coil_[item_color]"
name = "cable coil"
icon_state = "[initial(item_state)][amount < 3 ? amount : ""]"
name = "cable [amount < 3 ? "piece" : "coil"]"
add_atom_colour(item_color, FIXED_COLOUR_PRIORITY)
/obj/item/stack/cable_coil/attack_hand(mob/user)
var/obj/item/stack/cable_coil/new_cable = ..()
@@ -562,8 +546,8 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe("cable restrai
//////////////////////////////////////////////
/obj/item/stack/cable_coil/proc/get_new_cable(location)
var/path = "/obj/structure/cable" + (item_color == "red" ? "" : "/" + item_color)
return new path (location)
var/path = /obj/structure/cable
return new path(location, item_color)
// called when cable_coil is clicked on a turf
/obj/item/stack/cable_coil/proc/place_turf(turf/T, mob/user, dirnew)
@@ -714,7 +698,7 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe("cable restrai
return
C.cableColor(item_color)
C.update_icon()
C.d1 = nd1
C.d2 = nd2
@@ -750,11 +734,8 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe("cable restrai
// Misc.
/////////////////////////////
/obj/item/stack/cable_coil/cut
item_state = "coil_red2"
/obj/item/stack/cable_coil/cut/Initialize(mapload)
. =..()
. = ..()
amount = rand(1,2)
pixel_x = rand(-2,2)
pixel_y = rand(-2,2)
@@ -762,42 +743,30 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe("cable restrai
/obj/item/stack/cable_coil/red
item_color = "red"
icon_state = "coil_red"
/obj/item/stack/cable_coil/yellow
item_color = "yellow"
icon_state = "coil_yellow"
/obj/item/stack/cable_coil/blue
item_color = "blue"
icon_state = "coil_blue"
item_state = "coil_blue"
/obj/item/stack/cable_coil/green
item_color = "green"
icon_state = "coil_green"
/obj/item/stack/cable_coil/pink
item_color = "pink"
icon_state = "coil_pink"
/obj/item/stack/cable_coil/orange
item_color = "orange"
icon_state = "coil_orange"
/obj/item/stack/cable_coil/cyan
item_color = "cyan"
icon_state = "coil_cyan"
/obj/item/stack/cable_coil/white
item_color = "white"
icon_state = "coil_white"
/obj/item/stack/cable_coil/random/Initialize(mapload)
. = ..()
item_color = pick("red","orange","yellow","green","cyan","blue","pink","white")
icon_state = "coil_[item_color]"
/obj/item/stack/cable_coil/random
item_color = null
/obj/item/stack/cable_coil/random/five
amount = 5
+11
View File
@@ -15,6 +15,15 @@
var/power_output = 1
var/consumption = 0
var/base_icon = "portgen0"
var/datum/looping_sound/generator/soundloop
/obj/machinery/power/port_gen/Initialize()
. = ..()
soundloop = new(list(src), active)
/obj/machinery/power/port_gen/Destroy()
QDEL_NULL(soundloop)
return ..()
/obj/machinery/power/port_gen/proc/HasFuel() //Placeholder for fuel check.
return 1
@@ -36,11 +45,13 @@
add_avail(power_gen * power_output)
UseFuel()
src.updateDialog()
soundloop.start()
else
active = 0
handleInactive()
update_icon()
soundloop.stop()
/obj/machinery/power/port_gen/attack_hand(mob/user)
if(..())
+1 -2
View File
@@ -60,7 +60,6 @@
else
to_chat(user, "<span class='warning'>The controls are locked!</span>")
return
..()
/obj/machinery/power/rad_collector/can_be_unfasten_wrench(mob/user, silent)
if(loaded_tank)
@@ -167,4 +166,4 @@
#undef RAD_COLLECTOR_EFFICIENCY
#undef RAD_COLLECTOR_COEFFICIENT
#undef RAD_COLLECTOR_STORED_OUT
#undef RAD_COLLECTOR_STORED_OUT
+15 -13
View File
@@ -9,7 +9,6 @@
#define OXYGEN_TRANSMIT_MODIFIER 1.5 //Higher == Bigger bonus to power generation.
#define PLASMA_TRANSMIT_MODIFIER 4
#define FREON_TRANSMIT_PENALTY 0.75 // Scales how much freon reduces total power transmission. 1 equals 1% per 1% of freon in the mix.
#define N2O_HEAT_RESISTANCE 6 //Higher == Gas makes the crystal more resistant against heat damage.
@@ -30,7 +29,7 @@
#define THERMAL_RELEASE_MODIFIER 5 //Higher == less heat released during reaction, not to be confused with the above values
#define PLASMA_RELEASE_MODIFIER 750 //Higher == less plasma released by reaction
#define OXYGEN_RELEASE_MODIFIER 325 //Higher == less oxygen released at high temperature/power
#define FREON_BREEDING_MODIFIER 100 //Higher == less freon created
#define REACTION_POWER_MODIFIER 0.55 //Higher == more overall power
#define MATTER_POWER_CONVERSION 10 //Crystal converts 1/this value of stored matter into energy.
@@ -92,7 +91,6 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_shard)
var/power = 0
var/n2comp = 0 // raw composition of each gas in the chamber, ranges from 0 to 1
var/freoncomp = 0
var/plasmacomp = 0
var/o2comp = 0
@@ -107,7 +105,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_shard)
var/powerloss_dynamic_scaling= 0
var/power_transmission_bonus = 0
var/mole_heat_penalty = 0
var/freon_transmit_modifier = 1
var/matter_power = 0
@@ -135,6 +133,8 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_shard)
var/is_main_engine = FALSE
var/datum/looping_sound/supermatter/soundloop
/obj/machinery/power/supermatter_shard/Initialize()
. = ..()
SSair.atmos_machinery += src
@@ -149,6 +149,8 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_shard)
if(is_main_engine)
GLOB.main_supermatter_engine = src
soundloop = new(list(src), TRUE)
/obj/machinery/power/supermatter_shard/Destroy()
investigate_log("has been destroyed.", INVESTIGATE_SUPERMATTER)
SSair.atmos_machinery -= src
@@ -157,7 +159,8 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_shard)
QDEL_NULL(countdown)
if(is_main_engine && GLOB.main_supermatter_engine == src)
GLOB.main_supermatter_engine = null
. = ..()
QDEL_NULL(soundloop)
return ..()
/obj/machinery/power/supermatter_shard/examine(mob/user)
..()
@@ -251,6 +254,9 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_shard)
if(!istype(T)) //We are in a crate or somewhere that isn't turf, if we return to turf resume processing but for now.
return //Yeah just stop.
if(power)
soundloop.volume = min(50, (round(power, 50)/50)+1) // 5 +1 volume per 20 power. 2500 power is max
//Ok, get the air from the turf
var/datum/gas_mixture/env = T.return_air()
@@ -284,7 +290,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_shard)
if(damage > damage_archived && prob(10))
playsound(get_turf(src), 'sound/effects/empulse.ogg', 50, 1)
removed.assert_gases(/datum/gas/oxygen, /datum/gas/plasma, /datum/gas/carbon_dioxide, /datum/gas/nitrous_oxide, /datum/gas/nitrogen, /datum/gas/freon)
removed.assert_gases(/datum/gas/oxygen, /datum/gas/plasma, /datum/gas/carbon_dioxide, /datum/gas/nitrous_oxide, /datum/gas/nitrogen)
//calculating gas related values
combined_gas = max(removed.total_moles(), 0)
@@ -294,16 +300,15 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_shard)
n2ocomp = max(removed.gases[/datum/gas/nitrous_oxide][MOLES]/combined_gas, 0)
n2comp = max(removed.gases[/datum/gas/nitrogen][MOLES]/combined_gas, 0)
freoncomp = max(removed.gases[/datum/gas/freon][MOLES]/combined_gas, 0)
gasmix_power_ratio = min(max(plasmacomp + o2comp + co2comp - n2comp - freoncomp, 0), 1)
gasmix_power_ratio = min(max(plasmacomp + o2comp + co2comp - n2comp, 0), 1)
dynamic_heat_modifier = max((plasmacomp * PLASMA_HEAT_PENALTY)+(o2comp * OXYGEN_HEAT_PENALTY)+(co2comp * CO2_HEAT_PENALTY)+(n2comp * NITROGEN_HEAT_MODIFIER), 0.5)
dynamic_heat_resistance = max(n2ocomp * N2O_HEAT_RESISTANCE, 1)
power_transmission_bonus = max((plasmacomp * PLASMA_TRANSMIT_MODIFIER) + (o2comp * OXYGEN_TRANSMIT_MODIFIER), 0)
freon_transmit_modifier = max(1-(freoncomp * FREON_TRANSMIT_PENALTY), 0)
//more moles of gases are harder to heat than fewer, so let's scale heat damage around them
mole_heat_penalty = max(combined_gas / MOLE_HEAT_PENALTY, 0.25)
@@ -332,7 +337,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_shard)
power = max( (removed.temperature * temp_factor / T0C) * gasmix_power_ratio + power, 0) //Total laser power plus an overload
if(prob(50))
radiation_pulse(src, power * (1 + power_transmission_bonus/10 * freon_transmit_modifier))
radiation_pulse(src, power * (1 + power_transmission_bonus/10))
var/device_energy = power * REACTION_POWER_MODIFIER
@@ -352,9 +357,6 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_shard)
removed.gases[/datum/gas/oxygen][MOLES] += max(((device_energy + removed.temperature * dynamic_heat_modifier) - T0C) / OXYGEN_RELEASE_MODIFIER, 0)
if(combined_gas < 50)
removed.gases[/datum/gas/freon][MOLES] = max((removed.gases[/datum/gas/freon][MOLES] + device_energy) * freoncomp / FREON_BREEDING_MODIFIER, 0)
if(produces_gas)
env.merge(removed)
air_update_turf()
+1 -1
View File
@@ -139,7 +139,7 @@
#define BRAINS_BLOWN_THROW_RANGE 3
#define BRAINS_BLOWN_THROW_SPEED 1
/obj/item/gun/ballistic/suicide_act(mob/user)
var/obj/item/organ/brain/B = user.getorganslot("brain")
var/obj/item/organ/brain/B = user.getorganslot(ORGAN_SLOT_BRAIN)
if (B && chambered && chambered.BB && can_trigger_gun(user) && !chambered.BB.nodamage)
user.visible_message("<span class='suicide'>[user] is putting the barrel of [src] in [user.p_their()] mouth. It looks like [user.p_theyre()] trying to commit suicide!</span>")
sleep(25)
+14 -10
View File
@@ -132,16 +132,14 @@
if("monkey")
new_mob = new /mob/living/carbon/monkey(M.loc)
if("robot")
var/robot = pick("cyborg","syndiborg","drone")
var/robot = pick("random_cyborg","syndiborg","drone")
var/path
switch(robot)
if("cyborg")
new_mob = new /mob/living/silicon/robot(M.loc)
if("random_cyborg")
path = pick(typesof(/mob/living/silicon/robot/modules) - typesof(/mob/living/silicon/robot/modules/syndicate))
new_mob = new path(M.loc)
if("syndiborg")
var/path
if(prob(50))
path = /mob/living/silicon/robot/modules/syndicate
else
path = /mob/living/silicon/robot/modules/syndicate/medical
path = pick(typesof(/mob/living/silicon/robot/modules/syndicate))
new_mob = new path(M.loc)
if("drone")
new_mob = new /mob/living/simple_animal/drone/polymorphed(M.loc)
@@ -158,9 +156,15 @@
new_mob = new /mob/living/simple_animal/slime/random(M.loc)
if("xeno")
if(prob(50))
new_mob = new /mob/living/carbon/alien/humanoid/hunter(M.loc)
if(!M.ckey) //spawn an AI alien if it isn't a player controlled mob.
new_mob = new /mob/living/simple_animal/hostile/alien(M.loc)
else
new_mob = new /mob/living/carbon/alien/humanoid/hunter(M.loc)
else
new_mob = new /mob/living/carbon/alien/humanoid/sentinel(M.loc)
if(!M.ckey)
new_mob = new /mob/living/simple_animal/hostile/alien/sentinel(M.loc)
else
new_mob = new /mob/living/carbon/alien/humanoid/sentinel(M.loc)
if("animal")
var/path
@@ -30,6 +30,7 @@
/obj/item/stack/sheet/mineral/silver = list("silver" = 20),
/obj/item/stack/sheet/mineral/gold = list("gold" = 20),
/obj/item/stack/sheet/bluespace_crystal = list("bluespace" = 20),
/obj/item/stack/cable_coil = list ("copper" = 5),
/obj/item/ore/bluespace_crystal = list("bluespace" = 20),
/obj/item/grown/nettle/basic = list("sacid" = 0),
/obj/item/grown/nettle/death = list("facid" = 0, "sacid" = 0),
@@ -45,17 +46,39 @@
/obj/item/reagent_containers/food/snacks/grown/cherries = list("cherryjelly" = 0),
/obj/item/reagent_containers/food/snacks/grown/bluecherries = list("bluecherryjelly" = 0),
/obj/item/reagent_containers/food/snacks/egg = list("eggyolk" = -5),
/obj/item/reagent_containers/food/snacks/deadmouse = list ("blood" = 20, "gibs" = 5), // You monster
//Grinder stuff, but only if dry
/obj/item/reagent_containers/food/snacks/grown/coffee/robusta = list("coffeepowder" = 0, "morphine" = 0),
/obj/item/reagent_containers/food/snacks/grown/coffee = list("coffeepowder" = 0),
/obj/item/reagent_containers/food/snacks/grown/tea/astra = list("teapowder" = 0, "salglu_solution" = 0),
/obj/item/reagent_containers/food/snacks/grown/tea = list("teapowder" = 0),
//Stuff that doesn't quite fit in the other categories
/obj/item/electronics = list ("iron" = 10, "silicon" = 10),
/obj/item/circuitboard = list ("silicon" = 20, "sacid" = 0.5), // Retrieving acid this way is extremely inefficient
/obj/item/match = list ("phosphorus" = 2),
/obj/item/device/toner = list ("iodine" = 40, "iron" = 10),
/obj/item/photo = list ("iodine" = 4),
/obj/item/pen = list ("iodine" = 2, "iron" = 1),
/obj/item/reagent_containers/food/drinks/soda_cans = list ("aluminium" = 10),
/obj/item/trash/can = list ("aluminium" = 10),
/obj/item/device/flashlight/flare = list ("sulfur" = 15),
/obj/item/device/flashlight/glowstick = list ("phenol" = 15, "hydrodgen" = 10, "oxygen" = 5),
/obj/item/stock_parts/cell = list ("lithium" = 15, "iron" = 5, "silicon" = 5),
/obj/item/soap = list ("lye" = 10),
/obj/item/device/analyzer = list ("mercury" = 5, "iron" = 5, "silicon" = 5),
/obj/item/lighter = list ("iron" = 1, "weldingfuel" = 5, "oil" = 5),
/obj/item/light = list ("silicon" = 5, "nitrogen" = 10), //Nitrogen is used as a cheaper alternative to argon in incandescent lighbulbs
/obj/item/cigbutt/ = list ("carbon" = 2),
/obj/item/trash/coal = list ("carbon" = 20),
/obj/item/stack/medical/bruise_pack = list ("styptic_powder" = 5),
/obj/item/stack/medical/ointment = list ("silver_sulfadiazine" = 5),
//All types that you can put into the grinder to transfer the reagents to the beaker. !Put all recipes above this.!
/obj/item/slime_extract = list(),
/obj/item/reagent_containers/pill = list(),
/obj/item/reagent_containers/food = list(),
/obj/item/reagent_containers/honeycomb = list(),
/obj/item/toy/crayon = list())
/obj/item/toy/crayon = list(),
/obj/item/clothing/mask/cigarette = list())
var/static/list/juice_items = list(
//Juicer Stuff
@@ -66,7 +66,7 @@
/obj/machinery/smoke_machine/attackby(obj/item/I, mob/user, params)
add_fingerprint(user)
if(istype(I, /obj/item/reagent_containers))
if(istype(I, /obj/item/reagent_containers) && I.is_open_container())
var/obj/item/reagent_containers/RC = I
var/units = RC.reagents.trans_to(src, RC.amount_per_transfer_from_this)
if(units)
@@ -38,7 +38,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
var/mob/living/carbon/human/H = M
if(H.drunkenness < volume * boozepwr * ALCOHOL_THRESHOLD_MODIFIER)
H.drunkenness = max((H.drunkenness + (sqrt(volume) * boozepwr * ALCOHOL_RATE)), 0) //Volume, power, and server alcohol rate effect how quickly one gets drunk
var/obj/item/organ/liver/L = H.getorganslot("liver")
var/obj/item/organ/liver/L = H.getorganslot(ORGAN_SLOT_LIVER)
H.applyLiverDamage((max(sqrt(volume) * boozepwr * L.alcohol_tolerance, 0))/10)
return ..() || .
@@ -550,7 +550,7 @@
if(!M.is_mouth_covered() && !M.is_eyes_covered())
unprotected = TRUE
if(unprotected)
if(!M.getorganslot("eye_sight")) //can't blind somebody with no eyes
if(!M.getorganslot(ORGAN_SLOT_EYES)) //can't blind somebody with no eyes
to_chat(M, "<span class = 'notice'>Your eye sockets feel wet.</span>")
else
if(!M.eye_blurry)

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