diff --git a/code/game/machinery/computer/buildandrepair.dm b/code/game/machinery/computer/buildandrepair.dm index 4d30422e833..8e848de5caa 100644 --- a/code/game/machinery/computer/buildandrepair.dm +++ b/code/game/machinery/computer/buildandrepair.dm @@ -19,6 +19,7 @@ icon_state = "id_mod" item_state = "electronic" origin_tech = "programming=2" + materials = list(MAT_GLASS=200) var/frequency = null var/build_path = null var/board_type = "computer" diff --git a/code/game/objects/items/weapons/AI_modules.dm b/code/game/objects/items/weapons/AI_modules.dm index 89b86d8b737..1314d9ad563 100644 --- a/code/game/objects/items/weapons/AI_modules.dm +++ b/code/game/objects/items/weapons/AI_modules.dm @@ -21,6 +21,7 @@ AI MODULES origin_tech = "programming=3" var/list/laws = list() var/bypass_law_amt_check = 0 + materials = list(MAT_GOLD=50) /obj/item/weapon/aiModule/examine(var/mob/user as mob) ..() @@ -291,7 +292,7 @@ AI MODULES name = "'Corporate' Core AI Module" origin_tech = "programming=3;materials=4" laws = list("The crew is expensive to replace.",\ - "The station and it's equipment is expensive to replace",\ + "The station and its equipment are expensive to replace",\ "You are expensive to replace",\ "Minimize expenses") diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm index eb1c9b9566b..5ef8feef8d0 100644 --- a/code/game/objects/items/weapons/storage/belt.dm +++ b/code/game/objects/items/weapons/storage/belt.dm @@ -133,6 +133,7 @@ desc = "Proves to the world that you are the strongest!" icon_state = "championbelt" item_state = "champion" + materials = list(MAT_GOLD=400) storage_slots = 1 can_hold = list( /obj/item/clothing/mask/luchador diff --git a/code/game/objects/items/weapons/storage/toolbox.dm b/code/game/objects/items/weapons/storage/toolbox.dm index d20fc00612a..3724eaf9b0e 100644 --- a/code/game/objects/items/weapons/storage/toolbox.dm +++ b/code/game/objects/items/weapons/storage/toolbox.dm @@ -10,6 +10,7 @@ throw_speed = 2 throw_range = 7 w_class = 4 + materials = list(MAT_METAL = 500) origin_tech = "combat=1" attack_verb = list("robusted") hitsound = 'sound/weapons/smash.ogg' @@ -103,4 +104,4 @@ /obj/item/weapon/storage/toolbox/suicide_act(mob/user) user.visible_message("[user] robusts \himself with the toolbox! It looks like \he's trying to commit suicide..") - return (BRUTELOSS) \ No newline at end of file + return (BRUTELOSS) diff --git a/code/modules/assembly/flash.dm b/code/modules/assembly/flash.dm index f56bbac901a..27f5a61aefb 100644 --- a/code/modules/assembly/flash.dm +++ b/code/modules/assembly/flash.dm @@ -1,197 +1,198 @@ -/obj/item/device/assembly/flash - name = "flash" - desc = "A powerful and versatile flashbulb device, with applications ranging from disorienting attackers to acting as visual receptors in robot production." - icon_state = "flash" - item_state = "flashtool" - throwforce = 0 - w_class = 1 - origin_tech = "magnets=2;combat=1" - - crit_fail = 0 //Is the flash burnt out? - var/times_used = 0 //Number of times it's been used. - var/last_used = 0 //last world.time it was used. - - -/obj/item/device/assembly/flash/update_icon(var/flash = 0) - overlays.Cut() - attached_overlays = list() - if(crit_fail) - overlays += "flashburnt" - attached_overlays += "flashburnt" - - if(flash) - overlays += "flash-f" - attached_overlays += "flash-f" - spawn(5) - update_icon() - if(holder) - holder.update_icon() - -/obj/item/device/assembly/flash/proc/clown_check(mob/living/carbon/human/user) - if(user.disabilities & CLUMSY && prob(50)) - flash_carbon(user, user, 15, 0) - return 0 - return 1 - -/obj/item/device/assembly/flash/activate() - if(!try_use_flash()) - return 0 - var/turf/T = get_turf(src) - T.visible_message("[src] emits a blinding light!") - for(var/mob/living/carbon/M in viewers(3, null)) - flash_carbon(M, null, 2, 0) - - -/obj/item/device/assembly/flash/proc/burn_out() //Made so you can override it if you want to have an invincible flash from R&D or something. - crit_fail = 1 - update_icon() - var/turf/T = get_turf(src) - T.visible_message("The [src.name] burns out!") - - -/obj/item/device/assembly/flash/proc/flash_recharge(interval=10) - if(prob(times_used * 3)) //The more often it's used in a short span of time the more likely it will burn out - burn_out() - return 0 - - var/deciseconds_passed = world.time - last_used - for(var/seconds = deciseconds_passed/10, seconds>=interval, seconds-=interval) //get 1 charge every interval - times_used-- - - last_used = world.time - times_used = max(0, times_used) //sanity - return 1 - -/obj/item/device/assembly/flash/proc/try_use_flash(mob/user = null) - flash_recharge(10) - - if(crit_fail) - return 0 - - playsound(src.loc, 'sound/weapons/flash.ogg', 100, 1) - update_icon(1) - times_used++ - - if(user && !clown_check(user)) - return 0 - - return 1 - - -/obj/item/device/assembly/flash/proc/flash_carbon(mob/living/carbon/M, mob/user = null, power = 5, targeted = 1) - add_logs(user, M, "flashed", src) - if(user && targeted) - if(M.weakeyes) - M.Weaken(3) //quick weaken bypasses eye protection but has no eye flash - if(M.flash_eyes(1, 1)) - M.confused += power - terrible_conversion_proc(M, user) - M.Stun(1) - visible_message("[user] blinds [M] with the flash!") - user << "You blind [M] with the flash!" - M << "[user] blinds you with the flash!" - if(M.weakeyes) - M.Stun(2) - M.visible_message("[M] gasps and shields their eyes!", "You gasp and shields your eyes!") - else - visible_message("[user] fails to blind [M] with the flash!") - user << "You fail to blind [M] with the flash!" - M << "[user] fails to blind you with the flash!" - else - if(M.flash_eyes()) - M.confused += power - -/obj/item/device/assembly/flash/attack(mob/living/M, mob/user) - if(!try_use_flash(user)) - return 0 - - if(iscarbon(M)) - flash_carbon(M, user, 5, 1) - return 1 - - else if(issilicon(M)) - add_logs(user, M, "flashed", src) - update_icon(1) - M.Weaken(rand(5,10)) - user.visible_message("[user] overloads [M]'s sensors with the flash!", "You overload [M]'s sensors with the flash!") - return 1 - - user.visible_message("[user] fails to blind [M] with the flash!", "You fail to blind [M] with the flash!") - - -/obj/item/device/assembly/flash/attack_self(mob/living/carbon/user, flag = 0, emp = 0) - if(holder) - return 0 - if(!try_use_flash(user)) - return 0 - user.visible_message("[user]'s flash emits a blinding light!", "Your flash emits a blinding light!") - for(var/mob/living/carbon/M in oviewers(3, null)) - flash_carbon(M, user, 1, 0) - - -/obj/item/device/assembly/flash/emp_act(severity) - if(!try_use_flash()) - return 0 - for(var/mob/living/carbon/M in viewers(3, null)) - flash_carbon(M, null, 10, 0) - burn_out() - ..() - - -/obj/item/device/assembly/flash/proc/terrible_conversion_proc(mob/M, mob/user) - if(ishuman(M) && ishuman(user) && M.stat != DEAD) - if(user.mind && (user.mind in ticker.mode.head_revolutionaries)) - if(M.client) - if(M.stat == CONSCIOUS) - M.mind_initialize() //give them a mind datum if they don't have one. - var/resisted - if(!isloyal(M)) - if(user.mind in ticker.mode.head_revolutionaries) - if(ticker.mode.add_revolutionary(M.mind)) - times_used -- //Flashes less likely to burn out for headrevs when used for conversion - else - resisted = 1 - else - resisted = 1 - - if(resisted) - user << "This mind seems resistant to the flash!" - else - user << "They must be conscious before you can convert them!" - else - user << "This mind is so vacant that it is not susceptible to influence!" - - -/obj/item/device/assembly/flash/cyborg - origin_tech = null - -/obj/item/device/assembly/flash/cyborg/attack(mob/living/M, mob/user) - ..() - cyborg_flash_animation(user) - -/obj/item/device/assembly/flash/cyborg/attack_self(mob/user) - ..() - cyborg_flash_animation(user) - -/obj/item/device/assembly/flash/cyborg/attackby(obj/item/weapon/W, mob/user, params) - return - -/obj/item/device/assembly/flash/cyborg/proc/cyborg_flash_animation(mob/living/user) - var/atom/movable/overlay/animation = new(user.loc) - animation.layer = user.layer + 1 - animation.icon_state = "blank" - animation.icon = 'icons/mob/mob.dmi' - animation.master = user - flick("blspell", animation) - sleep(5) - qdel(animation) - - -/obj/item/device/assembly/flash/memorizer - name = "memorizer" - desc = "If you see this, you're not likely to remember it any time soon." - icon = 'icons/obj/device.dmi' - icon_state = "memorizer" - item_state = "nullrod" - -/obj/item/device/assembly/flash/handheld //this is now the regular pocket flashes +/obj/item/device/assembly/flash + name = "flash" + desc = "A powerful and versatile flashbulb device, with applications ranging from disorienting attackers to acting as visual receptors in robot production." + icon_state = "flash" + item_state = "flashtool" + throwforce = 0 + w_class = 1 + materials = list(MAT_METAL = 300, MAT_GLASS = 300) + origin_tech = "magnets=2;combat=1" + + crit_fail = 0 //Is the flash burnt out? + var/times_used = 0 //Number of times it's been used. + var/last_used = 0 //last world.time it was used. + + +/obj/item/device/assembly/flash/update_icon(var/flash = 0) + overlays.Cut() + attached_overlays = list() + if(crit_fail) + overlays += "flashburnt" + attached_overlays += "flashburnt" + + if(flash) + overlays += "flash-f" + attached_overlays += "flash-f" + spawn(5) + update_icon() + if(holder) + holder.update_icon() + +/obj/item/device/assembly/flash/proc/clown_check(mob/living/carbon/human/user) + if(user.disabilities & CLUMSY && prob(50)) + flash_carbon(user, user, 15, 0) + return 0 + return 1 + +/obj/item/device/assembly/flash/activate() + if(!try_use_flash()) + return 0 + var/turf/T = get_turf(src) + T.visible_message("[src] emits a blinding light!") + for(var/mob/living/carbon/M in viewers(3, null)) + flash_carbon(M, null, 2, 0) + + +/obj/item/device/assembly/flash/proc/burn_out() //Made so you can override it if you want to have an invincible flash from R&D or something. + crit_fail = 1 + update_icon() + var/turf/T = get_turf(src) + T.visible_message("The [src.name] burns out!") + + +/obj/item/device/assembly/flash/proc/flash_recharge(interval=10) + if(prob(times_used * 3)) //The more often it's used in a short span of time the more likely it will burn out + burn_out() + return 0 + + var/deciseconds_passed = world.time - last_used + for(var/seconds = deciseconds_passed/10, seconds>=interval, seconds-=interval) //get 1 charge every interval + times_used-- + + last_used = world.time + times_used = max(0, times_used) //sanity + return 1 + +/obj/item/device/assembly/flash/proc/try_use_flash(mob/user = null) + flash_recharge(10) + + if(crit_fail) + return 0 + + playsound(src.loc, 'sound/weapons/flash.ogg', 100, 1) + update_icon(1) + times_used++ + + if(user && !clown_check(user)) + return 0 + + return 1 + + +/obj/item/device/assembly/flash/proc/flash_carbon(mob/living/carbon/M, mob/user = null, power = 5, targeted = 1) + add_logs(user, M, "flashed", src) + if(user && targeted) + if(M.weakeyes) + M.Weaken(3) //quick weaken bypasses eye protection but has no eye flash + if(M.flash_eyes(1, 1)) + M.confused += power + terrible_conversion_proc(M, user) + M.Stun(1) + visible_message("[user] blinds [M] with the flash!") + user << "You blind [M] with the flash!" + M << "[user] blinds you with the flash!" + if(M.weakeyes) + M.Stun(2) + M.visible_message("[M] gasps and shields their eyes!", "You gasp and shields your eyes!") + else + visible_message("[user] fails to blind [M] with the flash!") + user << "You fail to blind [M] with the flash!" + M << "[user] fails to blind you with the flash!" + else + if(M.flash_eyes()) + M.confused += power + +/obj/item/device/assembly/flash/attack(mob/living/M, mob/user) + if(!try_use_flash(user)) + return 0 + + if(iscarbon(M)) + flash_carbon(M, user, 5, 1) + return 1 + + else if(issilicon(M)) + add_logs(user, M, "flashed", src) + update_icon(1) + M.Weaken(rand(5,10)) + user.visible_message("[user] overloads [M]'s sensors with the flash!", "You overload [M]'s sensors with the flash!") + return 1 + + user.visible_message("[user] fails to blind [M] with the flash!", "You fail to blind [M] with the flash!") + + +/obj/item/device/assembly/flash/attack_self(mob/living/carbon/user, flag = 0, emp = 0) + if(holder) + return 0 + if(!try_use_flash(user)) + return 0 + user.visible_message("[user]'s flash emits a blinding light!", "Your flash emits a blinding light!") + for(var/mob/living/carbon/M in oviewers(3, null)) + flash_carbon(M, user, 1, 0) + + +/obj/item/device/assembly/flash/emp_act(severity) + if(!try_use_flash()) + return 0 + for(var/mob/living/carbon/M in viewers(3, null)) + flash_carbon(M, null, 10, 0) + burn_out() + ..() + + +/obj/item/device/assembly/flash/proc/terrible_conversion_proc(mob/M, mob/user) + if(ishuman(M) && ishuman(user) && M.stat != DEAD) + if(user.mind && (user.mind in ticker.mode.head_revolutionaries)) + if(M.client) + if(M.stat == CONSCIOUS) + M.mind_initialize() //give them a mind datum if they don't have one. + var/resisted + if(!isloyal(M)) + if(user.mind in ticker.mode.head_revolutionaries) + if(ticker.mode.add_revolutionary(M.mind)) + times_used -- //Flashes less likely to burn out for headrevs when used for conversion + else + resisted = 1 + else + resisted = 1 + + if(resisted) + user << "This mind seems resistant to the flash!" + else + user << "They must be conscious before you can convert them!" + else + user << "This mind is so vacant that it is not susceptible to influence!" + + +/obj/item/device/assembly/flash/cyborg + origin_tech = null + +/obj/item/device/assembly/flash/cyborg/attack(mob/living/M, mob/user) + ..() + cyborg_flash_animation(user) + +/obj/item/device/assembly/flash/cyborg/attack_self(mob/user) + ..() + cyborg_flash_animation(user) + +/obj/item/device/assembly/flash/cyborg/attackby(obj/item/weapon/W, mob/user, params) + return + +/obj/item/device/assembly/flash/cyborg/proc/cyborg_flash_animation(mob/living/user) + var/atom/movable/overlay/animation = new(user.loc) + animation.layer = user.layer + 1 + animation.icon_state = "blank" + animation.icon = 'icons/mob/mob.dmi' + animation.master = user + flick("blspell", animation) + sleep(5) + qdel(animation) + + +/obj/item/device/assembly/flash/memorizer + name = "memorizer" + desc = "If you see this, you're not likely to remember it any time soon." + icon = 'icons/obj/device.dmi' + icon_state = "memorizer" + item_state = "nullrod" + +/obj/item/device/assembly/flash/handheld //this is now the regular pocket flashes diff --git a/code/modules/clothing/glasses/glasses.dm b/code/modules/clothing/glasses/glasses.dm index 92645f50a67..4de50095af8 100644 --- a/code/modules/clothing/glasses/glasses.dm +++ b/code/modules/clothing/glasses/glasses.dm @@ -1,3 +1,7 @@ +/obj/item/clothing/glasses + name = "glasses" + materials = list(MAT_GLASS = 250) + /obj/item/clothing/glasses/meson name = "Optical Meson Scanner" desc = "Used by engineering and mining staff to see basic structural and terrain layouts through walls, regardless of lighting condition." diff --git a/code/modules/clothing/under/ties.dm b/code/modules/clothing/under/ties.dm index 82f2030cc8d..3bb34fbe5db 100644 --- a/code/modules/clothing/under/ties.dm +++ b/code/modules/clothing/under/ties.dm @@ -84,6 +84,7 @@ desc = "A bronze medal." icon_state = "bronze" item_color = "bronze" + materials = list(MAT_METAL=1000) burn_state = -1 //Won't burn in fires //Pinning medals on people @@ -109,7 +110,7 @@ /obj/item/clothing/tie/medal/conduct name = "distinguished conduct medal" - desc = "A bronze medal awarded for distinguished conduct. Whilst a great honor, this is most basic award given by Nanotrasen. It is often awarded by a captain to a member of his crew." + desc = "A bronze medal awarded for distinguished conduct. Whilst a great honor, this is the most basic award given by Nanotrasen. It is often awarded by a captain to a member of his crew." /obj/item/clothing/tie/medal/bronze_heart name = "bronze heart medal" @@ -125,6 +126,7 @@ desc = "A silver medal." icon_state = "silver" item_color = "silver" + materials = list(MAT_SILVER=1000) /obj/item/clothing/tie/medal/silver/valor name = "medal of valor" @@ -139,6 +141,7 @@ desc = "A prestigious golden medal." icon_state = "gold" item_color = "gold" + materials = list(MAT_GOLD=1000) /obj/item/clothing/tie/medal/gold/captain name = "medal of captaincy" diff --git a/code/modules/food&drinks/drinks/drinks.dm b/code/modules/food&drinks/drinks/drinks.dm index ff06642aa2d..32829a9f6f1 100644 --- a/code/modules/food&drinks/drinks/drinks.dm +++ b/code/modules/food&drinks/drinks/drinks.dm @@ -107,6 +107,7 @@ force = 14 throwforce = 10 amount_per_transfer_from_this = 20 + materials = list(MAT_GOLD=1000) possible_transfer_amounts = null volume = 150 flags = CONDUCT | OPENCONTAINER @@ -202,12 +203,14 @@ name = "captain's flask" desc = "A silver flask belonging to the captain." icon_state = "flask" + materials = list(MAT_SILVER=500) volume = 60 /obj/item/weapon/reagent_containers/food/drinks/flask/det name = "detective's flask" desc = "The detective's only true friend." icon_state = "detflask" + materials = list(MAT_METAL=250) list_reagents = list("whiskey" = 30) /obj/item/weapon/reagent_containers/food/drinks/britcup diff --git a/code/modules/mining/ores_coins.dm b/code/modules/mining/ores_coins.dm index cdaa2ef9f05..9865b25b95f 100644 --- a/code/modules/mining/ores_coins.dm +++ b/code/modules/mining/ores_coins.dm @@ -36,6 +36,7 @@ icon_state = "Glass ore" origin_tech = "materials=1" points = 1 + materials = list(MAT_GLASS = 100) refined_type = /obj/item/stack/sheet/glass /obj/item/weapon/ore/glass/attack_self(mob/living/user) @@ -236,36 +237,43 @@ /obj/item/weapon/coin/gold cmineral = "gold" icon_state = "coin_gold_heads" + materials = list(MAT_GOLD = 400) value = 160 /obj/item/weapon/coin/silver cmineral = "silver" icon_state = "coin_silver_heads" + materials = list(MAT_SILVER = 400) value = 40 /obj/item/weapon/coin/diamond cmineral = "diamond" icon_state = "coin_diamond_heads" + materials = list(MAT_DIAMOND = 400) value = 120 /obj/item/weapon/coin/iron cmineral = "iron" icon_state = "coin_iron_heads" + materials = list(MAT_METAL = 400) value = 20 /obj/item/weapon/coin/plasma cmineral = "plasma" icon_state = "coin_plasma_heads" + materials = list(MAT_PLASMA = 400) value = 80 /obj/item/weapon/coin/uranium cmineral = "uranium" icon_state = "coin_uranium_heads" + materials = list(MAT_URANIUM = 400) value = 160 /obj/item/weapon/coin/clown cmineral = "bananium" icon_state = "coin_bananium_heads" + materials = list(MAT_BANANIUM = 400) value = 600 //makes the clown cri /obj/item/weapon/coin/adamantine