diff --git a/baystation12.dme b/baystation12.dme index 9103ff1b305..097cc1673ff 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -454,6 +454,7 @@ #include "code\game\gamemodes\sandbox\h_sandbox.dm" #include "code\game\gamemodes\sandbox\sandbox.dm" #include "code\game\gamemodes\traitor\traitor.dm" +#include "code\game\gamemodes\traitor\traitor_info.dm" #include "code\game\gamemodes\wizard\rightandwrong.dm" #include "code\game\gamemodes\wizard\soulstone.dm" #include "code\game\gamemodes\wizard\spellbook.dm" @@ -1182,8 +1183,8 @@ #include "code\WorkInProgress\Mloc\Shortcuts.dm" #include "code\WorkInProgress\organs\implants.dm" #include "code\WorkInProgress\organs\organs.dm" -#include "code\WorkInProgress\Ported\head.dm" #include "code\WorkInProgress\Ported\policetape.dm" +#include "code\WorkInProgress\Ported\sql.dm" #include "code\WorkInProgress\Ported\Bureaucracy\copier.dm" #include "code\WorkInProgress\Ported\Bureaucracy\filing.dm" #include "code\WorkInProgress\SkyMarshal\coatrack.dm" diff --git a/code/WorkInProgress/Ported/Abi79/uplinks.dm b/code/WorkInProgress/Ported/Abi79/uplinks.dm index 203cbb77bb7..ae261a85ac1 100644 --- a/code/WorkInProgress/Ported/Abi79/uplinks.dm +++ b/code/WorkInProgress/Ported/Abi79/uplinks.dm @@ -175,9 +175,9 @@ A list of items and costs is stored under the datum of every game mode, alongsid if(text2num(href_list["cost"]) > uses) // Not enough crystals for the item return 0 - //if(usr:mind && ticker.mode.traitors[usr:mind]) - //var/datum/traitorinfo/info = ticker.mode.traitors[usr:mind] - //info.spawnlist += href_list["buy_item"] + if(usr:mind && ticker.mode.traitors[usr:mind]) + var/datum/traitorinfo/info = ticker.mode.traitors[usr:mind] + info.spawnlist += href_list["buy_item"] uses -= text2num(href_list["cost"]) @@ -268,7 +268,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid else item:loc = get_turf(A) usr.update_clothing() - // usr.client.onBought("[item:name]") When we have the stats again, uncomment. + usr.client.onBought("[item:name]") /* if(istype(item, /obj/spawner)) // Spawners need to have del called on them to avoid leaving a marker behind del item*/ //HEADFINDBACK @@ -371,7 +371,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid item:loc = get_turf(A) /* if(istype(item, /obj/spawner)) // Spawners need to have del called on them to avoid leaving a marker behind del item*/ - // usr.client.onBought("[item:name]") When we have the stats again, uncomment. + usr.client.onBought("[item:name]") src.attack_self(usr) return diff --git a/code/WorkInProgress/Ported/head.dm b/code/WorkInProgress/Ported/sql.dm similarity index 55% rename from code/WorkInProgress/Ported/head.dm rename to code/WorkInProgress/Ported/sql.dm index d1cac9bc30d..9e0cad90ad5 100644 --- a/code/WorkInProgress/Ported/head.dm +++ b/code/WorkInProgress/Ported/sql.dm @@ -1,48 +1,65 @@ -//This looks to be the traitor win tracker code. Gonna comment it out as we lack it currently. -/* +//This looks to be the traitor win tracker code. client/proc/add_roundsjoined() if(!makejson) return + var/DBConnection/dbcon = new() + + dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]") + if(!dbcon.IsConnected()) return + var/DBQuery/cquery = dbcon.NewQuery("INSERT INTO `roundsjoined` (`ckey`) VALUES ('[ckey(src.key)]')") if(!cquery.Execute()) message_admins(cquery.ErrorMsg()) + client/proc/add_roundssurvived() if(!makejson) return + var/DBConnection/dbcon = new() + + dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]") + if(!dbcon.IsConnected()) return + var/DBQuery/cquery = dbcon.NewQuery("INSERT INTO `roundsurvived` (`ckey`) VALUES ('[ckey(src.key)]')") if(!cquery.Execute()) message_admins(cquery.ErrorMsg()) -client/proc/onDeath(var/mob/A = src.mob) + +client/proc/onDeath() if(!makejson) return roundinfo.deaths++ - if(!ismob(A)) + if(!ismob(mob)) return - var/ckey = src.ckey - var/area + var/area = get_area(mob) var/attacker var/tod = time2text(world.realtime) var/health var/last - if(isturf(A.loc)) - area = A.loc:loc:name - else - area = A.loc:name - if(ishuman(A.lastattacker)) - attacker = A.lastattacker:name + if(ishuman(mob.lastattacker)) + attacker = mob.lastattacker:name else attacker = "None" - health = "Oxy:[A.oxyloss]Brute:[A.bruteloss]Burn:[A.fireloss]Toxins:[A.toxloss]" - if(A.logs.len >= 1) - last = A.logs[A.logs.len] + health = "Oxy:[mob.oxyloss]Brute:[mob.bruteloss]Burn:[mob.fireloss]Toxins:[mob.toxloss]Brain:[mob.brainloss]" + if(mob.attack_log.len >= 1) + last = mob.attack_log[mob.attack_log.len] else last = "None" + + var/DBConnection/dbcon = new() + + dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]") + if(!dbcon.IsConnected()) return + var/DBQuery/cquery = dbcon.NewQuery("INSERT INTO `deathlog` (`ckey`,`location`,`lastattacker`,`ToD`,`health`,`lasthit`) VALUES ('[ckey]',[dbcon.Quote(area)],[dbcon.Quote(attacker)],'[tod]','[health]',[dbcon.Quote(last)])") if(!cquery.Execute()) message_admins(cquery.ErrorMsg()) + client/proc/onBought(names) if(!makejson) return if(!names) return + var/DBConnection/dbcon = new() + + dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]") + if(!dbcon.IsConnected()) return + var/DBQuery/cquery = dbcon.NewQuery("INSERT INTO `traitorbuy` (`type`) VALUES ([dbcon.Quote(names)])") if(!cquery.Execute()) message_admins(cquery.ErrorMsg()) -*/ datum/roundinfo var/core = 0 diff --git a/code/WorkInProgress/virus2/base.dm b/code/WorkInProgress/virus2/base.dm index 4bd30bf08ca..01cadec2aa3 100644 --- a/code/WorkInProgress/virus2/base.dm +++ b/code/WorkInProgress/virus2/base.dm @@ -47,10 +47,6 @@ proc/airborne_can_reach(turf/source, turf/target) return if(!disease) return - //immunity - /*for(var/iii = 1, iii <= M.immunevirus2.len, iii++) - if(disease.issame(M.immunevirus2[iii])) - return*/ // if one of the antibodies in the mob's body matches one of the disease's antigens, don't infect if(M.antibodies & disease.antigen != 0) return @@ -266,7 +262,6 @@ proc/airborne_can_reach(turf/source, turf/target) proc/getcopy() -// world << "getting copy" var/datum/disease2/disease/disease = new /datum/disease2/disease disease.infectionchance = infectionchance disease.spreadtype = spreadtype @@ -274,7 +269,6 @@ proc/airborne_can_reach(turf/source, turf/target) disease.antigen = antigen disease.uniqueID = uniqueID for(var/datum/disease2/effectholder/holder in effects) - // world << "adding effects" var/datum/disease2/effectholder/newholder = new /datum/disease2/effectholder newholder.effect = new holder.effect.type newholder.chance = holder.chance @@ -283,8 +277,6 @@ proc/airborne_can_reach(turf/source, turf/target) newholder.happensonce = holder.happensonce newholder.stage = holder.stage disease.effects += newholder - // world << "[newholder.effect.name]" - // world << "[disease]" return disease proc/spread_airborne(var/mob/living/carbon/mob) @@ -298,9 +290,17 @@ proc/airborne_can_reach(turf/source, turf/target) var/name = "Blanking effect" var/stage = 4 var/maxm = 1 + var/happensalways = 0 proc/activate(var/mob/living/carbon/mob,var/multiplier) proc/deactivate(var/mob/living/carbon/mob) +// ================================ +// ======= DISEASE SYMPTOMS ======= +// ================================ + +// Special diseases +// -------------------------------- + /datum/disease2/effect/alien name = "Unidentified Foreign Body" stage = 4 @@ -317,11 +317,68 @@ proc/airborne_can_reach(turf/source, turf/target) mob:gib() del D -/datum/disease2/effect/greater/gibbingtons - name = "Gibbingtons Syndrome" - stage = 4 +// Greater Diseases, Stage 1 +// -------------------------------- + + +/datum/disease2/effect/greater/gunck + name = "Flemmingtons" + stage = 1 activate(var/mob/living/carbon/mob,var/multiplier) - mob.gib() + mob << "\red Mucous runs down the back of your throat." + + +// Greater Diseases, Stage 2 +// -------------------------------- + +/datum/disease2/effect/greater/cough + name = "Anima Syndrome" + stage = 2 + activate(var/mob/living/carbon/mob,var/multiplier) + mob.say("*cough") + if(mob.virus2) mob.virus2.spread_airborne(mob) + if(mob.virus2) mob.virus2.spread_airborne(mob) + if(prob(2)) + var/obj/effect/decal/cleanable/mucus/this = new(mob.loc) + this.virus2 = mob.virus2 + +/datum/disease2/effect/greater/vomit + name = "Bad Stomach Syndrome" + stage = 2 + activate(var/mob/living/carbon/mob,var/multiplier) + if(prob(20) && mob.nutrition > 200) + mob.vomit() + + +/datum/disease2/effect/greater/sneeze + name = "Coldingtons Effect" + stage = 2 + activate(var/mob/living/carbon/mob,var/multiplier) + mob.say("*sneeze") + if(mob.virus2) mob.virus2.spread_airborne(mob) + if(mob.virus2) mob.virus2.spread_airborne(mob) + if(prob(5)) + var/obj/effect/decal/cleanable/mucus/this = new(mob.loc) + this.anchored = 0 + step(this, mob.dir) + this.anchored = 1 + this.virus2 = mob.virus2 + +// Greater Diseases, Stage 3 +// -------------------------------- + +/datum/disease2/effect/greater/sleepy + name = "Resting syndrome" + stage = 3 + activate(var/mob/living/carbon/mob,var/multiplier) + mob.say("*collapse") + +/datum/disease2/effect/greater/mind + name = "Lazy mind syndrome" + stage = 3 + activate(var/mob/living/carbon/mob,var/multiplier) + mob.setBrainLoss(50) + /datum/disease2/effect/greater/hallucinations name = "Hallucinational Syndrome" @@ -329,12 +386,6 @@ proc/airborne_can_reach(turf/source, turf/target) activate(var/mob/living/carbon/mob,var/multiplier) mob.hallucination += 25 -/datum/disease2/effect/greater/radian - name = "Radian's syndrome" - stage = 4 - maxm = 2 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.radiation += (20*multiplier) /datum/disease2/effect/greater/toxins name = "Hyperacid Syndrome" @@ -356,6 +407,38 @@ proc/airborne_can_reach(turf/source, turf/target) activate(var/mob/living/carbon/mob,var/multiplier) shake_camera(mob,5*multiplier) + +/datum/disease2/effect/greater/telepathic + name = "Telepathy Syndrome" + stage = 3 + activate(var/mob/living/carbon/mob,var/multiplier) + mob.mutations |= 512 + +// Greater Diseases, Stage 4 +// -------------------------------- + +/datum/disease2/effect/greater/gibbingtons + name = "Gibbingtons Syndrome" + stage = 4 + activate(var/mob/living/carbon/mob,var/multiplier) + mob.gib() + + +/datum/disease2/effect/greater/blood_fountain + name = "Blood Fountain Syndrome" + stage = 4 + activate(var/mob/living/carbon/mob,var/multiplier) + if(prob(20)) + mob.visible_message("\red You see a fountain of blood erupt from [mob.name].","\red Something wet is leaking from you.","You hear a loud splash.") + mob.drip(50) + +/datum/disease2/effect/greater/radian + name = "Radian's syndrome" + stage = 4 + maxm = 2 + activate(var/mob/living/carbon/mob,var/multiplier) + mob.radiation += (20*multiplier) + /datum/disease2/effect/greater/fever name = "Fever syndrome" stage = 4 @@ -363,6 +446,7 @@ proc/airborne_can_reach(turf/source, turf/target) activate(var/mob/living/carbon/mob,var/multiplier) mob.adjustFireLoss(10 * multiplier) + /datum/disease2/effect/greater/weak_bones name = "Bone Density Syndrome" stage = 4 @@ -371,7 +455,7 @@ proc/airborne_can_reach(turf/source, turf/target) var/name = pick(mob.organs) var/datum/organ/external/organ = mob.organs[name] - if(!organ.broken) + if(!organ.broken && !organ.robot) mob.adjustBruteLoss(10) mob.visible_message("\red You hear a loud cracking sound coming from [mob.name].","\red Something feels like it shattered in your [organ.display_name]!","You hear a sickening crack.") mob.emote("scream") @@ -379,17 +463,6 @@ proc/airborne_can_reach(turf/source, turf/target) organ.wound = pick("broken","fracture","hairline fracture") //Randomise in future. Edit: Randomized. --SkyMarshal organ.perma_injury = 10 -/datum/disease2/effect/invisible - name = "Waiting Syndrome" - stage = 1 - activate(var/mob/living/carbon/mob,var/multiplier) - return - -/datum/disease2/effect/greater/telepathic - name = "Telepathy Syndrome" - stage = 3 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.mutations |= 512 /datum/disease2/effect/greater/monkey name = "Monkism syndrome" @@ -399,37 +472,6 @@ proc/airborne_can_reach(turf/source, turf/target) var/mob/living/carbon/human/h = mob h.monkeyize() -/datum/disease2/effect/greater/sneeze - name = "Coldingtons Effect" - stage = 2 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.say("*sneeze") - if(mob.virus2) mob.virus2.spread_airborne(mob) - if(mob.virus2) mob.virus2.spread_airborne(mob) - if(prob(5)) - var/obj/effect/decal/cleanable/mucus/this = new(mob.loc) - this.anchored = 0 - step(this, mob.dir) - this.anchored = 1 - this.virus2 = mob.virus2 - - -/datum/disease2/effect/greater/cough - name = "Anima Syndrome" - stage = 2 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.say("*cough") - if(mob.virus2) mob.virus2.spread_airborne(mob) - if(mob.virus2) mob.virus2.spread_airborne(mob) - if(prob(2)) - var/obj/effect/decal/cleanable/mucus/this = new(mob.loc) - this.virus2 = mob.virus2 - -/datum/disease2/effect/greater/gunck - name = "Flemmingtons" - stage = 1 - activate(var/mob/living/carbon/mob,var/multiplier) - mob << "\red Mucous runs down the back of your throat." /datum/disease2/effect/greater/killertoxins name = "Toxification syndrome" @@ -437,36 +479,9 @@ proc/airborne_can_reach(turf/source, turf/target) activate(var/mob/living/carbon/mob,var/multiplier) mob.adjustToxLoss(15) -/datum/disease2/effect/greater/sleepy - name = "Resting syndrome" - stage = 3 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.say("*collapse") -/datum/disease2/effect/greater/mind - name = "Lazy mind syndrome" - stage = 3 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.setBrainLoss(50) - -// lesser syndromes, partly just copypastes -/datum/disease2/effect/lesser/hallucinations - name = "Hallucinational Syndrome" - stage = 3 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.hallucination += 5 - -/datum/disease2/effect/lesser/mind - name = "Lazy mind syndrome" - stage = 3 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.setBrainLoss(20) - -/datum/disease2/effect/lesser/deaf - name = "Hard of hearing syndrome" - stage = 3 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.ear_deaf = 5 +// Lesser Diseases, Stage 1 +// -------------------------------- /datum/disease2/effect/lesser/gunck name = "Flemmingtons" @@ -474,13 +489,30 @@ proc/airborne_can_reach(turf/source, turf/target) activate(var/mob/living/carbon/mob,var/multiplier) mob << "\red Mucous runs down the back of your throat." -/datum/disease2/effect/lesser/radian - name = "Radian's syndrome" - stage = 4 - maxm = 3 +/datum/disease2/effect/lesser/fridge + name = "Refridgerator Syndrome" + stage = 1 activate(var/mob/living/carbon/mob,var/multiplier) - mob.radiation += 1 + if(prob(10)) mob << "\blue You feel extremely cold." + +/datum/disease2/effect/lesser/pale + name = "Ghost Effect" + stage = 1 + activate(var/mob/living/carbon/mob,var/multiplier) + mob << "\blue If you had a mirror, your reflection would probably look very pale.." + +/datum/disease2/effect/lesser/hoarse + name = "Hoarse Throat" + stage = 1 + happensalways = 1 // the mob will have a permanently sore throat + activate(var/mob/living/carbon/mob,var/multiplier) + mob.disease_symptoms |= DISEASE_HOARSE + if(prob(3)) mob << "\blue Your throat feels very sore.." + + +// Lesser Diseases, Stage 2 +// -------------------------------- /datum/disease2/effect/lesser/sneeze name = "Coldingtons Effect" stage = 2 @@ -506,19 +538,49 @@ proc/airborne_can_reach(turf/source, turf/target) var/obj/effect/decal/cleanable/mucus/this = new(mob.loc) this.virus2 = mob.virus2 -/*/datum/disease2/effect/lesser/arm - name = "Disarming Syndrome" - stage = 4 + +/datum/disease2/effect/lesser/nosebleed + name = "Nosebleed Effect" + stage = 2 activate(var/mob/living/carbon/mob,var/multiplier) - var/datum/organ/external/org = mob.organs["r_arm"] - org.take_damage(3,0,0,0) - mob << "\red You feel a sting in your right arm."*/ + if(prob(30)) + mob.drip(1) + +// Lesser Diseases, Stage 3 +// -------------------------------- + +/datum/disease2/effect/lesser/vomit + name = "Bad Stomach Syndrome" + stage = 3 + activate(var/mob/living/carbon/mob,var/multiplier) + if(prob(5) && mob.nutrition > 200) + mob.vomit() + + +// lesser syndromes, partly just copypastes +/datum/disease2/effect/lesser/hallucinations + name = "Hallucinational Syndrome" + stage = 3 + activate(var/mob/living/carbon/mob,var/multiplier) + mob.hallucination += 5 + +/datum/disease2/effect/lesser/mind + name = "Lazy mind syndrome" + stage = 3 + activate(var/mob/living/carbon/mob,var/multiplier) + mob.setBrainLoss(20) + +/datum/disease2/effect/lesser/deaf + name = "Hard of hearing syndrome" + stage = 3 + activate(var/mob/living/carbon/mob,var/multiplier) + mob.ear_deaf = 5 /datum/disease2/effect/lesser/hungry name = "Appetiser Effect" - stage = 3 + stage = 2 activate(var/mob/living/carbon/mob,var/multiplier) - mob.nutrition = max(0, mob.nutrition - 3) + mob.nutrition = max(0, mob.nutrition - 1) /datum/disease2/effect/lesser/groan name = "Groaning Syndrome" @@ -526,24 +588,12 @@ proc/airborne_can_reach(turf/source, turf/target) activate(var/mob/living/carbon/mob,var/multiplier) mob.say("*groan") -/datum/disease2/effect/lesser/fridge - name = "Refridgerator Syndrome" - stage = 1 - activate(var/mob/living/carbon/mob,var/multiplier) - mob.say("*shiver") - /datum/disease2/effect/lesser/twitch name = "Twitcher" stage = 3 activate(var/mob/living/carbon/mob,var/multiplier) - mob.say("*twitch") - -/datum/disease2/effect/lesser/pale - name = "Ghost Effect" - stage = 1 - activate(var/mob/living/carbon/mob,var/multiplier) - if(prob(10)) - mob.emote("me",1,"looks very pale.") + if(prob(5)) mob.say("*twitch") + if(prob(20)) mob << "\blue Your muscles feel twitchy.." /datum/disease2/effect/lesser/stumble name = "Poor Balance Syndrome" @@ -556,11 +606,32 @@ proc/airborne_can_reach(turf/source, turf/target) step(mob, pick(cardinal)) mob.emote("me",1,"stumbles over their own feet.") -/datum/disease2/effect/lesser/hoarse - name = "Hoarse Throat" + +// Lesser Diseases, Stage 4 +// -------------------------------- + + +/datum/disease2/effect/lesser/radian + name = "Radian's syndrome" + stage = 4 + maxm = 3 + activate(var/mob/living/carbon/mob,var/multiplier) + mob.radiation += 1 + +// ============ +// END SYMPTOMS +// ============ + + + + + +/datum/disease2/effect/invisible + name = "Waiting Syndrome" stage = 1 activate(var/mob/living/carbon/mob,var/multiplier) - mob.disease_symptoms |= DISEASE_HOARSE + return + var/global/const/DISEASE_HOARSE = 2 var/global/const/DISEASE_WHISPER = 4 @@ -579,7 +650,7 @@ var/global/const/DISEASE_WHISPER = 4 var/stage = 0 proc/runeffect(var/mob/living/carbon/human/mob,var/stage) - if(happensonce > -1 && effect.stage <= stage && prob(chance)) + if(effect.stage <= stage) if(effect.happensalways || (happensonce > -1 && prob(chance))) effect.activate(mob) if(happensonce == 1) happensonce = -1 diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm index 8f41138e108..2040d874324 100644 --- a/code/datums/datumvars.dm +++ b/code/datums/datumvars.dm @@ -393,7 +393,20 @@ client //All BYOND links pass through client/Topic() FIRST and are then directed to [hsrc]/Topic() by the ..() call at the end. client/Topic(href, href_list, hsrc) file("topic_log") << "[time2text(world.realtime, "DDD MMM DD YYYY")] at [time2text(world.timeofday, "hh:mm:ss")], [ckey], \"[url_encode(href)]\"" - sleep(10) + // build some more useful info + var/references = "" + for(var/href_key in href_list) + var/href_val = locate(href_list[href_key]) + references += "[href_key] = [href_val](" + if(istype(href_val,/datum)) + references += "[href_val:type]" + if(istype(href_val,/atom)) + references += " at [href_val:x],[href_val:y],[href_val:z]" + + references += "); " + file("topic_log") << references + + sleep(3) //search the href for script injection //This is a temporary measure if( findtext(href,"The current game mode is - Revolution RP!" -// world << "Some crewmembers are attempting to start a revolution!
\nRevolutionaries - Kill the Captain, HoP, and HoS. Convert other crewmembers (excluding the Captain, HoP, HoS, and security officers) to your cause. Protect your leaders.
\nPersonnel - Protect the Captain, HoP, and HoR. Kill the leaders of the revolution, and brainwash the other revolutionaries (by beating them in the head).
" /datum/game_mode/rp_revolution/send_intercept() var/intercepttext = "Cent. Com. Update Requested staus information:
" intercepttext += " Cent. Com has recently been contacted by the following syndicate affiliated organisations in your area, please investigate any information you may have:" var/list/possible_modes = list() - possible_modes.Add("revolution", "wizard", "nuke", "traitor", "malf") - possible_modes -= "nuke" + possible_modes.Add("revolution", "wizard", "traitor", "malf") var/number = pick(2, 3) var/i = 0 for(i = 0, i < number, i++) diff --git a/code/game/gamemodes/traitor/traitor.dm b/code/game/gamemodes/traitor/traitor.dm index c3d311e7adf..c80099fb9ca 100644 --- a/code/game/gamemodes/traitor/traitor.dm +++ b/code/game/gamemodes/traitor/traitor.dm @@ -78,6 +78,10 @@ /datum/game_mode/proc/forge_traitor_objectives(var/datum/mind/traitor) + var/datum/traitorinfo/info = new + info.ckey = traitor.key + info.starting_player_count = num_players() + info.starting_name = traitor.current.name if(istype(traitor.current, /mob/living/silicon)) var/datum/objective/assassinate/kill_objective = new kill_objective.owner = traitor @@ -92,11 +96,16 @@ var/datum/objective/block/block_objective = new block_objective.owner = traitor traitor.objectives += block_objective + info.starting_occupation = "AI" else + info.starting_occupation = (traitor.current:wear_id && traitor.current:wear_id:assignment ? traitor.current:wear_id:assignment : traitor.assigned_role) for(var/datum/objective/o in SelectObjectives((istype(traitor.current:wear_id, /obj/item/weapon/card/id) ? traitor.current:wear_id:assignment : traitor.assigned_role), traitor)) o.owner = traitor traitor.objectives += o + for(var/datum/objective/objective in traitor.objectives) + info.starting_objective += "[objective.explanation_text] " + logtraitors[traitor] = info return @@ -184,6 +193,15 @@ else world << "The [special_role_text] has failed!" //feedback_add_details("traitor_success","FAIL") + + var/datum/traitorinfo/info = logtraitors[traitor] + if (info) + var/DBConnection/dbcon = new() + dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]") + if(dbcon.IsConnected()) + var/DBQuery/query = dbcon.NewQuery("INSERT INTO `bay12`.`traitorlogs` (`CKey`, `Objective`, `Succeeded`, `Spawned`, `Occupation`, `PlayerCount`) VALUES ('[info.ckey]', [dbcon.Quote(info.starting_objective)], '[traitorwin]', '[dd_list2text(info.spawnlist, ";")]', '[info.starting_occupation]', '[info.starting_player_count]')") + query.Execute() + return 1 diff --git a/code/game/gamemodes/traitor/traitor_info.dm b/code/game/gamemodes/traitor/traitor_info.dm new file mode 100644 index 00000000000..d3d4b1a47d4 --- /dev/null +++ b/code/game/gamemodes/traitor/traitor_info.dm @@ -0,0 +1,7 @@ +/datum/traitorinfo + var/starting_objective = "" + var/starting_player_count = 0 + var/starting_occupation = "" + var/starting_name = "" + var/ckey = "" + var/list/spawnlist = list() \ No newline at end of file diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm index 4bdc2b9890e..c7f21390422 100644 --- a/code/game/jobs/job_controller.dm +++ b/code/game/jobs/job_controller.dm @@ -277,6 +277,7 @@ var/global/datum/controller/occupations/job_master if(!equipped) var/obj/item/clothing/glasses/G = H.glasses G.prescription = 1 + H.client.add_roundsjoined() H.update_clothing() return 1 diff --git a/code/game/vote.dm b/code/game/vote.dm index 0c87858e845..616cae49c55 100644 --- a/code/game/vote.dm +++ b/code/game/vote.dm @@ -106,16 +106,20 @@ world << "Result is \red Restart round." - world <<"\red World will reboot in 5 seconds" + if(vote.instant_restart) + world <<"\red World will reboot in 5 seconds" - //feedback_set_details("end_error","restart vote") + //feedback_set_details("end_error","restart vote") - if(blackbox) - blackbox.save_all_data_to_sql() + if(blackbox) + blackbox.save_all_data_to_sql() - sleep(50) - log_game("Rebooting due to restart vote") - world.Reboot() + sleep(50) + log_game("Rebooting due to restart vote") + world.Reboot() + else + // Call the shift change shuttle instead + init_shift_change() return @@ -256,10 +260,13 @@ usr << browse(text, "window=vote") else // voting to restart - text += "Vote to restart round in progress.
" + text += "Vote to call crew transfer shuttle round in progress.
" text += "[vote.endwait()] until voting is closed.
" - text += "Restart the world?
    " + if(vote.instant_restart) + text += "Restart the world? ONLY PRESS THIS IF THERE'S A ROUND-BREAKING GLITCH.
      " + else + text += "Call the Crew Transfer Shuttle?
        " var/list/VL = list("default","restart") @@ -391,6 +398,16 @@ if(M) M.vote() return + if(vote.mode == 0) + var/answer = alert(M,"Do you want to force an immediate restart? Only do this when there are round-breaking glitches, or risk being banned.","Immediate Reboot?","Yes","No") + + if(answer == "Yes") + vote.instant_restart = 1 + log_admin("[M.key] has initiated an instant reboot vote! This may be banworthy!") + message_admins("[M.key] has initiated an instant reboot vote! This may be banworthy!") + else + vote.instant_restart = 0 + if(!ticker && vote.mode == 1) if(going) world << "The game start has been delayed." @@ -398,6 +415,7 @@ vote.voting = 1 // now voting vote.votetime = world.timeofday + config.vote_period*10 // when the vote will end + spawn(config.vote_period*10) vote.endvote() diff --git a/code/modules/mob/death.dm b/code/modules/mob/death.dm index 3970dab6f09..ba3034ad531 100644 --- a/code/modules/mob/death.dm +++ b/code/modules/mob/death.dm @@ -47,6 +47,7 @@ /mob/proc/death(gibbed) timeofdeath = world.time + client.onDeath() var/cancel = 0 for(var/mob/M in world) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 005c693f8ed..6bf1114f09b 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -321,4 +321,24 @@ var/datum/organ/external/O = organs[name] if(O.name == zone) return O - return null \ No newline at end of file + return null + +/mob/living/carbon/proc/drip() + +/mob/living/carbon/proc/vomit() + // only humanoids and monkeys can vomit + if(!istype(src,/mob/living/carbon/human) && !istype(src,/mob/living/carbon/monkey)) + return + + // Make the human vomit on the floor + for(var/mob/O in viewers(world.view, src)) + O.show_message(text("\red [] throws up!", src), 1) + playsound(src.loc, 'splat.ogg', 50, 1) + + var/turf/location = loc + if (istype(location, /turf/simulated)) + location.add_vomit_floor(src, 1) + + nutrition -= 20 + adjustToxLoss(-3) + diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 0755df2b51b..df52c824503 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -164,7 +164,7 @@ if(B.id == "blood") B.data = list("donor"=src,"viruses"=null,"blood_DNA"=dna.unique_enzymes,"blood_type"=dna.b_type,"resistances"=null,"trace_chem"=null,"virus2"=(virus2 ? virus2.getcopy() : null),"antibodies"=0) -/mob/living/carbon/human/proc/drip(var/amt as num) +/mob/living/carbon/human/drip(var/amt as num) if(!amt) return diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 2544cfdaf2c..b30bc302ceb 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -431,20 +431,6 @@ if(breath) loc.assume_air(breath) - vomit() - // Make the human vomit on the floor - for(var/mob/O in viewers(world.view, src)) - O.show_message(text("\red [] throws up!", src), 1) - playsound(src.loc, 'splat.ogg', 50, 1) - - var/turf/location = loc - if (istype(location, /turf/simulated)) - location.add_vomit_floor(src, 1) - - nutrition -= 20 - adjustToxLoss(-3) - - get_breath_from_internal(volume_needed) if(internal) if (!contents.Find(internal)) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index ac0309f3a0a..8d2c0ae0ec5 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -488,9 +488,25 @@ set name = "Changelog" set category = "OOC" if (client) - src << browse_rsc('postcardsmall.jpg') - src << browse_rsc('somerights20.png') - src << browse_rsc('88x31.png') + src.getFiles('postcardsmall.jpg', + 'somerights20.png', + '88x31.png', + 'bug-minus.png', + 'cross-circle.png', + 'hard-hat-exclamation.png', + 'image-minus.png', + 'image-plus.png', + 'music-minus.png', + 'music-plus.png', + 'tick-circle.png', + 'wrench-screwdriver.png', + 'spell-check.png', + 'burn-exclamation.png', + 'chevron.png', + 'chevron-expand.png', + 'changelog.css', + 'changelog.js' + ) src << browse('changelog.html', "window=changes;size=675x650") client.changes = 1 @@ -1138,4 +1154,14 @@ note dizziness decrements automatically in the mob's Life() proc. /mob/proc/setBrainLoss(var/amount) brainloss = amount -// ++++ROCKDTBEN++++ MOB PROCS //END \ No newline at end of file +// ++++ROCKDTBEN++++ MOB PROCS //END + +/* + * Sends resource files to client cache + */ +/mob/proc/getFiles() + if(!isemptylist(args)) + for(var/file in args) + src << browse_rsc(file) + return 1 + return 0 diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index e80a0c2164a..f72051a457a 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -74,7 +74,7 @@ var/computer_id = null var/lastattacker = null var/lastattacked = null - var/attack_log = list( ) + var/list/attack_log = list( ) var/already_placed = 0.0 var/obj/machinery/machine = null var/other_mobs = null diff --git a/html/changelog.html b/html/changelog.html index 6f9f99e1f6d..ec5d41f73d2 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -36,7 +36,7 @@ Header Section -Baystation 12 Credit List +
        Baystation 12 Credit List
        @@ -56,6 +56,20 @@ Stuff which is in development and not yet visible to players or just code relate should be listed in the changelog upon commit though. Thanks. --> +
        +

        26 May 2012

        +

        Erthilo updated:

        +
          +
        • Added Flashkirby's RIG and cow sprites!
        • +
        • Removed and added some new AI Ion laws, credit: Ispil.
        • +
        + +

        Abi79 updated:

        +
          +
        • Everyone should now be able to see the properly formatted changelog.
        • +
        +
        +

        25 May 2012

        Erthilo updated:

        @@ -73,6 +87,7 @@ should be listed in the changelog upon commit though. Thanks. -->
      • Your nutrition now decreases at the same rate as before it was nerfed.
      • Low nutrition will now have a much smaller effect on your speed.
      • The hunger messages will start displaying a bit earlier.
      • +
      • A restart vote now calls the Crew Transfer Shuttle by default. A regular restart is still possible for the purpose of rebooting a glitched server.
      • diff --git a/icons/mob/head.dmi b/icons/mob/head.dmi index b9c2ad151c3..60ba5259430 100644 Binary files a/icons/mob/head.dmi and b/icons/mob/head.dmi differ diff --git a/icons/mob/livestock.dmi b/icons/mob/livestock.dmi index d83b8209668..43e485a297c 100644 Binary files a/icons/mob/livestock.dmi and b/icons/mob/livestock.dmi differ diff --git a/icons/mob/suit.dmi b/icons/mob/suit.dmi index 5d84e860d3e..cf186fb0405 100644 Binary files a/icons/mob/suit.dmi and b/icons/mob/suit.dmi differ diff --git a/icons/obj/clothing/hats.dmi b/icons/obj/clothing/hats.dmi index b30213d6e46..b9b08c6120b 100644 Binary files a/icons/obj/clothing/hats.dmi and b/icons/obj/clothing/hats.dmi differ diff --git a/icons/obj/clothing/suits.dmi b/icons/obj/clothing/suits.dmi index d642b66699b..510f9879d2c 100755 Binary files a/icons/obj/clothing/suits.dmi and b/icons/obj/clothing/suits.dmi differ