Conflicts:
	code/modules/mob/living/living.dm
This commit is contained in:
mwerezak
2015-05-22 19:38:04 -04:00
241 changed files with 3903 additions and 3373 deletions

View File

@@ -20,4 +20,5 @@ script:
- shopt -s globstar
- (! grep 'step_[xy]' maps/**/*.dmm)
- (! find nano/templates/ -type f -exec md5sum {} + | sort | uniq -D -w 32 | grep nano)
- ( md5sum -c - <<< "0af969f671fba6cf9696c78cd175a14a *baystation12.int")
- DreamMaker baystation12.dme

View File

@@ -597,9 +597,6 @@
#include "code\game\objects\items\stacks\sheets\glass.dm"
#include "code\game\objects\items\stacks\sheets\leather.dm"
#include "code\game\objects\items\stacks\sheets\light.dm"
#include "code\game\objects\items\stacks\sheets\mineral.dm"
#include "code\game\objects\items\stacks\sheets\sheet_types.dm"
#include "code\game\objects\items\stacks\sheets\sheets.dm"
#include "code\game\objects\items\stacks\tiles\light.dm"
#include "code\game\objects\items\stacks\tiles\plasteel.dm"
#include "code\game\objects\items\stacks\tiles\tile_types.dm"
@@ -617,6 +614,7 @@
#include "code\game\objects\items\weapons\flamethrower.dm"
#include "code\game\objects\items\weapons\gift_wrappaper.dm"
#include "code\game\objects\items\weapons\handcuffs.dm"
#include "code\game\objects\items\weapons\improvised_components.dm"
#include "code\game\objects\items\weapons\kitchen.dm"
#include "code\game\objects\items\weapons\manuals.dm"
#include "code\game\objects\items\weapons\mop.dm"
@@ -627,7 +625,6 @@
#include "code\game\objects\items\weapons\RCD.dm"
#include "code\game\objects\items\weapons\RSF.dm"
#include "code\game\objects\items\weapons\scrolls.dm"
#include "code\game\objects\items\weapons\shards.dm"
#include "code\game\objects\items\weapons\shields.dm"
#include "code\game\objects\items\weapons\stunbaton.dm"
#include "code\game\objects\items\weapons\surgery_tools.dm"
@@ -635,7 +632,7 @@
#include "code\game\objects\items\weapons\tape.dm"
#include "code\game\objects\items\weapons\teleportation.dm"
#include "code\game\objects\items\weapons\tools.dm"
#include "code\game\objects\items\weapons\twohanded.dm"
#include "code\game\objects\items\weapons\trays.dm"
#include "code\game\objects\items\weapons\weaponry.dm"
#include "code\game\objects\items\weapons\weldbackpack.dm"
#include "code\game\objects\items\weapons\wires.dm"
@@ -673,6 +670,15 @@
#include "code\game\objects\items\weapons\implants\implantfreedom.dm"
#include "code\game\objects\items\weapons\implants\implantpad.dm"
#include "code\game\objects\items\weapons\implants\implantuplink.dm"
#include "code\game\objects\items\weapons\material\bats.dm"
#include "code\game\objects\items\weapons\material\kitchen.dm"
#include "code\game\objects\items\weapons\material\knives.dm"
#include "code\game\objects\items\weapons\material\material_weapons.dm"
#include "code\game\objects\items\weapons\material\misc.dm"
#include "code\game\objects\items\weapons\material\shards.dm"
#include "code\game\objects\items\weapons\material\swords.dm"
#include "code\game\objects\items\weapons\material\thrown.dm"
#include "code\game\objects\items\weapons\material\twohanded.dm"
#include "code\game\objects\items\weapons\melee\energy.dm"
#include "code\game\objects\items\weapons\melee\misc.dm"
#include "code\game\objects\items\weapons\storage\backpack.dm"
@@ -712,7 +718,6 @@
#include "code\game\objects\structures\ladders.dm"
#include "code\game\objects\structures\lamarr_cage.dm"
#include "code\game\objects\structures\lattice.dm"
#include "code\game\objects\structures\mineral_doors.dm"
#include "code\game\objects\structures\mirror.dm"
#include "code\game\objects\structures\mop_bucket.dm"
#include "code\game\objects\structures\morgue.dm"
@@ -720,6 +725,7 @@
#include "code\game\objects\structures\noticeboard.dm"
#include "code\game\objects\structures\safe.dm"
#include "code\game\objects\structures\signs.dm"
#include "code\game\objects\structures\simple_doors.dm"
#include "code\game\objects\structures\tank_dispenser.dm"
#include "code\game\objects\structures\target_stake.dm"
#include "code\game\objects\structures\transit_tubes.dm"
@@ -1040,6 +1046,9 @@
#include "code\modules\maps\reader.dm"
#include "code\modules\maps\swapmaps.dm"
#include "code\modules\maps\writer.dm"
#include "code\modules\materials\material_recipes.dm"
#include "code\modules\materials\material_sheets.dm"
#include "code\modules\materials\material_synth.dm"
#include "code\modules\materials\materials.dm"
#include "code\modules\mining\abandonedcrates.dm"
#include "code\modules\mining\alloys.dm"
@@ -1058,6 +1067,7 @@
#include "code\modules\mining\satchel_ore_boxdm.dm"
#include "code\modules\mining\drilling\drill.dm"
#include "code\modules\mining\drilling\scanner.dm"
#include "code\modules\mob\animations.dm"
#include "code\modules\mob\death.dm"
#include "code\modules\mob\emote.dm"
#include "code\modules\mob\hear_say.dm"

View File

@@ -114,7 +114,7 @@
sleep(60)
if(!user || !WT || !WT.isOn()) return
var/obj/item/stack/sheet/metal/S = new /obj/item/stack/sheet/metal( src )
var/obj/item/stack/material/steel/S = new /obj/item/stack/material/steel( src )
S.amount = 2
user << "<span class='notice'>You remove the ladder and close the hole.</span>"
qdel(src)

View File

@@ -10,6 +10,8 @@ Attach to transfer valve and open. BOOM.
*/
//#define FIREDBG
/turf/var/obj/fire/fire = null
//Some legacy definitions so fires can be started.
@@ -35,14 +37,13 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
if(air_contents.check_combustability(liquid))
igniting = 1
create_fire(vsc.fire_firelevel_multiplier)
create_fire(exposed_temperature)
return igniting
/zone/proc/process_fire()
var/datum/gas_mixture/burn_gas = air.remove_ratio(vsc.fire_consuption_rate, fire_tiles.len)
var/firelevel = burn_gas.zburn(src, fire_tiles, force_burn = 1, no_check = 1)
//world << "[src]: firelevel [firelevel]"
air.merge(burn_gas)
@@ -65,6 +66,29 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
if(!fire_tiles.len)
air_master.active_fire_zones.Remove(src)
/zone/proc/remove_liquidfuel(var/used_liquid_fuel, var/remove_fire=0)
if(!fuel_objs.len)
return
//As a simplification, we remove fuel equally from all fuel sources. It might be that some fuel sources have more fuel,
//some have less, but whatever. It will mean that sometimes we will remove a tiny bit less fuel then we intended to.
var/fuel_to_remove = used_liquid_fuel/(fuel_objs.len*LIQUIDFUEL_AMOUNT_TO_MOL) //convert back to liquid volume units
for(var/O in fuel_objs)
var/obj/effect/decal/cleanable/liquid_fuel/fuel = O
if(!istype(fuel))
fuel_objs -= fuel
continue
fuel.amount -= fuel_to_remove
if(fuel.amount <= 0)
fuel_objs -= fuel
if(remove_fire)
var/turf/T = fuel.loc
if(istype(T) && T.fire) qdel(T.fire)
qdel(fuel)
/turf/proc/create_fire(fl)
return 0
@@ -98,7 +122,7 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
light_color = "#ED9200"
layer = TURF_LAYER
var/firelevel = 10000 //Calculated by gas_mixture.calculate_firelevel()
var/firelevel = 1 //Calculated by gas_mixture.calculate_firelevel()
/obj/fire/process()
. = 1
@@ -122,7 +146,6 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
icon_state = "1"
set_light(3, 1)
//im not sure how to implement a version that works for every creature so for now monkeys are firesafe
for(var/mob/living/L in loc)
L.FireBurn(firelevel, air_contents.temperature, air_contents.return_pressure()) //Burn the mobs!
@@ -158,7 +181,7 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
else
enemy_tile.adjacent_fire_act(loc, air_contents, air_contents.temperature, air_contents.volume)
animate(src, color = heat2color(air_contents.temperature), 5)
animate(src, color = fire_color(air_contents.temperature), 5)
set_light(l_color = color)
/obj/fire/New(newLoc,fl)
@@ -166,27 +189,32 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
if(!istype(loc, /turf))
qdel(src)
return
set_dir(pick(cardinal))
var/datum/gas_mixture/air_contents = loc.return_air()
color = heat2color(air_contents.temperature)
color = fire_color(air_contents.temperature)
set_light(3, 1, color)
firelevel = fl
air_master.active_hotspots.Add(src)
/obj/fire/proc/fire_color(var/env_temperature)
var/temperature = max(4000*sqrt(firelevel/vsc.fire_firelevel_multiplier), env_temperature)
return heat2color(temperature)
/obj/fire/Destroy()
if (istype(loc, /turf/simulated))
RemoveFire()
RemoveFire()
..()
/obj/fire/proc/RemoveFire()
if (istype(loc, /turf))
var/turf/T = loc
if (istype(T))
set_light(0)
T.fire = null
loc = null
air_master.active_hotspots.Remove(src)
@@ -198,6 +226,11 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
//Returns the firelevel
/datum/gas_mixture/proc/zburn(zone/zone, force_burn, no_check = 0)
#ifdef FIREDBG
log_debug("***************** FIREDBG *****************")
if(zone) log_debug("Burning [zone.name]!")
#endif
. = 0
if((temperature > PHORON_MINIMUM_BURN_TEMPERATURE || force_burn) && (no_check ||check_recombustability(zone? zone.fuel_objs : null)))
var/gas_fuel = 0 //in the case of mixed gas/liquid fires, the gas burns first.
@@ -215,9 +248,11 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
total_oxidizers *= group_multiplier
//Liquid Fuel
var/fuel_area = 0
if(zone)
for(var/obj/effect/decal/cleanable/liquid_fuel/fuel in zone.fuel_objs)
liquid_fuel += fuel.amount*LIQUIDFUEL_AMOUNT_TO_MOL
fuel_area++
total_fuel = gas_fuel + liquid_fuel
if(total_fuel <= 0.005)
@@ -225,9 +260,6 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
//*** Determine how fast the fire burns
//calculate the firelevel.
var/firelevel = calculate_firelevel(zone? zone.fuel_objs : null, total_fuel, total_oxidizers, force = 1)
//get the current thermal energy of the gas mix
//this must be taken here to prevent the addition or deletion of energy by a changing heat capacity
var/starting_energy = temperature * heat_capacity()
@@ -235,61 +267,54 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
//determine how far the reaction can progress
var/reaction_limit = min(total_oxidizers*(FIRE_REACTION_FUEL_AMOUNT/FIRE_REACTION_OXIDIZER_AMOUNT), total_fuel) //stoichiometric limit
//determine the actual rate of reaction, as measured by the amount of fuel reacting
//calculate the firelevel.
var/firelevel = calculate_firelevel(total_fuel, total_oxidizers, reaction_limit)
//vapour fuels are extremely volatile! The reaction progress is a percentage of the total fuel (similar to old zburn).
var/gas_reaction_progress = max(0.2*group_multiplier, (firelevel/vsc.fire_firelevel_multiplier)*gas_fuel)*FIRE_GAS_BURNRATE_MULT
//liquid fuels are not as volatile, and the reaction progress depends on the size of the area that is burning (which is sort of accounted for by firelevel). Having more fuel means a longer burn.
var/liquid_reaction_progress = (firelevel/vsc.fire_firelevel_multiplier)*FIRE_LIQUID_BURNRATE_MULT
var/gas_reaction_progress = min(0.2, (firelevel/vsc.fire_firelevel_multiplier))*gas_fuel*FIRE_GAS_BURNRATE_MULT
//world << "liquid_reaction_progress = [liquid_reaction_progress]"
//world << "gas_reaction_progress = [gas_reaction_progress]"
//liquid fuels are not as volatile, and the reaction progress depends on the size of the area that is burning. Limit the burn rate to a certain amount per area.
var/liquid_reaction_progress = ((firelevel/vsc.fire_firelevel_multiplier)*0.2 + 0.05)*fuel_area*FIRE_LIQUID_BURNRATE_MULT
var/total_reaction_progress = gas_reaction_progress + liquid_reaction_progress
var/used_fuel = min(total_reaction_progress, reaction_limit)
var/used_oxidizers = used_fuel*(FIRE_REACTION_OXIDIZER_AMOUNT/FIRE_REACTION_FUEL_AMOUNT)
//world << "used_fuel = [used_fuel]; used_oxidizers = [used_oxidizers]; reaction_limit=[reaction_limit]"
#ifdef FIREDBG
log_debug("firelevel -> [firelevel] / [vsc.fire_firelevel_multiplier]")
log_debug("liquid_reaction_progress = [liquid_reaction_progress]")
log_debug("gas_reaction_progress = [gas_reaction_progress]")
log_debug("used_fuel = [used_fuel]; used_oxidizers = [used_oxidizers]; reaction_limit=[reaction_limit]")
#endif
//if the reaction is progressing too slow then it isn't self-sustaining anymore and burns out
if(zone && zone.fuel_objs.len)
if(used_fuel <= FIRE_LIQUD_MIN_BURNRATE)
if(zone) //be less restrictive with canister and tank reactions
if((!liquid_fuel || used_fuel <= FIRE_LIQUD_MIN_BURNRATE) && (!gas_fuel || used_fuel <= FIRE_GAS_MIN_BURNRATE*group_multiplier))
return 0
else if(used_fuel <= FIRE_GAS_MIN_BURNRATE*group_multiplier) //purely gas fires have more stringent criteria
return 0
//*** Remove fuel and oxidizer, add carbon dioxide and heat
//remove and add gasses as calculated
var/used_gas_fuel = min(used_fuel*(gas_reaction_progress/total_reaction_progress), gas_fuel) //remove in proportion to the relative reaction progress
var/used_liquid_fuel = between(0, used_fuel-used_gas_fuel, liquid_fuel)
var/used_gas_fuel = between(0.25, used_fuel*(gas_reaction_progress/total_reaction_progress), gas_fuel) //remove in proportion to the relative reaction progress
var/used_liquid_fuel = between(0.25, used_fuel-used_gas_fuel, liquid_fuel)
//remove_by_flag() and adjust_gas() handle the group_multiplier for us.
remove_by_flag(XGM_GAS_OXIDIZER, used_oxidizers)
remove_by_flag(XGM_GAS_FUEL, used_gas_fuel)
adjust_gas("carbon_dioxide", used_oxidizers)
//As a simplification, we remove fuel equally from all fuel sources. It might be that some fuel sources have more fuel, some have less, but whatever.
if(zone && zone.fuel_objs.len)
var/fuel_to_remove = used_liquid_fuel/(zone.fuel_objs.len*LIQUIDFUEL_AMOUNT_TO_MOL) //convert back to liquid volume units
//world << "used gas fuel = [used_gas_fuel]; used other fuel = [used_fuel-used_gas_fuel]; fuel_to_remove = [fuel_to_remove]"
var/liquidonly = !check_combustability()
for(var/O in zone.fuel_objs)
var/obj/effect/decal/cleanable/liquid_fuel/fuel = O
if(!istype(fuel))
zone.fuel_objs -= fuel
continue
fuel.amount -= fuel_to_remove
if(fuel.amount <= 0)
zone.fuel_objs -= fuel
if(liquidonly)
var/turf/T = fuel.loc
if(istype(T) && T.fire) qdel(T.fire)
qdel(fuel)
if(zone)
zone.remove_liquidfuel(used_liquid_fuel, !check_combustability())
//calculate the energy produced by the reaction and then set the new temperature of the mix
temperature = (starting_energy + vsc.fire_fuel_energy_release * used_fuel) / heat_capacity()
#ifdef FIREDBG
log_debug("used_gas_fuel = [used_gas_fuel]; used_liquid_fuel = [used_liquid_fuel]; total = [used_gas_fuel+used_liquid_fuel]")
log_debug("new temperature = [temperature]")
#endif
update_values()
return firelevel
@@ -332,21 +357,28 @@ datum/gas_mixture/proc/check_recombustability(list/fuel_objs)
. = 1
break
//Returns a value between 0 and vsc.fire_firelevel_multiplier
/datum/gas_mixture/proc/calculate_firelevel(list/fuel_objs, total_fuel, total_oxidizers, force = 0)
//returns a value between 0 and vsc.fire_firelevel_multiplier
/datum/gas_mixture/proc/calculate_firelevel(total_fuel, total_oxidizers, reaction_limit)
//Calculates the firelevel based on one equation instead of having to do this multiple times in different areas.
var/firelevel = 0
if(force || check_recombustability(fuel_objs))
var/total_combustables = (total_fuel + total_oxidizers)
var/total_combustables = (total_fuel + total_oxidizers)
if(total_combustables > 0)
//slows down the burning when the concentration of the reactants is low
var/dampening_multiplier = total_combustables / total_moles
//calculates how close the mixture of the reactants is to the optimum
var/mix_multiplier = 1 / (1 + (5 * ((total_oxidizers / total_combustables) ** 2)))
//toss everything together
firelevel = vsc.fire_firelevel_multiplier * mix_multiplier * dampening_multiplier
if(total_combustables > 0)
//slows down the burning when the concentration of the reactants is low
var/dampening_multiplier = min(1, reaction_limit / (total_moles/group_multiplier))
//calculates how close the mixture of the reactants is to the optimum
//fires burn better when there is more oxidizer -- too much fuel will choke them out a bit, reducing firelevel.
var/mix_multiplier = 1 / (1 + (5 * ((total_fuel / total_combustables) ** 2)))
#ifdef FIREDBG
ASSERT(dampening_multiplier <= 1)
ASSERT(mix_multiplier <= 1)
#endif
//toss everything together -- should produce a value between 0 and fire_firelevel_multiplier
firelevel = vsc.fire_firelevel_multiplier * mix_multiplier * dampening_multiplier
return max( 0, firelevel)

View File

@@ -20,6 +20,15 @@
/obj/item/proc/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
return
//TODO: refactor mob attack code.
/*
Busy writing something else that I don't want to get mixed up in a general attack code, and I don't want to forget this so leaving a note here.
leave attackby() as handling the general case of "using an item on a mob"
attackby() will decide to call attacked_by() or not.
attacked_by() will be made a living level proc and handle the specific case of "attacking with an item to cause harm"
attacked_by() will then call attack() so that stunbatons and other weapons that have special attack effects can do their thing.
attacked_by() will handle hitting/missing/logging as it does now, and will call attack() to apply the attack effects (damage) instead of the other way around (as it is now).
*/
/obj/item/proc/attack(mob/living/M as mob, mob/living/user as mob, def_zone)
@@ -57,6 +66,7 @@
power *= 2
// TODO: needs to be refactored into a mob/living level attacked_by() proc. ~Z
user.do_attack_animation(M)
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M

View File

@@ -271,12 +271,12 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/obj/item/weapon/reagent_containers/spray/plantbgone,
/obj/item/weapon/reagent_containers/glass/bottle/ammonia,
/obj/item/weapon/reagent_containers/glass/bottle/ammonia,
/obj/item/weapon/hatchet,
/obj/item/weapon/minihoe,
/obj/item/weapon/material/hatchet,
/obj/item/weapon/material/minihoe,
/obj/item/device/analyzer/plant_analyzer,
/obj/item/clothing/gloves/botanic_leather,
/obj/item/clothing/suit/apron,
/obj/item/weapon/minihoe,
/obj/item/weapon/material/minihoe,
/obj/item/weapon/storage/box/botanydisk
) // Updated with new things
cost = 15
@@ -337,8 +337,8 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/datum/supply_packs/weedcontrol
name = "Weed control crate"
contains = list(/obj/item/weapon/hatchet,
/obj/item/weapon/hatchet,
contains = list(/obj/item/weapon/material/hatchet,
/obj/item/weapon/material/hatchet,
/obj/item/weapon/reagent_containers/spray/plantbgone,
/obj/item/weapon/reagent_containers/spray/plantbgone,
/obj/item/weapon/reagent_containers/spray/plantbgone,
@@ -445,7 +445,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/datum/supply_packs/metal50
name = "50 metal sheets"
contains = list(/obj/item/stack/sheet/metal)
contains = list(/obj/item/stack/material/steel)
amount = 50
cost = 10
containertype = /obj/structure/closet/crate
@@ -454,7 +454,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/datum/supply_packs/glass50
name = "50 glass sheets"
contains = list(/obj/item/stack/sheet/glass)
contains = list(/obj/item/stack/material/glass)
amount = 50
cost = 10
containertype = /obj/structure/closet/crate
@@ -463,7 +463,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/datum/supply_packs/wood50
name = "50 wooden planks"
contains = list(/obj/item/stack/sheet/wood)
contains = list(/obj/item/stack/material/wood)
amount = 50
cost = 10
containertype = /obj/structure/closet/crate
@@ -472,7 +472,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/datum/supply_packs/plastic50
name = "50 plastic sheets"
contains = list(/obj/item/stack/sheet/mineral/plastic)
contains = list(/obj/item/stack/material/plastic)
amount = 50
cost = 10
containertype = /obj/structure/closet/crate
@@ -1255,7 +1255,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
group = "Hydroponics"
/datum/supply_packs/cardboard_sheets
contains = list(/obj/item/stack/sheet/cardboard)
contains = list(/obj/item/stack/material/cardboard)
name = "50 cardboard sheets"
amount = 50
cost = 10

View File

@@ -91,7 +91,7 @@
/obj/item/weapon/cane/concealed/New()
..()
var/obj/item/weapon/butterfly/switchblade/temp_blade = new(src)
var/obj/item/weapon/material/butterfly/switchblade/temp_blade = new(src)
concealed_blade = temp_blade
temp_blade.attack_self()
@@ -109,7 +109,7 @@
else
..()
/obj/item/weapon/cane/concealed/attackby(var/obj/item/weapon/butterfly/W, var/mob/user)
/obj/item/weapon/cane/concealed/attackby(var/obj/item/weapon/material/butterfly/W, var/mob/user)
if(!src.concealed_blade && istype(W))
user.visible_message("<span class='warning'>[user] has sheathed \a [W] into \his [src]!</span>", "You sheathe \the [W] into \the [src].")
user.drop_from_inventory(W)

View File

@@ -37,7 +37,7 @@ var/datum/antagonist/highlander/highlanders
player.equip_to_slot_or_del(new /obj/item/clothing/under/kilt(player), slot_w_uniform)
player.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(player), slot_l_ear)
player.equip_to_slot_or_del(new /obj/item/clothing/head/beret(player), slot_head)
player.equip_to_slot_or_del(new /obj/item/weapon/claymore(player), slot_l_hand)
player.equip_to_slot_or_del(new /obj/item/weapon/material/sword(player), slot_l_hand)
player.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(player), slot_shoes)
player.equip_to_slot_or_del(new /obj/item/weapon/pinpointer(get_turf(player)), slot_l_store)

View File

@@ -38,11 +38,12 @@
/obj/structure/cult/pylon/proc/attackpylon(mob/user as mob, var/damage)
if(!isbroken)
if(prob(1+ damage * 5))
user << "You hit the pylon, and its crystal breaks apart!"
for(var/mob/M in viewers(src))
if(M == user)
continue
M.show_message("[user.name] smashed the pylon!", 3, "You hear a tinkle of crystal shards", 2)
user.visible_message(
"<span class='danger'>[user] smashed the pylon!</span>",
"<span class='warning'>You hit the pylon, and its crystal breaks apart!</span>",
"You hear a tinkle of crystal shards"
)
user.do_attack_animation(src)
playsound(get_turf(src), 'sound/effects/Glassbr3.ogg', 75, 1)
isbroken = 1
density = 0

View File

@@ -14,14 +14,14 @@
new /obj/structure/cult/pylon(loc)
..()
/obj/item/stack/sheet/wood/cultify()
/obj/item/stack/material/wood/cultify()
return
/obj/item/weapon/book/cultify()
new /obj/item/weapon/book/tome(loc)
..()
/obj/item/weapon/claymore/cultify()
/obj/item/weapon/material/sword/cultify()
new /obj/item/weapon/melee/cultblade(loc)
..()
@@ -59,7 +59,7 @@
qdel(src)
/obj/machinery/door/airlock/external/cultify()
new /obj/structure/mineral_door/wood(loc)
new /obj/structure/simple_door/wood(loc)
..()
/obj/machinery/door/cultify()
@@ -114,11 +114,11 @@
/obj/structure/grille/cult/cultify()
return
/obj/structure/mineral_door/cultify()
new /obj/structure/mineral_door/wood(loc)
/obj/structure/simple_door/cultify()
new /obj/structure/simple_door/wood(loc)
..()
/obj/structure/mineral_door/wood/cultify()
/obj/structure/simple_door/wood/cultify()
return
/obj/singularity/cultify()

View File

@@ -513,9 +513,9 @@ datum/objective/steal
"diamond drill" = /obj/item/weapon/pickaxe/diamonddrill,
"bag of holding" = /obj/item/weapon/storage/backpack/holding,
"hyper-capacity cell" = /obj/item/weapon/cell/hyper,
"10 diamonds" = /obj/item/stack/sheet/mineral/diamond,
"50 gold bars" = /obj/item/stack/sheet/mineral/gold,
"25 refined uranium bars" = /obj/item/stack/sheet/mineral/uranium,
"10 diamonds" = /obj/item/stack/material/diamond,
"50 gold bars" = /obj/item/stack/material/gold,
"25 refined uranium bars" = /obj/item/stack/material/uranium,
)
@@ -830,13 +830,13 @@ datum/objective/heist/salvage
for(var/obj/item/O in locate(/area/shuttle/skipjack/station))
var/obj/item/stack/sheet/S
if(istype(O,/obj/item/stack/sheet))
var/obj/item/stack/material/S
if(istype(O,/obj/item/stack/material))
if(O.name == target)
S = O
total_amount += S.get_amount()
for(var/obj/I in O.contents)
if(istype(I,/obj/item/stack/sheet))
if(istype(I,/obj/item/stack/material))
if(I.name == target)
S = I
total_amount += S.get_amount()
@@ -844,9 +844,9 @@ datum/objective/heist/salvage
for(var/datum/mind/raider in raiders.current_antagonists)
if(raider.current)
for(var/obj/item/O in raider.current.get_contents())
if(istype(O,/obj/item/stack/sheet))
if(istype(O,/obj/item/stack/material))
if(O.name == target)
var/obj/item/stack/sheet/S = O
var/obj/item/stack/material/S = O
total_amount += S.get_amount()
if(total_amount >= target_amount) return 1

View File

@@ -293,7 +293,7 @@
var/material/M = name_to_material[mat]
if(!istype(M))
continue
var/obj/item/stack/sheet/S = new M.stack_type(get_turf(src))
var/obj/item/stack/material/S = new M.stack_type(get_turf(src))
if(stored_material[mat] > S.perunit)
S.amount = round(stored_material[mat] / S.perunit)
else

View File

@@ -81,15 +81,15 @@
name = "wrench"
path = /obj/item/weapon/wrench
category = "Tools"
/datum/autolathe/recipe/hatchet
name = "hatchet"
path = /obj/item/weapon/hatchet
path = /obj/item/weapon/material/hatchet
category = "Tools"
/datum/autolathe/recipe/minihoe
name = "mini hoe"
path = /obj/item/weapon/minihoe
path = /obj/item/weapon/material/minihoe
category = "Tools"
/datum/autolathe/recipe/radio_headset
@@ -109,19 +109,19 @@
/datum/autolathe/recipe/metal
name = "steel sheets"
path = /obj/item/stack/sheet/metal
path = /obj/item/stack/material/steel
category = "General"
is_stack = 1
/datum/autolathe/recipe/glass
name = "glass sheets"
path = /obj/item/stack/sheet/glass
path = /obj/item/stack/material/glass
category = "General"
is_stack = 1
/datum/autolathe/recipe/rglass
name = "reinforced glass sheets"
path = /obj/item/stack/sheet/glass/reinforced
path = /obj/item/stack/material/glass/reinforced
category = "General"
is_stack = 1
@@ -133,7 +133,7 @@
/datum/autolathe/recipe/knife
name = "kitchen knife"
path = /obj/item/weapon/kitchenknife
path = /obj/item/weapon/material/knife
category = "General"
/datum/autolathe/recipe/taperecorder
@@ -217,7 +217,7 @@
category = "Medical"
/datum/autolathe/recipe/syringegun_ammo
name = "syringe"
name = "syringe gun cartridge"
path = /obj/item/weapon/syringe_cartridge
category = "Arms and Ammunition"
@@ -293,7 +293,7 @@
/datum/autolathe/recipe/ashtray_glass
name = "glass ashtray"
path = /obj/item/ashtray/glass
path = /obj/item/weapon/material/ashtray/glass
category = "General"
/datum/autolathe/recipe/camera_assembly
@@ -369,7 +369,7 @@
/datum/autolathe/recipe/tacknife
name = "tactical knife"
path = /obj/item/weapon/hatchet/tacknife
path = /obj/item/weapon/material/hatchet/tacknife
hidden = 1
category = "Arms and Ammunition"

View File

@@ -73,8 +73,8 @@
qdel(W)
return
// Steel for matter.
else if(prints_prosthetics && istype(W, /obj/item/stack/sheet/metal))
var/obj/item/stack/sheet/metal/M = W
else if(prints_prosthetics && istype(W, /obj/item/stack/material/steel))
var/obj/item/stack/material/steel/M = W
stored_matter += M.amount * 10
user.drop_item()
user << "<span class='info'>\The [src] processes \the [W]. Levels of stored matter now: [stored_matter]</span>"

View File

@@ -115,6 +115,7 @@
if(user.species.can_shred(user))
set_status(0)
user.do_attack_animation(src)
visible_message("<span class='warning'>\The [user] slashes at [src]!</span>")
playsound(src.loc, 'sound/weapons/slash.ogg', 100, 1)
icon_state = "[initial(icon_state)]1"
@@ -190,6 +191,7 @@
else if(W.damtype == BRUTE || W.damtype == BURN) //bashing cameras
if (W.force >= src.toughness)
user.do_attack_animation(src)
visible_message("<span class='warning'><b>[src] has been [pick(W.attack_verb)] with [W] by [user]!</b></span>")
if (istype(W, /obj/item)) //is it even possible to get into attackby() with non-items?
var/obj/item/I = W

View File

@@ -9,7 +9,7 @@
matter = list(DEFAULT_WALL_MATERIAL = 700,"glass" = 300)
// Motion, EMP-Proof, X-Ray
var/list/obj/item/possible_upgrades = list(/obj/item/device/assembly/prox_sensor, /obj/item/stack/sheet/mineral/osmium, /obj/item/weapon/stock_parts/scanning_module)
var/list/obj/item/possible_upgrades = list(/obj/item/device/assembly/prox_sensor, /obj/item/stack/material/osmium, /obj/item/weapon/stock_parts/scanning_module)
var/list/upgrades = list()
var/state = 0
var/busy = 0

View File

@@ -144,7 +144,7 @@ var/global/list/engineering_networks = list(
// CHECKS
/obj/machinery/camera/proc/isEmpProof()
var/O = locate(/obj/item/stack/sheet/mineral/osmium) in assembly.upgrades
var/O = locate(/obj/item/stack/material/osmium) in assembly.upgrades
return O
/obj/machinery/camera/proc/isXRay()
@@ -160,7 +160,7 @@ var/global/list/engineering_networks = list(
// UPGRADE PROCS
/obj/machinery/camera/proc/upgradeEmpProof()
assembly.upgrades.Add(new /obj/item/stack/sheet/mineral/osmium(assembly))
assembly.upgrades.Add(new /obj/item/stack/material/osmium(assembly))
setPowerUsage()
/obj/machinery/camera/proc/upgradeXRay()

View File

@@ -29,7 +29,7 @@
if(do_after(user, 20))
if(!src || !WT.remove_fuel(0, user)) return
user << "\blue You deconstruct the frame."
new /obj/item/stack/sheet/plasteel( loc, 4)
new /obj/item/stack/material/plasteel( loc, 4)
qdel(src)
if(1)
if(istype(P, /obj/item/weapon/wrench))
@@ -88,8 +88,8 @@
var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( loc )
A.amount = 5
if(istype(P, /obj/item/stack/sheet/glass/reinforced))
var/obj/item/stack/sheet/glass/reinforced/RG = P
if(istype(P, /obj/item/stack/material/glass/reinforced))
var/obj/item/stack/material/glass/reinforced/RG = P
if (RG.get_amount() < 2)
user << "<span class='warning'>You need two sheets of glass to put in the glass panel.</span>"
return
@@ -162,7 +162,7 @@
icon_state = "3b"
else
icon_state = "3"
new /obj/item/stack/sheet/glass/reinforced( loc, 2 )
new /obj/item/stack/material/glass/reinforced( loc, 2 )
return
if(istype(P, /obj/item/weapon/screwdriver))

View File

@@ -28,7 +28,7 @@
if(do_after(user, 20))
if(!src || !WT.isOn()) return
user << "\blue You deconstruct the frame."
new /obj/item/stack/sheet/metal( src.loc, 5 )
new /obj/item/stack/material/steel( src.loc, 5 )
qdel(src)
if(1)
if(istype(P, /obj/item/weapon/wrench))
@@ -87,8 +87,8 @@
var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( src.loc )
A.amount = 5
if(istype(P, /obj/item/stack/sheet/glass))
var/obj/item/stack/sheet/glass/G = P
if(istype(P, /obj/item/stack/material/glass))
var/obj/item/stack/material/glass/G = P
if (G.get_amount() < 2)
user << "<span class='warning'>You need two sheets of glass to put in the glass panel.</span>"
return
@@ -105,7 +105,7 @@
user << "\blue You remove the glass panel."
src.state = 3
src.icon_state = "3"
new /obj/item/stack/sheet/glass( src.loc, 2 )
new /obj/item/stack/material/glass( src.loc, 2 )
if(istype(P, /obj/item/weapon/screwdriver))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
user << "\blue You connect the monitor."

View File

@@ -125,7 +125,7 @@
C.loc = src.loc
if (src.stat & BROKEN)
user << "\blue The broken glass falls out."
new /obj/item/weapon/shard( src.loc )
new /obj/item/weapon/material/shard( src.loc )
A.state = 3
A.icon_state = "3"
else

View File

@@ -58,7 +58,7 @@
if(stat & BROKEN)
user << "\blue The broken glass falls out."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( loc )
new /obj/item/weapon/shard( loc )
new /obj/item/weapon/material/shard( loc )
//generate appropriate circuitboard. Accounts for /pod/old computer types
var/obj/item/weapon/circuitboard/pod/M = null

View File

@@ -38,7 +38,7 @@ var/prison_shuttle_timeleft = 0
if (src.stat & BROKEN)
user << "\blue The broken glass falls out."
new /obj/item/weapon/shard( src.loc )
new /obj/item/weapon/material/shard( src.loc )
A.state = 3
A.icon_state = "3"
else

View File

@@ -93,7 +93,7 @@
if(do_after(user, 20))
if(!src || !WT.isOn()) return
user << "\blue You deconstruct the frame."
new /obj/item/stack/sheet/metal( src.loc, 5 )
new /obj/item/stack/material/steel( src.loc, 5 )
qdel(src)
if(1)
if(istype(P, /obj/item/weapon/wrench))
@@ -178,7 +178,7 @@
if(istype(P, /obj/item/weapon/crowbar)) // complicated check
remove_peripheral()
if(istype(P, /obj/item/stack/sheet/glass))
if(istype(P, /obj/item/stack/material/glass))
if(P:amount >= 2)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
if(do_after(user, 20))
@@ -193,7 +193,7 @@
user << "\blue You remove the glass panel."
src.state = 3
src.icon_state = "3"
new /obj/item/stack/sheet/glass( src.loc, 2 )
new /obj/item/stack/material/glass( src.loc, 2 )
if(istype(P, /obj/item/weapon/screwdriver))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
user << "\blue You connect the monitor."

View File

@@ -48,7 +48,7 @@
if(istype(P, /obj/item/weapon/wrench))
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
user << "\blue You dismantle the frame"
new /obj/item/stack/sheet/metal(src.loc, 5)
new /obj/item/stack/material/steel(src.loc, 5)
qdel(src)
if(2)
if(istype(P, /obj/item/weapon/circuitboard))

View File

@@ -53,89 +53,101 @@ for reference:
*/
//Barricades, maybe there will be a metal one later...
/obj/structure/barricade/wooden
name = "wooden barricade"
desc = "This space is blocked off by a wooden barricade."
//Barricades!
/obj/structure/barricade
name = "barricade"
desc = "This space is blocked off by a barricade."
icon = 'icons/obj/structures.dmi'
icon_state = "woodenbarricade"
icon_state = "barricade"
anchored = 1.0
density = 1.0
var/health = 100.0
var/maxhealth = 100.0
var/health = 100
var/maxhealth = 100
var/material/material
attackby(obj/item/W as obj, mob/user as mob)
if (istype(W, /obj/item/stack/sheet/wood))
var/obj/item/stack/sheet/wood/D = W
if (health < maxhealth)
if (D.get_amount() < 1)
user << "<span class='warning'>You need one plank of wood to repair \the [src].</span>"
return
visible_message("<span class='notice'>[user] begins to repair \the [src].</span>")
if(do_after(user,20) && health < maxhealth)
if (D.use(1))
health = maxhealth
visible_message("<span class='notice'>[user] repairs \the [src].</span>")
return
return
else
switch(W.damtype)
if("fire")
src.health -= W.force * 1
if("brute")
src.health -= W.force * 0.75
else
if (src.health <= 0)
visible_message("\red <B>The barricade is smashed apart!</B>")
new /obj/item/stack/sheet/wood(get_turf(src))
new /obj/item/stack/sheet/wood(get_turf(src))
new /obj/item/stack/sheet/wood(get_turf(src))
qdel(src)
..()
ex_act(severity)
switch(severity)
if(1.0)
visible_message("\red <B>The barricade is blown apart!</B>")
qdel(src)
return
if(2.0)
src.health -= 25
if (src.health <= 0)
visible_message("\red <B>The barricade is blown apart!</B>")
new /obj/item/stack/sheet/wood(get_turf(src))
new /obj/item/stack/sheet/wood(get_turf(src))
new /obj/item/stack/sheet/wood(get_turf(src))
qdel(src)
return
meteorhit()
visible_message("\red <B>The barricade is smashed apart!</B>")
new /obj/item/stack/sheet/wood(get_turf(src))
new /obj/item/stack/sheet/wood(get_turf(src))
new /obj/item/stack/sheet/wood(get_turf(src))
/obj/structure/barricade/New(var/newloc, var/material_name)
..(newloc)
if(!material_name)
material_name = "wood"
material = get_material_by_name("[material_name]")
if(!material)
qdel(src)
return
name = "[material.display_name] barricade"
desc = "This space is blocked off by a barricade made of [material.display_name]."
color = material.icon_colour
maxhealth = material.integrity
health = maxhealth
blob_act()
src.health -= 25
if (src.health <= 0)
visible_message("\red <B>The blob eats through the barricade!</B>")
qdel(src)
/obj/structure/barricade/attackby(obj/item/W as obj, mob/user as mob)
if (istype(W, /obj/item/stack/material))
var/obj/item/stack/material/D = W
if(D.material.name != material.name)
user << "<span class='warning'>That is the wrong material needed to repair \the [src].</span>"
return
if (health < maxhealth)
if (D.get_amount() < 1)
user << "<span class='warning'>You need one sheet of [material.display_name] to repair \the [src].</span>"
return
visible_message("<span class='notice'>[user] begins to repair \the [src].</span>")
if(do_after(user,20) && health < maxhealth)
if (D.use(1))
health = maxhealth
visible_message("<span class='notice'>[user] repairs \the [src].</span>")
return
return
else
switch(W.damtype)
if("fire")
src.health -= W.force * 1
if("brute")
src.health -= W.force * 0.75
else
if (src.health <= 0)
visible_message("<span class='danger'>The barricade is smashed apart!</span>")
dismantle()
qdel(src)
return
..()
/obj/structure/barricade/proc/dismantle()
material.place_dismantled_product(get_turf(src))
qdel(src)
return
CanPass(atom/movable/mover, turf/target, height=0, air_group=0)//So bullets will fly over and stuff.
if(air_group || (height==0))
return 1
if(istype(mover) && mover.checkpass(PASSTABLE))
return 1
else
return 0
/obj/structure/barricade/ex_act(severity)
switch(severity)
if(1.0)
visible_message("<span class='danger'>\The [src] is blown apart!</span>")
qdel(src)
return
if(2.0)
src.health -= 25
if (src.health <= 0)
visible_message("<span class='danger'>\The [src] is blown apart!</span>")
dismantle()
return
/obj/structure/barricade/meteorhit()
visible_message("<span class='danger'>\The [src] is smashed apart!</span>")
dismantle()
return
/obj/structure/barricade/blob_act()
src.health -= 25
if (src.health <= 0)
visible_message("<span class='danger'>The blob eats through \the [src]!</span>")
qdel(src)
return
/obj/structure/barricade/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)//So bullets will fly over and stuff.
if(air_group || (height==0))
return 1
if(istype(mover) && mover.checkpass(PASSTABLE))
return 1
else
return 0
//Actual Deployable machinery stuff
/obj/machinery/deployable
name = "deployable"
desc = "deployable"

View File

@@ -805,18 +805,18 @@ About the new airlock wires panel:
else
spawn(0) close(1)
else if(istype(C, /obj/item/weapon/twohanded/fireaxe) && !arePowerSystemsOn())
else if(istype(C, /obj/item/weapon/material/twohanded/fireaxe) && !arePowerSystemsOn())
if(locked)
user << "\blue The airlock's bolts prevent it from being forced."
else if( !welded && !operating )
if(density)
var/obj/item/weapon/twohanded/fireaxe/F = C
var/obj/item/weapon/material/twohanded/fireaxe/F = C
if(F.wielded)
spawn(0) open(1)
else
user << "\red You need to be wielding \the [C] to do that."
else
var/obj/item/weapon/twohanded/fireaxe/F = C
var/obj/item/weapon/material/twohanded/fireaxe/F = C
if(F.wielded)
spawn(0) close(1)
else

View File

@@ -90,18 +90,18 @@
// This only works on broken doors or doors without power. Also allows repair with Plasteel.
/obj/machinery/door/blast/attackby(obj/item/weapon/C as obj, mob/user as mob)
src.add_fingerprint(user)
if(istype(C, /obj/item/weapon/crowbar) || (istype(C, /obj/item/weapon/twohanded/fireaxe) && C:wielded == 1))
if(istype(C, /obj/item/weapon/crowbar) || (istype(C, /obj/item/weapon/material/twohanded/fireaxe) && C:wielded == 1))
if(((stat & NOPOWER) || (stat & BROKEN)) && !( src.operating ))
force_toggle()
else
usr << "<span class='notice'>[src]'s motors resist your effort.</span>"
return
if(istype(C, /obj/item/stack/sheet/plasteel))
if(istype(C, /obj/item/stack/material/plasteel))
var/amt = repair_price()
if(!amt)
usr << "<span class='notice'>\The [src] is already fully repaired.</span>"
return
var/obj/item/stack/sheet/plasteel/P = C
var/obj/item/stack/material/plasteel/P = C
if(P.amount < amt)
usr << "<span class='warning'>You don't have enough sheets to repair this! You need at least [amt] sheets.</span>"
return

View File

@@ -26,7 +26,7 @@
var/destroy_hits = 10 //How many strong hits it takes to destroy the door
var/min_force = 10 //minimum amount of force needed to damage the door with a melee weapon
var/hitsound = 'sound/weapons/smash.ogg' //sound door makes when hit with a weapon
var/obj/item/stack/sheet/metal/repairing
var/obj/item/stack/material/steel/repairing
var/block_air_zones = 1 //If set, air zones cannot merge across the door even when it is opened.
var/close_door_at = 0 //When to automatically close the door, if possible
@@ -43,6 +43,7 @@
take_damage(damage)
else
visible_message("<span class='notice'>\The [user] bonks \the [src] harmlessly.</span>")
user.do_attack_animation(src)
/obj/machinery/door/New()
. = ..()
@@ -163,7 +164,7 @@
visible_message("\red <B>\The [src.name] disintegrates!</B>")
switch (Proj.damage_type)
if(BRUTE)
new /obj/item/stack/sheet/metal(src.loc, 2)
new /obj/item/stack/material/steel(src.loc, 2)
PoolOrNew(/obj/item/stack/rods, list(src.loc, 3))
if(BURN)
new /obj/effect/decal/cleanable/ash(src.loc) // Turn it to ashes!
@@ -205,7 +206,7 @@
if(src.operating > 0 || isrobot(user)) return //borgs can't attack doors open because it conflicts with their AI-like interaction with them.
src.add_fingerprint(user)
if(istype(I, /obj/item/stack/sheet/metal))
if(istype(I, /obj/item/stack/material/steel))
if(stat & BROKEN)
user << "<span class='notice'>It looks like \the [src] is pretty busted. It's going to need more than just patching up now.</span>"
return
@@ -220,7 +221,7 @@
var/amount_needed = (maxhealth - health) / DOOR_REPAIR_AMOUNT
amount_needed = (round(amount_needed) == amount_needed)? amount_needed : round(amount_needed) + 1 //Why does BYOND not have a ceiling proc?
var/obj/item/stack/sheet/metal/metalstack = I
var/obj/item/stack/material/steel/metalstack = I
var/transfer
if (repairing)
transfer = metalstack.transfer_to(repairing, amount_needed - repairing.amount)
@@ -264,6 +265,7 @@
if(src.density && istype(I, /obj/item/weapon) && user.a_intent == I_HURT && !istype(I, /obj/item/weapon/card))
var/obj/item/weapon/W = I
if(W.damtype == BRUTE || W.damtype == BURN)
user.do_attack_animation(src)
if(W.force < min_force)
user.visible_message("\red <B>\The [user] hits \the [src] with \the [W] with no visible effect.</B>" )
else

View File

@@ -238,7 +238,7 @@
user << "<span class='danger'>\The [src] is welded shut!</span>"
return
if(istype(C, /obj/item/weapon/crowbar) || istype(C,/obj/item/weapon/twohanded/fireaxe))
if(istype(C, /obj/item/weapon/crowbar) || istype(C,/obj/item/weapon/material/twohanded/fireaxe))
if(operating)
return
@@ -248,8 +248,8 @@
"You hear someone struggle and metal straining.")
return
if(istype(C,/obj/item/weapon/twohanded/fireaxe))
var/obj/item/weapon/twohanded/fireaxe/F = C
if(istype(C,/obj/item/weapon/material/twohanded/fireaxe))
var/obj/item/weapon/material/twohanded/fireaxe/F = C
if(!F.wielded)
return

View File

@@ -61,7 +61,7 @@ obj/structure/firedoor_assembly/attackby(C as obj, mob/user as mob)
if(!src || !WT.isOn()) return
user.visible_message("<span class='warning'>[user] has dissassembled \the [src].</span>",
"You have dissassembled \the [src].")
new /obj/item/stack/sheet/metal(src.loc, 2)
new /obj/item/stack/material/steel(src.loc, 2)
qdel(src)
else
user << "<span class='notice'>You need more welding fuel.</span>"

View File

@@ -25,7 +25,7 @@
return
/obj/machinery/door/window/proc/shatter(var/display_message = 1)
new /obj/item/weapon/shard(src.loc)
new /obj/item/weapon/material/shard(src.loc)
var/obj/item/stack/cable_coil/CC = new /obj/item/stack/cable_coil(src.loc)
CC.amount = 2
var/obj/item/weapon/airlock_electronics/ae

View File

@@ -50,7 +50,7 @@
user.visible_message("<span class='notice'>[user] has [!a_dis?"de":""]activated auto-dismantling.</span>", "<span class='notice'>You [!a_dis?"de":""]activate auto-dismantling.</span>")
return
if(istype(W, /obj/item/stack/sheet/metal))
if(istype(W, /obj/item/stack/material/steel))
var/result = load_metal(W)
if(isnull(result))
@@ -70,7 +70,7 @@
m = round(m)
if(m)
use_metal(m)
var/obj/item/stack/sheet/metal/MM = new (get_turf(src))
var/obj/item/stack/material/steel/MM = new (get_turf(src))
MM.amount = m
user.visible_message("<span class='notice'>[user] removes [m] sheet\s of metal from the \the [src].</span>", "<span class='notice'>You remove [m] sheet\s of metal from \the [src]</span>")
else
@@ -86,7 +86,7 @@
on=0
return
/obj/machinery/pipelayer/proc/load_metal(var/obj/item/stack/sheet/metal/MM)
/obj/machinery/pipelayer/proc/load_metal(var/obj/item/stack/material/steel/MM)
if(istype(MM) && MM.get_amount())
var/cur_amount = metal
var/to_load = max(max_metal - round(cur_amount),0)

View File

@@ -267,7 +267,7 @@
Gun.power_supply.charge = gun_charge
Gun.update_icon()
if(prob(50))
new /obj/item/stack/sheet/metal(loc, rand(1,4))
new /obj/item/stack/material/steel(loc, rand(1,4))
if(prob(50))
new /obj/item/device/assembly/prox_sensor(loc)
else
@@ -671,13 +671,13 @@
else if(istype(I, /obj/item/weapon/crowbar) && !anchored)
playsound(loc, 'sound/items/Crowbar.ogg', 75, 1)
user << "<span class='notice'>You dismantle the turret construction.</span>"
new /obj/item/stack/sheet/metal( loc, 5)
new /obj/item/stack/material/steel( loc, 5)
qdel(src) // qdel
return
if(1)
if(istype(I, /obj/item/stack/sheet/metal))
var/obj/item/stack/sheet/metal/M = I
if(istype(I, /obj/item/stack/material/steel))
var/obj/item/stack/material/steel/M = I
if(M.use(2))
user << "<span class='notice'>You add some metal armor to the interior frame.</span>"
build_step = 2
@@ -714,7 +714,7 @@
if(!src || !WT.remove_fuel(5, user)) return
build_step = 1
user << "You remove the turret's interior metal armor."
new /obj/item/stack/sheet/metal( loc, 2)
new /obj/item/stack/material/steel( loc, 2)
return
@@ -768,8 +768,8 @@
//attack_hand() removes the prox sensor
if(6)
if(istype(I, /obj/item/stack/sheet/metal))
var/obj/item/stack/sheet/metal/M = I
if(istype(I, /obj/item/stack/material/steel))
var/obj/item/stack/material/steel/M = I
if(M.use(2))
user << "<span class='notice'>You add some metal armor to the exterior frame.</span>"
build_step = 7
@@ -813,7 +813,7 @@
else if(istype(I, /obj/item/weapon/crowbar))
playsound(loc, 'sound/items/Crowbar.ogg', 75, 1)
user << "<span class='notice'>You pry off the turret's exterior armor.</span>"
new /obj/item/stack/sheet/metal(loc, 2)
new /obj/item/stack/material/steel(loc, 2)
build_step = 6
return

View File

@@ -169,7 +169,8 @@
return
if(!R.cell.fully_charged())
var/diff = min(R.cell.maxcharge - R.cell.charge, charge_rate) // Capped at charge_rate charge / tick
if (cell.use(diff))
if (cell.charge >= diff)
cell.use(diff)
R.cell.give(diff)
if(weld_rate && R.getBruteLoss())
R.adjustBruteLoss(-1)

View File

@@ -12,8 +12,8 @@
active_power_usage = 10000
/obj/machinery/robotic_fabricator/attackby(var/obj/item/O as obj, var/mob/user as mob)
if (istype(O, /obj/item/stack/sheet/metal))
var/obj/item/stack/sheet/metal/M = O
if (istype(O, /obj/item/stack/material/steel))
var/obj/item/stack/material/steel/M = O
if (src.metal_amount < 150000.0)
var/count = 0
src.overlays += "fab-load-metal"

View File

@@ -192,7 +192,7 @@
if (src.stat & BROKEN)
user << "\blue The broken glass falls out."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
new /obj/item/weapon/shard( src.loc )
new /obj/item/weapon/material/shard( src.loc )
var/obj/item/weapon/circuitboard/comm_server/M = new /obj/item/weapon/circuitboard/comm_server( A )
for (var/obj/C in src)
C.loc = src.loc

View File

@@ -130,7 +130,7 @@
if (src.stat & BROKEN)
user << "\blue The broken glass falls out."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
new /obj/item/weapon/shard( src.loc )
new /obj/item/weapon/material/shard( src.loc )
var/obj/item/weapon/circuitboard/comm_monitor/M = new /obj/item/weapon/circuitboard/comm_monitor( A )
for (var/obj/C in src)
C.loc = src.loc

View File

@@ -213,7 +213,7 @@
if (src.stat & BROKEN)
user << "\blue The broken glass falls out."
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
new /obj/item/weapon/shard( src.loc )
new /obj/item/weapon/material/shard( src.loc )
var/obj/item/weapon/circuitboard/comm_traffic/M = new /obj/item/weapon/circuitboard/comm_traffic( A )
for (var/obj/C in src)
C.loc = src.loc

View File

@@ -341,6 +341,7 @@
if(stat & BROKEN)
user << "That object is useless to you."
return 0
user.do_attack_animation(src)
visible_message("<span class='danger'>[user] [attack_message] the [src]!</span>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name]</font>")
src.health -= damage

View File

@@ -910,8 +910,8 @@
desc = "A kitchen and restaurant equipment vendor."
product_ads = "Mm, food stuffs!;Food and food accessories.;Get your plates!;You like forks?;I like forks.;Woo, utensils.;You don't really need these..."
icon_state = "dinnerware"
products = list(/obj/item/weapon/tray = 8,/obj/item/weapon/kitchen/utensil/fork = 6,/obj/item/weapon/kitchenknife = 3,/obj/item/weapon/reagent_containers/food/drinks/drinkingglass = 8,/obj/item/clothing/suit/chef/classic = 2)
contraband = list(/obj/item/weapon/kitchen/utensil/spoon = 2,/obj/item/weapon/kitchen/utensil/knife = 2,/obj/item/weapon/kitchen/rollingpin = 2, /obj/item/weapon/butch = 2)
products = list(/obj/item/weapon/tray = 8,/obj/item/weapon/material/kitchen/utensil/fork = 6,/obj/item/weapon/material/knife = 3,/obj/item/weapon/reagent_containers/food/drinks/drinkingglass = 8,/obj/item/clothing/suit/chef/classic = 2)
contraband = list(/obj/item/weapon/material/kitchen/utensil/spoon = 2,/obj/item/weapon/material/kitchen/utensil/knife = 2,/obj/item/weapon/material/kitchen/rollingpin = 2, /obj/item/weapon/material/knife/butch = 2)
/obj/machinery/vending/sovietsoda
name = "BODA"

View File

@@ -6,7 +6,7 @@
flags = CONDUCT
var/build_machine_type
var/refund_amt = 2
var/refund_type = /obj/item/stack/sheet/metal
var/refund_type = /obj/item/stack/material/steel
/obj/item/frame/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/wrench))
@@ -73,7 +73,7 @@
icon = 'icons/rust.dmi'
icon_state = "fuel_compressor0"
w_class = 4
refund_type = /obj/item/stack/sheet/plasteel
refund_type = /obj/item/stack/material/plasteel
refund_amt = 12
build_machine_type = /obj/machinery/rust_fuel_compressor

View File

@@ -47,11 +47,11 @@
I.decontaminate()
//Tanning!
for(var/obj/item/stack/sheet/hairlesshide/HH in contents)
var/obj/item/stack/sheet/wetleather/WL = new(src)
for(var/obj/item/stack/material/hairlesshide/HH in contents)
var/obj/item/stack/material/wetleather/WL = new(src)
WL.amount = HH.amount
qdel(HH)
if( locate(/mob,contents) )
state = 7
gibs_ready = 1
@@ -95,7 +95,7 @@
state = 3
else
..()
else if(istype(W,/obj/item/stack/sheet/hairlesshide) || \
else if(istype(W,/obj/item/stack/material/hairlesshide) || \
istype(W,/obj/item/clothing/under) || \
istype(W,/obj/item/clothing/mask) || \
istype(W,/obj/item/clothing/head) || \

View File

@@ -200,9 +200,9 @@
set_ready_state(0)
if(do_after_cooldown(target))
if( istype(target, /obj/structure/reagent_dispensers/watertank) && get_dist(chassis,target) <= 1)
var/obj/o = target
var/obj/o = target
var/amount = o.reagents.trans_to_obj(src, 200)
occupant_message("<span class='notice'>[amount] units transferred into internal tank.</span>")
occupant_message("<span class='notice'>[amount] units transferred into internal tank.</span>")
playsound(chassis, 'sound/effects/refill.ogg', 50, 1, -6)
return
@@ -221,7 +221,7 @@
var/list/the_targets = list(T,T1,T2)
for(var/a = 1 to 5)
spawn(0)
spawn(0)
var/obj/effect/effect/water/W = PoolOrNew(/obj/effect/effect/water, get_turf(chassis))
var/turf/my_target
if(a == 1)
@@ -237,7 +237,7 @@
return
reagents.trans_to_obj(W, spray_amount)
W.set_color()
W.set_up(my_target)
W.set_up(my_target)
return 1
get_equip_info()
@@ -842,7 +842,7 @@
construction_cost = list(DEFAULT_WALL_MATERIAL=10000,"silver"=500,"glass"=1000)
var/datum/global_iterator/pr_mech_generator
var/coeff = 100
var/obj/item/stack/sheet/fuel
var/obj/item/stack/material/fuel
var/max_fuel = 150000
var/fuel_per_cycle_idle = 100
var/fuel_per_cycle_active = 500
@@ -860,7 +860,7 @@
..()
proc/init()
fuel = new /obj/item/stack/sheet/mineral/phoron(src)
fuel = new /obj/item/stack/material/phoron(src)
fuel.amount = 0
pr_mech_generator = new /datum/global_iterator/mecha_generator(list(src),0)
pr_mech_generator.set_delay(equip_cooldown)
@@ -903,7 +903,7 @@
occupant_message(message)
return
proc/load_fuel(var/obj/item/stack/sheet/P)
proc/load_fuel(var/obj/item/stack/material/P)
if(P.type == fuel.type && P.amount)
var/to_load = max(max_fuel - fuel.amount*fuel.perunit,0)
if(to_load)
@@ -988,7 +988,7 @@
reliability = 1000
init()
fuel = new /obj/item/stack/sheet/mineral/uranium(src)
fuel = new /obj/item/stack/material/uranium(src)
fuel.amount = 0
pr_mech_generator = new /datum/global_iterator/mecha_generator/nuclear(list(src),0)
pr_mech_generator.set_delay(equip_cooldown)

View File

@@ -720,23 +720,23 @@
var/type
switch(mat_string)
if(DEFAULT_WALL_MATERIAL)
type = /obj/item/stack/sheet/metal
type = /obj/item/stack/material/steel
if("glass")
type = /obj/item/stack/sheet/glass
type = /obj/item/stack/material/glass
if("gold")
type = /obj/item/stack/sheet/mineral/gold
type = /obj/item/stack/material/gold
if("silver")
type = /obj/item/stack/sheet/mineral/silver
type = /obj/item/stack/material/silver
if("diamond")
type = /obj/item/stack/sheet/mineral/diamond
type = /obj/item/stack/material/diamond
if("phoron")
type = /obj/item/stack/sheet/mineral/phoron
type = /obj/item/stack/material/phoron
if("uranium")
type = /obj/item/stack/sheet/mineral/uranium
type = /obj/item/stack/material/uranium
else
return 0
var/result = 0
var/obj/item/stack/sheet/res = new type(src)
var/obj/item/stack/material/res = new type(src)
// amount available to take out
var/total_amount = round(resources[mat_string]/res.perunit)
@@ -775,25 +775,25 @@
I.crit_fail = 1
I.loc = src.loc
if(src.resources[DEFAULT_WALL_MATERIAL] >= 3750)
var/obj/item/stack/sheet/metal/G = new /obj/item/stack/sheet/metal(src.loc)
var/obj/item/stack/material/steel/G = new /obj/item/stack/material/steel(src.loc)
G.amount = round(src.resources[DEFAULT_WALL_MATERIAL] / G.perunit)
if(src.resources["glass"] >= 3750)
var/obj/item/stack/sheet/glass/G = new /obj/item/stack/sheet/glass(src.loc)
var/obj/item/stack/material/glass/G = new /obj/item/stack/material/glass(src.loc)
G.amount = round(src.resources["glass"] / G.perunit)
if(src.resources["phoron"] >= 2000)
var/obj/item/stack/sheet/mineral/phoron/G = new /obj/item/stack/sheet/mineral/phoron(src.loc)
var/obj/item/stack/material/phoron/G = new /obj/item/stack/material/phoron(src.loc)
G.amount = round(src.resources["phoron"] / G.perunit)
if(src.resources["silver"] >= 2000)
var/obj/item/stack/sheet/mineral/silver/G = new /obj/item/stack/sheet/mineral/silver(src.loc)
var/obj/item/stack/material/silver/G = new /obj/item/stack/material/silver(src.loc)
G.amount = round(src.resources["silver"] / G.perunit)
if(src.resources["gold"] >= 2000)
var/obj/item/stack/sheet/mineral/gold/G = new /obj/item/stack/sheet/mineral/gold(src.loc)
var/obj/item/stack/material/gold/G = new /obj/item/stack/material/gold(src.loc)
G.amount = round(src.resources["gold"] / G.perunit)
if(src.resources["uranium"] >= 2000)
var/obj/item/stack/sheet/mineral/uranium/G = new /obj/item/stack/sheet/mineral/uranium(src.loc)
var/obj/item/stack/material/uranium/G = new /obj/item/stack/material/uranium(src.loc)
G.amount = round(src.resources["uranium"] / G.perunit)
if(src.resources["diamond"] >= 2000)
var/obj/item/stack/sheet/mineral/diamond/G = new /obj/item/stack/sheet/mineral/diamond(src.loc)
var/obj/item/stack/material/diamond/G = new /obj/item/stack/material/diamond(src.loc)
G.amount = round(src.resources["diamond"] / G.perunit)
qdel(src)
return 1
@@ -807,19 +807,19 @@
var/material
switch(W.type)
if(/obj/item/stack/sheet/mineral/gold)
if(/obj/item/stack/material/gold)
material = "gold"
if(/obj/item/stack/sheet/mineral/silver)
if(/obj/item/stack/material/silver)
material = "silver"
if(/obj/item/stack/sheet/mineral/diamond)
if(/obj/item/stack/material/diamond)
material = "diamond"
if(/obj/item/stack/sheet/mineral/phoron)
if(/obj/item/stack/material/phoron)
material = "phoron"
if(/obj/item/stack/sheet/metal)
if(/obj/item/stack/material/steel)
material = DEFAULT_WALL_MATERIAL
if(/obj/item/stack/sheet/glass)
if(/obj/item/stack/material/glass)
material = "glass"
if(/obj/item/stack/sheet/mineral/uranium)
if(/obj/item/stack/material/uranium)
material = "uranium"
else
return ..()
@@ -828,7 +828,7 @@
user << "The fabricator is currently processing. Please wait until completion."
return
var/obj/item/stack/sheet/stack = W
var/obj/item/stack/material/stack = W
var/sname = "[stack.name]"
var/amnt = stack.perunit

View File

@@ -1764,8 +1764,9 @@
if(!damage)
return 0
src.log_message("Attack by an animal. Attacker - [user].",1)
src.log_message("Attacked. Attacker - [user].",1)
user.do_attack_animation(src)
if(!prob(src.deflect_chance))
src.take_damage(damage)
src.check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))

View File

@@ -108,7 +108,7 @@
"backkey"=/obj/item/weapon/crowbar,
"desc"="External armor is installed."),
//3
list("key"=/obj/item/stack/sheet/plasteel,
list("key"=/obj/item/stack/material/plasteel,
"backkey"=/obj/item/weapon/weldingtool,
"desc"="Internal armor is welded."),
//4
@@ -120,7 +120,7 @@
"backkey"=/obj/item/weapon/crowbar,
"desc"="Internal armor is installed"),
//6
list("key"=/obj/item/stack/sheet/metal,
list("key"=/obj/item/stack/material/steel,
"backkey"=/obj/item/weapon/screwdriver,
"desc"="Peripherals control module is secured"),
//7
@@ -236,7 +236,7 @@
holder.icon_state = "ripley10"
else
user.visible_message("[user] pries internal armor layer from [holder].", "You prie internal armor layer from [holder].")
var/obj/item/stack/sheet/metal/MS = new /obj/item/stack/sheet/metal(get_turf(holder))
var/obj/item/stack/material/steel/MS = new /obj/item/stack/material/steel(get_turf(holder))
MS.amount = 5
holder.icon_state = "ripley8"
if(4)
@@ -259,7 +259,7 @@
holder.icon_state = "ripley13"
else
user.visible_message("[user] pries external armor layer from [holder].", "You prie external armor layer from [holder].")
var/obj/item/stack/sheet/plasteel/MS = new /obj/item/stack/sheet/plasteel(get_turf(holder))
var/obj/item/stack/material/plasteel/MS = new /obj/item/stack/material/plasteel(get_turf(holder))
MS.amount = 5
holder.icon_state = "ripley11"
if(1)
@@ -330,7 +330,7 @@
"backkey"=/obj/item/weapon/crowbar,
"desc"="Internal armor is installed"),
//6
list("key"=/obj/item/stack/sheet/metal,
list("key"=/obj/item/stack/material/steel,
"backkey"=/obj/item/weapon/screwdriver,
"desc"="Advanced capacitor is secured"),
//7
@@ -518,7 +518,7 @@
holder.icon_state = "gygax16"
else
user.visible_message("[user] pries internal armor layer from [holder].", "You prie internal armor layer from [holder].")
var/obj/item/stack/sheet/metal/MS = new /obj/item/stack/sheet/metal(get_turf(holder))
var/obj/item/stack/material/steel/MS = new /obj/item/stack/material/steel(get_turf(holder))
MS.amount = 5
holder.icon_state = "gygax14"
if(4)
@@ -599,11 +599,11 @@
"backkey"=/obj/item/weapon/crowbar,
"desc"="External armor is installed."),
//3
list("key"=/obj/item/stack/sheet/plasteel,
list("key"=/obj/item/stack/material/plasteel,
"backkey"=/obj/item/weapon/crowbar,
"desc"="External armor is being installed."),
//4
list("key"=/obj/item/stack/sheet/plasteel,
list("key"=/obj/item/stack/material/plasteel,
"backkey"=/obj/item/weapon/weldingtool,
"desc"="Internal armor is welded."),
//5
@@ -616,7 +616,7 @@
"desc"="Internal armor is installed"),
//7
list("key"=/obj/item/stack/sheet/plasteel,
list("key"=/obj/item/stack/material/plasteel,
"backkey"=/obj/item/weapon/screwdriver,
"desc"="Peripherals control module is secured"),
//8
@@ -733,7 +733,7 @@
holder.icon_state = "fireripley10"
else
user.visible_message("[user] pries internal armor layer from [holder].", "You prie internal armor layer from [holder].")
var/obj/item/stack/sheet/plasteel/MS = new /obj/item/stack/sheet/plasteel(get_turf(holder))
var/obj/item/stack/material/plasteel/MS = new /obj/item/stack/material/plasteel(get_turf(holder))
MS.amount = 5
holder.icon_state = "fireripley8"
if(5)
@@ -756,7 +756,7 @@
holder.icon_state = "fireripley13"
else
user.visible_message("[user] removes the external armor from [holder].", "You remove the external armor from [holder].")
var/obj/item/stack/sheet/plasteel/MS = new /obj/item/stack/sheet/plasteel(get_turf(holder))
var/obj/item/stack/material/plasteel/MS = new /obj/item/stack/material/plasteel(get_turf(holder))
MS.amount = 5
holder.icon_state = "fireripley11"
if(2)
@@ -765,7 +765,7 @@
holder.icon_state = "fireripley14"
else
user.visible_message("[user] pries external armor layer from [holder].", "You prie external armor layer from [holder].")
var/obj/item/stack/sheet/plasteel/MS = new /obj/item/stack/sheet/plasteel(get_turf(holder))
var/obj/item/stack/material/plasteel/MS = new /obj/item/stack/material/plasteel(get_turf(holder))
MS.amount = 5
holder.icon_state = "fireripley12"
if(1)
@@ -833,7 +833,7 @@
"backkey"=/obj/item/weapon/crowbar,
"desc"="Internal armor is installed"),
//6
list("key"=/obj/item/stack/sheet/metal,
list("key"=/obj/item/stack/material/steel,
"backkey"=/obj/item/weapon/screwdriver,
"desc"="Advanced capacitor is secured"),
//7
@@ -1022,7 +1022,7 @@
holder.icon_state = "durand16"
else
user.visible_message("[user] pries internal armor layer from [holder].", "You prie internal armor layer from [holder].")
var/obj/item/stack/sheet/metal/MS = new /obj/item/stack/sheet/metal(get_turf(holder))
var/obj/item/stack/material/steel/MS = new /obj/item/stack/material/steel(get_turf(holder))
MS.amount = 5
holder.icon_state = "durand14"
if(4)
@@ -1125,7 +1125,7 @@
"backkey"=/obj/item/weapon/crowbar,
"desc"="External armor is installed."),
//3
list("key"=/obj/item/stack/sheet/plasteel,
list("key"=/obj/item/stack/material/plasteel,
"backkey"=/obj/item/weapon/weldingtool,
"desc"="Internal armor is welded."),
//4
@@ -1137,7 +1137,7 @@
"backkey"=/obj/item/weapon/crowbar,
"desc"="Internal armor is installed"),
//6
list("key"=/obj/item/stack/sheet/metal,
list("key"=/obj/item/stack/material/steel,
"backkey"=/obj/item/weapon/screwdriver,
"desc"="Peripherals control module is secured"),
//7
@@ -1253,7 +1253,7 @@
holder.icon_state = "odysseus10"
else
user.visible_message("[user] pries internal armor layer from [holder].", "You prie internal armor layer from [holder].")
var/obj/item/stack/sheet/metal/MS = new /obj/item/stack/sheet/metal(get_turf(holder))
var/obj/item/stack/material/steel/MS = new /obj/item/stack/material/steel(get_turf(holder))
MS.amount = 5
holder.icon_state = "odysseus8"
if(4)
@@ -1276,7 +1276,7 @@
user.visible_message("[user] secures external armor layer.", "You secure external reinforced armor layer.")
holder.icon_state = "odysseus13"
else
var/obj/item/stack/sheet/plasteel/MS = new /obj/item/stack/sheet/plasteel(get_turf(holder))
var/obj/item/stack/material/plasteel/MS = new /obj/item/stack/material/plasteel(get_turf(holder))
MS.amount = 5
user.visible_message("[user] pries [MS] from [holder].", "You prie [MS] from [holder].")
holder.icon_state = "odysseus11"

View File

@@ -10,7 +10,7 @@
density = 1
anchored = 0
opacity = 0
var/list/welder_salvage = list(/obj/item/stack/sheet/plasteel,/obj/item/stack/sheet/metal,/obj/item/stack/rods)
var/list/welder_salvage = list(/obj/item/stack/material/plasteel,/obj/item/stack/material/steel,/obj/item/stack/rods)
var/list/wirecutters_salvage = list(/obj/item/stack/cable_coil)
var/list/crowbar_salvage
var/salvage_num = 5

View File

@@ -10,7 +10,7 @@
/obj/item/apc_frame/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if (istype(W, /obj/item/weapon/wrench))
new /obj/item/stack/sheet/metal( get_turf(src.loc), 2 )
new /obj/item/stack/material/steel( get_turf(src.loc), 2 )
qdel(src)
/obj/item/apc_frame/proc/try_build(turf/on_wall)

View File

@@ -1,25 +1,54 @@
/obj/item/ashtray
icon = 'icons/ashtray.dmi'
var/
max_butts = 0
empty_desc = ""
icon_empty = ""
icon_half = ""
icon_full = ""
icon_broken = ""
var/global/list/ashtray_cache = list()
/obj/item/ashtray/New()
..()
/obj/item/weapon/material/ashtray
name = "ashtray"
icon = 'icons/obj/objects.dmi'
icon_state = "blank"
force_divisor = 0.1
thrown_force_divisor = 0.1
var/image/base_image
var/max_butts = 10
/obj/item/weapon/material/ashtray/New(var/newloc, var/material_name)
..(newloc, material_name)
if(!material)
qdel(src)
return
max_butts = round(material.hardness/10) //This is arbitrary but whatever.
src.pixel_y = rand(-5, 5)
src.pixel_x = rand(-6, 6)
update_icon()
return
/obj/item/ashtray/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (health < 1)
/obj/item/weapon/material/ashtray/update_icon()
color = null
overlays.Cut()
var/cache_key = "base-[material.name]"
if(!ashtray_cache[cache_key])
var/image/I = image('icons/obj/objects.dmi',"ashtray")
I.color = material.icon_colour
ashtray_cache[cache_key] = I
overlays |= ashtray_cache[cache_key]
if (contents.len == max_butts)
if(!ashtray_cache["full"])
ashtray_cache["full"] = image('icons/obj/objects.dmi',"ashtray_full")
overlays |= ashtray_cache["full"]
desc = "It's stuffed full."
else if (contents.len > max_butts/2)
if(!ashtray_cache["half"])
ashtray_cache["half"] = image('icons/obj/objects.dmi',"ashtray_half")
overlays |= ashtray_cache["half"]
desc = "It's half-filled."
else
desc = "An ashtray made of [material.display_name]."
/obj/item/weapon/material/ashtray/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (health <= 0)
return
if (istype(W,/obj/item/weapon/cigbutt) || istype(W,/obj/item/clothing/mask/smokable/cigarette) || istype(W, /obj/item/weapon/flame/match))
if (contents.len >= max_butts)
user << "This ashtray is full."
user << "\The [src] is full."
return
user.remove_from_mob(W)
W.loc = src
@@ -27,12 +56,14 @@
if (istype(W,/obj/item/clothing/mask/smokable/cigarette))
var/obj/item/clothing/mask/smokable/cigarette/cig = W
if (cig.lit == 1)
src.visible_message("[user] crushes [cig] in [src], putting it out.")
src.visible_message("[user] crushes [cig] in \the [src], putting it out.")
processing_objects.Remove(cig)
var/obj/item/butt = new cig.type_butt(src)
cig.transfer_fingerprints_to(butt)
qdel(cig)
W = butt
spawn(1)
TemperatureAct(150)
else if (cig.lit == 0)
user << "You place [cig] in [src] without even smoking it. Why would you do that?"
@@ -40,12 +71,7 @@
user.update_inv_l_hand()
user.update_inv_r_hand()
add_fingerprint(user)
if (contents.len == max_butts)
icon_state = icon_full
desc = empty_desc + " It's stuffed full."
else if (contents.len > max_butts/2)
icon_state = icon_half
desc = empty_desc + " It's half-filled."
update_icon()
else
health = max(0,health - W.force)
user << "You hit [src] with [W]."
@@ -53,83 +79,29 @@
die()
return
/obj/item/ashtray/throw_impact(atom/hit_atom)
/obj/item/weapon/material/ashtray/throw_impact(atom/hit_atom)
if (health > 0)
health = max(0,health - 3)
if (health < 1)
die()
return
if (contents.len)
src.visible_message("\red [src] slams into [hit_atom] spilling its contents!")
src.visible_message("<span class='danger'>\The [src] slams into [hit_atom], spilling its contents!</span>")
for (var/obj/item/clothing/mask/smokable/cigarette/O in contents)
O.loc = src.loc
icon_state = icon_empty
update_icon()
return ..()
/obj/item/ashtray/proc/die()
src.visible_message("\red [src] shatters spilling its contents!")
for (var/obj/item/clothing/mask/smokable/cigarette/O in contents)
O.loc = src.loc
icon_state = icon_broken
/obj/item/weapon/material/ashtray/proc/die()
material.place_shard(get_turf(src))
qdel(src)
return
/obj/item/ashtray/plastic
name = "plastic ashtray"
desc = "Cheap plastic ashtray."
icon_state = "ashtray_bl"
icon_empty = "ashtray_bl"
icon_half = "ashtray_half_bl"
icon_full = "ashtray_full_bl"
icon_broken = "ashtray_bork_bl"
max_butts = 14
health = 24.0
matter = list(DEFAULT_WALL_MATERIAL = 30,"glass" = 30)
empty_desc = "Cheap plastic ashtray."
throwforce = 3.0
die()
..()
name = "pieces of plastic"
desc = "Pieces of plastic with ash on them."
return
/obj/item/weapon/material/ashtray/plastic/New(var/newloc)
..(newloc, "plastic")
/obj/item/weapon/material/ashtray/bronze/New(var/newloc)
..(newloc, "gold") //placeholder
/obj/item/ashtray/bronze
name = "bronze ashtray"
desc = "Massive bronze ashtray."
icon_state = "ashtray_br"
icon_empty = "ashtray_br"
icon_half = "ashtray_half_br"
icon_full = "ashtray_full_br"
icon_broken = "ashtray_bork_br"
max_butts = 10
health = 72.0
matter = list(DEFAULT_WALL_MATERIAL = 80)
empty_desc = "Massive bronze ashtray."
throwforce = 10.0
die()
..()
name = "pieces of bronze"
desc = "Pieces of bronze with ash on them."
return
/obj/item/ashtray/glass
name = "glass ashtray"
desc = "Glass ashtray. Looks fragile."
icon_state = "ashtray_gl"
icon_empty = "ashtray_gl"
icon_half = "ashtray_half_gl"
icon_full = "ashtray_full_gl"
icon_broken = "ashtray_bork_gl"
max_butts = 12
health = 12.0
matter = list("glass" = 60)
empty_desc = "Glass ashtray. Looks fragile."
throwforce = 6.0
die()
..()
name = "shards of glass"
desc = "Shards of glass with ash on them."
playsound(src, "shatter", 30, 1)
return
/obj/item/weapon/material/ashtray/glass/New(var/newloc)
..(newloc, "glass")

View File

@@ -28,6 +28,7 @@
icon_state = "[initial(icon_state)]-on"
set_light(brightness_on)
else
icon_state = "[initial(icon_state)]"
set_light(0)
/obj/item/device/flashlight/attack_self(mob/user)
@@ -36,6 +37,7 @@
return 0
on = !on
update_brightness(user)
user.update_action_buttons()
return 1

View File

@@ -108,7 +108,7 @@
mode_nice = design
mode = "[replacetext(design, "-", "")]full"
if("corner")
var/design = input("Which design?", "Floor painter") in list("black", "red", "blue", "green", "yellow", "purple", "neutral", "white", "white-grey", "white-red", "white-blue", "white-green", "white-yellow", "white-purple")
var/design = input("Which design?", "Floor painter") in list("black", "red", "blue", "green", "yellow", "purple", "neutral", "white", "white-red", "white-blue", "white-green", "white-yellow", "white-purple")
mode_nice = "[design] corner"
mode = "[replacetext(design, "-", "")]corner"
tile_dir_mode = 2
@@ -128,11 +128,13 @@
if(design == "white")
mode = "whitehall"
mode_nice = "white side"
tile_dir_mode = 1
else if(design == "black") // because SOMEONE made the black/grey side/corner sprite have the same name as the 'empty space' sprite :(
mode = "blackfloor"
mode_nice = design
else
mode_nice = design
mode = replacetext(design, "-", "")
tile_dir_mode = 1
tile_dir_mode = 1
if("special")
var/design = input("Which design?", "Floor painter") in list("arrival", "escape", "caution", "warning", "white-warning", "white-blue-green", "loadingarea", "delivery", "bot", "white-delivery", "white-bot")
if(design == "white-blue-green")

View File

@@ -71,8 +71,8 @@
Emag()
return
if(istype(W, /obj/item/stack/sheet/glass))
var/obj/item/stack/sheet/glass/G = W
if(istype(W, /obj/item/stack/material/glass))
var/obj/item/stack/material/glass/G = W
if(uses >= max_uses)
user << "<span class='warning'>[src.name] is full."
return

View File

@@ -125,8 +125,8 @@
/obj/item/robot_parts/robot_suit/attackby(obj/item/W as obj, mob/user as mob)
..()
if(istype(W, /obj/item/stack/sheet/metal) && !l_arm && !r_arm && !l_leg && !r_leg && !chest && !head)
var/obj/item/stack/sheet/metal/M = W
if(istype(W, /obj/item/stack/material/steel) && !l_arm && !r_arm && !l_leg && !r_leg && !chest && !head)
var/obj/item/stack/material/steel/M = W
if (M.use(1))
var/obj/item/weapon/secbot_assembly/ed209_assembly/B = new /obj/item/weapon/secbot_assembly/ed209_assembly
B.loc = get_turf(src)

View File

@@ -32,7 +32,7 @@
return
if(WT.remove_fuel(0,user))
var/obj/item/stack/sheet/metal/new_item = new(usr.loc)
var/obj/item/stack/material/steel/new_item = new(usr.loc)
new_item.add_to_stacks(usr)
for (var/mob/M in viewers(src))
M.show_message("\red [src] is shaped into metal by [user.name] with the weldingtool.", 3, "\red You hear welding.", 2)

View File

@@ -10,32 +10,19 @@
/*
* Glass sheets
*/
/obj/item/stack/sheet/glass
/obj/item/stack/material/glass
name = "glass"
desc = "HOLY SHEET! That is a lot of glass."
singular_name = "glass sheet"
icon_state = "sheet-glass"
matter = list("glass" = 3750)
origin_tech = "materials=1"
var/created_window = /obj/structure/window/basic
var/is_reinforced = 0
var/list/construction_options = list("One Direction", "Full Window")
sheettype = "glass"
default_type = "glass"
/obj/item/stack/sheet/glass/cyborg
name = "glass synthesizer"
desc = "A device that makes glass."
gender = NEUTER
singular_name = "glass"
matter = null
uses_charge = 1
charge_costs = list(1000)
stacktype = /obj/item/stack/sheet/glass
/obj/item/stack/sheet/glass/attack_self(mob/user as mob)
/obj/item/stack/material/glass/attack_self(mob/user as mob)
construct_window(user)
/obj/item/stack/sheet/glass/attackby(obj/item/W, mob/user)
/obj/item/stack/material/glass/attackby(obj/item/W, mob/user)
..()
if(!is_reinforced)
if(istype(W,/obj/item/stack/cable_coil))
@@ -54,10 +41,10 @@
user << "<span class='warning'>You need one rod and one sheet of glass to make reinforced glass.</span>"
return
var/obj/item/stack/sheet/glass/reinforced/RG = new (user.loc)
var/obj/item/stack/material/glass/reinforced/RG = new (user.loc)
RG.add_fingerprint(user)
RG.add_to_stacks(user)
var/obj/item/stack/sheet/glass/G = src
var/obj/item/stack/material/glass/G = src
src = null
var/replace = (user.get_inactive_hand()==G)
V.use(1)
@@ -65,7 +52,7 @@
if (!G && replace)
user.put_in_hands(RG)
/obj/item/stack/sheet/glass/proc/construct_window(mob/user as mob)
/obj/item/stack/material/glass/proc/construct_window(mob/user as mob)
if(!user || !src) return 0
if(!istype(user.loc,/turf)) return 0
if(!user.IsAdvancedToolUser())
@@ -139,53 +126,34 @@
/*
* Reinforced glass sheets
*/
/obj/item/stack/sheet/glass/reinforced
/obj/item/stack/material/glass/reinforced
name = "reinforced glass"
desc = "Glass which has been reinforced with metal rods."
singular_name = "reinforced glass sheet"
icon_state = "sheet-rglass"
matter = list(DEFAULT_WALL_MATERIAL = 1875,"glass" = 3750)
origin_tech = "materials=2"
default_type = "reinforced glass"
created_window = /obj/structure/window/reinforced
is_reinforced = 1
construction_options = list("One Direction", "Full Window", "Windoor")
/obj/item/stack/sheet/glass/reinforced/cyborg
name = "reinforced glass synthesizer"
desc = "A device that makes reinforced glass."
gender = NEUTER
matter = null
uses_charge = 2
charge_costs = list(1000)
singular_name = "reinforced glass sheet"
icon_state = "sheet-rglass"
charge_costs = list(500, 1000)
stacktype = /obj/item/stack/sheet/glass/reinforced
/*
* Phoron Glass sheets
*/
/obj/item/stack/sheet/glass/phoronglass
/obj/item/stack/material/glass/phoronglass
name = "phoron glass"
desc = "A very strong and very resistant sheet of a phoron-glass alloy."
singular_name = "phoron glass sheet"
icon_state = "sheet-phoronglass"
matter = list("glass" = 7500)
origin_tech = "materials=3;phorontech=2"
created_window = /obj/structure/window/phoronbasic
sheettype = "phoronglass"
default_type = "phoron glass"
/obj/item/stack/sheet/glass/phoronglass/attackby(obj/item/W, mob/user)
/obj/item/stack/material/glass/phoronglass/attackby(obj/item/W, mob/user)
..()
if( istype(W, /obj/item/stack/rods) )
var/obj/item/stack/rods/V = W
var/obj/item/stack/sheet/glass/phoronrglass/RG = new (user.loc)
var/obj/item/stack/material/glass/phoronrglass/RG = new (user.loc)
RG.add_fingerprint(user)
RG.add_to_stacks(user)
V.use(1)
var/obj/item/stack/sheet/glass/G = src
var/obj/item/stack/material/glass/G = src
src = null
var/replace = (user.get_inactive_hand()==G)
G.use(1)
@@ -197,13 +165,10 @@
/*
* Reinforced phoron glass sheets
*/
/obj/item/stack/sheet/glass/phoronrglass
/obj/item/stack/material/glass/phoronrglass
name = "reinforced phoron glass"
desc = "Phoron glass which has been reinforced with metal rods."
singular_name = "reinforced phoron glass sheet"
icon_state = "sheet-phoronrglass"
matter = list("glass" = 7500,DEFAULT_WALL_MATERIAL = 1875)
origin_tech = "materials=4;phorontech=2"
default_type = "reinforced phoron glass"
created_window = /obj/structure/window/phoronreinforced
is_reinforced = 1

View File

@@ -1,39 +1,39 @@
/obj/item/stack/sheet/animalhide/human
/obj/item/stack/material/animalhide/human
name = "human skin"
desc = "The by-product of human farming."
singular_name = "human skin piece"
icon_state = "sheet-hide"
origin_tech = ""
/obj/item/stack/sheet/animalhide/corgi
/obj/item/stack/material/animalhide/corgi
name = "corgi hide"
desc = "The by-product of corgi farming."
singular_name = "corgi hide piece"
icon_state = "sheet-corgi"
origin_tech = ""
/obj/item/stack/sheet/animalhide/cat
/obj/item/stack/material/animalhide/cat
name = "cat hide"
desc = "The by-product of cat farming."
singular_name = "cat hide piece"
icon_state = "sheet-cat"
origin_tech = ""
/obj/item/stack/sheet/animalhide/monkey
/obj/item/stack/material/animalhide/monkey
name = "monkey hide"
desc = "The by-product of monkey farming."
singular_name = "monkey hide piece"
icon_state = "sheet-monkey"
origin_tech = ""
/obj/item/stack/sheet/animalhide/lizard
/obj/item/stack/material/animalhide/lizard
name = "lizard skin"
desc = "Sssssss..."
singular_name = "lizard skin piece"
icon_state = "sheet-lizard"
origin_tech = ""
/obj/item/stack/sheet/animalhide/xeno
/obj/item/stack/material/animalhide/xeno
name = "alien hide"
desc = "The skin of a terrible creature."
singular_name = "alien hide piece"
@@ -41,7 +41,7 @@
origin_tech = ""
//don't see anywhere else to put these, maybe together they could be used to make the xenos suit?
/obj/item/stack/sheet/xenochitin
/obj/item/stack/material/xenochitin
name = "alien chitin"
desc = "A piece of the hide of a terrible creature."
singular_name = "alien hide piece"
@@ -63,14 +63,14 @@
icon_state = "weed_extract"
origin_tech = ""
/obj/item/stack/sheet/hairlesshide
/obj/item/stack/material/hairlesshide
name = "hairless hide"
desc = "This hide was stripped of it's hair, but still needs tanning."
singular_name = "hairless hide piece"
icon_state = "sheet-hairlesshide"
origin_tech = ""
/obj/item/stack/sheet/wetleather
/obj/item/stack/material/wetleather
name = "wet leather"
desc = "This leather has been cleaned but still needs to be dried."
singular_name = "wet leather piece"
@@ -79,35 +79,25 @@
var/wetness = 30 //Reduced when exposed to high temperautres
var/drying_threshold_temperature = 500 //Kelvin to start drying
/obj/item/stack/sheet/leather
name = "leather"
desc = "The by-product of mob grinding."
singular_name = "leather piece"
icon_state = "sheet-leather"
origin_tech = "materials=2"
//Step one - dehairing.
/obj/item/stack/sheet/animalhide/attackby(obj/item/weapon/W as obj, mob/user as mob)
if( istype(W, /obj/item/weapon/kitchenknife) || \
istype(W, /obj/item/weapon/kitchen/utensil/knife) || \
istype(W, /obj/item/weapon/twohanded/fireaxe) || \
istype(W, /obj/item/weapon/hatchet) )
/obj/item/stack/material/animalhide/attackby(obj/item/weapon/W as obj, mob/user as mob)
if( istype(W, /obj/item/weapon/material/knife) || \
istype(W, /obj/item/weapon/material/kitchen/utensil/knife) || \
istype(W, /obj/item/weapon/material/twohanded/fireaxe) || \
istype(W, /obj/item/weapon/material/hatchet) )
//visible message on mobs is defined as visible_message(var/message, var/self_message, var/blind_message)
usr.visible_message("\blue \the [usr] starts cutting hair off \the [src]", "\blue You start cutting the hair off \the [src]", "You hear the sound of a knife rubbing against flesh")
if(do_after(user,50))
usr << "\blue You cut the hair from this [src.singular_name]"
//Try locating an exisitng stack on the tile and add to there if possible
for(var/obj/item/stack/sheet/hairlesshide/HS in usr.loc)
for(var/obj/item/stack/material/hairlesshide/HS in usr.loc)
if(HS.amount < 50)
HS.amount++
src.use(1)
break
//If it gets to here it means it did not find a suitable stack on the tile.
var/obj/item/stack/sheet/hairlesshide/HS = new(usr.loc)
var/obj/item/stack/material/hairlesshide/HS = new(usr.loc)
HS.amount = 1
src.use(1)
else
@@ -117,20 +107,20 @@
//Step two - washing..... it's actually in washing machine code.
//Step three - drying
/obj/item/stack/sheet/wetleather/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
/obj/item/stack/material/wetleather/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
..()
if(exposed_temperature >= drying_threshold_temperature)
wetness--
if(wetness == 0)
//Try locating an exisitng stack on the tile and add to there if possible
for(var/obj/item/stack/sheet/leather/HS in src.loc)
for(var/obj/item/stack/material/leather/HS in src.loc)
if(HS.amount < 50)
HS.amount++
src.use(1)
wetness = initial(wetness)
break
//If it gets to here it means it did not find a suitable stack on the tile.
var/obj/item/stack/sheet/leather/HS = new(src.loc)
var/obj/item/stack/material/leather/HS = new(src.loc)
HS.amount = 1
wetness = initial(wetness)
src.use(1)

View File

@@ -17,13 +17,13 @@
var/obj/item/stack/cable_coil/CC = new/obj/item/stack/cable_coil(user.loc)
CC.amount = 5
amount--
new/obj/item/stack/sheet/glass(user.loc)
new/obj/item/stack/material/glass(user.loc)
if(amount <= 0)
user.drop_from_inventory(src)
qdel(src)
if(istype(O,/obj/item/stack/sheet/metal))
var/obj/item/stack/sheet/metal/M = O
if(istype(O,/obj/item/stack/material/steel))
var/obj/item/stack/material/steel/M = O
if (M.use(1))
use(1)
new/obj/item/stack/tile/light(get_turf(user))

View File

@@ -1,209 +0,0 @@
/*
Mineral Sheets
Contains:
- Sandstone
- Diamond
- Uranium
- Phoron
- Gold
- Silver
- Enriched Uranium
- Platinum
- Metallic Hydrogen
- Tritium
- Osmium
*/
var/global/list/datum/stack_recipe/sandstone_recipes = list ( \
new/datum/stack_recipe("pile of dirt", /obj/machinery/portable_atmospherics/hydroponics/soil, 3, time = 10, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("sandstone door", /obj/structure/mineral_door/sandstone, 10, one_per_turf = 1, on_floor = 1), \
)
var/global/list/datum/stack_recipe/silver_recipes = list ( \
new/datum/stack_recipe("silver door", /obj/structure/mineral_door/silver, 10, one_per_turf = 1, on_floor = 1), \
)
var/global/list/datum/stack_recipe/diamond_recipes = list ( \
new/datum/stack_recipe("diamond door", /obj/structure/mineral_door/transparent/diamond, 10, one_per_turf = 1, on_floor = 1), \
)
var/global/list/datum/stack_recipe/uranium_recipes = list ( \
new/datum/stack_recipe("uranium door", /obj/structure/mineral_door/uranium, 10, one_per_turf = 1, on_floor = 1), \
)
var/global/list/datum/stack_recipe/gold_recipes = list ( \
new/datum/stack_recipe("golden door", /obj/structure/mineral_door/gold, 10, one_per_turf = 1, on_floor = 1), \
)
var/global/list/datum/stack_recipe/phoron_recipes = list ( \
new/datum/stack_recipe("phoron door", /obj/structure/mineral_door/transparent/phoron, 10, one_per_turf = 1, on_floor = 1), \
)
var/global/list/datum/stack_recipe/plastic_recipes = list ( \
new/datum/stack_recipe("plastic crate", /obj/structure/closet/crate/plastic, 10, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("plastic ashtray", /obj/item/ashtray/plastic, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("plastic fork", /obj/item/weapon/kitchen/utensil/pfork, 1, on_floor = 1), \
new/datum/stack_recipe("plastic spoon", /obj/item/weapon/kitchen/utensil/pspoon, 1, on_floor = 1), \
new/datum/stack_recipe("plastic knife", /obj/item/weapon/kitchen/utensil/pknife, 1, on_floor = 1), \
new/datum/stack_recipe("plastic bag", /obj/item/weapon/storage/bag/plasticbag, 3, on_floor = 1), \
new/datum/stack_recipe("blood pack", /obj/item/weapon/reagent_containers/blood/empty, 4, on_floor = 0), \
new/datum/stack_recipe("reagent dispenser cartridge (large)", /obj/item/weapon/reagent_containers/chem_disp_cartridge, 5, on_floor=0), // 500u
new/datum/stack_recipe("reagent dispenser cartridge (med)", /obj/item/weapon/reagent_containers/chem_disp_cartridge/medium, 3, on_floor=0), // 250u
new/datum/stack_recipe("reagent dispenser cartridge (small)", /obj/item/weapon/reagent_containers/chem_disp_cartridge/small, 1, on_floor=0) // 100u
)
var/global/list/datum/stack_recipe/iron_recipes = list ( \
new/datum/stack_recipe("iron door", /obj/structure/mineral_door/iron, 20, one_per_turf = 1, on_floor = 1), \
null, \
)
/obj/item/stack/sheet/mineral
force = 5.0
throwforce = 5
w_class = 3.0
throw_speed = 3
throw_range = 3
/obj/item/stack/sheet/mineral/New()
..()
pixel_x = rand(0,4)-4
pixel_y = rand(0,4)-4
obj/item/stack/sheet/mineral/iron
name = "iron"
icon_state = "sheet-silver"
origin_tech = "materials=1"
sheettype = "iron"
color = "#333333"
perunit = 3750
obj/item/stack/sheet/mineral/iron/New()
..()
recipes = iron_recipes
/obj/item/stack/sheet/mineral/sandstone
name = "sandstone brick"
desc = "This appears to be a combination of both sand and stone."
singular_name = "sandstone brick"
icon_state = "sheet-sandstone"
throw_speed = 4
throw_range = 5
origin_tech = "materials=1"
sheettype = "sandstone"
/obj/item/stack/sheet/mineral/sandstone/New()
..()
recipes = sandstone_recipes
/obj/item/stack/sheet/mineral/diamond
name = "diamond"
icon_state = "sheet-diamond"
origin_tech = "materials=6"
perunit = 3750
sheettype = "diamond"
/obj/item/stack/sheet/mineral/diamond/New()
..()
recipes = diamond_recipes
/obj/item/stack/sheet/mineral/uranium
name = "uranium"
icon_state = "sheet-uranium"
origin_tech = "materials=5"
perunit = 2000
sheettype = "uranium"
/obj/item/stack/sheet/mineral/uranium/New()
..()
recipes = uranium_recipes
/obj/item/stack/sheet/mineral/phoron
name = "solid phoron"
icon_state = "sheet-phoron"
origin_tech = "phorontech=2;materials=2"
perunit = 2000
sheettype = "phoron"
/obj/item/stack/sheet/mineral/phoron/New()
..()
recipes = phoron_recipes
/obj/item/stack/sheet/mineral/plastic
name = "Plastic"
icon_state = "sheet-plastic"
origin_tech = "materials=3"
perunit = 2000
sheettype = "plastic"
/obj/item/stack/sheet/mineral/plastic/New()
..()
recipes = plastic_recipes
/obj/item/stack/sheet/mineral/plastic/cyborg
name = "plastic sheets synthesizer"
gender = NEUTER
uses_charge = 1
charge_costs = list(1000)
stacktype = /obj/item/stack/sheet/mineral/plastic
/obj/item/stack/sheet/mineral/gold
name = "gold"
icon_state = "sheet-gold"
origin_tech = "materials=4"
perunit = 2000
sheettype = "gold"
/obj/item/stack/sheet/mineral/gold/New()
..()
recipes = gold_recipes
/obj/item/stack/sheet/mineral/silver
name = "silver"
icon_state = "sheet-silver"
origin_tech = "materials=3"
perunit = 2000
sheettype = "silver"
/obj/item/stack/sheet/mineral/silver/New()
..()
recipes = silver_recipes
/obj/item/stack/sheet/mineral/enruranium
name = "enriched uranium"
icon_state = "sheet-enruranium"
origin_tech = "materials=5"
perunit = 1000
//Valuable resource, cargo can sell it.
/obj/item/stack/sheet/mineral/platinum
name = "platinum"
icon_state = "sheet-adamantine"
origin_tech = "materials=2"
sheettype = "platinum"
perunit = 2000
//Extremely valuable to Research.
/obj/item/stack/sheet/mineral/mhydrogen
name = "metallic hydrogen"
icon_state = "sheet-mythril"
origin_tech = "materials=6;powerstorage=5;magnets=5"
sheettype = "mhydrogen"
perunit = 2000
//Fuel for MRSPACMAN generator.
/obj/item/stack/sheet/mineral/tritium
name = "tritium"
icon_state = "sheet-silver"
sheettype = "tritium"
origin_tech = "materials=5"
color = "#777777"
perunit = 2000
/obj/item/stack/sheet/mineral/osmium
name = "osmium"
icon_state = "sheet-silver"
sheettype = "osmium"
origin_tech = "materials=5"
color = "#9999FF"
perunit = 2000

View File

@@ -1,223 +0,0 @@
/* Diffrent misc types of sheets
* Contains:
* Metal
* Plasteel
* Wood
* Cloth
* Cardboard
*/
/*
* Metal
*/
var/global/list/datum/stack_recipe/metal_recipes = list ( \
new/datum/stack_recipe("stool", /obj/item/weapon/stool, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("chair", /obj/structure/bed/chair, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("bed", /obj/structure/bed, 2, one_per_turf = 1, on_floor = 1), \
null, \
new/datum/stack_recipe_list("office chairs",list( \
new/datum/stack_recipe("dark office chair", /obj/structure/bed/chair/office/dark, 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("light office chair", /obj/structure/bed/chair/office/light, 5, one_per_turf = 1, on_floor = 1), \
), 5), \
new/datum/stack_recipe_list("comfy chairs", list( \
new/datum/stack_recipe("beige comfy chair", /obj/structure/bed/chair/comfy/beige, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("black comfy chair", /obj/structure/bed/chair/comfy/black, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("brown comfy chair", /obj/structure/bed/chair/comfy/brown, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("lime comfy chair", /obj/structure/bed/chair/comfy/lime, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("teal comfy chair", /obj/structure/bed/chair/comfy/teal, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("red comfy chair", /obj/structure/bed/chair/comfy/red, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("blue comfy chair", /obj/structure/bed/chair/comfy/blue, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("purple comfy chair", /obj/structure/bed/chair/comfy/purp, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("green comfy chair", /obj/structure/bed/chair/comfy/green, 2, one_per_turf = 1, on_floor = 1), \
), 2), \
null, \
new/datum/stack_recipe("table frame", /obj/structure/table, 1, time = 10, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("rack", /obj/structure/table/rack, 1, time = 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("metal baseball bat", /obj/item/weapon/twohanded/baseballbat/metal, 10, time = 20, one_per_turf = 0, on_floor = 1), \
new/datum/stack_recipe("closet", /obj/structure/closet, 2, time = 15, one_per_turf = 1, on_floor = 1), \
null, \
new/datum/stack_recipe("canister", /obj/machinery/portable_atmospherics/canister, 10, time = 15, one_per_turf = 1, on_floor = 1), \
null, \
new/datum/stack_recipe("cannon frame", /obj/item/weapon/cannonframe, 10, time = 15, one_per_turf = 0, on_floor = 0), \
null, \
new/datum/stack_recipe("floor tile", /obj/item/stack/tile/plasteel, 1, 4, 20), \
new/datum/stack_recipe("metal rod", /obj/item/stack/rods, 1, 2, 60), \
null, \
new/datum/stack_recipe("computer frame", /obj/structure/computerframe, 5, time = 25, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("wall girders", /obj/structure/girder, 2, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("machine frame", /obj/machinery/constructable_frame/machine_frame, 5, time = 25, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("turret frame", /obj/machinery/porta_turret_construct, 5, time = 25, one_per_turf = 1, on_floor = 1), \
null, \
new/datum/stack_recipe_list("airlock assemblies", list( \
new/datum/stack_recipe("standard airlock assembly", /obj/structure/door_assembly, 4, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("command airlock assembly", /obj/structure/door_assembly/door_assembly_com, 4, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("security airlock assembly", /obj/structure/door_assembly/door_assembly_sec, 4, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("engineering airlock assembly", /obj/structure/door_assembly/door_assembly_eng, 4, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("mining airlock assembly", /obj/structure/door_assembly/door_assembly_min, 4, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("atmospherics airlock assembly", /obj/structure/door_assembly/door_assembly_atmo, 4, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("research airlock assembly", /obj/structure/door_assembly/door_assembly_research, 4, time = 50, one_per_turf = 1, on_floor = 1), \
/* new/datum/stack_recipe("science airlock assembly", /obj/structure/door_assembly/door_assembly_science, 4, time = 50, one_per_turf = 1, on_floor = 1), \ */
new/datum/stack_recipe("medical airlock assembly", /obj/structure/door_assembly/door_assembly_med, 4, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("maintenance airlock assembly", /obj/structure/door_assembly/door_assembly_mai, 4, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("external airlock assembly", /obj/structure/door_assembly/door_assembly_ext, 4, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("freezer airlock assembly", /obj/structure/door_assembly/door_assembly_fre, 4, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("airtight hatch assembly", /obj/structure/door_assembly/door_assembly_hatch, 4, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("maintenance hatch assembly", /obj/structure/door_assembly/door_assembly_mhatch, 4, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("high security airlock assembly", /obj/structure/door_assembly/door_assembly_highsecurity, 4, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("emergency shutter", /obj/structure/firedoor_assembly, 4, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("multi-tile airlock assembly", /obj/structure/door_assembly/multi_tile, 4, time = 50, one_per_turf = 1, on_floor = 1), \
), 4), \
null, \
new/datum/stack_recipe("grenade casing", /obj/item/weapon/grenade/chem_grenade), \
new/datum/stack_recipe("light fixture frame", /obj/item/frame/light, 2), \
new/datum/stack_recipe("small light fixture frame", /obj/item/frame/light/small, 1), \
null, \
new/datum/stack_recipe("apc frame", /obj/item/apc_frame, 2), \
new/datum/stack_recipe("air alarm frame", /obj/item/frame/air_alarm, 2), \
new/datum/stack_recipe("fire alarm frame", /obj/item/frame/fire_alarm, 2), \
null, \
new/datum/stack_recipe("knife blade", /obj/item/butterflyblade, 6, time = 20, one_per_turf = 0, on_floor = 1) \
)
/obj/item/stack/sheet/metal
name = DEFAULT_WALL_MATERIAL
desc = "Sheets made out off steel."
singular_name = "metal sheet"
icon_state = "sheet-metal"
matter = list(DEFAULT_WALL_MATERIAL = 3750)
throwforce = 14.0
flags = CONDUCT
origin_tech = "materials=1"
sheettype = DEFAULT_WALL_MATERIAL
/obj/item/stack/sheet/metal/cyborg
name = "steel synthesizer"
desc = "A device that makes steel sheets."
gender = NEUTER
matter = null
uses_charge = 1
charge_costs = list(1000)
stacktype = /obj/item/stack/sheet/metal
/obj/item/stack/sheet/metal/New(var/loc, var/amount=null)
recipes = metal_recipes
return ..()
/*
* Plasteel
*/
var/global/list/datum/stack_recipe/plasteel_recipes = list ( \
new/datum/stack_recipe("AI core", /obj/structure/AIcore, 4, time = 50, one_per_turf = 1), \
new/datum/stack_recipe("Metal crate", /obj/structure/closet/crate, 10, time = 50, one_per_turf = 1), \
new/datum/stack_recipe("RUST fuel assembly port frame", /obj/item/frame/rust/assembly, 12, time = 50, one_per_turf = 1), \
new/datum/stack_recipe("RUST fuel compressor frame", /obj/item/frame/rust, 12, time = 50, one_per_turf = 1), \
new/datum/stack_recipe("knife grip", /obj/item/butterflyhandle, 4, time = 20, one_per_turf = 0, on_floor = 1),
)
/obj/item/stack/sheet/plasteel
name = "plasteel"
singular_name = "plasteel sheet"
desc = "This sheet is an alloy of iron and platinum."
icon_state = "sheet-plasteel"
item_state = "sheet-metal"
matter = list(DEFAULT_WALL_MATERIAL = 7500)
throwforce = 15.0
flags = CONDUCT
origin_tech = "materials=2"
sheettype = "plasteel"
/obj/item/stack/sheet/plasteel/cyborg
name = "plasteel synthesizer"
desc = "A device that makes plasteel sheets."
gender = NEUTER
singular_name = "plasteel sheet"
matter = null
uses_charge = 1
charge_costs = list(1000)
stacktype = /obj/item/stack/sheet/plasteel
/obj/item/stack/sheet/plasteel/New(var/loc, var/amount=null)
recipes = plasteel_recipes
return ..()
/*
* Wood
*/
var/global/list/datum/stack_recipe/wood_recipes = list ( \
new/datum/stack_recipe("wooden sandals", /obj/item/clothing/shoes/sandal, 1), \
new/datum/stack_recipe("wood floor tile", /obj/item/stack/tile/wood, 1, 4, 20), \
new/datum/stack_recipe("wooden chair", /obj/structure/bed/chair/wood, 3, time = 10, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("wooden barricade", /obj/structure/barricade/wooden, 5, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("crossbow frame", /obj/item/weapon/crossbowframe, 5, time = 25, one_per_turf = 0, on_floor = 0), \
new/datum/stack_recipe("wooden door", /obj/structure/mineral_door/wood, 10, time = 20, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("coffin", /obj/structure/closet/coffin, 5, time = 15, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("baseball bat", /obj/item/weapon/twohanded/baseballbat, 10, time = 20, one_per_turf = 0, on_floor = 1) \
// new/datum/stack_recipe("apiary", /obj/item/apiary, 10, time = 25, one_per_turf = 0, on_floor = 0)
)
/obj/item/stack/sheet/wood
name = "wooden plank"
desc = "One can only guess that this is a bunch of wood."
singular_name = "wood plank"
icon_state = "sheet-wood"
origin_tech = "materials=1;biotech=1"
sheettype = "wood"
/obj/item/stack/sheet/wood/cyborg
name = "wood synthesizer"
desc = "A device that makes wooden planks."
gender = NEUTER
singular_name = "wood plank"
icon_state = "sheet-wood"
uses_charge = 1
charge_costs = list(1000)
stacktype = /obj/item/stack/sheet/wood
/obj/item/stack/sheet/wood/New(var/loc, var/amount=null)
recipes = wood_recipes
return ..()
/*
* Cloth
*/
/obj/item/stack/sheet/cloth
name = "cloth"
desc = "This roll of cloth is made from only the finest chemicals and bunny rabbits."
singular_name = "cloth roll"
icon_state = "sheet-cloth"
origin_tech = "materials=2"
/*
* Cardboard
*/
var/global/list/datum/stack_recipe/cardboard_recipes = list ( \
new/datum/stack_recipe("box", /obj/item/weapon/storage/box), \
new/datum/stack_recipe("donut box", /obj/item/weapon/storage/box/donut/empty), \
new/datum/stack_recipe("egg box", /obj/item/weapon/storage/fancy/egg_box), \
new/datum/stack_recipe("light tubes", /obj/item/weapon/storage/box/lights/tubes), \
new/datum/stack_recipe("light bulbs", /obj/item/weapon/storage/box/lights/bulbs), \
new/datum/stack_recipe("mouse traps", /obj/item/weapon/storage/box/mousetraps), \
new/datum/stack_recipe("cardborg suit", /obj/item/clothing/suit/cardborg, 3), \
new/datum/stack_recipe("cardborg helmet", /obj/item/clothing/head/cardborg), \
new/datum/stack_recipe("pizza box", /obj/item/pizzabox), \
null, \
new/datum/stack_recipe_list("folders",list( \
new/datum/stack_recipe("blue folder", /obj/item/weapon/folder/blue), \
new/datum/stack_recipe("grey folder", /obj/item/weapon/folder), \
new/datum/stack_recipe("red folder", /obj/item/weapon/folder/red), \
new/datum/stack_recipe("white folder", /obj/item/weapon/folder/white), \
new/datum/stack_recipe("yellow folder", /obj/item/weapon/folder/yellow), \
)) \
)
/obj/item/stack/sheet/cardboard //BubbleWrap
name = "cardboard"
desc = "Large sheets of card, like boxes folded flat."
singular_name = "cardboard sheet"
icon_state = "sheet-card"
origin_tech = "materials=1"
/obj/item/stack/sheet/cardboard/New(var/loc, var/amount=null)
recipes = cardboard_recipes
return ..()

View File

@@ -1,25 +0,0 @@
/obj/item/stack/sheet
name = "sheet"
w_class = 3.0
force = 5
throwforce = 5
max_amount = 50
throw_speed = 3
throw_range = 3
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "smashed")
var/perunit = 3750
var/sheettype = null //this is used for girders in the creation of walls/false walls
// Since the sheetsnatcher was consolidated into weapon/storage/bag we now use
// item/attackby() properly, making this unnecessary
/*/obj/item/stack/sheet/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/storage/bag/sheetsnatcher))
var/obj/item/weapon/storage/bag/sheetsnatcher/S = W
if(!S.mode)
S.add(src,user)
else
for (var/obj/item/stack/sheet/stack in locate(src.x,src.y,src.z))
S.add(stack,user)
..()*/

View File

@@ -129,7 +129,11 @@
return
if (use(required))
var/atom/O = new recipe.result_type(user.loc)
var/atom/O
if(recipe.use_material)
O = new recipe.result_type(user.loc, recipe.use_material)
else
O = new recipe.result_type(user.loc)
O.set_dir(user.dir)
O.add_fingerprint(user)
@@ -338,7 +342,9 @@
var/time = 0
var/one_per_turf = 0
var/on_floor = 0
New(title, result_type, req_amount = 1, res_amount = 1, max_res_amount = 1, time = 0, one_per_turf = 0, on_floor = 0)
var/use_material
New(title, result_type, req_amount = 1, res_amount = 1, max_res_amount = 1, time = 0, one_per_turf = 0, on_floor = 0, supplied_material = null)
src.title = title
src.result_type = result_type
src.req_amount = req_amount
@@ -347,6 +353,7 @@
src.time = time
src.one_per_turf = one_per_turf
src.on_floor = on_floor
src.use_material = supplied_material
/*
* Recipe list datum

View File

@@ -28,7 +28,7 @@
/obj/item/stack/tile/light/attackby(var/obj/item/O as obj, var/mob/user as mob)
..()
if(istype(O,/obj/item/weapon/crowbar))
new/obj/item/stack/sheet/metal(user.loc)
new/obj/item/stack/material/steel(user.loc)
amount--
new/obj/item/stack/light_w(user.loc)
if(amount <= 0)

View File

@@ -110,8 +110,8 @@
var/list/the_targets = list(T,T1,T2)
for(var/a = 1 to spray_particles)
spawn(0)
var/obj/effect/effect/water/W = PoolOrNew(new /obj/effect/effect/water, get_turf(src))
spawn(0)
var/obj/effect/effect/water/W = PoolOrNew(/obj/effect/effect/water, get_turf(src))
var/turf/my_target
if(a == 1)
my_target = T
@@ -126,7 +126,7 @@
return
reagents.trans_to_obj(W, spray_amount)
W.set_color()
W.set_up(my_target)
W.set_up(my_target)
if((istype(usr.loc, /turf/space)) || (usr.lastarea.has_gravity == 0))
user.inertia_dir = get_dir(target, user)

View File

@@ -147,13 +147,11 @@ var/last_chew = 0
if(istype(I, /obj/item/stack/rods))
var/obj/item/stack/rods/R = I
if (R.use(1))
var/obj/item/weapon/wirerod/W = new /obj/item/weapon/wirerod
var/obj/item/weapon/material/wirerod/W = new(get_turf(user))
user.put_in_hands(W)
user << "<span class='notice'>You wrap the cable restraint around the top of the rod.</span>"
qdel(src)
update_icon(user)
/obj/item/weapon/handcuffs/cyborg
dispenser = 1

View File

@@ -0,0 +1,70 @@
/obj/item/weapon/material/butterflyconstruction
name = "unfinished concealed knife"
desc = "An unfinished concealed knife, it looks like the screws need to be tightened."
icon = 'icons/obj/buildingobject.dmi'
icon_state = "butterflystep1"
force_divisor = 0.1
thrown_force_divisor = 0.1
/obj/item/weapon/material/butterflyconstruction/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/screwdriver))
user << "You finish the concealed blade weapon."
new /obj/item/weapon/material/butterfly(user.loc, material.name)
qdel(src)
return
/obj/item/weapon/material/butterflyblade
name = "knife blade"
desc = "A knife blade. Unusable as a weapon without a grip."
icon = 'icons/obj/buildingobject.dmi'
icon_state = "butterfly2"
force_divisor = 0.1
thrown_force_divisor = 0.1
/obj/item/weapon/material/butterflyhandle
name = "concealed knife grip"
desc = "A plasteel grip with screw fittings for a blade."
icon = 'icons/obj/buildingobject.dmi'
icon_state = "butterfly1"
force_divisor = 0.1
thrown_force_divisor = 0.1
/obj/item/weapon/material/butterflyhandle/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/material/butterflyblade))
var/obj/item/weapon/material/butterflyblade/B = W
user << "You attach the two concealed blade parts."
new /obj/item/weapon/material/butterflyconstruction(user.loc, B.material.name)
qdel(W)
qdel(src)
return
/obj/item/weapon/material/wirerod
name = "wired rod"
desc = "A rod with some wire wrapped around the top. It'd be easy to attach something to the top bit."
icon_state = "wiredrod"
item_state = "rods"
flags = CONDUCT
force = 8
throwforce = 10
w_class = 3
attack_verb = list("hit", "bludgeoned", "whacked", "bonked")
force_divisor = 0.1
thrown_force_divisor = 0.1
/obj/item/weapon/material/wirerod/attackby(var/obj/item/I, mob/user as mob)
..()
var/obj/item/finished
if(istype(I, /obj/item/weapon/material/shard))
var/obj/item/weapon/material/tmp_shard = I
finished = new /obj/item/weapon/material/twohanded/spear(get_turf(user), tmp_shard.material.name)
user << "<span class='notice'>You fasten \the [I] to the top of the rod with the cable.</span>"
else if(istype(I, /obj/item/weapon/wirecutters))
finished = new /obj/item/weapon/melee/baton/cattleprod(get_turf(user))
user << "<span class='notice'>You fasten the wirecutters to the top of the rod with the cable, prongs outward.</span>"
if(finished)
user.drop_from_inventory(src)
user.drop_from_inventory(I)
qdel(I)
qdel(src)
user.put_in_hands(finished)
update_icon(user)

View File

@@ -1,468 +0,0 @@
/* Kitchen tools
* Contains:
* Utensils
* Spoons
* Forks
* Knives
* Kitchen knives
* Butcher's cleaver
* Rolling Pins
* Trays
*/
/obj/item/weapon/kitchen
icon = 'icons/obj/kitchen.dmi'
/*
* Utensils
*/
/obj/item/weapon/kitchen/utensil
force = 5.0
w_class = 1.0
throwforce = 5.0
throw_speed = 3
throw_range = 5
flags = CONDUCT
origin_tech = "materials=1"
attack_verb = list("attacked", "stabbed", "poked")
sharp = 0
var/loaded //Descriptive string for currently loaded food object.
/obj/item/weapon/kitchen/utensil/New()
if (prob(60))
src.pixel_y = rand(0, 4)
create_reagents(5)
return
/obj/item/weapon/kitchen/utensil/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!istype(M))
return ..()
if(user.a_intent != I_HELP)
if(user.zone_sel.selecting == "head" || user.zone_sel.selecting == "eyes")
if((CLUMSY in user.mutations) && prob(50))
M = user
return eyestab(M,user)
else
return ..()
if (reagents.total_volume > 0)
reagents.trans_to_mob(M, reagents.total_volume, CHEM_INGEST)
if(M == user)
for(var/mob/O in viewers(M, null))
O.show_message(text("\blue [] eats some [] from \the [].", user, loaded, src), 1)
M.reagents.add_reagent("nutriment", 1)
else
for(var/mob/O in viewers(M, null))
O.show_message(text("\blue [] feeds [] some [] from \the []", user, M, loaded, src), 1)
M.reagents.add_reagent("nutriment", 1)
playsound(M.loc,'sound/items/eatfood.ogg', rand(10,40), 1)
overlays.Cut()
return
else
..()
/obj/item/weapon/kitchen/utensil/fork
name = "fork"
desc = "It's a fork. Sure is pointy."
icon_state = "fork"
/obj/item/weapon/kitchen/utensil/pfork
name = "plastic fork"
desc = "Yay, no washing up to do."
icon_state = "pfork"
/obj/item/weapon/kitchen/utensil/spoon
name = "spoon"
desc = "It's a spoon. You can see your own upside-down face in it."
icon_state = "spoon"
attack_verb = list("attacked", "poked")
/obj/item/weapon/kitchen/utensil/pspoon
name = "plastic spoon"
desc = "It's a plastic spoon. How dull."
icon_state = "pspoon"
attack_verb = list("attacked", "poked")
/*
* Knives
*/
/obj/item/weapon/kitchen/utensil/knife
name = "knife"
desc = "Can cut through any food."
icon_state = "knife"
force = 10.0
throwforce = 10.0
sharp = 1
edge = 1
suicide_act(mob/user)
viewers(user) << pick("\red <b>[user] is slitting \his wrists with the [src.name]! It looks like \he's trying to commit suicide.</b>", \
"\red <b>[user] is slitting \his throat with the [src.name]! It looks like \he's trying to commit suicide.</b>", \
"\red <b>[user] is slitting \his stomach open with the [src.name]! It looks like \he's trying to commit seppuku.</b>")
return (BRUTELOSS)
/obj/item/weapon/kitchen/utensil/knife/attack(target as mob, mob/living/user as mob)
if ((CLUMSY in user.mutations) && prob(50))
user << "\red You accidentally cut yourself with the [src]."
user.take_organ_damage(20)
return
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
return ..()
/obj/item/weapon/kitchen/utensil/pknife
name = "plastic knife"
desc = "The bluntest of blades."
icon_state = "pknife"
force = 1
throwforce = 1
sharp = 0
edge = 1 //for cutting pizzas
/obj/item/weapon/kitchen/utensil/knife/attack(target as mob, mob/living/user as mob)
if ((CLUMSY in user.mutations) && prob(50))
user << "\red You somehow managed to cut yourself with the [src]."
user.take_organ_damage(20)
return
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
return ..()
/*
* Kitchen knives
*/
/obj/item/weapon/kitchenknife
name = "kitchen knife"
icon = 'icons/obj/kitchen.dmi'
icon_state = "knife"
desc = "A general purpose Chef's Knife made by SpaceCook Incorporated. Guaranteed to stay sharp for years to come."
flags = CONDUCT
sharp = 1
edge = 1
force = 10.0
w_class = 3.0
throwforce = 6.0
throw_speed = 3
throw_range = 6
matter = list(DEFAULT_WALL_MATERIAL = 12000)
origin_tech = "materials=1"
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
suicide_act(mob/user)
viewers(user) << pick("\red <b>[user] is slitting \his wrists with the [src.name]! It looks like \he's trying to commit suicide.</b>", \
"\red <b>[user] is slitting \his throat with the [src.name]! It looks like \he's trying to commit suicide.</b>", \
"\red <b>[user] is slitting \his stomach open with the [src.name]! It looks like \he's trying to commit seppuku.</b>")
return (BRUTELOSS)
/obj/item/weapon/kitchenknife/hook
name = "meat hook"
desc = "A sharp, metal hook what sticks into things."
icon_state = "hook_knife"
item_state = "hook_knife"
/obj/item/weapon/kitchenknife/ritual
name = "ritual knife"
desc = "The unearthly energies that once powered this blade are now dormant."
icon = 'icons/obj/wizard.dmi'
icon_state = "render"
/*
* Bucher's cleaver
*/
/obj/item/weapon/butch
name = "butcher's cleaver"
icon = 'icons/obj/kitchen.dmi'
icon_state = "butch"
desc = "A huge thing used for chopping and chopping up meat. This includes clowns and clown-by-products."
flags = CONDUCT
force = 15.0
w_class = 2.0
throwforce = 8.0
throw_speed = 3
throw_range = 6
matter = list(DEFAULT_WALL_MATERIAL = 12000)
origin_tech = "materials=1"
attack_verb = list("cleaved", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
sharp = 1
edge = 1
/obj/item/weapon/butch/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
return ..()
/*
* Rolling Pins
*/
/obj/item/weapon/kitchen/rollingpin
name = "rolling pin"
desc = "Used to knock out the Bartender."
icon_state = "rolling_pin"
force = 8.0
throwforce = 10.0
throw_speed = 2
throw_range = 7
w_class = 3.0
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked") //I think the rollingpin attackby will end up ignoring this anyway.
/obj/item/weapon/kitchen/rollingpin/attack(mob/living/M as mob, mob/living/user as mob)
if ((CLUMSY in user.mutations) && prob(50))
user << "\red The [src] slips out of your hand and hits your head."
user.take_organ_damage(10)
user.Paralyse(2)
return
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey])</font>")
msg_admin_attack("[user.name] ([user.ckey]) used the [src.name] to attack [M.name] ([M.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
var/t = user:zone_sel.selecting
if (t == "head")
if(ishuman(M))
var/mob/living/carbon/human/H = M
if (H.stat < 2 && H.health < 50 && prob(90))
// ******* Check
if (istype(H, /obj/item/clothing/head) && H.flags & 8 && prob(80))
H << "\red The helmet protects you from being hit hard in the head!"
return
var/time = rand(2, 6)
if (prob(75))
H.Paralyse(time)
else
H.Stun(time)
if(H.stat != 2) H.stat = 1
user.visible_message("\red <B>[H] has been knocked unconscious!</B>", "\red <B>You knock [H] unconscious!</B>")
return
else
H.visible_message("\red [user] tried to knock [H] unconscious!", "\red [user] tried to knock you unconscious!")
H.eye_blurry += 3
return ..()
/*
* Trays - Agouri
*/
/obj/item/weapon/tray
name = "tray"
icon = 'icons/obj/food.dmi'
icon_state = "tray"
desc = "A metal tray to lay food on."
throwforce = 12.0
throwforce = 10.0
throw_speed = 1
throw_range = 5
w_class = 3.0
flags = CONDUCT
matter = list(DEFAULT_WALL_MATERIAL = 3000)
/* // NOPE
var/food_total= 0
var/burger_amt = 0
var/cheese_amt = 0
var/fries_amt = 0
var/classyalcdrink_amt = 0
var/alcdrink_amt = 0
var/bottle_amt = 0
var/soda_amt = 0
var/carton_amt = 0
var/pie_amt = 0
var/meatbreadslice_amt = 0
var/salad_amt = 0
var/miscfood_amt = 0
*/
var/list/carrying = list() // List of things on the tray. - Doohl
var/max_carry = 10 // w_class = 1 -- takes up 1
// w_class = 2 -- takes up 3
// w_class = 3 -- takes up 5
/obj/item/weapon/tray/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
// Drop all the things. All of them.
overlays.Cut()
for(var/obj/item/I in carrying)
I.loc = M.loc
carrying.Remove(I)
if(isturf(I.loc))
spawn()
for(var/i = 1, i <= rand(1,2), i++)
if(I)
step(I, pick(NORTH,SOUTH,EAST,WEST))
sleep(rand(2,4))
if((CLUMSY in user.mutations) && prob(50)) //What if he's a clown?
M << "\red You accidentally slam yourself with the [src]!"
M.Weaken(1)
user.take_organ_damage(2)
if(prob(50))
playsound(M, 'sound/items/trayhit1.ogg', 50, 1)
return
else
playsound(M, 'sound/items/trayhit2.ogg', 50, 1) //sound playin'
return //it always returns, but I feel like adding an extra return just for safety's sakes. EDIT; Oh well I won't :3
var/mob/living/carbon/human/H = M ///////////////////////////////////// /Let's have this ready for later.
if(!(user.zone_sel.selecting == ("eyes" || "head"))) //////////////hitting anything else other than the eyes
if(prob(33))
src.add_blood(H)
var/turf/location = H.loc
if (istype(location, /turf/simulated))
location.add_blood(H) ///Plik plik, the sound of blood
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey])</font>")
msg_admin_attack("[user.name] ([user.ckey]) used the [src.name] to attack [M.name] ([M.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
if(prob(15))
M.Weaken(3)
M.take_organ_damage(3)
else
M.take_organ_damage(5)
if(prob(50))
playsound(M, 'sound/items/trayhit1.ogg', 50, 1)
for(var/mob/O in viewers(M, null))
O.show_message(text("\red <B>[] slams [] with the tray!</B>", user, M), 1)
return
else
playsound(M, 'sound/items/trayhit2.ogg', 50, 1) //we applied the damage, we played the sound, we showed the appropriate messages. Time to return and stop the proc
for(var/mob/O in viewers(M, null))
O.show_message(text("\red <B>[] slams [] with the tray!</B>", user, M), 1)
return
if(istype(M, /mob/living/carbon/human) && ((H.head && H.head.flags & HEADCOVERSEYES) || (H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || (H.glasses && H.glasses.flags & GLASSESCOVERSEYES)))
M << "\red You get slammed in the face with the tray, against your mask!"
if(prob(33))
src.add_blood(H)
if (H.wear_mask)
H.wear_mask.add_blood(H)
if (H.head)
H.head.add_blood(H)
if (H.glasses && prob(33))
H.glasses.add_blood(H)
var/turf/location = H.loc
if (istype(location, /turf/simulated)) //Addin' blood! At least on the floor and item :v
location.add_blood(H)
if(prob(50))
playsound(M, 'sound/items/trayhit1.ogg', 50, 1)
for(var/mob/O in viewers(M, null))
O.show_message(text("\red <B>[] slams [] with the tray!</B>", user, M), 1)
else
playsound(M, 'sound/items/trayhit2.ogg', 50, 1) //sound playin'
for(var/mob/O in viewers(M, null))
O.show_message(text("\red <B>[] slams [] with the tray!</B>", user, M), 1)
if(prob(10))
M.Stun(rand(1,3))
M.take_organ_damage(3)
return
else
M.take_organ_damage(5)
return
else //No eye or head protection, tough luck!
M << "\red You get slammed in the face with the tray!"
if(prob(33))
src.add_blood(M)
var/turf/location = H.loc
if (istype(location, /turf/simulated))
location.add_blood(H)
if(prob(50))
playsound(M, 'sound/items/trayhit1.ogg', 50, 1)
for(var/mob/O in viewers(M, null))
O.show_message(text("\red <B>[] slams [] in the face with the tray!</B>", user, M), 1)
else
playsound(M, 'sound/items/trayhit2.ogg', 50, 1) //sound playin' again
for(var/mob/O in viewers(M, null))
O.show_message(text("\red <B>[] slams [] in the face with the tray!</B>", user, M), 1)
if(prob(30))
M.Stun(rand(2,4))
M.take_organ_damage(4)
return
else
M.take_organ_damage(8)
if(prob(30))
M.Weaken(2)
return
return
/obj/item/weapon/tray/var/cooldown = 0 //shield bash cooldown. based on world.time
/obj/item/weapon/tray/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/kitchen/rollingpin))
if(cooldown < world.time - 25)
user.visible_message("<span class='warning'>[user] bashes [src] with [W]!</span>")
playsound(user.loc, 'sound/effects/shieldbash.ogg', 50, 1)
cooldown = world.time
else
..()
/*
===============~~~~~================================~~~~~====================
= =
= Code for trays carrying things. By Doohl for Doohl erryday Doohl Doohl~ =
= =
===============~~~~~================================~~~~~====================
*/
/obj/item/weapon/tray/proc/calc_carry()
// calculate the weight of the items on the tray
var/val = 0 // value to return
for(var/obj/item/I in carrying)
if(I.w_class == 1.0)
val ++
else if(I.w_class == 2.0)
val += 3
else
val += 5
return val
/obj/item/weapon/tray/pickup(mob/user)
if(!isturf(loc))
return
for(var/obj/item/I in loc)
if( I != src && !I.anchored && !istype(I, /obj/item/clothing/under) && !istype(I, /obj/item/clothing/suit) && !istype(I, /obj/item/projectile) )
var/add = 0
if(I.w_class == 1.0)
add = 1
else if(I.w_class == 2.0)
add = 3
else
add = 5
if(calc_carry() + add >= max_carry)
break
I.loc = src
carrying.Add(I)
overlays += image("icon" = I.icon, "icon_state" = I.icon_state, "layer" = 30 + I.layer)
/obj/item/weapon/tray/dropped(mob/user)
var/mob/living/M
for(M in src.loc) //to handle hand switching
return
var/foundtable = 0
for(var/obj/structure/table/T in loc)
foundtable = 1
break
overlays.Cut()
for(var/obj/item/I in carrying)
I.loc = loc
carrying.Remove(I)
if(!foundtable && isturf(loc))
// if no table, presume that the person just shittily dropped the tray on the ground and made a mess everywhere!
spawn()
for(var/i = 1, i <= rand(1,2), i++)
if(I)
step(I, pick(NORTH,SOUTH,EAST,WEST))
sleep(rand(2,4))

View File

@@ -0,0 +1,28 @@
/obj/item/weapon/material/twohanded/baseballbat
name = "bat"
desc = "HOME RUN!"
icon_state = "metalbat0"
base_icon = "metalbat"
item_state = "metalbat"
throwforce = 7
attack_verb = list("smashed", "beaten", "slammed", "smacked", "struck", "battered", "bonked")
hitsound = 'sound/weapons/genhit3.ogg'
default_material = "wood"
force_divisor = 1.1 // 22 when wielded with weight 20 (steel)
unwielded_force_divisor = 0.7 // 15 when unwielded based on above.
//Predefined materials go here.
/obj/item/weapon/material/twohanded/baseballbat/metal/New(var/newloc)
..(newloc,"steel")
/obj/item/weapon/material/twohanded/baseballbat/uranium/New(var/newloc)
..(newloc,"uranium")
/obj/item/weapon/material/twohanded/baseballbat/gold/New(var/newloc)
..(newloc,"gold")
/obj/item/weapon/material/twohanded/baseballbat/platinum/New(var/newloc)
..(newloc,"platinum")
/obj/item/weapon/material/twohanded/baseballbat/diamond/New(var/newloc)
..(newloc,"diamond")

View File

@@ -0,0 +1,114 @@
/obj/item/weapon/material/kitchen
icon = 'icons/obj/kitchen.dmi'
/*
* Utensils
*/
/obj/item/weapon/material/kitchen/utensil
w_class = 1
thrown_force_divisor = 1
origin_tech = "materials=1"
attack_verb = list("attacked", "stabbed", "poked")
sharp = 1
edge = 1
force_divisor = 0.1 // 6 when wielded with hardness 60 (steel)
thrown_force_divisor = 0.25 // 5 when thrown with weight 20 (steel)
var/loaded //Descriptive string for currently loaded food object.
/obj/item/weapon/material/kitchen/utensil/New()
..()
if (prob(60))
src.pixel_y = rand(0, 4)
create_reagents(5)
return
/obj/item/weapon/material/kitchen/utensil/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!istype(M))
return ..()
if(user.a_intent != I_HELP)
if(user.zone_sel.selecting == "head" || user.zone_sel.selecting == "eyes")
if((CLUMSY in user.mutations) && prob(50))
M = user
return eyestab(M,user)
else
return ..()
if (reagents.total_volume > 0)
reagents.trans_to_mob(M, reagents.total_volume, CHEM_INGEST)
if(M == user)
M.visible_message("<span class='notice'>\The [user] eats some [loaded] from \the [src].</span>")
else
M.visible_message("<span class='notice'>\The [user] feeds some [loaded] to \the [M] with \the [src].</span>")
playsound(M.loc,'sound/items/eatfood.ogg', rand(10,40), 1)
overlays.Cut()
return
else
..()
/obj/item/weapon/material/kitchen/utensil/fork
name = "fork"
desc = "It's a fork. Sure is pointy."
icon_state = "fork"
/obj/item/weapon/material/kitchen/utensil/fork/plastic
default_material = "plastic"
/obj/item/weapon/material/kitchen/utensil/spoon
name = "spoon"
desc = "It's a spoon. You can see your own upside-down face in it."
icon_state = "spoon"
attack_verb = list("attacked", "poked")
edge = 0
sharp = 0
force_divisor = 0.25 //5 when wielded with weight 20 (steel)
/obj/item/weapon/material/kitchen/utensil/spoon/plastic
default_material = "plastic"
/*
* Knives
*/
/obj/item/weapon/material/kitchen/utensil/knife
name = "knife"
desc = "Can cut through any food."
icon_state = "knife"
force_divisor = 0.2 // 12 when wielded with hardness 60 (steel)
/obj/item/weapon/material/kitchen/utensil/knife/attack(target as mob, mob/living/user as mob)
if ((CLUMSY in user.mutations) && prob(50))
user << "\red You accidentally cut yourself with the [src]."
user.take_organ_damage(20)
return
return ..()
/obj/item/weapon/material/kitchen/utensil/knife/attack(target as mob, mob/living/user as mob)
if ((CLUMSY in user.mutations) && prob(50))
user << "\red You somehow managed to cut yourself with the [src]."
user.take_organ_damage(20)
return
return ..()
/obj/item/weapon/material/kitchen/utensil/knife/plastic
default_material = "plastic"
/*
* Rolling Pins
*/
/obj/item/weapon/material/kitchen/rollingpin
name = "rolling pin"
desc = "Used to knock out the Bartender."
icon_state = "rolling_pin"
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked") //I think the rollingpin attackby will end up ignoring this anyway.
default_material = "wood"
force_divisor = 0.7 // 10 when wielded with weight 15 (wood)
thrown_force_divisor = 1 // as above
/obj/item/weapon/material/kitchen/rollingpin/attack(mob/living/M as mob, mob/living/user as mob)
if ((CLUMSY in user.mutations) && prob(50))
user << "\red The [src] slips out of your hand and hits your head."
user.take_organ_damage(10)
user.Paralyse(2)
return
return ..()

View File

@@ -0,0 +1,90 @@
/obj/item/weapon/material/butterfly
name = "butterfly knife"
desc = "A basic metal blade concealed in a lightweight plasteel grip. Small enough when folded to fit in a pocket."
icon_state = "butterflyknife"
item_state = null
hitsound = null
var/active = 0
w_class = 2
attack_verb = list("patted", "tapped")
force_divisor = 0.25 // 15 when wielded with hardness 60 (steel)
thrown_force_divisor = 0.25 // 5 when thrown with weight 20 (steel)
/obj/item/weapon/material/butterfly/update_force()
if(active)
edge = 1
sharp = 1
..() //Updates force.
throwforce = max(3,force-3)
hitsound = initial(hitsound)
icon_state += "_open"
w_class = 3
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
else
force = 3
edge = 0
sharp = 0
hitsound = null
icon_state = initial(icon_state)
w_class = initial(w_class)
attack_verb = initial(attack_verb)
/obj/item/weapon/material/butterfly/switchblade
name = "switchblade"
desc = "A classic switchblade with gold engraving. Just holding it makes you feel like a gangster."
icon_state = "switchblade"
unbreakable = 1
/obj/item/weapon/material/butterfly/attack_self(mob/user)
active = !active
if(active)
user << "<span class='notice'>You flip out your [src].</span>"
playsound(user, 'sound/weapons/flipblade.ogg', 15, 1)
else
user << "<span class='notice'>The butterfly knife can now be concealed.</span>"
update_force()
add_fingerprint(user)
/*
* Kitchen knives
*/
/obj/item/weapon/material/knife
name = "kitchen knife"
icon = 'icons/obj/kitchen.dmi'
icon_state = "knife"
desc = "A general purpose Chef's Knife made by SpaceCook Incorporated. Guaranteed to stay sharp for years to come."
flags = CONDUCT
sharp = 1
edge = 1
force_divisor = 0.15 // 9 when wielded with hardness 60 (steel)
matter = list(DEFAULT_WALL_MATERIAL = 12000)
origin_tech = "materials=1"
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
unbreakable = 1
/obj/item/weapon/material/knife/suicide_act(mob/user)
viewers(user) << pick("\red <b>[user] is slitting \his wrists with the [src.name]! It looks like \he's trying to commit suicide.</b>", \
"\red <b>[user] is slitting \his throat with the [src.name]! It looks like \he's trying to commit suicide.</b>", \
"\red <b>[user] is slitting \his stomach open with the [src.name]! It looks like \he's trying to commit seppuku.</b>")
return (BRUTELOSS)
/obj/item/weapon/material/knife/hook
name = "meat hook"
desc = "A sharp, metal hook what sticks into things."
icon_state = "hook_knife"
item_state = "hook_knife"
/obj/item/weapon/material/knife/ritual
name = "ritual knife"
desc = "The unearthly energies that once powered this blade are now dormant."
icon = 'icons/obj/wizard.dmi'
icon_state = "render"
applies_material_colour = 0
/obj/item/weapon/material/knife/butch
name = "butcher's cleaver"
icon = 'icons/obj/kitchen.dmi'
icon_state = "butch"
desc = "A huge thing used for chopping and chopping up meat. This includes clowns and clown-by-products."
force_divisor = 0.25 // 15 when wielded with hardness 60 (steel)
attack_verb = list("cleaved", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")

View File

@@ -0,0 +1,104 @@
// SEE code/modules/materials/materials.dm FOR DETAILS ON INHERITED DATUM.
// This class of weapons takes force and appearance data from a material datum.
// They are also fragile based on material data and many can break/smash apart.
/obj/item/weapon/material
health = 10
hitsound = 'sound/weapons/bladeslice.ogg'
gender = NEUTER
throw_speed = 3
throw_range = 7
w_class = 3
sharp = 0
edge = 0
var/applies_material_colour = 1
var/unbreakable
var/force_divisor = 0.5
var/thrown_force_divisor = 0.5
var/default_material = DEFAULT_WALL_MATERIAL
var/material/material
/obj/item/weapon/material/New(var/newloc, var/material_key)
..(newloc)
if(!material_key)
material_key = default_material
set_material(material_key)
/obj/item/weapon/material/proc/update_force()
if(edge || sharp)
force = material.get_edge_damage()
else
force = material.get_blunt_damage()
force = round(force*force_divisor)
throwforce = round(material.get_blunt_damage()*thrown_force_divisor)
//spawn(1)
// world << "[src] has force [force] and throwforce [throwforce] when made from default material [material.name]"
/obj/item/weapon/material/proc/set_material(var/new_material)
material = get_material_by_name(new_material)
if(!material)
qdel(src)
else
name = "[material.display_name] [initial(name)]"
health = round(material.integrity/10)
if(applies_material_colour)
color = material.icon_colour
if(material.products_need_process())
processing_objects |= src
update_force()
/obj/item/weapon/material/Destroy()
processing_objects -= src
..()
/obj/item/weapon/material/attack()
if(!..())
return
if(!unbreakable)
if(material.is_brittle())
health = 0
else if(!prob(material.hardness))
health--
check_health()
/obj/item/weapon/material/proc/check_health()
if(health<=0)
shatter()
/obj/item/weapon/material/proc/shatter()
var/turf/T = get_turf(src)
T.visible_message("<span class='danger'>\The [src] [material.destruction_desc]!</span>")
if(istype(loc, /mob/living))
var/mob/living/M = loc
M.drop_from_inventory(src)
playsound(src, "shatter", 70, 1)
new material.shard_type(T)
qdel(src)
/obj/item/weapon/material/process()
if(!material.radioactivity)
return
for(var/mob/living/L in range(1,src))
L.apply_effect(round(material.radioactivity/3),IRRADIATE,0)
/obj/item/weapon/material/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > material.ignition_point)
TemperatureAct(exposed_temperature)
// This might need adjustment. Will work that out later.
/obj/item/weapon/material/proc/TemperatureAct(temperature)
if(temperature > material.ignition_point)
for(var/turf/simulated/floor/target_tile in range(2,loc))
var/phoronToDeduce = temperature/30
target_tile.assume_gas("phoron", phoronToDeduce, 200+T0C)
spawn (0) target_tile.hotspot_expose(temperature, 400)
health -= phoronToDeduce/100
check_health()
/obj/item/weapon/material/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(material.ignition_point && WT.remove_fuel(0, user))
TemperatureAct(150)
else
return ..()

View File

@@ -0,0 +1,67 @@
/obj/item/weapon/material/harpoon
name = "harpoon"
sharp = 1
edge = 1
desc = "Tharr she blows!"
icon_state = "harpoon"
item_state = "harpoon"
force_divisor = 0.3 // 18 with hardness 60 (steel)
attack_verb = list("jabbed","stabbed","ripped")
/obj/item/weapon/material/hatchet
name = "hatchet"
desc = "A very sharp axe blade upon a short fibremetal handle. It has a long history of chopping things, but now it is used for chopping wood."
icon = 'icons/obj/weapons.dmi'
icon_state = "hatchet"
force_divisor = 0.2 // 12 with hardness 60 (steel)
thrown_force_divisor = 0.75 // 15 with weight 20 (steel)
w_class = 2
sharp = 1
edge = 1
origin_tech = "materials=2;combat=1"
attack_verb = list("chopped", "torn", "cut")
applies_material_colour = 0
/obj/item/weapon/material/hatchet/unathiknife
name = "duelling knife"
desc = "A length of leather-bound wood studded with razor-sharp teeth. How crude."
icon = 'icons/obj/weapons.dmi'
icon_state = "unathiknife"
attack_verb = list("ripped", "torn", "cut")
/obj/item/weapon/material/hatchet/tacknife
name = "tactical knife"
desc = "You'd be killing loads of people if this was Medal of Valor: Heroes of Nyx."
icon = 'icons/obj/weapons.dmi'
icon_state = "tacknife"
item_state = "knife"
attack_verb = list("stabbed", "chopped", "cut")
applies_material_colour = 1
/obj/item/weapon/material/minihoe // -- Numbers
name = "mini hoe"
desc = "It's used for removing weeds or scratching your back."
icon = 'icons/obj/weapons.dmi'
icon_state = "hoe"
item_state = "hoe"
flags = CONDUCT | NOBLUDGEON
force_divisor = 0.25 // 5 with weight 20 (steel)
thrown_force_divisor = 0.25 // as above
w_class = 2
attack_verb = list("slashed", "sliced", "cut", "clawed")
/obj/item/weapon/material/scythe
icon_state = "scythe0"
name = "scythe"
desc = "A sharp and curved blade on a long fibremetal handle, this tool makes it easy to reap what you sow."
force_divisor = 0.275 // 16 with hardness 60 (steel)
thrown_force_divisor = 0.25 // 5 with weight 20 (steel)
sharp = 1
edge = 1
throw_speed = 1
throw_range = 3
w_class = 4
flags = NOSHIELD
slot_flags = SLOT_BACK
origin_tech = "materials=2;combat=2"
attack_verb = list("chopped", "sliced", "cut", "reaped")

View File

@@ -0,0 +1,89 @@
// Glass shards
/obj/item/weapon/material/shard
name = "shard"
icon = 'icons/obj/shards.dmi'
desc = "Made of nothing. How does this even exist?" // set based on material, if this desc is visible it's a bug (shards default to being made of glass)
icon_state = "large"
sharp = 1
edge = 1
w_class = 2
force_divisor = 0.2 // 6 with hardness 30 (glass)
thrown_force_divisor = 0.4 // 4 with weight 15 (glass)
item_state = "shard-glass"
attack_verb = list("stabbed", "slashed", "sliced", "cut")
default_material = "glass"
unbreakable = 1 //It's already broken.
/obj/item/weapon/material/shard/suicide_act(mob/user)
viewers(user) << pick("\red <b>[user] is slitting \his wrists with \the [src]! It looks like \he's trying to commit suicide.</b>", \
"\red <b>[user] is slitting \his throat with \the [src]! It looks like \he's trying to commit suicide.</b>")
return (BRUTELOSS)
/obj/item/weapon/material/shard/set_material(var/new_material)
..(new_material)
if(!istype(material))
return
icon_state = "[material.shard_icon][pick("large", "medium", "small")]"
pixel_x = rand(-8, 8)
pixel_y = rand(-8, 8)
update_icon()
if(material.shard_type)
name = "[material.display_name] [material.shard_type]"
desc = "A small piece of [material.display_name]. It looks sharp, you wouldn't want to step on it barefoot. Could probably be used as ... a throwing weapon?"
switch(material.shard_type)
if(SHARD_SPLINTER, SHARD_SHRAPNEL)
gender = PLURAL
else
gender = NEUTER
else
qdel(src)
/obj/item/weapon/material/shard/update_icon()
if(material)
color = material.icon_colour
// 1-(1-x)^2, so that glass shards with 0.3 opacity end up somewhat visible at 0.51 opacity
alpha = 255 * (1 - (1 - material.opacity)*(1 - material.opacity))
else
color = "#ffffff"
alpha = 255
/obj/item/weapon/material/shard/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/weldingtool) && material.shard_can_repair)
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0, user))
material.place_sheet(loc)
qdel(src)
return
return ..()
/obj/item/weapon/material/shard/Crossed(AM as mob|obj)
if(ismob(AM))
var/mob/M = AM
M << "\red <B>You step on \the [src]!</B>"
playsound(src.loc, 'sound/effects/glass_step.ogg', 50, 1) // not sure how to handle metal shards with sounds
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.species.flags & IS_SYNTHETIC || (H.species.siemens_coefficient<0.5)) //Thick skin.
return
if( !H.shoes && ( !H.wear_suit || !(H.wear_suit.body_parts_covered & FEET) ) )
var/obj/item/organ/external/affecting = H.get_organ(pick("l_foot", "r_foot"))
if(affecting.status & ORGAN_ROBOT)
return
if(affecting.take_damage(5, 0))
H.UpdateDamageIcon()
H.updatehealth()
if(!(H.species && (H.species.flags & NO_PAIN)))
H.Weaken(3)
..()
// Preset types - left here for the code that uses them
/obj/item/weapon/material/shard/shrapnel/New(loc)
..(loc, "steel")
/obj/item/weapon/material/shard/phoron/New(loc)
..(loc, "phoron glass")

View File

@@ -0,0 +1,30 @@
/obj/item/weapon/material/sword
name = "claymore"
desc = "What are you standing around staring at this for? Get to killing!"
icon_state = "claymore"
item_state = "claymore"
slot_flags = SLOT_BELT
force_divisor = 0.7 // 42 when wielded with hardnes 60 (steel)
thrown_force_divisor = 0.5 // 10 when thrown with weight 20 (steel)
sharp = 1
edge = 1
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
hitsound = 'sound/weapons/bladeslice.ogg'
/obj/item/weapon/material/sword/IsShield()
return 1
/obj/item/weapon/material/sword/suicide_act(mob/user)
viewers(user) << "<span class='danger'>[user] is falling on the [src.name]! It looks like \he's trying to commit suicide.</span>"
return(BRUTELOSS)
/obj/item/weapon/material/sword/katana
name = "katana"
desc = "Woefully underpowered in D20. This one looks pretty sharp."
icon_state = "katana"
item_state = "katana"
slot_flags = SLOT_BELT | SLOT_BACK
/obj/item/weapon/material/sword/katana/suicide_act(mob/user)
viewers(user) << "<span class='danger'>[user] is slitting \his stomach open with the [src.name]! It looks like \he's trying to commit seppuku.</span>"
return(BRUTELOSS)

View File

@@ -0,0 +1,24 @@
/obj/item/weapon/material/star
name = "shuriken"
desc = "A sharp, perfectly weighted piece of metal."
icon_state = "star"
force_divisor = 0.1 // 6 with hardness 60 (steel)
thrown_force_divisor = 0.75 // 15 with weight 20 (steel)
throw_speed = 10
throw_range = 15
sharp = 1
edge = 1
/obj/item/weapon/material/star/New()
..()
src.pixel_x = rand(-12, 12)
src.pixel_y = rand(-12, 12)
/obj/item/weapon/material/star/throw_impact(atom/hit_atom)
..()
if(material.radioactivity>0 && istype(hit_atom,/mob/living))
var/mob/living/M = hit_atom
M.adjustToxLoss(rand(20,40))
/obj/item/weapon/material/star/ninja
default_material = "uranium"

View File

@@ -16,53 +16,69 @@
/*
* Twohanded
*/
/obj/item/weapon/twohanded
/obj/item/weapon/material/twohanded
w_class = 4
var/wielded = 0
var/force_wielded = 0
var/force_unwielded
var/wieldsound = null
var/unwieldsound = null
var/base_icon
var/base_name
var/unwielded_force_divisor = 0.25
/obj/item/weapon/twohanded/proc/unwield()
/obj/item/weapon/material/twohanded/proc/unwield()
wielded = 0
force = initial(force)
name = "[initial(name)]"
force = force_unwielded
name = "[base_name]"
update_icon()
/obj/item/weapon/twohanded/proc/wield()
/obj/item/weapon/material/twohanded/proc/wield()
wielded = 1
force = force_wielded
name = "[initial(name)] (Wielded)"
name = "[base_name] (Wielded)"
update_icon()
/obj/item/weapon/twohanded/New()
/obj/item/weapon/material/twohanded/update_force()
base_name = name
if(sharp || edge)
force_wielded = material.get_edge_damage()
else
force_wielded = material.get_blunt_damage()
force_wielded = round(force_wielded*force_divisor)
force_unwielded = round(force_wielded*unwielded_force_divisor)
force = force_unwielded
throwforce = round(force*thrown_force_divisor)
//world << "[src] has unwielded force [force_unwielded], wielded force [force_wielded] and throwforce [throwforce] when made from default material [material.name]"
/obj/item/weapon/material/twohanded/New()
..()
update_icon()
/obj/item/weapon/twohanded/mob_can_equip(M as mob, slot)
/obj/item/weapon/material/twohanded/mob_can_equip(M as mob, slot)
//Cannot equip wielded items.
if(wielded)
M << "<span class='warning'>Unwield the [initial(name)] first!</span>"
M << "<span class='warning'>Unwield the [base_name] first!</span>"
return 0
return ..()
/obj/item/weapon/twohanded/dropped(mob/user as mob)
/obj/item/weapon/material/twohanded/dropped(mob/user as mob)
//handles unwielding a twohanded weapon when dropped as well as clearing up the offhand
if(user)
var/obj/item/weapon/twohanded/O = user.get_inactive_hand()
var/obj/item/weapon/material/twohanded/O = user.get_inactive_hand()
if(istype(O))
O.unwield()
return unwield()
/obj/item/weapon/twohanded/update_icon()
/obj/item/weapon/material/twohanded/update_icon()
icon_state = "[base_icon][wielded]"
item_state = icon_state
/obj/item/weapon/twohanded/pickup(mob/user)
/obj/item/weapon/material/twohanded/pickup(mob/user)
unwield()
/obj/item/weapon/twohanded/attack_self(mob/user as mob)
/obj/item/weapon/material/twohanded/attack_self(mob/user as mob)
..()
@@ -80,7 +96,7 @@
if (src.unwieldsound)
playsound(src.loc, unwieldsound, 50, 1)
var/obj/item/weapon/twohanded/offhand/O = user.get_inactive_hand()
var/obj/item/weapon/material/twohanded/offhand/O = user.get_inactive_hand()
if(O && istype(O))
O.unwield()
@@ -89,13 +105,13 @@
user << "<span class='warning'>You need your other hand to be empty</span>"
return
wield()
user << "<span class='notice'>You grab the [initial(name)] with both hands.</span>"
user << "<span class='notice'>You grab the [base_name] with both hands.</span>"
if (src.wieldsound)
playsound(src.loc, wieldsound, 50, 1)
var/obj/item/weapon/twohanded/offhand/O = new(user) ////Let's reserve his other hand~
O.name = "[initial(name)] - offhand"
O.desc = "Your second grip on the [initial(name)]"
var/obj/item/weapon/material/twohanded/offhand/O = new(user) ////Let's reserve his other hand~
O.name = "[base_name] - offhand"
O.desc = "Your second grip on the [base_name]."
user.put_in_inactive_hand(O)
if(istype(user,/mob/living/carbon/human))
@@ -106,37 +122,40 @@
return
///////////OFFHAND///////////////
/obj/item/weapon/twohanded/offhand
w_class = 5.0
/obj/item/weapon/material/twohanded/offhand
w_class = 5
icon_state = "offhand"
name = "offhand"
default_material = "placeholder"
unwield()
qdel(src)
/obj/item/weapon/material/twohanded/offhand/unwield()
qdel(src)
wield()
qdel(src)
/obj/item/weapon/material/twohanded/offhand/wield()
qdel(src)
/obj/item/weapon/twohanded/offhand/update_icon()
/obj/item/weapon/material/twohanded/offhand/update_icon()
return
/*
* Fireaxe
*/
/obj/item/weapon/twohanded/fireaxe // DEM AXES MAN, marker -Agouri
/obj/item/weapon/material/twohanded/fireaxe // DEM AXES MAN, marker -Agouri
icon_state = "fireaxe0"
base_icon = "fireaxe"
name = "fire axe"
desc = "Truly, the weapon of a madman. Who would think to fight fire with an axe?"
force = 15
unwielded_force_divisor = 0.25
force_divisor = 0.7 // 10/42 with hardness 60 (steel) and 0.25 unwielded divisor
sharp = 1
edge = 1
w_class = 4.0
slot_flags = SLOT_BACK
force_wielded = 30
attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut")
applies_material_colour = 0
/obj/item/weapon/twohanded/fireaxe/afterattack(atom/A as mob|obj|turf|area, mob/user as mob, proximity)
/obj/item/weapon/material/twohanded/fireaxe/afterattack(atom/A as mob|obj|turf|area, mob/user as mob, proximity)
if(!proximity) return
..()
if(A && wielded)
@@ -149,11 +168,13 @@
var/obj/effect/plant/P = A
P.die_off()
qdel(A)
/*
/*
* Double-Bladed Energy Swords - Cheridan
*/
/obj/item/weapon/twohanded/dualsaber
// Not sure what to do with this one, it won't work nicely with the material system,
// but I don't want to copypaste all the twohanded procs..
/obj/item/weapon/material/twohanded/dualsaber
icon_state = "dualsaber0"
base_icon = "dualsaber"
name = "double-bladed energy sword"
@@ -171,8 +192,9 @@
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
sharp = 1
edge = 1
applies_material_colour = 0
/obj/item/weapon/twohanded/dualsaber/attack(target as mob, mob/living/user as mob)
/obj/item/weapon/material/twohanded/dualsaber/attack(target as mob, mob/living/user as mob)
..()
if((CLUMSY in user.mutations) && (wielded) &&prob(40))
user << "\red You twirl around a bit before losing your balance and impaling yourself on the [src]."
@@ -184,14 +206,15 @@
user.set_dir(i)
sleep(1)
/obj/item/weapon/twohanded/dualsaber/IsShield()
/obj/item/weapon/material/twohanded/dualsaber/IsShield()
if(wielded)
return 1
else
return 0
*/
//spears, bay edition
/obj/item/weapon/twohanded/spear
/obj/item/weapon/material/twohanded/spear
icon_state = "spearglass0"
base_icon = "spearglass"
name = "spear"
@@ -199,38 +222,13 @@
force = 10
w_class = 4.0
slot_flags = SLOT_BACK
force_wielded = 22 // Was 13, Buffed - RR
throwforce = 20
force_wielded = 0.75 // 22 when wielded with hardness 15 (glass)
unwielded_force_divisor = 0.65 // 14 when unwielded based on above
thrown_force_divisor = 1.5 // 20 when thrown with weight 15 (glass)
throw_speed = 3
edge = 0
edge = 1
sharp = 1
flags = NOSHIELD
hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb = list("attacked", "poked", "jabbed", "torn", "gored")
/obj/item/weapon/twohanded/baseballbat
name = "wooden bat"
desc = "HOME RUN!"
icon_state = "woodbat0"
base_icon = "woodbat"
item_state = "woodbat"
sharp = 0
edge = 0
w_class = 3
force = 10
throw_speed = 3
throw_range = 7
throwforce = 7
attack_verb = list("smashed", "beaten", "slammed", "smacked", "struck", "battered", "bonked")
hitsound = 'sound/weapons/genhit3.ogg'
force_wielded = 20
/obj/item/weapon/twohanded/baseballbat/metal
name = "metal bat"
desc = "A shiny metal bat."
icon_state = "metalbat0"
base_icon = "metalbat"
item_state = "metalbat"
force = 15
w_class = 3.0
force_wielded = 25
default_material = "glass"

View File

@@ -0,0 +1,234 @@
/* Two-handed Weapons
* Contains:
* Twohanded
* Fireaxe
* Double-Bladed Energy Swords
*/
/*##################################################################
##################### TWO HANDED WEAPONS BE HERE~ -Agouri :3 ########
####################################################################*/
//Rewrote TwoHanded weapons stuff and put it all here. Just copypasta fireaxe to make new ones ~Carn
//This rewrite means we don't have two variables for EVERY item which are used only by a few weapons.
//It also tidies stuff up elsewhere.
/*
* Twohanded
*/
/obj/item/weapon/material/twohanded
w_class = 4
var/wielded = 0
var/force_wielded = 0
var/force_unwielded
var/wieldsound = null
var/unwieldsound = null
var/base_icon
var/base_name
var/unwielded_force_divisor = 0.25
/obj/item/weapon/material/twohanded/proc/unwield()
wielded = 0
force = force_unwielded
name = "[base_name]"
update_icon()
/obj/item/weapon/material/twohanded/proc/wield()
wielded = 1
force = force_wielded
name = "[base_name] (Wielded)"
update_icon()
/obj/item/weapon/material/twohanded/update_force()
base_name = name
if(sharp || edge)
force_wielded = material.get_edge_damage()
else
force_wielded = material.get_blunt_damage()
force_wielded = round(force_wielded*force_divisor)
force_unwielded = round(force_wielded*unwielded_force_divisor)
force = force_unwielded
throwforce = round(force*thrown_force_divisor)
//world << "[src] has unwielded force [force_unwielded], wielded force [force_wielded] and throwforce [throwforce] when made from default material [material.name]"
/obj/item/weapon/material/twohanded/New()
..()
update_icon()
/obj/item/weapon/material/twohanded/mob_can_equip(M as mob, slot)
//Cannot equip wielded items.
if(wielded)
M << "<span class='warning'>Unwield the [base_name] first!</span>"
return 0
return ..()
/obj/item/weapon/material/twohanded/dropped(mob/user as mob)
//handles unwielding a twohanded weapon when dropped as well as clearing up the offhand
if(user)
var/obj/item/weapon/material/twohanded/O = user.get_inactive_hand()
if(istype(O))
O.unwield()
return unwield()
/obj/item/weapon/material/twohanded/update_icon()
icon_state = "[base_icon][wielded]"
item_state = icon_state
/obj/item/weapon/material/twohanded/pickup(mob/user)
unwield()
/obj/item/weapon/material/twohanded/attack_self(mob/user as mob)
..()
if(istype(user, /mob/living/carbon/human))
var/mob/living/carbon/human/H = user
if(H.species.is_small)
user << "<span class='warning'>It's too heavy for you to wield fully.</span>"
return
else
return
if(wielded) //Trying to unwield it
unwield()
user << "<span class='notice'>You are now carrying the [name] with one hand.</span>"
if (src.unwieldsound)
playsound(src.loc, unwieldsound, 50, 1)
var/obj/item/weapon/material/twohanded/offhand/O = user.get_inactive_hand()
if(O && istype(O))
O.unwield()
else //Trying to wield it
if(user.get_inactive_hand())
user << "<span class='warning'>You need your other hand to be empty</span>"
return
wield()
user << "<span class='notice'>You grab the [base_name] with both hands.</span>"
if (src.wieldsound)
playsound(src.loc, wieldsound, 50, 1)
var/obj/item/weapon/material/twohanded/offhand/O = new(user) ////Let's reserve his other hand~
O.name = "[base_name] - offhand"
O.desc = "Your second grip on the [base_name]."
user.put_in_inactive_hand(O)
if(istype(user,/mob/living/carbon/human))
var/mob/living/carbon/human/H = user
H.update_inv_l_hand()
H.update_inv_r_hand()
return
///////////OFFHAND///////////////
/obj/item/weapon/material/twohanded/offhand
w_class = 5
icon_state = "offhand"
name = "offhand"
default_material = "placeholder"
/obj/item/weapon/material/twohanded/offhand/unwield()
qdel(src)
/obj/item/weapon/material/twohanded/offhand/wield()
qdel(src)
/obj/item/weapon/material/twohanded/offhand/update_icon()
return
/*
* Fireaxe
*/
/obj/item/weapon/material/twohanded/fireaxe // DEM AXES MAN, marker -Agouri
icon_state = "fireaxe0"
base_icon = "fireaxe"
name = "fire axe"
desc = "Truly, the weapon of a madman. Who would think to fight fire with an axe?"
unwielded_force_divisor = 0.25
force_divisor = 0.7 // 10/42 with hardness 60 (steel) and 0.25 unwielded divisor
sharp = 1
edge = 1
slot_flags = SLOT_BACK
attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut")
applies_material_colour = 0
/obj/item/weapon/material/twohanded/fireaxe/afterattack(atom/A as mob|obj|turf|area, mob/user as mob, proximity)
if(!proximity) return
..()
if(A && wielded)
if(istype(A,/obj/structure/window))
var/obj/structure/window/W = A
W.shatter()
<<<<<<< HEAD:code/game/objects/items/weapons/material/twohanded.dm
/*
=======
else if(istype(A,/obj/structure/grille))
qdel(A)
else if(istype(A,/obj/effect/plant))
var/obj/effect/plant/P = A
P.die_off()
qdel(A)
>>>>>>> 284d1cc1f5c67503fe0da89ce01985d73bb02038:code/game/objects/items/weapons/twohanded.dm
/*
* Double-Bladed Energy Swords - Cheridan
*/
// Not sure what to do with this one, it won't work nicely with the material system,
// but I don't want to copypaste all the twohanded procs..
/obj/item/weapon/material/twohanded/dualsaber
icon_state = "dualsaber0"
base_icon = "dualsaber"
name = "double-bladed energy sword"
desc = "Handle with care."
force = 3
throwforce = 5.0
throw_speed = 1
throw_range = 5
w_class = 2.0
force_wielded = 30
wieldsound = 'sound/weapons/saberon.ogg'
unwieldsound = 'sound/weapons/saberoff.ogg'
flags = NOSHIELD
origin_tech = "magnets=3;syndicate=4"
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
sharp = 1
edge = 1
applies_material_colour = 0
/obj/item/weapon/material/twohanded/dualsaber/attack(target as mob, mob/living/user as mob)
..()
if((CLUMSY in user.mutations) && (wielded) &&prob(40))
user << "\red You twirl around a bit before losing your balance and impaling yourself on the [src]."
user.take_organ_damage(20,25)
return
if((wielded) && prob(50))
spawn(0)
for(var/i in list(1,2,4,8,4,2,1,2,4,8,4,2))
user.set_dir(i)
sleep(1)
/obj/item/weapon/material/twohanded/dualsaber/IsShield()
if(wielded)
return 1
else
return 0
*/
//spears, bay edition
/obj/item/weapon/material/twohanded/spear
icon_state = "spearglass0"
base_icon = "spearglass"
name = "spear"
desc = "A haphazardly-constructed yet still deadly weapon of ancient design."
slot_flags = SLOT_BACK
force_wielded = 0.75 // 22 when wielded with hardness 15 (glass)
unwielded_force_divisor = 0.65 // 14 when unwielded based on above
thrown_force_divisor = 1.5 // 20 when thrown with weight 15 (glass)
throw_speed = 3
edge = 1
sharp = 1
flags = NOSHIELD
hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb = list("attacked", "poked", "jabbed", "torn", "gored")
default_material = "glass"

View File

@@ -105,8 +105,11 @@
name = "infinite-capacity power cell!"
icon_state = "icell"
origin_tech = null
maxcharge = 30000
maxcharge = 30000 //determines how badly mobs get shocked
matter = list(DEFAULT_WALL_MATERIAL = 700, "glass" = 80)
check_charge()
return 1
use()
return 1

View File

@@ -1,120 +0,0 @@
// Glass shards
/obj/item/weapon/shard
name = "shard"
icon = 'icons/obj/shards.dmi'
icon_state = "large"
sharp = 1
edge = 1
desc = "Made of nothing. How does this even exist?" // set based on material, if this desc is visible it's a bug (shards default to being made of glass)
w_class = 2.0
force = 5.0
throwforce = 8.0
item_state = "shard-glass"
//matter = list("glass" = 3750) // Weld it into sheets before you use it!
attack_verb = list("stabbed", "slashed", "sliced", "cut")
gender = "neuter"
var/material/material = null
/obj/item/weapon/shard/suicide_act(mob/user)
viewers(user) << pick("\red <b>[user] is slitting \his wrists with \the [src]! It looks like \he's trying to commit suicide.</b>", \
"\red <b>[user] is slitting \his throat with \the [src]! It looks like \he's trying to commit suicide.</b>")
return (BRUTELOSS)
/obj/item/weapon/shard/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
return ..()
/obj/item/weapon/shard/Bump()
spawn( 0 )
if (prob(20))
src.force = 15
else
src.force = 4
..()
return
return
/obj/item/weapon/shard/New(loc, material/material)
..(loc)
if(!material || !istype(material)) // We either don't have a material or we've been passed an invalid material. Use glass instead.
material = get_material_by_name("glass")
set_material(material)
/obj/item/weapon/shard/proc/set_material(material/material)
if(istype(material))
src.material = material
icon_state = "[material.shard_icon][pick("large", "medium", "small")]"
pixel_x = rand(-8, 8)
pixel_y = rand(-8, 8)
update_material()
update_icon()
/obj/item/weapon/shard/proc/update_material()
if(material)
if(material.shard_type)
name = "[material.display_name] [material.shard_type]"
desc = "A small piece of [material.display_name]. It looks sharp, you wouldn't want to step on it barefoot. Could probably be used as ... a throwing weapon?"
switch(material.shard_type)
if(SHARD_SPLINTER, SHARD_SHRAPNEL)
gender = "plural"
else
gender = "neuter"
else
qdel(src)
return
else
name = initial(name)
desc = initial(desc)
/obj/item/weapon/shard/update_icon()
if(material)
color = material.icon_colour
// 1-(1-x)^2, so that glass shards with 0.3 opacity end up somewhat visible at 0.51 opacity
alpha = 255 * (1 - (1 - material.opacity)*(1 - material.opacity))
else
color = "#ffffff"
alpha = 255
/obj/item/weapon/shard/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/weldingtool) && material.shard_can_repair)
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0, user))
material.place_sheet(loc)
qdel(src)
return
return ..()
/obj/item/weapon/shard/Crossed(AM as mob|obj)
if(ismob(AM))
var/mob/M = AM
M << "\red <B>You step on \the [src]!</B>"
playsound(src.loc, 'sound/effects/glass_step.ogg', 50, 1) // not sure how to handle metal shards with sounds
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.species.flags & IS_SYNTHETIC || (H.species.siemens_coefficient<0.5)) //Thick skin.
return
if( !H.shoes && ( !H.wear_suit || !(H.wear_suit.body_parts_covered & FEET) ) )
var/obj/item/organ/external/affecting = H.get_organ(pick("l_foot", "r_foot"))
if(affecting.status & ORGAN_ROBOT)
return
if(affecting.take_damage(5, 0))
H.UpdateDamageIcon()
H.updatehealth()
if(!(H.species && (H.species.flags & NO_PAIN)))
H.Weaken(3)
..()
// Preset types - left here for the code that uses them
/obj/item/weapon/shard/shrapnel/New(loc)
..(loc, get_material_by_name("steel"))
/obj/item/weapon/shard/phoron/New(loc)
..(loc, get_material_by_name("phoron glass"))

View File

@@ -119,12 +119,12 @@
//verbs += /obj/item/weapon/storage/bag/sheetsnatcher/quick_empty
can_be_inserted(obj/item/W as obj, stop_messages = 0)
if(!istype(W,/obj/item/stack/sheet) || istype(W,/obj/item/stack/sheet/mineral/sandstone) || istype(W,/obj/item/stack/sheet/wood))
if(!istype(W,/obj/item/stack/material) || istype(W,/obj/item/stack/material/sandstone) || istype(W,/obj/item/stack/material/wood))
if(!stop_messages)
usr << "The snatcher does not accept [W]."
return 0 //I don't care, but the existing code rejects them for not being "sheets" *shrug* -Sayu
var/current = 0
for(var/obj/item/stack/sheet/S in contents)
for(var/obj/item/stack/material/S in contents)
current += S.amount
if(capacity == current)//If it's full, you're done
if(!stop_messages)
@@ -135,20 +135,20 @@
// Modified handle_item_insertion. Would prefer not to, but...
handle_item_insertion(obj/item/W as obj, prevent_warning = 0)
var/obj/item/stack/sheet/S = W
var/obj/item/stack/material/S = W
if(!istype(S)) return 0
var/amount
var/inserted = 0
var/current = 0
for(var/obj/item/stack/sheet/S2 in contents)
for(var/obj/item/stack/material/S2 in contents)
current += S2.amount
if(capacity < current + S.amount)//If the stack will fill it up
amount = capacity - current
else
amount = S.amount
for(var/obj/item/stack/sheet/sheet in contents)
for(var/obj/item/stack/material/sheet in contents)
if(S.type == sheet.type) // we are violating the amount limitation because these are not sane objects
sheet.amount += amount // they should only be removed through procs in this file, which split them up.
S.amount -= amount
@@ -183,7 +183,7 @@
if(display_contents_with_number)
numbered_contents = list()
adjusted_contents = 0
for(var/obj/item/stack/sheet/I in contents)
for(var/obj/item/stack/material/I in contents)
adjusted_contents++
var/datum/numbered_display/D = new/datum/numbered_display(I)
D.number = I.amount
@@ -200,9 +200,9 @@
// Modified quick_empty verb drops appropriate sized stacks
quick_empty()
var/location = get_turf(src)
for(var/obj/item/stack/sheet/S in contents)
for(var/obj/item/stack/material/S in contents)
while(S.amount)
var/obj/item/stack/sheet/N = new S.type(location)
var/obj/item/stack/material/N = new S.type(location)
var/stacksize = min(S.amount,N.max_amount)
N.amount = stacksize
S.amount -= stacksize
@@ -215,7 +215,7 @@
// Instead of removing
remove_from_storage(obj/item/W as obj, atom/new_location)
var/obj/item/stack/sheet/S = W
var/obj/item/stack/material/S = W
if(!istype(S)) return 0
//I would prefer to drop a new stack, but the item/attack_hand code
@@ -224,7 +224,7 @@
// -Sayu
if(S.amount > S.max_amount)
var/obj/item/stack/sheet/temp = new S.type(src)
var/obj/item/stack/material/temp = new S.type(src)
temp.amount = S.amount - S.max_amount
S.amount = S.max_amount

View File

@@ -33,8 +33,8 @@
/obj/item/device/analyzer,
/obj/item/taperoll/engineering,
/obj/item/device/robotanalyzer,
/obj/item/weapon/minihoe,
/obj/item/weapon/hatchet,
/obj/item/weapon/material/minihoe,
/obj/item/weapon/material/hatchet,
/obj/item/device/analyzer/plant_analyzer,
/obj/item/weapon/extinguisher/mini
)

View File

@@ -598,7 +598,7 @@
icon_state = "light"
desc = "This box is shaped on the inside so that only light tubes and bulbs fit."
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
foldable = /obj/item/stack/material/cardboard //BubbleWrap
storage_slots=21
can_hold = list(/obj/item/weapon/light/tube, /obj/item/weapon/light/bulb)
max_storage_space = 42 //holds 21 items of w_class 2

View File

@@ -18,7 +18,7 @@
storage_slots = 6
var/startswith = 6
can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/donut)
foldable = /obj/item/stack/sheet/cardboard
foldable = /obj/item/stack/material/cardboard
/obj/item/weapon/storage/box/donut/New()
..()

View File

@@ -35,12 +35,13 @@
/obj/item/weapon/melee/baton/proc/deductcharge(var/chrgdeductamt)
if(bcell)
if(bcell.use(chrgdeductamt))
if(bcell.checked_use(chrgdeductamt))
return 1
else
status = 0
update_icon()
return 0
return null
/obj/item/weapon/melee/baton/update_icon()
if(status)

View File

@@ -47,6 +47,7 @@
if (ismob(usr))
var/mob/M = usr
M.update_inv_back()
M.update_action_buttons()
usr << "You toggle the thrusters [on? "on":"off"]."

View File

@@ -455,9 +455,9 @@
/obj/item/weapon/screwdriver,
/obj/item/weapon/wrench,
/obj/item/weapon/wirecutters,
/obj/item/weapon/kitchen/utensil/knife,
/obj/item/weapon/kitchen/utensil/fork,
/obj/item/weapon/hatchet
/obj/item/weapon/material/kitchen/utensil/knife,
/obj/item/weapon/material/kitchen/utensil/fork,
/obj/item/weapon/material/hatchet
)
var/list/tools = list()
var/current_tool = 1

View File

@@ -0,0 +1,208 @@
/*
* Trays - Agouri
*/
/obj/item/weapon/tray
name = "tray"
icon = 'icons/obj/food.dmi'
icon_state = "tray"
desc = "A metal tray to lay food on."
throwforce = 12.0
throwforce = 10.0
throw_speed = 1
throw_range = 5
w_class = 3.0
flags = CONDUCT
matter = list(DEFAULT_WALL_MATERIAL = 3000)
var/list/carrying = list() // List of things on the tray. - Doohl
var/max_carry = 10
/obj/item/weapon/tray/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
// Drop all the things. All of them.
overlays.Cut()
for(var/obj/item/I in carrying)
I.loc = M.loc
carrying.Remove(I)
if(isturf(I.loc))
spawn()
for(var/i = 1, i <= rand(1,2), i++)
if(I)
step(I, pick(NORTH,SOUTH,EAST,WEST))
sleep(rand(2,4))
if((CLUMSY in user.mutations) && prob(50)) //What if he's a clown?
M << "\red You accidentally slam yourself with the [src]!"
M.Weaken(1)
user.take_organ_damage(2)
if(prob(50))
playsound(M, 'sound/items/trayhit1.ogg', 50, 1)
return
else
playsound(M, 'sound/items/trayhit2.ogg', 50, 1) //sound playin'
return //it always returns, but I feel like adding an extra return just for safety's sakes. EDIT; Oh well I won't :3
var/mob/living/carbon/human/H = M ///////////////////////////////////// /Let's have this ready for later.
if(!(user.zone_sel.selecting == ("eyes" || "head"))) //////////////hitting anything else other than the eyes
if(prob(33))
src.add_blood(H)
var/turf/location = H.loc
if (istype(location, /turf/simulated))
location.add_blood(H) ///Plik plik, the sound of blood
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been attacked with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to attack [M.name] ([M.ckey])</font>")
msg_admin_attack("[user.name] ([user.ckey]) used the [src.name] to attack [M.name] ([M.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
if(prob(15))
M.Weaken(3)
M.take_organ_damage(3)
else
M.take_organ_damage(5)
if(prob(50))
playsound(M, 'sound/items/trayhit1.ogg', 50, 1)
for(var/mob/O in viewers(M, null))
O.show_message(text("\red <B>[] slams [] with the tray!</B>", user, M), 1)
return
else
playsound(M, 'sound/items/trayhit2.ogg', 50, 1) //we applied the damage, we played the sound, we showed the appropriate messages. Time to return and stop the proc
for(var/mob/O in viewers(M, null))
O.show_message(text("\red <B>[] slams [] with the tray!</B>", user, M), 1)
return
if(istype(M, /mob/living/carbon/human) && ((H.head && H.head.flags & HEADCOVERSEYES) || (H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || (H.glasses && H.glasses.flags & GLASSESCOVERSEYES)))
M << "\red You get slammed in the face with the tray, against your mask!"
if(prob(33))
src.add_blood(H)
if (H.wear_mask)
H.wear_mask.add_blood(H)
if (H.head)
H.head.add_blood(H)
if (H.glasses && prob(33))
H.glasses.add_blood(H)
var/turf/location = H.loc
if (istype(location, /turf/simulated)) //Addin' blood! At least on the floor and item :v
location.add_blood(H)
if(prob(50))
playsound(M, 'sound/items/trayhit1.ogg', 50, 1)
for(var/mob/O in viewers(M, null))
O.show_message(text("\red <B>[] slams [] with the tray!</B>", user, M), 1)
else
playsound(M, 'sound/items/trayhit2.ogg', 50, 1) //sound playin'
for(var/mob/O in viewers(M, null))
O.show_message(text("\red <B>[] slams [] with the tray!</B>", user, M), 1)
if(prob(10))
M.Stun(rand(1,3))
M.take_organ_damage(3)
return
else
M.take_organ_damage(5)
return
else //No eye or head protection, tough luck!
M << "\red You get slammed in the face with the tray!"
if(prob(33))
src.add_blood(M)
var/turf/location = H.loc
if (istype(location, /turf/simulated))
location.add_blood(H)
if(prob(50))
playsound(M, 'sound/items/trayhit1.ogg', 50, 1)
for(var/mob/O in viewers(M, null))
O.show_message(text("\red <B>[] slams [] in the face with the tray!</B>", user, M), 1)
else
playsound(M, 'sound/items/trayhit2.ogg', 50, 1) //sound playin' again
for(var/mob/O in viewers(M, null))
O.show_message(text("\red <B>[] slams [] in the face with the tray!</B>", user, M), 1)
if(prob(30))
M.Stun(rand(2,4))
M.take_organ_damage(4)
return
else
M.take_organ_damage(8)
if(prob(30))
M.Weaken(2)
return
return
/obj/item/weapon/tray/var/cooldown = 0 //shield bash cooldown. based on world.time
/obj/item/weapon/tray/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/material/kitchen/rollingpin))
if(cooldown < world.time - 25)
user.visible_message("<span class='warning'>[user] bashes [src] with [W]!</span>")
playsound(user.loc, 'sound/effects/shieldbash.ogg', 50, 1)
cooldown = world.time
else
..()
/*
===============~~~~~================================~~~~~====================
= =
= Code for trays carrying things. By Doohl for Doohl erryday Doohl Doohl~ =
= =
===============~~~~~================================~~~~~====================
*/
/obj/item/weapon/tray/proc/calc_carry()
// calculate the weight of the items on the tray
var/val = 0 // value to return
for(var/obj/item/I in carrying)
if(I.w_class == 1.0)
val ++
else if(I.w_class == 2.0)
val += 3
else
val += 5
return val
/obj/item/weapon/tray/pickup(mob/user)
if(!isturf(loc))
return
for(var/obj/item/I in loc)
if( I != src && !I.anchored && !istype(I, /obj/item/clothing/under) && !istype(I, /obj/item/clothing/suit) && !istype(I, /obj/item/projectile) )
var/add = 0
if(I.w_class == 1.0)
add = 1
else if(I.w_class == 2.0)
add = 3
else
add = 5
if(calc_carry() + add >= max_carry)
break
I.loc = src
carrying.Add(I)
overlays += image("icon" = I.icon, "icon_state" = I.icon_state, "layer" = 30 + I.layer)
/obj/item/weapon/tray/dropped(mob/user)
var/mob/living/M
for(M in src.loc) //to handle hand switching
return
var/foundtable = 0
for(var/obj/structure/table/T in loc)
foundtable = 1
break
overlays.Cut()
for(var/obj/item/I in carrying)
I.loc = loc
carrying.Remove(I)
if(!foundtable && isturf(loc))
// if no table, presume that the person just shittily dropped the tray on the ground and made a mess everywhere!
spawn()
for(var/i = 1, i <= rand(1,2), i++)
if(I)
step(I, pick(NORTH,SOUTH,EAST,WEST))
sleep(rand(2,4))

View File

@@ -89,215 +89,6 @@
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
return ..()
/obj/item/weapon/claymore
name = "claymore"
desc = "What are you standing around staring at this for? Get to killing!"
icon_state = "claymore"
item_state = "claymore"
flags = CONDUCT
slot_flags = SLOT_BELT
force = 40
throwforce = 10
sharp = 1
edge = 1
w_class = 3
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
IsShield()
return 1
suicide_act(mob/user)
viewers(user) << "<span class='danger'>[user] is falling on the [src.name]! It looks like \he's trying to commit suicide.</span>"
return(BRUTELOSS)
/obj/item/weapon/claymore/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
return ..()
/obj/item/weapon/katana
name = "katana"
desc = "Woefully underpowered in D20"
icon_state = "katana"
item_state = "katana"
flags = CONDUCT
slot_flags = SLOT_BELT | SLOT_BACK
force = 40
throwforce = 10
sharp = 1
edge = 1
w_class = 3
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
suicide_act(mob/user)
viewers(user) << "<span class='danger'>[user] is slitting \his stomach open with the [src.name]! It looks like \he's trying to commit seppuku.</span>"
return(BRUTELOSS)
/obj/item/weapon/katana/IsShield()
return 1
/obj/item/weapon/katana/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
return ..()
/obj/item/weapon/harpoon
name = "harpoon"
sharp = 1
edge = 0
desc = "Tharr she blows!"
icon_state = "harpoon"
item_state = "harpoon"
force = 20
throwforce = 15
w_class = 3
attack_verb = list("jabbed","stabbed","ripped")
/obj/item/weapon/butterfly
name = "butterfly knife"
desc = "A basic metal blade concealed in a lightweight plasteel grip. Small enough when folded to fit in a pocket."
icon_state = "butterflyknife"
item_state = null
hitsound = null
var/active = 0
w_class = 2
force = 2
sharp = 0
edge = 0
throw_speed = 3
throw_range = 4
throwforce = 7
attack_verb = list("patted", "tapped")
/obj/item/butterflyconstruction
name = "unfinished concealed knife"
desc = "An unfinished concealed knife, it looks like the screws need to be tightened."
icon = 'icons/obj/buildingobject.dmi'
icon_state = "butterflystep1"
/obj/item/butterflyconstruction/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/screwdriver))
user << "You finish the concealed blade weapon."
new /obj/item/weapon/butterfly(user.loc)
qdel(src)
return
/obj/item/butterflyblade
name = "knife blade"
desc = "A knife blade. Unusable as a weapon without a grip."
icon = 'icons/obj/buildingobject.dmi'
icon_state = "butterfly2"
matter = list(DEFAULT_WALL_MATERIAL = 5000)
/obj/item/butterflyhandle
name = "concealed knife grip"
desc = "A plasteel grip with screw fittings for a blade."
icon = 'icons/obj/buildingobject.dmi'
icon_state = "butterfly1"
matter = list(DEFAULT_WALL_MATERIAL = 4000)
/obj/item/butterflyhandle/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W,/obj/item/butterflyblade))
user << "You attach the two concealed blade parts."
new /obj/item/butterflyconstruction(user.loc)
qdel(W)
qdel(src)
return
update_icon(user)
/obj/item/weapon/butterfly/switchblade
name = "switchblade"
desc = "A classic switchblade with gold engraving. Just holding it makes you feel like a gangster."
icon_state = "switchblade"
/obj/item/weapon/butterfly/attack_self(mob/user)
active = !active
if(active)
user << "<span class='notice'>You flip out your [src].</span>"
playsound(user, 'sound/weapons/flipblade.ogg', 15, 1)
force = 15 //bay adjustments
throwforce = 12
edge = 1
sharp = 1
hitsound = 'sound/weapons/bladeslice.ogg'
icon_state += "_open"
w_class = 3
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
else
user << "<span class='notice'>The butterfly knife can now be concealed.</span>"
force = initial(force)
edge = 0
sharp = 0
hitsound = initial(hitsound)
icon_state = initial(icon_state)
w_class = initial(w_class)
attack_verb = initial(attack_verb)
add_fingerprint(user)
obj/item/weapon/wirerod
name = "wired rod"
desc = "A rod with some wire wrapped around the top. It'd be easy to attach something to the top bit."
icon_state = "wiredrod"
item_state = "rods"
flags = CONDUCT
force = 8
throwforce = 10
w_class = 3
attack_verb = list("hit", "bludgeoned", "whacked", "bonked")
obj/item/weapon/wirerod/attackby(var/obj/item/I, mob/user as mob)
..()
if(istype(I, /obj/item/weapon/shard))
var/obj/item/weapon/twohanded/spear/S = new /obj/item/weapon/twohanded/spear
user.put_in_hands(S)
user << "<span class='notice'>You fasten the glass shard to the top of the rod with the cable.</span>"
qdel(I)
qdel(src)
update_icon(user)
else if(istype(I, /obj/item/weapon/wirecutters))
var/obj/item/weapon/melee/baton/cattleprod/P = new /obj/item/weapon/melee/baton/cattleprod
user.put_in_hands(P)
user << "<span class='notice'>You fasten the wirecutters to the top of the rod with the cable, prongs outward.</span>"
qdel(I)
qdel(src)
update_icon(user)
update_icon(user)
/obj/item/weapon/star
name = "shuriken"
desc = "A sharp, perfectly weighted piece of metal."
icon_state = "star"
force = 5
throw_speed = 10
throwforce = 15
throw_range = 15
sharp = 1
edge = 1
matter = list(DEFAULT_WALL_MATERIAL = 500)
var/poisoned = 0
/obj/item/weapon/star/New()
..()
src.pixel_x = rand(-12, 12)
src.pixel_y = rand(-12, 12)
//TODO: consider making this something done with reagents.
/obj/item/weapon/star/throw_impact(atom/hit_atom)
..()
if(poisoned && istype(hit_atom,/mob/living))
var/mob/living/M = hit_atom
M.adjustToxLoss(rand(20,40))
poisoned = 0
color = null
/obj/item/weapon/star/ninja
color = "#007700"
poisoned = 1
/obj/item/weapon/energy_net
name = "energy net"
desc = "It's a net made of green energy."

View File

@@ -162,11 +162,11 @@
prob(2);/obj/item/weapon/storage/pill_bottle/happy,\
prob(2);/obj/item/weapon/storage/pill_bottle/zoom,\
prob(5);/obj/item/weapon/contraband/poster,\
prob(2);/obj/item/weapon/butterfly,\
prob(3);/obj/item/butterflyblade,\
prob(3);/obj/item/butterflyhandle,\
prob(3);/obj/item/weapon/wirerod,\
prob(1);/obj/item/weapon/butterfly/switchblade,\
prob(2);/obj/item/weapon/material/butterfly,\
prob(3);/obj/item/weapon/material/butterflyblade,\
prob(3);/obj/item/weapon/material/butterflyhandle,\
prob(3);/obj/item/weapon/material/wirerod,\
prob(1);/obj/item/weapon/material/butterfly/switchblade,\
prob(1);/obj/item/weapon/reagent_containers/syringe/drugs)

View File

@@ -78,8 +78,8 @@
else
return ..()
/obj/structure/proc/can_climb(var/mob/living/user)
if (!can_touch(user) || !climbable || (user in climbers))
/obj/structure/proc/can_climb(var/mob/living/user, post_climb_check=0)
if (!can_touch(user) || !climbable || (!post_climb_check && (user in climbers)))
return 0
if (!user.Adjacent(src))
@@ -115,7 +115,7 @@
climbers -= user
return
if (!can_climb(user))
if (!can_climb(user, post_climb_check=1))
climbers -= user
return
@@ -192,5 +192,6 @@
if(!breakable || !damage || !wallbreaker)
return 0
visible_message("<span class='danger'>[user] [attack_verb] the [src] apart!</span>")
user.do_attack_animation(src)
spawn(1) qdel(src)
return 1

View File

@@ -232,7 +232,7 @@
if(!WT.remove_fuel(0,user))
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
return
new /obj/item/stack/sheet/metal(src.loc)
new /obj/item/stack/material/steel(src.loc)
for(var/mob/M in viewers(src))
M.show_message("<span class='notice'>\The [src] has been cut apart by [user] with \the [WT].</span>", 3, "You hear welding.", 2)
qdel(src)
@@ -335,6 +335,7 @@
/obj/structure/closet/attack_generic(var/mob/user, var/damage, var/attack_message = "destroys", var/wallbreaker)
if(!damage || !wallbreaker)
return
user.do_attack_animation(src)
visible_message("<span class='danger'>[user] [attack_message] the [src]!</span>")
dump_contents()
spawn(1) qdel(src)

View File

@@ -2,7 +2,7 @@
/obj/structure/closet/fireaxecabinet
name = "fire axe cabinet"
desc = "There is small label that reads \"For Emergency use only\" along with details for safe use of the axe. As if."
var/obj/item/weapon/twohanded/fireaxe/fireaxe
var/obj/item/weapon/material/twohanded/fireaxe/fireaxe
icon_state = "fireaxe1000"
icon_closed = "fireaxe1000"
icon_opened = "fireaxe1100"
@@ -16,7 +16,7 @@
New()
..()
fireaxe = new /obj/item/weapon/twohanded/fireaxe(src)
fireaxe = new /obj/item/weapon/material/twohanded/fireaxe(src)
attackby(var/obj/item/O as obj, var/mob/user as mob) //Marker -Agouri
//..() //That's very useful, Erro
@@ -55,7 +55,7 @@
src.localopened = 1
update_icon()
return
if (istype(O, /obj/item/weapon/twohanded/fireaxe) && src.localopened)
if (istype(O, /obj/item/weapon/material/twohanded/fireaxe) && src.localopened)
if(!fireaxe)
if(O:wielded)
user << "\red Unwield the axe first."

View File

@@ -21,8 +21,8 @@
new /obj/item/device/analyzer/plant_analyzer(src)
new /obj/item/device/radio/headset/headset_service(src)
new /obj/item/clothing/head/greenbandana(src)
new /obj/item/weapon/minihoe(src)
new /obj/item/weapon/hatchet(src)
new /obj/item/weapon/material/minihoe(src)
new /obj/item/weapon/material/hatchet(src)
new /obj/item/weapon/wirecutters/clippers(src)
new /obj/item/weapon/reagent_containers/spray/plantbgone(src)
// new /obj/item/weapon/bee_net(src) //No more bees, March 2014

View File

@@ -105,6 +105,7 @@
/obj/structure/closet/statue/attackby(obj/item/I as obj, mob/user as mob)
health -= I.force
user.do_attack_animation(src)
visible_message("<span class='danger'>[user] strikes [src] with [I].</span>")
if(health <= 0)
for(var/mob/M in src)

View File

@@ -41,7 +41,7 @@
/obj/structure/closet/syndicate/nuclear/New()
..()
new /obj/item/ammo_magazine/a12mm(src)
new /obj/item/ammo_magazine/a12mm(src)
new /obj/item/ammo_magazine/a12mm(src)
@@ -86,35 +86,35 @@
//Metal (common ore)
if(pickednum >= 2)
new /obj/item/stack/sheet/metal(src, rand(common_min, common_max))
new /obj/item/stack/material/steel(src, rand(common_min, common_max))
//Glass (common ore)
if(pickednum >= 5)
new /obj/item/stack/sheet/glass(src, rand(common_min, common_max))
new /obj/item/stack/material/glass(src, rand(common_min, common_max))
//Plasteel (common ore) Because it has a million more uses then phoron
if(pickednum >= 10)
new /obj/item/stack/sheet/plasteel(src, rand(common_min, common_max))
new /obj/item/stack/material/plasteel(src, rand(common_min, common_max))
//Phoron (rare ore)
if(pickednum >= 15)
new /obj/item/stack/sheet/mineral/phoron(src, rand(rare_min, rare_max))
new /obj/item/stack/material/phoron(src, rand(rare_min, rare_max))
//Silver (rare ore)
if(pickednum >= 20)
new /obj/item/stack/sheet/mineral/silver(src, rand(rare_min, rare_max))
new /obj/item/stack/material/silver(src, rand(rare_min, rare_max))
//Gold (rare ore)
if(pickednum >= 30)
new /obj/item/stack/sheet/mineral/gold(src, rand(rare_min, rare_max))
new /obj/item/stack/material/gold(src, rand(rare_min, rare_max))
//Uranium (rare ore)
if(pickednum >= 40)
new /obj/item/stack/sheet/mineral/uranium(src, rand(rare_min, rare_max))
new /obj/item/stack/material/uranium(src, rand(rare_min, rare_max))
//Diamond (rare HONK)
if(pickednum >= 45)
new /obj/item/stack/sheet/mineral/diamond(src, rand(rare_min, rare_max))
new /obj/item/stack/material/diamond(src, rand(rare_min, rare_max))
//Jetpack (You hit the jackpot!)
if(pickednum == 50)
@@ -127,14 +127,14 @@
New()
var/list/resources = list(
/obj/item/stack/sheet/metal,
/obj/item/stack/sheet/glass,
/obj/item/stack/sheet/mineral/gold,
/obj/item/stack/sheet/mineral/silver,
/obj/item/stack/sheet/mineral/phoron,
/obj/item/stack/sheet/mineral/uranium,
/obj/item/stack/sheet/mineral/diamond,
/obj/item/stack/sheet/plasteel,
/obj/item/stack/material/steel,
/obj/item/stack/material/glass,
/obj/item/stack/material/gold,
/obj/item/stack/material/silver,
/obj/item/stack/material/phoron,
/obj/item/stack/material/uranium,
/obj/item/stack/material/diamond,
/obj/item/stack/material/plasteel,
/obj/item/stack/rods
)

View File

@@ -486,7 +486,7 @@
..()
new /obj/item/weapon/reagent_containers/spray/plantbgone(src)
new /obj/item/weapon/reagent_containers/spray/plantbgone(src)
new /obj/item/weapon/minihoe(src)
new /obj/item/weapon/material/minihoe(src)
// new /obj/item/weapon/weedspray(src)
// new /obj/item/weapon/weedspray(src)
// new /obj/item/weapon/pestspray(src)

View File

@@ -11,7 +11,7 @@
/obj/structure/largecrate/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/crowbar))
new /obj/item/stack/sheet/wood(src)
new /obj/item/stack/material/wood(src)
var/turf/T = get_turf(src)
for(var/obj/O in contents)
O.loc = T

View File

@@ -13,7 +13,7 @@
/obj/structure/displaycase/ex_act(severity)
switch(severity)
if (1)
new /obj/item/weapon/shard( src.loc )
new /obj/item/weapon/material/shard( src.loc )
if (occupied)
new /obj/item/weapon/gun/energy/captain( src.loc )
occupied = 0
@@ -37,7 +37,7 @@
/obj/structure/displaycase/blob_act()
if (prob(75))
new /obj/item/weapon/shard( src.loc )
new /obj/item/weapon/material/shard( src.loc )
if (occupied)
new /obj/item/weapon/gun/energy/captain( src.loc )
occupied = 0
@@ -45,7 +45,7 @@
/obj/structure/displaycase/meteorhit(obj/O as obj)
new /obj/item/weapon/shard( src.loc )
new /obj/item/weapon/material/shard( src.loc )
new /obj/item/weapon/gun/energy/captain( src.loc )
qdel(src)
@@ -55,7 +55,7 @@
if (!( src.destroyed ))
src.density = 0
src.destroyed = 1
new /obj/item/weapon/shard( src.loc )
new /obj/item/weapon/material/shard( src.loc )
playsound(src, "shatter", 70, 1)
update_icon()
else

View File

@@ -150,7 +150,7 @@
if(do_after(user, 40))
if(!src || !WT.isOn()) return
user << "\blue You welded the [glass] plating off!"
var/M = text2path("/obj/item/stack/sheet/mineral/[glass]")
var/M = text2path("/obj/item/stack/material/[glass]")
new M(src.loc, 2)
glass = 0
else if(glass == 1)
@@ -158,14 +158,14 @@
if(do_after(user, 40))
if(!src || !WT.isOn()) return
user << "\blue You welded the glass panel out!"
new /obj/item/stack/sheet/glass/reinforced(src.loc)
new /obj/item/stack/material/glass/reinforced(src.loc)
glass = 0
else if(!anchored)
user.visible_message("[user] dissassembles the airlock assembly.", "You start to dissassemble the airlock assembly.")
if(do_after(user, 40))
if(!src || !WT.isOn()) return
user << "\blue You dissasembled the airlock assembly!"
new /obj/item/stack/sheet/metal(src.loc, 4)
new /obj/item/stack/material/steel(src.loc, 4)
qdel (src)
else
user << "\blue You need more welding fuel."
@@ -235,19 +235,19 @@
electronics.loc = src.loc
electronics = null
else if(istype(W, /obj/item/stack/sheet) && !glass)
var/obj/item/stack/sheet/S = W
else if(istype(W, /obj/item/stack/material) && !glass)
var/obj/item/stack/material/S = W
if (S)
if (S.get_amount() >= 1)
if(istype(S, /obj/item/stack/sheet/glass/reinforced))
if(istype(S, /obj/item/stack/material/glass/reinforced))
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] adds [S.name] to the airlock assembly.", "You start to install [S.name] into the airlock assembly.")
if(do_after(user, 40) && !glass)
if (S.use(1))
user << "<span class='notice'>You installed reinforced glass windows into the airlock assembly.</span>"
glass = 1
else if(istype(S, /obj/item/stack/sheet/mineral) && S.sheettype)
var/M = S.sheettype
else if(istype(S, /obj/item/stack/material) && S.default_type)
var/M = S.default_type
// Ugly hack, will suffice for now. Need to fix it upstream as well, may rewrite mineral walls. ~Z
if(M in list("mhydrogen","osmium","tritium","platinum","iron"))
user << "You cannot make an airlock out of that material."

View File

@@ -17,6 +17,7 @@
/obj/structure/girder/attack_generic(var/mob/user, var/damage, var/attack_message = "smashes apart", var/wallbreaker)
if(!damage || !wallbreaker)
return 0
user.do_attack_animation(src)
visible_message("<span class='danger'>[user] [attack_message] the [src]!</span>")
spawn(1) dismantle()
return 1
@@ -105,13 +106,13 @@
health = 50
cover = 25
else if(istype(W, /obj/item/stack/sheet))
else if(istype(W, /obj/item/stack/material))
var/obj/item/stack/sheet/S = W
var/obj/item/stack/material/S = W
if(S.get_amount() < 2)
return ..()
var/material/M = name_to_material[S.sheettype]
var/material/M = name_to_material[S.default_type]
if(!istype(M))
return ..()
@@ -171,7 +172,7 @@
user << "\The [src] is already reinforced."
return
var/obj/item/stack/sheet/S = user.l_hand
var/obj/item/stack/material/S = user.l_hand
if(!istype(S))
S = user.r_hand
if(!istype(S))
@@ -182,7 +183,7 @@
user << "There is not enough material here to reinforce the girder."
return
var/material/M = name_to_material[S.sheettype]
var/material/M = name_to_material[S.default_type]
if(!istype(M) || M.integrity < 50)
user << "You cannot reinforce \the [src] with that; it is too soft."
return
@@ -197,7 +198,7 @@
/obj/structure/girder/proc/dismantle()
new /obj/item/stack/sheet/metal(get_turf(src))
new /obj/item/stack/material/steel(get_turf(src))
qdel(src)
/obj/structure/girder/attack_hand(mob/user as mob)

View File

@@ -34,6 +34,7 @@
/obj/structure/grille/attack_hand(mob/user as mob)
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
user.do_attack_animation(src)
var/damage_dealt = 1
var/attack_message = "kicks"
@@ -114,8 +115,8 @@
return
//window placing begin
else if(istype(W,/obj/item/stack/sheet/glass))
var/obj/item/stack/sheet/glass/ST = W
else if(istype(W,/obj/item/stack/material/glass))
var/obj/item/stack/material/glass/ST = W
var/dir_to_set = 1
if(loc == user.loc)
dir_to_set = user.dir
@@ -153,9 +154,10 @@
return
//window placing end
else if(istype(W, /obj/item/weapon/shard))
else if(istype(W, /obj/item/weapon/material/shard))
health -= W.force * 0.1
else if(!shock(user, 70))
user.do_attack_animation(src)
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
switch(W.damtype)
if("fire")
@@ -217,6 +219,7 @@
/obj/structure/grille/attack_generic(var/mob/user, var/damage, var/attack_verb)
visible_message("<span class='danger'>[user] [attack_verb] the [src]!</span>")
user.do_attack_animation(src)
health -= damage
spawn(1) healthcheck()
return 1

Some files were not shown because too many files have changed in this diff Show More