diff --git a/.travis.yml b/.travis.yml
index 043755d6b9..566778c4c8 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -5,7 +5,7 @@ sudo: false
env:
BYOND_MAJOR="509"
BYOND_MINOR="1318"
- MACRO_COUNT=1004
+ MACRO_COUNT=996
cache:
directories:
diff --git a/code/__defines/damage_organs.dm b/code/__defines/damage_organs.dm
index 152e22a11a..124be53452 100644
--- a/code/__defines/damage_organs.dm
+++ b/code/__defines/damage_organs.dm
@@ -35,18 +35,20 @@
#define ORGAN_BLEEDING (1<<1)
#define ORGAN_BROKEN (1<<2)
#define ORGAN_DESTROYED (1<<3)
-#define ORGAN_ROBOT (1<<4)
-#define ORGAN_SPLINTED (1<<5)
-#define ORGAN_DEAD (1<<6)
-#define ORGAN_MUTATED (1<<7)
-#define ORGAN_ASSISTED (1<<8)
+#define ORGAN_SPLINTED (1<<4)
+#define ORGAN_DEAD (1<<5)
+#define ORGAN_MUTATED (1<<6)
#define DROPLIMB_EDGE 0
#define DROPLIMB_BLUNT 1
#define DROPLIMB_BURN 2
// Damage above this value must be repaired with surgery.
-#define ROBOLIMB_SELF_REPAIR_CAP 30
+#define ROBOLIMB_REPAIR_CAP 30
+
+#define ORGAN_ASSISTED 1 // Like pacemakers, not robotic
+#define ORGAN_ROBOT 2 // Fully robotic, no organic parts
+#define ORGAN_LIFELIKE 3 // Robotic, made to appear organic
//Germs and infections.
#define GERM_LEVEL_AMBIENT 110 // Maximum germ level you can reach by standing still.
diff --git a/code/__defines/misc.dm b/code/__defines/misc.dm
index 3441f5ce2a..4a84b66083 100644
--- a/code/__defines/misc.dm
+++ b/code/__defines/misc.dm
@@ -38,24 +38,37 @@
#define LIFE_HUD 10 // STATUS_HUD that only reports dead or alive
//some colors
-#define COLOR_WHITE "#FFFFFF"
-#define COLOR_SILVER "#C0C0C0"
-#define COLOR_GRAY "#808080"
-#define COLOR_BLACK "#000000"
-#define COLOR_RED "#FF0000"
-#define COLOR_MAROON "#800000"
-#define COLOR_YELLOW "#FFFF00"
-#define COLOR_OLIVE "#808000"
-#define COLOR_LIME "#00FF00"
-#define COLOR_GREEN "#008000"
-#define COLOR_CYAN "#00FFFF"
-#define COLOR_TEAL "#008080"
-#define COLOR_BLUE "#0000FF"
-#define COLOR_NAVY "#000080"
-#define COLOR_PINK "#FF00FF"
-#define COLOR_PURPLE "#800080"
-#define COLOR_ORANGE "#FF9900"
-#define COLOR_LUMINOL "#66FFFF"
+#define COLOR_WHITE "#FFFFFF"
+#define COLOR_SILVER "#C0C0C0"
+#define COLOR_GRAY "#808080"
+#define COLOR_BLACK "#000000"
+#define COLOR_RED "#FF0000"
+#define COLOR_MAROON "#800000"
+#define COLOR_YELLOW "#FFFF00"
+#define COLOR_OLIVE "#808000"
+#define COLOR_LIME "#00FF00"
+#define COLOR_GREEN "#008000"
+#define COLOR_CYAN "#00FFFF"
+#define COLOR_TEAL "#008080"
+#define COLOR_BLUE "#0000FF"
+#define COLOR_NAVY "#000080"
+#define COLOR_PINK "#FF00FF"
+#define COLOR_PURPLE "#800080"
+#define COLOR_ORANGE "#FF9900"
+#define COLOR_LUMINOL "#66FFFF"
+#define COLOR_BEIGE "#CEB689"
+#define COLOR_BLUE_GRAY "#6A97B0"
+#define COLOR_BROWN "#B19664"
+#define COLOR_DARK_BROWN "#917448"
+#define COLOR_DARK_ORANGE "#B95A00"
+#define COLOR_GREEN_GRAY "#8DAF6A"
+#define COLOR_RED_GRAY "#AA5F61"
+#define COLOR_PALE_BLUE_GRAY "#8BBBD5"
+#define COLOR_PALE_GREEN_GRAY "#AED18B"
+#define COLOR_PALE_RED_GRAY "#CC9090"
+#define COLOR_PALE_PURPLE_GRAY "#BDA2BA"
+#define COLOR_PURPLE_GRAY "#A2819E"
+
// Shuttles.
// These define the time taken for the shuttle to get to the space station, and the time before it leaves again.
@@ -143,19 +156,6 @@
#define PROJECTILE_CONTINUE -1 //if the projectile should continue flying after calling bullet_act()
#define PROJECTILE_FORCE_MISS -2 //if the projectile should treat the attack as a miss (suppresses attack and admin logs) - only applies to mobs.
-// Custom colors
-#define COLOR_BEIGE "#CEB689"
-#define COLOR_BLUE_GRAY "#6A97B0"
-#define COLOR_BROWN "#B19664"
-#define COLOR_DARK_BROWN "#917448"
-#define COLOR_DARK_ORANGE "#B95A00"
-#define COLOR_GREEN_GRAY "#8DAF6A"
-#define COLOR_RED_GRAY "#AA5F61"
-#define COLOR_PALE_BLUE_GRAY "#8BBBD5"
-#define COLOR_PALE_GREEN_GRAY "#AED18B"
-#define COLOR_PALE_RED_GRAY "#CC9090"
-#define COLOR_PALE_PURPLE_GRAY "#BDA2BA"
-#define COLOR_PURPLE_GRAY "#A2819E"
// Vending stuff
#define CAT_NORMAL 1
diff --git a/code/__defines/mobs.dm b/code/__defines/mobs.dm
index 8bac7f560c..68b313d9a1 100644
--- a/code/__defines/mobs.dm
+++ b/code/__defines/mobs.dm
@@ -13,7 +13,6 @@
#define GODMODE 0x1000
#define FAKEDEATH 0x2000 // Replaces stuff like changeling.changeling_fakedeath.
#define DISFIGURED 0x4000 // Set but never checked. Remove this sometime and replace occurences with the appropriate organ code
-#define XENO_HOST 0x8000 // Tracks whether we're gonna be a baby alien's mummy.
// Grab levels.
#define GRAB_PASSIVE 1
@@ -27,11 +26,11 @@
#define BORGXRAY 0x4
#define BORGMATERIAL 8
-#define HOSTILE_STANCE_IDLE 1
-#define HOSTILE_STANCE_ALERT 2
-#define HOSTILE_STANCE_ATTACK 3
-#define HOSTILE_STANCE_ATTACKING 4
-#define HOSTILE_STANCE_TIRED 5
+#define STANCE_IDLE 1
+#define STANCE_ALERT 2
+#define STANCE_ATTACK 3
+#define STANCE_ATTACKING 4
+#define STANCE_TIRED 5
#define LEFT 1
#define RIGHT 2
@@ -186,4 +185,9 @@
#define MOB_PULL_NONE 0
#define MOB_PULL_SMALLER 1
#define MOB_PULL_SAME 2
-#define MOB_PULL_LARGER 3
\ No newline at end of file
+#define MOB_PULL_LARGER 3
+
+//XENOBIO2 FLAGS
+#define NOMUT 0
+#define COLORMUT 1
+#define SPECIESMUT 2
diff --git a/code/__defines/research.dm b/code/__defines/research.dm
index d40722d0cf..9c3bec3066 100644
--- a/code/__defines/research.dm
+++ b/code/__defines/research.dm
@@ -12,7 +12,8 @@
#define TECH_ILLEGAL "syndicate"
#define TECH_ARCANE "arcane"
-#define IMPRINTER 0x1 //For circuits. Uses glass/chemicals.
-#define PROTOLATHE 0x2 //New stuff. Uses glass/metal/chemicals
-#define MECHFAB 0x4 //Mechfab
-#define CHASSIS 0x8 //For protolathe, but differently
+#define IMPRINTER 0x0001 //For circuits. Uses glass/chemicals.
+#define PROTOLATHE 0x0002 //New stuff. Uses glass/metal/chemicals
+#define MECHFAB 0x0004 //Mechfab
+#define CHASSIS 0x0008 //For protolathe, but differently
+#define PROSFAB 0x0010 //For prosthetics fab
\ No newline at end of file
diff --git a/code/_helpers/_global_objects.dm b/code/_helpers/_global_objects.dm
new file mode 100644
index 0000000000..4cbbcf3314
--- /dev/null
+++ b/code/_helpers/_global_objects.dm
@@ -0,0 +1 @@
+var/datum/gear_tweak/color/gear_tweak_free_color_choice = new()
\ No newline at end of file
diff --git a/code/_helpers/game.dm b/code/_helpers/game.dm
index 06b277257f..57ff4b7013 100644
--- a/code/_helpers/game.dm
+++ b/code/_helpers/game.dm
@@ -248,6 +248,34 @@
. |= M // Since we're already looping through mobs, why bother using |= ? This only slows things down.
return .
+/proc/get_mobs_and_objs_in_view_fast(var/turf/T, var/range, var/checkghosts = 1)
+
+ var/list/mobs = list()
+ var/list/objs = list()
+
+ var/list/hear = dview(range,T,INVISIBILITY_MAXIMUM)
+ var/list/hearturfs = list()
+
+ for(var/atom/movable/AM in hear)
+ if(ismob(AM))
+ mobs += AM
+ hearturfs += AM.locs[1]
+ else if(isobj(AM))
+ objs += AM
+ hearturfs += AM.locs[1]
+
+
+ for(var/mob/M in player_list)
+ if(checkghosts && M.stat == DEAD && M.is_preference_enabled(/datum/client_preference/ghost_ears))
+ mobs |= M
+ continue
+ if(M.loc && M.locs[1] in hearturfs)
+ mobs |= M
+
+ return list("mobs" = mobs, "objs" = objs)
+
+
+
#define SIGN(X) ((X<0)?-1:1)
proc
diff --git a/code/_helpers/global_lists.dm b/code/_helpers/global_lists.dm
index f00e97d484..1a1eced63a 100644
--- a/code/_helpers/global_lists.dm
+++ b/code/_helpers/global_lists.dm
@@ -33,6 +33,8 @@ var/global/list/language_keys[0] // Table of say codes for all languages
var/global/list/whitelisted_species = list("Human") // Species that require a whitelist check.
var/global/list/playable_species = list("Human") // A list of ALL playable species, whitelisted, latejoin or otherwise.
+var/list/mannequins_
+
// Posters
var/global/list/poster_designs = list()
@@ -49,45 +51,7 @@ var/global/list/facial_hair_styles_male_list = list()
var/global/list/facial_hair_styles_female_list = list()
var/global/list/skin_styles_female_list = list() //unused
//Underwear
-var/global/list/underwear_top_t = list(
- "Bra, Red" = "t1", "Bra, White" = "t2", "Bra, Yellow" = "t3", "Bra, Blue" = "t4", "Bra, Black" = "t5", "Lacy Bra" = "t6", "Sports Bra, Black" = "t7", "Sports Bra, White" = "t8",
- "Sports Bra Alt, Black" = "t9", "Sporta Bra Alt, White" = "t10", "Bra, Baby-Blue" = "t11", "Bra, Green" = "t12", "Bra, Pink" = "t13", "Bra, Violet" = "t14",
- "Lacy Bra Alt" = "t15", "Lacy Bra Alt, Violet" = "t16", "Halterneck Bra, Black" = "t17", "Halterneck Bra, Blue" = "t18", "Halterneck Bra, Green" = "t19", "Halterneck Bra, Purple" = "t20",
- "Halterneck Bra, Red" = "t21", "Halterneck Bra, Teal" = "t22", "Halterneck Bra, Violet" = "t23", "Halterneck Bra, White" = "t24", "None")
-var/global/list/underwear_bottom_t = list(
- "Briefs, White" = "b1", "Briefs, Grey" = "b2", "Briefs, Green" = "b3", "Briefs, Blue" = "b4", "Briefs, Black" = "b5", "Boxers, Loveheart" = "b7", "Boxers, Black" = "b8",
- "Boxers, Grey" = "b9", "Boxers, Green & Blue Striped" = "b10", "Panties, Red" = "b11", "Panties, White" = "b12", "Panties, Yellow" = "b13", "Panties, Blue" = "b14",
- "Panties, Light-Black" = "b15", "Thong" = "b16", "Panties, Black" = "b17", "Panties Alt, White" = "b18", "Compression Shorts, Black" = "b19", "Compression Shorts, White" = "b20",
- "Compression Shorts, Baby-Blue" = "b21", "Panties, Green" = "b22", "Compression Shorts, Pink" = "b23", "Thong, Violet" = "b24", "Thong Alt" = "b25", "Thong Alt, Violet" = "b26",
- "Alt Thong, Black" = "b27", "Alt Thong, Blue" = "b28", "Alt Thong, Green" = "b29", "Alt Thong, Purple" = "b30", "Alt Thong, Red" = "b31", "Alt Thong, Teal" = "b32",
- "Alt Thong, Violet" = "b33", "Alt Thong, White" = "b34", "None")
- //undershirt
-var/global/list/undershirt_t = list(
- "White tank top" = "u1", "Black tank top" = "u2", "Black shirt" = "u3",
- "White shirt" = "u4", "White shirt 2" = "shirt_white_s", "White tank top 2" = "tank_white_s",
- "Black shirt 2" = "shirt_black_s", "Grey shirt" = "shirt_grey_s", "Heart shirt" = "lover_s",
- "I love NT shirt" = "ilovent_s", "White shortsleeve shirt" = "whiteshortsleeve_s", "Purple shortsleeve shirt" = "purpleshortsleeve_s",
- "Blue shortsleeve shirt" = "blueshortsleeve_s", "Green shortsleeve shirt" = "greenshortsleeve_s", "Black shortsleeve shirt" = "blackshortsleeve_s",
- "Blue shirt" = "blueshirt_s", "Red shirt" = "redshirt_s", "Yellow shirt" = "yellowshirt_s", "Green shirt" = "greenshirt_s",
- "Blue polo shirt" = "bluepolo_s", "Red polo shirt" = "redpolo_s", "White polo shirt" = "whitepolo_s",
- "Grey-yellow polo shirt" = "grayyellowpolo_s", "Fire tank top" = "tank_fire_s", "NT shirt" = "shirt_nano_s",
- "Blue shirt 2" = "shirt_blue_s", "Red shirt 2" = "shirt_red_s", "Red tank top" = "tank_red_s", "Green shirt 2" = "shirt_green_s",
- "Tiedye shirt" = "shirt_tiedye_s", "Green sport shirt" = "greenshirtsport_s", "Red sport shirt" = "redshirtsport_s",
- "Blue striped shirt" = "shirt_stripes_s", "Blue sport shirt" = "blueshirtsport_s", "None")
- //Socks
-var/global/list/socks_t = list(
- "White normal" = "white_norm", "White short" = "white_short", "White knee" = "white_knee",
- "White thigh" = "white_thigh", "Black normal" = "black_norm", "Black short" = "black_short",
- "Black knee" = "black_knee", "Black thigh" = "black_thigh", "Thin knee" = "thin_knee",
- "Thin thigh" = "thin_thigh", "Pantyhose" = "pantyhose", "Striped thigh" = "striped_thigh",
- "Striped knee" = "striped_knee", "Rainbow knee" = "rainbow_knee", "Rainbow thigh" = "rainbow_thigh",
- "Fishnets" = "fishnet", "Thin white thigh" = "thinwhite_thigh", "Thin white knee" = "thinwhite_knee",
- "Green striped thigh" = "gstriped_thigh", "Green striped knee" = "gstriped_knee",
- "Purple striped thigh" = "pstriped_thigh", "Purple striped knee" = "pstriped_knee",
- "Blue striped thigh" = "bstriped_thigh", "Blue striped knee" = "bstriped_knee",
- "Yellow striped thigh" = "ystriped_thigh", "Yellow striped knee" = "ystriped_knee",
- "Red striped thigh" = "rstriped_thigh", "Red striped knee" = "rstriped_knee",
- "Orange striped thigh" = "ostriped_thigh", "Orange striped knee" = "ostriped_knee", "None")
+var/datum/category_collection/underwear/global_underwear = new()
//Backpacks
var/global/list/backbaglist = list("Nothing", "Backpack", "Satchel", "Satchel Alt")
@@ -137,6 +101,14 @@ var/global/list/string_slot_flags = list(
"holster" = SLOT_HOLSTER
)
+/proc/get_mannequin(var/ckey)
+ if(!mannequins_)
+ mannequins_ = new()
+ . = mannequins_[ckey]
+ if(!.)
+ . = new/mob/living/carbon/human/dummy/mannequin()
+ mannequins_[ckey] = .
+
//////////////////////////
/////Initial Building/////
//////////////////////////
@@ -231,3 +203,5 @@ var/global/list/string_slot_flags = list(
. += " has: [t]\n"
world << .
*/
+//Hexidecimal numbers
+var/global/list/hexNums = list("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F")
diff --git a/code/_helpers/unsorted.dm b/code/_helpers/unsorted.dm
index b770693a69..0858ebc1a4 100644
--- a/code/_helpers/unsorted.dm
+++ b/code/_helpers/unsorted.dm
@@ -1039,10 +1039,9 @@ proc/get_mob_with_client_list()
//gets the turf the atom is located in (or itself, if it is a turf).
//returns null if the atom is not in a turf.
-/proc/get_turf(atom/A)
- if(!istype(A)) return
- for(A, A && !isturf(A), A=A.loc);
- return A
+/proc/get_turf(atom/movable/A)
+ if(isturf(A)) return A
+ if(A && A.locs.len) return A.locs[1]
/proc/get(atom/loc, type)
while(loc)
diff --git a/code/_macros.dm b/code/_macros.dm
index e8caac8345..801498d915 100644
--- a/code/_macros.dm
+++ b/code/_macros.dm
@@ -36,3 +36,7 @@
#define issilicon(A) istype(A, /mob/living/silicon)
#define isslime(A) istype(A, /mob/living/carbon/slime)
+
+#define isxeno(A) istype(A, /mob/living/simple_animal/xeno)
+
+#define RANDOM_BLOOD_TYPE pick(4;"O-", 36;"O+", 3;"A-", 28;"A+", 1;"B-", 20;"B+", 1;"AB-", 5;"AB+")
diff --git a/code/_onclick/hud/human.dm b/code/_onclick/hud/human.dm
index c631a3435d..3f872f53e6 100644
--- a/code/_onclick/hud/human.dm
+++ b/code/_onclick/hud/human.dm
@@ -388,10 +388,7 @@
f_style = "Shaved"
if(dna.species == "Human") //no more xenos losing ears/tentacles
h_style = pick("Bedhead", "Bedhead 2", "Bedhead 3")
- undershirt = null
- underwear_top = null
- underwear_bottom = null
- socks = null
+ all_underwear.Cut()
regenerate_icons()
/obj/screen/ling
diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm
index 093975051b..3c65b03f73 100644
--- a/code/_onclick/item_attack.dm
+++ b/code/_onclick/item_attack.dm
@@ -1,40 +1,59 @@
+/*
+=== Item Click Call Sequences ===
+These are the default click code call sequences used when clicking on stuff with an item.
+
+Atoms:
+
+mob/ClickOn() calls the item's resolve_attackby() proc.
+item/resolve_attackby() calls the target atom's attackby() proc.
+
+Mobs:
+
+mob/living/attackby() after checking for surgery, calls the item's attack() proc.
+item/attack() generates attack logs, sets click cooldown and calls the mob's attacked_with_item() proc. If you override this, consider whether you need to set a click cooldown, play attack animations, and generate logs yourself.
+mob/attacked_with_item() should then do mob-type specific stuff (like determining hit/miss, handling shields, etc) and then possibly call the item's apply_hit_effect() proc to actually apply the effects of being hit.
+
+Item Hit Effects:
+
+item/apply_hit_effect() can be overriden to do whatever you want. However "standard" physical damage based weapons should make use of the target mob's hit_with_weapon() proc to
+avoid code duplication. This includes items that may sometimes act as a standard weapon in addition to having other effects (e.g. stunbatons on harm intent).
+*/
// Called when the item is in the active hand, and clicked; alternately, there is an 'activate held object' verb or you can hit pagedown.
/obj/item/proc/attack_self(mob/user)
return
+//I would prefer to rename this to attack(), but that would involve touching hundreds of files.
+/obj/item/proc/resolve_attackby(atom/A, mob/user)
+ add_fingerprint(user)
+ return A.attackby(src, user)
+
// No comment
/atom/proc/attackby(obj/item/W, mob/user)
return
/atom/movable/attackby(obj/item/W, mob/user)
- if(!(W.flags&NOBLUDGEON))
+ if(!(W.flags & NOBLUDGEON))
visible_message("[src] has been hit by [user] with [W].")
/mob/living/attackby(obj/item/I, mob/user)
- user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
- if(istype(I) && ismob(user))
- I.attack(src, user)
-
+ if(!ismob(user))
+ return 0
+ if(can_operate(src) && do_surgery(src,user,I)) //Surgery
+ return 1
+ return I.attack(src, user, user.zone_sel.selecting)
// Proximity_flag is 1 if this afterattack was called on something adjacent, in your square, or on your person.
// Click parameters is the params string from byond Click() code, see that documentation.
/obj/item/proc/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
return
-//TODO: refactor mob attack code.
-/*
-Busy writing something else that I don't want to get mixed up in a general attack code, and I don't want to forget this so leaving a note here.
-leave attackby() as handling the general case of "using an item on a mob"
-attackby() will decide to call attacked_by() or not.
-attacked_by() will be made a living level proc and handle the specific case of "attacking with an item to cause harm"
-attacked_by() will then call attack() so that stunbatons and other weapons that have special attack effects can do their thing.
-attacked_by() will handle hitting/missing/logging as it does now, and will call attack() to apply the attack effects (damage) instead of the other way around (as it is now).
-*/
-
-/obj/item/proc/attack(mob/living/M as mob, mob/living/user as mob, def_zone)
-
- if(!istype(M) || (can_operate(M) && do_surgery(M,user,src))) return 0
+//I would prefer to rename this attack_as_weapon(), but that would involve touching hundreds of files.
+/obj/item/proc/attack(mob/living/M, mob/living/user, var/target_zone)
+ if(!force || (flags & NOBLUDGEON))
+ return 0
+ if(M == user && user.a_intent != I_HURT)
+ return 0
/////////////////////////
user.lastattacked = M
@@ -46,50 +65,22 @@ attacked_by() will handle hitting/missing/logging as it does now, and will call
msg_admin_attack("[key_name(user)] attacked [key_name(M)] with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])" )
/////////////////////////
- // Attacking someone with a weapon while they are neck-grabbed
- if(user.a_intent == I_HURT)
- for(var/obj/item/weapon/grab/G in M.grabbed_by)
- if(G.assailant == user && G.state >= GRAB_NECK)
- M.attack_throat(src, G, user)
+ user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
+ user.do_attack_animation(M)
+ var/hit_zone = M.resolve_item_attack(src, user, target_zone)
+ if(hit_zone)
+ apply_hit_effect(M, user, hit_zone)
+
+ return 1
+
+//Called when a weapon is used to make a successful melee attack on a mob. Returns the blocked result
+/obj/item/proc/apply_hit_effect(mob/living/target, mob/living/user, var/hit_zone)
+ if(hitsound)
+ playsound(loc, hitsound, 50, 1, -1)
+
var/power = force
if(HULK in user.mutations)
power *= 2
+ return target.hit_with_weapon(src, user, power, hit_zone)
- // TODO: needs to be refactored into a mob/living level attacked_by() proc. ~Z
- user.do_attack_animation(M)
- user.break_cloak()
- if(istype(M, /mob/living/carbon/human))
- var/mob/living/carbon/human/H = M
-
- // Handle striking to cripple.
- var/dislocation_str
- if(user.a_intent == I_DISARM)
- dislocation_str = H.attack_joint(src, user, def_zone)
- if(H.attacked_by(src, user, def_zone) && hitsound)
- playsound(loc, hitsound, 50, 1, -1)
- spawn(1) //ugh I hate this but I don't want to root through human attack procs to print it after this call resolves.
- if(dislocation_str) user.visible_message("[dislocation_str]")
- return 1
- return 0
- else
- if(attack_verb.len)
- user.visible_message("[M] has been [pick(attack_verb)] with [src] by [user]!")
- else
- user.visible_message("[M] has been attacked with [src] by [user]!")
-
- if (hitsound)
- playsound(loc, hitsound, 50, 1, -1)
- switch(damtype)
- if("brute")
- M.take_organ_damage(power)
- if(prob(33)) // Added blood for whacking non-humans too
- var/turf/simulated/location = get_turf(M)
- if(istype(location)) location.add_blood_floor(M)
- if("fire")
- if (!(COLD_RESISTANCE in M.mutations))
- M.take_organ_damage(0, power)
- M << "Aargh it burns!"
- M.updatehealth()
- add_fingerprint(user)
- return 1
diff --git a/code/controllers/verbs.dm b/code/controllers/verbs.dm
index bb7bf300d0..ee361c9888 100644
--- a/code/controllers/verbs.dm
+++ b/code/controllers/verbs.dm
@@ -25,7 +25,7 @@
usr.client.debug_variables(antag)
message_admins("Admin [key_name_admin(usr)] is debugging the [antag.role_text] template.")
-/client/proc/debug_controller(controller in list("Master","Ticker","Ticker Process","Air","Jobs","Sun","Radio","Supply","Shuttles","Emergency Shuttle","Configuration","pAI", "Cameras", "Transfer Controller", "Gas Data","Event","Plants","Alarm","Nano","Chemistry","Vote"))
+/client/proc/debug_controller(controller in list("Master","Ticker","Ticker Process","Air","Jobs","Sun","Radio","Supply","Shuttles","Emergency Shuttle","Configuration","pAI", "Cameras", "Transfer Controller", "Gas Data","Event","Plants","Alarm","Nano","Chemistry","Vote","Xenobio"))
set category = "Debug"
set name = "Debug Controller"
set desc = "Debug the various periodic loop controllers for the game (be careful!)"
@@ -95,5 +95,8 @@
if("Vote")
debug_variables(vote)
feedback_add_details("admin_verb", "DVote")
+ if("Xenobio")
+ debug_variables(xenobio_controller)
+ feedback_add_details("admin_verb", "DXenobio")
message_admins("Admin [key_name_admin(usr)] is debugging the [controller] controller.")
return
diff --git a/code/datums/browser.dm b/code/datums/browser.dm
index f5549fa1a8..577698532e 100644
--- a/code/datums/browser.dm
+++ b/code/datums/browser.dm
@@ -28,6 +28,9 @@
height = nheight
if (nref)
ref = nref
+ // If a client exists, but they have disabled fancy windowing, disable it!
+ if(user && user.client && !user.client.is_preference_enabled(/datum/client_preference/browser_style))
+ return
add_stylesheet("common", 'html/browser/common.css') // this CSS sheet is common to all UIs
/datum/browser/proc/set_title(ntitle)
@@ -178,4 +181,4 @@
if(src && src.mob)
//world << "[src] was [src.mob.machine], setting to null"
src.mob.unset_machine()
- return
\ No newline at end of file
+ return
diff --git a/code/datums/category.dm b/code/datums/category.dm
index 01cbc21386..3bc9640b79 100644
--- a/code/datums/category.dm
+++ b/code/datums/category.dm
@@ -2,17 +2,20 @@
* Category Collection *
**********************/
/datum/category_collection
- var/category_group_type // The type of categories to initialize
- var/list/datum/category_group/categories // The list of initialized categories
+ var/category_group_type // Type of categories to initialize
+ var/list/datum/category_group/categories // List of initialized categories
+ var/list/datum/category_group/categories_by_name // Associative list of initialized categories, keyed by name
/datum/category_collection/New()
..()
categories = new()
+ categories_by_name = new()
for(var/category_type in typesof(category_group_type))
var/datum/category_group/category = category_type
if(initial(category.name))
category = new category(src)
categories += category
+ categories_by_name[category.name] = category
categories = dd_sortedObjectList(categories)
/datum/category_collection/Destroy()
@@ -26,20 +29,23 @@
******************/
/datum/category_group
var/name = ""
- var/category_item_type // The type of items to initialize
- var/list/datum/category_item/items // The list of initialized items
- var/datum/category_collection/collection // The collection this group belongs to
+ var/category_item_type // Type of items to initialize
+ var/list/datum/category_item/items // List of initialized items
+ var/list/datum/category_item/items_by_name // Associative list of initialized items, by name
+ var/datum/category_collection/collection // The collection this group belongs to
/datum/category_group/New(var/datum/category_collection/cc)
..()
collection = cc
items = new()
+ items_by_name = new()
for(var/item_type in typesof(category_item_type))
var/datum/category_item/item = item_type
if(initial(item.name))
item = new item(src)
items += item
+ items_by_name[item.name] = item
// For whatever reason dd_insertObjectList(items, item) doesn't insert in the correct order
// If you change this, confirm that character setup doesn't become completely unordered.
diff --git a/code/datums/supplypacks.dm b/code/datums/supplypacks.dm
index 9d2f3e6f45..11c1fa87fc 100644
--- a/code/datums/supplypacks.dm
+++ b/code/datums/supplypacks.dm
@@ -618,6 +618,35 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
access = access_robotics
group = "Engineering"
+/datum/supply_packs/robolimbs_basic
+ name = "Basic robolimb blueprints"
+ contains = list(
+ /obj/item/weapon/disk/limb/morpheus,
+ /obj/item/weapon/disk/limb/xion
+ )
+ cost = 15
+ containertype = /obj/structure/closet/crate/secure/gear
+ containername = "Robolimb blueprints (basic)"
+ access = access_robotics
+ group = "Engineering"
+
+/datum/supply_packs/robolimbs_adv
+ name = "All robolimb blueprints"
+ contains = list(
+ /obj/item/weapon/disk/limb/bishop,
+ /obj/item/weapon/disk/limb/hesphiastos,
+ /obj/item/weapon/disk/limb/morpheus,
+ /obj/item/weapon/disk/limb/veymed,
+ /obj/item/weapon/disk/limb/wardtakahashi,
+ /obj/item/weapon/disk/limb/xion,
+ /obj/item/weapon/disk/limb/zenghu,
+ )
+ cost = 40
+ containertype = /obj/structure/closet/crate/secure/gear
+ containername = "Robolimb blueprints (adv)"
+ access = access_robotics
+ group = "Engineering"
+
/datum/supply_packs/phoron
name = "Phoron assembly crate"
contains = list(
@@ -1242,16 +1271,19 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/datum/supply_packs/carpet
name = "Imported carpet"
- containertype = /obj/structure/closet
+ containertype = /obj/structure/closet/crate
containername = "Imported carpet crate"
cost = 15
group = "Miscellaneous"
- contains = list(/obj/item/stack/tile/carpet)
+ contains = list(
+ /obj/item/stack/tile/carpet,
+ /obj/item/stack/tile/carpet/blue
+ )
amount = 50
/datum/supply_packs/linoleum
name = "Linoleum"
- containertype = /obj/structure/closet
+ containertype = /obj/structure/closet/crate
containername = "Linoleum crate"
cost = 15
group = "Miscellaneous"
diff --git a/code/datums/underwear/bottom.dm b/code/datums/underwear/bottom.dm
new file mode 100644
index 0000000000..7f91a18608
--- /dev/null
+++ b/code/datums/underwear/bottom.dm
@@ -0,0 +1,56 @@
+/datum/category_item/underwear/bottom/none
+ name = "None"
+ always_last = TRUE
+
+/datum/category_item/underwear/bottom/briefs
+ name = "Briefs"
+ icon_state = "briefs"
+ has_color = TRUE
+
+/datum/category_item/underwear/bottom/briefs/is_default(var/gender)
+ return gender != FEMALE
+
+/datum/category_item/underwear/bottom/boxers_loveheart
+ name = "Boxers, Loveheart"
+ icon_state = "boxers_loveheart"
+
+/datum/category_item/underwear/bottom/boxers
+ name = "Boxers"
+ icon_state = "boxers"
+ has_color = TRUE
+
+/datum/category_item/underwear/bottom/boxers_green_and_blue
+ name = "Boxers, green & blue striped"
+ icon_state = "boxers_green_and_blue"
+
+/datum/category_item/underwear/bottom/panties
+ name = "Panties"
+ icon_state = "panties"
+ has_color = TRUE
+
+/datum/category_item/underwear/bottom/panties/is_default(var/gender)
+ return gender == FEMALE
+
+/datum/category_item/underwear/bottom/lacy_thong
+ name = "Lacy thong"
+ icon_state = "lacy_thong"
+
+/datum/category_item/underwear/bottom/lacy_thong_alt
+ name = "Lacy thong, alt"
+ icon_state = "lacy_thong_alt"
+ has_color = TRUE
+
+/datum/category_item/underwear/bottom/panties_alt
+ name = "Panties, alt"
+ icon_state = "panties_alt"
+ has_color = TRUE
+
+/datum/category_item/underwear/bottom/compression_shorts
+ name = "Compression shorts"
+ icon_state = "compression_shorts"
+ has_color = TRUE
+
+/datum/category_item/underwear/bottom/thong
+ name = "Thong"
+ icon_state = "thong"
+ has_color = TRUE
\ No newline at end of file
diff --git a/code/datums/underwear/socks.dm b/code/datums/underwear/socks.dm
new file mode 100644
index 0000000000..fc1c96ce53
--- /dev/null
+++ b/code/datums/underwear/socks.dm
@@ -0,0 +1,59 @@
+/datum/category_item/underwear/socks/none
+ always_last = TRUE
+ name = "None"
+
+/datum/category_item/underwear/socks/normal
+ name = "Normal"
+ icon_state = "socks_norm"
+ has_color = TRUE
+
+/datum/category_item/underwear/socks/short
+ name = "Short"
+ icon_state = "socks_short"
+ has_color = TRUE
+
+/datum/category_item/underwear/socks/thigh
+ name = "Thigh"
+ icon_state = "socks_thigh"
+ has_color = TRUE
+
+/datum/category_item/underwear/socks/knee
+ name = "Knee"
+ icon_state = "socks_knee"
+ has_color = TRUE
+
+/datum/category_item/underwear/socks/striped_knee
+ name = "Knee, striped"
+ icon_state = "striped_knee"
+ has_color = TRUE
+
+/datum/category_item/underwear/socks/striped_thigh
+ name = "Thigh, striped"
+ icon_state = "striped_thigh"
+ has_color = TRUE
+
+/datum/category_item/underwear/socks/pantyhose
+ name = "Pantyhose"
+ icon_state = "pantyhose"
+
+/datum/category_item/underwear/socks/thin_thigh
+ name = "Thigh, thin"
+ icon_state = "thin_thigh"
+ has_color = TRUE
+
+/datum/category_item/underwear/socks/thin_knee
+ name = "Knee, thin"
+ icon_state = "thin_knee"
+ has_color = TRUE
+
+/datum/category_item/underwear/socks/rainbow_thigh
+ name = "Thigh, rainbow"
+ icon_state = "rainbow_thigh"
+
+/datum/category_item/underwear/socks/rainbow_knee
+ name = "Knee, rainbow"
+ icon_state = "rainbow_knee"
+
+/datum/category_item/underwear/socks/fishnet
+ name = "Fishnet"
+ icon_state = "fishnet"
\ No newline at end of file
diff --git a/code/datums/underwear/top.dm b/code/datums/underwear/top.dm
new file mode 100644
index 0000000000..8640e77da9
--- /dev/null
+++ b/code/datums/underwear/top.dm
@@ -0,0 +1,43 @@
+/datum/category_item/underwear/top/none
+ name = "None"
+ always_last = TRUE
+
+/datum/category_item/underwear/top/none/is_default(var/gender)
+ return gender != FEMALE
+
+/datum/category_item/underwear/top/bra
+ is_default = TRUE
+ name = "Bra"
+ icon_state = "bra"
+ has_color = TRUE
+
+/datum/category_item/underwear/top/bra/is_default(var/gender)
+ return gender == FEMALE
+
+/datum/category_item/underwear/top/sports_bra
+ name = "Sports bra"
+ icon_state = "sports_bra"
+ has_color = TRUE
+
+/datum/category_item/underwear/top/sports_bra_alt
+ name = "Sports bra, alt"
+ icon_state = "sports_bra_alt"
+ has_color = TRUE
+
+/datum/category_item/underwear/top/lacy_bra
+ name = "Lacy bra"
+ icon_state = "lacy_bra"
+
+/datum/category_item/underwear/top/lacy_bra_alt
+ name = "Lacy bra, alt"
+ icon_state = "lacy_bra_alt"
+ has_color = TRUE
+
+/datum/category_item/underwear/top/lacy_bra_alt_stripe
+ name = "Lacy bra, alt, stripe"
+ icon_state = "lacy_bra_alt_stripe"
+
+/datum/category_item/underwear/top/halterneck_bra
+ name = "Halterneck bra"
+ icon_state = "halterneck_bra"
+ has_color = TRUE
\ No newline at end of file
diff --git a/code/datums/underwear/undershirts.dm b/code/datums/underwear/undershirts.dm
new file mode 100644
index 0000000000..33886f997d
--- /dev/null
+++ b/code/datums/underwear/undershirts.dm
@@ -0,0 +1,65 @@
+/datum/category_item/underwear/undershirt/none
+ is_default = TRUE
+ name = "None"
+ always_last = TRUE
+
+/datum/category_item/underwear/undershirt/shirt
+ name = "Shirt"
+ icon_state = "undershirt"
+ has_color = TRUE
+
+/datum/category_item/underwear/undershirt/tank_top
+ name = "Tank top"
+ icon_state = "tanktop"
+ has_color = TRUE
+
+/datum/category_item/underwear/undershirt/tank_top_alt
+ name = "Tank top, alt"
+ icon_state = "tanktop_alt"
+ has_color = TRUE
+
+/datum/category_item/underwear/undershirt/tank_top_fire
+ name = "Tank top, fire"
+ icon_state = "tank_fire_s"
+
+/datum/category_item/underwear/undershirt/shirt_heart
+ name = "Shirt, heart"
+ icon_state = "lover_s"
+
+/datum/category_item/underwear/undershirt/shirt_nt
+ name = "Shirt, NT"
+ icon_state = "shirt_nano_s"
+
+/datum/category_item/underwear/undershirt/shirt_love_nt
+ name = "Shirt, I<3NT"
+ icon_state = "lover_s"
+
+/datum/category_item/underwear/undershirt/shortsleeve_shirt
+ name = "Shortsleeve shirt"
+ icon_state = "shortsleeve"
+ has_color = TRUE
+
+/datum/category_item/underwear/undershirt/polo_shirt
+ name = "Polo shirt"
+ icon_state = "polo"
+ has_color = TRUE
+
+/datum/category_item/underwear/undershirt/sport_shirt_green
+ name = "Sport shirt, green"
+ icon_state = "greenshirtsport_s"
+
+/datum/category_item/underwear/undershirt/sport_shirt_red
+ name = "Sport shirt, red"
+ icon_state = "redshirtsport_s"
+
+/datum/category_item/underwear/undershirt/sport_shirt_blue
+ name = "Sport shirt, blue"
+ icon_state = "blueshirtsport_s"
+
+/datum/category_item/underwear/undershirt/shirt_tiedye
+ name = "Shirt, tiedye"
+ icon_state = "shirt_tiedye_s"
+
+/datum/category_item/underwear/undershirt/shirt_blue_striped
+ name = "Shirt, blue stripes"
+ icon_state = "shirt_stripes_s"
\ No newline at end of file
diff --git a/code/datums/underwear/underwear.dm b/code/datums/underwear/underwear.dm
new file mode 100644
index 0000000000..d14ddea133
--- /dev/null
+++ b/code/datums/underwear/underwear.dm
@@ -0,0 +1,66 @@
+/****************************
+* Category Collection Setup *
+****************************/
+/datum/category_collection/underwear
+ category_group_type = /datum/category_group/underwear
+
+/*************
+* Categories *
+*************/
+/datum/category_group/underwear
+ var/sort_order // Lower sort order is applied as icons first
+
+datum/category_group/underwear/dd_SortValue()
+ return sort_order
+
+/datum/category_group/underwear/top
+ name = "Underwear, top"
+ sort_order = 1
+ category_item_type = /datum/category_item/underwear/top
+
+/datum/category_group/underwear/bottom
+ name = "Underwear, bottom"
+ sort_order = 2
+ category_item_type = /datum/category_item/underwear/bottom
+
+/datum/category_group/underwear/socks
+ name = "Socks"
+ sort_order = 3
+ category_item_type = /datum/category_item/underwear/socks
+
+/datum/category_group/underwear/undershirt
+ name = "Undershirt"
+ sort_order = 4 // Undershirts currently have the highest sort order because they may cover both underwear and socks.
+ category_item_type = /datum/category_item/underwear/undershirt
+
+/*******************
+* Category entries *
+*******************/
+/datum/category_item/underwear
+ var/always_last = FALSE // Should this entry be sorte last?
+ var/is_default = FALSE // Should this entry be considered the default for its type?
+ var/icon = 'icons/mob/human.dmi' // Which icon to get the underwear from
+ var/icon_state // And the particular item state
+ var/list/tweaks = list() // Underwear customizations.
+ var/has_color = FALSE
+
+/datum/category_item/underwear/New()
+ if(has_color)
+ tweaks += gear_tweak_free_color_choice
+
+/datum/category_item/underwear/dd_SortValue()
+ if(always_last)
+ return "~"+name
+ return name
+
+/datum/category_item/underwear/proc/is_default(var/gender)
+ return is_default
+
+/datum/category_item/underwear/proc/generate_image(var/list/metadata)
+ if(!icon_state)
+ return
+
+ var/image/I = image(icon = 'icons/mob/human.dmi', icon_state = icon_state)
+ for(var/datum/gear_tweak/gt in tweaks)
+ gt.tweak_item(I, metadata && metadata["[gt]"] ? metadata["[gt]"] : gt.get_default())
+ return I
\ No newline at end of file
diff --git a/code/game/antagonist/alien/borer.dm b/code/game/antagonist/alien/borer.dm
index 783055381c..7483fb508b 100644
--- a/code/game/antagonist/alien/borer.dm
+++ b/code/game/antagonist/alien/borer.dm
@@ -46,7 +46,7 @@ var/datum/antagonist/borer/borers
for(var/mob/living/carbon/human/H in mob_list)
if(H.stat != DEAD && !H.has_brain_worms())
var/obj/item/organ/external/head = H.get_organ(BP_HEAD)
- if(head && !(head.status & ORGAN_ROBOT))
+ if(head && !(head.robotic >= ORGAN_ROBOT))
host = H
break
if(istype(host))
diff --git a/code/game/antagonist/outsider/deathsquad.dm b/code/game/antagonist/outsider/deathsquad.dm
index 3a61152ab2..1234bdb1f6 100644
--- a/code/game/antagonist/outsider/deathsquad.dm
+++ b/code/game/antagonist/outsider/deathsquad.dm
@@ -70,7 +70,7 @@ var/datum/antagonist/deathsquad/deathsquad
var/syndicate_commando_name = pick(last_names)
var/datum/preferences/A = new() //Randomize appearance for the commando.
- A.randomize_appearance_for(player.current)
+ A.randomize_appearance_and_body_for(player.current)
player.name = "[syndicate_commando_rank] [syndicate_commando_name]"
player.current.name = player.name
diff --git a/code/game/antagonist/outsider/raider.dm b/code/game/antagonist/outsider/raider.dm
index 0a68becfd6..08a6e8644b 100644
--- a/code/game/antagonist/outsider/raider.dm
+++ b/code/game/antagonist/outsider/raider.dm
@@ -207,7 +207,7 @@ var/datum/antagonist/raider/raiders
player.equip_to_slot_or_del(new new_shoes(player),slot_shoes)
if(!player.shoes)
//If equipping shoes failed, fall back to equipping sandals
- var/fallback_type = pick(/obj/item/clothing/shoes/sandal, /obj/item/clothing/shoes/jackboots/unathi)
+ var/fallback_type = pick(/obj/item/clothing/shoes/sandal, /obj/item/clothing/shoes/jackboots/toeless)
player.equip_to_slot_or_del(new fallback_type(player), slot_shoes)
player.equip_to_slot_or_del(new new_uniform(player),slot_w_uniform)
diff --git a/code/game/gamemodes/changeling/powers/bioelectrogenesis.dm b/code/game/gamemodes/changeling/powers/bioelectrogenesis.dm
index dd1489248f..6dd22efab9 100644
--- a/code/game/gamemodes/changeling/powers/bioelectrogenesis.dm
+++ b/code/game/gamemodes/changeling/powers/bioelectrogenesis.dm
@@ -6,10 +6,10 @@
Shocking someone costs ten chemicals per use."
enhancedtext = "Shocking biologicals without grabbing only requires five chemicals, and has more disabling power."
genomecost = 2
- verbpath = /mob/proc/changeling_bioelectrogenesis
+ verbpath = /mob/living/carbon/human/proc/changeling_bioelectrogenesis
//Recharge whatever's in our hand, or shock people.
-/mob/proc/changeling_bioelectrogenesis()
+/mob/living/carbon/human/proc/changeling_bioelectrogenesis()
set category = "Changeling"
set name = "Bioelectrogenesis (20 + 10/shock)"
set desc = "Recharges anything in your hand, or shocks people."
@@ -33,19 +33,28 @@
return 0
else
+ // Handle glove conductivity.
+ var/obj/item/clothing/gloves/gloves = src.gloves
+ var/siemens = 1
+ if(gloves)
+ siemens = gloves.siemens_coefficient
+
//If we're grabbing someone, electrocute them.
if(istype(held_item,/obj/item/weapon/grab))
var/obj/item/weapon/grab/G = held_item
if(G.affecting)
- G.affecting.electrocute_act(10,src,1.0,BP_TORSO)
- var/agony = 80 //Does more than if hit with an electric hand, since grabbing is slower.
+ G.affecting.electrocute_act(10 * siemens,src,1.0,BP_TORSO)
+ var/agony = 80 * siemens //Does more than if hit with an electric hand, since grabbing is slower.
G.affecting.stun_effect_act(0, agony, BP_TORSO, src)
msg_admin_attack("[key_name(src)] shocked [key_name(G.affecting)] with the [src].")
- visible_message("Arcs of electricity strike [G.affecting]!",
- "Our hand channels raw electricity into [G.affecting].",
- "You hear sparks!")
+ if(siemens)
+ visible_message("Arcs of electricity strike [G.affecting]!",
+ "Our hand channels raw electricity into [G.affecting].",
+ "You hear sparks!")
+ else
+ src << "Our gloves block us from shocking \the [G.affecting]."
src.mind.changeling.chem_charges -= 10
return 1
@@ -69,17 +78,19 @@
"Our hand channels raw electricity into \the [held_item].",
"You hear sparks!")
var/i = 10
- while(i)
- cell.charge += 100 //This should be a nice compromise between recharging guns and other batteries.
- if(cell.charge > cell.maxcharge)
- cell.charge = cell.maxcharge
- break
- var/T = get_turf(src)
- new /obj/effect/effect/sparks(T)
- held_item.update_icon()
- i--
- sleep(1 SECOND)
- success = 1
+ if(siemens)
+ while(i)
+ cell.charge += 100 * siemens //This should be a nice compromise between recharging guns and other batteries.
+ if(cell.charge > cell.maxcharge)
+ cell.charge = cell.maxcharge
+ break
+ if(siemens)
+ var/T = get_turf(src)
+ new /obj/effect/effect/sparks(T)
+ held_item.update_icon()
+ i--
+ sleep(1 SECOND)
+ success = 1
if(success == 0) //If we couldn't do anything with the ability, don't deduct the chemicals.
src << "We are unable to affect \the [held_item]."
else
@@ -113,11 +124,18 @@
if(src)
qdel(src)
-/obj/item/weapon/electric_hand/afterattack(var/atom/target, var/mob/living/user, proximity)
+/obj/item/weapon/electric_hand/afterattack(var/atom/target, var/mob/living/carbon/human/user, proximity)
if(!target)
return
if(!proximity)
return
+
+ // Handle glove conductivity.
+ var/obj/item/clothing/gloves/gloves = user.gloves
+ var/siemens = 1
+ if(gloves)
+ siemens = gloves.siemens_coefficient
+
//Excuse the copypasta.
if(istype(target,/mob/living/carbon))
var/mob/living/carbon/C = target
@@ -126,14 +144,17 @@
src << "We require more chemicals to electrocute [C]!"
return 0
- C.electrocute_act(electrocute_amount,src,1.0,BP_TORSO)
- C.stun_effect_act(0, agony_amount, BP_TORSO, src)
+ C.electrocute_act(electrocute_amount * siemens,src,1.0,BP_TORSO)
+ C.stun_effect_act(0, agony_amount * siemens, BP_TORSO, src)
msg_admin_attack("[key_name(user)] shocked [key_name(C)] with the [src].")
- visible_message("Arcs of electricity strike [C]!",
- "Our hand channels raw electricity into [C]",
- "You hear sparks!")
+ if(siemens)
+ visible_message("Arcs of electricity strike [C]!",
+ "Our hand channels raw electricity into [C]",
+ "You hear sparks!")
+ else
+ src << "Our gloves block us from shocking \the [C]."
//qdel(src) //Since we're no longer a one hit stun, we need to stick around.
user.mind.changeling.chem_charges -= shock_cost
return 1
@@ -145,11 +166,12 @@
src << "We require more chemicals to electrocute [S]!"
return 0
- S.electrocute_act(60,src,1.0) //If only they had surge protectors.
- visible_message("Arcs of electricity strike [S]!",
- "Our hand channels raw electricity into [S]",
- "You hear sparks!")
- S << "Warning: Electrical surge detected!"
+ S.electrocute_act(60 * siemens,src,1.0) //If only they had surge protectors.
+ if(siemens)
+ visible_message("Arcs of electricity strike [S]!",
+ "Our hand channels raw electricity into [S]",
+ "You hear sparks!")
+ S << "Warning: Electrical surge detected!"
//qdel(src)
user.mind.changeling.chem_charges -= 10
return 1
@@ -164,20 +186,22 @@
"Our hand channels raw electricity into \the [target].",
"You hear sparks!")
var/i = 10
- while(i)
- cell.charge += 100 //This should be a nice compromise between recharging guns and other batteries.
- if(cell.charge > cell.maxcharge)
- cell.charge = cell.maxcharge
- break //No point making sparks if the cell's full.
-// if(!Adjacent(T))
-// break
- var/Turf = get_turf(src)
- new /obj/effect/effect/sparks(Turf)
- T.update_icon()
- i--
- sleep(1 SECOND)
- success = 1
- break
+ if(siemens)
+ while(i)
+ cell.charge += 100 * siemens //This should be a nice compromise between recharging guns and other batteries.
+ if(cell.charge > cell.maxcharge)
+ cell.charge = cell.maxcharge
+ break //No point making sparks if the cell's full.
+ // if(!Adjacent(T))
+ // break
+ if(siemens)
+ var/Turf = get_turf(src)
+ new /obj/effect/effect/sparks(Turf)
+ T.update_icon()
+ i--
+ sleep(1 SECOND)
+ success = 1
+ break
if(success == 0)
src << "We are unable to affect \the [target]."
else
diff --git a/code/game/gamemodes/changeling/powers/fake_death.dm b/code/game/gamemodes/changeling/powers/fake_death.dm
index 0018eabad6..ac7080301b 100644
--- a/code/game/gamemodes/changeling/powers/fake_death.dm
+++ b/code/game/gamemodes/changeling/powers/fake_death.dm
@@ -18,14 +18,13 @@
var/mob/living/carbon/C = src
if(changeling.max_geneticpoints < 0) //Absorbed by another ling
- src << "You have no genomes, not even your own, and cannot regenerate."
+ src << "We have no genomes, not even our own, and cannot regenerate."
return 0
- if(!C.stat && alert("Are we sure we wish to fake our death?",,"Yes","No") == "No")//Confirmation for living changelings if they want to fake their death
+ if(!C.stat && alert("Are we sure we wish to regenerate? We will appear to be dead while doing so.","Revival","Yes","No") == "No")
return
C << "We will attempt to regenerate our form."
- C.status_flags |= FAKEDEATH //play dead
C.update_canmove()
C.remove_changeling_powers()
@@ -33,13 +32,12 @@
C.suiciding = 0
if(C.stat != DEAD)
- C.emote("deathgasp")
- C.tod = worldtime2text()
+ C.adjustOxyLoss(C.maxHealth * 2)
spawn(rand(800,2000))
//The ling will now be able to choose when to revive
src.verbs += /mob/proc/changeling_revive
- src << "We are ready to rise. Use the Revive verb when you are ready."
+ src << "We are ready to rise. Use the Revive verb when you are ready."
feedback_add_details("changeling_powers","FD")
return 1
\ No newline at end of file
diff --git a/code/game/gamemodes/changeling/powers/revive.dm b/code/game/gamemodes/changeling/powers/revive.dm
index 4f53c95b46..79fd2dcf74 100644
--- a/code/game/gamemodes/changeling/powers/revive.dm
+++ b/code/game/gamemodes/changeling/powers/revive.dm
@@ -25,8 +25,6 @@
C.SetStunned(0)
C.SetWeakened(0)
C.radiation = 0
- C.halloss = 0
- C.shock_stage = 0 //Pain
C.heal_overall_damage(C.getBruteLoss(), C.getFireLoss())
C.reagents.clear_reagents()
C.restore_all_organs(ignore_prosthetic_prefs=1) //Covers things like fractures and other things not covered by the above.
@@ -36,8 +34,13 @@
H.mutations.Remove(HUSK)
H.status_flags -= DISFIGURED
H.update_body(1)
+ for(var/limb in H.organs_by_name)
+ var/obj/item/organ/external/current_limb = H.organs_by_name[limb]
+ current_limb.undislocate()
+
+ C.halloss = 0
+ C.shock_stage = 0 //Pain
C << "We have regenerated."
- C.status_flags &= ~FAKEDEATH
C.update_canmove()
C.mind.changeling.purchased_powers -= C
feedback_add_details("changeling_powers","CR")
diff --git a/code/game/gamemodes/cult/cult_items.dm b/code/game/gamemodes/cult/cult_items.dm
index 564fc4d004..1a0aa9e1c5 100644
--- a/code/game/gamemodes/cult/cult_items.dm
+++ b/code/game/gamemodes/cult/cult_items.dm
@@ -6,23 +6,35 @@
w_class = 4
force = 30
throwforce = 10
+ hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
/obj/item/weapon/melee/cultblade/cultify()
return
-/obj/item/weapon/melee/cultblade/attack(mob/living/target as mob, mob/living/carbon/human/user as mob)
+/obj/item/weapon/melee/cultblade/attack(mob/living/M, mob/living/user, var/target_zone)
if(iscultist(user))
- playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
return ..()
+
+ var/zone = (user.hand ? "l_arm":"r_arm")
+ if(ishuman(user))
+ var/mob/living/carbon/human/H = user
+ var/obj/item/organ/external/affecting = H.get_organ(zone)
+ user << "An unexplicable force rips through your [affecting.name], tearing the sword from your grasp!"
else
- user.Paralyse(5)
- user << "An unexplicable force powerfully repels the sword from [target]!"
- var/organ = ((user.hand ? "l_":"r_") + "arm")
- var/obj/item/organ/external/affecting = user.get_organ(organ)
- if(affecting.take_damage(rand(force/2, force))) //random amount of damage between half of the blade's force and the full force of the blade.
- user.UpdateDamageIcon()
- return
+ user << "An unexplicable force rips through you, tearing the sword from your grasp!"
+
+ //random amount of damage between half of the blade's force and the full force of the blade.
+ user.apply_damage(rand(force/2, force), BRUTE, zone, 0, sharp=1, edge=1)
+ user.Weaken(5)
+
+ user.drop_from_inventory(src, src.loc)
+ throw_at(get_edge_target_turf(src, pick(alldirs)), rand(1,3), throw_speed)
+
+ var/spooky = pick('sound/hallucinations/growl1.ogg', 'sound/hallucinations/growl2.ogg', 'sound/hallucinations/growl3.ogg', 'sound/hallucinations/wail.ogg')
+ playsound(loc, spooky, 50, 1)
+
+ return 1
/obj/item/weapon/melee/cultblade/pickup(mob/living/user as mob)
if(!iscultist(user))
diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm
index 37445326ca..3cb41cc872 100644
--- a/code/game/gamemodes/cult/runes.dm
+++ b/code/game/gamemodes/cult/runes.dm
@@ -470,8 +470,7 @@ var/list/sacrificed = list()
D.r_eyes = 200
D.g_eyes = 200
D.update_eyes()
- D.underwear_top = 0
- D.underwear_bottom = 0
+ D.all_underwear.Cut()
D.key = ghost.key
cult.add_antagonist(D.mind)
diff --git a/code/game/jobs/job/assistant.dm b/code/game/jobs/job/assistant.dm
index ff87fb58e4..5e2b40d952 100644
--- a/code/game/jobs/job/assistant.dm
+++ b/code/game/jobs/job/assistant.dm
@@ -13,21 +13,16 @@
minimal_access = list() //See /datum/job/assistant/get_access()
alt_titles = list("Technical Assistant","Medical Intern","Research Assistant","Visitor", "Resident")
-/datum/job/assistant/equip(var/mob/living/carbon/human/H)
+/datum/job/assistant/equip(var/mob/living/carbon/human/H, var/alt_title)
if(!H) return 0
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/norm(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
- if (H.mind.role_alt_title)
- switch(H.mind.role_alt_title)
- if("Visitor") //I doubt someone visiting the station would want to wear an ugly grey uniform
- H.equip_to_slot_or_del(new /obj/item/clothing/under/assistantformal(H), slot_w_uniform)
-
- if("Resident")
- H.equip_to_slot_or_del(new /obj/item/clothing/under/color/white(H), slot_w_uniform)
- else
- H.equip_to_slot_or_del(new /obj/item/clothing/under/color/grey(H), slot_w_uniform)
+ if(has_alt_title(H, alt_title,"Visitor")) //I doubt someone visiting the station would want to wear an ugly grey uniform
+ H.equip_to_slot_or_del(new /obj/item/clothing/under/assistantformal(H), slot_w_uniform)
+ else if(has_alt_title(H, alt_title,"Resident"))
+ H.equip_to_slot_or_del(new /obj/item/clothing/under/color/white(H), slot_w_uniform)
else
H.equip_to_slot_or_del(new /obj/item/clothing/under/color/grey(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
diff --git a/code/game/jobs/job/captain.dm b/code/game/jobs/job/captain.dm
index 015441f32f..69f837d8f9 100644
--- a/code/game/jobs/job/captain.dm
+++ b/code/game/jobs/job/captain.dm
@@ -30,10 +30,17 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/captain(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/cap(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
- var/obj/item/clothing/under/U = new /obj/item/clothing/under/rank/captain(H)
+ H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/captain(H), slot_w_uniform)
if(H.age>49)
- U.accessories += new /obj/item/clothing/accessory/medal/gold/captain(U)
- H.equip_to_slot_or_del(U, slot_w_uniform)
+ // Since we can have something other than the default uniform at this
+ // point, check if we can actually attach the medal
+ var/obj/item/clothing/uniform = H.w_uniform
+ var/obj/item/clothing/accessory/medal/gold/captain/medal = new()
+
+ if(uniform && uniform.can_attach_accessory(medal))
+ uniform.attach_accessory(null, medal)
+ else
+ qdel(medal)
H.equip_to_slot_or_del(new /obj/item/device/pda/captain(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/head/caphat(H), slot_head)
diff --git a/code/game/jobs/job/civilian_chaplain.dm b/code/game/jobs/job/civilian_chaplain.dm
index cf162c1494..61cba70023 100644
--- a/code/game/jobs/job/civilian_chaplain.dm
+++ b/code/game/jobs/job/civilian_chaplain.dm
@@ -14,7 +14,7 @@
alt_titles = list("Counselor")
- equip(var/mob/living/carbon/human/H)
+ equip(var/mob/living/carbon/human/H, var/alt_title, var/ask_questions = TRUE)
if(!H) return 0
var/obj/item/weapon/storage/bible/B = new /obj/item/weapon/storage/bible(H) //BS12 EDIT
@@ -22,6 +22,10 @@
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chaplain(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/pda/chaplain(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
+ if(!ask_questions)
+ return 1
+
+
spawn(0)
var/religion_name = "Christianity"
var/new_religion = sanitize(input(H, "You are the crew services officer. Would you like to change your religion? Default is Christianity, in SPACE.", "Name change", religion_name), MAX_NAME_LEN)
@@ -150,3 +154,6 @@
feedback_set_details("religion_deity","[new_deity]")
feedback_set_details("religion_book","[new_book_style]")
return 1
+
+/datum/job/chaplain/equip_preview(var/mob/living/carbon/human/H, var/alt_title)
+ return equip(H, alt_title, FALSE)
diff --git a/code/game/jobs/job/job.dm b/code/game/jobs/job/job.dm
index 2ae944adfd..6bdf3c1c4a 100644
--- a/code/game/jobs/job/job.dm
+++ b/code/game/jobs/job/job.dm
@@ -71,8 +71,8 @@
H << "Your account number is: [M.account_number], your account pin is: [M.remote_access_pin]"
// overrideable separately so AIs/borgs can have cardborg hats without unneccessary new()/del()
-/datum/job/proc/equip_preview(mob/living/carbon/human/H)
- return equip(H)
+/datum/job/proc/equip_preview(mob/living/carbon/human/H, var/alt_title)
+ . = equip(H, alt_title)
/datum/job/proc/get_access()
if(!config || config.jobs_have_minimal_access)
@@ -104,3 +104,6 @@
/datum/job/proc/is_position_available()
return (current_positions < total_positions) || (total_positions == -1)
+
+/datum/job/proc/has_alt_title(var/mob/H, var/supplied_title, var/desired_title)
+ return (supplied_title == desired_title) || (H.mind && H.mind.role_alt_title == desired_title)
\ No newline at end of file
diff --git a/code/game/jobs/job/medical.dm b/code/game/jobs/job/medical.dm
index 8a769df0b5..eeb0c8072a 100644
--- a/code/game/jobs/job/medical.dm
+++ b/code/game/jobs/job/medical.dm
@@ -23,7 +23,7 @@
minimal_player_age = 10
ideal_character_age = 50
- equip(var/mob/living/carbon/human/H)
+ equip(var/mob/living/carbon/human/H, var/alt_title)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/cmo(H), slot_l_ear)
switch(H.backbag)
@@ -53,7 +53,7 @@
minimal_access = list(access_medical, access_medical_equip, access_morgue, access_surgery, access_virology, access_eva)
alt_titles = list("Surgeon","Emergency Physician","Nurse","Virologist")
- equip(var/mob/living/carbon/human/H)
+ equip(var/mob/living/carbon/human/H, var/alt_title)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_med(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
@@ -62,35 +62,33 @@
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/medic(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/med(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
- if (H.mind.role_alt_title)
- switch(H.mind.role_alt_title)
- if("Emergency Physician")
- H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
- H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/fr_jacket(H), slot_wear_suit)
- if("Surgeon")
- H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical/blue(H), slot_w_uniform)
- H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat(H), slot_wear_suit)
- H.equip_to_slot_or_del(new /obj/item/clothing/head/surgery/blue(H), slot_head)
- if("Virologist")
- H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/virologist(H), slot_w_uniform)
- H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/virologist(H), slot_wear_suit)
- H.equip_to_slot_or_del(new /obj/item/clothing/mask/surgical(H), slot_wear_mask)
- switch(H.backbag)
- if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/virology(H), slot_back)
- if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/vir(H), slot_back)
- if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
- if("Medical Doctor")
- H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
- H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat(H), slot_wear_suit)
- if("Nurse")
- if(H.gender == FEMALE)
- if(prob(50))
- H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/nursesuit(H), slot_w_uniform)
- else
- H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/nurse(H), slot_w_uniform)
- H.equip_to_slot_or_del(new /obj/item/clothing/head/nursehat(H), slot_head)
- else
- H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical/purple(H), slot_w_uniform)
+ if(has_alt_title(H, alt_title,"Emergency Physician"))
+ H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
+ H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/fr_jacket(H), slot_wear_suit)
+ else if(has_alt_title(H, alt_title,"Surgeon"))
+ H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical/blue(H), slot_w_uniform)
+ H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat(H), slot_wear_suit)
+ H.equip_to_slot_or_del(new /obj/item/clothing/head/surgery/blue(H), slot_head)
+ else if(has_alt_title(H, alt_title,"Virologist"))
+ H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/virologist(H), slot_w_uniform)
+ H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/virologist(H), slot_wear_suit)
+ H.equip_to_slot_or_del(new /obj/item/clothing/mask/surgical(H), slot_wear_mask)
+ switch(H.backbag)
+ if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/virology(H), slot_back)
+ if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/vir(H), slot_back)
+ if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
+ else if(has_alt_title(H, alt_title,"Medical Doctor"))
+ H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
+ H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat(H), slot_wear_suit)
+ else if(has_alt_title(H, alt_title,"Nurse"))
+ if(H.gender == FEMALE)
+ if(prob(50))
+ H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/nursesuit(H), slot_w_uniform)
+ else
+ H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/nurse(H), slot_w_uniform)
+ H.equip_to_slot_or_del(new /obj/item/clothing/head/nursehat(H), slot_head)
+ else
+ H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical/purple(H), slot_w_uniform)
else
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat(H), slot_wear_suit)
@@ -176,19 +174,17 @@
minimal_access = list(access_medical, access_medical_equip, access_psychiatrist)
alt_titles = list("Psychologist")
- equip(var/mob/living/carbon/human/H)
+ equip(var/mob/living/carbon/human/H, var/alt_title)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_med(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/norm(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
- if (H.mind.role_alt_title)
- switch(H.mind.role_alt_title)
- if("Psychiatrist")
- H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/psych(H), slot_w_uniform)
- if("Psychologist")
- H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/psych/turtleneck(H), slot_w_uniform)
+ if(has_alt_title(H, alt_title,"Psychiatrist"))
+ H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/psych(H), slot_w_uniform)
+ else if(has_alt_title(H, alt_title,"Psychologist"))
+ H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/psych/turtleneck(H), slot_w_uniform)
else
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/laceup(H), slot_shoes)
@@ -211,7 +207,7 @@
minimal_access = list(access_medical, access_medical_equip, access_morgue, access_eva, access_maint_tunnels, access_external_airlocks)
alt_titles = list("Emergency Medical Technician")
- equip(var/mob/living/carbon/human/H)
+ equip(var/mob/living/carbon/human/H, var/alt_title)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_med(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/jackboots(H), slot_shoes)
@@ -220,14 +216,12 @@
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/medic(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel/med(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
- if (H.mind.role_alt_title)
- switch(H.mind.role_alt_title)
- if("Emergency Medical Technician")
- H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical/paramedic(H), slot_w_uniform)
- H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/fr_jacket(H), slot_wear_suit)
- if("Paramedic")
- H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical/black(H), slot_w_uniform)
- H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/fr_jacket(H), slot_wear_suit)
+ if(has_alt_title(H, alt_title,"Emergency Medical Technician"))
+ H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical/paramedic(H), slot_w_uniform)
+ H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/fr_jacket(H), slot_wear_suit)
+ else if(has_alt_title(H, alt_title,"Paramedic"))
+ H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical/black(H), slot_w_uniform)
+ H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/fr_jacket(H), slot_wear_suit)
else
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/medical/emt(H), slot_belt)
diff --git a/code/game/jobs/job/security.dm b/code/game/jobs/job/security.dm
index dfb3659e0d..6320a475ce 100644
--- a/code/game/jobs/job/security.dm
+++ b/code/game/jobs/job/security.dm
@@ -98,7 +98,7 @@
minimal_access = list(access_security, access_sec_doors, access_forensics_lockers, access_morgue, access_maint_tunnels, access_eva, access_external_airlocks)
economic_modifier = 5
minimal_player_age = 3
- equip(var/mob/living/carbon/human/H)
+ equip(var/mob/living/carbon/human/H, var/alt_title)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec(H), slot_l_ear)
switch(H.backbag)
@@ -114,7 +114,7 @@
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/evidence(H), slot_l_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/evidence(H), slot_in_backpack)
- if(H.mind.role_alt_title && H.mind.role_alt_title == "Forensic Technician")
+ if(has_alt_title(H, alt_title,"Forensic Technician"))
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/forensics/blue(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/briefcase/crimekit, slot_r_hand)
else
diff --git a/code/game/jobs/job/silicon.dm b/code/game/jobs/job/silicon.dm
index fb9aeb793f..d9aa96f710 100644
--- a/code/game/jobs/job/silicon.dm
+++ b/code/game/jobs/job/silicon.dm
@@ -29,6 +29,7 @@
/datum/job/ai/equip_preview(mob/living/carbon/human/H)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/straight_jacket(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/head/cardborg(H), slot_head)
+ return 1
/datum/job/cyborg
title = "Cyborg"
@@ -60,3 +61,4 @@
/datum/job/cyborg/equip_preview(mob/living/carbon/human/H)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/cardborg(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/head/cardborg(H), slot_head)
+ return 1
diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm
index 90ff3f0d6b..cd811a2862 100644
--- a/code/game/machinery/adv_med.dm
+++ b/code/game/machinery/adv_med.dm
@@ -433,8 +433,9 @@
bled = "Bleeding:"
if(e.status & ORGAN_BROKEN)
AN = "[e.broken_description]:"
- if(e.status & ORGAN_ROBOT)
- robot = "Prosthetic:"
+ switch(e.robotic)
+ if(ORGAN_ROBOT) robot = "Prosthetic:"
+ if(ORGAN_ASSISTED) robot = "Augmented:"
if(e.open)
open = "Open:"
@@ -478,7 +479,7 @@
var/mech = ""
if(i.status & ORGAN_ASSISTED)
mech = "Assisted:"
- if(i.status & ORGAN_ROBOT)
+ if(i.robotic >= ORGAN_ROBOT)
mech = "Mechanical:"
var/infection = "None"
diff --git a/code/game/machinery/computer/cloning.dm b/code/game/machinery/computer/cloning.dm
index 83b6f2ce86..bdab3bbbb1 100644
--- a/code/game/machinery/computer/cloning.dm
+++ b/code/game/machinery/computer/cloning.dm
@@ -360,7 +360,7 @@
return
if(subject.isSynthetic())
- scantemp = "Error: Subject is not organic."
+ scantemp = "Error: Majority of subject is non-organic."
return
if (subject.suiciding == 1)
scantemp = "Error: Subject's brain is not responding to scanning stimuli."
diff --git a/code/game/machinery/computer/guestpass.dm b/code/game/machinery/computer/guestpass.dm
index a50680ef8d..a4553403bc 100644
--- a/code/game/machinery/computer/guestpass.dm
+++ b/code/game/machinery/computer/guestpass.dm
@@ -148,9 +148,9 @@
if(reas)
reason = reas
if ("duration")
- var/dur = input("Duration (in minutes) during which pass is valid (up to 30 minutes).", "Duration") as num|null
+ var/dur = input("Duration (in minutes) during which pass is valid (up to 120 minutes).", "Duration") as num|null
if (dur)
- if (dur > 0 && dur <= 30)
+ if (dur > 0 && dur <= 120)
duration = dur
else
usr << "Invalid duration."
@@ -158,7 +158,7 @@
var/A = text2num(href_list["access"])
if (A in accesses)
accesses.Remove(A)
- else
+ else
if(A in giver.access) //Let's make sure the ID card actually has the access.
accesses.Add(A)
else
diff --git a/code/game/machinery/frame.dm b/code/game/machinery/frame.dm
index a264df51f2..1dddcedea0 100644
--- a/code/game/machinery/frame.dm
+++ b/code/game/machinery/frame.dm
@@ -218,7 +218,10 @@
if(component_check)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
var/obj/machinery/new_machine = new src.circuit.build_path(src.loc, src.dir)
+ // Handle machines that have allocated default parts in thier constructor.
if(new_machine.component_parts)
+ for(var/CP in new_machine.component_parts)
+ qdel(CP)
new_machine.component_parts.Cut()
else
new_machine.component_parts = list()
diff --git a/code/game/machinery/jukebox.dm b/code/game/machinery/jukebox.dm
index 59d8f2bd08..3cc537be49 100644
--- a/code/game/machinery/jukebox.dm
+++ b/code/game/machinery/jukebox.dm
@@ -19,6 +19,7 @@ datum/track/New(var/title_name, var/audio)
use_power = 1
idle_power_usage = 10
active_power_usage = 100
+ circuit = /obj/item/weapon/circuitboard/jukebox
var/playing = 0
@@ -35,6 +36,14 @@ datum/track/New(var/title_name, var/audio)
new/datum/track("Trai`Tor", 'sound/music/traitor.ogg'),
)
+/obj/machinery/media/jukebox/New()
+ ..()
+ circuit = new circuit(src)
+ component_parts = list()
+ component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
+ component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
+ component_parts += new /obj/item/stack/cable_coil(src, 5)
+ RefreshParts()
/obj/machinery/media/jukebox/Destroy()
StopPlaying()
@@ -163,6 +172,10 @@ datum/track/New(var/title_name, var/audio)
/obj/machinery/media/jukebox/attackby(obj/item/W as obj, mob/user as mob)
src.add_fingerprint(user)
+ if(default_deconstruction_screwdriver(user, W))
+ return
+ if(default_deconstruction_crowbar(user, W))
+ return
if(istype(W, /obj/item/weapon/wrench))
if(playing)
StopPlaying()
diff --git a/code/game/machinery/kitchen/smartfridge.dm b/code/game/machinery/kitchen/smartfridge.dm
index ac13a52bc4..05de6b9ac6 100644
--- a/code/game/machinery/kitchen/smartfridge.dm
+++ b/code/game/machinery/kitchen/smartfridge.dm
@@ -57,15 +57,23 @@
return 0
/obj/machinery/smartfridge/secure/extract
- name = "\improper Slime Extract Storage"
- desc = "A refrigerated storage unit for slime extracts"
+ name = "\improper Biological Sample Storage"
+ desc = "A refrigerated storage unit for xenobiological samples."
req_access = list(access_research)
/obj/machinery/smartfridge/secure/extract/accept_check(var/obj/item/O as obj)
- if(istype(O,/obj/item/slime_extract))
+ if(istype(O,/obj/item/xenoproduct/))
return 1
return 0
+/obj/machinery/smartfridge/secure/extract/New()
+ ..()
+ for(var/i=1 to 5)
+ var/obj/item/xenoproduct/slime/core/C = new(src)
+ C.traits = new()
+ C.nameVar = "grey"
+ item_quants[C.name]++
+
/obj/machinery/smartfridge/secure/medbay
name = "\improper Refrigerated Medicine Storage"
desc = "A refrigerated storage unit for storing medicine and chemicals."
diff --git a/code/game/machinery/recharger.dm b/code/game/machinery/recharger.dm
index 77aed2300f..71d63afc0a 100644
--- a/code/game/machinery/recharger.dm
+++ b/code/game/machinery/recharger.dm
@@ -7,7 +7,7 @@ obj/machinery/recharger
anchored = 1
use_power = 1
idle_power_usage = 4
- active_power_usage = 15000 //15 kW
+ active_power_usage = 40000 //40 kW
var/obj/item/charging = null
var/list/allowed_devices = list(/obj/item/weapon/gun/energy, /obj/item/weapon/melee/baton, /obj/item/device/laptop, /obj/item/weapon/cell)
var/icon_state_charged = "recharger2"
diff --git a/code/game/machinery/spaceheater.dm b/code/game/machinery/spaceheater.dm
index e0047a08bf..36c8c62814 100644
--- a/code/game/machinery/spaceheater.dm
+++ b/code/game/machinery/spaceheater.dm
@@ -6,9 +6,9 @@
name = "space heater"
desc = "Made by Space Amish using traditional space techniques, this heater is guaranteed not to set the station on fire."
var/obj/item/weapon/cell/cell
- var/cell_type = /obj/item/weapon/cell/apc
+ var/cell_type = /obj/item/weapon/cell/high
var/on = 0
- var/set_temperature = T0C + 50 //K
+ var/set_temperature = T0C + 20 //K
var/heating_power = 40000
diff --git a/code/game/machinery/telecomms/machine_interactions.dm b/code/game/machinery/telecomms/machine_interactions.dm
index 2b3561395f..002da7bc53 100644
--- a/code/game/machinery/telecomms/machine_interactions.dm
+++ b/code/game/machinery/telecomms/machine_interactions.dm
@@ -196,7 +196,7 @@
// Returns a multitool from a user depending on their mobtype.
-/obj/machinery/telecomms/proc/get_multitool(mob/user as mob)
+/obj/machinery/proc/get_multitool(mob/user as mob) //No need to have this being a telecomms specific proc.
var/obj/item/device/multitool/P = null
// Let's double check
diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm
index 912bacb817..f086a3e1dd 100644
--- a/code/game/machinery/vending.dm
+++ b/code/game/machinery/vending.dm
@@ -907,7 +907,7 @@
/obj/item/seeds/sunflowerseed = 3,/obj/item/seeds/tomatoseed = 3,/obj/item/seeds/towermycelium = 3,/obj/item/seeds/wheatseed = 3,/obj/item/seeds/appleseed = 3,
/obj/item/seeds/poppyseed = 3,/obj/item/seeds/sugarcaneseed = 3,/obj/item/seeds/ambrosiavulgarisseed = 3,/obj/item/seeds/peanutseed = 3,/obj/item/seeds/whitebeetseed = 3,/obj/item/seeds/watermelonseed = 3,/obj/item/seeds/limeseed = 3,
/obj/item/seeds/lemonseed = 3,/obj/item/seeds/orangeseed = 3,/obj/item/seeds/grassseed = 3,/obj/item/seeds/cocoapodseed = 3,/obj/item/seeds/plumpmycelium = 2,
- /obj/item/seeds/cabbageseed = 3,/obj/item/seeds/grapeseed = 3,/obj/item/seeds/pumpkinseed = 3,/obj/item/seeds/cherryseed = 3,/obj/item/seeds/plastiseed = 3,/obj/item/seeds/riceseed = 3)
+ /obj/item/seeds/cabbageseed = 3,/obj/item/seeds/grapeseed = 3,/obj/item/seeds/pumpkinseed = 3,/obj/item/seeds/cherryseed = 3,/obj/item/seeds/plastiseed = 3,/obj/item/seeds/riceseed = 3,/obj/item/seeds/lavenderseed = 3)
contraband = list(/obj/item/seeds/amanitamycelium = 2,/obj/item/seeds/glowshroom = 2,/obj/item/seeds/libertymycelium = 2,/obj/item/seeds/mtearseed = 2,
/obj/item/seeds/nettleseed = 2,/obj/item/seeds/reishimycelium = 2,/obj/item/seeds/reishimycelium = 2,/obj/item/seeds/shandseed = 2,)
premium = list(/obj/item/toy/waterflower = 1)
@@ -1047,3 +1047,24 @@
/obj/item/weapon/screwdriver = 5,/obj/item/weapon/crowbar = 5)
//everything after the power cell had no amounts, I improvised. -Sayu
+/obj/machinery/vending/fitness
+ name = "SweatMAX"
+ desc = "Fueled by your inner inadequacy!"
+ icon_state = "fitness"
+ products = list(/obj/item/weapon/reagent_containers/food/drinks/milk/smallcarton = 8,
+ /obj/item/weapon/reagent_containers/food/drinks/milk/smallcarton/chocolate = 8,
+ /obj/item/weapon/reagent_containers/food/drinks/drinkingglass/fitnessflask/proteinshake = 8,
+ /obj/item/weapon/reagent_containers/food/drinks/drinkingglass/fitnessflask = 8,
+ /obj/item/weapon/reagent_containers/food/snacks/candy/proteinbar = 8,
+ /obj/item/weapon/reagent_containers/food/snacks/liquidfood = 8,
+ /obj/item/weapon/reagent_containers/pill/diet = 8)
+
+ prices = list(/obj/item/weapon/reagent_containers/food/drinks/milk/smallcarton = 3,
+ /obj/item/weapon/reagent_containers/food/drinks/milk/smallcarton/chocolate = 3,
+ /obj/item/weapon/reagent_containers/food/drinks/drinkingglass/fitnessflask/proteinshake = 20,
+ /obj/item/weapon/reagent_containers/food/drinks/drinkingglass/fitnessflask = 5,
+ /obj/item/weapon/reagent_containers/food/snacks/candy/proteinbar = 5,
+ /obj/item/weapon/reagent_containers/food/snacks/liquidfood = 5,
+ /obj/item/weapon/reagent_containers/pill/diet = 25)
+
+ contraband = list(/obj/item/weapon/reagent_containers/syringe/steroid = 4)
diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm
index 425b959d31..ee000d60be 100644
--- a/code/game/mecha/mech_fabricator.dm
+++ b/code/game/mecha/mech_fabricator.dm
@@ -2,7 +2,7 @@
icon = 'icons/obj/robotics.dmi'
icon_state = "fab-idle"
name = "Exosuit Fabricator"
- desc = "A machine used for construction of robotcs and mechas."
+ desc = "A machine used for construction of mechas."
density = 1
anchored = 1
use_power = 1
@@ -23,12 +23,11 @@
var/list/categories = list()
var/category = null
- var/manufacturer = null
var/sync_message = ""
/obj/machinery/mecha_part_fabricator/New()
..()
-
+ circuit = new circuit(src)
component_parts = list()
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
@@ -41,7 +40,6 @@
return
/obj/machinery/mecha_part_fabricator/initialize()
- manufacturer = basic_robolimb.company
update_categories()
/obj/machinery/mecha_part_fabricator/process()
@@ -99,13 +97,6 @@
data["buildable"] = get_build_options()
data["category"] = category
data["categories"] = categories
- if(all_robolimbs)
- var/list/T = list()
- for(var/A in all_robolimbs)
- var/datum/robolimb/R = all_robolimbs[A]
- T += list(list("id" = A, "company" = R.company))
- data["manufacturers"] = T
- data["manufacturer"] = manufacturer
data["materials"] = get_materials()
data["maxres"] = res_max_amount
data["sync"] = sync_message
@@ -133,10 +124,6 @@
if(href_list["category"] in categories)
category = href_list["category"]
- if(href_list["manufacturer"])
- if(href_list["manufacturer"] in all_robolimbs)
- manufacturer = href_list["manufacturer"]
-
if(href_list["eject"])
eject_materials(href_list["eject"], text2num(href_list["amount"]))
@@ -158,43 +145,32 @@
if(default_part_replacement(user, I))
return
- var/material
- switch(I.type)
- if(/obj/item/stack/material/gold)
- material = "gold"
- if(/obj/item/stack/material/silver)
- material = "silver"
- if(/obj/item/stack/material/diamond)
- material = "diamond"
- if(/obj/item/stack/material/phoron)
- material = "phoron"
- if(/obj/item/stack/material/steel)
- material = DEFAULT_WALL_MATERIAL
- if(/obj/item/stack/material/glass)
- material = "glass"
- if(/obj/item/stack/material/uranium)
- material = "uranium"
+ if(istype(I,/obj/item/stack/material))
+ var/obj/item/stack/material/S = I
+ if(!(S.material.name in materials))
+ user << "The [src] doesn't accept [S.material]!"
+ return
+
+ var/sname = "[S.name]"
+ var/amnt = S.perunit
+ if(materials[S.material.name] + amnt <= res_max_amount)
+ if(S && S.amount >= 1)
+ var/count = 0
+ overlays += "fab-load-metal"
+ spawn(10)
+ overlays -= "fab-load-metal"
+ while(materials[S.material.name] + amnt <= res_max_amount && S.amount >= 1)
+ materials[S.material.name] += amnt
+ S.use(1)
+ count++
+ user << "You insert [count] [sname] into the fabricator."
+ update_busy()
else
- return ..()
+ user << "The fabricator cannot hold more [sname]."
- var/obj/item/stack/material/stack = I
- var/sname = "[stack.name]"
- var/amnt = stack.perunit
+ return
- if(materials[material] + amnt <= res_max_amount)
- if(stack && stack.amount >= 1)
- var/count = 0
- overlays += "fab-load-metal"
- spawn(10)
- overlays -= "fab-load-metal"
- while(materials[material] + amnt <= res_max_amount && stack.amount >= 1)
- materials[material] += amnt
- stack.use(1)
- count++
- user << "You insert [count] [sname] into the fabricator."
- update_busy()
- else
- user << "The fabricator cannot hold more [sname]."
+ ..()
/obj/machinery/mecha_part_fabricator/emag_act(var/remaining_charges, var/mob/user)
switch(emagged)
@@ -254,7 +230,7 @@
for(var/M in D.materials)
materials[M] = max(0, materials[M] - D.materials[M] * mat_efficiency)
if(D.build_path)
- var/obj/new_item = D.Fabricate(loc, src)
+ var/obj/new_item = D.Fabricate(get_step(get_turf(src), src.dir), src)
visible_message("\The [src] pings, indicating that \the [D] is complete.", "You hear a ping.")
if(mat_efficiency != 1)
if(new_item.matter && new_item.matter.len > 0)
@@ -301,36 +277,20 @@
/obj/machinery/mecha_part_fabricator/proc/eject_materials(var/material, var/amount) // 0 amount = 0 means ejecting a full stack; -1 means eject everything
var/recursive = amount == -1 ? 1 : 0
- material = lowertext(material)
- var/mattype
- switch(material)
- if(DEFAULT_WALL_MATERIAL)
- mattype = /obj/item/stack/material/steel
- if("glass")
- mattype = /obj/item/stack/material/glass
- if("gold")
- mattype = /obj/item/stack/material/gold
- if("silver")
- mattype = /obj/item/stack/material/silver
- if("diamond")
- mattype = /obj/item/stack/material/diamond
- if("phoron")
- mattype = /obj/item/stack/material/phoron
- if("uranium")
- mattype = /obj/item/stack/material/uranium
- else
- return
- var/obj/item/stack/material/S = new mattype(loc)
+ var/matstring = lowertext(material)
+ var/material/M = get_material_by_name(matstring)
+
+ var/obj/item/stack/material/S = M.place_sheet(get_turf(src))
if(amount <= 0)
amount = S.max_amount
- var/ejected = min(round(materials[material] / S.perunit), amount)
+ var/ejected = min(round(materials[matstring] / S.perunit), amount)
S.amount = min(ejected, amount)
if(S.amount <= 0)
qdel(S)
return
- materials[material] -= ejected * S.perunit
- if(recursive && materials[material] >= S.perunit)
- eject_materials(material, -1)
+ materials[matstring] -= ejected * S.perunit
+ if(recursive && materials[matstring] >= S.perunit)
+ eject_materials(matstring, -1)
update_busy()
/obj/machinery/mecha_part_fabricator/proc/sync()
diff --git a/code/game/mecha/mech_prosthetics.dm b/code/game/mecha/mech_prosthetics.dm
new file mode 100644
index 0000000000..561a5bb3d8
--- /dev/null
+++ b/code/game/mecha/mech_prosthetics.dm
@@ -0,0 +1,333 @@
+/obj/machinery/pros_fabricator
+ icon = 'icons/obj/robotics.dmi'
+ icon_state = "pros-idle"
+ name = "Prosthetics Fabricator"
+ desc = "A machine used for construction of prosthetics."
+ density = 1
+ anchored = 1
+ use_power = 1
+ idle_power_usage = 20
+ active_power_usage = 5000
+ req_access = list(access_robotics)
+ circuit = /obj/item/weapon/circuitboard/prosthetics
+
+ var/speed = 1
+ var/mat_efficiency = 1
+ var/list/materials = list(DEFAULT_WALL_MATERIAL = 0, "glass" = 0, "gold" = 0, "silver" = 0, "diamond" = 0, "phoron" = 0, "uranium" = 0, "plasteel" = 0)
+ var/res_max_amount = 200000
+
+ var/datum/research/files
+ var/list/datum/design/queue = list()
+ var/progress = 0
+ var/busy = 0
+
+ var/list/categories = list()
+ var/category = null
+ var/manufacturer = null
+ var/sync_message = ""
+
+/obj/machinery/pros_fabricator/New()
+ ..()
+ circuit = new circuit(src)
+ component_parts = list()
+ component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
+ component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
+ component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
+ component_parts += new /obj/item/weapon/stock_parts/micro_laser(src)
+ component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
+ RefreshParts()
+
+ files = new /datum/research(src) //Setup the research data holder.
+ return
+
+/obj/machinery/pros_fabricator/initialize()
+ manufacturer = basic_robolimb.company
+ update_categories()
+
+/obj/machinery/pros_fabricator/process()
+ ..()
+ if(stat)
+ return
+ if(busy)
+ use_power = 2
+ progress += speed
+ check_build()
+ else
+ use_power = 1
+ update_icon()
+
+/obj/machinery/pros_fabricator/update_icon()
+ overlays.Cut()
+ if(panel_open)
+ icon_state = "pros-o"
+ else
+ icon_state = "pros-idle"
+ if(busy)
+ overlays += "pros-active"
+
+/obj/machinery/pros_fabricator/dismantle()
+ for(var/f in materials)
+ eject_materials(f, -1)
+ ..()
+
+/obj/machinery/pros_fabricator/RefreshParts()
+ res_max_amount = 0
+ for(var/obj/item/weapon/stock_parts/matter_bin/M in component_parts)
+ res_max_amount += M.rating * 100000 // 200k -> 600k
+ var/T = 0
+ for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts)
+ T += M.rating
+ mat_efficiency = 1 - (T - 1) / 4 // 1 -> 0.5
+ for(var/obj/item/weapon/stock_parts/micro_laser/M in component_parts) // Not resetting T is intended; speed is affected by both
+ T += M.rating
+ speed = T / 2 // 1 -> 3
+
+/obj/machinery/pros_fabricator/attack_hand(var/mob/user)
+ if(..())
+ return
+ if(!allowed(user))
+ return
+ ui_interact(user)
+
+/obj/machinery/pros_fabricator/ui_interact(var/mob/user, var/ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
+ var/data[0]
+
+ var/datum/design/current = queue.len ? queue[1] : null
+ if(current)
+ data["current"] = current.name
+ data["queue"] = get_queue_names()
+ data["buildable"] = get_build_options()
+ data["category"] = category
+ data["categories"] = categories
+ if(all_robolimbs)
+ var/list/T = list()
+ for(var/A in all_robolimbs)
+ var/datum/robolimb/R = all_robolimbs[A]
+ if(R.unavailable_to_build) continue
+ T += list(list("id" = A, "company" = R.company))
+ data["manufacturers"] = T
+ data["manufacturer"] = manufacturer
+ data["materials"] = get_materials()
+ data["maxres"] = res_max_amount
+ data["sync"] = sync_message
+ if(current)
+ data["builtperc"] = round((progress / current.time) * 100)
+
+ ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
+ if(!ui)
+ ui = new(user, src, ui_key, "mechfab.tmpl", "Prosthetics Fab UI", 800, 600)
+ ui.set_initial_data(data)
+ ui.open()
+ ui.set_auto_update(1)
+
+/obj/machinery/pros_fabricator/Topic(href, href_list)
+ if(..())
+ return
+
+ if(href_list["build"])
+ add_to_queue(text2num(href_list["build"]))
+
+ if(href_list["remove"])
+ remove_from_queue(text2num(href_list["remove"]))
+
+ if(href_list["category"])
+ if(href_list["category"] in categories)
+ category = href_list["category"]
+
+ if(href_list["manufacturer"])
+ if(href_list["manufacturer"] in all_robolimbs)
+ manufacturer = href_list["manufacturer"]
+
+ if(href_list["eject"])
+ eject_materials(href_list["eject"], text2num(href_list["amount"]))
+
+ if(href_list["sync"])
+ sync()
+ else
+ sync_message = ""
+
+ return 1
+
+/obj/machinery/pros_fabricator/attackby(var/obj/item/I, var/mob/user)
+ if(busy)
+ user << "\The [src] is busy. Please wait for completion of previous operation."
+ return 1
+ if(default_deconstruction_screwdriver(user, I))
+ return
+ if(default_deconstruction_crowbar(user, I))
+ return
+ if(default_part_replacement(user, I))
+ return
+
+ if(istype(I,/obj/item/weapon/disk/limb))
+ var/obj/item/weapon/disk/limb/D = I
+ if(!D.company || !(D.company in all_robolimbs))
+ user << "This disk seems to be corrupted!"
+ else
+ user << "Installing blueprint files for [D.company]..."
+ if(do_after(user,50,src))
+ var/datum/robolimb/R = all_robolimbs[D.company]
+ R.unavailable_to_build = 0
+ user << "Installed [D.company] blueprints!"
+ qdel(I)
+ return
+
+ if(istype(I,/obj/item/stack/material))
+ var/obj/item/stack/material/S = I
+ if(!(S.material.name in materials))
+ user << "The [src] doesn't accept [S.material]!"
+ return
+
+ var/sname = "[S.name]"
+ var/amnt = S.perunit
+ if(materials[S.material.name] + amnt <= res_max_amount)
+ if(S && S.amount >= 1)
+ var/count = 0
+ overlays += "pros-load-metal"
+ spawn(10)
+ overlays -= "pros-load-metal"
+ while(materials[S.material.name] + amnt <= res_max_amount && S.amount >= 1)
+ materials[S.material.name] += amnt
+ S.use(1)
+ count++
+ user << "You insert [count] [sname] into the fabricator."
+ update_busy()
+ else
+ user << "The fabricator cannot hold more [sname]."
+
+ return
+
+ ..()
+
+/obj/machinery/pros_fabricator/emag_act(var/remaining_charges, var/mob/user)
+ switch(emagged)
+ if(0)
+ emagged = 0.5
+ visible_message("\icon[src] [src] beeps: \"DB error \[Code 0x00F1\]\"")
+ sleep(10)
+ visible_message("\icon[src] [src] beeps: \"Attempting auto-repair\"")
+ sleep(15)
+ visible_message("\icon[src] [src] beeps: \"User DB corrupted \[Code 0x00FA\]. Truncating data structure...\"")
+ sleep(30)
+ visible_message("\icon[src] [src] beeps: \"User DB truncated. Please contact your [company_name] system operator for future assistance.\"")
+ req_access = null
+ emagged = 1
+ return 1
+ if(0.5)
+ visible_message("\icon[src] [src] beeps: \"DB not responding \[Code 0x0003\]...\"")
+ if(1)
+ visible_message("\icon[src] [src] beeps: \"No records in User DB\"")
+
+/obj/machinery/pros_fabricator/proc/update_busy()
+ if(queue.len)
+ if(can_build(queue[1]))
+ busy = 1
+ else
+ busy = 0
+ else
+ busy = 0
+
+/obj/machinery/pros_fabricator/proc/add_to_queue(var/index)
+ var/datum/design/D = files.known_designs[index]
+ queue += D
+ update_busy()
+
+/obj/machinery/pros_fabricator/proc/remove_from_queue(var/index)
+ if(index == 1)
+ progress = 0
+ queue.Cut(index, index + 1)
+ update_busy()
+
+/obj/machinery/pros_fabricator/proc/can_build(var/datum/design/D)
+ for(var/M in D.materials)
+ if(materials[M] < D.materials[M])
+ return 0
+ return 1
+
+/obj/machinery/pros_fabricator/proc/check_build()
+ if(!queue.len)
+ progress = 0
+ return
+ var/datum/design/D = queue[1]
+ if(!can_build(D))
+ progress = 0
+ return
+ if(D.time > progress)
+ return
+ for(var/M in D.materials)
+ materials[M] = max(0, materials[M] - D.materials[M] * mat_efficiency)
+ if(D.build_path)
+ var/obj/new_item = D.Fabricate(get_step(get_turf(src), src.dir), src)
+ visible_message("\The [src] pings, indicating that \the [D] is complete.", "You hear a ping.")
+ if(mat_efficiency != 1)
+ if(new_item.matter && new_item.matter.len > 0)
+ for(var/i in new_item.matter)
+ new_item.matter[i] = new_item.matter[i] * mat_efficiency
+ remove_from_queue(1)
+
+/obj/machinery/pros_fabricator/proc/get_queue_names()
+ . = list()
+ for(var/i = 2 to queue.len)
+ var/datum/design/D = queue[i]
+ . += D.name
+
+/obj/machinery/pros_fabricator/proc/get_build_options()
+ . = list()
+ for(var/i = 1 to files.known_designs.len)
+ var/datum/design/D = files.known_designs[i]
+ if(D.build_path && (D.build_type & PROSFAB))
+ . += list(list("name" = D.name, "id" = i, "category" = D.category, "resourses" = get_design_resourses(D), "time" = get_design_time(D)))
+
+/obj/machinery/pros_fabricator/proc/get_design_resourses(var/datum/design/D)
+ var/list/F = list()
+ for(var/T in D.materials)
+ F += "[capitalize(T)]: [D.materials[T] * mat_efficiency]"
+ return english_list(F, and_text = ", ")
+
+/obj/machinery/pros_fabricator/proc/get_design_time(var/datum/design/D)
+ return time2text(round(10 * D.time / speed), "mm:ss")
+
+/obj/machinery/pros_fabricator/proc/update_categories()
+ categories = list()
+ for(var/datum/design/D in files.known_designs)
+ if(!D.build_path || !(D.build_type & PROSFAB))
+ continue
+ categories |= D.category
+ if(!category || !(category in categories))
+ category = categories[1]
+
+/obj/machinery/pros_fabricator/proc/get_materials()
+ . = list()
+ for(var/T in materials)
+ . += list(list("mat" = capitalize(T), "amt" = materials[T]))
+
+/obj/machinery/pros_fabricator/proc/eject_materials(var/material, var/amount) // 0 amount = 0 means ejecting a full stack; -1 means eject everything
+ var/recursive = amount == -1 ? 1 : 0
+ var/matstring = lowertext(material)
+ var/material/M = get_material_by_name(matstring)
+
+ var/obj/item/stack/material/S = M.place_sheet(get_turf(src))
+ if(amount <= 0)
+ amount = S.max_amount
+ var/ejected = min(round(materials[matstring] / S.perunit), amount)
+ S.amount = min(ejected, amount)
+ if(S.amount <= 0)
+ qdel(S)
+ return
+ materials[matstring] -= ejected * S.perunit
+ if(recursive && materials[matstring] >= S.perunit)
+ eject_materials(matstring, -1)
+ update_busy()
+
+/obj/machinery/pros_fabricator/proc/sync()
+ sync_message = "Error: no console found."
+ for(var/obj/machinery/computer/rdconsole/RDC in get_area_all_atoms(get_area(src)))
+ if(!RDC.sync)
+ continue
+ for(var/datum/tech/T in RDC.files.known_tech)
+ files.AddTech2Known(T)
+ for(var/datum/design/D in RDC.files.known_designs)
+ files.AddDesign2Known(D)
+ files.RefreshResearch()
+ sync_message = "Sync complete."
+ update_categories()
diff --git a/code/game/mecha/medical/odysseus.dm b/code/game/mecha/medical/odysseus.dm
index ede4ccf410..65ed711f2f 100644
--- a/code/game/mecha/medical/odysseus.dm
+++ b/code/game/mecha/medical/odysseus.dm
@@ -101,8 +101,6 @@
holder = patient.hud_list[STATUS_HUD]
if(patient.stat == 2)
holder.icon_state = "huddead"
- else if(patient.status_flags & XENO_HOST)
- holder.icon_state = "hudxeno"
else if(foundVirus)
holder.icon_state = "hudill"
else if(patient.has_brain_worms())
diff --git a/code/game/objects/effects/decals/Cleanable/humans.dm b/code/game/objects/effects/decals/Cleanable/humans.dm
index 65fa2ceb6a..fc764efd02 100644
--- a/code/game/objects/effects/decals/Cleanable/humans.dm
+++ b/code/game/objects/effects/decals/Cleanable/humans.dm
@@ -17,6 +17,7 @@ var/global/list/image/splatter_cache=list()
var/base_icon = 'icons/effects/blood.dmi'
blood_DNA = list()
var/basecolor="#A10808" // Color when wet.
+ var/synthblood = 0
var/list/datum/disease2/disease/virus2 = list()
var/amount = 5
var/drytime
@@ -61,9 +62,9 @@ var/global/list/image/splatter_cache=list()
/obj/effect/decal/cleanable/blood/update_icon()
if(basecolor == "rainbow") basecolor = "#[get_random_colour(1)]"
color = basecolor
- if(basecolor == SYNTH_BLOOD_COLOUR)
- name = "oil"
- desc = "It's black and greasy."
+ if(synthblood)
+ name = "synthetic blood"
+ desc = "It's quite greasy."
else
name = initial(name)
desc = initial(desc)
@@ -181,7 +182,7 @@ var/global/list/image/splatter_cache=list()
layer = 2
icon = 'icons/effects/blood.dmi'
icon_state = "gibbl5"
- random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6")
+ random_icon_states = list("gib1", "gib2", "gib3", "gib5", "gib6")
var/fleshcolor = "#FFFFFF"
/obj/effect/decal/cleanable/blood/gibs/update_icon()
diff --git a/code/game/objects/effects/decals/posters/bs12.dm b/code/game/objects/effects/decals/posters/bs12.dm
index a727e2804c..6b5ad182c4 100644
--- a/code/game/objects/effects/decals/posters/bs12.dm
+++ b/code/game/objects/effects/decals/posters/bs12.dm
@@ -91,7 +91,7 @@
/datum/poster/bay_19
icon_state="bsposter19"
- name = "Respect a Unathi"
+ name = "Respect an Unathi"
desc = "This poster depicts a well dressed looking Unathi receiving a prestigious award. It appears to espouse greater co-operation and harmony between the two races."
/datum/poster/bay_20
@@ -117,7 +117,7 @@
/datum/poster/bay_24
icon_state="bsposter24"
name = "Responsible medbay habits, No #259"
- desc = "A poster with a nervous looking geneticist on it states; \"Friends Don't Tell Friends They're Clones. It can cause severe and irreparable emotional trauma. Always do the right thing and never tell them that they were dead.\""
+ desc = "A poster with a nervous looking geneticist on it states; \"Friends Tell Friends They're Clones. It can cause severe and irreparable emotional trauma if a person is not properly informed of their recent demise. Always follow your contractual obligation and inform them of their recent rejuvenation.\""
/datum/poster/bay_25
icon_state="bsposter25"
diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index 2934e5d68d..4d78f5aa9d 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -453,6 +453,9 @@ var/list/global/slot_flags_enumeration = list(
M.attack_log += "\[[time_stamp()]\] Attacked by [user.name] ([user.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])"
msg_admin_attack("[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (JMP)") //BS12 EDIT ALG
+ user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
+ user.do_attack_animation(M)
+
src.add_fingerprint(user)
//if((CLUMSY in user.mutations) && prob(50))
// M = user
@@ -481,7 +484,7 @@ var/list/global/slot_flags_enumeration = list(
eyes.damage += rand(3,4)
if(eyes.damage >= eyes.min_bruised_damage)
if(M.stat != 2)
- if(!(eyes.status & ORGAN_ROBOT)) //robot eyes bleeding might be a bit silly
+ if(!(eyes.robotic >= ORGAN_ROBOT)) //robot eyes bleeding might be a bit silly
M << "Your eyes start to bleed profusely!"
if(prob(50))
if(M.stat != 2)
@@ -633,6 +636,3 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
/obj/item/proc/pwr_drain()
return 0 // Process Kill
-/obj/item/proc/resolve_attackby(atom/A, mob/source)
- return A.attackby(src,source)
-
diff --git a/code/game/objects/items/devices/flash.dm b/code/game/objects/items/devices/flash.dm
index 0024a05c62..ae18aed86c 100644
--- a/code/game/objects/items/devices/flash.dm
+++ b/code/game/objects/items/devices/flash.dm
@@ -31,14 +31,17 @@
last_used = world.time
times_used = max(0,round(times_used)) //sanity
-
-/obj/item/device/flash/attack(mob/living/M as mob, mob/user as mob)
+//attack_as_weapon
+/obj/item/device/flash/attack(mob/living/M, mob/living/user, var/target_zone)
if(!user || !M) return //sanity
M.attack_log += text("\[[time_stamp()]\] Has been flashed (attempt) with [src.name] by [user.name] ([user.ckey])")
user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to flash [M.name] ([M.ckey])")
msg_admin_attack("[user.name] ([user.ckey]) Used the [src.name] to flash [M.name] ([M.ckey]) (JMP)")
+ user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
+ user.do_attack_animation(M)
+
if(!clown_check(user)) return
if(broken)
user << "\The [src] is broken."
@@ -117,6 +120,8 @@
/obj/item/device/flash/attack_self(mob/living/carbon/user as mob, flag = 0, emp = 0)
if(!user || !clown_check(user)) return
+ user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
+
if(broken)
user.show_message("The [src.name] is broken", 2)
return
@@ -136,7 +141,6 @@
else //can only use it 5 times a minute
user.show_message("*click* *click*", 2)
return
- user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
playsound(src.loc, 'sound/weapons/flash.ogg', 100, 1)
flick("flash2", src)
if(user && isrobot(user))
@@ -184,7 +188,8 @@
icon_state = "sflash"
origin_tech = list(TECH_MAGNET = 2, TECH_COMBAT = 1)
-/obj/item/device/flash/synthetic/attack(mob/living/M as mob, mob/user as mob)
+//attack_as_weapon
+/obj/item/device/flash/synthetic/attack(mob/living/M, mob/living/user, var/target_zone)
..()
if(!broken)
broken = 1
diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm
index 83ac8851dd..c3fcf893ac 100644
--- a/code/game/objects/items/devices/flashlight.dm
+++ b/code/game/objects/items/devices/flashlight.dm
@@ -79,6 +79,8 @@
user << "\The [M]'s pupils narrow slightly, but are still very dilated."
else
user << "\The [M]'s pupils narrow."
+
+ user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN) //can be used offensively
flick("flash", M.flash)
else
return ..()
diff --git a/code/game/objects/items/devices/multitool.dm b/code/game/objects/items/devices/multitool.dm
index e7cb6f3475..cbc60670e7 100644
--- a/code/game/objects/items/devices/multitool.dm
+++ b/code/game/objects/items/devices/multitool.dm
@@ -21,3 +21,13 @@
origin_tech = list(TECH_MAGNET = 1, TECH_ENGINEERING = 1)
var/obj/machinery/telecomms/buffer // simple machine buffer for device linkage
var/obj/machinery/clonepod/connecting //same for cryopod linkage
+ var/obj/machinery/connectable //Used to connect machinery, currently only used by Xenobio2.
+
+/obj/item/device/multitool/attack_self(mob/user)
+ var/clear = alert("Do you want to clear the buffers on the [src]?",, "Yes", "No",)
+ if(clear == "Yes")
+ buffer = null
+ connecting = null
+ connectable = null
+ else
+ ..()
\ No newline at end of file
diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm
index ef875940ad..a4b159b734 100644
--- a/code/game/objects/items/devices/scanners.dm
+++ b/code/game/objects/items/devices/scanners.dm
@@ -75,7 +75,7 @@ REAGENT SCANNER
for(var/obj/item/organ/external/org in damaged)
user.show_message(text(" [][]: [][] - []",
capitalize(org.name),
- (org.status & ORGAN_ROBOT) ? "(Cybernetic)" : "",
+ (org.robotic >= ORGAN_ROBOT) ? "(Cybernetic)" : "",
(org.brute_dam > 0) ? "[org.brute_dam]" : 0,
(org.status & ORGAN_BLEEDING)?"\[Bleeding\]":"",
(org.burn_dam > 0) ? "[org.burn_dam]" : 0),1)
diff --git a/code/game/objects/items/robot/robot_items.dm b/code/game/objects/items/robot/robot_items.dm
index 3ccf1fb3a9..28f3a1def6 100644
--- a/code/game/objects/items/robot/robot_items.dm
+++ b/code/game/objects/items/robot/robot_items.dm
@@ -10,11 +10,7 @@
icon = 'icons/obj/decals.dmi'
icon_state = "shock"
-/obj/item/borg/stun/attack(var/mob/living/M, var/mob/living/silicon/robot/user)
-
- if(!istype(M))
- return
-
+/obj/item/borg/stun/apply_hit_effect(mob/living/M, mob/living/silicon/robot/user, var/hit_zone)
// How the Hell.
if(!istype(user))
var/mob/living/temp = user
@@ -23,18 +19,16 @@
qdel(src)
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])")
- msg_admin_attack("[user.name] ([user.ckey]) used the [src.name] to attack [M.name] ([M.ckey]) (JMP)")
+ user.visible_message("\The [user] has prodded \the [M] with \a [src]!")
if(!user.cell || !user.cell.checked_use(1250)) //Slightly more than a baton.
- user.visible_message("\The [user] has prodded \the [M] with its arm!")
return
- if (M.stuttering < 5)
- M.stuttering = 5
- M.stun_effect_act(0, 70, check_zone(user.zone_sel.selecting), src)
- user.visible_message("\The [user] has prodded \the [M] with \a [src]!")
+ playsound(loc, 'sound/weapons/Egloves.ogg', 50, 1, -1)
+
+ M.apply_effect(5, STUTTER)
+ M.stun_effect_act(0, 70, check_zone(hit_zone), src)
+
if(ishuman(M))
var/mob/living/carbon/human/H = M
H.forcesay(hit_appends)
diff --git a/code/game/objects/items/robot/robot_parts.dm b/code/game/objects/items/robot/robot_parts.dm
index 11c312048d..ebdd95791d 100644
--- a/code/game/objects/items/robot/robot_parts.dm
+++ b/code/game/objects/items/robot/robot_parts.dm
@@ -15,47 +15,37 @@
/obj/item/robot_parts/New(var/newloc, var/model)
..(newloc)
- if(model_info && model)
- model_info = model
- var/datum/robolimb/R = all_robolimbs[model]
- if(R)
- name = "[R.company] [initial(name)]"
- desc = "[R.desc]"
- if(icon_state in icon_states(R.icon))
- icon = R.icon
- else
- name = "robot [initial(name)]"
/obj/item/robot_parts/l_arm
- name = "left arm"
+ name = "cyborg left arm"
desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case."
icon_state = "l_arm"
part = list(BP_L_ARM, BP_L_HAND)
model_info = 1
/obj/item/robot_parts/r_arm
- name = "right arm"
+ name = "cyborg right arm"
desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case."
icon_state = "r_arm"
part = list(BP_R_ARM, BP_R_HAND)
model_info = 1
/obj/item/robot_parts/l_leg
- name = "left leg"
+ name = "cyborg left leg"
desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case."
icon_state = "l_leg"
part = list(BP_L_LEG, BP_L_FOOT)
model_info = 1
/obj/item/robot_parts/r_leg
- name = "right leg"
+ name = "cyborg leg"
desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case."
icon_state = "r_leg"
part = list(BP_R_LEG, BP_R_FOOT)
model_info = 1
/obj/item/robot_parts/chest
- name = "chest"
+ name = "cyborg chest"
desc = "A heavily reinforced case containing cyborg logic boards, with space for a standard power cell."
icon_state = "chest"
part = list(BP_GROIN,BP_TORSO)
@@ -63,7 +53,7 @@
var/obj/item/weapon/cell/cell = null
/obj/item/robot_parts/head
- name = "head"
+ name = "cyborg head"
desc = "A standard reinforced braincase, with spine-plugged neural socket and sensor gimbals."
icon_state = "head"
part = list(BP_HEAD)
diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm
index c55fd587c0..2ddbd4e330 100644
--- a/code/game/objects/items/stacks/medical.dm
+++ b/code/game/objects/items/stacks/medical.dm
@@ -24,6 +24,10 @@
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
+ if(!affecting)
+ user << "No body part there to work on!"
+ return 1
+
if(affecting.organ_tag == BP_HEAD)
if(H.head && istype(H.head,/obj/item/clothing/head/helmet/space))
user << "You can't apply [src] through [H.head]!"
@@ -33,8 +37,13 @@
user << "You can't apply [src] through [H.wear_suit]!"
return 1
- if(affecting.status & ORGAN_ROBOT)
- user << "This isn't useful at all on a robotic limb.."
+ if(affecting.robotic == ORGAN_ROBOT)
+ user << "This isn't useful at all on a robotic limb."
+ return 1
+
+ if(affecting.robotic >= ORGAN_LIFELIKE)
+ user << "You apply the [src], but it seems to have no effect..."
+ use(1)
return 1
H.UpdateDamageIcon()
diff --git a/code/game/objects/items/stacks/nanopaste.dm b/code/game/objects/items/stacks/nanopaste.dm
index a9ec052102..1ff55adf85 100644
--- a/code/game/objects/items/stacks/nanopaste.dm
+++ b/code/game/objects/items/stacks/nanopaste.dm
@@ -27,19 +27,12 @@
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/S = H.get_organ(user.zone_sel.selecting)
- if(S.open == 1)
- if (S && (S.status & ORGAN_ROBOT))
- if(S.get_damage())
- S.heal_damage(15, 15, robo_repair = 1)
- H.updatehealth()
- use(1)
- user.visible_message("\The [user] applies some nanite paste at[user != M ? " \the [M]'s" : " \the"][S.name] with \the [src].",\
- "You apply some nanite paste at [user == M ? "your" : "[M]'s"] [S.name].")
- else
- user << "Nothing to fix here."
+ if (S && (S.robotic >= ORGAN_ROBOT))
+ if(S.robo_repair(15, "omni", 0, src, user))
+ use(1)
+ user.visible_message("\The [user] applies some nanite paste on [user != M ? "\the [M]'s" : "their"] [S.name].",\
+ "You apply some nanite paste on [user == M ? "your" : "[M]'s"] [S.name].")
else
if (can_operate(H))
if (do_surgery(H,user,src))
return
- else
- user << "Nothing to fix in here."
diff --git a/code/game/objects/items/stacks/tiles/tile_types.dm b/code/game/objects/items/stacks/tiles/tile_types.dm
index 9926a14330..669c32955f 100644
--- a/code/game/objects/items/stacks/tiles/tile_types.dm
+++ b/code/game/objects/items/stacks/tiles/tile_types.dm
@@ -4,6 +4,7 @@
* Grass
* Wood
* Carpet
+ * Blue Carpet
* Linoleum
*/
@@ -70,6 +71,12 @@
throw_range = 20
flags = 0
+/obj/item/stack/tile/carpet/blue
+ name = "blue carpet"
+ singular_name = "blue carpet"
+ desc = "A piece of blue carpet. It is the same size as a normal floor tile!"
+ icon_state = "tile-bluecarpet"
+
/obj/item/stack/tile/floor
name = "floor tile"
singular_name = "floor tile"
diff --git a/code/game/objects/items/trash.dm b/code/game/objects/items/trash.dm
index 34181486e4..1d171d9dbe 100644
--- a/code/game/objects/items/trash.dm
+++ b/code/game/objects/items/trash.dm
@@ -9,11 +9,15 @@
/obj/item/trash/raisins
name = "\improper 4no raisins"
- icon_state= "4no_raisins"
+ icon_state = "4no_raisins"
/obj/item/trash/candy
name = "candy"
- icon_state= "candy"
+ icon_state = "candy"
+
+/obj/item/trash/candy/proteinbar
+ name = "protein bar"
+ icon_state = "proteinbar"
/obj/item/trash/cheesie
name = "\improper Cheesie Honkers"
diff --git a/code/game/objects/items/weapons/circuitboards/machinery/jukebox.dm b/code/game/objects/items/weapons/circuitboards/machinery/jukebox.dm
new file mode 100644
index 0000000000..4b6296c886
--- /dev/null
+++ b/code/game/objects/items/weapons/circuitboards/machinery/jukebox.dm
@@ -0,0 +1,13 @@
+#ifndef T_BOARD
+#error T_BOARD macro is not defined but we need it!
+#endif
+
+/obj/item/weapon/circuitboard/jukebox
+ name = T_BOARD("jukebox")
+ build_path = "/obj/machinery/media/jukebox"
+ board_type = "machine"
+ origin_tech = list(TECH_MAGNET = 2, TECH_DATA = 1)
+ req_components = list(
+ /obj/item/weapon/stock_parts/capacitor = 1,
+ /obj/item/weapon/stock_parts/console_screen = 1,
+ /obj/item/stack/cable_coil = 5)
diff --git a/code/game/objects/items/weapons/circuitboards/machinery/research.dm b/code/game/objects/items/weapons/circuitboards/machinery/research.dm
index bf0eb357f4..c871bd3dc5 100644
--- a/code/game/objects/items/weapons/circuitboards/machinery/research.dm
+++ b/code/game/objects/items/weapons/circuitboards/machinery/research.dm
@@ -61,3 +61,14 @@ obj/item/weapon/circuitboard/rdserver
/obj/item/weapon/stock_parts/manipulator = 1,
/obj/item/weapon/stock_parts/micro_laser = 1,
/obj/item/weapon/stock_parts/console_screen = 1)
+
+/obj/item/weapon/circuitboard/prosthetics
+ name = "Circuit board (Prosthetics Fabricator)"
+ build_path = "/obj/machinery/pros_fabricator"
+ board_type = "machine"
+ origin_tech = list(TECH_DATA = 3, TECH_ENGINEERING = 3)
+ req_components = list(
+ /obj/item/weapon/stock_parts/matter_bin = 2,
+ /obj/item/weapon/stock_parts/manipulator = 1,
+ /obj/item/weapon/stock_parts/micro_laser = 1,
+ /obj/item/weapon/stock_parts/console_screen = 1)
\ No newline at end of file
diff --git a/code/game/objects/items/weapons/clown_items.dm b/code/game/objects/items/weapons/clown_items.dm
index 0ccb1f1a24..d15b78963d 100644
--- a/code/game/objects/items/weapons/clown_items.dm
+++ b/code/game/objects/items/weapons/clown_items.dm
@@ -34,6 +34,10 @@
//So this is a workaround. This also makes more sense from an IC standpoint. ~Carn
if(user.client && (target in user.client.screen))
user << "You need to take that [target.name] off before cleaning it."
+ else if(istype(target,/obj/effect/decal/cleanable/blood))
+ user << "You scrub \the [target.name] out."
+ target.clean_blood()
+ return //Blood is a cleanable decal, therefore needs to be accounted for before all cleanable decals.
else if(istype(target,/obj/effect/decal/cleanable))
user << "You scrub \the [target.name] out."
qdel(target)
@@ -49,9 +53,11 @@
target.clean_blood()
return
-/obj/item/weapon/soap/attack(mob/target as mob, mob/user as mob)
- if(target && user && ishuman(target) && ishuman(user) && !target.stat && !user.stat && user.zone_sel &&user.zone_sel.selecting == O_MOUTH)
+//attack_as_weapon
+/obj/item/weapon/soap/attack(mob/living/target, mob/living/user, var/target_zone)
+ if(target && user && ishuman(target) && ishuman(user) && !user.incapacitated() && user.zone_sel &&user.zone_sel.selecting == "mouth" )
user.visible_message("\The [user] washes \the [target]'s mouth out with soap!")
+ user.setClickCooldown(DEFAULT_QUICK_COOLDOWN) //prevent spam
return
..()
diff --git a/code/game/objects/items/weapons/dna_injector.dm b/code/game/objects/items/weapons/dna_injector.dm
index 484c185a14..24f6ad53b3 100644
--- a/code/game/objects/items/weapons/dna_injector.dm
+++ b/code/game/objects/items/weapons/dna_injector.dm
@@ -114,6 +114,9 @@
if(!do_after(user,50))
return
+ user.setClickCooldown(DEFAULT_QUICK_COOLDOWN)
+ user.do_attack_animation(M)
+
M.visible_message("\The [M] has been injected with \the [src] by \the [user].")
var/mob/living/carbon/human/H = M
diff --git a/code/game/objects/items/weapons/explosives.dm b/code/game/objects/items/weapons/explosives.dm
index 294812513c..46e8e7ba26 100644
--- a/code/game/objects/items/weapons/explosives.dm
+++ b/code/game/objects/items/weapons/explosives.dm
@@ -46,6 +46,7 @@
if (ismob(target) || istype(target, /turf/unsimulated) || istype(target, /turf/simulated/shuttle) || istype(target, /obj/item/weapon/storage/) || istype(target, /obj/item/clothing/accessory/storage/) || istype(target, /obj/item/clothing/under))
return
user << "Planting explosives..."
+ user.do_attack_animation(target)
if(do_after(user, 50) && in_range(user, target))
user.drop_item()
diff --git a/code/game/objects/items/weapons/gift_wrappaper.dm b/code/game/objects/items/weapons/gift_wrappaper.dm
index 73c198c8ab..94775ceb36 100644
--- a/code/game/objects/items/weapons/gift_wrappaper.dm
+++ b/code/game/objects/items/weapons/gift_wrappaper.dm
@@ -61,7 +61,7 @@
qdel(src)
/obj/item/weapon/a_gift/attack_self(mob/M as mob)
- var/gift_type = pick(/obj/item/weapon/sord,
+ var/gift_type = pick(
/obj/item/weapon/storage/wallet,
/obj/item/weapon/storage/photo_album,
/obj/item/weapon/storage/box/snappops,
@@ -80,7 +80,6 @@
/obj/item/weapon/bikehorn,
/obj/item/weapon/beach_ball,
/obj/item/weapon/beach_ball/holoball,
- /obj/item/weapon/banhammer,
/obj/item/toy/balloon,
/obj/item/toy/blink,
/obj/item/toy/crossbow,
diff --git a/code/game/objects/items/weapons/grenades/emgrenade.dm b/code/game/objects/items/weapons/grenades/emgrenade.dm
index 632c82b474..91b2d8f7e1 100644
--- a/code/game/objects/items/weapons/grenades/emgrenade.dm
+++ b/code/game/objects/items/weapons/grenades/emgrenade.dm
@@ -1,5 +1,5 @@
/obj/item/weapon/grenade/empgrenade
- name = "classic emp grenade"
+ name = "emp grenade"
icon_state = "emp"
item_state = "empgrenade"
origin_tech = list(TECH_MATERIAL = 2, TECH_MAGNET = 3)
@@ -12,7 +12,7 @@
/obj/item/weapon/grenade/empgrenade/low_yield
name = "low yield emp grenade"
- desc = "A weaker variant of the classic emp grenade"
+ desc = "A weaker variant of the EMP grenade"
icon_state = "lyemp"
item_state = "lyempgrenade"
origin_tech = list(TECH_MATERIAL = 2, TECH_MAGNET = 3)
diff --git a/code/game/objects/items/weapons/handcuffs.dm b/code/game/objects/items/weapons/handcuffs.dm
index 1868827b5b..c44c3e1688 100644
--- a/code/game/objects/items/weapons/handcuffs.dm
+++ b/code/game/objects/items/weapons/handcuffs.dm
@@ -74,6 +74,9 @@
msg_admin_attack("[key_name(user)] attempted to handcuff [key_name(H)]")
feedback_add_details("handcuffs","H")
+ user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
+ user.do_attack_animation(H)
+
user.visible_message("\The [user] has put [cuff_type] on \the [H]!")
// Apply cuffs.
@@ -166,4 +169,4 @@ var/last_chew = 0
item_state = null
icon = 'icons/obj/bureaucracy.dmi'
breakouttime = 200
- cuff_type = "duct tape"
\ No newline at end of file
+ cuff_type = "duct tape"
diff --git a/code/game/objects/items/weapons/implants/implanter.dm b/code/game/objects/items/weapons/implants/implanter.dm
index 4f168556d2..655727a62a 100644
--- a/code/game/objects/items/weapons/implants/implanter.dm
+++ b/code/game/objects/items/weapons/implants/implanter.dm
@@ -30,18 +30,18 @@
if (!istype(M, /mob/living/carbon))
return
if (user && src.imp)
- for (var/mob/O in viewers(M, null))
- O.show_message("[user] is attemping to implant [M].", 1)
+ M.visible_message("[user] is attemping to implant [M].")
+
+ user.setClickCooldown(DEFAULT_QUICK_COOLDOWN)
+ user.do_attack_animation(M)
var/turf/T1 = get_turf(M)
if (T1 && ((M == user) || do_after(user, 50)))
if(user && M && (get_turf(M) == T1) && src && src.imp)
- for (var/mob/O in viewers(M, null))
- O.show_message("[M] has been implanted by [user].", 1)
+ M.visible_message("[M] has been implanted by [user].")
admin_attack_log(user, M, "Implanted using \the [src.name] ([src.imp.name])", "Implanted with \the [src.name] ([src.imp.name])", "used an implanter, [src.name] ([src.imp.name]), on")
- user.show_message("You implanted the implant into [M].")
if(src.imp.implanted(M))
src.imp.loc = M
src.imp.imp_in = M
diff --git a/code/game/objects/items/weapons/material/kitchen.dm b/code/game/objects/items/weapons/material/kitchen.dm
index ff1d347c74..6672d488de 100644
--- a/code/game/objects/items/weapons/material/kitchen.dm
+++ b/code/game/objects/items/weapons/material/kitchen.dm
@@ -103,13 +103,6 @@
return
return ..()
-/obj/item/weapon/material/kitchen/utensil/knife/attack(target as mob, mob/living/user as mob)
- if ((CLUMSY in user.mutations) && prob(50))
- user << "You somehow managed to cut yourself with \the [src]."
- user.take_organ_damage(20)
- return
- return ..()
-
/obj/item/weapon/material/kitchen/utensil/knife/plastic
default_material = "plastic"
diff --git a/code/game/objects/items/weapons/material/material_weapons.dm b/code/game/objects/items/weapons/material/material_weapons.dm
index 18181df6b0..fc9ac7eb32 100644
--- a/code/game/objects/items/weapons/material/material_weapons.dm
+++ b/code/game/objects/items/weapons/material/material_weapons.dm
@@ -64,9 +64,8 @@
processing_objects -= src
..()
-/obj/item/weapon/material/attack()
- if(!..())
- return
+/obj/item/weapon/material/apply_hit_effect()
+ ..()
if(!unbreakable)
if(material.is_brittle())
health = 0
diff --git a/code/game/objects/items/weapons/material/misc.dm b/code/game/objects/items/weapons/material/misc.dm
index dcd33fa172..91d97274f6 100644
--- a/code/game/objects/items/weapons/material/misc.dm
+++ b/code/game/objects/items/weapons/material/misc.dm
@@ -65,7 +65,6 @@
icon = 'icons/obj/weapons.dmi'
icon_state = "hoe"
item_state = "hoe"
- flags = CONDUCT | NOBLUDGEON
force_divisor = 0.25 // 5 with weight 20 (steel)
thrown_force_divisor = 0.25 // as above
w_class = 2
diff --git a/code/game/objects/items/weapons/material/shards.dm b/code/game/objects/items/weapons/material/shards.dm
index e708cc0765..f4b763c5e9 100644
--- a/code/game/objects/items/weapons/material/shards.dm
+++ b/code/game/objects/items/weapons/material/shards.dm
@@ -85,7 +85,7 @@
var/picked = pick(check)
var/obj/item/organ/external/affecting = H.get_organ(picked)
if(affecting)
- if(affecting.status & ORGAN_ROBOT)
+ if(affecting.robotic >= ORGAN_ROBOT)
return
if(affecting.take_damage(5, 0))
H.UpdateDamageIcon()
diff --git a/code/game/objects/items/weapons/policetape.dm b/code/game/objects/items/weapons/policetape.dm
index e3c1268ea0..4ddd60526c 100644
--- a/code/game/objects/items/weapons/policetape.dm
+++ b/code/game/objects/items/weapons/policetape.dm
@@ -9,6 +9,20 @@
var/tape_type = /obj/item/tape
var/icon_base
+ var/apply_tape = FALSE
+
+/obj/item/taperoll/initialize()
+ ..()
+ if(apply_tape)
+ var/turf/T = get_turf(src)
+ if(!T)
+ return
+ var/obj/machinery/door/airlock/airlock = locate(/obj/machinery/door/airlock) in T
+ if(airlock)
+ afterattack(airlock, null, TRUE)
+ qdel(src)
+
+
var/list/image/hazard_overlays
var/list/tape_roll_applications = list()
@@ -63,6 +77,9 @@ var/list/tape_roll_applications = list()
tape_type = /obj/item/tape/engineering
icon_base = "engineering"
+/obj/item/taperoll/engineering/applied
+ apply_tape = TRUE
+
/obj/item/tape/engineering
name = "engineering tape"
desc = "A length of engineering tape. Better not cross it."
@@ -220,8 +237,7 @@ var/list/tape_roll_applications = list()
if (istype(A, /obj/machinery/door/airlock))
var/turf/T = get_turf(A)
- var/obj/item/tape/P = new tape_type(T.x,T.y,T.z)
- P.loc = locate(T.x,T.y,T.z)
+ var/obj/item/tape/P = new tape_type(T)
P.update_icon()
P.layer = 3.2
user << "You finish placing \the [src]."
diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm
index 478272b8b2..c0469cd9f8 100644
--- a/code/game/objects/items/weapons/storage/belt.dm
+++ b/code/game/objects/items/weapons/storage/belt.dm
@@ -187,7 +187,8 @@
/obj/item/device/flash,
/obj/item/weapon/flame/lighter,
/obj/item/weapon/reagent_containers/food/snacks/donut/,
- /obj/item/ammo_magazine
+ /obj/item/ammo_magazine,
+ /obj/item/weapon/gun/projectile/colt/detective
)
/obj/item/weapon/storage/belt/soulstone
diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm
index a4d771aa81..b7e55cddb8 100644
--- a/code/game/objects/items/weapons/stunbaton.dm
+++ b/code/game/objects/items/weapons/stunbaton.dm
@@ -12,6 +12,7 @@
w_class = 3
origin_tech = list(TECH_COMBAT = 2)
attack_verb = list("beaten")
+ var/lightcolor = "#FF6A00"
var/stunforce = 0
var/agonyforce = 60
var/status = 0 //whether the thing is on or not
@@ -52,7 +53,7 @@
icon_state = "[initial(name)]"
if(icon_state == "[initial(name)]_active")
- set_light(1.5, 1, "#FF6A00")
+ set_light(1.5, 1, lightcolor)
else
set_light(0)
@@ -102,73 +103,52 @@
user << "[src] is out of charge."
add_fingerprint(user)
-
/obj/item/weapon/melee/baton/attack(mob/M, mob/user)
if(status && (CLUMSY in user.mutations) && prob(50))
user << "You accidentally hit yourself with the [src]!"
user.Weaken(30)
deductcharge(hitcost)
return
+ return ..()
- if(isrobot(M))
- ..()
- return
+/obj/item/weapon/melee/baton/apply_hit_effect(mob/living/target, mob/living/user, var/hit_zone)
+ if(isrobot(target))
+ return ..()
var/agony = agonyforce
var/stun = stunforce
- var/mob/living/L = M
+ var/obj/item/organ/external/affecting = null
+ if(ishuman(target))
+ var/mob/living/carbon/human/H = target
+ affecting = H.get_organ(hit_zone)
- var/target_zone = check_zone(user.zone_sel.selecting)
if(user.a_intent == I_HURT)
- if (!..()) //item/attack() does it's own messaging and logs
- return 0 // item/attack() will return 1 if they hit, 0 if they missed.
+ . = ..()
+ //whacking someone causes a much poorer electrical contact than deliberately prodding them.
+ agony *= 0.5
stun *= 0.5
- if(status) //Checks to see if the stunbaton is on.
- agony *= 0.5 //whacking someone causes a much poorer contact than prodding them.
+ else if(!status)
+ if(affecting)
+ target.visible_message("[target] has been prodded in the [affecting.name] with [src] by [user]. Luckily it was off.")
else
- agony = 0 //Shouldn't really stun if it's off, should it?
- //we can't really extract the actual hit zone from ..(), unfortunately. Just act like they attacked the area they intended to.
+ target.visible_message("[target] has been prodded with [src] by [user]. Luckily it was off.")
else
- //copied from human_defense.dm - human defence code should really be refactored some time.
- if (ishuman(L))
- user.lastattacked = L //are these used at all, if we have logs?
- L.lastattacker = user
-
- if (user != L) // Attacking yourself can't miss
- target_zone = get_zone_with_miss_chance(user.zone_sel.selecting, L)
-
- if(!target_zone)
- L.visible_message("\The [user] misses [L] with \the [src]!")
- return 0
-
- var/mob/living/carbon/human/H = L
- var/obj/item/organ/external/affecting = H.get_organ(target_zone)
- if (affecting)
- if(!status)
- L.visible_message("[L] has been prodded in the [affecting.name] with [src] by [user]. Luckily it was off.")
- return 1
- else
- H.visible_message("[L] has been prodded in the [affecting.name] with [src] by [user]!")
+ if(affecting)
+ target.visible_message("[target] has been prodded in the [affecting.name] with [src] by [user]!")
else
- if(!status)
- L.visible_message("[L] has been prodded with [src] by [user]. Luckily it was off.")
- return 1
- else
- L.visible_message("[L] has been prodded with [src] by [user]!")
+ target.visible_message("[target] has been prodded with [src] by [user]!")
+ playsound(loc, 'sound/weapons/Egloves.ogg', 50, 1, -1)
//stun effects
- L.stun_effect_act(stun, agony, target_zone, src)
+ if(status)
+ target.stun_effect_act(stun, agony, hit_zone, src)
+ msg_admin_attack("[key_name(user)] stunned [key_name(target)] with the [src].")
- playsound(loc, 'sound/weapons/Egloves.ogg', 50, 1, -1)
- msg_admin_attack("[key_name(user)] stunned [key_name(L)] with the [src].")
+ deductcharge(hitcost)
- deductcharge(hitcost)
-
- if(ishuman(L))
- var/mob/living/carbon/human/H = L
- H.forcesay(hit_appends)
-
- return 1
+ if(ishuman(target))
+ var/mob/living/carbon/human/H = target
+ H.forcesay(hit_appends)
/obj/item/weapon/melee/baton/emp_act(severity)
if(bcell)
@@ -176,6 +156,9 @@
..()
//secborg stun baton module
+/obj/item/weapon/melee/baton/robot
+ hitcost = 500
+
/obj/item/weapon/melee/baton/robot/attack_self(mob/user)
//try to find our power cell
var/mob/living/silicon/robot/R = loc
diff --git a/code/game/objects/items/weapons/surgery_limbattachment.dm b/code/game/objects/items/weapons/surgery_limbattachment.dm
deleted file mode 100644
index 4ba10524f2..0000000000
--- a/code/game/objects/items/weapons/surgery_limbattachment.dm
+++ /dev/null
@@ -1,71 +0,0 @@
-/obj/item/robot_parts/attack(mob/living/carbon/human/M as mob, mob/living/carbon/user as mob)
- var/limbloc = null
-
- if(!istype(M))
- return ..()
-
- if(!((locate(/obj/machinery/optable, M.loc) && M.resting) || (locate(/obj/structure/bed/roller, M.loc) && (M.buckled || M.lying || M.weakened || M.stunned || M.paralysis || M.sleeping || M.stat)) && prob(75) || (locate(/obj/structure/table/, M.loc) && (M.lying || M.weakened || M.stunned || M.paralysis || M.sleeping || M.stat) && prob(66))))
- return ..()
-
- if(!istype(M, /mob/living/carbon/human))
- return ..()
-
- if((user.zone_sel.selecting == "l_arm") && (istype(src, /obj/item/robot_parts/l_arm)))
- limbloc = "l_hand"
- else if((user.zone_sel.selecting == "r_arm") && (istype(src, /obj/item/robot_parts/r_arm)))
- limbloc = "r_hand"
- else if((user.zone_sel.selecting == "r_leg") && (istype(src, /obj/item/robot_parts/r_leg)))
- limbloc = "r_foot"
- else if((user.zone_sel.selecting == "l_leg") && (istype(src, /obj/item/robot_parts/l_leg)))
- limbloc = "l_foot"
- else
- user << "That doesn't fit there!"
- return ..()
-
- var/mob/living/carbon/human/H = M
- var/datum/organ/external/S = H.organs[user.zone_sel.selecting]
- if(S.status & ORGAN_DESTROYED)
- if(!(S.status & ORGAN_ATTACHABLE))
- user << "The wound is not ready for a replacement!"
- return 0
- if(M != user)
- M.visible_message( \
- "\The [user] is beginning to attach \the [src] where [H]'s [S.display_name] used to be.", \
- "\The [user] begins to attach \the [src] where your [S.display_name] used to be.")
- else
- M.visible_message( \
- "\The [user] begins to attach a robotic limb where \his [S.display_name] used to be with [src].", \
- "You begin to attach \the [src] where your [S.display_name] used to be.")
-
- if(do_mob(user, H, 100))
- if(M != user)
- M.visible_message( \
- "\The [user] finishes attaching [H]'s new [S.display_name].", \
- "\The [user] finishes attaching your new [S.display_name].")
- else
- M.visible_message( \
- "\The [user] finishes attaching \his new [S.display_name].", \
- "You finish attaching your new [S.display_name].")
-
- if(H == user && prob(25))
- user << "You mess up!"
- S.take_damage(15)
-
- S.status &= ~ORGAN_BROKEN
- S.status &= ~ORGAN_SPLINTED
- S.status &= ~ORGAN_ATTACHABLE
- S.status &= ~ORGAN_DESTROYED
- S.status |= ORGAN_ROBOT
- var/datum/organ/external/T = H.organs["[limbloc]"]
- T.status &= ~ORGAN_BROKEN
- T.status &= ~ORGAN_SPLINTED
- T.status &= ~ORGAN_ATTACHABLE
- T.status &= ~ORGAN_DESTROYED
- T.status |= ORGAN_ROBOT
- H.update_body()
- M.updatehealth()
- M.UpdateDamageIcon()
- qdel(src)
-
- return 1
- return 0
diff --git a/code/game/objects/items/weapons/swords_axes_etc.dm b/code/game/objects/items/weapons/swords_axes_etc.dm
index c773f3da38..b289e79257 100644
--- a/code/game/objects/items/weapons/swords_axes_etc.dm
+++ b/code/game/objects/items/weapons/swords_axes_etc.dm
@@ -1,18 +1,10 @@
/* Weapons
* Contains:
- * Banhammer
* Sword
* Classic Baton
*/
-/*
- * Banhammer
- */
-/obj/item/weapon/banhammer/attack(mob/M as mob, mob/user as mob)
- M << " You have been banned FOR NO REISIN by [user]"
- user << " You have BANNED [M]"
-
-/*
+/*
* Classic Baton
*/
/obj/item/weapon/melee/classic_baton
@@ -34,33 +26,7 @@
else
user.take_organ_damage(2*force)
return
-/*this is already called in ..()
- src.add_fingerprint(user)
- 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)])")
-*/
- if (user.a_intent == I_HURT)
- if(!..()) return
- //playsound(src.loc, "swing_hit", 50, 1, -1)
- if (M.stuttering < 8 && (!(HULK in M.mutations)) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/)
- M.stuttering = 8
- M.Stun(8)
- M.Weaken(8)
- for(var/mob/O in viewers(M))
- if (O.client) O.show_message("\The [M] has been beaten with \the [src] by [user]!", 1, "You hear someone fall", 2)
- else
- playsound(src.loc, 'sound/weapons/Genhit.ogg', 50, 1, -1)
- M.Stun(5)
- M.Weaken(5)
- 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])")
- msg_admin_attack("[key_name(user)] attacked [key_name(user)] with [src.name] (INTENT: [uppertext(user.a_intent)])")
- src.add_fingerprint(user)
-
- for(var/mob/O in viewers(M))
- if (O.client) O.show_message("\The [M] has been stunned with \the [src] by [user]!", 1, "You hear someone fall", 2)
+ return ..()
//Telescopic baton
/obj/item/weapon/melee/telebaton
diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm
index c1922b735e..b39fc0dd27 100644
--- a/code/game/objects/items/weapons/tools.dm
+++ b/code/game/objects/items/weapons/tools.dm
@@ -116,7 +116,7 @@
item_state = "cutters_yellow"
/obj/item/weapon/wirecutters/attack(mob/living/carbon/C as mob, mob/user as mob)
- if((C.handcuffed) && (istype(C.handcuffed, /obj/item/weapon/handcuffs/cable)))
+ if(user.a_intent == I_HELP && (C.handcuffed) && (istype(C.handcuffed, /obj/item/weapon/handcuffs/cable)))
usr.visible_message("\The [usr] cuts \the [C]'s restraints with \the [src]!",\
"You cut \the [C]'s restraints with \the [src]!",\
"You hear cable being cut.")
@@ -428,22 +428,18 @@
var/mob/living/carbon/human/H = A
var/obj/item/organ/external/S = H.organs_by_name[user.zone_sel.selecting]
- if(!S || !(S.status & ORGAN_ROBOT))
+ if(!S || S.robotic < ORGAN_ROBOT || S.open == 3)
return ..()
- if(S.brute_dam)
- if(S.brute_dam < ROBOLIMB_SELF_REPAIR_CAP)
- S.heal_damage(15,0,0,1)
- user.visible_message("\The [user] patches some dents on \the [H]'s [S.name] with \the [src].")
- else if(S.open < 3)
- user << "The damage is far too severe to patch over externally."
- else
- return ..()
- else
- user << "Nothing to fix!"
- S.update_wounds()
- return
- return ..()
+ if(!welding)
+ user << "You'll need to turn [src] on to patch the damage on [H]'s [S.name]!"
+ return 1
+
+ if(S.robo_repair(15, BRUTE, "some dents", src, user))
+ remove_fuel(1, user)
+
+ else
+ return ..()
/*/obj/item/weapon/combitool
name = "combi-tool"
diff --git a/code/game/objects/items/weapons/towels.dm b/code/game/objects/items/weapons/towels.dm
new file mode 100644
index 0000000000..94c266142e
--- /dev/null
+++ b/code/game/objects/items/weapons/towels.dm
@@ -0,0 +1,14 @@
+/obj/item/weapon/towel
+ name = "towel"
+ icon = 'icons/obj/weapons.dmi'
+ icon_state = "towel"
+ slot_flags = SLOT_HEAD | SLOT_BELT | SLOT_OCLOTHING
+ force = 3.0
+ w_class = 3.0
+ attack_verb = list("whipped")
+ hitsound = 'sound/weapons/towelwhip.ogg'
+ desc = "A soft cotton towel."
+
+/obj/item/weapon/towel/attack_self(mob/living/user as mob)
+ user.visible_message(text("[] uses [] to towel themselves off.", user, src))
+ playsound(user, 'sound/weapons/towelwipe.ogg', 25, 1)
diff --git a/code/game/objects/items/weapons/weaponry.dm b/code/game/objects/items/weapons/weaponry.dm
index 35302dc5dc..0f5cebc44d 100644
--- a/code/game/objects/items/weapons/weaponry.dm
+++ b/code/game/objects/items/weapons/weaponry.dm
@@ -1,18 +1,3 @@
-/obj/item/weapon/banhammer
- desc = "banhammer"
- name = "banhammer"
- icon = 'icons/obj/items.dmi'
- icon_state = "toyhammer"
- slot_flags = SLOT_BELT
- throwforce = 0
- w_class = 2.0
- throw_speed = 7
- throw_range = 15
- attack_verb = list("banned")
-
- suicide_act(mob/user)
- viewers(user) << "[user] is hitting \himself with the [src.name]! It looks like \he's trying to ban \himself from life."
- return (BRUTELOSS|FIRELOSS|TOXLOSS|OXYLOSS)
/obj/item/weapon/nullrod
name = "null rod"
@@ -37,6 +22,9 @@
msg_admin_attack("[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (JMP)")
+ user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
+ user.do_attack_animation(M)
+
if (!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
user << "You don't have the dexterity to do this!"
return
@@ -68,27 +56,6 @@
user << "You hit the floor with the [src]."
call(/obj/effect/rune/proc/revealrunes)(src)
-/obj/item/weapon/sord
- name = "\improper SORD"
- desc = "This thing is so unspeakably shitty you are having a hard time even holding it."
- icon_state = "sord"
- item_state = "sord"
- slot_flags = SLOT_BELT
- force = 2
- throwforce = 1
- sharp = 1
- edge = 1
- w_class = 3
- attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
-
- suicide_act(mob/user)
- viewers(user) << "[user] is impaling \himself with the [src.name]! It looks like \he's trying to commit suicide."
- return(BRUTELOSS)
-
-/obj/item/weapon/sord/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
- playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
- return ..()
-
/obj/item/weapon/energy_net
name = "energy net"
desc = "It's a net made of green energy."
diff --git a/code/game/objects/random/random.dm b/code/game/objects/random/random.dm
index e64d422a20..1127bf7510 100644
--- a/code/game/objects/random/random.dm
+++ b/code/game/objects/random/random.dm
@@ -108,7 +108,7 @@
prob(2);/obj/random/bomb_supply,\
prob(1);/obj/item/weapon/extinguisher,\
prob(1);/obj/item/clothing/gloves/fyellow,\
- prob(3);/obj/item/stack/cable_coil,\
+ prob(3);/obj/item/stack/cable_coil/random,\
prob(2);/obj/random/toolbox,\
prob(2);/obj/item/weapon/storage/belt/utility,\
prob(5);/obj/random/tool,\
diff --git a/code/game/objects/structures/bedsheet_bin.dm b/code/game/objects/structures/bedsheet_bin.dm
index ad1797756c..375c6727ea 100644
--- a/code/game/objects/structures/bedsheet_bin.dm
+++ b/code/game/objects/structures/bedsheet_bin.dm
@@ -101,6 +101,78 @@ LINEN BINS
icon_state = "sheetbrown"
item_state = "sheetbrown"
+/obj/item/weapon/bedsheet/ian
+ icon_state = "sheetian"
+ item_state = "bedsheet"
+
+/obj/item/weapon/bedsheet/double
+ icon_state = "doublesheet"
+ item_state = "bedsheet"
+
+/obj/item/weapon/bedsheet/bluedouble
+ icon_state = "doublesheetblue"
+ item_state = "sheetblue"
+
+/obj/item/weapon/bedsheet/greendouble
+ icon_state = "doublesheetgreen"
+ item_state = "sheetgreen"
+
+/obj/item/weapon/bedsheet/orangedouble
+ icon_state = "doublesheetorange"
+ item_state = "sheetorange"
+
+/obj/item/weapon/bedsheet/purpledouble
+ icon_state = "doublesheetpurple"
+ item_state = "sheetpurple"
+
+/obj/item/weapon/bedsheet/doublerainbow //all the way across the sky.
+ icon_state = "doublesheetrainbow"
+ item_state = "sheetrainbow"
+
+/obj/item/weapon/bedsheet/doublered
+ icon_state = "doublesheetred"
+ item_state = "sheetred"
+
+/obj/item/weapon/bedsheet/doubleyellow
+ icon_state = "doublesheetyellow"
+ item_state = "sheetyellow"
+
+/obj/item/weapon/bedsheet/doublemime
+ icon_state = "doublesheetmime"
+ item_state = "sheetmime"
+
+/obj/item/weapon/bedsheet/doubleclown
+ icon_state = "doublesheetclown"
+ item_state = "sheetclown"
+
+/obj/item/weapon/bedsheet/doublecaptain
+ icon_state = "doublesheetcaptain"
+ item_state = "sheetcaptain"
+
+/obj/item/weapon/bedsheet/doublerd
+ icon_state = "doublesheetrd"
+ item_state = "sheetrd"
+
+/obj/item/weapon/bedsheet/doublehos
+ icon_state = "doublesheethos"
+ item_state = "sheethos"
+
+/obj/item/weapon/bedsheet/doublehop
+ icon_state = "doublesheethop"
+ item_state = "sheethop"
+
+/obj/item/weapon/bedsheet/doublece
+ icon_state = "doublesheetce"
+ item_state = "sheetce"
+
+/obj/item/weapon/bedsheet/doublebrown
+ icon_state = "doublesheetbrown"
+ item_state = "sheetbrown"
+
+/obj/item/weapon/bedsheet/doubleian
+ icon_state = "doublesheetian"
+ item_state = "bedsheet"
+
/obj/structure/bedsheetbin
name = "linen bin"
diff --git a/code/game/objects/structures/stool_bed_chair_nest/bed.dm b/code/game/objects/structures/stool_bed_chair_nest/bed.dm
index 73914e113c..511709200c 100644
--- a/code/game/objects/structures/stool_bed_chair_nest/bed.dm
+++ b/code/game/objects/structures/stool_bed_chair_nest/bed.dm
@@ -176,6 +176,19 @@
/obj/structure/bed/alien/New(var/newloc)
..(newloc,"resin")
+/obj/structure/bed/double
+ name = "double bed"
+ icon_state = "doublebed"
+ base_icon = "doublebed"
+
+/obj/structure/bed/double/post_buckle_mob(mob/living/M as mob)
+ if(M == buckled_mob)
+ M.pixel_y = 13
+ M.old_y = 13
+ else
+ M.pixel_y = 0
+ M.old_y = 0
+
/*
* Roller beds
*/
diff --git a/code/game/objects/structures/stool_bed_chair_nest/stools.dm b/code/game/objects/structures/stool_bed_chair_nest/stools.dm
index e4840bedc6..e4d54f48ba 100644
--- a/code/game/objects/structures/stool_bed_chair_nest/stools.dm
+++ b/code/game/objects/structures/stool_bed_chair_nest/stools.dm
@@ -72,6 +72,11 @@ var/global/list/stool_cache = list() //haha stool
/obj/item/weapon/stool/attack(mob/M as mob, mob/user as mob)
if (prob(5) && istype(M,/mob/living))
user.visible_message("[user] breaks [src] over [M]'s back!")
+ user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
+ user.do_attack_animation(M)
+
+ user.drop_from_inventory(src)
+
user.remove_from_mob(src)
dismantle()
qdel(src)
diff --git a/code/game/objects/structures/under_wardrobe.dm b/code/game/objects/structures/under_wardrobe.dm
index a02c67c968..6a06ef26fb 100644
--- a/code/game/objects/structures/under_wardrobe.dm
+++ b/code/game/objects/structures/under_wardrobe.dm
@@ -5,39 +5,83 @@
icon_state = "cabinet_closed"
density = 1
-/obj/structure/undies_wardrobe/attack_hand(mob/user as mob)
- src.add_fingerprint(user)
- var/mob/living/carbon/human/H = user
- if(!ishuman(user) || (H.species && !(H.species.appearance_flags & HAS_UNDERWEAR)))
+/obj/structure/undies_wardrobe/attack_hand(var/mob/user)
+ if(!human_who_can_use_underwear(user))
user << "Sadly there's nothing in here for you to wear."
- return 0
+ return
+ interact(user)
- var/utype = alert("Which section do you want to pick from?",,"Underwear", "Undershirts", "Socks",)
- var/list/selection
- switch(utype)
- if("Underwear")
- utype = alert("Which section do you want to pick from?",, "Top", "Bottom",)
- switch(utype)
- if("Top")
- selection = underwear_top_t
- if("Bottom")
- selection = underwear_bottom_t
- if("Undershirts")
- selection = undershirt_t
- if("Socks")
- selection = socks_t
- var/pick = input("Select the style") as null|anything in selection
- if(pick)
- if(get_dist(src,user) > 1)
+/obj/structure/undies_wardrobe/interact(var/mob/living/carbon/human/H)
+ var/dat = list()
+ dat += "Underwear:
"
+ for(var/datum/category_group/underwear/UWC in global_underwear.categories)
+ var/datum/category_item/underwear/UWI = H.all_underwear[UWC.name]
+ var/item_name = UWI ? UWI.name : "None"
+ dat += "[UWC.name]: [item_name]"
+ if(UWI)
+ for(var/datum/gear_tweak/gt in UWI.tweaks)
+ dat += " [gt.get_contents(get_metadata(H, UWC.name, gt))]"
+ dat += " (Remove)
"
+
+ dat = jointext(dat,null)
+ H << browse(dat, "window=wardrobe;size=400x200")
+
+/obj/structure/undies_wardrobe/proc/get_metadata(var/mob/living/carbon/human/H, var/underwear_category, var/datum/gear_tweak/gt)
+ var/metadata = H.all_underwear_metadata[underwear_category]
+ if(!metadata)
+ metadata = list()
+ H.all_underwear_metadata[underwear_category] = metadata
+
+ var/tweak_data = metadata["[gt]"]
+ if(!tweak_data)
+ tweak_data = gt.get_default()
+ metadata["[gt]"] = tweak_data
+ return tweak_data
+
+/obj/structure/undies_wardrobe/proc/set_metadata(var/mob/living/carbon/human/H, var/underwear_category, var/datum/gear_tweak/gt, var/new_metadata)
+ var/list/metadata = H.all_underwear_metadata[underwear_category]
+ metadata["[gt]"] = new_metadata
+
+/obj/structure/undies_wardrobe/proc/human_who_can_use_underwear(var/mob/living/carbon/human/H)
+ if(!istype(H) || !H.species || !(H.species.appearance_flags & HAS_UNDERWEAR))
+ return FALSE
+ return TRUE
+
+/obj/structure/undies_wardrobe/CanUseTopic(var/user)
+ if(!human_who_can_use_underwear(user))
+ return STATUS_CLOSE
+
+ return ..()
+
+/obj/structure/undies_wardrobe/Topic(href, href_list, state)
+ if(..())
+ return TRUE
+
+ var/mob/living/carbon/human/H = usr
+ if(href_list["remove_underwear"])
+ if(href_list["remove_underwear"] in H.all_underwear)
+ H.all_underwear -= href_list["remove_underwear"]
+ . = TRUE
+ else if(href_list["change_underwear"])
+ var/datum/category_group/underwear/UWC = global_underwear.categories_by_name[href_list["change_underwear"]]
+ if(!UWC)
return
- if(utype == "Undershirts")
- H.undershirt = selection[pick]
- else if(utype == "Socks")
- H.socks = selection[pick]
- else if(utype == "Top")
- H.underwear_top = selection[pick]
- else
- H.underwear_bottom = selection[pick]
- H.update_body(1)
+ var/datum/category_item/underwear/selected_underwear = input(H, "Choose underwear:", "Choose underwear", H.all_underwear[UWC.name]) as null|anything in UWC.items
+ if(selected_underwear && CanUseTopic(H, default_state))
+ H.all_underwear[UWC.name] = selected_underwear
+ . = TRUE
+ else if(href_list["underwear"] && href_list["tweak"])
+ var/underwear = href_list["underwear"]
+ if(!(underwear in H.all_underwear))
+ return
+ var/datum/gear_tweak/gt = locate(href_list["tweak"])
+ if(!gt)
+ return
+ var/new_metadata = gt.get_metadata(usr, get_metadata(H, underwear, gt), "Wardrobe Underwear Selection")
+ if(new_metadata)
+ set_metadata(H, underwear, gt, new_metadata)
+ . = TRUE
- return 1
\ No newline at end of file
+ if(.)
+ H.update_underwear()
+ interact(H)
\ No newline at end of file
diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm
index 3c39c382fa..8e6c2cd0d5 100644
--- a/code/game/objects/structures/window.dm
+++ b/code/game/objects/structures/window.dm
@@ -271,6 +271,9 @@
else
new glasstype(loc)
qdel(src)
+ else if(istype(W,/obj/item/frame) && anchored)
+ var/obj/item/frame/F = W
+ F.try_build(src)
else
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
if(W.damtype == BRUTE || W.damtype == BURN)
diff --git a/code/game/turfs/flooring/flooring.dm b/code/game/turfs/flooring/flooring.dm
index ad7a0f91ce..163867d1fa 100644
--- a/code/game/turfs/flooring/flooring.dm
+++ b/code/game/turfs/flooring/flooring.dm
@@ -68,7 +68,7 @@ var/list/flooring_types
/decl/flooring/carpet/blue
name = "carpet"
icon_base = "bcarpet"
- build_type = null
+ build_type = /obj/item/stack/tile/carpet/blue
flags = TURF_HAS_EDGES | TURF_REMOVE_CROWBAR
/decl/flooring/tiling
diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm
index db48305926..9492cb87cf 100644
--- a/code/game/turfs/simulated/walls.dm
+++ b/code/game/turfs/simulated/walls.dm
@@ -164,6 +164,8 @@
material.place_dismantled_girder(src)
if(!devastated)
material.place_dismantled_product(src)
+ if (!reinf_material)
+ material.place_dismantled_product(src)
for(var/obj/O in src.contents) //Eject contents!
if(istype(O,/obj/structure/sign/poster))
diff --git a/code/game/verbs/ooc.dm b/code/game/verbs/ooc.dm
index fd9a37935e..3e6ed27302 100644
--- a/code/game/verbs/ooc.dm
+++ b/code/game/verbs/ooc.dm
@@ -29,8 +29,6 @@
if(prefs.muted & MUTE_OOC)
src << "You cannot use OOC (muted)."
return
- if(handle_spam_prevention(msg,MUTE_OOC))
- return
if(findtext(msg, "byond://"))
src << "Advertising other servers is not allowed."
log_admin("[key_name(src)] has attempted to advertise in OOC: [msg]")
@@ -99,8 +97,6 @@
if(prefs.muted & MUTE_OOC)
src << "You cannot use OOC (muted)."
return
- if(handle_spam_prevention(msg, MUTE_OOC))
- return
if(findtext(msg, "byond://"))
src << "Advertising other servers is not allowed."
log_admin("[key_name(src)] has attempted to advertise in OOC: [msg]")
@@ -140,7 +136,7 @@
send = 1
prefix = "(Eye) "
- if(!send && (target in admins))
+ if(!send && (target in admins) && target.is_preference_enabled(/datum/client_preference/holder/show_rlooc))
send = 1
prefix = "(R)"
diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm
index 23c5961b66..e045c19f1e 100644
--- a/code/modules/admin/admin.dm
+++ b/code/modules/admin/admin.dm
@@ -594,26 +594,33 @@ proc/admin_notice(var/message, var/rights)
usr << browse(dat, "window=admin2;size=210x280")
return
-/datum/admins/proc/Secrets()
+/datum/admins/proc/Secrets(var/datum/admin_secret_category/active_category = null)
if(!check_rights(0)) return
+ // Print the header with category selection buttons.
var/dat = "The first rule of adminbuse is: you don't talk about the adminbuse.
| Body "
@@ -167,7 +170,10 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
else
. += " " - . += " | Preview | Preview " + . += " [pref.dress_mob ? "Hide equipment" : "Show equipment"]" + . += " |