diff --git a/baystation12.dme b/baystation12.dme index f7982b9280f..039a5b9c8bb 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -253,7 +253,6 @@ #define FILE_DIR "interface" #define FILE_DIR "maps" #define FILE_DIR "maps/RandomZLevels" -#define FILE_DIR "maps/RandomZLevels/backup" #define FILE_DIR "sound" #define FILE_DIR "sound/AI" #define FILE_DIR "sound/ambience" @@ -975,6 +974,8 @@ #include "code\modules\critters\critter_defenses.dm" #include "code\modules\critters\critters.dm" #include "code\modules\critters\hivebots\hivebot.dm" +#include "code\modules\customitems\item_defines.dm" +#include "code\modules\customitems\item_spawning.dm" #include "code\modules\DetectiveWork\detective_work.dm" #include "code\modules\DetectiveWork\evidence.dm" #include "code\modules\DetectiveWork\footprints_and_rag.dm" diff --git a/code/datums/organs/organ_external.dm b/code/datums/organs/organ_external.dm index 722234ef32f..7be419b705c 100644 --- a/code/datums/organs/organ_external.dm +++ b/code/datums/organs/organ_external.dm @@ -452,9 +452,9 @@ if(!(status & ORGAN_ROBOT)) return if(prob(30*severity)) - take_damage(4(4-severity), 0, 1, used_weapon = "EMP") - else droplimb(1) + else + take_damage(4(4-severity), 0, 1, used_weapon = "EMP") proc/getDisplayName() switch(name) diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm index ae0c93ef040..8dce6c6e441 100644 --- a/code/game/gamemodes/gameticker.dm +++ b/code/game/gamemodes/gameticker.dm @@ -287,6 +287,7 @@ var/global/datum/controller/gameticker/ticker captainless=0 if(player.mind.assigned_role != "MODE") job_master.EquipRank(player, player.mind.assigned_role, 0) + EquipCustomItems(player) if(captainless) world << "Captainship not forced on anyone." diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index dfef908c0ad..2196f10b607 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -101,6 +101,13 @@ /obj/item/attack_hand(mob/user as mob) if (!user) return + if (hasorgans(user)) + var/datum/organ/external/temp = user:organs_by_name["r_hand"] + if (user.hand) + temp = user:organs_by_name["l_hand"] + if(temp && temp.status & ORGAN_DESTROYED) + user << " Yo- wait a minute." + return if (istype(src.loc, /obj/item/weapon/storage)) var/obj/item/weapon/storage/S = src.loc S.remove_from_storage(src) diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm index 963b18d14ac..7744a6b6a6d 100644 --- a/code/game/objects/items/weapons/cigs_lighters.dm +++ b/code/game/objects/items/weapons/cigs_lighters.dm @@ -63,12 +63,9 @@ ZIPPO var/icon_on = "cigon" //Note - these are in masks.dmi not in cigarette.dmi var/icon_off = "cigoff" var/butt_icon = "cigbutt" - var/butt_name = "Cigarette butt" - var/butt_desc = "A manky old cigarette butt." var/lastHolder = null var/smoketime = 300 var/chem_volume = 15 - var/is_butt = 0 /obj/item/clothing/mask/cigarette/New() ..() @@ -118,7 +115,7 @@ ZIPPO /obj/item/clothing/mask/cigarette/afterattack(obj/item/weapon/reagent_containers/glass/glass, mob/user as mob) ..() - if(!is_butt) + if(lit == 0) if(istype(glass)) //you can dip cigarettes into beakers var/transfered = glass.reagents.trans_to(src, chem_volume) if(transfered) //if reagents were transfered, show the message @@ -131,7 +128,7 @@ ZIPPO /obj/item/clothing/mask/cigarette/proc/light(var/flavor_text = "[usr] lights the [name].") - if(!src.lit && !is_butt) + if(!src.lit) src.lit = 1 damtype = "fire" if(reagents.get_reagent_amount("plasma")) // the plasma explodes when exposed to fire @@ -166,10 +163,9 @@ ZIPPO M.u_equip(src) //un-equip it so the overlays can update M.update_inv_wear_mask(0) return - if(!is_butt) + if(lit == 1) if(location) location.hotspot_expose(700, 5) - if(!is_butt) if(reagents && reagents.total_volume) // check if it has any reagents at all if(iscarbon(loc) && (src == loc:wear_mask)) // if it's in the human/monkey mouth, transfer reagents to the mob var/mob/living/carbon/C = loc @@ -195,12 +191,14 @@ ZIPPO /obj/item/clothing/mask/cigarette/proc/put_out() if(src.lit == 1) src.lit = -1 - src.is_butt = 1 icon_state = src.butt_icon - desc = src.butt_desc - name = src.butt_name - usr.update_inv_l_hand() - usr.update_inv_r_hand() + desc = "Old manky [src] butt." + name = "[src] butt" + attack_verb = list("poked") + processing_objects.Remove(src) + if (usr) + usr.update_inv_l_hand() + usr.update_inv_r_hand() //////////// @@ -212,10 +210,7 @@ ZIPPO icon_state = "cigaroff" icon_on = "cigaron" icon_off = "cigaroff" - is_butt = 0 butt_icon = "cigarbutt" - butt_name = "Cigar butt" - butt_desc = "A manky old cigar butt." throw_speed = 0.5 item_state = "cigaroff" smoketime = 1500 diff --git a/code/modules/customitems/item_defines.dm b/code/modules/customitems/item_defines.dm index 31ef7244605..88c8ec828b5 100644 --- a/code/modules/customitems/item_defines.dm +++ b/code/modules/customitems/item_defines.dm @@ -284,17 +284,8 @@ name = "old red flashlight" desc = "A very old, childlike flashlight." icon = 'custom_items.dmi' - icon_state = "wolfflight0" - w_class = 2 + icon_state = "wolfflight" item_state = "wolfflight" - flags = FPRINT | TABLEPASS | CONDUCT - slot_flags = SLOT_BELT - m_amt = 50 - g_amt = 20 - on = 0 - brightness_on = 4 //luminosity when on - icon_on = "wolfflight1" - icon_off = "wolfflight0" ////////////////////////////////// //////////// Clothing //////////// diff --git a/code/modules/customitems/item_spawning.dm b/code/modules/customitems/item_spawning.dm index ec0eddf98a3..e202e4e8c76 100644 --- a/code/modules/customitems/item_spawning.dm +++ b/code/modules/customitems/item_spawning.dm @@ -39,7 +39,6 @@ I.registered_name = M.real_name I.access = C.access I.assignment = C.assignment - I.over_jumpsuit = C.over_jumpsuit I.blood_type = C.blood_type I.dna_hash = C.dna_hash I.fingerprint_hash = C.fingerprint_hash @@ -50,13 +49,13 @@ I.name = "[M.real_name]'s Lifetime ID Card ([M.mind.role_alt_title ? M.mind.role_alt_title : M.mind.assigned_role])" else if(M.ckey == "nerezza" && M.real_name == "Asher Spock") //This is an Odysseus Specialist ID I.name = "[M.real_name]'s Odysseus Specialist ID Card ([M.mind.role_alt_title ? M.mind.role_alt_title : M.mind.assigned_role])" - I.access += list(ACCESS_ROBOTICS) //Station-based mecha pilots need this to access the recharge bay. + I.access += list(access_robotics) //Station-based mecha pilots need this to access the recharge bay. else if(M.ckey == "roaper" && M.real_name == "Ian Colm") //This is a Technician ID I.name = "[M.real_name]'s Technician ID ([M.mind.role_alt_title ? M.mind.role_alt_title : M.mind.assigned_role])" //replace old ID del(C) - ok = M.equip_if_possible(I, M.slot_wear_id, 0) //if 1, last argument deletes on fail + ok = M.equip_if_possible(I, slot_wear_id, 0) //if 1, last argument deletes on fail break else if(istype(M.back,/obj/item/weapon/storage) && M.back:contents.len < M.back:storage_slots) // Try to place it in something on the mob's back Item.loc = M.back @@ -64,7 +63,7 @@ else for(var/obj/item/weapon/storage/S in M.contents) // Try to place it in any item that can store stuff, on the mob. - if (S:len < S:storage_slots) + if (S.contents.len < S.storage_slots) Item.loc = S ok = 1 break diff --git a/code/modules/mob/inventory.dm b/code/modules/mob/inventory.dm index 4457c5e1526..cf27948e896 100644 --- a/code/modules/mob/inventory.dm +++ b/code/modules/mob/inventory.dm @@ -225,4 +225,93 @@ return l_hand else return r_hand - return + return + +/mob/living/carbon/human/proc/equip_if_possible(obj/item/W, slot, del_on_fail = 1) // since byond doesn't seem to have pointers, this seems like the best way to do this :/ + //warning: icky code + var/equipped = 0 + switch(slot) + if(slot_back) + if(!src.back) + src.back = W + equipped = 1 + if(slot_wear_mask) + if(!src.wear_mask) + src.wear_mask = W + equipped = 1 + if(slot_handcuffed) + if(!src.handcuffed) + src.handcuffed = W + equipped = 1 + if(slot_l_hand) + if(!src.l_hand) + src.l_hand = W + equipped = 1 + if(slot_r_hand) + if(!src.r_hand) + src.r_hand = W + equipped = 1 + if(slot_belt) + if(!src.belt && src.w_uniform) + src.belt = W + equipped = 1 + if(slot_wear_id) + if(!src.wear_id && src.w_uniform) + src.wear_id = W + equipped = 1 + if(slot_ears) + if(!src.ears) + src.ears = W + equipped = 1 + if(slot_glasses) + if(!src.glasses) + src.glasses = W + equipped = 1 + if(slot_gloves) + if(!src.gloves) + src.gloves = W + equipped = 1 + if(slot_head) + if(!src.head) + src.head = W + equipped = 1 + if(slot_shoes) + if(!src.shoes) + src.shoes = W + equipped = 1 + if(slot_wear_suit) + if(!src.wear_suit) + src.wear_suit = W + equipped = 1 + if(slot_w_uniform) + if(!src.w_uniform) + src.w_uniform = W + equipped = 1 + if(slot_l_store) + if(!src.l_store && src.w_uniform) + src.l_store = W + equipped = 1 + if(slot_r_store) + if(!src.r_store && src.w_uniform) + src.r_store = W + equipped = 1 + if(slot_s_store) + if(!src.s_store && src.wear_suit) + src.s_store = W + equipped = 1 + if(slot_in_backpack) + if (src.back && istype(src.back, /obj/item/weapon/storage/backpack)) + var/obj/item/weapon/storage/backpack/B = src.back + if(B.contents.len < B.storage_slots && W.w_class <= B.max_w_class) + W.loc = B + equipped = 1 + + if(equipped) + W.layer = 20 + if(src.back && W.loc != src.back) + W.loc = src + else + if (del_on_fail) + del(W) + return equipped + diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index bd11bb858dc..53f0571301e 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -50,6 +50,13 @@ /mob/living/carbon/attack_hand(mob/M as mob) if(!istype(M, /mob/living/carbon)) return + if (hasorgans(M)) + var/datum/organ/external/temp = M:organs_by_name["r_hand"] + if (M.hand) + temp = M:organs_by_name["l_hand"] + if(temp && temp.status & ORGAN_DESTROYED) + M << "\red Yo- wait a minute." + return for(var/datum/disease/D in viruses) var/s_spread_type @@ -88,6 +95,13 @@ /mob/living/carbon/attack_paw(mob/M as mob) if(!istype(M, /mob/living/carbon)) return + if (hasorgans(M)) + var/datum/organ/external/temp = M:organs_by_name["r_hand"] + if (M.hand) + temp = M:organs_by_name["l_hand"] + if(temp && temp.status & ORGAN_DESTROYED) + M << "\red Yo- wait a minute." + return for(var/datum/disease/D in viruses) var/s_spread_type @@ -211,6 +225,8 @@ status += "blistered" else if(burndamage > 0) status += "numb" + if(org.status & ORGAN_DESTROYED) + status = "MISSING!" if(status == "") status = "OK" src.show_message(text("\t []My [] is [].",status=="OK"?"\blue ":"\red ",org.getDisplayName(),status),1) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 86061af9f16..8ea99b9fc95 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -104,6 +104,9 @@ emp_act for(var/obj/O in src) if(!O) continue O.emp_act(severity) + for(var/datum/organ/external/O in organs) + if(O.status & ORGAN_DESTROYED) continue + O.emp_act(severity) ..() @@ -111,7 +114,11 @@ emp_act if(!I || !user) return 0 var/datum/organ/external/affecting = get_organ(ran_zone(user.zone_sel.selecting)) - + if (!affecting) + return + if(affecting.status & ORGAN_DESTROYED) + user << "What [affecting.display_name]?" + return var/hit_area = affecting.display_name if((user != src) && check_shields(I.force, "the [I.name]")) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index b4c225a673c..f3a0bdebce9 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -290,7 +290,7 @@ else if(E.name == "l_leg" || E.name == "l_foot" \ || E.name == "r_leg" || E.name == "r_foot" && !lying) leg_tally-- // let it fail even if just foot&leg - if(E.status & ORGAN_BROKEN || E.status & ORGAN_DESTROYED) + if(E.status & ORGAN_BROKEN || (E.status & ORGAN_DESTROYED && !E.amputated)) if(E.name == "l_hand" || E.name == "l_arm") if(hand && equipped()) if(E.status & ORGAN_SPLINTED && prob(10)) diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 018c802b179..b4362f7aa92 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -216,7 +216,6 @@ proc/get_damage_icon_part(damage_state, body_part) //BASE MOB SPRITE /mob/living/carbon/human/proc/update_body(var/update_icons=1) - if(stand_icon) del(stand_icon) if(lying_icon) del(lying_icon) if(dna && dna.mutantrace) return @@ -229,7 +228,7 @@ proc/get_damage_icon_part(damage_state, body_part) if(gender == FEMALE) g = "f" // whether to draw the individual limbs - var/individual_limbs = 1 + var/individual_limbs = 0 //Base mob icon if(husk) @@ -242,9 +241,9 @@ proc/get_damage_icon_part(damage_state, body_part) stand_icon = new /icon('icons/mob/human.dmi', "skeleton_s") lying_icon = new /icon('icons/mob/human.dmi', "skeleton_l") else - stand_icon = new /icon('icons/mob/human.dmi', "body_[g]_s") - lying_icon = new /icon('icons/mob/human.dmi', "body_[g]_l") - individual_limbs = 0 + stand_icon = new /icon('icons/mob/human.dmi', "torso_[g]_s") + lying_icon = new /icon('icons/mob/human.dmi', "torso_[g]_l") + individual_limbs = 1 //remove destroyed limbs from base icon for(var/datum/organ/external/part in organs) diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index b26a2bef6dc..1d7a7705ec4 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -370,6 +370,7 @@ var/mob/living/carbon/human/character = create_character() //creates the human and transfers vars and mind job_master.EquipRank(character, rank, 1) //equips the human + EquipCustomItems(character) character.loc = pick(latejoin) character.lastarea = get_area(loc) diff --git a/code/modules/mob/new_player/preferences.dm b/code/modules/mob/new_player/preferences.dm index 5f2030a39c2..d60e7a041a3 100644 --- a/code/modules/mob/new_player/preferences.dm +++ b/code/modules/mob/new_player/preferences.dm @@ -1167,7 +1167,7 @@ datum/preferences // Destroy/cyborgize organs for(var/name in organ_data) - var/datum/organ/external/O = character.organs[name] + var/datum/organ/external/O = character.organs_by_name[name] if(!O) continue var/status = organ_data[name] diff --git a/code/modules/projectiles/ammunition/bullets.dm b/code/modules/projectiles/ammunition/bullets.dm index 4900c1aecfb..c807c5e6635 100644 --- a/code/modules/projectiles/ammunition/bullets.dm +++ b/code/modules/projectiles/ammunition/bullets.dm @@ -28,7 +28,7 @@ /obj/item/ammo_casing/c38 desc = "A .38 bullet casing." - caliber = "357" + caliber = "38" projectile_type = "/obj/item/projectile/bullet/weakbullet" diff --git a/code/modules/projectiles/guns/projectile/revolver.dm b/code/modules/projectiles/guns/projectile/revolver.dm index ac1f15d66a0..29168a1b71c 100644 --- a/code/modules/projectiles/guns/projectile/revolver.dm +++ b/code/modules/projectiles/guns/projectile/revolver.dm @@ -4,7 +4,7 @@ icon_state = "detective" caliber = "38" origin_tech = "combat=2;materials=2" - ammo_type = "/obj/item/ammo_magazine/c38" + ammo_type = "/obj/item/ammo_casing/c38" /* special_check(var/mob/living/carbon/human/M) diff --git a/icons/mob/head.dmi b/icons/mob/head.dmi index 6ca3c2b923d..73941f5e383 100644 Binary files a/icons/mob/head.dmi and b/icons/mob/head.dmi differ diff --git a/icons/mob/suit.dmi b/icons/mob/suit.dmi index 93759acf412..21314fcc301 100644 Binary files a/icons/mob/suit.dmi and b/icons/mob/suit.dmi differ diff --git a/icons/mob/uniform.dmi b/icons/mob/uniform.dmi index 8a8039787bb..2bc4f1ddf18 100644 Binary files a/icons/mob/uniform.dmi and b/icons/mob/uniform.dmi differ diff --git a/icons/obj/clothing/suits.dmi b/icons/obj/clothing/suits.dmi index 638d1d48da5..3aeaa24ca7d 100644 Binary files a/icons/obj/clothing/suits.dmi and b/icons/obj/clothing/suits.dmi differ diff --git a/icons/obj/custom_items.dmi b/icons/obj/custom_items.dmi index bcaf7e5e7af..96061e3b4cd 100644 Binary files a/icons/obj/custom_items.dmi and b/icons/obj/custom_items.dmi differ