diff --git a/.travis.yml b/.travis.yml
index 0c74f2f8a4..80e0a0bf21 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -5,7 +5,7 @@ sudo: false
env:
BYOND_MAJOR="508"
BYOND_MINOR="1293"
- MACRO_COUNT=1171
+ MACRO_COUNT=1154
cache:
directories:
diff --git a/code/__defines/chemistry.dm b/code/__defines/chemistry.dm
index 7091ea81d7..31bdcc9469 100644
--- a/code/__defines/chemistry.dm
+++ b/code/__defines/chemistry.dm
@@ -21,8 +21,9 @@
#define IS_VOX 2
#define IS_SKRELL 3
#define IS_UNATHI 4
-#define IS_XENOS 5
-#define IS_MACHINE 6
+#define IS_TAJARA 5
+#define IS_XENOS 6
+#define IS_MACHINE 7
#define CE_STABLE "stable" // Inaprovaline
#define CE_ANTIBIOTIC "antibiotic" // Spaceacilin
diff --git a/code/__defines/machinery.dm b/code/__defines/machinery.dm
index 13df4a5160..53929f0713 100644
--- a/code/__defines/machinery.dm
+++ b/code/__defines/machinery.dm
@@ -4,7 +4,7 @@ var/global/defer_powernet_rebuild = 0 // True if net rebuild will be called
// It's a conversion constant. power_used*CELLRATE = charge_provided, or charge_used/CELLRATE = power_provided
// Doors!
-#define DOOR_CRUSH_DAMAGE 10
+#define DOOR_CRUSH_DAMAGE 20
#define ALIEN_SELECT_AFK_BUFFER 1 // How many minutes that a person can be AFK before not being allowed to be an alien.
// Channel numbers for power.
@@ -26,9 +26,6 @@ var/global/defer_powernet_rebuild = 0 // True if net rebuild will be called
#define AI_CAMERA_LUMINOSITY 6
-// Those networks can only be accessed by pre-existing terminals. AIs and new terminals can't use them.
-var/list/restricted_camera_networks = list("thunder","ERT","NUKE","Secret")
-
// Camera networks
#define NETWORK_CRESCENT "Crescent"
#define NETWORK_CIVILIAN_EAST "Civilian East"
@@ -37,9 +34,10 @@ var/list/restricted_camera_networks = list("thunder","ERT","NUKE","Secret")
#define NETWORK_ENGINE "Engine"
#define NETWORK_ENGINEERING "Engineering"
#define NETWORK_ENGINEERING_OUTPOST "Engineering Outpost"
-#define NETWORK_ERT "ERT"
+#define NETWORK_ERT "ZeEmergencyResponseTeam"
#define NETWORK_EXODUS "Exodus"
#define NETWORK_MEDICAL "Medical"
+#define NETWORK_MERCENARY "MercurialNet"
#define NETWORK_MINE "MINE"
#define NETWORK_RESEARCH "Research"
#define NETWORK_RESEARCH_OUTPOST "Research Outpost"
@@ -47,7 +45,10 @@ var/list/restricted_camera_networks = list("thunder","ERT","NUKE","Secret")
#define NETWORK_PRISON "Prison"
#define NETWORK_SECURITY "Security"
#define NETWORK_TELECOM "Tcomsat"
-#define NETWORK_THUNDER "thunder"
+#define NETWORK_THUNDER "Thunderdome"
+
+// Those networks can only be accessed by pre-existing terminals. AIs and new terminals can't use them.
+var/list/restricted_camera_networks = list(NETWORK_ERT,NETWORK_MERCENARY,"Secret")
//singularity defines
diff --git a/code/_helpers/unsorted.dm b/code/_helpers/unsorted.dm
index e6bd820ada..986c8c448a 100644
--- a/code/_helpers/unsorted.dm
+++ b/code/_helpers/unsorted.dm
@@ -646,7 +646,7 @@ proc/GaussRandRound(var/sigma,var/roundto)
else return get_step(ref, base_dir)
-/proc/do_mob(var/mob/user, var/mob/target, var/delay, var/numticks = 5, var/needhand = 1) //This is quite an ugly solution but i refuse to use the old request system.
+/proc/do_mob(var/mob/user, var/mob/target, var/delay = 30, var/numticks = 5, var/needhand = 1) //This is quite an ugly solution but i refuse to use the old request system.
if(!user || !target) return 0
if(numticks == 0) return 0
diff --git a/code/game/antagonist/antagonist_print.dm b/code/game/antagonist/antagonist_print.dm
index c25ea20747..1fd3df90db 100644
--- a/code/game/antagonist/antagonist_print.dm
+++ b/code/game/antagonist/antagonist_print.dm
@@ -72,13 +72,26 @@
if(H && H.uplink_owner && H.uplink_owner == ply)
TC_uses += H.used_TC
uplink_true = 1
- var/list/refined_log = new()
- for(var/datum/uplink_item/UI in H.purchase_log)
- refined_log.Add("[H.purchase_log[UI]]x[UI.log_icon()][UI.name]")
- purchases = english_list(refined_log, nothing_text = "")
+ purchases += get_uplink_purchases(H)
if(uplink_true)
text += " (used [TC_uses] TC)"
if(purchases)
text += "
[purchases]"
- return text
\ No newline at end of file
+ return text
+
+/proc/print_ownerless_uplinks()
+ var/has_printed = 0
+ for(var/obj/item/device/uplink/H in world_uplinks)
+ if(isnull(H.uplink_owner) && H.used_TC)
+ if(!has_printed)
+ has_printed = 1
+ world << "Ownerless Uplinks"
+ world << "[H.loc] (used [H.used_TC] TC)"
+ world << get_uplink_purchases(H)
+
+/proc/get_uplink_purchases(var/obj/item/device/uplink/H)
+ var/list/refined_log = new()
+ for(var/datum/uplink_item/UI in H.purchase_log)
+ refined_log.Add("[H.purchase_log[UI]]x[UI.log_icon()][UI.name]")
+ . = english_list(refined_log, nothing_text = "")
diff --git a/code/game/antagonist/outsider/mercenary.dm b/code/game/antagonist/outsider/mercenary.dm
index f703818e47..7315eb418f 100644
--- a/code/game/antagonist/outsider/mercenary.dm
+++ b/code/game/antagonist/outsider/mercenary.dm
@@ -45,9 +45,7 @@ var/datum/antagonist/mercenary/mercs
player.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/pill/cyanide(player), slot_in_backpack)
if (player.mind == leader)
- var/obj/item/device/radio/uplink/U = new(player.loc)
- U.hidden_uplink.uplink_owner = player.mind
- U.hidden_uplink.uses = 40
+ var/obj/item/device/radio/uplink/U = new(player.loc, player.mind, 40)
player.put_in_hands(U)
player.update_icons()
diff --git a/code/game/atoms.dm b/code/game/atoms.dm
index 057b55750f..a660b6c589 100644
--- a/code/game/atoms.dm
+++ b/code/game/atoms.dm
@@ -415,7 +415,7 @@ its easier to just keep the beam vertical.
return
src.germ_level = 0
if(istype(blood_DNA, /list))
- del(blood_DNA)
+ blood_DNA.Cut()
return 1
diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm
index d869740f8b..412e9033d4 100644
--- a/code/game/gamemodes/game_mode.dm
+++ b/code/game/gamemodes/game_mode.dm
@@ -292,6 +292,8 @@ var/global/list/additional_antag_types = list()
sleep(10)
antag.check_victory()
antag.print_player_summary()
+ sleep(10)
+ print_ownerless_uplinks()
var/clients = 0
var/surviving_humans = 0
diff --git a/code/game/machinery/computer/camera.dm b/code/game/machinery/computer/camera.dm
index 4b8b9a9acf..3090e7ab7a 100644
--- a/code/game/machinery/computer/camera.dm
+++ b/code/game/machinery/computer/camera.dm
@@ -255,7 +255,7 @@
name = "head mounted camera monitor"
desc = "Used to access the built-in cameras in helmets."
icon_state = "syndicam"
- network = list("NUKE")
+ network = list(NETWORK_MERCENARY)
circuit = null
/obj/machinery/computer/security/nuclear/New()
diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm
index 5e39ed13d3..7d2a1bbe0f 100644
--- a/code/game/machinery/portable_turret.dm
+++ b/code/game/machinery/portable_turret.dm
@@ -413,7 +413,6 @@ var/list/turret_icons
/obj/machinery/porta_turret/ex_act(severity)
switch (severity)
if (1)
- del(src)
qdel(src)
if (2)
if (prob(25))
@@ -701,7 +700,7 @@ var/list/turret_icons
playsound(loc, 'sound/items/Crowbar.ogg', 75, 1)
user << "You dismantle the turret construction."
new /obj/item/stack/material/steel( loc, 5)
- qdel(src) // qdel
+ qdel(src)
return
if(1)
diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm
index ece1028cb6..9ee23b2fee 100644
--- a/code/game/objects/items/devices/PDA/PDA.dm
+++ b/code/game/objects/items/devices/PDA/PDA.dm
@@ -1042,7 +1042,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
/obj/item/device/pda/proc/new_message(var/sending_unit, var/sender, var/sender_job, var/message)
var/reception_message = "\icon[src] Message from [sender] ([sender_job]), \"[message]\" (Reply)"
- new_info(message_silent, newstone, reception_message)
+ new_info(message_silent, ttone, reception_message)
log_pda("[usr] (PDA: [sending_unit]) sent \"[message]\" to [name]")
new_message = 1
diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm
index e729fa3b09..21b6a0e720 100644
--- a/code/game/objects/items/devices/flashlight.dm
+++ b/code/game/objects/items/devices/flashlight.dm
@@ -138,7 +138,8 @@
name = "flare"
desc = "A red standard-issue flare. There are instructions on the side reading 'pull cord, make light'."
w_class = 2.0
- brightness_on = 7 // Pretty bright.
+ brightness_on = 8 // Pretty bright.
+ light_power = 3
light_color = "#e58775"
icon_state = "flare"
item_state = "flare"
diff --git a/code/game/objects/items/devices/spy_bug.dm b/code/game/objects/items/devices/spy_bug.dm
index d3b9d706d8..063e7a85ce 100644
--- a/code/game/objects/items/devices/spy_bug.dm
+++ b/code/game/objects/items/devices/spy_bug.dm
@@ -135,7 +135,7 @@
/obj/machinery/camera/spy
// These cheap toys are accessible from the mercenary camera console as well
- network = list("NUKE")
+ network = list(NETWORK_MERCENARY)
/obj/machinery/camera/spy/New()
..()
diff --git a/code/game/objects/items/devices/uplink.dm b/code/game/objects/items/devices/uplink.dm
index 2023c881a9..5675877d39 100644
--- a/code/game/objects/items/devices/uplink.dm
+++ b/code/game/objects/items/devices/uplink.dm
@@ -7,13 +7,13 @@ A list of items and costs is stored under the datum of every game mode, alongsid
*/
/obj/item/device/uplink
- var/welcome // Welcoming menu message
- var/uses // Numbers of crystals
- var/list/ItemsCategory // List of categories with lists of items
- var/list/ItemsReference // List of references with an associated item
- var/list/nanoui_items // List of items for NanoUI use
- var/nanoui_menu = 0 // The current menu we are in
- var/list/nanoui_data = new // Additional data for NanoUI use
+ var/welcome = "Welcome, Operative" // Welcoming menu message
+ var/uses // Numbers of crystals
+ var/list/ItemsCategory // List of categories with lists of items
+ var/list/ItemsReference // List of references with an associated item
+ var/list/nanoui_items // List of items for NanoUI use
+ var/nanoui_menu = 0 // The current menu we are in
+ var/list/nanoui_data = new // Additional data for NanoUI use
var/list/purchase_log = new
var/datum/mind/uplink_owner = null
@@ -22,11 +22,12 @@ A list of items and costs is stored under the datum of every game mode, alongsid
/obj/item/device/uplink/nano_host()
return loc
-/obj/item/device/uplink/New(var/location, var/datum/mind/owner)
+/obj/item/device/uplink/New(var/location, var/datum/mind/owner, var/telecrystals = DEFAULT_TELECRYSTAL_AMOUNT)
..()
src.uplink_owner = owner
purchase_log = list()
world_uplinks += src
+ uses = telecrystals
/obj/item/device/uplink/Destroy()
world_uplinks -= src
@@ -212,4 +213,4 @@ A list of items and costs is stored under the datum of every game mode, alongsid
/obj/item/device/radio/headset/uplink/New()
..()
hidden_uplink = new(src)
- hidden_uplink.uses = 10
+ hidden_uplink.uses = DEFAULT_TELECRYSTAL_AMOUNT
diff --git a/code/game/objects/items/weapons/storage/secure.dm b/code/game/objects/items/weapons/storage/secure.dm
index ebd76a64a5..8b11055d40 100644
--- a/code/game/objects/items/weapons/storage/secure.dm
+++ b/code/game/objects/items/weapons/storage/secure.dm
@@ -169,42 +169,6 @@
src.add_fingerprint(user)
return
- //I consider this worthless but it isn't my code so whatever. Remove or uncomment.
- /*attack(mob/M as mob, mob/living/user as mob)
- if ((CLUMSY in user.mutations) && prob(50))
- user << "The [src] slips out of your hand and hits your head."
- user.take_organ_damage(10)
- user.Paralyse(2)
- return
-
- M.attack_log += text("\[[time_stamp()]\] Has been attacked with [src.name] by [user.name] ([user.ckey])")
- user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to attack [M.name] ([M.ckey])")
-
- log_attack("[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])")
-
- var/t = user:zone_sel.selecting
- if (t == "head")
- if(ishuman(M))
- var/mob/living/carbon/human/H = M
- if (H.stat < 2 && H.health < 50 && prob(90))
- // ******* Check
- if (istype(H, /obj/item/clothing/head) && H.flags & 8 && prob(80))
- H << "The helmet protects you from being hit hard in the head!"
- return
- var/time = rand(2, 6)
- if (prob(75))
- H.Paralyse(time)
- else
- H.Stun(time)
- if(H.stat != 2) H.stat = 1
- for(var/mob/O in viewers(H, null))
- O.show_message(text("[] has been knocked unconscious!", H), 1, "You hear someone fall.", 2)
- else
- H << text("[] tried to knock you unconcious!",user)
- H.eye_blurry += 3
-
- return*/
-
// -----------------------------
// Secure Safe
// -----------------------------
diff --git a/code/modules/clothing/spacesuits/rig/suits/merc.dm b/code/modules/clothing/spacesuits/rig/suits/merc.dm
index 22add92014..1c69920300 100644
--- a/code/modules/clothing/spacesuits/rig/suits/merc.dm
+++ b/code/modules/clothing/spacesuits/rig/suits/merc.dm
@@ -1,6 +1,6 @@
/obj/item/clothing/head/helmet/space/rig/merc
light_overlay = "helmet_light_dual_green"
- camera_networks = list("NUKE")
+ camera_networks = list(NETWORK_MERCENARY)
/obj/item/weapon/rig/merc
name = "crimson hardsuit control module"
diff --git a/code/modules/clothing/spacesuits/void/merc.dm b/code/modules/clothing/spacesuits/void/merc.dm
index 481e536e74..5db4e882eb 100644
--- a/code/modules/clothing/spacesuits/void/merc.dm
+++ b/code/modules/clothing/spacesuits/void/merc.dm
@@ -7,7 +7,7 @@
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 35, bio = 100, rad = 60)
siemens_coefficient = 0.6
species_restricted = list("Human")
- camera_networks = list("NUKE")
+ camera_networks = list(NETWORK_MERCENARY)
light_overlay = "helmet_light_green" //todo: species-specific light overlays
/obj/item/clothing/suit/space/void/merc
diff --git a/code/modules/mining/abandonedcrates.dm b/code/modules/mining/abandonedcrates.dm
index 7fa2022d36..038591b735 100644
--- a/code/modules/mining/abandonedcrates.dm
+++ b/code/modules/mining/abandonedcrates.dm
@@ -16,6 +16,7 @@
for(var/i in 1 to codelen)
code += pick(digits)
+ digits -= code[code.len]
generate_loot()
@@ -166,7 +167,7 @@
user << "The crate's anti-tamper system activates!"
var/turf/T = get_turf(src.loc)
explosion(T, 0, 0, 1, 2)
- del(src)
+ qdel(src)
/obj/structure/closet/crate/secure/loot/emag_act(var/remaining_charges, var/mob/user)
if (locked)
diff --git a/code/modules/mob/living/bot/secbot.dm b/code/modules/mob/living/bot/secbot.dm
index 1820ee93ab..a6f479f704 100644
--- a/code/modules/mob/living/bot/secbot.dm
+++ b/code/modules/mob/living/bot/secbot.dm
@@ -183,6 +183,7 @@
if(!Adjacent(target))
awaiting_surrender = 5 // I'm done playing nice
mode = SECBOT_HUNT
+ return
var/threat = check_threat(target)
if(threat < 4)
target = null
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 13f7b640a7..91248854b9 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -696,6 +696,28 @@
number += 2
return number
+//Used by various things that knock people out by applying blunt trauma to the head.
+//Checks that the species has a "head" (brain containing organ) and that hit_zone refers to it.
+/mob/living/carbon/human/proc/headcheck(var/target_zone, var/brain_tag = "brain")
+ if(!species.has_organ[brain_tag])
+ return 0
+
+ var/obj/item/organ/affecting = internal_organs_by_name[brain_tag]
+
+ target_zone = check_zone(target_zone)
+ if(!affecting || affecting.parent_organ != target_zone)
+ return 0
+
+ //if the parent organ is significantly larger than the brain organ, then hitting it is not guaranteed
+ var/obj/item/organ/parent = get_organ(target_zone)
+ if(!parent)
+ return 0
+
+ if(parent.w_class > affecting.w_class + 1)
+ return prob(100 / 2**(parent.w_class - affecting.w_class - 1))
+
+ return 1
+
/mob/living/carbon/human/IsAdvancedToolUser(var/silent)
if(species.has_fine_manipulation)
return 1
diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm
index 1c7b158872..4a25b7ce29 100644
--- a/code/modules/mob/living/carbon/human/human_defense.dm
+++ b/code/modules/mob/living/carbon/human/human_defense.dm
@@ -219,29 +219,32 @@ emp_act
H.bloody_hands(src)
if(!stat)
+ if(headcheck(hit_area))
+ //Harder to score a stun but if you do it lasts a bit longer
+ if(prob(effective_force))
+ apply_effect(20, PARALYZE, armor)
+ visible_message("[src] [species.knockout_message]")
+ else
+ //Easier to score a stun but lasts less time
+ if(prob(effective_force + 10))
+ apply_effect(6, WEAKEN, armor)
+ visible_message("[src] has been knocked down!")
+
+ //Apply blood
+ if(bloody)
switch(hit_area)
- if("head")//Harder to score a stun but if you do it lasts a bit longer
- if(prob(effective_force))
- apply_effect(20, PARALYZE, armor)
- visible_message("\red [src] has been knocked unconscious!")
- if(bloody)//Apply blood
- if(wear_mask)
- wear_mask.add_blood(src)
- update_inv_wear_mask(0)
- if(head)
- head.add_blood(src)
- update_inv_head(0)
- if(glasses && prob(33))
- glasses.add_blood(src)
- update_inv_glasses(0)
-
- if("chest")//Easier to score a stun but lasts less time
- if(prob((effective_force + 10)))
- apply_effect(6, WEAKEN, armor)
- visible_message("\red [src] has been knocked down!")
-
- if(bloody)
- bloody_body(src)
+ if("head")
+ if(wear_mask)
+ wear_mask.add_blood(src)
+ update_inv_wear_mask(0)
+ if(head)
+ head.add_blood(src)
+ update_inv_head(0)
+ if(glasses && prob(33))
+ glasses.add_blood(src)
+ update_inv_glasses(0)
+ if("chest")
+ bloody_body(src)
if(Iforce > 10 || Iforce >= 5 && prob(33))
forcesay(hit_appends) //forcesay checks stat already
diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm
index 23907be861..e711fec2e3 100644
--- a/code/modules/mob/living/carbon/human/species/species.dm
+++ b/code/modules/mob/living/carbon/human/species/species.dm
@@ -66,6 +66,7 @@
var/dusted_anim = "dust-h"
var/death_sound
var/death_message = "seizes up and falls limp, their eyes dead and lifeless..."
+ var/knockout_message = "has been knocked unconscious!"
// Environment tolerance/life processes vars.
var/reagent_tag //Used for metabolizing reagents.
diff --git a/code/modules/mob/living/carbon/human/species/station/station.dm b/code/modules/mob/living/carbon/human/species/station/station.dm
index f34bc482af..e4c31a1447 100644
--- a/code/modules/mob/living/carbon/human/species/station/station.dm
+++ b/code/modules/mob/living/carbon/human/species/station/station.dm
@@ -279,6 +279,8 @@
brute_mod = 1.875 // 100% * 1.875 * 0.8 (robolimbs) ~= 150%
burn_mod = 1.875 // So they take 50% extra damage from brute/burn overall.
show_ssd = "flashing a 'system offline' glyph on their monitor"
+ death_message = "gives one shrill beep before falling lifeless."
+ knockout_message = "encounters a hardware fault and suddenly reboots!"
warning_low_pressure = 50
hazard_low_pressure = 0
diff --git a/code/modules/mob/living/carbon/resist.dm b/code/modules/mob/living/carbon/resist.dm
index a5ad3f5845..52363b1622 100644
--- a/code/modules/mob/living/carbon/resist.dm
+++ b/code/modules/mob/living/carbon/resist.dm
@@ -2,7 +2,7 @@
/mob/living/carbon/process_resist()
//drop && roll
- if(on_fire)
+ if(on_fire && !buckled)
fire_stacks -= 1.2
Weaken(3)
spin(32,2)
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index ab79044b19..d34d5cceea 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -573,21 +573,12 @@ default behaviour is:
set name = "Resist"
set category = "IC"
- if(can_resist())
+ if(!(stat || next_move > world.time))
setClickCooldown(20)
resist_grab()
- if(!weakened && !restrained())
+ if(!weakened)
process_resist()
-/mob/living/proc/can_resist()
- //need to allow !canmove, or otherwise neck grabs can't be resisted
- //similar thing with weakened and pinning
- if(stat)
- return 0
- if(!canClick())
- return 0
- return 1
-
/mob/living/proc/process_resist()
//Getting out of someone's inventory.
if(istype(src.loc, /obj/item/weapon/holder))
diff --git a/code/modules/mob/living/silicon/ai/malf.dm b/code/modules/mob/living/silicon/ai/malf.dm
index d86faeb3ea..adafb233fb 100644
--- a/code/modules/mob/living/silicon/ai/malf.dm
+++ b/code/modules/mob/living/silicon/ai/malf.dm
@@ -136,6 +136,5 @@
// Cleaner proc for creating powersupply for an AI.
/mob/living/silicon/ai/proc/create_powersupply()
if(psupply)
- del(psupply)
+ qdel(psupply)
psupply = new/obj/machinery/ai_powersupply(src)
-
diff --git a/code/modules/mob/living/simple_animal/borer/borer_captive.dm b/code/modules/mob/living/simple_animal/borer/borer_captive.dm
index e666f7ac71..45132f588e 100644
--- a/code/modules/mob/living/simple_animal/borer/borer_captive.dm
+++ b/code/modules/mob/living/simple_animal/borer/borer_captive.dm
@@ -34,9 +34,6 @@
/mob/living/captive_brain/emote(var/message)
return
-/mob/living/captive_brain/can_resist()
- return !(stat || !canClick())
-
/mob/living/captive_brain/process_resist()
//Resisting control by an alien mind.
if(istype(src.loc,/mob/living/simple_animal/borer))
diff --git a/code/modules/mob/mob_grab_specials.dm b/code/modules/mob/mob_grab_specials.dm
index a151b97aae..4f8bd02a13 100644
--- a/code/modules/mob/mob_grab_specials.dm
+++ b/code/modules/mob/mob_grab_specials.dm
@@ -91,15 +91,15 @@
var/damage = 20
var/obj/item/clothing/hat = attacker.head
if(istype(hat))
- damage += hat.force * 10
+ damage += hat.force * 3
var/armor = target.run_armor_check("head", "melee")
- target.apply_damage(damage*rand(90, 110)/100, BRUTE, "head", armor)
- attacker.apply_damage(10*rand(90, 110)/100, BRUTE, "head", attacker.run_armor_check("head", "melee"))
+ target.apply_damage(damage, BRUTE, "head", armor)
+ attacker.apply_damage(10, BRUTE, "head", attacker.run_armor_check("head", "melee"))
- if(!armor && prob(damage))
+ if(!armor && target.headcheck("head") && prob(damage))
target.apply_effect(20, PARALYZE)
- target.visible_message("[target] has been knocked unconscious!")
+ target.visible_message("[target] [target.species.knockout_message]")
playsound(attacker.loc, "swing_hit", 25, 1, -1)
attacker.attack_log += text("\[[time_stamp()]\] Headbutted [target.name] ([target.ckey])")
diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm
index e87e486ff3..647875ca4b 100644
--- a/code/modules/mob/mob_helpers.dm
+++ b/code/modules/mob/mob_helpers.dm
@@ -626,6 +626,12 @@ proc/is_blind(A)
return 0
+/mob/living/carbon/assess_perp(var/obj/access_obj, var/check_access, var/auth_weapons, var/check_records, var/check_arrest)
+ if(handcuffed)
+ return SAFE_PERP
+
+ return ..()
+
/mob/living/carbon/human/assess_perp(var/obj/access_obj, var/check_access, var/auth_weapons, var/check_records, var/check_arrest)
var/threatcount = ..()
if(. == SAFE_PERP)
diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm
index fd8e9a7833..1e2f7d1e52 100644
--- a/code/modules/organs/organ_external.dm
+++ b/code/modules/organs/organ_external.dm
@@ -270,7 +270,7 @@
owner.updatehealth() //droplimb will call updatehealth() again if it does end up being called
//If limb took enough damage, try to cut or tear it off
- if(owner && loc == owner)
+ if(owner && loc == owner && !is_stump())
if(!cannot_amputate && config.limbs_can_break && (brute_dam + burn_dam) >= (max_damage * config.organ_health_multiplier))
//organs can come off in three cases
//1. If the damage source is edge_eligible and the brute damage dealt exceeds the edge threshold, then the organ is cut off.
diff --git a/code/modules/organs/organ_stump.dm b/code/modules/organs/organ_stump.dm
index 0ab0e145a0..d59e747033 100644
--- a/code/modules/organs/organ_stump.dm
+++ b/code/modules/organs/organ_stump.dm
@@ -25,4 +25,4 @@
qdel(src)
/obj/item/organ/external/stump/is_usable()
- return 0
\ No newline at end of file
+ return 0
diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm
index 8b57003325..6d2e232eef 100644
--- a/code/modules/power/apc.dm
+++ b/code/modules/power/apc.dm
@@ -1148,7 +1148,7 @@ obj/machinery/power/apc/proc/autoset(var/val, var/on)
switch(severity)
if(1.0)
- //set_broken() //now Del() do what we need
+ //set_broken() //now qdel() do what we need
if (cell)
cell.ex_act(1.0) // more lags woohoo
qdel(src)
diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm
index 0d817d16b2..ba86ba1bb2 100644
--- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm
+++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm
@@ -32,17 +32,17 @@
return
..()
-/datum/reagent/nutriment/egg // Also bad for skrell. Not a child of protein because it might mess up, not sure.
+/datum/reagent/nutriment/protein/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
+ if(alien && alien == IS_SKRELL)
+ M.adjustToxLoss(2 * removed)
+ return
+ ..()
+
+/datum/reagent/nutriment/protein/egg // Also bad for skrell.
name = "egg yolk"
id = "egg"
color = "#FFFFAA"
-/datum/reagent/nutriment/egg/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
- if(alien && alien == IS_SKRELL)
- M.adjustToxLoss(0.5 * removed)
- return
- ..()
-
/datum/reagent/nutriment/honey
name = "Honey"
id = "honey"
@@ -570,19 +570,36 @@
adj_drowsy = -3
adj_sleepy = -2
adj_temp = 25
+ overdose = 45
glass_icon_state = "hot_coffee"
glass_name = "cup of coffee"
glass_desc = "Don't drop it, or you'll send scalding liquid and glass shards everywhere."
/datum/reagent/drink/coffee/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
- ..()
if(alien == IS_DIONA)
return
+ ..()
+ if(alien == IS_TAJARA)
+ M.adjustToxLoss(0.5 * removed)
+ M.make_jittery(4) //extra sensitive to caffine
if(adj_temp > 0)
holder.remove_reagent("frostoil", 10 * removed)
- if(dose > 45)
- M.make_jittery(5)
+
+/datum/reagent/nutriment/coffee/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
+ ..()
+ if(alien == IS_TAJARA)
+ M.adjustToxLoss(2 * removed)
+ M.make_jittery(4)
+ return
+
+/datum/reagent/drink/coffee/overdose(var/mob/living/carbon/M, var/alien)
+ if(alien == IS_DIONA)
+ return
+ if(alien == IS_TAJARA)
+ M.adjustToxLoss(4 * REM)
+ M.apply_effect(3, STUTTER)
+ M.make_jittery(5)
/datum/reagent/drink/coffee/icecoffee
name = "Iced Coffee"
@@ -1010,7 +1027,39 @@
glass_desc = "A crystal clear glass of Griffeater gin."
glass_center_of_mass = list("x"=16, "y"=12)
-/datum/reagent/ethanol/kahlua
+//Base type for alchoholic drinks containing coffee
+/datum/reagent/ethanol/coffee
+ overdose = 45
+
+/datum/reagent/ethanol/coffee/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
+ if(alien == IS_DIONA)
+ return
+ ..()
+ M.dizziness = max(0, M.dizziness - 5)
+ M.drowsyness = max(0, M.drowsyness - 3)
+ M.sleeping = max(0, M.sleeping - 2)
+ if(M.bodytemperature > 310)
+ M.bodytemperature = max(310, M.bodytemperature - (5 * TEMPERATURE_DAMAGE_COEFFICIENT))
+ if(alien == IS_TAJARA)
+ M.adjustToxLoss(0.5 * removed)
+ M.make_jittery(4) //extra sensitive to caffine
+
+/datum/reagent/ethanol/coffee/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
+ if(alien == IS_TAJARA)
+ M.adjustToxLoss(2 * removed)
+ M.make_jittery(4)
+ return
+ ..()
+
+/datum/reagent/ethanol/coffee/overdose(var/mob/living/carbon/M, var/alien)
+ if(alien == IS_DIONA)
+ return
+ if(alien == IS_TAJARA)
+ M.adjustToxLoss(4 * REM)
+ M.apply_effect(3, STUTTER)
+ M.make_jittery(5)
+
+/datum/reagent/ethanol/coffee/kahlua
name = "Kahlua"
id = "kahlua"
description = "A widely known, Mexican coffee-flavoured liqueur. In production since 1936!"
@@ -1022,17 +1071,6 @@
glass_desc = "DAMN, THIS THING LOOKS ROBUST"
glass_center_of_mass = list("x"=15, "y"=7)
-/datum/reagent/ethanol/kahlua/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
- ..()
- if(alien == IS_DIONA)
- return
- M.dizziness = max(0, M.dizziness - 5)
- M.drowsyness = max(0, M.drowsyness - 3)
- M.sleeping = max(0, M.sleeping - 2)
- if(M.bodytemperature > 310)
- M.bodytemperature = max(310, M.bodytemperature - (5 * TEMPERATURE_DAMAGE_COEFFICIENT))
- M.make_jittery(5)
-
/datum/reagent/ethanol/melonliquor
name = "Melon Liquor"
id = "melonliquor"
@@ -1246,7 +1284,7 @@
glass_desc = "We cannot take legal responsibility for your actions after imbibing."
glass_center_of_mass = list("x"=15, "y"=7)
-/datum/reagent/ethanol/b52
+/datum/reagent/ethanol/coffee/b52
name = "B-52"
id = "b52"
description = "Coffee, Irish Cream, and cognac. You will get bombed."
@@ -1357,7 +1395,7 @@
glass_name = "glass of Booger"
glass_desc = "Ewww..."
-/datum/reagent/ethanol/brave_bull
+/datum/reagent/ethanol/coffee/brave_bull
name = "Brave Bull"
id = "bravebull"
description = "It's just as effective as Dutch-Courage!"
@@ -1566,7 +1604,7 @@
glass_desc = "An irish car bomb."
glass_center_of_mass = list("x"=16, "y"=8)
-/datum/reagent/ethanol/irishcoffee
+/datum/reagent/ethanol/coffee/irishcoffee
name = "Irish Coffee"
id = "irishcoffee"
description = "Coffee, and alcohol. More fun than a Mimosa to drink in the morning."
diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm
index 8817db3618..f55eb57f58 100644
--- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm
+++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm
@@ -420,19 +420,19 @@
return
M.druggy = max(M.druggy, 30)
if(dose < 1)
- M.stuttering = max(M.stuttering, 3)
+ M.apply_effect(3, STUTTER)
M.make_dizzy(5)
if(prob(10))
M.emote(pick("twitch", "giggle"))
else if(dose < 2)
- M.stuttering = max(M.stuttering, 3)
+ M.apply_effect(3, STUTTER)
M.make_jittery(10)
M.make_dizzy(10)
M.druggy = max(M.druggy, 35)
if(prob(20))
M.emote(pick("twitch","giggle"))
else
- M.stuttering = max(M.stuttering, 3)
+ M.apply_effect(3, STUTTER)
M.make_jittery(20)
M.make_dizzy(20)
M.druggy = max(M.druggy, 40)
diff --git a/code/modules/reagents/reagent_containers/food/drinks/bottle.dm b/code/modules/reagents/reagent_containers/food/drinks/bottle.dm
index fdaf407fa3..3d832bf6a2 100644
--- a/code/modules/reagents/reagent_containers/food/drinks/bottle.dm
+++ b/code/modules/reagents/reagent_containers/food/drinks/bottle.dm
@@ -124,7 +124,7 @@
if(user.a_intent != I_HURT || !isGlass)
return ..()
- var/obj/item/organ/external/affecting = user.zone_sel.selecting //Find what the player is aiming at
+ var/affecting = user.zone_sel.selecting //Find what the player is aiming at
var/armor_block = 0 //Get the target's armour values for normal attack damage.
var/armor_duration = 0 //The more force the bottle has, the longer the duration.
@@ -140,12 +140,11 @@
// You are going to knock someone out for longer if they are not wearing a helmet.
var/do_smash = smash_check(1) //won't always break on the first hit
- if(affecting == "head" && istype(target, /mob/living/carbon/) && do_smash)
-
+ var/mob/living/carbon/human/H = target
+ if(do_smash && istype(H) && H.headcheck(affecting))
//Display an attack message.
- for(var/mob/O in viewers(user, null))
- if(target != user) O.show_message(text("\red [target] has been hit over the head with a bottle of [src.name], by [user]!"), 1)
- else O.show_message(text("\red [target] hit \himself with a bottle of [src.name] on the head!"), 1)
+ var/obj/item/organ/O = H.get_organ(affecting)
+ user.visible_message("[user] smashes [src] into [H]'s [O.name]!")
//Weaken the target for the duration that we calculated and divide it by 5.
if(armor_duration)
target.apply_effect(min(armor_duration, 5) , WEAKEN, armor_block) // Never weaken more than a flash!
diff --git a/html/changelog.html b/html/changelog.html
index afa21cd997..8e9a697fd4 100644
--- a/html/changelog.html
+++ b/html/changelog.html
@@ -56,11 +56,23 @@
-->