mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 12:37:26 +01:00
Merge branch 'bleeding-edge-freeze' of https://github.com/Baystation12/Baystation12
Conflicts: maps/tgstation.2.1.0.0.1.dmm
This commit is contained in:
@@ -1,14 +1,6 @@
|
||||
//node1, air1, network1 correspond to input
|
||||
//node2, air2, network2 correspond to output
|
||||
|
||||
#define CIRCULATOR_MIN_PRESSURE 10 //KPA to move the mechanism
|
||||
#define CIRCULATOR_VOLUME 100 //Litres
|
||||
#define CIRCULATOR_EFFICIENCY 0.65 //Out of 1.
|
||||
|
||||
#define TURBINE_EFFICIENCY 0.1 //Uses more power than is generated.
|
||||
#define TURBINE_PRESSURE_DIFFERENCE 20 //Simulates a 20KPa difference
|
||||
#define GENRATE 800
|
||||
|
||||
/obj/machinery/atmospherics/binary/circulator
|
||||
name = "circulator/heat exchanger"
|
||||
desc = "A gas circulator pump and heat exchanger."
|
||||
@@ -16,97 +8,60 @@
|
||||
icon_state = "circ-off"
|
||||
anchored = 0
|
||||
|
||||
//var/side = 1 // 1=left 2=right
|
||||
var/status = 0
|
||||
|
||||
var/datum/gas_mixture/gas_contents
|
||||
var/recent_moles_transferred = 0
|
||||
var/last_heat_capacity = 0
|
||||
var/last_temperature = 0
|
||||
var/last_pressure_delta = 0
|
||||
var/turbine_pumping = 0 //For when there is not enough pressure difference and we need to induce one or something.
|
||||
var/last_power_generation = 0
|
||||
var/last_worldtime_transfer = 0
|
||||
|
||||
density = 1
|
||||
|
||||
/obj/machinery/atmospherics/binary/circulator/New()
|
||||
..()
|
||||
desc = initial(desc) + " Its outlet port is to the [dir2text(dir)]."
|
||||
gas_contents = new
|
||||
gas_contents.volume = CIRCULATOR_VOLUME
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/binary/circulator/proc/return_transfer_air()
|
||||
if(!anchored)
|
||||
return null
|
||||
var/datum/gas_mixture/removed
|
||||
if(anchored && !(stat&BROKEN) )
|
||||
var/input_starting_pressure = air1.return_pressure()
|
||||
var/output_starting_pressure = air2.return_pressure()
|
||||
last_pressure_delta = max(input_starting_pressure - output_starting_pressure + 10, 0)
|
||||
|
||||
var/output_starting_pressure = air2.return_pressure()
|
||||
var/input_starting_pressure = air1.return_pressure()
|
||||
var/internal_gas_pressure = gas_contents.return_pressure()
|
||||
//only circulate air if there is a pressure difference (plus 10 kPa to represent friction in the machine)
|
||||
if(air1.temperature > 0 && last_pressure_delta > 0)
|
||||
|
||||
var/intake_pressure_delta = input_starting_pressure - internal_gas_pressure
|
||||
var/output_pressure_delta = internal_gas_pressure - output_starting_pressure
|
||||
//Calculate necessary moles to transfer using PV = nRT
|
||||
recent_moles_transferred = last_pressure_delta*air2.volume/(air1.temperature * R_IDEAL_GAS_EQUATION)
|
||||
|
||||
var/pressure_delta = max(intake_pressure_delta, output_pressure_delta, 0)
|
||||
//Actually transfer the gas
|
||||
removed = air1.remove(recent_moles_transferred)
|
||||
if(removed)
|
||||
last_heat_capacity = removed.heat_capacity()
|
||||
last_temperature = removed.temperature
|
||||
|
||||
last_power_generation = 0
|
||||
//If the turbine is running, we need to consider that.
|
||||
if(turbine_pumping)
|
||||
//Make it use powah
|
||||
if(pressure_delta < TURBINE_PRESSURE_DIFFERENCE)
|
||||
last_power_generation = (pressure_delta - TURBINE_PRESSURE_DIFFERENCE)*(1/TURBINE_EFFICIENCY)
|
||||
pressure_delta = TURBINE_PRESSURE_DIFFERENCE
|
||||
//Update the gas networks.
|
||||
if(network1)
|
||||
network1.update = 1
|
||||
|
||||
//If the force is already above what the turbine can do, shut it off and generate power instead!
|
||||
last_worldtime_transfer = world.time
|
||||
else
|
||||
turbine_pumping = 0
|
||||
|
||||
//Calculate necessary moles to transfer using PV = nRT
|
||||
if(air1.temperature > 0)
|
||||
|
||||
var/transfer_moles = pressure_delta*gas_contents.volume/(air1.temperature * R_IDEAL_GAS_EQUATION)
|
||||
|
||||
last_pressure_delta = pressure_delta
|
||||
|
||||
//Actually transfer the gas
|
||||
//Internal to output.
|
||||
air2.merge(gas_contents.remove(transfer_moles))
|
||||
|
||||
//Intake to internal.
|
||||
gas_contents.merge(air1.remove(transfer_moles))
|
||||
|
||||
//Update the gas networks.
|
||||
if(network1)
|
||||
network1.update = 1
|
||||
|
||||
if(network2)
|
||||
network2.update = 1
|
||||
|
||||
else
|
||||
last_pressure_delta = 0
|
||||
|
||||
//Needs at least 10 KPa difference to move the mechanism and make power
|
||||
if(pressure_delta < CIRCULATOR_MIN_PRESSURE)
|
||||
last_pressure_delta = 0
|
||||
|
||||
last_power_generation += pressure_delta*CIRCULATOR_EFFICIENCY
|
||||
|
||||
return gas_contents
|
||||
|
||||
|
||||
|
||||
//Used by the TEG to know how much power to use/produce.
|
||||
/obj/machinery/atmospherics/binary/circulator/proc/ReturnPowerGeneration()
|
||||
return GENRATE*last_power_generation
|
||||
recent_moles_transferred = 0
|
||||
|
||||
update_icon()
|
||||
return removed
|
||||
|
||||
/obj/machinery/atmospherics/binary/circulator/process()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
if(last_worldtime_transfer < world.time - 50)
|
||||
recent_moles_transferred = 0
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/binary/circulator/update_icon()
|
||||
if(stat & (BROKEN|NOPOWER) || !anchored)
|
||||
icon_state = "circ-p"
|
||||
else if(last_pressure_delta > 0)
|
||||
if(last_pressure_delta > ONE_ATMOSPHERE)
|
||||
else if(last_pressure_delta > 0 && recent_moles_transferred > 0)
|
||||
if(last_pressure_delta > 5*ONE_ATMOSPHERE)
|
||||
icon_state = "circ-run"
|
||||
else
|
||||
icon_state = "circ-slow"
|
||||
|
||||
@@ -163,11 +163,11 @@ Deuterium-tritium fusion: 4.5 x 10^7 K
|
||||
React()
|
||||
|
||||
//forcibly radiate any excess energy
|
||||
var/energy_max = transfer_ratio * 100000
|
||||
/*var/energy_max = transfer_ratio * 100000
|
||||
if(mega_energy > energy_max)
|
||||
var/energy_lost = rand( 1.5 * (mega_energy - energy_max), 2.5 * (mega_energy - energy_max) )
|
||||
mega_energy -= energy_lost
|
||||
radiation += energy_lost
|
||||
radiation += energy_lost*/
|
||||
|
||||
//change held plasma temp according to energy levels
|
||||
//SPECIFIC_HEAT_TOXIN
|
||||
@@ -200,12 +200,14 @@ Deuterium-tritium fusion: 4.5 x 10^7 K
|
||||
//held_plasma.update_values()
|
||||
|
||||
//handle some reactants formatting
|
||||
//helium-4 has no use at the moment, but a buttload of it is produced
|
||||
if(dormant_reactant_quantities["Helium-4"] > 1000)
|
||||
dormant_reactant_quantities["Helium-4"] = rand(0,dormant_reactant_quantities["Helium-4"])
|
||||
for(var/reactant in dormant_reactant_quantities)
|
||||
if(!dormant_reactant_quantities[reactant])
|
||||
var/amount = dormant_reactant_quantities[reactant]
|
||||
if(amount < 1)
|
||||
dormant_reactant_quantities.Remove(reactant)
|
||||
else if(amount >= 1000000)
|
||||
var/radiate = rand(3 * amount / 4, amount / 4)
|
||||
dormant_reactant_quantities[reactant] -= radiate
|
||||
radiation += radiate
|
||||
|
||||
return 1
|
||||
|
||||
@@ -236,6 +238,10 @@ Deuterium-tritium fusion: 4.5 x 10^7 K
|
||||
energy += a_energy - a_energy * energy_loss_ratio
|
||||
mega_energy += a_mega_energy - a_mega_energy * energy_loss_ratio
|
||||
|
||||
while(energy > 100000)
|
||||
energy -= 100000
|
||||
mega_energy += 0.1
|
||||
|
||||
/obj/effect/rust_em_field/proc/AddParticles(var/name, var/quantity = 1)
|
||||
if(name in dormant_reactant_quantities)
|
||||
dormant_reactant_quantities[name] += quantity
|
||||
@@ -296,9 +302,7 @@ Deuterium-tritium fusion: 4.5 x 10^7 K
|
||||
return changed
|
||||
|
||||
//the !!fun!! part
|
||||
//reactions have to be individually hardcoded, see AttemptReaction() below this
|
||||
/obj/effect/rust_em_field/proc/React()
|
||||
//world << "React()"
|
||||
//loop through the reactants in random order
|
||||
var/list/reactants_reacting_pool = dormant_reactant_quantities.Copy()
|
||||
/*
|
||||
@@ -316,8 +320,8 @@ Deuterium-tritium fusion: 4.5 x 10^7 K
|
||||
if(!reactants_reacting_pool[reactant])
|
||||
reactants_reacting_pool -= reactant
|
||||
|
||||
var/list/produced_reactants = new/list
|
||||
//loop through all the reacting reagents, picking out random reactions for them
|
||||
var/list/produced_reactants = new/list
|
||||
var/list/primary_reactant_pool = reactants_reacting_pool.Copy()
|
||||
while(primary_reactant_pool.len)
|
||||
//pick one of the unprocessed reacting reagents randomly
|
||||
@@ -331,95 +335,80 @@ Deuterium-tritium fusion: 4.5 x 10^7 K
|
||||
possible_secondary_reactants[cur_primary_reactant] -= 1
|
||||
if(possible_secondary_reactants[cur_primary_reactant] < 1)
|
||||
possible_secondary_reactants.Remove(cur_primary_reactant)
|
||||
var/list/possible_reactions = new/list
|
||||
|
||||
//loop through and work out all the possible reactions
|
||||
while(possible_secondary_reactants.len)
|
||||
var/cur_secondary_reactant = pick(possible_secondary_reactants)
|
||||
var/list/possible_reactions = new/list
|
||||
for(var/cur_secondary_reactant in possible_secondary_reactants)
|
||||
if(possible_secondary_reactants[cur_secondary_reactant] < 1)
|
||||
possible_secondary_reactants.Remove(cur_secondary_reactant)
|
||||
continue
|
||||
possible_secondary_reactants.Remove(cur_secondary_reactant)
|
||||
var/list/reaction_products = AttemptReaction(cur_primary_reactant, cur_secondary_reactant)
|
||||
if(reaction_products.len)
|
||||
var/datum/fusion_reaction/cur_reaction = get_fusion_reaction(cur_primary_reactant, cur_secondary_reactant)
|
||||
if(cur_reaction)
|
||||
//world << "\blue secondary reactant: [cur_secondary_reactant], [reaction_products.len]"
|
||||
possible_reactions[cur_secondary_reactant] = reaction_products
|
||||
possible_reactions.Add(cur_reaction)
|
||||
|
||||
//if there are no possible reactions here, abandon this primary reactant and move on
|
||||
if(!possible_reactions.len)
|
||||
//world << "\blue no reactions"
|
||||
continue
|
||||
|
||||
//split up the reacting atoms between the possible reactions
|
||||
//the problem is in this while statement below
|
||||
while(possible_reactions.len)
|
||||
//pick another substance to react with
|
||||
var/cur_secondary_reactant = pick(possible_reactions)
|
||||
if(!reactants_reacting_pool[cur_secondary_reactant])
|
||||
possible_reactions.Remove(cur_secondary_reactant)
|
||||
continue
|
||||
var/list/cur_reaction_products = possible_reactions[cur_secondary_reactant]
|
||||
//pick a random substance to react with
|
||||
var/datum/fusion_reaction/cur_reaction = pick(possible_reactions)
|
||||
possible_reactions.Remove(cur_reaction)
|
||||
|
||||
//set the randmax to be the lower of the two involved reactants
|
||||
var/max_num_reactants = reactants_reacting_pool[cur_primary_reactant] > reactants_reacting_pool[cur_secondary_reactant] ? reactants_reacting_pool[cur_secondary_reactant] : reactants_reacting_pool[cur_primary_reactant]
|
||||
var/max_num_reactants = reactants_reacting_pool[cur_reaction.primary_reactant] > reactants_reacting_pool[cur_reaction.secondary_reactant] ? \
|
||||
reactants_reacting_pool[cur_reaction.secondary_reactant] : reactants_reacting_pool[cur_reaction.primary_reactant]
|
||||
if(max_num_reactants < 1)
|
||||
continue
|
||||
|
||||
//make sure we have enough energy
|
||||
if( mega_energy < max_num_reactants*cur_reaction_products["consumption"])
|
||||
max_num_reactants = round(mega_energy / cur_reaction_products["consumption"])
|
||||
if(mega_energy < max_num_reactants * cur_reaction.energy_consumption)
|
||||
max_num_reactants = round(mega_energy / cur_reaction.energy_consumption)
|
||||
if(max_num_reactants < 1)
|
||||
continue
|
||||
|
||||
//randomly determined amount to react
|
||||
var/amount_reacting = rand(1, max_num_reactants)
|
||||
|
||||
//removing the reacting substances from the list of substances that are primed to react this cycle
|
||||
//if there aren't enough of that substance (there should be) then modify the reactant amounts accordingly
|
||||
if( reactants_reacting_pool[cur_primary_reactant] - amount_reacting > -1 )
|
||||
reactants_reacting_pool[cur_primary_reactant] -= amount_reacting
|
||||
if( reactants_reacting_pool[cur_reaction.primary_reactant] - amount_reacting >= 0 )
|
||||
reactants_reacting_pool[cur_reaction.primary_reactant] -= amount_reacting
|
||||
else
|
||||
amount_reacting = reactants_reacting_pool[cur_primary_reactant]
|
||||
reactants_reacting_pool[cur_primary_reactant] = 0
|
||||
//
|
||||
if( reactants_reacting_pool[cur_secondary_reactant] - amount_reacting > -1 )
|
||||
reactants_reacting_pool[cur_secondary_reactant] -= amount_reacting
|
||||
amount_reacting = reactants_reacting_pool[cur_reaction.primary_reactant]
|
||||
reactants_reacting_pool[cur_reaction.primary_reactant] = 0
|
||||
//same again for secondary reactant
|
||||
if( reactants_reacting_pool[cur_reaction.secondary_reactant] - amount_reacting >= 0 )
|
||||
reactants_reacting_pool[cur_reaction.secondary_reactant] -= amount_reacting
|
||||
else
|
||||
reactants_reacting_pool[cur_primary_reactant] += amount_reacting - reactants_reacting_pool[cur_primary_reactant]
|
||||
amount_reacting = reactants_reacting_pool[cur_secondary_reactant]
|
||||
reactants_reacting_pool[cur_secondary_reactant] = 0
|
||||
reactants_reacting_pool[cur_reaction.primary_reactant] += amount_reacting - reactants_reacting_pool[cur_reaction.primary_reactant]
|
||||
amount_reacting = reactants_reacting_pool[cur_reaction.secondary_reactant]
|
||||
reactants_reacting_pool[cur_reaction.secondary_reactant] = 0
|
||||
|
||||
//remove the consumed energy
|
||||
if(cur_reaction_products["consumption"])
|
||||
mega_energy -= max_num_reactants * cur_reaction_products["consumption"]
|
||||
cur_reaction_products.Remove("consumption")
|
||||
mega_energy -= max_num_reactants * cur_reaction.energy_consumption
|
||||
|
||||
//grab any radiation and put it separate
|
||||
//var/new_radiation = 0
|
||||
if("production" in cur_reaction_products)
|
||||
mega_energy += max_num_reactants * cur_reaction_products["production"]
|
||||
cur_reaction_products.Remove("production")
|
||||
/*for(var/i=0, i<dormant_reactant_quantities["proton_quantity"], i++)
|
||||
radiation.Add("proton")
|
||||
radiation_charge.Add(dormant_reactant_quantities["proton_charge"])
|
||||
dormant_reactant_quantities.Remove("proton_quantity")
|
||||
dormant_reactant_quantities.Remove("proton_charge")
|
||||
new_radiation = 1*/
|
||||
//
|
||||
if("radiation" in cur_reaction_products)
|
||||
radiation += max_num_reactants * cur_reaction_products["radiation"]
|
||||
cur_reaction_products.Remove("radiation")
|
||||
/*for(var/i=0, i<dormant_reactant_quantities["neutron_quantity"], i++)
|
||||
radiation.Add("neutron")
|
||||
radiation_charge.Add(dormant_reactant_quantities["neutron_charge"])
|
||||
dormant_reactant_quantities.Remove("neutron_quantity")
|
||||
dormant_reactant_quantities.Remove("neutron_charge")
|
||||
new_radiation = 1*/
|
||||
//add any produced energy
|
||||
mega_energy += max_num_reactants * cur_reaction.energy_production
|
||||
|
||||
//add any produced radiation
|
||||
radiation += max_num_reactants * cur_reaction.radiation
|
||||
|
||||
//create the reaction products
|
||||
for(var/reactant in cur_reaction_products)
|
||||
if(produced_reactants[reactant])
|
||||
produced_reactants[reactant] += cur_reaction_products[reactant] * amount_reacting
|
||||
else
|
||||
produced_reactants[reactant] = cur_reaction_products[reactant] * amount_reacting
|
||||
for(var/reactant in cur_reaction.products)
|
||||
var/success = 0
|
||||
for(var/check_reactant in produced_reactants)
|
||||
if(check_reactant == reactant)
|
||||
produced_reactants[reactant] += cur_reaction.products[reactant] * amount_reacting
|
||||
success = 1
|
||||
break
|
||||
if(!success)
|
||||
produced_reactants[reactant] = cur_reaction.products[reactant] * amount_reacting
|
||||
|
||||
//this reaction is done, and can't be repeated this sub-cycle
|
||||
possible_reactions.Remove(cur_secondary_reactant)
|
||||
possible_reactions.Remove(cur_reaction.secondary_reactant)
|
||||
|
||||
//
|
||||
/*if(new_radiation)
|
||||
@@ -431,7 +420,7 @@ Deuterium-tritium fusion: 4.5 x 10^7 K
|
||||
//var/list/neutronic_radiation = new
|
||||
//var/list/protonic_radiation = new
|
||||
for(var/reactant in produced_reactants)
|
||||
AddParticles(reactant, dormant_reactant_quantities[reactant])
|
||||
AddParticles(reactant, produced_reactants[reactant])
|
||||
//world << "produced: [reactant], [dormant_reactant_quantities[reactant]]"
|
||||
|
||||
//check whether there are reactants left, and add them back to the pool
|
||||
@@ -439,213 +428,6 @@ Deuterium-tritium fusion: 4.5 x 10^7 K
|
||||
AddParticles(reactant, reactants_reacting_pool[reactant])
|
||||
//world << "retained: [reactant], [reactants_reacting_pool[reactant]]"
|
||||
|
||||
//default fuel assembly quantities
|
||||
/*
|
||||
//new_assembly_quantities["Helium-3"] = 0
|
||||
//new_assembly_quantities["Deuterium"] = 200
|
||||
//new_assembly_quantities["Tritium"] = 100
|
||||
//new_assembly_quantities["Lithium-6"] = 0
|
||||
//new_assembly_quantities["Silver"] = 0
|
||||
*/
|
||||
|
||||
//reactions involving D-T (hydrogen) need 0.1 MeV of core energy
|
||||
//reactions involving helium require 0.4 MeV of energy
|
||||
//reactions involving lithium require 0.6 MeV of energy
|
||||
//reactions involving boron require 1 MeV of energy
|
||||
//returns a list of products, or an empty list if no reaction possible
|
||||
/obj/effect/rust_em_field/proc/AttemptReaction(var/reactant_one, var/reactant_two)
|
||||
//any charge on the atomic reactants / protons produced is abstracted away to enter the core energy pool straightaway
|
||||
//atomic products remain in the core and produce more reactions next cycle
|
||||
//any charged neutrons escape as radiation
|
||||
var/check = 1
|
||||
recheck_reactions:
|
||||
var/list/products = new/list
|
||||
switch(reactant_one)
|
||||
if("Tritium")
|
||||
switch(reactant_two)
|
||||
if("Tritium")
|
||||
if(mega_energy > 0.1)
|
||||
products["Helium-4"] = 1
|
||||
//
|
||||
products["production"] = 11.3
|
||||
products["radiation"] = 1
|
||||
/*products["photon"] = 11.3
|
||||
//
|
||||
products["neutron_quantity"] = 1
|
||||
products["neutron_charge"] = 0*/
|
||||
//
|
||||
mega_energy -= 0.1
|
||||
if("Deuterium")
|
||||
if(mega_energy > 0.1)
|
||||
products["Helium-4"] = 1
|
||||
//
|
||||
products["production"] = 3.5
|
||||
products["radiation"] = 14.1
|
||||
/*products["photon"] = 3.5
|
||||
//
|
||||
products["neutron_quantity"] = 1
|
||||
products["neutron_charge"] = 14.1
|
||||
//
|
||||
products["consumption"] = 0.1*/
|
||||
if("Helium-3")
|
||||
if(mega_energy > 0.4)
|
||||
if(prob(51))
|
||||
products["Helium-4"] = 1
|
||||
//
|
||||
products["production"] = 13.1
|
||||
products["radiation"] = 1
|
||||
/*products["photon"] = 12.1
|
||||
//
|
||||
products["proton_quantity"] = 1
|
||||
products["proton_charge"] = 0
|
||||
//
|
||||
products["neutron_quantity"] = 1
|
||||
products["neutron_charge"] = 0*/
|
||||
else if (prob(43))
|
||||
products["Helium-4"] = 1
|
||||
products["Deuterium"] = 1
|
||||
//
|
||||
products["production"] = 14.3
|
||||
/*products["photon"] = 4.8 + 9.5//14.3
|
||||
*/
|
||||
else
|
||||
products["Helium-4"] = 1
|
||||
products["production"] = 2.4
|
||||
products["radiation"] = 11.9
|
||||
/*products["photon"] = 0.5//12.4
|
||||
//
|
||||
products["proton_quantity"] = 1
|
||||
products["proton_charge"] = 1.9
|
||||
//
|
||||
products["neutron_quantity"] = 1
|
||||
products["neutron_charge"] = 11.9*/
|
||||
//
|
||||
products["consumption"] = 0.4
|
||||
if("Deuterium")
|
||||
switch(reactant_two)
|
||||
if("Deuterium")
|
||||
if(mega_energy > 0.1)
|
||||
if(prob(50))
|
||||
products["Tritium"] = 1
|
||||
//
|
||||
products["production"] = 4.03
|
||||
/*products["photon"] = 1.01
|
||||
//
|
||||
products["proton_quantity"] = 1
|
||||
products["proton_charge"] = 3.02*/
|
||||
else
|
||||
products["Helium-3"] = 1
|
||||
//
|
||||
products["production"] = 0.82
|
||||
products["radiation"] = 2.45
|
||||
/*products["photon"] = 0.82
|
||||
//
|
||||
products["neutron_quantity"] = 1
|
||||
products["neutron_charge"] = 2.45*/
|
||||
//
|
||||
products["consumption"] = 0.1
|
||||
if("Helium-3")
|
||||
if(mega_energy > 0.4)
|
||||
products["Helium-4"] = 1
|
||||
//
|
||||
products["production"] = 18.3
|
||||
/*products["photon"] = 3.6
|
||||
//
|
||||
products["proton_quantity"] = 1
|
||||
products["proton_charge"] = 14.7*/
|
||||
//
|
||||
products["consumption"] = 0.4
|
||||
if("Lithium-6")
|
||||
if(mega_energy > 0.6)
|
||||
if(prob(25))
|
||||
products["Helium-4"] = 2
|
||||
products["production"] = 1
|
||||
/*products["photon"] = 22.4*/
|
||||
else if(prob(33))
|
||||
products["Helium-3"] = 1
|
||||
products["Helium-4"] = 1
|
||||
//
|
||||
products["radiation"] = 1
|
||||
/*products["neutron_quantity"] = 1
|
||||
products["neutron_charge"] = 0*/
|
||||
else if(prob(50))
|
||||
products["Lithium-7"] = 1
|
||||
//
|
||||
products["production"] = 1
|
||||
/*products["proton_quantity"] = 1
|
||||
products["proton_charge"] = 0*/
|
||||
else
|
||||
products["Beryllium-7"] = 1
|
||||
products["production"] = 3.4
|
||||
products["radiation"] = 1
|
||||
/*products["photon"] = 3.4
|
||||
//
|
||||
products["neutron_quantity"] = 1
|
||||
products["neutron_charge"] = 0*/
|
||||
//
|
||||
products["consumption"] = 0.6
|
||||
if("Helium-3")
|
||||
switch(reactant_two)
|
||||
if("Helium-3")
|
||||
if(mega_energy > 0.4)
|
||||
products["Helium-4"] = 1
|
||||
products["production"] = 14.9
|
||||
/*products["photon"] = 12.9
|
||||
//
|
||||
products["proton_quantity"] = 2
|
||||
products["proton_charge"] = 0*/
|
||||
//
|
||||
products["consumption"] = 0.4
|
||||
if("Lithium-6")
|
||||
if(mega_energy > 0.6)
|
||||
products["Helium-4"] = 2
|
||||
//
|
||||
products["production"] = 17.9
|
||||
/*products["photon"] = 16.9
|
||||
//
|
||||
products["proton_quantity"] = 1
|
||||
products["proton_charge"] = 0*/
|
||||
//
|
||||
products["consumption"] = 0.6
|
||||
/*
|
||||
if("proton")
|
||||
switch(reactant_two)
|
||||
if("Lithium-6")
|
||||
if(mega_energy > 0.6)
|
||||
products["Helium-4"] = 1
|
||||
products["Helium-3"] = 1
|
||||
products["photon"] = 4
|
||||
//
|
||||
mega_energy -= 0.6
|
||||
if("Boron-11")
|
||||
if(mega_energy > 1)
|
||||
products["Helium-4"] = 3
|
||||
products["photon"] = 8.7
|
||||
//
|
||||
mega_energy -= 1
|
||||
*/
|
||||
|
||||
//if no reaction happened, switch the two reactants and try again
|
||||
if(!products.len && check)
|
||||
check = 0
|
||||
var/temp = reactant_one
|
||||
reactant_one = reactant_two
|
||||
reactant_two = temp
|
||||
goto recheck_reactions
|
||||
/*if(products.len)
|
||||
world << "\blue [reactant_one] + [reactant_two] reaction occured"
|
||||
for(var/reagent in products)
|
||||
world << "\blue [reagent]: [products[reagent]]"*/
|
||||
/*if(products["neutron"])
|
||||
products -= "neutron"
|
||||
if(products["proton"])
|
||||
products -= "proton"
|
||||
if(products["photon"])
|
||||
products -= "photon"
|
||||
if(products["radiated charge"])
|
||||
products -= "radiated charge"*/
|
||||
return products
|
||||
|
||||
/obj/effect/rust_em_field/Del()
|
||||
//radiate everything in one giant burst
|
||||
for(var/obj/effect/rust_particle_catcher/catcher in particle_catchers)
|
||||
|
||||
@@ -282,6 +282,6 @@ max volume of plasma storeable by the field = the total volume of a number of ti
|
||||
return 0
|
||||
|
||||
/obj/machinery/power/rust_core/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(Proj.flag != "bullet" && owned_field)
|
||||
owned_field.AddEnergy(Proj.damage, 0, 1)
|
||||
if(owned_field)
|
||||
return owned_field.bullet_act(Proj)
|
||||
return 0
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
name = "Fuel Rod Assembly"
|
||||
var/list/rod_quantities
|
||||
var/percent_depleted = 1
|
||||
layer = 3.1
|
||||
//
|
||||
New()
|
||||
rod_quantities = new/list
|
||||
|
||||
@@ -64,14 +64,14 @@
|
||||
|
||||
/obj/machinery/rust_fuel_assembly_port/proc/eject_assembly()
|
||||
if(cur_assembly)
|
||||
cur_assembly.loc = get_step(get_turf(src), src.dir)
|
||||
cur_assembly.loc = src.loc//get_step(get_turf(src), src.dir)
|
||||
cur_assembly = null
|
||||
icon_state = "port0"
|
||||
return 1
|
||||
|
||||
/obj/machinery/rust_fuel_assembly_port/proc/try_draw_assembly()
|
||||
var/success = 0
|
||||
if(cur_assembly)
|
||||
if(!cur_assembly)
|
||||
var/turf/check_turf = get_step(get_turf(src), src.dir)
|
||||
check_turf = get_step(check_turf, src.dir)
|
||||
for(var/obj/machinery/power/rust_fuel_injector/I in check_turf)
|
||||
@@ -89,31 +89,14 @@
|
||||
I.cur_assembly = null
|
||||
icon_state = "port1"
|
||||
success = 1
|
||||
break
|
||||
|
||||
return success
|
||||
|
||||
/*
|
||||
/obj/machinery/rust_fuel_assembly_port/verb/try_insert_assembly_verb()
|
||||
set name = "Attempt to insert assembly from port into injector"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if(!busy)
|
||||
try_insert_assembly()
|
||||
|
||||
/obj/machinery/rust_fuel_assembly_port/verb/eject_assembly_verb()
|
||||
set name = "Attempt to eject assembly from port"
|
||||
set name = "Eject assembly from port"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if(!busy)
|
||||
eject_assembly()
|
||||
eject_assembly()
|
||||
|
||||
/obj/machinery/rust_fuel_assembly_port/verb/try_draw_assembly_verb()
|
||||
set name = "Draw assembly from injector"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if(!busy)
|
||||
try_draw_assembly()
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,7 @@ var/const/max_assembly_amount = 300
|
||||
icon = 'code/WorkInProgress/Cael_Aislinn/Rust/rust.dmi'
|
||||
icon_state = "fuel_compressor1"
|
||||
name = "Fuel Compressor"
|
||||
var/list/new_assembly_quantities = list("Deuterium" = 200,"Tritium" = 100,"Helium-3" = 0,"Lithium-6" = 0,"Silver" = 0)
|
||||
var/list/new_assembly_quantities = list("Deuterium" = 150,"Tritium" = 150,"Rodinium-6" = 0,"Stravium-7" = 0, "Pergium" = 0, "Dilithium" = 0)
|
||||
var/compressed_matter = 0
|
||||
anchored = 1
|
||||
layer = 2.9
|
||||
@@ -79,12 +79,16 @@ var/const/max_assembly_amount = 300
|
||||
var/fail = 0
|
||||
var/old_matter = compressed_matter
|
||||
for(var/reagent in new_assembly_quantities)
|
||||
var/req_matter = new_assembly_quantities[reagent] / 30
|
||||
var/req_matter = round(new_assembly_quantities[reagent] / 30)
|
||||
//world << "[reagent] matter: [req_matter]/[compressed_matter]"
|
||||
if(req_matter <= compressed_matter)
|
||||
F.rod_quantities[reagent] = new_assembly_quantities[reagent]
|
||||
compressed_matter -= req_matter
|
||||
if(compressed_matter < 1)
|
||||
compressed_matter = 0
|
||||
else
|
||||
/*world << "bad reagent: [reagent], [req_matter > compressed_matter ? "req_matter > compressed_matter"\
|
||||
: (req_matter < compressed_matter ? "req_matter < compressed_matter" : "req_matter == compressed_matter")]"*/
|
||||
fail = 1
|
||||
break
|
||||
//world << "\blue [reagent]: new_assembly_quantities[reagent]<br>"
|
||||
@@ -93,7 +97,7 @@ var/const/max_assembly_amount = 300
|
||||
compressed_matter = old_matter
|
||||
usr << "\red \icon[src] [src] flashes red: \'Out of matter.\'"
|
||||
else
|
||||
F.loc = get_step(get_turf(src), src.dir)
|
||||
F.loc = src.loc//get_step(get_turf(src), src.dir)
|
||||
F.percent_depleted = 0
|
||||
if(compressed_matter < 0.034)
|
||||
compressed_matter = 0
|
||||
|
||||
@@ -179,11 +179,7 @@
|
||||
id_tag = input("Enter new ID tag", "Modifying ID tag") as text|null
|
||||
|
||||
if( href_list["fuel_assembly"] )
|
||||
if(!trying_to_swap_fuel)
|
||||
trying_to_swap_fuel = 1
|
||||
spawn(50)
|
||||
attempt_fuel_swap()
|
||||
trying_to_swap_fuel = 0
|
||||
attempt_fuel_swap()
|
||||
|
||||
if( href_list["emergency_fuel_assembly"] )
|
||||
if(cur_assembly)
|
||||
@@ -290,3 +286,23 @@
|
||||
updateDialog()
|
||||
else
|
||||
src.visible_message("\red \icon[src] a red light flashes on [src].")
|
||||
|
||||
/obj/machinery/power/rust_fuel_injector/verb/rotate_clock()
|
||||
set category = "Object"
|
||||
set name = "Rotate Generator (Clockwise)"
|
||||
set src in view(1)
|
||||
|
||||
if (usr.stat || usr.restrained() || anchored)
|
||||
return
|
||||
|
||||
src.dir = turn(src.dir, 90)
|
||||
|
||||
/obj/machinery/power/rust_fuel_injector/verb/rotate_anticlock()
|
||||
set category = "Object"
|
||||
set name = "Rotate Generator (Counterclockwise)"
|
||||
set src in view(1)
|
||||
|
||||
if (usr.stat || usr.restrained() || anchored)
|
||||
return
|
||||
|
||||
src.dir = turn(src.dir, -90)
|
||||
@@ -0,0 +1,160 @@
|
||||
|
||||
datum/fusion_reaction
|
||||
var/primary_reactant = ""
|
||||
var/secondary_reactant = ""
|
||||
var/energy_consumption = 0
|
||||
var/energy_production = 0
|
||||
var/radiation = 0
|
||||
var/list/products = list()
|
||||
|
||||
/datum/controller/game_controller/var/list/fusion_reactions
|
||||
|
||||
proc/get_fusion_reaction(var/primary_reactant, var/secondary_reactant)
|
||||
if(!master_controller.fusion_reactions)
|
||||
populate_fusion_reactions()
|
||||
if(master_controller.fusion_reactions.Find(primary_reactant))
|
||||
var/list/secondary_reactions = master_controller.fusion_reactions[primary_reactant]
|
||||
if(secondary_reactions.Find(secondary_reactant))
|
||||
return master_controller.fusion_reactions[primary_reactant][secondary_reactant]
|
||||
|
||||
proc/populate_fusion_reactions()
|
||||
if(!master_controller.fusion_reactions)
|
||||
master_controller.fusion_reactions = list()
|
||||
for(var/cur_reaction_type in typesof(/datum/fusion_reaction) - /datum/fusion_reaction)
|
||||
var/datum/fusion_reaction/cur_reaction = new cur_reaction_type()
|
||||
if(!master_controller.fusion_reactions[cur_reaction.primary_reactant])
|
||||
master_controller.fusion_reactions[cur_reaction.primary_reactant] = list()
|
||||
master_controller.fusion_reactions[cur_reaction.primary_reactant][cur_reaction.secondary_reactant] = cur_reaction
|
||||
if(!master_controller.fusion_reactions[cur_reaction.secondary_reactant])
|
||||
master_controller.fusion_reactions[cur_reaction.secondary_reactant] = list()
|
||||
master_controller.fusion_reactions[cur_reaction.secondary_reactant][cur_reaction.primary_reactant] = cur_reaction
|
||||
|
||||
//Fake elements and fake reactions, but its nicer gameplay-wise
|
||||
//Deuterium
|
||||
//Tritium
|
||||
//Uridium-3
|
||||
//Obdurium
|
||||
//Solonium
|
||||
//Rodinium-6
|
||||
//Dilithium
|
||||
//Trilithium
|
||||
//Pergium
|
||||
//Stravium-7
|
||||
|
||||
//Primary Production Reactions
|
||||
|
||||
datum/fusion_reaction/tritium_deuterium
|
||||
primary_reactant = "Tritium"
|
||||
secondary_reactant = "Deuterium"
|
||||
energy_consumption = 1
|
||||
energy_production = 5
|
||||
radiation = 0
|
||||
|
||||
//Secondary Production Reactions
|
||||
|
||||
datum/fusion_reaction/deuterium_deuterium
|
||||
primary_reactant = "Deuterium"
|
||||
secondary_reactant = "Deuterium"
|
||||
energy_consumption = 1
|
||||
energy_production = 4
|
||||
radiation = 1
|
||||
products = list("Obdurium" = 2)
|
||||
|
||||
datum/fusion_reaction/tritium_tritium
|
||||
primary_reactant = "Tritium"
|
||||
secondary_reactant = "Tritium"
|
||||
energy_consumption = 1
|
||||
energy_production = 4
|
||||
radiation = 1
|
||||
products = list("Solonium" = 2)
|
||||
|
||||
//Cleanup Reactions
|
||||
|
||||
datum/fusion_reaction/rodinium6_obdurium
|
||||
primary_reactant = "Rodinium-6"
|
||||
secondary_reactant = "Obdurium"
|
||||
energy_consumption = 1
|
||||
energy_production = 2
|
||||
radiation = 2
|
||||
|
||||
datum/fusion_reaction/rodinium6_solonium
|
||||
primary_reactant = "Rodinium-6"
|
||||
secondary_reactant = "Solonium"
|
||||
energy_consumption = 1
|
||||
energy_production = 2
|
||||
radiation = 2
|
||||
|
||||
//Breeder Reactions
|
||||
|
||||
datum/fusion_reaction/dilithium_obdurium
|
||||
primary_reactant = "Dilithium"
|
||||
secondary_reactant = "Obdurium"
|
||||
energy_consumption = 1
|
||||
energy_production = 1
|
||||
radiation = 3
|
||||
products = list("Deuterium" = 1, "Dilithium" = 1)
|
||||
|
||||
datum/fusion_reaction/dilithium_solonium
|
||||
primary_reactant = "Dilithium"
|
||||
secondary_reactant = "Solonium"
|
||||
energy_consumption = 1
|
||||
energy_production = 1
|
||||
radiation = 3
|
||||
products = list("Tritium" = 1, "Dilithium" = 1)
|
||||
|
||||
//Breeder Inhibitor Reactions
|
||||
|
||||
datum/fusion_reaction/stravium7_dilithium
|
||||
primary_reactant = "Stravium-7"
|
||||
secondary_reactant = "Dilithium"
|
||||
energy_consumption = 2
|
||||
energy_production = 1
|
||||
radiation = 4
|
||||
|
||||
//Enhanced Breeder Reactions
|
||||
|
||||
datum/fusion_reaction/trilithium_obdurium
|
||||
primary_reactant = "Trilithium"
|
||||
secondary_reactant = "Obdurium"
|
||||
energy_consumption = 1
|
||||
energy_production = 2
|
||||
radiation = 5
|
||||
products = list("Dilithium" = 1, "Trilithium" = 1, "Deuterium" = 1)
|
||||
|
||||
datum/fusion_reaction/trilithium_solonium
|
||||
primary_reactant = "Trilithium"
|
||||
secondary_reactant = "Solonium"
|
||||
energy_consumption = 1
|
||||
energy_production = 2
|
||||
radiation = 5
|
||||
products = list("Dilithium" = 1, "Trilithium" = 1, "Tritium" = 1)
|
||||
|
||||
//Control Reactions
|
||||
|
||||
datum/fusion_reaction/pergium_deuterium
|
||||
primary_reactant = "Pergium"
|
||||
secondary_reactant = "Deuterium"
|
||||
energy_consumption = 5
|
||||
energy_production = 0
|
||||
radiation = 5
|
||||
|
||||
datum/fusion_reaction/pergium_tritium
|
||||
primary_reactant = "Pergium"
|
||||
secondary_reactant = "Tritium"
|
||||
energy_consumption = 5
|
||||
energy_production = 0
|
||||
radiation = 5
|
||||
|
||||
datum/fusion_reaction/pergium_deuterium
|
||||
primary_reactant = "Pergium"
|
||||
secondary_reactant = "Obdurium"
|
||||
energy_consumption = 5
|
||||
energy_production = 0
|
||||
radiation = 5
|
||||
|
||||
datum/fusion_reaction/pergium_tritium
|
||||
primary_reactant = "Pergium"
|
||||
secondary_reactant = "Solonium"
|
||||
energy_consumption = 5
|
||||
energy_production = 0
|
||||
radiation = 5
|
||||
@@ -34,16 +34,16 @@
|
||||
/obj/effect/rust_particle_catcher/proc/UpdateSize()
|
||||
if(parent.size >= mysize)
|
||||
density = 1
|
||||
invisibility = 0
|
||||
//invisibility = 0
|
||||
name = "collector [mysize] ON"
|
||||
else
|
||||
density = 0
|
||||
invisibility = 101
|
||||
//invisibility = 101
|
||||
name = "collector [mysize] OFF"
|
||||
|
||||
/obj/effect/rust_particle_catcher/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(Proj.flag != "bullet" && parent)
|
||||
parent.AddEnergy(Proj.damage, 0, 1)
|
||||
parent.AddEnergy(Proj.damage * 20, 0, 1)
|
||||
update_icon()
|
||||
return 0
|
||||
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
// This system defines news that will be displayed in the course of a round.
|
||||
// Uses BYOND's type system to put everything into a nice format
|
||||
|
||||
/datum/news_announcement
|
||||
var
|
||||
round_time // time of the round at which this should be announced, in seconds
|
||||
message // body of the message
|
||||
author = "NanoTrasen Editor"
|
||||
channel_name = "Tau Ceti Daily"
|
||||
can_be_redacted = 0
|
||||
|
||||
revolution_inciting_event
|
||||
|
||||
paycuts_suspicion
|
||||
round_time = 60*10
|
||||
message = "Reports have leaked that Nanotrasen Inc. is planning to put paycuts into effect on many of its Research Stations in Tau Ceti. Apparently these research stations haven't been able to yield the expected revenue, and thus adjustments have to be made."
|
||||
author = "Unauthorized"
|
||||
|
||||
paycuts_confirmation
|
||||
round_time = 60*40
|
||||
message = "Earlier rumours about paycuts on Research Stations in the Tau Ceti system have been confirmed. Shockingly, however, the cuts will only affect lower tier personnel. Heads of Staff will, according to our sources, not be affected."
|
||||
author = "Unauthorized"
|
||||
|
||||
human_experiments
|
||||
round_time = 60*90
|
||||
message = "Unbelievable reports about human experimentation have reached our ears. According to a refugee from one of the Tau Ceti Research Stations, their station, in order to increase revenue, has refactored several of their facilities to perform experiments on live humans, including virology research, genetic manipulation, and \"feeding them to the slimes to see what happens\". Allegedly, these test subjects were neither humanified monkeys nor volunteers, but rather unqualified staff that were forced into the experiments, and reported to have died in a \"work accident\" by Nanotrasen Inc."
|
||||
author = "Unauthorized"
|
||||
|
||||
bluespace_research
|
||||
|
||||
announcement
|
||||
round_time = 60*20
|
||||
message = "The new field of research trying to explain several interesting spacetime oddities, also known as \"Bluespace Research\", has reached new heights. Of the several hundred space stations now orbiting in Tau Ceti, fifteen are now specially equipped to experiment with and research Bluespace effects. Rumours have it some of these stations even sport functional \"travel gates\" that can instantly move a whole research team to an alternate reality."
|
||||
|
||||
random_junk
|
||||
cheesy_honkers
|
||||
author = "Assistant Editor Carl Ritz"
|
||||
channel_name = "The Gibson Gazzette"
|
||||
message = "Do cheesy honkers increase risk of having a miscarriage? Several health administrations say so!"
|
||||
round_time = 60 * 15
|
||||
|
||||
net_block
|
||||
author = "Assistant Editor Carl Ritz"
|
||||
channel_name = "The Gibson Gazzette"
|
||||
message = "Several corporations banding together to block access to 'wetskrell.nt', site administrators claiming violation of net laws."
|
||||
round_time = 60 * 50
|
||||
|
||||
found_ssd
|
||||
channel_name = "Tau Ceti Daily"
|
||||
author = "Doctor Eric Hanfield"
|
||||
|
||||
message = "Several people have been found unconscious at their terminals. It is thought that it was due to a lack of sleep or of simply migraines from staring at the screen too long. Camera footage reveals that many of them were playing games instead of working and their pay has been docked accordingly."
|
||||
round_time = 60 * 90
|
||||
|
||||
lotus_tree
|
||||
explosions
|
||||
channel_name = "Tau Ceti Daily"
|
||||
author = "Reporter Leland H. Howards"
|
||||
|
||||
message = "The newly-christened civillian transport Lotus Tree suffered two very large explosions near the bridge today, and there are unconfirmed reports that the death toll has passed 50. The cause of the explosions remain unknown, but there is speculation that it might have something to do with the recent change of regulation in the Moore-Lee Corporation, a major funder of the ship, when M-L announced that they were officially acknowledging inter-species marriage and providing couples with marriage tax-benefits."
|
||||
round_time = 60 * 30
|
||||
|
||||
food_riots
|
||||
breaking_news
|
||||
channel_name = "Tau Ceti Daily"
|
||||
author = "Reporter Ro'kii Ar-Raqis"
|
||||
|
||||
message = "Breaking news: Food riots have broken out throughout the Refuge asteroid colony in the Tenebrae Lupus system. This comes only hours after NanoTrasen officials announced they will no longer trade with the colony, citing the increased presence of \"hostile factions\" on the colony has made trade too dangerous to continue. NanoTrasen officials have not given any details about said factions. More on that at the top of the hour."
|
||||
round_time = 60 * 10
|
||||
|
||||
more
|
||||
channel_name = "Tau Ceti Daily"
|
||||
author = "Reporter Ro'kii Ar-Raqis"
|
||||
|
||||
message = "More on the Refuge food riots: The Refuge Council has condemned NanoTrasen's withdrawal from the colony, claiming \"there has been no increase in anti-NanoTrasen activity\", and \"\[the only] reason NanoTrasen withdrew was because the \[Tenebrae Lupus] system's Plasma deposits have been completely mined out. We have little to trade with them now\". NanoTrasen officials have denied these allegations, calling them \"further proof\" of the colony's anti-NanoTrasen stance. Meanwhile, Refuge Security has been unable to quell the riots. More on this at 6."
|
||||
round_time = 60 * 60
|
||||
|
||||
|
||||
var/global/list/newscaster_standard_feeds = list(/datum/news_announcement/bluespace_research, /datum/news_announcement/lotus_tree, /datum/news_announcement/random_junk, /datum/news_announcement/lotus_tree)
|
||||
|
||||
proc/process_newscaster()
|
||||
check_for_newscaster_updates(ticker.mode.newscaster_announcements)
|
||||
|
||||
var/global/tmp/announced_news_types = list()
|
||||
proc/check_for_newscaster_updates(type)
|
||||
for(var/subtype in typesof(type)-type)
|
||||
var/datum/news_announcement/news = new subtype()
|
||||
if(news.round_time * 10 <= world.time && !(subtype in announced_news_types))
|
||||
announced_news_types += subtype
|
||||
announce_newscaster_news(news)
|
||||
|
||||
proc/announce_newscaster_news(datum/news_announcement/news)
|
||||
|
||||
var/datum/feed_message/newMsg = new /datum/feed_message
|
||||
newMsg.author = news.author
|
||||
newMsg.is_admin_message = !news.can_be_redacted
|
||||
|
||||
newMsg.body = news.message
|
||||
|
||||
var/datum/feed_channel/sendto
|
||||
for(var/datum/feed_channel/FC in news_network.network_channels)
|
||||
if(FC.channel_name == news.channel_name)
|
||||
sendto = FC
|
||||
break
|
||||
|
||||
if(!sendto)
|
||||
sendto = new /datum/feed_channel
|
||||
sendto.channel_name = news.channel_name
|
||||
sendto.author = news.author
|
||||
sendto.locked = 1
|
||||
sendto.is_admin_channel = 1
|
||||
news_network.network_channels += sendto
|
||||
|
||||
sendto.messages += newMsg
|
||||
|
||||
for(var/obj/machinery/newscaster/NEWSCASTER in allCasters)
|
||||
NEWSCASTER.newsAlert(news.channel_name)
|
||||
+16
-2
@@ -371,7 +371,14 @@ proc/ShareSpace(datum/gas_mixture/A, list/unsimulated_tiles)
|
||||
unsim_co2 += T.carbon_dioxide
|
||||
unsim_nitrogen += T.nitrogen
|
||||
unsim_plasma += T.toxins
|
||||
unsim_heat_capacity += T.heat_capacity
|
||||
|
||||
// Make sure it actually has gas in it, and use the heat capacity of that.
|
||||
// Space and unsimulated tiles do NOT have a heat capacity. Thus we don't
|
||||
// add them. This means "space is not cold", which turns out just fine in
|
||||
// gameplay terms.
|
||||
if(istype(T, /turf/simulated))
|
||||
unsim_heat_capacity += T:air.heat_capacity()
|
||||
|
||||
unsim_temperature += T.temperature/unsimulated_tiles.len
|
||||
|
||||
var
|
||||
@@ -380,7 +387,14 @@ proc/ShareSpace(datum/gas_mixture/A, list/unsimulated_tiles)
|
||||
old_pressure = A.return_pressure()
|
||||
|
||||
size = max(1,A.group_multiplier)
|
||||
share_size = max(1,unsimulated_tiles.len)
|
||||
|
||||
// We use the same size for the potentially single space tile
|
||||
// as we use for the entire room. Why is this?
|
||||
// Short answer: We do not want larger rooms to depressurize more
|
||||
// slowly than small rooms, preserving our good old "hollywood-style"
|
||||
// oh-shit effect when large rooms get breached, but still having small
|
||||
// rooms remain pressurized for long enough to make escape possible.
|
||||
share_size = max(1,size - 5 + unsimulated_tiles.len)
|
||||
|
||||
full_oxy = A.oxygen * size
|
||||
full_nitro = A.nitrogen * size
|
||||
|
||||
@@ -15,6 +15,16 @@
|
||||
if (config.log_admin)
|
||||
diary << "\[[time_stamp()]]ADMIN: [text]"
|
||||
|
||||
|
||||
/proc/log_debug(text)
|
||||
if (config.log_debug)
|
||||
diary << "\[[time_stamp()]]DEBUG: [text]"
|
||||
|
||||
for(var/client/C in admins)
|
||||
if(C.prefs.toggles & CHAT_DEBUGLOGS)
|
||||
C << "DEBUG: [text]"
|
||||
|
||||
|
||||
/proc/log_game(text)
|
||||
if (config.log_game)
|
||||
diary << "\[[time_stamp()]]GAME: [text]"
|
||||
|
||||
@@ -1327,6 +1327,7 @@ proc/is_hot(obj/item/W as obj)
|
||||
|
||||
//Is this even used for anything besides balloons? Yes I took out the W:lit stuff because : really shouldnt be used.
|
||||
/proc/is_sharp(obj/item/W as obj) // For the record, WHAT THE HELL IS THIS METHOD OF DOING IT?
|
||||
if(W.sharp) return 1
|
||||
return ( \
|
||||
istype(W, /obj/item/weapon/screwdriver) || \
|
||||
istype(W, /obj/item/weapon/pen) || \
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
var/log_access = 0 // log login/logout
|
||||
var/log_say = 0 // log client say
|
||||
var/log_admin = 0 // log admin actions
|
||||
var/log_debug = 1 // log debug output
|
||||
var/log_game = 0 // log game events
|
||||
var/log_vote = 0 // log voting
|
||||
var/log_whisper = 0 // log client whisper
|
||||
@@ -193,6 +194,9 @@
|
||||
if ("log_admin")
|
||||
config.log_admin = 1
|
||||
|
||||
if ("log_debug")
|
||||
config.log_debug = text2num(value)
|
||||
|
||||
if ("log_game")
|
||||
config.log_game = 1
|
||||
|
||||
|
||||
@@ -117,6 +117,7 @@ datum/controller/game_controller/proc/process()
|
||||
controller_iteration++
|
||||
|
||||
vote.process()
|
||||
process_newscaster()
|
||||
|
||||
//AIR
|
||||
|
||||
|
||||
@@ -165,7 +165,7 @@ datum/controller/vote
|
||||
|
||||
proc/initiate_vote(var/vote_type, var/initiator_key)
|
||||
if(!mode)
|
||||
if(started_time != null)
|
||||
if(started_time != null && !check_rights(R_ADMIN))
|
||||
var/next_allowed_time = (started_time + config.vote_delay)
|
||||
if(next_allowed_time > world.time)
|
||||
return 0
|
||||
@@ -200,7 +200,13 @@ datum/controller/vote
|
||||
|
||||
log_vote(text)
|
||||
world << "<font color='purple'><b>[text]</b>\nType vote to place your votes.\nYou have [config.vote_period/10] seconds to vote.</font>"
|
||||
world << sound('weapons/smg_empty_alarm.ogg')
|
||||
switch(vote_type)
|
||||
if("crew_transfer")
|
||||
world << sound('sound/voice/Serithi/Shuttlehere.ogg')
|
||||
if("gamemode")
|
||||
world << sound('sound/voice/Serithi/pretenddemoc.ogg')
|
||||
if("custom")
|
||||
world << sound('sound/voice/Serithi/weneedvote.ogg')
|
||||
if(mode == "gamemode" && going)
|
||||
going = 0
|
||||
world << "<font color='red'><b>Round start has been delayed.</b></font>"
|
||||
|
||||
@@ -105,12 +105,11 @@ var/list/radiochannels = list(
|
||||
"Engineering" = 1357,
|
||||
"Security" = 1359,
|
||||
"Deathsquad" = 1441,
|
||||
"Response Team" = 1439,
|
||||
"Syndicate" = 1213,
|
||||
"Supply" = 1347,
|
||||
)
|
||||
//depenging helpers
|
||||
var/list/DEPT_FREQS = list(1351,1355,1357,1359,1213,1439,1441,1347)
|
||||
var/list/DEPT_FREQS = list(1351,1355,1357,1359,1213,1441,1347)
|
||||
var/const/COMM_FREQ = 1353 //command, colored gold in chat window
|
||||
var/const/SYND_FREQ = 1213
|
||||
var/const/ERT_FREQ = 1439
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
traitorcheckloop()
|
||||
|
||||
|
||||
/*
|
||||
|
||||
/datum/game_mode/traitor/autotraitor/latespawn(mob/living/carbon/human/character)
|
||||
..()
|
||||
if(emergency_shuttle.departed)
|
||||
@@ -192,6 +192,5 @@
|
||||
//message_admins("New traitor roll failed. No new traitor.")
|
||||
//else
|
||||
//message_admins("Late Joiner does not have Be Syndicate")
|
||||
*/
|
||||
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
var/required_players_secret = 0 //Minimum number of players for that game mode to be chose in Secret
|
||||
var/required_enemies = 0
|
||||
var/recommended_enemies = 0
|
||||
var/newscaster_announcements = null
|
||||
var/uplink_welcome = "Syndicate Uplink Console:"
|
||||
var/uplink_uses = 10
|
||||
var/uplink_items = {"Highly Visible and Dangerous Weapons;
|
||||
@@ -279,6 +280,7 @@ Implants;
|
||||
if(player.client.prefs.be_special & role)
|
||||
if(!jobban_isbanned(player, "Syndicate") && !jobban_isbanned(player, roletext)) //Nodrak/Carn: Antag Job-bans
|
||||
candidates += player.mind // Get a list of all the people who want to be the antagonist for this round
|
||||
log_debug("[player.key] had [roletext] enabled, so drafting them.")
|
||||
|
||||
if(restricted_jobs)
|
||||
for(var/datum/mind/player in candidates)
|
||||
@@ -306,6 +308,7 @@ Implants;
|
||||
applicant = pick(drafted)
|
||||
if(applicant)
|
||||
candidates += applicant
|
||||
log_debug("[applicant.key] was force-drafted as [roletext], because there aren't enough candidates.")
|
||||
drafted.Remove(applicant)
|
||||
|
||||
else // Not enough scrubs, ABORT ABORT ABORT
|
||||
@@ -331,7 +334,7 @@ Implants;
|
||||
if(applicant)
|
||||
candidates += applicant
|
||||
drafted.Remove(applicant)
|
||||
message_admins("[applicant.key] drafted into antagonist role against their preferences.")
|
||||
log_debug("[applicant.key] was force-drafted as [roletext], because there aren't enough candidates.")
|
||||
|
||||
else // Not enough scrubs, ABORT ABORT ABORT
|
||||
break
|
||||
@@ -340,9 +343,10 @@ Implants;
|
||||
// recommended_enemies if the number of people with that role set to yes is less than recomended_enemies,
|
||||
// Less if there are not enough valid players in the game entirely to make recommended_enemies.
|
||||
|
||||
/*
|
||||
|
||||
/datum/game_mode/proc/latespawn(var/mob)
|
||||
|
||||
/*
|
||||
/datum/game_mode/proc/check_player_role_pref(var/role, var/mob/new_player/player)
|
||||
if(player.preferences.be_special & role)
|
||||
return 1
|
||||
@@ -377,6 +381,9 @@ Implants;
|
||||
heads += player.mind
|
||||
return heads
|
||||
|
||||
/datum/game_mode/New()
|
||||
newscaster_announcements = pick(newscaster_standard_feeds)
|
||||
|
||||
//////////////////////////
|
||||
//Reports player logouts//
|
||||
//////////////////////////
|
||||
|
||||
@@ -8,6 +8,9 @@
|
||||
required_enemies = 3
|
||||
recommended_enemies = 3
|
||||
|
||||
newscaster_announcements = /datum/news_announcement/revolution_inciting_event
|
||||
|
||||
var/last_command_report = 0
|
||||
var/list/heads = list()
|
||||
var/tried_to_add_revheads = 0
|
||||
|
||||
@@ -57,7 +60,7 @@
|
||||
var/datum/objective/mutiny/rp/rev_obj = new
|
||||
rev_obj.owner = rev_mind
|
||||
rev_obj.target = head_mind
|
||||
rev_obj.explanation_text = "Assassinate or capture [head_mind.name], the [head_mind.assigned_role]."
|
||||
rev_obj.explanation_text = "Assassinate, convert or capture [head_mind.name], the [head_mind.assigned_role]."
|
||||
rev_mind.objectives += rev_obj
|
||||
|
||||
update_rev_icons_added(rev_mind)
|
||||
@@ -183,8 +186,7 @@
|
||||
active_revs++
|
||||
|
||||
if(active_revs == 0)
|
||||
log_admin("There are zero active head revolutionists, trying to add some..")
|
||||
message_admins("There are zero active head revolutionists, trying to add some..")
|
||||
log_debug("There are zero active heads of revolution, trying to add some..")
|
||||
var/added_heads = 0
|
||||
for(var/mob/living/carbon/human/H in world) if(H.client && H.mind && H.client.inactivity <= 10*60*20 && H.mind in revolutionaries)
|
||||
head_revolutionaries += H.mind
|
||||
@@ -210,4 +212,28 @@
|
||||
message_admins("Unable to add new heads of revolution.")
|
||||
tried_to_add_revheads = world.time + 6000 // wait 10 minutes
|
||||
|
||||
return ..()
|
||||
if(last_command_report == 0 && world.time >= 60 * 10)
|
||||
command_alert("We are regrettably announcing that your performance has been disappointing, and we are thus forced to cut down on financial support to your station. To achieve this, the pay of all personnal, except the Heads of Staff, has been halved.")
|
||||
last_command_report = 1
|
||||
else if(last_command_report == 1 && world.time >= 60 * 30)
|
||||
command_alert("Statistics hint that a high amount of leisure time, and associated activities, are responsible for the poor performance of many of our stations. You are to bolt and close down any leisure facilities, such as the holodeck, the theatre and the bar. Food can be distributed through vendors and the kitchen.")
|
||||
last_command_report = 2
|
||||
else if(last_command_report == 2 && world.time >= 60 * 60)
|
||||
command_alert("It is reported that merely closing down leisure facilities has not been successful. You and your Heads of Staff are to ensure that all crew are working hard, and not wasting time or energy. Any crew caught off duty without leave from their Head of Staff are to be warned, and on repeated offence, to be brigged until the next transfer shuttle arrives, which will take them to facilities where they can be of more use.")
|
||||
last_command_report = 3
|
||||
|
||||
return ..()
|
||||
|
||||
|
||||
/datum/game_mode/revolution/rp_revolution/latespawn(mob/M)
|
||||
if(M.mind.assigned_role in command_positions)
|
||||
log_debug("Adding head kill/capture/convert objective for [M.name]")
|
||||
heads += M
|
||||
|
||||
for(var/datum/mind/rev_mind in head_revolutionaries)
|
||||
var/datum/objective/mutiny/rp/rev_obj = new
|
||||
rev_obj.owner = rev_mind
|
||||
rev_obj.target = M.mind
|
||||
rev_obj.explanation_text = "Assassinate, convert or capture [M.name], the [M.mind.assigned_role]."
|
||||
rev_mind.objectives += rev_obj
|
||||
rev_mind.current << "\red A new Head of Staff, [M.name], the [M.mind.assigned_role] has appeared. Your objectives have been updated."
|
||||
@@ -84,3 +84,45 @@
|
||||
icon_state = icon_closed
|
||||
else
|
||||
icon_state = icon_opened
|
||||
|
||||
|
||||
/obj/item/bodybag/cryobag
|
||||
name = "stasis bag"
|
||||
desc = "A folded, non-reusable bag designed for the preservation of an occupant's brain by stasis."
|
||||
icon = 'icons/obj/cryobag.dmi'
|
||||
icon_state = "bodybag_folded"
|
||||
|
||||
|
||||
attack_self(mob/user)
|
||||
var/obj/structure/closet/body_bag/cryobag/R = new /obj/structure/closet/body_bag/cryobag(user.loc)
|
||||
R.add_fingerprint(user)
|
||||
del(src)
|
||||
|
||||
|
||||
|
||||
/obj/structure/closet/body_bag/cryobag
|
||||
name = "stasis bag"
|
||||
desc = "A non-reusable plastic bag designed for the preservation of an occupant's brain by stasis."
|
||||
icon = 'icons/obj/cryobag.dmi'
|
||||
icon_state = "bodybag_closed"
|
||||
icon_closed = "bodybag_closed"
|
||||
icon_opened = "bodybag_open"
|
||||
density = 0
|
||||
|
||||
var/used = 0
|
||||
|
||||
open()
|
||||
. = ..()
|
||||
if(used)
|
||||
var/obj/item/O = new/obj/item(src.loc)
|
||||
O.name = "used stasis bag"
|
||||
O.icon = src.icon
|
||||
O.icon_state = "bodybag_used"
|
||||
O.desc = "Pretty useless now.."
|
||||
del(src)
|
||||
|
||||
MouseDrop(over_object, src_location, over_location)
|
||||
if((over_object == usr && (in_range(src, usr) || usr.contents.Find(src))))
|
||||
if(!ishuman(usr)) return
|
||||
usr << "\red You can't fold that up anymore.."
|
||||
..()
|
||||
@@ -130,7 +130,7 @@
|
||||
if(user.mind.special_role)
|
||||
usr << "\blue The card's microscanners activate as you pass it over the ID, copying its access."
|
||||
|
||||
/obj/item/weapon/card/id/syndicate/var/mob/registered_user = null
|
||||
|
||||
/obj/item/weapon/card/id/syndicate/attack_self(mob/user as mob)
|
||||
if(!src.registered_name)
|
||||
//Stop giving the players unsanitized unputs! You are giving ways for players to intentionally crash clients! -Nodrak
|
||||
@@ -148,27 +148,6 @@
|
||||
src.assignment = u
|
||||
src.name = "[src.registered_name]'s ID Card ([src.assignment])"
|
||||
user << "\blue You successfully forge the ID card."
|
||||
registered_user = user
|
||||
else if(registered_user == user)
|
||||
switch(alert("Would you like to display the ID, or retitle it?","Choose.","Rename","Show"))
|
||||
if("Rename")
|
||||
var t = copytext(sanitize(input(user, "What name would you like to put on this card?", "Agent card name", ishuman(user) ? user.real_name : user.name)),1,26)
|
||||
if(!t || t == "Unknown" || t == "floor" || t == "wall" || t == "r-wall") //Same as mob/new_player/prefrences.dm
|
||||
alert("Invalid name.")
|
||||
return
|
||||
src.registered_name = t
|
||||
|
||||
var u = copytext(sanitize(input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Assistant")),1,MAX_MESSAGE_LEN)
|
||||
if(!u)
|
||||
alert("Invalid assignment.")
|
||||
src.registered_name = ""
|
||||
return
|
||||
src.assignment = u
|
||||
src.name = "[src.registered_name]'s ID Card ([src.assignment])"
|
||||
user << "\blue You successfully forge the ID card."
|
||||
return
|
||||
if("Show")
|
||||
..()
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
else
|
||||
new /obj/item/weapon/storage/backpack/satchel_cap(src)
|
||||
new /obj/item/clothing/suit/captunic(src)
|
||||
new /obj/item/clothing/suit/capjacket(src)
|
||||
new /obj/item/clothing/suit/captunic/capjacket(src)
|
||||
new /obj/item/clothing/head/helmet/cap(src)
|
||||
new /obj/item/clothing/under/rank/captain(src)
|
||||
new /obj/item/clothing/suit/armor/vest(src)
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
desc = "A huge chunk of metal used to seperate rooms."
|
||||
icon = 'icons/turf/walls.dmi'
|
||||
var/mineral = "metal"
|
||||
var/rotting = 0
|
||||
opacity = 1
|
||||
density = 1
|
||||
blocks_air = 1
|
||||
@@ -59,9 +60,11 @@
|
||||
P.roll_and_drop(src)
|
||||
else
|
||||
O.loc = src
|
||||
|
||||
ChangeTurf(/turf/simulated/floor/plating)
|
||||
|
||||
/turf/simulated/wall/ex_act(severity)
|
||||
if(rotting) severity = 1.0
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
//SN src = null
|
||||
@@ -84,7 +87,7 @@
|
||||
return
|
||||
|
||||
/turf/simulated/wall/blob_act()
|
||||
if(prob(50))
|
||||
if(prob(50) || rotting)
|
||||
dismantle_wall()
|
||||
|
||||
/turf/simulated/wall/attack_paw(mob/user as mob)
|
||||
@@ -103,11 +106,11 @@
|
||||
|
||||
/turf/simulated/wall/attack_animal(mob/living/simple_animal/M as mob)
|
||||
if(M.wall_smash)
|
||||
if (istype(src, /turf/simulated/wall/r_wall))
|
||||
if (istype(src, /turf/simulated/wall/r_wall) && !rotting)
|
||||
M << text("\blue This wall is far too strong for you to destroy.")
|
||||
return
|
||||
else
|
||||
if (prob(40))
|
||||
if (prob(40) || rotting)
|
||||
M << text("\blue You smash through the wall.")
|
||||
dismantle_wall(1)
|
||||
return
|
||||
@@ -120,7 +123,7 @@
|
||||
|
||||
/turf/simulated/wall/attack_hand(mob/user as mob)
|
||||
if (HULK in user.mutations)
|
||||
if (prob(40))
|
||||
if (prob(40) || rotting)
|
||||
usr << text("\blue You smash through the wall.")
|
||||
usr.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
|
||||
dismantle_wall(1)
|
||||
@@ -129,6 +132,11 @@
|
||||
usr << text("\blue You punch the wall.")
|
||||
return
|
||||
|
||||
if(rotting)
|
||||
user << "\blue The wall crumbles under your touch."
|
||||
dismantle_wall()
|
||||
return
|
||||
|
||||
user << "\blue You push the wall but nothing happens!"
|
||||
playsound(src.loc, 'sound/weapons/Genhit.ogg', 25, 1)
|
||||
src.add_fingerprint(user)
|
||||
@@ -143,6 +151,21 @@
|
||||
//get the user's location
|
||||
if( !istype(user.loc, /turf) ) return //can't do this stuff whilst inside objects and such
|
||||
|
||||
if(rotting)
|
||||
if(istype(W, /obj/item/weapon/weldingtool) )
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if( WT.remove_fuel(0,user) )
|
||||
user << "<span class='notice'>You burn away the fungi with \the [WT].</span>"
|
||||
playsound(src.loc, 'sound/items/Welder.ogg', 10, 1)
|
||||
for(var/obj/effect/E in src) if(E.name == "Wallrot")
|
||||
del E
|
||||
rotting = 0
|
||||
return
|
||||
else if(!is_sharp(W) && W.force >= 10 || W.force >= 20)
|
||||
user << "<span class='notice'>\The [src] crumbles away under the force of your [W.name].</span>"
|
||||
src.dismantle_wall(1)
|
||||
return
|
||||
|
||||
//THERMITE related stuff. Calls src.thermitemelt() which handles melting simulated walls and the relevant effects
|
||||
if( thermite )
|
||||
if( istype(W, /obj/item/weapon/weldingtool) )
|
||||
@@ -284,6 +307,24 @@
|
||||
return attack_hand(user)
|
||||
return
|
||||
|
||||
// Wall-rot effect, a nasty fungus that destroys walls.
|
||||
/turf/simulated/wall/proc/rot()
|
||||
if(!rotting)
|
||||
rotting = 1
|
||||
|
||||
var/number_rots = rand(2,3)
|
||||
for(var/i=0, i<number_rots, i++)
|
||||
var/obj/effect/overlay/O = new/obj/effect/overlay( src )
|
||||
O.name = "Wallrot"
|
||||
O.desc = "Ick..."
|
||||
O.icon = 'icons/effects/wallrot.dmi'
|
||||
O.pixel_x += rand(-10, 10)
|
||||
O.pixel_y += rand(-10, 10)
|
||||
O.anchored = 1
|
||||
O.density = 1
|
||||
O.layer = 5
|
||||
O.mouse_opacity = 0
|
||||
|
||||
/turf/simulated/wall/proc/thermitemelt(mob/user as mob)
|
||||
if(mineral == "diamond")
|
||||
return
|
||||
@@ -307,10 +348,18 @@
|
||||
return
|
||||
|
||||
/turf/simulated/wall/meteorhit(obj/M as obj)
|
||||
if (prob(15))
|
||||
if (prob(15) && !rotting)
|
||||
dismantle_wall()
|
||||
else if(prob(70))
|
||||
else if(prob(70) && !rotting)
|
||||
ChangeTurf(/turf/simulated/floor/plating)
|
||||
else
|
||||
ReplaceWithLattice()
|
||||
return 0
|
||||
return 0
|
||||
|
||||
/turf/simulated/wall/Del()
|
||||
for(var/obj/effect/E in src) if(E.name == "Wallrot") del E
|
||||
..()
|
||||
|
||||
/turf/simulated/wall/ChangeTurf(var/newtype)
|
||||
for(var/obj/effect/E in src) if(E.name == "Wallrot") del E
|
||||
..(newtype)
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
/turf/simulated/wall/r_wall/attack_hand(mob/user as mob)
|
||||
if (HULK in user.mutations)
|
||||
if (prob(10))
|
||||
if (prob(10) || rotting)
|
||||
usr << text("\blue You smash through the wall.")
|
||||
usr.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
|
||||
dismantle_wall(1)
|
||||
@@ -20,6 +20,10 @@
|
||||
usr << text("\blue You punch the wall.")
|
||||
return
|
||||
|
||||
if(rotting)
|
||||
user << "\blue This wall feels rather unstable."
|
||||
return
|
||||
|
||||
user << "\blue You push the wall but nothing happens!"
|
||||
playsound(src.loc, 'sound/weapons/Genhit.ogg', 25, 1)
|
||||
src.add_fingerprint(user)
|
||||
@@ -35,6 +39,20 @@
|
||||
//get the user's location
|
||||
if( !istype(user.loc, /turf) ) return //can't do this stuff whilst inside objects and such
|
||||
|
||||
if(rotting)
|
||||
if(istype(W, /obj/item/weapon/weldingtool) )
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if( WT.remove_fuel(0,user) )
|
||||
user << "<span class='notice'>You burn away the fungi with \the [WT].</span>"
|
||||
playsound(src.loc, 'sound/items/Welder.ogg', 10, 1)
|
||||
for(var/obj/effect/E in src) if(E.name == "Wallrot")
|
||||
del E
|
||||
rotting = 0
|
||||
return
|
||||
else if(!is_sharp(W) && W.force >= 10 || W.force >= 20)
|
||||
user << "<span class='notice'>\The [src] crumbles away under the force of your [W.name].</span>"
|
||||
src.dismantle_wall()
|
||||
return
|
||||
|
||||
//THERMITE related stuff. Calls src.thermitemelt() which handles melting simulated walls and the relevant effects
|
||||
if( thermite )
|
||||
|
||||
@@ -64,6 +64,7 @@ var/list/admin_verbs_admin = list(
|
||||
/client/proc/cmd_admin_change_custom_event,
|
||||
/client/proc/cmd_admin_rejuvenate,
|
||||
/client/proc/toggleattacklogs,
|
||||
/client/proc/toggledebuglogs,
|
||||
/datum/admins/proc/show_skills,
|
||||
/client/proc/check_customitem_activity
|
||||
)
|
||||
@@ -134,7 +135,8 @@ var/list/admin_verbs_debug = list(
|
||||
/client/proc/reload_admins,
|
||||
/client/proc/restart_controller,
|
||||
/client/proc/enable_debug_verbs,
|
||||
/client/proc/callproc
|
||||
/client/proc/callproc,
|
||||
/client/proc/toggledebuglogs
|
||||
)
|
||||
var/list/admin_verbs_possess = list(
|
||||
/proc/possess,
|
||||
@@ -222,6 +224,7 @@ var/list/admin_verbs_mod = list(
|
||||
/client/proc/cmd_admin_pm_context, /*right-click adminPM interface*/
|
||||
/client/proc/cmd_admin_pm_panel, /*admin-pm list*/
|
||||
/client/proc/debug_variables, /*allows us to -see- the variables of any instance in the game.*/
|
||||
/client/proc/toggledebuglogs,
|
||||
/datum/admins/proc/PlayerNotes,
|
||||
/client/proc/admin_ghost, /*allows us to ghost/reenter body at will*/
|
||||
/client/proc/cmd_mod_say,
|
||||
@@ -721,4 +724,15 @@ var/list/admin_verbs_mod = list(
|
||||
if (prefs.toggles & CHAT_ATTACKLOGS)
|
||||
usr << "You now will get attack log messages"
|
||||
else
|
||||
usr << "You now won't get attack log messages"
|
||||
usr << "You now won't get attack log messages"
|
||||
|
||||
|
||||
/client/proc/toggledebuglogs()
|
||||
set name = "Toggle Debug Log Messages"
|
||||
set category = "Preferences"
|
||||
|
||||
prefs.toggles ^= CHAT_DEBUGLOGS
|
||||
if (prefs.toggles & CHAT_DEBUGLOGS)
|
||||
usr << "You now will get debug log messages"
|
||||
else
|
||||
usr << "You now won't get debug log messages"
|
||||
@@ -21,11 +21,11 @@
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
|
||||
flags_inv = HIDEJUMPSUIT
|
||||
|
||||
/obj/item/clothing/suit/capjacket
|
||||
/obj/item/clothing/suit/captunic/capjacket
|
||||
name = "captain's uniform jacket"
|
||||
desc = "A less formal jacket for everyday captain use."
|
||||
icon_state = "capjacket"
|
||||
item_state = "capjacket"
|
||||
item_state = "bio_suit"
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
|
||||
flags_inv = HIDEJUMPSUIT
|
||||
|
||||
@@ -158,7 +158,7 @@
|
||||
icon_state = "suspenders"
|
||||
blood_overlay_type = "armor" //it's the less thing that I can put here
|
||||
|
||||
/obj/item/clothing/suit/fr_jacket
|
||||
/obj/item/clothing/suit/storage/fr_jacket
|
||||
name = "first responder jacket"
|
||||
desc = "A high-visibility jacket worn by medical first responders."
|
||||
icon_state = "fr_jacket_open"
|
||||
|
||||
@@ -350,7 +350,7 @@
|
||||
flags_inv = HIDESHOES
|
||||
|
||||
/obj/item/clothing/under/wedding/bride_white
|
||||
name = "silk wedding dress"
|
||||
name = "orange wedding dress"
|
||||
desc = "A white wedding gown made from the finest silk."
|
||||
icon_state = "bride_white"
|
||||
color = "bride_white"
|
||||
|
||||
@@ -200,6 +200,8 @@ hi
|
||||
icon = 'custom_items.dmi'
|
||||
desc = "A modified detective's camera, painted in bright orange. On the back you see \"Have fun\" written in small accurate letters with something black."
|
||||
icon_state = "orangecamera"
|
||||
icon_on = "orangecamera"
|
||||
icon_off = "camera_off"
|
||||
pictures_left = 30
|
||||
|
||||
/obj/item/device/camera/fluff/oldcamera //magmaram: Maria Crash
|
||||
@@ -207,6 +209,8 @@ hi
|
||||
icon = 'custom_items.dmi'
|
||||
desc = "An old, slightly beat-up digital camera, with a cheap photo printer taped on. It's a nice shade of blue."
|
||||
icon_state = "oldcamera"
|
||||
icon_on = "oldcamera"
|
||||
icon_off = "oldcamera_off"
|
||||
pictures_left = 30
|
||||
|
||||
/obj/item/weapon/card/id/fluff/lifetime //fastler: Fastler Greay; it seemed like something multiple people would have
|
||||
|
||||
@@ -61,6 +61,7 @@
|
||||
possibleEvents[/datum/event/ionstorm] = 25 + active_with_role["AI"] * 25 + active_with_role["Cyborg"] * 25 + active_with_role["Engineer"] * 10 + active_with_role["Scientist"] * 5
|
||||
possibleEvents[/datum/event/grid_check] = 25 + 10 * active_with_role["Engineer"]
|
||||
possibleEvents[/datum/event/electrical_storm] = 75 + 25 * active_with_role["Janitor"] + 5 * active_with_role["Engineer"]
|
||||
possibleEvents[/datum/event/wallrot] = 50 * active_with_role["Engineer"] + 100 * active_with_role["Botanist"]
|
||||
|
||||
if(!spacevines_spawned)
|
||||
possibleEvents[/datum/event/spacevine] = 5 + 10 * active_with_role["Engineer"]
|
||||
@@ -69,11 +70,12 @@
|
||||
possibleEvents[/datum/event/meteor_shower] = 80 * active_with_role["Engineer"]
|
||||
possibleEvents[/datum/event/blob] = 30 * active_with_role["Engineer"]
|
||||
|
||||
possibleEvents[/datum/event/viral_infection] = 25 + active_with_role["Medical"] * 25
|
||||
possibleEvents[/datum/event/viral_infection] = 25 + active_with_role["Medical"] * 100
|
||||
if(active_with_role["Medical"] > 0)
|
||||
possibleEvents[/datum/event/radiation_storm] = active_with_role["Medical"] * 100
|
||||
possibleEvents[/datum/event/spontaneous_appendicitis] = active_with_role["Medical"] * 75
|
||||
possibleEvents[/datum/event/viral_outbreak] = active_with_role["Medical"] * 5
|
||||
possibleEvents[/datum/event/spontaneous_appendicitis] = active_with_role["Medical"] * 150
|
||||
possibleEvents[/datum/event/viral_outbreak] = active_with_role["Medical"] * 10
|
||||
possibleEvents[/datum/event/organ_failure] = active_with_role["Medical"] * 50
|
||||
|
||||
possibleEvents[/datum/event/prison_break] = active_with_role["Security"] * 50
|
||||
if(active_with_role["Security"] > 0)
|
||||
@@ -84,16 +86,19 @@
|
||||
if(!sent_ninja_to_station && toggle_space_ninja)
|
||||
possibleEvents[/datum/event/space_ninja] = max(active_with_role["Security"], 5)
|
||||
|
||||
|
||||
var/picked_event = pickweight(possibleEvents)
|
||||
|
||||
// Debug code below here, very useful for testing so don't delete please.
|
||||
/*var/debug_message = "Firing random event. "
|
||||
var/debug_message = "Firing random event. "
|
||||
for(var/V in active_with_role)
|
||||
debug_message += "#[V]:[active_with_role[V]] "
|
||||
debug_message += "||| "
|
||||
for(var/V in possibleEvents)
|
||||
debug_message += "[V]:[possibleEvents[V]]"
|
||||
message_admins(debug_message)*/
|
||||
debug_message += "|||Picked:[picked_event]"
|
||||
log_debug(debug_message)
|
||||
|
||||
var/picked_event = pickweight(possibleEvents)
|
||||
if(!picked_event)
|
||||
return
|
||||
|
||||
@@ -176,6 +181,7 @@
|
||||
active_with_role["AI"] = 0
|
||||
active_with_role["Cyborg"] = 0
|
||||
active_with_role["Janitor"] = 0
|
||||
active_with_role["Botanist"] = 0
|
||||
|
||||
for(var/mob/M in player_list)
|
||||
if(!M.mind || !M.client || M.client.inactivity > 10 * 10 * 60) // longer than 10 minutes AFK counts them as inactive
|
||||
@@ -208,4 +214,7 @@
|
||||
if(M.mind.assigned_role == "Janitor")
|
||||
active_with_role["Janitor"]++
|
||||
|
||||
if(M.mind.assigned_role == "Botanist")
|
||||
active_with_role["Botanist"]++
|
||||
|
||||
return active_with_role
|
||||
|
||||
@@ -30,7 +30,9 @@ var/scheduledEvent = null
|
||||
playercount_modifier = 0.9
|
||||
if(36 to 100000)
|
||||
playercount_modifier = 0.8
|
||||
scheduledEvent = world.timeofday + rand(eventTimeLower, eventTimeUpper) * playercount_modifier
|
||||
var/next_event_delay = rand(eventTimeLower, eventTimeUpper) * playercount_modifier
|
||||
scheduledEvent = world.timeofday + next_event_delay
|
||||
log_debug("Next event in [next_event_delay/600] minutes.")
|
||||
|
||||
else if(world.timeofday > scheduledEvent)
|
||||
spawn_dynamic_event()
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
datum/event/organ_failure
|
||||
var/severity = 1
|
||||
|
||||
datum/event/organ_failure/setup()
|
||||
announceWhen = rand(0, 3000)
|
||||
endWhen = announceWhen + 1
|
||||
severity = rand(1, 3)
|
||||
|
||||
datum/event/organ_failure/announce()
|
||||
command_alert("Confirmed outbreak of level [rand(3,7)] biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
|
||||
world << sound('sound/AI/outbreak5.ogg')
|
||||
|
||||
datum/event/organ_failure/start()
|
||||
var/list/candidates = list() //list of candidate keys
|
||||
for(var/mob/living/carbon/human/G in player_list)
|
||||
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD && G.health > 70))
|
||||
candidates += G
|
||||
if(!candidates.len) return
|
||||
candidates = shuffle(candidates)//Incorporating Donkie's list shuffle
|
||||
|
||||
while(severity > 0 && candidates.len)
|
||||
var/mob/living/carbon/human/C = candidates[1]
|
||||
|
||||
// Bruise one of their organs
|
||||
var/datum/organ/internal/I = pick(C.internal_organs)
|
||||
I.damage = I.min_bruised_damage
|
||||
candidates.Remove(C)
|
||||
severity--
|
||||
@@ -1,36 +1,45 @@
|
||||
/datum/event/radiation_storm
|
||||
announceWhen = 5
|
||||
announceWhen = 1
|
||||
oneShot = 1
|
||||
|
||||
|
||||
/datum/event/radiation_storm/announce()
|
||||
command_alert("High levels of radiation detected near the station. Please report to the Med-bay if you feel strange.", "Anomaly Alert")
|
||||
world << sound('sound/AI/radiation.ogg')
|
||||
|
||||
// Don't do anything, we want to pack the announcement with the actual event
|
||||
|
||||
/datum/event/radiation_storm/start()
|
||||
for(var/mob/living/carbon/human/H in living_mob_list)
|
||||
var/turf/T = get_turf(H)
|
||||
if(!T)
|
||||
continue
|
||||
if(T.z != 1)
|
||||
continue
|
||||
if(istype(H,/mob/living/carbon/human))
|
||||
H.apply_effect((rand(15,75)),IRRADIATE,0)
|
||||
if(prob(5))
|
||||
H.apply_effect((rand(90,150)),IRRADIATE,0)
|
||||
if(prob(25))
|
||||
if (prob(75))
|
||||
randmutb(H)
|
||||
domutcheck(H,null,1)
|
||||
else
|
||||
randmutg(H)
|
||||
domutcheck(H,null,1)
|
||||
spawn()
|
||||
command_alert("High levels of radiation detected near the station. Please evacuate into one of the shielded maintenance tunnels.", "Anomaly Alert")
|
||||
|
||||
for(var/mob/living/carbon/monkey/M in living_mob_list)
|
||||
var/turf/T = get_turf(M)
|
||||
if(!T)
|
||||
continue
|
||||
if(T.z != 1)
|
||||
continue
|
||||
M.apply_effect((rand(15,75)),IRRADIATE,0)
|
||||
sleep(200)
|
||||
|
||||
command_alert("The station has entered the radiation belt. Please report to medbay if you experience any unusual symptoms.", "Anomaly Alert")
|
||||
for(var/i = 0, i < 10, i++)
|
||||
for(var/mob/living/carbon/human/H in living_mob_list)
|
||||
var/turf/T = get_turf(H)
|
||||
if(!T)
|
||||
continue
|
||||
if(T.z != 1)
|
||||
continue
|
||||
if(istype(T.loc, /area/maintenance) || istype(T.loc, /area/crew_quarters))
|
||||
continue
|
||||
if(istype(H,/mob/living/carbon/human))
|
||||
H.apply_effect((rand(5,25)),IRRADIATE,0)
|
||||
if(prob(5))
|
||||
H.apply_effect((rand(30,50)),IRRADIATE,0)
|
||||
if (prob(75))
|
||||
randmutb(H)
|
||||
domutcheck(H,null,1)
|
||||
else
|
||||
randmutg(H)
|
||||
domutcheck(H,null,1)
|
||||
for(var/mob/living/carbon/monkey/M in living_mob_list)
|
||||
var/turf/T = get_turf(M)
|
||||
if(!T)
|
||||
continue
|
||||
if(T.z != 1)
|
||||
continue
|
||||
M.apply_effect((rand(5,25)),IRRADIATE,0)
|
||||
sleep(50)
|
||||
|
||||
|
||||
command_alert("The station has passed the radiation belt", "Anomaly Alert")
|
||||
@@ -0,0 +1,37 @@
|
||||
/turf/simulated/wall
|
||||
|
||||
|
||||
datum/event/wallrot
|
||||
var/severity = 1
|
||||
|
||||
datum/event/wallrot/setup()
|
||||
announceWhen = rand(0, 3000)
|
||||
endWhen = announceWhen + 1
|
||||
severity = rand(5, 10)
|
||||
|
||||
datum/event/wallrot/announce()
|
||||
command_alert("Harmful fungi detected on station. Station structures may be contaminated.", "Biohazard Alert")
|
||||
|
||||
datum/event/wallrot/start()
|
||||
spawn()
|
||||
var/turf/center = null
|
||||
|
||||
// 100 attempts
|
||||
for(var/i=0, i<100, i++)
|
||||
var/turf/candidate = locate(rand(1, world.maxx), rand(1, world.maxy), 1)
|
||||
if(istype(candidate, /turf/simulated/wall))
|
||||
center = candidate
|
||||
|
||||
if(center)
|
||||
// Make sure at least one piece of wall rots!
|
||||
center:rot()
|
||||
|
||||
// Have a chance to rot lots of other walls.
|
||||
var/rotcount = 0
|
||||
for(var/turf/simulated/wall/W in range(5, center)) if(prob(50))
|
||||
W:rot()
|
||||
rotcount++
|
||||
|
||||
// Only rot up to severity walls
|
||||
if(rotcount >= severity)
|
||||
break
|
||||
@@ -32,19 +32,13 @@ mob/proc/custom_emote(var/m_type=1,var/message = null)
|
||||
continue
|
||||
if(findtext(message," snores.")) //Because we have so many sleeping people.
|
||||
break
|
||||
if(M.stat == 2 && M.client.ghost_sight && !(M in viewers(src,null)))
|
||||
if(M.stat == 2 && (M.client.prefs.toggles & CHAT_GHOSTSIGHT) && !(M in viewers(src,null)))
|
||||
M.show_message(message)
|
||||
|
||||
|
||||
if (m_type & 1)
|
||||
for (var/mob/O in viewers(src, null))
|
||||
if(istype(O,/mob/living/carbon/human))
|
||||
for(var/mob/living/parasite/P in O:parasites)
|
||||
P.show_message(message, m_type)
|
||||
O.show_message(message, m_type)
|
||||
else if (m_type & 2)
|
||||
for (var/mob/O in hearers(src.loc, null))
|
||||
if(istype(O,/mob/living/carbon/human))
|
||||
for(var/mob/living/parasite/P in O:parasites)
|
||||
P.show_message(message, m_type)
|
||||
O.show_message(message, m_type)
|
||||
|
||||
@@ -53,27 +53,17 @@
|
||||
var/input = copytext(sanitize(input("Choose an emote to display.") as text|null),1,MAX_MESSAGE_LEN)
|
||||
if (!input)
|
||||
return
|
||||
if(copytext(input,1,5) == "says")
|
||||
src << "\red Invalid emote."
|
||||
return
|
||||
else if(copytext(input,1,9) == "exclaims")
|
||||
src << "\red Invalid emote."
|
||||
return
|
||||
else if(copytext(input,1,5) == "asks")
|
||||
src << "\red Invalid emote."
|
||||
return
|
||||
else
|
||||
var/input2 = input("Is this a visible or hearable emote?") in list("Visible","Hearable")
|
||||
if (input2 == "Visible")
|
||||
m_type = 1
|
||||
else if (input2 == "Hearable")
|
||||
if (src.miming)
|
||||
return
|
||||
m_type = 2
|
||||
else
|
||||
alert("Unable to use this emote, must be either hearable or visible.")
|
||||
var/input2 = input("Is this a visible or hearable emote?") in list("Visible","Hearable")
|
||||
if (input2 == "Visible")
|
||||
m_type = 1
|
||||
else if (input2 == "Hearable")
|
||||
if (src.miming)
|
||||
return
|
||||
message = "<B>[src]</B> [input]"
|
||||
m_type = 2
|
||||
else
|
||||
alert("Unable to use this emote, must be either hearable or visible.")
|
||||
return
|
||||
message = "<B>[src]</B> [input]"
|
||||
|
||||
if ("me")
|
||||
if(silent)
|
||||
@@ -88,17 +78,7 @@
|
||||
return
|
||||
if(!(message))
|
||||
return
|
||||
if(copytext(message,1,5) == "says")
|
||||
src << "\red Invalid emote."
|
||||
return
|
||||
else if(copytext(message,1,9) == "exclaims")
|
||||
src << "\red Invalid emote."
|
||||
return
|
||||
else if(copytext(message,1,5) == "asks")
|
||||
src << "\red Invalid emote."
|
||||
return
|
||||
else
|
||||
message = "<B>[src]</B> [message]"
|
||||
message = "<B>[src]</B> [message]"
|
||||
|
||||
if ("salute")
|
||||
if (!src.buckled)
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
var/pressure_alert = 0
|
||||
var/prev_gender = null // Debug for plural genders
|
||||
var/temperature_alert = 0
|
||||
var/in_stasis = 0
|
||||
|
||||
|
||||
/mob/living/carbon/human/Life()
|
||||
@@ -59,8 +60,11 @@
|
||||
life_tick++
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
|
||||
in_stasis = istype(loc, /obj/structure/closet/body_bag/cryobag) && loc:opened == 0
|
||||
if(in_stasis) loc:used++
|
||||
|
||||
//No need to update all of these procs if the guy is dead.
|
||||
if(stat != DEAD)
|
||||
if(stat != DEAD && !in_stasis)
|
||||
if(air_master.current_cycle%4==2 || failed_last_breath) //First, resolve location and get a breath
|
||||
breathe() //Only try to take a breath every 4 ticks, unless suffocating
|
||||
|
||||
@@ -86,18 +90,20 @@
|
||||
|
||||
handle_virus_updates()
|
||||
|
||||
//stuff in the stomach
|
||||
handle_stomach()
|
||||
|
||||
handle_shock()
|
||||
|
||||
handle_pain()
|
||||
|
||||
handle_medical_side_effects()
|
||||
|
||||
handle_stasis_bag()
|
||||
|
||||
//Handle temperature/pressure differences between body and environment
|
||||
handle_environment(environment)
|
||||
|
||||
//stuff in the stomach
|
||||
handle_stomach()
|
||||
|
||||
handle_shock()
|
||||
|
||||
handle_pain()
|
||||
|
||||
handle_medical_side_effects()
|
||||
|
||||
//Status updates, death etc.
|
||||
handle_regular_status_updates() //TODO: optimise ~Carn
|
||||
update_canmove()
|
||||
@@ -196,6 +202,16 @@
|
||||
src << "\red Your legs won't respond properly, you fall down."
|
||||
lying = 1
|
||||
|
||||
proc/handle_stasis_bag()
|
||||
// Handle side effects from stasis bag
|
||||
if(in_stasis)
|
||||
// First off, there's no oxygen supply, so the mob will slowly take brain damage
|
||||
adjustBrainLoss(0.1)
|
||||
|
||||
// Next, the method to induce stasis has some adverse side-effects, manifesting
|
||||
// as cloneloss
|
||||
adjustCloneLoss(0.1)
|
||||
|
||||
proc/handle_mutations_and_radiation()
|
||||
if(getFireLoss())
|
||||
if((COLD_RESISTANCE in mutations) || (prob(1)))
|
||||
@@ -787,8 +803,8 @@
|
||||
var/total_plasmaloss = 0
|
||||
for(var/obj/item/I in src)
|
||||
if(I.contaminated)
|
||||
total_plasmaloss += vsc.plc.CONTAMINATION_LOSS
|
||||
if(status_flags & GODMODE) return 0 //godmode
|
||||
total_plasmaloss += vsc.plc.CONTAMINATION_LOSS
|
||||
if(status_flags & GODMODE) return 0 //godmode
|
||||
adjustToxLoss(total_plasmaloss)
|
||||
|
||||
// if(dna && dna.mutantrace == "plant") //couldn't think of a better place to place it, since it handles nutrition -- Urist
|
||||
@@ -886,8 +902,10 @@
|
||||
silent = 0
|
||||
else //ALIVE. LIGHTS ARE ON
|
||||
updatehealth() //TODO
|
||||
handle_organs()
|
||||
handle_blood()
|
||||
if(!in_stasis)
|
||||
handle_organs()
|
||||
handle_blood()
|
||||
|
||||
if(health <= config.health_threshold_dead || brain_op_stage == 4.0)
|
||||
death()
|
||||
blinded = 1
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/mob/living/carbon/slime/emote(var/act)
|
||||
/mob/living/carbon/slime/emote(var/act, var/type, var/desc)
|
||||
|
||||
|
||||
if (findtext(act, "-", 1, null))
|
||||
@@ -13,6 +13,10 @@
|
||||
var/message
|
||||
|
||||
switch(act)
|
||||
if ("me")
|
||||
return custom_emote(m_type, desc)
|
||||
if ("custom")
|
||||
return custom_emote(m_type, desc)
|
||||
if("moan")
|
||||
message = "<B>The [src.name]</B> moans."
|
||||
m_type = 2
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/mob/living/carbon/monkey/emote(var/act)
|
||||
/mob/living/carbon/monkey/emote(var/act, var/type, var/desc)
|
||||
|
||||
var/param = null
|
||||
if (findtext(act, "-", 1, null))
|
||||
@@ -14,6 +14,12 @@
|
||||
var/message
|
||||
|
||||
switch(act)
|
||||
if ("me")
|
||||
return custom_emote(m_type, desc)
|
||||
|
||||
if ("custom")
|
||||
return custom_emote(m_type, desc)
|
||||
|
||||
if("sign")
|
||||
if (!src.restrained())
|
||||
message = text("<B>The monkey</B> signs[].", (text2num(param) ? text(" the number []", text2num(param)) : null))
|
||||
|
||||
@@ -9,6 +9,12 @@
|
||||
act = copytext(act,1,length(act))
|
||||
|
||||
switch(act)
|
||||
if ("me")
|
||||
return custom_emote(m_type, message)
|
||||
|
||||
if ("custom")
|
||||
return custom_emote(m_type, message)
|
||||
|
||||
if ("salute")
|
||||
if (!src.buckled)
|
||||
var/M = null
|
||||
@@ -56,20 +62,6 @@
|
||||
message = "<B>[src]</B> flaps his wings ANGRILY!"
|
||||
m_type = 2
|
||||
|
||||
if ("custom")
|
||||
var/input = copytext(sanitize(input("Choose an emote to display.") as text|null),1,MAX_MESSAGE_LEN)
|
||||
if (!input)
|
||||
return
|
||||
var/input2 = input("Is this a visible or hearable emote?") in list("Visible","Hearable")
|
||||
if (input2 == "Visible")
|
||||
m_type = 1
|
||||
else if (input2 == "Hearable")
|
||||
m_type = 2
|
||||
else
|
||||
alert("Unable to use this emote, must be either hearable or visible.")
|
||||
return
|
||||
message = "<B>[src]</B> [input]"
|
||||
|
||||
if ("me")
|
||||
if (src.client)
|
||||
if(client.prefs.muted & MUTE_IC)
|
||||
|
||||
@@ -226,14 +226,8 @@
|
||||
|
||||
/mob/living/simple_animal/emote(var/act, var/type, var/desc)
|
||||
if(act)
|
||||
if(act == "scream") act = "makes a loud and pained whimper" //ugly hack to stop animals screaming when crushed :P
|
||||
if(act == "me") //Allow me-emotes.
|
||||
act = desc
|
||||
if( findtext(act,".",lentext(act)) == 0 && findtext(act,"!",lentext(act)) == 0 && findtext(act,"?",lentext(act)) == 0 )
|
||||
act = addtext(act,".") //Makes sure all emotes end with a period.
|
||||
for (var/mob/O in viewers(src, null))
|
||||
O.show_message("<B>[src]</B> [act]")
|
||||
|
||||
if(act == "scream") act = "whimper" //ugly hack to stop animals screaming when crushed :P
|
||||
..(act, type, desc)
|
||||
|
||||
/mob/living/simple_animal/attack_animal(mob/living/simple_animal/M as mob)
|
||||
if(M.melee_damage_upper == 0)
|
||||
|
||||
@@ -277,6 +277,8 @@
|
||||
character.loc = pick(latejoin)
|
||||
character.lastarea = get_area(loc)
|
||||
|
||||
ticker.mode.latespawn(character)
|
||||
|
||||
//ticker.mode.latespawn(character)
|
||||
|
||||
if(character.mind.assigned_role != "Cyborg")
|
||||
|
||||
+12
-11
@@ -75,31 +75,32 @@
|
||||
//tcomms code is still runtiming somewhere here
|
||||
var/ending = copytext(text, length(text))
|
||||
if (is_speaking_soghun)
|
||||
return "hisses, \"<span class='soghun'>[text]</span>\"";
|
||||
return "<span class='say_quote'>hisses</span>, \"<span class='soghun'>[text]</span>\"";
|
||||
if (is_speaking_skrell)
|
||||
return "warbles, \"<span class='skrell'>[text]</span>\"";
|
||||
return "<span class='say_quote'>warbles</span>, \"<span class='skrell'>[text]</span>\"";
|
||||
if (is_speaking_tajaran)
|
||||
return "mrowls, \"<span class='tajaran'>[text]</span>\"";
|
||||
return "<span class='say_quote'>mrowls</span>, \"<span class='tajaran'>[text]</span>\"";
|
||||
//Needs Virus2
|
||||
// if (src.disease_symptoms & DISEASE_HOARSE)
|
||||
// return "rasps, \"[text]\"";
|
||||
if (src.stuttering)
|
||||
return "stammers, \"[text]\"";
|
||||
return "<span class='say_quote'>stammers</span>, \"[text]\"";
|
||||
if (src.slurring)
|
||||
return "slurrs, \"[text]\"";
|
||||
return "<span class='say_quote'>slurrs</span>, \"[text]\"";
|
||||
if(isliving(src))
|
||||
var/mob/living/L = src
|
||||
if (L.getBrainLoss() >= 60)
|
||||
return "gibbers, \"[text]\"";
|
||||
return "<span class='say_quote'>gibbers</span>, \"[text]\"";
|
||||
if (ending == "?")
|
||||
return "asks, \"[text]\"";
|
||||
return "<span class='say_quote'>asks</span>, \"[text]\"";
|
||||
if (ending == "!")
|
||||
return "exclaims, \"[text]\"";
|
||||
return "<span class='say_quote'>exclaims</span>, \"[text]\"";
|
||||
|
||||
return "says, \"[text]\"";
|
||||
return "<span class='say_quote'>says</span>, \"[text]\"";
|
||||
|
||||
/mob/proc/emote(var/act)
|
||||
return
|
||||
/mob/proc/emote(var/act, var/type, var/message)
|
||||
if(act == "me")
|
||||
return custom_emote(type, message)
|
||||
|
||||
/mob/proc/get_ear()
|
||||
// returns an atom representing a location on the map from which this
|
||||
|
||||
@@ -122,6 +122,8 @@
|
||||
var/pictures_max = 10
|
||||
var/pictures_left = 10
|
||||
var/on = 1
|
||||
var/icon_on = "camera"
|
||||
var/icon_off = "camera_off"
|
||||
|
||||
|
||||
/obj/item/device/camera/attack(mob/living/carbon/human/M as mob, mob/user as mob)
|
||||
@@ -130,9 +132,9 @@
|
||||
/obj/item/device/camera/attack_self(mob/user as mob)
|
||||
on = !on
|
||||
if(on)
|
||||
src.icon_state = "camera"
|
||||
src.icon_state = icon_on
|
||||
else
|
||||
src.icon_state = "camera_off"
|
||||
src.icon_state = icon_off
|
||||
user << "You switch the camera [on ? "on" : "off"]."
|
||||
return
|
||||
|
||||
@@ -253,8 +255,8 @@
|
||||
pictures_left--
|
||||
desc = "A polaroid camera. It has [pictures_left] photos left."
|
||||
user << "<span class='notice'>[pictures_left] photos left.</span>"
|
||||
icon_state = "camera_off"
|
||||
icon_state = icon_off
|
||||
on = 0
|
||||
spawn(64)
|
||||
icon_state = "camera"
|
||||
icon_state = icon_on
|
||||
on = 1
|
||||
@@ -1,5 +1,4 @@
|
||||
|
||||
//updated by cael_aislinn on 5/3/2013 to be rotateable, moveable and generally more flexible
|
||||
/obj/machinery/power/generator
|
||||
name = "thermoelectric generator"
|
||||
desc = "It's a high efficiency thermoelectric generator."
|
||||
@@ -57,39 +56,26 @@
|
||||
if(lastgenlev != 0)
|
||||
overlays += image('icons/obj/power.dmi', "teg-op[lastgenlev]")
|
||||
|
||||
|
||||
|
||||
/obj/machinery/power/generator/process()
|
||||
|
||||
//world << "Generator process ran"
|
||||
|
||||
if(!circ1 || !circ2 || !anchored || stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
|
||||
//world << "circ1 and circ2 pass"
|
||||
updateDialog()
|
||||
|
||||
var/datum/gas_mixture/air1 = circ1.return_transfer_air()
|
||||
var/datum/gas_mixture/air2 = circ2.return_transfer_air()
|
||||
|
||||
lastgen = 0
|
||||
|
||||
//world << "hot_air = [hot_air]; cold_air = [cold_air];"
|
||||
|
||||
if(air1 && air2)
|
||||
|
||||
//world << "hot_air = [hot_air] temperature = [air2.temperature]; cold_air = [cold_air] temperature = [air2.temperature];"
|
||||
|
||||
//world << "coldair and hotair pass"
|
||||
var/air1_heat_capacity = air1.heat_capacity()
|
||||
var/air2_heat_capacity = air2.heat_capacity()
|
||||
var/delta_temperature = abs(air2.temperature - air1.temperature)
|
||||
|
||||
//world << "delta_temperature = [delta_temperature]; air1_heat_capacity = [air1_heat_capacity]; air2_heat_capacity = [air2_heat_capacity]"
|
||||
|
||||
if(delta_temperature > 0 && air1_heat_capacity > 0 && air2_heat_capacity > 0)
|
||||
var/efficiency = 0.65
|
||||
var/energy_transfer = delta_temperature*air2_heat_capacity*air1_heat_capacity/(air2_heat_capacity+air1_heat_capacity)
|
||||
var/heat = energy_transfer*(1-efficiency)
|
||||
lastgen = energy_transfer*efficiency*0.05
|
||||
|
||||
if(air2.temperature > air1.temperature)
|
||||
air2.temperature = air2.temperature - energy_transfer/air2_heat_capacity
|
||||
@@ -98,20 +84,29 @@
|
||||
air2.temperature = air2.temperature + heat/air2_heat_capacity
|
||||
air1.temperature = air1.temperature - energy_transfer/air1_heat_capacity
|
||||
|
||||
lastgen = circ1.ReturnPowerGeneration() + circ2.ReturnPowerGeneration()
|
||||
if(lastgen > 0)
|
||||
add_avail(lastgen)
|
||||
//Transfer the air
|
||||
circ1.air2.merge(air1)
|
||||
circ2.air2.merge(air2)
|
||||
|
||||
else
|
||||
add_load(-lastgen)
|
||||
//Update the gas networks
|
||||
if(circ1.network2)
|
||||
circ1.network2.update = 1
|
||||
if(circ2.network2)
|
||||
circ2.network2.update = 1
|
||||
|
||||
// update icon overlays and power usage only if displayed level has changed
|
||||
var/genlev = max(0, min( round(11*lastgen / 100000), 11))
|
||||
if(lastgen > 250000 && prob(10))
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
lastgen *= 0.5
|
||||
var/genlev = max(0, min( round(11*lastgen / 250000), 11))
|
||||
if(lastgen > 100 && genlev == 0)
|
||||
genlev = 1
|
||||
if(genlev != lastgenlev)
|
||||
lastgenlev = genlev
|
||||
updateicon()
|
||||
|
||||
updateDialog()
|
||||
add_avail(lastgen)
|
||||
|
||||
/obj/machinery/power/generator/attack_ai(mob/user)
|
||||
if(stat & (BROKEN|NOPOWER)) return
|
||||
@@ -145,19 +140,17 @@
|
||||
if(circ1 && circ2)
|
||||
t += "Output : [round(lastgen)] W<BR><BR>"
|
||||
|
||||
t += "<B>Primary Circulator (top/right)</B><BR>"
|
||||
t += "<B>Primary Circulator (top or right)</B><BR>"
|
||||
t += "Inlet Pressure: [round(circ1.air1.return_pressure(), 0.1)] kPa<BR>"
|
||||
t += "Inlet Temperature: [round(circ1.air1.temperature, 0.1)] K<BR>"
|
||||
t += "Outlet Pressure: [round(circ1.air2.return_pressure(), 0.1)] kPa<BR>"
|
||||
t += "Outlet Temperature: [round(circ1.air2.temperature, 0.1)] K<BR>"
|
||||
t += "Turbine Status: <A href='?src=\ref[src];turbine1=1'>[circ1.turbine_pumping ? "Pumping" : "Generating"]</a><br><br>"
|
||||
|
||||
t += "<B>Secondary Circulator (bottom/left)</B><BR>"
|
||||
t += "<B>Secondary Circulator (bottom or left)</B><BR>"
|
||||
t += "Inlet Pressure: [round(circ2.air1.return_pressure(), 0.1)] kPa<BR>"
|
||||
t += "Inlet Temperature: [round(circ2.air1.temperature, 0.1)] K<BR>"
|
||||
t += "Outlet Pressure: [round(circ2.air2.return_pressure(), 0.1)] kPa<BR>"
|
||||
t += "Outlet Temperature: [round(circ2.air2.temperature, 0.1)] K<BR>"
|
||||
t += "Turbine Status: <A href='?src=\ref[src];turbine2=1'>[circ2.turbine_pumping ? "Pumping" : "Generating"]</a><br>"
|
||||
|
||||
else
|
||||
t += "Unable to connect to circulators.<br>"
|
||||
@@ -179,14 +172,6 @@
|
||||
usr.unset_machine()
|
||||
return 0
|
||||
|
||||
if( href_list["turbine2"] )
|
||||
if(circ2)
|
||||
circ2.turbine_pumping = !circ2.turbine_pumping
|
||||
|
||||
if( href_list["turbine1"] )
|
||||
if(circ1)
|
||||
circ1.turbine_pumping = !circ1.turbine_pumping
|
||||
|
||||
updateDialog()
|
||||
return 1
|
||||
|
||||
|
||||
@@ -1214,6 +1214,17 @@ datum
|
||||
..()
|
||||
return
|
||||
|
||||
// Clear off wallrot fungi
|
||||
reaction_turf(var/turf/T, var/volume)
|
||||
if(istype(T, /turf/simulated/wall))
|
||||
var/turf/simulated/wall/W = T
|
||||
if(W.rotting)
|
||||
W.rotting = 0
|
||||
for(var/obj/effect/E in W) if(E.name == "Wallrot") del E
|
||||
|
||||
for(var/mob/O in viewers(W, null))
|
||||
O.show_message(text("\blue The fungi are completely dissolved by the solution!"), 1)
|
||||
|
||||
reaction_obj(var/obj/O, var/volume)
|
||||
if(istype(O,/obj/effect/alien/weeds/))
|
||||
var/obj/effect/alien/weeds/alien_weeds = O
|
||||
|
||||
@@ -49,12 +49,20 @@
|
||||
|
||||
D.icon += mix_color_from_reagents(D.reagents.reagent_list)
|
||||
|
||||
var/turf/A_turf = get_turf(A)
|
||||
|
||||
spawn(0)
|
||||
for(var/i=0, i<3, i++)
|
||||
step_towards(D,A)
|
||||
D.reagents.reaction(get_turf(D))
|
||||
for(var/atom/T in get_turf(D))
|
||||
D.reagents.reaction(T)
|
||||
|
||||
// When spraying against the wall, also react with the wall, but
|
||||
// not its contents.
|
||||
if(get_dist(D, A_turf) == 1 && A_turf.density)
|
||||
D.reagents.reaction(A_turf)
|
||||
sleep(2)
|
||||
sleep(3)
|
||||
del(D)
|
||||
|
||||
|
||||
@@ -620,6 +620,8 @@ var/list/TAGGERLOCATIONS = list("Disposals",
|
||||
#define CHAT_PRAYER 256
|
||||
#define CHAT_RADIO 512
|
||||
#define CHAT_ATTACKLOGS 1024
|
||||
#define CHAT_DEBUGLOGS 2048
|
||||
|
||||
|
||||
#define TOGGLES_DEFAULT (SOUND_ADMINHELP|SOUND_MIDI|SOUND_AMBIENCE|SOUND_LOBBY|CHAT_OOC|CHAT_DEAD|CHAT_GHOSTEARS|CHAT_GHOSTSIGHT|CHAT_PRAYER|CHAT_RADIO|CHAT_ATTACKLOGS)
|
||||
|
||||
|
||||
@@ -55,6 +55,7 @@ h1.alert, h2.alert {color: #000000;}
|
||||
.tajaran {color: #803B56;}
|
||||
.skrell {color: #00CED1;}
|
||||
.soghun {color: #228B22;}
|
||||
.say_quote {font-family: Georgia, Verdana, sans-serif;}
|
||||
|
||||
.interface {color: #330033;}
|
||||
</style>"}
|
||||
|
||||
Reference in New Issue
Block a user