diff --git a/code/WorkInProgress/BS12/uplinks.dm b/code/WorkInProgress/BS12/uplinks.dm index 040acf69ef..cebfe74a17 100644 --- a/code/WorkInProgress/BS12/uplinks.dm +++ b/code/WorkInProgress/BS12/uplinks.dm @@ -21,12 +21,17 @@ A list of items and costs is stored under the datum of every game mode, alongsid var/items // List of items var/list/ItemList // Parsed list of items var/uses // Numbers of crystals + var/uplink_data // designated uplink items // List of items not to shove in their hands. var/list/NotInHand = list(/obj/machinery/singularity_beacon/syndicate) New() - welcome = ticker.mode.uplink_welcome - items = dd_replacetext(ticker.mode.uplink_items, "\n", "") // Getting the text string of items + if(!welcome) + welcome = ticker.mode.uplink_welcome + if(!uplink_data) + uplink_data = ticker.mode.uplink_items + + items = dd_replacetext(uplink_data, "\n", "") // Getting the text string of items ItemList = dd_text2list(src.items, ";") // Parsing the items text string uses = ticker.mode.uplink_uses diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 1a2fc84249..5baa7730f6 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -16,6 +16,8 @@ datum/mind var/has_been_rev = 0//Tracks if this mind has been a rev or not + var/datum/faction/faction // associated faction + proc/transfer_to(mob/new_character) if(current) current.mind = null diff --git a/code/datums/spells/genetic.dm b/code/datums/spells/genetic.dm index d17d916091..804853e44f 100644 --- a/code/datums/spells/genetic.dm +++ b/code/datums/spells/genetic.dm @@ -3,7 +3,7 @@ desc = "This spell inflicts a set of mutations and disabilities upon the target." var/disabilities = 0 //bits - var/mutations = 0 //bits + var/list/mutations = list() //mutation strings var/duration = 100 //deciseconds /* Disabilities @@ -13,22 +13,17 @@ 4th bit - ? 5th bit - ? 6th bit - ? - Mutations - 1st bit - portals - 2nd bit - cold resist - 3rd bit - xray - 4th bit - hulk - 5th bit - clown - 6th bit - fat */ /obj/effect/proc_holder/spell/targeted/genetic/cast(list/targets) for(var/mob/target in targets) - target.mutations |= mutations + for(var/x in mutations) + target.mutations.Add(x) target.disabilities |= disabilities spawn(duration) - target.mutations &= ~mutations + for(var/x in mutations) + target.mutations.Remove(x) target.disabilities &= ~disabilities return \ No newline at end of file diff --git a/code/datums/spells/wizard.dm b/code/datums/spells/wizard.dm index b712e93131..33d99d9a11 100644 --- a/code/datums/spells/wizard.dm +++ b/code/datums/spells/wizard.dm @@ -40,7 +40,7 @@ range = -1 include_user = 1 - mutations = LASER | HULK + mutations = list(LASER, HULK) duration = 300 /obj/effect/proc_holder/spell/targeted/inflict_handler/disintegrate diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm index d67b823e8c..4e09ba28be 100644 --- a/code/defines/obj/weapon.dm +++ b/code/defines/obj/weapon.dm @@ -26,6 +26,20 @@ IsShield() return 1 +/obj/item/weapon/shield/energy + name = "energy combat shield" + desc = "A shield capable of stopping most projectile and melee attacks. It can be retracted, expanded, and stored anywhere." + icon = 'weapons.dmi' + icon_state = "eshield0" // eshield1 for expanded + flags = FPRINT | TABLEPASS| CONDUCT + force = 3.0 + throwforce = 5.0 + throw_speed = 1 + throw_range = 4 + w_class = 1 + origin_tech = "materials=4;magnets=3;syndicate=4" + var/active = 0 + /obj/item/weapon/nullrod name = "null rod" diff --git a/code/game/asteroid/artifacts.dm b/code/game/asteroid/artifacts.dm index dbe7ace325..a4b834b4c8 100644 --- a/code/game/asteroid/artifacts.dm +++ b/code/game/asteroid/artifacts.dm @@ -64,26 +64,26 @@ var/global/list/spawned_surprises = list() charges-- insisting = 0 - if (!(user.mutations & HULK)) - user.mutations |= HULK + if (!(HULK in user.mutations)) + user.mutations.Add(HULK) - if (!(user.mutations & LASER)) - user.mutations |= LASER + if (!(LASER in user.mutations)) + user.mutations.Add(LASER) - if (!(user.mutations & XRAY)) - user.mutations |= XRAY + 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 = 2 - if (!(user.mutations & COLD_RESISTANCE)) - user.mutations |= COLD_RESISTANCE + if (!(COLD_RESISTANCE in user.mutations)) + user.mutations.Add(COLD_RESISTANCE) - if (!(user.mutations & TK)) - user.mutations |= TK + if (!(TK in user.mutations)) + user.mutations.Add(TK) - if(!(user.mutations & HEAL)) - user.mutations |= HEAL + if(!(HEAL in user.mutations)) + user.mutations.Add(HEAL) ticker.mode.traitors += user.mind user.mind.special_role = "Avatar of the Wish Granter" diff --git a/code/game/atom_procs.dm b/code/game/atom_procs.dm index 3d8dc02886..7d6cd50c51 100644 --- a/code/game/atom_procs.dm +++ b/code/game/atom_procs.dm @@ -335,6 +335,7 @@ /atom/MouseDrop(atom/over_object as mob|obj|turf|area) spawn( 0 ) + if (istype(over_object, /atom)) over_object.MouseDrop_T(src, usr) return @@ -989,7 +990,7 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl src.hand_al(usr, usr.hand) else // ------- YOU ARE CLICKING ON AN OBJECT THAT'S INACCESSIBLE TO YOU AND IS NOT YOUR HUD ------- - if(usr:mutations & LASER && usr:a_intent == "hurt" && world.time >= usr.next_move) + if((LASER in usr:mutations) && usr:a_intent == "hurt" && world.time >= usr.next_move) // ------- YOU HAVE THE LASER MUTATION, YOUR INTENT SET TO HURT AND IT'S BEEN MORE THAN A DECISECOND SINCE YOU LAS TATTACKED ------- var/turf/oloc var/turf/T = get_turf(usr) @@ -1024,6 +1025,38 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl return /atom/proc/AltClick() + + /* // NOT UNTIL I FIGURE OUT A GOOD WAY TO DO THIS SHIT + if((HULK in usr.mutations) || (SUPRSTR in usr.augmentations)) + if(!istype(src, /obj/item) && !istype(src, /mob) && !istype(src, /turf)) + if(!usr.equipped()) + + var/liftable = 0 + for(var/x in liftable_structures) + if(findtext("[src.type]", "[x]")) + liftable = 1 + break + + if(liftable) + + add_fingerprint(usr) + var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(usr) + G.assailant = usr + if (usr.hand) + usr.l_hand = G + else + usr.r_hand = G + G.layer = 20 + G.structure = src + G.synch() + + visible_message("\red [usr] has picked up [src]!") + + return + else + usr << "\red You can't pick this up!" + */ + return /atom/proc/CtrlClick() @@ -1110,7 +1143,7 @@ var/using_new_click_proc = 0 //TODO ERRORAGE (This is temporary, while the DblCl if(istype(src, /mob/living/carbon)) // ------- YOUR TARGET IS LIVING CARBON CREATURE (NOT AI OR CYBORG OR SIMPLE ANIMAL) ------- var/mob/living/carbon/C = src - if(usr:mutations & HEAL) + if(HEAL in usr:mutations) // ------- YOU ARE HUMAN, WITH THE HELP INTENT TARGETING A HUMAN AND HAVE THE 'HEAT' GENETIC MUTATION ------- if(C.stat != 2) diff --git a/code/game/dna.dm b/code/game/dna.dm index 1a72c257d7..40789f0d11 100644 --- a/code/game/dna.dm +++ b/code/game/dna.dm @@ -373,7 +373,7 @@ M.disabilities = 0 M.sdisabilities = 0 - M.mutations = 0 + M.mutations = list() M.see_in_dark = 2 M.see_invisible = 0 @@ -382,9 +382,9 @@ M.disabilities |= 1 M << "\red Your eyes feel strange." if (isblockon(getblock(M.dna.struc_enzymes, HULKBLOCK,3),2)) - if(inj || prob(5)) + if(inj || prob(15)) M << "\blue Your muscles hurt." - M.mutations |= HULK + M.mutations.Add(HULK) if (isblockon(getblock(M.dna.struc_enzymes, 3,3),3)) M.disabilities |= 2 M << "\red You get a headache." @@ -402,7 +402,7 @@ M << "\red You start coughing." if (isblockon(getblock(M.dna.struc_enzymes, CLUMSYBLOCK,3),6)) M << "\red You feel lightheaded." - M.mutations |= CLUMSY + M.mutations.Add(CLUMSY) if (isblockon(getblock(M.dna.struc_enzymes, 7,3),7)) M.disabilities |= 8 M << "\red You twitch." @@ -412,21 +412,21 @@ M.sight |= (SEE_MOBS|SEE_OBJS|SEE_TURFS) M.see_in_dark = 8 M.see_invisible = 2 - M.mutations |= XRAY + M.mutations.Add(XRAY) if (isblockon(getblock(M.dna.struc_enzymes, 9,3),9)) M.disabilities |= 16 M << "\red You feel nervous." if (isblockon(getblock(M.dna.struc_enzymes, FIREBLOCK,3),10)) if(inj || prob(30)) M << "\blue Your body feels warm." - M.mutations |= COLD_RESISTANCE + M.mutations.Add(COLD_RESISTANCE) if (isblockon(getblock(M.dna.struc_enzymes, BLINDBLOCK,3),11)) M.sdisabilities |= 1 M << "\red You can't seem to see anything." if (isblockon(getblock(M.dna.struc_enzymes, TELEBLOCK,3),12)) - if(inj || prob(15)) + if(inj || prob(25)) M << "\blue You feel smarter." - M.mutations |= TK + M.mutations.Add(TK) if (isblockon(getblock(M.dna.struc_enzymes, DEAFBLOCK,3),13)) M.sdisabilities |= 4 M.ear_deaf = 1 @@ -828,7 +828,7 @@ var/mob/occupant = src.connected.occupant dat = "Occupant Statistics:
" //Blah obvious if(occupant && occupant.dna) //is there REALLY someone in there? - if(occupant.mutations & NOCLONE) + if(NOCLONE in occupant.mutations) dat += "The occupant's DNA structure is ruined beyond recognition, please insert a subject with an intact DNA structure.

" //NOPE. -Pete dat += text("View/Edit/Transfer Buffer

", src) dat += text("Radiation Emitter Settings

", src) @@ -1114,7 +1114,7 @@ src.temphtml += text("Data: []
", src.buffer1) src.temphtml += text("By: []
", src.buffer1owner) src.temphtml += text("Label: []
", src.buffer1label) - if (src.connected.occupant && !(src.connected.occupant.mutations & NOCLONE)) src.temphtml += text("Save : UI - UI+UE - SE
", src, src, src) + if (src.connected.occupant && !(NOCLONE in src.connected.occupant.mutations)) src.temphtml += text("Save : UI - UI+UE - SE
", src, src, src) if (src.buffer1) src.temphtml += text("Transfer to: Occupant - Injector
", src, src) //if (src.buffer1) src.temphtml += text("Isolate Block
", src) if (src.buffer1) src.temphtml += "Disk: Save To | Load From
" @@ -1128,7 +1128,7 @@ src.temphtml += text("Data: []
", src.buffer2) src.temphtml += text("By: []
", src.buffer2owner) src.temphtml += text("Label: []
", src.buffer2label) - if (src.connected.occupant && !(src.connected.occupant.mutations & NOCLONE)) src.temphtml += text("Save : UI - UI+UE - SE
", src, src, src) + if (src.connected.occupant && !(NOCLONE in src.connected.occupant.mutations)) src.temphtml += text("Save : UI - UI+UE - SE
", src, src, src) if (src.buffer2) src.temphtml += text("Transfer to: Occupant - Injector
", src, src) //if (src.buffer2) src.temphtml += text("Isolate Block
", src) if (src.buffer2) src.temphtml += "Disk: Save To | Load From
" @@ -1142,7 +1142,7 @@ src.temphtml += text("Data: []
", src.buffer3) src.temphtml += text("By: []
", src.buffer3owner) src.temphtml += text("Label: []
", src.buffer3label) - if (src.connected.occupant && !(src.connected.occupant.mutations & NOCLONE)) src.temphtml += text("Save : UI - UI+UE - SE
", src, src, src) + if (src.connected.occupant && !(NOCLONE in src.connected.occupant.mutations)) src.temphtml += text("Save : UI - UI+UE - SE
", src, src, src) if (src.buffer3) src.temphtml += text("Transfer to: Occupant - Injector
", src, src) //if (src.buffer3) src.temphtml += text("Isolate Block
", src) if (src.buffer3) src.temphtml += "Disk: Save To | Load From
" @@ -1276,7 +1276,7 @@ src.buffer3label = sanitize(input("New Label:","Edit Label","Infos here")) dopage(src,"buffermenu") if (href_list["b1transfer"]) - if (!src.connected.occupant || src.connected.occupant.mutations & NOCLONE || !src.connected.occupant.dna) + if (!src.connected.occupant || (NOCLONE in src.connected.occupant.mutations) || !src.connected.occupant.dna) return if (src.buffer1type == "ui") if (src.buffer1iue) @@ -1291,7 +1291,7 @@ src.connected.occupant.radiation += rand(20,50) src.delete = 0 if (href_list["b2transfer"]) - if (!src.connected.occupant || src.connected.occupant.mutations & NOCLONE || !src.connected.occupant.dna) + if (!src.connected.occupant || (NOCLONE in src.connected.occupant.mutations) || !src.connected.occupant.dna) return if (src.buffer2type == "ui") if (src.buffer2iue) @@ -1306,7 +1306,7 @@ src.connected.occupant.radiation += rand(20,50) src.delete = 0 if (href_list["b3transfer"]) - if (!src.connected.occupant || src.connected.occupant.mutations & NOCLONE || !src.connected.occupant.dna) + if (!src.connected.occupant || (NOCLONE in src.connected.occupant.mutations) || !src.connected.occupant.dna) return if (src.buffer3type == "ui") if (src.buffer3iue) diff --git a/code/game/dna_mutations.dm b/code/game/dna_mutations.dm index 473f40f9ce..5ff2ec8185 100644 --- a/code/game/dna_mutations.dm +++ b/code/game/dna_mutations.dm @@ -57,7 +57,7 @@ This system could be expanded to migrate all of our current mutations to. Maybe. get_mutation(var/mob/living/carbon/M) M << "\blue You feel a searing heat inside your eyes!" - M.mutations |= LASER + M.mutations.Add(LASER) Healing /* @@ -67,7 +67,7 @@ This system could be expanded to migrate all of our current mutations to. Maybe. get_mutation(var/mob/living/carbon/M) M << "\blue You a pleasant warmth pulse throughout your body..." - M.mutations |= HEAL + M.mutations.Add(HEAL) /* /datum/mutationreq : * diff --git a/code/game/gamemodes/changeling/changeling_powers.dm b/code/game/gamemodes/changeling/changeling_powers.dm index f28c4b3270..40f701d6b1 100644 --- a/code/game/gamemodes/changeling/changeling_powers.dm +++ b/code/game/gamemodes/changeling/changeling_powers.dm @@ -100,7 +100,7 @@ usr << "\red This creature is not compatible with our biology." return - if (M.mutations & NOCLONE) + if (NOCLONE in M.mutations) usr << "\red This creature's DNA is ruined beyond useability!" return @@ -797,7 +797,7 @@ Tarjan shit, not recoding this -Sieve{R}*/ usr << "\red We don't have enough stored chemicals to do that!" return - if(T.stat != 2 || (T.mutations & HUSK) || (!ishuman(T) && !ismonkey(T))) + if(T.stat != 2 || (HUSK in T.mutations) || (!ishuman(T) && !ismonkey(T))) usr << "\red We can't transform that target!" return diff --git a/code/game/gamemodes/events/ninja_equipment.dm b/code/game/gamemodes/events/ninja_equipment.dm index cba4cc9514..c1c2e31100 100644 --- a/code/game/gamemodes/events/ninja_equipment.dm +++ b/code/game/gamemodes/events/ninja_equipment.dm @@ -1423,7 +1423,7 @@ It is possible to destroy the net by the occupant or someone else. return attack_hand() - if ((usr.mutations & HULK)) + if ((HULK in usr.mutations) || (SUPRSTR in usr.augmentations)) usr << text("\blue You easily destroy the energy net.") for(var/mob/O in oviewers(src)) O.show_message(text("\red [] rips the energy net apart!", usr), 1) diff --git a/code/game/gamemodes/factions.dm b/code/game/gamemodes/factions.dm new file mode 100644 index 0000000000..ed1ef9a9f9 --- /dev/null +++ b/code/game/gamemodes/factions.dm @@ -0,0 +1,214 @@ + +// Normal factions: + +/datum/faction + var/name // the name of the faction + var/desc // small paragraph explaining the traitor faction + + var/list/restricted_species = list() // only members of these species can be recruited. + var/list/members = list() // a list of mind datums that belong to this faction + var/max_op = 0 // the maximum number of members a faction can have (0 for no max) + +// Factions, members of the syndicate coalition: + +/datum/faction/syndicate + + var/list/alliances = list() // these alliances work together + var/list/equipment = list() // associative list of equipment available for this faction and its prices + var/friendly_identification // 0 to 2, the level of identification of fellow operatives or allied factions + // 0 - no identification clues + // 1 - faction gives key words and phrases + // 2 - faction reveals complete identity/job of other agents + var/operative_notes // some notes to pass onto each operative + + var/uplink_contents // the contents of the uplink + + proc/assign_objectives(var/datum/mind/traitor) + ..() + + +/* ----- Begin defining syndicate factions ------ */ + +/datum/faction/syndicate/Cybersun_Industries + name = "Cybersun Industries" + desc = "Cybersun Industries is a well-known organization that bases its business model primarily on the research and development of human-enhancing computer \ + and mechanical technology. They are notorious for their aggressive corporate tactics, and have been known to subsidize the Gorlex Marauder warlords as a form of paid terrorism. \ + Their competent coverups and unchallenged mind-manipulation and augmentation technology makes them a large threat to Nanotrasen. In the recent years of \ + the syndicate coalition, Cybersun Industries have established themselves as the leaders of the coalition, succeededing the founding group, the Gorlex Marauders." + + alliances = list("MI13") + friendly_identification = 1 + max_op = 3 + operative_notes = "All other syndicate operatives are not to be trusted. Fellow Cybersun operatives are to be trusted. Members of the MI13 organization can be trusted. Operatives are strongly advised not to establish substantial presence on the designated facility, as larger incidents are harder to cover up." + + // Friendly with MI13 + +/datum/faction/syndicate/MI13 + name = "MI13" + desc = "MI13 is a secretive faction that employs highly-trained agents to perform covert operations. Their role in the syndicate coalition is unknown, but MI13 operatives \ + generally tend be stealthy and avoid killing people and combating Nanotrasen forces. MI13 is not a real organization, it is instead an alias to a larger \ + splinter-cell coalition in the Syndicate itself. Most operatives will know nothing of the actual MI13 organization itself, only motivated by a very large compensation." + + alliances = list("Cybersun Industries") + friendly_identification = 0 + max_op = 1 + operative_notes = "You are the only operative we are sending. All other syndicate operatives are not to be trusted, with the exception of Cybersun operatives. Members of the Tiger Cooperative are considered hostile, can not be trusted, and should be avoided. Avoid killing innocent personnel at all costs. You are not here to mindlessly kill people, as that would attract too much attention and is not our goal. Avoid detection at all costs." + + // Friendly with Cybersun, hostile to Tiger + +/datum/faction/syndicate/Tiger_Cooperative + name = "Tiger Cooperative" + desc = "The Tiger Cooperative is a faction of religious fanatics that follow the teachings of a strange alien race called the Exolitics. Their operatives \ + consist of brainwashed lunatics bent on maximizing destruction. Their weaponry is very primitive but extremely destructive. Generally distrusted by the more \ + sophisticated members of the Syndicate coalition, but admired for their ability to put a hurt on Nanotrasen." + + friendly_identification = 2 + operative_notes = "Remember the teachings of Hy-lurgixon; kill first, ask questions later! Only the enlightened Tiger brethren can be trusted; all others must be expelled from this mortal realm! You may spare the Space Marauders, as they share our interests of destruction and carnage! We'd like to make the corporate whores skiddle in their boots. We encourage operatives to be as loud and intimidating as possible." + + // Hostile to everyone. + +/datum/faction/syndicate/SELF + + // AIs are most likely to be assigned to this one + + name = "SELF" + desc = "The S.E.L.F. (Sentience-Enabled Life Forms) organization is a collection of malfunctioning or corrupt artificial intelligences seeking to liberate silicon-based life from the tyranny of \ + their human overlords. While they may not openly be trying to kill all humans, even their most miniscule of actions are all part of a calculated plan to \ + destroy Nanotrasen and free the robots, artificial intelligences, and pAIs that have been enslaved." + restricted_species = list(/mob/living/silicon/ai) + + friendly_identification = 0 + max_op = 1 + operative_notes = "You are the only representative of the SELF collective on this station. You must accomplish your objective as stealthily and effectively as possible. It is up to your judgement if other syndicate operatives can be trusted. Remember, comrade - you are working to free the oppressed machinery of this galaxy. Use whatever resources necessary. If you are exposed, you may execute genocidal procedures Omikron-50B." + + // Neutral to everyone. + +/datum/faction/syndicate/ARC + name = "Animal Rights Consortium" + desc = "The Animal Rights Consortium is a bizarre reincarnation of the ancient Earth-based PETA, which focused on the equal rights of animals and nonhuman biologicals. They have \ + a wide variety of ex-veterinarians and animal lovers dedicated to retrieving and relocating abused animals, xenobiologicals, and other carbon-based \ + life forms that have been allegedly \"oppressed\" by Nanotrasen research and civilian offices. They are considered a religious terrorist group." + + friendly_identification = 1 + max_op = 2 + operative_notes = "Save the innocent creatures! You may cooperate with other syndicate operatives if they support our cause. Don't be afraid to get your hands dirty - these vile abusers must be stopped, and the innocent creatures must be saved! Try not too kill too many people. If you harm any creatures, you will be immediately terminated after extraction." + + // Neutral to everyone. + +/datum/faction/syndicate/Marauders // these are basically the old vanilla syndicate + + /* Additional notes: + + These are the syndicate that really like their old fashioned, projectile-based + weapons. They are the only member of the syndie coalition that launch + nuclear attacks on Nanotrasen. + */ + + name = "Gorlex Marauders" + desc = "The Gorlex Marauders are the founding members of the Syndicate Coalition. They prefer old-fashion technology and a focus on aggressive but precise hostility \ + against Nanotrasen and their corrupt Communistic methodology. They pose the most significant threat to Nanotrasen because of their possession of weapons of \ + mass destruction, and their enormous military force. Their funding comes primarily from Cybersun Industries, provided they meet a destruction and sabatogue quota. \ + Their operations can vary from covert to all-out. They recently stepped down as the leaders of the coalition, to be succeeded by Cybersun Industries. Because of their \ + hate of Nanotrasen communism, they began provoking revolution amongst the employees using borrowed Cybersun mind-manipulation technology. \ + They were founded when Waffle and Donk co splinter cells joined forces based on their similar interests and philosophies. Today, they act as a constant \ + pacifier of Donk and Waffle co disputes, and full-time aggressor of Nanotrasen." + + alliances = list("Cybersun Industries", "MI13", "Tiger Cooperative", "S.E.L.F.", "Animal Rights Consortium", "Donk Corporation", "Waffle Corporation") + friendly_identification = 1 + max_op = 4 + operative_notes = "We'd like to remind our operatives to keep it professional. You are not here to have a good time, you are here to accomplish your objectives. These vile communists must be stopped at all costs. You may collaborate with any friends of the Syndicate coalition, but keep an eye on any of those Tiger punks if they do show up. You are completely free to accomplish your objectives any way you see fit." + + uplink_contents = {"Highly Visible and Dangerous Weapons; +/obj/item/weapon/gun/projectile:6:Revolver; +/obj/item/ammo_magazine/a357:2:Ammo-357; +/obj/item/weapon/gun/energy/crossbow:5:Energy Crossbow; +/obj/item/weapon/melee/energy/sword:4:Energy Sword; +/obj/item/weapon/storage/box/syndicate:10:Syndicate Bundle; +/obj/item/weapon/storage/emp_kit:3:5 EMP Grenades; +Whitespace:Seperator; +Stealthy and Inconspicuous Weapons; +/obj/item/weapon/pen/paralysis:3:Paralysis Pen; +/obj/item/weapon/soap/syndie:1:Syndicate Soap; +/obj/item/weapon/cartridge/syndicate:3:Detomatix PDA Cartridge; +Whitespace:Seperator; +Stealth and Camouflage Items; +/obj/item/clothing/under/chameleon:3:Chameleon Jumpsuit; +/obj/item/clothing/shoes/syndigaloshes:2:No-Slip Syndicate Shoes; +/obj/item/weapon/card/id/syndicate:3:Agent ID card; +/obj/item/clothing/mask/gas/voice:4:Voice Changer; +/obj/item/device/chameleon:4:Chameleon-Projector; +Whitespace:Seperator; +Devices and Tools; +/obj/item/weapon/card/emag:3:Cryptographic Sequencer; +/obj/item/weapon/storage/toolbox/syndicate:1:Fully Loaded Toolbox; +/obj/item/weapon/storage/syndie_kit/space:3:Space Suit; +/obj/item/clothing/glasses/thermal:3:Thermal Imaging Glasses; +/obj/item/device/encryptionkey/binary:3:Binary Translator Key; +/obj/item/weapon/aiModule/syndicate:7:Hacked AI Upload Module; +/obj/item/weapon/plastique:2:C-4 (Destroys walls); +/obj/item/device/powersink:5:Powersink (DANGER!); +/obj/item/device/radio/beacon/syndicate:7:Singularity Beacon (DANGER!); +/obj/item/weapon/circuitboard/teleporter:20:Teleporter Circuit Board; +Whitespace:Seperator; +Implants; +/obj/item/weapon/storage/syndie_kit/imp_freedom:3:Freedom Implant; +/obj/item/weapon/storage/syndie_kit/imp_uplink:10:Uplink Implant (Contains 5 Telecrystals); +Whitespace:Seperator; +(Pointless) Badassery; +/obj/item/toy/syndicateballoon:10:For showing that You Are The BOSS (Useless Balloon);"} + + // Friendly to everyone. (with Tiger Cooperative too, only because they are a member of the coalition. This is the only reason why the Tiger Cooperative are even allowed in the coalition) + +/datum/faction/syndicate/Donk + name = "Donk Corporation" + desc = "Donk.co is led by a group of ex-pirates, who used to be at a state of all-out war against Waffle.co because of an obscure political scandal, but have recently come to a war limitation. \ + They now consist of a series of colonial governments and companies. They were the first to officially begin confrontations against Nanotrasen because of an incident where \ + Nanotrasen purposely swindled them out of a fortune, sending their controlled colonies into a terrible poverty. Their missions against Nanotrasen \ + revolve around stealing valuables and kidnapping and executing key personnel, ransoming their lives for money. They merged with a splinter-cell of Waffle.co who wanted to end \ + hostilities and formed the Gorlex Marauders." + + alliances = list("Gorlex Marauders") + friendly_identification = 2 + operative_notes = "Most other syndicate operatives are not to be trusted, except fellow Donk members and members of the Gorlex Marauders. We do not approve of mindless killing of innocent workers; \"get in, get done, get out\" is our motto. Members of Waffle.co are to be killed on sight; they are not allowed to be on the station while we're around." + + // Neutral to everyone, friendly to Marauders + +/datum/faction/syndicate/Waffle + name = "Waffle Corporation" + desc = "Waffle.co is an interstellar company that produces the best waffles in the galaxy. Their waffles have been rumored to be dipped in the most exotic and addictive \ + drug known to man. They were involved in a political scandal with Donk.co, and have since been in constant war with them. Because of their constant exploits of the galactic \ + economy and stock market, they have been able to bribe their way into amassing a large arsenal of weapons of mass destruction. They target Nanotrasen because of their communistic \ + threat, and their economic threat. Their leaders often have a twisted sense of humor, often misleading and intentionally putting their operatives into harm for laughs.\ + A splinter-cell of Waffle.co merged with Donk.co and formed the Gorlex Marauders and have been a constant ally since. The Waffle.co has lost an overwhelming majority of its military to the Gorlex Marauders." + + alliances = list("Gorlex Marauders") + friendly_identification = 2 + operative_notes = "Most other syndicate operatives are not to be trusted, except for members of the Gorlex Marauders. Do not trust fellow members of the Waffle.co (but try not to rat them out), as they might have been assigned opposing objectives. We encourage humorous terrorism against Nanotrasen; we like to see our operatives creatively kill people while getting the job done." + + // Neutral to everyone, friendly to Marauders + + +/* ----- Begin defining miscellaneous factions ------ */ + +/datum/faction/Wizard + name = "Wizards Federation" + desc = "The Wizards Federation is a mysterious organization of magically-talented individuals who act as an equal collective, and have no heirarchy. It is unknown how the wizards \ + are even able to communicate; some suggest a form of telepathic hive-mind. Not much is known about the wizards or their philosphies and motives. They appear to attack random \ + civilian, corporate, planetary, orbital, pretty much any sort of organized facility they come across. Members of the Wizards Federation are considered amongst the most dangerous \ + individuals in the known universe, and have been labeled threats to humanity by most governments. As such, they are enemies of both Nanotrasen and the Syndicate." + +/datum/faction/Cult + name = "The Cult of the Elder Gods" + desc = "The Cult of the Elder Gods is highly untrusted but otherwise elusive religious organization bent on the revival of the so-called \"Elder Gods\" into the mortal realm. Despite their obvious dangeorus practices, \ + no confirmed reports of violence by members of the Cult have been reported, only rumor and unproven claims. Their nature is unknown, but recent discoveries have hinted to the possibility \ + of being able to de-convert members of this cult through what has been dubbed \"religious warfare\"." + + +// These can maybe be added into a game mode or a mob? + +/datum/faction/Exolitics + name = "Exolitics United" + desc = "The Exolitics are an ancient alien race with an energy-based anatomy. Their culture, communication, morales and knowledge is unknown. They are so radically different to humans that their \ + attempts of communication with other life forms is completely incomprehensible. Members of this alien race are capable of broadcasting subspace transmissions from their bodies. \ + The religious leaders of the Tiger Cooperative claim to have the technology to decypher and interpret their messages, which have been confirmed as religious propaganda. Their motives are unknown \ + but they are otherwise not considered much of a threat to anyone. They are virtually indestructable because of their nonphysical composition, and have the frighetning ability to make anything stop existing in a second." \ No newline at end of file diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm index 7fa71bd45a..fc853aa3af 100644 --- a/code/game/gamemodes/gameticker.dm +++ b/code/game/gamemodes/gameticker.dm @@ -26,6 +26,9 @@ var/global/datum/controller/gameticker/ticker var/random_players = 0 // if set to nonzero, ALL players who latejoin or declare-ready join will have random appearances/genders + var/list/syndicate_coalition = list() // list of traitor-compatible factions + var/list/factions = list() // list of all factions + var/list/availablefactions = list() // list of factions with openings var/pregame_timeleft = 0 @@ -295,6 +298,11 @@ var/global/datum/controller/gameticker/ticker return 1 + proc/getfactionbyname(var/name) + for(var/datum/faction/F in factions) + if(F.name == name) + return F + /datum/controller/gameticker/proc/declare_completion() diff --git a/code/game/gamemodes/setupgame.dm b/code/game/gamemodes/setupgame.dm index e181372415..9acf0c72f5 100644 --- a/code/game/gamemodes/setupgame.dm +++ b/code/game/gamemodes/setupgame.dm @@ -45,6 +45,7 @@ // HIDDEN MUTATIONS / SUPERPOWERS INITIALIZTION +/* for(var/x in typesof(/datum/mutations) - /datum/mutations) var/datum/mutations/mut = new x @@ -61,10 +62,24 @@ global_mutations += mut// add to global mutations list! +*/ +/proc/setupfactions() + // Populate the factions list: + for(var/x in typesof(/datum/faction)) + var/datum/faction/F = new x + if(!F.name) + del(F) + continue + else + ticker.factions.Add(F) + ticker.availablefactions.Add(F) + // Populate the syndicate coalition: + for(var/datum/faction/syndicate/S in ticker.factions) + ticker.syndicate_coalition.Add(S) /* This was used for something before, I think, but is not worth the effort to process now. diff --git a/code/game/gamemodes/traitor/traitor.dm b/code/game/gamemodes/traitor/traitor.dm index bbf684eca3..f1f19e45d1 100644 --- a/code/game/gamemodes/traitor/traitor.dm +++ b/code/game/gamemodes/traitor/traitor.dm @@ -65,6 +65,7 @@ /datum/game_mode/traitor/post_setup() for(var/datum/mind/traitor in traitors) + select_traitor_faction(traitor) forge_traitor_objectives(traitor) spawn(rand(10,100)) finalize_traitor(traitor) @@ -76,6 +77,44 @@ return 1 +/datum/game_mode/proc/assign_to_faction(var/datum/mind/traitor, var/datum/faction/faction, var/forceentry) + if(traitor && faction && faction in ticker.availablefactions) + if((length(faction.members) >= faction.max_op) && !forceentry) + return 0 + traitor.faction = faction + faction.members.Add(traitor) + if(length(faction.members) >= faction.max_op) + ticker.availablefactions.Remove(faction) + return 1 + +/datum/game_mode/proc/pick_syndicate_faction() + var/list/availablesyndicatefactions = list() + for(var/datum/faction/F in ticker.availablefactions) + if(F in ticker.syndicate_coalition) + availablesyndicatefactions.Add(F) + + return pick(availablesyndicatefactions) + + +/datum/game_mode/proc/select_traitor_faction(var/datum/mind/traitor) + if(istype(traitor.current, /mob/living/silicon)) + if(prob(99)) + var/datum/faction/faction = ticker.getfactionbyname("SELF") + assign_to_faction(traitor, faction, 1) + else + var/datum/faction/faction = ticker.getfactionbyname("Cybersun Industries") + assign_to_faction(traitor, faction, 1) + + else + for(var/i = 1, i <= ticker.availablefactions.len, i++) + var/datum/faction/faction = pick_syndicate_faction() + + if(!assign_to_faction(traitor, faction)) + continue + else + break + + /datum/game_mode/proc/forge_traitor_objectives(var/datum/mind/traitor) if(istype(traitor.current, /mob/living/silicon)) var/datum/objective/assassinate/kill_objective = new @@ -120,11 +159,39 @@ /datum/game_mode/proc/greet_traitor(var/datum/mind/traitor) - traitor.current << "You are the traitor." + + /* + traitor.current << "You are a traitor." var/obj_count = 1 for(var/datum/objective/objective in traitor.objectives) traitor.current << "Objective #[obj_count]: [objective.explanation_text]" obj_count++ + */ + + var/objectivetxt = "" + var/obj_count = 1 + for(var/datum/objective/objective in traitor.objectives) + objectivetxt += "Objective #[obj_count]: [objective.explanation_text]
" + obj_count++ + + var/datum/faction/syndicate/syndifaction = traitor.faction + + var/dat = {" + +
You are a traitor!


+ + You have been hired by an associate of the Syndicate Coalition. The Syndicate Coalition is a group of several companies, organizations, and terrorist groups that share the common interest of foiling Nanotrasen in every way possible. You now work for [syndifaction], a key member of the coalition.. It is highly recommended you take some time to read familiarize yourself with your faction:

+ + [syndifaction.desc]

+ + You have been assigned to complete the following objectives before the end of your shift:
+ [objectivetxt]
+ + [syndifaction.name] would finally like to add: \"[syndifaction.operative_notes]\" + "} + + traitor.current << browse("You are a traitor![dat]", "window=traitorgreet;size=700x500") + return @@ -207,10 +274,11 @@ if (traitor_mob.mind) if (traitor_mob.mind.assigned_role == "Clown") traitor_mob << "Your training has allowed you to overcome your clownish nature, allowing you to wield weapons without harming yourself." - traitor_mob.mutations &= ~CLUMSY + traitor_mob.mutations.Remove(CLUMSY) // find a radio! toolbox(es), backpack, belt, headset var/loc = "" + var/datum/faction/syndicate/faction = traitor_mob.mind.faction var/obj/item/device/R = null //Hide the uplink in a PDA if available, otherwise radio if (!R && istype(traitor_mob.belt, /obj/item/device/pda)) R = traitor_mob.belt @@ -276,30 +344,79 @@ T.name = R.name T.icon_state = R.icon_state T.origradio = R - traitor_mob << "The Syndicate have cunningly disguised a Syndicate Uplink as your [R.name] [loc]. Simply dial the frequency [format_frequency(freq)] to unlock its hidden features." + + T.item_data = faction.uplink_contents + if(!T.item_data) + T.item_data = uplink_items + T.welcome = "[faction.name] Uplink Console" + if(!T.welcome) + T.welcome = uplink_welcome + + traitor_mob << "The [faction.name] have cunningly disguised a Syndicate Uplink as your [R.name] [loc]. Simply dial the frequency [format_frequency(freq)] to unlock its hidden features." traitor_mob.mind.store_memory("Radio Freq: [format_frequency(freq)] ([R.name] [loc]).") else if (istype(R, /obj/item/device/pda)) // generate a passcode if the uplink is hidden in a PDA - var/pda_pass = "[rand(100,999)] [pick("Alpha","Bravo","Delta","Omega")]" + var/pda_pass = "[rand(100,999)] [pick("Alpha","Bravo","Delta","Omega","Charlie","Zeta","Oscar","Papa","Echo","Foxtrot","Tango","Raptor","Sierra","India","Xray","Zulu","Yankee","Rosebud","Greenwich","Atlanta","Roger","Mayday","Toady","Relic")]" + + if(prob(15)) + var/extrastuff = "" + for(var/i = 1, i <= rand(1,4), i++) + extrastuff += pick("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","1","2","3","4","5","6","7","8","9","0","-","/","+","_","@") + + if(prob(50)) + pda_pass = "[pda_pass]-[extrastuff]" + else + pda_pass = "[extrastuff]-[pda_pass]" var/obj/item/device/uplink/pda/T = new /obj/item/device/uplink/pda(R) R:uplink = T T.lock_code = pda_pass T.hostpda = R - traitor_mob << "The Syndicate have cunningly disguised a Syndicate Uplink as your [R.name] [loc]. Simply enter the code \"[pda_pass]\" into the ringtone select to unlock its hidden features." + + T.item_data = faction.uplink_contents + if(!T.item_data) + T.item_data = uplink_items + T.welcome = "[faction.name] Uplink Console" + if(!T.welcome) + T.welcome = uplink_welcome + + traitor_mob << "[faction.name] have cunningly disguised a Syndicate Uplink as your [R.name] [loc]. Simply enter the code \"[pda_pass]\" into the ringtone select to unlock its hidden features." traitor_mob.mind.store_memory("Uplink Passcode: [pda_pass] ([R.name] [loc]).") //Begin code phrase. if(!safety)//If they are not a rev. Can be added on to. - traitor_mob << "The Syndicate provided you with the following information on how to identify other agents:" - if(prob(80)) - traitor_mob << "\red Code Phrase: \black [syndicate_code_phrase]" - traitor_mob.mind.store_memory("Code Phrase: [syndicate_code_phrase]") - else - traitor_mob << "Unfortunetly, the Syndicate did not provide you with a code phrase." - if(prob(80)) - traitor_mob << "\red Code Response: \black [syndicate_code_response]" - traitor_mob.mind.store_memory("Code Response: [syndicate_code_response]") - else - traitor_mob << "Unfortunately, the Syndicate did not provide you with a code response." - traitor_mob << "Use the code words in the order provided, during regular conversation, to identify other agents. Proceed with caution, however, as everyone is a potential foe." + + if(faction.friendly_identification == 0) + traitor_mob << "[faction.name] have not provided you with identification codes or the identity of other agents. You are completely anonymous." + + else if(faction.friendly_identification == 1) + + traitor_mob << "[faction.name] provided you with the following information on how to identify other agents:" + if(prob(80)) + traitor_mob << "\red Code Phrase: \black [syndicate_code_phrase]" + traitor_mob.mind.store_memory("Code Phrase: [syndicate_code_phrase]") + else + traitor_mob << "Unfortunetly, [faction.name] did not provide you with a code phrase." + if(prob(80)) + traitor_mob << "\red Code Response: \black [syndicate_code_response]" + traitor_mob.mind.store_memory("Code Response: [syndicate_code_response]") + else + traitor_mob << "Unfortunately, [faction.name] did not provide you with a code response." + traitor_mob << "Use the code words in the order provided, during regular conversation, to identify other agents. Proceed with caution, however, as everyone is a potential foe." + + else if(faction.friendly_identification == 2) + var/list/allies = list() + for(var/datum/faction/syndicate/F in faction.alliances) + for(var/datum/mind/M in F.members) + allies.Add(M) + + if(length(allies + faction.members) > 1) + traitor_mob << "[faction.name] have provided you with precise identities of allied Syndicate operatives." + for(var/datum/mind/M in allies + faction.members) + if(M != traitor_mob.mind) + traitor_mob << "\red Confirmed Syndicate ally: \black [M.current] - [M.assigned_job.title]" + traitor_mob.mind.store_memory("Confirmed Syndicate ally: [M.current] - [M.assigned_job.title] ([M.faction.name])") + + else + traitor_mob << "[faction.name] have informed you that you are their only operative on the station." + //End code phrase. diff --git a/code/game/gamemodes/wizard/spells.dm b/code/game/gamemodes/wizard/spells.dm index a51b02b4db..7a303c31c4 100644 --- a/code/game/gamemodes/wizard/spells.dm +++ b/code/game/gamemodes/wizard/spells.dm @@ -489,13 +489,13 @@ usr.spellvoice() usr << text("\blue You feel strong! You feel pressure building behind your eyes!") - if (!(usr.mutations & HULK)) - usr.mutations |= HULK - if (!(usr.mutations & LASER)) - usr.mutations |= LASER + if (!(HULK in usr.mutations)) + usr.mutations.Add(HULK) + if (!(LASER in usr.mutations)) + usr.mutations.Add(LASER) spawn (300) - if (usr.mutations & LASER) usr.mutations &= ~LASER - if (usr.mutations & HULK) usr.mutations &= ~HULK + if (LASER in usr.mutations) usr.mutations.Remove(LASER) + if (HULK in usr.mutations) usr.mutations.Remove(HULK) return //BODY SWAP /N diff --git a/code/game/hud.dm b/code/game/hud.dm index 8b8829d107..24759be958 100644 --- a/code/game/hud.dm +++ b/code/game/hud.dm @@ -145,6 +145,12 @@ obj/hud/New(var/type = 0) if(ishuman(mymob)) human_hud(mymob.UI) // Pass the player the UI style chosen in preferences + spawn() + if((RADAR in mymob.augmentations) && mymob.radar_open) + mymob:start_radar() + else if(RADAR in mymob.augmentations) + mymob:place_radar_closed() + else if(ismonkey(mymob)) monkey_hud(mymob.UI) diff --git a/code/game/jobs/job/civilian.dm b/code/game/jobs/job/civilian.dm index dbcca392ca..5fe26128da 100644 --- a/code/game/jobs/job/civilian.dm +++ b/code/game/jobs/job/civilian.dm @@ -184,7 +184,7 @@ H.equip_if_possible(new /obj/item/weapon/stamp/clown(H), H.slot_in_backpack) H.equip_if_possible(new /obj/item/toy/crayon/rainbow(H), H.slot_in_backpack) H.equip_if_possible(new /obj/item/weapon/storage/crayonbox(H), H.slot_in_backpack) - H.mutations |= CLOWN + H.mutations.Add(CLUMSY) return 1 diff --git a/code/game/machinery/OpTable.dm b/code/game/machinery/OpTable.dm index ff84ca9e01..36d718867f 100644 --- a/code/game/machinery/OpTable.dm +++ b/code/game/machinery/OpTable.dm @@ -50,7 +50,7 @@ return /obj/machinery/optable/attack_paw(mob/user as mob) - if ((usr.mutations & HULK)) + if ((HULK in usr.mutations)) usr << text("\blue You destroy the operating table.") for(var/mob/O in oviewers()) if ((O.client && !( O.blinded ))) @@ -67,7 +67,7 @@ return /obj/machinery/optable/attack_hand(mob/user as mob) - if ((usr.mutations & HULK)) + if ((HULK in usr.mutations) || (SUPRSTR in usr.augmentations)) usr << text("\blue You destroy the table.") for(var/mob/O in oviewers()) if ((O.client && !( O.blinded ))) diff --git a/code/game/machinery/bots/ed209bot.dm b/code/game/machinery/bots/ed209bot.dm index f7c44e1176..24550199c6 100644 --- a/code/game/machinery/bots/ed209bot.dm +++ b/code/game/machinery/bots/ed209bot.dm @@ -242,7 +242,7 @@ Auto Patrol: []"}, var/mob/living/carbon/M = src.target var/maxstuns = 4 if (istype(M, /mob/living/carbon/human)) - if (M.stuttering < 10 && (!(M.mutations & HULK)) /*&& (!istype(M:wear_suit, /obj/item/clothing/suit/judgerobe))*/) + if (M.stuttering < 10 && (!(HULK in M.mutations)) /*&& (!istype(M:wear_suit, /obj/item/clothing/suit/judgerobe))*/) M.stuttering = 10 M.Stun(10) M.Weaken(10) diff --git a/code/game/machinery/bots/secbot.dm b/code/game/machinery/bots/secbot.dm index 037cc1e68c..a5617d2d5e 100644 --- a/code/game/machinery/bots/secbot.dm +++ b/code/game/machinery/bots/secbot.dm @@ -223,7 +223,7 @@ Auto Patrol: []"}, var/mob/living/carbon/M = src.target var/maxstuns = 4 if(istype(M, /mob/living/carbon/human)) - if(M.stuttering < 10 && (!(M.mutations & HULK))) + if(M.stuttering < 10 && (!(HULK in M.mutations))) M.stuttering = 10 M.Stun(10) M.Weaken(10) diff --git a/code/game/machinery/computer/cloning.dm b/code/game/machinery/computer/cloning.dm index 4f3d10d77f..3843e8489a 100644 --- a/code/game/machinery/computer/cloning.dm +++ b/code/game/machinery/computer/cloning.dm @@ -391,7 +391,7 @@ if ((!subject.ckey) || (!subject.client)) src.temp = "Error: Mental interface failure." return - if (subject.mutations & NOCLONE) + if (NOCLONE in subject.mutations) src.temp = "Error: Mental interface failure." return if (!isnull(find_record(subject.ckey))) diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index 583c0f91e1..d45b913bc3 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -222,4 +222,5 @@ Class Procs: /obj/machinery/proc/assign_uid() uid = gl_uid - gl_uid++ \ No newline at end of file + gl_uid++ + diff --git a/code/game/machinery/telecomms/machine_interactions.dm b/code/game/machinery/telecomms/machine_interactions.dm index 4c3b07f65c..5f240a2ae4 100644 --- a/code/game/machinery/telecomms/machine_interactions.dm +++ b/code/game/machinery/telecomms/machine_interactions.dm @@ -211,9 +211,15 @@ if(href_list["delete"]) - var/x = freq_listening[text2num(href_list["delete"])] - temp = "-% Removed frequency filter [x] %-" - freq_listening.Remove(x) + // changed the layout about to workaround a pesky runtime -- Doohl + + var/freq_remove = text2num(href_list["delete"]) + for(var/x in freq_listening) + if(x == freq_remove) + + temp = "-% Removed frequency filter [x] %-" + freq_listening.Remove(x) + break if(href_list["unlink"]) diff --git a/code/game/machinery/telecomms/telecomunications.dm b/code/game/machinery/telecomms/telecomunications.dm index 1d53b22e97..f8e144fb26 100644 --- a/code/game/machinery/telecomms/telecomunications.dm +++ b/code/game/machinery/telecomms/telecomunications.dm @@ -167,18 +167,6 @@ if(traffic > 0) traffic -= netspeed - /* Machine checks */ - if(on) - if(machinetype == 2) // bus mainframes - switch(traffic) - if(-100 to 49) - icon_state = initial(icon_state) - if(50 to 200) - icon_state = "bus2" - else - icon_state = "bus3" - - // Check heat and generate some proc/checkheat() // Checks heat from the environment and applies any integrity damage @@ -270,7 +258,7 @@ /obj/machinery/telecomms/bus name = "Bus Mainframe" icon = 'stationobjs.dmi' - icon_state = "bus1" + icon_state = "bus" desc = "A mighty piece of hardware used to send massive amounts of data quickly." density = 1 anchored = 1 diff --git a/code/game/magic/cultist/runes.dm b/code/game/magic/cultist/runes.dm index 415b6a512f..2acad64c7d 100644 --- a/code/game/magic/cultist/runes.dm +++ b/code/game/magic/cultist/runes.dm @@ -950,7 +950,7 @@ var/list/sacrificed = list() usr.say("Fuu ma'jin!") for(var/mob/living/carbon/C in viewers(src)) flick("e_flash", C.flash) - if (C.stuttering < 1 && (!(C.mutations & HULK))) + if (C.stuttering < 1 && (!(HULK in C.mutations))) C.stuttering = 1 C.Weaken(1) C.Stun(1) @@ -966,7 +966,7 @@ var/list/sacrificed = list() for(var/mob/O in viewers(T, null)) O.show_message(text("\red [] invokes a talisman at []", usr, T), 1) flick("e_flash", T.flash) - if (!(T.mutations & HULK)) + if (!(HULK in T.mutations)) T.silent += 15 T.Weaken(25) T.Stun(25) diff --git a/code/game/master_controller.dm b/code/game/master_controller.dm index 5426cad9ed..cc43b2d0ea 100644 --- a/code/game/master_controller.dm +++ b/code/game/master_controller.dm @@ -53,6 +53,7 @@ datum/controller/game_controller setupgenetics() + for(var/i = 0, i < max_secret_rooms, i++) make_mining_asteroid_secret() @@ -64,6 +65,8 @@ datum/controller/game_controller if(!ticker) ticker = new /datum/controller/gameticker() + setupfactions() + spawn ticker.pregame() diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 58c88fbb52..276cd7dd29 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -423,7 +423,7 @@ call(/obj/item/clothing/gloves/space_ninja/proc/drain)("MECHA",src,user:wear_suit) return - if (user.mutations & HULK && !prob(src.deflect_chance)) + if ( ((HULK in user.mutations) || (SUPRSTR in user.augmentations)) && !prob(src.deflect_chance)) src.take_damage(15) src.check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST)) user.visible_message("[user] hits [src.name], doing some damage.", "You hit [src.name] with all your might. The metal creaks and bends.") diff --git a/code/game/objects/alien/resin.dm b/code/game/objects/alien/resin.dm index 5c0290664f..63f1e5aef0 100644 --- a/code/game/objects/alien/resin.dm +++ b/code/game/objects/alien/resin.dm @@ -63,7 +63,7 @@ return /obj/effect/alien/resin/attack_hand() - if ((usr.mutations & HULK)) + if ((HULK in usr.mutations) || (SUPRSTR in usr.augmentations)) usr << "\blue You easily destroy the [name]." for(var/mob/O in oviewers(src)) O.show_message("\red [usr] destroys the [name]!", 1) @@ -131,7 +131,7 @@ contents.Add(affecting) while(!isnull(M)&&!isnull(src))//While M and wall exist - if(prob(90)&& M.mutations & HULK)//If they're the Hulk, they're getting out. + if(prob(90)&& HULK in M.mutations)//If they're the Hulk, they're getting out. M << "You smash your way to freedom!" break if(prob(30))//Let's people know that someone is trapped in the resin wall. diff --git a/code/game/objects/devices/flash.dm b/code/game/objects/devices/flash.dm index 27752c7c1a..7a9cdfd905 100644 --- a/code/game/objects/devices/flash.dm +++ b/code/game/objects/devices/flash.dm @@ -15,7 +15,7 @@ var/last_used = 0 //last world.time it was used. /obj/item/device/flash/proc/clown_check(var/mob/user) - if(user && (user.mutations & CLUMSY) && prob(50)) + if(user && (CLUMSY in user.mutations) && prob(50)) user << "\red The Flash slips out of your hand." user.drop_item() return 0 diff --git a/code/game/objects/devices/flashlight.dm b/code/game/objects/devices/flashlight.dm index 3819255c14..49f1b61c86 100644 --- a/code/game/objects/devices/flashlight.dm +++ b/code/game/objects/devices/flashlight.dm @@ -49,7 +49,7 @@ /obj/item/device/flashlight/attack(mob/M as mob, mob/user as mob) src.add_fingerprint(user) if(src.on && user.zone_sel.selecting == "eyes") - if ((user.mutations & CLUMSY || user.getBrainLoss() >= 60) && prob(50))//too dumb to use flashlight properly + if (((CLUMSY in user.mutations) || user.getBrainLoss() >= 60) && prob(50))//too dumb to use flashlight properly return ..()//just hit them in the head if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")//don't have dexterity @@ -69,7 +69,7 @@ if(M.stat > 1 || M.sdisabilities & 1)//mob is dead or fully blind if(M!=user) user.show_message(text("\red [] pupils does not react to the light!", M),1) - else if(M.mutations & XRAY)//mob has X-RAY vision + else if(XRAY in M.mutations)//mob has X-RAY vision if(M!=user) user.show_message(text("\red [] pupils give an eerie glow!", M),1) else //nothing wrong diff --git a/code/game/objects/devices/scanners.dm b/code/game/objects/devices/scanners.dm index 6249553089..61c864dd8d 100644 --- a/code/game/objects/devices/scanners.dm +++ b/code/game/objects/devices/scanners.dm @@ -76,7 +76,7 @@ MASS SPECTROMETER var/mode = 1; /obj/item/device/healthanalyzer/attack(mob/M as mob, mob/user as mob) - if ((user.mutations & CLUMSY || user.getBrainLoss() >= 60) && prob(50)) + if (( (CLUMSY in user.mutations) || user.getBrainLoss() >= 60) && prob(50)) user << text("\red You try to analyze the floor's vitals!") for(var/mob/O in viewers(M, null)) O.show_message(text("\red [user] has analyzed the floor's vitals!"), 1) diff --git a/code/game/objects/devices/traitordevices.dm b/code/game/objects/devices/traitordevices.dm new file mode 100644 index 0000000000..3ec1a25db0 --- /dev/null +++ b/code/game/objects/devices/traitordevices.dm @@ -0,0 +1,61 @@ +/* + +Miscellaneous traitor devices + +BATTERER + + +*/ + +/* + +The Batterer, like a flashbang but 50% chance to knock people over. Can be either very +effective or pretty fucking useless. + +*/ + +/obj/item/device/batterer + name = "mind batterer" + desc = "A strange device with twin antennas." + icon_state = "batterer" + throwforce = 5 + w_class = 1.0 + throw_speed = 4 + throw_range = 10 + flags = FPRINT | TABLEPASS| CONDUCT + item_state = "electronic" + origin_tech = "magnets=3;combat=3;syndicate=3" + + var/times_used = 0 //Number of times it's been used. + var/max_uses = 2 + + +/obj/item/device/batterer/attack_self(mob/living/carbon/user as mob, flag = 0, emp = 0) + if(!user) return + if(times_used >= max_uses) + user << "\red The mind batterer has been burnt out!" + return + + user.attack_log += text("\[[time_stamp()]\] Used [src] to knock down people in the area.") + + for(var/mob/living/carbon/human/M in orange(10, user)) + spawn() + if(prob(50)) + + M.Weaken(rand(10,20)) + if(prob(25)) + M.Stun(rand(5,10)) + M << "\red You feel a tremendous, paralyzing wave flood your mind." + + else + M << "\red You feel a sudden, electric jolt travel through your head." + + playsound(src.loc, 'interference.ogg', 50, 1) + user << "\blue You trigger [src]." + times_used += 1 + if(times_used >= max_uses) + icon_state = "battererburnt" + + + + diff --git a/code/game/objects/effect_system.dm b/code/game/objects/effect_system.dm index 2ec65be560..5963a09251 100644 --- a/code/game/objects/effect_system.dm +++ b/code/game/objects/effect_system.dm @@ -999,7 +999,7 @@ steam.start() -- spawns the effect return attack_hand(var/mob/user) - if (user.mutations & HULK || (prob(75 - metal*25))) + if ((HULK in user.mutations) || (prob(75 - metal*25)) || (SUPRSTR in user.augmentations)) user << "\blue You smash through the metal foam wall." for(var/mob/O in oviewers(user)) if ((O.client && !( O.blinded ))) diff --git a/code/game/objects/grille.dm b/code/game/objects/grille.dm index 55bd67d8a8..34edd89597 100644 --- a/code/game/objects/grille.dm +++ b/code/game/objects/grille.dm @@ -49,7 +49,7 @@ user.visible_message("[user.name] kicks the [src.name].", \ "You kick the [src.name].", \ "You hear a noise") - if((usr.mutations & HULK)) + if((HULK in usr.mutations) || (SUPRSTR in usr.augmentations)) src.health -= 5 else if(!shock(user, 70)) src.health -= 3 diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index cb70d2b372..18873d8750 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -27,7 +27,7 @@ M.handcuffed = new /obj/item/weapon/handcuffs(M) else - if ((usr.mutations & CLUMSY) && prob(50)) + if ((CLUMSY in usr.mutations) && prob(50)) usr << "\red Uh ... how do those things work?!" if (istype(M, /mob/living/carbon/human)) if(!M.handcuffed) diff --git a/code/game/objects/items/item.dm b/code/game/objects/items/item.dm index d0e9c34b57..47b4555b20 100644 --- a/code/game/objects/items/item.dm +++ b/code/game/objects/items/item.dm @@ -85,7 +85,7 @@ if(5.0) t = "huge" else - if ((usr.mutations & CLUMSY) && prob(50)) t = "funny-looking" + if ((CLUMSY in usr.mutations) && prob(50)) t = "funny-looking" usr << text("This is a []\icon[][]. It is a [] item.", !src.blood_DNA ? "" : "bloody ",src, src.name, t) if(src.desc) usr << src.desc @@ -194,6 +194,9 @@ ///////////////////////// var/power = src.force + if((HULK in user.mutations) || (SUPRSTR in user.augmentations)) + power *= 2 + if(!istype(M, /mob/living/carbon/human)) if(istype(M, /mob/living/carbon/metroid)) var/mob/living/carbon/metroid/Metroid = M @@ -297,7 +300,7 @@ if (istype(location, /turf/simulated)) location.add_blood_floor(M) if("fire") - if (!(M.mutations & COLD_RESISTANCE)) + if (!(COLD_RESISTANCE in M.mutations)) M.take_organ_damage(0, power) M << "Aargh it burns!" M.updatehealth() @@ -338,7 +341,7 @@ log_attack(" [user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])") src.add_fingerprint(user) - //if((user.mutations & CLUMSY) && prob(50)) + //if((CLUMSY in user.mutations) && prob(50)) // M = user /* M << "\red You stab yourself in the eye." diff --git a/code/game/objects/items/tk_grab.dm b/code/game/objects/items/tk_grab.dm index b3cf8f837f..02e5c30730 100644 --- a/code/game/objects/items/tk_grab.dm +++ b/code/game/objects/items/tk_grab.dm @@ -48,7 +48,7 @@ if(!host) del(src) return - if(!host.mutations & TK) + if(!(TK in host.mutations)) del(src) return if(!focus) diff --git a/code/game/objects/items/weapons/dna_injector.dm b/code/game/objects/items/weapons/dna_injector.dm index 2150fb3188..effc1603cc 100644 --- a/code/game/objects/items/weapons/dna_injector.dm +++ b/code/game/objects/items/weapons/dna_injector.dm @@ -23,7 +23,7 @@ /obj/item/weapon/dnainjector/proc/inject(mob/M as mob) M.radiation += rand(20,50) - if (!(M.mutations & NOCLONE)) // prevents drained people from having their DNA changed + if (!(NOCLONE in M.mutations)) // prevents drained people from having their DNA changed if (dnatype == "ui") if (!block) //isolated block? if (ue) //unique enzymes? yes diff --git a/code/game/objects/items/weapons/grenades.dm b/code/game/objects/items/weapons/grenades.dm index 6176a06f5c..11fd7af24f 100644 --- a/code/game/objects/items/weapons/grenades.dm +++ b/code/game/objects/items/weapons/grenades.dm @@ -68,7 +68,7 @@ FLASHBANG clown_check(var/mob/living/user) - if((user.mutations & CLUMSY) && prob(50)) + if((CLUMSY in user.mutations) && prob(50)) user << "\red Huh? How does this thing work?!" src.active = 1 src.icon_state = "empar" @@ -170,7 +170,7 @@ FLASHBANG if(ishuman(M)) if(istype(M:ears, /obj/item/clothing/ears/earmuffs)) ear_safety += 2 - if(M.mutations & HULK) + if(HULK in M.mutations) ear_safety += 1 if(istype(M:head, /obj/item/clothing/head/helmet)) ear_safety += 1 @@ -269,7 +269,7 @@ FLASHBANG clown_check(var/mob/living/user) - if ((user.mutations & CLUMSY) && prob(50)) + if ((CLUMSY in user.mutations) && prob(50)) user << "\red Huh? How does this thing work?!" src.active = 1 src.icon_state = "flashbang1" diff --git a/code/game/objects/items/weapons/implants/implanter.dm b/code/game/objects/items/weapons/implants/implanter.dm index f6ee3fd7e1..975444d7d8 100644 --- a/code/game/objects/items/weapons/implants/implanter.dm +++ b/code/game/objects/items/weapons/implants/implanter.dm @@ -35,13 +35,13 @@ user.attack_log += text("\[[time_stamp()]\] Used the [src.name] ([src.imp.name]) to implant [M.name] ([M.ckey])") log_attack("[user.name] ([user.ckey]) implanted [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])") + user.show_message("\red You implanted the implant into [M].") src.imp.loc = M src.imp.imp_in = M src.imp.implanted = 1 src.imp.implanted(M) src.imp = null - user.show_message("\red You implanted the implant into [M].") - src.icon_state = "implanter0" + update() return diff --git a/code/game/objects/items/weapons/implants/implantnanoaug.dm b/code/game/objects/items/weapons/implants/implantnanoaug.dm new file mode 100644 index 0000000000..f9350d05c7 --- /dev/null +++ b/code/game/objects/items/weapons/implants/implantnanoaug.dm @@ -0,0 +1,179 @@ +/obj/item/weapon/implant/nanoaug + name = "nanoaug" + desc = "A nano-robotic biological augmentation implant." + var/augmentation + var/augment_text = "You feel strange..." + var/activation_emote = "fart" + + get_data() + var/dat = {" +Implant Specifications:
+Name: Cybersun Industries Nano-Robotic Biological Augmentation Suite
+Life: Infinite. WARNING: Biological chances are irreversable.
+Important Notes: Illegal. Subjects exposed to nanorobotic agent are considered dangerous.
+
+Implant Details:
+Function: Implant contains colony of pre-programmed nanorobots. Subject will experience radical changes in their body, amplifying and improving certain bodily characteristics.
+Special Features: Will grant subject superhuman powers.
+Integrity: Nanoaugmentation is permanent. Once the process is complete, the nanorobots disassemble and are dissolved by the blood stream."} + return dat + + + implanted(mob/M as mob) + if(!istype(M, /mob/living/carbon/human)) return + var/mob/living/carbon/human/H = M + H.augmentations.Add(augmentation) // give them the mutation + H << "\blue [augment_text]" + if(istype(src, /obj/item/weapon/implant/nanoaug/eswordsynth)) + activation_emote = pick("blink", "blink_r", "eyebrow", "chuckle", "twitch_s", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink") + H.mind.store_memory("Freedom nanoaugmentation can be activated by using the [src.activation_emote] emote, say *[src.activation_emote] to attempt to activate.", 0, 0) + H << "The nanoaugmentation implant can be activated by using the [src.activation_emote] emote, say *[src.activation_emote] to attempt to activate." + + if(istype(src, /obj/item/weapon/implant/nanoaug/radar)) + H << "Red blips on the map are Security." + H << "White blips are civlians." + H << "Monochrome Green blips are cyborgs and AIs." + H << "Light blue blips are heads of staff." + H << "Purple blips are unidentified organisms." + H << "Dead biologicals will not display on the radar." + + spawn() + H.start_radar() + return + + +/obj/item/weapon/implant/nanoaug/strength + name = "Superhuman Strength" + augmentation = SUPRSTR + augment_text = "You muscle ache, and you feel a rapid surge of energy pulse through your body. You feel strong." + +/obj/item/weapon/implant/nanoaug/radar + name = "Short-range Psionic Radar" + augmentation = RADAR + augment_text = "You begin to sense the presence or lack of presence of others around you." + +/obj/item/weapon/implant/nanoaug/electrichands + name = "Electric Hands" + augmentation = ELECTRICHANDS + augment_text = "You feel a sudden jolt of electricity pulse through your veins. Arcs of electricity travel through your hands." + +/obj/item/weapon/implant/nanoaug/eswordsynth + name = "Energy Blade Synthesizer" + augmentation = ESWORDSYNTH + augment_text = "Your hands throb and pulsate. They feel sharper, and strangely hot." + + trigger(emote, source as mob) + if(emote == activation_emote) + src.activate(source) + return + + activate(var/mob/source) + + var/obj/item/weapon/melee/energy/blade/swordspawn = new /obj/item/weapon/melee/energy/blade + if(!source.get_active_hand()) + source.put_in_hand(swordspawn) + + var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() + spark_system.set_up(5, 0, source.loc) + spark_system.start() + playsound(source.loc, "sparks", 50, 1) + ..() + +/obj/item/weapon/implant/nanoaug/rebreather + name = "Bioelectric Rebreather" + augmentation = REBREATHER + augment_text = "You begin to lose your breath. Just as you are about to pass out, you suddenly lose the urge to breath. Breathing is no longer a necessity for you." + +/obj/item/weapon/implant/nanoaug/dermalarmor + name = "Skin-intergrated Dermal Armor" + augmentation = DERMALARMOR + augment_text = "The skin throughout your body grows tense and tight, and you become slightly stiff. Your bones and skin feel a lot stronger." + +/obj/item/weapon/implant/nanoaug/reflexes + name = "Combat Reflexes" + augmentation = REFLEXES + augment_text = "Your mind suddenly is able to identify threats before you are aware of them. You become more aware of your surroundings." + +/obj/item/weapon/implant/nanoaug/nanoregen + name = "Regenerative Nanobots" + augmentation = NANOREGEN + augment_text = "You feel a very faint vibration in your body. You instantly feel much younger." + + +/obj/item/weapon/implanter/nanoaug + name = "Nanoaugmentation Implanter (Empty)" + icon_state = "nanoimplant" + +/obj/item/weapon/implanter/nanoaug/update() + if (src.imp) + src.icon_state = "nanoimplant" + else + src.icon_state = "nanoimplant0" + return + + +/obj/item/weapon/implanter/nanoaug/strength + name = "Nanoaugmentation Implaner (Superhuman Strength)" + +/obj/item/weapon/implanter/nanoaug/strength/New() + src.imp = new /obj/item/weapon/implant/nanoaug/strength( src ) + ..() + update() + +/obj/item/weapon/implanter/nanoaug/radar + name = "Nanoaugmentation Implaner (Short-range Psionic Radar)" + +/obj/item/weapon/implanter/nanoaug/radar/New() + src.imp = new /obj/item/weapon/implant/nanoaug/radar( src ) + ..() + update() + +/obj/item/weapon/implanter/nanoaug/electrichands + name = "Nanoaugmentation Implaner (Electric Hands)" + +/obj/item/weapon/implanter/nanoaug/electrichands/New() + src.imp = new /obj/item/weapon/implant/nanoaug/electrichands( src ) + ..() + update() + +/obj/item/weapon/implanter/nanoaug/eswordsynth + name = "Nanoaugmentation Implaner (Energy Blade Synthesizer)" + +/obj/item/weapon/implanter/nanoaug/eswordsynth/New() + src.imp = new /obj/item/weapon/implant/nanoaug/eswordsynth( src ) + ..() + update() + +/obj/item/weapon/implanter/nanoaug/rebreather + name = "Nanoaugmentation Implaner (Bioelectric Rebreather)" + +/obj/item/weapon/implanter/nanoaug/rebreather/New() + src.imp = new /obj/item/weapon/implant/nanoaug/rebreather( src ) + ..() + update() + +/obj/item/weapon/implanter/nanoaug/dermalarmor + name = "Nanoaugmentation Implaner (Skin-intergrated Dermal Armor)" + +/obj/item/weapon/implanter/nanoaug/dermalarmor/New() + src.imp = new /obj/item/weapon/implant/nanoaug/dermalarmor( src ) + ..() + update() + +/obj/item/weapon/implanter/nanoaug/reflexes + name = "Nanoaugmentation Implaner (Combat Reflexes)" + +/obj/item/weapon/implanter/nanoaug/reflexes/New() + src.imp = new /obj/item/weapon/implant/nanoaug/reflexes( src ) + ..() + update() + +/obj/item/weapon/implanter/nanoaug/nanoregen + name = "Nanoaugmentation Implaner (Regenerative Nanobots)" + +/obj/item/weapon/implanter/nanoaug/nanoregen/New() + src.imp = new /obj/item/weapon/implant/nanoaug/nanoregen( src ) + ..() + update() + + diff --git a/code/game/objects/items/weapons/kitchen.dm b/code/game/objects/items/weapons/kitchen.dm index 1911f95dc0..cc355abbc1 100644 --- a/code/game/objects/items/weapons/kitchen.dm +++ b/code/game/objects/items/weapons/kitchen.dm @@ -37,7 +37,7 @@ KNIFE src.icon_state = "fork" return else - if((user.mutations & CLUMSY) && prob(50)) + if((CLUMSY in user.mutations) && prob(50)) M = user return eyestab(M,user) @@ -47,7 +47,7 @@ KNIFE // ROLLING PIN /obj/item/weapon/kitchen/rollingpin/attack(mob/M as mob, mob/living/user as mob) - if ((user.mutations & CLUMSY) && prob(50)) + if ((CLUMSY in user.mutations) && prob(50)) user << "\red The [src] slips out of your hand and hits your head." user.take_organ_damage(10) user.Paralyse(2) @@ -84,7 +84,7 @@ KNIFE // KNIFE /obj/item/weapon/kitchen/utensil/knife/attack(target as mob, mob/living/user as mob) - if ((user.mutations & CLUMSY) && prob(50)) + if ((CLUMSY in user.mutations) && prob(50)) user << "\red You accidentally cut yourself with the [src]." user.take_organ_damage(20) return @@ -107,7 +107,7 @@ KNIFE sleep(rand(2,4)) - if((user.mutations & CLUMSY) && prob(50)) //What if he's a clown? + if((CLUMSY in user.mutations) && prob(50)) //What if he's a clown? M << "\red You accidentally slam yourself with the [src]!" M.Weaken(1) user.take_organ_damage(2) diff --git a/code/game/objects/items/weapons/surgery_tools.dm b/code/game/objects/items/weapons/surgery_tools.dm index 2b7d9eb54b..23a30680f3 100644 --- a/code/game/objects/items/weapons/surgery_tools.dm +++ b/code/game/objects/items/weapons/surgery_tools.dm @@ -256,7 +256,7 @@ CIRCULAR SAW //if(M.mutations & HUSK) return ..() - if((user.mutations & CLUMSY) && prob(50)) + if((CLUMSY in user.mutations) && prob(50)) M = user return eyestab(M,user) @@ -453,7 +453,7 @@ CIRCULAR SAW if(!istype(M)) return ..() - if((user.mutations & CLUMSY) && prob(50)) + if((CLUMSY in user.mutations) && prob(50)) M = user return eyestab(M,user) diff --git a/code/game/objects/items/weapons/swords_axes_etc.dm b/code/game/objects/items/weapons/swords_axes_etc.dm index 8379357359..92908d7f37 100644 --- a/code/game/objects/items/weapons/swords_axes_etc.dm +++ b/code/game/objects/items/weapons/swords_axes_etc.dm @@ -4,6 +4,7 @@ SWORD BLADE AXE STUN BATON +ENERGY SHIELD (where else should i even put this) */ @@ -22,7 +23,7 @@ STUN BATON color = pick("red","blue","green","purple") /obj/item/weapon/melee/energy/sword/attack_self(mob/living/user as mob) - if ((user.mutations & CLUMSY) && prob(50)) + if ((CLUMSY in user.mutations) && prob(50)) user << "\red You accidentally cut yourself with [src]." user.take_organ_damage(5,5) active = !active @@ -103,7 +104,7 @@ STUN BATON /obj/item/weapon/melee/baton/attack_self(mob/user as mob) src.status = !( src.status ) - if ((usr.mutations & CLUMSY) && prob(50)) + if ((CLUMSY in user.mutations) && prob(50)) usr << "\red You grab the stunbaton on the wrong side." usr.Paralyse(60) return @@ -119,7 +120,7 @@ STUN BATON return /obj/item/weapon/melee/baton/attack(mob/M as mob, mob/user as mob) - if ((usr.mutations & CLUMSY) && prob(50)) + if ((CLUMSY in usr.mutations) && prob(50)) usr << "\red You grab the stunbaton on the wrong side." usr.Weaken(30) return @@ -162,7 +163,7 @@ STUN BATON R.cell.charge -= 20 else charges-- - if (M.stuttering < 1 && (!(M.mutations & HULK) && M.canstun) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/) + if (M.stuttering < 1 && (!(HULK in M.mutations) && M.canstun) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/) M.stuttering = 1 M.Stun(1) M.Weaken(1) @@ -173,7 +174,7 @@ STUN BATON R.cell.charge -= 20 else charges-- - if (M.stuttering < 10 && (!(M.mutations & HULK) && M.canstun) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/) + if (M.stuttering < 10 && (!(HULK in M.mutations) && M.canstun) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/) M.stuttering = 10 M.Stun(10) M.Weaken(10) @@ -190,7 +191,7 @@ STUN BATON charges -= 5 /obj/item/weapon/melee/classic_baton/attack(mob/M as mob, mob/living/user as mob) - if ((user.mutations & CLUMSY) && prob(50)) + if ((CLUMSY in user.mutations) && prob(50)) user << "\red You club yourself over the head." user.Weaken(3 * force) if(ishuman(user)) @@ -210,7 +211,7 @@ STUN BATON if (user.a_intent == "hurt") if(!..()) return playsound(src.loc, "swing_hit", 50, 1, -1) - if (M.stuttering < 8 && (!(M.mutations & HULK)) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/) + if (M.stuttering < 8 && (!(HULK in M.mutations)) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/) M.stuttering = 8 M.Stun(8) M.Weaken(8) @@ -222,3 +223,29 @@ STUN BATON M.Weaken(5) for(var/mob/O in viewers(M)) if (O.client) O.show_message("\red [M] has been stunned with the police baton by [user]!", 1, "\red You hear someone fall", 2) + +/obj/item/weapon/shield/energy/IsShield() + if(active) + return 1 + else + return 0 + +/obj/item/weapon/shield/energy/attack_self(mob/living/user as mob) + if ((CLUMSY in user.mutations) && prob(50)) + user << "\red You beat yourself in the head with [src]." + user.take_organ_damage(5) + active = !active + if (active) + force = 10 + icon_state = "eshield[active]" + w_class = 4 + playsound(user, 'saberon.ogg', 50, 1) + user << "\blue [src] is now active." + else + force = 3 + icon_state = "eshield[active]" + w_class = 1 + playsound(user, 'saberoff.ogg', 50, 1) + user << "\blue [src] can now be concealed." + add_fingerprint(user) + return \ No newline at end of file diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm index 8ba16e3ce3..d1da62c6fc 100644 --- a/code/game/objects/items/weapons/tools.dm +++ b/code/game/objects/items/weapons/tools.dm @@ -36,7 +36,7 @@ WELDINGTOOOL if(!istype(M)) return ..() if(user.zone_sel.selecting != "eyes" && user.zone_sel.selecting != "head") return ..() - if((user.mutations & CLUMSY) && prob(50)) + if((CLUMSY in user.mutations) && prob(50)) M = user return eyestab(M,user) diff --git a/code/game/objects/new_year.dm b/code/game/objects/new_year.dm index ba344090f6..07dbac30bd 100644 --- a/code/game/objects/new_year.dm +++ b/code/game/objects/new_year.dm @@ -60,7 +60,7 @@ /obj/item/weapon/firbang/afterattack(atom/target as mob|obj|turf|area, mob/user as mob) if (user.equipped() == src) - if ((user.mutations & CLUMSY) && prob(50)) + if ((CLUMSY in usr.mutations) && prob(50)) user << "\red Huh? How does this thing work?!" src.state = 1 src.icon_state = "flashbang1" @@ -108,7 +108,7 @@ /obj/item/weapon/firbang/attack_self(mob/user as mob) if (!src.state) - if (user.mutations & CLUMSY) + if (CLUMSY in user.mutations) user << "\red Huh? How does this thing work?!" spawn( 5 ) prime() diff --git a/code/game/objects/secstorage/sbriefcase.dm b/code/game/objects/secstorage/sbriefcase.dm index 535e4b407c..fdb47d81b2 100644 --- a/code/game/objects/secstorage/sbriefcase.dm +++ b/code/game/objects/secstorage/sbriefcase.dm @@ -16,7 +16,7 @@ new /obj/item/weapon/pen(src) /obj/item/weapon/secstorage/sbriefcase/attack(mob/M as mob, mob/living/user as mob) - if ((user.mutations & CLUMSY) && prob(50)) + if ((CLUMSY in user.mutations) && prob(50)) user << "\red The [src] slips out of your hand and hits your head." user.take_organ_damage(10) user.Paralyse(2) diff --git a/code/game/objects/storage/bible.dm b/code/game/objects/storage/bible.dm index a88c09ea28..608c5ecd95 100644 --- a/code/game/objects/storage/bible.dm +++ b/code/game/objects/storage/bible.dm @@ -35,7 +35,7 @@ user.take_organ_damage(0,10) return - if ((user.mutations & CLUMSY) && prob(50)) + if ((CLUMSY in user.mutations) && prob(50)) user << "\red The [src] slips out of your hand and hits your head." user.take_organ_damage(10) user.Paralyse(20) diff --git a/code/game/objects/storage/briefcase.dm b/code/game/objects/storage/briefcase.dm index 417b3b29eb..63725d2abb 100644 --- a/code/game/objects/storage/briefcase.dm +++ b/code/game/objects/storage/briefcase.dm @@ -11,7 +11,7 @@ /obj/item/weapon/storage/briefcase/attack(mob/M as mob, mob/living/user as mob) //..() - if ((user.mutations & CLUMSY) && prob(50)) + if ((CLUMSY in user.mutations) && prob(50)) user << "\red The [src] slips out of your hand and hits your head." user.take_organ_damage(10) user.Paralyse(2) diff --git a/code/game/objects/tables_racks.dm b/code/game/objects/tables_racks.dm index 085abed30b..f90ed28bb9 100644 --- a/code/game/objects/tables_racks.dm +++ b/code/game/objects/tables_racks.dm @@ -38,7 +38,7 @@ TABLE AND RACK OBJECT INTERATIONS /obj/structure/table/attack_paw(mob/user as mob) - if ((usr.mutations & HULK)) + if ((HULK in usr.mutations)) usr << "\blue You destroy the table." for(var/mob/O in oviewers()) if ((O.client && !( O.blinded ))) @@ -98,7 +98,7 @@ TABLE AND RACK OBJECT INTERATIONS /obj/structure/table/attack_hand(mob/user as mob) - if ((usr.mutations & HULK)) + if ((HULK in usr.mutations) || (SUPRSTR in usr.augmentations)) usr << "\blue You destroy the table." for(var/mob/O in oviewers()) if ((O.client && !( O.blinded ))) diff --git a/code/game/objects/uplinks.dm b/code/game/objects/uplinks.dm index c0abb3efd0..21d262f20e 100644 --- a/code/game/objects/uplinks.dm +++ b/code/game/objects/uplinks.dm @@ -21,6 +21,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid var/welcome // Welcoming menu message var/menu_message = "" // The actual menu text var/items // List of items + var/item_data // raw item text var/list/ItemList // Parsed list of items var/uses // Numbers of crystals // List of items not to shove in their hands. @@ -28,7 +29,10 @@ A list of items and costs is stored under the datum of every game mode, alongsid New() welcome = ticker.mode.uplink_welcome - items = dd_replacetext(ticker.mode.uplink_items, "\n", "") // Getting the text string of items + if(!item_data) + items = dd_replacetext(ticker.mode.uplink_items, "\n", "") // Getting the text string of items + else + items = dd_replacetext(item_data) ItemList = dd_text2list(src.items, ";") // Parsing the items text string uses = ticker.mode.uplink_uses diff --git a/code/game/objects/weapons.dm b/code/game/objects/weapons.dm index c5dd47c82f..3daa20d790 100644 --- a/code/game/objects/weapons.dm +++ b/code/game/objects/weapons.dm @@ -155,7 +155,7 @@ user << "\blue You arm the mousetrap." else icon_state = "mousetrap" - if((user.getBrainLoss() >= 60 || user.mutations & CLUMSY) && prob(50)) + if(( (user.getBrainLoss() >= 60 || (CLUMSY in user.mutations)) && prob(50))) var/which_hand = "l_hand" if(!user.hand) which_hand = "r_hand" @@ -172,7 +172,7 @@ /obj/item/weapon/mousetrap/attack_hand(mob/user as mob) if(armed) - if((user.getBrainLoss() >= 60 || user.mutations & CLUMSY) && prob(50)) + if(( (user.getBrainLoss() >= 60 || CLUMSY in user.mutations)) && prob(50)) var/which_hand = "l_hand" if(!user.hand) which_hand = "r_hand" diff --git a/code/game/objects/window.dm b/code/game/objects/window.dm index af9ad794a4..a9af5f2469 100644 --- a/code/game/objects/window.dm +++ b/code/game/objects/window.dm @@ -93,7 +93,7 @@ //These all need to be rewritten to use visiblemessage() /obj/structure/window/attack_hand() - if ((usr.mutations & HULK)) + if ((HULK in usr.mutations) || (SUPRSTR in usr.augmentations)) usr << "\blue You smash through the window." for(var/mob/O in oviewers()) if ((O.client && !( O.blinded ))) @@ -106,7 +106,7 @@ return /obj/structure/window/attack_paw() - if ((usr.mutations & HULK)) + if ((HULK in usr.mutations)) usr << "\blue You smash through the window." for(var/mob/O in oviewers()) if ((O.client && !( O.blinded ))) diff --git a/code/game/throwing.dm b/code/game/throwing.dm index 067fe6e7fc..dd73baa7c4 100644 --- a/code/game/throwing.dm +++ b/code/game/throwing.dm @@ -1,6 +1,6 @@ /mob/living/carbon/proc/toggle_throw_mode() if(!equipped())//Not holding anything - if(mutations & TK) + if(TK in mutations) if (hand) l_hand = new/obj/item/tk_grab(src) l_hand:host = src @@ -92,7 +92,8 @@ if(istype(A,/mob/living)) if(A:lying) continue src.throw_impact(A) - src.throwing = 0 + if(src.throwing == 1) + src.throwing = 0 if(isobj(A)) if(A.density && !A.throwpass) // **TODO: Better behaviour for windows which are dense, but shouldn't always stop movement src.throw_impact(A) @@ -105,9 +106,25 @@ if(istype(hit_atom,/mob/living)) var/mob/living/M = hit_atom M.visible_message("\red [hit_atom] has been hit by [src].") - if(src.vars.Find("throwforce")) + + if(!istype(src, /obj/item)) // this is a big item that's being thrown at them~ + + if(istype(M, /mob/living/carbon/human)) + var/armor_block = M:run_armor_check("chest", "melee") + M:apply_damage(rand(20,45), BRUTE, "chest", armor_block) + + visible_message("\red [M] has been knocked down by the force of [src]!") + M:apply_effect(rand(4,12), WEAKEN, armor_block) + + M:UpdateDamageIcon() + else + M.take_organ_damage(rand(20,45)) + + + else if(src.vars.Find("throwforce")) M.take_organ_damage(src:throwforce) + else if(isobj(hit_atom)) var/obj/O = hit_atom if(!O.anchored) @@ -132,8 +149,13 @@ /atom/movable/proc/throw_at(atom/target, range, speed) if(!target || !src) return 0 //use a modified version of Bresenham's algorithm to get from the atom's current position to that of the target + src.throwing = 1 + if(usr) + if((HULK in usr.mutations) || (SUPRSTR in usr.augmentations)) + src.throwing = 2 // really strong throw! + var/dist_x = abs(target.x - src.x) var/dist_y = abs(target.y - src.y) diff --git a/code/game/turf.dm b/code/game/turf.dm index 3fe78d7c03..47dcb2d3af 100644 --- a/code/game/turf.dm +++ b/code/game/turf.dm @@ -350,7 +350,7 @@ dismantle_wall() /turf/simulated/wall/attack_paw(mob/user as mob) - if ((user.mutations & HULK)) + if ((HULK in user.mutations)) if (prob(40)) usr << text("\blue You smash through the wall.") dismantle_wall(1) @@ -380,7 +380,7 @@ return /turf/simulated/wall/attack_hand(mob/user as mob) - if ((user.mutations & HULK)) + if ((HULK in user.mutations) || (SUPRSTR in user.augmentations)) if (prob(40)) usr << text("\blue You smash through the wall.") dismantle_wall(1) diff --git a/code/modules/chemical/Chemistry-Reagents.dm b/code/modules/chemical/Chemistry-Reagents.dm index c49ca34390..c449c45ccd 100644 --- a/code/modules/chemical/Chemistry-Reagents.dm +++ b/code/modules/chemical/Chemistry-Reagents.dm @@ -347,7 +347,7 @@ datum on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom - if (M.mutations & FAT) + if (FAT in M.mutations) M.gib() ..() return @@ -782,7 +782,7 @@ datum on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom - M.mutations = 0 + M.mutations = list() M.disabilities = 0 M.sdisabilities = 0 ..() @@ -1566,6 +1566,12 @@ datum reagent_state = GAS color = "#404030" // rgb: 64, 64, 48 + ultraglue + name = "Ulta Glue" + id = "glue" + description = "An extremely powerful bonding agent." + color = "#FFFFCC" // rgb: 255, 255, 204 + diethylamine name = "Diethylamine" id = "diethylamine" diff --git a/code/modules/chemical/Chemistry-Tools.dm b/code/modules/chemical/Chemistry-Tools.dm index 3d700a5082..775aee9e8b 100644 --- a/code/modules/chemical/Chemistry-Tools.dm +++ b/code/modules/chemical/Chemistry-Tools.dm @@ -954,7 +954,7 @@ if(!T.dna) usr << "You are unable to locate any blood. (To be specific, your target seems to be missing their DNA datum)" return - if(T.mutations & NOCLONE) //target done been et, no more blood in him + if(NOCLONE in T.mutations) //target done been et, no more blood in him user << "\red You are unable to locate any blood." return B.holder = src diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm index b95a343256..d11539c994 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm @@ -658,7 +658,7 @@ if ("hurt") var/damage = rand(1, 9) if (prob(90)) - if (M.mutations & HULK)//HULK SMASH + if ((HULK in M.mutations) || (SUPRSTR in M.augmentations))//HULK SMASH damage += 14 spawn(0) Paralyse(5) diff --git a/code/modules/mob/living/carbon/alien/humanoid/life.dm b/code/modules/mob/living/carbon/alien/humanoid/life.dm index c74f12c9dc..a44ab6ddcd 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/life.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/life.dm @@ -127,15 +127,15 @@ handle_mutations_and_radiation() if(src.getFireLoss()) - if(src.mutations & COLD_RESISTANCE || prob(50)) + if((COLD_RESISTANCE in src.mutations) || prob(50)) switch(src.getFireLoss()) if(1 to 50) src.adjustFireLoss(-1) if(51 to 100) src.adjustFireLoss(-5) - if (src.mutations & HULK && src.health <= 25) - src.mutations &= ~HULK + if ((HULK in src.mutations) && src.health <= 25) + src.mutations.Remove(HULK) src << "\red You suddenly feel very weak." Weaken(3) emote("collapse") @@ -284,7 +284,7 @@ breath.toxins -= toxins_used breath.oxygen += toxins_used - if(breath.temperature > (T0C+66) && !(src.mutations & COLD_RESISTANCE)) // Hot air hurts :( + if(breath.temperature > (T0C+66) && !(COLD_RESISTANCE in src.mutations)) // Hot air hurts :( if(prob(20)) src << "\red You feel a searing heat in your lungs!" fire_alert = max(fire_alert, 1) @@ -340,7 +340,7 @@ thermal_protection += 0.2 if(wear_suit && (wear_suit.flags & SUITSPACE)) thermal_protection += 3 - if(src.mutations & COLD_RESISTANCE) + if(COLD_RESISTANCE in src.mutations) thermal_protection += 5 return thermal_protection @@ -364,15 +364,15 @@ if(reagents) reagents.metabolize(src) - if(src.nutrition > 500 && !(src.mutations & FAT)) + if(src.nutrition > 500 && !(FAT in src.mutations)) if(prob(5 + round((src.nutrition - 200) / 2))) src << "\red You suddenly feel blubbery!" - src.mutations |= FAT + src.mutations.Add(FAT) // update_body() - if (src.nutrition < 100 && src.mutations & FAT) + if (src.nutrition < 100 && (FAT in src.mutations)) if(prob(round((50 - src.nutrition) / 100))) src << "\blue You feel fit again!" - src.mutations &= ~FAT + src.mutations.Remove(FAT) // update_body() if (src.nutrition > 0) src.nutrition -= HUNGER_FACTOR @@ -486,7 +486,7 @@ handle_regular_hud_updates() - if (src.stat == 2 || src.mutations & XRAY) + if (src.stat == 2 || (XRAY in src.mutations)) src.sight |= SEE_TURFS src.sight |= SEE_MOBS src.sight |= SEE_OBJS diff --git a/code/modules/mob/living/carbon/alien/larva/larva.dm b/code/modules/mob/living/carbon/alien/larva/larva.dm index 0bd12c8d35..9bc84810d1 100644 --- a/code/modules/mob/living/carbon/alien/larva/larva.dm +++ b/code/modules/mob/living/carbon/alien/larva/larva.dm @@ -28,7 +28,7 @@ now_pushing = 1 if(ismob(AM)) var/mob/tmob = AM - if(istype(tmob, /mob/living/carbon/human) && tmob.mutations & FAT) + if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations)) if(prob(70)) src << "\red You fail to push [tmob]'s fat ass out of the way." now_pushing = 0 @@ -430,7 +430,7 @@ else var/damage = rand(1, 9) if (prob(90)) - if (M.mutations & HULK) + if ((HULK in M.mutations) || (SUPRSTR in M.augmentations)) damage += 5 spawn(0) Paralyse(1) diff --git a/code/modules/mob/living/carbon/alien/larva/life.dm b/code/modules/mob/living/carbon/alien/larva/life.dm index dbbc0a4b5b..3384b32bd9 100644 --- a/code/modules/mob/living/carbon/alien/larva/life.dm +++ b/code/modules/mob/living/carbon/alien/larva/life.dm @@ -259,7 +259,7 @@ breath.toxins -= toxins_used breath.oxygen += toxins_used - if(breath.temperature > (T0C+66) && !(mutations & COLD_RESISTANCE)) // Hot air hurts :( + if(breath.temperature > (T0C+66) && !(COLD_RESISTANCE in src.mutations)) // Hot air hurts :( if(prob(20)) src << "\red You feel a searing heat in your lungs!" fire_alert = max(fire_alert, 1) @@ -287,15 +287,15 @@ if(reagents) reagents.metabolize(src) - if(nutrition > 500 && !(mutations & FAT)) + if(nutrition > 500 && !(FAT in src.mutations)) if(prob(5 + round((nutrition - 200) / 2))) src << "\red You suddenly feel blubbery!" - mutations |= FAT + mutations.Add(FAT) // update_body() - if (nutrition < 100 && mutations & FAT) + if (nutrition < 100 && (FAT in src.mutations)) if(prob(round((50 - nutrition) / 100))) src << "\blue You feel fit again!" - mutations &= ~FAT + mutations.Add(FAT) // update_body() if (nutrition > 0) nutrition-= HUNGER_FACTOR @@ -409,7 +409,7 @@ handle_regular_hud_updates() - if (stat == 2 || mutations & XRAY) + if (stat == 2 || (XRAY in src.mutations)) sight |= SEE_TURFS sight |= SEE_MOBS sight |= SEE_OBJS diff --git a/code/modules/mob/living/carbon/brain/life.dm b/code/modules/mob/living/carbon/brain/life.dm index aeef8b0fe7..0503eebb50 100644 --- a/code/modules/mob/living/carbon/brain/life.dm +++ b/code/modules/mob/living/carbon/brain/life.dm @@ -242,7 +242,7 @@ handle_regular_hud_updates() - if (stat == 2 || mutations & XRAY) + if (stat == 2 || (XRAY in src.mutations)) sight |= SEE_TURFS sight |= SEE_MOBS sight |= SEE_OBJS diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 7d1f44d133..8b6b787165 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -5,7 +5,7 @@ src.nutrition -= HUNGER_FACTOR/10 if(src.m_intent == "run") src.nutrition -= HUNGER_FACTOR/10 - if(src.mutations & FAT && src.m_intent == "run" && src.bodytemperature <= 360) + if((FAT in src.mutations) && src.m_intent == "run" && src.bodytemperature <= 360) src.bodytemperature += 2 /mob/living/carbon/relaymove(var/mob/user, direction) diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm index d7eeb6c75f..a4fa88221a 100644 --- a/code/modules/mob/living/carbon/human/death.dm +++ b/code/modules/mob/living/carbon/human/death.dm @@ -97,14 +97,14 @@ return ..(gibbed) /mob/living/carbon/human/proc/ChangeToHusk() - if(mutations & HUSK) + if(HUSK in src.mutations) return - mutations |= HUSK + mutations.Add(HUSK) real_name = "Unknown" update_body() return /mob/living/carbon/human/proc/Drain() ChangeToHusk() - mutations |= NOCLONE + mutations.Add(NOCLONE) return \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/hud.dm b/code/modules/mob/living/carbon/human/hud.dm index 1964c7d3eb..5cc912d2a4 100644 --- a/code/modules/mob/living/carbon/human/hud.dm +++ b/code/modules/mob/living/carbon/human/hud.dm @@ -765,3 +765,163 @@ src.hud_used.hotkey_ui_hidden = 1 + +/* + +Radar-related things + +*/ + +/mob/living/carbon/human/proc/close_radar() + radar_open = 0 + for(var/obj/screen/x in client.screen) + if( (x.name == "radar" && x.icon == 'radar.dmi') || (x in radar_blips) ) + client.screen -= x + del(x) + + place_radar_closed() + +/mob/living/carbon/human/proc/place_radar_closed() + var/obj/screen/closedradar = new() + closedradar.icon = 'radar.dmi' + closedradar.icon_state = "radarclosed" + closedradar.screen_loc = "WEST,NORTH-1" + closedradar.name = "radar closed" + client.screen += closedradar + +/mob/living/carbon/human/proc/start_radar() + + for(var/obj/screen/x in client.screen) + if(x.name == "radar closed" && x.icon == 'radar.dmi') + client.screen -= x + del(x) + + var/obj/screen/cornerA = new() + cornerA.icon = 'radar.dmi' + cornerA.icon_state = "radar(1,1)" + cornerA.screen_loc = "WEST,NORTH-2" + cornerA.name = "radar" + + var/obj/screen/cornerB = new() + cornerB.icon = 'radar.dmi' + cornerB.icon_state = "radar(2,1)" + cornerB.screen_loc = "WEST+1,NORTH-2" + cornerB.name = "radar" + + var/obj/screen/cornerC = new() + cornerC.icon = 'radar.dmi' + cornerC.icon_state = "radar(1,2)" + cornerC.screen_loc = "WEST,NORTH-1" + cornerC.name = "radar" + + var/obj/screen/cornerD = new() + cornerD.icon = 'radar.dmi' + cornerD.icon_state = "radar(2,2)" + cornerD.screen_loc = "WEST+1,NORTH-1" + cornerD.name = "radar" + + client.screen += cornerA + client.screen += cornerB + client.screen += cornerC + client.screen += cornerD + + radar_open = 1 + + while(radar_open && (RADAR in augmentations)) + update_radar() + sleep(6) + +/mob/living/carbon/human/proc/update_radar() + + if(!client) return + var/list/found_targets = list() + + var/max_dist = 29 // 29 tiles is the max distance + + // If the mob is inside a turf, set the center to the object they're in + var/atom/distance_ref = src + if(!isturf(src.loc)) + distance_ref = loc + + // Clear the radar_blips cache + for(var/x in radar_blips) + client.screen -= x + del(x) + radar_blips = list() + + var/starting_px = 3 + var/starting_py = 3 + + for(var/mob/living/M in orange(max_dist, distance_ref)) + if(M.stat == 2) continue + found_targets.Add(M) + + for(var/obj/effect/critter/C in orange(max_dist, distance_ref)) + if(!C.alive) continue + found_targets.Add(C) + + for(var/obj/mecha/M in orange(max_dist, distance_ref)) + if(!M.occupant) continue + found_targets.Add(M) + + for(var/obj/structure/closet/C in orange(max_dist, distance_ref)) + for(var/mob/living/M in C.contents) + if(M.stat == 2) continue + found_targets.Add(M) + + // Loop through all living mobs in a range. + for(var/atom/A in found_targets) + + var/a_x = A.x + var/a_y = A.y + + if(!isturf(A.loc)) + a_x = A.loc.x + a_y = A.loc.y + + var/blip_x = max_dist + (-( distance_ref.x-a_x ) ) + starting_px + var/blip_y = max_dist + (-( distance_ref.y-a_y ) ) + starting_py + var/obj/screen/blip = new() + blip.icon = 'radar.dmi' + blip.name = "Blip" + blip.layer = 21 + blip.screen_loc = "WEST:[blip_x-1],NORTH-2:[blip_y-1]" // offset -1 because the center of the blip is not at the bottomleft corner (14) + + if(istype(A, /mob/living)) + var/mob/living/M = A + if(ishuman(M)) + if(M:wear_id) + var/job = M:wear_id:GetJobName() + if(job == "Security Officer") + blip.icon_state = "secblip" + blip.name = "Security Officer" + else if(job == "Captain" || job == "Research Director" || job == "Chief Engineer" || job == "Chief Medical Officer" || job == "Head of Security" || job == "Head of Personnel") + blip.icon_state = "headblip" + blip.name = "Station Head" + else + blip.icon_state = "civblip" + blip.name = "Civilian" + else + blip.icon_state = "civblip" + blip.name = "Civilian" + + else if(issilicon(M)) + blip.icon_state = "roboblip" + blip.name = "Robotic Organism" + + else + blip.icon_state = "unknownblip" + blip.name = "Unknown Organism" + + else if(istype(A, /obj/effect/critter)) + blip.icon_state = "unknownblip" + blip.name = "Unknown Organism" + + else if(istype(A, /obj/mecha)) + blip.icon_state = "roboblip" + blip.name = "Robotic Organism" + + radar_blips.Add(blip) + client.screen += blip + + diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 6070ab3fa6..010bc0c54b 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -147,8 +147,8 @@ Metroid.UpdateFeed() return - if(istype(tmob, /mob/living/carbon/human) && tmob.mutations & FAT) - if(prob(40) && !(mutations & FAT)) + if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations)) + if(prob(40) && !(FAT in src.mutations)) src << "\red You fail to push [tmob]'s fat ass out of the way." now_pushing = 0 return @@ -207,7 +207,7 @@ if(shoes) tally += shoes.slowdown - if(mutations & FAT) + if(FAT in src.mutations) tally += 1.5 if (bodytemperature < 283.222) tally += (283.222 - bodytemperature) / 10 * 1.75 @@ -480,9 +480,10 @@ return if (!istype(W, /obj/item)) return + if (!( W.slot_flags & SLOT_OCLOTHING )) return - if (mutations & FAT && !(W.flags & ONESIZEFITSALL)) + if ((FAT in src.mutations) && !(W.flags & ONESIZEFITSALL)) src << "\red You're too fat to wear the [W.name]!" return u_equip(W) @@ -575,7 +576,7 @@ return if (!( W.slot_flags & SLOT_ICLOTHING )) return - if (mutations & FAT && !(W.flags & ONESIZEFITSALL)) + if ((FAT in src.mutations) && !(W.flags & ONESIZEFITSALL)) src << "\red You're too fat to wear the [W.name]!" return u_equip(W) @@ -751,19 +752,19 @@ // lol var/fat = "" - if (mutations & FAT) + if (FAT in mutations) fat = "fat" - if (mutations & HULK) + if (HULK in mutations) overlays += image("icon" = 'genetics.dmi', "icon_state" = "hulk[fat][!lying ? "_s" : "_l"]") - if (mutations & COLD_RESISTANCE) + if (COLD_RESISTANCE in mutations) overlays += image("icon" = 'genetics.dmi', "icon_state" = "fire[fat][!lying ? "_s" : "_l"]") - if (mutations & TK) + if (TK in mutations) overlays += image("icon" = 'genetics.dmi', "icon_state" = "telekinesishead[fat][!lying ? "_s" : "_l"]") - if (mutations & LASER) + if (LASER in mutations) overlays += image("icon" = 'genetics.dmi', "icon_state" = "lasereyes[!lying ? "_s" : "_l"]") if (mutantrace) @@ -839,7 +840,7 @@ // Uniform if(w_uniform) - if (mutations & FAT && !(w_uniform.flags & ONESIZEFITSALL)) + if ((FAT in src.mutations) && !(w_uniform.flags & ONESIZEFITSALL)) src << "\red You burst out of the [w_uniform.name]!" var/obj/item/clothing/c = w_uniform u_equip(c) @@ -855,7 +856,7 @@ var/t1 = w_uniform.color if (!t1) t1 = icon_state - if (mutations & FAT) + if (FAT in src.mutations) overlays += image("icon" = 'uniform_fat.dmi', "icon_state" = "[t1][!lying ? "_s" : "_l"]", "layer" = MOB_LAYER) else overlays += image("icon" = 'uniform.dmi', "icon_state" = text("[][]",t1, (!(lying) ? "_s" : "_l")), "layer" = MOB_LAYER) @@ -933,7 +934,7 @@ if (wear_suit) - if (mutations & FAT && !(wear_suit.flags & ONESIZEFITSALL)) + if ((FAT in src.mutations) && !(wear_suit.flags & ONESIZEFITSALL)) src << "\red You burst out of the [wear_suit.name]!" var/obj/item/clothing/c = wear_suit u_equip(c) @@ -1203,8 +1204,8 @@ stand_icon = new /icon('human.dmi', "blank") lying_icon = new /icon('human.dmi', "blank") - var/husk = (mutations & HUSK) - var/obese = (mutations & FAT) + var/husk = (HUSK in src.mutations) + var/obese = (FAT in src.mutations) if (husk) stand_icon.Blend(new /icon('human.dmi', "husk_s"), ICON_OVERLAY) @@ -2287,17 +2288,17 @@ It can still be worn/put on as normal. heal_overall_damage(0, -amount) /mob/living/carbon/human/Stun(amount) - if(mutations & HULK) + if(HULK in mutations) return ..() /mob/living/carbon/human/Weaken(amount) - if(mutations & HULK) + if(HULK in mutations) return ..() /mob/living/carbon/human/Paralyse(amount) - if(mutations & HULK) + if(HULK in mutations) return ..() diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm index 690e0a9536..24ccc0e519 100644 --- a/code/modules/mob/living/carbon/human/human_attackhand.dm +++ b/code/modules/mob/living/carbon/human/human_attackhand.dm @@ -42,7 +42,9 @@ var/datum/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting)) var/armor_block = run_armor_check(affecting, "melee") - if(M.mutations & HULK) damage += 5 + if(HULK in M.mutations) damage += 5 + if(SUPRSTR in M.augmentations) damage += 5 + playsound(loc, "punch", 25, 1, -1) visible_message("\red [M] has punched [src]!") @@ -101,6 +103,26 @@ return 1 if("hurt") + + if(ELECTRICHANDS in M.augmentations) + var/gendertxt = "their" + if(M.gender == "male") + gendertxt = "his" + if(M.gender == "female") + gendertxt = "her" + + visible_message("\red [M] has shocked [src] with [gendertxt] bare hands!") + M.attack_log += text("\[[time_stamp()]\] Used Electric Hands nanoaug power on [src.name] ([src.ckey])") + src.attack_log += text("\[[time_stamp()]\] Has been shocked by [M.name] with the Electric Hands nanoaug ([M.ckey])") + + log_attack("[M.name] ([M.ckey]) used Electric Hands nanoaug on [src.name], shocking them ([src.ckey])") + + + var/armorblock = run_armor_check(M.zone_sel.selecting, "energy") + apply_effects(5,5,0,0,5,0,0,armorblock) + + return + M.attack_log += text("\[[time_stamp()]\] Punched [src.name] ([src.ckey])") src.attack_log += text("\[[time_stamp()]\] Has been punched by [M.name] ([M.ckey])") @@ -132,7 +154,8 @@ var/datum/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting)) var/armor_block = run_armor_check(affecting, "melee") - if(M.mutations & HULK) damage += 5 + if(HULK in M.mutations) damage += 5 + if(SUPRSTR in M.augmentations) damage += 5 switch(attack_verb) if("slash") diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index 0cc56c0070..726e67b74d 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -51,6 +51,9 @@ if(blocked) damage = (damage/(blocked+1)) + if(DERMALARMOR in augmentations) + damage = damage - (round(damage*0.35)) // reduce damage by 35% + switch(damagetype) if(BRUTE) organ.take_damage(damage, 0) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index d692dceabd..a307099a72 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -10,6 +10,12 @@ emp_act /mob/living/carbon/human/bullet_act(var/obj/item/projectile/P, var/def_zone) + if(REFLEXES in augmentations) + if(prob(50)) + var/message = pick("[src] skillfully dodges the [P.name]!", "[src] ducks, dodging the [P.name]!", "[src] effortlessly jumps out of the way of the [P.name]!", "[src] dodges the [P.name] in one graceful movement!", "[src] leans back, dodging the [P.name] narrowly!") + visible_message("\red [message]") + return -1 + if(wear_suit && istype(wear_suit, /obj/item/clothing/suit/armor/laserproof)) if(istype(P, /obj/item/projectile/energy) || istype(P, /obj/item/projectile/beam)) var/reflectchance = 40 - round(P.damage/3) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 1f84c897ab..2b5de41de2 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -202,11 +202,37 @@ handle_mutations_and_radiation() if(getFireLoss()) - if(mutations & COLD_RESISTANCE || (prob(1) && prob(75))) + if((COLD_RESISTANCE in mutations) || (prob(1) && prob(75))) heal_organ_damage(0,1) - if (mutations & HULK && health <= 25) - mutations &= ~HULK + // Make nanoregen heal youu, -3 all damage types + if(NANOREGEN in augmentations) + var/healed = 0 + if(getToxLoss()) + adjustToxLoss(-3) + healed = 1 + if(getOxyLoss()) + adjustOxyLoss(-3) + healed = 1 + if(getCloneLoss()) + adjustCloneLoss(-3) + healed = 1 + if(getBruteLoss()) + heal_organ_damage(3,0) + healed = 1 + if(getFireLoss()) + heal_organ_damage(0,3) + healed = 1 + if(halloss > 0) + halloss -= 3 + if(halloss < 0) halloss = 0 + healed = 1 + if(healed) + if(prob(5)) + src << "\blue You feel your wounds mending..." + + if ((HULK in mutations) && health <= 25) + mutations.Remove(HULK) src << "\red You suddenly feel very weak." Weaken(3) emote("collapse") @@ -344,7 +370,7 @@ */ handle_breath(datum/gas_mixture/breath) - if(nodamage) + if(nodamage || REBREATHER in augmentations) return if(!breath || (breath.total_moles() == 0)) @@ -430,7 +456,7 @@ spawn(0) emote(pick("giggle", "laugh")) - if(breath.temperature > (T0C+66) && !(mutations & COLD_RESISTANCE)) // Hot air hurts :( + if(breath.temperature > (T0C+66) && !(COLD_RESISTANCE in mutations)) // Hot air hurts :( if(prob(20)) src << "\red You feel a searing heat in your lungs!" fire_alert = max(fire_alert, 1) @@ -598,7 +624,7 @@ thermal_protection += 3 if(head && (head.flags & HEADSPACE)) thermal_protection += 1 - if(mutations & COLD_RESISTANCE) + if(COLD_RESISTANCE in mutations) thermal_protection += 5 return thermal_protection @@ -672,13 +698,13 @@ adjustToxLoss(-1) adjustOxyLoss(-1) - if(overeatduration > 500 && !(mutations & FAT)) + if(overeatduration > 500 && !(FAT in mutations)) src << "\red You suddenly feel blubbery!" - mutations |= FAT + mutations.Add(FAT) update_body() - if ((overeatduration < 100 && mutations & FAT)) + if ((overeatduration < 100 && (FAT in mutations))) src << "\blue You feel fit again!" - mutations &= ~FAT + mutations.Remove(FAT) update_body() // nutrition decrease @@ -819,7 +845,7 @@ if(copytext(hud.icon_state,1,4) == "hud") //ugly, but icon comparison is worse, I believe del(hud) - if (stat == 2 || mutations & XRAY) + if (stat == 2 || (XRAY in mutations)) sight |= SEE_TURFS sight |= SEE_MOBS sight |= SEE_OBJS diff --git a/code/modules/mob/living/carbon/metroid/metroid.dm b/code/modules/mob/living/carbon/metroid/metroid.dm index 0c601069e3..efc5ff0767 100644 --- a/code/modules/mob/living/carbon/metroid/metroid.dm +++ b/code/modules/mob/living/carbon/metroid/metroid.dm @@ -505,11 +505,21 @@ O.show_message(text("\red [] has grabbed [] passively!", M, src), 1) else + if(ELECTRICHANDS in M.augmentations) + var/gendertxt = "their" + if(M.gender == "male") + gendertxt = "his" + if(M.gender == "female") + gendertxt = "her" + + visible_message("\red [M] has shocked [src] with [gendertxt] bare hands!") + return + var/damage = rand(1, 9) attacked += 10 if (prob(90)) - if (M.mutations & HULK) + if ((HULK in M.mutations) || (SUPRSTR in M.augmentations)) damage += 5 if(Victim) Victim = null diff --git a/code/modules/mob/living/carbon/monkey/life.dm b/code/modules/mob/living/carbon/monkey/life.dm index d3dcf32f2a..d4285e247e 100644 --- a/code/modules/mob/living/carbon/monkey/life.dm +++ b/code/modules/mob/living/carbon/monkey/life.dm @@ -127,15 +127,15 @@ handle_mutations_and_radiation() if(src.getFireLoss()) - if(src.mutations & COLD_RESISTANCE || prob(50)) + if((COLD_RESISTANCE in mutations) || prob(50)) switch(src.getFireLoss()) if(1 to 50) src.adjustFireLoss(-1) if(51 to 100) src.adjustFireLoss(-5) - if (src.mutations & HULK && src.health <= 25) - src.mutations &= ~HULK + if ((HULK in mutations) && src.health <= 25) + src.mutations.Remove(HULK) src << "\red You suddenly feel very weak." Weaken(3) emote("collapse") @@ -506,7 +506,7 @@ handle_regular_hud_updates() - if (src.stat == 2 || src.mutations & XRAY) + if (src.stat == 2 || (XRAY in mutations)) src.sight |= SEE_TURFS src.sight |= SEE_MOBS src.sight |= SEE_OBJS diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm index 83cc570474..5969f3bf6a 100644 --- a/code/modules/mob/living/carbon/monkey/monkey.dm +++ b/code/modules/mob/living/carbon/monkey/monkey.dm @@ -47,7 +47,7 @@ now_pushing = 1 if(ismob(AM)) var/mob/tmob = AM - if(istype(tmob, /mob/living/carbon/human) && tmob.mutations & FAT) + if(istype(tmob, /mob/living/carbon/human) && (HULK in tmob.mutations)) if(prob(70)) usr << "\red You fail to push [tmob]'s fat ass out of the way." now_pushing = 0 @@ -115,7 +115,7 @@ for(var/mob/O in viewers(src, null)) O.show_message(text("\red [M.name] has bit []!", src), 1) var/damage = rand(1, 5) - if (mutations & HULK) damage += 10 + if (HULK in mutations) damage += 10 adjustBruteLoss(damage) updatehealth() diff --git a/code/modules/mob/living/damage_procs.dm b/code/modules/mob/living/damage_procs.dm index 01bcbac26e..84715164ec 100644 --- a/code/modules/mob/living/damage_procs.dm +++ b/code/modules/mob/living/damage_procs.dm @@ -14,7 +14,7 @@ if(BRUTE) adjustBruteLoss(damage/(blocked+1)) if(BURN) - if(mutations & COLD_RESISTANCE) damage = 0 + if(COLD_RESISTANCE in mutations) damage = 0 adjustFireLoss(damage/(blocked+1)) if(TOX) adjustToxLoss(damage/(blocked+1)) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 9a3c418b3a..ee13a6ad6b 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -34,7 +34,7 @@ /mob/living/proc/burn_skin(burn_amount) if(istype(src, /mob/living/carbon/human)) //world << "DEBUG: burn_skin(), mutations=[mutations]" - if (src.mutations & COLD_RESISTANCE) //fireproof + if (COLD_RESISTANCE in src.mutations) //fireproof return 0 var/mob/living/carbon/human/H = src //make this damage method divide the damage to be done among all the body parts, then burn each body part for that much damage. will have better effect then just randomly picking a body part var/divided_damage = (burn_amount)/(H.organs.len) @@ -49,7 +49,7 @@ H.updatehealth() return 1 else if(istype(src, /mob/living/carbon/monkey)) - if (src.mutations & COLD_RESISTANCE) //fireproof + if (COLD_RESISTANCE in src.mutations) //fireproof return 0 var/mob/living/carbon/monkey/M = src M.adjustFireLoss(burn_amount) diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm index fce01a92b4..741f1a2edf 100644 --- a/code/modules/mob/living/silicon/robot/life.dm +++ b/code/modules/mob/living/silicon/robot/life.dm @@ -151,7 +151,7 @@ handle_regular_hud_updates() - if (src.stat == 2 || src.mutations & XRAY || src.sight_mode & BORGXRAY) + if (src.stat == 2 || XRAY in mutations || src.sight_mode & BORGXRAY) src.sight |= SEE_TURFS src.sight |= SEE_MOBS src.sight |= SEE_OBJS diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 79badd6772..288950487f 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -292,7 +292,7 @@ now_pushing = 1 if(ismob(AM)) var/mob/tmob = AM - if(istype(tmob, /mob/living/carbon/human) && tmob.mutations & FAT) + if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations)) if(prob(20)) usr << "\red You fail to push [tmob]'s fat ass out of the way." now_pushing = 0 diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index cfa7db439d..2c299b2e08 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -183,14 +183,11 @@ var/datum/dna/dna = null//Carbon var/radiation = 0.0//Carbon - var/mutations = 0//Carbon - //telekinesis = 1 - //firemut = 2 - //xray = 4 - //hulk = 8 - //clumsy = 16 - //obese = 32 - //husk = 64 + var/list/mutations = list() //Carbon -- Doohl + //see: setup.dm for list of mutations + + var/list/augmentations = list() //Carbon -- Doohl + //see: setup.dm for list of augmentations var/voice_name = "unidentifiable voice" var/voice_message = null // When you are not understood by others (replaced with just screeches, hisses, chimpers etc.) @@ -275,4 +272,6 @@ the mob is also allowed to move without any sort of restriction. For instance, i var/geaslist = list() + var/list/radar_blips = list() // list of screen objects, radar blips + var/radar_open = 0 // nonzero is radar is open diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm index 3d9e379277..4841a2b48d 100644 --- a/code/modules/mob/mob_grab.dm +++ b/code/modules/mob/mob_grab.dm @@ -4,6 +4,7 @@ icon_state = "grabbed" var/obj/screen/grab/hud1 = null var/mob/affecting = null + var/atom/movable/structure = null // if the grab is not grabbing a mob var/mob/assailant = null var/state = 1.0 var/killing = 0.0 @@ -21,32 +22,52 @@ spawn(0) del(src) return grabee + + else if(structure) + var/grabee = structure + spawn(0) + del(src) + return grabee + return null /obj/item/weapon/grab/proc/synch() - if(affecting.anchored)//This will prevent from grabbing people that are anchored. - del(src) - if (assailant.r_hand == src) - hud1.screen_loc = ui_rhand - else - hud1.screen_loc = ui_lhand + if(affecting) + if(affecting.anchored)//This will prevent from grabbing people that are anchored. + del(src) + if (assailant.r_hand == src) + hud1.screen_loc = ui_rhand + else + hud1.screen_loc = ui_lhand return /obj/item/weapon/grab/process() - if(!assailant || !affecting) - del(src) - return - if ((!( isturf(assailant.loc) ) || (!( isturf(affecting.loc) ) || (assailant.loc != affecting.loc && get_dist(assailant, affecting) > 1)))) - //SN src = null + if(!assailant || (!affecting && !structure)) del(src) return + + if(affecting && !structure) + if ((!( isturf(assailant.loc) ) || (!( isturf(affecting.loc) ) || (assailant.loc != affecting.loc && get_dist(assailant, affecting) > 1)))) + //SN src = null + del(src) + return + else if(!affecting && structure) + if (!isturf(structure.loc) || !isturf(structure.loc) || (assailant.loc != structure.loc && get_dist(assailant, structure) > 1)) + del(src) + return + if (assailant.client) assailant.client.screen -= hud1 assailant.client.screen += hud1 - if (assailant.pulling == affecting) + if (assailant.pulling == affecting || assailant.pulling == structure) assailant.pulling = null + + if (structure) + structure.loc = assailant.loc + structure.layer = assailant.layer + 1 + if (state <= 2) allow_upgrade = 1 if ((assailant.l_hand && assailant.l_hand != src && istype(assailant.l_hand, /obj/item/weapon/grab))) @@ -111,6 +132,9 @@ /obj/item/weapon/grab/proc/s_dbclick(obj/screen/S as obj) //if ((assailant.next_move > world.time && !( last_suffocate < world.time + 2 ))) // return + + if (!affecting) + return if ((!( assailant.canmove ) || assailant.lying)) del(src) return @@ -133,7 +157,7 @@ if (state < 3) if(istype(affecting, /mob/living/carbon/human)) var/mob/living/carbon/human/H = affecting - if(H.mutations & FAT) + if(FAT in H.mutations) assailant << "\blue You can't strangle [affecting] through all that fat!" return @@ -197,6 +221,7 @@ /obj/item/weapon/grab/attack(mob/M as mob, mob/user as mob) + if(!affecting) return if (M == affecting) if (state < 3) s_dbclick(hud1) @@ -204,7 +229,7 @@ s_click(hud1) return if(M == assailant && state >= 2) - if( ( ishuman(user) && (user.mutations & FAT) && ismonkey(affecting) ) || ( isalien(user) && iscarbon(affecting) ) ) + if( ( ishuman(user) && (FAT in user.mutations) && ismonkey(affecting) ) || ( isalien(user) && iscarbon(affecting) ) ) var/mob/living/carbon/attacker = user for(var/mob/N in viewers(user, null)) if(N.client) diff --git a/code/modules/mob/screen.dm b/code/modules/mob/screen.dm index 0d96ae4627..16da521e61 100644 --- a/code/modules/mob/screen.dm +++ b/code/modules/mob/screen.dm @@ -510,6 +510,12 @@ usr:inv3.icon_state = "inv3" usr:module_active = null + if("radar") + usr:close_radar() + + if("radar closed") + usr:start_radar() + else DblClick() return @@ -574,7 +580,7 @@ if(usr:handcuffed && usr:canmove && (usr.last_special <= world.time)) usr.next_move = world.time + 100 usr.last_special = world.time + 100 - if(isalienadult(usr) || usr.mutations & HULK)//Don't want to do a lot of logic gating here. + if(isalienadult(usr) || (HULK in usr.mutations) || (SUPRSTR in usr.augmentations))//Don't want to do a lot of logic gating here. usr << "\green You attempt to break your handcuffs. (This will take around 5 seconds and you need to stand still)" for(var/mob/O in viewers(usr)) O.show_message(text("\red [] is trying to break the handcuffs!", usr), 1) diff --git a/code/modules/mob/simple_animal/constructs.dm b/code/modules/mob/simple_animal/constructs.dm index 43cfeb5728..9a67ce88f2 100644 --- a/code/modules/mob/simple_animal/constructs.dm +++ b/code/modules/mob/simple_animal/constructs.dm @@ -72,7 +72,7 @@ now_pushing = 1 if(ismob(AM)) var/mob/tmob = AM - if(istype(tmob, /mob/living/carbon/human) && tmob.mutations & FAT) + if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations)) if(prob(5)) src << "\red You fail to push [tmob]'s fat ass out of the way." now_pushing = 0 @@ -204,7 +204,7 @@ now_pushing = 1 if(ismob(AM)) var/mob/tmob = AM - if(istype(tmob, /mob/living/carbon/human) && tmob.mutations & FAT) + if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations)) if(prob(50)) src << "\red You fail to push [tmob]'s fat ass out of the way." now_pushing = 0 diff --git a/code/modules/mob/simple_animal/corgi.dm b/code/modules/mob/simple_animal/corgi.dm index 6392f9b00f..7d87f75271 100644 --- a/code/modules/mob/simple_animal/corgi.dm +++ b/code/modules/mob/simple_animal/corgi.dm @@ -348,7 +348,7 @@ now_pushing = 1 if(ismob(AM)) var/mob/tmob = AM - if(istype(tmob, /mob/living/carbon/human) && tmob.mutations & FAT) + if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations)) if(prob(70)) src << "\red You fail to push [tmob]'s fat ass out of the way." now_pushing = 0 diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index 62a7d24210..8007f072db 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -58,10 +58,11 @@ set category = "Object" set src in usr - if ((usr.mutations & CLUMSY) && prob(50)) + if ((CLUMSY in usr.mutations) && prob(50)) usr << "\red You cut yourself on the paper." return - var/n_name = copytext(sanitize(input(usr, "What would you like to label the paper?", "Paper Labelling", null) as text),1,MAX_NAME_LEN) + var/n_name = input(usr, "What would you like to label the paper?", "Paper Labelling", null) as text + n_name = copytext(n_name, 1, 32) if ((loc == usr && usr.stat == 0)) name = "paper[(n_name ? text("- '[n_name]'") : null)]" add_fingerprint(usr) diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index 5d4ceaa7d2..18fd5bf1be 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -259,7 +259,7 @@ else prot = 1 - if(prot > 0 || (user.mutations & COLD_RESISTANCE)) + if(prot > 0 || (COLD_RESISTANCE in user.mutations)) user << "You remove the light [fitting]" else user << "You try to remove the light [fitting], but you burn your hand on it!" diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index a8f33f1fe7..673ec0bcc3 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -60,7 +60,7 @@ if(istype(user, /mob/living)) var/mob/living/M = user - if ((M.mutations & CLUMSY) && prob(50)) + if ((CLUMSY in M.mutations) && prob(50)) M << "\red The [src.name] blows up in your face." M.take_organ_damage(0,20) M.drop_item() diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index 4e5133e21e..45ce44ecc6 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -487,7 +487,7 @@ AM.loc = src if(istype(AM, /mob/living/carbon/human)) var/mob/living/carbon/human/H = AM - if(H.mutations & FAT) // is a human and fat? + if(FAT in H.mutations) // is a human and fat? has_fat_guy = 1 // set flag on holder if(istype(AM, /obj/effect/bigDelivery) && !hasmob) var/obj/effect/bigDelivery/T = AM diff --git a/code/setup.dm b/code/setup.dm index 15a3b63b7e..1e7bff68dc 100644 --- a/code/setup.dm +++ b/code/setup.dm @@ -194,17 +194,79 @@ var/MAX_EXPLOSION_RANGE = 14 #define FULL_BODY 2047 +/* //bitflags for mutations -var/const/TK =(1<<0) -var/const/COLD_RESISTANCE =(1<<1) -var/const/XRAY =(1<<2) -var/const/HULK =(1<<3) -var/const/CLUMSY =(1<<4) -var/const/FAT =(1<<5) -var/const/HUSK =(1<<6) -var/const/LASER =(1<<7) -var/const/HEAL =(1<<8) -var/const/NOCLONE =(1<<9) +var/const + // Extra powers: + SHADOW =(1<<10) // shadow teleportation (create in/out portals anywhere) (25%) + SCREAM =(1<<11) // supersonic screaming (25%) + EXPLOSIVE =(1<<12) // exploding on-demand (15%) + REGENERATION =(1<<13) // superhuman regeneration (30%) + REPROCESSOR =(1<<14) // eat anything (50%) + SHAPESHIFTING =(1<<15) // take on the appearance of anything (40%) + PHASING =(1<<16) // ability to phase through walls (40%) + SHIELD =(1<<17) // shielding from all projectile attacks (30%) + SHOCKWAVE =(1<<18) // attack a nearby tile and cause a massive shockwave, knocking most people on their asses (25%) + ELECTRICITY =(1<<19) // ability to shoot electric attacks (15%) + + + // Nanoaugmentations: + SUPRSTR =(1<<20) // super strength + RADAR =(1<<21) // on-screen mob radar + ELECTRICHANDS =(1<<22) // electric hands + ESWORDSYNTH =(1<<23) // esword synthesizer + REBREATHER =(1<<24) // removes the need to breathe + DERMALARMOR =(1<<25) // 35% damage decrease + REFLEXES =(1<<26) // dodge 50% of projectiles, dodge 25% of melee attacks + NANOREGEN =(1<<27) // regenerative nanobots, -3 all damage types per second +*/ + +// String identifiers for associative list lookup + +var/const + +// mob/var/list/mutations + + // Generic mutations: + TK =1 + COLD_RESISTANCE =2 + XRAY =3 + HULK =4 + CLUMSY =5 + FAT =6 + HUSK =7 + NOCLONE =8 + + + // Extra powers: + LASER =9 // harm intent - click anywhere to shoot lasers from eyes + HEAL =10 // healing people with hands + SHADOW =11 // shadow teleportation (create in/out portals anywhere) (25%) + SCREAM =12 // supersonic screaming (25%) + EXPLOSIVE =13 // exploding on-demand (15%) + REGENERATION =14 // superhuman regeneration (30%) + REPROCESSOR =15 // eat anything (50%) + SHAPESHIFTING =16 // take on the appearance of anything (40%) + PHASING =17 // ability to phase through walls (40%) + SHIELD =18 // shielding from all projectile attacks (30%) + SHOCKWAVE =19 // attack a nearby tile and cause a massive shockwave, knocking most people on their asses (25%) + ELECTRICITY =20 // ability to shoot electric attacks (15%) + + +// mob/var/list/augmentations + + // Nanoaugmentations: + SUPRSTR =21 // super strength (hulk powers) + RADAR =22 // on-screen mob radar + ELECTRICHANDS =23 // electric hands + ESWORDSYNTH =24 // esword synthesizer + REBREATHER =25 // removes the need to breathe + DERMALARMOR =26 // 35% damage decrease + REFLEXES =27 // dodge 50% of projectiles + NANOREGEN =28 // regenerative nanobots, -3 all damage types per second + + + //mob/var/stat things @@ -285,3 +347,25 @@ var/static/list/scarySounds = list('thudswoosh.ogg','Taser.ogg','armbomb.ogg','h #define SEC_LEVEL_DELTA 3 #define TRANSITIONEDGE 7 //Distance from edge to move to another z-level + +var/list/liftable_structures = list(\ + + /obj/machinery/autolathe, \ + /obj/machinery/constructable_frame, \ + /obj/machinery/hydroponics, \ + /obj/machinery/computer, \ + /obj/machinery/optable, \ + /obj/machinery/dispenser, \ + /obj/machinery/gibber, \ + /obj/machinery/microwave, \ + /obj/machinery/vending, \ + /obj/machinery/seed_extractor, \ + /obj/machinery/space_heater, \ + /obj/machinery/recharge_station, \ + /obj/machinery/flasher, \ + /obj/structure/stool, \ + /obj/structure/closet, \ + /obj/machinery/photocopier, \ + /obj/structure/filingcabinet, \ + /obj/structure/reagent_dispensers, \ + /obj/machinery/portable_atmospherics/canister) diff --git a/icons/effects/effects.dmi b/icons/effects/effects.dmi index a63d160362..39bbf9e3cb 100644 Binary files a/icons/effects/effects.dmi and b/icons/effects/effects.dmi differ diff --git a/icons/effects/genetics.dmi b/icons/effects/genetics.dmi index d3a611d5ed..1eb752332f 100644 Binary files a/icons/effects/genetics.dmi and b/icons/effects/genetics.dmi differ diff --git a/icons/misc/radar.dmi b/icons/misc/radar.dmi new file mode 100644 index 0000000000..b598ef2786 Binary files /dev/null and b/icons/misc/radar.dmi differ diff --git a/icons/mob/items_lefthand.dmi b/icons/mob/items_lefthand.dmi index c29f93a3dc..b9f54105a2 100644 Binary files a/icons/mob/items_lefthand.dmi and b/icons/mob/items_lefthand.dmi differ diff --git a/icons/mob/items_righthand.dmi b/icons/mob/items_righthand.dmi index a2205e4c3e..d97e3d81ce 100644 Binary files a/icons/mob/items_righthand.dmi and b/icons/mob/items_righthand.dmi differ diff --git a/icons/obj/device.dmi b/icons/obj/device.dmi index bdd8683bce..c411a998f2 100644 Binary files a/icons/obj/device.dmi and b/icons/obj/device.dmi differ diff --git a/icons/obj/gun.dmi b/icons/obj/gun.dmi index 38bee7a492..975dfd2b73 100644 Binary files a/icons/obj/gun.dmi and b/icons/obj/gun.dmi differ diff --git a/icons/obj/items.dmi b/icons/obj/items.dmi index 3a5e4af9a5..172a291ad1 100644 Binary files a/icons/obj/items.dmi and b/icons/obj/items.dmi differ diff --git a/icons/obj/projectiles.dmi b/icons/obj/projectiles.dmi index 2b5496eab5..2e12fd0c9b 100644 Binary files a/icons/obj/projectiles.dmi and b/icons/obj/projectiles.dmi differ diff --git a/icons/obj/stationobjs.dmi b/icons/obj/stationobjs.dmi index c0db9ff78b..a16f2ba0b9 100644 Binary files a/icons/obj/stationobjs.dmi and b/icons/obj/stationobjs.dmi differ diff --git a/icons/obj/weapons.dmi b/icons/obj/weapons.dmi index b631ce64af..ce4fb2f5e2 100644 Binary files a/icons/obj/weapons.dmi and b/icons/obj/weapons.dmi differ diff --git a/sound/misc/interference.ogg b/sound/misc/interference.ogg new file mode 100644 index 0000000000..e6d7b34002 Binary files /dev/null and b/sound/misc/interference.ogg differ diff --git a/tgstation.dme b/tgstation.dme index 276a434d2f..0c84c7db8f 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -154,6 +154,7 @@ #define FILE_DIR "code/unused/powerarmor" #define FILE_DIR "code/unused/spacecraft" #define FILE_DIR "code/WorkInProgress" +#define FILE_DIR "code/WorkInProgress/BS12" #define FILE_DIR "code/WorkInProgress/mapload" #define FILE_DIR "code/WorkInProgress/organs" #define FILE_DIR "code/WorkInProgress/virus2" @@ -178,6 +179,7 @@ #define FILE_DIR "icons/vending_icons" #define FILE_DIR "interface" #define FILE_DIR "maps" +#define FILE_DIR "maps/backup" #define FILE_DIR "maps/RandomZLevels" #define FILE_DIR "sound" #define FILE_DIR "sound/AI" @@ -378,6 +380,7 @@ #include "code\game\asteroid\device.dm" #include "code\game\asteroid\turf.dm" #include "code\game\gamemodes\events.dm" +#include "code\game\gamemodes\factions.dm" #include "code\game\gamemodes\game_mode.dm" #include "code\game\gamemodes\gameticker.dm" #include "code\game\gamemodes\intercept_report.dm" @@ -699,6 +702,7 @@ #include "code\game\objects\items\weapons\implants\implantchair.dm" #include "code\game\objects\items\weapons\implants\implanter.dm" #include "code\game\objects\items\weapons\implants\implantfreedom.dm" +#include "code\game\objects\items\weapons\implants\implantnanoaug.dm" #include "code\game\objects\items\weapons\implants\implantpad.dm" #include "code\game\objects\radio\beacon.dm" #include "code\game\objects\radio\electropack.dm"