Resolves Conflicts with 7137

This commit is contained in:
KasparoVy
2017-04-30 03:42:48 -04:00
638 changed files with 12738 additions and 10357 deletions
+15 -15
View File
@@ -308,7 +308,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
set name = "Toggle AntagHUD"
set desc = "Toggles AntagHUD allowing you to see who is the antagonist"
if(!config.antag_hud_allowed && !client.holder)
to_chat(src, "\red Admins have disabled this for this round.")
to_chat(src, "<span class='warning'>Admins have disabled this for this round.</span>")
return
if(!client)
return
@@ -462,11 +462,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
/mob/dead/observer/memory()
set hidden = 1
to_chat(src, "\red You are dead! You have no mind to store memory!")
to_chat(src, "<span class='warning'>You are dead! You have no mind to store memory!</span>")
/mob/dead/observer/add_memory()
set hidden = 1
to_chat(src, "\red You are dead! You have no mind to store memory!")
to_chat(src, "<span class='warning'>You are dead! You have no mind to store memory!</span>")
/mob/dead/observer/verb/analyze_air()
set name = "Analyze Air"
@@ -485,9 +485,9 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
to_chat(src, "<span class='boldnotice'>Results:</span>")
if(abs(pressure - ONE_ATMOSPHERE) < 10)
to_chat(src, "\blue Pressure: [round(pressure,0.1)] kPa")
to_chat(src, "<span class='notice'>Pressure: [round(pressure,0.1)] kPa</span>")
else
to_chat(src, "\red Pressure: [round(pressure,0.1)] kPa")
to_chat(src, "<span class='warning'>Pressure: [round(pressure,0.1)] kPa</span>")
if(total_moles)
var/o2_concentration = environment.oxygen/total_moles
var/n2_concentration = environment.nitrogen/total_moles
@@ -496,28 +496,28 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
var/unknown_concentration = 1-(o2_concentration+n2_concentration+co2_concentration+plasma_concentration)
if(abs(n2_concentration - N2STANDARD) < 20)
to_chat(src, "\blue Nitrogen: [round(n2_concentration*100)]% ([round(environment.nitrogen,0.01)] moles)")
to_chat(src, "<span class='notice'>Nitrogen: [round(n2_concentration*100)]% ([round(environment.nitrogen,0.01)] moles)</span>")
else
to_chat(src, "\red Nitrogen: [round(n2_concentration*100)]% ([round(environment.nitrogen,0.01)] moles)")
to_chat(src, "<span class='warning'>Nitrogen: [round(n2_concentration*100)]% ([round(environment.nitrogen,0.01)] moles)</span>")
if(abs(o2_concentration - O2STANDARD) < 2)
to_chat(src, "\blue Oxygen: [round(o2_concentration*100)]% ([round(environment.oxygen,0.01)] moles)")
to_chat(src, "<span class='notice'>Oxygen: [round(o2_concentration*100)]% ([round(environment.oxygen,0.01)] moles)</span>")
else
to_chat(src, "\red Oxygen: [round(o2_concentration*100)]% ([round(environment.oxygen,0.01)] moles)")
to_chat(src, "<span class='warning'>Oxygen: [round(o2_concentration*100)]% ([round(environment.oxygen,0.01)] moles)</span>")
if(co2_concentration > 0.01)
to_chat(src, "\red CO2: [round(co2_concentration*100)]% ([round(environment.carbon_dioxide,0.01)] moles)")
to_chat(src, "<span class='warning'>CO2: [round(co2_concentration*100)]% ([round(environment.carbon_dioxide,0.01)] moles)</span>")
else
to_chat(src, "\blue CO2: [round(co2_concentration*100)]% ([round(environment.carbon_dioxide,0.01)] moles)")
to_chat(src, "<span class='notice'>CO2: [round(co2_concentration*100)]% ([round(environment.carbon_dioxide,0.01)] moles)</span>")
if(plasma_concentration > 0.01)
to_chat(src, "\red Plasma: [round(plasma_concentration*100)]% ([round(environment.toxins,0.01)] moles)")
to_chat(src, "<span class='warning'>Plasma: [round(plasma_concentration*100)]% ([round(environment.toxins,0.01)] moles)</span>")
if(unknown_concentration > 0.01)
to_chat(src, "\red Unknown: [round(unknown_concentration*100)]% ([round(unknown_concentration*total_moles,0.01)] moles)")
to_chat(src, "<span class='warning'>Unknown: [round(unknown_concentration*100)]% ([round(unknown_concentration*total_moles,0.01)] moles)</span>")
to_chat(src, "\blue Temperature: [round(environment.temperature-T0C,0.1)]&deg;C")
to_chat(src, "\blue Heat Capacity: [round(environment.heat_capacity(),0.1)]")
to_chat(src, "<span class='notice'>Temperature: [round(environment.temperature-T0C,0.1)]&deg;C</span>")
to_chat(src, "<span class='notice'>Heat Capacity: [round(environment.heat_capacity(),0.1)]</span>")
/mob/dead/observer/verb/view_manifest()
set name = "View Crew Manifest"
+2 -2
View File
@@ -8,7 +8,7 @@
if(src.client)
if(src.client.prefs.muted & MUTE_DEADCHAT)
to_chat(src, "\red You cannot talk in deadchat (muted).")
to_chat(src, "<span class='warning'>You cannot talk in deadchat (muted).</span>")
return
if(src.client.handle_spam_prevention(message,MUTE_DEADCHAT))
@@ -30,7 +30,7 @@
if(src.client)
if(src.client.prefs.muted & MUTE_DEADCHAT)
to_chat(src, "\red You cannot emote in deadchat (muted).")
to_chat(src, "<span class='warning'>You cannot emote in deadchat (muted).</span>")
return
if(src.client.handle_spam_prevention(message, MUTE_DEADCHAT))
+13 -3
View File
@@ -13,6 +13,16 @@
return 0 // Proceed with emote
//--FalseIncarnate
/mob/proc/handle_emote_param(var/target, var/not_self, var/vicinity, var/return_mob) //Only returns not null if the target param is valid.
var/view_vicinity = vicinity ? vicinity : null //not_self means we'll only return if target is valid and not us
if(target) //vicinity is the distance passed to the view proc.
for(var/mob/A in view(view_vicinity, null)) //if set, return_mob will cause this proc to return the mob instead of just its name if the target is valid.
if(target == A.name && (!not_self || (not_self && target != name)))
if(return_mob)
return A
else
return target
// All mobs should have custom emote, really..
/mob/proc/custom_emote(var/m_type=1,var/message = null)
@@ -86,16 +96,16 @@
/mob/proc/emote_dead(var/message)
if(client.prefs.muted & MUTE_DEADCHAT)
to_chat(src, "\red You cannot send deadchat emotes (muted).")
to_chat(src, "<span class='warning'>You cannot send deadchat emotes (muted).</span>")
return
if(!(client.prefs.toggles & CHAT_DEAD))
to_chat(src, "\red You have deadchat muted.")
to_chat(src, "<span class='warning'>You have deadchat muted.</span>")
return
if(!src.client.holder)
if(!config.dsay_allowed)
to_chat(src, "\red Deadchat is globally muted")
to_chat(src, "<span class='warning'>Deadchat is globally muted</span>")
return
+27 -24
View File
@@ -148,7 +148,10 @@
colour = "soghun"
key = "o"
flags = RESTRICTED
syllables = list("ss","ss","ss","ss","skak","seeki","resh","las","esi","kor","sh")
syllables = list("za","az","ze","ez","zi","iz","zo","oz","zu","uz","zs","sz","ha","ah","he","eh","hi","ih", \
"ho","oh","hu","uh","hs","sh","la","al","le","el","li","il","lo","ol","lu","ul","ls","sl","ka","ak","ke","ek", \
"ki","ik","ko","ok","ku","uk","ks","sk","sa","as","se","es","si","is","so","os","su","us","ss","ss","ra","ar", \
"re","er","ri","ir","ro","or","ru","ur","rs","sr","a","a","e","e","i","i","o","o","u","u","s","s" )
/datum/language/unathi/get_random_name()
@@ -618,34 +621,34 @@
return (universal_speak || (speaking && speaking.flags & INNATE) || speaking in languages)
//TBD
/mob/proc/check_lang_data()
. = ""
for(var/datum/language/L in languages)
if(!(L.flags & NONGLOBAL))
. += "<b>[L.name] (:[L.key])</b><br/>[L.desc]<br><br>"
/mob/living/check_lang_data()
. = ""
if(default_language)
. += "Current default language: [default_language] - <a href='byond://?src=[UID()];default_lang=reset'>reset</a><br><br>"
for(var/datum/language/L in languages)
if(!(L.flags & NONGLOBAL))
if(L == default_language)
. += "<b>[L.name] (:[L.key])</b> - default - <a href='byond://?src=[UID()];default_lang=reset'>reset</a><br>[L.desc]<br><br>"
else
. += "<b>[L.name] (:[L.key])</b> - <a href='byond://?src=[UID()];default_lang=[L]'>set default</a><br>[L.desc]<br><br>"
/mob/verb/check_languages()
set name = "Check Known Languages"
set category = "IC"
set src = usr
var/dat = "<b><font size = 5>Known Languages</font></b><br/><br/>"
for(var/datum/language/L in languages)
if(!(L.flags & NONGLOBAL))
dat += "<b>[L.name] (:[L.key])</b><br/>[L.desc]<br/><br/>"
src << browse(dat, "window=checklanguage")
return
/mob/living/check_languages()
var/dat = "<b><font size = 5>Known Languages</font></b><br/><br/>"
if(default_language)
dat += "Current default language: [default_language] - <a href='byond://?src=[UID()];default_lang=reset'>reset</a><br/><br/>"
for(var/datum/language/L in languages)
if(!(L.flags & NONGLOBAL))
if(L == default_language)
dat += "<b>[L.name] (:[L.key])</b> - default - <a href='byond://?src=[UID()];default_lang=reset'>reset</a><br/>[L.desc]<br/><br/>"
else
dat += "<b>[L.name] (:[L.key])</b> - <a href=\"byond://?src=[UID()];default_lang=[L]\">set default</a><br/>[L.desc]<br/><br/>"
src << browse(dat, "window=checklanguage")
var/datum/browser/popup = new(src, "checklanguage", "Known Languages", 420, 470)
popup.set_content(check_lang_data())
popup.open()
/mob/living/Topic(href, href_list)
if(href_list["default_lang"])
@@ -220,7 +220,7 @@
threatcount += 4
//Mindshield implants imply trustworthyness
if(isloyal(src))
if(ismindshielded(src))
threatcount -= 1
return threatcount
@@ -73,7 +73,7 @@
if(powerc(250))
adjustToxLoss(-250)
to_chat(src, "\green You begin to evolve!")
to_chat(src, "<span class=notice'>You begin to evolve!</span>")
for(var/mob/O in viewers(src, null))
O.show_message(text("<span class='alertalien'>[src] begins to twist and contort!</span>"), 1)
var/mob/living/carbon/alien/humanoid/sentinel/praetorian/new_xeno = new(loc)
@@ -8,8 +8,30 @@
// if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
// act = copytext(act,1,length(act)) //seriously who the fuck wrote this
var/muzzled = is_muzzled()
var/on_CD = 0
act = lowertext(act)
//cooldown system handled by /code/modules/mob/emotes.dm
switch(act)
if("roar")
on_CD = handle_emote_CD()
if("deathgasp")
on_CD = handle_emote_CD()
if("hiss")
on_CD = handle_emote_CD()
if("gnarl")
on_CD = handle_emote_CD()
if("flip")
on_CD = handle_emote_CD()
if(on_CD)
return
switch(act)
if("sign")
if(!restrained())
var/num = null
@@ -26,7 +48,7 @@
message = "<B>\The [src]</B> lets out a waning guttural screech, green blood bubbling from its maw..."
m_type = 2
if("scratch")
if(!src.restrained())
if(!restrained())
message = "<B>\The [src]</B> scratches."
m_type = 1
if("whimper")
@@ -79,11 +101,11 @@
message = "<B>\The [src]</B> twitches violently."
m_type = 1
if("dance")
if(!src.restrained())
if(!restrained())
message = "<B>\The [src]</B> dances around happily."
m_type = 1
if("roll")
if(!src.restrained())
if(!restrained())
message = "<B>\The [src]</B> rolls."
m_type = 1
if("shake")
@@ -103,13 +125,17 @@
if("flip")
m_type = 1
message = "<B>\The [src]</B> does a flip!"
src.SpinAnimation(5,1)
SpinAnimation(5,1)
if("help")
to_chat(src, "burp, flip, deathgasp, choke, collapse, dance, drool, gasp, shiver, gnarl, jump, moan, nod, roar, roll, scratch,\nscretch, shake, sign-#, sit, sulk, sway, tail, twitch, whimper")
if(!stat)
if(act == "roar")
playsound(src.loc, 'sound/voice/hiss5.ogg', 40, 1, 1)
playsound(src.loc, 'sound/voice/hiss5.ogg', 50, 1, 1)
if(act == "deathgasp")
playsound(src.loc, 'sound/voice/hiss6.ogg', 80, 1, 1)
if(act == "hiss")
playsound(src.loc, 'sound/voice/hiss1.ogg', 30, 1, 1)
if(act == "gnarl")
playsound(src.loc, 'sound/voice/hiss4.ogg', 30, 1, 1)
..(act, m_type, message)
@@ -85,6 +85,6 @@
if(powerc(250,1))//Can't plant eggs on spess tiles. That's silly.
adjustPlasma(-250)
for(var/mob/O in viewers(src, null))
O.show_message(text("\green <B>[src] has laid an egg!</B>"), 1)
O.show_message(text("<span class=notice'><B>[src] has laid an egg!</B></span>"), 1)
new /obj/structure/alien/egg(loc)
return
@@ -15,7 +15,7 @@
return
if(src.client)
if(client.prefs.muted & MUTE_IC)
to_chat(src, "\red You cannot send IC messages (muted).")
to_chat(src, "<span class='warning'>You cannot send IC messages (muted).</span>")
return
if(src.client.handle_spam_prevention(message,MUTE_IC))
return
@@ -15,7 +15,7 @@
to_chat(O, text("<B>[] scurries to the ground!</B>", src))
else
layer = MOB_LAYER
to_chat(src, text("\green You have stopped hiding."))
to_chat(src, text("<span class=notice'>You have stopped hiding.</span>"))
for(var/mob/O in oviewers(src, null))
if((O.client && !( O.blinded )))
to_chat(O, text("[] slowly peaks up from the ground...", src))
@@ -29,15 +29,15 @@
return
if(handcuffed || legcuffed)
to_chat(src, "\red You cannot evolve when you are cuffed.")
to_chat(src, "<span class='warning'>You cannot evolve when you are cuffed.</span>")
if(amount_grown >= max_grown) //TODO ~Carn
//green is impossible to read, so i made these blue and changed the formatting slightly
to_chat(src, "<span class='boldnotice'>You are growing into a beautiful alien! It is time to choose a caste.</span>")
to_chat(src, "\blue There are three to choose from:")
to_chat(src, "<B>Hunters</B> \blue are strong and agile, able to hunt away from the hive and rapidly move through ventilation shafts. Hunters generate plasma slowly and have low reserves.")
to_chat(src, "<B>Sentinels</B> \blue are tasked with protecting the hive and are deadly up close and at a range. They are not as physically imposing nor fast as the hunters.")
to_chat(src, "<B>Drones</B> \blue are the working class, offering the largest plasma storage and generation. They are the only caste which may evolve again, turning into the dreaded alien queen.")
to_chat(src, "<span class='notice'>There are three to choose from:</span>")
to_chat(src, "<B>Hunters</B> <span class='notice'>are strong and agile, able to hunt away from the hive and rapidly move through ventilation shafts. Hunters generate plasma slowly and have low reserves.</span>")
to_chat(src, "<B>Sentinels</B> <span class='notice'>are tasked with protecting the hive and are deadly up close and at a range. They are not as physically imposing nor fast as the hunters.</span>")
to_chat(src, "<B>Drones</B> <span class='notice'>are the working class, offering the largest plasma storage and generation. They are the only caste which may evolve again, turning into the dreaded alien queen.</span>")
var/alien_caste = alert(src, "Please choose which alien caste you shall belong to.",,"Hunter","Sentinel","Drone")
var/mob/living/carbon/alien/humanoid/new_xeno
+2 -6
View File
@@ -167,12 +167,8 @@
if(isrobot(loc))
var/mob/living/silicon/robot/borg = loc
borg.mmi = null
if(brainmob)
qdel(brainmob)
brainmob = null
if(held_brain)
qdel(held_brain)
held_brain = null
QDEL_NULL(brainmob)
QDEL_NULL(held_brain)
return ..()
/obj/item/device/mmi/syndie
@@ -123,7 +123,5 @@
icon_state = "scroll"
/obj/item/organ/internal/brain/Destroy() //copypasted from MMIs.
if(brainmob)
qdel(brainmob)
brainmob = null
QDEL_NULL(brainmob)
return ..()
@@ -2,7 +2,7 @@
if(stat == DEAD) return
if(!gibbed && container && istype(container, /obj/item/device/mmi))//If not gibbed but in a container.
for(var/mob/O in viewers(container, null))
O.show_message(text("<span class='danger'>[]'s MMI flatlines!</span>", src), 1, "\red You hear something flatline.", 2)
O.show_message(text("<span class='danger'>[]'s MMI flatlines!</span>", src), 1, "<span class='warning'>You hear something flatline.</span>", 2)
container.icon_state = "mmi_dead"
stat = DEAD
@@ -98,7 +98,7 @@
var/turf/T = get_turf_or_move(src.loc)
for(var/mob/M in viewers(T))
M.show_message("\blue The positronic brain chimes quietly.")
M.show_message("<span class='notice'>The positronic brain chimes quietly.</span>")
icon_state = "posibrain-occupied"
/obj/item/device/mmi/posibrain/proc/reset_search() //We give the players sixty seconds to decide, then reset the timer.
@@ -109,7 +109,7 @@
var/turf/T = get_turf_or_move(src.loc)
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?")
M.show_message("<span class='notice'>The positronic brain buzzes quietly, and the golden lights fade away. Perhaps you could try again?</span>")
/obj/item/device/mmi/posibrain/Topic(href,href_list)
if("signup" in href_list)
@@ -122,22 +122,22 @@
to_chat(O, "Not looking for a ghost, yet.")
return
if(!istype(O))
to_chat(O, "\red Error.")
to_chat(O, "<span class='warning'>Error.</span>")
return
if(O in ghost_volunteers)
to_chat(O, "\blue Removed from registration list.")
to_chat(O, "<span class='notice'>Removed from registration list.</span>")
ghost_volunteers.Remove(O)
return
if(!check_observer(O))
to_chat(O, "\red You cannot be \a [src].")
to_chat(O, "<span class='warning'>You cannot be \a [src].</span>")
return
if(O.has_enabled_antagHUD == 1 && config.antag_hud_restricted)
to_chat(O, "\red Upon using the antagHUD you forfeited the ability to join the round.")
to_chat(O, "<span class='warning'>Upon using the antagHUD you forfeited the ability to join the round.</span>")
return
if(jobban_isbanned(O, "Cyborg") || jobban_isbanned(O,"nonhumandept"))
to_chat(O, "\red You are job banned from this role.")
to_chat(O, "<span class='warning'>You are job banned from this role.</span>")
return
to_chat(O., "\blue You've been added to the list of ghosts that may become this [src]. Click again to unvolunteer.")
to_chat(O., "<span class='notice'>You've been added to the list of ghosts that may become this [src]. Click again to unvolunteer.</span>")
ghost_volunteers.Add(O)
@@ -196,7 +196,7 @@
playsound(get_turf(src), 'sound/items/posiping.ogg', 80, 0)
var/turf/T = get_turf_or_move(src.loc)
for(var/mob/M in viewers(T))
M.show_message("\blue The positronic brain pings softly.")
M.show_message("<span class='notice'>The positronic brain pings softly.</span>")
/obj/item/device/mmi/posibrain/ipc
desc = "A cube of shining metal, four inches to a side and covered in shallow grooves. The speaker switch is set to 'off'."
+7 -9
View File
@@ -56,7 +56,7 @@
last_stomach_attack = world.time
for(var/mob/M in hearers(4, src))
if(M.client)
M.show_message(text("\red You hear something rumbling inside [src]'s stomach..."), 2)
M.show_message(text("<span class='warning'>You hear something rumbling inside [src]'s stomach...</span>"), 2)
var/obj/item/I = user.get_active_hand()
if(I && I.force)
@@ -76,7 +76,7 @@
for(var/mob/M in viewers(user, null))
if(M.client)
M.show_message(text("\red <B>[user] attacks [src]'s stomach wall with the [I.name]!"), 2)
M.show_message(text("<span class='warning'><B>[user] attacks [src]'s stomach wall with the [I.name]!</span>"), 2)
playsound(user.loc, 'sound/effects/attackblob.ogg', 50, 1)
if(prob(src.getBruteLoss() - 50))
@@ -143,16 +143,14 @@
return 0
if(NO_SHOCK in mutations) //shockproof
return 0
if(tesla_shock && tesla_ignore)
return FALSE
shock_damage *= siemens_coeff
if(shock_damage<1 && !override)
return 0
if(reagents.has_reagent("teslium"))
shock_damage *= 1.5 //If the mob has teslium in their body, shocks are 50% more damaging!
take_overall_damage(0,shock_damage, used_weapon = "Electrocution")
//src.burn_skin(shock_damage)
//src.adjustFireLoss(shock_damage) //burn_skin will do this for us
//src.updatehealth()
visible_message(
"<span class='danger'>[src] was shocked by \the [source]!</span>", \
"<span class='userdanger'>You feel a powerful shock coursing through your body!</span>", \
@@ -217,8 +215,8 @@
if(src == M && istype(src, /mob/living/carbon/human))
var/mob/living/carbon/human/H = src
src.visible_message( \
text("\blue [src] examines [].",src.gender==MALE?"himself":"herself"), \
"\blue You check yourself for injuries." \
text("<span class='notice'>[src] examines [].</span>",src.gender==MALE?"himself":"herself"), \
"<span class='notice'>You check yourself for injuries.</span>" \
)
for(var/obj/item/organ/external/org in H.organs)
@@ -247,7 +245,7 @@
status = "weirdly shapen."
if(status == "")
status = "OK"
src.show_message(text("\t []My [] is [].",status=="OK"?"\blue ":"\red ",org.name,status),1)
src.show_message(text("\t []My [] is [].",status=="OK"?"<span class='notice'></span>":"<span class='warning'></span>",org.name,status),1)
if(staminaloss)
if(staminaloss > 30)
to_chat(src, "<span class='info'>You're completely exhausted.</span>")
+3
View File
@@ -6,4 +6,7 @@
if(reagents)
reagents.death_metabolize(src)
for(var/obj/item/organ/internal/I in internal_organs)
I.on_owner_death()
..(gibbed)
+109 -211
View File
@@ -53,6 +53,19 @@
if(!found_slime_bodypart) //Everyone else fails, skip the emote attempt
return
if("clack", "clacks")
if(species.name == "Kidan") //Only Kidan can clack and rightfully so.
on_CD = handle_emote_CD() //proc located in code\modules\mob\emote.dm'
else //Everyone else fails, skip the emote attempt
return
if("click", "clicks")
if(species.name == "Kidan") //Only Kidan can click and rightfully so.
on_CD = handle_emote_CD() //proc located in code\modules\mob\emote.dm'
else //Everyone else fails, skip the emote attempt
return
if("scream", "screams")
on_CD = handle_emote_CD(50) //longer cooldown
if("fart", "farts", "flip", "flips", "snap", "snaps")
@@ -72,128 +85,73 @@
if("me") //OKAY SO RANT TIME, THIS FUCKING HAS TO BE HERE OR A SHITLOAD OF THINGS BREAK
return custom_emote(m_type, message) //DO YOU KNOW WHY SHIT BREAKS? BECAUSE SO MUCH OLDCODE CALLS mob.emote("me",1,"whatever_the_fuck_it_wants_to_emote")
//WHO THE FUCK THOUGHT THAT WAS A GOOD FUCKING IDEA!?!?
if("ping", "pings")
var/M = null
if(param)
for(var/mob/A in view(null, null))
if(param == A.name)
M = A
break
if(!M)
param = null
var/M = handle_emote_param(param) //Check to see if the param is valid (mob with the param name is in view).
if(param)
message = "<B>[src]</B> pings at [param]."
else
message = "<B>[src]</B> pings."
message = "<B>[src]</B> pings[M ? " at [M]" : ""]."
playsound(loc, 'sound/machines/ping.ogg', 50, 0)
m_type = 2
if("buzz2")
message = "<B>[src]</B> emits an irritated buzzing sound."
var/M = handle_emote_param(param)
message = "<B>[src]</B> emits an irritated buzzing sound[M ? " at [M]" : ""]."
playsound(loc, 'sound/machines/buzz-two.ogg', 50, 0)
m_type = 2
if("buzz", "buzzes")
var/M = null
if(param)
for(var/mob/A in view(null, null))
if(param == A.name)
M = A
break
if(!M)
param = null
var/M = handle_emote_param(param)
if(param)
message = "<B>[src]</B> buzzes at [param]."
else
message = "<B>[src]</B> buzzes."
message = "<B>[src]</B> buzzes[M ? " at [M]" : ""]."
playsound(loc, 'sound/machines/buzz-sigh.ogg', 50, 0)
m_type = 2
if("beep", "beeps")
var/M = null
if(param)
for(var/mob/A in view(null, null))
if(param == A.name)
M = A
break
if(!M)
param = null
var/M = handle_emote_param(param)
if(param)
message = "<B>[src]</B> beeps at [param]."
else
message = "<B>[src]</B> beeps."
message = "<B>[src]</B> beeps[M ? " at [M]" : ""]."
playsound(loc, 'sound/machines/twobeep.ogg', 50, 0)
m_type = 2
if("drone", "drones", "hum", "hums", "rumble", "rumbles")
var/M = null
if(param)
for(var/mob/A in view(null, null))
if(param == A.name)
M = A
break
if(!M)
param = null
var/M = handle_emote_param(param)
if(param)
message = "<B>[src]</B> drones at [param]."
else
message = "<B>[src]</B> rumbles."
message = "<B>[src]</B> [M ? "drones at [M]" : "rumbles"]."
playsound(loc, 'sound/voice/DraskTalk.ogg', 50, 0)
m_type = 2
if("squish", "squishes")
var/M = null
if(param)
for(var/mob/A in view(null, null))
if(param == A.name)
M = A
break
if(!M)
param = null
var/M = handle_emote_param(param)
if(param)
message = "<B>[src]</B> squishes at [param]."
else
message = "<B>[src]</B> squishes."
message = "<B>[src]</B> squishes[M ? " at [M]" : ""]."
playsound(loc, 'sound/effects/slime_squish.ogg', 50, 0) //Credit to DrMinky (freesound.org) for the sound.
m_type = 2
if("yes")
var/M = null
if(param)
for(var/mob/A in view(null, null))
if(param == A.name)
M = A
break
if(!M)
param = null
if("clack", "clacks")
var/M = handle_emote_param(param)
if(param)
message = "<B>[src]</B> emits an affirmative blip at [param]."
else
message = "<B>[src]</B> emits an affirmative blip."
message = "<B>[src]</B> clacks their mandibles[M ? " at [M]" : ""]."
playsound(loc, 'sound/effects/Kidanclack.ogg', 50, 0) //Credit to DrMinky (freesound.org) for the sound.
m_type = 2
if("click", "clicks")
var/M = handle_emote_param(param)
message = "<B>[src]</B> clicks their mandibles[M ? " at [M]" : ""]."
playsound(loc, 'sound/effects/Kidanclack2.ogg', 50, 0) //Credit to DrMinky (freesound.org) for the sound.
m_type = 2
if("yes")
var/M = handle_emote_param(param)
message = "<B>[src]</B> emits an affirmative blip[M ? " at [M]" : ""]."
playsound(loc, 'sound/machines/synth_yes.ogg', 50, 0)
m_type = 2
if("no")
var/M = null
if(param)
for(var/mob/A in view(null, null))
if(param == A.name)
M = A
break
if(!M)
param = null
var/M = handle_emote_param(param)
if(param)
message = "<B>[src]</B> emits a negative blip at [param]."
else
message = "<B>[src]</B> emits a negative blip."
message = "<B>[src]</B> emits a negative blip[M ? " at [M]" : ""]."
playsound(loc, 'sound/machines/synth_no.ogg', 50, 0)
m_type = 2
@@ -225,12 +183,12 @@
if(!restrained())
message = "<B>[src]</B> is strumming the air and headbanging like a safari chimp."
m_type = 1
if("dance")
if(!restrained())
message = "<B>[src]</B> dances around happily."
m_type = 1
if("jump")
if(!restrained())
message = "<B>[src]</B> jumps!"
@@ -246,36 +204,16 @@
if("bow", "bows")
if(!buckled)
var/M = null
if(param)
for(var/mob/A in view(null, null))
if(param == A.name)
M = A
break
if(!M)
param = null
var/M = handle_emote_param(param)
if(param)
message = "<B>[src]</B> bows to [param]."
else
message = "<B>[src]</B> bows."
message = "<B>[src]</B> bows[M ? " to [M]" : ""]."
m_type = 1
if("salute", "salutes")
if(!buckled)
var/M = null
if(param)
for(var/mob/A in view(null, null))
if(param == A.name)
M = A
break
if(!M)
param = null
var/M = handle_emote_param(param)
if(param)
message = "<B>[src]</B> salutes to [param]."
else
message = "<B>[src]</b> salutes."
message = "<B>[src]</B> salutes[M ? " to [M]" : ""]."
m_type = 1
if("choke", "chokes")
@@ -414,11 +352,15 @@
m_type = 2
if("frown", "frowns")
message = "<B>[src]</B> frowns."
var/M = handle_emote_param(param)
message = "<B>[src]</B> frowns[M ? " at [M]" : ""]."
m_type = 1
if("nod", "nods")
message = "<B>[src]</B> nods."
var/M = handle_emote_param(param)
message = "<B>[src]</B> nods[M ? " at [M]" : ""]."
m_type = 1
if("blush", "blushes")
@@ -426,7 +368,9 @@
m_type = 1
if("wave", "waves")
message = "<B>[src]</B> waves."
var/M = handle_emote_param(param)
message = "<B>[src]</B> waves[M ? " at [M]" : ""]."
m_type = 1
if("quiver", "quivers")
@@ -462,56 +406,27 @@
m_type = 2
if("glare", "glares")
var/M = null
if(param)
for(var/mob/A in view(null, null))
if(param == A.name)
M = A
break
if(!M)
param = null
var/M = handle_emote_param(param)
if(param)
message = "<B>[src]</B> glares at [param]."
else
message = "<B>[src]</B> glares."
message = "<B>[src]</B> glares[M ? " at [M]" : ""]."
m_type = 1
if("stare", "stares")
var/M = null
if(param)
for(var/mob/A in view(null, null))
if(param == A.name)
M = A
break
if(!M)
param = null
var/M = handle_emote_param(param)
if(param)
message = "<B>[src]</B> stares at [param]."
else
message = "<B>[src]</B> stares."
message = "<B>[src]</B> stares[M ? " at [M]" : ""]."
m_type = 1
if("look", "looks")
var/M = null
if(param)
for(var/mob/A in view(null, null))
if(param == A.name)
M = A
break
var/M = handle_emote_param(param)
if(!M)
param = null
if(param)
message = "<B>[src]</B> looks at [param]."
else
message = "<B>[src]</B> looks."
message = "<B>[src]</B> looks[M ? " at [M]" : ""]."
m_type = 1
if("grin", "grins")
message = "<B>[src]</B> grins."
var/M = handle_emote_param(param)
message = "<B>[src]</B> grins[M ? " at [M]" : ""]."
m_type = 1
if("cry", "cries")
@@ -527,24 +442,26 @@
m_type = 2
if("sigh", "sighs")
var/M = handle_emote_param(param)
if(miming)
message = "<B>[src]</B> sighs."
message = "<B>[src]</B> sighs[M ? " at [M]" : ""]."
m_type = 1
else
if(!muzzled)
message = "<B>[src]</B> sighs."
message = "<B>[src]</B> sighs[M ? " at [M]" : ""]."
m_type = 2
else
message = "<B>[src]</B> makes a weak noise."
message = "<B>[src]</B> makes a weak noise"
m_type = 2
if("laugh", "laughs")
var/M = handle_emote_param(param)
if(miming)
message = "<B>[src]</B> acts out a laugh."
message = "<B>[src]</B> acts out a laugh[M ? " at [M]" : ""]."
m_type = 1
else
if(!muzzled)
message = "<B>[src]</B> laughs."
message = "<B>[src]</B> laughs[M ? " at [M]" : ""]."
m_type = 2
else
message = "<B>[src]</B> makes a noise."
@@ -557,11 +474,12 @@
m_type = 1
if("grumble", "grumbles")
var/M = handle_emote_param(param)
if(miming)
message = "<B>[src]</B> grumbles!"
message = "<B>[src]</B> grumbles[M ? " at [M]" : ""]!"
m_type = 1
if(!muzzled)
message = "<B>[src]</B> grumbles!"
message = "<B>[src]</B> grumbles[M ? " at [M]" : ""]!"
m_type = 2
else
message = "<B>[src]</B> makes a noise."
@@ -622,7 +540,9 @@
m_type = 1
if("shake", "shakes")
message = "<B>[src]</B> shakes \his head."
var/M = handle_emote_param(param, 1) //Check to see if the param is valid (mob with the param name is in view) but exclude ourselves.
message = "<B>[src]</B> shakes \his head[M ? " at [M]" : ""]."
m_type = 1
if("shrug", "shrugs")
@@ -640,7 +560,9 @@
m_type = 1
if("smile", "smiles")
message = "<B>[src]</B> smiles."
var/M = handle_emote_param(param, 1)
message = "<B>[src]</B> smiles[M ? " at [M]" : ""]."
m_type = 1
if("shiver", "shivers")
@@ -704,7 +626,9 @@
m_type = 2
if("wink", "winks")
message = "<B>[src]</B> winks."
var/M = handle_emote_param(param, 1)
message = "<B>[src]</B> winks[M ? " at [M]" : ""]."
m_type = 1
if("yawn", "yawns")
@@ -724,14 +648,7 @@
if("hug", "hugs")
m_type = 1
if(!restrained())
var/M = null
if(param)
for(var/mob/A in view(1, null))
if(param == A.name)
M = A
break
if(M == src)
M = null
var/M = handle_emote_param(param, 1, 1) //Check to see if the param is valid (mob with the param name is in view) but exclude ourselves and only check mobs in our immediate vicinity (1 tile distance).
if(M)
message = "<B>[src]</B> hugs [M]."
@@ -741,14 +658,7 @@
if("handshake")
m_type = 1
if(!restrained() && !r_hand)
var/mob/M = null
if(param)
for(var/mob/A in view(1, null))
if(param == A.name)
M = A
break
if(M == src)
M = null
var/mob/M = handle_emote_param(param, 1, 1, 1) //Check to see if the param is valid (mob with the param name is in view) but exclude ourselves, only check mobs in our immediate vicinity (1 tile distance) and return the whole mob instead of just its name.
if(M)
if(M.canmove && !M.r_hand && !M.restrained())
@@ -759,12 +669,8 @@
if("dap", "daps")
m_type = 1
if(!restrained())
var/M = null
if(param)
for(var/mob/A in view(1, null))
if(param == A.name)
M = A
break
var/M = handle_emote_param(param, null, 1)
if(M)
message = "<B>[src]</B> gives daps to [M]."
else
@@ -773,27 +679,23 @@
if("slap", "slaps")
m_type = 1
if(!restrained())
var/M = null
if(param)
for(var/mob/A in view(1, null))
if(param == A.name)
M = A
break
var/M = handle_emote_param(param, null, 1)
if(M)
message = "<span class='danger'>[src] slaps [M] across the face. Ouch!</span>"
playsound(loc, 'sound/effects/snap.ogg', 50, 1)
else
message = "<span class='danger'>[src] slaps \himself!</span>"
playsound(loc, 'sound/effects/snap.ogg', 50, 1)
adjustFireLoss(4)
playsound(loc, 'sound/effects/snap.ogg', 50, 1)
if("scream", "screams")
var/M = handle_emote_param(param)
if(miming)
message = "<B>[src]</B> acts out a scream!"
message = "<B>[src]</B> acts out a scream[M ? " at [M]" : ""]!"
m_type = 1
else
if(!muzzled)
message = "<B>[src]</B> [species.scream_verb]!"
message = "<B>[src]</B> [species.scream_verb][M ? " at [M]" : ""]!"
m_type = 2
if(gender == FEMALE)
playsound(loc, "[species.female_scream_sound]", 80, 1, 0, pitch = get_age_pitch())
@@ -801,10 +703,9 @@
playsound(loc, "[species.male_scream_sound]", 80, 1, 0, pitch = get_age_pitch()) //default to male screams if no gender is present.
else
message = "<B>[src]</B> makes a very loud noise."
message = "<B>[src]</B> makes a very loud noise[M ? " at [M]" : ""]."
m_type = 2
if("snap", "snaps")
if(prob(95))
m_type = 2
@@ -822,13 +723,14 @@
to_chat(usr, "You need at least one hand in good working order to snap your fingers.")
return
message = "<b>[src]</b> snaps \his fingers."
var/M = handle_emote_param(param)
message = "<b>[src]</b> snaps \his fingers[M ? " at [M]" : ""]."
playsound(loc, 'sound/effects/fingersnap.ogg', 50, 1, -3)
else
message = "<span class='danger'><b>[src]</b> snaps \his fingers right off!</span>"
playsound(loc, 'sound/effects/snap.ogg', 50, 1)
// Needed for M_TOXIC_FART
if("fart", "farts")
if(reagents.has_reagent("simethicone"))
@@ -836,11 +738,11 @@
// playsound(loc, 'sound/effects/fart.ogg', 50, 1, -3) //Admins still vote no to fun
if(locate(/obj/item/weapon/storage/bible) in get_turf(src))
to_chat(viewers(src), "<span class='warning'><b>[src] farts on the Bible!</b></span>")
var/image/cross = image('icons/obj/storage.dmi',"bible")
var/adminbfmessage = "\blue [bicon(cross)] <b><font color=red>Bible Fart: </font>[key_name(src, 1)] (<A HREF='?_src_=holder;adminmoreinfo=\ref[src]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=\ref[src]'>PP</A>) (<A HREF='?_src_=vars;Vars=[UID()]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[src]'>SM</A>) ([admin_jump_link(src)]) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;Smite=[UID()]'>SMITE</A>):</b>"
for(var/client/X in admins)
if(check_rights(R_EVENT,0,X.mob))
to_chat(X, adminbfmessage)
var/image/cross = image('icons/obj/storage.dmi',"bible")
var/adminbfmessage = "\blue [bicon(cross)] <b><font color=red>Bible Fart: </font>[key_name(src, 1)] (<A HREF='?_src_=holder;adminmoreinfo=\ref[src]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=\ref[src]'>PP</A>) (<A HREF='?_src_=vars;Vars=[UID()]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[src]'>SM</A>) ([admin_jump_link(src)]) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;Smite=[UID()]'>SMITE</A>):</b>"
for(var/client/X in admins)
if(check_rights(R_EVENT,0,X.mob))
to_chat(X, adminbfmessage)
else if(TOXIC_FARTS in mutations)
message = "<b>[src]</b> unleashes a [pick("horrible","terrible","foul","disgusting","awful")] fart."
else if(SUPER_FART in mutations)
@@ -877,13 +779,9 @@
to_chat(src, emotelist)
else
to_chat(src, "\blue Unusable emote '[act]'. Say *help for a list.")
to_chat(src, "<span class='notice'>Unusable emote '[act]'. Say *help for a list.</span>")
if(message) //Humans are special fucking snowflakes and have 735 lines of emotes, they get to handle their own emotes, not call the parent
if(message) //Humans are special fucking snowflakes and have 800 lines of emotes, they get to handle their own emotes, not call the parent.
log_emote("[name]/[key] : [message]")
//Hearing gasp and such every five seconds is not good emotes were not global for a reason.
+22 -18
View File
@@ -747,7 +747,11 @@
var/obj/item/clothing/suit/S = wear_suit
if(S.siemens_coefficient <= 0)
total_coeff -= 0.95
else if(S.siemens_coefficient == (-1))
total_coeff -= 1
siemens_coeff = total_coeff
if(tesla_ignore)
siemens_coeff = 0
else if(!safety)
var/gloves_siemens_coeff = 1
var/species_siemens_coeff = 1
@@ -872,7 +876,7 @@
sec_hud_set_security_status()
if(!modified)
to_chat(usr, "\red Unable to locate a data core entry for this person.")
to_chat(usr, "<span class='warning'>Unable to locate a data core entry for this person.</span>")
if(href_list["secrecord"])
if(hasHUD(usr,"security"))
@@ -902,7 +906,7 @@
read = 1
if(!read)
to_chat(usr, "\red Unable to locate a data core entry for this person.")
to_chat(usr, "<span class='warning'>Unable to locate a data core entry for this person.</span>")
if(href_list["secrecordComment"])
if(hasHUD(usr,"security"))
@@ -931,7 +935,7 @@
to_chat(usr, "<a href='?src=[UID()];secrecordadd=`'>\[Add comment\]</a>")
if(!read)
to_chat(usr, "\red Unable to locate a data core entry for this person.")
to_chat(usr, "<span class='warning'>Unable to locate a data core entry for this person.</span>")
if(href_list["secrecordadd"])
if(hasHUD(usr,"security"))
@@ -993,7 +997,7 @@
sec_hud_set_security_status()
if(!modified)
to_chat(usr, "\red Unable to locate a data core entry for this person.")
to_chat(usr, "<span class='warning'>Unable to locate a data core entry for this person.</span>")
if(href_list["medrecord"])
if(hasHUD(usr,"medical"))
@@ -1024,7 +1028,7 @@
read = 1
if(!read)
to_chat(usr, "\red Unable to locate a data core entry for this person.")
to_chat(usr, "<span class='warning'>Unable to locate a data core entry for this person.</span>")
if(href_list["medrecordComment"])
if(hasHUD(usr,"medical"))
@@ -1053,7 +1057,7 @@
to_chat(usr, "<a href='?src=[UID()];medrecordadd=`'>\[Add comment\]</a>")
if(!read)
to_chat(usr, "\red Unable to locate a data core entry for this person.")
to_chat(usr, "<span class='warning'>Unable to locate a data core entry for this person.</span>")
if(href_list["medrecordadd"])
if(hasHUD(usr,"medical"))
@@ -1168,7 +1172,7 @@
/mob/living/carbon/human/proc/play_xylophone()
if(!src.xylophone)
visible_message("\red [src] begins playing his ribcage like a xylophone. It's quite spooky.","\blue You begin to play a spooky refrain on your ribcage.","\red You hear a spooky xylophone melody.")
visible_message("<span class='warning'>[src] begins playing his ribcage like a xylophone. It's quite spooky.</span>","<span class='notice'>You begin to play a spooky refrain on your ribcage.</span>","<span class='warning'>You hear a spooky xylophone melody.</span>")
var/song = pick('sound/effects/xylophone1.ogg','sound/effects/xylophone2.ogg','sound/effects/xylophone3.ogg')
playsound(loc, song, 50, 1, -1)
xylophone = 1
@@ -1456,16 +1460,16 @@
if(usr == src)
self = 1
if(!self)
usr.visible_message("\blue [usr] kneels down, puts \his hand on [src]'s wrist and begins counting their pulse.",\
usr.visible_message("<span class='notice'>[usr] kneels down, puts \his hand on [src]'s wrist and begins counting their pulse.</span>",\
"You begin counting [src]'s pulse")
else
usr.visible_message("\blue [usr] begins counting their pulse.",\
usr.visible_message("<span class='notice'>[usr] begins counting their pulse.</span>",\
"You begin counting your pulse.")
if(src.pulse)
to_chat(usr, "\blue [self ? "You have a" : "[src] has a"] pulse! Counting...")
to_chat(usr, "<span class='notice'>[self ? "You have a" : "[src] has a"] pulse! Counting...</span>")
else
to_chat(usr, "\red [src] has no pulse!")//it is REALLY UNLIKELY that a dead person would check his own pulse
to_chat(usr, "<span class='warning'>[src] has no pulse!</span>")//it is REALLY UNLIKELY that a dead person would check his own pulse
return
@@ -1475,7 +1479,7 @@
if(usr.l_move_time >= time) //checks if our mob has moved during the sleep()
to_chat(usr, "You moved while counting. Try again.")
else
to_chat(usr, "\blue [self ? "Your" : "[src]'s"] pulse is [src.get_pulse(GETPULSE_HAND)].")
to_chat(usr, "<span class='notice'>[self ? "Your" : "[src]'s"] pulse is [src.get_pulse(GETPULSE_HAND)].</span>")
/mob/living/carbon/human/proc/set_species(var/new_species, var/default_colour, var/delay_icon_update = 0)
var/datum/species/oldspecies = species
@@ -1765,7 +1769,7 @@
if(status_flags & LEAPING) status_flags &= ~LEAPING
if(!src.Adjacent(T))
to_chat(src, "\red You miss!")
to_chat(src, "<span class='warning'>You miss!</span>")
return
T.Weaken(5)
@@ -1778,7 +1782,7 @@
var/use_hand = "left"
if(l_hand)
if(r_hand)
to_chat(src, "\red You need to have one hand free to grab someone.")
to_chat(src, "<span class='warning'>You need to have one hand free to grab someone.</span>")
return
else
use_hand = "right"
@@ -1804,16 +1808,16 @@
return
if(!canmove)
to_chat(src, "\red You cannot do that in your current state.")
to_chat(src, "<span class='warning'>You cannot do that in your current state.</span>")
return
var/obj/item/weapon/grab/G = locate() in src
if(!G || !istype(G))
to_chat(src, "\red You are not grabbing anyone.")
to_chat(src, "<span class='warning'>You are not grabbing anyone.</span>")
return
if(G.state < GRAB_AGGRESSIVE)
to_chat(src, "\red You must have an aggressive grab to gut your prey!")
to_chat(src, "<span class='warning'>You must have an aggressive grab to gut your prey!</span>")
return
last_special = world.time + 50
@@ -1892,7 +1896,7 @@
//Mindshield implants imply slight trustworthiness
if(isloyal(src))
if(ismindshielded(src))
threatcount -= 1
//Agent cards lower threatlevel.
@@ -4,7 +4,7 @@
return
if(frozen)
to_chat(M, "\red Do not touch Admin-Frozen people.")
to_chat(M, "<span class='warning'>Do not touch Admin-Frozen people.</span>")
return
var/mob/living/carbon/human/H = M
@@ -178,12 +178,12 @@ emp_act
if(!istype(affecting))
return
if(!(affecting.status & ORGAN_ROBOT))
to_chat(user, "\red That limb isn't robotic.")
to_chat(user, "<span class='warning'>That limb isn't robotic.</span>")
return
if(affecting.sabotaged)
to_chat(user, "\red [src]'s [affecting.name] is already sabotaged!")
to_chat(user, "<span class='warning'>[src]'s [affecting.name] is already sabotaged!</span>")
else
to_chat(user, "\red You sneakily slide the card into the dataport on [src]'s [affecting.name] and short out the safeties.")
to_chat(user, "<span class='warning'>You sneakily slide the card into the dataport on [src]'s [affecting.name] and short out the safeties.</span>")
affecting.sabotaged = 1
return 1
@@ -200,7 +200,7 @@ emp_act
src.reagents.trans_to (newmeat, round ((src.reagents.total_volume) / 3, 1))
src.loc.add_blood(src)
--src.meatleft
to_chat(user, "\red You hack off a chunk of meat from [src.name]")
to_chat(user, "<span class='warning'>You hack off a chunk of meat from [src.name]</span>")
if(!src.meatleft)
src.create_attack_log("Was chopped up into meat by <b>[key_name(user)]</b>")
user.create_attack_log("Chopped up <b>[key_name(src)]</b> into meat</b>")
@@ -345,7 +345,7 @@ emp_act
return
var/hit_area = affecting.name
src.visible_message("\red [src] has been hit in the [hit_area] by [I].")
src.visible_message("<span class='warning'>[src] has been hit in the [hit_area] by [I].</span>")
var/armor = run_armor_check(affecting, "melee", "Your armor has protected your [hit_area].", "Your armor has softened hit to your [hit_area].", I.armour_penetration) //I guess "melee" is the best fit here
apply_damage(throw_damage, dtype, zone, armor, is_sharp(I), has_edge(I), I)
@@ -378,7 +378,7 @@ emp_act
var/momentum = speed/2
var/dir = get_dir(I.throw_source, src)
visible_message("\red [src] staggers under the impact!","\red You stagger under the impact!")
visible_message("<span class='warning'>[src] staggers under the impact!</span>","<span class='warning'>You stagger under the impact!</span>")
src.throw_at(get_edge_target_turf(src,dir),1,momentum)
if(!W || !src) return
@@ -1,7 +1,7 @@
var/global/default_martial_art = new/datum/martial_art
/mob/living/carbon/human
hud_possible = list(HEALTH_HUD,STATUS_HUD,ID_HUD,WANTED_HUD,IMPLOYAL_HUD,IMPCHEM_HUD,IMPTRACK_HUD,SPECIALROLE_HUD,NATIONS_HUD)
hud_possible = list(HEALTH_HUD,STATUS_HUD,ID_HUD,WANTED_HUD,IMPMINDSHIELD_HUD,IMPCHEM_HUD,IMPTRACK_HUD,SPECIALROLE_HUD,NATIONS_HUD)
//Marking colour and style
var/list/m_colours = DEFAULT_MARKING_COLOURS //All colours set to #000000.
+2 -1
View File
@@ -1181,7 +1181,8 @@
else
AdjustLoseBreath(2, bound_lower = 0, bound_upper = 3)
adjustOxyLoss(5)
adjustBruteLoss(1)
Paralyse(4)
adjustBruteLoss(2)
@@ -18,7 +18,7 @@
"eyes" = /obj/item/organ/internal/eyes/abductor //3 darksight.
)
flags = HAS_LIPS | NO_BLOOD | NO_BREATHE
flags = HAS_LIPS | NO_BLOOD | NO_BREATHE | NOGUNS
oxy_mod = 0
@@ -27,11 +27,14 @@
dietflags = DIET_OMNI
reagent_tag = PROCESS_ORG
blood_color = "#FF5AFF"
female_scream_sound = 'sound/goonstation/voice/male_scream.ogg'
female_cough_sounds = list('sound/effects/mob_effects/m_cougha.ogg','sound/effects/mob_effects/m_coughb.ogg', 'sound/effects/mob_effects/m_coughc.ogg')
female_sneeze_sound = 'sound/effects/mob_effects/sneeze.ogg' //Abductors always scream like guys
/datum/species/abductor/can_understand(var/mob/other) //Abductors can understand everyone, but they can only speak over their mindlink to another team-member
/datum/species/abductor/can_understand(mob/other) //Abductors can understand everyone, but they can only speak over their mindlink to another team-member
return 1
/datum/species/abductor/handle_post_spawn(var/mob/living/carbon/human/H)
/datum/species/abductor/handle_post_spawn(mob/living/carbon/human/H)
H.gender = NEUTER
if(H.mind)
H.mind.abductor = new /datum/abductor
@@ -122,7 +122,7 @@
/datum/species/nucleation/handle_death(var/mob/living/carbon/human/H)
var/turf/T = get_turf(H)
H.visible_message("\red[H]'s body explodes, leaving behind a pile of microscopic crystals!")
H.visible_message("<span class='warning'>[H]'s body explodes, leaving behind a pile of microscopic crystals!</span>")
explosion(T, 0, 0, 2, 2) // Create a small explosion burst upon death
// new /obj/item/weapon/shard/supermatter( T )
qdel(H)
@@ -210,10 +210,10 @@
return 1 //godmode
if(breath.temperature < cold_level_1)
if(prob(20))
to_chat(src, "\red You feel your face freezing and an icicle forming in your lungs!")
to_chat(src, "<span class='warning'>You feel your face freezing and an icicle forming in your lungs!</span>")
else if(breath.temperature > heat_level_1)
if(prob(20))
to_chat(src, "\red You feel your face burning and a searing heat in your lungs!")
to_chat(src, "<span class='warning'>You feel your face burning and a searing heat in your lungs!</span>")
switch(breath.temperature)
if(-INFINITY to cold_level_3)
@@ -486,8 +486,8 @@
brute_mod = 0.8
flags = IS_WHITELISTED
clothing_flags = HAS_SOCKS
bodyflags = FEET_CLAWS | HAS_HEAD_ACCESSORY
clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS
bodyflags = FEET_CLAWS | HAS_HEAD_ACCESSORY | HAS_HEAD_MARKINGS | HAS_BODY_MARKINGS
eyes = "kidan_eyes_s"
dietflags = DIET_HERB
blood_color = "#FB9800"
@@ -503,7 +503,8 @@
"kidneys" = /obj/item/organ/internal/kidneys,
"brain" = /obj/item/organ/internal/brain,
"appendix" = /obj/item/organ/internal/appendix,
"eyes" = /obj/item/organ/internal/eyes //Default darksight of 2.
"eyes" = /obj/item/organ/internal/eyes, //Default darksight of 2.
"lantern" = /obj/item/organ/internal/lantern
)
allowed_consumed_mobs = list(/mob/living/simple_animal/diona)
@@ -512,8 +513,9 @@
"is attempting to bite their antenna off!",
"is jamming their claws into their eye sockets!",
"is twisting their own neck!",
"is cracking their exoskeleton!",
"is stabbing themselves with their mandibles!",
"is holding their breath!")
/datum/species/slime
name = "Slime People"
name_plural = "Slime People"
@@ -638,7 +638,7 @@ var/global/list/damage_icon_parts = list()
if(w_uniform.flags_size & ONESIZEFITSALL)
standing.icon = 'icons/mob/uniform_fat.dmi'
else
to_chat(src, "\red You burst out of \the [w_uniform]!")
to_chat(src, "<span class='warning'>You burst out of \the [w_uniform]!</span>")
unEquip(w_uniform)
return
else
@@ -957,7 +957,7 @@ var/global/list/damage_icon_parts = list()
if(wear_suit.flags_size & ONESIZEFITSALL)
standing = image("icon" = 'icons/mob/suit_fat.dmi', "icon_state" = "[wear_suit.icon_state]")
else
to_chat(src, "\red You burst out of \the [wear_suit]!")
to_chat(src, "<span class='warning'>You burst out of \the [wear_suit]!</span>")
unEquip(wear_suit)
return
else
@@ -14,7 +14,7 @@
return
if(src.client)
if(client.prefs.muted & MUTE_IC)
to_chat(src, "\red You cannot send IC messages (muted).")
to_chat(src, "<span class='warning'>You cannot send IC messages (muted).</span>")
return
if(src.client.handle_spam_prevention(message,MUTE_IC))
return
@@ -62,7 +62,7 @@
to_chat(src, "Help for slime emotes. You can use these emotes with say \"*emote\":\n\nbounce, custom, jiggle, light, moan, shiver, sway, twitch, vibrate")
else
to_chat(src, "\blue Unusable emote '[act]'. Say *help for a list.")
to_chat(src, "<span class='notice'>Unusable emote '[act]'. Say *help for a list.</span>")
if((message && src.stat == 0))
if(m_type & 1)
for(var/mob/O in viewers(src, null))
@@ -27,7 +27,7 @@
if(met.Victim == M && met != src)
to_chat(src, "<i>The [met.name] is already feeding on this subject...</i>")
return
to_chat(src, "\blue <i>I have latched onto the subject and begun feeding...</i>")
to_chat(src, "<span class='notice'><i>I have latched onto the subject and begun feeding...</i></span>")
to_chat(M, "<span class='danger'>The [src.name] has latched onto your head!</span>")
Feedon(M)
@@ -371,7 +371,7 @@
visible_message("<span class='warning'>[src] has been touched with the stun gloves by [M]!</span>")
return
else
to_chat(M, "\red Not enough charge! ")
to_chat(M, "<span class='warning'>Not enough charge! </span>")
return
*/
+30 -23
View File
@@ -14,15 +14,19 @@
assign_genes(H)
assign_spells(H)
equip(H)
fixflags(H)
assign_id(H)
/datum/superheroes/proc/equip(var/mob/living/carbon/human/H)
H.rename_character(H.real_name, name)
for(var/obj/item/W in H)
if(istype(W,/obj/item/organ)) continue
for(var/obj/item/W in H.get_all_slots())
H.unEquip(W)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset(H), slot_l_ear)
/datum/superheroes/proc/fixflags(var/mob/living/carbon/human/H)
for(var/obj/item/W in H.get_all_slots())
W.flags |= NODROP
/datum/superheroes/proc/assign_genes(var/mob/living/carbon/human/H)
if(default_genes.len)
for(var/gene in default_genes)
@@ -42,14 +46,17 @@
W.registered_name = H.real_name
W.access = list(access_maint_tunnels)
if(class == "Superhero")
W.name = "[H.real_name]'s ID Card (Superhero)"
W.assignment = "Superhero"
W.rank = "Superhero"
ticker.mode.superheroes += H.mind
else if(class == "Supervillain")
W.name = "[H.real_name]'s ID Card (Supervillain)"
W.assignment = "Supervillain"
W.rank = "Supervillain"
ticker.mode.supervillains += H.mind
W.icon_state = "lifetimeid"
W.SetOwnerInfo(H)
W.UpdateName()
W.flags |= NODROP
H.equip_to_slot_or_del(W, slot_wear_id)
H.regenerate_icons()
@@ -66,8 +73,8 @@
..()
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black/greytide(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/under/owl/super_hero(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/toggle/owlwings/super_hero(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/under/owl(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/toggle/owlwings(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/owl_mask/super_hero(H), slot_wear_mask)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/bluespace/owlman(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/glasses/night(H), slot_glasses)
@@ -84,15 +91,13 @@
/datum/superheroes/griffin/equip(var/mob/living/carbon/human/H)
..()
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/griffin/super_hero(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/under/griffin/super_hero(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/toggle/owlwings/griffinwings/super_hero(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/head/griffin/super_hero(H), slot_head)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/griffin(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/under/griffin(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/toggle/owlwings/griffinwings(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/head/griffin/(H), slot_head)
var/obj/item/weapon/implant/freedom/L = new/obj/item/weapon/implant/freedom(H)
L.imp_in = H
L.implanted = 1
return 1
L.implant(H, H)
/datum/superheroes/lightnian
@@ -189,7 +194,7 @@
to_chat(target, "<span class='danger'>You feel yourself agreeing with [user], and a surge of loyalty begins building.</span>")
target.Weaken(12)
sleep(20)
if(isloyal(target))
if(ismindshielded(target))
to_chat(user, "<span class='notice'>They are enslaved by Nanotrasen. You feel their interest in your cause wane and disappear.</span>")
user.visible_message("<span class='danger'>[user] stops talking for a moment, then moves back away from [target].</span>")
to_chat(target, "<span class='danger'>Your mindshield implant activates, protecting you from conversion.</span>")
@@ -217,18 +222,20 @@
target.s_tone = 35
// No `update_dna=0` here because the character is being over-written
target.change_eye_color(1,1,1)
for(var/obj/item/W in target)
if(istype(W,/obj/item/organ)) continue
for(var/obj/item/W in target.get_all_slots())
target.unEquip(W)
target.rename_character(target.real_name, "Generic Henchman ([rand(1, 1000)])")
target.equip_to_slot_or_del(new /obj/item/clothing/under/color/grey/greytide(target), slot_w_uniform)
target.equip_to_slot_or_del(new /obj/item/clothing/shoes/black/greytide(target), slot_shoes)
target.equip_to_slot_or_del(new /obj/item/weapon/storage/toolbox/mechanical/greytide(target), slot_l_hand)
var/obj/item/weapon/card/id/syndicate/W = new(target)
W.registered_name = target.real_name
W.access = list(access_maint_tunnels)
W.name = "[target.real_name]'s ID Card (Greyshirt)"
W.assignment = "Greyshirt"
target.equip_to_slot_or_del(W, slot_wear_id)
target.equip_to_slot_or_del(new /obj/item/device/radio/headset(target), slot_l_ear)
var/obj/item/weapon/card/id/syndicate/W = new(target)
W.icon_state = "lifetimeid"
W.access = list(access_maint_tunnels)
W.assignment = "Greyshirt"
W.rank = "Greyshirt"
W.flags |= NODROP
W.SetOwnerInfo(target)
W.UpdateName()
target.equip_to_slot_or_del(W, slot_wear_id)
target.regenerate_icons()
+1 -1
View File
@@ -471,7 +471,7 @@
var/obj/item/weapon/grab/G = pick(M.grabbed_by)
if(istype(G, /obj/item/weapon/grab))
for(var/mob/O in viewers(M, null))
O.show_message(text("\red [] has been pulled from []'s grip by []", G.affecting, G.assailant, src), 1)
O.show_message(text("<span class='warning'>[] has been pulled from []'s grip by []</span>", G.affecting, G.assailant, src), 1)
//G = null
qdel(G)
else
+2 -2
View File
@@ -81,7 +81,7 @@
var/throw_damage = I.throwforce*(speed/5)
src.visible_message("\red [src] has been hit by [I].")
src.visible_message("<span class='warning'>[src] has been hit by [I].</span>")
var/armor = run_armor_check(zone, "melee", "Your armor has protected your [parse_zone(zone)].", "Your armor has softened hit to your [parse_zone(zone)].", I.armour_penetration)
apply_damage(throw_damage, dtype, zone, armor, is_sharp(I), has_edge(I), I)
@@ -102,7 +102,7 @@
var/momentum = speed/2
var/dir = get_dir(I.throw_source, src)
visible_message("\red [src] staggers under the impact!","\red You stagger under the impact!")
visible_message("<span class='warning'>[src] staggers under the impact!</span>","<span class='warning'>You stagger under the impact!</span>")
src.throw_at(get_edge_target_turf(src,dir),1,momentum)
if(!W || !src) return
@@ -56,4 +56,6 @@
var/obj/effect/proc_holder/ranged_ability //Any ranged ability the mob has, as a click override
var/tesla_ignore = FALSE
var/list/say_log = list() //a log of what we've said, plain text, no spans or junk, essentially just each individual "message"
+1 -1
View File
@@ -331,7 +331,7 @@ proc/get_radio_key_from_channel(var/channel)
else //everything else failed, emote is probably invalid
if(act == "help") return //except help, because help is handled individually
to_chat(src, "\blue Unusable emote '[act]'. Say *help for a list.")
to_chat(src, "<span class='notice'>Unusable emote '[act]'. Say *help for a list.</span>")
/mob/living/whisper(message as text)
message = trim_strip_html_properly(message)
+60 -23
View File
@@ -246,7 +246,7 @@ var/list/ai_verbs_default = list(
ai_list -= src
shuttle_caller_list -= src
shuttle_master.autoEvac()
qdel(eyeobj) // No AI, no Eye
QDEL_NULL(eyeobj) // No AI, no Eye
malfhack = null
return ..()
@@ -299,22 +299,59 @@ var/list/ai_verbs_default = list(
for(var/i = 1 to Entry.len)
Entry[i] = trim(Entry[i])
if(Entry.len < 2)
if(Entry.len < 2 || Entry[1] != "ai") //ignore incorrectly formatted entries or entries that aren't marked for AI
continue
if(Entry.len < 3 && Entry[1] == ckey && Entry[2] == real_name)
custom_sprite = 1 //They're in the list? Custom sprite time
icon = 'icons/mob/custom-synthetic.dmi'
if(Entry[2] == ckey) //They're in the list? Custom sprite time, var and icon change required
custom_sprite = 1
var/display_choices = list(
"Monochrome",
"Blue",
"Clown",
"Inverted",
"Text",
"Smiley",
"Angry",
"Dorf",
"Matrix",
"Bliss",
"Firewall",
"Green",
"Red",
"Static",
"Triumvirate",
"Triumvirate Static",
"Red October",
"Sparkles",
"ANIMA",
"President",
"NT",
"NT2",
"Rainbow",
"Angel",
"Heartline",
"Hades",
"Helios",
"Syndicat Meow",
"Too Deep",
"Goon",
"Murica",
"Fuzzy",
"Glitchman",
"House",
"Database"
)
if(custom_sprite)
display_choices += "Custom"
//if(icon_state == initial(icon_state))
var/icontype = ""
if(custom_sprite == 1)
icontype = ("Custom")//automagically selects custom sprite if one is available
else
icontype = input("Select an icon!", "AI", null, null) in list("Monochrome", "Blue", "Clown", "Inverted", "Text", "Smiley", "Angry", "Dorf", "Matrix", "Bliss", "Firewall", "Green", "Red", "Static", "Triumvirate", "Triumvirate Static", "Red October", "Sparkles", "ANIMA", "President", "NT", "NT2", "Rainbow", "Angel", "Heartline", "Hades", "Helios", "Syndicat Meow", "Too Deep", "Goon", "Murica", "Fuzzy", "Glitchman", "House", "Database")
icontype = input("Select an icon!", "AI", null, null) in display_choices
icon = 'icons/mob/AI.dmi' //reset this in case we were on a custom sprite and want to change to a standard one
switch(icontype)
if("Custom")
icon = 'icons/mob/custom_synthetic/custom-synthetic.dmi' //set this here so we can use the custom_sprite
icon_state = "[ckey]-ai"
if("Clown")
icon_state = "ai-clown"
@@ -800,7 +837,7 @@ var/list/ai_verbs_default = list(
if(network in C.network)
U.eyeobj.setLoc(get_turf(C))
break
to_chat(src, "\blue Switched to [network] camera network.")
to_chat(src, "<span class='notice'>Switched to [network] camera network.</span>")
//End of code by Mord_Sith
@@ -859,10 +896,10 @@ var/list/ai_verbs_default = list(
for(var/i = 1 to Entry.len)
Entry[i] = trim(Entry[i])
if(Entry.len < 3)
if(Entry.len < 2 || Entry[1] != "hologram")
continue
if (Entry[1] == ckey && Entry[2] == real_name && Entry[3] == "Hologram") //Custom holograms
if (Entry[2] == ckey) //Custom holograms
custom_hologram = 1 // option is given in hologram menu
var/input
@@ -971,10 +1008,10 @@ var/list/ai_verbs_default = list(
if("ancient machine")
holo_icon = getHologramIcon(icon('icons/mob/ancient_machine.dmi', "ancient_machine"))
if("custom")
if("[ckey]-ai-holo" in icon_states('icons/mob/custom-synthetic.dmi'))
holo_icon = getHologramIcon(icon('icons/mob/custom-synthetic.dmi', "[ckey]-ai-holo"))
else if("[ckey]-ai-holo" in icon_states('icons/mob/custom-synthetic64.dmi'))
holo_icon = getHologramIcon(icon('icons/mob/custom-synthetic64.dmi', "[ckey]-ai-holo"))
if("[ckey]-ai-holo" in icon_states('icons/mob/custom_synthetic/custom-synthetic.dmi'))
holo_icon = getHologramIcon(icon('icons/mob/custom_synthetic/custom-synthetic.dmi', "[ckey]-ai-holo"))
else if("[ckey]-ai-holo" in icon_states('icons/mob/custom_synthetic/custom-synthetic64.dmi'))
holo_icon = getHologramIcon(icon('icons/mob/custom_synthetic/custom-synthetic64.dmi', "[ckey]-ai-holo"))
else
holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holo1"))
@@ -986,7 +1023,7 @@ var/list/ai_verbs_default = list(
var/obj/machinery/power/apc/apc = loc
if(!istype(apc))
to_chat(src, "\blue You are already in your Main Core.")
to_chat(src, "<span class='notice'>You are already in your Main Core.</span>")
return
apc.malfvacate()
@@ -1061,19 +1098,19 @@ var/list/ai_verbs_default = list(
/mob/living/silicon/ai/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/weapon/wrench))
if(anchored)
user.visible_message("\blue \The [user] starts to unbolt \the [src] from the plating...")
user.visible_message("<span class='notice'>\The [user] starts to unbolt \the [src] from the plating...</span>")
if(!do_after(user, 40 * W.toolspeed, target = src))
user.visible_message("\blue \The [user] decides not to unbolt \the [src].")
user.visible_message("<span class='notice'>\The [user] decides not to unbolt \the [src].</span>")
return
user.visible_message("\blue \The [user] finishes unfastening \the [src]!")
user.visible_message("<span class='notice'>\The [user] finishes unfastening \the [src]!</span>")
anchored = 0
return
else
user.visible_message("\blue \The [user] starts to bolt \the [src] to the plating...")
user.visible_message("<span class='notice'>\The [user] starts to bolt \the [src] to the plating...</span>")
if(!do_after(user, 40 * W.toolspeed, target = src))
user.visible_message("\blue \The [user] decides not to bolt \the [src].")
user.visible_message("<span class='notice'>\The [user] decides not to bolt \the [src].</span>")
return
user.visible_message("\blue \The [user] finishes fastening down \the [src]!")
user.visible_message("<span class='notice'>\The [user] finishes fastening down \the [src]!</span>")
anchored = 1
return
else
+17 -63
View File
@@ -26,97 +26,51 @@
switch(act)
if("ping","pings")
var/M = null
if(param)
for(var/mob/A in view(null, null))
if(param == A.name)
M = A
break
if(!M)
param = null
var/M = handle_emote_param(param)
if(param)
message = "<B>[src]</B> pings at [param]."
else
message = "<B>[src]</B> pings."
message = "<B>[src]</B> pings[M ? " at [M]" : ""]."
playsound(src.loc, 'sound/machines/ping.ogg', 50, 0)
m_type = 2
if("buzz","buzzs","buzzes")
var/M = null
if(param)
for(var/mob/A in view(null, null))
if(param == A.name)
M = A
break
if(!M)
param = null
var/M = handle_emote_param(param)
if(param)
message = "<B>[src]</B> buzzes at [param]."
else
message = "<B>[src]</B> buzzes."
message = "<B>[src]</B> buzzes[M ? " at [M]" : ""]."
playsound(src.loc, 'sound/machines/buzz-sigh.ogg', 50, 0)
m_type = 2
if("beep","beeps")
var/M = null
if(param)
for(var/mob/A in view(null, null))
if(param == A.name)
M = A
break
if(!M)
param = null
var/M = handle_emote_param(param)
if(param)
message = "<B>[src]</B> beeps at [param]."
else
message = "<B>[src]</B> beeps."
message = "<B>[src]</B> beeps[M ? " at [M]" : ""]."
playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 0)
m_type = 2
if("yes")
var/M = null
if(param)
for(var/mob/A in view(null, null))
if(param == A.name)
M = A
break
if(!M)
param = null
var/M = handle_emote_param(param)
if(param)
message = "<B>[src]</B> emits an affirmative blip at [param]."
else
message = "<B>[src]</B> emits an affirmative blip."
message = "<B>[src]</B> emits an affirmative blip[M ? " at [M]" : ""]."
playsound(src.loc, 'sound/machines/synth_yes.ogg', 50, 0)
m_type = 2
if("no")
var/M = null
if(param)
for(var/mob/A in view(null, null))
if(param == A.name)
M = A
break
if(!M)
param = null
var/M = handle_emote_param(param)
if(param)
message = "<B>[src]</B> emits a negative blip at [param]."
else
message = "<B>[src]</B> emits a negative blip."
message = "<B>[src]</B> emits a negative blip[M ? " at [M]" : ""]."
playsound(src.loc, 'sound/machines/synth_no.ogg', 50, 0)
m_type = 2
if("scream", "screams")
message = "<B>[src]</B> screams!"
var/M = handle_emote_param(param)
message = "<B>[src]</B> screams[M ? " at [M]" : ""]!"
playsound(src.loc, 'sound/goonstation/voice/robot_scream.ogg', 80, 0)
m_type = 2
if("buzz2")
message = "<B>[src]</B> emits an irritated buzzing sound."
var/M = handle_emote_param(param)
message = "<B>[src]</B> emits an irritated buzzing sound[M ? " at [M]" : ""]."
playsound(src.loc, 'sound/machines/buzz-two.ogg', 50, 0)
m_type = 2
@@ -124,4 +78,4 @@
if("help")
to_chat(src, "yes, no, beep, ping, buzz, scream, buzz2")
..(act, m_type, message)
..(act, m_type, message)
+1 -1
View File
@@ -14,7 +14,7 @@
if(get_dist(src, cable) > 1)
var/turf/T = get_turf_or_move(loc)
for(var/mob/M in viewers(T))
M.show_message("\red The data cable rapidly retracts back into its spool.", 3, "\red You hear a click and the sound of wire spooling rapidly.", 2)
M.show_message("<span class='warning'>The data cable rapidly retracts back into its spool.</span>", 3, "<span class='warning'>You hear a click and the sound of wire spooling rapidly.</span>", 2)
qdel(src.cable)
cable = null
+50 -11
View File
@@ -81,6 +81,7 @@
var/translator_on = 0 // keeps track of the translator module
var/current_pda_messaging = null
var/custom_sprite = 0
/mob/living/silicon/pai/New(var/obj/item/device/paicard)
loc = paicard
@@ -172,7 +173,7 @@
if(prob(20))
var/turf/T = get_turf_or_move(loc)
for(var/mob/M in viewers(T))
M.show_message("\red A shower of sparks spray from [src]'s inner workings.", 3, "\red You hear and smell the ozone hiss of electrical sparks being expelled violently.", 2)
M.show_message("<span class='warning'>A shower of sparks spray from [src]'s inner workings.</span>", 3, "<span class='warning'>You hear and smell the ozone hiss of electrical sparks being expelled violently.</span>", 2)
return death(0)
switch(pick(1,2,3))
@@ -241,7 +242,7 @@
if(I_HELP)
for(var/mob/O in viewers(src, null))
if((O.client && !( O.blinded )))
O.show_message(text("\blue [M] caresses [src]'s casing with its scythe like arm."), 1)
O.show_message(text("<span class='notice'>[M] caresses [src]'s casing with its scythe like arm.</span>"), 1)
else //harm
M.do_attack_animation(src)
@@ -319,7 +320,7 @@
cameralist[C.network] = C.network
network = input(usr, "Which network would you like to view?") as null|anything in cameralist
to_chat(src, "\blue Switched to [network] camera network.")
to_chat(src, "<span class='notice'>Switched to [network] camera network.</span>")
//End of code by Mord_Sith
*/
@@ -394,17 +395,47 @@
set category = "pAI Commands"
set name = "Choose Chassis"
var/list/my_choices = list()
var/choice
var/finalized = "No"
//check for custom_sprite
if(!custom_sprite)
var/file = file2text("config/custom_sprites.txt")
var/lines = splittext(file, "\n")
for(var/line in lines)
// split & clean up
var/list/Entry = splittext(line, ":")
for(var/i = 1 to Entry.len)
Entry[i] = trim(Entry[i])
if(Entry.len < 2 || Entry[1] != "pai") //ignore incorrectly formatted entries or entries that aren't marked for pAI
continue
if(Entry[2] == ckey) //They're in the list? Custom sprite time, var and icon change required
custom_sprite = 1
my_choices["Custom"] = "[ckey]-pai"
my_choices = possible_chassis.Copy()
if(custom_sprite)
my_choices["Custom"] = "[ckey]-pai"
if(loc == card) //don't let them continue in card form, since they won't be able to actually see their new mobile form sprite.
to_chat(src, "<span class='warning'>You must be in your mobile form to reconfigure your chassis.</span>")
return
while(finalized == "No" && client)
choice = input(usr,"What would you like to use for your mobile chassis icon? This decision can only be made once.") as null|anything in possible_chassis
choice = input(usr,"What would you like to use for your mobile chassis icon? This decision can only be made once.") as null|anything in my_choices
if(!choice) return
icon_state = possible_chassis[choice]
if(choice == "Custom")
icon = 'icons/mob/custom_synthetic/custom-synthetic.dmi'
else
icon = 'icons/mob/pai.dmi'
icon_state = my_choices[choice]
finalized = alert("Look at your sprite. Is this what you wish to use?",,"No","Yes")
chassis = possible_chassis[choice]
chassis = my_choices[choice]
verbs -= /mob/living/silicon/pai/proc/choose_chassis
/mob/living/silicon/pai/proc/choose_verbs()
@@ -562,15 +593,23 @@
// Handle being picked up.
/mob/living/silicon/pai/get_scooped(var/mob/living/carbon/grabber)
/mob/living/silicon/pai/get_scooped(mob/living/carbon/grabber)
var/obj/item/weapon/holder/H = ..()
if(!istype(H))
return
if(resting)
icon_state = "[chassis]"
resting = 0
H.icon_state = "pai-[icon_state]"
H.item_state = "pai-[icon_state]"
if(custom_sprite)
H.icon = 'icons/mob/custom_synthetic/custom-synthetic.dmi'
H.icon_override = 'icons/mob/custom_synthetic/custom_head.dmi'
H.lefthand_file = 'icons/mob/custom_synthetic/custom_lefthand.dmi'
H.righthand_file = 'icons/mob/custom_synthetic/custom_righthand.dmi'
H.icon_state = "[icon_state]"
H.item_state = "[icon_state]_hand"
else
H.icon_state = "pai-[icon_state]"
H.item_state = "pai-[icon_state]"
grabber.put_in_active_hand(H)//for some reason unless i call this it dosen't work
grabber.update_inv_l_hand()
grabber.update_inv_r_hand()
@@ -115,7 +115,7 @@
/mob/living/silicon/robot/drone/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/borg/upgrade/))
to_chat(user, "\red The maintenance drone chassis not compatible with \the [W].")
to_chat(user, "<span class='warning'>The maintenance drone chassis not compatible with \the [W].</span>")
return
else if(istype(W, /obj/item/weapon/crowbar))
@@ -127,20 +127,20 @@
if(stat == 2)
if(!config.allow_drone_spawn || emagged || health < -35) //It's dead, Dave.
to_chat(user, "\red The interface is fried, and a distressing burned smell wafts from the robot's interior. You're not rebooting this one.")
to_chat(user, "<span class='warning'>The interface is fried, and a distressing burned smell wafts from the robot's interior. You're not rebooting this one.</span>")
return
if(!allowed(usr))
to_chat(user, "\red Access denied.")
to_chat(user, "<span class='warning'>Access denied.</span>")
return
var/delta = (world.time / 10) - last_reboot
if(reboot_cooldown > delta)
var/cooldown_time = round(reboot_cooldown - ((world.time / 10) - last_reboot), 1)
to_chat(usr, "\red The reboot system is currently offline. Please wait another [cooldown_time] seconds.")
to_chat(usr, "<span class='warning'>The reboot system is currently offline. Please wait another [cooldown_time] seconds.</span>")
return
user.visible_message("\red \the [user] swipes \his ID card through \the [src], attempting to reboot it.", "\red You swipe your ID card through \the [src], attempting to reboot it.")
user.visible_message("<span class='warning'>\the [user] swipes \his ID card through \the [src], attempting to reboot it.</span>", "<span class='warning'>You swipe your ID card through \the [src], attempting to reboot it.</span>")
last_reboot = world.time / 10
var/drones = 0
for(var/mob/living/silicon/robot/drone/D in world)
@@ -151,7 +151,7 @@
return
else
user.visible_message("\red \the [user] swipes \his ID card through \the [src], attempting to shut it down.", "\red You swipe your ID card through \the [src], attempting to shut it down.")
user.visible_message("<span class='warning'>\the [user] swipes \his ID card through \the [src], attempting to shut it down.</span>", "<span class='warning'>You swipe your ID card through \the [src], attempting to shut it down.</span>")
if(emagged)
return
@@ -159,7 +159,7 @@
if(allowed(usr))
shut_down()
else
to_chat(user, "\red Access denied.")
to_chat(user, "<span class='warning'>Access denied.</span>")
return
@@ -167,7 +167,7 @@
/mob/living/silicon/robot/drone/emag_act(user as mob)
if(!client || stat == 2)
to_chat(user, "\red There's not much point subverting this heap of junk.")
to_chat(user, "<span class='warning'>There's not much point subverting this heap of junk.</span>")
return
if(!ishuman(user))
@@ -175,12 +175,12 @@
var/mob/living/carbon/human/H = user
if(emagged)
to_chat(src, "\red [user] attempts to load subversive software into you, but your hacked subroutined ignore the attempt.")
to_chat(user, "\red You attempt to subvert [src], but the sequencer has no effect.")
to_chat(src, "<span class='warning'>[user] attempts to load subversive software into you, but your hacked subroutined ignore the attempt.</span>")
to_chat(user, "<span class='warning'>You attempt to subvert [src], but the sequencer has no effect.</span>")
return
to_chat(user, "\red You swipe the sequencer across [src]'s interface and watch its eyes flicker.")
to_chat(src, "\red You feel a sudden burst of malware loaded into your execute-as-root buffer. Your tiny brain methodically parses, loads and executes the script.")
to_chat(user, "<span class='warning'>You swipe the sequencer across [src]'s interface and watch its eyes flicker.</span>")
to_chat(src, "<span class='warning'>You feel a sudden burst of malware loaded into your execute-as-root buffer. Your tiny brain methodically parses, loads and executes the script.</span>")
message_admins("[key_name_admin(user)] emagged drone [key_name_admin(src)]. Laws overridden.")
log_game("[key_name(user)] emagged drone [key_name(src)]. Laws overridden.")
@@ -197,7 +197,7 @@
to_chat(src, "<b>Obey these laws:</b>")
laws.show_laws(src)
to_chat(src, "\red \b ALERT: [H.real_name] is your new master. Obey your new laws and his commands.")
to_chat(src, "<span class='boldwarning'>ALERT: [H.real_name] is your new master. Obey your new laws and his commands.</span>")
return
//DRONE LIFE/DEATH
@@ -236,18 +236,18 @@
/mob/living/silicon/robot/drone/proc/law_resync()
if(stat != 2)
if(emagged)
to_chat(src, "\red You feel something attempting to modify your programming, but your hacked subroutines are unaffected.")
to_chat(src, "<span class='warning'>You feel something attempting to modify your programming, but your hacked subroutines are unaffected.</span>")
else
to_chat(src, "\red A reset-to-factory directive packet filters through your data connection, and you obediently modify your programming to suit it.")
to_chat(src, "<span class='warning'>A reset-to-factory directive packet filters through your data connection, and you obediently modify your programming to suit it.</span>")
full_law_reset()
show_laws()
/mob/living/silicon/robot/drone/proc/shut_down()
if(stat != 2)
if(emagged)
to_chat(src, "\red You feel a system kill order percolate through your tiny brain, but it doesn't seem like a good idea to you.")
to_chat(src, "<span class='warning'>You feel a system kill order percolate through your tiny brain, but it doesn't seem like a good idea to you.</span>")
else
to_chat(src, "\red You feel a system kill order percolate through your tiny brain, and you obediently destroy yourself.")
to_chat(src, "<span class='warning'>You feel a system kill order percolate through your tiny brain, and you obediently destroy yourself.</span>")
death()
/mob/living/silicon/robot/drone/proc/full_law_reset()
@@ -281,7 +281,7 @@
if(!player) return
src.ckey = player.ckey
ckey = player.ckey
if(player.mob && player.mob.mind)
player.mob.mind.transfer_to(src)
@@ -10,13 +10,13 @@
mail_destination = 0
return
to_chat(src, "\blue You configure your internal beacon, tagging yourself for delivery to '[tag]'.")
to_chat(src, "<span class='notice'>You configure your internal beacon, tagging yourself for delivery to '[tag]'.</span>")
mail_destination = TAGGERLOCATIONS.Find(tag)
//Auto flush if we use this verb inside a disposal chute.
var/obj/machinery/disposal/D = src.loc
if(istype(D))
to_chat(src, "\blue \The [D] acknowledges your signal.")
to_chat(src, "<span class='notice'>\The [D] acknowledges your signal.</span>")
D.flush_count = D.flush_every_ticks
return
@@ -28,10 +28,10 @@
if(layer != TURF_LAYER+0.2)
layer = TURF_LAYER+0.2
to_chat(src, text("\blue You are now hiding."))
to_chat(src, text("<span class='notice'>You are now hiding.</span>"))
else
layer = MOB_LAYER
to_chat(src, text("\blue You have stopped hiding."))
to_chat(src, text("<span class='notice'>You have stopped hiding.</span>"))
/mob/living/silicon/robot/drone/verb/light()
set name = "Light On/Off"
@@ -47,4 +47,55 @@
if(M.a_intent == I_HELP)
get_scooped(M)
..()
..()
/mob/living/silicon/robot/drone/verb/customize()
set name = "Customize Chassis"
set desc = "Reconfigure your chassis into a customized version."
set category = "Drone"
if(!custom_sprite) //Check to see if custom sprite time, checking the appopriate file to change a var
var/file = file2text("config/custom_sprites.txt")
var/lines = splittext(file, "\n")
for(var/line in lines)
// split & clean up
var/list/Entry = splittext(line, ":")
for(var/i = 1 to Entry.len)
Entry[i] = trim(Entry[i])
if(Entry.len < 2 || Entry[1] != "drone")
continue
if (Entry[2] == ckey) //Custom holograms
custom_sprite = 1 // option is given in hologram menu
if(!custom_sprite)
to_chat(src, "<span class='warning'>Error 404: Custom chassis not found. Revoking customization option.</span>")
else
icon = 'icons/mob/custom_synthetic/custom-synthetic.dmi'
icon_state = "[ckey]-drone"
to_chat(src, "<span class='notice'>You reconfigure your chassis and improve the station through your new aesthetics.</span>")
verbs -= /mob/living/silicon/robot/drone/verb/customize
/mob/living/silicon/robot/drone/get_scooped(mob/living/carbon/grabber)
var/obj/item/weapon/holder/H = ..()
if(!istype(H))
return
if(resting)
resting = 0
if(custom_sprite)
H.icon = 'icons/mob/custom_synthetic/custom-synthetic.dmi'
H.icon_override = 'icons/mob/custom_synthetic/custom_head.dmi'
H.lefthand_file = 'icons/mob/custom_synthetic/custom_lefthand.dmi'
H.righthand_file = 'icons/mob/custom_synthetic/custom_righthand.dmi'
H.icon_state = "[icon_state]"
H.item_state = "[icon_state]_hand"
else
H.icon_state = "drone"
H.item_state = "drone"
grabber.put_in_active_hand(H)//for some reason unless i call this it dosen't work
grabber.update_inv_l_hand()
grabber.update_inv_r_hand()
return H
@@ -20,7 +20,7 @@
return
if(!allowed(user))
to_chat(user, "\red Access denied.")
to_chat(user, "<span class='warning'>Access denied.</span>")
return
interact(user)
@@ -54,7 +54,7 @@
return
if(!allowed(usr))
to_chat(usr, "\red Access denied.")
to_chat(usr, "<span class='warning'>Access denied.</span>")
return
if((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
@@ -69,11 +69,11 @@
return
drone_call_area = t_area
to_chat(usr, "\blue You set the area selector to [drone_call_area].")
to_chat(usr, "<span class='notice'>You set the area selector to [drone_call_area].</span>")
else if(href_list["ping"])
to_chat(usr, "\blue You issue a maintenance request for all active drones, highlighting [drone_call_area].")
to_chat(usr, "<span class='notice'>You issue a maintenance request for all active drones, highlighting [drone_call_area].</span>")
for(var/mob/living/silicon/robot/drone/D in world)
if(D.client && D.stat == 0)
to_chat(D, "-- Maintenance drone presence requested in: [drone_call_area].")
@@ -83,7 +83,7 @@
var/mob/living/silicon/robot/drone/D = locate(href_list["resync"])
if(D.stat != 2)
to_chat(usr, "\red You issue a law synchronization directive for the drone.")
to_chat(usr, "<span class='warning'>You issue a law synchronization directive for the drone.</span>")
D.law_resync()
else if(href_list["shutdown"])
@@ -91,7 +91,7 @@
var/mob/living/silicon/robot/drone/D = locate(href_list["shutdown"])
if(D.stat != 2)
to_chat(usr, "\red You issue a kill command for the unfortunate drone.")
to_chat(usr, "<span class='warning'>You issue a kill command for the unfortunate drone.</span>")
message_admins("[key_name_admin(usr)] issued kill order for drone [key_name_admin(D)] from control console.")
log_game("[key_name(usr)] issued kill order for [key_name(src)] from control console.")
D.shut_down()
@@ -106,10 +106,10 @@
continue
dronefab = fab
to_chat(usr, "\blue Drone fabricator located.")
to_chat(usr, "<span class='notice'>Drone fabricator located.</span>")
return
to_chat(usr, "\red Unable to locate drone fabricator.")
to_chat(usr, "<span class='warning'>Unable to locate drone fabricator.</span>")
else if(href_list["toggle_fab"])
@@ -118,10 +118,10 @@
if(get_dist(src,dronefab) > 3)
dronefab = null
to_chat(usr, "\red Unable to locate drone fabricator.")
to_chat(usr, "<span class='warning'>Unable to locate drone fabricator.</span>")
return
dronefab.produce_drones = !dronefab.produce_drones
to_chat(usr, "\blue You [dronefab.produce_drones ? "enable" : "disable"] drone production in the nearby fabricator.")
to_chat(usr, "<span class='notice'>You [dronefab.produce_drones ? "enable" : "disable"] drone production in the nearby fabricator.</span>")
src.updateUsrDialog()
@@ -85,7 +85,7 @@
set desc = "If there is a powered, enabled fabricator in the game world with a prepared chassis, join as a maintenance drone."
if(!(config.allow_drone_spawn))
to_chat(src, "\red That verb is not currently permitted.")
to_chat(src, "<span class='warning'>That verb is not currently permitted.</span>")
return
if(!src.stat)
@@ -95,7 +95,7 @@
return 0 //something is terribly wrong
if(jobban_isbanned(src,"nonhumandept") || jobban_isbanned(src,"Drone"))
to_chat(usr, "\red You are banned from playing drones and cannot spawn as a drone.")
to_chat(usr, "<span class='warning'>You are banned from playing drones and cannot spawn as a drone.</span>")
return
if(!ticker || ticker.current_state < 3)
@@ -141,11 +141,11 @@
continue
if(DF.count_drones() >= config.max_maint_drones)
to_chat(src, "\red There are too many active drones in the world for you to spawn.")
to_chat(src, "<span class='warning'>There are too many active drones in the world for you to spawn.</span>")
return
if(DF.drone_progress >= 100)
DF.create_drone(src.client)
return
to_chat(src, "\red There are no available drone spawn points, sorry.")
to_chat(src, "<span class='warning'>There are no available drone spawn points, sorry.</span>")
@@ -229,7 +229,7 @@
weaponlock_time --
if(weaponlock_time <= 0)
if(src.client)
to_chat(src, "\red <B>Weapon Lock Timed Out!")
to_chat(src, "<span class='warning'><B>Weapon Lock Timed Out!</span>")
weapon_lock = 0
weaponlock_time = 120
+28 -32
View File
@@ -180,16 +180,15 @@ var/list/robot_verbs_default = list(
for(var/line in lines)
// split & clean up
var/list/Entry = splittext(line, ";")
var/list/Entry = splittext(line, ":")
for(var/i = 1 to Entry.len)
Entry[i] = trim(Entry[i])
if(Entry.len < 2)
continue;
if(Entry.len < 2 || Entry[1] != "cyborg") //ignore incorrectly formatted entries or entries that aren't marked for cyborg
continue
if(Entry[1] == src.ckey && Entry[2] == src.real_name) //They're in the list? Custom sprite time, var and icon change required
if(Entry[2] == ckey) //They're in the list? Custom sprite time, var and icon change required
custom_sprite = 1
icon = 'icons/mob/custom-synthetic.dmi'
return 1
@@ -252,12 +251,10 @@ var/list/robot_verbs_default = list(
mmi = null
if(connected_ai)
connected_ai.connected_robots -= src
qdel(wires)
wires = null
qdel(module)
module = null
camera = null
cell = null
QDEL_NULL(wires)
QDEL_NULL(module)
QDEL_NULL(camera)
QDEL_NULL(cell)
return ..()
/mob/living/silicon/robot/proc/pick_module()
@@ -265,7 +262,7 @@ var/list/robot_verbs_default = list(
return
var/list/modules = list("Standard", "Engineering", "Medical", "Miner", "Janitor", "Service", "Security")
if(security_level == (SEC_LEVEL_GAMMA || SEC_LEVEL_EPSILON) || crisis)
to_chat(src, "\red Crisis mode active. Combat module available.")
to_chat(src, "<span class='warning'>Crisis mode active. Combat module available.</span>")
modules+="Combat"
if(ticker && ticker.mode && ticker.mode.name == "nations")
var/datum/game_mode/nations/N = ticker.mode
@@ -429,7 +426,7 @@ var/list/robot_verbs_default = list(
set name = "Self Diagnosis"
if(!is_component_functioning("diagnosis unit"))
to_chat(src, "\red Your self-diagnosis component isn't functioning.")
to_chat(src, "<span class='warning'>Your self-diagnosis component isn't functioning.</span>")
var/dat = self_diagnosis()
src << browse(dat, "window=robotdiagnosis")
@@ -454,10 +451,10 @@ var/list/robot_verbs_default = list(
var/datum/robot_component/C = components[toggle]
if(C.toggled)
C.toggled = 0
to_chat(src, "\red You disable [C.name].")
to_chat(src, "<span class='warning'>You disable [C.name].</span>")
else
C.toggled = 1
to_chat(src, "\red You enable [C.name].")
to_chat(src, "<span class='warning'>You enable [C.name].</span>")
/mob/living/silicon/robot/proc/sensor_mode()
set name = "Set Sensor Augmentation"
@@ -604,7 +601,7 @@ var/list/robot_verbs_default = list(
C.brute_damage = WC.brute
C.electronics_damage = WC.burn
to_chat(usr, "\blue You install the [W.name].")
to_chat(usr, "<span class='notice'>You install the [W.name].</span>")
return
@@ -805,22 +802,22 @@ var/list/robot_verbs_default = list(
var/time = time2text(world.realtime,"hh:mm:ss")
lawchanges.Add("[time] <B>:</B> [M.name]([M.key]) emagged [name]([key])")
set_zeroth_law("Only [M.real_name] and people he designates as being such are Syndicate Agents.")
to_chat(src, "\red ALERT: Foreign software detected.")
to_chat(src, "<span class='warning'>ALERT: Foreign software detected.</span>")
sleep(5)
to_chat(src, "\red Initiating diagnostics...")
to_chat(src, "<span class='warning'>Initiating diagnostics...</span>")
sleep(20)
to_chat(src, "\red SynBorg v1.7 loaded.")
to_chat(src, "<span class='warning'>SynBorg v1.7 loaded.</span>")
sleep(5)
to_chat(src, "\red LAW SYNCHRONISATION ERROR")
to_chat(src, "<span class='warning'>LAW SYNCHRONISATION ERROR</span>")
sleep(5)
to_chat(src, "\red Would you like to send a report to NanoTraSoft? Y/N")
to_chat(src, "<span class='warning'>Would you like to send a report to NanoTraSoft? Y/N</span>")
sleep(10)
to_chat(src, "\red > N")
to_chat(src, "<span class='warning'>> N</span>")
sleep(20)
to_chat(src, "\red ERRORERRORERROR")
to_chat(src, "<span class='warning'>ERRORERRORERROR</span>")
to_chat(src, "<b>Obey these laws:</b>")
laws.show_laws(src)
to_chat(src, "\red \b ALERT: [M.real_name] is your new master. Obey your new laws and his commands.")
to_chat(src, "<span class='boldwarning'>ALERT: [M.real_name] is your new master. Obey your new laws and his commands.</span>")
SetLockdown(0)
if(src.module && istype(src.module, /obj/item/weapon/robot_module/miner))
for(var/obj/item/weapon/pickaxe/drill/cyborg/D in src.module.modules)
@@ -1013,7 +1010,7 @@ var/list/robot_verbs_default = list(
/mob/living/silicon/robot/proc/installed_modules()
if(weapon_lock)
to_chat(src, "\red Weapon lock active, unable to use modules! Count:[weaponlock_time]")
to_chat(src, "<span class='warning'>Weapon lock active, unable to use modules! Count:[weaponlock_time]</span>")
return
if(!module)
@@ -1252,15 +1249,14 @@ var/list/robot_verbs_default = list(
triesleft--
var/icontype
if(custom_sprite == 1)
icontype = "Custom"
triesleft = 0
else
lockcharge = 1 //Locks borg until it select an icon to avoid secborgs running around with a standard sprite
icontype = input("Select an icon! [triesleft ? "You have [triesleft] more chances." : "This is your last try."]", "Robot", null, null) in module_sprites
lockcharge = 1 //Locks borg until it select an icon to avoid secborgs running around with a standard sprite
icontype = input("Select an icon! [triesleft ? "You have [triesleft] more chances." : "This is your last try."]", "Robot", null, null) in module_sprites
if(icontype)
if(icontype == "Custom")
icon = 'icons/mob/custom_synthetic/custom-synthetic.dmi'
else
icon = 'icons/mob/robots.dmi'
icon_state = module_sprites[icontype]
if(icontype == "Bro")
module.module_type = "Brobot"
@@ -90,11 +90,11 @@
cell.charge -= cost
if(cell.charge <= 0)
cell.charge = 0
to_chat(src, "\red Your shield has overloaded!")
to_chat(src, "<span class='warning'>Your shield has overloaded!</span>")
else
brute -= absorb_brute
burn -= absorb_burn
to_chat(src, "\red Your shield absorbs some of the impact!")
to_chat(src, "<span class='warning'>Your shield absorbs some of the impact!</span>")
var/datum/robot_component/armour/A = get_armour()
if(A)
@@ -141,11 +141,11 @@
cell.charge -= cost
if(cell.charge <= 0)
cell.charge = 0
to_chat(src, "\red Your shield has overloaded!")
to_chat(src, "<span class='warning'>Your shield has overloaded!</span>")
else
brute -= absorb_brute
burn -= absorb_burn
to_chat(src, "\red Your shield absorbs some of the impact!")
to_chat(src, "<span class='warning'>Your shield absorbs some of the impact!</span>")
var/datum/robot_component/armour/A = get_armour()
if(A)
@@ -65,7 +65,7 @@
deploy_paper(get_turf(src))
/obj/item/weapon/form_printer/proc/deploy_paper(var/turf/T)
T.visible_message("\blue \The [src.loc] dispenses a sheet of crisp white paper.")
T.visible_message("<span class='notice'>\The [src.loc] dispenses a sheet of crisp white paper.</span>")
new /obj/item/weapon/paper(T)
@@ -35,8 +35,7 @@
for(var/module in modules)
qdel(module)
modules.Cut()
qdel(emag)
emag = null
QDEL_NULL(emag)
return ..()
/obj/item/weapon/robot_module/proc/fix_modules()
@@ -222,7 +221,7 @@
/obj/item/weapon/robot_module/security/New()
..()
modules += new /obj/item/weapon/restraints/handcuffs/cable/zipties/cyborg(src)
modules += new /obj/item/weapon/melee/baton/loaded/robot(src)
modules += new /obj/item/weapon/melee/baton/loaded(src)
modules += new /obj/item/weapon/gun/energy/disabler/cyborg(src)
modules += new /obj/item/taperoll/police(src)
modules += new /obj/item/clothing/mask/gas/sechailer/cyborg(src)
+5 -11
View File
@@ -75,7 +75,7 @@
Stun(3)
flash_eyes(affect_silicon = 1)
to_chat(src, "<span class='danger'>*BZZZT*</span>")
to_chat(src, "\red Warning: Electromagnetic pulse detected.")
to_chat(src, "<span class='warning'>Warning: Electromagnetic pulse detected.</span>")
..()
@@ -167,15 +167,11 @@
if(L.name == rem_language)
speech_synthesizer_langs -= L
/mob/living/silicon/check_languages()
set name = "Check Known Languages"
set category = "IC"
set src = usr
var/dat = "<b><font size = 5>Known Languages</font></b><br/><br/>"
/mob/living/silicon/check_lang_data()
. = ""
if(default_language)
dat += "Current default language: [default_language] - <a href='byond://?src=[UID()];default_lang=reset'>reset</a><br/><br/>"
. += "Current default language: [default_language] - <a href='byond://?src=[UID()];default_lang=reset'>reset</a><br><br>"
for(var/datum/language/L in languages)
if(!(L.flags & NONGLOBAL))
@@ -186,10 +182,8 @@
default_str = " - <a href='byond://?src=[UID()];default_lang=[L]'>set default</a>"
var/synth = (L in speech_synthesizer_langs)
dat += "<b>[L.name] (:[L.key])</b>[synth ? default_str : null]<br/>Speech Synthesizer: <i>[synth ? "YES" : "NOT SUPPORTED"]</i><br/>[L.desc]<br/><br/>"
. += "<b>[L.name] (:[L.key])</b>[synth ? default_str : null]<br>Speech Synthesizer: <i>[synth ? "YES" : "NOT SUPPORTED"]</i><br>[L.desc]<br><br>"
src << browse(dat, "window=checklanguage")
return
// this function displays the stations manifest in a separate window
/mob/living/silicon/proc/show_station_manifest()
@@ -169,14 +169,11 @@
/mob/living/simple_animal/bot/Destroy()
if(paicard)
ejectpai()
qdel(Radio)
Radio = null
qdel(access_card)
access_card = null
QDEL_NULL(Radio)
QDEL_NULL(access_card)
if(radio_controller && bot_filter)
radio_controller.remove_object(bot_core, control_freq)
qdel(bot_core)
bot_core = null
QDEL_NULL(bot_core)
return ..()
/mob/living/simple_animal/bot/death(gibbed)
@@ -263,7 +260,7 @@
interact(H)
else
return ..()
/mob/living/simple_animal/bot/attack_ghost(mob/M)
interact(M)
@@ -28,92 +28,44 @@
switch(act)
if("ping")
var/M = null
if(param)
for(var/mob/A in view(null, null))
if(param == A.name)
M = A
break
if(!M)
param = null
var/M = handle_emote_param(param)
if(param)
message = "<B>[src]</B> pings at [param]."
else
message = "<B>[src]</B> pings."
message = "<B>[src]</B> pings[M ? " at [M]" : ""]."
playsound(src.loc, 'sound/machines/ping.ogg', 50, 0)
m_type = 2
if("buzz")
var/M = null
if(param)
for(var/mob/A in view(null, null))
if(param == A.name)
M = A
break
if(!M)
param = null
var/M = handle_emote_param(param)
if(param)
message = "<B>[src]</B> buzzes at [param]."
else
message = "<B>[src]</B> buzzes."
message = "<B>[src]</B> buzzes[M ? " at [M]" : ""]."
playsound(src.loc, 'sound/machines/buzz-sigh.ogg', 50, 0)
m_type = 2
if("beep")
var/M = null
if(param)
for(var/mob/A in view(null, null))
if(param == A.name)
M = A
break
if(!M)
param = null
var/M = handle_emote_param(param)
if(param)
message = "<B>[src]</B> beeps at [param]."
else
message = "<B>[src]</B> beeps."
message = "<B>[src]</B> beeps[M ? " at [M]" : ""]."
playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 0)
m_type = 2
if("yes")
var/M = null
if(param)
for(var/mob/A in view(null, null))
if(param == A.name)
M = A
break
if(!M)
param = null
var/M = handle_emote_param(param)
if(param)
message = "<B>[src]</B> emits an affirmative blip at [param]."
else
message = "<B>[src]</B> emits an affirmative blip."
message = "<B>[src]</B> emits an affirmative blip[M ? " at [M]" : ""]."
playsound(src.loc, 'sound/machines/synth_yes.ogg', 50, 0)
m_type = 2
if("no")
var/M = null
if(param)
for(var/mob/A in view(null, null))
if(param == A.name)
M = A
break
if(!M)
param = null
var/M = handle_emote_param(param)
if(param)
message = "<B>[src]</B> emits a negative blip at [param]."
else
message = "<B>[src]</B> emits a negative blip."
message = "<B>[src]</B> emits an negative blip[M ? " at [M]" : ""]."
playsound(src.loc, 'sound/machines/synth_no.ogg', 50, 0)
m_type = 2
if("scream", "screams")
message = "<B>[src]</B> screams!"
var/M = handle_emote_param(param)
message = "<B>[src]</B> screams[M ? " at [M]" : ""]!"
playsound(src.loc, 'sound/goonstation/voice/robot_scream.ogg', 80, 0)
m_type = 2
@@ -65,12 +65,8 @@
/mob/living/simple_animal/bot/mulebot/Destroy()
unload(0)
if(wires)
qdel(wires)
wires = null
if(cell)
qdel(cell)
cell = null
QDEL_NULL(wires)
QDEL_NULL(cell)
return ..()
/mob/living/simple_animal/bot/mulebot/proc/set_suffix(suffix)
@@ -303,11 +303,13 @@
melee_damage_upper = 5
attacktext = "prods"
speed = 0
environment_smash = 1
environment_smash = 3
see_in_dark = 8
attack_sound = 'sound/weapons/tap.ogg'
const_type = "harvester"
construct_spells = list(/obj/effect/proc_holder/spell/targeted/smoke/disable)
construct_spells = list(/obj/effect/proc_holder/spell/aoe_turf/conjure/wall,
/obj/effect/proc_holder/spell/aoe_turf/conjure/floor,
/obj/effect/proc_holder/spell/targeted/smoke/disable)
retreat_distance = 2 //AI harvesters will move in and out of combat, like wraiths, but shittier
playstyle_string = "<B>You are a Harvester. You are not strong, but your powers of domination will assist you in your role: \
Bring those who still cling to this world of illusion back to the master so they may know Truth.</B>"
@@ -319,7 +321,7 @@
/mob/living/simple_animal/hostile/construct/harvester/hostile //actually hostile, will move around, hit things
AIStatus = AI_ON
environment_smash = 1 //only token destruction, don't smash the cult wall NO STOP
////////////////Glow////////////////////
/mob/living/simple_animal/hostile/construct/proc/updateglow()
@@ -572,7 +572,7 @@
//Lisa already has a cute bow!
/mob/living/simple_animal/pet/corgi/Lisa/Topic(href, href_list)
if(href_list["remove_inv"] || href_list["add_inv"])
to_chat(usr, "\red [src] already has a cute bow!")
to_chat(usr, "<span class='warning'>[src] already has a cute bow!</span>")
return
..()
@@ -628,7 +628,7 @@
/mob/living/simple_animal/pet/corgi/Ian/borgi/proc/explode()
for(var/mob/M in viewers(src, null))
if(M.client)
M.show_message("\red [src] makes an odd whining noise.")
M.show_message("<span class='warning'>[src] makes an odd whining noise.</span>")
sleep(10)
explosion(get_turf(src), 0, 1, 4, 7)
death()
@@ -52,7 +52,7 @@
/*/mob/living/simple_animal/crab/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
if(istype(O, /obj/item/weapon/wirecutters))
if(prob(50))
to_chat(user, "\red \b This kills the crab.")
to_chat(user, "<span class='boldwarning'>This kills the crab.</span>")
health -= 20
death()
else
@@ -69,20 +69,20 @@
qdel(MED)
for(var/mob/M in viewers(src, null))
if((M.client && !( M.blinded )))
M.show_message("\blue [user] applies the [MED] on [src]")
M.show_message("<span class='notice'>[user] applies the [MED] on [src]</span>")
else
to_chat(user, "\blue this [src] is dead, medical items won't bring it back to life.")
to_chat(user, "<span class='notice'>this [src] is dead, medical items won't bring it back to life.</span>")
else
if(O.force)
health -= O.force
for(var/mob/M in viewers(src, null))
if((M.client && !( M.blinded )))
M.show_message("\red \b [src] has been attacked with the [O] by [user]. ")
M.show_message("<span class='boldwarning'>[src] has been attacked with the [O] by [user]. </span>")
else
to_chat(usr, "\red This weapon is ineffective, it does no damage.")
to_chat(usr, "<span class='warning'>This weapon is ineffective, it does no damage.</span>")
for(var/mob/M in viewers(src, null))
if((M.client && !( M.blinded )))
M.show_message("\red [user] gently taps [src] with the [O]. ")
M.show_message("<span class='warning'>[user] gently taps [src] with the [O]. </span>")
/mob/living/simple_animal/crab/Topic(href, href_list)
if(usr.stat) return
@@ -105,14 +105,14 @@
inventory_head.loc = src.loc
inventory_head = null
else
to_chat(usr, "\red There is nothing to remove from its [remove_from].")
to_chat(usr, "<span class='warning'>There is nothing to remove from its [remove_from].</span>")
return
if("mask")
if(inventory_mask)
inventory_mask.loc = src.loc
inventory_mask = null
else
to_chat(usr, "\red There is nothing to remove from its [remove_from].")
to_chat(usr, "<span class='warning'>There is nothing to remove from its [remove_from].</span>")
return
//show_inv(usr) //Commented out because changing Ian's name and then calling up his inventory opens a new inventory...which is annoying.
@@ -123,12 +123,12 @@
return
var/add_to = href_list["add_inv"]
if(!usr.get_active_hand())
to_chat(usr, "\red You have nothing in your hand to put on its [add_to].")
to_chat(usr, "<span class='warning'>You have nothing in your hand to put on its [add_to].</span>")
return
switch(add_to)
if("head")
if(inventory_head)
to_chat(usr, "\red It's is already wearing something.")
to_chat(usr, "<span class='warning'>It's is already wearing something.</span>")
return
else
var/obj/item/item_to_add = usr.get_active_hand()
@@ -170,7 +170,7 @@
)
if( ! ( item_to_add.type in allowed_types ) )
to_chat(usr, "\red It doesn't seem too keen on wearing that item.")
to_chat(usr, "<span class='warning'>It doesn't seem too keen on wearing that item.</span>")
return
usr.drop_item()
@@ -233,7 +233,7 @@
if("mask")
if(inventory_mask)
to_chat(usr, "\red It's already wearing something.")
to_chat(usr, "<span class='warning'>It's already wearing something.</span>")
return
else
var/obj/item/item_to_add = usr.get_active_hand()
@@ -249,7 +249,7 @@
)
if( ! ( item_to_add.type in allowed_types ) )
to_chat(usr, "\red This object won't fit.")
to_chat(usr, "<span class='warning'>This object won't fit.</span>")
return
usr.drop_item()
@@ -45,7 +45,7 @@
if(enemies.len && prob(10))
enemies = list()
LoseTarget()
src.visible_message("\blue [src] calms down.")
src.visible_message("<span class='notice'>[src] calms down.</span>")
var/obj/structure/spacevine/SV = locate(/obj/structure/spacevine) in loc
if(SV)
@@ -59,7 +59,7 @@
/mob/living/simple_animal/hostile/retaliate/goat/Retaliate()
..()
src.visible_message("\red [src] gets an evil-looking gleam in their eye.")
src.visible_message("<span class='warning'>[src] gets an evil-looking gleam in their eye.</span>")
/mob/living/simple_animal/hostile/retaliate/goat/Move()
..()
@@ -78,9 +78,9 @@
G.reagents.add_reagent("milk", transfered)
milk_content -= transfered
else if(G.reagents.total_volume >= G.volume)
to_chat(user, "\red \The [O] is full.")
to_chat(user, "<span class='warning'>\The [O] is full.</span>")
else
to_chat(user, "\red The udder is dry. Wait a bit longer...")
to_chat(user, "<span class='warning'>The udder is dry. Wait a bit longer...</span>")
else
..()
@@ -124,9 +124,9 @@
G.reagents.add_reagent("milk", transfered)
milk_content -= transfered
else if(G.reagents.total_volume >= G.volume)
to_chat(user, "\red \The [O] is full.")
to_chat(user, "<span class='warning'>\The [O] is full.</span>")
else
to_chat(user, "\red The udder is dry. Wait a bit longer...")
to_chat(user, "<span class='warning'>The udder is dry. Wait a bit longer...</span>")
else
..()
@@ -112,7 +112,7 @@
if( ishuman(AM) )
if(!stat)
var/mob/M = AM
to_chat(M, "\blue [bicon(src)] Squeek!")
to_chat(M, "<span class='notice'>[bicon(src)] Squeek!</span>")
M << 'sound/effects/mousesqueek.ogg'
..()
@@ -0,0 +1,31 @@
/mob/living/simple_animal/pet/sloth
name = "sloth"
desc = "An adorable, sleepy creature."
icon = 'icons/mob/pets.dmi'
icon_state = "sloth"
icon_living = "sloth"
icon_dead = "sloth_dead"
gender = MALE
speak = list("Ahhhh")
speak_emote = list("yawns")
emote_hear = list("snores.","yawns.")
emote_see = list("dozes off.", "looks around sleepily.")
speak_chance = 1
turns_per_move = 5
butcher_results = list(/obj/item/weapon/reagent_containers/food/snacks/meat = 3)
response_help = "pets"
response_disarm = "gently pushes aside"
response_harm = "kicks"
gold_core_spawnable = CHEM_MOB_SPAWN_FRIENDLY
melee_damage_lower = 18
melee_damage_upper = 18
health = 50
maxHealth = 50
speed = 1
//Cargo Sloth
/mob/living/simple_animal/pet/sloth/paperwork
name = "Paperwork"
desc = "Cargo's pet sloth. About as useful as the rest of the techs."
gold_core_spawnable = CHEM_MOB_SPAWN_INVALID
@@ -48,10 +48,10 @@
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.
to_chat(user, "\red There's already a brain in [src]!")
to_chat(user, "<span class='warning'>There's already a brain in [src]!</span>")
return
if(!B.brainmob)
to_chat(user, "\red Sticking an empty MMI into the frame would sort of defeat the purpose.")
to_chat(user, "<span class='warning'>Sticking an empty MMI into the frame would sort of defeat the purpose.</span>")
return
if(!B.brainmob.key)
var/ghost_can_reenter = 0
@@ -69,14 +69,14 @@
return
if(B.brainmob.stat == DEAD)
to_chat(user, "\red [O] is dead. Sticking it into the frame would sort of defeat the purpose.")
to_chat(user, "<span class='warning'>[O] is dead. Sticking it into the frame would sort of defeat the purpose.</span>")
return
if(jobban_isbanned(B.brainmob, "Cyborg") || jobban_isbanned(B.brainmob,"nonhumandept"))
to_chat(user, "\red [O] does not seem to fit.")
to_chat(user, "<span class='warning'>[O] does not seem to fit.</span>")
return
to_chat(user, "\blue You install [O] in [src]!")
to_chat(user, "<span class='notice'>You install [O] in [src]!</span>")
user.drop_item()
src.mmi = O
@@ -95,15 +95,15 @@
health = maxHealth
add_fingerprint(user)
for(var/mob/W in viewers(user, null))
W.show_message(text("\red [user] has spot-welded some of the damage to [src]!"), 1)
W.show_message(text("<span class='warning'>[user] has spot-welded some of the damage to [src]!</span>"), 1)
else
to_chat(user, "\blue [src] is undamaged!")
to_chat(user, "<span class='notice'>[src] is undamaged!</span>")
else
to_chat(user, "Need more welding fuel!")
return
else if(istype(O, /obj/item/weapon/card/id)||istype(O, /obj/item/device/pda))
if(!mmi)
to_chat(user, "\red There's no reason to swipe your ID - the spiderbot has no brain to remove.")
to_chat(user, "<span class='warning'>There's no reason to swipe your ID - the spiderbot has no brain to remove.</span>")
return 0
var/obj/item/weapon/card/id/id_card
@@ -115,7 +115,7 @@
id_card = pda.id
if(access_robotics in id_card.access)
to_chat(user, "\blue You swipe your access card and pop the brain out of [src].")
to_chat(user, "<span class='notice'>You swipe your access card and pop the brain out of [src].</span>")
eject_brain()
if(held_item)
@@ -124,7 +124,7 @@
return 1
else
to_chat(user, "\red You swipe your card, with no effect.")
to_chat(user, "<span class='warning'>You swipe your card, with no effect.</span>")
return 0
else
@@ -135,24 +135,24 @@
adjustBruteLoss(damage)
for(var/mob/M in viewers(src, null))
if((M.client && !( M.blinded )))
M.show_message("\red \b [src] has been attacked with the [O] by [user]. ")
M.show_message("<span class='boldwarning'>[src] has been attacked with the [O] by [user]. </span>")
else
to_chat(usr, "\red This weapon is ineffective, it does no damage.")
to_chat(usr, "<span class='warning'>This weapon is ineffective, it does no damage.</span>")
for(var/mob/M in viewers(src, null))
if((M.client && !( M.blinded )))
M.show_message("\red [user] gently taps [src] with the [O]. ")
M.show_message("<span class='warning'>[user] gently taps [src] with the [O]. </span>")
/mob/living/simple_animal/spiderbot/emag_act(user as mob)
if(emagged)
to_chat(user, "\red [src] is already overloaded - better run.")
to_chat(user, "<span class='warning'>[src] is already overloaded - better run.</span>")
return 0
else
emagged = 1
to_chat(user, "\blue You short out the security protocols and overload [src]'s cell, priming it to explode in a short time.")
to_chat(user, "<span class='notice'>You short out the security protocols and overload [src]'s cell, priming it to explode in a short time.</span>")
spawn(100)
to_chat(src, "\red Your cell seems to be outputting a lot of power...")
to_chat(src, "<span class='warning'>Your cell seems to be outputting a lot of power...</span>")
spawn(200)
to_chat(src, "\red Internal heat sensors are spiking! Something is badly wrong with your cell!")
to_chat(src, "<span class='warning'>Internal heat sensors are spiking! Something is badly wrong with your cell!</span>")
spawn(300)
src.explode()
@@ -166,7 +166,7 @@
/mob/living/simple_animal/spiderbot/proc/explode() //When emagged.
for(var/mob/M in viewers(src, null))
if((M.client && !( M.blinded )))
M.show_message("\red [src] makes an odd warbling noise, fizzles, and explodes.")
M.show_message("<span class='warning'>[src] makes an odd warbling noise, fizzles, and explodes.</span>")
explosion(get_turf(loc), -1, -1, 3, 5)
eject_brain()
death()
@@ -227,18 +227,18 @@
return
if(!held_item)
to_chat(usr, "\red You have nothing to drop!")
to_chat(usr, "<span class='warning'>You have nothing to drop!</span>")
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("<span class='warning'>[src] launches \the [held_item]!</span>", "<span class='warning'>You launch \the [held_item]!</span>", "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("<span class='notice'>[src] drops \the [held_item]!</span>", "<span class='notice'>You drop \the [held_item]!</span>", "You hear a skittering noise and a soft thump.")
held_item.loc = src.loc
held_item = null
@@ -255,7 +255,7 @@
return -1
if(held_item)
to_chat(src, "\red You are already holding \the [held_item]")
to_chat(src, "<span class='warning'>You are already holding \the [held_item]</span>")
return 1
var/list/items = list()
@@ -270,12 +270,12 @@
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("<span class='notice'>[src] scoops up \the [held_item]!</span>", "<span class='notice'>You grab \the [held_item]!</span>", "You hear a skittering noise and a clink.")
return held_item
to_chat(src, "\red \The [selection] is too far away.")
to_chat(src, "<span class='warning'>\The [selection] is too far away.</span>")
return 0
to_chat(src, "\red There is nothing of interest to take.")
to_chat(src, "<span class='warning'>There is nothing of interest to take.</span>")
return 0
/mob/living/simple_animal/spiderbot/examine(mob/user)
@@ -295,8 +295,7 @@
queen = new(src)
/obj/item/queen_bee/Destroy()
qdel(queen)
queen = null
QDEL_NULL(queen)
return ..()
@@ -83,7 +83,7 @@
/mob/living/simple_animal/hostile/hivebot/tele/warpbots()
icon_state = "def_radar"
visible_message("\red The [src] turns on!")
visible_message("<span class='warning'>The [src] turns on!</span>")
while(bot_amt > 0)
bot_amt--
switch(bot_type)
@@ -108,7 +108,7 @@ Difficulty: Hard
..()
/mob/living/simple_animal/hostile/megafauna/hierophant/Destroy()
qdel(spawned_rune)
QDEL_NULL(spawned_rune)
. = ..()
/mob/living/simple_animal/hostile/megafauna/hierophant/devour(mob/living/L)
@@ -43,7 +43,7 @@
mouse_opacity = 2 // Easier to click on in melee, they're giant targets anyway
/mob/living/simple_animal/hostile/megafauna/Destroy()
qdel(internal_gps)
QDEL_NULL(internal_gps)
. = ..()
/mob/living/simple_animal/hostile/megafauna/death(gibbed)
@@ -77,7 +77,7 @@
OpenFire()
else
devour(L)
/mob/living/simple_animal/hostile/megafauna/onShuttleMove()
var/turf/oldloc = loc
. = ..()
@@ -79,7 +79,7 @@
//repair a bit of damage
if(prob(1))
src.visible_message("\red [bicon(src)] [src] shudders and shakes as some of it's damaged systems come back online.")
src.visible_message("<span class='warning'>[bicon(src)] [src] shudders and shakes as some of it's damaged systems come back online.</span>")
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
@@ -94,10 +94,10 @@
//sometimes our targetting sensors malfunction, and we attack anyone nearby
if(prob(disabled ? 0 : 1))
if(hostile_drone)
src.visible_message("\blue [bicon(src)] [src] retracts several targetting vanes, and dulls it's running lights.")
src.visible_message("<span class='notice'>[bicon(src)] [src] retracts several targetting vanes, and dulls it's running lights.</span>")
hostile_drone = 0
else
src.visible_message("\red [bicon(src)] [src] suddenly lights up, and additional targetting vanes slide into place.")
src.visible_message("<span class='warning'>[bicon(src)] [src] suddenly lights up, and additional targetting vanes slide into place.</span>")
hostile_drone = 1
if(health / maxHealth > 0.9)
@@ -118,17 +118,17 @@
exploding = 0
if(!disabled)
if(prob(50))
src.visible_message("\blue [bicon(src)] [src] suddenly shuts down!")
src.visible_message("<span class='notice'>[bicon(src)] [src] suddenly shuts down!</span>")
else
src.visible_message("\blue [bicon(src)] [src] suddenly lies still and quiet.")
src.visible_message("<span class='notice'>[bicon(src)] [src] suddenly lies still and quiet.</span>")
disabled = rand(150, 600)
walk(src,0)
if(exploding && prob(20))
if(prob(50))
src.visible_message("\red [bicon(src)] [src] begins to spark and shake violenty!")
src.visible_message("<span class='warning'>[bicon(src)] [src] begins to spark and shake violenty!</span>")
else
src.visible_message("\red [bicon(src)] [src] sparks and shakes like it's about to explode!")
src.visible_message("<span class='warning'>[bicon(src)] [src] sparks and shakes like it's about to explode!</span>")
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
@@ -46,13 +46,13 @@
if(O.damtype == STAMINA)
damage = 0
health -= damage
visible_message("\red \b [src] has been attacked with the [O] by [user]. ")
visible_message("<span class='boldwarning'>[src] has been attacked with the [O] by [user]. </span>")
else
visible_message("\red \b [src] blocks the [O] with its shield! ")
visible_message("<span class='boldwarning'>[src] blocks the [O] with its shield! </span>")
playsound(loc, O.hitsound, 25, 1, -1)
else
to_chat(usr, "\red This weapon is ineffective, it does no damage.")
visible_message("\red [user] gently taps [src] with the [O]. ")
to_chat(usr, "<span class='warning'>This weapon is ineffective, it does no damage.</span>")
visible_message("<span class='warning'>[user] gently taps [src] with the [O]. </span>")
/mob/living/simple_animal/hostile/syndicate/melee/bullet_act(var/obj/item/projectile/Proj)
@@ -406,7 +406,7 @@
if(!parrot_perch || parrot_interest.loc != parrot_perch.loc)
held_item = parrot_interest
parrot_interest.loc = src
visible_message("[src] grabs the [held_item]!", "\blue You grab the [held_item]!", "You hear the sounds of wings flapping furiously.")
visible_message("[src] grabs the [held_item]!", "<span class='notice'>You grab the [held_item]!</span>", "You hear the sounds of wings flapping furiously.")
parrot_interest = null
parrot_state = PARROT_SWOOP | PARROT_RETURN
@@ -8,13 +8,13 @@
if(layer != TURF_LAYER+0.2)
layer = TURF_LAYER+0.2
to_chat(src, text("\green You are now hiding."))
to_chat(src, text("<span class=notice'>You are now hiding.</span>"))
for(var/mob/O in oviewers(src, null))
if((O.client && !( O.blinded )))
to_chat(O, text("<B>[] scurries to the ground!</B>", src))
else
layer = MOB_LAYER
to_chat(src, text("\green You have stopped hiding."))
to_chat(src, text("<span class=notice'>You have stopped hiding.</span>"))
for(var/mob/O in oviewers(src, null))
if((O.client && !( O.blinded )))
to_chat(O, text("[] slowly peaks up from the ground...", src))
@@ -40,12 +40,12 @@
health -= damage
for(var/mob/M in viewers(src, null))
if((M.client && !( M.blinded )))
M.show_message("\red \b [src] has been attacked with the [O] by [user]. ")
M.show_message("<span class='boldwarning'>[src] has been attacked with the [O] by [user]. </span>")
else
to_chat(usr, "\red This weapon is ineffective, it does no damage.")
to_chat(usr, "<span class='warning'>This weapon is ineffective, it does no damage.</span>")
for(var/mob/M in viewers(src, null))
if((M.client && !( M.blinded )))
M.show_message("\red [user] gently taps [src] with the [O]. ")
M.show_message("<span class='warning'>[user] gently taps [src] with the [O]. </span>")
return
/mob/living/simple_animal/shade/sword
@@ -96,6 +96,7 @@
if(collar)
collar.forceMove(loc)
collar = null
master_commander = null
simple_animal_list -= src
return ..()
@@ -303,7 +304,7 @@
/mob/living/simple_animal/proc/attacked_by(obj/item/I, mob/living/user) // Handled in _onclick/click.dm
return
/mob/living/simple_animal/bullet_act(var/obj/item/projectile/Proj)
if(!Proj)
return
@@ -662,15 +663,15 @@
. = ..()
/mob/living/simple_animal/can_equip(obj/item/I, slot, disable_warning = 0)
// . = ..() // Do not call parent. We do not want animals using their hand slots.
switch(slot)
if(slot_collar)
if(collar)
return 0
if(!can_collar)
return 0
if(!istype(I, /obj/item/clothing/accessory/petcollar))
return 0
// . = ..() // Do not call parent. We do not want animals using their hand slots.
switch(slot)
if(slot_collar)
if(collar)
return 0
if(!can_collar)
return 0
if(!istype(I, /obj/item/clothing/accessory/petcollar))
return 0
return 1
/mob/living/simple_animal/equip_to_slot(obj/item/W, slot)
@@ -692,13 +693,13 @@
name = collar.tagname
real_name = collar.tagname
regenerate_icons()
/mob/living/simple_animal/unEquip(obj/item/I, force)
. = ..()
if(!. || !I)
return
if(I == collar)
/mob/living/simple_animal/unEquip(obj/item/I, force)
. = ..()
if(!. || !I)
return
if(I == collar)
collar = null
regenerate_icons()
@@ -195,10 +195,10 @@ var/global/totaltribbles = 0 //global variable so it updates for all tribbles,
if(src.destroyed)
return
else
to_chat(usr, text("\blue You kick the lab cage."))
to_chat(usr, text("<span class='notice'>You kick the lab cage.</span>"))
for(var/mob/O in oviewers())
if((O.client && !( O.blinded )))
to_chat(O, text("\red [] kicks the lab cage.", usr))
to_chat(O, text("<span class='warning'>[] kicks the lab cage.</span>", usr))
src.health -= 2
healthcheck()
return
+15 -16
View File
@@ -47,14 +47,14 @@
var/datum/gas_mixture/environment = loc.return_air()
var/t = "\blue Coordinates: [x],[y] \n"
t+= "\red Temperature: [environment.temperature] \n"
t+= "\blue Nitrogen: [environment.nitrogen] \n"
t+= "\blue Oxygen: [environment.oxygen] \n"
t+= "\blue Plasma : [environment.toxins] \n"
t+= "\blue Carbon Dioxide: [environment.carbon_dioxide] \n"
var/t = "<span class='notice'>Coordinates: [x],[y] \n</span>"
t+= "<span class='warning'>Temperature: [environment.temperature] \n</span>"
t+= "<span class='notice'>Nitrogen: [environment.nitrogen] \n</span>"
t+= "<span class='notice'>Oxygen: [environment.oxygen] \n</span>"
t+= "<span class='notice'>Plasma : [environment.toxins] \n</span>"
t+= "<span class='notice'>Carbon Dioxide: [environment.carbon_dioxide] \n</span>"
for(var/datum/gas/trace_gas in environment.trace_gases)
to_chat(usr, "\blue [trace_gas.type]: [trace_gas.moles] \n")
to_chat(usr, "<span class='notice'>[trace_gas.type]: [trace_gas.moles] \n</span>")
usr.show_message(t, 1)
@@ -172,8 +172,7 @@
if(istype(W, /obj/item/clothing))
var/obj/item/clothing/C = W
if(C.hardsuit_restrict_helmet)
to_chat(src, "\red You must fasten the helmet to a hardsuit first. (Target the head and use on a hardsuit)")// Stop eva helms equipping.
to_chat(src, "<span class='warning'>You must fasten the helmet to a hardsuit first. (Target the head and use on a hardsuit)</span>")// Stop eva helms equipping.
else
equip_to_slot_if_possible(C, slot)
else
@@ -208,7 +207,7 @@
qdel(W)
else
if(!disable_warning)
to_chat(src, "\red You are unable to equip that.")//Only print if del_on_fail is false
to_chat(src, "<span class='warning'>You are unable to equip that.</span>")//Only print if del_on_fail is false
return 0
@@ -348,7 +347,7 @@ var/list/slot_equipment_priority = list( \
if(slot_belt)
if(!H.w_uniform)
if(!disable_warning)
to_chat(H, "\red You need a jumpsuit before you can attach this [name].")
to_chat(H, "<span class='warning'>You need a jumpsuit before you can attach this [name].</span>")
return 0
if( !(slot_flags & SLOT_BELT) )
return 0
@@ -408,7 +407,7 @@ var/list/slot_equipment_priority = list( \
if(slot_wear_id)
if(!H.w_uniform)
if(!disable_warning)
to_chat(H, "\red You need a jumpsuit before you can attach this [name].")
to_chat(H, "<span class='warning'>You need a jumpsuit before you can attach this [name].</span>")
return 0
if( !(slot_flags & SLOT_ID) )
return 0
@@ -423,7 +422,7 @@ var/list/slot_equipment_priority = list( \
return 0
if(!H.w_uniform)
if(!disable_warning)
to_chat(H, "\red You need a jumpsuit before you can attach this [name].")
to_chat(H, "<span class='warning'>You need a jumpsuit before you can attach this [name].</span>")
return 0
if(slot_flags & SLOT_DENYPOCKET)
return
@@ -434,7 +433,7 @@ var/list/slot_equipment_priority = list( \
return 0
if(!H.w_uniform)
if(!disable_warning)
to_chat(H, "\red You need a jumpsuit before you can attach this [name].")
to_chat(H, "<span class='warning'>You need a jumpsuit before you can attach this [name].</span>")
return 0
if(slot_flags & SLOT_DENYPOCKET)
return 0
@@ -444,7 +443,7 @@ var/list/slot_equipment_priority = list( \
if(slot_s_store)
if(!H.wear_suit)
if(!disable_warning)
to_chat(H, "\red You need a suit before you can attach this [name].")
to_chat(H, "<span class='warning'>You need a suit before you can attach this [name].</span>")
return 0
if(!H.wear_suit.allowed)
if(!disable_warning)
@@ -748,7 +747,7 @@ var/list/slot_equipment_priority = list( \
if(client.holder && (client.holder.rights & R_ADMIN))
is_admin = 1
else if(stat != DEAD || istype(src, /mob/new_player))
to_chat(usr, "\blue You must be observing to use this!")
to_chat(usr, "<span class='notice'>You must be observing to use this!</span>")
return
if(is_admin && stat == DEAD)
+2 -3
View File
@@ -364,7 +364,7 @@
eyes.damage += rand(3,4)
if(eyes.damage >= eyes.min_broken_damage)
if(M.stat != 2)
to_chat(M, "\red You go blind!")*///This is a demonstration of adding a new damaging type based on intent as well as hitzone.
to_chat(M, "<span class='warning'>You go blind!</span>")*///This is a demonstration of adding a new damaging type based on intent as well as hitzone.
//This specific example would allow you to squish people's eyes with a GRAB_NECK.
@@ -444,8 +444,7 @@
if(assailant.client)
assailant.client.screen -= hud
assailant = null
qdel(hud)
hud = null
QDEL_NULL(hud)
return ..()
+2 -2
View File
@@ -41,8 +41,8 @@
else if(eyes) //If they're not, check to see if their eyes got one of them there colour matrices. Will be null if eyes are robotic/the mob isn't colourblind and they have no default colour matrix.
return eyes.get_colourmatrix()
/proc/isloyal(A) //Checks to see if the person contains a mindshield implant, then checks that the implant is actually inside of them
for(var/obj/item/weapon/implant/loyalty/L in A)
/proc/ismindshielded(A) //Checks to see if the person contains a mindshield implant, then checks that the implant is actually inside of them
for(var/obj/item/weapon/implant/mindshield/L in A)
if(L && L.implanted)
return 1
return 0
+8 -8
View File
@@ -50,12 +50,12 @@
var/mob/living/silicon/robot/R = usr
var/module = R.get_selected_module()
if(!module)
to_chat(usr, "\red You have no module selected.")
to_chat(usr, "<span class='warning'>You have no module selected.</span>")
return
R.cycle_modules()
R.uneq_numbered(module)
else
to_chat(usr, "\red This mob type cannot throw items.")
to_chat(usr, "<span class='warning'>This mob type cannot throw items.</span>")
return
@@ -63,17 +63,17 @@
if(iscarbon(usr))
var/mob/living/carbon/C = usr
if(!C.get_active_hand())
to_chat(usr, "\red You have nothing to drop in your hand.")
to_chat(usr, "<span class='warning'>You have nothing to drop in your hand.</span>")
return
drop_item()
else if(isrobot(usr))
var/mob/living/silicon/robot/R = usr
if(!R.get_selected_module())
to_chat(usr, "\red You have no module selected.")
to_chat(usr, "<span class='warning'>You have no module selected.</span>")
return
R.deselect_module(R.get_selected_module())
else
to_chat(usr, "\red This mob type cannot drop items.")
to_chat(usr, "<span class='warning'>This mob type cannot drop items.</span>")
return
//This gets called when you press the delete button.
@@ -81,7 +81,7 @@
set hidden = 1
if(!usr.pulling)
to_chat(usr, "\blue You are not pulling anything.")
to_chat(usr, "<span class='notice'>You are not pulling anything.</span>")
return
usr.stop_pulling()
@@ -212,13 +212,13 @@
for(var/mob/M in range(mob, 1))
if(M.pulling == mob)
if(!M.restrained() && M.stat == 0 && M.canmove && mob.Adjacent(M))
to_chat(src, "\blue You're restrained! You can't move!")
to_chat(src, "<span class='notice'>You're restrained! You can't move!</span>")
return 0
else
M.stop_pulling()
if(mob.pinned.len)
to_chat(src, "\blue You're pinned to a wall by [mob.pinned[1]]!")
to_chat(src, "<span class='notice'>You're pinned to a wall by [mob.pinned[1]]!</span>")
return 0
var/turf/T = mob.loc
@@ -5,7 +5,7 @@
/mob/proc/change_mob_type(var/new_type = null, var/turf/location = null, var/new_name = null as text, var/delete_old_mob = 0 as num, var/forcekey = 0)
if(istype(src,/mob/new_player))
to_chat(usr, "\red cannot convert players who have not entered yet.")
to_chat(usr, "<span class='warning'>cannot convert players who have not entered yet.</span>")
return
if(!new_type)
@@ -19,7 +19,7 @@
return
if( new_type == /mob/new_player )
to_chat(usr, "\red cannot convert into a new_player mob type.")
to_chat(usr, "<span class='warning'>cannot convert into a new_player mob type.</span>")
return
var/mob/M
+17
View File
@@ -30,6 +30,23 @@
callHook("mob_login", list("client" = client, "mob" = src))
new_player_panel()
spawn(30)
// Annoy the player with polls.
establish_db_connection()
if(dbcon.IsConnected() && client.can_vote())
var/isadmin = 0
if(client && client.holder)
isadmin = 1
var/DBQuery/query = dbcon.NewQuery("SELECT id FROM [format_table_name("poll_question")] WHERE [(isadmin ? "" : "adminonly = false AND")] Now() BETWEEN starttime AND endtime AND id NOT IN (SELECT pollid FROM [format_table_name("poll_vote")] WHERE ckey = \"[ckey]\") AND id NOT IN (SELECT pollid FROM [format_table_name("poll_textreply")] WHERE ckey = \"[ckey]\")")
query.Execute()
var/newpoll = 0
while(query.NextRow())
newpoll = 1
break
if(newpoll)
client.handle_player_polling()
if(ckey in deadmins)
verbs += /client/proc/readmin
spawn(40)
+8 -63
View File
@@ -42,7 +42,7 @@
if(!IsGuestKey(src.key))
establish_db_connection()
if(dbcon.IsConnected())
if(dbcon.IsConnected() && client.can_vote())
var/isadmin = 0
if(src.client && src.client.holder)
isadmin = 1
@@ -54,9 +54,9 @@
break
if(newpoll)
output += "<p><b><a href='byond://?src=[UID()];showpoll=1'>Show Player Polls</A> (NEW!)</b></p>"
output += "<p><b><a href='byond://?showpoll=1'>Show Player Polls</A> (NEW!)</b></p>"
else
output += "<p><a href='byond://?src=[UID()];showpoll=1'>Show Player Polls</A></p>"
output += "<p><a href='byond://?showpoll=1'>Show Player Polls</A></p>"
output += "</center>"
@@ -131,7 +131,7 @@
observer.started_as_observer = 1
close_spawn_windows()
var/obj/O = locate("landmark*Observer-Start")
to_chat(src, "\blue Now teleporting.")
to_chat(src, "<span class='notice'>Now teleporting.</span>")
observer.loc = O.loc
observer.timeofdeath = world.time // Set the time of death so that the respawn timer works correctly.
client.prefs.update_preview_icon(1)
@@ -151,7 +151,7 @@
if(href_list["late_join"])
if(!ticker || ticker.current_state != GAME_STATE_PLAYING)
to_chat(usr, "\red The round is either not ready, or has already finished...")
to_chat(usr, "<span class='warning'>The round is either not ready, or has already finished...</span>")
return
if(client.prefs.species in whitelisted_species)
@@ -168,7 +168,7 @@
if(href_list["SelectedJob"])
if(!enter_allowed)
to_chat(usr, "\blue There is an administrative lock on entering the game!")
to_chat(usr, "<span class='notice'>There is an administrative lock on entering the game!</span>")
return
if(client.prefs.randomslot)
@@ -188,61 +188,6 @@
else if(!href_list["late_join"])
new_player_panel()
if(href_list["showpoll"])
handle_player_polling()
return
if(href_list["pollid"])
var/pollid = href_list["pollid"]
if(istext(pollid))
pollid = text2num(pollid)
if(isnum(pollid))
src.poll_player(pollid)
return
if(href_list["votepollid"] && href_list["votetype"])
var/pollid = text2num(href_list["votepollid"])
var/votetype = href_list["votetype"]
switch(votetype)
if("OPTION")
var/optionid = text2num(href_list["voteoptionid"])
vote_on_poll(pollid, optionid)
if("TEXT")
var/replytext = href_list["replytext"]
log_text_poll_reply(pollid, replytext)
if("NUMVAL")
var/id_min = text2num(href_list["minid"])
var/id_max = text2num(href_list["maxid"])
if( (id_max - id_min) > 100 ) //Basic exploit prevention
to_chat(usr, "The option ID difference is too big. Please contact administration or the database admin.")
return
for(var/optionid = id_min; optionid <= id_max; optionid++)
if(!isnull(href_list["o[optionid]"])) //Test if this optionid was replied to
var/rating
if(href_list["o[optionid]"] == "abstain")
rating = null
else
rating = text2num(href_list["o[optionid]"])
if(!isnum(rating))
return
vote_on_numval_poll(pollid, optionid, rating)
if("MULTICHOICE")
var/id_min = text2num(href_list["minoptionid"])
var/id_max = text2num(href_list["maxoptionid"])
if( (id_max - id_min) > 100 ) //Basic exploit prevention
to_chat(usr, "The option ID difference is too big. Please contact administration or the database admin.")
return
for(var/optionid = id_min; optionid <= id_max; optionid++)
if(!isnull(href_list["option_[optionid]"])) //Test if this optionid was selected
vote_on_poll(pollid, optionid, 1)
/mob/new_player/proc/IsJobAvailable(rank)
var/datum/job/job = job_master.GetJob(rank)
if(!job) return 0
@@ -285,10 +230,10 @@
if(src != usr)
return 0
if(!ticker || ticker.current_state != GAME_STATE_PLAYING)
to_chat(usr, "\red The round is either not ready, or has already finished...")
to_chat(usr, "<span class='warning'>The round is either not ready, or has already finished...</span>")
return 0
if(!enter_allowed)
to_chat(usr, "\blue There is an administrative lock on entering the game!")
to_chat(usr, "<span class='notice'>There is an administrative lock on entering the game!</span>")
return 0
if(!IsJobAvailable(rank))
to_chat(src, alert("[rank] is not available. Please try another."))
+258 -79
View File
@@ -2,45 +2,208 @@
var/optionid
var/optiontext
/mob/new_player/proc/handle_player_polling()
/client/verb/polls_verb()
set name = "Show Player Polls"
set category = "OOC"
handle_player_polling()
/client/proc/can_vote()
return istext(player_age) || player_age >= 30
/client/proc/handle_player_polling()
establish_db_connection()
if(dbcon.IsConnected())
var/isadmin = 0
if(src.client && src.client.holder)
if(holder)
isadmin = 1
var/DBQuery/select_query = dbcon.NewQuery("SELECT id, question FROM [format_table_name("poll_question")] WHERE [(isadmin ? "" : "adminonly = false AND")] Now() BETWEEN starttime AND endtime")
var/DBQuery/select_query = dbcon.NewQuery("SELECT id, question, (id IN (SELECT pollid FROM [format_table_name("poll_vote")] WHERE ckey = '[ckey]') OR id IN (SELECT pollid FROM [format_table_name("poll_textreply")] WHERE ckey = '[ckey]')) AS voted FROM [format_table_name("poll_question")] WHERE [(isadmin ? "" : "adminonly = false AND")] Now() BETWEEN starttime AND endtime")
select_query.Execute()
var/output = "<div align='center'><B>Player polls</B>"
if(check_rights(R_SERVER))
output += "(<a href='?createpollwindow=1'>Create new poll</a>)"
output +="<hr>"
var/pollid
var/pollquestion
output += "<table>"
var/color1 = "#ececec"
var/color2 = "#e2e2e2"
var/i = 0
output += "<tr><th>Active Polls</th></tr>"
while(select_query.NextRow())
pollid = select_query.item[1]
pollquestion = select_query.item[2]
output += "<tr bgcolor='[ (i % 2 == 1) ? color1 : color2 ]'><td><a href=\"byond://?src=[UID()];pollid=[pollid]\"><b>[pollquestion]</b></a></td></tr>"
var/pollid = select_query.item[1]
var/pollquestion = select_query.item[2]
var/voted = text2num(select_query.item[3])
output += "<tr bgcolor='[(i % 2 == 1) ? color1 : color2 ]'><td><a href=\"byond://?pollid=[pollid]\"><b>[pollquestion]</b></a></td></tr>"
if(can_vote() && !voted)
output += "<tr><td>[poll_player(pollid, 1)]</tr></td>"
i++
// Show expired polls. Non admins can view admin polls at this stage
// (just like tgstation's web interface so don't complain)
// (Also why was there no ingame interface tg not having an ingame
// interface is retarded because it cucks downstreams)
select_query = dbcon.NewQuery("SELECT id, question FROM [format_table_name("poll_question")] WHERE Now() > endtime ORDER BY id DESC")
select_query.Execute()
output += "<tr><th>Expired Polls</th></tr>"
while(select_query.NextRow())
var/pollid = select_query.item[1]
var/pollquestion = select_query.item[2]
output += "<tr bgcolor='[(i % 2 == 1) ? color1 : color2]'><td><a href=\"byond://?pollresults=[pollid]\"><b>[pollquestion]</b></a></td></tr>"
output += "</table>"
src << browse(output,"window=playerpolllist;size=500x300")
/client/proc/poll_results(var/pollid = -1)
if(pollid == -1)
return
establish_db_connection()
if(!dbcon.IsConnected())
return
var/DBQuery/select_query = dbcon.NewQuery("SELECT polltype, question, adminonly, multiplechoiceoptions, starttime, endtime FROM [format_table_name("poll_question")] WHERE id = [pollid] AND endtime < Now()")
select_query.Execute()
var/question = ""
var/polltype = ""
var/adminonly = 0
var/multiplechoiceoptions = 0
var/starttime = ""
var/endtime = ""
var/found = 0
while(select_query.NextRow())
polltype = select_query.item[1]
question = select_query.item[2]
adminonly = text2num(select_query.item[3])
multiplechoiceoptions = text2num(select_query.item[4])
starttime = select_query.item[5]
endtime = select_query.item[6]
found = 1
break
if(!found)
to_chat(src, "<span class='warning'>Poll question details not found. (Maybe the poll isn't expired yet?)</span>")
return
if(polltype == POLLTYPE_MULTI)
question += " (Choose up to [multiplechoiceoptions] options)"
if(adminonly)
question = "(<font color='#997700'>Admin only poll</font>) " + question
var output = "<!DOCTYPE html><html><body>"
if(polltype == POLLTYPE_MULTI || polltype == POLLTYPE_OPTION)
select_query = dbcon.NewQuery("SELECT text, percentagecalc, (SELECT COUNT(optionid) FROM [format_table_name("poll_vote")] WHERE optionid = poll_option.id GROUP BY optionid) AS votecount FROM [format_table_name("poll_option")] WHERE pollid = [pollid]");
select_query.Execute()
var/list/options = list()
var/total_votes = 1
var/total_percent_votes = 1
var/max_votes = 1
while(select_query.NextRow())
var/text = select_query.item[1]
var/percentagecalc = select_query.item[2]
var/votecount = text2num(select_query.item[3])
if(percentagecalc)
total_percent_votes += votecount
total_votes += votecount
if(votecount > max_votes)
max_votes = votecount
options[++options.len] = list(text, percentagecalc, votecount)
// fuck ie.
output += {"
<table width='900' align='center' bgcolor='#eeffee' cellspacing='0' cellpadding='4'>
<tr bgcolor='#ddffdd'>
<th colspan='4' align='center'>[question]<br><font size='1'><b>[starttime] - [endtime]</b></font></th>
</tr>
<tr bgcolor='#ddffdd'>
<th colspan='4' align='center'><div style='width:700px;position:relative'>"}
var/list/colors = list("#66c2a5", "#fc8d62", "#8da0cb", "#e78ac3", "#a6d854", "#ffd92f", "#e5c494", "#b3b3b3")
var/color_index = 0
for(var/list/option in options)
var/bar_width = option[3] * 700 / total_votes
var/percentage = option[2] ? "[round(option[3] * 100 / total_percent_votes)]%" : "N/A"
color_index++
if(color_index > colors.len)
color_index = 1
output += "<div style='width:[bar_width]px;height:[5]px;background-color:[colors[color_index]];float:left' title='[option[1]] ([percentage])'></div>"
output += "</div><br><font size='2'><b>(Hover over the colored bar to read description)</b></font></tr>"
for(var/list/option in options)
var/bar_width = option[3] * 390 / max_votes
var/percentage = option[2] ? "[round(option[3] * 100 / total_percent_votes)]%" : "N/A"
output += "<tr><td width='300' align='right'>[option[1]]</td>"
output += "<td width='100' align='center'><b>[option[3]]</b></td>"
output += "<td width='100' align='center'><b>[percentage]</b></td>"
output += "<td width='400' align='left'><div style='width:[bar_width]px;height:10px;display:inline-block;background-color:#08b000'></div></td>"
output += "</table>"
if(polltype == POLLTYPE_RATING)
output += {"
<table width='900' align='center' bgcolor='#eeffee' cellspacing='0' cellpadding='4'>
<tr bgcolor='#ddffdd'>
<th colspan='4' align='center'>[question]<br><font size='1'><b>[starttime] - [endtime]</b></font></th>
</tr>"}
select_query = dbcon.NewQuery("SELECT id, text, (SELECT AVG(rating) FROM [format_table_name("poll_vote")] WHERE optionid = poll_option.id AND rating != 'abstain') AS avgrating, (SELECT COUNT(rating) FROM [format_table_name("poll_vote")] WHERE optionid = poll_option.id AND rating != 'abstain') AS countvotes, minval, maxval FROM [format_table_name("poll_option")] WHERE pollid = [pollid]")
select_query.Execute()
while(select_query.NextRow())
output += {"
<tr>
<td align='right' width='300'>[select_query.item[2]]</th>
<td align='center' width='100'><b>N = [select_query.item[4]]</b></th>
<td align='center' width='100'><b>AVG = [select_query.item[3]]</b></th>
<td align='left' width='400'><table width='400 style='table-layout: fixed'>"}
var/optionid = select_query.item[1]
var/totalvotes = text2num(select_query.item[4])
var/minval = text2num(select_query.item[5])
var/maxval = text2num(select_query.item[6])
var/maxvote = 1
var/list/votecounts = list()
for(var/I in minval to maxval)
var/DBQuery/rating_query = dbcon.NewQuery("SELECT COUNT(rating) AS countrating FROM [format_table_name("poll_vote")] WHERE optionid = [optionid] AND rating = [I] GROUP BY rating")
rating_query.Execute()
var/votecount = 0
while(rating_query.NextRow())
votecount = text2num(rating_query.item[1])
votecounts["[I]"] = votecount
if(votecount > maxvote)
maxvote = votecount
for(var/I in minval to maxval)
var/votecount = votecounts["[I]"]
var/bar_width = votecount * 200 / maxvote
output += {"
<tr>
<td align='center' width='50'><b>[I]</b></td>
<td align='center' width='50'>[votecount]</td>
<td align='center' width='75'>([votecount / totalvotes]%)</td>
<td width='200'><div style='width:[bar_width]px;height:10px;display:inline-block;background-color:#08b000'></div></td>
</tr>"}
output += "</table></td></tr>"
output += "</table>"
if(polltype == POLLTYPE_TEXT)
select_query = dbcon.NewQuery("SELECT replytext, COUNT(replytext) AS countresponse, GROUP_CONCAT(DISTINCT ckey SEPARATOR ', ') as ckeys FROM [format_table_name("poll_textreply")] WHERE pollid = [pollid] GROUP BY replytext ORDER BY countresponse DESC");
select_query.Execute()
output += {"
<table width='900' align='center' bgcolor='#eeffee' cellspacing='0' cellpadding='4'>
<tr bgcolor='#ddffdd'>
<th colspan='2' align='center'>[question]<br><font size='1'><b>[starttime] - [endtime]</b></font></th>
</tr>"}
while(select_query.NextRow())
var/replytext = select_query.item[1]
var/countresponse = select_query.item[2]
var/ckeys = select_query.item[3]
output += {"
<tr>
<td>[ckeys] ([countresponse] player\s) responded with:</td>
<td style='border:1px solid #888888'>[replytext]</td>
</tr>"}
output += "</table>"
output += "</body></html>"
src << browse(output,"window=pollresults;size=950x500")
/mob/new_player/proc/poll_player(var/pollid = -1)
/client/proc/poll_player(var/pollid = -1, var/inline = 0)
if(pollid == -1) return
establish_db_connection()
if(dbcon.IsConnected())
var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype, multiplechoiceoptions FROM [format_table_name("poll_question")] WHERE id = [pollid]")
var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype, multiplechoiceoptions FROM [format_table_name("poll_question")] WHERE id = [pollid] AND Now() BETWEEN starttime AND endtime [holder ? "AND adminonly = 0" : ""]")
select_query.Execute()
var/pollstarttime = ""
@@ -49,6 +212,7 @@
var/polltype = ""
var/found = 0
var/multiplechoiceoptions = 0
var/canvote = can_vote()
while(select_query.NextRow())
pollstarttime = select_query.item[1]
@@ -59,16 +223,16 @@
break
if(!found)
to_chat(usr, "\red Poll question details not found.")
to_chat(usr, "<span class='warning'>Poll question details not found. (Maybe you do not have access?)</span>")
return
switch(polltype)
//Polls that have enumerated options
if(POLLTYPE_OPTION)
var/DBQuery/voted_query = dbcon.NewQuery("SELECT optionid FROM [format_table_name("poll_vote")] WHERE pollid = [pollid] AND ckey = '[usr.ckey]'")
var/DBQuery/voted_query = dbcon.NewQuery("SELECT optionid FROM [format_table_name("poll_vote")] WHERE pollid = [pollid] AND ckey = '[ckey]'")
voted_query.Execute()
var/voted = 0
var/voted = 0 // If the can't vote then consider them voted
var/votedoptionid = 0
while(voted_query.NextRow())
votedoptionid = text2num(voted_query.item[1])
@@ -84,22 +248,23 @@
PO.optionid = text2num(options_query.item[1])
PO.optiontext = options_query.item[2]
options += PO
var/output = "<div align='center'><B>Player poll</B>"
output +="<hr>"
var/output
if(!inline)
output += "<div align='center'><B>Player poll</B>"
output +="<hr>"
output += "<b>Question: [pollquestion]</b><br>"
output += "<font size='2'>Poll runs from <b>[pollstarttime]</b> until <b>[pollendtime]</b></font><p>"
if(!voted) //Only make this a form if we have not voted yet
output += "<form name='cardcomp' action='?src=[UID()]' method='get'>"
output += "<input type='hidden' name='src' value='[UID()]'>"
if(canvote && !voted) //Only make this a form if we have not voted yet
output += "<form name='cardcomp' action='byond://' method='get'>"
output += "<input type='hidden' name='votepollid' value='[pollid]'>"
output += "<input type='hidden' name='votetype' value='OPTION'>"
output += "<table><tr><td>"
for(var/datum/polloption/O in options)
if(O.optionid && O.optiontext)
if(voted)
if(voted || !canvote)
if(votedoptionid == O.optionid)
output += "<b>[O.optiontext]</b><br>"
else
@@ -108,17 +273,20 @@
output += "<input type='radio' name='voteoptionid' value='[O.optionid]'> [O.optiontext]<br>"
output += "</td></tr></table>"
if(!voted) //Only make this a form if we have not voted yet
if(canvote && !voted) //Only make this a form if we have not voted yet
output += "<p><input type='submit' value='Vote'>"
output += "</form>"
output += "</div>"
src << browse(output,"window=playerpoll;size=500x250")
if(inline)
return output
else
src << browse(output,"window=playerpoll;size=500x250")
//Polls with a text input
if(POLLTYPE_TEXT)
var/DBQuery/voted_query = dbcon.NewQuery("SELECT replytext FROM [format_table_name("poll_textreply")] WHERE pollid = [pollid] AND ckey = '[usr.ckey]'")
var/DBQuery/voted_query = dbcon.NewQuery("SELECT replytext FROM [format_table_name("poll_textreply")] WHERE pollid = [pollid] AND ckey = '[ckey]'")
voted_query.Execute()
var/voted = 0
@@ -128,15 +296,16 @@
voted = 1
break
var/output = "<div align='center'><B>Player poll</B>"
output +="<hr>"
var/output
if(!inline)
output += "<div align='center'><B>Player poll</B>"
output +="<hr>"
output += "<b>Question: [pollquestion]</b><br>"
output += "<font size='2'>Feedback gathering runs from <b>[pollstarttime]</b> until <b>[pollendtime]</b></font><p>"
if(!voted) //Only make this a form if we have not voted yet
output += "<form name='cardcomp' action='?src=[UID()]' method='get'>"
output += "<input type='hidden' name='src' value='[UID()]'>"
if(canvote && !voted) //Only make this a form if we have not voted yet
output += "<form name='cardcomp' action='byond://' method='get'>"
output += "<input type='hidden' name='votepollid' value='[pollid]'>"
output += "<input type='hidden' name='votetype' value='TEXT'>"
@@ -146,8 +315,7 @@
output += "<p><input type='submit' value='Submit'>"
output += "</form>"
output += "<form name='cardcomp' action='?src=[UID()]' method='get'>"
output += "<input type='hidden' name='src' value='[UID()]'>"
output += "<form name='cardcomp' action='byond://' method='get'>"
output += "<input type='hidden' name='votepollid' value='[pollid]'>"
output += "<input type='hidden' name='votetype' value='TEXT'>"
output += "<input type='hidden' name='replytext' value='ABSTAIN'>"
@@ -155,16 +323,21 @@
output += "</form>"
else
output += "[vote_text]"
src << browse(output,"window=playerpoll;size=500x500")
if(inline)
return output
else
src << browse(output,"window=playerpoll;size=500x500")
//Polls with a text input
if(POLLTYPE_RATING)
var/DBQuery/voted_query = dbcon.NewQuery("SELECT o.text, v.rating FROM [format_table_name("poll_option")] o, erro_poll_vote v WHERE o.pollid = [pollid] AND v.ckey = '[usr.ckey]' AND o.id = v.optionid")
var/DBQuery/voted_query = dbcon.NewQuery("SELECT o.text, v.rating FROM [format_table_name("poll_option")] o, erro_poll_vote v WHERE o.pollid = [pollid] AND v.ckey = '[ckey]' AND o.id = v.optionid")
voted_query.Execute()
var/output = "<div align='center'><B>Player poll</B>"
output +="<hr>"
var/output
if(!inline)
output += "<div align='center'><B>Player poll</B>"
output +="<hr>"
output += "<b>Question: [pollquestion]</b><br>"
output += "<font size='2'>Poll runs from <b>[pollstarttime]</b> until <b>[pollendtime]</b></font><p>"
@@ -177,9 +350,8 @@
output += "<br><b>[optiontext] - [rating]</b>"
if(!voted) //Only make this a form if we have not voted yet
output += "<form name='cardcomp' action='?src=[UID()]' method='get'>"
output += "<input type='hidden' name='src' value='[UID()]'>"
if(canvote && !voted) //Only make this a form if we have not voted yet
output += "<form name='cardcomp' action='byond://' method='get'>"
output += "<input type='hidden' name='votepollid' value='[pollid]'>"
output += "<input type='hidden' name='votetype' value='NUMVAL'>"
@@ -227,9 +399,12 @@
output += "<p><input type='submit' value='Submit'>"
output += "</form>"
src << browse(output,"window=playerpoll;size=500x500")
if(inline)
return output
else
src << browse(output,"window=playerpoll;size=500x500")
if(POLLTYPE_MULTI)
var/DBQuery/voted_query = dbcon.NewQuery("SELECT optionid FROM [format_table_name("poll_vote")] WHERE pollid = [pollid] AND ckey = '[usr.ckey]'")
var/DBQuery/voted_query = dbcon.NewQuery("SELECT optionid FROM [format_table_name("poll_vote")] WHERE pollid = [pollid] AND ckey = '[ckey]'")
voted_query.Execute()
var/list/votedfor = list()
@@ -258,14 +433,15 @@
if(select_query.item[5])
multiplechoiceoptions = text2num(select_query.item[5])
var/output = "<div align='center'><B>Player poll</B>"
output +="<hr>"
var/output
if(!inline)
output += "<div align='center'><B>Player poll</B>"
output +="<hr>"
output += "<b>Question: [pollquestion]</b><br>You can select up to [multiplechoiceoptions] options. If you select more, the first [multiplechoiceoptions] will be saved.<br>"
output += "<font size='2'>Poll runs from <b>[pollstarttime]</b> until <b>[pollendtime]</b></font><p>"
if(!voted) //Only make this a form if we have not voted yet
output += "<form name='cardcomp' action='?src=[UID()]' method='get'>"
output += "<input type='hidden' name='src' value='[UID()]'>"
if(canvote && !voted) //Only make this a form if we have not voted yet
output += "<form name='cardcomp' action='byond://' method='get'>"
output += "<input type='hidden' name='votepollid' value='[pollid]'>"
output += "<input type='hidden' name='votetype' value='MULTICHOICE'>"
output += "<input type='hidden' name='maxoptionid' value='[maxoptionid]'>"
@@ -274,7 +450,7 @@
output += "<table><tr><td>"
for(var/datum/polloption/O in options)
if(O.optionid && O.optiontext)
if(voted)
if(canvote && voted)
if(O.optionid in votedfor)
output += "<b>[O.optiontext]</b><br>"
else
@@ -283,16 +459,19 @@
output += "<input type='checkbox' name='option_[O.optionid]' value='[O.optionid]'> [O.optiontext]<br>"
output += "</td></tr></table>"
if(!voted) //Only make this a form if we have not voted yet
if(canvote && !voted) //Only make this a form if we have not voted yet
output += "<p><input type='submit' value='Vote'>"
output += "</form>"
output += "</div>"
src << browse(output,"window=playerpoll;size=600x250")
if(inline)
return output
else
src << browse(output,"window=playerpoll;size=600x250")
return
/mob/new_player/proc/vote_on_poll(var/pollid = -1, var/optionid = -1, var/multichoice = 0)
/client/proc/vote_on_poll(var/pollid = -1, var/optionid = -1, var/multichoice = 0)
if(pollid == -1 || optionid == -1)
return
@@ -301,7 +480,7 @@
establish_db_connection()
if(dbcon.IsConnected())
var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype, multiplechoiceoptions FROM [format_table_name("poll_question")] WHERE id = [pollid] AND Now() BETWEEN starttime AND endtime")
var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype, multiplechoiceoptions FROM [format_table_name("poll_question")] WHERE id = [pollid] AND Now() BETWEEN starttime AND endtime [holder ? "AND adminonly = 0" : ""]")
select_query.Execute()
var/validpoll = 0
@@ -316,7 +495,7 @@
break
if(!validpoll)
to_chat(usr, "\red Poll is not valid.")
to_chat(usr, "<span class='warning'>Poll is not valid.</span>")
return
var/DBQuery/select_query2 = dbcon.NewQuery("SELECT id FROM [format_table_name("poll_option")] WHERE id = [optionid] AND pollid = [pollid]")
@@ -329,12 +508,12 @@
break
if(!validoption)
to_chat(usr, "\red Poll option is not valid.")
to_chat(usr, "<span class='warning'>Poll option is not valid.</span>")
return
var/alreadyvoted = 0
var/DBQuery/voted_query = dbcon.NewQuery("SELECT id FROM [format_table_name("poll_vote")] WHERE pollid = [pollid] AND ckey = '[usr.ckey]'")
var/DBQuery/voted_query = dbcon.NewQuery("SELECT id FROM [format_table_name("poll_vote")] WHERE pollid = [pollid] AND ckey = '[ckey]'")
voted_query.Execute()
while(voted_query.NextRow())
@@ -343,11 +522,11 @@
break
if(!multichoice && alreadyvoted)
to_chat(usr, "\red You already voted in this poll.")
to_chat(usr, "<span class='warning'>You already voted in this poll.</span>")
return
if(multichoice && (alreadyvoted >= multiplechoiceoptions))
to_chat(usr, "\red You already have more than [multiplechoiceoptions] logged votes on this poll. Enough is enough. Contact the database admin if this is an error.")
to_chat(usr, "<span class='warning'>You already have more than [multiplechoiceoptions] logged votes on this poll. Enough is enough. Contact the database admin if this is an error.</span>")
return
var/adminrank = "Player"
@@ -355,14 +534,14 @@
adminrank = usr.client.holder.rank
var/DBQuery/insert_query = dbcon.NewQuery("INSERT INTO [format_table_name("poll_vote")] (id ,datetime ,pollid ,optionid ,ckey ,ip ,adminrank) VALUES (null, Now(), [pollid], [optionid], '[usr.ckey]', '[usr.client.address]', '[adminrank]')")
var/DBQuery/insert_query = dbcon.NewQuery("INSERT INTO [format_table_name("poll_vote")] (id ,datetime ,pollid ,optionid ,ckey ,ip ,adminrank) VALUES (null, Now(), [pollid], [optionid], '[ckey]', '[usr.client.address]', '[adminrank]')")
insert_query.Execute()
to_chat(usr, "\blue Vote successful.")
to_chat(usr, "<span class='notice'>Vote successful.</span>")
usr << browse(null,"window=playerpoll")
/mob/new_player/proc/log_text_poll_reply(var/pollid = -1, var/replytext = "")
/client/proc/log_text_poll_reply(var/pollid = -1, var/replytext = "")
if(pollid == -1 || replytext == "")
return
@@ -371,7 +550,7 @@
establish_db_connection()
if(dbcon.IsConnected())
var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype FROM [format_table_name("poll_question")] WHERE id = [pollid] AND Now() BETWEEN starttime AND endtime")
var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype FROM [format_table_name("poll_question")] WHERE id = [pollid] AND Now() BETWEEN starttime AND endtime [holder ? "AND adminonly = 0" : ""]")
select_query.Execute()
var/validpoll = 0
@@ -383,12 +562,12 @@
break
if(!validpoll)
to_chat(usr, "\red Poll is not valid.")
to_chat(usr, "<span class='warning'>Poll is not valid.</span>")
return
var/alreadyvoted = 0
var/DBQuery/voted_query = dbcon.NewQuery("SELECT id FROM [format_table_name("poll_textreply")] WHERE pollid = [pollid] AND ckey = '[usr.ckey]'")
var/DBQuery/voted_query = dbcon.NewQuery("SELECT id FROM [format_table_name("poll_textreply")] WHERE pollid = [pollid] AND ckey = '[ckey]'")
voted_query.Execute()
while(voted_query.NextRow())
@@ -396,7 +575,7 @@
break
if(alreadyvoted)
to_chat(usr, "\red You already sent your feedback for this poll.")
to_chat(usr, "<span class='warning'>You already sent your feedback for this poll.</span>")
return
var/adminrank = "Player"
@@ -413,14 +592,14 @@
to_chat(usr, "The text you entered was blank, contained illegal characters or was too long. Please correct the text and submit again.")
return
var/DBQuery/insert_query = dbcon.NewQuery("INSERT INTO [format_table_name("poll_textreply")] (id ,datetime ,pollid ,ckey ,ip ,replytext ,adminrank) VALUES (null, Now(), [pollid], '[usr.ckey]', '[usr.client.address]', '[replytext]', '[adminrank]')")
var/DBQuery/insert_query = dbcon.NewQuery("INSERT INTO [format_table_name("poll_textreply")] (id ,datetime ,pollid ,ckey ,ip ,replytext ,adminrank) VALUES (null, Now(), [pollid], '[ckey]', '[usr.client.address]', '[replytext]', '[adminrank]')")
insert_query.Execute()
to_chat(usr, "\blue Feedback logging successful.")
to_chat(usr, "<span class='notice'>Feedback logging successful.</span>")
usr << browse(null,"window=playerpoll")
/mob/new_player/proc/vote_on_numval_poll(var/pollid = -1, var/optionid = -1, var/rating = null)
/client/proc/vote_on_numval_poll(var/pollid = -1, var/optionid = -1, var/rating = null)
if(pollid == -1 || optionid == -1)
return
@@ -429,7 +608,7 @@
establish_db_connection()
if(dbcon.IsConnected())
var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype FROM [format_table_name("poll_question")] WHERE id = [pollid] AND Now() BETWEEN starttime AND endtime")
var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype FROM [format_table_name("poll_question")] WHERE id = [pollid] AND Now() BETWEEN starttime AND endtime [holder ? "AND adminonly = 0" : ""]")
select_query.Execute()
var/validpoll = 0
@@ -441,7 +620,7 @@
break
if(!validpoll)
to_chat(usr, "\red Poll is not valid.")
to_chat(usr, "<span class='warning'>Poll is not valid.</span>")
return
var/DBQuery/select_query2 = dbcon.NewQuery("SELECT id FROM [format_table_name("poll_option")] WHERE id = [optionid] AND pollid = [pollid]")
@@ -454,12 +633,12 @@
break
if(!validoption)
to_chat(usr, "\red Poll option is not valid.")
to_chat(usr, "<span class='warning'>Poll option is not valid.</span>")
return
var/alreadyvoted = 0
var/DBQuery/voted_query = dbcon.NewQuery("SELECT id FROM [format_table_name("poll_vote")] WHERE optionid = [optionid] AND ckey = '[usr.ckey]'")
var/DBQuery/voted_query = dbcon.NewQuery("SELECT id FROM [format_table_name("poll_vote")] WHERE optionid = [optionid] AND ckey = '[ckey]'")
voted_query.Execute()
while(voted_query.NextRow())
@@ -467,7 +646,7 @@
break
if(alreadyvoted)
to_chat(usr, "\red You already voted in this poll.")
to_chat(usr, "<span class='warning'>You already voted in this poll.</span>")
return
var/adminrank = "Player"
@@ -475,8 +654,8 @@
adminrank = usr.client.holder.rank
var/DBQuery/insert_query = dbcon.NewQuery("INSERT INTO [format_table_name("poll_vote")] (id ,datetime ,pollid ,optionid ,ckey ,ip ,adminrank, rating) VALUES (null, Now(), [pollid], [optionid], '[usr.ckey]', '[usr.client.address]', '[adminrank]', [(isnull(rating)) ? "null" : rating])")
var/DBQuery/insert_query = dbcon.NewQuery("INSERT INTO [format_table_name("poll_vote")] (id ,datetime ,pollid ,optionid ,ckey ,ip ,adminrank, rating) VALUES (null, Now(), [pollid], [optionid], '[ckey]', '[usr.client.address]', '[adminrank]', [(isnull(rating)) ? "null" : rating])")
insert_query.Execute()
to_chat(usr, "\blue Vote successful.")
to_chat(usr, "<span class='notice'>Vote successful.</span>")
usr << browse(null,"window=playerpoll")
+217 -14
View File
@@ -559,10 +559,67 @@
/datum/sprite_accessory/hair/unathi
species_allowed = list("Unathi")
glasses_over = 1
icon = 'icons/mob/body_accessory.dmi'
/datum/sprite_accessory/hair/unathi/una_horns
name = "Unathi Horns"
icon_state = "soghun_horns"
/datum/sprite_accessory/hair/unathi/una_side_frills
icon = 'icons/mob/human_face.dmi'
name = "Unathi Side Frills"
icon_state = "unathi_sidefrills"
secondary_theme = "webbing"
/datum/sprite_accessory/hair/unathi/una_frills_dorsal
icon = 'icons/mob/human_face.dmi'
name = "Dorsal Frills"
icon_state = "unathi_dorsalfrills"
secondary_theme = "webbing"
/datum/sprite_accessory/hair/unathi/simple
name = "Simple Horns"
icon_state = "horns_simple"
/datum/sprite_accessory/hair/unathi/short
name = "Short Horns"
icon_state = "horns_short"
/datum/sprite_accessory/hairy/unathi/curled
name = "Curled Horns"
icon_state = "horns_curled"
/datum/sprite_accessory/hair/unathi/ram
name = "Ram Horns"
icon_state = "horns_ram"
/datum/sprite_accessory/hair/unathi/double
name = "Double Horns"
icon_state = "horns_drac"
/datum/sprite_accessory/hair/unathi/lower
name = "Lower Horns"
icon_state = "horns_lower"
/datum/sprite_accessory/hair/unathi/big
name = "Big"
icon_state = "horns_big"
/datum/sprite_accessory/hair/unathi/ram2
name = "Ram alt."
icon_state = "horns_ram2"
/datum/sprite_accessory/hair/unathi/small
name = "Small"
icon_state = "horns_small"
/datum/sprite_accessory/hair/unathi/chin
name = "Chin"
icon_state = "horns_chin"
/datum/sprite_accessory/hair/unathi/adorns
name = "Adorns"
icon_state = "horns_adorns"
/datum/sprite_accessory/hair/unathi/spikes
name = "Spikes"
icon_state = "horns_spikes"
/datum/sprite_accessory/hair/skrell
species_allowed = list("Skrell")
@@ -747,6 +804,20 @@
icon_state = "braided"
secondary_theme = "beads"
/datum/sprite_accessory/hair/vulpkanin/vulp_hair_punkbraided
name = "Punk Braided"
icon_state = "punkbraided"
secondary_theme = "flare"
/datum/sprite_accessory/hair/vulpkanin/vulp_hair_short2
name = "Short Alt."
icon_state = "short2"
glasses_over = 1
/datum/sprite_accessory/hair/vulpkanin/vulp_hair_rough
name = "Rough-Cropped Mane"
icon_state = "rough"
/datum/sprite_accessory/hair/vox
species_allowed = list("Vox")
glasses_over = 1
@@ -984,6 +1055,10 @@
name = "Tajara Goatee"
icon_state = "facial_goatee"
/datum/sprite_accessory/facial_hair/tajara/taj_goatee_faded
name = "Tajara Faded Goatee"
icon_state = "facial_goatee_faded"
/datum/sprite_accessory/facial_hair/tajara/taj_smallstache
name = "Tajara Smallstache"
icon_state = "facial_smallstache"
@@ -1048,6 +1123,15 @@
name = "Swift"
icon_state = "vulp_facial_swift"
/datum/sprite_accessory/facial_hair/vulpkanin/vulp_elder
name = "Elder"
icon_state = "vulp_facial_elder"
secondary_theme = "chin"
/datum/sprite_accessory/facial_hair/vulpkanin/vulp_slash
name = "Slash"
icon_state = "vulp_facial_slash"
/datum/sprite_accessory/facial_hair/unathi
species_allowed = list("Unathi")
gender = NEUTER
@@ -1055,39 +1139,74 @@
/datum/sprite_accessory/facial_hair/unathi/una_spines_long
name = "Long Spines"
icon_state = "soghun_longspines"
icon_state = "unathi_longspines"
/datum/sprite_accessory/facial_hair/unathi/una_spines_short
name = "Short Spines"
icon_state = "soghun_shortspines"
icon_state = "unathi_shortspines"
/datum/sprite_accessory/facial_hair/unathi/una_frills_aquaspine
name = "Spiny Aquatic Frills"
icon_state = "unathi_dracfrills"
/datum/sprite_accessory/facial_hair/unathi/una_frills_aquatic
name = "Aquatic Frills"
icon_state = "soghun_aquaticfrills"
icon_state = "unathi_aquaticfrills"
/datum/sprite_accessory/facial_hair/unathi/una_frills_long
name = "Long Frills"
icon_state = "soghun_longfrills"
icon_state = "unathi_longfrills"
/datum/sprite_accessory/facial_hair/unathi/una_frills_short
name = "Short Frills"
icon_state = "soghun_shortfrills"
icon_state = "unathi_shortfrills"
/datum/sprite_accessory/facial_hair/unathi/una_frills_webbed_aquaspine
name = "Spiny Aquatic Webbed Frills"
icon_state = "unathi_dracfrills"
secondary_theme = "webbing"
/datum/sprite_accessory/facial_hair/unathi/una_frills_webbed_aquatic
name = "Aquatic Webbed Frills"
icon_state = "soghun_aquaticfrills"
icon_state = "unathi_aquaticfrills"
secondary_theme = "webbing"
/datum/sprite_accessory/facial_hair/unathi/una_frills_webbed_long
name = "Long Webbed Frills"
icon_state = "soghun_longfrills"
icon_state = "unathi_longfrills"
secondary_theme = "webbing"
/datum/sprite_accessory/facial_hair/unathi/una_frills_webbed_short
name = "Short Webbed Frills"
icon_state = "soghun_shortfrills"
icon_state = "unathi_shortfrills"
secondary_theme = "webbing"
/datum/sprite_accessory/facial_hair/unathi/una_side_frills
name = "Side Frills"
icon_state = "unathi_sidefrills"
secondary_theme = "webbing"
/datum/sprite_accessory/facial_hair/unathi/una_frills_dorsal
over_hair = null
name = "Dorsal Frills"
icon_state = "unathi_dorsalfrills"
secondary_theme = "webbing"
/datum/sprite_accessory/facial_hair/unathi/una_chin_horns
name = "Chin Horns"
icon = 'icons/mob/body_accessory.dmi'
icon_state = "horns_chin"
/datum/sprite_accessory/facial_hair/unathi/una_horn_adorns
name = "Horn Adorns"
icon = 'icons/mob/body_accessory.dmi'
icon_state = "horns_adorns"
/datum/sprite_accessory/facial_hair/unathi/una_spikes
name = "Spikes"
icon = 'icons/mob/body_accessory.dmi'
icon_state = "horns_spikes"
//skin styles - WIP
//going to have to re-integrate this with surgery
//let the icon_state hold an icon preview for now
@@ -1649,6 +1768,38 @@
name = "Ram"
icon_state = "horns_ram"
/datum/sprite_accessory/head_accessory/unathi/double
name = "Double"
icon_state = "horns_drac"
/datum/sprite_accessory/head_accessory/unathi/lower
name = "Lower"
icon_state = "horns_lower"
/datum/sprite_accessory/head_accessory/unathi/big
name = "Big"
icon_state = "horns_big"
/datum/sprite_accessory/head_accessory/unathi/ram2
name = "Ram alt."
icon_state = "horns_ram2"
/datum/sprite_accessory/head_accessory/unathi/small
name = "Small"
icon_state = "horns_small"
/datum/sprite_accessory/head_accessory/unathi/chin
name = "Chin"
icon_state = "horns_chin"
/datum/sprite_accessory/head_accessory/unathi/adorns
name = "Adorns"
icon_state = "horns_adorns"
/datum/sprite_accessory/head_accessory/unathi/spikes
name = "Spikes"
icon_state = "horns_spikes"
/datum/sprite_accessory/head_accessory/tajara
species_allowed = list("Tajaran")
@@ -1729,6 +1880,20 @@
name = "Vulpkanin Nose"
icon_state = "markings_face_nose_vulp"
/datum/sprite_accessory/head_accessory/vulpkanin/vulp_nose2
name = "Vulpkanin Nose Alt."
icon_state = "markings_face_nose2_vulp"
/datum/sprite_accessory/head_accessory/vulpkanin/vulp_elder
icon = 'icons/mob/human_face.dmi'
name = "Elder"
icon_state = "vulp_facial_elder"
/datum/sprite_accessory/head_accessory/vulpkanin/vulp_slash
icon = 'icons/mob/human_face.dmi'
name = "Slash"
icon_state = "vulp_facial_slash"
/datum/sprite_accessory/head_accessory/ipc
species_allowed = list("Machine")
over_hair = 1
@@ -1749,11 +1914,31 @@
name = "Head Light"
icon_state = "light"
/datum/sprite_accessory/head_accessory/ipc/ipc_side_lights
name = "Side Lights"
icon_state = "sidelights"
/datum/sprite_accessory/head_accessory/ipc/ipc_side_cyber_head
name = "Cyber Pipes"
icon_state = "cyberhead"
/datum/sprite_accessory/head_accessory/ipc/ipc_side_antlers
name = "Antlers"
icon_state = "antlers"
/datum/sprite_accessory/head_accessory/ipc/ipc_side_drone_eyes
name = "Drone Eyes"
icon_state = "droneeyes"
/datum/sprite_accessory/head_accessory/ipc/ipc_crowned
name = "Crowned"
icon_state = "crowned"
/datum/sprite_accessory/head_accessory/kidan
icon = 'icons/mob/human_face.dmi'
species_allowed = list("Kidan")
over_hair = 1
do_colouration = 0
do_colouration = 1
/datum/sprite_accessory/head_accessory/kidan/perked_antennae
name = "Perked-up Antennae"
@@ -1796,13 +1981,13 @@
/datum/sprite_accessory/body_markings
icon = 'icons/mob/body_accessory.dmi'
species_allowed = list("Unathi", "Tajaran", "Vulpkanin", "Machine", "Vox")
species_allowed = list("Unathi", "Tajaran", "Vulpkanin", "Machine", "Vox", "Kidan")
icon_state = "accessory_none"
marking_location = "body"
/datum/sprite_accessory/body_markings/none
name = "None"
species_allowed = list("Human", "Unathi", "Diona", "Grey", "Machine", "Tajaran", "Vulpkanin", "Skrell", "Slime People", "Skeleton", "Vox")
species_allowed = list("Human", "Unathi", "Diona", "Grey", "Machine", "Tajaran", "Vulpkanin", "Skrell", "Slime People", "Skeleton", "Vox", "Kidan")
icon_state = "accessory_none"
/datum/sprite_accessory/body_markings/tiger
@@ -1810,6 +1995,13 @@
species_allowed = list("Unathi", "Tajaran", "Vulpkanin")
icon_state = "markings_tiger"
/datum/sprite_accessory/body_markings/kidan
species_allowed = list("Kidan")
/datum/sprite_accessory/body_markings/kidan/outline_kid
name = "Kidan Outline"
icon_state = "markings_outline_kid"
/datum/sprite_accessory/body_markings/unathi
species_allowed = list("Unathi")
@@ -1898,6 +2090,13 @@
marking_location = "head"
species_allowed = list()
/datum/sprite_accessory/body_markings/head/kidan
species_allowed = list("Kidan")
/datum/sprite_accessory/body_markings/head/kidan/outline_head_kid
name = "Kidan Outline Head"
icon_state = "markings_head_outline_kid"
/datum/sprite_accessory/body_markings/head/tajara
species_allowed = list("Tajaran")
@@ -1956,6 +2155,10 @@
name = "Vulpkanin Nose"
icon_state = "markings_face_nose_vulp"
/datum/sprite_accessory/body_markings/head/vulpkanin/nose2_default_vulp
name = "Vulpkanin Nose Alt."
icon_state = "markings_face_nose2_vulp"
/datum/sprite_accessory/body_markings/head/vulpkanin/muzzle_vulp //Companion marking for Vulpkanin Belly Alt..
name = "Vulpkanin Muzzle"
icon_state = "markings_face_full_vulp"