Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into intern
# Conflicts: # icons/mob/clothing/suit.dmi # icons/mob/clothing/suit_digi.dmi # icons/obj/clothing/suits.dmi
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
/datum/atmosphere
|
||||
var/gas_string
|
||||
var/id
|
||||
|
||||
var/list/base_gases // A list of gases to always have
|
||||
var/list/normal_gases // A list of allowed gases:base_amount
|
||||
var/list/restricted_gases // A list of allowed gases like normal_gases but each can only be selected a maximum of one time
|
||||
var/restricted_chance = 10 // Chance per iteration to take from restricted gases
|
||||
|
||||
var/minimum_pressure
|
||||
var/maximum_pressure
|
||||
|
||||
var/minimum_temp
|
||||
var/maximum_temp
|
||||
|
||||
/datum/atmosphere/New()
|
||||
generate_gas_string()
|
||||
|
||||
/datum/atmosphere/proc/generate_gas_string()
|
||||
var/list/spicy_gas = restricted_gases.Copy()
|
||||
var/target_pressure = rand(minimum_pressure, maximum_pressure)
|
||||
var/pressure_scale = target_pressure / maximum_pressure
|
||||
|
||||
// First let's set up the gasmix and base gases for this template
|
||||
// We make the string from a gasmix in this proc because gases need to calculate their pressure
|
||||
var/datum/gas_mixture/gasmix = new
|
||||
gasmix.set_temperature(rand(minimum_temp, maximum_temp))
|
||||
for(var/i in base_gases)
|
||||
gasmix.set_moles(i, base_gases[i])
|
||||
|
||||
// Now let the random choices begin
|
||||
var/gastype
|
||||
var/amount
|
||||
while(gasmix.return_pressure() < target_pressure)
|
||||
if(!prob(restricted_chance) || !length(spicy_gas))
|
||||
gastype = pick(normal_gases)
|
||||
amount = normal_gases[gastype]
|
||||
else
|
||||
gastype = pick(spicy_gas)
|
||||
amount = spicy_gas[gastype]
|
||||
spicy_gas -= gastype //You can only pick each restricted gas once
|
||||
|
||||
amount *= rand(50, 200) / 100 // Randomly modifes the amount from half to double the base for some variety
|
||||
amount *= pressure_scale // If we pick a really small target pressure we want roughly the same mix but less of it all
|
||||
amount = CEILING(amount, 0.1)
|
||||
|
||||
gasmix.adjust_moles(gastype, amount)
|
||||
|
||||
// That last one put us over the limit, remove some of it
|
||||
if(gasmix.return_pressure() > target_pressure)
|
||||
var/moles_to_remove = (1 - target_pressure / gasmix.return_pressure()) * gasmix.total_moles()
|
||||
gasmix.adjust_moles(gastype, -moles_to_remove)
|
||||
gasmix.set_moles(gastype, FLOOR(gasmix.get_moles(gastype), 0.1))
|
||||
|
||||
// Now finally lets make that string
|
||||
var/list/gas_string_builder = list()
|
||||
for(var/id in gasmix.get_gases())
|
||||
gas_string_builder += "[id]=[gasmix.get_moles(id)]"
|
||||
gas_string_builder += "TEMP=[gasmix.return_temperature()]"
|
||||
gas_string = gas_string_builder.Join(";")
|
||||
@@ -0,0 +1,48 @@
|
||||
// Atmos types used for planetary airs
|
||||
/datum/atmosphere/lavaland
|
||||
id = LAVALAND_DEFAULT_ATMOS
|
||||
|
||||
base_gases = list(
|
||||
GAS_O2=5,
|
||||
GAS_N2=10,
|
||||
)
|
||||
normal_gases = list(
|
||||
GAS_O2=10,
|
||||
GAS_N2=10,
|
||||
GAS_CO2=10,
|
||||
)
|
||||
restricted_gases = list(
|
||||
GAS_BZ=0.1,
|
||||
GAS_METHYL_BROMIDE=0.1,
|
||||
)
|
||||
restricted_chance = 30
|
||||
|
||||
minimum_pressure = HAZARD_LOW_PRESSURE + 10
|
||||
maximum_pressure = LAVALAND_EQUIPMENT_EFFECT_PRESSURE - 1
|
||||
|
||||
minimum_temp = BODYTEMP_COLD_DAMAGE_LIMIT + 1
|
||||
maximum_temp = 320
|
||||
|
||||
/datum/atmosphere/icemoon
|
||||
id = ICEMOON_DEFAULT_ATMOS
|
||||
|
||||
base_gases = list(
|
||||
GAS_O2=5,
|
||||
GAS_N2=10,
|
||||
)
|
||||
normal_gases = list(
|
||||
GAS_O2=10,
|
||||
GAS_N2=10,
|
||||
GAS_CO2=10,
|
||||
)
|
||||
restricted_gases = list(
|
||||
GAS_METHYL_BROMIDE=0.1,
|
||||
)
|
||||
restricted_chance = 10
|
||||
|
||||
minimum_pressure = HAZARD_LOW_PRESSURE + 10
|
||||
maximum_pressure = LAVALAND_EQUIPMENT_EFFECT_PRESSURE - 1
|
||||
|
||||
minimum_temp = 180
|
||||
maximum_temp = 180
|
||||
|
||||
@@ -135,6 +135,8 @@
|
||||
var/obj/item/I = AM
|
||||
var/mob/M = parent.loc
|
||||
I.dropped(M)
|
||||
I.item_flags &= ~IN_STORAGE
|
||||
I.remove_outline()
|
||||
if(new_location)
|
||||
AM.forceMove(new_location) // exited comsig will handle removal reset.
|
||||
//We don't want to call this if the item is being destroyed
|
||||
@@ -180,6 +182,7 @@
|
||||
I.forceMove(parent.drop_location())
|
||||
return FALSE
|
||||
I.on_enter_storage(master)
|
||||
I.item_flags |= IN_STORAGE
|
||||
refresh_mob_views()
|
||||
I.mouse_opacity = MOUSE_OPACITY_OPAQUE //So you can click on the area around the item to equip it, instead of having to pixel hunt
|
||||
if(M)
|
||||
|
||||
@@ -423,6 +423,9 @@
|
||||
var/atom/A = parent
|
||||
if(ismob(M)) //all the check for item manipulation are in other places, you can safely open any storages as anything and its not buggy, i checked
|
||||
A.add_fingerprint(M)
|
||||
if(istype(A, /obj/item))
|
||||
var/obj/item/I = A
|
||||
I.remove_outline() //Removes the outline when we drag
|
||||
if(!over_object)
|
||||
return FALSE
|
||||
if(ismecha(M.loc)) // stops inventory actions in a mech
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
var/mob/living/L = parent
|
||||
if(L.incapacitated() || L.lying)
|
||||
return
|
||||
var/matrix/otransform = matrix(L.transform) //make a copy of the current transform
|
||||
animate(L, pixel_z = 4, time = 0)
|
||||
animate(pixel_z = 0, transform = turn(matrix(), pick(-12, 0, 12)), time=2)
|
||||
animate(pixel_z = 0, transform = matrix(), time = 0)
|
||||
animate(pixel_z = 0, transform = turn(L.transform, pick(-12, 0, 12)), time=2) //waddle.
|
||||
animate(pixel_z = 0, transform = otransform, time = 0) //return to previous transform.
|
||||
|
||||
@@ -386,6 +386,14 @@
|
||||
qdel(language_holder)
|
||||
var/species_holder = initial(mrace.species_language_holder)
|
||||
language_holder = new species_holder(src)
|
||||
|
||||
var/mob/living/carbon/human/H = src
|
||||
//provide the user's additional language to the new language holder even if they change species
|
||||
if(H.additional_language && H.additional_language != "None")
|
||||
var/language_entry = GLOB.roundstart_languages[H.additional_language]
|
||||
if(language_entry)
|
||||
grant_language(language_entry, TRUE, TRUE)
|
||||
|
||||
update_atom_languages()
|
||||
|
||||
/mob/living/carbon/human/set_species(datum/species/mrace, icon_update = TRUE, pref_load = FALSE)
|
||||
|
||||
@@ -162,3 +162,20 @@
|
||||
gain_text = "<span class='notice'>You feel like munching on a can of soda.</span>"
|
||||
lose_text = "<span class='notice'>You no longer feel like you should be eating trash.</span>"
|
||||
mob_trait = TRAIT_TRASHCAN
|
||||
|
||||
/datum/quirk/colorist
|
||||
name = "Colorist"
|
||||
desc = "You like carrying around a hair dye spray to quickly apply color patterns to your hair."
|
||||
value = 0
|
||||
medical_record_text = "Patient enjoys dyeing their hair with pretty colors."
|
||||
|
||||
/datum/quirk/colorist/on_spawn()
|
||||
var/mob/living/carbon/human/H = quirk_holder
|
||||
var/obj/item/dyespray/spraycan = new(get_turf(quirk_holder))
|
||||
H.equip_to_slot(spraycan, SLOT_IN_BACKPACK)
|
||||
H.regenerate_icons()
|
||||
|
||||
/datum/quirk/colorist/post_add()
|
||||
var/mob/living/carbon/human/H = quirk_holder
|
||||
SEND_SIGNAL(H.back, COMSIG_TRY_STORAGE_SHOW, H)
|
||||
to_chat(quirk_holder, "<span class='boldnotice'>You brought some extra dye with you! It's in your bag if you forgot.</span>")
|
||||
|
||||
@@ -329,3 +329,15 @@
|
||||
to_chat(L, "<span class='warning'>You need an attachable assembly!</span>")
|
||||
|
||||
#undef MAXIMUM_EMP_WIRES
|
||||
|
||||
//gremlins
|
||||
/datum/wires/proc/npc_tamper(mob/living/L)
|
||||
if(!wires.len)
|
||||
return
|
||||
|
||||
var/wire_to_screw = pick(wires)
|
||||
|
||||
if(is_color_cut(wire_to_screw) || prob(50)) //CutWireColour() proc handles both cutting and mending wires. If the wire is already cut, always mend it back. Otherwise, 50% to cut it and 50% to pulse it
|
||||
cut(wire_to_screw)
|
||||
else
|
||||
pulse(wire_to_screw, L)
|
||||
|
||||
Reference in New Issue
Block a user