mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-07-14 08:32:48 +01:00
+349
-574
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,72 @@
|
||||
var/list/name_to_mineral
|
||||
|
||||
proc/SetupMinerals()
|
||||
name_to_mineral = list()
|
||||
for(var/type in typesof(/mineral) - /mineral)
|
||||
var/mineral/new_mineral = new type
|
||||
if(!new_mineral.name)
|
||||
continue
|
||||
name_to_mineral[new_mineral.name] = new_mineral
|
||||
return 1
|
||||
|
||||
mineral
|
||||
///What am I called?
|
||||
var/name
|
||||
var/display_name
|
||||
///How much ore?
|
||||
var/result_amount
|
||||
///Does this type of deposit spread?
|
||||
var/spread = 1
|
||||
///Chance of spreading in any direction
|
||||
var/spread_chance
|
||||
|
||||
///Path to the resultant ore.
|
||||
var/ore
|
||||
|
||||
New()
|
||||
. = ..()
|
||||
if(!display_name)
|
||||
display_name = name
|
||||
|
||||
mineral/uranium
|
||||
name = "Uranium"
|
||||
result_amount = 5
|
||||
spread_chance = 10
|
||||
ore = /obj/item/weapon/ore/uranium
|
||||
|
||||
mineral/iron
|
||||
name = "Iron"
|
||||
result_amount = 5
|
||||
spread_chance = 25
|
||||
ore = /obj/item/weapon/ore/iron
|
||||
|
||||
mineral/diamond
|
||||
name = "Diamond"
|
||||
result_amount = 5
|
||||
spread_chance = 10
|
||||
ore = /obj/item/weapon/ore/diamond
|
||||
|
||||
mineral/gold
|
||||
name = "Gold"
|
||||
result_amount = 5
|
||||
spread_chance = 10
|
||||
ore = /obj/item/weapon/ore/gold
|
||||
|
||||
mineral/silver
|
||||
name = "Silver"
|
||||
result_amount = 5
|
||||
spread_chance = 10
|
||||
ore = /obj/item/weapon/ore/silver
|
||||
|
||||
mineral/plasma
|
||||
name = "Plasma"
|
||||
result_amount = 5
|
||||
spread_chance = 25
|
||||
ore = /obj/item/weapon/ore/plasma
|
||||
|
||||
mineral/clown
|
||||
display_name = "Bananium"
|
||||
name = "Clown"
|
||||
result_amount = 3
|
||||
spread = 0
|
||||
ore = /obj/item/weapon/ore/clown
|
||||
@@ -4,7 +4,7 @@
|
||||
name = "Rock"
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "ore2"
|
||||
var/datum/geosample/geological_data
|
||||
var/datum/geosample/geologic_data
|
||||
|
||||
/obj/item/weapon/ore/uranium
|
||||
name = "Uranium ore"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
var/name = "an unknown language" // Fluff name of language if any.
|
||||
var/desc = "A language." // Short description for 'Check Languages'.
|
||||
var/speech_verb = "says" // 'says', 'hisses', 'farts'.
|
||||
var/colour = "say_quote" // CSS style to use for strings in this language.
|
||||
var/colour = "body" // CSS style to use for strings in this language.
|
||||
var/key = "x" // Character used to speak in language eg. :o for Unathi.
|
||||
var/flags = 0 // Various language flags.
|
||||
var/native // If set, non-native speakers will have trouble speaking.
|
||||
@@ -54,6 +54,7 @@
|
||||
/datum/language/human
|
||||
name = "Sol Common"
|
||||
desc = "A bastardized hybrid of informal English and elements of Mandarin Chinese; the common language of the Sol system."
|
||||
colour = "rough"
|
||||
key = "1"
|
||||
flags = RESTRICTED
|
||||
|
||||
@@ -62,35 +63,30 @@
|
||||
name = "Tradeband"
|
||||
desc = "Maintained by the various trading cartels in major systems, this elegant, structured language is used for bartering and bargaining."
|
||||
speech_verb = "enunciates"
|
||||
colour = "say_quote"
|
||||
key = "2"
|
||||
|
||||
/datum/language/gutter
|
||||
name = "Gutter"
|
||||
desc = "Much like Standard, this crude pidgin tongue descended from numerous languages and serves as Tradeband for criminal elements."
|
||||
speech_verb = "growls"
|
||||
colour = "rough"
|
||||
key = "3"
|
||||
|
||||
// Language handling.
|
||||
/mob/proc/add_language(var/language)
|
||||
|
||||
for(var/datum/language/L in languages)
|
||||
if(L && L.name == language)
|
||||
return 0
|
||||
|
||||
var/datum/language/new_language = all_languages[language]
|
||||
|
||||
if(!istype(new_language,/datum/language))
|
||||
if(!istype(new_language) || new_language in languages)
|
||||
return 0
|
||||
|
||||
languages += new_language
|
||||
languages.Add(new_language)
|
||||
return 1
|
||||
|
||||
/mob/proc/remove_language(var/rem_language)
|
||||
|
||||
for(var/datum/language/L in languages)
|
||||
if(L && L.name == rem_language)
|
||||
languages -= L
|
||||
return 1
|
||||
languages.Remove(all_languages[rem_language])
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
@@ -40,11 +40,6 @@
|
||||
if(!species)
|
||||
set_species()
|
||||
|
||||
if(species.language)
|
||||
var/datum/language/L = all_languages[species.language]
|
||||
if(L)
|
||||
languages += L
|
||||
|
||||
var/datum/reagents/R = new/datum/reagents(1000)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
@@ -1257,8 +1252,14 @@ mob/living/carbon/human/yank_out_object()
|
||||
if(species && (species.name && species.name == new_species))
|
||||
return
|
||||
|
||||
if(species && species.language)
|
||||
remove_language(species.language)
|
||||
|
||||
species = all_species[new_species]
|
||||
|
||||
if(species.language)
|
||||
add_language(species.language)
|
||||
|
||||
spawn(0)
|
||||
update_icons()
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ var/list/department_radio_keys = list(
|
||||
if(client.prefs.muted & MUTE_IC)
|
||||
src << "\red You cannot speak in IC (muted)."
|
||||
return
|
||||
if (src.client.handle_spam_prevention(message,MUTE_IC))
|
||||
if (src.client.handle_spam_prevention(message, MUTE_IC))
|
||||
return
|
||||
|
||||
// Mute disability
|
||||
@@ -173,7 +173,7 @@ var/list/department_radio_keys = list(
|
||||
if(src.stunned > 2 || (traumatic_shock > 61 && prob(50)))
|
||||
message_mode = null //Stunned people shouldn't be able to physically turn on their radio/hold down the button to speak into it
|
||||
|
||||
message = capitalize(message)
|
||||
message = capitalize(trim_left(message))
|
||||
|
||||
if (!message)
|
||||
return
|
||||
@@ -371,9 +371,9 @@ var/list/department_radio_keys = list(
|
||||
for(var/mob/M in hearers(5, src))
|
||||
if(M != src && is_speaking_radio)
|
||||
M:show_message("<span class='notice'>[src] talks into [used_radios.len ? used_radios[1] : "radio"]</span>")
|
||||
|
||||
|
||||
var/rendered = null
|
||||
|
||||
|
||||
if (length(heard_a))
|
||||
var/message_a = say_quote(message,speaking)
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
spawning = 1
|
||||
src << sound(null, repeat = 0, wait = 0, volume = 85, channel = 1) // MAD JAMS cant last forever yo
|
||||
|
||||
|
||||
|
||||
observer.started_as_observer = 1
|
||||
close_spawn_windows()
|
||||
var/obj/O = locate("landmark*Observer-Start")
|
||||
@@ -287,6 +287,9 @@
|
||||
src << alert("[rank] is not available. Please try another.")
|
||||
return 0
|
||||
|
||||
spawning = 1
|
||||
close_spawn_windows()
|
||||
|
||||
job_master.AssignRole(src, rank, 1)
|
||||
|
||||
var/mob/living/carbon/human/character = create_character() //creates the human and transfers vars and mind
|
||||
@@ -359,8 +362,6 @@
|
||||
if(chosen_species)
|
||||
if(is_alien_whitelisted(src, client.prefs.species) || !config.usealienwhitelist || !(chosen_species.flags & WHITELISTED) || (client.holder.rights & R_ADMIN) )// Have to recheck admin due to no usr at roundstart. Latejoins are fine though.
|
||||
new_character.set_species(client.prefs.species)
|
||||
if(chosen_species.language)
|
||||
new_character.add_language(chosen_species.language)
|
||||
|
||||
var/datum/language/chosen_language
|
||||
if(client.prefs.language)
|
||||
@@ -392,7 +393,7 @@
|
||||
|
||||
if(client.prefs.disabilities)
|
||||
// Set defer to 1 if you add more crap here so it only recalculates struc_enzymes once. - N3X
|
||||
new_character.dna.SetSEState(GLASSESBLOCK,1,0)
|
||||
new_character.dna.SetSEState(GLASSESBLOCK,1,0)
|
||||
new_character.disabilities |= NEARSIGHTED
|
||||
|
||||
// And uncomment this, too.
|
||||
|
||||
+11
-13
@@ -98,30 +98,28 @@
|
||||
//tcomms code is still runtiming somewhere here
|
||||
var/ending = copytext(text, length(text))
|
||||
|
||||
var/speechverb = "<span class='say_quote'>"
|
||||
var/speech_verb = "says"
|
||||
var/speech_style = "body"
|
||||
|
||||
if (speaking)
|
||||
speechverb = "[speaking.speech_verb]</span>, \"<span class='[speaking.colour]'>"
|
||||
speech_verb = speaking.speech_verb
|
||||
speech_style = speaking.colour
|
||||
else if(speak_emote && speak_emote.len)
|
||||
speechverb = "[pick(speak_emote)], \""
|
||||
speech_verb = pick(speak_emote)
|
||||
else if (src.stuttering)
|
||||
speechverb = "stammers, \""
|
||||
speech_verb = "stammers"
|
||||
else if (src.slurring)
|
||||
speechverb = "slurrs, \""
|
||||
speech_verb = "slurrs"
|
||||
else if (ending == "?")
|
||||
speechverb = "asks, \""
|
||||
speech_verb = "asks"
|
||||
else if (ending == "!")
|
||||
speechverb = "exclaims, \""
|
||||
speech_verb = "exclaims"
|
||||
else if(isliving(src))
|
||||
var/mob/living/L = src
|
||||
if (L.getBrainLoss() >= 60)
|
||||
speechverb = "gibbers, \""
|
||||
else
|
||||
speechverb = "says, \""
|
||||
else
|
||||
speechverb = "says, \""
|
||||
speech_verb = "gibbers"
|
||||
|
||||
return "[speechverb][text]</span>\""
|
||||
return "<span class='say_quote'>[speech_verb],</span> \"<span class='[speech_style]'>[text]</span>\""
|
||||
|
||||
/mob/proc/emote(var/act, var/type, var/message)
|
||||
if(act == "me")
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
Methylphenidate
|
||||
|
||||
#define ANTIDEPRESSANT_MESSAGE_DELAY 5*60*10
|
||||
|
||||
/datum/reagent/antidepressant/methylphenidate
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
anchored = 1
|
||||
spawn(drill_time)
|
||||
if(get_turf(src) == drilling_turf && active)
|
||||
M.gets_drilled()
|
||||
M.GetDrilled()
|
||||
src.loc = M
|
||||
drilling_turf = null
|
||||
anchored = 0
|
||||
|
||||
@@ -57,44 +57,45 @@
|
||||
|
||||
age = rand(1,999)
|
||||
|
||||
switch(container.mineralName)
|
||||
if("Uranium")
|
||||
age_million = rand(1, 704)
|
||||
age_thousand = rand(1,999)
|
||||
find_presence["potassium"] = rand(1,1000) / 100
|
||||
source_mineral = "potassium"
|
||||
if("Iron")
|
||||
age_thousand = rand(1, 999)
|
||||
age_million = rand(1, 999)
|
||||
find_presence["iron"] = rand(1,1000) / 100
|
||||
source_mineral = "iron"
|
||||
if("Diamond")
|
||||
age_thousand = rand(1,999)
|
||||
age_million = rand(1,999)
|
||||
find_presence["nitrogen"] = rand(1,1000) / 100
|
||||
source_mineral = "nitrogen"
|
||||
if("Gold")
|
||||
age_thousand = rand(1,999)
|
||||
age_million = rand(1,999)
|
||||
age_billion = rand(3,4)
|
||||
find_presence["iron"] = rand(1,1000) / 100
|
||||
source_mineral = "iron"
|
||||
if("Silver")
|
||||
age_thousand = rand(1,999)
|
||||
age_million = rand(1,999)
|
||||
find_presence["iron"] = rand(1,1000) / 100
|
||||
source_mineral = "iron"
|
||||
if("Plasma")
|
||||
age_thousand = rand(1,999)
|
||||
age_million = rand(1,999)
|
||||
age_billion = rand(10, 13)
|
||||
find_presence["plasma"] = rand(1,1000) / 100
|
||||
source_mineral = "plasma"
|
||||
if("Clown")
|
||||
age = rand(-1,-999) //thats the joke
|
||||
age_thousand = rand(-1,-999)
|
||||
find_presence["plasma"] = rand(1,1000) / 100
|
||||
source_mineral = "plasma"
|
||||
if(container.mineral)
|
||||
switch(container.mineral.name)
|
||||
if("Uranium")
|
||||
age_million = rand(1, 704)
|
||||
age_thousand = rand(1,999)
|
||||
find_presence["potassium"] = rand(1,1000) / 100
|
||||
source_mineral = "potassium"
|
||||
if("Iron")
|
||||
age_thousand = rand(1, 999)
|
||||
age_million = rand(1, 999)
|
||||
find_presence["iron"] = rand(1,1000) / 100
|
||||
source_mineral = "iron"
|
||||
if("Diamond")
|
||||
age_thousand = rand(1,999)
|
||||
age_million = rand(1,999)
|
||||
find_presence["nitrogen"] = rand(1,1000) / 100
|
||||
source_mineral = "nitrogen"
|
||||
if("Gold")
|
||||
age_thousand = rand(1,999)
|
||||
age_million = rand(1,999)
|
||||
age_billion = rand(3,4)
|
||||
find_presence["iron"] = rand(1,1000) / 100
|
||||
source_mineral = "iron"
|
||||
if("Silver")
|
||||
age_thousand = rand(1,999)
|
||||
age_million = rand(1,999)
|
||||
find_presence["iron"] = rand(1,1000) / 100
|
||||
source_mineral = "iron"
|
||||
if("Plasma")
|
||||
age_thousand = rand(1,999)
|
||||
age_million = rand(1,999)
|
||||
age_billion = rand(10, 13)
|
||||
find_presence["plasma"] = rand(1,1000) / 100
|
||||
source_mineral = "plasma"
|
||||
if("Clown")
|
||||
age = rand(-1,-999) //thats the joke
|
||||
age_thousand = rand(-1,-999)
|
||||
find_presence["plasma"] = rand(1,1000) / 100
|
||||
source_mineral = "plasma"
|
||||
|
||||
if(prob(75))
|
||||
find_presence["phosphorus"] = rand(1,500) / 100
|
||||
|
||||
@@ -274,8 +274,8 @@
|
||||
switch(scanned_item.type)
|
||||
if(/obj/item/weapon/ore)
|
||||
var/obj/item/weapon/ore/O = scanned_item
|
||||
if(O.geological_data)
|
||||
G = O.geological_data
|
||||
if(O.geologic_data)
|
||||
G = O.geologic_data
|
||||
|
||||
if(/obj/item/weapon/rocksliver)
|
||||
var/obj/item/weapon/rocksliver/O = scanned_item
|
||||
|
||||
@@ -1,3 +1,52 @@
|
||||
#define XENOARCH_SPAWN_CHANCE 0.5
|
||||
#define XENOARCH_SPREAD_CHANCE 15
|
||||
#define ARTIFACT_SPAWN_CHANCE 20
|
||||
|
||||
proc/SetupXenoarch()
|
||||
for(var/turf/simulated/mineral/M in block(locate(1,1,1), locate(world.maxx, world.maxy, world.maxz)))
|
||||
if(!M.geologic_data)
|
||||
M.geologic_data = new/datum/geosample(M)
|
||||
|
||||
if(!prob(XENOARCH_SPAWN_CHANCE))
|
||||
continue
|
||||
|
||||
var/digsite = get_random_digsite_type()
|
||||
var/list/processed_turfs = list()
|
||||
var/list/turfs_to_process = list(M)
|
||||
for(var/turf/simulated/mineral/archeo_turf in turfs_to_process)
|
||||
|
||||
for(var/turf/simulated/mineral/T in orange(1, archeo_turf))
|
||||
if(T.finds)
|
||||
continue
|
||||
if(T in processed_turfs)
|
||||
continue
|
||||
if(prob(XENOARCH_SPREAD_CHANCE))
|
||||
turfs_to_process.Add(T)
|
||||
|
||||
processed_turfs.Add(archeo_turf)
|
||||
if(!archeo_turf.finds)
|
||||
archeo_turf.finds = list()
|
||||
if(prob(50))
|
||||
archeo_turf.finds.Add(new /datum/find(digsite, rand(5,95)))
|
||||
else if(prob(75))
|
||||
archeo_turf.finds.Add(new /datum/find(digsite, rand(5,45)))
|
||||
archeo_turf.finds.Add(new /datum/find(digsite, rand(55,95)))
|
||||
else
|
||||
archeo_turf.finds.Add(new /datum/find(digsite, rand(5,30)))
|
||||
archeo_turf.finds.Add(new /datum/find(digsite, rand(35,75)))
|
||||
archeo_turf.finds.Add(new /datum/find(digsite, rand(75,95)))
|
||||
|
||||
//sometimes a find will be close enough to the surface to show
|
||||
var/datum/find/F = archeo_turf.finds[1]
|
||||
if(F.excavation_required <= F.view_range)
|
||||
archeo_turf.archaeo_overlay = "overlay_archaeo[rand(1,3)]"
|
||||
archeo_turf.overlays += archeo_turf.archaeo_overlay
|
||||
|
||||
//dont create artifact machinery in animal or plant digsites, or if we already have one
|
||||
if(!M.artifact_find && digsite != 1 && digsite != 2 && prob(ARTIFACT_SPAWN_CHANCE))
|
||||
M.artifact_find = new()
|
||||
artifact_spawn.Add(src)
|
||||
|
||||
|
||||
//---- Noticeboard
|
||||
|
||||
|
||||
@@ -51,11 +51,11 @@
|
||||
var/datum/geosample/geo_data
|
||||
if(istype(item_to_sample, /turf/simulated/mineral))
|
||||
var/turf/simulated/mineral/T = item_to_sample
|
||||
T.geological_data.UpdateNearbyArtifactInfo(T)
|
||||
geo_data = T.geological_data
|
||||
T.geologic_data.UpdateNearbyArtifactInfo(T)
|
||||
geo_data = T.geologic_data
|
||||
else if(istype(item_to_sample, /obj/item/weapon/ore))
|
||||
var/obj/item/weapon/ore/O = item_to_sample
|
||||
geo_data = O.geological_data
|
||||
geo_data = O.geologic_data
|
||||
|
||||
if(geo_data)
|
||||
if(filled_bag)
|
||||
|
||||
@@ -28,14 +28,14 @@
|
||||
user.visible_message("\blue [user] scans [A], the air around them humming gently.")
|
||||
if(istype(A,/turf/simulated/mineral))
|
||||
var/turf/simulated/mineral/M = A
|
||||
if(M.excavation_minerals.len || M.finds.len || M.artifact_find)
|
||||
if(M.finds.len || M.artifact_find)
|
||||
|
||||
//create a new scanlog entry
|
||||
var/datum/depth_scan/D = new()
|
||||
D.coords = "[M.x].[rand(0,9)]:[M.y].[rand(0,9)]:[10 * M.z].[rand(0,9)]"
|
||||
D.time = worldtime2text()
|
||||
D.record_index = positive_locations.len + 1
|
||||
D.material = M.mineralName
|
||||
D.material = M.mineral ? M.mineral.display_name : "Rock"
|
||||
|
||||
//find the first artifact and store it
|
||||
if(M.finds.len)
|
||||
@@ -44,13 +44,6 @@
|
||||
D.clearance = F.clearance_range * 2
|
||||
D.material = get_responsive_reagent(F.find_type)
|
||||
|
||||
//check if there are minerals interfering with the scan
|
||||
if(M.excavation_minerals.len)
|
||||
if(!D.depth || M.excavation_minerals[1] < D.depth)
|
||||
D.depth = M.excavation_minerals[1]
|
||||
D.clearance = rand() * 4 + 1
|
||||
D.material = M.mineralName
|
||||
|
||||
positive_locations.Add(D)
|
||||
|
||||
for(var/mob/L in range(src, 1))
|
||||
|
||||
Reference in New Issue
Block a user