Merge pull request #358 from SkyMarshal/master

Fixes for *custom v/h emotes, as well as some other stuff.
This commit is contained in:
CIB
2012-02-04 13:23:10 -08:00
16 changed files with 113 additions and 56 deletions

View File

@@ -175,8 +175,7 @@
H.apply_damage(0.5*damage, BRUTE, "r_arm") H.apply_damage(0.5*damage, BRUTE, "r_arm")
var/obj/effect/decal/cleanable/blood/B = new(src.loc) var/obj/effect/decal/cleanable/blood/B = new(src.loc)
B.blood_DNA = H.dna.unique_enzymes B.blood_DNA = list(list(H.dna.unique_enzymes, H.dna.btype))
B.blood_type = H.b_type
H:weakened = max(H:weakened,2) H:weakened = max(H:weakened,2)
H:updatehealth() H:updatehealth()

View File

@@ -714,8 +714,11 @@ turf/proc/add_bloody_footprints(mob/living/carbon/human/M,leaving,d,info)
this.dir = d this.dir = d
this.desc = "These bloody footprints appear to have been made by [info]." this.desc = "These bloody footprints appear to have been made by [info]."
if(istype(M,/mob/living/carbon/human)) if(istype(M,/mob/living/carbon/human))
this.blood_DNA.len++ if(this.blood_DNA.len)
this.blood_DNA[this.blood_DNA.len] = list(M.dna.unique_enzymes,M.b_type) this.blood_DNA.len++
this.blood_DNA[this.blood_DNA.len] = list(M.dna.unique_enzymes,M.dna.b_type)
else
this.blood_DNA = list(list(M.dna.unique_enzymes,M.dna.b_type))
proc/get_tracks(mob/M) proc/get_tracks(mob/M)
if(istype(M,/mob/living)) if(istype(M,/mob/living))

View File

@@ -148,12 +148,12 @@
I.Blend(new /icon('blood.dmi', "itemblood"),ICON_MULTIPLY) I.Blend(new /icon('blood.dmi', "itemblood"),ICON_MULTIPLY)
I.Blend(new /icon(src.icon, src.icon_state),ICON_UNDERLAY) I.Blend(new /icon(src.icon, src.icon_state),ICON_UNDERLAY)
src.icon = I src.icon = I
if(src.blood_DNA) if(src.blood_DNA.len)
src.blood_DNA.len++ src.blood_DNA.len++
src.blood_DNA[src.blood_DNA.len] = list(M.dna.unique_enzymes,M.b_type) src.blood_DNA[src.blood_DNA.len] = list(M.dna.unique_enzymes,M.dna.b_type)
else else
var/list/blood_DNA_temp[1] var/list/blood_DNA_temp[1]
blood_DNA_temp[1] = list(M.dna.unique_enzymes, M.b_type) blood_DNA_temp[1] = list(M.dna.unique_enzymes, M.dna.b_type)
src.blood_DNA = blood_DNA_temp src.blood_DNA = blood_DNA_temp
else if (istype(src, /turf/simulated)) else if (istype(src, /turf/simulated))
var/turf/simulated/source2 = src var/turf/simulated/source2 = src
@@ -172,22 +172,19 @@
this.viruses += newDisease this.viruses += newDisease
newDisease.holder = this newDisease.holder = this
else if (istype(src, /mob/living/carbon/human)) else if (istype(src, /mob/living/carbon/human))
if(src.blood_DNA) if(src.blood_DNA.len)
src.blood_DNA.len++ src.blood_DNA.len++
src.blood_DNA[src.blood_DNA.len] = list(M.dna.unique_enzymes,M.b_type) src.blood_DNA[src.blood_DNA.len] = list(M.dna.unique_enzymes,M.dna.b_type)
else else
var/list/blood_DNA_temp[1] var/list/blood_DNA_temp[1]
blood_DNA_temp[1] = list(M.dna.unique_enzymes, M.b_type) blood_DNA_temp[1] = list(M.dna.unique_enzymes, M.dna.b_type)
src.blood_DNA = blood_DNA_temp src.blood_DNA = blood_DNA_temp
else else
return return
else else
var/list/L = params2list(src.blood_DNA) var/list/blood_DNA_temp[1]
L -= M.dna.unique_enzymes blood_DNA_temp[1] = list(M.dna.unique_enzymes, M.dna.b_type)
while(L.len >= 3) src.blood_DNA = blood_DNA_temp
L -= L[1]
L += M.dna.unique_enzymes
src.blood_DNA = list2params(L)
return return
/atom/proc/add_vomit_floor(mob/living/carbon/M as mob, var/toxvomit = 0) /atom/proc/add_vomit_floor(mob/living/carbon/M as mob, var/toxvomit = 0)

View File

@@ -55,7 +55,6 @@ Devices and Tools;
/obj/item/device/radio/headset/traitor:3:Headset with Binary Translator; /obj/item/device/radio/headset/traitor:3:Headset with Binary Translator;
/obj/item/weapon/plastique:2:C-4 (Destroys walls); /obj/item/weapon/plastique:2:C-4 (Destroys walls);
/obj/item/weapon/syndie/c4explosive:4:Low Power Explosive Charge, with Detonator; /obj/item/weapon/syndie/c4explosive:4:Low Power Explosive Charge, with Detonator;
/obj/item/weapon/syndie/c4explosive/heavy:7:High (!) Power Explosive Charge, with Detonator;
/obj/item/device/powersink:5:Powersink (DANGER!); /obj/item/device/powersink:5:Powersink (DANGER!);
/obj/machinery/singularity_beacon/syndicate:7:Singularity Beacon (DANGER!); /obj/machinery/singularity_beacon/syndicate:7:Singularity Beacon (DANGER!);
Whitespace:Seperator; Whitespace:Seperator;
@@ -69,6 +68,8 @@ Badassery;
/obj/item/toy/syndicateballoon:10:For showing that You Are The BOSS (Useless Balloon); /obj/item/toy/syndicateballoon:10:For showing that You Are The BOSS (Useless Balloon);
Whitespace:Seperator;"} Whitespace:Seperator;"}
//obj/item/weapon/syndie/c4explosive/heavy:7:High (!) Power Explosive Charge, with Detonator;
/datum/game_mode/proc/announce() //to be calles when round starts /datum/game_mode/proc/announce() //to be calles when round starts
world << "<B>Notice</B>: [src] did not define announce()" world << "<B>Notice</B>: [src] did not define announce()"

View File

@@ -806,7 +806,7 @@
var/obj/effect/decal/cleanable/blood/B = new(src.loc) var/obj/effect/decal/cleanable/blood/B = new(src.loc)
B.blood_DNA.len++ B.blood_DNA.len++
B.blood_DNA[B.blood_DNA.len] = list(H.dna.unique_enzymes, H.b_type) B.blood_DNA[B.blood_DNA.len] = list(H.dna.unique_enzymes, H.dna.b_type)
bloodiness += 4 bloodiness += 4

View File

@@ -33,7 +33,7 @@
<BR> <BR>
<B>Name:</B> [src.victim.real_name]<BR> <B>Name:</B> [src.victim.real_name]<BR>
<B>Age:</B> [!isnull(src.victim.age) ? src.victim.age : "Undetermined"]<BR> <B>Age:</B> [!isnull(src.victim.age) ? src.victim.age : "Undetermined"]<BR>
<B>Blood Type:</B> [src.victim.b_type]<BR> <B>Blood Type:</B> [src.victim.dna.b_type]<BR>
<BR> <BR>
<B>Health:</B> [src.victim.health]<BR> <B>Health:</B> [src.victim.health]<BR>
<B>Brute Damage:</B> [src.victim.getBruteLoss()]<BR> <B>Brute Damage:</B> [src.victim.getBruteLoss()]<BR>

View File

@@ -404,7 +404,7 @@ Pod/Blast Doors computer
G.fields["fingerprint"] = text("[]", md5(H.dna.uni_identity)) G.fields["fingerprint"] = text("[]", md5(H.dna.uni_identity))
G.fields["p_stat"] = "Active" G.fields["p_stat"] = "Active"
G.fields["m_stat"] = "Stable" G.fields["m_stat"] = "Stable"
M.fields["b_type"] = text("[]", H.b_type) M.fields["b_type"] = text("[]", H.dna.b_type)
M.fields["b_dna"] = H.dna.unique_enzymes M.fields["b_dna"] = H.dna.unique_enzymes
M.fields["mi_dis"] = "None" M.fields["mi_dis"] = "None"
M.fields["mi_dis_d"] = "No minor disabilities have been declared." M.fields["mi_dis_d"] = "No minor disabilities have been declared."
@@ -428,7 +428,7 @@ Pod/Blast Doors computer
L.fields["age"] = H.age L.fields["age"] = H.age
L.fields["id"] = md5("[H.real_name][H.mind.assigned_role]") L.fields["id"] = md5("[H.real_name][H.mind.assigned_role]")
L.fields["rank"] = H.mind.assigned_role L.fields["rank"] = H.mind.assigned_role
L.fields["b_type"] = H.b_type L.fields["b_type"] = H.dna.b_type
L.fields["b_dna"] = H.dna.unique_enzymes L.fields["b_dna"] = H.dna.unique_enzymes
L.fields["enzymes"] = H.dna.struc_enzymes L.fields["enzymes"] = H.dna.struc_enzymes
L.fields["identity"] = H.dna.uni_identity L.fields["identity"] = H.dna.uni_identity
@@ -481,7 +481,7 @@ Pod/Blast Doors computer
G.fields["fingerprint"] = text("[]", md5(H.dna.uni_identity)) G.fields["fingerprint"] = text("[]", md5(H.dna.uni_identity))
G.fields["p_stat"] = "Active" G.fields["p_stat"] = "Active"
G.fields["m_stat"] = "Stable" G.fields["m_stat"] = "Stable"
M.fields["b_type"] = text("[]", H.b_type) M.fields["b_type"] = text("[]", H.dna.b_type)
M.fields["b_dna"] = H.dna.unique_enzymes M.fields["b_dna"] = H.dna.unique_enzymes
M.fields["mi_dis"] = "None" M.fields["mi_dis"] = "None"
M.fields["mi_dis_d"] = "No minor disabilities have been declared." M.fields["mi_dis_d"] = "No minor disabilities have been declared."
@@ -505,7 +505,7 @@ Pod/Blast Doors computer
L.fields["age"] = H.age L.fields["age"] = H.age
L.fields["id"] = md5("[H.real_name][H.mind.assigned_role]") L.fields["id"] = md5("[H.real_name][H.mind.assigned_role]")
L.fields["rank"] = H.mind.assigned_role L.fields["rank"] = H.mind.assigned_role
L.fields["b_type"] = H.b_type L.fields["b_type"] = H.dna.b_type
L.fields["b_dna"] = H.dna.unique_enzymes L.fields["b_dna"] = H.dna.unique_enzymes
L.fields["enzymes"] = H.dna.struc_enzymes L.fields["enzymes"] = H.dna.struc_enzymes
L.fields["identity"] = H.dna.uni_identity L.fields["identity"] = H.dna.uni_identity

View File

@@ -46,7 +46,7 @@ obj/machinery/scanner/attack_hand(mob/living/carbon/human/user)
lastuser = user.real_name lastuser = user.real_name
var/mname = user.real_name var/mname = user.real_name
var/dna = user.dna.unique_enzymes var/dna = user.dna.unique_enzymes
var/bloodtype = user.b_type var/bloodtype = user.dna.b_type
var/fingerprint = md5(user.dna.uni_identity) var/fingerprint = md5(user.dna.uni_identity)
var/list/marks = list() var/list/marks = list()
var/age = user.age var/age = user.age

View File

@@ -555,8 +555,11 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
R.word2 = w2 R.word2 = w2
R.word3 = w3 R.word3 = w3
R.check_icon() R.check_icon()
R.blood_DNA.len++ if(R.blood_DNA.len)
R.blood_DNA[R.blood_DNA.len] = list(H.dna.unique_enzymes, H.b_type) R.blood_DNA.len++
R.blood_DNA[R.blood_DNA.len] = list(H.dna.unique_enzymes, H.dna.b_type)
else
R.blood_DNA = list(list(H.dna.unique_enzymes, H.dna.b_type))
return return
else else
user << "The book seems full of illegible scribbles. Is this a joke?" user << "The book seems full of illegible scribbles. Is this a joke?"
@@ -601,8 +604,7 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
var/obj/effect/rune/R = new /obj/effect/rune var/obj/effect/rune/R = new /obj/effect/rune
if(istype(user, /mob/living/carbon/human)) if(istype(user, /mob/living/carbon/human))
var/mob/living/carbon/human/H = user var/mob/living/carbon/human/H = user
R.blood_DNA.len++ R.blood_DNA = list(list(H.dna.unique_enzymes, H.dna.b_type))
R.blood_DNA[R.blood_DNA.len] = list(H.dna.unique_enzymes, H.b_type)
switch(r) switch(r)
if("teleport") if("teleport")
var/list/words = list("ire", "ego", "nahlizet", "certum", "veri", "jatkaa", "balaq", "mgar", "karazet", "geeri") var/list/words = list("ire", "ego", "nahlizet", "certum", "veri", "jatkaa", "balaq", "mgar", "karazet", "geeri")

View File

@@ -119,6 +119,7 @@ MASS SPECTROMETER
F.fingerprints = md5(M.dna.uni_identity) F.fingerprints = md5(M.dna.uni_identity)
F.icon_state = "fingerprint1" F.icon_state = "fingerprint1"
F.name = text("FPrintC- '[M.name]'") F.name = text("FPrintC- '[M.name]'")
user << "\blue Done printing." user << "\blue Done printing."
user << text("\blue [M]'s Fingerprints: [md5(M.dna.uni_identity)]") user << text("\blue [M]'s Fingerprints: [md5(M.dna.uni_identity)]")
if ( !(M.blood_DNA) ) if ( !(M.blood_DNA) )
@@ -126,7 +127,7 @@ MASS SPECTROMETER
else else
user << "\blue Blood found on [M]. Analysing..." user << "\blue Blood found on [M]. Analysing..."
spawn(15) spawn(15)
for(var/i = 1, i < M.blood_DNA.len, i++) for(var/i = 1, i <= M.blood_DNA.len, i++)
var/list/templist = M.blood_DNA[i] var/list/templist = M.blood_DNA[i]
user << "\blue Blood type: [templist[2]]\nDNA: [templist[1]]" user << "\blue Blood type: [templist[2]]\nDNA: [templist[1]]"
return return

View File

@@ -1,8 +1,8 @@
/mob/living/carbon/human/emote(var/act,var/m_type=1,var/message = null) /mob/living/carbon/human/emote(var/act,var/m_type=1,var/message = null)
var/param = null var/param = null
if (findtext(act, "-", 1, null)) if (findtext(act, " ", 1, null))
var/t1 = findtext(act, "-", 1, null) var/t1 = findtext(act, " ", 1, null)
param = copytext(act, t1 + 1, length(act) + 1) param = copytext(act, t1 + 1, length(act) + 1)
act = copytext(act, 1, t1) act = copytext(act, 1, t1)
@@ -50,22 +50,33 @@
m_type = 1 m_type = 1
if ("custom") if ("custom")
var/input = input("Choose an emote to display.") as text|null m_type = 0
if (!input) if(copytext(param,1,2) == "v")
return
input = sanitize(input)
var/input2 = input("Is this a visible or hearable emote?") in list("Visible","Hearable")
if (input2 == "Visible")
m_type = 1 m_type = 1
else if (input2 == "Hearable") else if(copytext(param,1,2) == "h")
if (src.miming)
return
m_type = 2 m_type = 2
else 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")
m_type = 2
else
alert("Unable to use this emote, must be either hearable or visible.")
return
if(m_type)
param = trim(copytext(param,2))
else
param = trim(param)
var/input
if(!param)
input = input("Choose an emote to display.") as text|null
else
input = param
if(input)
message = "<B>[src]</B> [input]"
else
return return
message = "<B>[src]</B> [input]"
if ("me") if ("me")
if(silent) if(silent)
return return
@@ -186,6 +197,20 @@
message = "<B>[src]</B> makes a weak noise." message = "<B>[src]</B> makes a weak noise."
m_type = 2 m_type = 2
if ("breathe")
message = "<B>[src]</B> breathes."
m_type = 1
holdbreath = 0
if ("stopbreath")
message = "<B>[src]</B> stops breathing..."
m_type = 1
if ("holdbreath")
message = "<B>[src]</B> stops breathing..."
m_type = 1
holdbreath = 1
if ("deathgasp") if ("deathgasp")
message = "<B>[src]</B> seizes up and falls limp, \his eyes dead and lifeless..." message = "<B>[src]</B> seizes up and falls limp, \his eyes dead and lifeless..."
m_type = 1 m_type = 1

View File

@@ -121,7 +121,7 @@
if (src.stat == 1 || stat == 2) if (src.stat == 1 || stat == 2)
usr << "\red [name] doesn't seem to be responding to anything around [t_him], [t_his] eyes closed as though asleep." usr << "\red [name] doesn't seem to be responding to anything around [t_him], [t_his] eyes closed as though asleep."
if(health < 0 && distance <= 3) if((!isbreathing || holdbreath) && distance <= 3)
usr << "\red [name] does not appear to be breathing." usr << "\red [name] does not appear to be breathing."
if(istype(usr, /mob/living/carbon/human) && usr.stat == 0 && src.stat == 1 && distance <= 1) if(istype(usr, /mob/living/carbon/human) && usr.stat == 0 && src.stat == 1 && distance <= 1)
for(var/mob/O in viewers(usr.loc, null)) for(var/mob/O in viewers(usr.loc, null))

View File

@@ -21,7 +21,7 @@
var/b_eyes = 0.0 var/b_eyes = 0.0
var/s_tone = 0.0 var/s_tone = 0.0
var/age = 30.0 var/age = 30.0
var/b_type // var/b_type
var/obj/item/clothing/suit/wear_suit = null var/obj/item/clothing/suit/wear_suit = null
var/obj/item/clothing/under/w_uniform = null var/obj/item/clothing/under/w_uniform = null

View File

@@ -10,6 +10,8 @@
// used to do some stuff only on every X life tick // used to do some stuff only on every X life tick
life_tick = 0 life_tick = 0
isbreathing = 1
holdbreath = 0
/mob/living/carbon/human/Life() /mob/living/carbon/human/Life()
set invisibility = 0 set invisibility = 0
@@ -272,16 +274,37 @@
var/datum/air_group/breath var/datum/air_group/breath
// HACK NEED CHANGING LATER // HACK NEED CHANGING LATER
if(health < config.health_threshold_dead) if(health < config.health_threshold_dead)
losebreath++ isbreathing = 0
spawn emote("stopbreath")
if(losebreath>0 && prob(90)) //Suffocating so do not take a breath if(holdbreath)
losebreath-- isbreathing = 0
if (prob(75)) //High chance of gasping for air
spawn emote("gasp") if(isbreathing)
// are we running out of air in our lungs?
if(losebreath > 0)
// inaprovaline prevents the need to breathe for a while
if(reagents.has_reagent("inaprovaline"))
losebreath = 0
else
// we're running out of air, gasp for it!
if (prob(25)) //High chance of gasping for air
spawn emote("gasp")
else if(health >= 0)
if(holdbreath)
// we're simply holding our breath, see if we can hold it longer
if(health < 30)
holdbreath = 0
isbreathing = 1
spawn emote("custom h inhales sharply.")
else
isbreathing = 1
emote("breathe")
else
if(istype(loc, /obj/)) if(istype(loc, /obj/))
var/obj/location_as_object = loc var/obj/location_as_object = loc
location_as_object.handle_internal_lifeform(src, 0) location_as_object.handle_internal_lifeform(src, 0)
else if(isbreathing)
//First, check for air from internal atmosphere (using an air tank and mask generally) //First, check for air from internal atmosphere (using an air tank and mask generally)
breath = get_breath_from_internal(BREATH_VOLUME) // Super hacky -- TLE breath = get_breath_from_internal(BREATH_VOLUME) // Super hacky -- TLE
//breath = get_breath_from_internal(0.5) // Manually setting to old BREATH_VOLUME amount -- TLE //breath = get_breath_from_internal(0.5) // Manually setting to old BREATH_VOLUME amount -- TLE

View File

@@ -51,15 +51,15 @@
src << "To use something, simply double-click it." src << "To use something, simply double-click it."
src << "Currently right-click functions will not work for the AI (except examine), and will either be replaced with dialogs or won't be usable by the AI." src << "Currently right-click functions will not work for the AI (except examine), and will either be replaced with dialogs or won't be usable by the AI."
src << "Remember to <b>adjust your camera network</b> if you are having difficulty navigating the camera networks with the arrow keys or clicking on certain objects.<br>" src << "Remember to <b>adjust your camera network</b> if you are having difficulty navigating the camera networks with the arrow keys or clicking on certain objects.<br>"
src << "<br><b><font color=red>IMPORTANT GAMEPLAY ASPECTS:</font></b>"
src << "1.) Act like an AI. If someone is breaking into your upload, say something like \"Alert. Unauthorised Access Detected: AI Upload.\" not \"Help! Urist is trying to subvert me!\""
src << "2.) Do not watch the traitor like a hawk alerting the station to his/her every move. This relates to 1."
src << "3.) You are theoretically omniscient, but you should not be Beepsky 5000, laying down the law left and right. That is security's job. Instead, try to keep the station productive and effective. (Feel free to report the location of major violence and crimes and all that, just do not be the evil thing looking over peoples shoulders)"
src << "<br>We want everyone to have a good time, so we, the admins, will try to correct you if you stray from these rules. Just try to keep it sensible."
if (!(ticker && ticker.mode && (mind in ticker.mode.malf_ai))) if (!(ticker && ticker.mode && (mind in ticker.mode.malf_ai)))
show_laws() show_laws()
src << "<b>These laws may be changed by other players, or by you being the traitor.</b>" src << "<b>These laws may be changed by other players, or by you being the traitor.</b>"
src << "<br><b><font color=red>IMPORTANT GAMEPLAY ASPECTS:</font></b>"
src << "1.) Act like an AI. If someone is breaking into your upload, say something like \"Alert. Unauthorised Access Detected: AI Upload.\" not \"Help! Urist is trying to subvert me!\""
src << "2.) Do not watch the traitor like a hawk alerting the station to his/her every move. This relates to 1."
src << "3.) You are theoretically omniscient, but you should not be Beepsky 5000, laying down the law left and right. That is security's job. Instead, try to keep the station productive and effective. (Feel free to report the location of major violence and crimes and all that, just do not be the evil thing looking over peoples shoulders)"
src << "<br>We want everyone to have a good time, so we, the admins, will try to correct you if you stray from these rules. Just try to keep it sensible."
job = "AI" job = "AI"
spawn(0) spawn(0)

View File

@@ -119,6 +119,12 @@
if (!(ticker && ticker.mode && (O.mind in ticker.mode.malf_ai))) if (!(ticker && ticker.mode && (O.mind in ticker.mode.malf_ai)))
O.show_laws() O.show_laws()
O << "<b>These laws may be changed by other players, or by you being the traitor.</b>" O << "<b>These laws may be changed by other players, or by you being the traitor.</b>"
O << "<br><b><font color=red>IMPORTANT GAMEPLAY ASPECTS:</font></b>"
O << "1.) Act like an AI. If someone is breaking into your upload, say something like \"Alert. Unauthorised Access Detected: AI Upload.\" not \"Help! Urist is trying to subvert me!\""
O << "2.) Do not watch the traitor like a hawk alerting the station to his/her every move. This relates to 1."
O << "3.) You are theoretically omniscient, but you should not be Beepsky 5000, laying down the law left and right. That is security's job. Instead, try to keep the station productive and effective. (Feel free to report the location of major violence and crimes and all that, just do not be the evil thing looking over peoples shoulders)"
O << "<br>We want everyone to have a good time, so we, the admins, will try to correct you if you stray from these rules. Just try to keep it sensible."
O.verbs += /mob/living/silicon/ai/proc/ai_call_shuttle O.verbs += /mob/living/silicon/ai/proc/ai_call_shuttle
O.verbs += /mob/living/silicon/ai/proc/show_laws_verb O.verbs += /mob/living/silicon/ai/proc/show_laws_verb