Vaurca Changes

Various vaurca-based changes, as detailed in the changelogs.
This commit is contained in:
LordFowl
2016-05-05 19:10:05 -04:00
parent 507f181bf0
commit c7ca0887e7
20 changed files with 174 additions and 153 deletions
+9 -120
View File
@@ -32,7 +32,6 @@ datum/preferences
//doohickeys for savefiles
var/path
var/default_slot = 1 //Holder so it doesn't default to slot 1, rather the last one used
var/current_slot = 1
var/savefile_version = 0
//non-preference stuff
@@ -135,35 +134,17 @@ datum/preferences
var/metadata = ""
var/slot_name = ""
//SQL Save system vars
var/chardata[]
var/jobsdata[]
var/flavourdata[]
var/miscdata[]
var/DBQuery/query
var/TextQuery
var/char_id
var/char_slot
/datum/preferences/New(client/C)
b_type = pick(4;"O-", 36;"O+", 3;"A-", 28;"A+", 1;"B-", 20;"B+", 1;"AB-", 5;"AB+")
if(istype(C))
if(!IsGuestKey(C.key))
load_path(C.ckey)
log_debug("loading data for [C.ckey]")
if(LoadPrefData(C.ckey))
log_debug("Default slot loaded : [default_slot]")
if(SQLload_character(default_slot, C.ckey))
current_slot = default_slot
log_debug("Character [real_name] loaded, slot is [current_slot]")
return
if(load_preferences())
if(load_character(default_slot))
current_slot = getCharSlot_File()
if(load_character())
return
//this ensure that if db fail the file system is used to load an initial character
gender = pick(MALE, FEMALE)
real_name = random_name(gender,species)
gear = list()
/datum/preferences/proc/ZeroSkills(var/forced = 0)
@@ -1382,7 +1363,7 @@ datum/preferences
s_tone = 35 - max(min( round(new_s_tone), 220),1)
if("skin")
if(species == "Unathi" || species == "Tajara" || species == "Skrell" || species == "Machine")
if(species == "Unathi" || species == "Tajara" || species == "Skrell" || species == "Machine" || species == "Vaurca")
var/new_skin = input(user, "Choose your character's skin colour: ", "Character Preference", rgb(r_skin, g_skin, b_skin)) as color|null
if(new_skin)
r_skin = hex2num(copytext(new_skin, 2, 4))
@@ -1616,48 +1597,22 @@ datum/preferences
toggles ^= CHAT_GHOSTRADIO
if("save")
for(var/ckey in preferences_datums)
var/datum/preferences/D = preferences_datums[ckey]
if(D == src)
//switch comment to switch to file save system
default_slot = current_slot
SavePrefData(ckey)
SQLsave_character(current_slot, ckey)
//save_preferences()
//save_character()
save_preferences()
save_character()
if("reload")
for(var/ckey in preferences_datums)
var/datum/preferences/D = preferences_datums[ckey]
if(D == src)
//switch comment to switch to file save system
LoadPrefData(ckey)
SQLload_character(current_slot, ckey)
//load_preferences()
//load_character()
load_preferences()
load_character()
if("open_load_dialog")
if(!IsGuestKey(user.key))
//file system preferences
//open_load_dialog_file(user)
open_load_dialog(user)
if("close_load_dialog")
close_load_dialog(user)
if("changeslot")
for(var/ckey in preferences_datums)
var/datum/preferences/D = preferences_datums[ckey]
if(D == src)
current_slot = text2num(href_list["num"])
if(!SQLload_character(current_slot, ckey))
gender = pick(MALE, FEMALE)
real_name = random_name(gender,species)
gear.Cut()
ZeroSkills(1)
ResetJobs()
//file system load
//load_character()
load_character(text2num(href_list["num"]))
close_load_dialog(user)
ShowChoices(user)
@@ -1775,44 +1730,6 @@ datum/preferences
var/dat = "<body>"
dat += "<tt><center>"
for(var/ckey in preferences_datums)
var/datum/preferences/D = preferences_datums[ckey]
if(D == src)
var/TextQuery = "SELECT Character_Name FROM SS13_characters WHERE ckey = '[ckey]' ORDER BY slot"
var/DBQuery/query
establish_db_connection(dbcon)
if(!dbcon.IsConnected())
open_load_dialog_file(user)
query = dbcon.NewQuery(TextQuery)
query.Execute()
var/rows
if(!query.RowCount())
rows = 0
else
rows = query.RowCount()
dat += "<b>Select a character slot to load (SQL Edition !)</b><hr>"
var/name
for(var/i=1, i<= config.character_slots, i++)
log_debug("[rows] rows queried, i = [i]")
if(i<=rows)
query.NextRow()
name = query.item[1]
log_debug("adding [query.item[1]] to list")
else name = "Character[i]"
if(i==default_slot)
name = "<b>[name]</b>"
dat += "<a href='?_src_=prefs;preference=changeslot;num=[i];'>[name]</a><br>"
dat += "<hr>"
dat += "<a href='byond://?src=\ref[user];preference=close_load_dialog'>Close</a><br>"
dat += "</center></tt>"
user << browse(dat, "window=saves;size=300x390")
/datum/preferences/proc/open_load_dialog_file(mob/user)
var/dat = "<body>"
dat += "<tt><center>"
var/savefile/S = new /savefile(path)
if(S)
dat += "<b>Select a character slot to load</b><hr>"
@@ -1824,39 +1741,11 @@ datum/preferences
if(i==default_slot)
name = "<b>[name]</b>"
dat += "<a href='?_src_=prefs;preference=changeslot;num=[i];'>[name]</a><br>"
dat += "<hr>"
dat += "<a href='byond://?src=\ref[user];preference=close_load_dialog'>Close</a><br>"
dat += "</center></tt>"
user << browse(dat, "window=saves;size=300x390")
/datum/preferences/proc/getCharSlot()
for(var/ckey in preferences_datums)
var/datum/preferences/D = preferences_datums[ckey]
if(D == src)
var/TextQuery = "SELECT slot FROM SS13_characters WHERE ckey = '[ckey]' AND Character_Name = '[real_name]'"
var/DBQuery/query
establish_db_connection(dbcon)
if(!dbcon.IsConnected())
getCharSlot_File()
query = dbcon.NewQuery(TextQuery)
query.Execute()
if(!query.RowCount())
return 1
query.NextRow()
return text2num(query.item[1])
return 1
/datum/preferences/proc/getCharSlot_File() //get character slot from savefile
var/savefile/S = new /savefile(path)
if(S)
var/name
for(var/i=1, i<= config.character_slots, i++)
S.cd = "/character[i]"
S["real_name"] >> name
if(name == real_name)
return i
return 1
/datum/preferences/proc/close_load_dialog(mob/user)
user << browse(null, "window=saves")
+3 -2
View File
@@ -205,7 +205,7 @@ BLIND // can't see anything
body_parts_covered = HANDS
slot_flags = SLOT_GLOVES
attack_verb = list("challenged")
species_restricted = list("exclude","Unathi","Tajara")
species_restricted = list("exclude","Unathi","Tajara","Vaurca")
sprite_sheets = list("Vox" = 'icons/mob/species/vox/gloves.dmi')
/obj/item/clothing/gloves/update_clothing_icon()
@@ -243,6 +243,7 @@ BLIND // can't see anything
if("exclude" in species_restricted)
species_restricted -= "Unathi"
species_restricted -= "Tajara"
species_restricted -= "Vaurca"
return
///////////////////////////////////////////////////////////////////////
@@ -335,7 +336,7 @@ BLIND // can't see anything
slowdown = SHOES_SLOWDOWN
force = 2
var/overshoes = 0
species_restricted = list("exclude","Unathi","Tajara")
species_restricted = list("exclude","Unathi","Tajara","Vaurca")
sprite_sheets = list("Vox" = 'icons/mob/species/vox/shoes.dmi')
var/silent = 0
@@ -74,6 +74,7 @@
if("exclude" in species_restricted)
species_restricted -= "Unathi"
species_restricted -= "Tajara"
species_restricted -= "Vaurca"
return
else
user << "<span class='notice'>The [src] have already been clipped!</span>"
+2 -2
View File
@@ -249,7 +249,7 @@
M.lastattacker = user
user.attack_log += "\[[time_stamp()]\]<font color='red'> Attacked [M.name] ([M.ckey]) with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])</font>"
M.attack_log += "\[[time_stamp()]\]<font color='orange'> Attacked by [user.name] ([user.ckey]) with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])</font>"
msg_admin_attack("[key_name(user)] attacked [key_name(M)] with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)" )
msg_admin_attack("[key_name(user)] attacked [key_name(M)] with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])" )
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
@@ -403,4 +403,4 @@ var/list/fruit_icon_cache = list()
var/image/I = image(icon,"fruit_slice")
I.color = flesh_colour
fruit_icon_cache["slice-[rind_colour]"] = I
overlays |= fruit_icon_cache["slice-[rind_colour]"]
overlays |= fruit_icon_cache["slice-[rind_colour]"]
+24
View File
@@ -322,6 +322,30 @@
set_trait(TRAIT_PLANT_COLOUR,"#D9C94E")
set_trait(TRAIT_PLANT_ICON,"mushroom")
/datum/seed/koisspore
name = "koisspore"
seed_name = "kois"
seed_noun = "spires"
display_name = "k'ois spores"
mutants = null
chems = list("koispaste" = list(25))
splat_type = /obj/effect/plant
kitchen_tag = "koisspore"
/datum/seed/koisspore/New()
..()
set_trait(TRAIT_MATURATION,5)
set_trait(TRAIT_PRODUCTION,1)
set_trait(TRAIT_YIELD,8)
set_trait(TRAIT_POTENCY,60)
set_trait(TRAIT_BIOLUM,1)
set_trait(TRAIT_CARNIVOROUS,1)
set_trait(TRAIT_BIOLUM_COLOUR,"#94b21c")
set_trait(TRAIT_PRODUCT_ICON,"mushroom11")
set_trait(TRAIT_PRODUCT_COLOUR,"#94b21c")
set_trait(TRAIT_PLANT_COLOUR,"#94b21c")
set_trait(TRAIT_PLANT_ICON,"mushroom6")
/datum/seed/mushroom/mold
name = "mold"
seed_name = "brown mold"
+3
View File
@@ -280,3 +280,6 @@ var/global/list/plant_seed_sprites = list()
/obj/item/seeds/thaadra
seed_type = "thaadra"
/obj/item/seeds/koisspore
seed_type = "koisspore"
@@ -292,5 +292,5 @@
var/mob/living/M = G.affecting
if(!istype(M)) return //wut
M.apply_damage(30,BRUTE)
if(M.stat == 2)
M.gib()
// if(M.stat == 2)
// M.gib()
+8 -1
View File
@@ -439,6 +439,13 @@
var/failed_inhale = 0
var/failed_exhale = 0
if(species.has_organ["breathing apparatus"])
var/obj/item/organ/vaurca/breathingapparatus/L = internal_organs_by_name["breathing apparatus"]
if(isnull(L))
poison_type = null
else if(L.is_broken())
poison_type = "oxygen" //if Vaurca breathing apparatus breaks, oxygen becomes poisonous.
if(species.breath_type)
breath_type = species.breath_type
else
@@ -1636,7 +1643,7 @@
else if(foundVirus)
holder.icon_state = "hudill"
/* else if(has_brain_worms())
var/mob/living/simple_animal/borer/B = has_brain_worms() //Cotrical borer disable
var/mob/living/simple_animal/borer/B = has_brain_worms()
if(B.controlling)
holder.icon_state = "hudbrainworm"
else
@@ -251,7 +251,7 @@
synth_temp_gain = 10 //this should cause IPCs to stabilize at ~80 C in a 20 C environment.
flags = CAN_JOIN | IS_WHITELISTED | NO_BREATHE | NO_SCAN | NO_BLOOD | NO_PAIN | IS_SYNTHETIC | NO_POISON
flags = CAN_JOIN | IS_WHITELISTED | NO_BREATHE | NO_SCAN | NO_BLOOD | NO_PAIN | IS_SYNTHETIC
blood_color = "#1F181F"
flesh_color = "#575757"
@@ -269,20 +269,29 @@
/datum/species/bug
name = "Vaurca"
name_plural = "varucae"
name_plural = "Vaurcae"
icobase = 'icons/mob/human_races/r_vaurca.dmi'
deform = 'icons/mob/human_races/r_vaurca.dmi'
language = "Vaurcese"
unarmed_types = list(/datum/unarmed_attack/stomp, /datum/unarmed_attack/kick, /datum/unarmed_attack/claws, /datum/unarmed_attack/bite/sharp)
rarity_value = 2
slowdown = 1
darksight = 5 //USELESS
eyes = "blank_eyes"
slowdown = 0 //may become a bonus if vaurca gain more legs.
darksight = 8 //USELESS
eyes = "vaurca_eyes" //makes it so that eye colour is not changed when skin colour is.
brute_mod = 0.5 //note to self: remove is_synthetic checks for brmod and burnmod
burn_mod = 2
burn_mod = 1.5 //2x was a bit too much. we'll see how this goes.
warning_low_pressure = 50
hazard_low_pressure = 0
siemens_coefficient = 0 //attempting to mimic the old insulation feature.
breath_type = "oxygen"
poison_type = "null" //a species that breathes plasma shouldn't be poisoned by it.
blurb = "Vaurca are a bipedal insectoid species from the first moon of Sedantis I. \
They have a complex caste system consisting of the lower slave caste called The Bound and the higher, free-thinking caste of the Unbound. \
The majority of Vaurca present in human-space belong to the former caste of Bound, and almost all Vaurca working on NanoTrasen Stations are similarly Bound. \
Although tolerated on Nanotrasen stations and in Tau Ceti, they are often discriminated against and are unwelcome in most human-owned \
sectors in the Sol Alliance. All Vaurca present in human space are colonists at the end of a 2,000 year journey, and all contact with \
their homeworld has been lost. All Vaurca legally present in Tau Ceti belong either to the Zo'ra hive, or the K'lax hive."
cold_level_1 = 50
cold_level_2 = -1
@@ -291,9 +300,10 @@
heat_level_1 = 330 //Default 360
heat_level_2 = 380 //Default 400
heat_level_3 = 600 //Default 1000
flags = CAN_JOIN | IS_WHITELISTED | NO_SLIP | NO_SCAN
flags = CAN_JOIN | NO_SLIP | NO_SCAN | HAS_SKIN_COLOR | IS_WHITELISTED
blood_color = "#E6E600" // dark yellow
flesh_color = "#575757"
flesh_color = "#E6E600"
base_color = "#575757"
inherent_verbs = list(
/mob/living/carbon/human/proc/bugbite //weaker version of gut.
@@ -310,3 +320,7 @@
"brain" = /obj/item/organ/brain,
"eyes" = /obj/item/organ/eyes,
)
/datum/species/unathi/equip_survival_gear(var/mob/living/carbon/human/H)
..()
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal(H),slot_shoes)
@@ -1,4 +1,22 @@
/* Food */
/datum/reagent/kois
name = "K'ois"
id = "koispaste"
description = "A thick goopy substance, rich in K'ois nutrients."
metabolism = REM * 4
var/nutriment_factor = 40
var/injectable = 0
color = "#dcd9cd"
/datum/reagent/kois/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
if(M.get_species() == "Vaurca")
M.heal_organ_damage(0.8 * removed, 0)
M.nutrition += nutriment_factor * removed // For hunger and fatness
M.add_chemical_effect(CE_BLOODRESTORE, 6 * removed)
else
M.adjustToxLoss(1.5 * removed)
return
..()
/datum/reagent/nutriment
name = "Nutriment"
@@ -17,10 +35,14 @@
affect_ingest(M, alien, removed)
/datum/reagent/nutriment/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
M.heal_organ_damage(0.5 * removed, 0)
M.nutrition += nutriment_factor * removed // For hunger and fatness
M.add_chemical_effect(CE_BLOODRESTORE, 4 * removed)
if(M.get_species() == "Vaurca")
M.adjustToxLoss(1.5 * removed)
else
M.heal_organ_damage(0.8 * removed, 0)
M.nutrition += nutriment_factor * removed // For hunger and fatness
M.add_chemical_effect(CE_BLOODRESTORE, 6 * removed)
return
..()
/datum/reagent/nutriment/protein // Bad for Skrell!
name = "animal protein"
id = "protein"
@@ -299,7 +321,7 @@
M.eye_blind = max(M.eye_blind, 10)
if(mouth_covered)
if(!message)
if(!message)
message = "<span class='warning'>Your [face_protection] protects you from the pepperspray!</span>"
else if(!no_pain)
message = "<span class='danger'>Your face and throat burn!</span>"
@@ -89,7 +89,7 @@
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: [reagentlist(src)]</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Fed [src.name] by [M.name] ([M.ckey]) Reagents: [reagentlist(src)]</font>")
msg_admin_attack("[key_name(user)] fed [key_name(M)] with [src.name] Reagents: [reagentlist(src)] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
msg_admin_attack("[key_name(user)] fed [key_name(M)] with [src.name] Reagents: [reagentlist(src)] (INTENT: [uppertext(user.a_intent)])")
user.visible_message("<span class='danger'>[user] feeds [M] [src].</span>")
@@ -245,6 +245,17 @@
/obj/item/weapon/reagent_containers/food/snacks/koisbar
name = "K'ois Bar"
desc = "Bland NanoTrasen produced K'ois bars, rich in syrup."
icon_state = "koisbar"
trash = /obj/item/trash/koisbar
filling_color = "#dcd9cd"
New()
..()
reagents.add_reagent("kois", 20)
bitesize = 5
/obj/item/weapon/reagent_containers/food/snacks/aesirsalad
name = "Aesir salad"