From c9bb9c2e5fbaa5abe07fb6d75eed299398eb3d9b Mon Sep 17 00:00:00 2001 From: "mport2004@gmail.com" Date: Fri, 26 Aug 2011 07:41:37 +0000 Subject: [PATCH] Doors now check for critter access. Cleaned up the objectives a bit and made a new "kill" one for rev. Cleaned up implants and implanters a bit. Cleaned up the prisoner computer a bit. Sec Huds can be placed on security helmets (Still needs a sprite) The beachball now has in hand sprites (Kor) Cult: Heads other than the Captain and HoS are now able to start as or be converted to a cultist. Loyalty implants will block conversion but will not unconvert cultists. Rev: Station Heads or Head Revs who leave z1 will count as dead so long as they are off of the z level. Loyalty implants will block conversion and will unconvert revs upon injection. Once a mind has been unconverted it may not be reconverted New items: Loyalty implants, small implant that prevents reving/cult The Captain, Warden, Officers, and Detective all start with one already implanted Loyalty Implanter machine on the prison station that implants loyalty implants and may regen implants after a cooldown. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2049 316c924e-a436-60f5-8080-3fe189b3f50e --- code/datums/mind.dm | 3 + code/defines/obj.dm | 2 +- code/defines/obj/clothing/glasses.dm | 21 +- code/defines/obj/clothing/head.dm | 25 +- code/defines/obj/computer.dm | 14 - code/defines/obj/weapon.dm | 78 - code/game/gamemodes/cult/cult.dm | 12 +- code/game/gamemodes/objective.dm | 730 +- code/game/gamemodes/revolution/revolution.dm | 26 +- code/game/jobs/access.dm | 13 + code/game/jobs/jobprocs.dm | 16 +- code/game/machinery/cloning.dm | 5 +- code/game/machinery/computer/explosive.dm | 205 +- code/game/machinery/doors/door.dm | 11 +- code/game/objects/devices/flash.dm | 19 +- code/game/objects/items/clothing/hud.dm | 57 + code/game/objects/items/weapons/grenades.dm | 11 +- code/game/objects/items/weapons/implants.dm | 330 - .../objects/items/weapons/implants/implant.dm | 202 + .../items/weapons/implants/implantcase.dm | 116 + .../items/weapons/implants/implantchair.dm | 165 + .../items/weapons/implants/implanter.dm | 47 + .../items/weapons/implants/implantfreedom.dm | 58 + .../items/weapons/implants/implantpad.dm | 101 + .../objects/items/weapons/teleportation.dm | 37 +- code/game/objects/storage/lockbox.dm | 14 +- code/game/structure/structure.dm | 0 code/modules/critters/adefine.dm | 6 +- code/modules/critters/critterAI.dm | 15 +- code/modules/critters/critters.dm | 6 +- code/modules/critters/hivebots/hivebot.dm | 14 +- code/modules/mob/living/carbon/human/human.dm | 13 +- code/modules/mob/living/carbon/human/life.dm | 41 +- icons/changelog.html | 20 + icons/mob/hud.dmi | Bin 2444 -> 2484 bytes icons/mob/items_lefthand.dmi | Bin 92339 -> 93003 bytes icons/mob/items_righthand.dmi | Bin 93679 -> 94165 bytes icons/obj/machines/implantchair.dmi | Bin 0 -> 7622 bytes maps/tgstation.2.0.8.dmm | 16915 ++++++++-------- tgstation.dme | 13 +- 40 files changed, 9892 insertions(+), 9469 deletions(-) create mode 100644 code/game/objects/items/clothing/hud.dm delete mode 100644 code/game/objects/items/weapons/implants.dm create mode 100644 code/game/objects/items/weapons/implants/implant.dm create mode 100644 code/game/objects/items/weapons/implants/implantcase.dm create mode 100644 code/game/objects/items/weapons/implants/implantchair.dm create mode 100644 code/game/objects/items/weapons/implants/implanter.dm create mode 100644 code/game/objects/items/weapons/implants/implantfreedom.dm create mode 100644 code/game/objects/items/weapons/implants/implantpad.dm create mode 100644 code/game/structure/structure.dm create mode 100644 icons/obj/machines/implantchair.dmi diff --git a/code/datums/mind.dm b/code/datums/mind.dm index e520e8f1204..de8436b9285 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -14,6 +14,9 @@ datum/mind var/list/datum/objective/objectives = list() var/list/datum/objective/special_verbs = list() + var/has_been_rev = 0//Tracks if this mind has been a rev or not + + proc/transfer_to(mob/new_character) if(current) current.mind = null diff --git a/code/defines/obj.dm b/code/defines/obj.dm index 35833f5a55b..2bbc91c689e 100644 --- a/code/defines/obj.dm +++ b/code/defines/obj.dm @@ -1240,7 +1240,7 @@ icon = 'beach.dmi' icon_state = "ball" name = "beach ball" - item_state = "clown" + item_state = "beachball" density = 0 anchored = 0 w_class = 1.0 diff --git a/code/defines/obj/clothing/glasses.dm b/code/defines/obj/clothing/glasses.dm index 1948e749925..28a18918652 100644 --- a/code/defines/obj/clothing/glasses.dm +++ b/code/defines/obj/clothing/glasses.dm @@ -51,7 +51,7 @@ icon_state = "sun" item_state = "sunglasses" protective_temperature = 1300 - var/already_worn = 0 +// var/already_worn = 0 /obj/item/clothing/glasses/thermal name = "Optical Thermal Scanner" @@ -72,25 +72,6 @@ icon_state = "eyepatch" item_state = "eyepatch" -/obj/item/clothing/glasses/hud - name = "HUD" - desc = "A heads-up display that provides important info in (almost) real time." - flags = null //doesn't protect eyes because it's a monocle, duh - -/obj/item/clothing/glasses/hud/health - name = "Health Scanner HUD" - desc = "A heads-up display that scans the humans in view and provides accurate data about their health status." - icon_state = "healthhud" - origin_tech = "magnets=3;biotech=2" - var/list/icon/current = list() //the current hud icons - -/obj/item/clothing/glasses/hud/security - name = "Security HUD" - desc = "A heads-up display that scans the humans in view and provides accurate data about their ID status." - icon_state = "securityhud" - origin_tech = "magnets=3;combat=2" - var/list/icon/current = list() //the current hud icons - /proc/RoundHealth(health) switch(health) if(100 to INFINITY) diff --git a/code/defines/obj/clothing/head.dm b/code/defines/obj/clothing/head.dm index f398f1a24e8..8b46f54130a 100644 --- a/code/defines/obj/clothing/head.dm +++ b/code/defines/obj/clothing/head.dm @@ -151,9 +151,32 @@ flags = FPRINT|TABLEPASS|SUITSPACE|HEADCOVERSEYES item_state = "helmet" armor = list(melee = 75, bullet = 10, laser = 50, taser = 10, bomb = 25, bio = 10, rad = 0) - protective_temperature = 500 heat_transfer_coefficient = 0.10 + var/obj/item/clothing/glasses/hud/security/shud = null + + + attackby(obj/item/weapon/W as obj, mob/user as mob) + if((istype(W,/obj/item/clothing/glasses/hud/security)) && (!istype(src, /obj/item/clothing/head/helmet/space)) && (!shud)) + user.remove_from_mob(W) + shud = W + W.loc = src + user << "You attach the [W.name] to the [src.name]." + desc = "Standard Security gear. This helmet has a [shud.name] attached to it." + return + ..() + + + attack_self(mob/user as mob) + if(shud) + shud.loc = get_turf(src) + user << "You take the [shud.name] off of the [src.name]." + shud = null + desc = "Standard Security gear." + return + ..() + + /obj/item/clothing/head/secsoft name = "Soft Cap" diff --git a/code/defines/obj/computer.dm b/code/defines/obj/computer.dm index 79d70b75713..2d99bbaba0f 100644 --- a/code/defines/obj/computer.dm +++ b/code/defines/obj/computer.dm @@ -349,17 +349,3 @@ var/stop = 0.0 var/screen = 0 // 0 - Main Menu, 1 - Cyborg Status, 2 - Kill 'em All! -- In text -/obj/machinery/computer/prisoner - name = "Prisoner Management" - icon = 'computer.dmi' - icon_state = "explosive" - req_access = list(access_armory) - circuit = "/obj/item/weapon/circuitboard/prisoner" - - var/id = 0.0 - var/temp = null - var/status = 0 - var/timeleft = 60 - var/stop = 0.0 - var/screen = 0 // 0 - No Access Denied, 1 - Access allowed - var/malf_access = 0 \ No newline at end of file diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm index e2ac68652b8..1a043f563df 100644 --- a/code/defines/obj/weapon.dm +++ b/code/defines/obj/weapon.dm @@ -963,84 +963,6 @@ dispenser = 1 -/obj/item/weapon/implant - name = "implant" - var/implanted = null - var/mob/imp_in = null - var/color = "b" - -/obj/item/weapon/implant/freedom - name = "freedom" - desc = "Use this to escape from those evil Red Shirts." - var/uses = 1.0 - color = "r" - var/activation_emote = "chuckle" - -/obj/item/weapon/implant/tracking - name = "tracking" - desc = "Track with this." - var/frequency = 1451 - var/id = 1.0 - -/obj/item/weapon/implant/explosive - name = "explosive" - desc = "And boom goes the weasel." - -/obj/item/weapon/implant/chem - name = "chem" - -/obj/item/weapon/implantcase - name = "Glass Case" - desc = "A case containing an implant." - icon_state = "implantcase-0" - var/obj/item/weapon/implant/imp = null - item_state = "implantcase" - throw_speed = 1 - throw_range = 5 - w_class = 1.0 - -/obj/item/weapon/implantcase/tracking - name = "Glass Case- 'Tracking'" - desc = "A case containing a tracking implant." - icon = 'items.dmi' - icon_state = "implantcase-b" - -/obj/item/weapon/implantcase/explosive - name = "Glass Case- 'Explosive'" - desc = "A case containing an explosive implant." - icon = 'items.dmi' - icon_state = "implantcase-r" - -/obj/item/weapon/implantcase/chem - name = "Glass Case- 'Chem'" - desc = "A case containing a chemical implant." - icon = 'items.dmi' - icon_state = "implantcase-b" - -/obj/item/weapon/implanter - name = "implanter" - icon = 'items.dmi' - icon_state = "implanter0" - var/obj/item/weapon/implant/imp = null - item_state = "syringe_0" - throw_speed = 1 - throw_range = 5 - w_class = 2.0 - -/obj/item/weapon/implantpad - name = "implantpad" - desc = "Used to modify implants." - icon = 'items.dmi' - icon_state = "implantpad-0" - var/obj/item/weapon/implantcase/case = null - var/broadcasting = null - var/listening = 1.0 - item_state = "electronic" - throw_speed = 1 - throw_range = 5 - w_class = 2.0 - - /obj/item/weapon/locator name = "locator" desc = "Used to track those with locater implants." diff --git a/code/game/gamemodes/cult/cult.dm b/code/game/gamemodes/cult/cult.dm index 13ca6e3e1cd..7e439c6ccfc 100644 --- a/code/game/gamemodes/cult/cult.dm +++ b/code/game/gamemodes/cult/cult.dm @@ -10,16 +10,18 @@ return istype(M) && M.mind && ticker && ticker.mode && (M.mind in ticker.mode.cult) /proc/is_convertable_to_cult(datum/mind/mind) - return istype(mind) && \ - istype(mind.current, /mob/living/carbon/human) && \ - !(mind.assigned_role in head_positions) && \ - !(mind.assigned_role in list("Security Officer", "Detective", "Chaplain", "Warden")) + if(!istype(mind)) return 0 + if(istype(mind.current, /mob/living/carbon/human) && !(mind.assigned_role in list("Captain", "Head of Security", "Security Officer", "Detective", "Chaplain", "Warden"))) return 0 + for(var/obj/item/weapon/implant/loyalty/L in mind.current) + if(L && L.implanted) + return 0 + return 1 /datum/game_mode/cult name = "cult" config_tag = "cult" - restricted_jobs = list("Chaplain", "Security Officer", "Warden", "Detective", "AI", "Cyborg", "Captain", "Head of Personnel", "Head of Security", "Chief Engineer", "Research Director", "Chief Medical Officer") + restricted_jobs = list("Chaplain", "Security Officer", "Warden", "Detective", "AI", "Cyborg", "Captain", "Head of Security") required_players = 15 required_enemies = 3 diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index 21991a12802..a3378a795fa 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -1,394 +1,438 @@ -datum - objective - var - datum/mind/owner//Who owns the objective. - explanation_text//What that person is supposed to do. - datum/mind/target//If they are focused on a particular person. - target_amount//If they are focused on a particular number. Steal objectives have their own counter. +datum/objective + var + datum/mind/owner//Who owns the objective. + explanation_text//What that person is supposed to do. + datum/mind/target//If they are focused on a particular person. + target_amount//If they are focused on a particular number. Steal objectives have their own counter. - New(var/text) - if(text) - explanation_text = text + New(var/text) + if(text) + explanation_text = text - proc - check_completion() + proc/check_completion() + return 1 + + proc/find_target() + var/list/possible_targets = list() + for(var/datum/mind/possible_target in ticker.minds) + if(possible_target != owner && ishuman(possible_target.current)) + possible_targets += possible_target + if(possible_targets.len > 0) + target = pick(possible_targets) + + + proc/find_target_by_role(role, role_type=0)//Option sets either to check assigned role or special role. Default to assigned. + for(var/datum/mind/possible_target in ticker.minds) + if((possible_target != owner) && ishuman(possible_target.current) && ((role_type ? possible_target.special_role : possible_target.assigned_role) == role) ) + target = possible_target + break + + + +datum/objective/assassinate + find_target() + ..() + if(target && target.current) + explanation_text = "Assassinate [target.current.real_name], the [target.assigned_role]." + else + explanation_text = "Free Objective" + return target + + + find_target_by_role(role, role_type=0) + ..(role, role_type) + if(target && target.current) + explanation_text = "Assassinate [target.current.real_name], the [!role_type ? target.assigned_role : target.special_role]." + else + explanation_text = "Free Objective" + return target + + + check_completion() + if(target && target.current) + if(target.current.stat == 2 || istype(target.current.loc.loc, /area/tdome) || issilicon(target.current) || isbrain(target.current)) //Assuming this works, people in the thunderdome and borgs now count as dead for traitor objectives. --NeoFite return 1 - - find_target() - //world << "DEBUG: proc/find_target():" - var/list/possible_targets = list() - - for(var/datum/mind/possible_target in ticker.minds) - //world << "-> [possible_target.current.real_name]" - if(possible_target != owner && ishuman(possible_target.current)) - possible_targets += possible_target - - if(possible_targets.len > 0) - target = pick(possible_targets) - - find_target_by_role(role, role_type=0)//Option sets either to check assigned role or special role. Default to assigned. - for(var/datum/mind/possible_target in ticker.minds) - if((possible_target != owner) && ishuman(possible_target.current) && ((role_type ? possible_target.special_role : possible_target.assigned_role) == role) ) - target = possible_target - break - - assassinate - find_target() - ..() - if(target && target.current) - explanation_text = "Assassinate [target.current.real_name], the [target.assigned_role]." - else - explanation_text = "Free Objective" - - return target - - find_target_by_role(role, role_type=0) - ..(role, role_type) - if(target && target.current) - explanation_text = "Assassinate [target.current.real_name], the [!role_type ? target.assigned_role : target.special_role]." - else - explanation_text = "Free Objective" - - return target - - check_completion() - if(target && target.current) - if(target.current.stat == 2 || istype(target.current.loc.loc, /area/tdome) || issilicon(target.current) || isbrain(target.current)) //Assuming this works, people in the thunderdome and borgs now count as dead for traitor objectives. --NeoFite - return 1 - else - return 0 - else - return 1 - - debrain//I want braaaainssss - find_target() - ..() - - if(target && target.current) - explanation_text = "Steal the brain of [target.current.real_name]." - else - explanation_text = "Free Objective" - - return target - - find_target_by_role(role, role_type=0) - ..(role, role_type) - - if(target && target.current) - explanation_text = "Steal the brain of [target.current.real_name] the [!role_type ? target.assigned_role : target.special_role]." - else - explanation_text = "Free Objective" - - return target - - check_completion() - if(!target)//If it's a free objective. - return 1 - if(!owner.current||owner.current.stat==2)//If you're otherwise dead. - return 0 - var/list/all_items = owner.current.get_contents() - for(var/obj/item/device/mmi/mmi in all_items) - if(mmi.brainmob&&mmi.brainmob.mind==target) return 1 - for(var/obj/item/brain/brain in all_items) - if(brain.brainmob&&brain.brainmob.mind==target) return 1 + else return 0 + else + return 1 - protect//The opposite of killing a dude. - find_target() - ..() - if(target && target.current) - explanation_text = "Protect [target.current.real_name], the [target.assigned_role]." - else - explanation_text = "Free Objective" - return target - find_target_by_role(role, role_type=0) - ..(role, role_type) - if(target && target.current) - explanation_text = "Protect [target.current.real_name], the [!role_type ? target.assigned_role : target.special_role]." - else - explanation_text = "Free Objective" +datum/objective/mutiny + find_target() + ..() + if(target && target.current) + explanation_text = "Assassinate [target.current.real_name], the [target.assigned_role]." + else + explanation_text = "Free Objective" + return target - return target - check_completion() - if(!target)//If it's a free objective. - return 1 - if(target.current) - if(target.current.stat == 2 || istype(target.current.loc.loc, /area/tdome) || issilicon(target.current) || isbrain(target.current)) + find_target_by_role(role, role_type=0) + ..(role, role_type) + if(target && target.current) + explanation_text = "Assassinate [target.current.real_name], the [!role_type ? target.assigned_role : target.special_role]." + else + explanation_text = "Free Objective" + return target + + + check_completion() + if(target && target.current) + if(target.current.stat == 2) + return 1 + else if(target.current.z != 1)//If they leave the station they count as dead for this + return 2 + else + return 0 + else + return 1 + + + +datum/objective/debrain//I want braaaainssss + find_target() + ..() + if(target && target.current) + explanation_text = "Steal the brain of [target.current.real_name]." + else + explanation_text = "Free Objective" + return target + + + find_target_by_role(role, role_type=0) + ..(role, role_type) + if(target && target.current) + explanation_text = "Steal the brain of [target.current.real_name] the [!role_type ? target.assigned_role : target.special_role]." + else + explanation_text = "Free Objective" + return target + + + check_completion() + if(!target)//If it's a free objective. + return 1 + if(!owner.current||owner.current.stat==2)//If you're otherwise dead. + return 0 + var/list/all_items = owner.current.get_contents() + for(var/obj/item/device/mmi/mmi in all_items) + if(mmi.brainmob&&mmi.brainmob.mind==target) return 1 + for(var/obj/item/brain/brain in all_items) + if(brain.brainmob&&brain.brainmob.mind==target) return 1 + return 0 + + + +datum/objective/protect//The opposite of killing a dude. + find_target() + ..() + if(target && target.current) + explanation_text = "Protect [target.current.real_name], the [target.assigned_role]." + else + explanation_text = "Free Objective" + return target + + + find_target_by_role(role, role_type=0) + ..(role, role_type) + if(target && target.current) + explanation_text = "Protect [target.current.real_name], the [!role_type ? target.assigned_role : target.special_role]." + else + explanation_text = "Free Objective" + return target + + + check_completion() + if(!target)//If it's a free objective. + return 1 + if(target.current) + if(target.current.stat == 2 || istype(target.current.loc.loc, /area/tdome) || issilicon(target.current) || isbrain(target.current)) + return 0 + else + return 1 + else + return 0 + + + +datum/objective/hijack + explanation_text = "Hijack the emergency shuttle by escaping alone." + + + check_completion() + if(istype(owner.current, /mob/living/silicon)) + return 0 + if(emergency_shuttle.location<2) + return 0 + if(!owner.current || owner.current.stat ==2) + return 0 + var/area/shuttle = locate(/area/shuttle/escape/centcom) + var/protected_mobs[] = list(/mob/living/silicon/ai, /mob/living/silicon/pai) + for(var/mob/living/player in world) + if(player.type in protected_mobs) continue + if (player.mind && (player.mind != owner)) + if (player.stat != 2) //they're not dead + if (get_turf(player) in shuttle) return 0 - else - return 1 - else - return 0 - - hijack - explanation_text = "Hijack the emergency shuttle by escaping alone." - - check_completion() - if(istype(owner.current, /mob/living/silicon)) - return 0 - if(emergency_shuttle.location<2) - return 0 - - if(!owner.current || owner.current.stat ==2) - return 0 - - var/area/shuttle = locate(/area/shuttle/escape/centcom) - var/protected_mobs[] = list(/mob/living/silicon/ai, /mob/living/silicon/pai) - for(var/mob/living/player in world) - if(player.type in protected_mobs) continue - if (player.mind && (player.mind != owner)) - if (player.stat != 2) //they're not dead - if (get_turf(player) in shuttle) - return 0 - - return 1 + return 1 - block - explanation_text = "Do not allow any humans to escape on the shuttle alive." - check_completion() - if(!istype(owner.current, /mob/living/silicon)) - return 0 - if(emergency_shuttle.location<2) - return 0 +datum/objective/block + explanation_text = "Do not allow any humans to escape on the shuttle alive." - if(!owner.current) - return 0 - var/area/shuttle = locate(/area/shuttle/escape/centcom) - var/protected_mobs[] = list(/mob/living/silicon/ai, /mob/living/silicon/pai, /mob/living/silicon/robot) - for(var/mob/living/player in world) - if(player.type in protected_mobs) continue - if (player.mind) - if (player.stat != 2) - if (get_turf(player) in shuttle) - return 0 + check_completion() + if(!istype(owner.current, /mob/living/silicon)) + return 0 + if(emergency_shuttle.location<2) + return 0 + if(!owner.current) + return 0 + var/area/shuttle = locate(/area/shuttle/escape/centcom) + var/protected_mobs[] = list(/mob/living/silicon/ai, /mob/living/silicon/pai, /mob/living/silicon/robot) + for(var/mob/living/player in world) + if(player.type in protected_mobs) continue + if (player.mind) + if (player.stat != 2) + if (get_turf(player) in shuttle) + return 0 + return 1 - return 1 - escape - explanation_text = "Escape on the shuttle alive." - check_completion() - if(issilicon(owner.current)) - return 0 - if(isbrain(owner.current)) - return 0 - if(emergency_shuttle.location<2) - return 0 +datum/objective/escape + explanation_text = "Escape on the shuttle alive." - if(!owner.current || owner.current.stat ==2) - return 0 - var/turf/location = get_turf(owner.current.loc) - if(!location) - return 0 + check_completion() + if(issilicon(owner.current)) + return 0 + if(isbrain(owner.current)) + return 0 + if(emergency_shuttle.location<2) + return 0 + if(!owner.current || owner.current.stat ==2) + return 0 + var/turf/location = get_turf(owner.current.loc) + if(!location) + return 0 + var/area/check_area = location.loc + if(istype(check_area, /area/shuttle/escape/centcom)) + return 1 + else + return 0 - var/area/check_area = location.loc - if(istype(check_area, /area/shuttle/escape/centcom)) - return 1 - else - return 0 - survive - explanation_text = "Stay alive until the end." +datum/objective/survive + explanation_text = "Stay alive until the end." - check_completion() - if(issilicon(owner.current) && owner.current != owner.original) - return 0 - if(!owner.current || owner.current.stat == 2 || isbrain(owner.current)) //Brains no longer win survive objectives. --NEO - return 0 - return 1 - nuclear - explanation_text = "Destroy the station with a nuclear device." + check_completion() + if(issilicon(owner.current) && owner.current != owner.original) + return 0 + if(!owner.current || owner.current.stat == 2 || isbrain(owner.current)) //Brains no longer win survive objectives. --NEO + return 0 + return 1 - steal - var/obj/item/steal_target - var/target_name - var/global/possible_items[] = list( - "the captain's antique laser gun" = /obj/item/weapon/gun/energy/laser/captain, - "a hand teleporter" = /obj/item/weapon/hand_tele, - "an RCD" = /obj/item/weapon/rcd, - "a jetpack" = /obj/item/weapon/tank/jetpack, - "a captains jumpsuit" = /obj/item/clothing/under/rank/captain, - "functional ai" = /obj/item/device/aicard, - "a pair of magboots" = /obj/item/clothing/shoes/magboots, - "the station blueprints" = /obj/item/blueprints, - "thermal optics" = /obj/item/clothing/glasses/thermal, - "a mining rig suit" = /obj/item/clothing/suit/space/rig, - "a nasa voidsuit" = /obj/item/clothing/suit/space/nasavoid, - "28 moles of plasma (full tank)" = /obj/item/weapon/tank, - ) - var/global/possible_items_special[] = list( - "nuclear authentication disk" = /obj/item/weapon/disk/nuclear, - "nuclear gun" = /obj/item/weapon/gun/energy/nuclear, - "diamond drill" = /obj/item/weapon/pickaxe/diamonddrill, - "bag of holding" = /obj/item/weapon/storage/backpack/holding, - "hyper-capacity cell" = /obj/item/weapon/cell/hyper, - "10 diamonds" = /obj/item/stack/sheet/diamond, - "50 gold bars" = /obj/item/stack/sheet/gold, - "25 refined uranium bars" = /obj/item/stack/sheet/uranium, - ) +datum/objective/nuclear + explanation_text = "Destroy the station with a nuclear device." - proc/set_target(item_name) - target_name = item_name - steal_target = possible_items[target_name] - if (!steal_target ) - steal_target = possible_items_special[target_name] - explanation_text = "Steal [target_name]." - return steal_target - find_target() - return set_target(pick(possible_items)) - proc/select_target() - var/list/possible_items_all = possible_items+possible_items_special+"custom" - var/new_target = input("Select target:", "Objective target", steal_target) as null|anything in possible_items_all +datum/objective/steal + var/obj/item/steal_target + var/target_name - if (!new_target) return + var/global/possible_items[] = list( + "the captain's antique laser gun" = /obj/item/weapon/gun/energy/laser/captain, + "a hand teleporter" = /obj/item/weapon/hand_tele, + "an RCD" = /obj/item/weapon/rcd, + "a jetpack" = /obj/item/weapon/tank/jetpack, + "a captains jumpsuit" = /obj/item/clothing/under/rank/captain, + "functional ai" = /obj/item/device/aicard, + "a pair of magboots" = /obj/item/clothing/shoes/magboots, + "the station blueprints" = /obj/item/blueprints, + "thermal optics" = /obj/item/clothing/glasses/thermal, + "a mining rig suit" = /obj/item/clothing/suit/space/rig, + "a nasa voidsuit" = /obj/item/clothing/suit/space/nasavoid, + "28 moles of plasma (full tank)" = /obj/item/weapon/tank, + ) - if (new_target == "custom") - var/obj/item/custom_target = input("Select type:","Type") as null|anything in typesof(/obj/item) - if (!custom_target) return - var/tmp_obj = new custom_target - var/custom_name = tmp_obj:name - del(tmp_obj) - custom_name = input("Enter target name:", "Objective target", custom_name) as text|null - if (!custom_name) return - target_name = custom_name - steal_target = custom_target - explanation_text = "Steal [target_name]." + var/global/possible_items_special[] = list( + "nuclear authentication disk" = /obj/item/weapon/disk/nuclear, + "nuclear gun" = /obj/item/weapon/gun/energy/nuclear, + "diamond drill" = /obj/item/weapon/pickaxe/diamonddrill, + "bag of holding" = /obj/item/weapon/storage/backpack/holding, + "hyper-capacity cell" = /obj/item/weapon/cell/hyper, + "10 diamonds" = /obj/item/stack/sheet/diamond, + "50 gold bars" = /obj/item/stack/sheet/gold, + "25 refined uranium bars" = /obj/item/stack/sheet/uranium, + ) - else - set_target(new_target) - return steal_target + proc/set_target(item_name) + target_name = item_name + steal_target = possible_items[target_name] + if (!steal_target ) + steal_target = possible_items_special[target_name] + explanation_text = "Steal [target_name]." + return steal_target - check_completion() - if(!steal_target || !owner.current) return 0 - if(!isliving(owner.current)) return 0 - var/list/all_items = owner.current.get_contents() - switch (target_name) - if("28 moles of plasma (full tank)","10 diamonds","50 gold bars","25 refined uranium bars") - var/target_amount = text2num(target_name)//Non-numbers are ignored. - var/found_amount = 0.0//Always starts as zero. - for(var/obj/item/I in all_items) - if(!istype(I, steal_target)) continue//If it's not actually that item. - found_amount += (target_name=="28 moles of plasma (full tank)" ? (I:air_contents:toxins) : (I:amount)) - return found_amount>=target_amount - if("50 coins (in bag)") - var/obj/item/weapon/moneybag/B = locate() in all_items - if(B) - var/target = text2num(target_name) - var/found_amount = 0.0 - for(var/obj/item/weapon/coin/C in B) - found_amount++ - return found_amount>=target - if("functional ai") + + find_target() + return set_target(pick(possible_items)) + + + proc/select_target() + var/list/possible_items_all = possible_items+possible_items_special+"custom" + var/new_target = input("Select target:", "Objective target", steal_target) as null|anything in possible_items_all + if (!new_target) return + if (new_target == "custom") + var/obj/item/custom_target = input("Select type:","Type") as null|anything in typesof(/obj/item) + if (!custom_target) return + var/tmp_obj = new custom_target + var/custom_name = tmp_obj:name + del(tmp_obj) + custom_name = input("Enter target name:", "Objective target", custom_name) as text|null + if (!custom_name) return + target_name = custom_name + steal_target = custom_target + explanation_text = "Steal [target_name]." + else + set_target(new_target) + return steal_target + + + check_completion() + if(!steal_target || !owner.current) return 0 + if(!isliving(owner.current)) return 0 + var/list/all_items = owner.current.get_contents() + switch (target_name) + if("28 moles of plasma (full tank)","10 diamonds","50 gold bars","25 refined uranium bars") + var/target_amount = text2num(target_name)//Non-numbers are ignored. + var/found_amount = 0.0//Always starts as zero. + for(var/obj/item/I in all_items) + if(!istype(I, steal_target)) continue//If it's not actually that item. + found_amount += (target_name=="28 moles of plasma (full tank)" ? (I:air_contents:toxins) : (I:amount)) + return found_amount>=target_amount + if("50 coins (in bag)") + var/obj/item/weapon/moneybag/B = locate() in all_items + if(B) + var/target = text2num(target_name) + var/found_amount = 0.0 + for(var/obj/item/weapon/coin/C in B) + found_amount++ + return found_amount>=target + if("functional ai") // world << "dude's after an AI, time to check for one." - for(var/obj/item/device/aicard/C in all_items) + for(var/obj/item/device/aicard/C in all_items) // world << "Found an intelicard, checking it for an AI" - for(var/mob/living/silicon/ai/M in C) + for(var/mob/living/silicon/ai/M in C) // world << "Found an AI, checking if it's alive" - if(istype(M, /mob/living/silicon/ai) && M.stat != 2) + if(istype(M, /mob/living/silicon/ai) && M.stat != 2) // world << "yay, you win!" - return 1 - else - for(var/obj/I in all_items) - if(istype(I, steal_target)) - return 1 - return 0 + return 1 + else + for(var/obj/I in all_items) + if(istype(I, steal_target)) + return 1 + return 0 - download - proc/gen_amount_goal() - target_amount = rand(10,20) - explanation_text = "Download [target_amount] research levels." - return target_amount - check_completion() - if(!ishuman(owner.current)) - return 0 - if(!owner.current || owner.current.stat == 2) - return 0 - if(!(istype(owner.current:wear_suit, /obj/item/clothing/suit/space/space_ninja)&&owner.current:wear_suit:s_initialized)) - return 0 - var/current_amount - var/obj/item/clothing/suit/space/space_ninja/S = owner.current:wear_suit - if(!S.stored_research.len) - return 0 + +datum/objective/download + proc/gen_amount_goal() + target_amount = rand(10,20) + explanation_text = "Download [target_amount] research levels." + return target_amount + + + check_completion() + if(!ishuman(owner.current)) + return 0 + if(!owner.current || owner.current.stat == 2) + return 0 + if(!(istype(owner.current:wear_suit, /obj/item/clothing/suit/space/space_ninja)&&owner.current:wear_suit:s_initialized)) + return 0 + var/current_amount + var/obj/item/clothing/suit/space/space_ninja/S = owner.current:wear_suit + if(!S.stored_research.len) + return 0 + else + for(var/datum/tech/current_data in S.stored_research) + if(current_data.level>1) current_amount+=(current_data.level-1) + if(current_amount1) current_amount+=(current_data.level-1) - if(current_amount= target_amount)) - return 1 - else - return 0 + check_completion() + if(owner && owner.current && owner.current.absorbed_dna && ((owner.current.absorbed_dna.len - 1) >= target_amount)) + return 1 + else + return 0 /* Isn't suited for global objectives /*---------CULTIST----------*/ diff --git a/code/game/gamemodes/revolution/revolution.dm b/code/game/gamemodes/revolution/revolution.dm index 5ae5fc4de3f..49acb5c2b31 100644 --- a/code/game/gamemodes/revolution/revolution.dm +++ b/code/game/gamemodes/revolution/revolution.dm @@ -19,6 +19,7 @@ required_enemies = 3 var/finished = 0 + var/checkwin_counter = 0 var/const/max_headrevs = 3 var/const/waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds) var/const/waittime_h = 1800 //upper bound on time before intercept arrives (in tenths of seconds) @@ -109,10 +110,20 @@ send_intercept() ..() + +/datum/game_mode/revolution/process() + checkwin_counter++ + if(checkwin_counter >= 20) + if(!finished) + ticker.mode.check_win() + checkwin_counter = 0 + return 0 + + /datum/game_mode/proc/forge_revolutionary_objectives(var/datum/mind/rev_mind) var/list/heads = get_living_heads() for(var/datum/mind/head_mind in heads) - var/datum/objective/assassinate/rev_obj = new + var/datum/objective/mutiny/rev_obj = new rev_obj.owner = rev_mind rev_obj.target = head_mind rev_obj.explanation_text = "Assassinate [head_mind.current.real_name], the [head_mind.assigned_role]." @@ -314,7 +325,7 @@ ////////////////////////////////////////////////////////////////////// /datum/game_mode/revolution/declare_completion() if(finished == 1) - world << "\red The heads of staff were killed! The revolutionaries win!" + world << "\red The heads of staff were killed or abandoned the station! The revolutionaries win!" else if(finished == 2) world << "\red The heads of staff managed to stop the revolution!" ..() @@ -334,7 +345,10 @@ var/list/names = new for(var/datum/mind/i in revolutionaries) if(i.current) - names += i.current.real_name + ((i.current.stat==2)?" (Dead)":"") + var/hstatus = "Dead" + if((i.current.z != 1) && (i.current.stat!=2)) + hstatus = "Abandoned the station" + names += i.current.real_name + " [hstatus]" else names += "[i.key] (character destroyed)" if (revolutionaries.len!=0) @@ -354,7 +368,10 @@ var/list/names = new for(var/datum/mind/i in heads) if(i.current) - names += i.current.real_name + ((i.current.stat==2)?" (Dead)":"") + ((i in targets)?"(target)":"") + var/hstatus = "Dead" + if((i.current.z != 1) && (i.current.stat!=2)) + hstatus = "Abandoned the station" + names += i.current.real_name + " [hstatus] " + ((i in targets)?"(target)":"") else names += "[i.key] (character destroyed)" + ((i in targets)?"(target)":"") if (heads.len!=0) @@ -363,6 +380,7 @@ else world << "There were no any heads of staff on the station." + /proc/is_convertable_to_rev(datum/mind/mind) return istype(mind) && \ istype(mind.current, /mob/living/carbon/human) && \ diff --git a/code/game/jobs/access.dm b/code/game/jobs/access.dm index ffc73196ca2..e973af0d8c6 100644 --- a/code/game/jobs/access.dm +++ b/code/game/jobs/access.dm @@ -133,6 +133,19 @@ return 0 return 1 + +/obj/proc/check_access_list(var/list/L) + if(!src.req_access) return 1 + if(!istype(src.req_access, /list)) return 1 + if(!src.req_access.len) return 1 + if(!L) return 0 + if(!istype(L, /list)) return 0 + for(var/req in src.req_access) + if(!(req in L)) //doesn't have this access + return 0 + return 1 + + /proc/get_access(job) switch(job) if("Geneticist") diff --git a/code/game/jobs/jobprocs.dm b/code/game/jobs/jobprocs.dm index c1ac1de9b46..502eb9e86fa 100644 --- a/code/game/jobs/jobprocs.dm +++ b/code/game/jobs/jobprocs.dm @@ -270,6 +270,9 @@ src.equip_if_possible(new /obj/item/device/detective_scanner(src), slot_in_backpack) src.equip_if_possible(new /obj/item/weapon/zippo(src), slot_l_store) src.equip_if_possible(new /obj/item/weapon/reagent_containers/food/snacks/candy_corn(src), slot_h_store) + var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(src) + L.imp_in = src + L.implanted = 1 if ("Medical Doctor") src.equip_if_possible(new /obj/item/device/radio/headset/headset_med (src), slot_ears) // -- TLE @@ -293,7 +296,9 @@ src.equip_if_possible(new /obj/item/clothing/head/caphat(src), slot_head) src.equip_if_possible(new /obj/item/clothing/glasses/sunglasses(src), slot_glasses) src.equip_if_possible(new /obj/item/weapon/storage/id_kit(src), slot_in_backpack) - + var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(src) + L.imp_in = src + L.implanted = 1 if ("Security Officer") src.equip_if_possible(new /obj/item/device/radio/headset/headset_sec (src), slot_ears) // -- TLE @@ -306,6 +311,9 @@ src.equip_if_possible(new /obj/item/clothing/shoes/jackboots(src), slot_shoes) src.equip_if_possible(new /obj/item/weapon/handcuffs(src), slot_in_backpack) src.equip_if_possible(new /obj/item/weapon/handcuffs(src), slot_s_store) + var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(src) + L.imp_in = src + L.implanted = 1 if ("Warden") src.equip_if_possible(new /obj/item/device/radio/headset/headset_sec (src), slot_ears) // -- TLE @@ -322,6 +330,9 @@ src.equip_if_possible(new /obj/item/weapon/gun/energy/taser(src), slot_s_store) src.equip_if_possible(new /obj/item/weapon/handcuffs(src), slot_in_backpack) src.equip_if_possible(new /obj/item/device/flash(src), slot_l_store) + var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(src) + L.imp_in = src + L.implanted = 1 if ("Scientist") src.equip_if_possible(new /obj/item/device/radio/headset/headset_sci (src), slot_ears) @@ -347,6 +358,9 @@ src.equip_if_possible(new /obj/item/weapon/handcuffs(src), slot_in_backpack) src.equip_if_possible(new /obj/item/weapon/gun/energy(src), slot_s_store) src.equip_if_possible(new /obj/item/device/flash(src), slot_l_store) + var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(src) + L.imp_in = src + L.implanted = 1 if ("Head of Personnel") src.equip_if_possible(new /obj/item/device/radio/headset/heads/hop (src), slot_ears) // -- TLE diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index 890a0fd1f6c..3863a50b657 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -481,10 +481,9 @@ switch(ticker.mode.name) if ("revolution") - if (src.occupant.mind in ticker.mode:revolutionaries) - ticker.mode:add_revolutionary(src.occupant.mind) + if(src.occupant.mind in ticker.mode:revolutionaries) ticker.mode:update_all_rev_icons() //So the icon actually appears - if (src.occupant.mind in ticker.mode:head_revolutionaries) + if(src.occupant.mind in ticker.mode:head_revolutionaries) ticker.mode:update_all_rev_icons() if ("nuclear emergency") if (src.occupant.mind in ticker.mode:syndicates) diff --git a/code/game/machinery/computer/explosive.dm b/code/game/machinery/computer/explosive.dm index a4181ed2311..8f7428b12f3 100644 --- a/code/game/machinery/computer/explosive.dm +++ b/code/game/machinery/computer/explosive.dm @@ -1,132 +1,103 @@ -/obj/machinery/computer/prisoner/attack_ai(var/mob/user as mob) - user << "\red Access Denied" - if(user.icon_state == "ai-malf" && malf_access == 0) - user << "\red BZZZZZZ..." - spawn(20) - user << "\red ...ZZZZZZ *BEEP*" - sleep(10) - user << "\red You now have access to Prisoner Management console" - malf_access = 1 - if(malf_access == 1) +/obj/machinery/computer/prisoner + name = "Prisoner Management" + icon = 'computer.dmi' + icon_state = "explosive" + req_access = list(access_armory) + circuit = "/obj/item/weapon/circuitboard/prisoner" + var + id = 0.0 + temp = null + status = 0 + timeleft = 60 + stop = 0.0 + screen = 0 // 0 - No Access Denied, 1 - Access allowed + + + attack_ai(var/mob/user as mob) return src.attack_hand(user) - else + + + attack_paw(var/mob/user as mob) return -/obj/machinery/computer/prisoner/attack_paw(var/mob/user as mob) - return -/obj/machinery/computer/prisoner/attack_hand(var/mob/user as mob) - if(..()) + attack_hand(var/mob/user as mob) + if(..()) + return + user.machine = src + var/dat + dat += "Prisoner Implant Manager System
" + if(screen == 0) + dat += "
Unlock Console" + else if(screen == 1) + dat += "
Chemical Implants
" + var/turf/Tr = null + for(var/obj/item/weapon/implant/chem/C in world) + Tr = get_turf(C) + if((Tr) && (Tr.z != src.z)) continue//Out of range + if(!C.implanted) continue + dat += "[C.imp_in.name] | Remaining Units: [C.reagents.total_volume] | Inject: " + dat += "((1))" + dat += "((5))" + dat += "((10))
" + dat += "
Tracking Implants
" + for(var/obj/item/weapon/implant/tracking/T in world) + Tr = get_turf(T) + if((Tr) && (Tr.z != src.z)) continue//Out of range + if(!T.implanted) continue + var/loc_display = "Unknown" + var/mob/living/carbon/M = T.imp_in + if(M.z == 1 && !istype(M.loc, /turf/space)) + var/turf/mob_loc = get_turf_loc(M) + loc_display = mob_loc.loc + dat += "ID: [T.id] | Location: [loc_display]
" + dat += "
Lock Console" + + user << browse(dat, "window=computer;size=400x500") + onclose(user, "computer") return - user.machine = src - var/dat - dat += "Prisoner Implant Manager System
" - if(screen == 0) - dat += "
Unlock Console" - else if(screen == 1) - dat += "
Chemical Implants
" - for(var/obj/item/weapon/implant/chem/C in world) - if(!C.implanted) continue - dat += "[C.imp_in.name] | Remaining Units: [C.reagents.total_volume] | Inject: " - dat += "((1))" - dat += "((5))" - dat += "((10))
" - dat += "
Tracking Implants
" - for(var/obj/item/weapon/implant/tracking/T in world) - if(!T.implanted) continue - var/loc_display = "Unknown" - var/mob/living/carbon/M = T.imp_in - if(M.z == 1 && !istype(M.loc, /turf/space)) - var/turf/mob_loc = get_turf_loc(M) - loc_display = mob_loc.loc - dat += "ID: [T.id] | Location: [loc_display]
" - dat += "
Lock Console" - user << browse(dat, "window=computer;size=400x500") - onclose(user, "computer") - return -/obj/machinery/computer/prisoner/process() - if(stat & (NOPOWER|BROKEN)) + process() + if(stat & (NOPOWER|BROKEN)) + return + use_power(500) + src.updateDialog() return - use_power(500) - src.updateDialog() - return -/obj/machinery/computer/prisoner/Topic(href, href_list) - if(..()) - return - if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon))) - usr.machine = src - if (href_list["killimplant"]) - var/obj/item/weapon/implant/I = locate(href_list["killimplant"]) - var/mob/living/carbon/R = I.imp_in - if(R) - var/choice = null - if(istype(usr, /mob/living/silicon)) - choice = input("Using this command is in violation of default laws.") in list("Continue", "Abort") - if(choice != "Abort") - choice = input("Are you certain you wish to detonate [R.name]?") in list("Confirm", "Abort") - if(choice == "Confirm") - R << "You hear quiet beep from the base of your skull." - if(prob(95)) - R.gib() - message_admins("\blue [key_name_admin(usr)] killswitched [R.name]") - log_game("[key_name(usr)] killswitched [R.name]") - else - R << "\blue you hear a click as the implant fails to detonate and disintegrates." - else if (href_list["disable"]) - var/choice = input("Are you certain you wish to deactivate the implant?") in list("Confirm", "Abort") - if(choice == "Confirm") - var/obj/item/weapon/implant/I = locate(href_list["disable"]) - var/mob/living/carbon/R = I.imp_in - R << "You hear quiet beep from the base of your skull." - if(prob(1)) - message_admins("\blue [key_name_admin(usr)] attempted to disarm [R.name]' implant but it glitched. Oops.") - R.gib() + Topic(href, href_list) + if(..()) + return + if((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon))) + usr.machine = src + + if(href_list["inject1"]) + var/obj/item/weapon/implant/I = locate(href_list["inject1"]) + I.trigger(1) + + else if(href_list["inject5"]) + var/obj/item/weapon/implant/I = locate(href_list["inject5"]) + I.trigger(5) + + else if(href_list["inject10"]) + var/obj/item/weapon/implant/I = locate(href_list["inject10"]) + I.trigger(10) + + else if(href_list["lock"]) + if(src.allowed(usr)) + screen = !screen else - R << "\blue you hear a click as the implant disintegrates." - del(I) + usr << "Unauthorized Access." - else if (href_list["inject1"]) - var/obj/item/weapon/implant/I = locate(href_list["inject1"]) - var/mob/living/carbon/R = I.imp_in - I.reagents.trans_to(R, 1) - if(!I.reagents.total_volume) - R << "You hear a faint click from your chest." - del(I) + else if(href_list["warn"]) + var/warning = input(usr,"Message:","Enter your message here!","") + var/obj/item/weapon/implant/I = locate(href_list["warn"]) + var/mob/living/carbon/R = I.imp_in + R << "\green You hear a voice in your head saying: '[warning]'" - else if (href_list["inject5"]) - var/obj/item/weapon/implant/I = locate(href_list["inject5"]) - var/mob/living/carbon/R = I.imp_in - I.reagents.trans_to(R, 5) - if(!I.reagents.total_volume) - R << "You hear a faint click from your chest." - del(I) - - else if (href_list["inject10"]) - var/obj/item/weapon/implant/I = locate(href_list["inject10"]) - var/mob/living/carbon/R = I.imp_in - I.reagents.trans_to(R, 10) - if(!I.reagents.total_volume) - R << "You hear a faint click from your chest." - del(I) - - else if (href_list["lock"]) - if(src.allowed(usr)) - screen = !screen - else - usr << "Unauthorized Access." - - else if (href_list["warn"]) - var/warning = input(usr,"Message:","Enter your message here!","") - var/obj/item/weapon/implant/I = locate(href_list["warn"]) - var/mob/living/carbon/R = I.imp_in - R << "\green You hear a voice in your head saying: '[warning]'" - - src.add_fingerprint(usr) - src.updateUsrDialog() - return + src.add_fingerprint(usr) + src.updateUsrDialog() + return diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index 1755beec49e..cba4311241d 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -10,11 +10,12 @@ if(src.check_access(bot.botcard)) if(density) open() -// else if(istype(AM, /obj/livestock))currently all access will fix later -// var/obj/livestock/ani =AM -// if(src.check_access(ani.anicard)) -// if(density) -// open() + else if(istype(AM, /obj/critter)) + var/obj/critter/critter = AM + if(critter.opensdoors) return + if(src.check_access_list(critter.access_list)) + if(density) + open() else if(istype(AM, /obj/alien/facehugger)) if(src.check_access(null)) if(density) diff --git a/code/game/objects/devices/flash.dm b/code/game/objects/devices/flash.dm index 444dad08ca4..d5df7d2f6f3 100644 --- a/code/game/objects/devices/flash.dm +++ b/code/game/objects/devices/flash.dm @@ -40,18 +40,28 @@ if(iscarbon(M)) var/safety = M:eyecheck() - if(!safety) + if(safety <= 0) if(M.weakened <= 10) M.weakened = 10 flick("e_flash", M.flash) - if(ishuman(M))//&& (rerevcheckvargoeshere)) //Rev check - if(user.mind in ticker.mode.head_revolutionaries) - ticker.mode.add_revolutionary(M.mind) + if(ishuman(M)) + var/revsafe = 0 + for(var/obj/item/weapon/implant/loyalty/L in M) + if(L && L.implanted) + revsafe = 1 + break + if(M.mind.has_been_rev) + revsafe = 1 + if(!revsafe) + if(user.mind in ticker.mode.head_revolutionaries) + ticker.mode.add_revolutionary(M.mind) + M.mind.has_been_rev = 1 else flashfail = 1 else if(isrobot(user)) + M.weakened = max(user.weakened, rand(5,10)) spawn(0) var/atom/movable/overlay/animation = new(user.loc) animation.layer = user.layer + 1 @@ -61,7 +71,6 @@ flick("blspell", animation) sleep(5) del(animation) - M.weakened = max(user.weakened, 10) if(!flashfail) diff --git a/code/game/objects/items/clothing/hud.dm b/code/game/objects/items/clothing/hud.dm new file mode 100644 index 00000000000..ad1dfc36ec6 --- /dev/null +++ b/code/game/objects/items/clothing/hud.dm @@ -0,0 +1,57 @@ +/obj/item/clothing/glasses/hud + name = "HUD" + desc = "A heads-up display that provides important info in (almost) real time." + flags = null //doesn't protect eyes because it's a monocle, duh + origin_tech = "magnets=3;biotech=2" + var + list/icon/current = list() //the current hud icons + proc + process_hud(var/mob/M) return + + + +/obj/item/clothing/glasses/hud/health + name = "Health Scanner HUD" + desc = "A heads-up display that scans the humans in view and provides accurate data about their health status." + icon_state = "healthhud" + + + + +/obj/item/clothing/glasses/hud/security + name = "Security HUD" + desc = "A heads-up display that scans the humans in view and provides accurate data about their ID status." + icon_state = "securityhud" + + process_hud(var/mob/M) + if(!M) return + if(!M.client) return + var/client/C = M.client + var/icon/tempHud = 'hud.dmi' + for(var/mob/living/carbon/human/perp in view(M)) + if(perp.wear_id) + C.images += image(tempHud,perp,"hud[ckey(perp:wear_id:GetJobName())]") + var/perpname = "wot" + if(istype(perp.wear_id,/obj/item/weapon/card/id)) + perpname = perp.wear_id:registered + else if(istype(perp.wear_id,/obj/item/device/pda)) + var/obj/item/device/pda/tempPda = perp.wear_id + perpname = tempPda.owner + for (var/datum/data/record/E in data_core.general) + if (E.fields["name"] == perpname) + for (var/datum/data/record/R in data_core.security) + if ((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "*Arrest*")) + C.images += image(tempHud,perp,"hudwanted") + break + else if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "Incarcerated")) + C.images += image(tempHud,perp,"hudprisoner") + break + else + C.images += image(tempHud,perp,"hudunknown") + for(var/obj/item/weapon/implant/I in perp) + if(I.implanted) + if(istype(I,/obj/item/weapon/implant/tracking)) + C.images += image(tempHud,perp,"hud_imp_tracking") + if(istype(I,/obj/item/weapon/implant/loyalty)) + C.images += image(tempHud,perp,"hud_imp_loyal") + diff --git a/code/game/objects/items/weapons/grenades.dm b/code/game/objects/items/weapons/grenades.dm index 4c2074bb5bf..3cab5ac648d 100644 --- a/code/game/objects/items/weapons/grenades.dm +++ b/code/game/objects/items/weapons/grenades.dm @@ -163,19 +163,22 @@ FLASHBANG eye_safety = M.eyecheck() if(ishuman(M)) if(istype(M:ears, /obj/item/clothing/ears/earmuffs)) - ear_safety = 1 + ear_safety += 2 if(M.mutations & HULK) - ear_safety = 1 + ear_safety += 1 + if(istype(M:head, /obj/item/clothing/head/helmet)) + ear_safety += 1 //Flashing everyone - if(!eye_safety) + if(eye_safety < 1) flick("e_flash", M.flash) M.eye_stat += rand(1, 3) + M.stunned = max(M.stunned,2) M.weakened = max(M.weakened,10) //Now applying sound if((get_dist(M, T) <= 2 || src.loc == M.loc || src.loc == M)) - if(ear_safety) + if(ear_safety > 0) M.stunned = max(M.stunned,2) M.weakened = max(M.weakened,1) else diff --git a/code/game/objects/items/weapons/implants.dm b/code/game/objects/items/weapons/implants.dm deleted file mode 100644 index 5db570161dc..00000000000 --- a/code/game/objects/items/weapons/implants.dm +++ /dev/null @@ -1,330 +0,0 @@ -/* -CONTAINS: -IMPLANT CASE -TRACKER IMPLANT -IMPLANT PAD -FREEDOM IMPLANT -IMPLANTER - -*/ - -/obj/item/weapon/implantcase/proc/update() - if (src.imp) - src.icon_state = text("implantcase-[]", src.imp.color) - else - src.icon_state = "implantcase-0" - return - -/obj/item/weapon/implantcase/attackby(obj/item/weapon/I as obj, mob/user as mob) - ..() - if (istype(I, /obj/item/weapon/pen)) - var/t = input(user, "What would you like the label to be?", text("[]", src.name), null) as text - if (user.equipped() != I) - return - if ((!in_range(src, usr) && src.loc != user)) - return - t = copytext(sanitize(t),1,MAX_MESSAGE_LEN) - if (t) - src.name = text("Glass Case- '[]'", t) - else - src.name = "Glass Case" - - else if(istype(I, /obj/item/weapon/reagent_containers/syringe)) - if(src.imp.reagents.total_volume >= 10) - user << "\red [src] is full." - else - spawn(5) - I.reagents.trans_to(src.imp, 5) - user << "\blue You inject 5 units of the solution. The syringe now contains [I.reagents.total_volume] units." - else if (istype(I, /obj/item/weapon/implanter)) - if (I:imp) - if ((src.imp || I:imp.implanted)) - return - I:imp.loc = src - src.imp = I:imp - I:imp = null - src.update() - I:update() - else - if (src.imp) - if (I:imp) - return - src.imp.loc = I - I:imp = src.imp - src.imp = null - update() - I:update() - return - -/obj/item/weapon/implantcase/tracking/New() - - src.imp = new /obj/item/weapon/implant/tracking( src ) - ..() - return - -/obj/item/weapon/implantcase/explosive/New() - - src.imp = new /obj/item/weapon/implant/explosive( src ) - ..() - return - -/obj/item/weapon/implant/chem/New() - ..() - var/datum/reagents/R = new/datum/reagents(10) - reagents = R - R.my_atom = src - -/obj/item/weapon/implantcase/chem/New() - - src.imp = new /obj/item/weapon/implant/chem( src ) - ..() - return - -/obj/item/weapon/implantpad/proc/update() - - if (src.case) - src.icon_state = "implantpad-1" - else - src.icon_state = "implantpad-0" - return - -/obj/item/weapon/implantpad/attack_hand(mob/user as mob) - - if ((src.case && (user.l_hand == src || user.r_hand == src))) - if (user.hand) - user.l_hand = src.case - else - user.r_hand = src.case - src.case.loc = user - src.case.layer = 20 - src.case.add_fingerprint(user) - src.case = null - user.update_clothing() - src.add_fingerprint(user) - update() - else - if (user.contents.Find(src)) - spawn( 0 ) - src.attack_self(user) - return - else - return ..() - return - -/obj/item/weapon/implantpad/attackby(obj/item/weapon/implantcase/C as obj, mob/user as mob) - ..() - if (istype(C, /obj/item/weapon/implantcase)) - if (!( src.case )) - user.drop_item() - C.loc = src - src.case = C - else - return - src.update() - return - -/obj/item/weapon/implantpad/attack_self(mob/user as mob) - - user.machine = src - var/dat = "Implant Mini-Computer:
" - if (src.case) - if (src.case.imp) - if (istype(src.case.imp, /obj/item/weapon/implant/tracking)) - var/obj/item/weapon/implant/tracking/T = src.case.imp - dat += {" -Implant Specifications:
-Name: Tracking Beacon
-Zone: Spinal Column> 2-5 vertebrae
-Power Source: Nervous System Ion Withdrawl Gradient
-Life: 10 minutes after death of host
-Important Notes: None
-
-Implant Details:
-Function: Continuously transmits low power signal on frequency- Useful for tracking.
-Range: 35-40 meters
-Special Features:
-Neuro-Safe- Specialized shell absorbs excess voltages self-destructing the chip if -a malfunction occurs thereby securing safety of subject. The implant will melt and -disintegrate into bio-safe elements.
-Integrity: Gradient creates slight risk of being overcharged and frying the -circuitry. As a result neurotoxins can cause massive damage.
-Implant Specifics: -Frequency (144.1-148.9): -- -- [format_frequency(T.frequency)] -+ -+
- -ID (1-100): -- -- [T.id] -+ -+
"} - else if (istype(src.case.imp, /obj/item/weapon/implant/freedom)) - dat += {" -Implant Specifications:
-Name: Freedom Beacon
-Zone: Right Hand> Near wrist
-Power Source: Lithium Ion Battery
-Life: optimum 5 uses
-Important Notes: Illegal
-
-Implant Details:
-Function: Transmits a specialized cluster of signals to override handcuff locking -mechanisms
-Special Features:
-Neuro-Scan- Analyzes certain shadow signals in the nervous system -
-Integrity: The battery is extremely weak and commonly after injection its -life can drive down to only 1 use.
-No Implant Specifics"} - else if (istype(src.case.imp, /obj/item/weapon/implant/explosive)) - dat += {" -Implant Specifications:
-Name: Robust Corp RX-78 Prisoner Management Implant
-Zone: Spinal Column>Atlantis Vertebrae
-Power Source: Nervous System Ion Withdrawl Gradient
-Life: Deactivates upon death but remains within the body.
-Important Notes:
-
-Implant Details:
-Function: Contains a compact, electrically detonated explosive that detonates upon receiving a specially encoded signal.
-Special Features:
-Direct-Interface- You can use the prisoner management system to transmit short messages directly into the brain of the implanted subject.
-Safe-break- Can be safely deactivated remotely.
-Integrity: Implant will occasionally be degraded by the body's immune system and thus will occasionally malfunction."} - else if (istype(src.case.imp, /obj/item/weapon/implant/chem)) - dat += {" -Implant Specifications:
-Name: Robust Corp MJ-420 Prisoner Management Implant
-Zone: Abdominal Cavity>Abdominal Aorta
-Power Source: Techno-organtic Metabolization System
-Life: Deactivates upon death but remains within the body.
-Important Notes: Due to the system functioning off of nutrients in the implanted subject's body, the subject
-will suffer from an increased appetite.

-
-Implant Details:
-Function: Contains a small capsule that can contain various chemicals. Upon receiving a specially encoded signal
-the implant releases the chemicals directly into the blood stream.
-Special Features:
-Micro-Capsule- Can be loaded with any sort of chemical agent via the common syringe and can hold 25 units.
-Can only be loaded while still in it's original case.
-Integrity: Implant will last so long as the subject is alive. However, if the subject suffers from malnutrition,
-the implant may become unstable and either pre-maturely inject the subject or simply break."} - else - dat += "Implant ID not in database" - else - dat += "The implant casing is empty." - else - dat += "Please insert an implant casing!" - user << browse(dat, "window=implantpad") - onclose(user, "implantpad") - return - -/obj/item/weapon/implantpad/Topic(href, href_list) - ..() - if (usr.stat) - return - if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf)))) - usr.machine = src - if (href_list["freq"]) - if ((istype(src.case, /obj/item/weapon/implantcase) && istype(src.case.imp, /obj/item/weapon/implant/tracking))) - var/obj/item/weapon/implant/tracking/T = src.case.imp - T.frequency += text2num(href_list["freq"]) - T.frequency = sanitize_frequency(T.frequency) - if (href_list["id"]) - if ((istype(src.case, /obj/item/weapon/implantcase) && istype(src.case.imp, /obj/item/weapon/implant/tracking))) - var/obj/item/weapon/implant/tracking/T = src.case.imp - T.id += text2num(href_list["id"]) - T.id = min(100, T.id) - T.id = max(1, T.id) - if (istype(src.loc, /mob)) - attack_self(src.loc) - else - for(var/mob/M in viewers(1, src)) - if (M.client) - src.attack_self(M) - //Foreach goto(290) - src.add_fingerprint(usr) - else - usr << browse(null, "window=implantpad") - return - return - -/obj/item/weapon/implant/proc/trigger(emote, source as mob) - return - -/obj/item/weapon/implant/proc/implanted(source as mob) - return - -/obj/item/weapon/implant/freedom/New() - src.activation_emote = pick("blink", "blink_r", "eyebrow", "chuckle", "twitch_s", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink") - src.uses = rand(1, 5) - ..() - return - -/obj/item/weapon/implant/freedom/trigger(emote, mob/source as mob) - if (src.uses < 1) - return 0 - - if (emote == src.activation_emote) - src.uses-- - source << "You feel a faint click." - - if (source.handcuffed) - var/obj/item/weapon/W = source.handcuffed - source.handcuffed = null - if (source.client) - source.client.screen -= W - if (W) - W.loc = source.loc - dropped(source) - if (W) - W.layer = initial(W.layer) - -/obj/item/weapon/implant/freedom/implanted(mob/source as mob) - source.mind.store_memory("Freedom implant can be activated by using the [src.activation_emote] emote, say *[src.activation_emote] to attempt to activate.", 0, 0) - source << "The implanted freedom implant can be activated by using the [src.activation_emote] emote, say *[src.activation_emote] to attempt to activate." - -/obj/item/weapon/implanter/proc/update() - - if (src.imp) - src.icon_state = "implanter1" - else - src.icon_state = "implanter0" - return - -/obj/item/weapon/implanter/attack(mob/M as mob, mob/user as mob) - if (!istype(M, /mob/living/carbon)) - return - - if (user && src.imp) - for (var/mob/O in viewers(M, null)) - O.show_message("\red [M] has been implanted by [user].", 1) - M.attack_log += text("\[[time_stamp()]\] Implanted with [src.name] ([src.imp.name]) by [user.name] ([user.ckey])") - user.attack_log += text("\[[time_stamp()]\] Used the [src.name] ([src.imp.name]) to implant [M.name] ([M.ckey])") - 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" - - -/obj/item/weapon/implant/uplink - var/activation_emote = "chuckle" - var/obj/item/weapon/syndicate_uplink/uplink = null - - New() - activation_emote = pick("blink", "blink_r", "eyebrow", "chuckle", "twitch_s", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink") - uplink = new /obj/item/weapon/syndicate_uplink/implanted(src) - ..() - - implanted(mob/source as mob) - source.mind.store_memory("Uplink implant can be activated by using the [activation_emote] emote, say *[activation_emote] to attempt to activate.", 0, 0) - source << "The implanted uplink implant can be activated by using the [activation_emote] emote, say *[activation_emote] to attempt to activate." - - trigger(emote, mob/source as mob) - if(emote == activation_emote) - uplink.attack_self(source) \ No newline at end of file diff --git a/code/game/objects/items/weapons/implants/implant.dm b/code/game/objects/items/weapons/implants/implant.dm new file mode 100644 index 00000000000..57aa1762977 --- /dev/null +++ b/code/game/objects/items/weapons/implants/implant.dm @@ -0,0 +1,202 @@ +/obj/item/weapon/implant + name = "implant" + var + implanted = null + mob/imp_in = null + color = "b" + allow_reagents = 0 + proc + trigger(emote, source as mob) + implanted(source as mob) + get_data() + + + trigger() + return + + + implanted(source as mob) + return + + + get_data() + return "No information available" + + + +/obj/item/weapon/implant/uplink + name = "uplink" + desc = "Summon things." + var + activation_emote = "chuckle" + obj/item/weapon/syndicate_uplink/uplink = null + + + New() + activation_emote = pick("blink", "blink_r", "eyebrow", "chuckle", "twitch_s", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink") + uplink = new /obj/item/weapon/syndicate_uplink/implanted(src) + ..() + return + + + implanted(mob/source as mob) + source.mind.store_memory("Uplink implant can be activated by using the [activation_emote] emote, say *[activation_emote] to attempt to activate.", 0, 0) + source << "The implanted uplink implant can be activated by using the [activation_emote] emote, say *[activation_emote] to attempt to activate." + return + + + trigger(emote, mob/source as mob) + if(emote == activation_emote) + uplink.attack_self(source) + return + + + +/obj/item/weapon/implant/tracking + name = "tracking" + desc = "Track with this." + var + id = 1.0 + + + get_data() + var/dat = {"Implant Specifications:
+Name: Tracking Beacon
+Life: 10 minutes after death of host
+Important Notes: None
+
+Implant Details:
+Function: Continuously transmits low power signal. Useful for tracking.
+Special Features:
+Neuro-Safe- Specialized shell absorbs excess voltages self-destructing the chip if +a malfunction occurs thereby securing safety of subject. The implant will melt and +disintegrate into bio-safe elements.
+Integrity: Gradient creates slight risk of being overcharged and frying the +circuitry. As a result neurotoxins can cause massive damage.
+Implant Specifics:
+ID (1-100): +- +- [id] ++ ++
"} + return dat + + Topic(href, href_list) + ..() + if (usr.stat) + return + var/obj/item/weapon/implantpad/IP = (locate(/obj/item/weapon/implantpad) in usr) + if(IP) + if(IP.case) + if(IP.case.imp == src) + usr.machine = src + if (href_list["id"]) + src.id += text2num(href_list["id"]) + src.id = min(100, src.id) + src.id = max(1, src.id) + if (istype(src.loc, /mob)) + attack_self(src.loc) + else + for(var/mob/M in viewers(1, src)) + if (M.client) + src.attack_self(M) + src.add_fingerprint(usr) + return + usr << browse(null, "window=implantpad") + return + + + +/obj/item/weapon/implant/explosive + name = "explosive" + desc = "And boom goes the weasel." + + + get_data() + var/dat = {" +Implant Specifications:
+Name: Robust Corp RX-78 Employee Management Implant
+Life: Activates upon death.
+Important Notes: Explodes
+
+Implant Details:
+Function: Contains a compact, electrically detonated explosive that detonates upon receiving a specially encoded signal or upon host death.
+Special Features: Explodes
+Integrity: Implant will occasionally be degraded by the body's immune system and thus will occasionally malfunction."} + return dat + + + +/obj/item/weapon/implant/chem + name = "chem" + desc = "Injects things." + allow_reagents = 1 + + get_data() + var/dat = {" +Implant Specifications:
+Name: Robust Corp MJ-420 Prisoner Management Implant
+Life: Deactivates upon death but remains within the body.
+Important Notes: Due to the system functioning off of nutrients in the implanted subject's body, the subject
+will suffer from an increased appetite.

+
+Implant Details:
+Function: Contains a small capsule that can contain various chemicals. Upon receiving a specially encoded signal
+the implant releases the chemicals directly into the blood stream.
+Special Features: +Micro-Capsule- Can be loaded with any sort of chemical agent via the common syringe and can hold 25 units.
+Can only be loaded while still in it's original case.
+Integrity: Implant will last so long as the subject is alive. However, if the subject suffers from malnutrition,
+the implant may become unstable and either pre-maturely inject the subject or simply break."} + return dat + + + New() + ..() + var/datum/reagents/R = new/datum/reagents(10) + reagents = R + R.my_atom = src + + + trigger(var/number = 0) + if((!number) || (!src.imp_in)) return 0 + var/mob/living/carbon/R = src.imp_in + src.reagents.trans_to(R, number) + R << "You hear a faint *beep*." + if(!src.reagents.total_volume) + R << "You hear a faint click from your chest." + spawn(0) + del(src) + return + + + +/obj/item/weapon/implant/loyalty + name = "loyalty" + desc = "Makes you loyal or such." + + get_data() + var/dat = {" +Implant Specifications:
+Name: NanoTrasen Employee Management Implant
+Life: Ten years.
+Important Notes: Personnel injected with this device tend to be much more loyal to the company.
+
+Implant Details:
+Function: Contains a small pod of nanobots that manipulate the host's mental functions.
+Special Features: Will prevent and cure most forms of brainwashing.
+Integrity: Implant will last so long as the nanobots are inside the bloodstream."} + return dat + + + implanted(M as mob) + if(!istype(M, /mob/living/carbon/human)) return + var/mob/living/carbon/human/H = M + if(H.mind in ticker.mode:head_revolutionaries) + for (var/mob/O in viewers(H, null)) + O.show_message("\red [H] seems to resist the implant.", 1) + return + else if(H.mind in ticker.mode:revolutionaries) + ticker.mode:remove_revolutionary(H.mind) + H << "\blue You feel a surge of loyalty towards NanoTrasen." + return diff --git a/code/game/objects/items/weapons/implants/implantcase.dm b/code/game/objects/items/weapons/implants/implantcase.dm new file mode 100644 index 00000000000..9ac0ce5b37e --- /dev/null +++ b/code/game/objects/items/weapons/implants/implantcase.dm @@ -0,0 +1,116 @@ +/obj/item/weapon/implantcase + name = "Glass Case" + desc = "A case containing an implant." + icon_state = "implantcase-0" + item_state = "implantcase" + throw_speed = 1 + throw_range = 5 + w_class = 1.0 + var + obj/item/weapon/implant/imp = null + proc + update() + + + update() + if (src.imp) + src.icon_state = text("implantcase-[]", src.imp.color) + else + src.icon_state = "implantcase-0" + return + + + attackby(obj/item/weapon/I as obj, mob/user as mob) + ..() + if (istype(I, /obj/item/weapon/pen)) + var/t = input(user, "What would you like the label to be?", text("[]", src.name), null) as text + if (user.equipped() != I) + return + if((!in_range(src, usr) && src.loc != user)) + return + t = copytext(sanitize(t),1,MAX_MESSAGE_LEN) + if(t) + src.name = text("Glass Case- '[]'", t) + else + src.name = "Glass Case" + else if(istype(I, /obj/item/weapon/reagent_containers/syringe)) + if(!src.imp.allow_reagents) return + if(src.imp.reagents.total_volume >= 10) + user << "\red [src] is full." + else + spawn(5) + I.reagents.trans_to(src.imp, 5) + user << "\blue You inject 5 units of the solution. The syringe now contains [I.reagents.total_volume] units." + else if (istype(I, /obj/item/weapon/implanter)) + if (I:imp) + if ((src.imp || I:imp.implanted)) + return + I:imp.loc = src + src.imp = I:imp + I:imp = null + src.update() + I:update() + else + if (src.imp) + if (I:imp) + return + src.imp.loc = I + I:imp = src.imp + src.imp = null + update() + I:update() + return + + + +/obj/item/weapon/implantcase/tracking + name = "Glass Case- 'Tracking'" + desc = "A case containing a tracking implant." + icon = 'items.dmi' + icon_state = "implantcase-b" + + + New() + src.imp = new /obj/item/weapon/implant/tracking( src ) + ..() + return + + + +/obj/item/weapon/implantcase/explosive + name = "Glass Case- 'Explosive'" + desc = "A case containing an explosive implant." + icon = 'items.dmi' + icon_state = "implantcase-r" + + + New() + src.imp = new /obj/item/weapon/implant/explosive( src ) + ..() + return + + + +/obj/item/weapon/implantcase/chem + name = "Glass Case- 'Chem'" + desc = "A case containing a chemical implant." + icon = 'items.dmi' + icon_state = "implantcase-b" +/obj/item/weapon/implantcase/chem/New() + + src.imp = new /obj/item/weapon/implant/chem( src ) + ..() + return + + +/obj/item/weapon/implantcase/loyalty + name = "Glass Case- 'Loyalty'" + desc = "A case containing a loyalty implant." + icon = 'items.dmi' + icon_state = "implantcase-r" + + + New() + src.imp = new /obj/item/weapon/implant/loyalty( src ) + ..() + return \ No newline at end of file diff --git a/code/game/objects/items/weapons/implants/implantchair.dm b/code/game/objects/items/weapons/implants/implantchair.dm new file mode 100644 index 00000000000..7a4dd84d770 --- /dev/null +++ b/code/game/objects/items/weapons/implants/implantchair.dm @@ -0,0 +1,165 @@ +/obj/machinery/implantchair + name = "Loyalty Implanter" + desc = "Used to implant occupants with loyalty implants." + icon = 'implantchair.dmi' + icon_state = "implantchair" + density = 1 + opacity = 0 + anchored = 1 + + var + ready = 1 + malfunction = 0 + list/obj/item/weapon/implant/loyalty/implant_list = list() + max_implants = 5 + injection_cooldown = 600 + replenish_cooldown = 6000 + replenishing = 0 + mob/living/carbon/occupant = null + injecting = 0 + + proc + go_out() + put_mob(mob/living/carbon/M as mob) + implant(var/mob/M) + add_implants() + + + New() + ..() + add_implants() + + + attack_hand(mob/user as mob) + user.machine = src + var/health_text = "" + if(src.occupant) + if(src.occupant.health <= -100) + health_text = "Dead" + else if(src.occupant.health < 0) + health_text = "[round(src.occupant.health,0.1)]" + else + health_text = "[round(src.occupant.health,0.1)]" + + var/dat = {"Implanter Status
+ Current occupant: [src.occupant ? "
Name: [src.occupant]
Health: [health_text]
" : "None"]
+ Implants: [src.implant_list.len ? "[implant_list.len]" : "Replenish"]
+ [src.ready ? "Implant" : "Recharging"]
+ "} + user.machine = src + user << browse(dat, "window=implant") + onclose(user, "implant") + + + Topic(href, href_list) + if((get_dist(src, usr) <= 1) || istype(usr, /mob/living/silicon/ai)) + if(href_list["implant"]) + injecting = 1 + go_out() + ready = 0 + spawn(injection_cooldown) + ready = 1 + + if(href_list["replenish"]) + ready = 0 + spawn(replenish_cooldown) + add_implants() + ready = 1 + + src.updateUsrDialog() + src.add_fingerprint(usr) + return + + + attackby(var/obj/item/weapon/G as obj, var/mob/user as mob) + if(istype(G, /obj/item/weapon/grab)) + if(!ismob(G:affecting)) + return + for(var/mob/living/carbon/metroid/M in range(1,G:affecting)) + if(M.Victim == G:affecting) + usr << "[G:affecting:name] will not fit into the [src.name] because they have a Metroid latched onto their head." + return + var/mob/M = G:affecting + if(put_mob(M)) + del(G) + src.updateUsrDialog() + return + + + go_out() + if(!( src.occupant )) + return + if (src.occupant.client) + src.occupant.client.eye = src.occupant.client.mob + src.occupant.client.perspective = MOB_PERSPECTIVE + src.occupant.loc = src.loc + if(injecting) + implant(src.occupant) + injecting = 0 + src.occupant = null + icon_state = "implantchair" + return + + + put_mob(mob/living/carbon/M as mob) + if(!iscarbon(M)) + usr << "\red The [src.name] cannot hold this!" + return + if(src.occupant) + usr << "\red The [src.name] is already occupied!" + return + if(M.client) + M.client.perspective = EYE_PERSPECTIVE + M.client.eye = src + M.pulling = null + M.loc = src + src.occupant = M + src.add_fingerprint(usr) + icon_state = "implantchair_on" + return 1 + + + implant(var/mob/M) + if (!istype(M, /mob/living/carbon)) + return + if(!implant_list.len) return + for(var/obj/item/weapon/implant/loyalty/imp in implant_list) + if(!imp) continue + if(istype(imp, /obj/item/weapon/implant/loyalty)) + for (var/mob/O in viewers(M, null)) + O.show_message("\red [M] has been implanted by the [src.name].", 1) + imp.loc = M + imp.imp_in = M + imp.implanted = 1 + imp.implanted(M) + implant_list -= imp + break + return + + + add_implants() + for(var/i=0, i Implanted with [src.name] ([src.imp.name]) by [user.name] ([user.ckey])") + user.attack_log += text("\[[time_stamp()]\] Used the [src.name] ([src.imp.name]) to implant [M.name] ([M.ckey])") + 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" + return + +/obj/item/weapon/implanter/loyalty + name = "implanter-loyalty" + + New() + src.imp = new /obj/item/weapon/implant/loyalty( src ) + ..() + update() + return \ No newline at end of file diff --git a/code/game/objects/items/weapons/implants/implantfreedom.dm b/code/game/objects/items/weapons/implants/implantfreedom.dm new file mode 100644 index 00000000000..09826c7a2d2 --- /dev/null +++ b/code/game/objects/items/weapons/implants/implantfreedom.dm @@ -0,0 +1,58 @@ +/obj/item/weapon/implant/freedom + name = "freedom" + desc = "Use this to escape from those evil Red Shirts." + color = "r" + var + activation_emote = "chuckle" + uses = 1.0 + + + New() + src.activation_emote = pick("blink", "blink_r", "eyebrow", "chuckle", "twitch_s", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink") + src.uses = rand(1, 5) + ..() + return + + + trigger(emote, mob/source as mob) + if (src.uses < 1) return 0 + if (emote == src.activation_emote) + src.uses-- + source << "You feel a faint click." + if (source.handcuffed) + var/obj/item/weapon/W = source.handcuffed + source.handcuffed = null + if (source.client) + source.client.screen -= W + if (W) + W.loc = source.loc + dropped(source) + if (W) + W.layer = initial(W.layer) + return + + + implanted(mob/source as mob) + source.mind.store_memory("Freedom implant can be activated by using the [src.activation_emote] emote, say *[src.activation_emote] to attempt to activate.", 0, 0) + source << "The implanted freedom implant can be activated by using the [src.activation_emote] emote, say *[src.activation_emote] to attempt to activate." + return + + + get_data() + var/dat = {" +Implant Specifications:
+Name: Freedom Beacon
+Life: optimum 5 uses
+Important Notes: Illegal
+
+Implant Details:
+Function: Transmits a specialized cluster of signals to override handcuff locking +mechanisms
+Special Features:
+Neuro-Scan- Analyzes certain shadow signals in the nervous system
+Integrity: The battery is extremely weak and commonly after injection its +life can drive down to only 1 use.
+No Implant Specifics"} + return dat + + diff --git a/code/game/objects/items/weapons/implants/implantpad.dm b/code/game/objects/items/weapons/implants/implantpad.dm new file mode 100644 index 00000000000..24a5443737e --- /dev/null +++ b/code/game/objects/items/weapons/implants/implantpad.dm @@ -0,0 +1,101 @@ +/obj/item/weapon/implantpad + name = "implantpad" + desc = "Used to modify implants." + icon = 'items.dmi' + icon_state = "implantpad-0" + item_state = "electronic" + throw_speed = 1 + throw_range = 5 + w_class = 2.0 + var + obj/item/weapon/implantcase/case = null + broadcasting = null + listening = 1.0 + proc + update() + + + update() + if (src.case) + src.icon_state = "implantpad-1" + else + src.icon_state = "implantpad-0" + return + + + attack_hand(mob/user as mob) + if ((src.case && (user.l_hand == src || user.r_hand == src))) + if (user.hand) + user.l_hand = src.case + else + user.r_hand = src.case + src.case.loc = user + src.case.layer = 20 + src.case.add_fingerprint(user) + src.case = null + user.update_clothing() + src.add_fingerprint(user) + update() + else + if (user.contents.Find(src)) + spawn( 0 ) + src.attack_self(user) + return + else + return ..() + return + + + attackby(obj/item/weapon/implantcase/C as obj, mob/user as mob) + ..() + if(istype(C, /obj/item/weapon/implantcase)) + if(!( src.case )) + user.drop_item() + C.loc = src + src.case = C + else + return + src.update() + return + + + attack_self(mob/user as mob) + user.machine = src + var/dat = "Implant Mini-Computer:
" + if (src.case) + if(src.case.imp) + if(istype(src.case.imp, /obj/item/weapon/implant)) + dat += src.case.imp.get_data() + else + dat += "The implant casing is empty." + else + dat += "Please insert an implant casing!" + user << browse(dat, "window=implantpad") + onclose(user, "implantpad") + return + +/* + Topic(href, href_list) + ..() + if (usr.stat) + return + if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf)))) + usr.machine = src + if (href_list["id"]) + if ((istype(src.case, /obj/item/weapon/implantcase) && istype(src.case.imp, /obj/item/weapon/implant/tracking))) + var/obj/item/weapon/implant/tracking/T = src.case.imp + T.id += text2num(href_list["id"]) + T.id = min(100, T.id) + T.id = max(1, T.id) + if (istype(src.loc, /mob)) + attack_self(src.loc) + else + for(var/mob/M in viewers(1, src)) + if (M.client) + src.attack_self(M) + //Foreach goto(290) + src.add_fingerprint(usr) + else + usr << browse(null, "window=implantpad") + return + return*/ \ No newline at end of file diff --git a/code/game/objects/items/weapons/teleportation.dm b/code/game/objects/items/weapons/teleportation.dm index 943117104b1..6a8cf7ea5ef 100644 --- a/code/game/objects/items/weapons/teleportation.dm +++ b/code/game/objects/items/weapons/teleportation.dm @@ -60,27 +60,26 @@ Frequency: src.temp += "Extranneous Signals:
" for (var/obj/item/weapon/implant/tracking/W in world) - if (W.frequency == src.frequency) - if (!W.implanted || !ismob(W.loc)) - continue - else - var/mob/M = W.loc - if (M.stat == 2) - if (M.timeofdeath + 6000 < world.time) - continue + if (!W.implanted || !ismob(W.loc)) + continue + else + var/mob/M = W.loc + if (M.stat == 2) + if (M.timeofdeath + 6000 < world.time) + continue - var/turf/tr = get_turf(W) - if (tr.z == sr.z && tr) - var/direct = max(abs(tr.x - sr.x), abs(tr.y - sr.y)) - if (direct < 20) - if (direct < 5) - direct = "very strong" + var/turf/tr = get_turf(W) + if (tr.z == sr.z && tr) + var/direct = max(abs(tr.x - sr.x), abs(tr.y - sr.y)) + if (direct < 20) + if (direct < 5) + direct = "very strong" + else + if (direct < 10) + direct = "strong" else - if (direct < 10) - direct = "strong" - else - direct = "weak" - src.temp += "[W.id]-[dir2text(get_dir(sr, tr))]-[direct]
" + direct = "weak" + src.temp += "[W.id]-[dir2text(get_dir(sr, tr))]-[direct]
" src.temp += "You are at \[[sr.x],[sr.y],[sr.z]\] in orbital coordinates.

Refresh
" else diff --git a/code/game/objects/storage/lockbox.dm b/code/game/objects/storage/lockbox.dm index b49a0110302..20db72c911f 100644 --- a/code/game/objects/storage/lockbox.dm +++ b/code/game/objects/storage/lockbox.dm @@ -62,4 +62,16 @@ user << "\red Its locked!" else ..() - return \ No newline at end of file + return + + +/obj/item/weapon/storage/lockbox/loyalty + name = "Lockbox (Loyalty Implants)" + req_access = list(access_security) + + New() + ..() + new /obj/item/weapon/implantcase/loyalty(src) + new /obj/item/weapon/implantcase/loyalty(src) + new /obj/item/weapon/implantcase/loyalty(src) + new /obj/item/weapon/implanter/loyalty(src) \ No newline at end of file diff --git a/code/game/structure/structure.dm b/code/game/structure/structure.dm new file mode 100644 index 00000000000..e69de29bb2d diff --git a/code/modules/critters/adefine.dm b/code/modules/critters/adefine.dm index 065605e0690..4173717e786 100644 --- a/code/modules/critters/adefine.dm +++ b/code/modules/critters/adefine.dm @@ -10,7 +10,7 @@ alive = 1 health = 10 max_health = 10 - + list/access_list = list()//accesses go here //AI things task = "thinking" //Attacks at will @@ -19,8 +19,8 @@ defensive = 0 //Will randomly move about wanderer = 1 - //Will open doors it bumps - opensdoors = 1 + //Will open doors it bumps ignoring access + opensdoors = 0 //Internal tracking ignore frustration = 0 diff --git a/code/modules/critters/critterAI.dm b/code/modules/critters/critterAI.dm index 4b5a3337aac..cd8d8055f2a 100644 --- a/code/modules/critters/critterAI.dm +++ b/code/modules/critters/critterAI.dm @@ -87,13 +87,12 @@ Bump(M as mob|obj)//TODO: Add access levels here spawn(0) - if ((istype(M, /obj/machinery/door))) - var/obj/machinery/door/D = M - if (src.opensdoors) - D.open() + if((istype(M, /obj/machinery/door))) + if(src.opensdoors) + M:open() src.frustration = 0 - else src.frustration ++ - else if ((istype(M, /mob/living/)) && (!src.anchored)) + else src.frustration ++ + if((istype(M, /mob/living/)) && (!src.anchored)) src.loc = M:loc src.frustration = 0 return @@ -127,9 +126,9 @@ for(var/obj/critter/C in view(src.seekrange,src)) if(istype(C, /obj/critter) && !src.atkcritter) continue if(istype(C, /obj/mecha) && !src.atkmech) continue - if(C.health < 0) continue + if(C.health <= 0) continue if(istype(C, /obj/critter) && src.atkcritter) - if(istype(C, src.type) && !src.atksame) continue + if((istype(C, src.type) && !src.atksame) || (C == src)) continue src.attack = 1 if(istype(C, /obj/mecha) && src.atkmech) src.attack = 1 if(src.attack) diff --git a/code/modules/critters/critters.dm b/code/modules/critters/critters.dm index a28a11bffc9..02f5f046d58 100644 --- a/code/modules/critters/critters.dm +++ b/code/modules/critters/critters.dm @@ -31,7 +31,6 @@ aggressive = 0 defensive = 1 wanderer = 1 - opensdoors = 0 atkcarbon = 1 atksilicon = 0 attacktext = "bites" @@ -49,7 +48,6 @@ aggressive = 1 defensive = 0 wanderer = 1 - opensdoors = 1 atkcarbon = 1 atksilicon = 1 firevuln = 2 @@ -73,7 +71,6 @@ aggressive = 0 defensive = 0 wanderer = 1 - opensdoors = 0 atkcarbon = 0 atksilicon = 0 firevuln = 2 @@ -101,7 +98,6 @@ aggressive = 1 defensive = 1 wanderer = 1 - opensdoors = 1 atkcarbon = 1 atksilicon = 1 atkcritter = 1 @@ -127,6 +123,7 @@ max_health = 50 melee_damage_lower = 10 melee_damage_upper = 20 +// opensdoors = 1 would give all access dono if want /obj/critter/walkingmushroom name = "Walking Mushroom" @@ -137,7 +134,6 @@ aggressive = 0 defensive = 0 wanderer = 1 - opensdoors = 0 atkcarbon = 0 atksilicon = 0 firevuln = 2 diff --git a/code/modules/critters/hivebots/hivebot.dm b/code/modules/critters/hivebots/hivebot.dm index 5d30e7f1a89..01cff4e0298 100644 --- a/code/modules/critters/hivebots/hivebot.dm +++ b/code/modules/critters/hivebots/hivebot.dm @@ -74,9 +74,9 @@ for(var/obj/critter/C in view(src.seekrange,src)) if(istype(C, /obj/critter) && !src.atkcritter) continue if(istype(C, /obj/mecha) && !src.atkmech) continue - if(C.health < 0) continue + if(C.health <= 0) continue if(istype(C, /obj/critter) && src.atkcritter) - if(istype(C, /obj/critter/hivebot) && !src.atksame) continue + if((istype(C, /obj/critter/hivebot) && !src.atksame) || (C == src)) continue src.attack = 1 if(istype(C, /obj/mecha) && src.atkmech) src.attack = 1 if(src.attack) @@ -203,6 +203,7 @@ if(auto_spawn) spawn(spawn_delay) turn_on = 1 + auto_spawn = 0 warpbots() @@ -224,11 +225,12 @@ process() - if(health < (max_health/2)) - turn_on = 1 - if(turn_on) + if((health < (max_health/2)) && (!turn_on)) + if(prob(2))//Might be a bit low, will mess with it likely + turn_on = 1 + if(turn_on == 1) warpbots() - turn_on = 0 + turn_on = 2 ..() /obj/critter/hivebot/tele/massive diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 9f9dddb11e8..746066ccec7 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -3029,16 +3029,15 @@ It can still be worn/put on as normal. ///eyecheck() ///Returns a number between -1 to 2 /mob/living/carbon/human/eyecheck() + var/number = 0 if(istype(src.head, /obj/item/clothing/head/helmet/welding)) if(!src.head:up) - return (2) + number += 2 if(istype(src.head, /obj/item/clothing/head/helmet/space)) - return (2) + number += 2 if(istype(src.glasses, /obj/item/clothing/glasses/sunglasses)) - return (1) + number += 1 if(istype(src.glasses, /obj/item/clothing/glasses/thermal)) - return (-1) - if(src.sdisabilities & 1)//Blindness Check - return (2) - return (0) + number -= 1 + return number diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 71051d916e3..4ed97a7e388 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -842,35 +842,6 @@ sight |= SEE_OBJS if (!druggy) see_invisible = 0 - else if (istype(glasses, /obj/item/clothing/glasses/hud/security)) - if(client) - var/icon/tempHud = 'hud.dmi' - for(var/mob/living/carbon/human/perp in view(src)) - if(perp.wear_id) - client.images += image(tempHud,perp,"hud[ckey(perp:wear_id:GetJobName())]") - var/perpname = "wot" - if(istype(perp.wear_id,/obj/item/weapon/card/id)) - perpname = perp.wear_id:registered - else if(istype(perp.wear_id,/obj/item/device/pda)) - var/obj/item/device/pda/tempPda = perp.wear_id - perpname = tempPda.owner - for (var/datum/data/record/E in data_core.general) - if (E.fields["name"] == perpname) - for (var/datum/data/record/R in data_core.security) - if ((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "*Arrest*")) - client.images += image(tempHud,perp,"hudwanted") - break - else if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "Incarcerated")) - client.images += image(tempHud,perp,"hudprisoner") - break - else - client.images += image(tempHud,perp,"hudunknown") - for(var/obj/item/weapon/implant/tracking/tracker in perp) - if(tracker.implanted) - client.images += image(tempHud,perp,"hudtracking") - break - if (!druggy) - see_invisible = 0 else if (istype(glasses, /obj/item/clothing/glasses/hud/health)) if(client) @@ -922,6 +893,18 @@ if(!head:up && tinted_weldhelh) see_in_dark = 1 + if(istype(glasses, /obj/item/clothing/glasses/hud/security)) + if(client) + glasses:process_hud(src) + if(!druggy) + see_invisible = 0 + else if((istype(head, /obj/item/clothing/head/helmet)) && (!istype(head, /obj/item/clothing/head/helmet/space))) + if(client) + if(head:shud) + head:shud:process_hud(src) + if(!druggy) + see_invisible = 0 + if (sleep) sleep.icon_state = text("sleep[]", sleeping) if (rest) rest.icon_state = text("rest[]", resting) diff --git a/icons/changelog.html b/icons/changelog.html index f6686fc9843..3e603b19859 100644 --- a/icons/changelog.html +++ b/icons/changelog.html @@ -45,6 +45,26 @@ Stuff which is in development and not yet visible to players or just code relate (is. code improvements for expandability, etc.) should not be listed here. They should be listed in the changelog upon commit tho. Thanks. --> + +26 August 2011. +
    +
  • Mport updated: +
      +
    • Rev:
    • +
    • Station Heads or Head Revs who leave z1 will count as dead so long as they are off of the z level.
    • +
    • Once a player has been unconverted they may not be reconverted.
    • +
    • Cult:
    • +
    • Heads other than the Captain and HoS are now able to start as or be converted to a cultist.
    • +
    • New Item: Loyalty Implant
    • +
    • Loyalty Implants will prevent revving/culting.
    • +
    • If a rev (not cultist) is injected with one he will unconvert, if a revhead is injected it will display a resist message.
    • +
    • Loyalty Implants show up on the SecHud
    • +
    • A box of four spawn in the armory.
    • +
    • New Machine: Loyalty Implanter
    • +
    • Is on the prison station, shove a guy inside it to implant a loyalty implant. It can implant 5 times before it needs a 10 minute cooldown.
    • +
    +
+ 20 August 2011.