Merge branch 'dev-freeze' of https://github.com/Baystation12/Baystation12 into newmalf-merge

This commit is contained in:
Atlantis
2015-05-22 21:01:26 +02:00
452 changed files with 11600 additions and 14417 deletions

View File

@@ -61,6 +61,16 @@
use_power = 1
icon_state = "map_vent_in"
/obj/machinery/atmospherics/unary/vent_pump/siphon/on/atmos
use_power = 1
icon_state = "map_vent_in"
external_pressure_bound = 0
external_pressure_bound_default = 0
internal_pressure_bound = 2000
internal_pressure_bound_default = 2000
pressure_checks = 2
pressure_checks_default = 2
/obj/machinery/atmospherics/unary/vent_pump/New()
..()
air_contents.volume = ATMOS_DEFAULT_VOLUME_PUMP

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

@@ -0,0 +1,7 @@
#define CE_STABLE "stable" // Inaprovaline
#define CE_ANTIBIOTIC "antibiotic" // Spaceacilin
#define CE_BLOODRESTORE "bloodrestore" // Iron/nutriment
#define CE_PAINKILLER "painkiller"
#define CE_ALCOHOL "alcohol" // Liver filtering
#define CE_ALCOHOL_TOXIC "alcotoxic" // Liver damage
#define CE_SPEEDBOOST "gofast" // Hyperzine

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

@@ -6,18 +6,16 @@
/datum/controller/process/machinery/doWork()
internal_sort()
internal_process()
internal_process_machinery()
internal_process_power()
internal_process_power_drain()
/datum/controller/process/machinery/proc/internal_sort()
if(machinery_sort_required)
machinery_sort_required = 0
machines = dd_sortedObjectList(machines)
/datum/controller/process/machinery/proc/internal_process()
//#ifdef PROFILE_MACHINES
//machine_profiling.len = 0
//#endif
/datum/controller/process/machinery/proc/internal_process_machinery()
for(var/obj/machinery/M in machines)
if(M && !M.gcDestroyed)
#ifdef PROFILE_MACHINES
@@ -43,6 +41,22 @@
scheck()
/datum/controller/process/machinery/proc/internal_process_power()
for(var/datum/powernet/powerNetwork in powernets)
if(istype(powerNetwork) && !powerNetwork.disposed)
powerNetwork.reset()
scheck()
continue
powernets.Remove(powerNetwork)
/datum/controller/process/machinery/proc/internal_process_power_drain()
// Currently only used by powersinks. These items get priority processed before machinery
for(var/obj/item/I in processing_power_items)
if(!I.pwr_drain()) // 0 = Process Kill, remove from processing list.
processing_power_items.Remove(I)
scheck()
/datum/controller/process/machinery/getStatName()
return ..()+"([machines.len])"
return ..()+"([machines.len])"

View File

@@ -1,20 +0,0 @@
/datum/controller/process/powernet/setup()
name = "powernet"
schedule_interval = 20 // every 2 seconds
/datum/controller/process/powernet/doWork()
for(var/datum/powernet/powerNetwork in powernets)
if(istype(powerNetwork) && !powerNetwork.disposed)
powerNetwork.reset()
scheck()
continue
powernets.Remove(powerNetwork)
// This is necessary to ensure powersinks are always the first devices that drain power from powernet.
// Otherwise APCs or other stuff go first, resulting in bad things happening.
for(var/obj/item/device/powersink/S in processing_objects)
S.drain()
/datum/controller/process/powernet/getStatName()
return ..()+"([powernets.len])"

View File

@@ -1,9 +1,14 @@
var/global/list/processing_turfs = list()
var/global/list/turf/processing_turfs = list()
/datum/controller/process/turf/setup()
name = "turf"
schedule_interval = 20 // every 2 seconds
/datum/controller/process/turf/doWork()
for(var/turf/unsimulated/wall/supermatter/SM in processing_turfs)
SM.process()
for(var/turf/T in processing_turfs)
if(T.process() == PROCESS_KILL)
processing_turfs.Remove(T)
scheck()
/datum/controller/process/turf/getStatName()
return ..()+"([processing_turfs.len])"

View File

@@ -72,7 +72,7 @@ Radio:
1355 - Medical
1357 - Engineering
1359 - Security
1341 - death squad
1341 - deathsquad
1443 - Confession Intercom
1347 - Cargo techs
1349 - Service people

View File

@@ -114,6 +114,10 @@ var/list/gamemode_cache = list()
var/organ_health_multiplier = 1
var/organ_regeneration_multiplier = 1
//Paincrit knocks someone down once they hit 60 shock_stage, so by default make it so that close to 100 additional damage needs to be dealt,
//so that it's similar to HALLOSS. Lowered it a bit since hitting paincrit takes much longer to wear off than a halloss stun.
var/organ_damage_spillover_multiplier = 0.5
var/bones_can_break = 0
var/limbs_can_break = 0
@@ -670,6 +674,8 @@ var/list/gamemode_cache = list()
config.organ_health_multiplier = value / 100
if("organ_regeneration_multiplier")
config.organ_regeneration_multiplier = value / 100
if("organ_damage_spillover_multiplier")
config.organ_damage_spillover_multiplier = value / 100
if("bones_can_break")
config.bones_can_break = value
if("limbs_can_break")

View File

@@ -39,7 +39,6 @@ datum/controller/game_controller/proc/setup()
setup_objects()
setupgenetics()
setup_economy()
SetupXenoarch()
transfer_controller = new

View File

@@ -257,7 +257,7 @@ datum/controller/vote
text += "\n[question]"
log_vote(text)
world << "<font color='purple'><b>[text]</b>\nType vote to place your votes.\nYou have [config.vote_period/10] seconds to vote.</font>"
world << "<font color='purple'><b>[text]</b>\nType <b>vote</b> or click <a href='?src=\ref[src]'>here</a> to place your votes.\nYou have [config.vote_period/10] seconds to vote.</font>"
switch(vote_type)
if("crew_transfer")
world << sound('sound/ambience/alarm4.ogg', repeat = 0, wait = 0, volume = 50, channel = 3)

View File

@@ -2,10 +2,8 @@
data_core = new /obj/effect/datacore()
return 1
/obj/effect/datacore/proc/manifest(var/nosleep = 0)
/obj/effect/datacore/proc/manifest()
spawn()
if(!nosleep)
sleep(40)
for(var/mob/living/carbon/human/H in player_list)
manifest_inject(H)
return

View File

@@ -94,7 +94,7 @@
/datum/recipe/proc/make(var/obj/container as obj)
var/obj/result_obj = new result(container)
for (var/obj/O in (container.contents-result_obj))
O.reagents.trans_to(result_obj, O.reagents.total_volume)
O.reagents.trans_to_obj(result_obj, O.reagents.total_volume)
qdel(O)
container.reagents.clear_reagents()
return result_obj
@@ -109,7 +109,7 @@
if (O.reagents)
O.reagents.del_reagent("nutriment")
O.reagents.update_total()
O.reagents.trans_to(result_obj, O.reagents.total_volume)
O.reagents.trans_to_obj(result_obj, O.reagents.total_volume)
qdel(O)
container.reagents.clear_reagents()
return result_obj

View File

@@ -259,7 +259,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
name = "Corgi Crate"
contains = list()
cost = 50
containertype = /obj/structure/largecrate/lisa
containertype = /obj/structure/largecrate/animal/corgi
containername = "Corgi Crate"
group = "Hydroponics"
@@ -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
@@ -289,7 +289,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/datum/supply_packs/cow
name = "Cow crate"
cost = 30
containertype = /obj/structure/largecrate/cow
containertype = /obj/structure/largecrate/animal/cow
containername = "Cow crate"
access = access_hydroponics
group = "Hydroponics"
@@ -297,7 +297,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/datum/supply_packs/goat
name = "Goat crate"
cost = 25
containertype = /obj/structure/largecrate/goat
containertype = /obj/structure/largecrate/animal/goat
containername = "Goat crate"
access = access_hydroponics
group = "Hydroponics"
@@ -305,19 +305,11 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/datum/supply_packs/chicken
name = "Chicken crate"
cost = 20
containertype = /obj/structure/largecrate/chick
containertype = /obj/structure/largecrate/animal/chick
containername = "Chicken crate"
access = access_hydroponics
group = "Hydroponics"
/datum/supply_packs/lisa
name = "Corgi crate"
contains = list()
cost = 50
containertype = /obj/structure/largecrate/lisa
containername = "Corgi crate"
group = "Hydroponics"
/datum/supply_packs/seeds
name = "Seeds crate"
contains = list(/obj/item/seeds/chiliseed,
@@ -345,11 +337,17 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/datum/supply_packs/weedcontrol
name = "Weed control crate"
contains = list(/obj/item/weapon/scythe,
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,
/obj/item/weapon/reagent_containers/spray/plantbgone,
/obj/item/clothing/mask/gas,
/obj/item/clothing/mask/gas,
/obj/item/weapon/grenade/chem_grenade/antiweed,
/obj/item/weapon/grenade/chem_grenade/antiweed)
cost = 20
cost = 25
containertype = /obj/structure/closet/crate/secure/hydrosec
containername = "Weed control crate"
access = access_hydroponics
@@ -447,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
@@ -456,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
@@ -465,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
@@ -474,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
@@ -1257,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
@@ -1519,7 +1517,32 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/obj/item/weapon/stock_parts/subspace/crystal,
/obj/item/weapon/storage/toolbox/electrical)
/datum/supply_packs/randomised/exosuit_mod
num_contained = 1
contains = list(
/obj/item/device/kit/paint/ripley,
/obj/item/device/kit/paint/ripley/death,
/obj/item/device/kit/paint/ripley/flames_red,
/obj/item/device/kit/paint/ripley/flames_blue
)
name = "Random APLU modkit"
cost = 200
containertype = /obj/structure/closet/crate
containername = "heavy crate"
group = "Miscellaneous"
/datum/supply_packs/randomised/exosuit_mod/durand
contains = list(
/obj/item/device/kit/paint/durand,
/obj/item/device/kit/paint/durand/seraph,
/obj/item/device/kit/paint/durand/phazon
)
name = "Random Durand exosuit modkit"
/datum/supply_packs/randomised/exosuit_mod/gygax
contains = list(
/obj/item/device/kit/paint/gygax,
/obj/item/device/kit/paint/gygax/darkgygax,
/obj/item/device/kit/paint/gygax/recitence
)
name = "Random Gygax exosuit modkit"

View File

@@ -37,10 +37,11 @@ var/const/AIRLOCK_WIRE_LIGHT = 2048
var/haspower = A.arePowerSystemsOn() //If there's no power, then no lights will be on.
. += ..()
. += text("<br>\n[]<br>\n[]<br>\n[]<br>\n[]<br>\n[]<br>\n[]<br>\n[]",
. += text("<br>\n[]<br>\n[]<br>\n[]<br>\n[]<br>\n[]<br>\n[]<br>\n[]<br>\n[]",
(A.locked ? "The door bolts have fallen!" : "The door bolts look up."),
((A.lights && haspower) ? "The door bolt lights are on." : "The door bolt lights are off!"),
((haspower) ? "The test light is on." : "The test light is off!"),
((A.backupPowerCablesCut()) ? "The backup power light is off!" : "The backup power light is on."),
((A.aiControlDisabled==0 && !A.emagged && haspower)? "The 'AI control allowed' light is on." : "The 'AI control allowed' light is off."),
((A.safe==0 && haspower)? "The 'Check Wiring' light is on." : "The 'Check Wiring' light is off."),
((A.normalspeed==0 && haspower)? "The 'Check Timing Mechanism' light is on." : "The 'Check Timing Mechanism' light is off."),
@@ -124,7 +125,7 @@ var/const/AIRLOCK_WIRE_LIGHT = 2048
//Sending a pulse through flashes the red light on the door (if the door has power).
if(A.arePowerSystemsOn() && A.density)
A.do_animate("deny")
if(AIRLOCK_WIRE_MAIN_POWER1 || AIRLOCK_WIRE_MAIN_POWER2)
if(AIRLOCK_WIRE_MAIN_POWER1, AIRLOCK_WIRE_MAIN_POWER2)
//Sending a pulse through either one causes a breaker to trip, disabling the door for 10 seconds if backup power is connected, or 1 minute if not (or until backup power comes back on, whichever is shorter).
A.loseMainPower()
if(AIRLOCK_WIRE_DOOR_BOLTS)
@@ -135,7 +136,7 @@ var/const/AIRLOCK_WIRE_LIGHT = 2048
else
A.unlock()
if(AIRLOCK_WIRE_BACKUP_POWER1 || AIRLOCK_WIRE_BACKUP_POWER2)
if(AIRLOCK_WIRE_BACKUP_POWER1, AIRLOCK_WIRE_BACKUP_POWER2)
//two wires for backup power. Sending a pulse through either one causes a breaker to trip, but this does not disable it unless main power is down too (in which case it is disabled for 1 minute or however long it takes main power to come back, whichever is shorter).
A.loseBackupPower()
if(AIRLOCK_WIRE_AI_CONTROL)

View File

@@ -278,6 +278,11 @@ var/const/POWER = 8
var/r = rand(1, wires.len)
CutWireIndex(r)
/datum/wires/proc/RandomCutAll(var/probability = 10)
for(var/i = 1; i < MAX_FLAG && i < (1 << wire_count); i += i)
if(prob(probability))
CutWireIndex(i)
/datum/wires/proc/CutAll()
for(var/i = 1; i < MAX_FLAG && i < (1 << wire_count); i += i)
CutWireIndex(i)

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)
@@ -175,47 +175,91 @@
origin_tech = "materials=1"
var/breakouttime = 300 //Deciseconds = 30s = 0.5 minute
/obj/item/weapon/legcuffs/beartrap
/obj/item/weapon/beartrap
name = "bear trap"
throw_speed = 2
throw_range = 1
gender = PLURAL
icon = 'icons/obj/items.dmi'
icon_state = "beartrap0"
desc = "A trap used to catch bears and other legged creatures."
var/armed = 0
throwforce = 0
w_class = 3.0
origin_tech = "materials=1"
var/deployed = 0
suicide_act(mob/user)
viewers(user) << "\red <b>[user] is putting the [src.name] on \his head! It looks like \he's trying to commit suicide.</b>"
viewers(user) << "<span class='danger'>[user] is putting the [src.name] on \his head! It looks like \he's trying to commit suicide.</span>"
return (BRUTELOSS)
/obj/item/weapon/legcuffs/beartrap/attack_self(mob/user as mob)
/obj/item/weapon/beartrap/attack_self(mob/user as mob)
..()
if(ishuman(user) && !user.stat && !user.restrained())
armed = !armed
icon_state = "beartrap[armed]"
user << "<span class='notice'>[src] is now [armed ? "armed" : "disarmed"]</span>"
if(deployed==0)
user.visible_message("<span class='danger'>[user] is deploying \the [src]</span>", "<span class='danger'>You are deploying \the [src]!</span>")
if (do_after(user, 60))
user.visible_message("<span class='danger'>[user] has deployed \the [src]</span>", "<span class='danger'>You have deployed \the [src]!</span>")
deployed = 1
user.drop_from_inventory(src, user.loc)
update_icon()
anchored = 1
/obj/item/weapon/legcuffs/beartrap/Crossed(AM as mob|obj)
if(armed)
/obj/item/weapon/beartrap/attack_hand(mob/user as mob)
if(ishuman(user) && !user.stat && !user.restrained())
if(deployed==1)
user.visible_message("<span class='danger'>[user] is disarming \the [src]</span>", "<span class='danger'>You are disarming \the [src]!</span>")
if (do_after(user, 60))
user.visible_message("<span class='danger'>[user] has disarmed \the [src]</span>", "<span class='danger'>You have disarmed \the [src]!</span>")
deployed = 0
anchored = 0
update_icon()
if(deployed==0)
..()
/obj/item/weapon/beartrap/Crossed(AM as mob|obj)
if(deployed)
if(ishuman(AM))
if(isturf(src.loc))
var/mob/living/carbon/H = AM
var/mob/living/carbon/human/H = AM
if(H.m_intent == "run")
armed = 0
H.legcuffed = src
src.loc = H
H.update_inv_legcuffed()
H << "\red <B>You step on \the [src]!</B>"
feedback_add_details("handcuffs","B") //Yes, I know they're legcuffs. Don't change this, no need for an extra variable. The "B" is used to tell them apart.
deployed = 0
update_icon()
H << "<span class='danger'>You step on \the [src]!</span>"
for(var/mob/O in viewers(H, null))
if(O == H)
continue
O.show_message("\red <B>[H] steps on \the [src].</B>", 1)
O.show_message("<span class='danger'>[H] steps on \the [src].</span>", 1)
if(H.lying)
var/obj/item/organ/external/affecting = pick(H.organs)
if(affecting.take_damage(30, 0))
H.UpdateDamageIcon()
affecting.embed(src)
else
var/list/potentialorgans = list()
for(var/organ in list("l_leg", "r_leg", "l_foot", "r_foot"))
var/obj/item/organ/external/R = H.get_organ(organ)
if(R && !(R.status & ORGAN_DESTROYED))
potentialorgans += R
var/obj/item/organ/external/affecting = pick(potentialorgans)
if(affecting.take_damage(30, 0))
H.UpdateDamageIcon()
affecting.embed(src)
if(isanimal(AM) && !istype(AM, /mob/living/simple_animal/parrot) && !istype(AM, /mob/living/simple_animal/construct) && !istype(AM, /mob/living/simple_animal/shade) && !istype(AM, /mob/living/simple_animal/hostile/viscerator))
armed = 0
deployed = 0
var/mob/living/simple_animal/SA = AM
SA.health -= 20
..()
/obj/item/weapon/beartrap/update_icon()
..()
if(deployed == 0)
icon_state = "beartrap0"
else
icon_state = "beartrap1"
/obj/item/weapon/caution

View File

@@ -1,34 +1,20 @@
proc/sql_poll_players()
proc/sql_poll_population()
if(!sqllogging)
return
var/admincount = admins.len
var/playercount = 0
for(var/mob/M in player_list)
if(M.client)
playercount += 1
establish_db_connection()
if(!dbcon.IsConnected())
log_game("SQL ERROR during player polling. Failed to connect.")
log_game("SQL ERROR during population polling. Failed to connect.")
else
var/sqltime = time2text(world.realtime, "YYYY-MM-DD hh:mm:ss")
var/DBQuery/query = dbcon_old.NewQuery("INSERT INTO population (playercount, time) VALUES ([playercount], '[sqltime]')")
var/DBQuery/query = dbcon_old.NewQuery("INSERT INTO `tgstation`.`population` (`playercount`, `admincount`, `time`) VALUES ([playercount], [admincount], '[sqltime]')")
if(!query.Execute())
var/err = query.ErrorMsg()
log_game("SQL ERROR during player polling. Error : \[[err]\]\n")
proc/sql_poll_admins()
if(!sqllogging)
return
var/admincount = admins.len
establish_db_connection()
if(!dbcon.IsConnected())
log_game("SQL ERROR during admin polling. Failed to connect.")
else
var/sqltime = time2text(world.realtime, "YYYY-MM-DD hh:mm:ss")
var/DBQuery/query = dbcon_old.NewQuery("INSERT INTO population (admincount, time) VALUES ([admincount], '[sqltime]')")
if(!query.Execute())
var/err = query.ErrorMsg()
log_game("SQL ERROR during admin polling. Error : \[[err]\]\n")
log_game("SQL ERROR during population polling. Error : \[[err]\]\n")
proc/sql_report_round_start()
// TODO
@@ -111,10 +97,8 @@ proc/statistic_cycle()
if(!sqllogging)
return
while(1)
sql_poll_players()
sleep(600)
sql_poll_admins()
sleep(6000) // Poll every ten minutes
sql_poll_population()
sleep(6000)
//This proc is used for feedback. It is executed at round end.
proc/sql_commit_feedback()
@@ -157,4 +141,4 @@ proc/sql_commit_feedback()
var/DBQuery/query = dbcon.NewQuery("INSERT INTO erro_feedback (id, roundid, time, variable, value) VALUES (null, [newroundid], Now(), '[variable]', '[value]')")
if(!query.Execute())
var/err = query.ErrorMsg()
log_game("SQL ERROR during death reporting. Error : \[[err]\]\n")
log_game("SQL ERROR during death reporting. Error : \[[err]\]\n")

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

@@ -598,8 +598,7 @@
inject_amount = 0
if (inject_amount > 50)
inject_amount = 50
connected.beaker.reagents.trans_to(connected.occupant, inject_amount)
connected.beaker.reagents.reaction(connected.occupant)
connected.beaker.reagents.trans_to_mob(connected.occupant, inject_amount, CHEM_BLOOD)
return 1 // return 1 forces an update to all Nano uis attached to src
////////////////////////////////////////////////////////

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)
..()
@@ -32,13 +32,6 @@
/obj/item/weapon/storage/backpack/cultpack/cultify()
return
/obj/item/weapon/table_parts/cultify()
new /obj/item/weapon/table_parts/wood(loc)
..()
/obj/item/weapon/table_parts/wood/cultify()
return
/obj/machinery/cultify()
// We keep the number of cultified machines down by only converting those that are dense
// The alternative is to keep a separate file of exceptions.
@@ -66,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()
@@ -121,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()
@@ -149,8 +142,12 @@
..()
/obj/structure/table/cultify()
new /obj/structure/table/woodentable(loc)
..()
/obj/structure/table/woodentable/cultify()
return
// Make it a wood-reinforced wooden table.
// There are cult materials available, but it'd make the table non-deconstructable with how holotables work.
// Could possibly use a new material var for holographic-ness?
material = name_to_material["wood"]
reinforced = name_to_material["wood"]
update_desc()
update_connections(1)
update_icon()
update_material()

View File

@@ -23,7 +23,7 @@
processing_turfs.Remove(src)
..()
/turf/unsimulated/wall/supermatter/proc/process()
/turf/unsimulated/wall/supermatter/process()
// Only check infrequently.
if(next_check>world.time) return

View File

@@ -110,11 +110,11 @@ var/global/datum/controller/gameticker/ticker
else
src.mode.announce()
current_state = GAME_STATE_PLAYING
create_characters() //Create player characters and transfer them
collect_minds()
equip_characters()
data_core.manifest()
current_state = GAME_STATE_PLAYING
callHook("roundstart")
@@ -155,7 +155,6 @@ var/global/datum/controller/gameticker/ticker
for(var/obj/multiz/ladder/L in world) L.connect() //Lazy hackfix for ladders. TODO: move this to an actual controller. ~ Z
if(config.sql_enabled)
spawn(3000)
statistic_cycle() // Polls population totals regularly and stores them in an SQL DB -- TLE
return 1
@@ -292,7 +291,7 @@ var/global/datum/controller/gameticker/ticker
if(player.mind.assigned_role != "MODE")
job_master.EquipRank(player, player.mind.assigned_role, 0)
UpdateFactionList(player)
EquipCustomItems(player)
equip_custom_items(player)
if(captainless)
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player))

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

@@ -24,44 +24,6 @@
if (prob(75))
DIFFMUT = rand(0,20)
/* Old, for reference (so I don't accidentally activate something) - N3X
var/list/avnums = new/list()
var/tempnum
avnums.Add(2)
avnums.Add(12)
avnums.Add(10)
avnums.Add(8)
avnums.Add(4)
avnums.Add(11)
avnums.Add(13)
avnums.Add(6)
tempnum = pick(avnums)
avnums.Remove(tempnum)
HULKBLOCK = tempnum
tempnum = pick(avnums)
avnums.Remove(tempnum)
TELEBLOCK = tempnum
tempnum = pick(avnums)
avnums.Remove(tempnum)
FIREBLOCK = tempnum
tempnum = pick(avnums)
avnums.Remove(tempnum)
XRAYBLOCK = tempnum
tempnum = pick(avnums)
avnums.Remove(tempnum)
CLUMSYBLOCK = tempnum
tempnum = pick(avnums)
avnums.Remove(tempnum)
FAKEBLOCK = tempnum
tempnum = pick(avnums)
avnums.Remove(tempnum)
DEAFBLOCK = tempnum
tempnum = pick(avnums)
avnums.Remove(tempnum)
BLINDBLOCK = tempnum
*/
var/list/numsToAssign=new()
for(var/i=1;i<DNA_SE_LENGTH;i++)
numsToAssign += i
@@ -119,126 +81,3 @@
assignedToBlock=blocks_assigned[G.block]
assignedToBlock.Add(G.name)
blocks_assigned[G.block]=assignedToBlock
//testing("DNA2: Gene [G.name] assigned to block [G.block].")
//testing("DNA2: [numsToAssign.len] blocks are unused: [english_list(numsToAssign)]")
// HIDDEN MUTATIONS / SUPERPOWERS INITIALIZTION
/*
for(var/x in typesof(/datum/mutations) - /datum/mutations)
var/datum/mutations/mut = new x
for(var/i = 1, i <= mut.required, i++)
var/datum/mutationreq/require = new/datum/mutationreq
require.block = rand(1, 13)
require.subblock = rand(1, 3)
// Create random requirement identification
require.reqID = pick("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", \
"B", "C", "D", "E", "F")
mut.requirements += require
global_mutations += mut// add to global mutations list!
*/
/* This was used for something before, I think, but is not worth the effort to process now.
/proc/setupcorpses()
for (var/obj/effect/landmark/A in landmarks_list)
if (A.name == "Corpse")
var/mob/living/carbon/human/M = new /mob/living/carbon/human(A.loc)
M.real_name = "Corpse"
M.death()
qdel(A)
continue
if (A.name == "Corpse-Engineer")
var/mob/living/carbon/human/M = new /mob/living/carbon/human(A.loc)
M.real_name = "Corpse"
M.death()
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_eng(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/device/pda/engineering(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/engineer(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/orange(M), slot_shoes)
// M.equip_to_slot_or_del(new /obj/item/weapon/storage/toolbox/mechanical(M), slot_l_hand)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/yellow(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/device/t_scanner(M), slot_r_store)
//M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
if (prob(50))
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas(M), slot_wear_mask)
if (prob(50))
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/hardhat(M), slot_head)
else
if (prob(50))
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/welding(M), slot_head)
qdel(A)
continue
if (A.name == "Corpse-Engineer-Space")
var/mob/living/carbon/human/M = new /mob/living/carbon/human(A.loc)
M.real_name = "Corpse"
M.death()
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_eng(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/weapon/tank/emergency_oxygen(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/engineer(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/orange(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/space(M), slot_wear_suit)
// M.equip_to_slot_or_del(new /obj/item/weapon/storage/toolbox/mechanical(M), slot_l_hand)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/yellow(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/device/t_scanner(M), slot_r_store)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas(M), slot_wear_mask)
if (prob(50))
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/hardhat(M), slot_head)
else
if (prob(50))
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/welding(M), slot_head)
else
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space(M), slot_head)
qdel(A)
continue
if (A.name == "Corpse-Engineer-Chief")
var/mob/living/carbon/human/M = new /mob/living/carbon/human(A.loc)
M.real_name = "Corpse"
M.death()
M.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_eng(M), slot_l_ear)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/utilitybelt(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chief_engineer(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/orange(M), slot_shoes)
// M.equip_to_slot_or_del(new /obj/item/weapon/storage/toolbox/mechanical(M), slot_l_hand)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/yellow(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/device/t_scanner(M), slot_r_store)
M.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(M), slot_back)
if (prob(50))
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas(M), slot_wear_mask)
if (prob(50))
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/hardhat(M), slot_head)
else
if (prob(50))
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/welding(M), slot_head)
qdel(A)
continue
if (A.name == "Corpse-Syndicate")
var/mob/living/carbon/human/M = new /mob/living/carbon/human(A.loc)
M.real_name = "Corpse"
M.death()
M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_l_ear)
//M.equip_to_slot_or_del(new /obj/item/weapon/gun/revolver(M), slot_belt)
M.equip_to_slot_or_del(new /obj/item/clothing/under/syndicate(M), slot_w_uniform)
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/swat(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/weapon/tank/jetpack(M), slot_back)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas(M), slot_wear_mask)
if (prob(50))
M.equip_to_slot_or_del(new /obj/item/clothing/suit/space/syndicate(M), slot_wear_suit)
if (prob(50))
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/swat(M), slot_head)
else
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/syndicate(M), slot_head)
else
M.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/vest(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/swat(M), slot_head)
qdel(A)
continue
*/

View File

@@ -9,7 +9,7 @@
/var/const/access_tox = 7
/var/const/access_tox_storage = 8
/var/const/access_genetics = 9
/var/const/access_engine = 10
/var/const/access_engine = 10 //engineering hallways
/var/const/access_engine_equip = 11
/var/const/access_maint_tunnels = 12
/var/const/access_external_airlocks = 13
@@ -65,6 +65,7 @@
/var/const/access_sec_doors = 63 // Security front doors
/var/const/access_psychiatrist = 64 // Psychiatrist's office
/var/const/access_xenoarch = 65
/var/const/access_medical_equip = 66
//BEGIN CENTCOM ACCESS
/*Should leave plenty of room if we need to add more access levels.
@@ -159,7 +160,7 @@
access_hydroponics, access_library, access_lawyer, access_virology, access_psychiatrist, access_cmo, access_qm, access_clown, access_mime, access_surgery,
access_theatre, access_research, access_mining, access_mailsorting,
access_heads_vault, access_mining_station, access_xenobiology, access_ce, access_hop, access_hos, access_RC_announce,
access_keycard_auth, access_tcomsat, access_gateway, access_xenoarch)
access_keycard_auth, access_tcomsat, access_gateway, access_xenoarch, access_medical_equip)
/proc/get_all_centcom_access()
return list(access_cent_general, access_cent_thunder, access_cent_specops, access_cent_medical, access_cent_living, access_cent_storage, access_cent_teleporter, access_cent_creed, access_cent_captain)
@@ -174,7 +175,7 @@
if(1) //security
return list(access_sec_doors, access_security, access_brig, access_armory, access_forensics_lockers, access_court, access_hos)
if(2) //medbay
return list(access_medical, access_genetics, access_morgue, access_chemistry, access_psychiatrist, access_virology, access_surgery, access_cmo)
return list(access_medical, access_medical_equip, access_genetics, access_morgue, access_chemistry, access_psychiatrist, access_virology, access_surgery, access_cmo)
if(3) //research
return list(access_research, access_tox, access_tox_storage, access_robotics, access_xenobiology, access_xenoarch, access_rd)
if(4) //engineering and maintenance
@@ -213,7 +214,7 @@
if(access_cargo_bot)
return "Cargo Bot Delivery"
if(access_security)
return "Security"
return "Security Equipment"
if(access_brig)
return "Holding Cells"
if(access_court)
@@ -337,7 +338,7 @@
if(access_gateway)
return "Gateway"
if(access_sec_doors)
return "Brig"
return "Security"
/proc/get_centcom_access_desc(A)
switch(A)

View File

@@ -16,10 +16,6 @@
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/clothing/under/color/grey(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
return 1
/datum/job/assistant/get_access()

View File

@@ -33,7 +33,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
H.equip_to_slot_or_del(new /obj/item/clothing/head/caphat(H), slot_head)
H.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(H), slot_glasses)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H), slot_r_hand)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H), slot_l_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H.back), slot_in_backpack)
@@ -84,12 +84,11 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/head_of_personnel(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/heads/hop(H), slot_belt)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H), slot_r_hand)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H), slot_l_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/ids(H.back), slot_in_backpack)
return 1

View File

@@ -23,21 +23,6 @@
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/bartender(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/pda/bar(H), slot_belt)
if(H.backbag == 1)
var/obj/item/weapon/storage/box/survival/Barpack = new /obj/item/weapon/storage/box/survival(H)
H.equip_to_slot_or_del(Barpack, slot_r_hand)
new /obj/item/ammo_casing/shotgun/beanbag(Barpack)
new /obj/item/ammo_casing/shotgun/beanbag(Barpack)
new /obj/item/ammo_casing/shotgun/beanbag(Barpack)
new /obj/item/ammo_casing/shotgun/beanbag(Barpack)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/ammo_casing/shotgun/beanbag(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/ammo_casing/shotgun/beanbag(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/ammo_casing/shotgun/beanbag(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/ammo_casing/shotgun/beanbag(H), slot_in_backpack)
return 1
@@ -65,10 +50,6 @@
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/head/chefhat(H), slot_head)
H.equip_to_slot_or_del(new /obj/item/device/pda/chef(H), slot_belt)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
return 1
@@ -98,11 +79,9 @@
H.equip_to_slot_or_del(new /obj/item/device/analyzer/plant_analyzer(H), slot_s_store)
H.equip_to_slot_or_del(new /obj/item/device/pda/botanist(H), slot_belt)
switch(H.backbag)
if(1) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/hydroponics(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_hyd(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
return 1
@@ -131,10 +110,6 @@
// H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
H.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(H), slot_glasses)
H.equip_to_slot_or_del(new /obj/item/weapon/clipboard(H), slot_l_hand)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
return 1
@@ -160,10 +135,6 @@
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/cargo(H), slot_belt)
// H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
return 1
@@ -194,11 +165,9 @@
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
// H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(H), slot_r_hand)
H.equip_to_slot_or_del(new /obj/item/weapon/crowbar(H), slot_l_hand)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/bag/ore(H), slot_l_store)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/crowbar(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/bag/ore(H), slot_in_backpack)
return 1
@@ -223,7 +192,6 @@
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/clown(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/clown(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/clown_shoes(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/clown(H), slot_belt)
@@ -264,11 +232,9 @@
H.equip_to_slot_or_del(new /obj/item/clothing/head/beret(H), slot_head)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/suspenders(H), slot_wear_suit)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
H.equip_to_slot_or_del(new /obj/item/weapon/pen/crayon/mime(H), slot_l_store)
H.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing(H), slot_l_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/pen/crayon/mime(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing(H), slot_in_backpack)
H.verbs += /client/proc/mimespeak
@@ -290,8 +256,8 @@
spawn_positions = 1
supervisors = "the head of personnel"
selection_color = "#dddddd"
access = list(access_janitor, access_maint_tunnels)
minimal_access = list(access_janitor, access_maint_tunnels)
access = list(access_janitor, access_maint_tunnels, access_engine, access_research, access_sec_doors, access_medical)
minimal_access = list(access_janitor, access_maint_tunnels, access_engine, access_research, access_sec_doors, access_medical)
equip(var/mob/living/carbon/human/H)
@@ -300,10 +266,6 @@
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/janitor(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/janitor(H), slot_belt)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
return 1
@@ -330,10 +292,6 @@
H.equip_to_slot_or_del(new /obj/item/device/pda/librarian(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/weapon/barcodescanner(H), slot_l_hand)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
return 1
@@ -347,15 +305,15 @@
faction = "Station"
total_positions = 2
spawn_positions = 2
supervisors = "the captain"
supervisors = "Nanotrasen officials and Corporate Regulations"
selection_color = "#dddddd"
access = list(access_lawyer, access_court, access_sec_doors, access_maint_tunnels)
minimal_access = list(access_lawyer, access_court, access_sec_doors)
access = list(access_lawyer, access_court, access_sec_doors, access_maint_tunnels, access_heads)
minimal_access = list(access_lawyer, access_court, access_sec_doors, access_heads)
equip(var/mob/living/carbon/human/H)
if(!H) return 0
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/ia(H), slot_l_ear)
switch(H.backbag)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
@@ -366,10 +324,6 @@
H.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses/big(H), slot_glasses)
H.equip_to_slot_or_del(new /obj/item/device/pda/lawyer(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/briefcase(H), slot_l_hand)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.implant_loyalty(H)

View File

@@ -22,10 +22,6 @@
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chaplain(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/pda/chaplain(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
spawn(0)
var/religion_name = "Christianity"
var/new_religion = sanitize(input(H, "You are the crew services officer. Would you like to change your religion? Default is Christianity, in SPACE.", "Name change", religion_name), MAX_NAME_LEN)

View File

@@ -35,10 +35,6 @@
H.equip_to_slot_or_del(new /obj/item/clothing/head/hardhat/white(H), slot_head)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/utility/full(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(H.back), slot_in_backpack)
return 1
@@ -54,7 +50,7 @@
supervisors = "the chief engineer"
selection_color = "#fff5cc"
access = list(access_eva, access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction, access_atmospherics)
minimal_access = list(access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction)
minimal_access = list(access_eva, access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction)
alt_titles = list("Maintenance Technician","Engine Technician","Electrician")
@@ -71,10 +67,6 @@
H.equip_to_slot_or_del(new /obj/item/clothing/head/hardhat(H), slot_head)
H.equip_to_slot_or_del(new /obj/item/device/t_scanner(H), slot_r_store)
H.equip_to_slot_or_del(new /obj/item/device/pda/engineering(H), slot_l_store)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(H.back), slot_in_backpack)
return 1
@@ -90,7 +82,7 @@
supervisors = "the chief engineer"
selection_color = "#fff5cc"
access = list(access_eva, access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction, access_atmospherics, access_external_airlocks)
minimal_access = list(access_atmospherics, access_maint_tunnels, access_emergency_storage, access_construction, access_external_airlocks)
minimal_access = list(access_eva, access_engine, access_atmospherics, access_maint_tunnels, access_emergency_storage, access_construction, access_external_airlocks)
equip(var/mob/living/carbon/human/H)
@@ -104,8 +96,4 @@
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/atmos(H), slot_l_store)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/utility/atmostech/(H), slot_belt)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(H.back), slot_in_backpack)
return 1

View File

@@ -11,12 +11,12 @@
selection_color = "#ffddf0"
idtype = /obj/item/weapon/card/id/silver
req_admin_notify = 1
access = list(access_medical, access_morgue, access_genetics, access_heads,
access = list(access_medical, access_medical_equip, access_morgue, access_genetics, access_heads,
access_chemistry, access_virology, access_cmo, access_surgery, access_RC_announce,
access_keycard_auth, access_sec_doors, access_psychiatrist, access_eva)
minimal_access = list(access_medical, access_morgue, access_genetics, access_heads,
access_keycard_auth, access_sec_doors, access_psychiatrist, access_eva, access_external_airlocks)
minimal_access = list(access_medical, access_medical_equip, access_morgue, access_genetics, access_heads,
access_chemistry, access_virology, access_cmo, access_surgery, access_RC_announce,
access_keycard_auth, access_sec_doors, access_psychiatrist, access_eva)
access_keycard_auth, access_sec_doors, access_psychiatrist, access_eva, access_external_airlocks)
minimal_player_age = 10
equip(var/mob/living/carbon/human/H)
@@ -30,10 +30,6 @@
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/heads/cmo(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/firstaid/adv(H), slot_l_hand)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
return 1
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/cmo(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/device/flashlight/pen(H), slot_s_store)
@@ -48,8 +44,8 @@
spawn_positions = 3
supervisors = "the chief medical officer"
selection_color = "#ffeef0"
access = list(access_medical, access_morgue, access_surgery, access_chemistry, access_virology, access_genetics)
minimal_access = list(access_medical, access_morgue, access_surgery, access_virology)
access = list(access_medical, access_medical_equip, access_morgue, access_surgery, access_chemistry, access_virology, access_genetics)
minimal_access = list(access_medical, access_medical_equip, access_morgue, access_surgery, access_virology)
alt_titles = list("Surgeon","Emergency Physician","Nurse","Virologist")
equip(var/mob/living/carbon/human/H)
@@ -93,10 +89,6 @@
else
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat(H), slot_wear_suit)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/device/pda/medical(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/device/flashlight/pen(H), slot_s_store)
return 1
@@ -114,7 +106,7 @@
spawn_positions = 2
supervisors = "the chief medical officer"
selection_color = "#ffeef0"
access = list(access_medical, access_morgue, access_surgery, access_chemistry, access_virology, access_genetics)
access = list(access_medical, access_medical_equip, access_morgue, access_surgery, access_chemistry, access_virology, access_genetics)
minimal_access = list(access_medical, access_chemistry)
alt_titles = list("Pharmacist")
@@ -126,11 +118,9 @@
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/chemist(H), slot_belt)
switch(H.backbag)
if(1) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/chemistry(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_chem(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/chemist(H), slot_wear_suit)
return 1
@@ -157,11 +147,9 @@
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/geneticist(H), slot_belt)
switch(H.backbag)
if(1) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/genetics(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_gen(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/genetics(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/device/flashlight/pen(H), slot_s_store)
return 1
@@ -176,8 +164,8 @@
spawn_positions = 1
supervisors = "the chief medical officer"
selection_color = "#ffeef0"
access = list(access_medical, access_morgue, access_surgery, access_chemistry, access_virology, access_genetics, access_psychiatrist)
minimal_access = list(access_medical, access_psychiatrist)
access = list(access_medical, access_medical_equip, access_morgue, access_surgery, access_chemistry, access_virology, access_genetics, access_psychiatrist)
minimal_access = list(access_medical, access_medical_equip, access_psychiatrist)
alt_titles = list("Psychologist")
equip(var/mob/living/carbon/human/H)
@@ -197,10 +185,6 @@
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/laceup(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/medical(H), slot_belt)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat(H), slot_wear_suit)
@@ -214,8 +198,8 @@
spawn_positions = 2
supervisors = "the chief medical officer"
selection_color = "#ffeef0"
access = list(access_medical, access_morgue, access_surgery, access_chemistry, access_virology, access_eva, access_maint_tunnels, access_external_airlocks, access_psychiatrist)
minimal_access = list(access_medical, access_morgue, access_eva, access_maint_tunnels, access_external_airlocks)
access = list(access_medical, access_medical_equip, access_morgue, access_surgery, access_chemistry, access_virology, access_eva, access_maint_tunnels, access_external_airlocks, access_psychiatrist)
minimal_access = list(access_medical, access_medical_equip, access_eva, access_maint_tunnels, access_external_airlocks)
alt_titles = list("Emergency Medical Technician")
equip(var/mob/living/carbon/human/H)
@@ -230,7 +214,7 @@
if (H.mind.role_alt_title)
switch(H.mind.role_alt_title)
if("Emergency Medical Technician")
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical/fluff/short(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical/paramedic(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/fr_jacket(H), slot_wear_suit)
if("Paramedic")
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical/black(H), slot_w_uniform)
@@ -239,8 +223,4 @@
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/belt/medical/emt(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/device/pda/medical(H), slot_l_store)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(H.back), slot_in_backpack)
return 1

View File

@@ -13,11 +13,11 @@
req_admin_notify = 1
access = list(access_rd, access_heads, access_tox, access_genetics, access_morgue,
access_tox_storage, access_teleporter, access_sec_doors,
access_research, access_robotics, access_xenobiology, access_ai_upload,
access_research, access_robotics, access_xenobiology, access_ai_upload, access_tech_storage,
access_RC_announce, access_keycard_auth, access_tcomsat, access_gateway, access_xenoarch)
minimal_access = list(access_rd, access_heads, access_tox, access_genetics, access_morgue,
access_tox_storage, access_teleporter, access_sec_doors,
access_research, access_robotics, access_xenobiology, access_ai_upload,
access_research, access_robotics, access_xenobiology, access_ai_upload, access_tech_storage,
access_RC_announce, access_keycard_auth, access_tcomsat, access_gateway, access_xenoarch)
minimal_player_age = 14
@@ -29,11 +29,9 @@
H.equip_to_slot_or_del(new /obj/item/device/pda/heads/rd(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/weapon/clipboard(H), slot_l_hand)
switch(H.backbag)
if(1) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/toxins(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_tox(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat(H), slot_wear_suit)
return 1
@@ -62,11 +60,9 @@
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/science(H), slot_belt)
switch(H.backbag)
if(1) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/toxins(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_tox(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/science(H), slot_wear_suit)
return 1
@@ -95,11 +91,9 @@
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/science(H), slot_belt)
switch(H.backbag)
if(1) H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/toxins(H), slot_back)
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_tox(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat/science(H), slot_wear_suit)
return 1
@@ -128,9 +122,5 @@
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/device/pda/roboticist(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/toolbox/mechanical(H), slot_l_hand)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/toggle/labcoat(H), slot_wear_suit)
return 1

View File

@@ -11,14 +11,14 @@
selection_color = "#ffdddd"
idtype = /obj/item/weapon/card/id/silver
req_admin_notify = 1
access = list(access_security, access_sec_doors, access_brig, access_armory, access_court,
access = list(access_security, access_eva, access_sec_doors, access_brig, access_armory, access_court,
access_forensics_lockers, access_morgue, access_maint_tunnels, access_all_personal_lockers,
access_research, access_engine, access_mining, access_medical, access_construction, access_mailsorting,
access_heads, access_hos, access_RC_announce, access_keycard_auth, access_gateway)
minimal_access = list(access_security, access_sec_doors, access_brig, access_armory, access_court,
access_heads, access_hos, access_RC_announce, access_keycard_auth, access_gateway, access_external_airlocks)
minimal_access = list(access_security, access_eva, access_sec_doors, access_brig, access_armory, access_court,
access_forensics_lockers, access_morgue, access_maint_tunnels, access_all_personal_lockers,
access_research, access_engine, access_mining, access_medical, access_construction, access_mailsorting,
access_heads, access_hos, access_RC_announce, access_keycard_auth, access_gateway)
access_heads, access_hos, access_RC_announce, access_keycard_auth, access_gateway, access_external_airlocks)
minimal_player_age = 14
equip(var/mob/living/carbon/human/H)
@@ -36,10 +36,8 @@
H.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses/sechud(H), slot_glasses)
H.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun(H), slot_s_store)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_l_store)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack)
H.implant_loyalty(H)
return 1
@@ -56,8 +54,8 @@
spawn_positions = 1
supervisors = "the head of security"
selection_color = "#ffeeee"
access = list(access_security, access_sec_doors, access_brig, access_armory, access_court, access_maint_tunnels, access_morgue)
minimal_access = list(access_security, access_sec_doors, access_brig, access_armory, access_court, access_maint_tunnels)
access = list(access_security, access_eva, access_sec_doors, access_brig, access_armory, access_court, access_maint_tunnels, access_morgue, access_external_airlocks)
minimal_access = list(access_security, access_eva, access_sec_doors, access_brig, access_armory, access_court, access_maint_tunnels, access_external_airlocks)
minimal_player_age = 5
equip(var/mob/living/carbon/human/H)
@@ -75,10 +73,8 @@
// H.equip_to_slot_or_del(new /obj/item/clothing/mask/gas(H), slot_wear_mask) //Grab one from the armory you donk
H.equip_to_slot_or_del(new /obj/item/device/flash(H), slot_l_store)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_l_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack)
return 1
@@ -113,11 +109,9 @@
H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
H.equip_to_slot_or_del(new /obj/item/weapon/flame/lighter/zippo(H), slot_l_store)
if(H.backbag == 1)//Why cant some of these things spawn in his office?
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/evidence(H), slot_l_hand)
H.equip_to_slot_or_del(new /obj/item/device/detective_scanner(H), slot_r_store)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/evidence(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/device/detective_scanner(H), slot_in_backpack)
if(H.mind.role_alt_title && H.mind.role_alt_title == "Forensic Technician")
@@ -139,8 +133,8 @@
spawn_positions = 3
supervisors = "the head of security"
selection_color = "#ffeeee"
access = list(access_security, access_sec_doors, access_brig, access_court, access_maint_tunnels, access_morgue)
minimal_access = list(access_security, access_sec_doors, access_brig, access_court, access_maint_tunnels)
access = list(access_security, access_eva, access_sec_doors, access_brig, access_court, access_maint_tunnels, access_morgue, access_external_airlocks)
minimal_access = list(access_security, access_eva, access_sec_doors, access_brig, access_court, access_maint_tunnels, access_external_airlocks)
minimal_player_age = 3
equip(var/mob/living/carbon/human/H)
if(!H) return 0
@@ -155,9 +149,7 @@
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_s_store)
H.equip_to_slot_or_del(new /obj/item/device/flash(H), slot_l_store)
if(H.backbag == 1)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_l_hand)
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/handcuffs(H), slot_in_backpack)
return 1

View File

@@ -394,6 +394,8 @@ var/global/datum/controller/occupations/job_master
//Equip job items.
job.equip(H)
job.apply_fingerprints(H)
H.species.equip_survival_gear(H)
//If some custom items could not be equipped before, try again now.
for(var/thing in custom_equip_leftovers)
var/datum/gear/G = gear_datums[thing]
@@ -499,20 +501,6 @@ var/global/datum/controller/occupations/job_master
else
H << "\red Failed to locate a storage object on your mob, either you spawned with no arms and no backpack or this is a bug."
//TODO: Generalize this by-species
if(H.species)
if(H.species.name == "Tajara" || H.species.name == "Unathi")
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal(H),slot_shoes,1)
else if(H.species.name == "Vox")
H.equip_to_slot_or_del(new /obj/item/clothing/mask/breath(H), slot_wear_mask)
if(!H.r_hand)
H.equip_to_slot_or_del(new /obj/item/weapon/tank/nitrogen(H), slot_r_hand)
H.internal = H.r_hand
else if (!H.l_hand)
H.equip_to_slot_or_del(new /obj/item/weapon/tank/nitrogen(H), slot_l_hand)
H.internal = H.l_hand
H.internals.icon_state = "internal1"
if(istype(H)) //give humans wheelchairs, if they need them.
var/obj/item/organ/external/l_foot = H.get_organ("l_foot")
var/obj/item/organ/external/r_foot = H.get_organ("r_foot")

View File

@@ -191,10 +191,10 @@
if(beaker.reagents.total_volume < beaker.reagents.maximum_volume)
var/pumped = 0
for(var/datum/reagent/x in src.occupant.reagents.reagent_list)
src.occupant.reagents.trans_to(beaker, 3)
src.occupant.reagents.trans_to_obj(beaker, 3)
pumped++
if (ishuman(src.occupant))
src.occupant.vessel.trans_to(beaker, pumped + 1)
src.occupant.vessel.trans_to_obj(beaker, pumped + 1)
src.updateUsrDialog()
return

View File

@@ -68,6 +68,7 @@
//Perform the connection
connected_port = new_port
connected_port.connected_device = src
connected_port.on = 1 //Activate port updates
anchored = 1 //Prevent movement

View File

@@ -22,7 +22,7 @@
/obj/machinery/portable_atmospherics/powered/pump/New()
..()
cell = new/obj/item/weapon/cell(src)
cell = new/obj/item/weapon/cell/apc(src)
var/list/air_mix = StandardAirMix()
src.air_contents.adjust_multi("oxygen", air_mix["oxygen"], "nitrogen", air_mix["nitrogen"])
@@ -78,7 +78,7 @@
output_volume = environment.volume * environment.group_multiplier
air_temperature = environment.temperature? environment.temperature : air_contents.temperature
else
pressure_delta = target_pressure - air_contents.return_pressure()
pressure_delta = environment.return_pressure() - target_pressure
output_volume = air_contents.volume * air_contents.group_multiplier
air_temperature = air_contents.temperature? air_contents.temperature : environment.temperature

View File

@@ -20,7 +20,7 @@
/obj/machinery/portable_atmospherics/powered/scrubber/New()
..()
cell = new/obj/item/weapon/cell(src)
cell = new/obj/item/weapon/cell/apc(src)
/obj/machinery/portable_atmospherics/powered/scrubber/emp_act(severity)
if(stat & (BROKEN|NOPOWER))

View File

@@ -1,5 +1,5 @@
/obj/machinery/autolathe
name = "\improper autolathe"
name = "autolathe"
desc = "It produces items using metal and glass."
icon_state = "autolathe"
density = 1
@@ -140,6 +140,9 @@
if(O.loc != user && !(istype(O,/obj/item/stack)))
return 0
if(is_robot_module(O))
return 0
//Resources are being loaded.
var/obj/item/eating = O
if(!eating.matter)
@@ -290,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

@@ -305,7 +305,14 @@
if("destination")
refresh=0
var/new_dest = input("Enter new destination tag", "Mulebot [suffix ? "([suffix])" : ""]", destination) as text|null
var/new_dest
var/list/beaconlist = new()
for(var/obj/machinery/navbeacon/N in navbeacons)
beaconlist.Add(N.location)
if(beaconlist.len)
new_dest = input("Select new destination tag", "Mulebot [suffix ? "([suffix])" : ""]", destination) in beaconlist
else
alert("No destination beacons available.")
refresh=1
if(new_dest)
set_destination(new_dest)
@@ -741,11 +748,6 @@
if(!on)
return
/*
world << "rec signal: [signal.source]"
for(var/x in signal.data)
world << "* [x] = [signal.data[x]]"
*/
var/recv = signal.data["command"]
// process all-bot input
if(recv=="bot_status" && wires.RemoteRX())

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"
@@ -138,8 +139,10 @@
else if(iswelder(W) && (wires.CanDeconstruct() || (stat & BROKEN)))
if(weld(W, user))
if (stat & BROKEN)
new /obj/item/weapon/circuitboard/broken(src.loc)
new /obj/item/stack/cable_coil(src.loc, length=2)
stat &= ~BROKEN
cancelCameraAlarm()
update_icon()
update_coverage()
else if(assembly)
assembly.loc = src.loc
assembly.state = 1
@@ -188,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
@@ -234,6 +238,8 @@
//Used when someone breaks a camera
/obj/machinery/camera/proc/destroy()
stat |= BROKEN
wires.RandomCutAll()
kick_viewers()
triggerCameraAlarm()
update_icon()

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()
update_coverage()

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

@@ -55,18 +55,11 @@
var/cam = C.nano_structure()
cameras[++cameras.len] = cam
if(C == current)
data["current"] = cam
camera_cache=list2json(cameras)
var/list/camera_list = list("cameras" = cameras)
camera_cache=list2json(camera_list)
else
if(current)
data["current"] = current.nano_structure()
if(ui)
ui.load_cached_data(camera_cache)
if(current)
data["current"] = current.nano_structure()
data["cameras"] = list("__json_cache" = camera_cache)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
@@ -76,8 +69,7 @@
ui.add_template("mapContent", "sec_camera_map_content.tmpl")
// adding a template with the key "mapHeader" replaces the map header content
ui.add_template("mapHeader", "sec_camera_map_header.tmpl")
ui.load_cached_data(camera_cache)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)

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

@@ -232,8 +232,7 @@
var/has_clonexa = occupant.reagents.get_reagent_amount("clonexadone") >= 1
var/has_cryo_medicine = has_cryo || has_clonexa
if(beaker && !has_cryo_medicine)
beaker.reagents.trans_to(occupant, 1, 10)
beaker.reagents.reaction(occupant)
beaker.reagents.trans_to_mob(occupant, 1, CHEM_BLOOD, 10)
/obj/machinery/atmospherics/unary/cryo_cell/proc/heat_gas_contents()
if(air_contents.total_moles < 1)

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

@@ -7,7 +7,7 @@
min_force = 4
hitsound = 'sound/effects/Glasshit.ogg'
maxhealth = 150 //If you change this, consiter changing ../door/window/brigdoor/ health at the bottom of this .dm file
health
health = 150
visible = 0.0
use_power = 0
flags = ON_BORDER
@@ -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
@@ -249,13 +249,14 @@
/obj/machinery/door/window/brigdoor
name = "Secure Door"
name = "secure door"
icon = 'icons/obj/doors/windoor.dmi'
icon_state = "leftsecure"
base_state = "leftsecure"
req_access = list(access_security)
var/id = null
health = 300.0 //Stronger doors for prison (regular window door health is 200)
maxhealth = 300
health = 300.0 //Stronger doors for prison (regular window door health is 150)
/obj/machinery/door/window/northleft

View File

@@ -82,11 +82,11 @@
// Give blood
if(mode)
if(src.beaker.volume > 0)
var/transfer_amount = REAGENTS_METABOLISM
var/transfer_amount = REM
if(istype(src.beaker, /obj/item/weapon/reagent_containers/blood))
// speed up transfer on blood packs
transfer_amount = 4
src.beaker.reagents.trans_to(src.attached, transfer_amount)
src.beaker.reagents.trans_to_mob(src.attached, transfer_amount, CHEM_BLOOD)
update_icon()
// Take blood

View File

@@ -209,7 +209,7 @@
new_meat.reagents.add_reagent("nutriment",slab_nutrition)
if(src.occupant.reagents)
src.occupant.reagents.trans_to(new_meat, round(occupant.reagents.total_volume/slab_count,1))
src.occupant.reagents.trans_to_obj(new_meat, round(occupant.reagents.total_volume/slab_count,1))
src.occupant.attack_log += "\[[time_stamp()]\] Was gibbed by <b>[user]/[user.ckey]</b>" //One shall not simply gib a mob unnoticed!
user.attack_log += "\[[time_stamp()]\] Gibbed <b>[src.occupant]/[src.occupant.ckey]</b>"

View File

@@ -1,6 +1,9 @@
// Navigation beacon for AI robots
// Functions as a transponder: looks for incoming signal matching
var/global/list/navbeacons // no I don't like putting this in, but it will do for now
/obj/machinery/navbeacon
icon = 'icons/obj/objects.dmi'
@@ -27,6 +30,13 @@
var/turf/T = loc
hide(T.intact)
// add beacon to MULE bot beacon list
if(freq == 1400)
if(!navbeacons)
navbeacons = new()
navbeacons += src
spawn(5) // must wait for map loading to finish
if(radio_controller)
@@ -241,6 +251,7 @@ Transponder Codes:<UL>"}
updateDialog()
/obj/machinery/navbeacon/Destroy()
navbeacons.Remove(src)
if(radio_controller)
radio_controller.remove_object(src, freq)
..()

View File

@@ -179,6 +179,11 @@ Nah
<A href='?src=\ref[src];dmake=7'>Chute</A><BR>
<A href='?src=\ref[src];dmake=21'>Upwards</A><BR>
<A href='?src=\ref[src];dmake=22'>Downwards</A><BR>
<A href='?src=\ref[src];dmake=8'>Sorting</A><BR>
<A href='?src=\ref[src];dmake=9'>Sorting (Wildcard)</A><BR>
<A href='?src=\ref[src];dmake=10'>Sorting (Untagged)</A><BR>
<A href='?src=\ref[src];dmake=11'>Tagger</A><BR>
<A href='?src=\ref[src];dmake=12'>Tagger (Partial)</A><BR>
"}
///// Z-Level stuff
@@ -220,6 +225,19 @@ Nah
if(7)
C.ptype = 8
C.density = 1
if(8)
C.ptype = 9
C.subtype = 0
if(9)
C.ptype = 9
C.subtype = 1
if(10)
C.ptype = 9
C.subtype = 2
if(11)
C.ptype = 13
if(12)
C.ptype = 14
///// Z-Level stuff
if(21)
C.ptype = 11

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

@@ -269,7 +269,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
@@ -677,13 +677,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
@@ -720,7 +720,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
@@ -774,8 +774,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
@@ -819,7 +819,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

@@ -736,6 +736,10 @@
user << "<span class='danger'>The cycler already contains a helmet.</span>"
return
if(I.icon_override == CUSTOM_ITEM_MOB)
user << "You cannot refit a customised voidsuit."
return
user << "You fit \the [I] into the suit cycler."
user.drop_item()
I.loc = src
@@ -755,6 +759,10 @@
user << "<span class='danger'>The cycler already contains a voidsuit.</span>"
return
if(I.icon_override == CUSTOM_ITEM_MOB)
user << "You cannot refit a customised voidsuit."
return
user << "You fit \the [I] into the suit cycler."
user.drop_item()
I.loc = src

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

@@ -351,6 +351,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

@@ -788,7 +788,7 @@
icon_state = "med"
icon_deny = "med-deny"
product_ads = "Go save some lives!;The best stuff for your medbay.;Only the finest tools.;Natural chemicals!;This stuff saves lives.;Don't you want some?;Ping!"
req_access = list(access_medical)
req_access = list(access_medical_equip)
products = list(/obj/item/weapon/reagent_containers/glass/bottle/antitoxin = 4,/obj/item/weapon/reagent_containers/glass/bottle/inaprovaline = 4,
/obj/item/weapon/reagent_containers/glass/bottle/stoxin = 4,/obj/item/weapon/reagent_containers/glass/bottle/toxin = 4,
/obj/item/weapon/reagent_containers/syringe/antiviral = 4,/obj/item/weapon/reagent_containers/syringe = 12,
@@ -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

@@ -17,7 +17,7 @@
max_equip = 3
/obj/mecha/combat/gygax/dark
desc = "A lightweight exosuit used by Nanotrasen Death Squads. A significantly upgraded Gygax security mech."
desc = "A lightweight exosuit used by NanoTrasen Heavy Asset Protection. A significantly upgraded Gygax security mech."
name = "Dark Gygax"
icon_state = "darkgygax"
initial_icon = "darkgygax"

View File

@@ -443,7 +443,7 @@
var/turf/trg = get_turf(target)
var/obj/item/weapon/reagent_containers/syringe/S = syringes[1]
S.forceMove(get_turf(chassis))
reagents.trans_to(S, min(S.volume, reagents.total_volume))
reagents.trans_to_obj(S, min(S.volume, reagents.total_volume))
syringes -= S
S.icon = 'icons/obj/chemical.dmi'
S.icon_state = "syringeproj"
@@ -462,7 +462,7 @@
if(M)
S.icon_state = initial(S.icon_state)
S.icon = initial(S.icon)
S.reagents.trans_to(M, S.reagents.total_volume)
S.reagents.trans_to_mob(M, S.reagents.total_volume, CHEM_BLOOD)
M.take_organ_damage(2)
S.visible_message("<span class=\"attack\"> [M] was hit by the syringe!</span>")
break
@@ -591,7 +591,7 @@
if(!(D.CanPass(S,src.loc)))
occupant_message("Unable to load syringe.")
return 0
S.reagents.trans_to(src, S.reagents.total_volume)
S.reagents.trans_to_obj(src, S.reagents.total_volume)
S.forceMove(src)
syringes += S
occupant_message("Syringe loaded.")

View File

@@ -201,7 +201,7 @@
if(do_after_cooldown(target))
if( istype(target, /obj/structure/reagent_dispensers/watertank) && get_dist(chassis,target) <= 1)
var/obj/o = target
var/amount = o.reagents.trans_to(src, 200)
var/amount = o.reagents.trans_to_obj(src, 200)
occupant_message("<span class='notice'>[amount] units transferred into internal tank.</span>")
playsound(chassis, 'sound/effects/refill.ogg', 50, 1, -6)
return
@@ -220,29 +220,24 @@
var/list/the_targets = list(T,T1,T2)
for(var/a=0, a<5, a++)
for(var/a = 1 to 5)
spawn(0)
var/obj/effect/effect/water/W = PoolOrNew(/obj/effect/effect/water, get_turf(chassis))
var/turf/my_target = pick(the_targets)
var/datum/reagents/R = new/datum/reagents(5)
if(!W) return
W.reagents = R
R.my_atom = W
if(!W || !src) return
src.reagents.trans_to(W,1)
for(var/b=0, b<5, b++)
step_towards(W,my_target)
if(!W || !W.reagents) return
W.reagents.reaction(get_turf(W))
for(var/atom/atm in get_turf(W))
if(!W)
return
if(!W.reagents)
break
W.reagents.reaction(atm)
if(W.loc == my_target) break
sleep(2)
qdel(W)
var/turf/my_target
if(a == 1)
my_target = T
else if(a == 2)
my_target = T1
else if(a == 3)
my_target = T2
else
my_target = pick(the_targets)
W.create_reagents(5)
if(!W || !src)
return
reagents.trans_to_obj(W, spray_amount)
W.set_color()
W.set_up(my_target)
return 1
get_equip_info()
@@ -847,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
@@ -865,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)
@@ -908,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)
@@ -993,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)
@@ -1076,18 +1071,6 @@
do_after_cooldown()
return 1
/obj/item/weapon/paintkit //Please don't use this for anything, it's a base type for custom mech paintjobs.
name = "mecha customisation kit"
desc = "A generic kit containing all the needed tools and parts to turn a mech into another mech."
icon = 'icons/obj/custom_items.dmi'
icon_state = "royce_kit"
var/new_name = "mech" //What is the variant called?
var/new_desc = "A mech." //How is the new mech described?
var/new_icon = "ripley" //What base icon will the new mech use?
var/removable = null //Can the kit be removed?
var/list/allowed_types = list() //Types of mech that the kit will work on.
/obj/item/mecha_parts/mecha_equipment/tool/passenger
name = "passenger compartment"
desc = "A mountable passenger compartment for exo-suits. Rather cramped."

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

@@ -106,7 +106,6 @@
if(loc)
loc.Exited(src)
loc = null
if(prob(30))
explosion(get_turf(loc), 0, 0, 1, 3)
@@ -460,6 +459,8 @@
/obj/mecha/proc/setInternalDamage(int_dam_flag)
if(!pr_internal_damage) return
internal_damage |= int_dam_flag
pr_internal_damage.start()
log_append_to_last("Internal damage of type [int_dam_flag].",1)
@@ -814,34 +815,6 @@
user.visible_message("[user] attaches [W] to [src].", "You attach [W] to [src]")
return
else if(istype(W, /obj/item/weapon/paintkit))
if(occupant)
user << "You can't customize a mech while someone is piloting it - that would be unsafe!"
return
var/obj/item/weapon/paintkit/P = W
var/found = null
for(var/type in P.allowed_types)
if(type==src.initial_icon)
found = 1
break
if(!found)
user << "That kit isn't meant for use on this class of exosuit."
return
user.visible_message("[user] opens [P] and spends some quality time customising [src].")
src.name = P.new_name
src.desc = P.new_desc
src.initial_icon = P.new_icon
src.reset_icon()
user.drop_item()
qdel(P)
else
call((proc_res["dynattackby"]||src), "dynattackby")(W,user)
/*
@@ -1791,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

@@ -5,13 +5,11 @@
icon = 'icons/effects/chemsmoke.dmi'
opacity = 0
time_to_live = 300
pass_flags = PASSTABLE | PASSGRILLE | PASSGLASS //PASSGLASS is fine here, it's just so the visual effect can "flow" around glass
pass_flags = PASSTABLE | PASSGRILLE | PASSGLASS //PASSGLASS is fine here, it's just so the visual effect can "flow" around glass
/obj/effect/effect/smoke/chem/New()
..()
var/datum/reagents/R = new/datum/reagents(500)
reagents = R
R.my_atom = src
create_reagents(500)
return
/datum/effect/effect/system/smoke_spread/chem
@@ -37,21 +35,16 @@
/datum/effect/effect/system/smoke_spread/chem/New()
..()
chemholder = new/obj()
var/datum/reagents/R = new/datum/reagents(500)
chemholder.reagents = R
R.my_atom = chemholder
chemholder.create_reagents(500)
//------------------------------------------
//Sets up the chem smoke effect
//
// Calculates the max range smoke can travel, then gets all turfs in that view range.
// Culls the selected turfs to a (roughly) circle shape, then calls smokeFlow() to make
// sure the smoke can actually path to the turfs. This culls any turfs it can't reach.
//------------------------------------------
/datum/effect/effect/system/smoke_spread/chem/set_up(var/datum/reagents/carry = null, n = 10, c = 0, loca, direct)
range = n * 0.3
cardinals = c
carry.copy_to(chemholder, carry.total_volume)
carry.trans_to_obj(chemholder, carry.total_volume, copy = 1)
if(istype(loca, /turf/))
location = loca
@@ -62,28 +55,19 @@
targetTurfs = new()
//build affected area list
for(var/turf/T in view(range, location))
//cull turfs to circle
if(cheap_pythag(T.x - location.x, T.y - location.y) <= range)
for(var/turf/T in view(range, location)) //build affected area list
if(cheap_pythag(T.x - location.x, T.y - location.y) <= range) //cull turfs to circle
targetTurfs += T
//make secondary list for reagents that affect walls
if(chemholder.reagents.has_reagent("thermite") || chemholder.reagents.has_reagent("plantbgone"))
wallList = new()
wallList = new()
//pathing check
smokeFlow(location, targetTurfs, wallList)
smokeFlow() //pathing check
//set the density of the cloud - for diluting reagents
density = max(1, targetTurfs.len / 4) //clamp the cloud density minimum to 1 so it cant multiply the reagents
density = max(1, targetTurfs.len / 4) //clamp the cloud density minimum to 1 so it cant multiply the reagents
//Admin messaging
var/contained = ""
for(var/reagent in carry.reagent_list)
contained += " [reagent] "
if(contained)
contained = "\[[contained]\]"
var/contained = carry.get_reagents()
var/area/A = get_area(location)
var/where = "[A.name] | [location.x], [location.y]"
@@ -101,61 +85,27 @@
message_admins("A chemical smoke reaction has taken place in ([whereLink]). No associated key.", 0, 1)
log_game("A chemical smoke reaction has taken place in ([where])[contained]. No associated key.")
//------------------------------------------
//Runs the chem smoke effect
//
// Spawns damage over time loop for each reagent held in the cloud.
// Applies reagents to walls that affect walls (only thermite and plant-b-gone at the moment).
// Also calculates target locations to spawn the visual smoke effect on, so the whole area
// is covered fairly evenly.
//------------------------------------------
/datum/effect/effect/system/smoke_spread/chem/start()
if(!location) //kill grenade if it somehow ends up in nullspace
if(!location)
return
//reagent application - only run if there are extra reagents in the smoke
if(chemholder.reagents.reagent_list.len)
for(var/datum/reagent/R in chemholder.reagents.reagent_list)
var/proba = 100
var/runs = 5
if(chemholder.reagents.reagent_list.len) //reagent application - only run if there are extra reagents in the smoke
for(var/turf/T in wallList)
chemholder.reagents.touch_turf(T)
for(var/turf/T in targetTurfs)
chemholder.reagents.touch_turf(T)
for(var/atom/A in T.contents)
if(istype(A, /obj/effect/effect/smoke/chem) || istype(A, /mob))
continue
else if(isobj(A) && !A.simulated)
chemholder.reagents.touch_obj(A)
//dilute the reagents according to cloud density
R.volume /= density
chemholder.reagents.update_total()
//apply wall affecting reagents to walls
if(R.id in list("thermite", "plantbgone"))
for(var/turf/T in wallList)
R.reaction_turf(T, R.volume)
//reagents that should be applied to turfs in a random pattern
if(R.id == "carbon")
proba = 75
else if(R.id in list("blood", "radium", "uranium"))
proba = 25
spawn(0)
for(var/i = 0, i < runs, i++)
for(var/turf/T in targetTurfs)
if(prob(proba))
R.reaction_turf(T, R.volume)
for(var/atom/A in T.contents)
if(istype(A, /obj/effect/effect/smoke/chem)) //skip the item if it is chem smoke
continue
else if(istype(A, /mob))
var/dist = cheap_pythag(T.x - location.x, T.y - location.y)
if(!dist)
dist = 1
R.reaction_mob(A, volume = R.volume / dist)
else if(istype(A, /obj))
R.reaction_obj(A, R.volume)
sleep(30)
//build smoke icon
var/color = chemholder.reagents.get_color()
var/color = chemholder.reagents.get_color() //build smoke icon
var/icon/I
if(color)
I = icon('icons/effects/chemsmoke.dmi')
@@ -163,13 +113,9 @@
else
I = icon('icons/effects/96x96.dmi', "smoke")
var/const/arcLength = 2.3559 //distance between each smoke cloud
//distance between each smoke cloud
var/const/arcLength = 2.3559
//calculate positions for smoke coverage - then spawn smoke
for(var/i = 0, i < range, i++)
for(var/i = 0, i < range, i++) //calculate positions for smoke coverage - then spawn smoke
var/radius = i * 1.5
if(!radius)
spawn(0)
@@ -207,12 +153,12 @@
smoke = PoolOrNew(/obj/effect/effect/smoke/chem, location)
if(chemholder.reagents.reagent_list.len)
chemholder.reagents.copy_to(smoke, chemholder.reagents.total_volume / dist, safety = 1) //copy reagents to the smoke so mob/breathe() can handle inhaling the reagents
chemholder.reagents.trans_to_obj(smoke, chemholder.reagents.total_volume / dist, copy = 1) //copy reagents to the smoke so mob/breathe() can handle inhaling the reagents
smoke.icon = I
smoke.layer = 6
smoke.set_dir(pick(cardinal))
smoke.pixel_x = -32 + rand(-8,8)
smoke.pixel_y = -32 + rand(-8,8)
smoke.pixel_x = -32 + rand(-8, 8)
smoke.pixel_y = -32 + rand(-8, 8)
walk_to(smoke, T)
smoke.opacity = 1 //switching opacity on after the smoke has spawned, and then
sleep(150+rand(0,20)) // turning it off before it is deleted results in cleaner
@@ -225,10 +171,7 @@
spores.name = "cloud of [seed.seed_name] [seed.seed_noun]"
..(T, I, dist, spores)
//------------------------------------------
// Fades out the smoke smoothly using it's alpha variable.
//------------------------------------------
/datum/effect/effect/system/smoke_spread/chem/proc/fadeOut(var/atom/A, var/frames = 16)
/datum/effect/effect/system/smoke_spread/chem/proc/fadeOut(var/atom/A, var/frames = 16) // Fades out the smoke smoothly using it's alpha variable.
if(A.alpha == 0) //Handle already transparent case
return
if(frames == 0)
@@ -239,11 +182,8 @@
sleep(world.tick_lag)
return
//------------------------------------------
// Smoke pathfinder. Uses a flood fill method based on zones to
// quickly check what turfs the smoke (airflow) can actually reach.
//------------------------------------------
/datum/effect/effect/system/smoke_spread/chem/proc/smokeFlow()
/datum/effect/effect/system/smoke_spread/chem/proc/smokeFlow() // Smoke pathfinder. Uses a flood fill method based on zones to quickly check what turfs the smoke (airflow) can actually reach.
var/list/pending = new()
var/list/complete = new()

View File

@@ -0,0 +1,184 @@
// Foam
// Similar to smoke, but spreads out more
// metal foams leave behind a foamed metal wall
/obj/effect/effect/foam
name = "foam"
icon_state = "foam"
opacity = 0
anchored = 1
density = 0
layer = OBJ_LAYER + 0.9
mouse_opacity = 0
animate_movement = 0
var/amount = 3
var/expand = 1
var/metal = 0
/obj/effect/effect/foam/New(var/loc, var/ismetal = 0)
..(loc)
icon_state = "[ismetal? "m" : ""]foam"
metal = ismetal
playsound(src, 'sound/effects/bubbles2.ogg', 80, 1, -3)
spawn(3 + metal * 3)
process()
checkReagents()
spawn(120)
processing_objects.Remove(src)
sleep(30)
if(metal)
var/obj/structure/foamedmetal/M = new(src.loc)
M.metal = metal
M.updateicon()
flick("[icon_state]-disolve", src)
sleep(5)
qdel(src)
return
/obj/effect/effect/foam/proc/checkReagents() // transfer any reagents to the floor
if(!metal && reagents)
var/turf/T = get_turf(src)
reagents.touch_turf(T)
/obj/effect/effect/foam/process()
if(--amount < 0)
return
for(var/direction in cardinal)
var/turf/T = get_step(src, direction)
if(!T)
continue
if(!T.Enter(src))
continue
var/obj/effect/effect/foam/F = locate() in T
if(F)
continue
F = new(T, metal)
F.amount = amount
if(!metal)
F.create_reagents(10)
if(reagents)
for(var/datum/reagent/R in reagents.reagent_list)
F.reagents.add_reagent(R.id, 1, safety = 1) //added safety check since reagents in the foam have already had a chance to react
/obj/effect/effect/foam/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) // foam disolves when heated, except metal foams
if(!metal && prob(max(0, exposed_temperature - 475)))
flick("[icon_state]-disolve", src)
spawn(5)
qdel(src)
/obj/effect/effect/foam/Crossed(var/atom/movable/AM)
if(metal)
return
if(istype(AM, /mob/living))
var/mob/living/M = AM
M.slip("the foam", 6)
/datum/effect/effect/system/foam_spread
var/amount = 5 // the size of the foam spread.
var/list/carried_reagents // the IDs of reagents present when the foam was mixed
var/metal = 0 // 0 = foam, 1 = metalfoam, 2 = ironfoam
/datum/effect/effect/system/foam_spread/set_up(amt=5, loca, var/datum/reagents/carry = null, var/metalfoam = 0)
amount = round(sqrt(amt / 3), 1)
if(istype(loca, /turf/))
location = loca
else
location = get_turf(loca)
carried_reagents = list()
metal = metalfoam
// bit of a hack here. Foam carries along any reagent also present in the glass it is mixed with (defaults to water if none is present). Rather than actually transfer the reagents, this makes a list of the reagent ids and spawns 1 unit of that reagent when the foam disolves.
if(carry && !metal)
for(var/datum/reagent/R in carry.reagent_list)
carried_reagents += R.id
/datum/effect/effect/system/foam_spread/start()
spawn(0)
var/obj/effect/effect/foam/F = locate() in location
if(F)
F.amount += amount
return
F = PoolOrNew(/obj/effect/effect/foam, list(location, metal))
F.amount = amount
if(!metal) // don't carry other chemicals if a metal foam
F.create_reagents(10)
if(carried_reagents)
for(var/id in carried_reagents)
F.reagents.add_reagent(id, 1, safety = 1) //makes a safety call because all reagents should have already reacted anyway
else
F.reagents.add_reagent("water", 1, safety = 1)
// wall formed by metal foams, dense and opaque, but easy to break
/obj/structure/foamedmetal
icon = 'icons/effects/effects.dmi'
icon_state = "metalfoam"
density = 1
opacity = 1 // changed in New()
anchored = 1
name = "foamed metal"
desc = "A lightweight foamed metal wall."
var/metal = 1 // 1 = aluminum, 2 = iron
/obj/structure/foamedmetal/New()
..()
update_nearby_tiles(1)
/obj/structure/foamedmetal/Destroy()
density = 0
update_nearby_tiles(1)
..()
/obj/structure/foamedmetal/proc/updateicon()
if(metal == 1)
icon_state = "metalfoam"
else
icon_state = "ironfoam"
/obj/structure/foamedmetal/ex_act(severity)
qdel(src)
/obj/structure/foamedmetal/blob_act()
qdel(src)
/obj/structure/foamedmetal/bullet_act()
if(metal == 1 || prob(50))
qdel(src)
/obj/structure/foamedmetal/attack_hand(var/mob/user)
if ((HULK in user.mutations) || (prob(75 - metal * 25)))
user.visible_message("<span class='warning'>[user] smashes through the foamed metal.</span>", "<span class='notice'>You smash through the metal foam wall.</span>")
qdel(src)
else
user << "<span class='notice'>You hit the metal foam but bounce off it.</span>"
return
/obj/structure/foamedmetal/attackby(var/obj/item/I, var/mob/user)
if(istype(I, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = I
G.affecting.loc = src.loc
visible_message("<span class='warning'>[G.assailant] smashes [G.affecting] through the foamed metal wall.</span>")
qdel(I)
qdel(src)
return
if(prob(I.force * 20 - metal * 25))
user.visible_message("<span class='warning'>[user] smashes through the foamed metal.</span>", "<span class='notice'>You smash through the foamed metal with \the [I].</span>")
qdel(src)
else
user << "<span class='notice'>You hit the metal foam to no effect.</span>"
/obj/structure/foamedmetal/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
if(air_group)
return 0
return !density

View File

@@ -0,0 +1,50 @@
/obj/effect/effect/water
name = "water"
icon = 'icons/effects/effects.dmi'
icon_state = "extinguish"
mouse_opacity = 0
/obj/effect/effect/water/New(loc)
..()
spawn(150) // In case whatever made it forgets to delete it
if(src)
qdel(src)
/obj/effect/effect/water/proc/set_color() // Call it after you move reagents to it
icon += reagents.get_color()
/obj/effect/effect/water/proc/set_up(var/turf/target, var/step_count = 5, var/delay = 5)
if(!target)
return
for(var/i = 1 to step_count)
step_towards(src, target)
var/turf/T = get_turf(src)
reagents.touch_turf(T)
var/mob/M = locate() in T
if(M)
reagents.splash_mob(M, reagents.total_volume)
break
for(var/atom/A in T)
reagents.touch(A)
if(T == get_turf(target))
break
sleep(delay)
sleep(10)
qdel(src)
/obj/effect/effect/water/Move(turf/newloc)
if(newloc.density)
return 0
. = ..()
/obj/effect/effect/water/Bump(atom/A)
if(reagents)
reagents.touch(A)
return ..()
//Used by spraybottles.
/obj/effect/effect/water/chempuff
name = "chemicals"
icon = 'icons/obj/chempuff.dmi'
icon_state = ""
pass_flags = PASSTABLE | PASSGRILLE

View File

@@ -11,10 +11,4 @@
/obj/effect/decal/spraystill
density = 0
anchored = 1
layer = 50
//Used by spraybottles.
/obj/effect/decal/chempuff
name = "chemicals"
icon = 'icons/obj/chempuff.dmi'
pass_flags = PASSTABLE | PASSGRILLE
layer = 50

View File

@@ -13,35 +13,11 @@ would spawn and follow the beaker, even if it is carried or thrown.
unacidable = 1//So effect are not targeted by alien acid.
pass_flags = PASSTABLE | PASSGRILLE
/obj/effect/effect/water
name = "water"
icon = 'icons/effects/effects.dmi'
icon_state = "extinguish"
var/life = 15.0
mouse_opacity = 0
/obj/effect/Destroy()
/obj/effect/Destroy()
if(reagents)
reagents.delete()
return ..()
/obj/effect/effect/water/Move(turf/newloc)
//var/turf/T = src.loc
//if (istype(T, /turf))
// T.firelevel = 0 //TODO: FIX
if (--src.life < 1)
//SN src = null
qdel(src)
if(newloc.density)
return 0
.=..()
/obj/effect/effect/water/Bump(atom/A)
if(reagents)
reagents.reaction(A)
return ..()
/datum/effect/effect/system
var/number = 3
var/cardinals = 0
@@ -479,228 +455,7 @@ steam.start() -- spawns the effect
proc/stop()
src.processing = 0
src.on = 0
// Foam
// Similar to smoke, but spreads out more
// metal foams leave behind a foamed metal wall
/obj/effect/effect/foam
name = "foam"
icon_state = "foam"
opacity = 0
anchored = 1
density = 0
layer = OBJ_LAYER + 0.9
mouse_opacity = 0
var/amount = 3
var/expand = 1
animate_movement = 0
var/metal = 0
/obj/effect/effect/foam/New(loc, var/ismetal=0)
..(loc)
icon_state = "[ismetal ? "m":""]foam"
metal = ismetal
playsound(src, 'sound/effects/bubbles2.ogg', 80, 1, -3)
spawn(3 + metal*3)
process()
checkReagents()
spawn(120)
processing_objects.Remove(src)
sleep(30)
if(metal)
var/obj/structure/foamedmetal/M = PoolOrNew(/obj/structure/foamedmetal, src.loc)
M.metal = metal
M.updateicon()
flick("[icon_state]-disolve", src)
sleep(5)
qdel(src)
return
// transfer any reagents to the floor
/obj/effect/effect/foam/proc/checkReagents()
if(!metal && reagents)
for(var/atom/A in src.loc.contents)
if(A == src)
continue
reagents.reaction(A, 1, 1)
/obj/effect/effect/foam/process()
if(--amount < 0)
return
for(var/direction in cardinal)
var/turf/T = get_step(src,direction)
if(!T)
continue
if(!T.Enter(src))
continue
var/obj/effect/effect/foam/F = locate() in T
if(F)
continue
F = PoolOrNew(/obj/effect/effect/foam, list(T, metal))
F.amount = amount
if(!metal)
F.create_reagents(10)
if (reagents)
for(var/datum/reagent/R in reagents.reagent_list)
F.reagents.add_reagent(R.id, 1, safety = 1) //added safety check since reagents in the foam have already had a chance to react
// foam disolves when heated
// except metal foams
/obj/effect/effect/foam/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(!metal && prob(max(0, exposed_temperature - 475)))
flick("[icon_state]-disolve", src)
spawn(5)
qdel(src)
/obj/effect/effect/foam/Crossed(var/atom/movable/AM)
if(metal)
return
if(istype(AM, /mob/living))
var/mob/living/M = AM
M.slip("the foam",6)
/datum/effect/effect/system/foam_spread
var/amount = 5 // the size of the foam spread.
var/list/carried_reagents // the IDs of reagents present when the foam was mixed
var/metal = 0 // 0=foam, 1=metalfoam, 2=ironfoam
set_up(amt=5, loca, var/datum/reagents/carry = null, var/metalfoam = 0)
amount = round(sqrt(amt / 3), 1)
if(istype(loca, /turf/))
location = loca
else
location = get_turf(loca)
carried_reagents = list()
metal = metalfoam
// bit of a hack here. Foam carries along any reagent also present in the glass it is mixed
// with (defaults to water if none is present). Rather than actually transfer the reagents,
// this makes a list of the reagent ids and spawns 1 unit of that reagent when the foam disolves.
if(carry && !metal)
for(var/datum/reagent/R in carry.reagent_list)
carried_reagents += R.id
start()
spawn(0)
var/obj/effect/effect/foam/F = locate() in location
if(F)
F.amount += amount
return
F = PoolOrNew(/obj/effect/effect/foam, list(src.location, metal))
F.amount = amount
if(!metal) // don't carry other chemicals if a metal foam
F.create_reagents(10)
if(carried_reagents)
for(var/id in carried_reagents)
F.reagents.add_reagent(id, 1, null, 1) //makes a safety call because all reagents should have already reacted anyway
else
F.reagents.add_reagent("water", 1, safety = 1)
// wall formed by metal foams
// dense and opaque, but easy to break
/obj/structure/foamedmetal
icon = 'icons/effects/effects.dmi'
icon_state = "metalfoam"
density = 1
opacity = 1 // changed in New()
anchored = 1
name = "foamed metal"
desc = "A lightweight foamed metal wall."
var/metal = 1 // 1=aluminum, 2=iron
New()
..()
update_nearby_tiles(1)
Destroy()
density = 0
update_nearby_tiles(1)
..()
proc/updateicon()
if(metal == 1)
icon_state = "metalfoam"
else
icon_state = "ironfoam"
ex_act(severity)
qdel(src)
blob_act()
qdel(src)
bullet_act()
if(metal==1 || prob(50))
qdel(src)
attack_hand(var/mob/user)
if ((HULK in user.mutations) || (prob(75 - metal*25)))
user << "\blue You smash through the metal foam wall."
for(var/mob/O in oviewers(user))
if ((O.client && !( O.blinded )))
O << "\red [user] smashes through the foamed metal."
qdel(src)
else
user << "\blue You hit the metal foam but bounce off it."
return
attackby(var/obj/item/I, var/mob/user)
if (istype(I, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = I
G.affecting.loc = src.loc
for(var/mob/O in viewers(src))
if (O.client)
O << "\red [G.assailant] smashes [G.affecting] through the foamed metal wall."
qdel(I)
qdel(src)
return
if(prob(I.force*20 - metal*25))
user << "\blue You smash through the foamed metal with \the [I]."
for(var/mob/O in oviewers(user))
if ((O.client && !( O.blinded )))
O << "\red [user] smashes through the foamed metal."
qdel(src)
else
user << "\blue You hit the metal foam to no effect."
CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
if(air_group) return 0
return !density
/datum/effect/effect/system/reagents_explosion
var/amount // TNT equivalent
var/flashing = 0 // does explosion creates flash effect?

View File

@@ -269,7 +269,7 @@ var/list/global/slot_flags_enumeration = list(
if(!M) return 0
if(!ishuman(M)) return 0
var/mob/living/carbon/human/H = M
var/list/mob_equip = list()
if(H.species.hud && H.species.hud.equip_slots)
@@ -277,22 +277,22 @@ var/list/global/slot_flags_enumeration = list(
if(H.species && !(slot in mob_equip))
return 0
//First check if the item can be equipped to the desired slot.
if("[slot]" in slot_flags_enumeration)
var/req_flags = slot_flags_enumeration["[slot]"]
if(!(req_flags & slot_flags))
return 0
//Next check that the slot is free
if(H.get_equipped_item(slot))
return 0
//Next check if the slot is accessible.
var/mob/_user = disable_warning? null : H
if(!H.slot_is_accessible(slot, src, _user))
return 0
//Lastly, check special rules for the desired slot.
switch(slot)
if(slot_l_ear, slot_r_ear)
@@ -355,7 +355,7 @@ var/list/global/slot_flags_enumeration = list(
/obj/item/proc/mob_can_unequip(mob/M, slot, disable_warning = 0)
if(!slot) return 0
if(!M) return 0
if(!canremove)
return 0
if(!M.slot_is_accessible(slot, src, disable_warning? null : M))
@@ -601,3 +601,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
usr.visible_message("[zoomdevicename ? "[usr] looks up from the [src.name]" : "[usr] lowers the [src.name]"].")
return
/obj/item/proc/pwr_drain()
return 0 // Process Kill

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

@@ -523,10 +523,10 @@ var/global/list/obj/item/device/pda/PDAs = list()
data["feed"] = feed
data["manifest"] = list("__json_cache" = ManifestJSON)
nanoUI = data
// update the ui if it exists, returns null if no ui is passed/found
if(ui)
ui.load_cached_data(ManifestJSON)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
@@ -536,8 +536,6 @@ var/global/list/obj/item/device/pda/PDAs = list()
ui = new(user, src, ui_key, "pda.tmpl", title, 520, 400, state = inventory_state)
// when the ui is first opened this is the data it will use
ui.load_cached_data(ManifestJSON)
ui.set_initial_data(data)
// open the new ui window
ui.open()

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

@@ -27,6 +27,7 @@
/obj/item/device/powersink/Destroy()
processing_objects.Remove(src)
processing_power_items.Remove(src)
..()
/obj/item/device/powersink/attackby(var/obj/item/I, var/mob/user)
@@ -49,6 +50,7 @@
else
if (mode == 2)
processing_objects.Remove(src) // Now the power sink actually stops draining the station's power if you unhook it. --NeoFite
processing_power_items.Remove(src)
anchored = 0
mode = 0
src.visible_message("<span class='notice'>[user] detaches [src] from the cable!</span>")
@@ -71,25 +73,27 @@
mode = 2
icon_state = "powersink1"
processing_objects.Add(src)
processing_power_items.Add(src)
if(2) //This switch option wasn't originally included. It exists now. --NeoFite
src.visible_message("<span class='notice'>[user] deactivates [src]!</span>")
mode = 1
set_light(0)
icon_state = "powersink0"
processing_objects.Remove(src)
processing_power_items.Remove(src)
/obj/item/device/powersink/proc/drain()
/obj/item/device/powersink/pwr_drain()
if(!attached)
return
return 0
if(drained_this_tick)
return
return 1
drained_this_tick = 1
var/drained = 0
if(!PN)
return
return 1
set_light(12)
PN.trigger_warning()
@@ -110,6 +114,7 @@
A.cell.use(drain_val * CELLRATE)
drained += drain_val
power_drained += drained
return 1
/obj/item/device/powersink/process()

View File

@@ -212,6 +212,13 @@
freerange = 1
ks2type = /obj/item/device/encryptionkey/ert
/obj/item/device/radio/headset/ia
name = "internal affair's headset"
desc = "The headset of your worst enemy."
icon_state = "com_headset"
item_state = "headset"
ks2type = /obj/item/device/encryptionkey/heads/hos
/obj/item/device/radio/headset/attackby(obj/item/weapon/W as obj, mob/user as mob)
// ..()
user.set_machine(src)

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