This commit is contained in:
Asanadas
2013-04-04 01:15:03 -04:00
52 changed files with 1255 additions and 900 deletions
@@ -1,4 +1,4 @@
/obj/item/device/posibrain
/obj/item/device/mmi/posibrain
name = "positronic brain"
desc = "A cube of shining metal, four inches to a side and covered in shallow grooves."
icon = 'icons/obj/assemblies.dmi'
@@ -6,14 +6,15 @@
w_class = 3
origin_tech = "engineering=4;materials=4;bluespace=2;programming=4"
var/list/construction_cost = list("metal"=500,"glass"=500,"silver"=200,"gold"=200,"plasma"=100,"diamond"=10)
var/construction_time = 75
construction_cost = list("metal"=500,"glass"=500,"silver"=200,"gold"=200,"plasma"=100,"diamond"=10)
construction_time = 75
var/searching = 0
var/askDelay = 10 * 60 * 1
var/mob/living/carbon/brain/brainmob = null
mob/living/carbon/brain/brainmob = null
req_access = list(access_robotics)
var/locked = 0
var/obj/mecha = null//This does not appear to be used outside of reference in mecha.dm.
locked = 0
mecha = null//This does not appear to be used outside of reference in mecha.dm.
attack_self(mob/user as mob)
if(!brainmob.key && searching == 0)
@@ -73,7 +74,7 @@
for (var/mob/M in viewers(T))
M.show_message("\blue The positronic brain buzzes quietly, and the golden lights fade away. Perhaps you could try again?")
/obj/item/device/posibrain/examine()
/obj/item/device/mmi/posibrain/examine()
set src in oview()
@@ -97,20 +98,20 @@
usr << msg
return
/obj/item/device/posibrain/emp_act(severity)
if(!brainmob)
/obj/item/device/mmi/posibrain/emp_act(severity)
if(!src.brainmob)
return
else
switch(severity)
if(1)
brainmob.emp_damage += rand(20,30)
src.brainmob.emp_damage += rand(20,30)
if(2)
brainmob.emp_damage += rand(10,20)
src.brainmob.emp_damage += rand(10,20)
if(3)
brainmob.emp_damage += rand(0,10)
src.brainmob.emp_damage += rand(0,10)
..()
/obj/item/device/posibrain/New()
/obj/item/device/mmi/posibrain/New()
src.brainmob = new(src)
src.brainmob.name = "[pick(list("PBU","HIU","SINA","ARMA","OSI"))]-[rand(100, 999)]"
+2 -2
View File
@@ -2,10 +2,10 @@
if (silent)
return
if(!(container && (istype(container, /obj/item/device/mmi) || istype(container, /obj/item/device/posibrain))))
if(!(container && (istype(container, /obj/item/device/mmi) || istype(container, /obj/item/device/mmi/posibrain))))
return //No MMI, can't speak, bucko./N
else
if ((copytext(message, 1, 3) == ":b") || (copytext(message, 1, 3) == ":B") && (container && istype(container, /obj/item/device/posibrain)))
if ((copytext(message, 1, 3) == ":b") || (copytext(message, 1, 3) == ":B") && (container && istype(container, /obj/item/device/mmi/posibrain)))
message = copytext(message, 3)
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
robot_talk(message)
@@ -684,7 +684,7 @@
if(dna)
switch(dna.mutantrace)
if("lizard")
return "Soghun"
return "Unathi"
if("tajaran")
return "Tajaran"
if("skrell")
@@ -699,7 +699,7 @@
/mob/living/carbon/get_species()
if(src.dna)
if(src.dna.mutantrace == "lizard")
return "Soghun"
return "Unathi"
else if(src.dna.mutantrace == "skrell")
return "Skrell"
else if(src.dna.mutantrace == "tajaran")
@@ -84,6 +84,8 @@
//Random events (vomiting etc)
handle_random_events()
handle_virus_updates()
//Handle temperature/pressure differences between body and environment
handle_environment(environment)
@@ -1262,6 +1264,7 @@
if(bodytemperature > 406)
for(var/datum/disease/D in viruses)
D.cure()
if(virus2) virus2.cure(src)
if(!virus2)
for(var/obj/effect/decal/cleanable/blood/B in view(1,src))
if(B.virus2 && get_infection_chance())
@@ -126,7 +126,7 @@ Please contact me on #coderbus IRC. ~Carn x
var/list/overlays_lying[TOTAL_LAYERS]
var/list/overlays_standing[TOTAL_LAYERS]
var/previous_damage_appearance // store what the body last looked like, so we only have to update it if something changed
var/race_icon
//UPDATES OVERLAYS FROM OVERLAYS_LYING/OVERLAYS_STANDING
//this proc is messy as I was forced to include some old laggy cloaking code to it so that I don't break cloakers
@@ -234,24 +234,8 @@ proc/get_damage_icon_part(damage_state, body_part)
var/g = "m"
if(gender == FEMALE) g = "f"
var/icon/icobase
if(skeleton)
icobase = 'icons/mob/human_races/r_skeleton.dmi'
else if(dna)
switch(dna.mutantrace)
if("tajaran")
icobase = 'icons/mob/human_races/r_tajaran.dmi'
if("lizard")
icobase = 'icons/mob/human_races/r_lizard.dmi'
if("skrell")
icobase = 'icons/mob/human_races/r_skrell.dmi'
else
icobase = 'icons/mob/human_races/r_human.dmi'
else
icobase = 'icons/mob/human_races/r_human.dmi'
if(!skeleton)
stand_icon = new /icon(icobase, "torso_[g][fat?"_fat":""]")
stand_icon = new /icon(race_icon, "torso_[g][fat?"_fat":""]")
if(husk)
stand_icon.ColorTone(husk_color_mod)
else if(hulk)
@@ -261,7 +245,7 @@ proc/get_damage_icon_part(damage_state, body_part)
else if(plant)
stand_icon.ColorTone(plant_color_mod)
else
stand_icon = new /icon(icobase, "torso")
stand_icon = new /icon(race_icon, "torso")
var/datum/organ/external/head = get_organ("head")
var/has_head = 0
@@ -273,16 +257,16 @@ proc/get_damage_icon_part(damage_state, body_part)
var/icon/temp
if(istype(part, /datum/organ/external/groin))
if(skeleton)
temp = new /icon(icobase, "groin")
temp = new /icon(race_icon, "groin")
else
temp = new /icon(icobase, "groin_[g]")
temp = new /icon(race_icon, "groin_[g]")
else if(istype(part, /datum/organ/external/head))
if(skeleton)
temp = new /icon(icobase, "head")
temp = new /icon(race_icon, "head")
else
temp = new /icon(icobase, "head_[g]")
temp = new /icon(race_icon, "head_[g]")
else
temp = new /icon(icobase, "[part.icon_name]")
temp = new /icon(race_icon, "[part.icon_name]")
if(part.status & ORGAN_ROBOT)
temp.GrayScale()
if(part.status & ORGAN_DEAD)
@@ -327,7 +311,7 @@ proc/get_damage_icon_part(damage_state, body_part)
if(husk)
var/icon/mask = new(stand_icon)
var/icon/husk_over = new(icobase,"overlay_husk")
var/icon/husk_over = new(race_icon,"overlay_husk")
mask.MapColors(0,0,0,1, 0,0,0,1, 0,0,0,1, 0,0,0,1, 0,0,0,0)
husk_over.Blend(mask, ICON_ADD)
stand_icon.Blend(husk_over, ICON_OVERLAY)
@@ -451,14 +435,30 @@ proc/get_damage_icon_part(damage_state, body_part)
// var/g = "m"
// if (gender == FEMALE) g = "f"
//BS12 EDIT
var/skeleton = (SKELETON in src.mutations)
if(skeleton)
race_icon = 'icons/mob/human_races/r_skeleton.dmi'
else if(dna)
switch(dna.mutantrace)
if("tajaran")
race_icon = 'icons/mob/human_races/r_tajaran.dmi'
if("lizard")
race_icon = 'icons/mob/human_races/r_lizard.dmi'
if("skrell")
race_icon = 'icons/mob/human_races/r_skrell.dmi'
else
race_icon = 'icons/mob/human_races/r_human.dmi'
else
icon = 'icons/mob/human_races/r_human.dmi'
if(dna)
switch(dna.mutantrace)
if("lizard","golem","slime","shadow","adamantine")
if("golem","slime","shadow","adamantine")
overlays_lying[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace][fat]_[gender]_l")
overlays_standing[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace][fat]_[gender]_s")
if("lizard","tajaran","skrell")
overlays_lying[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/species.dmi', "icon_state" = "[dna.mutantrace]_[gender]_l")
overlays_standing[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/species.dmi', "icon_state" = "[dna.mutantrace]_[gender]_s")
// if("lizard","tajaran","skrell")
// overlays_lying[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/species.dmi', "icon_state" = "[dna.mutantrace]_[gender]_l")
// overlays_standing[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/species.dmi', "icon_state" = "[dna.mutantrace]_[gender]_s")
if("plant")
if(stat == DEAD) //TODO
overlays_lying[MUTANTRACE_LAYER] = image("icon" = 'icons/effects/genetics.dmi', "icon_state" = "[dna.mutantrace]_d")
@@ -42,6 +42,9 @@
//Disabilities
handle_disabilities()
//Virus updates, duh
handle_virus_updates()
//Apparently, the person who wrote this code designed it so that
//blinded get reset each cycle and then get activated later in the
//code. Very ugly. I dont care. Moving this stuff here so its easy
@@ -147,6 +150,28 @@
emote("gasp")
updatehealth()
proc/handle_virus_updates()//copypaste from mob/carbon/human/life.dm
if(bodytemperature > 406)
for(var/datum/disease/D in viruses)
D.cure()
if(!virus2)
for(var/obj/effect/decal/cleanable/blood/B in view(1,src))
if(B.virus2 && get_infection_chance())
infect_virus2(src,B.virus2)
for(var/obj/effect/decal/cleanable/mucus/M in view(1,src))
if(M.virus2 && get_infection_chance())
infect_virus2(src,M.virus2)
else
if(isnull(virus2)) // Trying to figure out a runtime error that keeps repeating
CRASH("virus2 nulled before calling activate()")
else
virus2.activate(src)
// activate may have deleted the virus
if(!virus2) return
// check if we're immune
if(virus2.antigen & src.antibodies) virus2.dead = 1
proc/breathe()
if(reagents)
@@ -194,7 +194,7 @@
/mob/living/silicon/robot/proc/updatename(var/prefix as text)
if(istype(mmi, /obj/item/device/posibrain))
if(istype(mmi, /obj/item/device/mmi/posibrain))
braintype = "Android"
else
braintype = "Cyborg"
@@ -43,7 +43,7 @@
/mob/living/simple_animal/spiderbot/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(istype(O, /obj/item/device/mmi) || istype(O, /obj/item/device/posibrain))
if(istype(O, /obj/item/device/mmi) || istype(O, /obj/item/device/mmi/posibrain))
var/obj/item/device/mmi/B = O
if(src.mmi) //There's already a brain in it.
user << "\red There's already a brain in [src]!"
@@ -284,14 +284,14 @@
return 0
if(istype(held_item, /obj/item/weapon/grenade))
visible_message("\red [src] launches the [held_item]!", "\red You launch the [held_item]!", "You hear a skittering noise and a thump!")
visible_message("\red [src] launches \the [held_item]!", "\red You launch \the [held_item]!", "You hear a skittering noise and a thump!")
var/obj/item/weapon/grenade/G = held_item
G.loc = src.loc
G.prime()
held_item = null
return 1
visible_message("\blue [src] drops the [held_item]!", "\blue You drop the [held_item]!", "You hear a skittering noise and a soft thump.")
visible_message("\blue [src] drops \the [held_item]!", "\blue You drop \the [held_item]!", "You hear a skittering noise and a soft thump.")
held_item.loc = src.loc
held_item = null
@@ -308,7 +308,7 @@
return -1
if(held_item)
src << "\red You are already holding the [held_item]"
src << "\red You are already holding \the [held_item]"
return 1
var/list/items = list()
@@ -318,16 +318,14 @@
var/obj/selection = input("Select an item.", "Pickup") in items
items.Cut()
if(selection)
for(var/obj/item/I in view(1, src))
if(selection == I)
held_item = selection
selection.loc = src
visible_message("\blue [src] scoops up the [held_item]!", "\blue You grab the [held_item]!", "You hear a skittering noise and a clink.")
visible_message("\blue [src] scoops up \the [held_item]!", "\blue You grab \the [held_item]!", "You hear a skittering noise and a clink.")
return held_item
else
src << "\red \The [selection] is too far away."
src << "\red \The [selection] is too far away."
src << "\red There is nothing of interest to take."
return 0
@@ -335,4 +333,4 @@
/mob/living/simple_animal/spiderbot/examine()
..()
if(src.held_item)
usr << "It is carrying \a [src.held_item] \icon[src.held_item]."
usr << "It is carrying \a [src.held_item] \icon[src.held_item]."
@@ -224,9 +224,11 @@
return "[emote], \"[text]\""
return "says, \"[text]\"";
/mob/living/simple_animal/emote(var/act)
/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))
+13 -12
View File
@@ -129,7 +129,10 @@
return
if(client.prefs.species != "Human")
if(!is_alien_whitelisted(src, client.prefs.species) && config.usealienwhitelist)
var/S = client.prefs.species
if(S == "Unathi") S = "Soghun"
if(!is_alien_whitelisted(src, S) && config.usealienwhitelist)
src << alert("You are currently not whitelisted to play [client.prefs.species].")
return 0
@@ -144,7 +147,9 @@
usr << "\blue There is an administrative lock on entering the game!"
return
if(!is_alien_whitelisted(src, client.prefs.species) && config.usealienwhitelist)
var/S = client.prefs.species
if(S == "Unathi") S = "Soghun"
if(!is_alien_whitelisted(src, S) && config.usealienwhitelist)
src << alert("You are currently not whitelisted to play [client.prefs.species].")
return 0
@@ -286,13 +291,9 @@
proc/AnnounceArrival(var/mob/living/carbon/human/character, var/rank)
if (ticker.current_state == GAME_STATE_PLAYING)
var/obj/item/device/radio/intercom/a = new /obj/item/device/radio/intercom(null)// BS12 EDIT Arrivals Announcement Computer, rather than the AI.
//unlikely for this to be an issue, but just in case
if(istype(character.wear_id, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/I = character.wear_id
a.autosay("\"[character.real_name],[I.assignment ? " [I.assignment]," : "" ] has arrived on the station.\"", "Arrivals Announcement Computer")
else
a.autosay("\"[character.real_name], visitor, has arrived on the station.\"", "Arrivals Announcement Computer")
if(character.mind.role_alt_title)
rank = character.mind.role_alt_title
a.autosay("[character.real_name],[rank ? " [rank]," : " visitor," ] has arrived on the station.", "Arrivals Announcement Computer")
del(a)
proc/LateChoices()
@@ -331,15 +332,15 @@
new_character.lastarea = get_area(loc)
if(client.prefs.species == "Tajaran") //This is like the worst, but it works, so meh. - Erthilo
if(is_alien_whitelisted(src, "Tajaran") || !config.usealienwhitelist)
if(is_alien_whitelisted(src, "Tajaran"|| !config.usealienwhitelist))
new_character.dna.mutantrace = "tajaran"
new_character.tajaran_talk_understand = 1
if(client.prefs.species == "Unathi")
if(is_alien_whitelisted(src, "Soghun") || !config.usealienwhitelist)
if(is_alien_whitelisted(src, "Soghun"|| !config.usealienwhitelist))
new_character.dna.mutantrace = "lizard"
new_character.soghun_talk_understand = 1
if(client.prefs.species == "Skrell")
if(is_alien_whitelisted(src, "Skrell") || !config.usealienwhitelist)
if(is_alien_whitelisted(src, "Skrell"|| !config.usealienwhitelist))
new_character.dna.mutantrace = "skrell"
new_character.skrell_talk_understand = 1
@@ -135,37 +135,34 @@ datum/preferences
var/g = "m"
if(gender == FEMALE) g = "f"
if(species == "Tajaran")
preview_icon = new /icon('icons/effects/species.dmi', "tajaran_[g]_s")
preview_icon.Blend(new /icon('icons/effects/species.dmi', "tajtail_s"), ICON_OVERLAY)
else if(species == "Unathi")
preview_icon = new /icon('icons/effects/species.dmi', "lizard_[g]_s")
preview_icon.Blend(new /icon('icons/effects/species.dmi', "sogtail_s"), ICON_OVERLAY)
else if(species == "Skrell")
preview_icon = new /icon('icons/effects/species.dmi', "skrell_[g]_s")
else
preview_icon = new /icon('human.dmi', "torso_[g]_s")
preview_icon.Blend(new /icon('human.dmi', "chest_[g]_s"), ICON_OVERLAY)
var/icon/icobase
switch(species)
if("Tajaran")
icobase = 'icons/mob/human_races/r_tajaran.dmi'
if("Unathi")
icobase = 'icons/mob/human_races/r_lizard.dmi'
if("Skrell")
icobase = 'icons/mob/human_races/r_skrell.dmi'
else
icobase = 'icons/mob/human_races/r_human.dmi'
preview_icon = new /icon(icobase, "torso_[g]")
preview_icon.Blend(new /icon(icobase, "groin_[g]"), ICON_OVERLAY)
preview_icon.Blend(new /icon(icobase, "head_[g]"), ICON_OVERLAY)
if(organ_data["head"] != "amputated")
preview_icon.Blend(new /icon('human.dmi', "head_[g]_s"), ICON_OVERLAY)
for(var/name in list("l_arm","r_arm","l_leg","r_leg","l_foot","r_foot","l_hand","r_hand"))
// make sure the organ is added to the list so it's drawn
if(organ_data[name] == null)
organ_data[name] = null
for(var/name in list("l_arm","r_arm","l_leg","r_leg","l_foot","r_foot","l_hand","r_hand"))
// make sure the organ is added to the list so it's drawn
if(organ_data[name] == null)
organ_data[name] = null
for(var/name in organ_data)
if(organ_data[name] == "amputated") continue
for(var/name in organ_data)
if(organ_data[name] == "amputated") continue
var/icon/temp = new /icon(icobase, "[name]")
if(organ_data[name] == "cyborg")
temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
var/icon/temp = new /icon('human.dmi', "[name]_s")
if(organ_data[name] == "cyborg")
temp.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
preview_icon.Blend(temp, ICON_OVERLAY)
preview_icon.Blend(new /icon('human.dmi', "groin_[g]_s"), ICON_OVERLAY)
preview_icon.Blend(temp, ICON_OVERLAY)
// Skin tone
if(species == "Human")