diff --git a/baystation12.dme b/baystation12.dme index 48908bfa19a..1ef5b5e21c4 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -887,6 +887,7 @@ #include "code\modules\client\preferences_savefile.dm" #include "code\modules\client\preferences_spawnpoints.dm" #include "code\modules\client\preferences_toggles.dm" +#include "code\modules\clothing\chameleon.dm" #include "code\modules\clothing\clothing.dm" #include "code\modules\clothing\ears\skrell.dm" #include "code\modules\clothing\glasses\glasses.dm" @@ -946,7 +947,6 @@ #include "code\modules\clothing\suits\storage.dm" #include "code\modules\clothing\suits\utility.dm" #include "code\modules\clothing\suits\wiz_robe.dm" -#include "code\modules\clothing\under\chameleon.dm" #include "code\modules\clothing\under\color.dm" #include "code\modules\clothing\under\miscellaneous.dm" #include "code\modules\clothing\under\shorts.dm" diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 45d6dd06247..424bf9057f1 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -40,13 +40,19 @@ 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. + var/icon_override = null //Used to override hardcoded clothing dmis in human clothing proc. var/item_state = null // Used to specify the item state for the on-mob overlays. - var/item_state_slots = null //overrides the default item_state for particular slots. + + //** These specify item/icon overrides for _slots_ + + var/list/item_state_slots = list() //overrides the default item_state for particular slots. // 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 + var/list/item_icons = list() + + //** These specify item/icon overrides for _species_ /* Species-specific sprites, concept stolen from Paradise//vg/. ex: @@ -55,13 +61,11 @@ ) If index term exists and icon_override is not set, this sprite sheet will be used. */ - var/list/sprite_sheets = null - var/icon_override = null //Used to override hardcoded clothing dmis in human clothing proc. + var/list/sprite_sheets = list() - /* Species-specific sprite sheets for inventory sprites - Works similarly to worn sprite_sheets, except the alternate sprites are used when the clothing/refit_for_species() proc is called. - */ - var/list/sprite_sheets_obj = null + // Species-specific sprite sheets for inventory sprites + // Works similarly to worn sprite_sheets, except the alternate sprites are used when the clothing/refit_for_species() proc is called. + var/list/sprite_sheets_obj = list() /obj/item/Destroy() if(ismob(loc)) diff --git a/code/game/objects/items/weapons/storage/uplink_kits.dm b/code/game/objects/items/weapons/storage/uplink_kits.dm index b33d72f6fbc..6b3fdd04ae5 100644 --- a/code/game/objects/items/weapons/storage/uplink_kits.dm +++ b/code/game/objects/items/weapons/storage/uplink_kits.dm @@ -139,8 +139,7 @@ new /obj/item/clothing/gloves/chameleon(src) new /obj/item/clothing/mask/chameleon(src) new /obj/item/clothing/glasses/chameleon(src) - new /obj/item/weapon/gun/projectile/chameleon(src) - new /obj/item/ammo_magazine/chameleon(src) + new /obj/item/weapon/gun/energy/chameleon(src) /obj/item/weapon/storage/box/syndie_kit/clerical name = "clerical kit" diff --git a/code/modules/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm new file mode 100644 index 00000000000..40851e16167 --- /dev/null +++ b/code/modules/clothing/chameleon.dm @@ -0,0 +1,410 @@ +//***************** +//**Cham Jumpsuit** +//***************** + +/obj/item/proc/disguise(var/newtype) + //this is necessary, unfortunately, as initial() does not play well with list vars + var/obj/item/copy = new newtype(null) //so that it is GCed once we exit + + desc = copy.desc + name = copy.name + icon_state = copy.icon_state + item_state = copy.item_state + body_parts_covered = copy.body_parts_covered + + item_icons = copy.item_icons.Copy() + item_state_slots = copy.item_state_slots.Copy() + sprite_sheets = copy.sprite_sheets.Copy() + //copying sprite_sheets_obj should be unnecessary as chameleon items are not refittable. + + return copy //for inheritance + +/proc/generate_chameleon_choices(var/basetype, var/blacklist=list()) + . = list() + + var/i = 1 //in case there is a collision with both name AND icon_state + for(var/typepath in typesof(basetype) - blacklist) + var/obj/O = typepath + if(initial(O.icon) && initial(O.icon_state)) + var/name = initial(O.name) + if(name in .) + name += " ([initial(O.icon_state)])" + if(name in .) + name += " \[[i++]\]" + .[name] = typepath + +/obj/item/clothing/under/chameleon +//starts off as black + name = "black jumpsuit" + icon_state = "black" + item_state = "bl_suit" + worn_state = "black" + desc = "It's a plain jumpsuit. It seems to have a small dial on the wrist." + origin_tech = list(TECH_ILLEGAL = 3) + var/global/list/clothing_choices + +/obj/item/clothing/under/chameleon/New() + ..() + if(!clothing_choices) + var/blocked = list(src.type, /obj/item/clothing/under/cloud, /obj/item/clothing/under/gimmick)//Prevent infinite loops and bad jumpsuits. + clothing_choices = generate_chameleon_choices(/obj/item/clothing/under, blocked) + +/obj/item/clothing/under/chameleon/emp_act(severity) + name = "psychedelic" + desc = "Groovy!" + icon_state = "psyche" + item_state_slots[slot_w_uniform_str] = "psyche" + update_icon() + update_clothing_icon() + +/obj/item/clothing/under/chameleon/verb/change(picked in clothing_choices) + set name = "Change Jumpsuit Appearance" + set category = "Chameleon Items" + set src in usr + + if(!ispath(clothing_choices[picked])) + return + + disguise(clothing_choices[picked]) + update_clothing_icon() //so our overlays update. + +//***************** +//**Chameleon Hat** +//***************** + +/obj/item/clothing/head/chameleon + name = "grey cap" + icon_state = "greysoft" + item_state = "greysoft" + desc = "It looks like a plain hat, but upon closer inspection, there's an advanced holographic array installed inside. It seems to have a small dial inside." + origin_tech = list(TECH_ILLEGAL = 3) + body_parts_covered = 0 + var/global/list/clothing_choices + +/obj/item/clothing/head/chameleon/New() + ..() + if(!clothing_choices) + var/blocked = list(src.type, /obj/item/clothing/head/justice,)//Prevent infinite loops and bad hats. + clothing_choices = generate_chameleon_choices(/obj/item/clothing/head, blocked) + +/obj/item/clothing/head/chameleon/emp_act(severity) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown. + name = "grey cap" + desc = "It's a baseball hat in a tasteful grey colour." + icon_state = "greysoft" + update_icon() + update_clothing_icon() + +/obj/item/clothing/head/chameleon/verb/change(picked in clothing_choices) + set name = "Change Hat/Helmet Appearance" + set category = "Chameleon Items" + set src in usr + + if(!ispath(clothing_choices[picked])) + return + + disguise(clothing_choices[picked]) + update_clothing_icon() //so our overlays update. + +//****************** +//**Chameleon Suit** +//****************** + +/obj/item/clothing/suit/chameleon + name = "armor" + icon_state = "armor" + item_state = "armor" + desc = "It appears to be a vest of standard armor, except this is embedded with a hidden holographic cloaker, allowing it to change it's appearance, but offering no protection.. It seems to have a small dial inside." + origin_tech = list(TECH_ILLEGAL = 3) + var/global/list/clothing_choices + +/obj/item/clothing/suit/chameleon/New() + ..() + if(!clothing_choices) + var/blocked = list(src.type, /obj/item/clothing/suit/cyborg_suit, /obj/item/clothing/suit/justice, /obj/item/clothing/suit/greatcoat) + clothing_choices = generate_chameleon_choices(/obj/item/clothing/suit, blocked) + +/obj/item/clothing/suit/chameleon/emp_act(severity) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown. + name = "armor" + desc = "An armored vest that protects against some damage." + icon_state = "armor" + update_icon() + update_clothing_icon() + +/obj/item/clothing/suit/chameleon/verb/change(picked in clothing_choices) + set name = "Change Oversuit Appearance" + set category = "Chameleon Items" + set src in usr + + if(!ispath(clothing_choices[picked])) + return + + disguise(clothing_choices[picked]) + update_clothing_icon() //so our overlays update. + +//******************* +//**Chameleon Shoes** +//******************* +/obj/item/clothing/shoes/chameleon + name = "black shoes" + icon_state = "black" + item_state = "black" + desc = "They're comfy black shoes, with clever cloaking technology built in. It seems to have a small dial on the back of each shoe." + origin_tech = list(TECH_ILLEGAL = 3) + var/global/list/clothing_choices + +/obj/item/clothing/shoes/chameleon/New() + ..() + if(!clothing_choices) + var/blocked = list(src.type, /obj/item/clothing/shoes/syndigaloshes, /obj/item/clothing/shoes/cyborg)//prevent infinite loops and bad shoes. + clothing_choices = generate_chameleon_choices(/obj/item/clothing/shoes, blocked) + +/obj/item/clothing/shoes/chameleon/emp_act(severity) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown. + name = "black shoes" + desc = "A pair of black shoes." + icon_state = "black" + item_state = "black" + update_icon() + update_clothing_icon() + +/obj/item/clothing/shoes/chameleon/verb/change(picked in clothing_choices) + set name = "Change Footwear Appearance" + set category = "Chameleon Items" + set src in usr + + if(!ispath(clothing_choices[picked])) + return + + disguise(clothing_choices[picked]) + update_clothing_icon() //so our overlays update. + +//********************** +//**Chameleon Backpack** +//********************** +/obj/item/weapon/storage/backpack/chameleon + name = "backpack" + icon_state = "backpack" + item_state = "backpack" + desc = "A backpack outfitted with cloaking tech. It seems to have a small dial inside, kept away from the storage." + origin_tech = list(TECH_ILLEGAL = 3) + var/global/list/clothing_choices + +/obj/item/weapon/storage/backpack/chameleon/New() + ..() + if(!clothing_choices) + var/blocked = list(src.type, /obj/item/weapon/storage/backpack/satchel/withwallet) + clothing_choices = generate_chameleon_choices(/obj/item/weapon/storage/backpack, blocked) + +/obj/item/weapon/storage/backpack/chameleon/emp_act(severity) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown. + name = "backpack" + desc = "You wear this on your back and put items into it." + icon_state = "backpack" + item_state = "backpack" + update_icon() + if (ismob(src.loc)) + var/mob/M = src.loc + M.update_inv_back() + +/obj/item/weapon/storage/backpack/chameleon/verb/change(picked in clothing_choices) + set name = "Change Backpack Appearance" + set category = "Chameleon Items" + set src in usr + + if(!ispath(clothing_choices[picked])) + return + + disguise(clothing_choices[picked]) + + //so our overlays update. + if (ismob(src.loc)) + var/mob/M = src.loc + M.update_inv_back() + +//******************** +//**Chameleon Gloves** +//******************** + +/obj/item/clothing/gloves/chameleon + name = "black gloves" + icon_state = "black" + item_state = "bgloves" + desc = "It looks like a pair of gloves, but it seems to have a small dial inside." + origin_tech = list(TECH_ILLEGAL = 3) + var/global/list/clothing_choices + +/obj/item/clothing/gloves/chameleon/New() + ..() + if(!clothing_choices) + clothing_choices = generate_chameleon_choices(/obj/item/clothing/gloves, list(src.type)) + +/obj/item/clothing/gloves/chameleon/emp_act(severity) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown. + name = "black gloves" + desc = "It looks like a pair of gloves, but it seems to have a small dial inside." + icon_state = "black" + update_icon() + update_clothing_icon() + +/obj/item/clothing/gloves/chameleon/verb/change(picked in clothing_choices) + set name = "Change Gloves Appearance" + set category = "Chameleon Items" + set src in usr + + if(!ispath(clothing_choices[picked])) + return + + disguise(clothing_choices[picked]) + update_clothing_icon() //so our overlays update. + +//****************** +//**Chameleon Mask** +//****************** + +/obj/item/clothing/mask/chameleon + name = "gas mask" + icon_state = "gas_alt" + item_state = "gas_alt" + desc = "It looks like a plain gask mask, but on closer inspection, it seems to have a small dial inside." + origin_tech = list(TECH_ILLEGAL = 3) + var/global/list/clothing_choices + +/obj/item/clothing/mask/chameleon/New() + ..() + if(!clothing_choices) + clothing_choices = generate_chameleon_choices(/obj/item/clothing/mask, list(src.type)) + +/obj/item/clothing/mask/chameleon/emp_act(severity) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown. + name = "gas mask" + desc = "It's a gas mask." + icon_state = "gas_alt" + update_icon() + update_clothing_icon() + +/obj/item/clothing/mask/chameleon/verb/change(picked in clothing_choices) + set name = "Change Mask Appearance" + set category = "Chameleon Items" + set src in usr + + if(!ispath(clothing_choices[picked])) + return + + disguise(clothing_choices[picked]) + update_clothing_icon() //so our overlays update. + +//********************* +//**Chameleon Glasses** +//********************* + +/obj/item/clothing/glasses/chameleon + name = "Optical Meson Scanner" + icon_state = "meson" + item_state = "glasses" + desc = "It looks like a plain set of mesons, but on closer inspection, it seems to have a small dial inside." + origin_tech = list(TECH_ILLEGAL = 3) + var/list/clothing_choices = list() + +/obj/item/clothing/glasses/chameleon/New() + ..() + if(!clothing_choices) + clothing_choices = generate_chameleon_choices(/obj/item/clothing/glasses, list(src.type)) + +/obj/item/clothing/glasses/chameleon/emp_act(severity) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown. + name = "Optical Meson Scanner" + desc = "It's a set of mesons." + icon_state = "meson" + update_icon() + update_clothing_icon() + +/obj/item/clothing/glasses/chameleon/verb/change(picked in clothing_choices) + set name = "Change Glasses Appearance" + set category = "Chameleon Items" + set src in usr + + if(!ispath(clothing_choices[picked])) + return + + disguise(clothing_choices[picked]) + update_clothing_icon() //so our overlays update. + +//***************** +//**Chameleon Gun** +//***************** +/obj/item/weapon/gun/energy/chameleon + name = "desert eagle" + desc = "A hologram projector in the shape of a gun. There is a dial on the side to change the gun's disguise." + icon_state = "deagle" + w_class = 3 + origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2, TECH_ILLEGAL = 8) + matter = list() + + fire_sound = 'sound/weapons/Gunshot.ogg' + projectile_type = /obj/item/projectile/chameleon + charge_meter = 0 + charge_cost = 20 //uses next to no power, since it's just holograms + max_shots = 50 + + var/obj/item/projectile/copy_projectile + var/global/list/gun_choices + +/obj/item/weapon/gun/energy/chameleon/New() + ..() + + if(!gun_choices) + gun_choices = list() + for(var/gun_type in typesof(/obj/item/weapon/gun/) - src.type) + var/obj/item/weapon/gun/G = gun_type + src.gun_choices[initial(G.name)] = gun_type + return + +/obj/item/weapon/gun/energy/chameleon/consume_next_projectile() + var/obj/item/projectile/P = ..() + if(P && ispath(copy_projectile)) + P.name = initial(copy_projectile.name) + P.icon = initial(copy_projectile.icon) + P.icon_state = initial(copy_projectile.icon_state) + P.pass_flags = initial(copy_projectile.pass_flags) + P.hitscan = initial(copy_projectile.hitscan) + P.step_delay = initial(copy_projectile.step_delay) + P.muzzle_type = initial(copy_projectile.muzzle_type) + P.tracer_type = initial(copy_projectile.tracer_type) + P.impact_type = initial(copy_projectile.impact_type) + return P + +/obj/item/weapon/gun/energy/chameleon/emp_act(severity) + name = "desert eagle" + desc = "It's a desert eagle." + icon_state = "deagle" + update_icon() + if (ismob(src.loc)) + var/mob/M = src.loc + M.update_inv_r_hand() + M.update_inv_l_hand() + +/obj/item/weapon/gun/energy/chameleon/disguise(var/newtype) + var/obj/item/weapon/gun/copy = ..() + + flags_inv = copy.flags_inv + fire_sound = copy.fire_sound + fire_sound_text = copy.fire_sound_text + + var/obj/item/weapon/gun/energy/E = copy + if(istype(E)) + copy_projectile = E.projectile_type + //charge_meter = E.charge_meter //does not work very well with icon_state changes, ATM + else + copy_projectile = null + //charge_meter = 0 + +/obj/item/weapon/gun/energy/chameleon/verb/change(picked in gun_choices) + set name = "Change Gun Appearance" + set category = "Chameleon Items" + set src in usr + + if(!ispath(gun_choices[picked])) + return + + disguise(gun_choices[picked]) + + //so our overlays update. + if (ismob(src.loc)) + var/mob/M = src.loc + M.update_inv_r_hand() + M.update_inv_l_hand() diff --git a/code/modules/clothing/under/chameleon.dm b/code/modules/clothing/under/chameleon.dm deleted file mode 100644 index 983145fd545..00000000000 --- a/code/modules/clothing/under/chameleon.dm +++ /dev/null @@ -1,456 +0,0 @@ -//***************** -//**Cham Jumpsuit** -//***************** - -/obj/item/clothing/under/chameleon -//starts off as black - name = "black jumpsuit" - icon_state = "black" - item_state = "bl_suit" - worn_state = "black" - desc = "It's a plain jumpsuit. It seems to have a small dial on the wrist." - origin_tech = list(TECH_ILLEGAL = 3) - var/list/clothing_choices = list() - -/obj/item/clothing/under/chameleon/New() - ..() - var/blocked = list(/obj/item/clothing/under/chameleon, /obj/item/clothing/under/cloud, /obj/item/clothing/under/gimmick)//Prevent infinite loops and bad jumpsuits. - for(var/U in typesof(/obj/item/clothing/under)-blocked) - var/obj/item/clothing/under/V = new U - src.clothing_choices[V.name] = U - return - -/obj/item/clothing/under/chameleon/emp_act(severity) - name = "psychedelic" - desc = "Groovy!" - icon_state = "psyche" - item_state_slots[slot_w_uniform_str] = "psyche" - update_icon() - update_clothing_icon() - -/obj/item/clothing/under/chameleon/verb/change() - set name = "Change Jumpsuit Appearance" - set category = "Object" - set src in usr - - var/picked = input("Select jumpsuit to change it to", "Chameleon Jumpsuit")as null|anything in clothing_choices - if(!picked || !clothing_choices[picked]) - return - var/newtype = clothing_choices[picked] - var/obj/item/clothing/under/A = new newtype - - desc = null - permeability_coefficient = 0.90 - - desc = A.desc - name = A.name - icon_state = A.icon_state - item_state = A.item_state - item_state_slots = A.item_state_slots - worn_state = A.worn_state - body_parts_covered = A.body_parts_covered - update_clothing_icon() //so our overlays update. - -//***************** -//**Chameleon Hat** -//***************** - -/obj/item/clothing/head/chameleon - name = "grey cap" - icon_state = "greysoft" - item_state = "greysoft" - desc = "It looks like a plain hat, but upon closer inspection, there's an advanced holographic array installed inside. It seems to have a small dial inside." - origin_tech = list(TECH_ILLEGAL = 3) - body_parts_covered = 0 - var/list/clothing_choices = list() - -/obj/item/clothing/head/chameleon/New() - ..() - var/blocked = list(/obj/item/clothing/head/chameleon,/obj/item/clothing/head/justice,)//Prevent infinite loops and bad hats. - for(var/U in typesof(/obj/item/clothing/head)-blocked) - var/obj/item/clothing/head/V = new U - src.clothing_choices[V.name] = U - return - -/obj/item/clothing/head/chameleon/emp_act(severity) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown. - name = "grey cap" - desc = "It's a baseball hat in a tasteful grey colour." - icon_state = "greysoft" - update_icon() - update_clothing_icon() - -/obj/item/clothing/head/chameleon/verb/change() - set name = "Change Hat/Helmet Appearance" - set category = "Object" - set src in usr - - var/picked = input("Select headwear to change it to", "Chameleon Hat")as null|anything in clothing_choices - if(!picked || !clothing_choices[picked]) - return - var/newtype = clothing_choices[picked] - var/obj/item/clothing/A = new newtype - - desc = null - permeability_coefficient = 0.90 - - desc = A.desc - name = A.name - icon_state = A.icon_state - item_state = A.item_state - flags_inv = A.flags_inv - body_parts_covered = A.body_parts_covered - update_clothing_icon() //so our overlays update. - -//****************** -//**Chameleon Suit** -//****************** - -/obj/item/clothing/suit/chameleon - name = "armor" - icon_state = "armor" - item_state = "armor" - desc = "It appears to be a vest of standard armor, except this is embedded with a hidden holographic cloaker, allowing it to change it's appearance, but offering no protection.. It seems to have a small dial inside." - origin_tech = list(TECH_ILLEGAL = 3) - var/list/clothing_choices = list() - -/obj/item/clothing/suit/chameleon/New() - ..() - var/blocked = list(/obj/item/clothing/suit/chameleon, /obj/item/clothing/suit/cyborg_suit, /obj/item/clothing/suit/justice, - /obj/item/clothing/suit/greatcoat)//Prevent infinite loops and bad suits. - for(var/U in typesof(/obj/item/clothing/suit)-blocked) - var/obj/item/clothing/suit/V = new U - src.clothing_choices[V.name] = U - return - -/obj/item/clothing/suit/chameleon/emp_act(severity) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown. - name = "armor" - desc = "An armored vest that protects against some damage." - icon_state = "armor" - update_icon() - update_clothing_icon() - -/obj/item/clothing/suit/chameleon/verb/change() - set name = "Change Exosuit Appearance" - set category = "Object" - set src in usr - - var/picked = input("Select exosuit to change it to", "Chameleon Exosuit")as null|anything in clothing_choices - if(!picked || !clothing_choices[picked]) - return - var/newtype = clothing_choices[picked] - var/obj/item/clothing/A = new newtype - - desc = null - permeability_coefficient = 0.90 - - desc = A.desc - name = A.name - icon_state = A.icon_state - item_state = A.item_state - flags_inv = A.flags_inv - body_parts_covered = A.body_parts_covered - update_clothing_icon() //so our overlays update. - -//******************* -//**Chameleon Shoes** -//******************* -/obj/item/clothing/shoes/chameleon - name = "black shoes" - icon_state = "black" - item_state = "black" - desc = "They're comfy black shoes, with clever cloaking technology built in. It seems to have a small dial on the back of each shoe." - origin_tech = list(TECH_ILLEGAL = 3) - var/list/clothing_choices = list() - -/obj/item/clothing/shoes/chameleon/New() - ..() - var/blocked = list(/obj/item/clothing/shoes/chameleon, /obj/item/clothing/shoes/syndigaloshes, /obj/item/clothing/shoes/cyborg)//prevent infinite loops and bad shoes. - for(var/U in typesof(/obj/item/clothing/shoes)-blocked) - var/obj/item/clothing/shoes/V = new U - src.clothing_choices[V.name] = U - return - -/obj/item/clothing/shoes/chameleon/emp_act(severity) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown. - name = "black shoes" - desc = "A pair of black shoes." - icon_state = "black" - item_state = "black" - update_icon() - update_clothing_icon() - -/obj/item/clothing/shoes/chameleon/verb/change() - set name = "Change Footwear Appearance" - set category = "Object" - set src in usr - - var/picked = input("Select shoes to change it to", "Chameleon Shoes")as null|anything in clothing_choices - if(!picked || !clothing_choices[picked]) - return - var/newtype = clothing_choices[picked] - var/obj/item/clothing/A = new newtype - - desc = null - permeability_coefficient = 0.90 - - desc = A.desc - name = A.name - icon_state = A.icon_state - item_state = A.item_state - update_clothing_icon() //so our overlays update. - -//********************** -//**Chameleon Backpack** -//********************** -/obj/item/weapon/storage/backpack/chameleon - name = "backpack" - icon_state = "backpack" - item_state = "backpack" - desc = "A backpack outfitted with cloaking tech. It seems to have a small dial inside, kept away from the storage." - origin_tech = list(TECH_ILLEGAL = 3) - var/list/clothing_choices = list() - -/obj/item/weapon/storage/backpack/chameleon/New() - ..() - var/blocked = list(/obj/item/weapon/storage/backpack/chameleon, /obj/item/weapon/storage/backpack/satchel/withwallet) - for(var/U in typesof(/obj/item/weapon/storage/backpack)-blocked)//Prevent infinite loops and bad backpacks. - var/obj/item/weapon/storage/backpack/V = new U - src.clothing_choices[V.name] = U - return - -/obj/item/weapon/storage/backpack/chameleon/emp_act(severity) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown. - name = "backpack" - desc = "You wear this on your back and put items into it." - icon_state = "backpack" - item_state = "backpack" - update_icon() - if (ismob(src.loc)) - var/mob/M = src.loc - M.update_inv_back() - -/obj/item/weapon/storage/backpack/chameleon/verb/change() - set name = "Change Backpack Appearance" - set category = "Object" - set src in usr - - var/picked = input("Select backpack to change it to", "Chameleon Backpack")as null|anything in clothing_choices - if(!picked || !clothing_choices[picked]) - return - var/newtype = clothing_choices[picked] - var/obj/item/weapon/storage/backpack/A = new newtype - - desc = null - permeability_coefficient = 0.90 - - desc = A.desc - name = A.name - icon_state = A.icon_state - item_state = A.item_state - - //so our overlays update. - if (ismob(src.loc)) - var/mob/M = src.loc - M.update_inv_back() - -//******************** -//**Chameleon Gloves** -//******************** - -/obj/item/clothing/gloves/chameleon - name = "black gloves" - icon_state = "black" - item_state = "bgloves" - desc = "It looks like a pair of gloves, but it seems to have a small dial inside." - origin_tech = list(TECH_ILLEGAL = 3) - var/list/clothing_choices = list() - -/obj/item/clothing/gloves/chameleon/New() - ..() - var/blocked = list(/obj/item/clothing/gloves/chameleon)//Prevent infinite loops and bad hats. - for(var/U in typesof(/obj/item/clothing/gloves)-blocked) - var/obj/item/clothing/gloves/V = new U - src.clothing_choices[V.name] = U - return - -/obj/item/clothing/gloves/chameleon/emp_act(severity) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown. - name = "black gloves" - desc = "It looks like a pair of gloves, but it seems to have a small dial inside." - icon_state = "black" - update_icon() - update_clothing_icon() - -/obj/item/clothing/gloves/chameleon/verb/change() - set name = "Change Gloves Appearance" - set category = "Object" - set src in usr - - var/picked = input("Select gloves to change it to", "Chameleon Gloves")as null|anything in clothing_choices - if(!picked || !clothing_choices[picked]) - return - var/newtype = clothing_choices[picked] - var/obj/item/clothing/A = new newtype - - desc = null - permeability_coefficient = 0.90 - - desc = A.desc - name = A.name - icon_state = A.icon_state - item_state = A.item_state - flags_inv = A.flags_inv - update_clothing_icon() //so our overlays update. - -//****************** -//**Chameleon Mask** -//****************** - -/obj/item/clothing/mask/chameleon - name = "gas mask" - icon_state = "gas_alt" - item_state = "gas_alt" - desc = "It looks like a plain gask mask, but on closer inspection, it seems to have a small dial inside." - origin_tech = list(TECH_ILLEGAL = 3) - var/list/clothing_choices = list() - -/obj/item/clothing/mask/chameleon/New() - ..() - var/blocked = list(/obj/item/clothing/mask/chameleon)//Prevent infinite loops and bad hats. - for(var/U in typesof(/obj/item/clothing/mask)-blocked) - var/obj/item/clothing/mask/V = new U - if(V) - src.clothing_choices[V.name] = U - return - -/obj/item/clothing/mask/chameleon/emp_act(severity) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown. - name = "gas mask" - desc = "It's a gas mask." - icon_state = "gas_alt" - update_icon() - update_clothing_icon() - -/obj/item/clothing/mask/chameleon/verb/change() - set name = "Change Mask Appearance" - set category = "Object" - set src in usr - - var/picked = input("Select mask to change it to", "Chameleon Mask")as null|anything in clothing_choices - if(!picked || !clothing_choices[picked]) - return - var/newtype = clothing_choices[picked] - var/obj/item/clothing/A = new newtype - - desc = null - permeability_coefficient = 0.90 - - desc = A.desc - name = A.name - icon_state = A.icon_state - item_state = A.item_state - flags_inv = A.flags_inv - body_parts_covered = A.body_parts_covered - update_clothing_icon() //so our overlays update. - -//********************* -//**Chameleon Glasses** -//********************* - -/obj/item/clothing/glasses/chameleon - name = "Optical Meson Scanner" - icon_state = "meson" - item_state = "glasses" - desc = "It looks like a plain set of mesons, but on closer inspection, it seems to have a small dial inside." - origin_tech = list(TECH_ILLEGAL = 3) - var/list/clothing_choices = list() - -/obj/item/clothing/glasses/chameleon/New() - ..() - var/blocked = list(/obj/item/clothing/glasses/chameleon)//Prevent infinite loops and bad hats. - for(var/U in typesof(/obj/item/clothing/glasses)-blocked) - var/obj/item/clothing/glasses/V = new U - src.clothing_choices[V.name] = U - return - -/obj/item/clothing/glasses/chameleon/emp_act(severity) //Because we don't have psych for all slots right now but still want a downside to EMP. In this case your cover's blown. - name = "Optical Meson Scanner" - desc = "It's a set of mesons." - icon_state = "meson" - update_icon() - update_clothing_icon() - -/obj/item/clothing/glasses/chameleon/verb/change() - set name = "Change Glasses Appearance" - set category = "Object" - set src in usr - - var/picked = input("Select glasses to change it to", "Chameleon Glasses")as null|anything in clothing_choices - if(!picked || !clothing_choices[picked]) - return - var/newtype = clothing_choices[picked] - var/obj/item/clothing/A = new newtype - - desc = null - permeability_coefficient = 0.90 - - desc = A.desc - name = A.name - icon_state = A.icon_state - item_state = A.item_state - flags_inv = A.flags_inv - update_clothing_icon() //so our overlays update. - -//***************** -//**Chameleon Gun** -//***************** -/obj/item/weapon/gun/projectile/chameleon - name = "desert eagle" - desc = "A fake Desert Eagle with a dial on the side to change the gun's disguise." - icon_state = "deagle" - w_class = 3.0 - max_shells = 7 - caliber = ".45" - origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2, TECH_ILLEGAL = 8) - ammo_type = "/obj/item/ammo_casing/chameleon" - matter = list() - var/list/gun_choices = list() - -/obj/item/weapon/gun/projectile/chameleon/New() - ..() - var/blocked = list(/obj/item/weapon/gun/projectile/chameleon) - for(var/U in typesof(/obj/item/weapon/gun/)-blocked) - var/obj/item/weapon/gun/V = new U - src.gun_choices[V.name] = U - return - -/obj/item/weapon/gun/projectile/chameleon/emp_act(severity) - name = "desert eagle" - desc = "It's a desert eagle." - icon_state = "deagle" - update_icon() - if (ismob(src.loc)) - var/mob/M = src.loc - M.update_inv_r_hand() - M.update_inv_l_hand() - -/obj/item/weapon/gun/projectile/chameleon/verb/change(picked in gun_choices) - set name = "Change Gun Appearance" - set category = "Object" - set src in usr - - if(!picked || !gun_choices[picked]) - return - var/newtype = gun_choices[picked] - var/obj/item/weapon/gun/A = new newtype - - desc = null - permeability_coefficient = 0.90 - - desc = A.desc - name = A.name - icon_state = A.icon_state - item_state = A.item_state - flags_inv = A.flags_inv - - //so our overlays update. - if (ismob(src.loc)) - var/mob/M = src.loc - M.update_inv_r_hand() - M.update_inv_l_hand() diff --git a/code/modules/examine/descriptions/weapons.dm b/code/modules/examine/descriptions/weapons.dm index 0ae44c1dcbc..0323d7c6bc9 100644 --- a/code/modules/examine/descriptions/weapons.dm +++ b/code/modules/examine/descriptions/weapons.dm @@ -53,12 +53,12 @@ then click where you want to fire. To reload, click the weapon in your hand to unload (if needed), then add the appropiate ammo. The description \ will tell you what caliber you need." -/obj/item/weapon/gun/projectile/chameleon +/obj/item/weapon/gun/energy/chameleon description_info = null //The chameleon gun adopts the description_info of the weapon it is impersonating as, to make meta-ing harder. description_antag = "This gun can alter its appearance to mimick other weapons. To change the appearance, use the appropriate verb in the object tab. \ The ammo loaded by default makes the gun useless for actual combat." -/obj/item/weapon/gun/projectile/chameleon/change(picked in gun_choices) //Making the gun change its help text to match the weapon's help text. +/obj/item/weapon/gun/energy/chameleon/change(picked in gun_choices) //Making the gun change its help text to match the weapon's help text. ..(picked) var/obj/O = gun_choices[picked] description_info = initial(O.description_info) diff --git a/code/modules/projectiles/ammunition/boxes.dm b/code/modules/projectiles/ammunition/boxes.dm index e909263d7b4..ac0dde64c08 100644 --- a/code/modules/projectiles/ammunition/boxes.dm +++ b/code/modules/projectiles/ammunition/boxes.dm @@ -192,33 +192,3 @@ max_ammo = 20 multiple_sprites = 1 -/obj/item/ammo_magazine/chameleon - name = "magazine (.45)" - icon_state = "45" - mag_type = MAGAZINE - caliber = ".45" - ammo_type = /obj/item/ammo_casing/chameleon - max_ammo = 7 - multiple_sprites = 1 - matter = list() - -/obj/item/ammo_magazine/chameleon/empty - initial_ammo = 0 - -/* -//unused garbage - -/obj/item/ammo_magazine/a418 - name = "ammo box (.418)" - icon_state = "418" - ammo_type = "/obj/item/ammo_casing/a418" - max_ammo = 7 - multiple_sprites = 1 - -/obj/item/ammo_magazine/a666 - name = "ammo box (.666)" - icon_state = "666" - ammo_type = "/obj/item/ammo_casing/a666" - max_ammo = 4 - multiple_sprites = 1 -*/ diff --git a/code/modules/projectiles/ammunition/bullets.dm b/code/modules/projectiles/ammunition/bullets.dm index 4bb8cbf10fc..ce22fd271f3 100644 --- a/code/modules/projectiles/ammunition/bullets.dm +++ b/code/modules/projectiles/ammunition/bullets.dm @@ -158,21 +158,3 @@ icon_state = "rocketshell" projectile_type = /obj/item/missile caliber = "rocket" - -/obj/item/ammo_casing/chameleon - name = "chameleon bullets" - desc = "A set of bullets for the Chameleon Gun." - projectile_type = /obj/item/projectile/bullet/chameleon - caliber = ".45" - -/* -/obj/item/ammo_casing/a418 - desc = "A .418 bullet casing." - caliber = "357" - projectile_type = /obj/item/projectile/bullet/suffocationbullet - -/obj/item/ammo_casing/a666 - desc = "A .666 bullet casing." - caliber = "357" - projectile_type = /obj/item/projectile/bullet/cyanideround -*/ \ No newline at end of file diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm index 2a7fdad6475..05b4fd3de35 100644 --- a/code/modules/projectiles/guns/energy.dm +++ b/code/modules/projectiles/guns/energy.dm @@ -36,7 +36,6 @@ fire_sound = isnull(current_mode.fire_sound)? initial(fire_sound) : current_mode.fire_sound update_icon() - update_held_icon() /obj/item/weapon/gun/energy/emp_act(severity) ..() @@ -115,4 +114,4 @@ icon_state = "[modifystate][ratio]" else icon_state = "[initial(icon_state)][ratio]" - + update_held_icon() diff --git a/code/modules/projectiles/projectile/bullets.dm b/code/modules/projectiles/projectile/bullets.dm index 06e0a02c1f4..a090fc31c09 100644 --- a/code/modules/projectiles/projectile/bullets.dm +++ b/code/modules/projectiles/projectile/bullets.dm @@ -182,10 +182,6 @@ damage = 1 embed = 0 -/obj/item/projectile/bullet/chameleon - damage = 1 // stop trying to murderbone with a fake gun dumbass!!! - embed = 0 // nope - /* Practice */ /obj/item/projectile/bullet/pistol/practice diff --git a/code/modules/projectiles/projectile/special.dm b/code/modules/projectiles/projectile/special.dm index 9ef0aea43c5..ca3aa2bbaff 100644 --- a/code/modules/projectiles/projectile/special.dm +++ b/code/modules/projectiles/projectile/special.dm @@ -150,3 +150,12 @@ spawn qdel(src) return + +/obj/item/projectile/chameleon + name = "bullet" + icon_state = "bullet" + damage = 1 // stop trying to murderbone with a fake gun dumbass!!! + embed = 0 // nope + nodamage = 1 + damage_type = HALLOSS + muzzle_type = /obj/effect/projectile/bullet/muzzle