mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Construction Update
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
anchored = 1
|
anchored = 1
|
||||||
use_power = 0
|
use_power = 0
|
||||||
idle_power_usage = 5 // 5 Watts for thermostat related circuitry
|
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/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
|
var/internal_volume = 600 // L
|
||||||
@@ -24,7 +25,6 @@
|
|||||||
..()
|
..()
|
||||||
initialize_directions = dir
|
initialize_directions = dir
|
||||||
component_parts = list()
|
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/matter_bin(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/capacitor(src)
|
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
anchored = 1
|
anchored = 1
|
||||||
use_power = 0
|
use_power = 0
|
||||||
idle_power_usage = 5 //5 Watts for thermostat related circuitry
|
idle_power_usage = 5 //5 Watts for thermostat related circuitry
|
||||||
|
circuit = /obj/item/weapon/circuitboard/unary_atmos/heater
|
||||||
|
|
||||||
var/max_temperature = T20C + 680
|
var/max_temperature = T20C + 680
|
||||||
var/internal_volume = 600 //L
|
var/internal_volume = 600 //L
|
||||||
@@ -25,7 +26,6 @@
|
|||||||
initialize_directions = dir
|
initialize_directions = dir
|
||||||
|
|
||||||
component_parts = list()
|
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/matter_bin(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/capacitor(src)
|
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
|
||||||
|
|||||||
@@ -406,7 +406,7 @@ datum/gas_mixture/proc/check_recombustability(list/fuel_objs)
|
|||||||
//Get heat transfer coefficients for clothing.
|
//Get heat transfer coefficients for clothing.
|
||||||
|
|
||||||
for(var/obj/item/clothing/C in src)
|
for(var/obj/item/clothing/C in src)
|
||||||
if(l_hand == C || r_hand == C)
|
if(item_is_in_hands(C))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if( C.max_heat_protection_temperature >= last_temperature )
|
if( C.max_heat_protection_temperature >= last_temperature )
|
||||||
|
|||||||
@@ -94,10 +94,7 @@
|
|||||||
|
|
||||||
if(W == A) // Handle attack_self
|
if(W == A) // Handle attack_self
|
||||||
W.attack_self(src)
|
W.attack_self(src)
|
||||||
if(hand)
|
update_inv_active_hand(0)
|
||||||
update_inv_l_hand(0)
|
|
||||||
else
|
|
||||||
update_inv_r_hand(0)
|
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
//Atoms on your person
|
//Atoms on your person
|
||||||
|
|||||||
@@ -162,7 +162,7 @@
|
|||||||
inv_box.name = "r_hand"
|
inv_box.name = "r_hand"
|
||||||
inv_box.icon = ui_style
|
inv_box.icon = ui_style
|
||||||
inv_box.icon_state = "r_hand_inactive"
|
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.icon_state = "r_hand_active"
|
||||||
inv_box.screen_loc = ui_rhand
|
inv_box.screen_loc = ui_rhand
|
||||||
inv_box.slot_id = slot_r_hand
|
inv_box.slot_id = slot_r_hand
|
||||||
@@ -177,7 +177,7 @@
|
|||||||
inv_box.name = "l_hand"
|
inv_box.name = "l_hand"
|
||||||
inv_box.icon = ui_style
|
inv_box.icon = ui_style
|
||||||
inv_box.icon_state = "l_hand_inactive"
|
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.icon_state = "l_hand_active"
|
||||||
inv_box.screen_loc = ui_lhand
|
inv_box.screen_loc = ui_lhand
|
||||||
inv_box.slot_id = slot_l_hand
|
inv_box.slot_id = slot_l_hand
|
||||||
|
|||||||
@@ -1001,7 +1001,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
|||||||
containername = "Security barrier crate"
|
containername = "Security barrier crate"
|
||||||
group = "Security"
|
group = "Security"
|
||||||
|
|
||||||
/datum/supply_packs/securitybarriers
|
/datum/supply_packs/securityshieldgen
|
||||||
name = "Wall shield Generators"
|
name = "Wall shield Generators"
|
||||||
contains = list(/obj/machinery/shieldwallgen,
|
contains = list(/obj/machinery/shieldwallgen,
|
||||||
/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/device/camera_film,
|
/obj/item/device/camera_film,
|
||||||
/obj/item/weapon/storage/photo_album,
|
/obj/item/weapon/storage/photo_album,
|
||||||
/obj/item/device/reagent_scanner)
|
/obj/item/device/reagent_scanner,
|
||||||
|
/obj/item/device/flashlight/maglight)
|
||||||
cost = 35
|
cost = 35
|
||||||
containertype = "/obj/structure/closet/crate/secure"
|
containertype = "/obj/structure/closet/crate/secure"
|
||||||
containername = "Forensic equipment"
|
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/accessory/storage/black_vest,
|
||||||
/obj/item/clothing/head/soft/sec/corp,
|
/obj/item/clothing/head/soft/sec/corp,
|
||||||
/obj/item/clothing/under/rank/security/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
|
cost = 30
|
||||||
containertype = "/obj/structure/closet/crate/secure"
|
containertype = "/obj/structure/closet/crate/secure"
|
||||||
containername = "Officer equipment"
|
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/reagent_containers/spray/pepper,
|
||||||
/obj/item/weapon/melee/baton/loaded,
|
/obj/item/weapon/melee/baton/loaded,
|
||||||
/obj/item/weapon/storage/box/holobadge,
|
/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
|
cost = 45
|
||||||
containertype = "/obj/structure/closet/crate/secure"
|
containertype = "/obj/structure/closet/crate/secure"
|
||||||
containername = "Warden equipment"
|
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/clothing/accessory/holster/waist,
|
||||||
/obj/item/weapon/melee/telebaton,
|
/obj/item/weapon/melee/telebaton,
|
||||||
/obj/item/weapon/shield/riot/tele,
|
/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
|
cost = 65
|
||||||
containertype = "/obj/structure/closet/crate/secure"
|
containertype = "/obj/structure/closet/crate/secure"
|
||||||
containername = "Head of security equipment"
|
containername = "Head of security equipment"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ var/const/AALARM_WIRE_AALARM = 16
|
|||||||
|
|
||||||
/datum/wires/alarm/CanUse(var/mob/living/L)
|
/datum/wires/alarm/CanUse(var/mob/living/L)
|
||||||
var/obj/machinery/alarm/A = holder
|
var/obj/machinery/alarm/A = holder
|
||||||
if(A.wiresexposed && A.buildstage == 2)
|
if(A.wiresexposed)
|
||||||
return 1
|
return 1
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|||||||
@@ -599,3 +599,29 @@
|
|||||||
icon = 'icons/obj/stock_parts.dmi'
|
icon = 'icons/obj/stock_parts.dmi'
|
||||||
icon_state = "smes_coil"
|
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)
|
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)
|
||||||
@@ -76,7 +76,7 @@
|
|||||||
P.info = "The nuclear authorization code is: <b>[code]</b>"
|
P.info = "The nuclear authorization code is: <b>[code]</b>"
|
||||||
P.name = "nuclear bomb code"
|
P.name = "nuclear bomb code"
|
||||||
if(leader && leader.current)
|
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)
|
leader.current.put_in_hands(P)
|
||||||
|
|
||||||
if(!code_owner && leader)
|
if(!code_owner && leader)
|
||||||
|
|||||||
@@ -50,7 +50,6 @@ var/datum/antagonist/renegade/renegades
|
|||||||
|
|
||||||
var/gun_type = pick(spawn_guns)
|
var/gun_type = pick(spawn_guns)
|
||||||
var/obj/item/gun = new gun_type(get_turf(player))
|
var/obj/item/gun = new gun_type(get_turf(player))
|
||||||
if(!(player.l_hand && player.r_hand))
|
|
||||||
player.put_in_hands(gun)
|
player.put_in_hands(gun)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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>"
|
mob << "<span class='notice'>The sudden appearance of gravity makes you fall to the floor!</span>"
|
||||||
|
|
||||||
/area/proc/prison_break()
|
/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)
|
for(var/obj/machinery/power/apc/temp_apc in src)
|
||||||
temp_apc.overload_lighting(70)
|
temp_apc.overload_lighting(70)
|
||||||
for(var/obj/machinery/door/airlock/temp_airlock in src)
|
for(var/obj/machinery/door/airlock/temp_airlock in src)
|
||||||
|
|||||||
@@ -47,6 +47,7 @@
|
|||||||
idle_power_usage = 50
|
idle_power_usage = 50
|
||||||
active_power_usage = 300
|
active_power_usage = 300
|
||||||
interact_offline = 1
|
interact_offline = 1
|
||||||
|
circuit = /obj/item/weapon/circuitboard/clonescanner
|
||||||
var/locked = 0
|
var/locked = 0
|
||||||
var/mob/living/carbon/occupant = null
|
var/mob/living/carbon/occupant = null
|
||||||
var/obj/item/weapon/reagent_containers/glass/beaker = null
|
var/obj/item/weapon/reagent_containers/glass/beaker = null
|
||||||
@@ -55,7 +56,6 @@
|
|||||||
/obj/machinery/dna_scannernew/New()
|
/obj/machinery/dna_scannernew/New()
|
||||||
..()
|
..()
|
||||||
component_parts = list()
|
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/scanning_module(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/micro_laser(src)
|
component_parts += new /obj/item/weapon/stock_parts/micro_laser(src)
|
||||||
|
|||||||
@@ -244,7 +244,7 @@
|
|||||||
|
|
||||||
var/mob/living/carbon/human/M = src
|
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>"
|
src << "<span class='warning'>Our hands are full. Drop something first.</span>"
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|||||||
@@ -68,7 +68,7 @@
|
|||||||
..()
|
..()
|
||||||
|
|
||||||
/obj/item/weapon/melee/arm_blade/process() //Stolen from ninja swords.
|
/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.
|
// Tidy up a bit.
|
||||||
if(istype(loc,/mob/living))
|
if(istype(loc,/mob/living))
|
||||||
var/mob/living/carbon/human/host = loc
|
var/mob/living/carbon/human/host = loc
|
||||||
|
|||||||
@@ -54,6 +54,7 @@
|
|||||||
var/wiresexposed = 0 // If it's been screwdrivered open.
|
var/wiresexposed = 0 // If it's been screwdrivered open.
|
||||||
var/aidisabled = 0
|
var/aidisabled = 0
|
||||||
var/shorted = 0
|
var/shorted = 0
|
||||||
|
circuit = /obj/item/weapon/circuitboard/airalarm
|
||||||
|
|
||||||
var/datum/wires/alarm/wires
|
var/datum/wires/alarm/wires
|
||||||
|
|
||||||
@@ -61,7 +62,6 @@
|
|||||||
var/screen = AALARM_SCREEN_MAIN
|
var/screen = AALARM_SCREEN_MAIN
|
||||||
var/area_uid
|
var/area_uid
|
||||||
var/area/alarm_area
|
var/area/alarm_area
|
||||||
var/buildstage = 2 //2 is built, 1 is building, 0 is frame.
|
|
||||||
|
|
||||||
var/target_temperature = T0C+20
|
var/target_temperature = T0C+20
|
||||||
var/regulating_temperature = 0
|
var/regulating_temperature = 0
|
||||||
@@ -105,23 +105,8 @@
|
|||||||
wires = null
|
wires = null
|
||||||
return ..()
|
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()
|
first_run()
|
||||||
|
|
||||||
/obj/machinery/alarm/proc/first_run()
|
/obj/machinery/alarm/proc/first_run()
|
||||||
@@ -148,7 +133,7 @@
|
|||||||
elect_master()
|
elect_master()
|
||||||
|
|
||||||
/obj/machinery/alarm/process()
|
/obj/machinery/alarm/process()
|
||||||
if((stat & (NOPOWER|BROKEN)) || shorted || buildstage != 2)
|
if((stat & (NOPOWER|BROKEN)) || shorted)
|
||||||
return
|
return
|
||||||
|
|
||||||
var/turf/simulated/location = loc
|
var/turf/simulated/location = loc
|
||||||
@@ -605,9 +590,6 @@
|
|||||||
data["thresholds"] = thresholds
|
data["thresholds"] = thresholds
|
||||||
|
|
||||||
/obj/machinery/alarm/CanUseTopic(var/mob/user, var/datum/topic_state/state, var/href_list = list())
|
/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))
|
if(aidisabled && isAI(user))
|
||||||
user << "<span class='warning'>AI control for \the [src] interface has been disabled.</span>"
|
user << "<span class='warning'>AI control for \the [src] interface has been disabled.</span>"
|
||||||
return STATUS_CLOSE
|
return STATUS_CLOSE
|
||||||
@@ -763,9 +745,6 @@
|
|||||||
|
|
||||||
/obj/machinery/alarm/attackby(obj/item/W as obj, mob/user as mob)
|
/obj/machinery/alarm/attackby(obj/item/W as obj, mob/user as mob)
|
||||||
src.add_fingerprint(user)
|
src.add_fingerprint(user)
|
||||||
|
|
||||||
switch(buildstage)
|
|
||||||
if(2)
|
|
||||||
if(istype(W, /obj/item/weapon/screwdriver)) // Opening that Air Alarm up.
|
if(istype(W, /obj/item/weapon/screwdriver)) // Opening that Air Alarm up.
|
||||||
//user << "You pop the Air Alarm's maintence panel open."
|
//user << "You pop the Air Alarm's maintence panel open."
|
||||||
wiresexposed = !wiresexposed
|
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].")
|
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)
|
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
|
||||||
new/obj/item/stack/cable_coil(get_turf(src), 5)
|
new/obj/item/stack/cable_coil(get_turf(src), 5)
|
||||||
buildstage = 1
|
var/obj/structure/frame/A = new /obj/structure/frame( src.loc )
|
||||||
update_icon()
|
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
|
return
|
||||||
|
|
||||||
if (istype(W, /obj/item/weapon/card/id) || istype(W, /obj/item/device/pda))// trying to unlock the interface with an ID card
|
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>"
|
user << "<span class='notice'>You [ locked ? "lock" : "unlock"] the Air Alarm interface.</span>"
|
||||||
else
|
else
|
||||||
user << "<span class='warning'>Access denied.</span>"
|
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 ..()
|
return ..()
|
||||||
|
|
||||||
/obj/machinery/alarm/power_change()
|
/obj/machinery/alarm/power_change()
|
||||||
@@ -839,14 +791,10 @@
|
|||||||
|
|
||||||
/obj/machinery/alarm/examine(mob/user)
|
/obj/machinery/alarm/examine(mob/user)
|
||||||
..(user)
|
..(user)
|
||||||
if (buildstage < 2)
|
|
||||||
user << "It is not wired."
|
|
||||||
if (buildstage < 1)
|
|
||||||
user << "The circuit is missing."
|
|
||||||
/*
|
/*
|
||||||
AIR ALARM CIRCUIT
|
AIR ALARM CIRCUIT
|
||||||
Just a object used in constructing air alarms
|
Just a object used in constructing air alarms
|
||||||
*/
|
|
||||||
/obj/item/weapon/airalarm_electronics
|
/obj/item/weapon/airalarm_electronics
|
||||||
name = "air alarm electronics"
|
name = "air alarm electronics"
|
||||||
icon = 'icons/obj/doors/door_assembly.dmi'
|
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."
|
desc = "Looks like a circuit. Probably is."
|
||||||
w_class = 2.0
|
w_class = 2.0
|
||||||
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
|
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
|
||||||
|
*/
|
||||||
/*
|
/*
|
||||||
FIRE ALARM
|
FIRE ALARM
|
||||||
*/
|
*/
|
||||||
@@ -875,20 +823,13 @@ FIRE ALARM
|
|||||||
power_channel = ENVIRON
|
power_channel = ENVIRON
|
||||||
var/last_process = 0
|
var/last_process = 0
|
||||||
var/wiresexposed = 0
|
var/wiresexposed = 0
|
||||||
var/buildstage = 2 // 2 = complete, 1 = no wires, 0 = circuit gone
|
|
||||||
var/seclevel
|
var/seclevel
|
||||||
|
circuit = /obj/item/weapon/circuitboard/firealarm
|
||||||
|
|
||||||
/obj/machinery/firealarm/update_icon()
|
/obj/machinery/firealarm/update_icon()
|
||||||
overlays.Cut()
|
overlays.Cut()
|
||||||
|
|
||||||
if(wiresexposed)
|
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)
|
set_light(0)
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -932,14 +873,12 @@ FIRE ALARM
|
|||||||
/obj/machinery/firealarm/attackby(obj/item/W as obj, mob/user as mob)
|
/obj/machinery/firealarm/attackby(obj/item/W as obj, mob/user as mob)
|
||||||
src.add_fingerprint(user)
|
src.add_fingerprint(user)
|
||||||
|
|
||||||
if (istype(W, /obj/item/weapon/screwdriver) && buildstage == 2)
|
if (istype(W, /obj/item/weapon/screwdriver))
|
||||||
wiresexposed = !wiresexposed
|
wiresexposed = !wiresexposed
|
||||||
update_icon()
|
update_icon()
|
||||||
return
|
return
|
||||||
|
|
||||||
if(wiresexposed)
|
if(wiresexposed)
|
||||||
switch(buildstage)
|
|
||||||
if(2)
|
|
||||||
if (istype(W, /obj/item/device/multitool))
|
if (istype(W, /obj/item/device/multitool))
|
||||||
src.detecting = !( src.detecting )
|
src.detecting = !( src.detecting )
|
||||||
if (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>")
|
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)
|
new/obj/item/stack/cable_coil(get_turf(src), 5)
|
||||||
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
|
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
|
||||||
buildstage = 1
|
var/obj/structure/frame/A = new /obj/structure/frame( src.loc )
|
||||||
update_icon()
|
var/obj/item/weapon/circuitboard/M = new circuit( A )
|
||||||
if(1)
|
A.frame_type = "firealarm"
|
||||||
if(istype(W, /obj/item/stack/cable_coil))
|
A.pixel_x = pixel_x
|
||||||
var/obj/item/stack/cable_coil/C = W
|
A.pixel_y = pixel_y
|
||||||
if (C.use(5))
|
A.set_dir(dir)
|
||||||
user << "<span class='notice'>You wire \the [src].</span>"
|
A.circuit = M
|
||||||
buildstage = 2
|
A.anchored = 1
|
||||||
return
|
for (var/obj/C in src)
|
||||||
else
|
C.forceMove(loc)
|
||||||
user << "<span class='warning'>You need 5 pieces of cable to wire \the [src].</span>"
|
A.state = 2
|
||||||
return
|
A.icon_state = "firealarm_2"
|
||||||
else if(istype(W, /obj/item/weapon/crowbar))
|
M.deconstruct(src)
|
||||||
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)
|
|
||||||
qdel(src)
|
qdel(src)
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -1016,9 +937,6 @@ FIRE ALARM
|
|||||||
if(user.stat || stat & (NOPOWER|BROKEN))
|
if(user.stat || stat & (NOPOWER|BROKEN))
|
||||||
return
|
return
|
||||||
|
|
||||||
if (buildstage != 2)
|
|
||||||
return
|
|
||||||
|
|
||||||
user.set_machine(src)
|
user.set_machine(src)
|
||||||
var/area/A = src.loc
|
var/area/A = src.loc
|
||||||
var/d1
|
var/d1
|
||||||
@@ -1061,9 +979,6 @@ FIRE ALARM
|
|||||||
if (usr.stat || stat & (BROKEN|NOPOWER))
|
if (usr.stat || stat & (BROKEN|NOPOWER))
|
||||||
return
|
return
|
||||||
|
|
||||||
if (buildstage != 2)
|
|
||||||
return
|
|
||||||
|
|
||||||
if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
|
if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
|
||||||
usr.set_machine(src)
|
usr.set_machine(src)
|
||||||
if (href_list["reset"])
|
if (href_list["reset"])
|
||||||
@@ -1106,23 +1021,6 @@ FIRE ALARM
|
|||||||
//playsound(src.loc, 'sound/ambience/signal.ogg', 75, 0)
|
//playsound(src.loc, 'sound/ambience/signal.ogg', 75, 0)
|
||||||
return
|
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)
|
/obj/machinery/firealarm/proc/set_security_level(var/newlevel)
|
||||||
if(seclevel != newlevel)
|
if(seclevel != newlevel)
|
||||||
seclevel = newlevel
|
seclevel = newlevel
|
||||||
@@ -1135,7 +1033,7 @@ FIRE ALARM
|
|||||||
/*
|
/*
|
||||||
FIRE ALARM CIRCUIT
|
FIRE ALARM CIRCUIT
|
||||||
Just a object used in constructing fire alarms
|
Just a object used in constructing fire alarms
|
||||||
*/
|
|
||||||
/obj/item/weapon/firealarm_electronics
|
/obj/item/weapon/firealarm_electronics
|
||||||
name = "fire alarm electronics"
|
name = "fire alarm electronics"
|
||||||
icon = 'icons/obj/doors/door_assembly.dmi'
|
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!\""
|
desc = "A circuit. It has a label on it, it says \"Can handle heat levels up to 40 degrees celsius!\""
|
||||||
w_class = 2.0
|
w_class = 2.0
|
||||||
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
|
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
|
||||||
|
*/
|
||||||
/obj/machinery/partyalarm
|
/obj/machinery/partyalarm
|
||||||
name = "\improper PARTY BUTTON"
|
name = "\improper PARTY BUTTON"
|
||||||
desc = "Cuban Pete is in the house!"
|
desc = "Cuban Pete is in the house!"
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
use_power = 1
|
use_power = 1
|
||||||
idle_power_usage = 10
|
idle_power_usage = 10
|
||||||
active_power_usage = 2000
|
active_power_usage = 2000
|
||||||
|
circuit = /obj/item/weapon/circuitboard/autolathe
|
||||||
var/list/machine_recipes
|
var/list/machine_recipes
|
||||||
var/list/stored_material = list(DEFAULT_WALL_MATERIAL = 0, "glass" = 0)
|
var/list/stored_material = list(DEFAULT_WALL_MATERIAL = 0, "glass" = 0)
|
||||||
var/list/storage_capacity = 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)
|
wires = new(src)
|
||||||
//Create parts for lathe.
|
//Create parts for lathe.
|
||||||
component_parts = list()
|
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)
|
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)
|
||||||
|
|||||||
@@ -158,12 +158,12 @@
|
|||||||
|
|
||||||
/datum/autolathe/recipe/airalarm
|
/datum/autolathe/recipe/airalarm
|
||||||
name = "air alarm electronics"
|
name = "air alarm electronics"
|
||||||
path = /obj/item/weapon/airalarm_electronics
|
path = /obj/item/weapon/circuitboard/airalarm
|
||||||
category = "Engineering"
|
category = "Engineering"
|
||||||
|
|
||||||
/datum/autolathe/recipe/firealarm
|
/datum/autolathe/recipe/firealarm
|
||||||
name = "fire alarm electronics"
|
name = "fire alarm electronics"
|
||||||
path = /obj/item/weapon/firealarm_electronics
|
path = /obj/item/weapon/circuitboard/firealarm
|
||||||
category = "Engineering"
|
category = "Engineering"
|
||||||
|
|
||||||
/datum/autolathe/recipe/powermodule
|
/datum/autolathe/recipe/powermodule
|
||||||
@@ -171,6 +171,96 @@
|
|||||||
path = /obj/item/weapon/module/power_control
|
path = /obj/item/weapon/module/power_control
|
||||||
category = "Engineering"
|
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
|
/datum/autolathe/recipe/rcd_ammo
|
||||||
name = "matter cartridge"
|
name = "matter cartridge"
|
||||||
path = /obj/item/weapon/rcd_ammo
|
path = /obj/item/weapon/rcd_ammo
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
icon_state = "biogen-stand"
|
icon_state = "biogen-stand"
|
||||||
density = 1
|
density = 1
|
||||||
anchored = 1
|
anchored = 1
|
||||||
|
circuit = /obj/item/weapon/circuitboard/biogenerator
|
||||||
use_power = 1
|
use_power = 1
|
||||||
idle_power_usage = 40
|
idle_power_usage = 40
|
||||||
var/processing = 0
|
var/processing = 0
|
||||||
@@ -23,7 +24,6 @@
|
|||||||
beaker = new /obj/item/weapon/reagent_containers/glass/bottle(src)
|
beaker = new /obj/item/weapon/reagent_containers/glass/bottle(src)
|
||||||
|
|
||||||
component_parts = list()
|
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/matter_bin(src)
|
||||||
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
|
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
desc = "An electronically-lockable pod for growing organic tissue."
|
desc = "An electronically-lockable pod for growing organic tissue."
|
||||||
density = 1
|
density = 1
|
||||||
anchored = 1
|
anchored = 1
|
||||||
|
circuit = /obj/item/weapon/circuitboard/clonepod
|
||||||
icon = 'icons/obj/cloning.dmi'
|
icon = 'icons/obj/cloning.dmi'
|
||||||
icon_state = "pod_0"
|
icon_state = "pod_0"
|
||||||
req_access = list(access_genetics) //For premature unlocking.
|
req_access = list(access_genetics) //For premature unlocking.
|
||||||
@@ -47,7 +48,6 @@
|
|||||||
/obj/machinery/clonepod/New()
|
/obj/machinery/clonepod/New()
|
||||||
..()
|
..()
|
||||||
component_parts = list()
|
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/manipulator(src)
|
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
|
||||||
component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)
|
component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)
|
||||||
|
|||||||
@@ -215,7 +215,8 @@
|
|||||||
icon_screen = "entertainment"
|
icon_screen = "entertainment"
|
||||||
light_color = "#FFEEDB"
|
light_color = "#FFEEDB"
|
||||||
light_range_on = 2
|
light_range_on = 2
|
||||||
circuit = null
|
network = list(NETWORK_THUNDER)
|
||||||
|
circuit = /obj/item/weapon/circuitboard/security/telescreen/entertainment
|
||||||
/obj/machinery/computer/security/wooden_tv
|
/obj/machinery/computer/security/wooden_tv
|
||||||
name = "security camera monitor"
|
name = "security camera monitor"
|
||||||
desc = "An old TV hooked into the stations camera network."
|
desc = "An old TV hooked into the stations camera network."
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
use_power = 1
|
use_power = 1
|
||||||
idle_power_usage = 300
|
idle_power_usage = 300
|
||||||
active_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/processing = 0
|
||||||
|
|
||||||
var/icon_keyboard = "generic_key"
|
var/icon_keyboard = "generic_key"
|
||||||
@@ -98,23 +98,28 @@
|
|||||||
|
|
||||||
/obj/machinery/computer/attackby(I as obj, user as mob)
|
/obj/machinery/computer/attackby(I as obj, user as mob)
|
||||||
if(istype(I, /obj/item/weapon/screwdriver) && circuit)
|
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)
|
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||||
if(do_after(user, 20))
|
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 )
|
var/obj/item/weapon/circuitboard/M = new circuit( A )
|
||||||
A.circuit = M
|
A.circuit = M
|
||||||
A.anchored = 1
|
A.anchored = 1
|
||||||
|
A.density = 1
|
||||||
|
A.frame_type = M.board_type
|
||||||
for (var/obj/C in src)
|
for (var/obj/C in src)
|
||||||
C.loc = src.loc
|
C.forceMove(loc)
|
||||||
if (src.stat & BROKEN)
|
if (src.stat & BROKEN)
|
||||||
user << "<span class='notice'>The broken glass falls out.</span>"
|
user << "<span class='notice'>The broken glass falls out.</span>"
|
||||||
new /obj/item/weapon/material/shard( src.loc )
|
new /obj/item/weapon/material/shard( src.loc )
|
||||||
A.state = 3
|
A.state = 3
|
||||||
A.icon_state = "3"
|
A.icon_state = "[A.frame_type]_3"
|
||||||
else
|
else
|
||||||
user << "<span class='notice'>You disconnect the monitor.</span>"
|
user << "<span class='notice'>You disconnect the monitor.</span>"
|
||||||
A.state = 4
|
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)
|
M.deconstruct(src)
|
||||||
qdel(src)
|
qdel(src)
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -46,6 +46,7 @@
|
|||||||
icon_keyboard = null
|
icon_keyboard = null
|
||||||
icon_screen = "pass"
|
icon_screen = "pass"
|
||||||
density = 0
|
density = 0
|
||||||
|
circuit = /obj/item/weapon/circuitboard/guestpass
|
||||||
|
|
||||||
var/obj/item/weapon/card/id/giver
|
var/obj/item/weapon/card/id/giver
|
||||||
var/list/accesses = list()
|
var/list/accesses = list()
|
||||||
@@ -60,11 +61,30 @@
|
|||||||
..()
|
..()
|
||||||
uid = "[rand(100,999)]-G[rand(10,99)]"
|
uid = "[rand(100,999)]-G[rand(10,99)]"
|
||||||
|
|
||||||
/obj/machinery/computer/guestpass/attackby(obj/O, mob/user)
|
/obj/machinery/computer/guestpass/attackby(obj/I, mob/user)
|
||||||
if(istype(O, /obj/item/weapon/card/id))
|
if(istype(I, /obj/item/weapon/screwdriver) && circuit)
|
||||||
if(!giver && user.unEquip(O))
|
user << "<span class='notice'>You start disconnecting the monitor.</span>"
|
||||||
O.loc = src
|
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||||
giver = O
|
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()
|
updateUsrDialog()
|
||||||
else if(giver)
|
else if(giver)
|
||||||
user << "<span class='warning'>There is already ID card inside.</span>"
|
user << "<span class='warning'>There is already ID card inside.</span>"
|
||||||
|
|||||||
@@ -26,32 +26,6 @@ var/prison_shuttle_timeleft = 0
|
|||||||
attack_ai(var/mob/user as mob)
|
attack_ai(var/mob/user as mob)
|
||||||
return src.attack_hand(user)
|
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)
|
attack_hand(var/mob/user as mob)
|
||||||
if(!src.allowed(user) && (!hacked))
|
if(!src.allowed(user) && (!hacked))
|
||||||
user << "<span class='warning'>Access Denied.</span>"
|
user << "<span class='warning'>Access Denied.</span>"
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
// when you had to search the list to find what you had.
|
// when you had to search the list to find what you had.
|
||||||
|
|
||||||
// Mostly decorative, holds the OS rom
|
// Mostly decorative, holds the OS rom
|
||||||
var/obj/item/part/computer/circuitboard/circuit
|
var/obj/item/part/computer/circuitboard/circuitb
|
||||||
|
|
||||||
// Storage
|
// Storage
|
||||||
var/obj/item/part/computer/storage/hdd/hdd = null
|
var/obj/item/part/computer/storage/hdd/hdd = null
|
||||||
@@ -97,11 +97,11 @@
|
|||||||
overlays += kb
|
overlays += kb
|
||||||
|
|
||||||
if(!built)
|
if(!built)
|
||||||
if(!circuit || !istype(circuit))
|
if(!circuitb || !istype(circuitb))
|
||||||
circuit = new(src)
|
circuitb = new(src)
|
||||||
if(circuit.OS)
|
if(circuitb.OS)
|
||||||
os = circuit.OS
|
os = circuitb.OS
|
||||||
circuit.OS.computer = src
|
circuitb.OS.computer = src
|
||||||
else
|
else
|
||||||
os = null
|
os = null
|
||||||
|
|
||||||
@@ -121,10 +121,10 @@
|
|||||||
floppy.addfile(P)
|
floppy.addfile(P)
|
||||||
program = P
|
program = P
|
||||||
else
|
else
|
||||||
circuit.OS = P
|
circuitb.OS = P
|
||||||
circuit.OS.computer = src
|
circuitb.OS.computer = src
|
||||||
os = circuit.OS
|
os = circuitb.OS
|
||||||
circuit.name = "Circuitboard ([P])"
|
circuitb.name = "Circuitboard ([P])"
|
||||||
|
|
||||||
|
|
||||||
if(hdd) // Spawn files
|
if(hdd) // Spawn files
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
New()
|
New()
|
||||||
..(built=0)
|
..(built=0)
|
||||||
os = program
|
os = program
|
||||||
circuit.OS = os
|
circuitb.OS = os
|
||||||
|
|
||||||
|
|
||||||
/obj/machinery/computer3/security/mining
|
/obj/machinery/computer3/security/mining
|
||||||
|
|||||||
@@ -221,7 +221,7 @@
|
|||||||
if (stat & BROKEN)
|
if (stat & BROKEN)
|
||||||
new /obj/item/weapon/circuitboard/broken(src.loc)
|
new /obj/item/weapon/circuitboard/broken(src.loc)
|
||||||
else
|
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)
|
var/obj/structure/firedoor_assembly/FA = new/obj/structure/firedoor_assembly(src.loc)
|
||||||
FA.anchored = 1
|
FA.anchored = 1
|
||||||
|
|||||||
@@ -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)
|
new/obj/item/stack/cable_coil(src.loc, 1)
|
||||||
wired = 0
|
wired = 0
|
||||||
|
|
||||||
else if(istype(C, /obj/item/weapon/airalarm_electronics) && wired)
|
else if(istype(C, /obj/item/weapon/circuitboard/airalarm) && wired)
|
||||||
if(anchored)
|
if(anchored)
|
||||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||||
user.visible_message("<span class='warning'>[user] has inserted a circuit into \the [src]!</span>",
|
user.visible_message("<span class='warning'>[user] has inserted a circuit into \the [src]!</span>",
|
||||||
|
|||||||
412
code/game/machinery/frame.dm
Normal file
412
code/game/machinery/frame.dm
Normal 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
|
||||||
@@ -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."
|
desc = "It's a floor-mounted device for projecting holographic images. It is activated remotely."
|
||||||
icon_state = "holopad0"
|
icon_state = "holopad0"
|
||||||
show_messages = 1
|
show_messages = 1
|
||||||
|
circuit = /obj/item/weapon/circuitboard/holopad
|
||||||
|
|
||||||
layer = TURF_LAYER+0.1 //Preventing mice and drones from sneaking under them.
|
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/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.
|
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.
|
/obj/machinery/hologram/holopad/attack_hand(var/mob/living/carbon/human/user) //Carn: Hologram requests.
|
||||||
if(!istype(user))
|
if(!istype(user))
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -62,6 +62,19 @@
|
|||||||
user << "You attach \the [W] to \the [src]."
|
user << "You attach \the [W] to \the [src]."
|
||||||
src.update_icon()
|
src.update_icon()
|
||||||
return
|
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
|
else
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
idle_power_usage = 5
|
idle_power_usage = 5
|
||||||
active_power_usage = 100
|
active_power_usage = 100
|
||||||
flags = OPENCONTAINER | NOREACT
|
flags = OPENCONTAINER | NOREACT
|
||||||
|
circuit = /obj/item/weapon/circuitboard/microwave
|
||||||
var/operating = 0 // Is it on?
|
var/operating = 0 // Is it on?
|
||||||
var/dirty = 0 // = {0..100} Does it need cleaning?
|
var/dirty = 0 // = {0..100} Does it need cleaning?
|
||||||
var/broken = 0 // ={0,1,2} How broken is it???
|
var/broken = 0 // ={0,1,2} How broken is it???
|
||||||
@@ -29,6 +30,13 @@
|
|||||||
..()
|
..()
|
||||||
reagents = new/datum/reagents(100)
|
reagents = new/datum/reagents(100)
|
||||||
reagents.my_atom = src
|
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)
|
if (!available_recipes)
|
||||||
available_recipes = new
|
available_recipes = new
|
||||||
for (var/type in (typesof(/datum/recipe)-/datum/recipe))
|
for (var/type in (typesof(/datum/recipe)-/datum/recipe))
|
||||||
@@ -82,6 +90,11 @@
|
|||||||
else
|
else
|
||||||
user << "<span class='warning'>It's broken!</span>"
|
user << "<span class='warning'>It's broken!</span>"
|
||||||
return 1
|
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!
|
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
|
if(istype(O, /obj/item/weapon/reagent_containers/spray/cleaner)) // If they're trying to clean it then let them
|
||||||
user.visible_message( \
|
user.visible_message( \
|
||||||
|
|||||||
@@ -7,10 +7,12 @@
|
|||||||
icon = 'icons/obj/power.dmi'
|
icon = 'icons/obj/power.dmi'
|
||||||
icon_state = "light1"
|
icon_state = "light1"
|
||||||
anchored = 1.0
|
anchored = 1.0
|
||||||
|
use_power = 1
|
||||||
|
idle_power_usage = 10
|
||||||
|
power_channel = LIGHT
|
||||||
var/on = 1
|
var/on = 1
|
||||||
var/area/area = null
|
var/area/area = null
|
||||||
var/otherarea = null
|
var/otherarea = null
|
||||||
// luminosity = 1
|
|
||||||
|
|
||||||
/obj/machinery/light_switch/New()
|
/obj/machinery/light_switch/New()
|
||||||
..()
|
..()
|
||||||
@@ -31,8 +33,12 @@
|
|||||||
/obj/machinery/light_switch/proc/updateicon()
|
/obj/machinery/light_switch/proc/updateicon()
|
||||||
if(stat & NOPOWER)
|
if(stat & NOPOWER)
|
||||||
icon_state = "light-p"
|
icon_state = "light-p"
|
||||||
|
set_light(0)
|
||||||
|
layer = OBJ_LAYER
|
||||||
else
|
else
|
||||||
icon_state = "light[on]"
|
icon_state = "light[on]"
|
||||||
|
set_light(2, 1.5, on ? "#82FF4C" : "#F86060")
|
||||||
|
layer = LIGHTING_LAYER+0.1
|
||||||
|
|
||||||
/obj/machinery/light_switch/examine(mob/user)
|
/obj/machinery/light_switch/examine(mob/user)
|
||||||
if(..(user, 1))
|
if(..(user, 1))
|
||||||
|
|||||||
@@ -112,6 +112,8 @@ Class Procs:
|
|||||||
var/panel_open = 0
|
var/panel_open = 0
|
||||||
var/global/gl_uid = 1
|
var/global/gl_uid = 1
|
||||||
var/interact_offline = 0 // Can the machine be interacted with while de-powered.
|
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)
|
/obj/machinery/New(l, d=0)
|
||||||
..(l)
|
..(l)
|
||||||
@@ -225,11 +227,6 @@ Class Procs:
|
|||||||
istype(usr, /mob/living/silicon)))
|
istype(usr, /mob/living/silicon)))
|
||||||
usr << "<span class='warning'>You don't have the dexterity to do this!</span>"
|
usr << "<span class='warning'>You don't have the dexterity to do this!</span>"
|
||||||
return 1
|
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))
|
if (ishuman(user))
|
||||||
var/mob/living/carbon/human/H = user
|
var/mob/living/carbon/human/H = user
|
||||||
if(H.getBrainLoss() >= 55)
|
if(H.getBrainLoss() >= 55)
|
||||||
@@ -280,29 +277,13 @@ Class Procs:
|
|||||||
return 1
|
return 1
|
||||||
return 0
|
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)
|
/obj/machinery/proc/default_part_replacement(var/mob/user, var/obj/item/weapon/storage/part_replacer/R)
|
||||||
if(!istype(R))
|
if(!istype(R))
|
||||||
return 0
|
return 0
|
||||||
if(!component_parts)
|
if(!component_parts)
|
||||||
return 0
|
return 0
|
||||||
if(panel_open)
|
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
|
var/P
|
||||||
for(var/obj/item/weapon/stock_parts/A in component_parts)
|
for(var/obj/item/weapon/stock_parts/A in component_parts)
|
||||||
for(var/D in CB.req_components)
|
for(var/D in CB.req_components)
|
||||||
@@ -328,13 +309,45 @@ Class Procs:
|
|||||||
user << "<span class='notice'> [C.name]</span>"
|
user << "<span class='notice'> [C.name]</span>"
|
||||||
return 1
|
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()
|
/obj/machinery/proc/dismantle()
|
||||||
playsound(loc, 'sound/items/Crowbar.ogg', 50, 1)
|
playsound(loc, 'sound/items/Crowbar.ogg', 50, 1)
|
||||||
var/obj/machinery/constructable_frame/machine_frame/M = new /obj/machinery/constructable_frame/machine_frame(loc)
|
var/obj/structure/frame/A = new /obj/structure/frame( src.loc )
|
||||||
M.set_dir(src.dir)
|
var/obj/item/weapon/circuitboard/M = new circuit( A )
|
||||||
M.state = 2
|
A.circuit = M
|
||||||
M.icon_state = "box_1"
|
A.anchored = 1
|
||||||
for(var/obj/I in component_parts)
|
A.density = 1
|
||||||
I.loc = loc
|
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)
|
qdel(src)
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
@@ -167,7 +167,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
|
|||||||
light_range = 0
|
light_range = 0
|
||||||
anchored = 1
|
anchored = 1
|
||||||
var/obj/machinery/exonet_node/node = null
|
var/obj/machinery/exonet_node/node = null
|
||||||
|
circuit = /obj/item/weapon/circuitboard/newscaster
|
||||||
|
|
||||||
/obj/machinery/newscaster/security_unit //Security unit
|
/obj/machinery/newscaster/security_unit //Security unit
|
||||||
name = "Security Newscaster"
|
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)
|
/obj/machinery/newscaster/attackby(I as obj, user as mob)
|
||||||
if (src.isbroken)
|
if(istype(I, /obj/item/weapon/screwdriver) && circuit)
|
||||||
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 100, 1)
|
user << "<span class='notice'>You start disconnecting the monitor.</span>"
|
||||||
for (var/mob/O in hearers(5, src.loc))
|
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||||
O.show_message("<EM>[user.name]</EM> further abuses the shattered [src.name].")
|
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
|
else
|
||||||
if(istype(I, /obj/item/weapon) )
|
user << "<span class='notice'>You disconnect the monitor.</span>"
|
||||||
var/obj/item/weapon/W = I
|
A.state = 4
|
||||||
if(W.force <15)
|
A.icon_state = "newscaster_4"
|
||||||
for (var/mob/O in hearers(5, src.loc))
|
M.deconstruct(src)
|
||||||
O.show_message("[user.name] hits the [src.name] with the [W.name] with no visible effect." )
|
qdel(src)
|
||||||
playsound(src.loc, 'sound/effects/Glasshit.ogg', 100, 1)
|
|
||||||
else
|
else
|
||||||
src.hitstaken++
|
src.attack_hand(user)
|
||||||
if(src.hitstaken==3)
|
return
|
||||||
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()
|
|
||||||
|
|
||||||
/obj/machinery/newscaster/attack_ai(mob/user as mob)
|
/obj/machinery/newscaster/attack_ai(mob/user as mob)
|
||||||
return src.attack_hand(user) //or maybe it'll have some special functions? No idea.
|
return src.attack_hand(user) //or maybe it'll have some special functions? No idea.
|
||||||
|
|||||||
@@ -14,6 +14,15 @@ obj/machinery/recharger
|
|||||||
var/icon_state_charging = "recharger1"
|
var/icon_state_charging = "recharger1"
|
||||||
var/icon_state_idle = "recharger0" //also when unpowered
|
var/icon_state_idle = "recharger0" //also when unpowered
|
||||||
var/portable = 1
|
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)
|
obj/machinery/recharger/attackby(obj/item/weapon/G as obj, mob/user as mob)
|
||||||
if(istype(user,/mob/living/silicon))
|
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
|
anchored = !anchored
|
||||||
user << "You [anchored ? "attached" : "detached"] the recharger."
|
user << "You [anchored ? "attached" : "detached"] the recharger."
|
||||||
playsound(loc, 'sound/items/Ratchet.ogg', 75, 1)
|
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)
|
obj/machinery/recharger/attack_hand(mob/user as mob)
|
||||||
if(istype(user,/mob/living/silicon))
|
if(istype(user,/mob/living/silicon))
|
||||||
@@ -156,3 +169,5 @@ obj/machinery/recharger/wallcharger
|
|||||||
icon_state_charging = "wrecharger1"
|
icon_state_charging = "wrecharger1"
|
||||||
icon_state_idle = "wrecharger0"
|
icon_state_idle = "wrecharger0"
|
||||||
portable = 0
|
portable = 0
|
||||||
|
circuit = /obj/item/weapon/circuitboard/recharger/wrecharger
|
||||||
|
frame_type = "wrecharger"
|
||||||
@@ -5,6 +5,7 @@
|
|||||||
icon_state = "borgcharger0"
|
icon_state = "borgcharger0"
|
||||||
density = 1
|
density = 1
|
||||||
anchored = 1
|
anchored = 1
|
||||||
|
circuit = /obj/item/weapon/circuitboard/recharge_station
|
||||||
use_power = 1
|
use_power = 1
|
||||||
idle_power_usage = 50
|
idle_power_usage = 50
|
||||||
var/mob/occupant = null
|
var/mob/occupant = null
|
||||||
@@ -25,7 +26,6 @@
|
|||||||
..()
|
..()
|
||||||
|
|
||||||
component_parts = list()
|
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/manipulator(src)
|
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
|
||||||
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
|
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
density = 0
|
density = 0
|
||||||
use_power = 1
|
use_power = 1
|
||||||
idle_power_usage = 10
|
idle_power_usage = 10
|
||||||
|
circuit = /obj/item/weapon/circuitboard/status_display
|
||||||
var/mode = 1 // 0 = Blank
|
var/mode = 1 // 0 = Blank
|
||||||
// 1 = Shuttle timer
|
// 1 = Shuttle timer
|
||||||
// 2 = Arbitrary message(s)
|
// 2 = Arbitrary message(s)
|
||||||
@@ -51,6 +52,29 @@
|
|||||||
radio_controller.remove_object(src,frequency)
|
radio_controller.remove_object(src,frequency)
|
||||||
return ..()
|
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
|
// register for radio system
|
||||||
/obj/machinery/status_display/initialize()
|
/obj/machinery/status_display/initialize()
|
||||||
..()
|
..()
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ var/list/ai_status_emotions = list(
|
|||||||
name = "AI display"
|
name = "AI display"
|
||||||
anchored = 1
|
anchored = 1
|
||||||
density = 0
|
density = 0
|
||||||
|
circuit = /obj/item/weapon/circuitboard/ai_status_display
|
||||||
|
|
||||||
var/mode = 0 // 0 = Blank
|
var/mode = 0 // 0 = Blank
|
||||||
// 1 = AI emoticon
|
// 1 = AI emoticon
|
||||||
@@ -68,6 +69,28 @@ var/list/ai_status_emotions = list(
|
|||||||
|
|
||||||
var/emotion = "Neutral"
|
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)
|
/obj/machinery/ai_status_display/attack_ai/(mob/user as mob)
|
||||||
var/list/ai_emotions = get_ai_emotions(user.ckey)
|
var/list/ai_emotions = get_ai_emotions(user.ckey)
|
||||||
var/emote = input("Please, select a status!", "AI Status", null, null) in ai_emotions
|
var/emote = input("Please, select a status!", "AI Status", null, null) in ai_emotions
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
var/screen = 0 // the screen number:
|
var/screen = 0 // the screen number:
|
||||||
var/list/servers = list() // the servers located by the computer
|
var/list/servers = list() // the servers located by the computer
|
||||||
var/obj/machinery/telecomms/server/SelectedServer
|
var/obj/machinery/telecomms/server/SelectedServer
|
||||||
|
circuit = /obj/item/weapon/circuitboard/comm_server
|
||||||
|
|
||||||
var/network = "NULL" // the network to probe
|
var/network = "NULL" // the network to probe
|
||||||
var/temp = "" // temporary feedback messages
|
var/temp = "" // temporary feedback messages
|
||||||
@@ -188,36 +189,6 @@
|
|||||||
updateUsrDialog()
|
updateUsrDialog()
|
||||||
return
|
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)
|
/obj/machinery/computer/telecomms/server/emag_act(var/remaining_charges, var/mob/user)
|
||||||
if(!emagged)
|
if(!emagged)
|
||||||
playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
|
playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
|
||||||
|
|||||||
@@ -98,8 +98,8 @@
|
|||||||
// Drop a circuit board too
|
// Drop a circuit board too
|
||||||
C.loc = user.loc
|
C.loc = user.loc
|
||||||
|
|
||||||
// Create a machine frame and delete the current machine
|
// Create a frame and delete the current machine
|
||||||
var/obj/machinery/constructable_frame/machine_frame/F = new
|
var/obj/structure/frame/F = new
|
||||||
F.loc = src.loc
|
F.loc = src.loc
|
||||||
qdel(src)
|
qdel(src)
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
var/screen = 0 // the screen number:
|
var/screen = 0 // the screen number:
|
||||||
var/list/machinelist = list() // the machines located by the computer
|
var/list/machinelist = list() // the machines located by the computer
|
||||||
var/obj/machinery/telecomms/SelectedMachine
|
var/obj/machinery/telecomms/SelectedMachine
|
||||||
|
circuit = /obj/item/weapon/circuitboard/comm_monitor
|
||||||
|
|
||||||
var/network = "NULL" // the network to probe
|
var/network = "NULL" // the network to probe
|
||||||
|
|
||||||
@@ -123,36 +124,6 @@
|
|||||||
updateUsrDialog()
|
updateUsrDialog()
|
||||||
return
|
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)
|
/obj/machinery/computer/telecomms/monitor/emag_act(var/remaining_charges, var/mob/user)
|
||||||
if(!emagged)
|
if(!emagged)
|
||||||
playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
|
playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
var/mob/lasteditor
|
var/mob/lasteditor
|
||||||
var/list/viewingcode = list()
|
var/list/viewingcode = list()
|
||||||
var/obj/machinery/telecomms/server/SelectedServer
|
var/obj/machinery/telecomms/server/SelectedServer
|
||||||
|
circuit = /obj/item/weapon/circuitboard/comm_traffic
|
||||||
|
|
||||||
var/network = "NULL" // the network to probe
|
var/network = "NULL" // the network to probe
|
||||||
var/temp = "" // temporary feedback messages
|
var/temp = "" // temporary feedback messages
|
||||||
@@ -206,36 +207,6 @@
|
|||||||
updateUsrDialog()
|
updateUsrDialog()
|
||||||
return
|
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)
|
/obj/machinery/computer/telecomms/traffic/emag_act(var/remaining_charges, var/mob/user)
|
||||||
if(!emagged)
|
if(!emagged)
|
||||||
playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
|
playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
|
||||||
|
|||||||
@@ -36,6 +36,8 @@
|
|||||||
layer = 2.9
|
layer = 2.9
|
||||||
anchored = 1
|
anchored = 1
|
||||||
density = 1
|
density = 1
|
||||||
|
circuit = /obj/item/weapon/circuitboard/vending
|
||||||
|
frame_type = "vending"
|
||||||
|
|
||||||
var/icon_vend //Icon_state when vending
|
var/icon_vend //Icon_state when vending
|
||||||
var/icon_deny //Icon_state when denying access
|
var/icon_deny //Icon_state when denying access
|
||||||
@@ -94,6 +96,14 @@
|
|||||||
/obj/machinery/vending/New()
|
/obj/machinery/vending/New()
|
||||||
..()
|
..()
|
||||||
wires = new(src)
|
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)
|
spawn(4)
|
||||||
if(src.product_slogans)
|
if(src.product_slogans)
|
||||||
src.slogan_list += splittext(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>"
|
user << "<span class='notice'>You [anchored? "un" : ""]secured \the [src]!</span>"
|
||||||
anchored = !anchored
|
anchored = !anchored
|
||||||
return
|
return
|
||||||
|
else if(default_deconstruction_crowbar(user, W))
|
||||||
|
return
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
@@ -922,7 +934,15 @@
|
|||||||
icon_state = "engivend"
|
icon_state = "engivend"
|
||||||
icon_deny = "engivend-deny"
|
icon_deny = "engivend-deny"
|
||||||
req_access = list(access_engine_equip)
|
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)
|
contraband = list(/obj/item/weapon/cell/potato = 3)
|
||||||
premium = list(/obj/item/weapon/storage/belt/utility = 3)
|
premium = list(/obj/item/weapon/storage/belt/utility = 3)
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
/obj/item/frame
|
/obj/item/frame
|
||||||
name = "frame"
|
name = "frame parts"
|
||||||
desc = "Used for building machines."
|
desc = "Used for building frames."
|
||||||
icon = 'icons/obj/monitors.dmi'
|
icon = 'icons/obj/stock_parts.dmi'
|
||||||
icon_state = "fire_bitem"
|
icon_state = "frame_bitem"
|
||||||
flags = CONDUCT
|
flags = CONDUCT
|
||||||
var/build_machine_type
|
var/build_machine_type = /obj/structure/frame
|
||||||
var/refund_amt = 2
|
var/refund_amt = 5
|
||||||
var/refund_type = /obj/item/stack/material/steel
|
var/refund_type = /obj/item/stack/material/steel
|
||||||
var/reverse = 0 //if resulting object faces opposite its dir (like light fixtures)
|
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)
|
/obj/item/frame/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||||
if (istype(W, /obj/item/weapon/wrench))
|
if (istype(W, /obj/item/weapon/wrench))
|
||||||
@@ -16,7 +17,82 @@
|
|||||||
return
|
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)
|
if(!build_machine_type)
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -35,7 +111,7 @@
|
|||||||
var/turf/loc = get_turf(usr)
|
var/turf/loc = get_turf(usr)
|
||||||
var/area/A = loc.loc
|
var/area/A = loc.loc
|
||||||
if (!istype(loc, /turf/simulated/floor))
|
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
|
return
|
||||||
if (A.requires_power == 0 || A.name == "Space")
|
if (A.requires_power == 0 || A.name == "Space")
|
||||||
usr << "<span class='danger'>\The [src] Alarm cannot be placed in this area.</span>"
|
usr << "<span class='danger'>\The [src] Alarm cannot be placed in this area.</span>"
|
||||||
@@ -44,23 +120,12 @@
|
|||||||
if(gotwallitem(loc, ndir))
|
if(gotwallitem(loc, ndir))
|
||||||
usr << "<span class='danger'>There's already an item on this wall!</span>"
|
usr << "<span class='danger'>There's already an item on this wall!</span>"
|
||||||
return
|
return
|
||||||
|
var/obj/machinery/M = new build_machine_type(loc, ndir, 1, frame_type)
|
||||||
var/obj/machinery/M = new build_machine_type(loc, ndir, 1)
|
|
||||||
M.fingerprints = src.fingerprints
|
M.fingerprints = src.fingerprints
|
||||||
M.fingerprintshidden = src.fingerprintshidden
|
M.fingerprintshidden = src.fingerprintshidden
|
||||||
M.fingerprintslast = src.fingerprintslast
|
M.fingerprintslast = src.fingerprintslast
|
||||||
qdel(src)
|
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
|
/obj/item/frame/light
|
||||||
name = "light fixture frame"
|
name = "light fixture frame"
|
||||||
desc = "Used for building lights."
|
desc = "Used for building lights."
|
||||||
@@ -68,9 +133,48 @@
|
|||||||
icon_state = "tube-construct-item"
|
icon_state = "tube-construct-item"
|
||||||
build_machine_type = /obj/machinery/light_construct
|
build_machine_type = /obj/machinery/light_construct
|
||||||
reverse = 1
|
reverse = 1
|
||||||
|
frame_type = 1
|
||||||
|
|
||||||
/obj/item/frame/light/small
|
/obj/item/frame/light/small
|
||||||
name = "small light fixture frame"
|
name = "small light fixture frame"
|
||||||
icon_state = "bulb-construct-item"
|
icon_state = "bulb-construct-item"
|
||||||
refund_amt = 1
|
refund_amt = 1
|
||||||
build_machine_type = /obj/machinery/light_construct/small
|
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
|
||||||
@@ -4,6 +4,7 @@
|
|||||||
icon_state = "wm_10"
|
icon_state = "wm_10"
|
||||||
density = 1
|
density = 1
|
||||||
anchored = 1.0
|
anchored = 1.0
|
||||||
|
circuit = /obj/item/weapon/circuitboard/washing
|
||||||
var/state = 1
|
var/state = 1
|
||||||
//1 = empty, open door
|
//1 = empty, open door
|
||||||
//2 = empty, closed door
|
//2 = empty, closed door
|
||||||
@@ -13,14 +14,19 @@
|
|||||||
//6 = blood, open door
|
//6 = blood, open door
|
||||||
//7 = blood, closed door
|
//7 = blood, closed door
|
||||||
//8 = blood, running
|
//8 = blood, running
|
||||||
var/panel = 0
|
|
||||||
//0 = closed
|
|
||||||
//1 = open
|
|
||||||
var/hacked = 1 //Bleh, screw hacking, let's have it hacked by default.
|
var/hacked = 1 //Bleh, screw hacking, let's have it hacked by default.
|
||||||
//0 = not hacked
|
//0 = not hacked
|
||||||
//1 = hacked
|
//1 = hacked
|
||||||
var/gibs_ready = 0
|
var/gibs_ready = 0
|
||||||
var/obj/crayon
|
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()
|
/obj/machinery/washing_machine/verb/start()
|
||||||
set name = "Start Washing"
|
set name = "Start Washing"
|
||||||
@@ -34,25 +40,25 @@
|
|||||||
usr << "The washing machine cannot run in this state."
|
usr << "The washing machine cannot run in this state."
|
||||||
return
|
return
|
||||||
|
|
||||||
if( locate(/mob,contents) )
|
if( locate(/mob,washing) )
|
||||||
state = 8
|
state = 8
|
||||||
else
|
else
|
||||||
state = 5
|
state = 5
|
||||||
update_icon()
|
update_icon()
|
||||||
sleep(200)
|
sleep(200)
|
||||||
for(var/atom/A in contents)
|
for(var/atom/A in washing)
|
||||||
A.clean_blood()
|
A.clean_blood()
|
||||||
|
|
||||||
for(var/obj/item/I in contents)
|
for(var/obj/item/I in washing)
|
||||||
I.decontaminate()
|
I.decontaminate()
|
||||||
|
|
||||||
//Tanning!
|
//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)
|
var/obj/item/stack/material/wetleather/WL = new(src)
|
||||||
WL.amount = HH.amount
|
WL.amount = HH.amount
|
||||||
qdel(HH)
|
qdel(HH)
|
||||||
|
|
||||||
if( locate(/mob,contents) )
|
if( locate(/mob,washing) )
|
||||||
state = 7
|
state = 7
|
||||||
gibs_ready = 1
|
gibs_ready = 1
|
||||||
else
|
else
|
||||||
@@ -70,9 +76,14 @@
|
|||||||
|
|
||||||
|
|
||||||
/obj/machinery/washing_machine/update_icon()
|
/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)
|
/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))
|
/*if(istype(W,/obj/item/weapon/screwdriver))
|
||||||
panel = !panel
|
panel = !panel
|
||||||
user << "<span class='notice'>You [panel ? "open" : "close"] the [src]'s maintenance panel</span>"*/
|
user << "<span class='notice'>You [panel ? "open" : "close"] the [src]'s maintenance panel</span>"*/
|
||||||
@@ -142,10 +153,11 @@
|
|||||||
user << "This item does not fit."
|
user << "This item does not fit."
|
||||||
return
|
return
|
||||||
|
|
||||||
if(contents.len < 5)
|
if(washing.len < 5)
|
||||||
if ( state in list(1, 3) )
|
if ( state in list(1, 3) )
|
||||||
user.drop_item()
|
user.drop_item()
|
||||||
W.loc = src
|
W.loc = src
|
||||||
|
washing += W
|
||||||
state = 3
|
state = 3
|
||||||
else
|
else
|
||||||
user << "<span class='notice'>You can't put the item in right now.</span>"
|
user << "<span class='notice'>You can't put the item in right now.</span>"
|
||||||
@@ -161,15 +173,17 @@
|
|||||||
state = 2
|
state = 2
|
||||||
if(2)
|
if(2)
|
||||||
state = 1
|
state = 1
|
||||||
for(var/atom/movable/O in contents)
|
for(var/atom/movable/O in washing)
|
||||||
O.loc = src.loc
|
O.loc = src.loc
|
||||||
|
washing.Cut()
|
||||||
if(3)
|
if(3)
|
||||||
state = 4
|
state = 4
|
||||||
if(4)
|
if(4)
|
||||||
state = 3
|
state = 3
|
||||||
for(var/atom/movable/O in contents)
|
for(var/atom/movable/O in washing)
|
||||||
O.loc = src.loc
|
O.loc = src.loc
|
||||||
crayon = null
|
crayon = null
|
||||||
|
washing.Cut()
|
||||||
state = 1
|
state = 1
|
||||||
if(5)
|
if(5)
|
||||||
user << "<span class='warning'>The [src] is busy.</span>"
|
user << "<span class='warning'>The [src] is busy.</span>"
|
||||||
@@ -178,13 +192,13 @@
|
|||||||
if(7)
|
if(7)
|
||||||
if(gibs_ready)
|
if(gibs_ready)
|
||||||
gibs_ready = 0
|
gibs_ready = 0
|
||||||
if(locate(/mob,contents))
|
if(locate(/mob,washing))
|
||||||
var/mob/M = locate(/mob,contents)
|
var/mob/M = locate(/mob,washing)
|
||||||
M.gib()
|
M.gib()
|
||||||
for(var/atom/movable/O in contents)
|
for(var/atom/movable/O in washing)
|
||||||
O.loc = src.loc
|
O.loc = src.loc
|
||||||
crayon = null
|
crayon = null
|
||||||
state = 1
|
state = 1
|
||||||
|
washing.Cut()
|
||||||
|
|
||||||
update_icon()
|
update_icon()
|
||||||
@@ -5,6 +5,7 @@
|
|||||||
icon_state = "recharge_floor"
|
icon_state = "recharge_floor"
|
||||||
density = 0
|
density = 0
|
||||||
layer = TURF_LAYER + 0.1
|
layer = TURF_LAYER + 0.1
|
||||||
|
circuit = /obj/item/weapon/circuitboard/mech_recharger
|
||||||
|
|
||||||
var/obj/mecha/charging = null
|
var/obj/mecha/charging = null
|
||||||
var/charge = 45
|
var/charge = 45
|
||||||
@@ -14,7 +15,6 @@
|
|||||||
..()
|
..()
|
||||||
component_parts = list()
|
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/capacitor(src)
|
component_parts += new /obj/item/weapon/stock_parts/capacitor(src)
|
||||||
component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)
|
component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
idle_power_usage = 20
|
idle_power_usage = 20
|
||||||
active_power_usage = 5000
|
active_power_usage = 5000
|
||||||
req_access = list(access_robotics)
|
req_access = list(access_robotics)
|
||||||
|
circuit = /obj/item/weapon/circuitboard/mechfab
|
||||||
|
|
||||||
var/speed = 1
|
var/speed = 1
|
||||||
var/mat_efficiency = 1
|
var/mat_efficiency = 1
|
||||||
@@ -29,7 +30,6 @@
|
|||||||
..()
|
..()
|
||||||
|
|
||||||
component_parts = list()
|
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/matter_bin(src)
|
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
|
||||||
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
|
component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
|
||||||
|
|||||||
@@ -76,13 +76,10 @@
|
|||||||
|
|
||||||
/obj/item/equipped()
|
/obj/item/equipped()
|
||||||
..()
|
..()
|
||||||
var/mob/M = loc
|
var/mob/living/M = loc
|
||||||
if(!istype(M))
|
if(!istype(M))
|
||||||
return
|
return
|
||||||
if(M.l_hand)
|
M.update_held_icons()
|
||||||
M.l_hand.update_held_icon()
|
|
||||||
if(M.r_hand)
|
|
||||||
M.r_hand.update_held_icon()
|
|
||||||
|
|
||||||
/obj/item/Destroy()
|
/obj/item/Destroy()
|
||||||
if(ismob(loc))
|
if(ismob(loc))
|
||||||
@@ -98,8 +95,8 @@
|
|||||||
|
|
||||||
//Checks if the item is being held by a mob, and if so, updates the held icons
|
//Checks if the item is being held by a mob, and if so, updates the held icons
|
||||||
/obj/item/proc/update_held_icon()
|
/obj/item/proc/update_held_icon()
|
||||||
if(ismob(src.loc))
|
if(isliving(src.loc))
|
||||||
var/mob/M = src.loc
|
var/mob/living/M = src.loc
|
||||||
if(M.l_hand == src)
|
if(M.l_hand == src)
|
||||||
M.update_inv_l_hand()
|
M.update_inv_l_hand()
|
||||||
else if(M.r_hand == src)
|
else if(M.r_hand == src)
|
||||||
@@ -160,7 +157,7 @@
|
|||||||
size = "huge"
|
size = "huge"
|
||||||
return ..(user, distance, "", "It is a [size] item.")
|
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 (!user) return
|
||||||
if (hasorgans(user))
|
if (hasorgans(user))
|
||||||
var/mob/living/carbon/human/H = 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
|
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>"
|
usr << "<span class='warning'>You can't pick things up!</span>"
|
||||||
return
|
return
|
||||||
|
var/mob/living/carbon/C = usr
|
||||||
if( usr.stat || usr.restrained() )//Is not asleep/dead and is not restrained
|
if( usr.stat || usr.restrained() )//Is not asleep/dead and is not restrained
|
||||||
usr << "<span class='warning'>You can't pick things up!</span>"
|
usr << "<span class='warning'>You can't pick things up!</span>"
|
||||||
return
|
return
|
||||||
if(src.anchored) //Object isn't anchored
|
if(src.anchored) //Object isn't anchored
|
||||||
usr << "<span class='warning'>You can't pick that up!</span>"
|
usr << "<span class='warning'>You can't pick that up!</span>"
|
||||||
return
|
return
|
||||||
if(!usr.hand && usr.r_hand) //Right hand is not full
|
if(C.get_active_hand()) //Hand is not full
|
||||||
usr << "<span class='warning'>Your right hand is full.</span>"
|
usr << "<span class='warning'>Your 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>"
|
|
||||||
return
|
return
|
||||||
if(!istype(src.loc, /turf)) //Object is on a turf
|
if(!istype(src.loc, /turf)) //Object is on a turf
|
||||||
usr << "<span class='warning'>You can't pick that up!</span>"
|
usr << "<span class='warning'>You can't pick that up!</span>"
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
var/code = 2
|
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)
|
if(src == user.back)
|
||||||
user << "<span class='notice'>You need help taking this off!</span>"
|
user << "<span class='notice'>You need help taking this off!</span>"
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -6,8 +6,10 @@
|
|||||||
w_class = 4.0
|
w_class = 4.0
|
||||||
canhear_range = 2
|
canhear_range = 2
|
||||||
flags = CONDUCT | NOBLOODY
|
flags = CONDUCT | NOBLOODY
|
||||||
|
var/circuit = /obj/item/weapon/circuitboard/intercom
|
||||||
var/number = 0
|
var/number = 0
|
||||||
var/last_tick //used to delay the powercheck
|
var/last_tick //used to delay the powercheck
|
||||||
|
var/wiresexposed = 0
|
||||||
|
|
||||||
/obj/item/device/radio/intercom/custom
|
/obj/item/device/radio/intercom/custom
|
||||||
name = "station intercom (Custom)"
|
name = "station intercom (Custom)"
|
||||||
@@ -81,6 +83,41 @@
|
|||||||
spawn (0)
|
spawn (0)
|
||||||
attack_self(user)
|
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)
|
/obj/item/device/radio/intercom/receive_range(freq, level)
|
||||||
if (!on)
|
if (!on)
|
||||||
return -1
|
return -1
|
||||||
@@ -110,7 +147,13 @@
|
|||||||
on = A.powered(EQUIP) // set "on" to the power status
|
on = A.powered(EQUIP) // set "on" to the power status
|
||||||
|
|
||||||
if(!on)
|
if(!on)
|
||||||
|
if(wiresexposed)
|
||||||
|
icon_state = "intercom-p_open"
|
||||||
|
else
|
||||||
icon_state = "intercom-p"
|
icon_state = "intercom-p"
|
||||||
|
else
|
||||||
|
if(wiresexposed)
|
||||||
|
icon_state = "intercom_open"
|
||||||
else
|
else
|
||||||
icon_state = initial(icon_state)
|
icon_state = initial(icon_state)
|
||||||
|
|
||||||
|
|||||||
@@ -209,7 +209,7 @@
|
|||||||
amount = 5
|
amount = 5
|
||||||
max_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(..())
|
if(..())
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|||||||
@@ -160,20 +160,7 @@
|
|||||||
P.icon_state = "paper_words"
|
P.icon_state = "paper_words"
|
||||||
|
|
||||||
if(istype(usr,/mob/living/carbon))
|
if(istype(usr,/mob/living/carbon))
|
||||||
// place the item in the usr's hand if possible
|
usr.put_in_hands(src)
|
||||||
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()
|
|
||||||
|
|
||||||
/obj/item/weapon/autopsy_scanner/attack(mob/living/carbon/human/M as mob, mob/living/carbon/user as mob)
|
/obj/item/weapon/autopsy_scanner/attack(mob/living/carbon/human/M as mob, mob/living/carbon/user as mob)
|
||||||
if(!istype(M))
|
if(!istype(M))
|
||||||
|
|||||||
@@ -445,7 +445,6 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
|||||||
/obj/item/weapon/flame/lighter/attack_self(mob/living/user)
|
/obj/item/weapon/flame/lighter/attack_self(mob/living/user)
|
||||||
if(!base_state)
|
if(!base_state)
|
||||||
base_state = icon_state
|
base_state = icon_state
|
||||||
if(user.r_hand == src || user.l_hand == src)
|
|
||||||
if(!lit)
|
if(!lit)
|
||||||
lit = 1
|
lit = 1
|
||||||
icon_state = "[base_state]on"
|
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>")
|
user.visible_message("<span class='notice'>After a few attempts, [user] manages to light the [src].</span>")
|
||||||
else
|
else
|
||||||
user << "<span class='warning'>You burn yourself while lighting the lighter.</span>"
|
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")
|
user.apply_damage(2,BURN,"l_hand")
|
||||||
else
|
else
|
||||||
user.apply_damage(2,BURN,"r_hand")
|
user.apply_damage(2,BURN,"r_hand")
|
||||||
@@ -476,8 +475,6 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
|||||||
|
|
||||||
set_light(0)
|
set_light(0)
|
||||||
processing_objects.Remove(src)
|
processing_objects.Remove(src)
|
||||||
else
|
|
||||||
return ..()
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,16 @@
|
|||||||
network = list("MINE")
|
network = list("MINE")
|
||||||
req_access = list()
|
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)
|
/obj/item/weapon/circuitboard/security/construct(var/obj/machinery/computer/security/C)
|
||||||
if (..(C))
|
if (..(C))
|
||||||
C.network = network.Copy()
|
C.network = network.Copy()
|
||||||
|
|||||||
253
code/game/objects/items/weapons/circuitboards/frame.dm
Normal file
253
code/game/objects/items/weapons/circuitboards/frame.dm
Normal 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 )
|
||||||
@@ -77,7 +77,5 @@
|
|||||||
icon_state = "purplecomb"
|
icon_state = "purplecomb"
|
||||||
item_state = "purplecomb"
|
item_state = "purplecomb"
|
||||||
|
|
||||||
/obj/item/weapon/haircomb/attack_self(mob/user)
|
/obj/item/weapon/haircomb/attack_self(mob/living/user)
|
||||||
if(user.r_hand == src || user.l_hand == src)
|
|
||||||
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"))
|
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
|
|
||||||
|
|||||||
@@ -39,8 +39,8 @@
|
|||||||
return null
|
return null
|
||||||
var/turf/location = loc
|
var/turf/location = loc
|
||||||
if(istype(location, /mob/))
|
if(istype(location, /mob/))
|
||||||
var/mob/M = location
|
var/mob/living/M = location
|
||||||
if(M.l_hand == src || M.r_hand == src)
|
if(M.item_is_in_hands(src))
|
||||||
location = M.loc
|
location = M.loc
|
||||||
if(isturf(location)) //start a fire if possible
|
if(isturf(location)) //start a fire if possible
|
||||||
location.hotspot_expose(700, 2)
|
location.hotspot_expose(700, 2)
|
||||||
|
|||||||
@@ -125,12 +125,12 @@
|
|||||||
icon_state = "wrap_paper"
|
icon_state = "wrap_paper"
|
||||||
var/amount = 20.0
|
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) ))
|
if (!( locate(/obj/structure/table, src.loc) ))
|
||||||
user << "<span class='warning'>You MUST put the paper on a table!</span>"
|
user << "<span class='warning'>You MUST put the paper on a table!</span>"
|
||||||
if (W.w_class < 4)
|
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)
|
var/a_used = 2 ** (src.w_class - 1)
|
||||||
if (src.amount < a_used)
|
if (src.amount < a_used)
|
||||||
user << "<span class='warning'>You need more paper!</span>"
|
user << "<span class='warning'>You need more paper!</span>"
|
||||||
|
|||||||
@@ -24,8 +24,8 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
attack_hand(mob/user as mob)
|
attack_hand(mob/living/user as mob)
|
||||||
if ((src.case && (user.l_hand == src || user.r_hand == src)))
|
if ((src.case && user.item_is_in_hands(src)))
|
||||||
user.put_in_active_hand(case)
|
user.put_in_active_hand(case)
|
||||||
|
|
||||||
src.case.add_fingerprint(user)
|
src.case.add_fingerprint(user)
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
/obj/item/weapon/material/twohanded/update_held_icon()
|
/obj/item/weapon/material/twohanded/update_held_icon()
|
||||||
var/mob/living/M = loc
|
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
|
wielded = 1
|
||||||
force = force_wielded
|
force = force_wielded
|
||||||
name = "[base_name] (wielded)"
|
name = "[base_name] (wielded)"
|
||||||
|
|||||||
@@ -214,7 +214,7 @@
|
|||||||
spawn(1) if(src) qdel(src)
|
spawn(1) if(src) qdel(src)
|
||||||
|
|
||||||
/obj/item/weapon/melee/energy/blade/process()
|
/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.
|
// Tidy up a bit.
|
||||||
if(istype(loc,/mob/living))
|
if(istype(loc,/mob/living))
|
||||||
var/mob/living/carbon/human/host = loc
|
var/mob/living/carbon/human/host = loc
|
||||||
|
|||||||
@@ -59,7 +59,7 @@
|
|||||||
spawn(1) if(src) del(src)
|
spawn(1) if(src) del(src)
|
||||||
|
|
||||||
/obj/item/weapon/mop_deploy/process()
|
/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.
|
// Tidy up a bit.
|
||||||
if(istype(loc,/mob/living))
|
if(istype(loc,/mob/living))
|
||||||
var/mob/living/carbon/human/host = loc
|
var/mob/living/carbon/human/host = loc
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
var/linked
|
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))
|
if(ishuman(user))
|
||||||
var/mob/living/carbon/human/H = user
|
var/mob/living/carbon/human/H = user
|
||||||
var/obj/item/organ/external/temp = H.get_organ("r_hand")
|
var/obj/item/organ/external/temp = H.get_organ("r_hand")
|
||||||
|
|||||||
@@ -173,7 +173,7 @@
|
|||||||
user << text("\icon[] [] contains []/[] units of fuel!", src, src.name, get_fuel(),src.max_fuel )
|
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(istype(W,/obj/item/weapon/screwdriver))
|
||||||
if(welding)
|
if(welding)
|
||||||
user << "<span class='danger'>Stop welding first!</span>"
|
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...
|
//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.
|
//...but it doesnt check to see if the welder is on or not.
|
||||||
var/turf/location = src.loc
|
var/turf/location = src.loc
|
||||||
if(istype(location, /mob/))
|
if(istype(location, /mob/living))
|
||||||
var/mob/M = location
|
var/mob/living/M = location
|
||||||
if(M.l_hand == src || M.r_hand == src)
|
if(M.item_is_in_hands(src))
|
||||||
location = get_turf(M)
|
location = get_turf(M)
|
||||||
if (istype(location, /turf))
|
if (istype(location, /turf))
|
||||||
location.hotspot_expose(700, 5)
|
location.hotspot_expose(700, 5)
|
||||||
|
|||||||
@@ -90,11 +90,12 @@
|
|||||||
// check for TK users
|
// check for TK users
|
||||||
|
|
||||||
if (istype(usr, /mob/living/carbon/human))
|
if (istype(usr, /mob/living/carbon/human))
|
||||||
if(istype(usr.l_hand, /obj/item/tk_grab) || istype(usr.r_hand, /obj/item/tk_grab/))
|
var/mob/living/carbon/human/H = usr
|
||||||
if(!(usr in nearby))
|
if(H.get_type_in_hands(/obj/item/tk_grab))
|
||||||
if(usr.client && usr.machine==src)
|
if(!(H in nearby))
|
||||||
|
if(H.client && H.machine==src)
|
||||||
is_in_use = 1
|
is_in_use = 1
|
||||||
src.attack_hand(usr)
|
src.attack_hand(H)
|
||||||
in_use = is_in_use
|
in_use = is_in_use
|
||||||
|
|
||||||
/obj/proc/updateDialog()
|
/obj/proc/updateDialog()
|
||||||
|
|||||||
@@ -297,6 +297,7 @@
|
|||||||
new /obj/item/taperoll/police(src)
|
new /obj/item/taperoll/police(src)
|
||||||
new /obj/item/weapon/gun/projectile/colt/detective(src)
|
new /obj/item/weapon/gun/projectile/colt/detective(src)
|
||||||
new /obj/item/clothing/accessory/holster/armpit(src)
|
new /obj/item/clothing/accessory/holster/armpit(src)
|
||||||
|
new /obj/item/device/flashlight/maglight(src)
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/structure/closet/secure_closet/detective/update_icon()
|
/obj/structure/closet/secure_closet/detective/update_icon()
|
||||||
|
|||||||
@@ -35,6 +35,21 @@
|
|||||||
icon_state = "open"
|
icon_state = "open"
|
||||||
layer = SHOWER_OPEN_LAYER
|
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
|
/obj/structure/curtain/black
|
||||||
name = "black curtain"
|
name = "black curtain"
|
||||||
color = "#222222"
|
color = "#222222"
|
||||||
|
|||||||
@@ -8,8 +8,18 @@
|
|||||||
var/obj/item/weapon/extinguisher/has_extinguisher
|
var/obj/item/weapon/extinguisher/has_extinguisher
|
||||||
var/opened = 0
|
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)
|
has_extinguisher = new/obj/item/weapon/extinguisher(src)
|
||||||
|
|
||||||
/obj/structure/extinguisher_cabinet/attackby(obj/item/O, mob/user)
|
/obj/structure/extinguisher_cabinet/attackby(obj/item/O, mob/user)
|
||||||
@@ -23,12 +33,21 @@
|
|||||||
user << "<span class='notice'>You place [O] in [src].</span>"
|
user << "<span class='notice'>You place [O] in [src].</span>"
|
||||||
else
|
else
|
||||||
opened = !opened
|
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
|
else
|
||||||
opened = !opened
|
opened = !opened
|
||||||
update_icon()
|
update_icon()
|
||||||
|
|
||||||
|
|
||||||
/obj/structure/extinguisher_cabinet/attack_hand(mob/user)
|
/obj/structure/extinguisher_cabinet/attack_hand(mob/living/user)
|
||||||
if(isrobot(user))
|
if(isrobot(user))
|
||||||
return
|
return
|
||||||
if (ishuman(user))
|
if (ishuman(user))
|
||||||
|
|||||||
@@ -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)
|
if(user.stat || user.stunned || user.weakened || user.paralysis)
|
||||||
unbuckle_mob()
|
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)
|
step(src, direction)
|
||||||
update_mob()
|
update_mob()
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -8,9 +8,18 @@
|
|||||||
anchored = 1
|
anchored = 1
|
||||||
var/shattered = 0
|
var/shattered = 0
|
||||||
var/list/ui_users = list()
|
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)
|
/obj/structure/mirror/attack_hand(mob/user as mob)
|
||||||
|
if(!glass) return
|
||||||
if(shattered) return
|
if(shattered) return
|
||||||
|
|
||||||
if(ishuman(user))
|
if(ishuman(user))
|
||||||
@@ -22,6 +31,7 @@
|
|||||||
AC.ui_interact(user)
|
AC.ui_interact(user)
|
||||||
|
|
||||||
/obj/structure/mirror/proc/shatter()
|
/obj/structure/mirror/proc/shatter()
|
||||||
|
if(!glass) return
|
||||||
if(shattered) return
|
if(shattered) return
|
||||||
shattered = 1
|
shattered = 1
|
||||||
icon_state = "mirror_broke"
|
icon_state = "mirror_broke"
|
||||||
@@ -34,17 +44,56 @@
|
|||||||
if(prob(Proj.get_structure_damage() * 2))
|
if(prob(Proj.get_structure_damage() * 2))
|
||||||
if(!shattered)
|
if(!shattered)
|
||||||
shatter()
|
shatter()
|
||||||
else
|
else if(glass)
|
||||||
playsound(src, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
|
playsound(src, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
|
||||||
..()
|
..()
|
||||||
|
|
||||||
/obj/structure/mirror/attackby(obj/item/I as obj, mob/user as mob)
|
/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)
|
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
|
||||||
return
|
return
|
||||||
|
|
||||||
if(prob(I.force * 2))
|
if(prob(I.force * 2))
|
||||||
visible_message("<span class='warning'>[user] smashes [src] with [I]!</span>")
|
visible_message("<span class='warning'>[user] smashes [src] with [I]!</span>")
|
||||||
|
if(glass)
|
||||||
shatter()
|
shatter()
|
||||||
else
|
else
|
||||||
visible_message("<span class='warning'>[user] hits [src] with [I]!</span>")
|
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)
|
/obj/structure/mirror/attack_generic(var/mob/user, var/damage)
|
||||||
|
|
||||||
user.do_attack_animation(src)
|
user.do_attack_animation(src)
|
||||||
if(shattered)
|
if(shattered && glass)
|
||||||
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
|
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
if(damage)
|
if(damage)
|
||||||
user.visible_message("<span class='danger'>[user] smashes [src]!</span>")
|
user.visible_message("<span class='danger'>[user] smashes [src]!</span>")
|
||||||
|
if(glass)
|
||||||
shatter()
|
shatter()
|
||||||
else
|
else
|
||||||
user.visible_message("<span class='danger'>[user] hits [src] and bounces off!</span>")
|
user.visible_message("<span class='danger'>[user] hits [src] and bounces off!</span>")
|
||||||
|
|||||||
@@ -7,6 +7,18 @@
|
|||||||
anchored = 1
|
anchored = 1
|
||||||
var/notices = 0
|
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()
|
/obj/structure/noticeboard/initialize()
|
||||||
for(var/obj/item/I in loc)
|
for(var/obj/item/I in loc)
|
||||||
if(notices > 4) break
|
if(notices > 4) break
|
||||||
@@ -28,6 +40,14 @@
|
|||||||
user << "<span class='notice'>You pin the paper to the noticeboard.</span>"
|
user << "<span class='notice'>You pin the paper to the noticeboard.</span>"
|
||||||
else
|
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>"
|
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)
|
/obj/structure/noticeboard/attack_hand(var/mob/user)
|
||||||
examine(user)
|
examine(user)
|
||||||
@@ -64,15 +84,14 @@
|
|||||||
return
|
return
|
||||||
var/obj/item/P = locate(href_list["write"])
|
var/obj/item/P = locate(href_list["write"])
|
||||||
if((P && P.loc == src)) //ifthe paper's on the board
|
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
|
var/mob/living/M = usr
|
||||||
add_fingerprint(usr)
|
if(istype(M))
|
||||||
P.attackby(usr.r_hand, usr) //then do ittttt
|
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
|
else
|
||||||
if(istype(usr.l_hand, /obj/item/weapon/pen)) //check other hand for pen
|
M << "<span class='notice'>You'll need something to write with!</span>"
|
||||||
add_fingerprint(usr)
|
|
||||||
P.attackby(usr.l_hand, usr)
|
|
||||||
else
|
|
||||||
usr << "<span class='notice'>You'll need something to write with!</span>"
|
|
||||||
if(href_list["read"])
|
if(href_list["read"])
|
||||||
var/obj/item/weapon/paper/P = locate(href_list["read"])
|
var/obj/item/weapon/paper/P = locate(href_list["read"])
|
||||||
if((P && P.loc == src))
|
if((P && P.loc == src))
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ FLOOR SAFES
|
|||||||
var/mob/living/carbon/human/user = usr
|
var/mob/living/carbon/human/user = usr
|
||||||
|
|
||||||
var/canhear = 0
|
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
|
canhear = 1
|
||||||
|
|
||||||
if(href_list["open"])
|
if(href_list["open"])
|
||||||
|
|||||||
@@ -358,7 +358,7 @@
|
|||||||
if (ishuman(user))
|
if (ishuman(user))
|
||||||
var/mob/living/carbon/human/H = user
|
var/mob/living/carbon/human/H = user
|
||||||
var/obj/item/organ/external/temp = H.organs_by_name["r_hand"]
|
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"]
|
temp = H.organs_by_name["l_hand"]
|
||||||
if(temp && !temp.is_usable())
|
if(temp && !temp.is_usable())
|
||||||
user << "<span class='notice'>You try to move your [temp.name], but cannot!</span>"
|
user << "<span class='notice'>You try to move your [temp.name], but cannot!</span>"
|
||||||
|
|||||||
@@ -55,6 +55,20 @@ var/list/mechtoys = list(
|
|||||||
/mob/living/silicon/robot/drone
|
/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)
|
/obj/structure/plasticflaps/CanPass(atom/A, turf/T)
|
||||||
if(istype(A) && A.checkpass(PASSGLASS))
|
if(istype(A) && A.checkpass(PASSGLASS))
|
||||||
return prob(60)
|
return prob(60)
|
||||||
|
|||||||
@@ -94,7 +94,7 @@
|
|||||||
..()
|
..()
|
||||||
|
|
||||||
|
|
||||||
on_found(mob/finder as mob)
|
on_found(mob/living/finder as mob)
|
||||||
if(armed)
|
if(armed)
|
||||||
finder.visible_message("<span class='warning'>[finder] accidentally sets off [src], breaking their fingers.</span>", \
|
finder.visible_message("<span class='warning'>[finder] accidentally sets off [src], breaking their fingers.</span>", \
|
||||||
"<span class='warning'>You accidentally trigger [src]!</span>")
|
"<span class='warning'>You accidentally trigger [src]!</span>")
|
||||||
|
|||||||
@@ -76,7 +76,7 @@
|
|||||||
var/turf/location = src.loc
|
var/turf/location = src.loc
|
||||||
if(istype(location, /mob/))
|
if(istype(location, /mob/))
|
||||||
var/mob/living/carbon/human/M = location
|
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
|
location = M.loc
|
||||||
|
|
||||||
if (istype(location, /turf))
|
if (istype(location, /turf))
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
say_verbs = list("mumbles", "says")
|
say_verbs = list("mumbles", "says")
|
||||||
|
|
||||||
// Clumsy folks can't take the mask off themselves.
|
// 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())
|
if(user.wear_mask == src && !user.IsAdvancedToolUser())
|
||||||
return 0
|
return 0
|
||||||
..()
|
..()
|
||||||
|
|||||||
@@ -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(electrified != 0)
|
||||||
if(shock(user)) //Handles removing charge from the cell, as well. No need to do that here.
|
if(shock(user)) //Handles removing charge from the cell, as well. No need to do that here.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
/obj/item/clothing/suit/armor
|
/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
|
body_parts_covered = UPPER_TORSO|LOWER_TORSO
|
||||||
item_flags = THICKMATERIAL
|
item_flags = THICKMATERIAL
|
||||||
|
|
||||||
@@ -263,7 +263,7 @@
|
|||||||
icon_state = "kvest"
|
icon_state = "kvest"
|
||||||
item_state = "kvest"
|
item_state = "kvest"
|
||||||
armor = list(melee = 40, bullet = 30, laser = 30, energy = 10, bomb = 10, bio = 0, rad = 0)
|
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
|
body_parts_covered = UPPER_TORSO|LOWER_TORSO
|
||||||
item_flags = THICKMATERIAL
|
item_flags = THICKMATERIAL
|
||||||
|
|||||||
@@ -96,7 +96,7 @@
|
|||||||
item_state = "det_suit"
|
item_state = "det_suit"
|
||||||
blood_overlay_type = "coat"
|
blood_overlay_type = "coat"
|
||||||
body_parts_covered = UPPER_TORSO|ARMS
|
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)
|
armor = list(melee = 50, bullet = 10, laser = 25, energy = 10, bomb = 0, bio = 0, rad = 0)
|
||||||
|
|
||||||
/obj/item/clothing/suit/storage/det_trench/grey
|
/obj/item/clothing/suit/storage/det_trench/grey
|
||||||
@@ -109,7 +109,7 @@
|
|||||||
desc = "A forensics technician jacket."
|
desc = "A forensics technician jacket."
|
||||||
item_state = "det_suit"
|
item_state = "det_suit"
|
||||||
body_parts_covered = UPPER_TORSO|ARMS
|
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)
|
armor = list(melee = 10, bullet = 10, laser = 15, energy = 10, bomb = 0, bio = 0, rad = 0)
|
||||||
|
|
||||||
/obj/item/clothing/suit/storage/forensics/red
|
/obj/item/clothing/suit/storage/forensics/red
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
var/mob/living/carbon/human/user = usr
|
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
|
return //bag must be in your hands to use
|
||||||
|
|
||||||
if (isturf(I.loc))
|
if (isturf(I.loc))
|
||||||
@@ -31,10 +31,8 @@
|
|||||||
var/obj/item/weapon/storage/U = I.loc
|
var/obj/item/weapon/storage/U = I.loc
|
||||||
user.client.screen -= I
|
user.client.screen -= I
|
||||||
U.contents.Remove(I)
|
U.contents.Remove(I)
|
||||||
else if(user.l_hand == I) //in a hand
|
else if(user.item_is_in_hands(I))
|
||||||
user.drop_l_hand()
|
user.drop_from_inventory(I)
|
||||||
else if(user.r_hand == I) //in a hand
|
|
||||||
user.drop_r_hand()
|
|
||||||
else
|
else
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ log transactions
|
|||||||
anchored = 1
|
anchored = 1
|
||||||
use_power = 1
|
use_power = 1
|
||||||
idle_power_usage = 10
|
idle_power_usage = 10
|
||||||
|
circuit = /obj/item/weapon/circuitboard/atm
|
||||||
var/datum/money_account/authenticated_account
|
var/datum/money_account/authenticated_account
|
||||||
var/number_incorrect_tries = 0
|
var/number_incorrect_tries = 0
|
||||||
var/previous_account_number = 0
|
var/previous_account_number = 0
|
||||||
@@ -79,6 +80,25 @@ log transactions
|
|||||||
return 1
|
return 1
|
||||||
|
|
||||||
/obj/machinery/atm/attackby(obj/item/I as obj, mob/user as mob)
|
/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(istype(I, /obj/item/weapon/card))
|
||||||
if(emagged > 0)
|
if(emagged > 0)
|
||||||
//prevent inserting id into an emagged ATM
|
//prevent inserting id into an emagged ATM
|
||||||
|
|||||||
@@ -61,7 +61,10 @@
|
|||||||
/datum/event/prison_break/tick()
|
/datum/event/prison_break/tick()
|
||||||
if(activeFor == releaseWhen)
|
if(activeFor == releaseWhen)
|
||||||
if(areas && areas.len > 0)
|
if(areas && areas.len > 0)
|
||||||
|
var/obj/machinery/power/apc/theAPC = null
|
||||||
for(var/area/A in areas)
|
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)
|
for(var/obj/machinery/light/L in A)
|
||||||
L.flicker(10)
|
L.flicker(10)
|
||||||
|
|
||||||
|
|||||||
@@ -77,12 +77,8 @@
|
|||||||
usr << "There are no cards in the deck."
|
usr << "There are no cards in the deck."
|
||||||
return
|
return
|
||||||
|
|
||||||
var/obj/item/weapon/hand/H
|
var/obj/item/weapon/hand/H = user.get_type_in_hands(/obj/item/weapon/hand)
|
||||||
if(user.l_hand && istype(user.l_hand,/obj/item/weapon/hand))
|
if(!H)
|
||||||
H = user.l_hand
|
|
||||||
else if(user.r_hand && istype(user.r_hand,/obj/item/weapon/hand))
|
|
||||||
H = user.r_hand
|
|
||||||
else
|
|
||||||
H = new(get_turf(src))
|
H = new(get_turf(src))
|
||||||
user.put_in_hands(H)
|
user.put_in_hands(H)
|
||||||
|
|
||||||
|
|||||||
@@ -172,7 +172,7 @@
|
|||||||
if(seed) seed.thrown_at(src,hit_atom)
|
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)
|
||||||
if(seed.get_trait(TRAIT_PRODUCES_POWER) && istype(W, /obj/item/stack/cable_coil))
|
if(seed.get_trait(TRAIT_PRODUCES_POWER) && istype(W, /obj/item/stack/cable_coil))
|
||||||
@@ -181,7 +181,7 @@
|
|||||||
//TODO: generalize this.
|
//TODO: generalize this.
|
||||||
user << "<span class='notice'>You add some cable to the [src.name] and slide it inside the battery casing.</span>"
|
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))
|
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)
|
user.put_in_hands(pocell)
|
||||||
pocell.maxcharge = src.potency * 10
|
pocell.maxcharge = src.potency * 10
|
||||||
pocell.charge = pocell.maxcharge
|
pocell.charge = pocell.maxcharge
|
||||||
|
|||||||
@@ -150,7 +150,7 @@
|
|||||||
var/body_coverage = HEAD|FACE|EYES|UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
|
var/body_coverage = HEAD|FACE|EYES|UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
|
||||||
|
|
||||||
for(var/obj/item/clothing/clothes in target)
|
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
|
continue
|
||||||
body_coverage &= ~(clothes.body_parts_covered)
|
body_coverage &= ~(clothes.body_parts_covered)
|
||||||
|
|
||||||
@@ -182,7 +182,7 @@
|
|||||||
continue
|
continue
|
||||||
var/body_coverage = HEAD|FACE|EYES|UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
|
var/body_coverage = HEAD|FACE|EYES|UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
|
||||||
for(var/obj/item/clothing/clothes in M)
|
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
|
continue
|
||||||
body_coverage &= ~(clothes.body_parts_covered)
|
body_coverage &= ~(clothes.body_parts_covered)
|
||||||
if(!body_coverage)
|
if(!body_coverage)
|
||||||
|
|||||||
@@ -94,16 +94,10 @@
|
|||||||
user << "You load [W] into [src]."
|
user << "You load [W] into [src]."
|
||||||
return
|
return
|
||||||
|
|
||||||
if(istype(W,/obj/item/weapon/screwdriver))
|
if(default_deconstruction_screwdriver(user, W))
|
||||||
open = !open
|
|
||||||
user << "<span class='notice'>You [open ? "open" : "close"] the maintenance panel.</span>"
|
|
||||||
return
|
return
|
||||||
|
if(default_deconstruction_crowbar(user, W))
|
||||||
if(open)
|
|
||||||
if(istype(W, /obj/item/weapon/crowbar))
|
|
||||||
dismantle()
|
|
||||||
return
|
return
|
||||||
|
|
||||||
if(istype(W,/obj/item/weapon/disk/botany))
|
if(istype(W,/obj/item/weapon/disk/botany))
|
||||||
if(loaded_disk)
|
if(loaded_disk)
|
||||||
user << "There is already a data disk loaded."
|
user << "There is already a data disk loaded."
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(get_turf(src))
|
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(get_turf(src))
|
||||||
P.name = "paper - [form_title]"
|
P.name = "paper - [form_title]"
|
||||||
P.info = "[last_data]"
|
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.put_in_hands(P)
|
||||||
user.visible_message("\The [src] spits out a piece of paper.")
|
user.visible_message("\The [src] spits out a piece of paper.")
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
user << "<span class='notice'>You begin dismantling \the [src].</span>"
|
user << "<span class='notice'>You begin dismantling \the [src].</span>"
|
||||||
if(do_after(user,25))
|
if(do_after(user,25))
|
||||||
user << "<span class='notice'>You dismantle \the [src].</span>"
|
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)
|
for(var/obj/item/weapon/book/b in contents)
|
||||||
b.loc = (get_turf(src))
|
b.loc = (get_turf(src))
|
||||||
qdel(src)
|
qdel(src)
|
||||||
|
|||||||
@@ -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("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("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("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("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("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( \
|
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), \
|
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("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), \
|
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("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("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("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("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_list("filing cabinets", list( \
|
||||||
recipes += new/datum/stack_recipe("fire alarm frame", /obj/item/frame/fire_alarm, 2)
|
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()
|
/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("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("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("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()
|
/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("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("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("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()
|
/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 assembly", /obj/item/beehive_assembly, 4)
|
||||||
recipes += new/datum/stack_recipe("beehive frame", /obj/item/honey_frame, 1)
|
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("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()
|
/material/cardboard/generate_recipes()
|
||||||
..()
|
..()
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ var/list/name_to_material
|
|||||||
S.add_fingerprint(user)
|
S.add_fingerprint(user)
|
||||||
S.add_to_stacks(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)
|
if(!wire_product)
|
||||||
user << "<span class='warning'>You cannot make anything out of \the [target_stack]</span>"
|
user << "<span class='warning'>You cannot make anything out of \the [target_stack]</span>"
|
||||||
return
|
return
|
||||||
@@ -140,7 +140,6 @@ var/list/name_to_material
|
|||||||
target_stack.use(1)
|
target_stack.use(1)
|
||||||
user << "<span class='notice'>You attach wire to the [name].</span>"
|
user << "<span class='notice'>You attach wire to the [name].</span>"
|
||||||
var/obj/item/product = new wire_product(get_turf(user))
|
var/obj/item/product = new wire_product(get_turf(user))
|
||||||
if(!(user.l_hand && user.r_hand))
|
|
||||||
user.put_in_hands(product)
|
user.put_in_hands(product)
|
||||||
|
|
||||||
// Make sure we have a display name and shard icon even if they aren't explicitly set.
|
// Make sure we have a display name and shard icon even if they aren't explicitly set.
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
name = "mining drill head"
|
name = "mining drill head"
|
||||||
desc = "An enormous drill."
|
desc = "An enormous drill."
|
||||||
icon_state = "mining_drill"
|
icon_state = "mining_drill"
|
||||||
|
circuit = /obj/item/weapon/circuitboard/miningdrill
|
||||||
var/braces_needed = 2
|
var/braces_needed = 2
|
||||||
var/list/supports = list()
|
var/list/supports = list()
|
||||||
var/supported = 0
|
var/supported = 0
|
||||||
@@ -43,7 +44,6 @@
|
|||||||
..()
|
..()
|
||||||
|
|
||||||
component_parts = list()
|
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/matter_bin(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/micro_laser(src)
|
component_parts += new /obj/item/weapon/stock_parts/micro_laser(src)
|
||||||
|
|||||||
@@ -172,10 +172,9 @@ var/list/mining_overlay_cache = list()
|
|||||||
|
|
||||||
if(istype(AM,/mob/living/carbon/human))
|
if(istype(AM,/mob/living/carbon/human))
|
||||||
var/mob/living/carbon/human/H = AM
|
var/mob/living/carbon/human/H = AM
|
||||||
if((istype(H.l_hand,/obj/item/weapon/pickaxe)) && (!H.hand))
|
var/obj/item/weapon/pickaxe/P = H.get_inactive_hand()
|
||||||
attackby(H.l_hand,H)
|
if(istype(P))
|
||||||
else if((istype(H.r_hand,/obj/item/weapon/pickaxe)) && H.hand)
|
src.attackby(P, H)
|
||||||
attackby(H.r_hand,H)
|
|
||||||
|
|
||||||
else if(istype(AM,/mob/living/silicon/robot))
|
else if(istype(AM,/mob/living/silicon/robot))
|
||||||
var/mob/living/silicon/robot/R = AM
|
var/mob/living/silicon/robot/R = AM
|
||||||
|
|||||||
@@ -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.
|
//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( \
|
var/list/slot_equipment_priority = list( \
|
||||||
slot_back,\
|
slot_back,\
|
||||||
@@ -58,6 +18,49 @@ var/list/slot_equipment_priority = list( \
|
|||||||
slot_r_store\
|
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
|
//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)
|
/mob/proc/slot_is_accessible(var/slot, var/obj/item/I, mob/user=null)
|
||||||
return 1
|
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
|
//puts the item "W" into an appropriate slot in a human's inventory
|
||||||
//returns 0 if it cannot, 1 if successful
|
//returns 0 if it cannot, 1 if successful
|
||||||
/mob/proc/equip_to_appropriate_slot(obj/item/W)
|
/mob/proc/equip_to_appropriate_slot(obj/item/W)
|
||||||
if(!istype(W)) return 0
|
|
||||||
|
|
||||||
for(var/slot in slot_equipment_priority)
|
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))
|
if(equip_to_slot_if_possible(W, slot, del_on_fail=0, disable_warning=1, redraw_mob=1))
|
||||||
return 1
|
return 1
|
||||||
@@ -74,32 +75,15 @@ var/list/slot_equipment_priority = list( \
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
/mob/proc/equip_to_storage(obj/item/newitem)
|
/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
|
return 0
|
||||||
|
|
||||||
//These procs handle putting s tuff in your hand. It's probably best to use these rather than setting l_hand = ...etc
|
/* Hands */
|
||||||
//as they handle all relevant stuff like adding it to the player's screen and updating their overlays.
|
|
||||||
|
|
||||||
//Returns the thing in our active hand
|
//Returns the thing in our active hand
|
||||||
/mob/proc/get_active_hand()
|
/mob/proc/get_active_hand()
|
||||||
if(hand) return l_hand
|
|
||||||
else return r_hand
|
|
||||||
|
|
||||||
//Returns the thing in our inactive hand
|
//Returns the thing in our inactive hand
|
||||||
/mob/proc/get_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.
|
//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)
|
/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
|
//Drops the item in our left hand
|
||||||
/mob/proc/drop_l_hand(var/atom/Target)
|
/mob/proc/drop_l_hand(var/atom/Target)
|
||||||
return drop_from_inventory(l_hand, Target)
|
return 0
|
||||||
|
|
||||||
//Drops the item in our right hand
|
//Drops the item in our right hand
|
||||||
/mob/proc/drop_r_hand(var/atom/Target)
|
/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
|
//Drops the item in our active hand. TODO: rename this to drop_active_hand or something
|
||||||
/mob/proc/drop_item(var/atom/Target)
|
/mob/proc/drop_item(var/atom/Target)
|
||||||
if(hand) return drop_l_hand(Target)
|
return
|
||||||
else return drop_r_hand(Target)
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Removes the object from any slots the mob might have, calling the appropriate icon update proc.
|
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.
|
the search through all the slots, without having to duplicate the rest of the item dropping.
|
||||||
*/
|
*/
|
||||||
/mob/proc/u_equip(obj/W as obj)
|
/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)
|
/mob/proc/isEquipped(obj/item/I)
|
||||||
if(!I)
|
if(!I)
|
||||||
@@ -229,11 +199,6 @@ var/list/slot_equipment_priority = list( \
|
|||||||
|
|
||||||
//Returns the item equipped to the specified slot, if any.
|
//Returns the item equipped to the specified slot, if any.
|
||||||
/mob/proc/get_equipped_item(var/slot)
|
/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
|
return null
|
||||||
|
|
||||||
//Outdated but still in use apparently. This should at least be a human proc.
|
//Outdated but still in use apparently. This should at least be a human proc.
|
||||||
|
|||||||
@@ -288,7 +288,7 @@
|
|||||||
|
|
||||||
/* Assembly */
|
/* 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))
|
if(!istype(T, /obj/item/stack/tile/floor))
|
||||||
..()
|
..()
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
var/mob/living/carbon/human/H = over_object
|
var/mob/living/carbon/human/H = over_object
|
||||||
if(!istype(H) || !Adjacent(H))
|
if(!istype(H) || !Adjacent(H))
|
||||||
return ..()
|
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)
|
hat.loc = get_turf(src)
|
||||||
H.put_in_hands(hat)
|
H.put_in_hands(hat)
|
||||||
H.visible_message("<span class='danger'>\The [H] removes \the [src]'s [hat].</span>")
|
H.visible_message("<span class='danger'>\The [H] removes \the [src]'s [hat].</span>")
|
||||||
|
|||||||
@@ -3,40 +3,40 @@
|
|||||||
set name = "Give"
|
set name = "Give"
|
||||||
|
|
||||||
// TODO : Change to incapacitated() on merge.
|
// 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
|
return
|
||||||
if(!istype(target) || target.stat || target.lying || target.resting || target.buckled || target.client == null)
|
if(!istype(target) || target.stat || target.lying || target.resting || target.buckled || target.client == null)
|
||||||
return
|
return
|
||||||
|
|
||||||
var/obj/item/I = usr.get_active_hand()
|
var/obj/item/I = src.get_active_hand()
|
||||||
if(!I)
|
if(!I)
|
||||||
I = usr.get_inactive_hand()
|
I = src.get_inactive_hand()
|
||||||
if(!I)
|
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
|
return
|
||||||
|
|
||||||
if(alert(target,"[usr] wants to give you \a [I]. Will you accept it?",,"No","Yes") == "No")
|
if(alert(target,"[src] 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], \
|
target.visible_message("<span class='notice'>\The [src] tried to hand \the [I] to \the [target], \
|
||||||
but \the [target] didn't want it.</span>")
|
but \the [target] didn't want it.</span>")
|
||||||
return
|
return
|
||||||
|
|
||||||
if(!I) return
|
if(!I) return
|
||||||
|
|
||||||
if(!Adjacent(target))
|
if(!Adjacent(target))
|
||||||
usr << "<span class='warning'>You need to stay in reaching distance while giving an object.</span>"
|
src << "<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>"
|
target << "<span class='warning'>\The [src] moved too far away.</span>"
|
||||||
return
|
return
|
||||||
|
|
||||||
if(I.loc != usr || (usr.l_hand != I && usr.r_hand != I))
|
if(I.loc != src || !src.item_is_in_hands(I))
|
||||||
usr << "<span class='warning'>You need to keep the item in your hands.</span>"
|
src << "<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>"
|
target << "<span class='warning'>\The [src] seems to have given up on passing \the [I] to you.</span>"
|
||||||
return
|
return
|
||||||
|
|
||||||
if(target.r_hand != null && target.l_hand != null)
|
if(target.hands_are_full())
|
||||||
target << "<span class='warning'>Your hands are full.</span>"
|
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
|
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.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>")
|
||||||
|
|||||||
@@ -538,9 +538,9 @@
|
|||||||
if ("handshake")
|
if ("handshake")
|
||||||
m_type = 1
|
m_type = 1
|
||||||
if (!src.restrained() && !src.r_hand)
|
if (!src.restrained() && !src.r_hand)
|
||||||
var/mob/M = null
|
var/mob/living/M = null
|
||||||
if (param)
|
if (param)
|
||||||
for (var/mob/A in view(1, null))
|
for (var/mob/living/A in view(1, null))
|
||||||
if (param == A.name)
|
if (param == A.name)
|
||||||
M = A
|
M = A
|
||||||
break
|
break
|
||||||
|
|||||||
@@ -1115,9 +1115,11 @@
|
|||||||
spawn(0)
|
spawn(0)
|
||||||
regenerate_icons()
|
regenerate_icons()
|
||||||
if(vessel.total_volume < species.blood_volume)
|
if(vessel.total_volume < species.blood_volume)
|
||||||
|
vessel.maximum_volume = species.blood_volume
|
||||||
vessel.add_reagent("blood", species.blood_volume - vessel.total_volume)
|
vessel.add_reagent("blood", species.blood_volume - vessel.total_volume)
|
||||||
else if(vessel.total_volume > species.blood_volume)
|
else if(vessel.total_volume > species.blood_volume)
|
||||||
vessel.remove_reagent("blood", vessel.total_volume - species.blood_volume)
|
vessel.remove_reagent("blood", vessel.total_volume - species.blood_volume)
|
||||||
|
vessel.maximum_volume = species.blood_volume
|
||||||
fixblood()
|
fixblood()
|
||||||
|
|
||||||
// Rebuild the HUD. If they aren't logged in then login() should reinstantiate it for them.
|
// Rebuild the HUD. If they aren't logged in then login() should reinstantiate it for them.
|
||||||
|
|||||||
@@ -207,7 +207,7 @@
|
|||||||
|
|
||||||
var/covered = 0 // Basic coverage can help.
|
var/covered = 0 // Basic coverage can help.
|
||||||
for(var/obj/item/clothing/clothes in H)
|
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
|
continue
|
||||||
if((clothes.body_parts_covered & UPPER_TORSO) && (clothes.body_parts_covered & LOWER_TORSO))
|
if((clothes.body_parts_covered & UPPER_TORSO) && (clothes.body_parts_covered & LOWER_TORSO))
|
||||||
covered = 1
|
covered = 1
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user