diff --git a/code/game/machinery/bots/ed209bot.dm b/code/game/machinery/bots/ed209bot.dm index f225b9ce8d..a955efaa1f 100644 --- a/code/game/machinery/bots/ed209bot.dm +++ b/code/game/machinery/bots/ed209bot.dm @@ -84,7 +84,7 @@ lasercolor = "r" else if( istype(W, /obj/item/clothing/suit/bluetag) ) lasercolor = "b" - if( lasercolor || istype(W, /obj/item/clothing/suit/armor/vest) ) + if( lasercolor || istype(W, /obj/item/clothing/suit/storage/vest) ) user.drop_item() del(W) build_step++ diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index b52c5930f9..6ad970dcbe 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -40,6 +40,11 @@ var/zoomdevicename = null //name used for message when binoculars/scope is used var/zoom = 0 //1 if item is actively being used to zoom. For scoped guns and binoculars. + // Used to specify the icon file to be used when the item is worn. If not set the default icon for that slot will be used. + // If icon_override or sprite_sheets are set they will take precendence over this, assuming they apply to the slot in question. + // Only slot_l_hand/slot_r_hand are implemented at the moment. Others to be implemented as needed. + var/list/item_icons = null + /* Species-specific sprites, concept stolen from Paradise//vg/. ex: sprite_sheets = list( @@ -58,6 +63,15 @@ /obj/item/device icon = 'icons/obj/device.dmi' +//Checks if the item is being held by a mob, and if so, updates the held icons +/obj/item/proc/update_held_icon() + if(ismob(src.loc)) + var/mob/M = src.loc + if(M.l_hand == src) + M.update_inv_l_hand() + if(M.r_hand == src) + M.update_inv_r_hand() + /obj/item/ex_act(severity) switch(severity) if(1.0) diff --git a/code/modules/admin/verbs/BrokenInhands.dm b/code/modules/admin/verbs/BrokenInhands.dm index 43f6d0b793..914ba1b5df 100644 --- a/code/modules/admin/verbs/BrokenInhands.dm +++ b/code/modules/admin/verbs/BrokenInhands.dm @@ -1,7 +1,7 @@ /proc/getbrokeninhands() - var/icon/IL = new('icons/mob/items_lefthand.dmi') + var/icon/IL = new('icons/mob/items/lefthand.dmi') var/list/Lstates = IL.IconStates() - var/icon/IR = new('icons/mob/items_righthand.dmi') + var/icon/IR = new('icons/mob/items/righthand.dmi') var/list/Rstates = IR.IconStates() diff --git a/code/modules/clothing/spacesuits/alien.dm b/code/modules/clothing/spacesuits/alien.dm index 1436e4e4a2..23ba1d0c55 100644 --- a/code/modules/clothing/spacesuits/alien.dm +++ b/code/modules/clothing/spacesuits/alien.dm @@ -45,21 +45,15 @@ siemens_coefficient = 0.6 heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECTION_TEMPERATURE - species_restricted = list("Vox", "Vox Armalis") - sprite_sheets = list( - "Vox" = 'icons/mob/species/vox/suit.dmi', - "Vox Armalis" = 'icons/mob/species/armalis/suit.dmi', - ) + species_restricted = list("Vox") + sprite_sheets = list("Vox" = 'icons/mob/species/vox/suit.dmi') /obj/item/clothing/head/helmet/space/vox armor = list(melee = 60, bullet = 50, laser = 30, energy = 15, bomb = 30, bio = 30, rad = 30) siemens_coefficient = 0.6 flags = HEADCOVERSEYES|STOPPRESSUREDAMAGE - species_restricted = list("Vox","Vox Armalis") - sprite_sheets = list( - "Vox" = 'icons/mob/species/vox/head.dmi', - "Vox Armalis" = 'icons/mob/species/armalis/head.dmi', - ) + species_restricted = list("Vox") + sprite_sheets = list("Vox" = 'icons/mob/species/vox/head.dmi') /obj/item/clothing/head/helmet/space/vox/pressure name = "alien helmet" @@ -137,22 +131,15 @@ siemens_coefficient = 0 permeability_coefficient = 0.05 item_color = "gloves-vox" - species_restricted = list("Vox","Vox Armalis") - sprite_sheets = list( - "Vox" = 'icons/mob/species/vox/gloves.dmi', - "Vox Armalis" = 'icons/mob/species/armalis/gloves.dmi', - ) + species_restricted = list("Vox") + sprite_sheets = list("Vox" = 'icons/mob/species/vox/gloves.dmi') /obj/item/clothing/shoes/magboots/vox desc = "A pair of heavy, jagged armoured foot pieces, seemingly suitable for a velociraptor." name = "vox magclaws" item_state = "boots-vox" icon_state = "boots-vox" - - species_restricted = list("Vox","Vox Armalis") - sprite_sheets = list( - "Vox Armalis" = 'icons/mob/species/armalis/feet.dmi' - ) + species_restricted = list("Vox") action_button_name = "Toggle the magclaws" diff --git a/code/modules/clothing/spacesuits/rig/modules/combat.dm b/code/modules/clothing/spacesuits/rig/modules/combat.dm index b106e41255..a9f7f53f8c 100644 --- a/code/modules/clothing/spacesuits/rig/modules/combat.dm +++ b/code/modules/clothing/spacesuits/rig/modules/combat.dm @@ -85,7 +85,7 @@ desc = "A shoulder-mounted battery-powered laser cannon mount." selectable = 1 usable = 1 - use_power_cost = 10 + module_cooldown = 0 engage_string = "Configure" diff --git a/code/modules/mob/living/carbon/human/human_species.dm b/code/modules/mob/living/carbon/human/human_species.dm index 49f1bd4eee..f7a644646d 100644 --- a/code/modules/mob/living/carbon/human/human_species.dm +++ b/code/modules/mob/living/carbon/human/human_species.dm @@ -18,10 +18,6 @@ h_style = "Short Vox Quills" ..(new_loc, "Vox") -/mob/living/carbon/human/voxarmalis/New(var/new_loc) - h_style = "Bald" - ..(new_loc, "Vox Armalis") - /mob/living/carbon/human/diona/New(var/new_loc) ..(new_loc, "Diona") diff --git a/code/modules/mob/living/carbon/human/species/outsider/vox.dm b/code/modules/mob/living/carbon/human/species/outsider/vox.dm index bf007450e3..ff99a53995 100644 --- a/code/modules/mob/living/carbon/human/species/outsider/vox.dm +++ b/code/modules/mob/living/carbon/human/species/outsider/vox.dm @@ -54,44 +54,3 @@ /datum/species/vox/get_random_name(var/gender) var/datum/language/species_language = all_languages[default_language] return species_language.get_random_name(gender) - -/datum/species/vox/armalis - name = "Vox Armalis" - name_plural = "Vox" - icobase = 'icons/mob/human_races/r_armalis.dmi' - deform = 'icons/mob/human_races/r_armalis.dmi' - rarity_value = 10 - - warning_low_pressure = 50 - hazard_low_pressure = 0 - - cold_level_1 = 80 - cold_level_2 = 50 - cold_level_3 = 0 - - heat_level_1 = 2000 - heat_level_2 = 3000 - heat_level_3 = 4000 - - brute_mod = 0.2 - burn_mod = 0.2 - - eyes = "blank_eyes" - breath_type = "nitrogen" - poison_type = "oxygen" - - flags = IS_RESTRICTED | NO_SCAN | NO_BLOOD | NO_PAIN | HAS_EYE_COLOR - - blood_color = "#2299FC" - flesh_color = "#808D11" - - tail = "armalis_tail" - icon_template = 'icons/mob/human_races/r_armalis.dmi' - - reagent_tag = IS_VOX - - inherent_verbs = list( - /mob/living/carbon/human/proc/leap, - /mob/living/carbon/human/proc/gut, - /mob/living/carbon/human/proc/commune - ) \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index dadebe8c57..e8089c1577 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -854,37 +854,47 @@ var/global/list/damage_icon_parts = list() /mob/living/carbon/human/update_inv_r_hand(var/update_icons=1) if(r_hand) r_hand.screen_loc = ui_rhand //TODO + + var/t_icon = INV_R_HAND_DEF_ICON + if(r_hand.item_icons && (icon_r_hand in r_hand.item_icons)) + t_icon = r_hand.item_icons[icon_r_hand] + var/t_state = r_hand.item_state //useful for clothing that changes icon_state but retains the same sprite on the mob when held in hand if(!t_state) t_state = r_hand.icon_state - if(r_hand.icon_override) t_state = "[t_state]_r" overlays_standing[R_HAND_LAYER] = image("icon" = r_hand.icon_override, "icon_state" = "[t_state]") else - overlays_standing[R_HAND_LAYER] = image("icon" = 'icons/mob/items_righthand.dmi', "icon_state" = "[t_state]") + overlays_standing[R_HAND_LAYER] = image("icon" = t_icon, "icon_state" = "[t_state]") if (handcuffed) drop_r_hand() else overlays_standing[R_HAND_LAYER] = null - if(update_icons) update_icons() + + if(update_icons) update_icons() /mob/living/carbon/human/update_inv_l_hand(var/update_icons=1) if(l_hand) l_hand.screen_loc = ui_lhand //TODO + + var/t_icon = INV_L_HAND_DEF_ICON + if(l_hand.item_icons && (icon_l_hand in l_hand.item_icons)) + t_icon = l_hand.item_icons[icon_l_hand] + var/t_state = l_hand.item_state //useful for clothing that changes icon_state but retains the same sprite on the mob when held in hand if(!t_state) t_state = l_hand.icon_state - if(l_hand.icon_override) t_state = "[t_state]_l" overlays_standing[L_HAND_LAYER] = image("icon" = l_hand.icon_override, "icon_state" = "[t_state]") else - overlays_standing[L_HAND_LAYER] = image("icon" = 'icons/mob/items_lefthand.dmi', "icon_state" = "[t_state]") + overlays_standing[L_HAND_LAYER] = image("icon" = t_icon, "icon_state" = "[t_state]") if (handcuffed) drop_l_hand() else overlays_standing[L_HAND_LAYER] = null - if(update_icons) update_icons() + + if(update_icons) update_icons() /mob/living/carbon/human/proc/update_tail_showing(var/update_icons=1) overlays_standing[TAIL_LAYER] = null diff --git a/code/modules/mob/living/carbon/monkey/update_icons.dm b/code/modules/mob/living/carbon/monkey/update_icons.dm new file mode 100644 index 0000000000..1b3da8f49a --- /dev/null +++ b/code/modules/mob/living/carbon/monkey/update_icons.dm @@ -0,0 +1,141 @@ +//Monkey Overlays Indexes//////// +#define M_MASK_LAYER 1 +#define M_BACK_LAYER 2 +#define M_HANDCUFF_LAYER 3 +#define M_L_HAND_LAYER 4 +#define M_R_HAND_LAYER 5 +#define TARGETED_LAYER 6 +#define M_FIRE_LAYER 6 +#define M_TOTAL_LAYERS 7 +///////////////////////////////// + +/mob/living/carbon/monkey + var/list/overlays_lying[M_TOTAL_LAYERS] + var/list/overlays_standing[M_TOTAL_LAYERS] + +/mob/living/carbon/monkey/regenerate_icons() + ..() + update_inv_wear_mask(0) + update_inv_back(0) + update_inv_r_hand(0) + update_inv_l_hand(0) + update_inv_handcuffed(0) + update_fire(0) + update_icons() + //Hud Stuff + update_hud() + return + +/mob/living/carbon/monkey/update_icons() + update_hud() + lying_prev = lying //so we don't update overlays for lying/standing unless our stance changes again + overlays.Cut() + for(var/image/I in overlays_standing) + overlays += I + + if(lying) + var/matrix/M = matrix() + M.Turn(90) + M.Translate(1,-6) + src.transform = M + else + var/matrix/M = matrix() + src.transform = M + + +//////// +/mob/living/carbon/monkey/update_inv_wear_mask(var/update_icons=1) + if( wear_mask && istype(wear_mask, /obj/item/clothing/mask) ) + overlays_standing[M_MASK_LAYER] = image("icon" = 'icons/mob/monkey.dmi', "icon_state" = "[wear_mask.icon_state]") + wear_mask.screen_loc = ui_monkey_mask + else + overlays_standing[M_MASK_LAYER] = null + if(update_icons) update_icons() + + +/mob/living/carbon/monkey/update_inv_r_hand(var/update_icons=1) + if(r_hand) + var/t_icon = INV_R_HAND_DEF_ICON + if(r_hand.item_icons && (icon_r_hand in r_hand.item_icons)) + t_icon = r_hand.item_icons[icon_r_hand] + + var/t_state = r_hand.item_state + if(!t_state) t_state = r_hand.icon_state + + overlays_standing[M_R_HAND_LAYER] = image("icon" = t_icon, "icon_state" = t_state) + r_hand.screen_loc = ui_rhand + if (handcuffed) drop_r_hand() + else + overlays_standing[M_R_HAND_LAYER] = null + + if(update_icons) update_icons() + + +/mob/living/carbon/monkey/update_inv_l_hand(var/update_icons=1) + if(l_hand) + var/t_icon = INV_L_HAND_DEF_ICON + if(l_hand.item_icons && (icon_l_hand in l_hand.item_icons)) + t_icon = l_hand.item_icons[icon_l_hand] + + var/t_state = l_hand.item_state + if(!t_state) t_state = l_hand.icon_state + + overlays_standing[M_L_HAND_LAYER] = image("icon" = t_icon, "icon_state" = t_state) + l_hand.screen_loc = ui_lhand + if (handcuffed) drop_l_hand() + else + overlays_standing[M_L_HAND_LAYER] = null + + if(update_icons) update_icons() + + +/mob/living/carbon/monkey/update_inv_back(var/update_icons=1) + if(back) + overlays_standing[M_BACK_LAYER] = image("icon" = 'icons/mob/back.dmi', "icon_state" = "[back.icon_state]") + back.screen_loc = ui_monkey_back + else + overlays_standing[M_BACK_LAYER] = null + if(update_icons) update_icons() + + +/mob/living/carbon/monkey/update_inv_handcuffed(var/update_icons=1) + if(handcuffed) + drop_r_hand() + drop_l_hand() + stop_pulling() + overlays_standing[M_HANDCUFF_LAYER] = image("icon" = 'icons/mob/monkey.dmi', "icon_state" = "handcuff1") + else + overlays_standing[M_HANDCUFF_LAYER] = null + if(update_icons) update_icons() + + +/mob/living/carbon/monkey/update_hud() + if (client) + client.screen |= contents + +//Call when target overlay should be added/removed +/mob/living/carbon/monkey/update_targeted(var/update_icons=1) + if (targeted_by && target_locked) + overlays_standing[TARGETED_LAYER] = target_locked + else if (!targeted_by && target_locked) + del(target_locked) + if (!targeted_by) + overlays_standing[TARGETED_LAYER] = null + if(update_icons) update_icons() + +/mob/living/carbon/monkey/update_fire(var/update_icons=1) + if(on_fire) + overlays_standing[M_FIRE_LAYER] = image("icon"='icons/mob/OnFire.dmi', "icon_state"="Standing", "layer"= -M_FIRE_LAYER) + else + overlays_standing[M_FIRE_LAYER] = null + if(update_icons) update_icons() +//Monkey Overlays Indexes//////// +#undef M_MASK_LAYER +#undef M_BACK_LAYER +#undef M_HANDCUFF_LAYER +#undef M_L_HAND_LAYER +#undef M_R_HAND_LAYER +#undef TARGETED_LAYER +#undef M_FIRE_LAYER +#undef M_TOTAL_LAYERS + diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index d040c03e55..da5b73e9cc 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -528,11 +528,11 @@ default behaviour is: //pull damage with injured people if(prob(25)) M.adjustBruteLoss(1) - visible_message("\red \The [M]'s wounds open more from being dragged!") + visible_message("\The [M]'s [M.isSynthetic() ? "state worsens": "wounds open more"] from being dragged!") if(M.pull_damage()) if(prob(25)) M.adjustBruteLoss(2) - visible_message("\red \The [M]'s wounds worsen terribly from being dragged!") + visible_message("\The [M]'s [M.isSynthetic() ? "state" : "wounds"] worsen terribly from being dragged!") var/turf/location = M.loc if (istype(location, /turf/simulated)) location.add_blood(M) diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 4f83216e81..eef5557ff0 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -92,13 +92,22 @@ /mob/living/silicon/ai/isAI() return 1 - -/mob/proc/isRobot() + +/mob/proc/isRobot() return 0 /mob/living/silicon/robot/isRobot() return 1 +/mob/proc/isSynthetic() + return 0 + +/mob/living/carbon/human/isSynthetic() + return species.flags & IS_SYNTHETIC + +/mob/living/silicon/isSynthetic() + return 1 + /proc/ispAI(A) if(istype(A, /mob/living/silicon/pai)) return 1 diff --git a/code/modules/mob/new_player/preferences_setup.dm b/code/modules/mob/new_player/preferences_setup.dm index d25b66210e..bc17680e0c 100644 --- a/code/modules/mob/new_player/preferences_setup.dm +++ b/code/modules/mob/new_player/preferences_setup.dm @@ -375,7 +375,7 @@ datum/preferences if(LAWYER) clothes_s = new /icon('icons/mob/uniform.dmi', "internalaffairs_s") clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY) - clothes_s.Blend(new /icon('icons/mob/items_righthand.dmi', "briefcase"), ICON_UNDERLAY) + clothes_s.Blend(new /icon(INV_R_HAND_DEF_ICON, "briefcase"), ICON_UNDERLAY) if(prob(1)) clothes_s.Blend(new /icon('icons/mob/suit.dmi', "suitjacket_blue"), ICON_OVERLAY) switch(backbag) @@ -534,7 +534,7 @@ datum/preferences clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY) clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_OVERLAY) if(prob(1)) - clothes_s.Blend(new /icon('icons/mob/items_righthand.dmi', "toolbox_blue"), ICON_OVERLAY) + clothes_s.Blend(new /icon(INV_R_HAND_DEF_ICON, "toolbox_blue"), ICON_OVERLAY) switch(backbag) if(2) clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY) @@ -620,7 +620,7 @@ datum/preferences clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY) clothes_s.Blend(new /icon('icons/mob/head.dmi', "hardhat0_white"), ICON_OVERLAY) if(prob(1)) - clothes_s.Blend(new /icon('icons/mob/items_righthand.dmi', "blueprints"), ICON_OVERLAY) + clothes_s.Blend(new /icon(INV_R_HAND_DEF_ICON, "blueprints"), ICON_OVERLAY) switch(backbag) if(2) clothes_s.Blend(new /icon('icons/mob/back.dmi', "engiepack"), ICON_OVERLAY) diff --git a/code/modules/mob/update_icons.dm b/code/modules/mob/update_icons.dm index a6ae6dc4a0..480c4be322 100644 --- a/code/modules/mob/update_icons.dm +++ b/code/modules/mob/update_icons.dm @@ -1,6 +1,11 @@ //Most of these are defined at this level to reduce on checks elsewhere in the code. //Having them here also makes for a nice reference list of the various overlay-updating procs available +//default item on-mob icons +#define INV_L_HAND_DEF_ICON 'icons/mob/items/lefthand.dmi' +#define INV_R_HAND_DEF_ICON 'icons/mob/items/righthand.dmi' + + /mob/proc/regenerate_icons() //TODO: phase this out completely if possible return diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 8df7969d8d..871ac5395a 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -3,6 +3,10 @@ name = "gun" desc = "Its a gun. It's pretty terrible, though." icon = 'icons/obj/gun.dmi' + item_icons = list( + icon_l_hand = 'icons/mob/items/lefthand_guns.dmi', + icon_r_hand = 'icons/mob/items/righthand_guns.dmi', + ) icon_state = "detective" item_state = "gun" flags = CONDUCT @@ -134,10 +138,7 @@ handle_post_fire(user, target, pointblank, reflex) update_icon() - if(user.hand) - user.update_inv_l_hand() - else - user.update_inv_r_hand() + update_held_icon() //obtains the next projectile to fire diff --git a/code/modules/projectiles/guns/alien.dm b/code/modules/projectiles/guns/alien.dm index db590d7b9f..9f611e593d 100644 --- a/code/modules/projectiles/guns/alien.dm +++ b/code/modules/projectiles/guns/alien.dm @@ -40,7 +40,7 @@ /obj/item/weapon/gun/launcher/spikethrower/special_check(user) if(istype(user,/mob/living/carbon/human)) var/mob/living/carbon/human/H = user - if(H.species && H.species.name != "Vox" && H.species.name != "Vox Armalis") + if(H.species && H.species.name != "Vox") user << "\The [src] does not respond to you!" return 0 return ..() @@ -52,56 +52,3 @@ if(spikes < 1) return null spikes-- return new /obj/item/weapon/spike(src) - -//This gun only functions for armalis. The on-sprite is too huge to render properly on other sprites. -/obj/item/weapon/gun/energy/noisecannon - name = "alien heavy cannon" - desc = "It's some kind of enormous alien weapon, as long as a man is tall." - - icon = 'icons/obj/gun.dmi' //Actual on-sprite is handled by icon_override. - icon_state = "noisecannon" - item_state = "noisecannon" - recoil = 1 - - force = 10 - projectile_type = /obj/item/projectile/energy/sonic - cell_type = /obj/item/weapon/cell/super - fire_delay = 40 - fire_sound = 'sound/effects/basscannon.ogg' - - var/mode = 1 - - sprite_sheets = list( - "Vox Armalis" = 'icons/mob/species/armalis/held.dmi' - ) - -/obj/item/weapon/gun/energy/noisecannon/attack_hand(mob/user as mob) - if(loc != user) - var/mob/living/carbon/human/H = user - if(istype(H)) - if(H.species.name == "Vox Armalis") - ..() - return - user << "\The [src] is far too large for you to pick up." - return - -/obj/item/weapon/gun/energy/noisecannon/update_icon() - return - -//Projectile. -/obj/item/projectile/energy/sonic - name = "distortion" - icon = 'icons/obj/machines/particle_accelerator2.dmi' - icon_state = "particle" - damage = 60 - damage_type = BRUTE - check_armour = "bullet" - pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE - - embed = 0 - weaken = 5 - stun = 5 - -/obj/item/projectile/energy/sonic/proc/split() - //TODO: create two more projectiles to either side of this one, fire at targets to the side of target turf. - return diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm index 19f1157371..994256b12a 100644 --- a/code/modules/projectiles/guns/energy.dm +++ b/code/modules/projectiles/guns/energy.dm @@ -29,6 +29,7 @@ power_supply.give(power_supply.maxcharge) if(self_recharge) processing_objects.Add(src) + update_icon() /obj/item/weapon/gun/energy/Del() if(self_recharge) @@ -87,3 +88,4 @@ icon_state = "[modifystate][ratio]" else icon_state = "[initial(icon_state)][ratio]" + diff --git a/code/modules/projectiles/guns/energy/laser.dm b/code/modules/projectiles/guns/energy/laser.dm index 2bc36508d8..dffc012998 100644 --- a/code/modules/projectiles/guns/energy/laser.dm +++ b/code/modules/projectiles/guns/energy/laser.dm @@ -24,16 +24,18 @@ obj/item/weapon/gun/energy/retro name = "retro laser" icon_state = "retro" + item_state = "retro" desc = "An older model of the basic lasergun, no longer used by Nanotrasen's security or military forces. Nevertheless, it is still quite deadly and easy to maintain, making it a favorite amongst pirates and other outlaws." fire_sound = 'sound/weapons/Laser.ogg' slot_flags = SLOT_BELT w_class = 3 projectile_type = /obj/item/projectile/beam - fire_delay = 10 + fire_delay = 10 //old technology /obj/item/weapon/gun/energy/captain name = "antique laser gun" icon_state = "caplaser" + item_state = "caplaser" desc = "This is an antique laser gun. All craftsmanship is of the highest quality. It is decorated with assistant leather and chrome. The object menaces with spikes of energy. On the item is an image of Space Station 13. The station is exploding." force = 5 fire_sound = 'sound/weapons/Laser.ogg' @@ -48,7 +50,7 @@ obj/item/weapon/gun/energy/retro name = "laser cannon" desc = "With the laser cannon, the lasing medium is enclosed in a tube lined with uranium-235 and subjected to high neutron flux in a nuclear reactor core. This incredible technology may help YOU achieve high excitation rates with small laser volumes!" icon_state = "lasercannon" - item_state = "laser" + item_state = null fire_sound = 'sound/weapons/lasercannonfire.ogg' origin_tech = "combat=4;materials=3;powerstorage=3" slot_flags = SLOT_BELT|SLOT_BACK @@ -57,6 +59,7 @@ obj/item/weapon/gun/energy/retro fire_delay = 20 /obj/item/weapon/gun/energy/lasercannon/mounted + name = "mounted laser cannon" self_recharge = 1 use_external_power = 1 recharge_time = 10 @@ -65,6 +68,7 @@ obj/item/weapon/gun/energy/retro name = "xray laser gun" desc = "A high-power laser gun capable of expelling concentrated xray blasts." icon_state = "xray" + item_state = "xray" fire_sound = 'sound/weapons/laser3.ogg' origin_tech = "combat=5;materials=3;magnets=2;syndicate=2" projectile_type = /obj/item/projectile/beam/xray @@ -116,10 +120,12 @@ obj/item/weapon/gun/energy/retro /obj/item/weapon/gun/energy/lasertag/blue icon_state = "bluetag" + item_state = "bluetag" projectile_type = /obj/item/projectile/beam/lastertag/blue required_vest = /obj/item/clothing/suit/bluetag /obj/item/weapon/gun/energy/lasertag/red icon_state = "redtag" + item_state = "redtag" projectile_type = /obj/item/projectile/beam/lastertag/red required_vest = /obj/item/clothing/suit/redtag diff --git a/code/modules/projectiles/guns/energy/nuclear.dm b/code/modules/projectiles/guns/energy/nuclear.dm index e2b97672c7..6b9f6f0d51 100644 --- a/code/modules/projectiles/guns/energy/nuclear.dm +++ b/code/modules/projectiles/guns/energy/nuclear.dm @@ -29,12 +29,10 @@ projectile_type = /obj/item/projectile/beam/stun modifystate = "energystun" update_icon() - if(user.l_hand == src) - user.update_inv_l_hand() - else - user.update_inv_r_hand() + update_held_icon() /obj/item/weapon/gun/energy/gun/mounted + name = "mounted energy gun" self_recharge = 1 use_external_power = 1 diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm index 434156ad53..c7f74e1d95 100644 --- a/code/modules/projectiles/guns/energy/special.dm +++ b/code/modules/projectiles/guns/energy/special.dm @@ -26,6 +26,7 @@ name = "biological demolecularisor" desc = "A gun that discharges high amounts of controlled radiation to slowly break a target into component elements." icon_state = "decloner" + item_state = "decloner" fire_sound = 'sound/weapons/pulse3.ogg' origin_tech = "combat=5;materials=4;powerstorage=3" charge_cost = 100 @@ -35,7 +36,7 @@ name = "floral somatoray" desc = "A tool that discharges controlled radiation which induces mutation in plant cells." icon_state = "floramut100" - item_state = "obj/item/gun.dmi" + item_state = "floramut" fire_sound = 'sound/effects/stealthoff.ogg' charge_cost = 100 projectile_type = /obj/item/projectile/energy/floramut @@ -59,7 +60,7 @@ projectile_type = /obj/item/projectile/energy/floramut modifystate = "floramut" update_icon() - return + update_held_icon() /obj/item/weapon/gun/energy/floragun/afterattack(obj/target, mob/user, adjacent_flag) //allow shooting into adjacent hydrotrays regardless of intent @@ -115,6 +116,7 @@ name = "staff of change" desc = "An artefact that spits bolts of coruscating energy which cause the target's very form to reshape itself" icon = 'icons/obj/gun.dmi' + item_icons = null icon_state = "staffofchange" item_state = "staffofchange" fire_sound = 'sound/weapons/emitter.ogg' @@ -168,6 +170,7 @@ obj/item/weapon/gun/energy/staff/focus desc = "It's a cute rubber duck. With an evil gleam in it's eye." projectile_type = /obj/item/projectile/icarus/pointdefense icon = 'icons/obj/watercloset.dmi' + item_icons = null icon_state = "rubberducky" item_state = "rubberducky" charge_cost = 0 diff --git a/code/modules/projectiles/guns/energy/stun.dm b/code/modules/projectiles/guns/energy/stun.dm index a99b71337a..1d51f7957e 100644 --- a/code/modules/projectiles/guns/energy/stun.dm +++ b/code/modules/projectiles/guns/energy/stun.dm @@ -9,10 +9,12 @@ cell_type = /obj/item/weapon/cell/crap /obj/item/weapon/gun/energy/taser/mounted + name = "mounted taser gun" self_recharge = 1 use_external_power = 1 /obj/item/weapon/gun/energy/taser/mounted/cyborg + name = "taser gun" cell_type = /obj/item/weapon/cell/secborg recharge_time = 10 //Time it takes for shots to recharge (in ticks) @@ -21,6 +23,7 @@ name = "stun revolver" desc = "A high-tech revolver that fires stun cartridges. The stun cartridges can be recharged using a conventional energy weapon recharger." icon_state = "stunrevolver" + item_state = "stunrevolver" fire_sound = 'sound/weapons/Gunshot.ogg' origin_tech = "combat=3;materials=3;powerstorage=2" charge_cost = 125 diff --git a/code/modules/projectiles/guns/launcher/syringe_gun.dm b/code/modules/projectiles/guns/launcher/syringe_gun.dm index 75c015d579..099f8687a3 100644 --- a/code/modules/projectiles/guns/launcher/syringe_gun.dm +++ b/code/modules/projectiles/guns/launcher/syringe_gun.dm @@ -133,4 +133,5 @@ name = "syringe gun revolver" desc = "A modification of the syringe gun design, using a rotating cylinder to store up to five syringes. The spring still needs to be drawn between shots." icon_state = "rapidsyringegun" + item_state = "rapidsyringegun" max_darts = 5 diff --git a/code/modules/projectiles/guns/projectile/automatic.dm b/code/modules/projectiles/guns/projectile/automatic.dm index 5778b3febe..75bbf810a8 100644 --- a/code/modules/projectiles/guns/projectile/automatic.dm +++ b/code/modules/projectiles/guns/projectile/automatic.dm @@ -51,7 +51,7 @@ name = "\improper STS-35 automatic rifle" desc = "A durable, rugged looking automatic weapon of a make popular on the frontier worlds. Uses 7.62mm rounds. It is unmarked." icon_state = "arifle" - item_state = "l6closednomag" //placeholder + item_state = null w_class = 4 force = 10 caliber = "a762" @@ -63,12 +63,13 @@ /obj/item/weapon/gun/projectile/automatic/sts35/update_icon() ..() icon_state = (ammo_magazine)? "arifle-0" : "arifle" + update_held_icon() /obj/item/weapon/gun/projectile/automatic/wt550 name = "\improper W-T 550 Saber" desc = "A cheap, mass produced Ward-Takahashi PDW. Uses 9mm rounds." icon_state = "wt550" - item_state = "c20r" //placeholder + item_state = "wt550" w_class = 3 caliber = "9mm" origin_tech = "combat=5;materials=2" @@ -90,7 +91,7 @@ name = "\improper Z8 Bulldog" desc = "An older model bullpup carbine, made by the now defunct Zendai Foundries. Uses armor piercing 5.56mm rounds. Makes you feel like a space marine when you hold it." icon_state = "carbine" - item_state = "l6closednomag" //placeholder + item_state = "z8carbine" w_class = 4 force = 10 caliber = "a556" diff --git a/code/modules/projectiles/guns/projectile/dartgun.dm b/code/modules/projectiles/guns/projectile/dartgun.dm index a8f93b8d25..cf05a005ed 100644 --- a/code/modules/projectiles/guns/projectile/dartgun.dm +++ b/code/modules/projectiles/guns/projectile/dartgun.dm @@ -45,6 +45,7 @@ name = "dart gun" desc = "A small gas-powered dartgun, capable of delivering chemical cocktails swiftly across short distances." icon_state = "dartgun-empty" + item_state = null caliber = "dart" fire_sound = 'sound/weapons/empty.ogg' diff --git a/code/modules/projectiles/guns/projectile/pistol.dm b/code/modules/projectiles/guns/projectile/pistol.dm index adbf30922d..b29f2f3e42 100644 --- a/code/modules/projectiles/guns/projectile/pistol.dm +++ b/code/modules/projectiles/guns/projectile/pistol.dm @@ -63,6 +63,7 @@ name = "desert eagle" desc = "A robust handgun that uses .50 AE ammo" icon_state = "deagle" + item_state = "deagle" force = 14.0 caliber = ".50" load_method = MAGAZINE @@ -107,6 +108,7 @@ name = "\improper Stechtkin pistol" desc = "A small, easily concealable gun. Uses 9mm rounds." icon_state = "pistol" + item_state = null w_class = 2 caliber = "9mm" silenced = 0 diff --git a/code/modules/projectiles/guns/projectile/revolver.dm b/code/modules/projectiles/guns/projectile/revolver.dm index fb5895aad9..f0291de0f8 100644 --- a/code/modules/projectiles/guns/projectile/revolver.dm +++ b/code/modules/projectiles/guns/projectile/revolver.dm @@ -2,6 +2,7 @@ name = "revolver" desc = "A classic revolver. Uses .357 ammo" icon_state = "revolver" + item_state = "revolver" caliber = "357" origin_tech = "combat=2;materials=2" handle_casings = CYCLE_CASINGS diff --git a/code/modules/projectiles/guns/projectile/shotgun.dm b/code/modules/projectiles/guns/projectile/shotgun.dm index fd85bc28be..fa29d7e8ba 100644 --- a/code/modules/projectiles/guns/projectile/shotgun.dm +++ b/code/modules/projectiles/guns/projectile/shotgun.dm @@ -42,6 +42,7 @@ /obj/item/weapon/gun/projectile/shotgun/pump/combat name = "combat shotgun" icon_state = "cshotgun" + item_state = "cshotgun" origin_tech = "combat=5;materials=2" max_shells = 7 //match the ammo box capacity, also it can hold a round in the chamber anyways, for a total of 8. ammo_type = /obj/item/ammo_casing/shotgun @@ -51,7 +52,7 @@ name = "double-barreled shotgun" desc = "A true classic." icon_state = "dshotgun" - item_state = "shotgun" + item_state = "dshotgun" //SPEEDLOADER because rapid unloading. //In principle someone could make a speedloader for it, so it makes sense. load_method = SINGLE_CASING|SPEEDLOADER diff --git a/code/modules/reagents/reagent_containers/pill.dm b/code/modules/reagents/reagent_containers/pill.dm index cbae0f8f40..4d23bb30ed 100644 --- a/code/modules/reagents/reagent_containers/pill.dm +++ b/code/modules/reagents/reagent_containers/pill.dm @@ -249,8 +249,8 @@ reagents.add_reagent("synaptizine", 5) reagents.add_reagent("hyperzine", 5) - /obj/item/weapon/reagent_containers/pill/spaceacillin - name = "Spaceacillin" +/obj/item/weapon/reagent_containers/pill/spaceacillin + name = "Spaceacillin pill" desc = "Contains antiviral agents." icon_state = "pill19" New() diff --git a/code/modules/spells/spellbook.dm b/code/modules/spells/spellbook.dm index 66ba38726e..6236f8c35a 100644 --- a/code/modules/spells/spellbook.dm +++ b/code/modules/spells/spellbook.dm @@ -26,18 +26,18 @@ dat += "