diff --git a/code/game/antagonist/outsider/ert.dm b/code/game/antagonist/outsider/ert.dm index f52f031002c..946ff1dfc28 100644 --- a/code/game/antagonist/outsider/ert.dm +++ b/code/game/antagonist/outsider/ert.dm @@ -32,13 +32,9 @@ var/datum/antagonist/ert/ert player.equip_to_slot_or_del(new /obj/item/clothing/gloves/swat(src), slot_gloves) player.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(src), slot_glasses) - var/obj/item/weapon/card/id/W = new(src) - W.assignment = "Emergency Response Team" + var/obj/item/weapon/card/id/centcom/ERT/W = new(src) W.registered_name = player.real_name W.name = "[player.real_name]'s ID Card ([W.assignment])" - W.icon_state = "centcom" - W.access = get_all_accesses() - W.access += get_all_centcom_access() player.equip_to_slot_or_del(W, slot_wear_id) return 1 diff --git a/code/game/machinery/computer/computer.dm b/code/game/machinery/computer/computer.dm index 076304694a4..3efb6b41897 100644 --- a/code/game/machinery/computer/computer.dm +++ b/code/game/machinery/computer/computer.dm @@ -54,6 +54,9 @@ return /obj/machinery/computer/bullet_act(var/obj/item/projectile/Proj) + if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN)) + return + if(prob(Proj.damage)) set_broken() ..() diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm index 0cc8eded068..a056cbc0f98 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -504,42 +504,12 @@ /obj/machinery/porta_turret/proc/assess_perp(var/mob/living/carbon/human/H) if(!H || !istype(H)) - return + return 0 if(emagged) return 10 - var/threatcount = 0 - var/obj/item/weapon/card/id/id = GetIdCard(H) //Agent cards lower threatlevel. - if(id && istype(id, /obj/item/weapon/card/id/syndicate)) - threatcount -= 2 - - if(check_weapons && !allowed(H)) - if(istype(H.l_hand, /obj/item/weapon/gun) || istype(H.l_hand, /obj/item/weapon/melee)) - threatcount += 4 - - if(istype(H.r_hand, /obj/item/weapon/gun) || istype(H.r_hand, /obj/item/weapon/melee)) - threatcount += 4 - - if(istype(H.belt, /obj/item/weapon/gun) || istype(H.belt, /obj/item/weapon/melee)) - threatcount += 2 - - if(H.species.name != "Human") - threatcount += 2 - - if(check_records || check_arrest) - var/perpname = H.name - if(id) - perpname = id.registered_name - - var/datum/data/record/R = find_security_record("name", perpname) - if(check_records && !R) - threatcount += 4 - - if(check_arrest && R && (R.fields["criminal"] == "*Arrest*")) - threatcount += 4 - - return threatcount + return H.assess_perp(src, check_weapons, check_records, check_arrest) /obj/machinery/porta_turret/proc/tryToShootAt(var/list/mob/living/targets) if(targets.len && last_target && (last_target in targets) && target(last_target)) @@ -587,17 +557,6 @@ invisibility = INVISIBILITY_LEVEL_TWO update_icon() - -/* -/obj/machinery/porta_turret/on_assess_perp(mob/living/carbon/human/perp) - if((check_access || attacked) && !allowed(perp)) - //if the turret has been attacked or is angry, target all non-authorized personnel, see req_access - return 10 - - return ..() - */ - - /obj/machinery/porta_turret/proc/target(var/mob/living/target) if(disabled) return @@ -613,7 +572,7 @@ /obj/machinery/porta_turret/proc/shootAt(var/mob/living/target) //any emagged turrets will shoot extremely fast! This not only is deadly, but drains a lot power! - if(!emagged) //if it hasn't been emagged, it has to obey a cooldown rate + if(!(emagged || attacked)) //if it hasn't been emagged or attacked, it has to obey a cooldown rate if(last_fired || !raised) //prevents rapid-fire shooting, unless it's been emagged return last_fired = 1 diff --git a/code/game/objects/items/robot/robot_upgrades.dm b/code/game/objects/items/robot/robot_upgrades.dm index 9930a6f2ea3..92798eb92e6 100644 --- a/code/game/objects/items/robot/robot_upgrades.dm +++ b/code/game/objects/items/robot/robot_upgrades.dm @@ -35,9 +35,6 @@ R.notify_ai(ROBOT_NOTIFICATION_MODULE_RESET, R.module.name) R.module.Reset(R) - qdel(R.module) - R.module = null - R.updatename("Default") return 1 diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm index 92d97e3d5d0..833524399d7 100644 --- a/code/game/objects/items/weapons/cards_ids.dm +++ b/code/game/objects/items/weapons/cards_ids.dm @@ -293,3 +293,11 @@ New() access = get_all_centcom_access() ..() + +/obj/item/weapon/card/id/centcom/ERT + name = "\improper Emergency Response Team ID" + assignment = "Emergency Response Team" + +/obj/item/weapon/card/id/centcom/ERT/New() + ..() + access += get_all_accesses() diff --git a/code/game/objects/items/weapons/storage/misc.dm b/code/game/objects/items/weapons/storage/misc.dm index 814ee3b12cd..65e1bfea37e 100644 --- a/code/game/objects/items/weapons/storage/misc.dm +++ b/code/game/objects/items/weapons/storage/misc.dm @@ -37,5 +37,4 @@ i++ /obj/item/weapon/storage/box/donut/empty - icon_state = "donutbox0" startswith = 0 diff --git a/code/modules/mob/living/bot/secbot.dm b/code/modules/mob/living/bot/secbot.dm index 9698021cbb4..eba380340f6 100644 --- a/code/modules/mob/living/bot/secbot.dm +++ b/code/modules/mob/living/bot/secbot.dm @@ -334,53 +334,13 @@ path = list() /mob/living/bot/secbot/proc/check_threat(var/mob/living/M) - if(M.stat == DEAD) + if(!M || !istype(M) || M.stat) return 0 + if(emagged) return 10 - var/threatcount = 0 - - if(ishuman(M)) - var/mob/living/carbon/human/H = M - - if(H.handcuffed) - return 0 - - var/obj/item/weapon/card/id/id = GetIdCard(H) //Agent cards lower threatlevel. - if(id && istype(id, /obj/item/weapon/card/id/syndicate)) - threatcount -= 2 - - if(idcheck && !access_scanner.allowed(H)) - if(istype(H.l_hand, /obj/item/weapon/gun) || istype(H.l_hand, /obj/item/weapon/melee)) - threatcount += 4 - - if(istype(H.r_hand, /obj/item/weapon/gun) || istype(H.r_hand, /obj/item/weapon/melee)) - threatcount += 4 - - if(istype(H.belt, /obj/item/weapon/gun) || istype(H.belt, /obj/item/weapon/melee)) - threatcount += 2 - - if(H.species.name != "Human") //beepsky so racist. - threatcount += 2 - - if(check_records || check_arrest) - var/perpname = H.name - if(id) - perpname = id.registered_name - - var/datum/data/record/R = find_security_record("name", perpname) - if(check_records && !R) - threatcount += 4 - - if(check_arrest && R && (R.fields["criminal"] == "*Arrest*")) - threatcount += 4 - - else if(isanimal(M)) - if(istype(M, /mob/living/simple_animal/hostile) && !istype(M, /mob/living/simple_animal/hostile/retaliate/goat)) - threatcount += 4 - - return threatcount + return M.assess_perp(access_scanner, idcheck, check_records, check_arrest) /mob/living/bot/secbot/proc/patrol_step() if(loc == patrol_target) diff --git a/code/modules/mob/living/carbon/give.dm b/code/modules/mob/living/carbon/give.dm index 107e660d39c..579321a5128 100644 --- a/code/modules/mob/living/carbon/give.dm +++ b/code/modules/mob/living/carbon/give.dm @@ -1,7 +1,7 @@ mob/living/carbon/verb/give(var/mob/living/carbon/target in view(1)-usr) set category = "IC" set name = "Give" - if(target.stat == 2 || usr.stat == 2|| target.client == null) + if(!istype(target) || target.stat == 2 || usr.stat == 2|| target.client == null) return var/obj/item/I if(!usr.hand && usr.r_hand == null) diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm index 69fa5cb5493..7959aa77c55 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules.dm @@ -36,27 +36,31 @@ var/global/list/robot_modules = list( // Bookkeeping var/list/added_languages = list() var/list/added_networks = list() - var/obj/item/device/radio/borg/modified_radio = null - var/list/modified_key = null - var/list/original_radio_channels = list() /obj/item/weapon/robot_module/New(var/mob/living/silicon/robot/R) ..() add_camera_networks(R) add_languages(R) - add_radio_channels(R) add_subsystems(R) apply_status_flags(R) + if(R.radio) + R.radio.recalculateChannels() + /obj/item/weapon/robot_module/proc/Reset(var/mob/living/silicon/robot/R) - ..() + R.module = null + remove_camera_networks(R) remove_languages(R) - remove_radio_channels(R) remove_subsystems(R) remove_status_flags(R) -/obj/item/weapon/robot_module/Destroy() + if(R.radio) + R.radio.recalculateChannels() + + qdel(src) + +/obj/item/weapon/robot_module/Destroy() qdel(modules) qdel(synths) qdel(emag) @@ -115,23 +119,6 @@ var/global/list/robot_modules = list( R.camera.remove_networks(added_networks) added_networks.Cut() -/obj/item/weapon/robot_module/proc/add_radio_channels(var/mob/living/silicon/robot/R) - if(!R.radio) - return - - modified_radio = R.radio - modified_key = R.radio.keyslot - original_radio_channels = modified_radio.channels.Copy() - modified_radio.config(channels) - -/obj/item/weapon/robot_module/proc/remove_radio_channels(var/mob/living/silicon/robot/R) - // Only reset if the original radio component hasn't been altered/replaced - if(!(R.radio && R.radio == modified_radio && R.radio.keyslot == modified_key)) - return - - modified_radio.config(original_radio_channels) - original_radio_channels.Cut() - /obj/item/weapon/robot_module/proc/add_subsystems(var/mob/living/silicon/robot/R) R.verbs |= subsystems diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 4138c1454b9..9275c4f3399 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -619,3 +619,61 @@ proc/is_blind(A) // Returns true if the mob has a client which has been active in the last given X minutes. /mob/proc/is_client_active(var/active = 1) return client && client.inactivity < active MINUTES + +#define SAFE_PERP -50 +/mob/living/proc/assess_perp(var/auth_weapons, var/check_records, var/check_arrest) + if(stat == DEAD) + return SAFE_PERP + + return 0 + +/mob/living/carbon/human/assess_perp(var/obj/access_obj, var/auth_weapons, var/check_records, var/check_arrest) + var/threatcount = ..() + if(. == SAFE_PERP) + return SAFE_PERP + + //Agent cards lower threatlevel. + var/obj/item/weapon/card/id/id = GetIdCard(src) + if(id && istype(id, /obj/item/weapon/card/id/syndicate)) + threatcount -= 2 + // A proper CentCom id is hard currency. + else if(id && istype(id, /obj/item/weapon/card/id/centcom)) + return SAFE_PERP + + if(auth_weapons && !access_obj.allowed(src)) + if(istype(l_hand, /obj/item/weapon/gun) || istype(l_hand, /obj/item/weapon/melee)) + threatcount += 4 + + if(istype(r_hand, /obj/item/weapon/gun) || istype(r_hand, /obj/item/weapon/melee)) + threatcount += 4 + + if(istype(belt, /obj/item/weapon/gun) || istype(belt, /obj/item/weapon/melee)) + threatcount += 2 + + if(species.name != "Human") + threatcount += 2 + + if(check_records || check_arrest) + var/perpname = name + if(id) + perpname = id.registered_name + + var/datum/data/record/R = find_security_record("name", perpname) + if(check_records && !R) + threatcount += 4 + + if(check_arrest && R && (R.fields["criminal"] == "*Arrest*")) + threatcount += 4 + + return threatcount + +/mob/living/simple_animal/hostile/assess_perp(var/obj/access_obj, var/auth_weapons, var/check_records, var/check_arrest) + var/threatcount = ..() + if(. == SAFE_PERP) + return SAFE_PERP + + if(!istype(src, /mob/living/simple_animal/hostile/retaliate/goat)) + threatcount += 4 + return threatcount + +#undef SAFE_PERP diff --git a/html/changelog.html b/html/changelog.html index f018353f082..60302614fed 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -56,6 +56,23 @@ -->
+

07 May 2015

+

HarpyEagle updated:

+ +

PsiOmegaDelta updated:

+ +

RavingManiac updated:

+ +

06 May 2015

PsiOmegaDelta updated: