Construction Update

This commit is contained in:
SinTwo
2016-03-22 16:37:45 -04:00
parent fbbfb78dec
commit b356f5cf21
154 changed files with 2223 additions and 926 deletions

View File

@@ -10,6 +10,7 @@
anchored = 1
use_power = 0
idle_power_usage = 5 // 5 Watts for thermostat related circuitry
circuit = /obj/item/weapon/circuitboard/unary_atmos/cooler
var/heatsink_temperature = T20C // The constant temperature reservoir into which the freezer pumps heat. Probably the hull of the station or something.
var/internal_volume = 600 // L
@@ -24,7 +25,6 @@
..()
initialize_directions = dir
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/unary_atmos/cooler(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)

View File

@@ -10,6 +10,7 @@
anchored = 1
use_power = 0
idle_power_usage = 5 //5 Watts for thermostat related circuitry
circuit = /obj/item/weapon/circuitboard/unary_atmos/heater
var/max_temperature = T20C + 680
var/internal_volume = 600 //L
@@ -25,7 +26,6 @@
initialize_directions = dir
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/unary_atmos/heater(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)

View File

@@ -406,7 +406,7 @@ datum/gas_mixture/proc/check_recombustability(list/fuel_objs)
//Get heat transfer coefficients for clothing.
for(var/obj/item/clothing/C in src)
if(l_hand == C || r_hand == C)
if(item_is_in_hands(C))
continue
if( C.max_heat_protection_temperature >= last_temperature )

View File

@@ -94,10 +94,7 @@
if(W == A) // Handle attack_self
W.attack_self(src)
if(hand)
update_inv_l_hand(0)
else
update_inv_r_hand(0)
update_inv_active_hand(0)
return 1
//Atoms on your person

View File

@@ -162,7 +162,7 @@
inv_box.name = "r_hand"
inv_box.icon = ui_style
inv_box.icon_state = "r_hand_inactive"
if(mymob && !mymob.hand) //This being 0 or null means the right hand is in use
if(!target.hand) //This being 0 or null means the right hand is in use
inv_box.icon_state = "r_hand_active"
inv_box.screen_loc = ui_rhand
inv_box.slot_id = slot_r_hand
@@ -177,7 +177,7 @@
inv_box.name = "l_hand"
inv_box.icon = ui_style
inv_box.icon_state = "l_hand_inactive"
if(mymob && mymob.hand) //This being 1 means the left hand is in use
if(target.hand) //This being 1 means the left hand is in use
inv_box.icon_state = "l_hand_active"
inv_box.screen_loc = ui_lhand
inv_box.slot_id = slot_l_hand

View File

@@ -1001,7 +1001,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
containername = "Security barrier crate"
group = "Security"
/datum/supply_packs/securitybarriers
/datum/supply_packs/securityshieldgen
name = "Wall shield Generators"
contains = list(/obj/machinery/shieldwallgen,
/obj/machinery/shieldwallgen,
@@ -1729,7 +1729,8 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/obj/item/device/camera_film,
/obj/item/device/camera_film,
/obj/item/weapon/storage/photo_album,
/obj/item/device/reagent_scanner)
/obj/item/device/reagent_scanner,
/obj/item/device/flashlight/maglight)
cost = 35
containertype = "/obj/structure/closet/crate/secure"
containername = "Forensic equipment"
@@ -1785,7 +1786,8 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/obj/item/clothing/accessory/storage/black_vest,
/obj/item/clothing/head/soft/sec/corp,
/obj/item/clothing/under/rank/security/corp,
/obj/item/weapon/gun/energy/taser)
/obj/item/weapon/gun/energy/taser,
/obj/item/device/flashlight/maglight)
cost = 30
containertype = "/obj/structure/closet/crate/secure"
containername = "Officer equipment"
@@ -1811,7 +1813,8 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/obj/item/weapon/reagent_containers/spray/pepper,
/obj/item/weapon/melee/baton/loaded,
/obj/item/weapon/storage/box/holobadge,
/obj/item/clothing/head/beret/sec/corporate/warden)
/obj/item/clothing/head/beret/sec/corporate/warden,
/obj/item/device/flashlight/maglight)
cost = 45
containertype = "/obj/structure/closet/crate/secure"
containername = "Warden equipment"
@@ -1835,7 +1838,8 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/obj/item/clothing/accessory/holster/waist,
/obj/item/weapon/melee/telebaton,
/obj/item/weapon/shield/riot/tele,
/obj/item/clothing/head/beret/sec/corporate/hos)
/obj/item/clothing/head/beret/sec/corporate/hos,
/obj/item/device/flashlight/maglight)
cost = 65
containertype = "/obj/structure/closet/crate/secure"
containername = "Head of security equipment"

View File

@@ -11,7 +11,7 @@ var/const/AALARM_WIRE_AALARM = 16
/datum/wires/alarm/CanUse(var/mob/living/L)
var/obj/machinery/alarm/A = holder
if(A.wiresexposed && A.buildstage == 2)
if(A.wiresexposed)
return 1
return 0

View File

@@ -599,3 +599,29 @@
icon = 'icons/obj/stock_parts.dmi'
icon_state = "smes_coil"
origin_tech = list(TECH_MATERIAL = 19, TECH_ENGINEERING = 19, TECH_PHORON = 19, TECH_POWER = 19, TECH_BLUESPACE = 19, TECH_BIO = 19, TECH_COMBAT = 19, TECH_MAGNET = 19, TECH_DATA = 19, TECH_ILLEGAL = 19, TECH_ARCANE = 19)
// Additional construction stock parts
/obj/item/weapon/stock_parts/gear
name = "gear"
desc = "A gear used for construction."
icon = 'icons/obj/stock_parts.dmi'
icon_state = "gear"
origin_tech = list(TECH_ENGINEERING = 1)
matter = list(DEFAULT_WALL_MATERIAL = 50)
/obj/item/weapon/stock_parts/motor
name = "motor"
desc = "A motor used for construction."
icon = 'icons/obj/stock_parts.dmi'
icon_state = "motor"
origin_tech = list(TECH_ENGINEERING = 1)
matter = list(DEFAULT_WALL_MATERIAL = 60, "glass" = 10)
/obj/item/weapon/stock_parts/spring
name = "spring"
desc = "A spring used for construction."
icon = 'icons/obj/stock_parts.dmi'
icon_state = "spring"
origin_tech = list(TECH_ENGINEERING = 1)
matter = list(DEFAULT_WALL_MATERIAL = 40)

View File

@@ -76,7 +76,7 @@
P.info = "The nuclear authorization code is: <b>[code]</b>"
P.name = "nuclear bomb code"
if(leader && leader.current)
if(get_turf(P) == get_turf(leader.current) && !(leader.current.l_hand && leader.current.r_hand))
if(get_turf(P) == get_turf(leader.current))
leader.current.put_in_hands(P)
if(!code_owner && leader)

View File

@@ -50,7 +50,6 @@ var/datum/antagonist/renegade/renegades
var/gun_type = pick(spawn_guns)
var/obj/item/gun = new gun_type(get_turf(player))
if(!(player.l_hand && player.r_hand))
player.put_in_hands(gun)

View File

@@ -292,6 +292,8 @@ var/list/mob/living/forced_ambiance_list = new
mob << "<span class='notice'>The sudden appearance of gravity makes you fall to the floor!</span>"
/area/proc/prison_break()
var/obj/machinery/power/apc/theAPC = get_apc()
if(theAPC.operating)
for(var/obj/machinery/power/apc/temp_apc in src)
temp_apc.overload_lighting(70)
for(var/obj/machinery/door/airlock/temp_airlock in src)

View File

@@ -47,6 +47,7 @@
idle_power_usage = 50
active_power_usage = 300
interact_offline = 1
circuit = /obj/item/weapon/circuitboard/clonescanner
var/locked = 0
var/mob/living/carbon/occupant = null
var/obj/item/weapon/reagent_containers/glass/beaker = null
@@ -55,7 +56,6 @@
/obj/machinery/dna_scannernew/New()
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/clonescanner(src)
component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
component_parts += new /obj/item/weapon/stock_parts/micro_laser(src)

View File

@@ -244,7 +244,7 @@
var/mob/living/carbon/human/M = src
if(M.l_hand && M.r_hand) //Make sure our hands aren't full.
if(M.hands_are_full()) //Make sure our hands aren't full.
src << "<span class='warning'>Our hands are full. Drop something first.</span>"
return 0

View File

@@ -68,7 +68,7 @@
..()
/obj/item/weapon/melee/arm_blade/process() //Stolen from ninja swords.
if(!creator || loc != creator || (creator.l_hand != src && creator.r_hand != src))
if(!creator || loc != creator || !creator.item_is_in_hands(src))
// Tidy up a bit.
if(istype(loc,/mob/living))
var/mob/living/carbon/human/host = loc

View File

@@ -54,6 +54,7 @@
var/wiresexposed = 0 // If it's been screwdrivered open.
var/aidisabled = 0
var/shorted = 0
circuit = /obj/item/weapon/circuitboard/airalarm
var/datum/wires/alarm/wires
@@ -61,7 +62,6 @@
var/screen = AALARM_SCREEN_MAIN
var/area_uid
var/area/alarm_area
var/buildstage = 2 //2 is built, 1 is building, 0 is frame.
var/target_temperature = T0C+20
var/regulating_temperature = 0
@@ -105,23 +105,8 @@
wires = null
return ..()
/obj/machinery/alarm/New(var/loc, var/dir, var/building = 0)
/obj/machinery/alarm/New()
..()
if(building)
if(loc)
src.loc = loc
if(dir)
src.set_dir(dir)
buildstage = 0
wiresexposed = 1
pixel_x = (dir & 3)? 0 : (dir == 4 ? -24 : 24)
pixel_y = (dir & 3)? (dir ==1 ? -24 : 24) : 0
update_icon()
return
first_run()
/obj/machinery/alarm/proc/first_run()
@@ -148,7 +133,7 @@
elect_master()
/obj/machinery/alarm/process()
if((stat & (NOPOWER|BROKEN)) || shorted || buildstage != 2)
if((stat & (NOPOWER|BROKEN)) || shorted)
return
var/turf/simulated/location = loc
@@ -605,9 +590,6 @@
data["thresholds"] = thresholds
/obj/machinery/alarm/CanUseTopic(var/mob/user, var/datum/topic_state/state, var/href_list = list())
if(buildstage != 2)
return STATUS_CLOSE
if(aidisabled && isAI(user))
user << "<span class='warning'>AI control for \the [src] interface has been disabled.</span>"
return STATUS_CLOSE
@@ -763,9 +745,6 @@
/obj/machinery/alarm/attackby(obj/item/W as obj, mob/user as mob)
src.add_fingerprint(user)
switch(buildstage)
if(2)
if(istype(W, /obj/item/weapon/screwdriver)) // Opening that Air Alarm up.
//user << "You pop the Air Alarm's maintence panel open."
wiresexposed = !wiresexposed
@@ -777,8 +756,20 @@
user.visible_message("<span class='warning'>[user] has cut the wires inside \the [src]!</span>", "You have cut the wires inside \the [src].")
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
new/obj/item/stack/cable_coil(get_turf(src), 5)
buildstage = 1
update_icon()
var/obj/structure/frame/A = new /obj/structure/frame( src.loc )
var/obj/item/weapon/circuitboard/M = new circuit( A )
A.frame_type = "airalarm"
A.pixel_x = pixel_x
A.pixel_y = pixel_y
A.set_dir(dir)
A.circuit = M
A.anchored = 1
for (var/obj/C in src)
C.forceMove(loc)
A.state = 2
A.icon_state = "airalarm_2"
M.deconstruct(src)
qdel(src)
return
if (istype(W, /obj/item/weapon/card/id) || istype(W, /obj/item/device/pda))// trying to unlock the interface with an ID card
@@ -791,45 +782,6 @@
user << "<span class='notice'>You [ locked ? "lock" : "unlock"] the Air Alarm interface.</span>"
else
user << "<span class='warning'>Access denied.</span>"
return
if(1)
if(istype(W, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = W
if (C.use(5))
user << "<span class='notice'>You wire \the [src].</span>"
buildstage = 2
update_icon()
first_run()
return
else
user << "<span class='warning'>You need 5 pieces of cable to do wire \the [src].</span>"
return
else if(istype(W, /obj/item/weapon/crowbar))
user << "You start prying out the circuit."
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
if(do_after(user,20))
user << "You pry out the circuit!"
var/obj/item/weapon/airalarm_electronics/circuit = new /obj/item/weapon/airalarm_electronics()
circuit.loc = user.loc
buildstage = 0
update_icon()
return
if(0)
if(istype(W, /obj/item/weapon/airalarm_electronics))
user << "You insert the circuit!"
qdel(W)
buildstage = 1
update_icon()
return
else if(istype(W, /obj/item/weapon/wrench))
user << "You remove the fire alarm assembly from the wall!"
new /obj/item/frame/air_alarm(get_turf(user))
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
qdel(src)
return ..()
/obj/machinery/alarm/power_change()
@@ -839,14 +791,10 @@
/obj/machinery/alarm/examine(mob/user)
..(user)
if (buildstage < 2)
user << "It is not wired."
if (buildstage < 1)
user << "The circuit is missing."
/*
AIR ALARM CIRCUIT
Just a object used in constructing air alarms
*/
/obj/item/weapon/airalarm_electronics
name = "air alarm electronics"
icon = 'icons/obj/doors/door_assembly.dmi'
@@ -854,7 +802,7 @@ Just a object used in constructing air alarms
desc = "Looks like a circuit. Probably is."
w_class = 2.0
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
*/
/*
FIRE ALARM
*/
@@ -875,20 +823,13 @@ FIRE ALARM
power_channel = ENVIRON
var/last_process = 0
var/wiresexposed = 0
var/buildstage = 2 // 2 = complete, 1 = no wires, 0 = circuit gone
var/seclevel
circuit = /obj/item/weapon/circuitboard/firealarm
/obj/machinery/firealarm/update_icon()
overlays.Cut()
if(wiresexposed)
switch(buildstage)
if(2)
icon_state="fire_b2"
if(1)
icon_state="fire_b1"
if(0)
icon_state="fire_b0"
set_light(0)
return
@@ -932,14 +873,12 @@ FIRE ALARM
/obj/machinery/firealarm/attackby(obj/item/W as obj, mob/user as mob)
src.add_fingerprint(user)
if (istype(W, /obj/item/weapon/screwdriver) && buildstage == 2)
if (istype(W, /obj/item/weapon/screwdriver))
wiresexposed = !wiresexposed
update_icon()
return
if(wiresexposed)
switch(buildstage)
if(2)
if (istype(W, /obj/item/device/multitool))
src.detecting = !( src.detecting )
if (src.detecting)
@@ -950,37 +889,19 @@ FIRE ALARM
user.visible_message("<span class='notice'>\The [user] has cut the wires inside \the [src]!</span>", "<span class='notice'>You have cut the wires inside \the [src].</span>")
new/obj/item/stack/cable_coil(get_turf(src), 5)
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
buildstage = 1
update_icon()
if(1)
if(istype(W, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = W
if (C.use(5))
user << "<span class='notice'>You wire \the [src].</span>"
buildstage = 2
return
else
user << "<span class='warning'>You need 5 pieces of cable to wire \the [src].</span>"
return
else if(istype(W, /obj/item/weapon/crowbar))
user << "You pry out the circuit!"
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
spawn(20)
var/obj/item/weapon/firealarm_electronics/circuit = new /obj/item/weapon/firealarm_electronics()
circuit.loc = user.loc
buildstage = 0
update_icon()
if(0)
if(istype(W, /obj/item/weapon/firealarm_electronics))
user << "You insert the circuit!"
qdel(W)
buildstage = 1
update_icon()
else if(istype(W, /obj/item/weapon/wrench))
user << "You remove the fire alarm assembly from the wall!"
new /obj/item/frame/fire_alarm(get_turf(user))
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
var/obj/structure/frame/A = new /obj/structure/frame( src.loc )
var/obj/item/weapon/circuitboard/M = new circuit( A )
A.frame_type = "firealarm"
A.pixel_x = pixel_x
A.pixel_y = pixel_y
A.set_dir(dir)
A.circuit = M
A.anchored = 1
for (var/obj/C in src)
C.forceMove(loc)
A.state = 2
A.icon_state = "firealarm_2"
M.deconstruct(src)
qdel(src)
return
@@ -1016,9 +937,6 @@ FIRE ALARM
if(user.stat || stat & (NOPOWER|BROKEN))
return
if (buildstage != 2)
return
user.set_machine(src)
var/area/A = src.loc
var/d1
@@ -1061,9 +979,6 @@ FIRE ALARM
if (usr.stat || stat & (BROKEN|NOPOWER))
return
if (buildstage != 2)
return
if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
usr.set_machine(src)
if (href_list["reset"])
@@ -1106,23 +1021,6 @@ FIRE ALARM
//playsound(src.loc, 'sound/ambience/signal.ogg', 75, 0)
return
/obj/machinery/firealarm/New(loc, dir, building)
..()
if(loc)
src.loc = loc
if(dir)
src.set_dir(dir)
if(building)
buildstage = 0
wiresexposed = 1
pixel_x = (dir & 3)? 0 : (dir == 4 ? -24 : 24)
pixel_y = (dir & 3)? (dir ==1 ? -24 : 24) : 0
/obj/machinery/firealarm/proc/set_security_level(var/newlevel)
if(seclevel != newlevel)
seclevel = newlevel
@@ -1135,7 +1033,7 @@ FIRE ALARM
/*
FIRE ALARM CIRCUIT
Just a object used in constructing fire alarms
*/
/obj/item/weapon/firealarm_electronics
name = "fire alarm electronics"
icon = 'icons/obj/doors/door_assembly.dmi'
@@ -1143,7 +1041,7 @@ Just a object used in constructing fire alarms
desc = "A circuit. It has a label on it, it says \"Can handle heat levels up to 40 degrees celsius!\""
w_class = 2.0
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
*/
/obj/machinery/partyalarm
name = "\improper PARTY BUTTON"
desc = "Cuban Pete is in the house!"

View File

@@ -7,7 +7,7 @@
use_power = 1
idle_power_usage = 10
active_power_usage = 2000
circuit = /obj/item/weapon/circuitboard/autolathe
var/list/machine_recipes
var/list/stored_material = list(DEFAULT_WALL_MATERIAL = 0, "glass" = 0)
var/list/storage_capacity = list(DEFAULT_WALL_MATERIAL = 0, "glass" = 0)
@@ -30,7 +30,6 @@
wires = new(src)
//Create parts for lathe.
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/autolathe(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)

View File

@@ -158,12 +158,12 @@
/datum/autolathe/recipe/airalarm
name = "air alarm electronics"
path = /obj/item/weapon/airalarm_electronics
path = /obj/item/weapon/circuitboard/airalarm
category = "Engineering"
/datum/autolathe/recipe/firealarm
name = "fire alarm electronics"
path = /obj/item/weapon/firealarm_electronics
path = /obj/item/weapon/circuitboard/firealarm
category = "Engineering"
/datum/autolathe/recipe/powermodule
@@ -171,6 +171,96 @@
path = /obj/item/weapon/module/power_control
category = "Engineering"
/datum/autolathe/recipe/statusdisplay
name = "status display electronics"
path = /obj/item/weapon/circuitboard/status_display
category = "Engineering"
/datum/autolathe/recipe/aistatusdisplay
name = "ai status display electronics"
path = /obj/item/weapon/circuitboard/ai_status_display
category = "Engineering"
/datum/autolathe/recipe/newscaster
name = "newscaster electronics"
path = /obj/item/weapon/circuitboard/newscaster
category = "Engineering"
/datum/autolathe/recipe/atm
name = "atm electronics"
path = /obj/item/weapon/circuitboard/atm
category = "Engineering"
/datum/autolathe/recipe/intercom
name = "intercom electronics"
path = /obj/item/weapon/circuitboard/intercom
category = "Engineering"
/datum/autolathe/recipe/holopad
name = "holopad electronics"
path = /obj/item/weapon/circuitboard/holopad
category = "Engineering"
/datum/autolathe/recipe/guestpass
name = "guestpass console electronics"
path = /obj/item/weapon/circuitboard/guestpass
category = "Engineering"
/datum/autolathe/recipe/entertainment
name = "entertainment camera electronics"
path = /obj/item/weapon/circuitboard/security/telescreen/entertainment
category = "Engineering"
/datum/autolathe/recipe/keycard
name = "keycard authenticator electronics"
path = /obj/item/weapon/circuitboard/keycard_auth
category = "Engineering"
/datum/autolathe/recipe/photocopier
name = "photocopier electronics"
path = /obj/item/weapon/circuitboard/photocopier
category = "Engineering"
/datum/autolathe/recipe/fax
name = "fax machine electronics"
path = /obj/item/weapon/circuitboard/fax
category = "Engineering"
/datum/autolathe/recipe/conveyor
name = "conveyor electronics"
path = /obj/item/weapon/circuitboard/conveyor
category = "Engineering"
/datum/autolathe/recipe/microwave
name = "microwave electronics"
path = /obj/item/weapon/circuitboard/microwave
category = "Engineering"
/datum/autolathe/recipe/vending
name = "vending machine electronics"
path = /obj/item/weapon/circuitboard/vending
category = "Engineering"
/datum/autolathe/recipe/washing
name = "washing machine electronics"
path = /obj/item/weapon/circuitboard/washing
category = "Engineering"
/datum/autolathe/recipe/motor
name = "motor"
path = /obj/item/weapon/stock_parts/motor
category = "Engineering"
/datum/autolathe/recipe/gear
name = "gear"
path = /obj/item/weapon/stock_parts/gear
category = "Engineering"
/datum/autolathe/recipe/spring
name = "spring"
path = /obj/item/weapon/stock_parts/spring
category = "Engineering"
/datum/autolathe/recipe/rcd_ammo
name = "matter cartridge"
path = /obj/item/weapon/rcd_ammo

View File

@@ -5,6 +5,7 @@
icon_state = "biogen-stand"
density = 1
anchored = 1
circuit = /obj/item/weapon/circuitboard/biogenerator
use_power = 1
idle_power_usage = 40
var/processing = 0
@@ -23,7 +24,6 @@
beaker = new /obj/item/weapon/reagent_containers/glass/bottle(src)
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/biogenerator(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)

View File

@@ -30,6 +30,7 @@
desc = "An electronically-lockable pod for growing organic tissue."
density = 1
anchored = 1
circuit = /obj/item/weapon/circuitboard/clonepod
icon = 'icons/obj/cloning.dmi'
icon_state = "pod_0"
req_access = list(access_genetics) //For premature unlocking.
@@ -47,7 +48,6 @@
/obj/machinery/clonepod/New()
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/clonepod(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)

View File

@@ -215,7 +215,8 @@
icon_screen = "entertainment"
light_color = "#FFEEDB"
light_range_on = 2
circuit = null
network = list(NETWORK_THUNDER)
circuit = /obj/item/weapon/circuitboard/security/telescreen/entertainment
/obj/machinery/computer/security/wooden_tv
name = "security camera monitor"
desc = "An old TV hooked into the stations camera network."

View File

@@ -7,7 +7,7 @@
use_power = 1
idle_power_usage = 300
active_power_usage = 300
var/circuit = null //The path to the circuit board type. If circuit==null, the computer can't be disassembled.
frame_type = "computer"
var/processing = 0
var/icon_keyboard = "generic_key"
@@ -98,23 +98,28 @@
/obj/machinery/computer/attackby(I as obj, user as mob)
if(istype(I, /obj/item/weapon/screwdriver) && circuit)
user << "<span class='notice'>You start disconnecting the monitor.</span>"
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
if(do_after(user, 20))
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
var/obj/structure/frame/A = new /obj/structure/frame( src.loc )
var/obj/item/weapon/circuitboard/M = new circuit( A )
A.circuit = M
A.anchored = 1
A.density = 1
A.frame_type = M.board_type
for (var/obj/C in src)
C.loc = src.loc
C.forceMove(loc)
if (src.stat & BROKEN)
user << "<span class='notice'>The broken glass falls out.</span>"
new /obj/item/weapon/material/shard( src.loc )
A.state = 3
A.icon_state = "3"
A.icon_state = "[A.frame_type]_3"
else
user << "<span class='notice'>You disconnect the monitor.</span>"
A.state = 4
A.icon_state = "4"
A.icon_state = "[A.frame_type]_4"
A.pixel_x = pixel_x
A.pixel_y = pixel_y
M.deconstruct(src)
qdel(src)
else

View File

@@ -46,6 +46,7 @@
icon_keyboard = null
icon_screen = "pass"
density = 0
circuit = /obj/item/weapon/circuitboard/guestpass
var/obj/item/weapon/card/id/giver
var/list/accesses = list()
@@ -60,11 +61,30 @@
..()
uid = "[rand(100,999)]-G[rand(10,99)]"
/obj/machinery/computer/guestpass/attackby(obj/O, mob/user)
if(istype(O, /obj/item/weapon/card/id))
if(!giver && user.unEquip(O))
O.loc = src
giver = O
/obj/machinery/computer/guestpass/attackby(obj/I, mob/user)
if(istype(I, /obj/item/weapon/screwdriver) && circuit)
user << "<span class='notice'>You start disconnecting the monitor.</span>"
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
if(do_after(user, 20))
var/obj/structure/frame/A = new /obj/structure/frame( src.loc )
var/obj/item/weapon/circuitboard/M = new circuit( A )
A.frame_type = "guestpass"
A.pixel_x = pixel_x
A.pixel_y = pixel_y
A.circuit = M
A.anchored = 1
for (var/obj/C in src)
C.forceMove(loc)
user << "<span class='notice'>You disconnect the monitor.</span>"
A.state = 4
A.icon_state = "guestpass_4"
M.deconstruct(src)
qdel(src)
return
if(istype(I, /obj/item/weapon/card/id))
if(!giver && user.unEquip(I))
I.loc = src
giver = I
updateUsrDialog()
else if(giver)
user << "<span class='warning'>There is already ID card inside.</span>"

View File

@@ -26,32 +26,6 @@ var/prison_shuttle_timeleft = 0
attack_ai(var/mob/user as mob)
return src.attack_hand(user)
attackby(I as obj, user as mob)
if(istype(I, /obj/item/weapon/screwdriver))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
if(do_after(user, 20))
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
var/obj/item/weapon/circuitboard/prison_shuttle/M = new /obj/item/weapon/circuitboard/prison_shuttle( A )
for (var/obj/C in src)
C.loc = src.loc
A.circuit = M
A.anchored = 1
if (src.stat & BROKEN)
user << "<span class='notice'>The broken glass falls out.</span>"
new /obj/item/weapon/material/shard( src.loc )
A.state = 3
A.icon_state = "3"
else
user << "<span class='notice'>You disconnect the monitor.</span>"
A.state = 4
A.icon_state = "4"
qdel(src)
else
return src.attack_hand(user)
attack_hand(var/mob/user as mob)
if(!src.allowed(user) && (!hacked))
user << "<span class='warning'>Access Denied.</span>"

View File

@@ -29,7 +29,7 @@
// when you had to search the list to find what you had.
// Mostly decorative, holds the OS rom
var/obj/item/part/computer/circuitboard/circuit
var/obj/item/part/computer/circuitboard/circuitb
// Storage
var/obj/item/part/computer/storage/hdd/hdd = null
@@ -97,11 +97,11 @@
overlays += kb
if(!built)
if(!circuit || !istype(circuit))
circuit = new(src)
if(circuit.OS)
os = circuit.OS
circuit.OS.computer = src
if(!circuitb || !istype(circuitb))
circuitb = new(src)
if(circuitb.OS)
os = circuitb.OS
circuitb.OS.computer = src
else
os = null
@@ -121,10 +121,10 @@
floppy.addfile(P)
program = P
else
circuit.OS = P
circuit.OS.computer = src
os = circuit.OS
circuit.name = "Circuitboard ([P])"
circuitb.OS = P
circuitb.OS.computer = src
os = circuitb.OS
circuitb.name = "Circuitboard ([P])"
if(hdd) // Spawn files

View File

@@ -26,7 +26,7 @@
New()
..(built=0)
os = program
circuit.OS = os
circuitb.OS = os
/obj/machinery/computer3/security/mining

View File

@@ -221,7 +221,7 @@
if (stat & BROKEN)
new /obj/item/weapon/circuitboard/broken(src.loc)
else
new/obj/item/weapon/airalarm_electronics(src.loc)
new/obj/item/weapon/circuitboard/airalarm(src.loc)
var/obj/structure/firedoor_assembly/FA = new/obj/structure/firedoor_assembly(src.loc)
FA.anchored = 1

View File

@@ -36,7 +36,7 @@ obj/structure/firedoor_assembly/attackby(C as obj, mob/user as mob)
new/obj/item/stack/cable_coil(src.loc, 1)
wired = 0
else if(istype(C, /obj/item/weapon/airalarm_electronics) && wired)
else if(istype(C, /obj/item/weapon/circuitboard/airalarm) && wired)
if(anchored)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
user.visible_message("<span class='warning'>[user] has inserted a circuit into \the [src]!</span>",

View File

@@ -0,0 +1,412 @@
/obj/structure/frame
anchored = 0
name = "frame"
icon = 'icons/obj/stock_parts.dmi'
icon_state = "machine_0"
var/state = 0
var/obj/item/weapon/circuitboard/circuit = null
var/need_circuit = 1
var/frame_type = "machine"
var/list/components = null
var/list/req_components = null
var/list/req_component_names = null
var/list/alarms = list("firealarm", "airalarm", "intercom", "keycard")
var/list/machines = list("machine", "photocopier", "fax", "microwave", "conveyor", "vending", "recharger", "wrecharger", "washing", "grinder")
var/list/computers = list("computer", "holopad")
var/list/displays = list("display", "guestpass", "newscaster", "atm")
var/list/no_circuit = list("wrecharger", "recharger", "grinder","conveyor")
/obj/structure/frame/proc/update_desc()
var/D
if(req_components)
var/list/component_list = new
for(var/I in req_components)
if(req_components[I] > 0)
component_list += "[num2text(req_components[I])] [req_component_names[I]]"
D = "Requires [english_list(component_list)]."
desc = D
/obj/structure/frame/proc/check_components(mob/user as mob)
components = list()
req_components = circuit.req_components.Copy()
for(var/A in circuit.req_components)
req_components[A] = circuit.req_components[A]
req_component_names = circuit.req_components.Copy()
for(var/A in req_components)
var/cp = text2path(A)
var/obj/ct = new cp() // have to quickly instantiate it get name
req_component_names[A] = ct.name
/obj/structure/frame/New(var/loc, var/dir, var/building = 0, var/obj/item/frame/frame_type, mob/user as mob)
..()
if(building)
src.frame_type = frame_type
icon_state = "[frame_type]_0"
if(frame_type in alarms)
if(loc)
src.loc = loc
state = 0
if(frame_type == "airalarm" || frame_type == "firealarm" || frame_type == "keycard")
if(dir)
src.set_dir(dir)
pixel_x = (dir & 3)? 0 : (dir == 4 ? -24 : 24)
pixel_y = (dir & 3)? (dir == 1 ? -24 : 24) : 0
if(frame_type == "intercom")
if(dir)
src.set_dir(dir)
pixel_x = (dir & 3)? 0 : (dir == 4 ? -28 : 28)
pixel_y = (dir & 3)? (dir == 1 ? -28 : 28) : 0
update_icon()
return
if(frame_type in displays)
if(loc)
src.loc = loc
if(frame_type == "display" || frame_type == "atm")
pixel_x = (dir & 3)? 0 : (dir == 4 ? -32 : 32)
pixel_y = (dir & 3)? (dir == 1 ? -32 : 32) : 0
if(frame_type == "newscaster")
pixel_x = (dir & 3)? 0 : (dir == 4 ? -28 : 28)
pixel_y = (dir & 3)? (dir == 1 ? -30 : 30) : 0
if(frame_type == "guestpass")
pixel_x = (dir & 3)? 0 : (dir == 4 ? -30 : 30)
pixel_y = (dir & 3)? (dir == 1 ? -30 : 30) : 0
update_icon()
return
if(frame_type in no_circuit)
need_circuit = 0
if(frame_type == "wrecharger")
circuit = new /obj/item/weapon/circuitboard/recharger/wrecharger(src)
if(loc)
src.loc = loc
state = 0
pixel_x = (dir & 3)? 0 : (dir == 4 ? -26 : 32)
pixel_y = (dir & 3)? (dir == 1 ? -32 : 32) : 0
update_icon()
return
if(frame_type == "recharger")
circuit = new /obj/item/weapon/circuitboard/recharger(src)
if(frame_type == "grinder")
circuit = new /obj/item/weapon/circuitboard/grinder(src)
if(frame_type == "conveyor")
circuit = new /obj/item/weapon/circuitboard/conveyor(src)
if(dir)
src.set_dir(dir)
if(frame_type == "computer")
density = 1
if(frame_type in machines)
density = 1
return
/obj/structure/frame/attackby(obj/item/P as obj, mob/user as mob)
if(istype(P, /obj/item/weapon/wrench))
if(state == 0)
user << "<span class='notice'>You start to wrench the frame into place.</span>"
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 20))
src.anchored = 1
if(!need_circuit && circuit)
src.state = 2
check_components()
update_desc()
src.icon_state = "[frame_type]_2"
user << "<span class='notice'>You wrench the frame into place and set the outer cover.</span>"
else
src.state = 1
user << "<span class='notice'>You wrench the frame into place.</span>"
return
if(state == 1)
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 20))
user << "<span class='notice'>You unfasten the frame.</span>"
src.anchored = 0
src.state = 0
return
if(istype(P, /obj/item/weapon/weldingtool))
if(state == 0)
var/obj/item/weapon/weldingtool/WT = P
if(!WT.remove_fuel(0, user))
user << "The welding tool must be on to complete this task."
return
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
if(do_after(user, 20))
if(!src || !WT.isOn()) return
user << "<span class='notice'>You deconstruct the frame.</span>"
if(frame_type == "holopad" || frame_type == "microwave")
new /obj/item/stack/material/steel( src.loc, 4 )
else if(frame_type == "fax" || frame_type == "newscaster" || frame_type == "recharger" || frame_type == "wrecharger" || frame_type == "grinder")
new /obj/item/stack/material/steel( src.loc, 3 )
else if(frame_type == "firealarm" || frame_type == "airalarm" || frame_type == "intercom" || frame_type == "guestpass")
new /obj/item/stack/material/steel( src.loc, 2 )
else if(frame_type == "keycard")
new /obj/item/stack/material/steel( src.loc, 1 )
else
new /obj/item/stack/material/steel( src.loc, 5 )
qdel(src)
return
if(istype(P, /obj/item/weapon/circuitboard) && need_circuit && !circuit)
if(state == 1)
var/obj/item/weapon/circuitboard/B = P
if(B.board_type == frame_type)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
user << "<span class='notice'>You place the circuit board inside the frame.</span>"
src.icon_state = "[frame_type]_1"
src.circuit = P
user.drop_item()
P.loc = src
if(frame_type in machines) //because machines are assholes
check_components()
update_desc()
return
else
user << "<span class='warning'>This frame does not accept circuit boards of this type!</span>"
return
if(istype(P, /obj/item/weapon/screwdriver))
if(state == 1)
if(need_circuit && circuit)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
user << "<span class='notice'>You screw the circuit board into place.</span>"
src.state = 2
src.icon_state = "[frame_type]_2"
return
if(state == 2)
if(need_circuit && circuit)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
user << "<span class='notice'>You unfasten the circuit board.</span>"
src.state = 1
src.icon_state = "[frame_type]_1"
return
if(!need_circuit && circuit)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
user << "<span class='notice'>You unfasten the outer cover.</span>"
src.state = 1
src.icon_state = "[frame_type]_0"
return
if(state == 3)
if(frame_type in machines)
var/component_check = 1
for(var/R in req_components)
if(req_components[R] > 0)
component_check = 0
break
if(component_check)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
var/obj/machinery/new_machine = new src.circuit.build_path(src.loc, src.dir)
if(!new_machine.component_parts)
for(var/obj/O in src.components)
O.forceMove(null)
new_machine.RefreshParts()
src.circuit.construct(new_machine)
new_machine.pixel_x = src.pixel_x
new_machine.pixel_y = src.pixel_y
qdel(src)
return
if(frame_type in alarms)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
user << "<span class='notice'>You fasten the cover.</span>"
var/obj/machinery/B = new src.circuit.build_path ( src.loc )
B.pixel_x = src.pixel_x
B.pixel_y = src.pixel_y
B.set_dir(dir)
src.circuit.construct(B)
qdel(src)
return
if(state == 4)
if(frame_type in computers)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
user << "<span class='notice'>You connect the monitor.</span>"
var/obj/machinery/B = new src.circuit.build_path ( src.loc )
B.pixel_x = src.pixel_x
B.pixel_y = src.pixel_y
src.circuit.construct(B)
qdel(src)
return
if(frame_type in displays)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
user << "<span class='notice'>You connect the monitor.</span>"
var/obj/machinery/B = new src.circuit.build_path ( src.loc )
B.pixel_x = src.pixel_x
B.pixel_y = src.pixel_y
src.circuit.construct(B)
qdel(src)
return
if(istype(P, /obj/item/weapon/crowbar))
if(state == 1)
if(need_circuit && circuit)
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
user << "<span class='notice'>You remove the circuit board.</span>"
src.state = 1
src.icon_state = "[frame_type]_0"
circuit.loc = src.loc
src.circuit = null
if(frame_type in machines) //becuase machines are assholes
req_components = null
return
if(state == 3)
if(frame_type in machines)
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
if(components.len == 0)
user << "<span class='notice'>There are no components to remove.</span>"
else
user << "<span class='notice'>You remove the components.</span>"
for(var/obj/item/weapon/W in components)
W.forceMove(loc)
check_components()
update_desc()
user << desc
return
if(state == 4)
if(frame_type in computers)
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
user << "<span class='notice'>You remove the glass panel.</span>"
src.state = 3
src.icon_state = "[frame_type]_3"
new /obj/item/stack/material/glass( src.loc, 2 )
return
if(frame_type in displays)
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
user << "<span class='notice'>You remove the glass panel.</span>"
src.state = 3
src.icon_state = "[frame_type]_3"
new /obj/item/stack/material/glass( src.loc, 2 )
return
if(istype(P, /obj/item/stack/cable_coil))
if(state == 2)
var/obj/item/stack/cable_coil/C = P
if (C.get_amount() < 5)
user << "<span class='warning'>You need five coils of wire to add them to the frame.</span>"
return
user << "<span class='notice'>You start to add cables to the frame.</span>"
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
if(do_after(user, 20) && state == 2)
if (C.use(5))
user << "<span class='notice'>You add cables to the frame.</span>"
state = 3
icon_state = "[frame_type]_3"
if(frame_type in machines)
user << desc
return
if(istype(P, /obj/item/weapon/wirecutters))
if(state == 3)
if(frame_type in computers)
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
user << "<span class='notice'>You remove the cables.</span>"
src.state = 2
src.icon_state = "[frame_type]_2"
new /obj/item/stack/cable_coil( src.loc, 5 )
return
if(frame_type in displays)
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
user << "<span class='notice'>You remove the cables.</span>"
src.state = 2
src.icon_state = "[frame_type]_2"
new /obj/item/stack/cable_coil( src.loc, 5 )
return
if(frame_type in alarms)
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
user << "<span class='notice'>You remove the cables.</span>"
src.state = 2
src.icon_state = "[frame_type]_2"
new /obj/item/stack/cable_coil( src.loc, 5 )
return
if(frame_type in machines)
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
user << "<span class='notice'>You remove the cables.</span>"
src.state = 2
src.icon_state = "[frame_type]_2"
new /obj/item/stack/cable_coil( src.loc, 5 )
return
if(istype(P, /obj/item/stack/material) && P.get_material_name() == "glass")
if(state == 3)
if(frame_type in computers)
var/obj/item/stack/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
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
user << "<span class='notice'>You start to put in the glass panel.</span>"
if(do_after(user, 20) && state == 3)
if (G.use(2))
user << "<span class='notice'>You put in the glass panel.</span>"
src.state = 4
src.icon_state = "[frame_type]_4"
return
if(frame_type in displays)
var/obj/item/stack/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
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
user << "<span class='notice'>You start to put in the glass panel.</span>"
if(do_after(user, 20) && state == 3)
if (G.use(2))
user << "<span class='notice'>You put in the glass panel.</span>"
src.state = 4
src.icon_state = "[frame_type]_4"
return
if(istype(P, /obj/item))
if(state == 3)
if(frame_type in machines)
for(var/I in req_components)
if(istype(P, text2path(I)) && (req_components[I] > 0))
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
if(istype(P, /obj/item/stack))
var/obj/item/stack/CP = P
if(CP.get_amount() > 1)
var/camt = min(CP.amount, req_components[I]) // amount of cable to take, idealy amount required, but limited by amount provided
var/obj/item/stack/CC = new /obj/item/stack(src)
CC.amount = camt
CC.update_icon()
CP.use(camt)
components += CC
req_components[I] -= camt
update_desc()
break
user.drop_item()
P.forceMove(src)
components += P
req_components[I]--
update_desc()
break
user << desc
if(P && P.loc != src && !istype(P, /obj/item/stack/cable_coil) && !istype(P, /obj/item/stack/material))
user << "<span class='warning'>You cannot add that component to the machine!</span>"
return

View File

@@ -36,6 +36,7 @@ var/const/HOLOPAD_MODE = RANGE_BASED
desc = "It's a floor-mounted device for projecting holographic images. It is activated remotely."
icon_state = "holopad0"
show_messages = 1
circuit = /obj/item/weapon/circuitboard/holopad
layer = TURF_LAYER+0.1 //Preventing mice and drones from sneaking under them.
@@ -47,6 +48,30 @@ var/const/HOLOPAD_MODE = RANGE_BASED
var/last_request = 0 //to prevent request spam. ~Carn
var/holo_range = 5 // Change to change how far the AI can move away from the holopad before deactivating.
/obj/machinery/hologram/holopad/attackby(obj/item/I as obj, user as mob)
if(istype(I, /obj/item/weapon/screwdriver) && circuit)
user << "<span class='notice'>You start removing the glass.</span>"
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
if(do_after(user, 20))
var/obj/structure/frame/A = new /obj/structure/frame( src.loc )
var/obj/item/weapon/circuitboard/M = new circuit( A )
A.circuit = M
A.anchored = 1
A.density = 1
A.frame_type = "holopad"
for (var/obj/C in src)
C.forceMove(loc)
user << "<span class='notice'>You remove the glass.</span>"
A.state = 4
A.icon_state = "holopad_4"
M.deconstruct(src)
for (var/mob/living/silicon/ai/master in masters)
clear_holo(master)
qdel(src)
else
src.attack_hand(user)
return
/obj/machinery/hologram/holopad/attack_hand(var/mob/living/carbon/human/user) //Carn: Hologram requests.
if(!istype(user))
return

View File

@@ -62,6 +62,19 @@
user << "You attach \the [W] to \the [src]."
src.update_icon()
return
if(istype(W, /obj/item/weapon/screwdriver))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
user << "<span class='notice'>You start to dismantle the IV drip.</span>"
if(do_after(user, 15))
user << "<span class='notice'>You dismantle the IV drip.</span>"
var/obj/item/stack/rods/A = new /obj/item/stack/rods( src.loc )
A.amount = 6
if(src.beaker)
src.beaker.loc = get_turf(src)
src.beaker = null
qdel(src)
return
else
return ..()

View File

@@ -10,6 +10,7 @@
idle_power_usage = 5
active_power_usage = 100
flags = OPENCONTAINER | NOREACT
circuit = /obj/item/weapon/circuitboard/microwave
var/operating = 0 // Is it on?
var/dirty = 0 // = {0..100} Does it need cleaning?
var/broken = 0 // ={0,1,2} How broken is it???
@@ -29,6 +30,13 @@
..()
reagents = new/datum/reagents(100)
reagents.my_atom = src
component_parts = list()
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
component_parts += new /obj/item/weapon/stock_parts/motor(src)
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
RefreshParts()
if (!available_recipes)
available_recipes = new
for (var/type in (typesof(/datum/recipe)-/datum/recipe))
@@ -82,6 +90,11 @@
else
user << "<span class='warning'>It's broken!</span>"
return 1
else if(default_deconstruction_screwdriver(user, O))
return
else if(default_deconstruction_crowbar(user, O))
return
else if(src.dirty==100) // The microwave is all dirty so can't be used!
if(istype(O, /obj/item/weapon/reagent_containers/spray/cleaner)) // If they're trying to clean it then let them
user.visible_message( \

View File

@@ -7,10 +7,12 @@
icon = 'icons/obj/power.dmi'
icon_state = "light1"
anchored = 1.0
use_power = 1
idle_power_usage = 10
power_channel = LIGHT
var/on = 1
var/area/area = null
var/otherarea = null
// luminosity = 1
/obj/machinery/light_switch/New()
..()
@@ -31,8 +33,12 @@
/obj/machinery/light_switch/proc/updateicon()
if(stat & NOPOWER)
icon_state = "light-p"
set_light(0)
layer = OBJ_LAYER
else
icon_state = "light[on]"
set_light(2, 1.5, on ? "#82FF4C" : "#F86060")
layer = LIGHTING_LAYER+0.1
/obj/machinery/light_switch/examine(mob/user)
if(..(user, 1))

View File

@@ -112,6 +112,8 @@ Class Procs:
var/panel_open = 0
var/global/gl_uid = 1
var/interact_offline = 0 // Can the machine be interacted with while de-powered.
var/circuit = null
var/frame_type = "machine"
/obj/machinery/New(l, d=0)
..(l)
@@ -225,11 +227,6 @@ Class Procs:
istype(usr, /mob/living/silicon)))
usr << "<span class='warning'>You don't have the dexterity to do this!</span>"
return 1
/*
//distance checks are made by atom/proc/DblClick
if ((get_dist(src, user) > 1 || !istype(src.loc, /turf)) && !istype(user, /mob/living/silicon))
return 1
*/
if (ishuman(user))
var/mob/living/carbon/human/H = user
if(H.getBrainLoss() >= 55)
@@ -280,29 +277,13 @@ Class Procs:
return 1
return 0
/obj/machinery/proc/default_deconstruction_crowbar(var/mob/user, var/obj/item/weapon/crowbar/C)
if(!istype(C))
return 0
if(!panel_open)
return 0
. = dismantle()
/obj/machinery/proc/default_deconstruction_screwdriver(var/mob/user, var/obj/item/weapon/screwdriver/S)
if(!istype(S))
return 0
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
panel_open = !panel_open
user << "<span class='notice'>You [panel_open ? "open" : "close"] the maintenance hatch of [src].</span>"
update_icon()
return 1
/obj/machinery/proc/default_part_replacement(var/mob/user, var/obj/item/weapon/storage/part_replacer/R)
if(!istype(R))
return 0
if(!component_parts)
return 0
if(panel_open)
var/obj/item/weapon/circuitboard/CB = locate(/obj/item/weapon/circuitboard) in component_parts
var/obj/item/weapon/circuitboard/CB = circuit
var/P
for(var/obj/item/weapon/stock_parts/A in component_parts)
for(var/D in CB.req_components)
@@ -328,13 +309,45 @@ Class Procs:
user << "<span class='notice'> [C.name]</span>"
return 1
/obj/machinery/proc/default_deconstruction_crowbar(var/mob/user, var/obj/item/weapon/crowbar/C)
if(!istype(C))
return 0
if(!panel_open)
return 0
. = dismantle()
/obj/machinery/proc/default_deconstruction_screwdriver(var/mob/user, var/obj/item/weapon/screwdriver/S)
if(!istype(S))
return 0
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
panel_open = !panel_open
user << "<span class='notice'>You [panel_open ? "open" : "close"] the maintenance hatch of [src].</span>"
update_icon()
return 1
/obj/machinery/proc/dismantle()
playsound(loc, 'sound/items/Crowbar.ogg', 50, 1)
var/obj/machinery/constructable_frame/machine_frame/M = new /obj/machinery/constructable_frame/machine_frame(loc)
M.set_dir(src.dir)
M.state = 2
M.icon_state = "box_1"
for(var/obj/I in component_parts)
I.loc = loc
var/obj/structure/frame/A = new /obj/structure/frame( src.loc )
var/obj/item/weapon/circuitboard/M = new circuit( A )
A.circuit = M
A.anchored = 1
A.density = 1
A.frame_type = M.board_type
if(A.frame_type in A.no_circuit)
A.need_circuit = 0
for (var/obj/D in src)
D.forceMove(loc)
if(A.components)
A.components.Cut()
else
A.components = list()
component_parts = list()
A.icon_state = "[A.frame_type]_3"
A.state = 3
A.pixel_x = pixel_x
A.pixel_y = pixel_y
A.check_components()
A.update_desc()
M.deconstruct(src)
qdel(src)
return 1

View File

@@ -167,7 +167,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
light_range = 0
anchored = 1
var/obj/machinery/exonet_node/node = null
circuit = /obj/item/weapon/circuitboard/newscaster
/obj/machinery/newscaster/security_unit //Security unit
name = "Security Newscaster"
@@ -751,32 +751,34 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
/obj/machinery/newscaster/attackby(obj/item/I as obj, mob/user as mob)
if (src.isbroken)
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 100, 1)
for (var/mob/O in hearers(5, src.loc))
O.show_message("<EM>[user.name]</EM> further abuses the shattered [src.name].")
/obj/machinery/newscaster/attackby(I as obj, user as mob)
if(istype(I, /obj/item/weapon/screwdriver) && circuit)
user << "<span class='notice'>You start disconnecting the monitor.</span>"
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
if(do_after(user, 20))
var/obj/structure/frame/A = new /obj/structure/frame( src.loc )
var/obj/item/weapon/circuitboard/M = new circuit( A )
A.frame_type = "newscaster"
A.pixel_x = pixel_x
A.pixel_y = pixel_y
A.circuit = M
A.anchored = 1
for (var/obj/C in src)
C.forceMove(loc)
if (src.stat & isbroken == 1)
user << "<span class='notice'>The broken glass falls out.</span>"
new /obj/item/weapon/material/shard( src.loc )
A.state = 3
A.icon_state = "newscaster_3"
else
if(istype(I, /obj/item/weapon) )
var/obj/item/weapon/W = I
if(W.force <15)
for (var/mob/O in hearers(5, src.loc))
O.show_message("[user.name] hits the [src.name] with the [W.name] with no visible effect." )
playsound(src.loc, 'sound/effects/Glasshit.ogg', 100, 1)
user << "<span class='notice'>You disconnect the monitor.</span>"
A.state = 4
A.icon_state = "newscaster_4"
M.deconstruct(src)
qdel(src)
else
src.hitstaken++
if(src.hitstaken==3)
for (var/mob/O in hearers(5, src.loc))
O.show_message("[user.name] smashes the [src.name]!" )
src.isbroken=1
playsound(src.loc, 'sound/effects/Glassbr3.ogg', 100, 1)
else
for (var/mob/O in hearers(5, src.loc))
O.show_message("[user.name] forcefully slams the [src.name] with the [I.name]!" )
playsound(src.loc, 'sound/effects/Glasshit.ogg', 100, 1)
else
user << "<FONT COLOR='blue'>This does nothing.</FONT>"
src.update_icon()
src.attack_hand(user)
return
/obj/machinery/newscaster/attack_ai(mob/user as mob)
return src.attack_hand(user) //or maybe it'll have some special functions? No idea.

View File

@@ -14,6 +14,15 @@ obj/machinery/recharger
var/icon_state_charging = "recharger1"
var/icon_state_idle = "recharger0" //also when unpowered
var/portable = 1
circuit = /obj/item/weapon/circuitboard/recharger
frame_type = "recharger"
obj/machinery/recharger/New()
component_parts = list()
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
component_parts += new /obj/item/stack/cable_coil(src, 5)
RefreshParts()
return
obj/machinery/recharger/attackby(obj/item/weapon/G as obj, mob/user as mob)
if(istype(user,/mob/living/silicon))
@@ -52,6 +61,10 @@ obj/machinery/recharger/attackby(obj/item/weapon/G as obj, mob/user as mob)
anchored = !anchored
user << "You [anchored ? "attached" : "detached"] the recharger."
playsound(loc, 'sound/items/Ratchet.ogg', 75, 1)
else if(default_deconstruction_screwdriver(user, G))
return
else if(default_deconstruction_crowbar(user, G))
return
obj/machinery/recharger/attack_hand(mob/user as mob)
if(istype(user,/mob/living/silicon))
@@ -156,3 +169,5 @@ obj/machinery/recharger/wallcharger
icon_state_charging = "wrecharger1"
icon_state_idle = "wrecharger0"
portable = 0
circuit = /obj/item/weapon/circuitboard/recharger/wrecharger
frame_type = "wrecharger"

View File

@@ -5,6 +5,7 @@
icon_state = "borgcharger0"
density = 1
anchored = 1
circuit = /obj/item/weapon/circuitboard/recharge_station
use_power = 1
idle_power_usage = 50
var/mob/occupant = null
@@ -25,7 +26,6 @@
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/recharge_station(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)

View File

@@ -17,6 +17,7 @@
density = 0
use_power = 1
idle_power_usage = 10
circuit = /obj/item/weapon/circuitboard/status_display
var/mode = 1 // 0 = Blank
// 1 = Shuttle timer
// 2 = Arbitrary message(s)
@@ -51,6 +52,29 @@
radio_controller.remove_object(src,frequency)
return ..()
/obj/machinery/status_display/attackby(I as obj, user as mob)
if(istype(I, /obj/item/weapon/screwdriver) && circuit)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
if(do_after(user, 20))
var/obj/structure/frame/A = new /obj/structure/frame( src.loc )
var/obj/item/weapon/circuitboard/M = new circuit( A )
A.frame_type = "display"
A.pixel_x = pixel_x
A.pixel_y = pixel_y
A.circuit = M
A.anchored = 1
for (var/obj/C in src)
C.forceMove(loc)
user << "<span class='notice'>You disconnect the monitor.</span>"
A.state = 4
A.icon_state = "display_4"
M.deconstruct(src)
qdel(src)
else
src.attack_hand(user)
return
// register for radio system
/obj/machinery/status_display/initialize()
..()

View File

@@ -59,6 +59,7 @@ var/list/ai_status_emotions = list(
name = "AI display"
anchored = 1
density = 0
circuit = /obj/item/weapon/circuitboard/ai_status_display
var/mode = 0 // 0 = Blank
// 1 = AI emoticon
@@ -68,6 +69,28 @@ var/list/ai_status_emotions = list(
var/emotion = "Neutral"
/obj/machinery/ai_status_display/attackby(I as obj, user as mob)
if(istype(I, /obj/item/weapon/screwdriver) && circuit)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
if(do_after(user, 20))
var/obj/structure/frame/A = new /obj/structure/frame( src.loc )
var/obj/item/weapon/circuitboard/M = new circuit( A )
A.frame_type = "display"
A.pixel_x = pixel_x
A.pixel_y = pixel_y
A.circuit = M
A.anchored = 1
for (var/obj/C in src)
C.forceMove(loc)
user << "<span class='notice'>You disconnect the monitor.</span>"
A.state = 4
A.icon_state = "display_4"
M.deconstruct(src)
qdel(src)
else
src.attack_hand(user)
return
/obj/machinery/ai_status_display/attack_ai/(mob/user as mob)
var/list/ai_emotions = get_ai_emotions(user.ckey)
var/emote = input("Please, select a status!", "AI Status", null, null) in ai_emotions

View File

@@ -10,6 +10,7 @@
var/screen = 0 // the screen number:
var/list/servers = list() // the servers located by the computer
var/obj/machinery/telecomms/server/SelectedServer
circuit = /obj/item/weapon/circuitboard/comm_server
var/network = "NULL" // the network to probe
var/temp = "" // temporary feedback messages
@@ -188,36 +189,6 @@
updateUsrDialog()
return
attackby(var/obj/item/weapon/D as obj, var/mob/user as mob)
if(istype(D, /obj/item/weapon/screwdriver))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
if(do_after(user, 20))
if (src.stat & BROKEN)
user << "<span class='notice'>The broken glass falls out.</span>"
var/obj/structure/computerframe/A = new /obj/structure/computerframe( 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
A.circuit = M
A.state = 3
A.icon_state = "3"
A.anchored = 1
qdel(src)
else
user << "<span class='notice'>You disconnect the monitor.</span>"
var/obj/structure/computerframe/A = new /obj/structure/computerframe( 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
A.circuit = M
A.state = 4
A.icon_state = "4"
A.anchored = 1
qdel(src)
src.updateUsrDialog()
return
/obj/machinery/computer/telecomms/server/emag_act(var/remaining_charges, var/mob/user)
if(!emagged)
playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)

View File

@@ -98,8 +98,8 @@
// Drop a circuit board too
C.loc = user.loc
// Create a machine frame and delete the current machine
var/obj/machinery/constructable_frame/machine_frame/F = new
// Create a frame and delete the current machine
var/obj/structure/frame/F = new
F.loc = src.loc
qdel(src)

View File

@@ -14,6 +14,7 @@
var/screen = 0 // the screen number:
var/list/machinelist = list() // the machines located by the computer
var/obj/machinery/telecomms/SelectedMachine
circuit = /obj/item/weapon/circuitboard/comm_monitor
var/network = "NULL" // the network to probe
@@ -123,36 +124,6 @@
updateUsrDialog()
return
attackby(var/obj/item/weapon/D as obj, var/mob/user as mob)
if(istype(D, /obj/item/weapon/screwdriver))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
if(do_after(user, 20))
if (src.stat & BROKEN)
user << "<span class='notice'>The broken glass falls out.</span>"
var/obj/structure/computerframe/A = new /obj/structure/computerframe( 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
A.circuit = M
A.state = 3
A.icon_state = "3"
A.anchored = 1
qdel(src)
else
user << "<span class='notice'>You disconnect the monitor.</span>"
var/obj/structure/computerframe/A = new /obj/structure/computerframe( 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
A.circuit = M
A.state = 4
A.icon_state = "4"
A.anchored = 1
qdel(src)
src.updateUsrDialog()
return
/obj/machinery/computer/telecomms/monitor/emag_act(var/remaining_charges, var/mob/user)
if(!emagged)
playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)

View File

@@ -14,6 +14,7 @@
var/mob/lasteditor
var/list/viewingcode = list()
var/obj/machinery/telecomms/server/SelectedServer
circuit = /obj/item/weapon/circuitboard/comm_traffic
var/network = "NULL" // the network to probe
var/temp = "" // temporary feedback messages
@@ -206,36 +207,6 @@
updateUsrDialog()
return
attackby(var/obj/item/weapon/D as obj, var/mob/user as mob)
if(istype(D, /obj/item/weapon/screwdriver))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
if(do_after(user, 20))
if (src.stat & BROKEN)
user << "<span class='notice'>The broken glass falls out.</span>"
var/obj/structure/computerframe/A = new /obj/structure/computerframe( 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
A.circuit = M
A.state = 3
A.icon_state = "3"
A.anchored = 1
qdel(src)
else
user << "<span class='notice'>You disconnect the monitor.</span>"
var/obj/structure/computerframe/A = new /obj/structure/computerframe( 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
A.circuit = M
A.state = 4
A.icon_state = "4"
A.anchored = 1
qdel(src)
src.updateUsrDialog()
return
/obj/machinery/computer/telecomms/traffic/emag_act(var/remaining_charges, var/mob/user)
if(!emagged)
playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)

View File

@@ -36,6 +36,8 @@
layer = 2.9
anchored = 1
density = 1
circuit = /obj/item/weapon/circuitboard/vending
frame_type = "vending"
var/icon_vend //Icon_state when vending
var/icon_deny //Icon_state when denying access
@@ -94,6 +96,14 @@
/obj/machinery/vending/New()
..()
wires = new(src)
component_parts = list()
component_parts += new /obj/item/weapon/stock_parts/spring(src)
component_parts += new /obj/item/weapon/stock_parts/spring(src)
component_parts += new /obj/item/weapon/stock_parts/motor(src)
component_parts += new /obj/item/weapon/stock_parts/motor(src)
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
component_parts += new /obj/item/stack/material/glass/reinforced(src, 2)
RefreshParts()
spawn(4)
if(src.product_slogans)
src.slogan_list += splittext(src.product_slogans, ";")
@@ -232,6 +242,8 @@
user << "<span class='notice'>You [anchored? "un" : ""]secured \the [src]!</span>"
anchored = !anchored
return
else if(default_deconstruction_crowbar(user, W))
return
else
@@ -922,7 +934,15 @@
icon_state = "engivend"
icon_deny = "engivend-deny"
req_access = list(access_engine_equip)
products = list(/obj/item/clothing/glasses/meson = 2,/obj/item/device/multitool = 4,/obj/item/weapon/airlock_electronics = 10,/obj/item/weapon/module/power_control = 10,/obj/item/weapon/airalarm_electronics = 10,/obj/item/weapon/cell/high = 10)
products = list(/obj/item/clothing/glasses/meson = 2,/obj/item/device/multitool = 4,/obj/item/weapon/cell/high = 10,
/obj/item/weapon/airlock_electronics = 10,/obj/item/weapon/module/power_control = 10,
/obj/item/weapon/circuitboard/airalarm = 10,/obj/item/weapon/circuitboard/firealarm = 10,/obj/item/weapon/circuitboard/status_display = 2,
/obj/item/weapon/circuitboard/ai_status_display = 2,/obj/item/weapon/circuitboard/newscaster = 2,/obj/item/weapon/circuitboard/holopad = 2,
/obj/item/weapon/circuitboard/intercom = 4,/obj/item/weapon/circuitboard/security/telescreen/entertainment = 4,
/obj/item/weapon/circuitboard/atm = 0,/obj/item/weapon/circuitboard/guestpass = 0,/obj/item/weapon/circuitboard/keycard_auth = 0,
/obj/item/weapon/circuitboard/photocopier = 0,/obj/item/weapon/circuitboard/fax = 0,/obj/item/weapon/circuitboard/conveyor = 0,
/obj/item/weapon/circuitboard/microwave = 0,/obj/item/weapon/circuitboard/vending = 0,/obj/item/weapon/circuitboard/washing = 0,
/obj/item/weapon/stock_parts/motor = 0,/obj/item/weapon/stock_parts/spring = 0,/obj/item/weapon/stock_parts/gear = 0)
contraband = list(/obj/item/weapon/cell/potato = 3)
premium = list(/obj/item/weapon/storage/belt/utility = 3)

View File

@@ -1,13 +1,14 @@
/obj/item/frame
name = "frame"
desc = "Used for building machines."
icon = 'icons/obj/monitors.dmi'
icon_state = "fire_bitem"
name = "frame parts"
desc = "Used for building frames."
icon = 'icons/obj/stock_parts.dmi'
icon_state = "frame_bitem"
flags = CONDUCT
var/build_machine_type
var/refund_amt = 2
var/build_machine_type = /obj/structure/frame
var/refund_amt = 5
var/refund_type = /obj/item/stack/material/steel
var/reverse = 0 //if resulting object faces opposite its dir (like light fixtures)
var/frame_type = null
/obj/item/frame/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/wrench))
@@ -16,7 +17,82 @@
return
..()
/obj/item/frame/proc/try_build(turf/on_wall)
/obj/item/frame/attack_self(mob/user as mob)
..()
if(!build_machine_type)
return
var/ndir
if(!frame_type)
var/response = input(usr, "What kind of frame would you like to make?", "Frame type request", null) in list("Computer", "Machine", "Holopad", "Conveyor",
"Photocopier", "Fax", "Microwave", "Vending Machine",
"Recharger", "Washing Machine", "Grinder",
"Cancel")
if(response == "Cancel")
return
frame_type = lowertext(response)
switch(response)
if("Holopad")
new /obj/item/stack/material/steel( usr.loc, 1 ) //holopads are smaller, they only need 4 sheets
if("Conveyor")
ndir = get_dir(src,usr)
if (!(ndir in cardinal))
return
if("Fax")
new /obj/item/stack/material/steel( usr.loc, 2 ) //faxes are smaller, they only need 3 sheets
if("Microwave")
new /obj/item/stack/material/steel( usr.loc, 1 ) //microwaves are smaller, they only need 4 sheets
if("Vending Machine")
frame_type = "vending"
if("Recharger")
new /obj/item/stack/material/steel( usr.loc, 2 ) //rechargers are smaller, they only need 3 sheets
if("Washing Machine")
frame_type = "washing"
if("Grinder")
new /obj/item/stack/material/steel( usr.loc, 2 ) //grinders are smaller, they only need 3 sheets
var/obj/machinery/M = new build_machine_type(get_turf(src.loc), ndir, 1, frame_type)
M.fingerprints = src.fingerprints
M.fingerprintshidden = src.fingerprintshidden
M.fingerprintslast = src.fingerprintslast
qdel(src)
/obj/item/frame/proc/try_build(turf/on_wall, mob/user as mob)
if(!frame_type)
var/response = input(usr, "What kind of frame would you like to make?", "Frame type request", null) in list("Fire Alarm", "Air Alarm", "Display", "Newscaster",
"ATM", "Guest Pass Console", "Intercom", "Keycard Authenticator",
"Wall Charger",
"Cancel")
if(response == "Cancel")
return
frame_type = lowertext(response)
switch(response)
if("Fire Alarm")
frame_type = "firealarm"
new /obj/item/stack/material/steel( usr.loc, 3 ) //fire alarms are smaller, they only need 2 sheets
if("Air Alarm")
frame_type = "airalarm"
new /obj/item/stack/material/steel( usr.loc, 3 ) //air alarms are smaller, they only need 2 sheets
if("Intercom")
new /obj/item/stack/material/steel( usr.loc, 3 ) //intercoms are smaller, they only need 2 sheets
if("Newscaster")
new /obj/item/stack/material/steel( usr.loc, 2 ) //newscasters are smaller, they only need 3 sheets
if("Guest Pass Console")
frame_type = "guestpass"
new /obj/item/stack/material/steel( usr.loc, 3 ) //guestpass consoles are smaller, they only need 2 sheets
if("Keycard Authenticator")
frame_type = "keycard"
new /obj/item/stack/material/steel( usr.loc, 4 ) //keycard authenticators are smaller, they only need 1 sheets
if("Wall Charger")
frame_type = "wrecharger"
new /obj/item/stack/material/steel( usr.loc, 2 ) //wall rechargers are smaller, they only need 3 sheets
if(!build_machine_type)
return
@@ -35,7 +111,7 @@
var/turf/loc = get_turf(usr)
var/area/A = loc.loc
if (!istype(loc, /turf/simulated/floor))
usr << "<span class='danger'>\The [src] Alarm cannot be placed on this spot.</span>"
usr << "<span class='danger'>\The frame cannot be placed on this spot.</span>"
return
if (A.requires_power == 0 || A.name == "Space")
usr << "<span class='danger'>\The [src] Alarm cannot be placed in this area.</span>"
@@ -44,23 +120,12 @@
if(gotwallitem(loc, ndir))
usr << "<span class='danger'>There's already an item on this wall!</span>"
return
var/obj/machinery/M = new build_machine_type(loc, ndir, 1)
var/obj/machinery/M = new build_machine_type(loc, ndir, 1, frame_type)
M.fingerprints = src.fingerprints
M.fingerprintshidden = src.fingerprintshidden
M.fingerprintslast = src.fingerprintslast
qdel(src)
/obj/item/frame/fire_alarm
name = "fire alarm frame"
desc = "Used for building fire alarms."
build_machine_type = /obj/machinery/firealarm
/obj/item/frame/air_alarm
name = "air alarm frame"
desc = "Used for building air alarms."
build_machine_type = /obj/machinery/alarm
/obj/item/frame/light
name = "light fixture frame"
desc = "Used for building lights."
@@ -68,9 +133,48 @@
icon_state = "tube-construct-item"
build_machine_type = /obj/machinery/light_construct
reverse = 1
frame_type = 1
/obj/item/frame/light/small
name = "small light fixture frame"
icon_state = "bulb-construct-item"
refund_amt = 1
build_machine_type = /obj/machinery/light_construct/small
frame_type = 1
/obj/item/frame/extinguisher_cabinet
name = "extinguisher cabinet frame"
desc = "Used for building fire extinguisher cabinets."
icon = 'icons/obj/closet.dmi'
icon_state = "extinguisher_empty"
refund_amt = 4
build_machine_type = /obj/structure/extinguisher_cabinet
frame_type = 1
/obj/item/frame/noticeboard
name = "noticeboard frame"
desc = "Used for building noticeboards."
icon = 'icons/obj/stationobjs.dmi'
icon_state = "nboard00"
refund_amt = 4
refund_type = /obj/item/stack/material/wood
build_machine_type = /obj/structure/noticeboard
frame_type = 1
/obj/item/frame/mirror
name = "mirror frame"
desc = "Used for building mirrors."
icon = 'icons/obj/watercloset.dmi'
icon_state = "mirror_frame"
refund_amt = 1
build_machine_type = /obj/structure/mirror
frame_type = 1
/obj/item/frame/fireaxe_cabinet
name = "fire axe cabinet frame"
desc = "Used for building fire axe cabinets."
icon = 'icons/obj/closet.dmi'
icon_state = "fireaxe0101"
refund_amt = 4
build_machine_type = /obj/structure/closet/fireaxecabinet
frame_type = 1

View File

@@ -4,6 +4,7 @@
icon_state = "wm_10"
density = 1
anchored = 1.0
circuit = /obj/item/weapon/circuitboard/washing
var/state = 1
//1 = empty, open door
//2 = empty, closed door
@@ -13,14 +14,19 @@
//6 = blood, open door
//7 = blood, closed door
//8 = blood, running
var/panel = 0
//0 = closed
//1 = open
var/hacked = 1 //Bleh, screw hacking, let's have it hacked by default.
//0 = not hacked
//1 = hacked
var/gibs_ready = 0
var/obj/crayon
var/list/washing = list()
/obj/machinery/washing_machine/New()
component_parts = list()
component_parts += new /obj/item/weapon/stock_parts/motor(src)
component_parts += new /obj/item/weapon/stock_parts/gear(src)
component_parts += new /obj/item/weapon/stock_parts/gear(src)
RefreshParts()
/obj/machinery/washing_machine/verb/start()
set name = "Start Washing"
@@ -34,25 +40,25 @@
usr << "The washing machine cannot run in this state."
return
if( locate(/mob,contents) )
if( locate(/mob,washing) )
state = 8
else
state = 5
update_icon()
sleep(200)
for(var/atom/A in contents)
for(var/atom/A in washing)
A.clean_blood()
for(var/obj/item/I in contents)
for(var/obj/item/I in washing)
I.decontaminate()
//Tanning!
for(var/obj/item/stack/material/hairlesshide/HH in contents)
for(var/obj/item/stack/material/hairlesshide/HH in washing)
var/obj/item/stack/material/wetleather/WL = new(src)
WL.amount = HH.amount
qdel(HH)
if( locate(/mob,contents) )
if( locate(/mob,washing) )
state = 7
gibs_ready = 1
else
@@ -70,9 +76,14 @@
/obj/machinery/washing_machine/update_icon()
icon_state = "wm_[state][panel]"
icon_state = "wm_[state][panel_open]"
/obj/machinery/washing_machine/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(state == 2 && washing.len < 1)
if(default_deconstruction_screwdriver(user, W))
return
if(default_deconstruction_crowbar(user, W))
return
/*if(istype(W,/obj/item/weapon/screwdriver))
panel = !panel
user << "<span class='notice'>You [panel ? "open" : "close"] the [src]'s maintenance panel</span>"*/
@@ -142,10 +153,11 @@
user << "This item does not fit."
return
if(contents.len < 5)
if(washing.len < 5)
if ( state in list(1, 3) )
user.drop_item()
W.loc = src
washing += W
state = 3
else
user << "<span class='notice'>You can't put the item in right now.</span>"
@@ -161,15 +173,17 @@
state = 2
if(2)
state = 1
for(var/atom/movable/O in contents)
for(var/atom/movable/O in washing)
O.loc = src.loc
washing.Cut()
if(3)
state = 4
if(4)
state = 3
for(var/atom/movable/O in contents)
for(var/atom/movable/O in washing)
O.loc = src.loc
crayon = null
washing.Cut()
state = 1
if(5)
user << "<span class='warning'>The [src] is busy.</span>"
@@ -178,13 +192,13 @@
if(7)
if(gibs_ready)
gibs_ready = 0
if(locate(/mob,contents))
var/mob/M = locate(/mob,contents)
if(locate(/mob,washing))
var/mob/M = locate(/mob,washing)
M.gib()
for(var/atom/movable/O in contents)
for(var/atom/movable/O in washing)
O.loc = src.loc
crayon = null
state = 1
washing.Cut()
update_icon()

View File

@@ -5,6 +5,7 @@
icon_state = "recharge_floor"
density = 0
layer = TURF_LAYER + 0.1
circuit = /obj/item/weapon/circuitboard/mech_recharger
var/obj/mecha/charging = null
var/charge = 45
@@ -14,7 +15,6 @@
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/mech_recharger(src)
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)

View File

@@ -9,6 +9,7 @@
idle_power_usage = 20
active_power_usage = 5000
req_access = list(access_robotics)
circuit = /obj/item/weapon/circuitboard/mechfab
var/speed = 1
var/mat_efficiency = 1
@@ -29,7 +30,6 @@
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/mechfab(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)

View File

@@ -76,13 +76,10 @@
/obj/item/equipped()
..()
var/mob/M = loc
var/mob/living/M = loc
if(!istype(M))
return
if(M.l_hand)
M.l_hand.update_held_icon()
if(M.r_hand)
M.r_hand.update_held_icon()
M.update_held_icons()
/obj/item/Destroy()
if(ismob(loc))
@@ -98,8 +95,8 @@
//Checks if the item is being held by a mob, and if so, updates the held icons
/obj/item/proc/update_held_icon()
if(ismob(src.loc))
var/mob/M = src.loc
if(isliving(src.loc))
var/mob/living/M = src.loc
if(M.l_hand == src)
M.update_inv_l_hand()
else if(M.r_hand == src)
@@ -160,7 +157,7 @@
size = "huge"
return ..(user, distance, "", "It is a [size] item.")
/obj/item/attack_hand(mob/user as mob)
/obj/item/attack_hand(mob/living/user as mob)
if (!user) return
if (hasorgans(user))
var/mob/living/carbon/human/H = user
@@ -399,17 +396,15 @@ var/list/global/slot_flags_enumeration = list(
if((!istype(usr, /mob/living/carbon)) || (istype(usr, /mob/living/carbon/brain)))//Is humanoid, and is not a brain
usr << "<span class='warning'>You can't pick things up!</span>"
return
var/mob/living/carbon/C = usr
if( usr.stat || usr.restrained() )//Is not asleep/dead and is not restrained
usr << "<span class='warning'>You can't pick things up!</span>"
return
if(src.anchored) //Object isn't anchored
usr << "<span class='warning'>You can't pick that up!</span>"
return
if(!usr.hand && usr.r_hand) //Right hand is not full
usr << "<span class='warning'>Your right hand is full.</span>"
return
if(usr.hand && usr.l_hand) //Left hand is not full
usr << "<span class='warning'>Your left hand is full.</span>"
if(C.get_active_hand()) //Hand is not full
usr << "<span class='warning'>Your hand is full.</span>"
return
if(!istype(src.loc, /turf)) //Object is on a turf
usr << "<span class='warning'>You can't pick that up!</span>"

View File

@@ -12,7 +12,7 @@
var/code = 2
/obj/item/device/radio/electropack/attack_hand(mob/user as mob)
/obj/item/device/radio/electropack/attack_hand(mob/living/user as mob)
if(src == user.back)
user << "<span class='notice'>You need help taking this off!</span>"
return

View File

@@ -6,8 +6,10 @@
w_class = 4.0
canhear_range = 2
flags = CONDUCT | NOBLOODY
var/circuit = /obj/item/weapon/circuitboard/intercom
var/number = 0
var/last_tick //used to delay the powercheck
var/wiresexposed = 0
/obj/item/device/radio/intercom/custom
name = "station intercom (Custom)"
@@ -81,6 +83,41 @@
spawn (0)
attack_self(user)
/obj/item/device/radio/intercom/attackby(obj/item/W as obj, mob/user as mob)
src.add_fingerprint(user)
if(istype(W, /obj/item/weapon/screwdriver)) // Opening the intercom up.
wiresexposed = !wiresexposed
user << "The wires have been [wiresexposed ? "exposed" : "unexposed"]"
if(wiresexposed)
if(!on)
icon_state = "intercom-p_open"
else
icon_state = "intercom_open"
else
icon_state = "intercom"
return
if (wiresexposed && istype(W, /obj/item/weapon/wirecutters))
user.visible_message("<span class='warning'>[user] has cut the wires inside \the [src]!</span>", "You have cut the wires inside \the [src].")
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
new/obj/item/stack/cable_coil(get_turf(src), 5)
var/obj/structure/frame/A = new /obj/structure/frame( src.loc )
var/obj/item/weapon/circuitboard/M = new circuit( A )
A.frame_type = "intercom"
A.pixel_x = pixel_x
A.pixel_y = pixel_y
A.circuit = M
A.set_dir(dir)
A.anchored = 1
for (var/obj/C in src)
C.forceMove(loc)
A.state = 2
A.icon_state = "intercom_2"
M.deconstruct(src)
qdel(src)
else
src.attack_hand(user)
return
/obj/item/device/radio/intercom/receive_range(freq, level)
if (!on)
return -1
@@ -110,7 +147,13 @@
on = A.powered(EQUIP) // set "on" to the power status
if(!on)
if(wiresexposed)
icon_state = "intercom-p_open"
else
icon_state = "intercom-p"
else
if(wiresexposed)
icon_state = "intercom_open"
else
icon_state = initial(icon_state)

View File

@@ -209,7 +209,7 @@
amount = 5
max_amount = 5
/obj/item/stack/medical/splint/attack(mob/living/carbon/M as mob, mob/user as mob)
/obj/item/stack/medical/splint/attack(mob/living/carbon/M as mob, mob/living/user as mob)
if(..())
return 1

View File

@@ -160,20 +160,7 @@
P.icon_state = "paper_words"
if(istype(usr,/mob/living/carbon))
// place the item in the usr's hand if possible
if(!usr.r_hand)
P.loc = usr
usr.r_hand = P
P.layer = 20
else if(!usr.l_hand)
P.loc = usr
usr.l_hand = P
P.layer = 20
if (ismob(src.loc))
var/mob/M = src.loc
M.update_inv_l_hand()
M.update_inv_r_hand()
usr.put_in_hands(src)
/obj/item/weapon/autopsy_scanner/attack(mob/living/carbon/human/M as mob, mob/living/carbon/user as mob)
if(!istype(M))

View File

@@ -445,7 +445,6 @@ CIGARETTE PACKETS ARE IN FANCY.DM
/obj/item/weapon/flame/lighter/attack_self(mob/living/user)
if(!base_state)
base_state = icon_state
if(user.r_hand == src || user.l_hand == src)
if(!lit)
lit = 1
icon_state = "[base_state]on"
@@ -457,7 +456,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
user.visible_message("<span class='notice'>After a few attempts, [user] manages to light the [src].</span>")
else
user << "<span class='warning'>You burn yourself while lighting the lighter.</span>"
if (user.l_hand == src)
if (user.get_left_hand() == src)
user.apply_damage(2,BURN,"l_hand")
else
user.apply_damage(2,BURN,"r_hand")
@@ -476,8 +475,6 @@ CIGARETTE PACKETS ARE IN FANCY.DM
set_light(0)
processing_objects.Remove(src)
else
return ..()
return

View File

@@ -29,6 +29,16 @@
network = list("MINE")
req_access = list()
/obj/item/weapon/circuitboard/security/telescreen/entertainment
name = T_BOARD("entertainment camera monitor")
build_path = /obj/machinery/computer/security/telescreen/entertainment
board_type = "display"
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
/obj/item/weapon/circuitboard/security/telescreen/entertainment/New()
..()
network = NETWORK_THUNDER
/obj/item/weapon/circuitboard/security/construct(var/obj/machinery/computer/security/C)
if (..(C))
C.network = network.Copy()

View File

@@ -0,0 +1,253 @@
#ifndef T_BOARD
#error T_BOARD macro is not defined but we need it!
#endif
//Circuitboards for frames (mostly wall based frames). Most of these don't fit into other categories.
//Display
/obj/item/weapon/circuitboard/guestpass
name = T_BOARD("guestpass console")
build_path = /obj/machinery/computer/guestpass
board_type = "guestpass"
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
/obj/item/weapon/circuitboard/status_display
name = T_BOARD("status display")
build_path = /obj/machinery/status_display
board_type = "display"
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
/obj/item/weapon/circuitboard/ai_status_display
name = T_BOARD("ai status display")
build_path = /obj/machinery/ai_status_display
board_type = "display"
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
/obj/item/weapon/circuitboard/newscaster
name = T_BOARD("newscaster")
build_path = /obj/machinery/newscaster
board_type = "newscaster"
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
/obj/item/weapon/circuitboard/atm
name = T_BOARD("atm")
build_path = /obj/machinery/atm
board_type = "atm"
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
//Alarm
/obj/item/weapon/circuitboard/firealarm
name = T_BOARD("fire alarm")
build_path = /obj/machinery/firealarm
board_type = "firealarm"
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
/obj/item/weapon/circuitboard/airalarm
name = T_BOARD("air alarm")
build_path = /obj/machinery/alarm
board_type = "airalarm"
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
/obj/item/weapon/circuitboard/intercom
name = T_BOARD("intercom")
build_path = /obj/item/device/radio/intercom
board_type = "intercom"
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
/obj/item/weapon/circuitboard/keycard_auth
name = T_BOARD("keycard authenticator")
build_path = /obj/machinery/keycard_auth
board_type = "keycard"
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
//Computer
/obj/item/weapon/circuitboard/holopad
name = T_BOARD("holopad")
build_path = /obj/machinery/hologram/holopad
board_type = "holopad"
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
//Machine
/obj/item/weapon/circuitboard/photocopier
name = T_BOARD("photocopier")
build_path = /obj/machinery/photocopier
board_type = "photocopier"
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
req_components = list(
"/obj/item/weapon/stock_parts/scanning_module" = 1,
"/obj/item/weapon/stock_parts/motor" = 1,
"/obj/item/weapon/stock_parts/micro_laser" = 1,
"/obj/item/weapon/stock_parts/matter_bin" = 1)
/obj/item/weapon/circuitboard/fax
name = T_BOARD("fax")
build_path = /obj/machinery/photocopier/faxmachine
board_type = "fax"
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
req_components = list(
"/obj/item/weapon/stock_parts/scanning_module" = 1,
"/obj/item/weapon/stock_parts/motor" = 1,
"/obj/item/weapon/stock_parts/micro_laser" = 1,
"/obj/item/weapon/stock_parts/matter_bin" = 1)
/obj/item/weapon/circuitboard/conveyor
name = T_BOARD("conveyor")
build_path = /obj/machinery/conveyor
board_type = "conveyor"
req_components = list(
"/obj/item/weapon/stock_parts/gear" = 2,
"/obj/item/weapon/stock_parts/motor" = 2,
"/obj/item/stack/cable_coil" = 5)
/obj/item/weapon/circuitboard/microwave
name = T_BOARD("microwave")
build_path = /obj/machinery/microwave
board_type = "microwave"
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
req_components = list(
"/obj/item/weapon/stock_parts/console_screen" = 1,
"/obj/item/weapon/stock_parts/motor" = 1,
"/obj/item/weapon/stock_parts/capacitor" = 1)
/obj/item/weapon/circuitboard/vending
name = T_BOARD("vending")
build_path = /obj/machinery/vending
board_type = "vending"
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
req_components = list(
"/obj/item/weapon/stock_parts/console_screen" = 1,
"/obj/item/weapon/stock_parts/motor" = 2,
"/obj/item/weapon/stock_parts/spring" = 2,
"/obj/item/stack/material/glass/reinforced" = 2)
/obj/item/weapon/circuitboard/recharger
name = T_BOARD("recharger")
build_path = /obj/machinery/recharger
board_type = "recharger"
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
req_components = list(
"/obj/item/weapon/stock_parts/capacitor" = 1,
"/obj/item/stack/cable_coil" = 5)
/obj/item/weapon/circuitboard/recharger/wrecharger
name = T_BOARD("wall recharger")
build_path = /obj/machinery/recharger/wallcharger
board_type = "wrecharger"
/obj/item/weapon/circuitboard/washing
name = T_BOARD("washing machine")
build_path = /obj/machinery/washing_machine
board_type = "washing"
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
req_components = list(
"/obj/item/weapon/stock_parts/motor" = 1,
"/obj/item/weapon/stock_parts/gear" = 2)
/obj/item/weapon/circuitboard/grinder
name = T_BOARD("reagent grinder")
build_path = /obj/machinery/reagentgrinder
board_type = "grinder"
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
req_components = list(
"/obj/item/weapon/stock_parts/motor" = 1,
"/obj/item/weapon/stock_parts/gear" = 1,
"/obj/item/weapon/reagent_containers/glass/beaker/large" = 1)
//for testing - If this is still in when I commit, someone shoot me. --leaving in for now, shouldn't be able to get these on station anyways.
/obj/item/weapon/storage/box/frame_parts
display_contents_with_number = 1
New()
..()
new /obj/item/weapon/circuitboard/guestpass( src )
new /obj/item/weapon/circuitboard/status_display( src )
new /obj/item/weapon/circuitboard/ai_status_display( src )
new /obj/item/weapon/circuitboard/newscaster( src )
new /obj/item/weapon/circuitboard/atm( src )
new /obj/item/weapon/circuitboard/firealarm( src )
new /obj/item/weapon/circuitboard/airalarm( src )
new /obj/item/weapon/circuitboard/intercom( src )
new /obj/item/weapon/circuitboard/keycard_auth( src )
new /obj/item/weapon/circuitboard/holopad( src )
new /obj/item/weapon/circuitboard/photocopier( src )
new /obj/item/weapon/circuitboard/fax( src )
new /obj/item/weapon/circuitboard/microwave( src )
new /obj/item/weapon/circuitboard/vending( src )
new /obj/item/weapon/circuitboard/washing( src )
new /obj/item/weapon/stock_parts/scanning_module( src )
new /obj/item/weapon/stock_parts/motor( src )
new /obj/item/weapon/stock_parts/micro_laser( src )
new /obj/item/weapon/stock_parts/matter_bin( src )
new /obj/item/weapon/stock_parts/gear( src )
new /obj/item/weapon/stock_parts/console_screen( src )
new /obj/item/weapon/stock_parts/capacitor( src )
new /obj/item/weapon/stock_parts/spring( src )
new /obj/item/weapon/stock_parts/scanning_module( src )
new /obj/item/weapon/stock_parts/motor( src )
new /obj/item/weapon/stock_parts/micro_laser( src )
new /obj/item/weapon/stock_parts/matter_bin( src )
new /obj/item/weapon/stock_parts/gear( src )
new /obj/item/weapon/stock_parts/console_screen( src )
new /obj/item/weapon/stock_parts/capacitor( src )
new /obj/item/weapon/stock_parts/spring( src )
new /obj/item/weapon/stock_parts/scanning_module( src )
new /obj/item/weapon/stock_parts/motor( src )
new /obj/item/weapon/stock_parts/micro_laser( src )
new /obj/item/weapon/stock_parts/matter_bin( src )
new /obj/item/weapon/stock_parts/gear( src )
new /obj/item/weapon/stock_parts/console_screen( src )
new /obj/item/weapon/stock_parts/capacitor( src )
new /obj/item/weapon/stock_parts/spring( src )
new /obj/item/weapon/stock_parts/scanning_module( src )
new /obj/item/weapon/stock_parts/motor( src )
new /obj/item/weapon/stock_parts/micro_laser( src )
new /obj/item/weapon/stock_parts/matter_bin( src )
new /obj/item/weapon/stock_parts/gear( src )
new /obj/item/weapon/stock_parts/console_screen( src )
new /obj/item/weapon/stock_parts/capacitor( src )
new /obj/item/weapon/stock_parts/spring( src )
new /obj/item/weapon/stock_parts/scanning_module( src )
new /obj/item/weapon/stock_parts/motor( src )
new /obj/item/weapon/stock_parts/micro_laser( src )
new /obj/item/weapon/stock_parts/matter_bin( src )
new /obj/item/weapon/stock_parts/gear( src )
new /obj/item/weapon/stock_parts/console_screen( src )
new /obj/item/weapon/stock_parts/capacitor( src )
new /obj/item/weapon/stock_parts/spring( src )
new /obj/item/weapon/stock_parts/scanning_module( src )
new /obj/item/weapon/stock_parts/motor( src )
new /obj/item/weapon/stock_parts/micro_laser( src )
new /obj/item/weapon/stock_parts/matter_bin( src )
new /obj/item/weapon/stock_parts/gear( src )
new /obj/item/weapon/stock_parts/console_screen( src )
new /obj/item/weapon/stock_parts/capacitor( src )
new /obj/item/weapon/stock_parts/spring( src )
new /obj/item/weapon/stock_parts/scanning_module( src )
new /obj/item/weapon/stock_parts/motor( src )
new /obj/item/weapon/stock_parts/micro_laser( src )
new /obj/item/weapon/stock_parts/matter_bin( src )
new /obj/item/weapon/stock_parts/gear( src )
new /obj/item/weapon/stock_parts/console_screen( src )
new /obj/item/weapon/stock_parts/capacitor( src )
new /obj/item/weapon/stock_parts/spring( src )
new /obj/item/weapon/stock_parts/scanning_module( src )
new /obj/item/weapon/stock_parts/motor( src )
new /obj/item/weapon/stock_parts/micro_laser( src )
new /obj/item/weapon/stock_parts/matter_bin( src )
new /obj/item/weapon/stock_parts/gear( src )
new /obj/item/weapon/stock_parts/console_screen( src )
new /obj/item/weapon/stock_parts/capacitor( src )
new /obj/item/weapon/stock_parts/spring( src )
new /obj/item/weapon/stock_parts/scanning_module( src )
new /obj/item/weapon/stock_parts/motor( src )
new /obj/item/weapon/stock_parts/micro_laser( src )
new /obj/item/weapon/stock_parts/matter_bin( src )
new /obj/item/weapon/stock_parts/gear( src )
new /obj/item/weapon/stock_parts/console_screen( src )
new /obj/item/weapon/stock_parts/capacitor( src )
new /obj/item/weapon/stock_parts/spring( src )
new /obj/item/stack/cable_coil( src , 5 )
new /obj/item/stack/material/glass/reinforced( src , 2 )

View File

@@ -77,7 +77,5 @@
icon_state = "purplecomb"
item_state = "purplecomb"
/obj/item/weapon/haircomb/attack_self(mob/user)
if(user.r_hand == src || user.l_hand == src)
/obj/item/weapon/haircomb/attack_self(mob/living/user)
user.visible_message(text("<span class='notice'>[] uses [] to comb their hair with incredible style and sophistication. What a [].</span>", user, src, user.gender == FEMALE ? "lady" : "guy"))
return

View File

@@ -39,8 +39,8 @@
return null
var/turf/location = loc
if(istype(location, /mob/))
var/mob/M = location
if(M.l_hand == src || M.r_hand == src)
var/mob/living/M = location
if(M.item_is_in_hands(src))
location = M.loc
if(isturf(location)) //start a fire if possible
location.hotspot_expose(700, 2)

View File

@@ -125,12 +125,12 @@
icon_state = "wrap_paper"
var/amount = 20.0
/obj/item/weapon/wrapping_paper/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/weapon/wrapping_paper/attackby(obj/item/weapon/W as obj, mob/living/user as mob)
..()
if (!( locate(/obj/structure/table, src.loc) ))
user << "<span class='warning'>You MUST put the paper on a table!</span>"
if (W.w_class < 4)
if ((istype(user.l_hand, /obj/item/weapon/wirecutters) || istype(user.r_hand, /obj/item/weapon/wirecutters)))
if (user.get_type_in_hands(/obj/item/weapon/wirecutters))
var/a_used = 2 ** (src.w_class - 1)
if (src.amount < a_used)
user << "<span class='warning'>You need more paper!</span>"

View File

@@ -24,8 +24,8 @@
return
attack_hand(mob/user as mob)
if ((src.case && (user.l_hand == src || user.r_hand == src)))
attack_hand(mob/living/user as mob)
if ((src.case && user.item_is_in_hands(src)))
user.put_in_active_hand(case)
src.case.add_fingerprint(user)

View File

@@ -29,7 +29,7 @@
/obj/item/weapon/material/twohanded/update_held_icon()
var/mob/living/M = loc
if(istype(M) && !issmall(M) && ((M.r_hand == src && !M.l_hand) || (M.l_hand == src && !M.r_hand)))
if(istype(M) && !issmall(M) && M.item_is_in_hands(src) && !M.hands_are_full())
wielded = 1
force = force_wielded
name = "[base_name] (wielded)"

View File

@@ -214,7 +214,7 @@
spawn(1) if(src) qdel(src)
/obj/item/weapon/melee/energy/blade/process()
if(!creator || loc != creator || (creator.l_hand != src && creator.r_hand != src))
if(!creator || loc != creator || !creator.item_is_in_hands(src))
// Tidy up a bit.
if(istype(loc,/mob/living))
var/mob/living/carbon/human/host = loc

View File

@@ -59,7 +59,7 @@
spawn(1) if(src) del(src)
/obj/item/weapon/mop_deploy/process()
if(!creator || loc != creator || (creator.l_hand != src && creator.r_hand != src))
if(!creator || loc != creator || !creator.item_is_in_hands(src))
// Tidy up a bit.
if(istype(loc,/mob/living))
var/mob/living/carbon/human/host = loc

View File

@@ -21,7 +21,7 @@
var/linked
/obj/item/weapon/storage/laundry_basket/attack_hand(mob/user as mob)
/obj/item/weapon/storage/laundry_basket/attack_hand(mob/living/user as mob)
if(ishuman(user))
var/mob/living/carbon/human/H = user
var/obj/item/organ/external/temp = H.get_organ("r_hand")

View File

@@ -173,7 +173,7 @@
user << text("\icon[] [] contains []/[] units of fuel!", src, src.name, get_fuel(),src.max_fuel )
/obj/item/weapon/weldingtool/attackby(obj/item/W as obj, mob/user as mob)
/obj/item/weapon/weldingtool/attackby(obj/item/W as obj, mob/living/user as mob)
if(istype(W,/obj/item/weapon/screwdriver))
if(welding)
user << "<span class='danger'>Stop welding first!</span>"
@@ -222,9 +222,9 @@
//I'm not sure what this does. I assume it has to do with starting fires...
//...but it doesnt check to see if the welder is on or not.
var/turf/location = src.loc
if(istype(location, /mob/))
var/mob/M = location
if(M.l_hand == src || M.r_hand == src)
if(istype(location, /mob/living))
var/mob/living/M = location
if(M.item_is_in_hands(src))
location = get_turf(M)
if (istype(location, /turf))
location.hotspot_expose(700, 5)

View File

@@ -90,11 +90,12 @@
// check for TK users
if (istype(usr, /mob/living/carbon/human))
if(istype(usr.l_hand, /obj/item/tk_grab) || istype(usr.r_hand, /obj/item/tk_grab/))
if(!(usr in nearby))
if(usr.client && usr.machine==src)
var/mob/living/carbon/human/H = usr
if(H.get_type_in_hands(/obj/item/tk_grab))
if(!(H in nearby))
if(H.client && H.machine==src)
is_in_use = 1
src.attack_hand(usr)
src.attack_hand(H)
in_use = is_in_use
/obj/proc/updateDialog()

View File

@@ -297,6 +297,7 @@
new /obj/item/taperoll/police(src)
new /obj/item/weapon/gun/projectile/colt/detective(src)
new /obj/item/clothing/accessory/holster/armpit(src)
new /obj/item/device/flashlight/maglight(src)
return
/obj/structure/closet/secure_closet/detective/update_icon()

View File

@@ -35,6 +35,21 @@
icon_state = "open"
layer = SHOWER_OPEN_LAYER
/obj/structure/curtain/attackby(obj/item/P, mob/user)
if(istype(P, /obj/item/weapon/wirecutters))
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
user << "<span class='notice'>You start to cut the shower curtains.</span>"
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 10))
user << "<span class='notice'>You cut the shower curtains.</span>"
var/obj/item/stack/material/plastic/A = new /obj/item/stack/material/plastic( src.loc )
A.amount = 3
qdel(src)
return
else
src.attack_hand(user)
return
/obj/structure/curtain/black
name = "black curtain"
color = "#222222"

View File

@@ -8,8 +8,18 @@
var/obj/item/weapon/extinguisher/has_extinguisher
var/opened = 0
/obj/structure/extinguisher_cabinet/New()
/obj/structure/extinguisher_cabinet/New(var/loc, var/dir, var/building = 0)
..()
if(building)
if(loc)
src.loc = loc
pixel_x = (dir & 3)? 0 : (dir == 4 ? -27 : 27)
pixel_y = (dir & 3)? (dir ==1 ? -27 : 27) : 0
update_icon()
return
else
has_extinguisher = new/obj/item/weapon/extinguisher(src)
/obj/structure/extinguisher_cabinet/attackby(obj/item/O, mob/user)
@@ -23,12 +33,21 @@
user << "<span class='notice'>You place [O] in [src].</span>"
else
opened = !opened
if(istype(O, /obj/item/weapon/wrench))
if(!has_extinguisher)
user << "<span class='notice'>You start to unwrench the extinguisher cabinet.</span>"
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 15))
user << "<span class='notice'>You unwrench the extinguisher cabinet.</span>"
new /obj/item/frame/extinguisher_cabinet( src.loc )
qdel(src)
return
else
opened = !opened
update_icon()
/obj/structure/extinguisher_cabinet/attack_hand(mob/user)
/obj/structure/extinguisher_cabinet/attack_hand(mob/living/user)
if(isrobot(user))
return
if (ishuman(user))

View File

@@ -213,10 +213,10 @@
..()
/obj/structure/bed/chair/janicart/relaymove(mob/user, direction)
/obj/structure/bed/chair/janicart/relaymove(mob/living/user, direction)
if(user.stat || user.stunned || user.weakened || user.paralysis)
unbuckle_mob()
if(istype(user.l_hand, /obj/item/key) || istype(user.r_hand, /obj/item/key))
if(user.get_type_in_hands(/obj/item/key))
step(src, direction)
update_mob()
else

View File

@@ -8,9 +8,18 @@
anchored = 1
var/shattered = 0
var/list/ui_users = list()
var/glass = 1
/obj/structure/mirror/New(var/loc, var/dir, var/building = 0, mob/user as mob)
if(building)
glass = 0
icon_state = "mirror_frame"
pixel_x = (dir & 3)? 0 : (dir == 4 ? -28 : 28)
pixel_y = (dir & 3)? (dir == 1 ? -30 : 30) : 0
return
/obj/structure/mirror/attack_hand(mob/user as mob)
if(!glass) return
if(shattered) return
if(ishuman(user))
@@ -22,6 +31,7 @@
AC.ui_interact(user)
/obj/structure/mirror/proc/shatter()
if(!glass) return
if(shattered) return
shattered = 1
icon_state = "mirror_broke"
@@ -34,17 +44,56 @@
if(prob(Proj.get_structure_damage() * 2))
if(!shattered)
shatter()
else
else if(glass)
playsound(src, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
..()
/obj/structure/mirror/attackby(obj/item/I as obj, mob/user as mob)
if(shattered)
if(istype(I, /obj/item/weapon/wrench))
if(!glass)
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 20))
user << "<span class='notice'>You unfasten the frame.</span>"
new /obj/item/frame/mirror( src.loc )
qdel(src)
return
if(istype(I, /obj/item/weapon/crowbar))
if(shattered && glass)
user << "<span class='notice'>The broken glass falls out.</span>"
icon_state = "mirror_frame"
glass = !glass
new /obj/item/weapon/material/shard( src.loc )
return
if(!shattered && glass)
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
user << "<span class='notice'>You remove the glass.</span>"
glass = !glass
icon_state = "mirror_frame"
new /obj/item/stack/material/glass( src.loc, 2 )
return
if(istype(I, /obj/item/stack/material/glass))
if(!glass)
var/obj/item/stack/material/glass/G = I
if (G.get_amount() < 2)
user << "<span class='warning'>You need two sheets of glass to add them to the frame.</span>"
return
user << "<span class='notice'>You start to add the glass to the frame.</span>"
if(do_after(user, 20))
if (G.use(2))
shattered = 0
glass = 1
icon_state = "mirror"
user << "<span class='notice'>You add the glass to the frame.</span>"
return
if(shattered && glass)
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
return
if(prob(I.force * 2))
visible_message("<span class='warning'>[user] smashes [src] with [I]!</span>")
if(glass)
shatter()
else
visible_message("<span class='warning'>[user] hits [src] with [I]!</span>")
@@ -53,12 +102,13 @@
/obj/structure/mirror/attack_generic(var/mob/user, var/damage)
user.do_attack_animation(src)
if(shattered)
if(shattered && glass)
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
return 0
if(damage)
user.visible_message("<span class='danger'>[user] smashes [src]!</span>")
if(glass)
shatter()
else
user.visible_message("<span class='danger'>[user] hits [src] and bounces off!</span>")

View File

@@ -7,6 +7,18 @@
anchored = 1
var/notices = 0
/obj/structure/noticeboard/New(var/loc, var/dir, var/building = 0)
..()
if(building)
if(loc)
src.loc = loc
pixel_x = (dir & 3)? 0 : (dir == 4 ? -32 : 32)
pixel_y = (dir & 3)? (dir ==1 ? -27 : 27) : 0
update_icon()
return
/obj/structure/noticeboard/initialize()
for(var/obj/item/I in loc)
if(notices > 4) break
@@ -28,6 +40,14 @@
user << "<span class='notice'>You pin the paper to the noticeboard.</span>"
else
user << "<span class='notice'>You reach to pin your paper to the board but hesitate. You are certain your paper will not be seen among the many others already attached.</span>"
if(istype(O, /obj/item/weapon/wrench))
user << "<span class='notice'>You start to unwrench the noticeboard.</span>"
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 15))
user << "<span class='notice'>You unwrench the noticeboard.</span>"
new /obj/item/frame/noticeboard( src.loc )
qdel(src)
return
/obj/structure/noticeboard/attack_hand(var/mob/user)
examine(user)
@@ -64,15 +84,14 @@
return
var/obj/item/P = locate(href_list["write"])
if((P && P.loc == src)) //ifthe paper's on the board
if(istype(usr.r_hand, /obj/item/weapon/pen)) //and you're holding a pen
add_fingerprint(usr)
P.attackby(usr.r_hand, usr) //then do ittttt
var/mob/living/M = usr
if(istype(M))
var/obj/item/weapon/pen/E = M.get_type_in_hands(/obj/item/weapon/pen)
if(E)
add_fingerprint(M)
P.attackby(E, usr)
else
if(istype(usr.l_hand, /obj/item/weapon/pen)) //check other hand for pen
add_fingerprint(usr)
P.attackby(usr.l_hand, usr)
else
usr << "<span class='notice'>You'll need something to write with!</span>"
M << "<span class='notice'>You'll need something to write with!</span>"
if(href_list["read"])
var/obj/item/weapon/paper/P = locate(href_list["read"])
if((P && P.loc == src))

View File

@@ -90,7 +90,7 @@ FLOOR SAFES
var/mob/living/carbon/human/user = usr
var/canhear = 0
if(istype(user.l_hand, /obj/item/clothing/accessory/stethoscope) || istype(user.r_hand, /obj/item/clothing/accessory/stethoscope))
if(user.get_type_in_hands(/obj/item/clothing/accessory/stethoscope))
canhear = 1
if(href_list["open"])

View File

@@ -358,7 +358,7 @@
if (ishuman(user))
var/mob/living/carbon/human/H = user
var/obj/item/organ/external/temp = H.organs_by_name["r_hand"]
if (user.hand)
if (H.hand)
temp = H.organs_by_name["l_hand"]
if(temp && !temp.is_usable())
user << "<span class='notice'>You try to move your [temp.name], but cannot!</span>"

View File

@@ -55,6 +55,20 @@ var/list/mechtoys = list(
/mob/living/silicon/robot/drone
)
/obj/structure/plasticflaps/attackby(obj/item/P, mob/user)
if(istype(P, /obj/item/weapon/wirecutters))
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
user << "<span class='notice'>You start to cut the plastic flaps.</span>"
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 10))
user << "<span class='notice'>You cut the plastic flaps.</span>"
var/obj/item/stack/material/plastic/A = new /obj/item/stack/material/plastic( src.loc )
A.amount = 4
qdel(src)
return
else
return
/obj/structure/plasticflaps/CanPass(atom/A, turf/T)
if(istype(A) && A.checkpass(PASSGLASS))
return prob(60)

View File

@@ -94,7 +94,7 @@
..()
on_found(mob/finder as mob)
on_found(mob/living/finder as mob)
if(armed)
finder.visible_message("<span class='warning'>[finder] accidentally sets off [src], breaking their fingers.</span>", \
"<span class='warning'>You accidentally trigger [src]!</span>")

View File

@@ -76,7 +76,7 @@
var/turf/location = src.loc
if(istype(location, /mob/))
var/mob/living/carbon/human/M = location
if(M.l_hand == src || M.r_hand == src || M.head == src)
if(M.item_is_in_hands(src) || M.head == src)
location = M.loc
if (istype(location, /turf))

View File

@@ -22,7 +22,7 @@
say_verbs = list("mumbles", "says")
// Clumsy folks can't take the mask off themselves.
/obj/item/clothing/mask/muzzle/attack_hand(mob/user as mob)
/obj/item/clothing/mask/muzzle/attack_hand(mob/living/user as mob)
if(user.wear_mask == src && !user.IsAdvancedToolUser())
return 0
..()

View File

@@ -1,6 +1,6 @@
/obj/item/weapon/rig/attackby(obj/item/W as obj, mob/user as mob)
/obj/item/weapon/rig/attackby(obj/item/W as obj, mob/living/user as mob)
if(!istype(user,/mob/living)) return 0
if(!istype(user)) return 0
if(electrified != 0)
if(shock(user)) //Handles removing charge from the cell, as well. No need to do that here.

View File

@@ -1,6 +1,6 @@
/obj/item/clothing/suit/armor
allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/weapon/gun/projectile,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs)
allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/weapon/gun/projectile,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/device/flashlight/maglight)
body_parts_covered = UPPER_TORSO|LOWER_TORSO
item_flags = THICKMATERIAL
@@ -263,7 +263,7 @@
icon_state = "kvest"
item_state = "kvest"
armor = list(melee = 40, bullet = 30, laser = 30, energy = 10, bomb = 10, bio = 0, rad = 0)
allowed = list(/obj/item/weapon/gun,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs)
allowed = list(/obj/item/weapon/gun,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/device/flashlight/maglight)
body_parts_covered = UPPER_TORSO|LOWER_TORSO
item_flags = THICKMATERIAL

View File

@@ -96,7 +96,7 @@
item_state = "det_suit"
blood_overlay_type = "coat"
body_parts_covered = UPPER_TORSO|ARMS
allowed = list(/obj/item/weapon/tank/emergency_oxygen, /obj/item/device/flashlight,/obj/item/weapon/gun/energy,/obj/item/weapon/gun/projectile,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/storage/fancy/cigarettes,/obj/item/weapon/flame/lighter,/obj/item/device/taperecorder)
allowed = list(/obj/item/weapon/tank/emergency_oxygen, /obj/item/device/flashlight,/obj/item/weapon/gun/energy,/obj/item/weapon/gun/projectile,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/storage/fancy/cigarettes,/obj/item/weapon/flame/lighter,/obj/item/device/taperecorder,/obj/item/device/uv_light)
armor = list(melee = 50, bullet = 10, laser = 25, energy = 10, bomb = 0, bio = 0, rad = 0)
/obj/item/clothing/suit/storage/det_trench/grey
@@ -109,7 +109,7 @@
desc = "A forensics technician jacket."
item_state = "det_suit"
body_parts_covered = UPPER_TORSO|ARMS
allowed = list(/obj/item/weapon/tank/emergency_oxygen, /obj/item/device/flashlight,/obj/item/weapon/gun/energy,/obj/item/weapon/gun/projectile,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/device/taperecorder)
allowed = list(/obj/item/weapon/tank/emergency_oxygen, /obj/item/device/flashlight,/obj/item/weapon/gun/energy,/obj/item/weapon/gun/projectile,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/device/taperecorder,/obj/item/device/uv_light)
armor = list(melee = 10, bullet = 10, laser = 15, energy = 10, bomb = 0, bio = 0, rad = 0)
/obj/item/clothing/suit/storage/forensics/red

View File

@@ -15,7 +15,7 @@
var/mob/living/carbon/human/user = usr
if (!(user.l_hand == src || user.r_hand == src))
if(!user.item_is_in_hands(src))
return //bag must be in your hands to use
if (isturf(I.loc))
@@ -31,10 +31,8 @@
var/obj/item/weapon/storage/U = I.loc
user.client.screen -= I
U.contents.Remove(I)
else if(user.l_hand == I) //in a hand
user.drop_l_hand()
else if(user.r_hand == I) //in a hand
user.drop_r_hand()
else if(user.item_is_in_hands(I))
user.drop_from_inventory(I)
else
return

View File

@@ -22,6 +22,7 @@ log transactions
anchored = 1
use_power = 1
idle_power_usage = 10
circuit = /obj/item/weapon/circuitboard/atm
var/datum/money_account/authenticated_account
var/number_incorrect_tries = 0
var/previous_account_number = 0
@@ -79,6 +80,25 @@ log transactions
return 1
/obj/machinery/atm/attackby(obj/item/I as obj, mob/user as mob)
if(istype(I, /obj/item/weapon/screwdriver) && circuit)
user << "<span class='notice'>You start disconnecting the monitor.</span>"
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
if(do_after(user, 20))
var/obj/structure/frame/A = new /obj/structure/frame( src.loc )
var/obj/item/weapon/circuitboard/M = new circuit( A )
A.frame_type = "atm"
A.pixel_x = pixel_x
A.pixel_y = pixel_y
A.circuit = M
A.anchored = 1
for (var/obj/C in src)
C.forceMove(loc)
user << "<span class='notice'>You disconnect the monitor.</span>"
A.state = 4
A.icon_state = "atm_4"
M.deconstruct(src)
qdel(src)
return
if(istype(I, /obj/item/weapon/card))
if(emagged > 0)
//prevent inserting id into an emagged ATM

View File

@@ -61,7 +61,10 @@
/datum/event/prison_break/tick()
if(activeFor == releaseWhen)
if(areas && areas.len > 0)
var/obj/machinery/power/apc/theAPC = null
for(var/area/A in areas)
theAPC = A.get_apc()
if(theAPC.operating) //If the apc's off, it's a little hard to overload the lights.
for(var/obj/machinery/light/L in A)
L.flicker(10)

View File

@@ -77,12 +77,8 @@
usr << "There are no cards in the deck."
return
var/obj/item/weapon/hand/H
if(user.l_hand && istype(user.l_hand,/obj/item/weapon/hand))
H = user.l_hand
else if(user.r_hand && istype(user.r_hand,/obj/item/weapon/hand))
H = user.r_hand
else
var/obj/item/weapon/hand/H = user.get_type_in_hands(/obj/item/weapon/hand)
if(!H)
H = new(get_turf(src))
user.put_in_hands(H)

View File

@@ -172,7 +172,7 @@
if(seed) seed.thrown_at(src,hit_atom)
..()
/obj/item/weapon/reagent_containers/food/snacks/grown/attackby(var/obj/item/weapon/W, var/mob/user)
/obj/item/weapon/reagent_containers/food/snacks/grown/attackby(var/obj/item/weapon/W, var/mob/living/user)
if(seed)
if(seed.get_trait(TRAIT_PRODUCES_POWER) && istype(W, /obj/item/stack/cable_coil))
@@ -181,7 +181,7 @@
//TODO: generalize this.
user << "<span class='notice'>You add some cable to the [src.name] and slide it inside the battery casing.</span>"
var/obj/item/weapon/cell/potato/pocell = new /obj/item/weapon/cell/potato(get_turf(user))
if(src.loc == user && !(user.l_hand && user.r_hand) && istype(user,/mob/living/carbon/human))
if(src.loc == user && istype(user,/mob/living/carbon/human))
user.put_in_hands(pocell)
pocell.maxcharge = src.potency * 10
pocell.charge = pocell.maxcharge

View File

@@ -150,7 +150,7 @@
var/body_coverage = HEAD|FACE|EYES|UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
for(var/obj/item/clothing/clothes in target)
if(target.l_hand == clothes|| target.r_hand == clothes)
if(target.item_is_in_hands(clothes))
continue
body_coverage &= ~(clothes.body_parts_covered)
@@ -182,7 +182,7 @@
continue
var/body_coverage = HEAD|FACE|EYES|UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
for(var/obj/item/clothing/clothes in M)
if(M.l_hand == clothes || M.r_hand == clothes)
if(M.item_is_in_hands(clothes))
continue
body_coverage &= ~(clothes.body_parts_covered)
if(!body_coverage)

View File

@@ -94,16 +94,10 @@
user << "You load [W] into [src]."
return
if(istype(W,/obj/item/weapon/screwdriver))
open = !open
user << "<span class='notice'>You [open ? "open" : "close"] the maintenance panel.</span>"
if(default_deconstruction_screwdriver(user, W))
return
if(open)
if(istype(W, /obj/item/weapon/crowbar))
dismantle()
if(default_deconstruction_crowbar(user, W))
return
if(istype(W,/obj/item/weapon/disk/botany))
if(loaded_disk)
user << "There is already a data disk loaded."

View File

@@ -34,7 +34,7 @@
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(get_turf(src))
P.name = "paper - [form_title]"
P.info = "[last_data]"
if(istype(user,/mob/living/carbon/human) && !(user.l_hand && user.r_hand))
if(istype(user,/mob/living/carbon/human))
user.put_in_hands(P)
user.visible_message("\The [src] spits out a piece of paper.")
return

View File

@@ -45,7 +45,7 @@
user << "<span class='notice'>You begin dismantling \the [src].</span>"
if(do_after(user,25))
user << "<span class='notice'>You dismantle \the [src].</span>"
new /obj/item/stack/material/wood(get_turf(src), amount = 3)
new /obj/item/stack/material/wood(get_turf(src), 3)
for(var/obj/item/weapon/book/b in contents)
b.loc = (get_turf(src))
qdel(src)

View File

@@ -47,9 +47,11 @@
recipes += new/datum/stack_recipe("cannon frame", /obj/item/weapon/cannonframe, 10, time = 15, one_per_turf = 0, on_floor = 0)
recipes += new/datum/stack_recipe("regular floor tile", /obj/item/stack/tile/floor, 1, 4, 20)
recipes += new/datum/stack_recipe("metal rod", /obj/item/stack/rods, 1, 2, 60)
recipes += new/datum/stack_recipe("computer frame", /obj/structure/computerframe, 5, time = 25, one_per_turf = 1, on_floor = 1)
recipes += new/datum/stack_recipe("frame", /obj/item/frame, 5, time = 25, one_per_turf = 1, on_floor = 1)
recipes += new/datum/stack_recipe("mirror frame", /obj/item/frame/mirror, 1, time = 5, one_per_turf = 0, on_floor = 1)
recipes += new/datum/stack_recipe("fire extinguisher cabinet frame", /obj/item/frame/extinguisher_cabinet, 4, time = 5, one_per_turf = 0, on_floor = 1)
//recipes += new/datum/stack_recipe("fire axe cabinet frame", /obj/item/frame/fireaxe_cabinet, 4, time = 5, one_per_turf = 0, on_floor = 1)
recipes += new/datum/stack_recipe("wall girders", /obj/structure/girder, 2, time = 50, one_per_turf = 1, on_floor = 1)
recipes += new/datum/stack_recipe("machine frame", /obj/machinery/constructable_frame/machine_frame, 5, time = 25, one_per_turf = 1, on_floor = 1)
recipes += new/datum/stack_recipe("turret frame", /obj/machinery/porta_turret_construct, 5, time = 25, one_per_turf = 1, on_floor = 1)
recipes += new/datum/stack_recipe_list("airlock assemblies", list( \
new/datum/stack_recipe("standard airlock assembly", /obj/structure/door_assembly, 4, time = 50, one_per_turf = 1, on_floor = 1), \
@@ -70,13 +72,17 @@
new/datum/stack_recipe("emergency shutter", /obj/structure/firedoor_assembly, 4, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("multi-tile airlock assembly", /obj/structure/door_assembly/multi_tile, 4, time = 50, one_per_turf = 1, on_floor = 1), \
))
recipes += new/datum/stack_recipe("IV drip", /obj/machinery/iv_drip, 4, time = 20, one_per_turf = 1, on_floor = 1)
recipes += new/datum/stack_recipe("conveyor switch", /obj/machinery/conveyor_switch, 2, time = 20, one_per_turf = 1, on_floor = 1)
recipes += new/datum/stack_recipe("grenade casing", /obj/item/weapon/grenade/chem_grenade)
recipes += new/datum/stack_recipe("light fixture frame", /obj/item/frame/light, 2)
recipes += new/datum/stack_recipe("small light fixture frame", /obj/item/frame/light/small, 1)
recipes += new/datum/stack_recipe("apc frame", /obj/item/frame/apc, 2)
recipes += new/datum/stack_recipe("air alarm frame", /obj/item/frame/air_alarm, 2)
recipes += new/datum/stack_recipe("fire alarm frame", /obj/item/frame/fire_alarm, 2)
recipes += new/datum/stack_recipe_list("filing cabinets", list( \
new/datum/stack_recipe("filing cabinet", /obj/structure/filingcabinet, 4, time = 20, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("tall filing cabinet", /obj/structure/filingcabinet/filingcabinet, 4, time = 20, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("chest drawer", /obj/structure/filingcabinet/chestdrawer, 4, time = 20, one_per_turf = 1, on_floor = 1), \
))
/material/plasteel/generate_recipes()
..()
@@ -84,6 +90,7 @@
recipes += new/datum/stack_recipe("Metal crate", /obj/structure/closet/crate, 10, time = 50, one_per_turf = 1)
recipes += new/datum/stack_recipe("knife grip", /obj/item/weapon/material/butterflyhandle, 4, time = 20, one_per_turf = 0, on_floor = 1, supplied_material = "[name]")
recipes += new/datum/stack_recipe("dark floor tile", /obj/item/stack/tile/floor_dark, 1, 4, 20)
recipes += new/datum/stack_recipe("roller bed", /obj/item/roller, 5, time = 30, on_floor = 1)
/material/sandstone/generate_recipes()
..()
@@ -99,6 +106,10 @@
recipes += new/datum/stack_recipe("reagent dispenser cartridge (small)", /obj/item/weapon/reagent_containers/chem_disp_cartridge/small, 1, on_floor=0) // 100u
recipes += new/datum/stack_recipe("white floor tile", /obj/item/stack/tile/floor_white, 1, 4, 20)
recipes += new/datum/stack_recipe("freezer floor tile", /obj/item/stack/tile/floor_freezer, 1, 4, 20)
recipes += new/datum/stack_recipe("shower curtain", /obj/structure/curtain, 4, time = 15, one_per_turf = 1, on_floor = 1)
recipes += new/datum/stack_recipe("plastic flaps", /obj/structure/plasticflaps, 4, time = 25, one_per_turf = 1, on_floor = 1)
recipes += new/datum/stack_recipe("airtight plastic flaps", /obj/structure/plasticflaps/mining, 5, time = 25, one_per_turf = 1, on_floor = 1)
recipes += new/datum/stack_recipe("water-cooler", /obj/structure/reagent_dispensers/water_cooler, 4, time = 1, one_per_turf = 1, on_floor = 1)
/material/wood/generate_recipes()
..()
@@ -110,6 +121,7 @@
recipes += new/datum/stack_recipe("beehive assembly", /obj/item/beehive_assembly, 4)
recipes += new/datum/stack_recipe("beehive frame", /obj/item/honey_frame, 1)
recipes += new/datum/stack_recipe("book shelf", /obj/structure/bookcase, 5, time = 15, one_per_turf = 1, on_floor = 1)
recipes += new/datum/stack_recipe("noticeboard frame", /obj/item/frame/noticeboard, 4, time = 5, one_per_turf = 0, on_floor = 1)
/material/cardboard/generate_recipes()
..()

View File

@@ -128,7 +128,7 @@ var/list/name_to_material
S.add_fingerprint(user)
S.add_to_stacks(user)
/material/proc/build_wired_product(var/mob/user, var/obj/item/stack/used_stack, var/obj/item/stack/target_stack)
/material/proc/build_wired_product(var/mob/living/user, var/obj/item/stack/used_stack, var/obj/item/stack/target_stack)
if(!wire_product)
user << "<span class='warning'>You cannot make anything out of \the [target_stack]</span>"
return
@@ -140,7 +140,6 @@ var/list/name_to_material
target_stack.use(1)
user << "<span class='notice'>You attach wire to the [name].</span>"
var/obj/item/product = new wire_product(get_turf(user))
if(!(user.l_hand && user.r_hand))
user.put_in_hands(product)
// Make sure we have a display name and shard icon even if they aren't explicitly set.

View File

@@ -9,6 +9,7 @@
name = "mining drill head"
desc = "An enormous drill."
icon_state = "mining_drill"
circuit = /obj/item/weapon/circuitboard/miningdrill
var/braces_needed = 2
var/list/supports = list()
var/supported = 0
@@ -43,7 +44,6 @@
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/miningdrill(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
component_parts += new /obj/item/weapon/stock_parts/micro_laser(src)

View File

@@ -172,10 +172,9 @@ var/list/mining_overlay_cache = list()
if(istype(AM,/mob/living/carbon/human))
var/mob/living/carbon/human/H = AM
if((istype(H.l_hand,/obj/item/weapon/pickaxe)) && (!H.hand))
attackby(H.l_hand,H)
else if((istype(H.r_hand,/obj/item/weapon/pickaxe)) && H.hand)
attackby(H.r_hand,H)
var/obj/item/weapon/pickaxe/P = H.get_inactive_hand()
if(istype(P))
src.attackby(P, H)
else if(istype(AM,/mob/living/silicon/robot))
var/mob/living/silicon/robot/R = AM

View File

@@ -1,43 +1,3 @@
//This proc is called whenever someone clicks an inventory ui slot.
/mob/proc/attack_ui(slot)
var/obj/item/W = get_active_hand()
if(istype(W))
equip_to_slot_if_possible(W, slot)
/mob/proc/put_in_any_hand_if_possible(obj/item/W as obj, del_on_fail = 0, disable_warning = 1, redraw_mob = 1)
if(equip_to_slot_if_possible(W, slot_l_hand, del_on_fail, disable_warning, redraw_mob))
return 1
else if(equip_to_slot_if_possible(W, slot_r_hand, del_on_fail, disable_warning, redraw_mob))
return 1
return 0
//This is a SAFE proc. Use this instead of equip_to_slot()!
//set del_on_fail to have it delete W if it fails to equip
//set disable_warning to disable the 'you are unable to equip that' warning.
//unset redraw_mob to prevent the mob from being redrawn at the end.
/mob/proc/equip_to_slot_if_possible(obj/item/W as obj, slot, del_on_fail = 0, disable_warning = 0, redraw_mob = 1)
if(!istype(W)) return 0
if(!W.mob_can_equip(src, slot))
if(del_on_fail)
qdel(W)
else
if(!disable_warning)
src << "\red You are unable to equip that." //Only print if del_on_fail is false
return 0
equip_to_slot(W, slot, redraw_mob) //This proc should not ever fail.
return 1
//This is an UNSAFE proc. It merely handles the actual job of equipping. All the checks on whether you can or can't eqip need to be done before! Use mob_can_equip() for that task.
//In most cases you will want to use equip_to_slot_if_possible()
/mob/proc/equip_to_slot(obj/item/W as obj, slot)
return
//This is just a commonly used configuration for the equip_to_slot_if_possible() proc, used to equip people when the rounds tarts and when events happen and such.
/mob/proc/equip_to_slot_or_del(obj/item/W as obj, slot)
return equip_to_slot_if_possible(W, slot, 1, 1, 0)
//The list of slots by priority. equip_to_appropriate_slot() uses this list. Doesn't matter if a mob type doesn't have a slot.
var/list/slot_equipment_priority = list( \
slot_back,\
@@ -58,6 +18,49 @@ var/list/slot_equipment_priority = list( \
slot_r_store\
)
/mob
var/obj/item/weapon/storage/s_active = null // Even ghosts can/should be able to peek into boxes on the ground
//This proc is called whenever someone clicks an inventory ui slot.
/mob/proc/attack_ui(var/slot)
var/obj/item/W = get_active_hand()
if(istype(W))
equip_to_slot_if_possible(W, slot)
/* Inventory manipulation */
/mob/proc/put_in_any_hand_if_possible(obj/item/W as obj, del_on_fail = 0, disable_warning = 1, redraw_mob = 1)
if(equip_to_slot_if_possible(W, slot_l_hand, del_on_fail, disable_warning, redraw_mob))
return 1
else if(equip_to_slot_if_possible(W, slot_r_hand, del_on_fail, disable_warning, redraw_mob))
return 1
return 0
//This is a SAFE proc. Use this instead of equip_to_slot()!
//set del_on_fail to have it delete W if it fails to equip
//set disable_warning to disable the 'you are unable to equip that' warning.
//unset redraw_mob to prevent the mob from being redrawn at the end.
/mob/proc/equip_to_slot_if_possible(obj/item/W as obj, slot, del_on_fail = 0, disable_warning = 0, redraw_mob = 1)
if(!W.mob_can_equip(src, slot))
if(del_on_fail)
qdel(W)
else
if(!disable_warning)
src << "\red You are unable to equip that." //Only print if del_on_fail is false
return 0
equip_to_slot(W, slot, redraw_mob) //This proc should not ever fail.
return 1
//This is an UNSAFE proc. It merely handles the actual job of equipping. All the checks on whether you can or can't eqip need to be done before! Use mob_can_equip() for that task.
//In most cases you will want to use equip_to_slot_if_possible()
/mob/proc/equip_to_slot(obj/item/W as obj, slot)
return
//This is just a commonly used configuration for the equip_to_slot_if_possible() proc, used to equip people when the rounds tarts and when events happen and such.
/mob/proc/equip_to_slot_or_del(obj/item/W as obj, slot)
return equip_to_slot_if_possible(W, slot, 1, 1, 0)
//Checks if a given slot can be accessed at this time, either to equip or unequip I
/mob/proc/slot_is_accessible(var/slot, var/obj/item/I, mob/user=null)
return 1
@@ -65,8 +68,6 @@ var/list/slot_equipment_priority = list( \
//puts the item "W" into an appropriate slot in a human's inventory
//returns 0 if it cannot, 1 if successful
/mob/proc/equip_to_appropriate_slot(obj/item/W)
if(!istype(W)) return 0
for(var/slot in slot_equipment_priority)
if(equip_to_slot_if_possible(W, slot, del_on_fail=0, disable_warning=1, redraw_mob=1))
return 1
@@ -74,32 +75,15 @@ var/list/slot_equipment_priority = list( \
return 0
/mob/proc/equip_to_storage(obj/item/newitem)
// Try put it in their backpack
if(istype(src.back,/obj/item/weapon/storage))
var/obj/item/weapon/storage/backpack = src.back
if(backpack.contents.len < backpack.storage_slots)
newitem.forceMove(src.back)
return 1
// Try to place it in any item that can store stuff, on the mob.
for(var/obj/item/weapon/storage/S in src.contents)
if (S.contents.len < S.storage_slots)
newitem.forceMove(S)
return 1
return 0
//These procs handle putting s tuff in your hand. It's probably best to use these rather than setting l_hand = ...etc
//as they handle all relevant stuff like adding it to the player's screen and updating their overlays.
/* Hands */
//Returns the thing in our active hand
/mob/proc/get_active_hand()
if(hand) return l_hand
else return r_hand
//Returns the thing in our inactive hand
/mob/proc/get_inactive_hand()
if(hand) return r_hand
else return l_hand
//Puts the item into your l_hand if possible and calls all necessary triggers/updates. returns 1 on success.
/mob/proc/put_in_l_hand(var/obj/item/W)
@@ -150,16 +134,15 @@ var/list/slot_equipment_priority = list( \
//Drops the item in our left hand
/mob/proc/drop_l_hand(var/atom/Target)
return drop_from_inventory(l_hand, Target)
return 0
//Drops the item in our right hand
/mob/proc/drop_r_hand(var/atom/Target)
return drop_from_inventory(r_hand, Target)
return 0
//Drops the item in our active hand. TODO: rename this to drop_active_hand or something
/mob/proc/drop_item(var/atom/Target)
if(hand) return drop_l_hand(Target)
else return drop_r_hand(Target)
return
/*
Removes the object from any slots the mob might have, calling the appropriate icon update proc.
@@ -173,19 +156,6 @@ var/list/slot_equipment_priority = list( \
the search through all the slots, without having to duplicate the rest of the item dropping.
*/
/mob/proc/u_equip(obj/W as obj)
if (W == r_hand)
r_hand = null
update_inv_r_hand(0)
else if (W == l_hand)
l_hand = null
update_inv_l_hand(0)
else if (W == back)
back = null
update_inv_back(0)
else if (W == wear_mask)
wear_mask = null
update_inv_wear_mask(0)
return
/mob/proc/isEquipped(obj/item/I)
if(!I)
@@ -229,11 +199,6 @@ var/list/slot_equipment_priority = list( \
//Returns the item equipped to the specified slot, if any.
/mob/proc/get_equipped_item(var/slot)
switch(slot)
if(slot_l_hand) return l_hand
if(slot_r_hand) return r_hand
if(slot_back) return back
if(slot_wear_mask) return wear_mask
return null
//Outdated but still in use apparently. This should at least be a human proc.

View File

@@ -288,7 +288,7 @@
/* Assembly */
/obj/item/weapon/storage/toolbox/mechanical/attackby(var/obj/item/stack/tile/floor/T, mob/user as mob)
/obj/item/weapon/storage/toolbox/mechanical/attackby(var/obj/item/stack/tile/floor/T, mob/living/user as mob)
if(!istype(T, /obj/item/stack/tile/floor))
..()
return

View File

@@ -2,7 +2,7 @@
var/mob/living/carbon/human/H = over_object
if(!istype(H) || !Adjacent(H))
return ..()
if(H.a_intent == "grab" && hat && !(H.l_hand && H.r_hand))
if(H.a_intent == "grab" && hat && !H.hands_are_full())
hat.loc = get_turf(src)
H.put_in_hands(hat)
H.visible_message("<span class='danger'>\The [H] removes \the [src]'s [hat].</span>")

View File

@@ -3,40 +3,40 @@
set name = "Give"
// TODO : Change to incapacitated() on merge.
if(usr.stat || usr.lying || usr.resting || usr.buckled)
if(src.stat || src.lying || src.resting || src.buckled)
return
if(!istype(target) || target.stat || target.lying || target.resting || target.buckled || target.client == null)
return
var/obj/item/I = usr.get_active_hand()
var/obj/item/I = src.get_active_hand()
if(!I)
I = usr.get_inactive_hand()
I = src.get_inactive_hand()
if(!I)
usr << "<span class='warning'>You don't have anything in your hands to give to \the [target].</span>"
src << "<span class='warning'>You don't have anything in your hands to give to \the [target].</span>"
return
if(alert(target,"[usr] wants to give you \a [I]. Will you accept it?",,"No","Yes") == "No")
target.visible_message("<span class='notice'>\The [usr] tried to hand \the [I] to \the [target], \
if(alert(target,"[src] wants to give you \a [I]. Will you accept it?",,"No","Yes") == "No")
target.visible_message("<span class='notice'>\The [src] tried to hand \the [I] to \the [target], \
but \the [target] didn't want it.</span>")
return
if(!I) return
if(!Adjacent(target))
usr << "<span class='warning'>You need to stay in reaching distance while giving an object.</span>"
target << "<span class='warning'>\The [usr] moved too far away.</span>"
src << "<span class='warning'>You need to stay in reaching distance while giving an object.</span>"
target << "<span class='warning'>\The [src] moved too far away.</span>"
return
if(I.loc != usr || (usr.l_hand != I && usr.r_hand != I))
usr << "<span class='warning'>You need to keep the item in your hands.</span>"
target << "<span class='warning'>\The [usr] seems to have given up on passing \the [I] to you.</span>"
if(I.loc != src || !src.item_is_in_hands(I))
src << "<span class='warning'>You need to keep the item in your hands.</span>"
target << "<span class='warning'>\The [src] seems to have given up on passing \the [I] to you.</span>"
return
if(target.r_hand != null && target.l_hand != null)
if(target.hands_are_full())
target << "<span class='warning'>Your hands are full.</span>"
usr << "<span class='warning'>Their hands are full.</span>"
src << "<span class='warning'>Their hands are full.</span>"
return
if(usr.unEquip(I))
if(src.unEquip(I))
target.put_in_hands(I) // If this fails it will just end up on the floor, but that's fitting for things like dionaea.
target.visible_message("<span class='notice'>\The [usr] handed \the [I] to \the [target].</span>")
target.visible_message("<span class='notice'>\The [src] handed \the [I] to \the [target].</span>")

View File

@@ -538,9 +538,9 @@
if ("handshake")
m_type = 1
if (!src.restrained() && !src.r_hand)
var/mob/M = null
var/mob/living/M = null
if (param)
for (var/mob/A in view(1, null))
for (var/mob/living/A in view(1, null))
if (param == A.name)
M = A
break

View File

@@ -1115,9 +1115,11 @@
spawn(0)
regenerate_icons()
if(vessel.total_volume < species.blood_volume)
vessel.maximum_volume = species.blood_volume
vessel.add_reagent("blood", species.blood_volume - vessel.total_volume)
else if(vessel.total_volume > species.blood_volume)
vessel.remove_reagent("blood", vessel.total_volume - species.blood_volume)
vessel.maximum_volume = species.blood_volume
fixblood()
// Rebuild the HUD. If they aren't logged in then login() should reinstantiate it for them.

View File

@@ -207,7 +207,7 @@
var/covered = 0 // Basic coverage can help.
for(var/obj/item/clothing/clothes in H)
if(H.l_hand == clothes|| H.r_hand == clothes)
if(H.item_is_in_hands(clothes))
continue
if((clothes.body_parts_covered & UPPER_TORSO) && (clothes.body_parts_covered & LOWER_TORSO))
covered = 1

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