diff --git a/code/_helpers/names.dm b/code/_helpers/names.dm index 83383ea56a..0b26e51ac4 100644 --- a/code/_helpers/names.dm +++ b/code/_helpers/names.dm @@ -226,89 +226,3 @@ var/syndicate_code_response//Code response for traitors. code_phrase += ", " return code_phrase - -/* -//This proc tests the gen above. -/client/verb/test_code_phrase() - set name = "Generate Code Phrase" - set category = "Debug" - - world << "Code Phrase is: [generate_code_phrase()]" - return - - - This was an earlier attempt at code phrase system, aside from an even earlier attempt (and failure). - This system more or less works as intended--aside from being unfinished--but it's still very predictable. - Particularly, the phrase opening statements are pretty easy to recognize and identify when metagaming. - I think the above-used method solves this issue by using words in a sequence, providing for much greater flexibility. - /N - - switch(choice) - if(1) - syndicate_code_phrase += pick("I'm looking for","Have you seen","Maybe you've seen","I'm trying to find","I'm tracking") - syndicate_code_phrase += " " - syndicate_code_phrase += pick(pick(first_names_male,first_names_female)) - syndicate_code_phrase += " " - syndicate_code_phrase += pick(last_names) - syndicate_code_phrase += "." - if(2) - syndicate_code_phrase += pick("How do I get to","How do I find","Where is","Where do I find") - syndicate_code_phrase += " " - syndicate_code_phrase += pick("Escape","Engineering","Atmos","the bridge","the brig","Clown Planet","CentCom","the library","the chapel","a bathroom","Med Bay","Tool Storage","the escape shuttle","Robotics","a locker room","the living quarters","the gym","the autolathe","QM","the bar","the theater","the derelict") - syndicate_code_phrase += "?" - if(3) - if(prob(70)) - syndicate_code_phrase += pick("Get me","I want","I'd like","Make me") - syndicate_code_phrase += " a " - else - syndicate_code_phrase += pick("One") - syndicate_code_phrase += " " - syndicate_code_phrase += pick("vodka and tonic","gin fizz","bahama mama","manhattan","black Russian","whiskey soda","long island tea","margarita","Irish coffee"," manly dwarf","Irish cream","doctor's delight","Beepksy Smash","tequilla sunrise","brave bull","gargle blaster","bloody mary","whiskey cola","white Russian","vodka martini","martini","Cuba libre","kahlua","vodka","wine","moonshine") - syndicate_code_phrase += "." - if(4) - syndicate_code_phrase += pick("I wish I was","My dad was","His mom was","Where do I find","The hero this station needs is","I'd fuck","I wouldn't trust","Someone caught","HoS caught","Someone found","I'd wrestle","I wanna kill") - syndicate_code_phrase += " [pick("a","the")] " - syndicate_code_phrase += pick("wizard","ninja","xeno","lizard","slime","monkey","syndicate","cyborg","clown","space carp","singularity","singulo","mime") - syndicate_code_phrase += "." - if(5) - syndicate_code_phrase += pick("Do we have","Is there","Where is","Where's","Who's") - syndicate_code_phrase += " " - syndicate_code_phrase += "[pick(joblist)]" - syndicate_code_phrase += "?" - - switch(choice) - if(1) - if(prob(80)) - syndicate_code_response += pick("Try looking for them near","I they ran off to","Yes. I saw them near","Nope. I'm heading to","Try searching") - syndicate_code_response += " " - syndicate_code_response += pick("Escape","Engineering","Atmos","the bridge","the brig","Clown Planet","CentCom","the library","the chapel","a bathroom","Med Bay","Tool Storage","the escape shuttle","Robotics","a locker room","the living quarters","the gym","the autolathe","QM","the bar","the theater","the derelict") - syndicate_code_response += "." - else if(prob(60)) - syndicate_code_response += pick("No. I'm busy, sorry.","I don't have the time.","Not sure, maybe?","There is no time.") - else - syndicate_code_response += pick("*shrug*","*smile*","*blink*","*sigh*","*laugh*","*nod*","*giggle*") - if(2) - if(prob(80)) - syndicate_code_response += pick("Go to","Navigate to","Try","Sure, run to","Try searching","It's near","It's around") - syndicate_code_response += " the " - syndicate_code_response += pick("[pick("south","north","east","west")] maitenance door","nearby maitenance","teleporter","[pick("cold","dead")] space","morgue","vacuum","[pick("south","north","east","west")] hall ","[pick("south","north","east","west")] hallway","[pick("white","black","red","green","blue","pink","purple")] [pick("rabbit","frog","lion","tiger","panther","snake","facehugger")]") - syndicate_code_response += "." - else if(prob(60)) - syndicate_code_response += pick("Try asking","Ask","Talk to","Go see","Follow","Hunt down") - syndicate_code_response += " " - if(prob(50)) - syndicate_code_response += pick(pick(first_names_male,first_names_female)) - syndicate_code_response += " " - syndicate_code_response += pick(last_names) - else - syndicate_code_response += " the " - syndicate_code_response += "[pic(joblist)]" - syndicate_code_response += "." - else - syndicate_code_response += pick("*shrug*","*smile*","*blink*","*sigh*","*laugh*","*nod*","*giggle*") - if(3) - if(4) - if(5) - - return -*/ diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm index 8bc6cc0580..4859ce2239 100644 --- a/code/datums/datacore.dm +++ b/code/datums/datacore.dm @@ -37,7 +37,7 @@ if(PDA_Manifest.len) PDA_Manifest.Cut() - if(H.mind && (H.mind.assigned_role != "MODE")) + if(H.mind && !player_is_antag(H.mind, only_offstation_roles = 1)) var/assignment if(H.mind.role_alt_title) assignment = H.mind.role_alt_title diff --git a/code/datums/helper_datums/getrev.dm b/code/datums/helper_datums/getrev.dm index da4192df25..5d6400886e 100644 --- a/code/datums/helper_datums/getrev.dm +++ b/code/datums/helper_datums/getrev.dm @@ -1,11 +1,16 @@ var/global/datum/getrev/revdata = new() /datum/getrev + var/branch var/revision var/date var/showinfo /datum/getrev/New() + var/list/head_branch = file2list(".git/HEAD", "\n") + if(head_branch.len) + branch = copytext(head_branch[1], 17) + var/list/head_log = file2list(".git/logs/HEAD", "\n") for(var/line=head_log.len, line>=1, line--) if(head_log[line]) @@ -18,7 +23,9 @@ var/global/datum/getrev/revdata = new() if(unix_time) date = unix2date(unix_time) break + world.log << "Running revision:" + world.log << branch world.log << date world.log << revision return @@ -29,7 +36,7 @@ client/verb/showrevinfo() set desc = "Check the current server code revision" if(revdata.revision) - src << "Server revision: [revdata.date]" + src << "Server revision: [revdata.branch] - [revdata.date]" if(config.githuburl) src << "[revdata.revision]" else diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 5163bfb270..19cf48961e 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -213,7 +213,8 @@ if (!new_target) return var/objective_path = text2path("/datum/objective/[new_obj_type]") - if (new_target == "Free objective") + var/mob/living/M = new_target + if (!istype(M) || !M.mind || new_target == "Free objective") new_objective = new objective_path new_objective.owner = src new_objective:target = null @@ -221,9 +222,8 @@ else new_objective = new objective_path new_objective.owner = src - new_objective:target = new_target:mind - //Will display as special role if the target is set as MODE. Ninjas/commandos/nuke ops. - new_objective.explanation_text = "[objective_type] [new_target:real_name], the [new_target:mind:assigned_role=="MODE" ? (new_target:mind:special_role) : (new_target:mind:assigned_role)]." + new_objective:target = M.mind + new_objective.explanation_text = "[objective_type] [M.real_name], the [M.mind.special_role ? M.mind:special_role : M.mind:assigned_role]." if ("prevent") new_objective = new /datum/objective/block diff --git a/code/game/antagonist/_antagonist_setup.dm b/code/game/antagonist/_antagonist_setup.dm index ecfe15a237..fa99f001f3 100644 --- a/code/game/antagonist/_antagonist_setup.dm +++ b/code/game/antagonist/_antagonist_setup.dm @@ -71,9 +71,13 @@ var/global/list/antag_names_to_ids = list() return antag.current_antagonists return list() -/proc/player_is_antag(var/datum/mind/player) +/proc/player_is_antag(var/datum/mind/player, var/only_offstation_roles = 0) for(var/antag_type in all_antag_types) var/datum/antagonist/antag = all_antag_types[antag_type] + if(only_offstation_roles && !(antag.flags & ANTAG_OVERRIDE_JOB)) + continue if(player in antag.current_antagonists) return 1 + if(player in antag.pending_antagonists) + return 1 return 0 diff --git a/code/game/antagonist/antagonist_add.dm b/code/game/antagonist/antagonist_add.dm index e3c653a4e5..c16ea0a7c9 100644 --- a/code/game/antagonist/antagonist_add.dm +++ b/code/game/antagonist/antagonist_add.dm @@ -10,7 +10,8 @@ current_antagonists |= player if(flags & ANTAG_OVERRIDE_JOB) - player.assigned_role = "MODE" + player.assigned_role = role_text + player.special_role = role_text if(istype(player.current, /mob/dead)) create_default(player.current) diff --git a/code/game/antagonist/antagonist_create.dm b/code/game/antagonist/antagonist_create.dm index da0e5b33a1..461cdc9211 100644 --- a/code/game/antagonist/antagonist_create.dm +++ b/code/game/antagonist/antagonist_create.dm @@ -30,7 +30,7 @@ add_antagonist(M.mind, 1, 0, 1) // Equip them and move them to spawn. return M -/datum/antagonist/proc/create_id(var/assignment, var/mob/living/carbon/human/player) +/datum/antagonist/proc/create_id(var/assignment, var/mob/living/carbon/human/player, var/equip = 1) var/obj/item/weapon/card/id/W = new id_type(player) if(!W) return @@ -38,7 +38,7 @@ W.access |= default_access W.assignment = "[assignment]" W.registered_name = player.real_name - player.equip_to_slot_or_del(W, slot_wear_id) + if(equip) player.equip_to_slot_or_del(W, slot_wear_id) return W /datum/antagonist/proc/create_radio(var/freq, var/mob/living/carbon/human/player) diff --git a/code/game/antagonist/antagonist_print.dm b/code/game/antagonist/antagonist_print.dm index eaca01986c..76110e2b13 100644 --- a/code/game/antagonist/antagonist_print.dm +++ b/code/game/antagonist/antagonist_print.dm @@ -47,7 +47,7 @@ return text /datum/antagonist/proc/print_player_lite(var/datum/mind/ply) - var/role = ply.assigned_role == "MODE" ? "\improper[ply.special_role]" : "\improper[ply.assigned_role]" + var/role = ply.special_role ? "\improper[ply.special_role]" : "\improper[ply.assigned_role]" var/text = "
[ply.name] ([ply.key]) as \a [role] (" if(ply.current) if(ply.current.stat == DEAD) diff --git a/code/game/antagonist/outsider/raider.dm b/code/game/antagonist/outsider/raider.dm index c10ddf9876..c10fe6182a 100644 --- a/code/game/antagonist/outsider/raider.dm +++ b/code/game/antagonist/outsider/raider.dm @@ -86,7 +86,7 @@ var/datum/antagonist/raider/raiders /obj/item/weapon/gun/projectile/revolver, /obj/item/weapon/gun/projectile/pirate ) - + var/list/raider_holster = list( /obj/item/clothing/accessory/holster/armpit, /obj/item/clothing/accessory/holster/waist, @@ -207,14 +207,14 @@ var/datum/antagonist/raider/raiders //If equipping shoes failed, fall back to equipping sandals var/fallback_type = pick(/obj/item/clothing/shoes/sandal, /obj/item/clothing/shoes/jackboots/unathi) player.equip_to_slot_or_del(new fallback_type(player), slot_shoes) - + player.equip_to_slot_or_del(new new_uniform(player),slot_w_uniform) player.equip_to_slot_or_del(new new_glasses(player),slot_glasses) player.equip_to_slot_or_del(new new_helmet(player),slot_head) player.equip_to_slot_or_del(new new_suit(player),slot_wear_suit) equip_weapons(player) - var/obj/item/weapon/card/id/id = create_id("Visitor", player) + var/obj/item/weapon/card/id/id = create_id("Visitor", player, equip = 0) id.name = "[player.real_name]'s Passport" id.assignment = "Visitor" var/obj/item/weapon/storage/wallet/W = new(player) @@ -229,10 +229,10 @@ var/datum/antagonist/raider/raiders var/new_gun = pick(raider_guns) var/new_holster = pick(raider_holster) //raiders don't start with any backpacks, so let's be nice and give them a holster if they can use it. var/turf/T = get_turf(player) - + var/obj/item/primary = new new_gun(T) var/obj/item/clothing/accessory/holster/holster = null - + //Give some of the raiders a pirate gun as a secondary if(prob(60)) var/obj/item/secondary = new /obj/item/weapon/gun/projectile/pirate(T) @@ -242,7 +242,7 @@ var/datum/antagonist/raider/raiders secondary.loc = holster else player.equip_to_slot_or_del(secondary, slot_belt) - + if(primary.slot_flags & SLOT_HOLSTER) holster = new new_holster(T) holster.holstered = primary @@ -253,10 +253,10 @@ var/datum/antagonist/raider/raiders player.equip_to_slot_or_del(primary, slot_back) else player.put_in_any_hand_if_possible(primary) - + //If they got a projectile gun, give them a little bit of spare ammo equip_ammo(player, primary) - + if(holster) var/obj/item/clothing/under/uniform = player.w_uniform if(istype(uniform) && uniform.can_attach_accessory(holster)) diff --git a/code/game/gamemodes/endgame/supermatter_cascade/universe.dm b/code/game/gamemodes/endgame/supermatter_cascade/universe.dm index 8cd8765cd8..3374f8f9be 100644 --- a/code/game/gamemodes/endgame/supermatter_cascade/universe.dm +++ b/code/game/gamemodes/endgame/supermatter_cascade/universe.dm @@ -79,10 +79,9 @@ The access requirements on the Asteroid Shuttles' consoles have now been revoked C.req_access = list() C.req_one_access = list() - sleep(5 MINUTES) - ticker.station_explosion_cinematic(0,null) // TODO: Custom cinematic - - universe_has_ended = 1 + spawn(5 MINUTES) + ticker.station_explosion_cinematic(0,null) // TODO: Custom cinematic + universe_has_ended = 1 return /datum/universal_state/supermatter_cascade/proc/AreaSet() diff --git a/code/game/gamemodes/events.dm b/code/game/gamemodes/events.dm index f644391bf7..82f1cbce7f 100644 --- a/code/game/gamemodes/events.dm +++ b/code/game/gamemodes/events.dm @@ -326,7 +326,7 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is //AI laws for(var/mob/living/silicon/ai/M in living_mob_list) - if(M.stat != 2 && M.see_in_dark != 0) + if(M.stat != 2 && M.has_power) var/who2 = pick("ALIENS", "BEARS", "CLOWNS", "XENOS", "PETES", "BOMBS", "FETISHES", "WIZARDS", "SYNDICATE AGENTS", "CENTCOM OFFICERS", "SPACE PIRATES", "TRAITORS", "MONKEYS", "BEES", "CARP", "CRABS", "EELS", "BANDITS", "LIGHTS") var/what2 = pick("BOLTERS", "STAVES", "DICE", "SINGULARITIES", "TOOLBOXES", "NETTLES", "AIRLOCKS", "CLOTHES", "WEAPONS", "MEDKITS", "BOMBS", "CANISTERS", "CHAIRS", "BBQ GRILLS", "ID CARDS", "CAPTAINS") var/what2pref = pick("SOFT", "WARM", "WET", "COLD", "ICY", "SEXY", "UGLY", "CUBAN") diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index 8a2f46598b..9ae0320b67 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -391,7 +391,7 @@ var/global/list/additional_antag_types = list() suspects += man for(var/mob/M in suspects) - if(M.mind.assigned_role == "MODE") + if(player_is_antag(M.mind, only_offstation_roles = 1)) continue switch(rand(1, 100)) if(1 to 50) diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm index 45b2b9829f..1b03c2e11e 100644 --- a/code/game/gamemodes/gameticker.dm +++ b/code/game/gamemodes/gameticker.dm @@ -288,7 +288,7 @@ var/global/datum/controller/gameticker/ticker if(player && player.mind && player.mind.assigned_role) if(player.mind.assigned_role == "Captain") captainless=0 - if(player.mind.assigned_role != "MODE") + if(!player_is_antag(player.mind, only_offstation_roles = 1)) job_master.EquipRank(player, player.mind.assigned_role, 0) UpdateFactionList(player) equip_custom_items(player) diff --git a/code/game/gamemodes/intercept_report.dm b/code/game/gamemodes/intercept_report.dm index 2ee0fe7d91..bfe0e1d90d 100644 --- a/code/game/gamemodes/intercept_report.dm +++ b/code/game/gamemodes/intercept_report.dm @@ -54,7 +54,7 @@ "Small Prick" ) - +// TODO: Update to new antagonist system. /datum/intercept_text/proc/build(var/mode_type, datum/mind/correct_person) switch(mode_type) if("revolution") @@ -88,29 +88,6 @@ else return null -// NOTE: Commentted out was the code which showed the chance of someone being an antag. If you want to re-add it, just uncomment the code. - -/* -/datum/intercept_text/proc/pick_mob() - var/list/dudes = list() - for(var/mob/living/carbon/human/man in player_list) - if (!man.mind) continue - if (man.mind.assigned_role=="MODE") continue - dudes += man - if(dudes.len==0) - return null - return pick(dudes) - - -/datum/intercept_text/proc/pick_fingerprints() - var/mob/living/carbon/human/dude = src.pick_mob() - //if (!dude) return pick_fingerprints() //who coded that is totally crasy or just a traitor. -- rastaf0 - if(dude) - return num2text(md5(dude.dna.uni_identity)) - else - return num2text(md5(num2text(rand(1,10000)))) -*/ - /datum/intercept_text/proc/get_suspect() var/list/dudes = list() for(var/mob/living/carbon/human/man in player_list) if(man.client && man.client.prefs.nanotrasen_relation == "Opposed") @@ -205,32 +182,6 @@ var/cname = pick(src.changeling_names) var/orgname1 = pick(src.org_names_1) var/orgname2 = pick(src.org_names_2) - /* - var/changeling_name - var/changeling_job - var/prob_right_dude = rand(prob_correct_person_lower, prob_correct_person_higher) - var/prob_right_job = rand(prob_correct_job_lower, prob_correct_job_higher) - if(prob(prob_right_job)) - if(correct_person) - if(correct_person:assigned_role=="MODE") - changeling_job = pick(joblist) - else - changeling_job = correct_person:assigned_role - else - changeling_job = pick(joblist) - if(prob(prob_right_dude) && ticker.mode == "changeling") - if(correct_person:assigned_role=="MODE") - changeling_name = correct_person:current - else - changeling_name = src.pick_mob() - else - changeling_name = src.pick_mob() - */ - src.text += "

We have received a report that a dangerous alien lifeform known only as \"[cname]\" may have infiltrated your crew. " - /* - src.text += "Our intelligence suggests a [prob_right_job]% chance that a [changeling_job] on board your station has been replaced by the alien. " - src.text += "Additionally, the report indicates a [prob_right_dude]% chance that [changeling_name] may have been in contact with the lifeform at a recent social gathering. " - */ src.text += "These lifeforms are assosciated with the [orgname1] [orgname2] and may be attempting to acquire sensitive materials on their behalf. " src.text += "Please take care not to alarm the crew, as [cname] may take advantage of a panic situation. Remember, they can be anybody, suspect everybody!" diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index 0ad6e7fc5f..16d50cee4d 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -703,7 +703,7 @@ datum/objective/heist/kidnap var/list/priority_targets = list() for(var/datum/mind/possible_target in ticker.minds) - if(possible_target != owner && ishuman(possible_target.current) && (possible_target.current.stat != 2) && (possible_target.assigned_role != "MODE")) + if(possible_target != owner && ishuman(possible_target.current) && (possible_target.current.stat != 2) && (!possible_target.special_role)) possible_targets += possible_target for(var/role in roles) if(possible_target.assigned_role == role) diff --git a/code/game/jobs/job/job.dm b/code/game/jobs/job/job.dm index 8b51b74a77..33cc45b69f 100644 --- a/code/game/jobs/job/job.dm +++ b/code/game/jobs/job/job.dm @@ -23,6 +23,12 @@ /datum/job/proc/equip(var/mob/living/carbon/human/H) return 1 +/datum/job/proc/equip_backpack(var/mob/living/carbon/human/H) + switch(H.backbag) + if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back) + if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back) + if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back) + /datum/job/proc/equip_survival(var/mob/living/carbon/human/H) if(!H) return 0 H.species.equip_survival_gear(H,0) diff --git a/code/game/jobs/job/silicon.dm b/code/game/jobs/job/silicon.dm index 8aab746400..a76317af03 100644 --- a/code/game/jobs/job/silicon.dm +++ b/code/game/jobs/job/silicon.dm @@ -13,11 +13,15 @@ equip(var/mob/living/carbon/human/H) if(!H) return 0 return 1 - + equip_survival(var/mob/living/carbon/human/H) if(!H) return 0 return 1 + equip_backpack(var/mob/living/carbon/human/H) + if(!H) return 0 + return 1 + /datum/job/ai/is_position_available() return (empty_playable_ai_cores.len != 0) @@ -44,6 +48,10 @@ equip_survival(var/mob/living/carbon/human/H) if(!H) return 0 return 1 + + equip_backpack(var/mob/living/carbon/human/H) + if(!H) return 0 + return 1 return 1 /datum/job/cyborg/equip_preview(mob/living/carbon/human/H) diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm index 1a4fb368aa..143a603ec1 100644 --- a/code/game/jobs/job_controller.dm +++ b/code/game/jobs/job_controller.dm @@ -348,7 +348,6 @@ var/global/datum/controller/occupations/job_master proc/EquipRank(var/mob/living/carbon/human/H, var/rank, var/joined_late = 0) - if(!H) return null var/datum/job/job = GetJob(rank) @@ -393,6 +392,7 @@ var/global/datum/controller/occupations/job_master spawn_in_storage += thing //Equip job items. job.equip(H) + job.equip_backpack(H) job.equip_survival(H) job.apply_fingerprints(H) diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index 8534128fb7..25894ae91e 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -5,7 +5,7 @@ desc = "Used to view, edit and maintain security records" icon_state = "security" light_color = "#a91515" - req_one_access = list(access_security, access_forensics_lockers) + req_one_access = list(access_security, access_forensics_lockers, access_lawyer) circuit = "/obj/item/weapon/circuitboard/secure_data" var/obj/item/weapon/card/id/scan = null var/authenticated = null diff --git a/code/game/machinery/wishgranter.dm b/code/game/machinery/wishgranter.dm index 71b7de64c0..3fd4fae3e8 100644 --- a/code/game/machinery/wishgranter.dm +++ b/code/game/machinery/wishgranter.dm @@ -45,7 +45,6 @@ if (!(XRAY in user.mutations)) user.mutations.Add(XRAY) user.sight |= (SEE_MOBS|SEE_OBJS|SEE_TURFS) - user.see_in_dark = 8 user.see_invisible = SEE_INVISIBLE_LEVEL_TWO if (!(COLD_RESISTANCE in user.mutations)) @@ -67,4 +66,4 @@ show_objectives(user.mind) user << "You have a very bad feeling about this." - return \ No newline at end of file + return diff --git a/code/game/objects/effects/chem/foam.dm b/code/game/objects/effects/chem/foam.dm index fb5b6f8ca7..99a68e1363 100644 --- a/code/game/objects/effects/chem/foam.dm +++ b/code/game/objects/effects/chem/foam.dm @@ -39,6 +39,8 @@ if(!metal && reagents) var/turf/T = get_turf(src) reagents.touch_turf(T) + for(var/obj/O in T) + reagents.touch_obj(O) /obj/effect/effect/foam/process() if(--amount < 0) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 9420704559..4c5a9dc39b 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -70,9 +70,10 @@ /obj/item/Destroy() if(ismob(loc)) var/mob/m = loc - m.unEquip(src, 1) + m.drop_from_inventory(src) m.update_inv_r_hand() m.update_inv_l_hand() + src.loc = null return ..() /obj/item/device diff --git a/code/game/objects/items/weapons/AI_modules.dm b/code/game/objects/items/weapons/AI_modules.dm index 5f8403246f..cb1fff4599 100755 --- a/code/game/objects/items/weapons/AI_modules.dm +++ b/code/game/objects/items/weapons/AI_modules.dm @@ -40,7 +40,7 @@ AI MODULES if (comp.current.stat == 2 || comp.current.control_disabled == 1) usr << "Upload failed. No signal is being detected from the AI." - else if (comp.current.see_in_dark == 0) + else if (!comp.current.has_power) usr << "Upload failed. Only a faint signal is being detected from the AI, and it is not responding to our requests. It may be low on power." else src.transmitInstructions(comp.current, usr) diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm index 9afe2e83e4..17a27aa85e 100644 --- a/code/game/objects/items/weapons/cards_ids.dm +++ b/code/game/objects/items/weapons/cards_ids.dm @@ -110,9 +110,10 @@ ..() spawn(30) if(istype(loc, /mob/living/carbon/human)) - blood_type = loc:dna:b_type - dna_hash = loc:dna:unique_enzymes - fingerprint_hash = md5(loc:dna:uni_identity) + var/mob/living/carbon/human/H = loc + blood_type = H.dna.b_type + dna_hash = H.dna.unique_enzymes + fingerprint_hash = md5(H.dna.uni_identity) /obj/item/weapon/card/id/attack_self(mob/user as mob) for(var/mob/O in viewers(user, null)) diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm index c11720d1e8..4e444a5ebc 100644 --- a/code/game/objects/items/weapons/cigs_lighters.dm +++ b/code/game/objects/items/weapons/cigs_lighters.dm @@ -206,7 +206,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM throw_speed = 0.5 item_state = "cigoff" w_class = 1 - slot_flags = SLOT_EARS + slot_flags = SLOT_EARS | SLOT_MASK attack_verb = list("burnt", "singed") icon_on = "cigon" //Note - these are in masks.dmi not in cigarette.dmi icon_off = "cigoff" diff --git a/code/game/objects/items/weapons/material/knives.dm b/code/game/objects/items/weapons/material/knives.dm index 24d17c1742..0ddf3fa894 100644 --- a/code/game/objects/items/weapons/material/knives.dm +++ b/code/game/objects/items/weapons/material/knives.dm @@ -16,7 +16,7 @@ sharp = 1 ..() //Updates force. throwforce = max(3,force-3) - hitsound = initial(hitsound) + hitsound = 'sound/weapons/bladeslice.ogg' icon_state += "_open" w_class = 3 attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") @@ -24,7 +24,7 @@ force = 3 edge = 0 sharp = 0 - hitsound = null + hitsound = initial(hitsound) icon_state = initial(icon_state) w_class = initial(w_class) attack_verb = initial(attack_verb) diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm index 2e76ad3c88..23892a0550 100644 --- a/code/game/objects/structures/crates_lockers/crates.dm +++ b/code/game/objects/structures/crates_lockers/crates.dm @@ -154,15 +154,20 @@ user << "The crate appears to be broken." return if(src.allowed(user)) - src.locked = !src.locked - for(var/mob/O in viewers(user, 3)) - if((O.client && !( O.blinded ))) - O << "The crate has been [locked ? null : "un"]locked by [user]." - overlays.Cut() - overlays += locked ? redlight : greenlight + set_locked(!locked, user) else user << "Access Denied" +/obj/structure/closet/crate/secure/proc/set_locked(var/newlocked, mob/user = null) + if(locked == newlocked) return + + locked = newlocked + if(user) + for(var/mob/O in viewers(user, 3)) + O.show_message( "The crate has been [locked ? null : "un"]locked by [user].", 1) + overlays.Cut() + overlays += locked ? redlight : greenlight + /obj/structure/closet/crate/secure/verb/verb_togglelock() set src in oview(1) // One square distance set category = "Object" diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm index ace39fafff..083d33259b 100644 --- a/code/game/objects/structures/morgue.dm +++ b/code/game/objects/structures/morgue.dm @@ -20,6 +20,12 @@ var/obj/structure/m_tray/connected = null anchored = 1.0 +/obj/structure/morgue/Destroy() + if(connected) + qdel(connected) + connected = null + return ..() + /obj/structure/morgue/proc/update() if (src.connected) src.icon_state = "morgue0" @@ -63,8 +69,8 @@ if (!( A.anchored )) A.loc = src playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) - //src.connected = null qdel(src.connected) + src.connected = null else playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) src.connected = new /obj/structure/m_tray( src.loc ) @@ -79,8 +85,8 @@ src.connected.icon_state = "morguet" src.connected.set_dir(src.dir) else - //src.connected = null qdel(src.connected) + src.connected = null src.add_fingerprint(user) update() return @@ -112,11 +118,10 @@ src.icon_state = "morgue0" for(var/atom/movable/A as mob|obj in src) A.loc = src.connected.loc - //Foreach goto(106) src.connected.icon_state = "morguet" else - //src.connected = null qdel(src.connected) + src.connected = null return @@ -134,6 +139,12 @@ anchored = 1 throwpass = 1 +/obj/structure/m_tray/Destroy() + if(connected && connected.connected == src) + connected.connected = null + connected = null + return ..() + /obj/structure/m_tray/attack_hand(mob/user as mob) if (src.connected) for(var/atom/movable/A as mob|obj in src.loc) @@ -179,6 +190,12 @@ var/id = 1 var/locked = 0 +/obj/structure/crematorium/Destroy() + if(connected) + qdel(connected) + connected = null + return ..() + /obj/structure/crematorium/proc/update() if (src.connected) src.icon_state = "crema0" @@ -278,11 +295,10 @@ src.icon_state = "crema0" for(var/atom/movable/A as mob|obj in src) A.loc = src.connected.loc - //Foreach goto(106) src.connected.icon_state = "cremat" else - //src.connected = null qdel(src.connected) + src.connected = null return /obj/structure/crematorium/proc/cremate(atom/A, mob/user as mob) diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index bee9c69485..d4472905f9 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -331,3 +331,11 @@ /turf/proc/process() return PROCESS_KILL + +/turf/proc/contains_dense_objects() + if(density) + return 1 + for(var/atom/A in src) + if(A.density && !(A.flags & ON_BORDER)) + return 1 + return 0 diff --git a/code/game/verbs/suicide.dm b/code/game/verbs/suicide.dm index 176cb4f973..cad22a9e27 100644 --- a/code/game/verbs/suicide.dm +++ b/code/game/verbs/suicide.dm @@ -11,15 +11,7 @@ src << "You can't commit suicide before the game starts!" return - - var/permitted = 0 - var/list/allowed = list("Syndicate","traitor","Wizard","Head Revolutionary","Cultist","Changeling") - for(var/T in allowed) - if(mind.special_role == T) - permitted = 1 - break - - if(!permitted) + if(!player_is_antag(mind)) message_admins("[ckey] has tried to suicide, but they were not permitted due to not being antagonist as human.", 1) src << "No. Adminhelp if there is a legitimate reason." return diff --git a/code/modules/admin/DB ban/functions.dm b/code/modules/admin/DB ban/functions.dm index a361328cac..cc26d7153d 100644 --- a/code/modules/admin/DB ban/functions.dm +++ b/code/modules/admin/DB ban/functions.dm @@ -302,7 +302,11 @@ datum/admins/proc/DB_ban_unban_by_id(var/id) output += "" for(var/j in nonhuman_positions) output += "" - for(var/j in list("traitor","changeling","operative","revolutionary","cultist","wizard")) + var/list/bantypes = list("traitor","changeling","operative","revolutionary","cultist","wizard") //For legacy bans. + for(var/antag_type in all_antag_types) // Grab other bans. + var/datum/antagonist/antag = all_antag_types[antag_type] + bantypes |= antag.bantype + for(var/j in bantypes) output += "" output += "" output += "Reason:

" diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index b240f087a9..e1ce028c13 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -441,7 +441,7 @@ Traitors and the like can also be revived with the previous role mostly intact. //Announces the character on all the systems, based on the record. if(!issilicon(new_character))//If they are not a cyborg/AI. - if(!record_found&&new_character.mind.assigned_role!="MODE")//If there are no records for them. If they have a record, this info is already in there. MODE people are not announced anyway. + if(!record_found && !player_is_antag(new_character.mind, only_offstation_roles = 1)) //If there are no records for them. If they have a record, this info is already in there. MODE people are not announced anyway. //Power to the user! if(alert(new_character,"Warning: No data core entry detected. Would you like to announce the arrival of this character by adding them to various databases, such as medical records?",,"No","Yes")=="Yes") data_core.manifest_inject(new_character) @@ -468,7 +468,7 @@ Traitors and the like can also be revived with the previous role mostly intact. for(var/mob/living/silicon/ai/M in mob_list) if (M.stat == 2) usr << "Upload failed. No signal is being detected from the AI." - else if (M.see_in_dark == 0) + else if (!M.has_power) usr << "Upload failed. Only a faint signal is being detected from the AI, and it is not responding to our requests. It may be low on power." else M.add_ion_law(input) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 35c206fd4b..0cafdb182e 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -4,6 +4,7 @@ var/list/preferences_datums = list() var/global/list/special_roles = list( //keep synced with the defines BE_* in setup.dm --rastaf //some autodetection here. +// TODO: Update to new antagonist system. "traitor" = IS_MODE_COMPILED("traitor"), // 0 "operative" = IS_MODE_COMPILED("nuclear"), // 1 "changeling" = IS_MODE_COMPILED("changeling"), // 2 diff --git a/code/modules/clothing/spacesuits/alien.dm b/code/modules/clothing/spacesuits/alien.dm index d42df195e4..4742642554 100644 --- a/code/modules/clothing/spacesuits/alien.dm +++ b/code/modules/clothing/spacesuits/alien.dm @@ -66,7 +66,6 @@ icon_state = "vox-carapace" item_state = "vox-carapace" desc = "A glowing visor, perhaps stolen from a depressed Cylon." - body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS /obj/item/clothing/suit/space/vox/carapace name = "alien carapace armour" diff --git a/code/modules/clothing/spacesuits/rig/modules/ninja.dm b/code/modules/clothing/spacesuits/rig/modules/ninja.dm index ef2dff6738..6b1362a766 100644 --- a/code/modules/clothing/spacesuits/rig/modules/ninja.dm +++ b/code/modules/clothing/spacesuits/rig/modules/ninja.dm @@ -119,10 +119,8 @@ H << "You cannot use your teleporter on this Z-level." return 0 - for(var/atom/A in T) - if(A.density && !(A.flags & ON_BORDER)) - H << "You cannot teleport to a location with solid objects." - return 0 + if(T.contains_dense_objects()) + H << "You cannot teleport to a location with solid objects." phase_out(H,get_turf(H)) H.loc = T diff --git a/code/modules/events/ion_storm.dm b/code/modules/events/ion_storm.dm index 7545252824..5720e08c81 100644 --- a/code/modules/events/ion_storm.dm +++ b/code/modules/events/ion_storm.dm @@ -8,7 +8,7 @@ endWhen = rand(500, 1500) // command_alert("The station has entered an ion storm. Monitor all electronic equipment for malfunctions", "Anomaly Alert") for (var/mob/living/carbon/human/player in player_list) - if( !player.mind || player.mind.assigned_role == "MODE" || player.client.inactivity > MinutesToTicks(10)) + if( !player.mind || player_is_antag(player.mind, only_offstation_roles = 1) || player.client.inactivity > MinutesToTicks(10)) continue players += player.real_name diff --git a/code/modules/lighting/_lighting_defs.dm b/code/modules/lighting/_lighting_defs.dm index 57e6cc22d2..21fdafdaeb 100644 --- a/code/modules/lighting/_lighting_defs.dm +++ b/code/modules/lighting/_lighting_defs.dm @@ -3,7 +3,6 @@ #define LIGHTING_FALLOFF 1 // type of falloff to use for lighting; 1 for circular, 2 for square #define LIGHTING_LAMBERTIAN 1 // use lambertian shading for light sources #define LIGHTING_HEIGHT 1 // height off the ground of light sources on the pseudo-z-axis, you should probably leave this alone -#define LIGHTING_TRANSITIONS 1 // smooth, animated transitions, similar to /tg/station #define LIGHTING_ROUND_VALUE (1 / 128) //Value used to round lumcounts, values smaller than 1/255 don't matter (if they do, thanks sinking points), greater values will make lighting less precise, but in turn increase performance, VERY SLIGHTLY. #define LIGHTING_LAYER 10 // drawing layer for lighting overlays diff --git a/code/modules/lighting/light_source.dm b/code/modules/lighting/light_source.dm index a71550268c..8322e14098 100644 --- a/code/modules/lighting/light_source.dm +++ b/code/modules/lighting/light_source.dm @@ -143,15 +143,19 @@ if(!strength) //Don't add turfs that aren't affected to the affected turfs. continue - effect_r[T.lighting_overlay] = round(lum_r * strength, LIGHTING_ROUND_VALUE) - effect_g[T.lighting_overlay] = round(lum_g * strength, LIGHTING_ROUND_VALUE) - effect_b[T.lighting_overlay] = round(lum_b * strength, LIGHTING_ROUND_VALUE) + effect_r += round(lum_r * strength, LIGHTING_ROUND_VALUE) + effect_g += round(lum_g * strength, LIGHTING_ROUND_VALUE) + effect_b += round(lum_b * strength, LIGHTING_ROUND_VALUE) T.lighting_overlay.update_lumcount( round(lum_r * strength, LIGHTING_ROUND_VALUE), round(lum_g * strength, LIGHTING_ROUND_VALUE), round(lum_b * strength, LIGHTING_ROUND_VALUE) ) + else + effect_r += 0 + effect_g += 0 + effect_b += 0 if(!T.affecting_lights) T.affecting_lights = list() @@ -161,12 +165,15 @@ /datum/light_source/proc/remove_lum() applied = 0 + var/i = 1 for(var/turf/T in effect_turf) if(T.affecting_lights) T.affecting_lights -= src if(T.lighting_overlay) - T.lighting_overlay.update_lumcount(-effect_r[T.lighting_overlay], -effect_g[T.lighting_overlay], -effect_b[T.lighting_overlay]) + T.lighting_overlay.update_lumcount(-effect_r[i], -effect_g[i], -effect_b[i]) + + i++ effect_r.Cut() effect_g.Cut() diff --git a/code/modules/lighting/lighting_overlay.dm b/code/modules/lighting/lighting_overlay.dm index a0bba14eeb..a22023d983 100644 --- a/code/modules/lighting/lighting_overlay.dm +++ b/code/modules/lighting/lighting_overlay.dm @@ -8,7 +8,6 @@ icon_state = "light1" layer = LIGHTING_LAYER invisibility = INVISIBILITY_LIGHTING - blend_mode = BLEND_MULTIPLY color = "#000000" var/lum_r @@ -53,32 +52,31 @@ lighting_update_overlays += src /atom/movable/lighting_overlay/proc/update_overlay() - var/mx = max(lum_r, lum_g, lum_b) - . = 1 // factor - if(mx > 1) - . = 1/mx - #if LIGHTING_TRANSITIONS == 1 - animate(src, - color = rgb(lum_r * 255 * ., lum_g * 255 * ., lum_b * 255 * .), - LIGHTING_INTERVAL - 1 - ) - #else - color = rgb(lum_r * 255 * ., lum_g * 255 * ., lum_b * 255 * .) - #endif - var/turf/T = loc if(istype(T)) //Incase we're not on a turf, pool ourselves, something happened. - if(color != "#000000") - T.luminosity = 1 - else //No light, set the turf's luminosity to 0 to remove it from view() - #if LIGHTING_TRANSITIONS == 1 - spawn(LIGHTING_INTERVAL - 1) + if(lum_r == lum_g && lum_r == lum_b) //greyscale + blend_mode = BLEND_OVERLAY + if(lum_r <= 0) + T.luminosity = 0 + color = "#000000" + alpha = 255 + else + T.luminosity = 1 + color = "#000000" + alpha = (1 - min(lum_r, 1)) * 255 + else + alpha = 255 + var/mx = max(lum_r, lum_g, lum_b) + . = 1 // factor + if(mx > 1) + . = 1/mx + blend_mode = BLEND_MULTIPLY + color = rgb(lum_r * 255 * ., lum_g * 255 * ., lum_b * 255 * .) + if(color != "#000000") + T.luminosity = 1 + else //No light, set the turf's luminosity to 0 to remove it from view() T.luminosity = 0 - #else - T.luminosity = 0 - #endif - else warning("A lighting overlay realised its loc was NOT a turf (actual loc: [loc][loc ? ", " + loc.type : ""]) in update_overlay() and got pooled!") qdel(src) diff --git a/code/modules/lighting/~lighting_undefs.dm b/code/modules/lighting/~lighting_undefs.dm index 9308cc6b65..772f70557a 100644 --- a/code/modules/lighting/~lighting_undefs.dm +++ b/code/modules/lighting/~lighting_undefs.dm @@ -3,7 +3,6 @@ #undef LIGHTING_FALLOFF #undef LIGHTING_LAMBERTIAN #undef LIGHTING_HEIGHT -#undef LIGHTING_TRANSITIONS #undef LIGHTING_RESOLUTION #undef LIGHTING_LAYER diff --git a/code/modules/mining/abandonedcrates.dm b/code/modules/mining/abandonedcrates.dm index a8caa32e47..7fa2022d36 100644 --- a/code/modules/mining/abandonedcrates.dm +++ b/code/modules/mining/abandonedcrates.dm @@ -4,8 +4,8 @@ icon_state = "securecrate" icon_opened = "securecrateopen" icon_closed = "securecrate" - var/code = null - var/lastattempt = null + var/list/code = list() + var/list/lastattempt = list() var/attempts = 10 var/codelen = 4 locked = 1 @@ -14,12 +14,12 @@ ..() var/list/digits = list("1", "2", "3", "4", "5", "6", "7", "8", "9", "0") - code = "" - for(var/i = 0, i < codelen, i++) - var/dig = pick(digits) - code += dig - digits -= dig // Player can enter codes with matching digits, but there are never matching digits in the answer + for(var/i in 1 to codelen) + code += pick(digits) + generate_loot() + +/obj/structure/closet/crate/secure/loot/proc/generate_loot() var/loot = rand(1, 100) switch(loot) if(1 to 5) // Common things go, 5% @@ -145,60 +145,65 @@ new/obj/item/clothing/head/bearpelt(src) /obj/structure/closet/crate/secure/loot/togglelock(mob/user as mob) - if(locked) - user << "The crate is locked with a Deca-code lock." - var/input = input(usr, "Enter [codelen] digits.", "Deca-Code Lock", "") as text - if(in_range(src, user)) - if (input == code) - user << "The crate unlocks!" - locked = 0 - overlays.Cut() - overlays += greenlight - else if (input == null || length(input) != codelen) - user << "You leave the crate alone." - else - user << "A red light flashes." - lastattempt = input - attempts-- - if (attempts == 0) - user << "The crate's anti-tamper system activates!" - var/turf/T = get_turf(src.loc) - explosion(T, 0, 0, 0, 1) - qdel(src) - return - else - user << "You attempt to interact with the device using a hand gesture, but it appears this crate is from before the DECANECT came out." - return + if(!locked) + return + + user << "The crate is locked with a Deca-code lock." + var/input = input(user, "Enter [codelen] digits.", "Deca-Code Lock", "") as text + if(!Adjacent(user)) + return + + if(input == null || length(input) != codelen) + user << "You leave the crate alone." + else if(check_input(input)) + user << "The crate unlocks!" + playsound(user, 'sound/machines/lockreset.ogg', 50, 1) + set_locked(0) else - return ..() + visible_message("A red light on \the [src]'s control panel flashes briefly.") + attempts-- + if (attempts == 0) + user << "The crate's anti-tamper system activates!" + var/turf/T = get_turf(src.loc) + explosion(T, 0, 0, 1, 2) + del(src) /obj/structure/closet/crate/secure/loot/emag_act(var/remaining_charges, var/mob/user) if (locked) user << "The crate unlocks!" locked = 0 +/obj/structure/closet/crate/secure/loot/proc/check_input(var/input) + if(length(input) != codelen) + return 0 + + . = 1 + lastattempt.Cut() + for(var/i in 1 to codelen) + var/guesschar = copytext(input, i, i+1) + lastattempt += guesschar + if(guesschar != code[i]) + . = 0 + /obj/structure/closet/crate/secure/loot/attackby(obj/item/weapon/W as obj, mob/user as mob) if(locked) if (istype(W, /obj/item/device/multitool)) // Greetings Urist McProfessor, how about a nice game of cows and bulls? - user << "DECA-CODE LOCK REPORT:" + user << "DECA-CODE LOCK ANALYSIS:" if (attempts == 1) - user << "* Anti-Tamper Bomb will activate on next failed access attempt." + user << "* Anti-Tamper system will activate on the next failed access attempt." else - user << "* Anti-Tamper Bomb will activate after [src.attempts] failed access attempts." - if (lastattempt != null) - var/list/guess = list() + user << "* Anti-Tamper system will activate after [src.attempts] failed access attempts." + if(lastattempt.len) var/bulls = 0 var/cows = 0 - for(var/i = 1, i < codelen + 1, i++) - var/a = copytext(lastattempt, i, i+1) // Stuff the code into the list - guess += a - guess[a] = i - for(var/i in guess) // Go through list and count matches - var/a = findtext(code, i) - if(a == guess[i]) + + var/list/code_contents = code.Copy() + for(var/i in 1 to codelen) + if(lastattempt[i] == code[i]) ++bulls - else if(a) + else if(lastattempt[i] in code_contents) ++cows + code_contents -= lastattempt[i] user << "Last code attempt had [bulls] correct digits at correct positions and [cows] correct digits at incorrect positions." - else ..() - else ..() + return + ..() diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 85b71aef4f..71afbc893d 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -34,7 +34,6 @@ var/global/list/image/ghost_sightless_images = list() //this is a list of images /mob/dead/observer/New(mob/body) sight |= SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF see_invisible = SEE_INVISIBLE_OBSERVER - see_in_dark = 100 verbs += /mob/dead/observer/proc/dead_tele stat = DEAD @@ -141,17 +140,6 @@ Works together with spawning an observer, noted above. var/client/C = U.client for(var/mob/living/carbon/human/target in target_list) C.images += target.hud_list[SPECIALROLE_HUD] - - -/* - else//If the silicon mob has no law datum, no inherent laws, or a law zero, add them to the hud. - var/mob/living/silicon/silicon_target = target - if(!silicon_target.laws||(silicon_target.laws&&(silicon_target.laws.zeroth||!silicon_target.laws.inherent.len))||silicon_target.mind.special_role=="traitor") - if(isrobot(silicon_target))//Different icons for robutts and AI. - U.client.images += image(tempHud,silicon_target,"hudmalborg") - else - U.client.images += image(tempHud,silicon_target,"hudmalai") -*/ return 1 /mob/proc/ghostize(var/can_reenter_corpse = 1) @@ -646,10 +634,12 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp /mob/dead/observer/proc/updateghostsight() if (!seedarkness) see_invisible = SEE_INVISIBLE_OBSERVER_NOLIGHTING + see_in_dark = 100 else see_invisible = SEE_INVISIBLE_OBSERVER if (!ghostvision) see_invisible = SEE_INVISIBLE_LIVING; + see_in_dark = 0 updateghostimages() /proc/updateallghostimages() diff --git a/code/modules/mob/death.dm b/code/modules/mob/death.dm index 014c27df1b..3d605a061a 100644 --- a/code/modules/mob/death.dm +++ b/code/modules/mob/death.dm @@ -70,7 +70,6 @@ blind.layer = 0 sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS - see_in_dark = 8 see_invisible = SEE_INVISIBLE_LEVEL_TWO drop_r_hand() diff --git a/code/modules/mob/freelook/eye.dm b/code/modules/mob/freelook/eye.dm index fb2b04a434..e77084553d 100644 --- a/code/modules/mob/freelook/eye.dm +++ b/code/modules/mob/freelook/eye.dm @@ -15,7 +15,6 @@ var/acceleration = 1 var/owner_follows_eye = 0 - see_in_dark = 7 status_flags = GODMODE invisibility = INVISIBILITY_EYE diff --git a/code/modules/mob/living/blob/blob.dm b/code/modules/mob/living/blob/blob.dm index 8bbf517e60..959e6ed379 100644 --- a/code/modules/mob/living/blob/blob.dm +++ b/code/modules/mob/living/blob/blob.dm @@ -4,7 +4,6 @@ icon = 'icons/mob/blob.dmi' icon_state = "blob_spore_temp" pass_flags = PASSBLOB - see_in_dark = 8 see_invisible = SEE_INVISIBLE_LEVEL_TWO var/ghost_name = "Unknown" var/creating_blob = 0 diff --git a/code/modules/mob/living/carbon/alien/alien.dm b/code/modules/mob/living/carbon/alien/alien.dm index 891483b71a..3de8e1b6fc 100644 --- a/code/modules/mob/living/carbon/alien/alien.dm +++ b/code/modules/mob/living/carbon/alien/alien.dm @@ -48,5 +48,5 @@ /mob/living/carbon/alien/show_inv(mob/user as mob) return //Consider adding cuffs and hats to this, for the sake of fun. -/mob/living/carbon/alien/can_use_vents() +/mob/living/carbon/alien/cannot_use_vents() return \ No newline at end of file diff --git a/code/modules/mob/living/carbon/alien/life.dm b/code/modules/mob/living/carbon/alien/life.dm index 429e82b3d0..1043cf0bfa 100644 --- a/code/modules/mob/living/carbon/alien/life.dm +++ b/code/modules/mob/living/carbon/alien/life.dm @@ -95,13 +95,11 @@ sight |= SEE_TURFS sight |= SEE_MOBS sight |= SEE_OBJS - see_in_dark = 8 see_invisible = SEE_INVISIBLE_LEVEL_TWO else if (stat != 2) sight &= ~SEE_TURFS sight &= ~SEE_MOBS sight &= ~SEE_OBJS - see_in_dark = 2 see_invisible = SEE_INVISIBLE_LIVING if (healths) diff --git a/code/modules/mob/living/carbon/brain/life.dm b/code/modules/mob/living/carbon/brain/life.dm index 18b712968f..a2098baa9f 100644 --- a/code/modules/mob/living/carbon/brain/life.dm +++ b/code/modules/mob/living/carbon/brain/life.dm @@ -195,6 +195,16 @@ else healths.icon_state = "health7" + if (stat == 2 || (XRAY in src.mutations)) + sight |= SEE_TURFS + sight |= SEE_MOBS + sight |= SEE_OBJS + see_invisible = SEE_INVISIBLE_LEVEL_TWO + else if (stat != 2) + sight &= ~SEE_TURFS + sight &= ~SEE_MOBS + sight &= ~SEE_OBJS + see_invisible = SEE_INVISIBLE_LIVING if (client) client.screen.Remove(global_hud.blurry,global_hud.druggy,global_hud.vimpaired) @@ -242,4 +252,4 @@ emp_damage += rand(10,20) if(3) emp_damage += rand(0,10) - ..()*/ \ No newline at end of file + ..()*/ diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 5e38960e7e..fb89060f80 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -267,8 +267,9 @@ M.visible_message("[M] shakes [src] trying to wake [t_him] up!", \ "You shake [src] trying to wake [t_him] up!") else - if(istype(H)) - H.species.hug(H,src) + var/mob/living/carbon/human/hugger = M + if(istype(hugger)) + hugger.species.hug(hugger,src) else M.visible_message("[M] hugs [src] to make [t_him] feel better!", \ "You hug [src] to make [t_him] feel better!") @@ -458,7 +459,7 @@ if(istype(AM, /mob/living/carbon) && prob(10)) src.spread_disease_to(AM, "Contact") -/mob/living/carbon/can_use_vents() +/mob/living/carbon/cannot_use_vents() return /mob/living/carbon/slip(var/slipped_on,stun_duration=8) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 5735b534fe..0f6fa07e3d 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -1226,7 +1226,6 @@ if(XRAY in mutations) sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS - see_in_dark = 8 if(!druggy) see_invisible = SEE_INVISIBLE_LEVEL_TWO if(seer==1) @@ -1237,6 +1236,8 @@ see_invisible = SEE_INVISIBLE_LIVING seer = 0 + else + sight &= ~(SEE_TURFS|SEE_MOBS|SEE_OBJS) var/tmp/glasses_processed = 0 var/obj/item/weapon/rig/rig = back if(istype(rig) && rig.visor) @@ -1248,6 +1249,9 @@ if(glasses && !glasses_processed) glasses_processed = 1 process_glasses(glasses) + if(XRAY in mutations) + sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS + if(!druggy) see_invisible = SEE_INVISIBLE_LEVEL_TWO if(!glasses_processed && (species.vision_flags > 0)) sight |= species.vision_flags @@ -1684,6 +1688,7 @@ holder.icon_state = "hudblank" if(mind) + // TODO: Update to new antagonist system. switch(mind.special_role) if("traitor","Mercenary") holder.icon_state = "hudsyndicate" diff --git a/code/modules/mob/living/carbon/human/species/outsider/shadow.dm b/code/modules/mob/living/carbon/human/species/outsider/shadow.dm index dd614bb55b..cf2295a98c 100644 --- a/code/modules/mob/living/carbon/human/species/outsider/shadow.dm +++ b/code/modules/mob/living/carbon/human/species/outsider/shadow.dm @@ -8,7 +8,6 @@ language = "Sol Common" //todo? unarmed_types = list(/datum/unarmed_attack/claws/strong, /datum/unarmed_attack/bite/sharp) light_dam = 2 - darksight = 8 has_organ = list() siemens_coefficient = 0 @@ -23,4 +22,4 @@ /datum/species/shadow/handle_death(var/mob/living/carbon/human/H) spawn(1) new /obj/effect/decal/cleanable/ash(H.loc) - qdel(H) \ No newline at end of file + qdel(H) diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index 107ad0fe72..500fad9c86 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -100,7 +100,6 @@ var/list/inherent_verbs // Species-specific verbs. var/has_fine_manipulation = 1 // Can use small items. var/siemens_coefficient = 1 // The lower, the thicker the skin and better the insulation. - var/darksight = 2 // Native darksight distance. var/flags = 0 // Various specific features. var/slowdown = 0 // Passive movement speed malus (or boost, if negative) var/primitive_form // Lesser form, if any (ie. monkey for humans) diff --git a/code/modules/mob/living/carbon/human/species/station/slime.dm b/code/modules/mob/living/carbon/human/species/station/slime.dm index 46a7e9f5f5..e5aada89d6 100644 --- a/code/modules/mob/living/carbon/human/species/station/slime.dm +++ b/code/modules/mob/living/carbon/human/species/station/slime.dm @@ -10,7 +10,6 @@ unarmed_types = list(/datum/unarmed_attack/slime_glomp) flags = IS_RESTRICTED | NO_SCAN | NO_SLIP | NO_BREATHE siemens_coefficient = 3 - darksight = 3 blood_color = "#05FF9B" flesh_color = "#05FFFB" diff --git a/code/modules/mob/living/carbon/human/species/station/station.dm b/code/modules/mob/living/carbon/human/species/station/station.dm index 8e0402b91a..3ddf983b76 100644 --- a/code/modules/mob/living/carbon/human/species/station/station.dm +++ b/code/modules/mob/living/carbon/human/species/station/station.dm @@ -22,7 +22,6 @@ tail_animation = 'icons/mob/species/unathi/tail.dmi' unarmed_types = list(/datum/unarmed_attack/stomp, /datum/unarmed_attack/kick, /datum/unarmed_attack/claws, /datum/unarmed_attack/bite/sharp) primitive_form = "Stok" - darksight = 3 gluttonous = 1 blurb = "A heavily reptillian species, Unathi (or 'Sinta as they call themselves) hail from the \ @@ -73,7 +72,6 @@ tail = "tajtail" tail_animation = 'icons/mob/species/tajaran/tail.dmi' unarmed_types = list(/datum/unarmed_attack/stomp, /datum/unarmed_attack/kick, /datum/unarmed_attack/claws, /datum/unarmed_attack/bite/sharp) - darksight = 8 slowdown = -1 brute_mod = 1.2 diff --git a/code/modules/mob/living/carbon/metroid/metroid.dm b/code/modules/mob/living/carbon/metroid/metroid.dm index d7994b3a60..4d084a7533 100644 --- a/code/modules/mob/living/carbon/metroid/metroid.dm +++ b/code/modules/mob/living/carbon/metroid/metroid.dm @@ -14,7 +14,6 @@ update_icon = 0 nutrition = 700 - see_in_dark = 8 update_slimes = 0 // canstun and canweaken don't affect slimes because they ignore stun and weakened variables @@ -399,7 +398,7 @@ adjustToxLoss(-10) nutrition = max(nutrition, get_max_nutrition()) -/mob/living/carbon/slime/can_use_vents() +/mob/living/carbon/slime/cannot_use_vents() if(Victim) return "You cannot ventcrawl while feeding." - ..() \ No newline at end of file + ..() diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 5da444b909..9e1c371c94 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -664,9 +664,9 @@ default behaviour is: src << "You can't vent crawl while you're stunned!" return - var/special_fail_msg = can_use_vents() + var/special_fail_msg = cannot_use_vents() if(special_fail_msg) - src << "\red [special_fail_msg]" + src << "[special_fail_msg]" return if(vent_found) // one was passed in, probably from vent/AltClick() @@ -755,7 +755,7 @@ default behaviour is: if(new_area) new_area.Entered(src) -/mob/living/proc/can_use_vents() +/mob/living/proc/cannot_use_vents() return "You can't fit into that vent." /mob/living/proc/has_brain() diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index c48339842c..26c0bf8365 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -49,6 +49,7 @@ var/list/ai_verbs_default = list( var/list/network = list("Exodus") var/obj/machinery/camera/camera = null var/list/connected_robots = list() + var/has_power = 0 var/aiRestorePowerRoutine = 0 var/viewalerts = 0 var/icon/holo_icon//Default is assigned when AI is created. diff --git a/code/modules/mob/living/silicon/ai/life.dm b/code/modules/mob/living/silicon/ai/life.dm index d67eb27753..8db82ead31 100644 --- a/code/modules/mob/living/silicon/ai/life.dm +++ b/code/modules/mob/living/silicon/ai/life.dm @@ -38,19 +38,18 @@ src << "APU GENERATOR FAILURE! (System Damaged)" stop_apu(1) - var/blind = 0 + has_power = 1 var/area/loc = null if (istype(T, /turf)) loc = T.loc if (istype(loc, /area)) if (!loc.power_equip && !istype(src.loc,/obj/item) && !APU_power) - blind = 1 + has_power = 0 - if (!blind) + if (has_power) src.sight |= SEE_TURFS src.sight |= SEE_MOBS src.sight |= SEE_OBJS - src.see_in_dark = 8 src.see_invisible = SEE_INVISIBLE_LIVING if (aiRestorePowerRoutine==2) @@ -80,12 +79,10 @@ //Blind the AI updateicon() src.blind.screen_loc = "1,1 to 15,15" - if (src.blind.layer!=18) - src.blind.layer = 18 + src.sight = src.sight&~SEE_TURFS src.sight = src.sight&~SEE_MOBS src.sight = src.sight&~SEE_OBJS - src.see_in_dark = 0 src.see_invisible = SEE_INVISIBLE_LIVING //Now to tell the AI why they're blind and dying slowly. diff --git a/code/modules/mob/living/silicon/robot/laws.dm b/code/modules/mob/living/silicon/robot/laws.dm index 02ed0bae06..2dc3b4e391 100644 --- a/code/modules/mob/living/silicon/robot/laws.dm +++ b/code/modules/mob/living/silicon/robot/laws.dm @@ -20,6 +20,7 @@ lawsync() photosync() src << "Laws synced with AI, be sure to note any changes." + // TODO: Update to new antagonist system. if(mind && mind.special_role == "traitor" && mind.original == src) src << "Remember, your AI does NOT share or know about your law 0." else @@ -28,6 +29,7 @@ who << "Obey these laws:" laws.show_laws(who) + // TODO: Update to new antagonist system. if (mind && (mind.special_role == "traitor" && mind.original == src) && connected_ai) who << "Remember, [connected_ai.name] is technically your master, but your objective comes first." else if (connected_ai) diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm index dbf625c080..c690931c8a 100644 --- a/code/modules/mob/living/silicon/robot/life.dm +++ b/code/modules/mob/living/silicon/robot/life.dm @@ -163,13 +163,11 @@ see_invisible = SEE_INVISIBLE_MINIMUM else if (src.sight_mode & BORGTHERM) src.sight |= SEE_MOBS - src.see_in_dark = 8 src.see_invisible = SEE_INVISIBLE_LEVEL_TWO else if (src.stat != 2) src.sight &= ~SEE_MOBS src.sight &= ~SEE_TURFS src.sight &= ~SEE_OBJS - src.see_in_dark = 8 // see_in_dark means you can FAINTLY see in the dark, humans have a range of 3 or so, tajaran have it at 8 src.see_invisible = SEE_INVISIBLE_LIVING // This is normal vision (25), setting it lower for normal vision means you don't "see" things like darkness since darkness // has a "invisible" value of 15 @@ -225,10 +223,12 @@ if (src.syndicate && src.client) for(var/datum/mind/tra in traitors.current_antagonists) if(tra.current) + // TODO: Update to new antagonist system. var/I = image('icons/mob/mob.dmi', loc = tra.current, icon_state = "traitor") src.client.images += I src.disconnect_from_ai() if(src.mind) + // TODO: Update to new antagonist system. if(!src.mind.special_role) src.mind.special_role = "traitor" traitors.current_antagonists |= src.mind diff --git a/code/modules/mob/living/simple_animal/borer/borer.dm b/code/modules/mob/living/simple_animal/borer/borer.dm index 9480840d71..520bfdf596 100644 --- a/code/modules/mob/living/simple_animal/borer/borer.dm +++ b/code/modules/mob/living/simple_animal/borer/borer.dm @@ -207,5 +207,5 @@ your host and your eventual spawn safe and warm." src << "You can speak to your victim with say, to other borers with say :x, and use your Abilities tab to access powers." -/mob/living/simple_animal/borer/can_use_vents() +/mob/living/simple_animal/borer/cannot_use_vents() return \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/constructs/constructs.dm b/code/modules/mob/living/simple_animal/constructs/constructs.dm index 7781a26744..65bf148ae4 100644 --- a/code/modules/mob/living/simple_animal/constructs/constructs.dm +++ b/code/modules/mob/living/simple_animal/constructs/constructs.dm @@ -150,7 +150,6 @@ attacktext = "slashed" speed = -1 environment_smash = 1 - see_in_dark = 7 attack_sound = 'sound/weapons/rapidslice.ogg' construct_spells = list(/spell/targeted/ethereal_jaunt/shift) @@ -228,7 +227,6 @@ attacktext = "violently stabbed" speed = -1 environment_smash = 1 - see_in_dark = 7 attack_sound = 'sound/weapons/pierce.ogg' construct_spells = list( diff --git a/code/modules/mob/living/simple_animal/friendly/cat.dm b/code/modules/mob/living/simple_animal/friendly/cat.dm index 3197c6023c..9c78b95522 100644 --- a/code/modules/mob/living/simple_animal/friendly/cat.dm +++ b/code/modules/mob/living/simple_animal/friendly/cat.dm @@ -11,7 +11,6 @@ emote_see = list("shakes their head", "shivers") speak_chance = 1 turns_per_move = 5 - see_in_dark = 6 meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat response_help = "pets" response_disarm = "gently pushes aside" diff --git a/code/modules/mob/living/simple_animal/friendly/corgi.dm b/code/modules/mob/living/simple_animal/friendly/corgi.dm index 322d08dc9f..e5a670d472 100644 --- a/code/modules/mob/living/simple_animal/friendly/corgi.dm +++ b/code/modules/mob/living/simple_animal/friendly/corgi.dm @@ -17,7 +17,6 @@ response_help = "pets" response_disarm = "bops" response_harm = "kicks" - see_in_dark = 5 mob_size = 8 var/obj/item/inventory_head diff --git a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm index 217b1f0914..7427a937aa 100644 --- a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm +++ b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm @@ -11,7 +11,6 @@ emote_see = list("shakes its head", "stamps a foot", "glares around") speak_chance = 1 turns_per_move = 5 - see_in_dark = 6 meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat meat_amount = 4 response_help = "pets" @@ -95,7 +94,6 @@ emote_see = list("shakes its head") speak_chance = 1 turns_per_move = 5 - see_in_dark = 6 meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat meat_amount = 6 response_help = "pets" diff --git a/code/modules/mob/living/simple_animal/friendly/mouse.dm b/code/modules/mob/living/simple_animal/friendly/mouse.dm index e94462a20b..6424087631 100644 --- a/code/modules/mob/living/simple_animal/friendly/mouse.dm +++ b/code/modules/mob/living/simple_animal/friendly/mouse.dm @@ -13,7 +13,6 @@ small = 1 speak_chance = 1 turns_per_move = 5 - see_in_dark = 6 maxHealth = 5 health = 5 meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat @@ -147,5 +146,5 @@ // Change my name back, don't want to be named Tom (666) name = initial(name) -/mob/living/simple_animal/mouse/can_use_vents() +/mob/living/simple_animal/mouse/cannot_use_vents() return diff --git a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm index 03c311f97f..53fab43ca6 100644 --- a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm +++ b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm @@ -13,14 +13,14 @@ var/obj/machinery/camera/camera = null var/obj/item/device/mmi/mmi = null var/list/req_access = list(access_robotics) //Access needed to pop out the brain. + var/positronic - name = "Spider-bot" + name = "spider-bot" desc = "A skittering robotic friend!" icon = 'icons/mob/robots.dmi' icon_state = "spiderbot-chassis" icon_living = "spiderbot-chassis" icon_dead = "spiderbot-smashed" - universal_speak = 1 //Temp until these are rewritten. wander = 0 @@ -38,19 +38,26 @@ var/emagged = 0 var/obj/item/held_item = null //Storage for single item they can hold. speed = -1 //Spiderbots gotta go fast. - //pass_flags = PASSTABLE //Maybe griefy? + pass_flags = PASSTABLE small = 1 speak_emote = list("beeps","clicks","chirps") +/mob/living/simple_animal/spiderbot/New() + ..() + add_language("Galactic Common") + default_language = all_languages["Galactic Common"] + verbs |= /mob/living/proc/ventcrawl + verbs |= /mob/living/proc/hide + /mob/living/simple_animal/spiderbot/attackby(var/obj/item/O as obj, var/mob/user as mob) if(istype(O, /obj/item/device/mmi)) var/obj/item/device/mmi/B = O - if(src.mmi) //There's already a brain in it. - user << "\red There's already a brain in [src]!" + if(src.mmi) + user << "There's already a brain in [src]!" return if(!B.brainmob) - user << "\red Sticking an empty MMI into the frame would sort of defeat the purpose." + user << "Sticking an empty MMI into the frame would sort of defeat the purpose." return if(!B.brainmob.key) var/ghost_can_reenter = 0 @@ -64,14 +71,18 @@ return if(B.brainmob.stat == DEAD) - user << "\red [O] is dead. Sticking it into the frame would sort of defeat the purpose." + user << "[O] is dead. Sticking it into the frame would sort of defeat the purpose." return if(jobban_isbanned(B.brainmob, "Cyborg")) - user << "\red [O] does not seem to fit." + user << "\The [O] does not seem to fit." return - user << "\blue You install [O] in [src]!" + user << "You install \the [O] in \the [src]!" + + if(istype(O, /obj/item/device/mmi/digital)) + positronic = 1 + add_language("Robot Talk") user.drop_item() src.mmi = O @@ -89,16 +100,15 @@ if(health > maxHealth) 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) + src.visible_message("\The [user] has spot-welded some of the damage to \the [src]!") else - user << "\blue [src] is undamaged!" + user << "\The [src] is undamaged!" else - user << "Need more welding fuel!" + user << "You need more welding fuel for this task!" return else if(istype(O, /obj/item/weapon/card/id)||istype(O, /obj/item/device/pda)) if (!mmi) - user << "\red There's no reason to swipe your ID - the spiderbot has no brain to remove." + user << "There's no reason to swipe your ID - \the [src] has no brain to remove." return 0 var/obj/item/weapon/card/id/id_card @@ -110,16 +120,14 @@ id_card = pda.id if(access_robotics in id_card.access) - user << "\blue You swipe your access card and pop the brain out of [src]." + user << "You swipe your access card and pop the brain out of \the [src]." eject_brain() - if(held_item) held_item.loc = src.loc held_item = null - return 1 else - user << "\red You swipe your card, with no effect." + user << "You swipe your card with no effect." return 0 else @@ -140,23 +148,22 @@ src.mind = M.brainmob.mind src.mind.key = M.brainmob.key src.ckey = M.brainmob.ckey - src.name = "Spider-bot ([M.brainmob.name])" + src.name = "spider-bot ([M.brainmob.name])" /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.") + src.visible_message("\The [src] makes an odd warbling noise, fizzles, and explodes!") explosion(get_turf(loc), -1, -1, 3, 5) eject_brain() death() /mob/living/simple_animal/spiderbot/proc/update_icon() - if(istype(mmi, /obj/item/device/mmi/digital/posibrain)) - icon_state = "spiderbot-chassis-posi" - icon_living = "spiderbot-chassis-posi" - else if(istype(mmi,/obj/item/device/mmi)) - icon_state = "spiderbot-chassis-mmi" - icon_living = "spiderbot-chassis-mmi" + if(mmi) + if(positronic) + icon_state = "spiderbot-chassis-posi" + icon_living = "spiderbot-chassis-posi" + else + icon_state = "spiderbot-chassis-mmi" + icon_living = "spiderbot-chassis-mmi" else icon_state = "spiderbot-chassis" icon_living = "spiderbot-chassis" @@ -168,8 +175,11 @@ mmi.loc = T if(mind) mind.transfer_to(mmi.brainmob) mmi = null - src.name = "Spider-bot" + real_name = initial(real_name) + name = real_name update_icon() + remove_language("Robot Talk") + positronic = null /mob/living/simple_animal/spiderbot/Destroy() eject_brain() @@ -179,7 +189,7 @@ radio = new /obj/item/device/radio/borg(src) camera = new /obj/machinery/camera(src) - camera.c_tag = "Spiderbot-[real_name]" + camera.c_tag = "spiderbot-[real_name]" camera.replace_networks(list("SS13")) ..() @@ -213,14 +223,18 @@ 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("\The [src] launches \the [held_item]!", \ + "You launch \the [held_item]!", \ + "You hear a skittering noise and a thump!") var/obj/item/weapon/grenade/G = held_item G.loc = src.loc G.prime() held_item = null return 1 - visible_message("\blue [src] drops \the [held_item]!", "\blue You drop \the [held_item]!", "You hear a skittering noise and a soft thump.") + visible_message("\The [src] drops \the [held_item].", \ + "You drop \the [held_item].", \ + "You hear a skittering noise and a soft thump.") held_item.loc = src.loc held_item = null @@ -237,7 +251,7 @@ return -1 if(held_item) - src << "\red You are already holding \the [held_item]" + src << "You are already holding \the [held_item]" return 1 var/list/items = list() @@ -252,15 +266,23 @@ 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("\The [src] scoops up \the [held_item].", \ + "You grab \the [held_item].", \ + "You hear a skittering noise and a clink.") return held_item - src << "\red \The [selection] is too far away." + src << "\The [selection] is too far away." return 0 - src << "\red There is nothing of interest to take." + src << "There is nothing of interest to take." return 0 /mob/living/simple_animal/spiderbot/examine(mob/user) ..(user) if(src.held_item) - user << "It is carrying \a [src.held_item] \icon[src.held_item]." + user << "It is carrying \icon[src.held_item] \a [src.held_item]." + +/mob/living/simple_animal/spiderbot/cannot_use_vents() + return + +/mob/living/simple_animal/spiderbot/binarycheck() + return positronic \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/hostile/bear.dm b/code/modules/mob/living/simple_animal/hostile/bear.dm index 73de95acee..b673aee9f0 100644 --- a/code/modules/mob/living/simple_animal/hostile/bear.dm +++ b/code/modules/mob/living/simple_animal/hostile/bear.dm @@ -12,7 +12,6 @@ emote_see = list("stares ferociously", "stomps") speak_chance = 1 turns_per_move = 5 - see_in_dark = 6 meat_type = /obj/item/weapon/reagent_containers/food/snacks/bearmeat response_help = "pets" response_disarm = "gently pushes aside" diff --git a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm index 793e421b99..a6da79247f 100644 --- a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm +++ b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm @@ -15,7 +15,6 @@ emote_hear = list("chitters") speak_chance = 5 turns_per_move = 5 - see_in_dark = 10 meat_type = /obj/item/weapon/reagent_containers/food/snacks/xenomeat response_help = "pets" response_disarm = "gently pushes aside" @@ -213,4 +212,4 @@ #undef SPINNING_WEB #undef LAYING_EGGS #undef MOVING_TO_TARGET -#undef SPINNING_COCOON \ No newline at end of file +#undef SPINNING_COCOON diff --git a/code/modules/mob/living/simple_animal/kobold.dm b/code/modules/mob/living/simple_animal/kobold.dm index 3e52a40874..f634bd70f1 100644 --- a/code/modules/mob/living/simple_animal/kobold.dm +++ b/code/modules/mob/living/simple_animal/kobold.dm @@ -12,7 +12,6 @@ emote_see = list("looks around suspiciously.", "scratches it's arm.","putters around a bit.") speak_chance = 15 turns_per_move = 5 - see_in_dark = 6 meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat/monkey response_help = "pets" response_disarm = "gently pushes aside" diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index bc9f04bea0..c270009433 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -102,6 +102,7 @@ handle_stunned() handle_weakened() handle_paralysed() + update_canmove() handle_supernatural() //Movement diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index cee9e723a4..934e89bc06 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -2,6 +2,7 @@ density = 1 layer = 4.0 animate_movement = 2 + see_in_dark = 0 // flags = NOREACT var/datum/mind/mind diff --git a/code/modules/nano/modules/alarm_monitor.dm b/code/modules/nano/modules/alarm_monitor.dm index 5040241d0f..b0012de1e5 100644 --- a/code/modules/nano/modules/alarm_monitor.dm +++ b/code/modules/nano/modules/alarm_monitor.dm @@ -44,13 +44,12 @@ return all_alarms -/datum/nano_module/alarm_monitor/ai/Topic(ref, href_list) +/datum/nano_module/alarm_monitor/Topic(ref, href_list) if(..()) return 1 if(href_list["switchTo"]) var/obj/machinery/camera/C = locate(href_list["switchTo"]) in cameranet.cameras if(!C) - return usr.switch_to_camera(C) diff --git a/code/modules/reagents/Chemistry-Recipes.dm b/code/modules/reagents/Chemistry-Recipes.dm index ce9ea05717..ece76b00d0 100644 --- a/code/modules/reagents/Chemistry-Recipes.dm +++ b/code/modules/reagents/Chemistry-Recipes.dm @@ -1570,10 +1570,10 @@ required_reagents = list("rum" = 2, "cola" = 1) result_amount = 3 -/datum/chemical_reaction/classicmartini +/datum/chemical_reaction/martini name = "Classic Martini" - id = "classicmartini" - result = "classicmartini" + id = "martini" + result = "martini" required_reagents = list("gin" = 2, "vermouth" = 1) result_amount = 3 diff --git a/code/modules/spells/spell_code.dm b/code/modules/spells/spell_code.dm index 0847146c9a..ba631391b4 100644 --- a/code/modules/spells/spell_code.dm +++ b/code/modules/spells/spell_code.dm @@ -189,7 +189,11 @@ var/list/spells = typesof(/spell) //needed for the badmin verb for now if(silenced > 0) return - if(user.z == 2 && spell_flags & Z2NOCAST) //Certain spells are not allowed on the centcomm zlevel + var/turf/Turf = get_turf(user) + if(!Turf) + user << "You cannot cast spells in null space!" + + if(spell_flags & Z2NOCAST && (Turf.z in config.admin_levels)) //Certain spells are not allowed on the centcomm zlevel return 0 if(spell_flags & CONSTRUCT_CHECK) diff --git a/code/modules/spells/spellbook.dm b/code/modules/spells/spellbook.dm index ce28373c93..7b4b7a001d 100644 --- a/code/modules/spells/spellbook.dm +++ b/code/modules/spells/spellbook.dm @@ -256,7 +256,6 @@ if (!(XRAY in H.mutations)) H.mutations.Add(XRAY) H.sight |= (SEE_MOBS|SEE_OBJS|SEE_TURFS) - H.see_in_dark = 8 H.see_invisible = SEE_INVISIBLE_LEVEL_TWO H << "\blue The walls suddenly disappear." temp = "You have purchased a scrying orb, and gained x-ray vision." @@ -288,6 +287,7 @@ for(var/spell/knownspell in user.spell_list) if(knownspell.type == S.type) if(user.mind) + // TODO: Update to new antagonist system. if(user.mind.special_role == "apprentice" || user.mind.special_role == "Wizard") user <<"You're already far more versed in this spell than this flimsy how-to book can provide." else diff --git a/code/modules/spells/targeted/ethereal_jaunt.dm b/code/modules/spells/targeted/ethereal_jaunt.dm index 99c486ae44..e48db592ad 100644 --- a/code/modules/spells/targeted/ethereal_jaunt.dm +++ b/code/modules/spells/targeted/ethereal_jaunt.dm @@ -36,7 +36,7 @@ target.transforming=0 //mob is safely inside holder now, no need for protection. jaunt_steam(mobloc) sleep(duration) - mobloc = get_turf(target.loc) + mobloc = holder.last_valid_turf animation.loc = mobloc jaunt_steam(mobloc) target.canmove = 0 @@ -75,6 +75,11 @@ var/reappearing = 0 density = 0 anchored = 1 + var/turf/last_valid_turf + +/obj/effect/dummy/spell_jaunt/New(var/location) + ..() + last_valid_turf = get_turf(location) /obj/effect/dummy/spell_jaunt/Destroy() // Eject contents if deleted somehow @@ -87,6 +92,9 @@ var/turf/newLoc = get_step(src,direction) if(!(newLoc.flags & NOJAUNT)) loc = newLoc + var/turf/T = get_turf(loc) + if(!T.contains_dense_objects()) + last_valid_turf = T else user << "Some strange aura is blocking the way!" src.canmove = 0 diff --git a/code/modules/spells/targeted/mind_transfer.dm b/code/modules/spells/targeted/mind_transfer.dm index 6f4525b62c..2e1860da35 100644 --- a/code/modules/spells/targeted/mind_transfer.dm +++ b/code/modules/spells/targeted/mind_transfer.dm @@ -12,6 +12,7 @@ cooldown_min = 200 //100 deciseconds reduction per rank compatible_mobs = list(/mob/living/carbon/human) //which types of mobs are affected by the spell. NOTE: change at your own risk + // TODO: Update to new antagonist system. var/list/protected_roles = list("Wizard","Changeling","Cultist") //which roles are immune to the spell var/msg_wait = 500 //how long in deciseconds it waits before telling that body doesn't feel right or mind swap robbed of a spell amt_paralysis = 20 //how much the victim is paralysed for after the spell diff --git a/html/changelog.html b/html/changelog.html index 9cd97d800c..ac603b1c36 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -56,6 +56,17 @@ -->
+

14 July 2015

+

HarpyEagle updated:

+ +

PsiOmegaDelta updated:

+ +

11 July 2015

HarpyEagle updated:

- {{:helper.link('Offline' , null, {'command' : 'electrify_permanently', 'activate' : "0" }, null, data.electrified == 0 ? 'selected' : null)}} - {{:helper.link(data.electrified <= 0 ? 'Temporary (30s)' : 'Temporary (' + data.electrified +'s)', null, {'command' : 'electrify_temporary', 'activate' : "1"}, null, data.electrified > 0 ? 'redButton' : null)}} - {{:helper.link('Permanent', null, {'command' : 'electrify_permanently', 'activate' : "1"}, null, data.electrified == -1 ? 'redButton' : null)}} + {{:helper.link('Offline' , null, {'command' : 'electrify_permanently', 'activate' : "0" }, data.electrified == 0 ? 'selected' : null)}} + {{:helper.link(data.electrified <= 0 ? 'Temporary (30s)' : 'Temporary (' + data.electrified +'s)', null, {'command' : 'electrify_temporary', 'activate' : "1"}, data.electrified > 0 ? 'redButton' : null)}} + {{:helper.link('Permanent', null, {'command' : 'electrify_permanently', 'activate' : "1"}, data.electrified == -1 ? 'redButton' : null)}}
@@ -58,8 +58,8 @@ {{for data.commands}} {{:value.name}}: - {{:helper.link(value.enabled, null, {'command' : value.command, 'activate' : value.act ? 1 : 0}, null, value.active ? 'selected' : null)}} - {{:helper.link(value.disabled,null, {'command' : value.command, 'activate' : value.act ? 0 : 1}, null,!value.active ? (value.danger ? 'redButton' : 'selected') : null)}} + {{:helper.link(value.enabled, null, {'command' : value.command, 'activate' : value.act ? 1 : 0}, value.active ? 'selected' : null)}} + {{:helper.link(value.disabled,null, {'command' : value.command, 'activate' : value.act ? 0 : 1}, !value.active ? (value.danger ? 'redButton' : 'selected') : null)}} {{/for}}