From 867b21c7ce839999c89ae80929eff4aebdcf3d79 Mon Sep 17 00:00:00 2001 From: "johnsonmt88@gmail.com" Date: Wed, 29 Aug 2012 18:00:30 +0000 Subject: [PATCH] File restructuring! This brings down a bunch of defines from /code/defines/obj.dm unto their appropriate files. I've moved morgue.dm from game/machinery into game/objects/structures since that file contains no machines. I've reorganized the objects/items/stacks folder and made a 'sheets' and 'tiles' folder to keep things separate I've separated stool_chair_bed.dm into its own folder which now contains the files: stools.dm, chairs.dm, bed.dm and alien_nests.dm to make it a little easier to go through. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4582 316c924e-a436-60f5-8080-3fe189b3f50e --- code/defines/obj.dm | 1021 ----------------- code/game/objects/effects/landmarks.dm | 0 code/game/objects/effects/mines.dm | 41 +- code/game/objects/effects/portals.dm | 12 +- code/game/objects/hud.dm | 21 + code/game/objects/items.dm | 2 + code/game/objects/items/apc_frame.dm | 7 + code/game/objects/items/blueprints.dm | 5 + code/game/objects/items/devices/multitool.dm | 5 +- code/game/objects/items/stacks/medical.dm | 2 + code/game/objects/items/stacks/rods.dm | 66 ++ .../items/stacks/{ => sheets}/glass.dm | 51 +- .../game/objects/items/stacks/sheets/light.dm | 35 + .../stacks/{minerals.dm => sheets/mineral.dm} | 51 +- .../{metal.dm => sheets/sheet_types.dm} | 305 +++-- .../objects/items/stacks/sheets/sheets.dm | 21 + code/game/objects/items/stacks/stack.dm | 206 ++-- code/game/objects/items/stacks/tiles/light.dm | 36 + .../objects/items/stacks/tiles/plasteel.dm | 42 + .../objects/items/stacks/tiles/tile_types.dm | 38 + code/game/objects/items/stacks/wood.dm | 17 - code/game/objects/objs.dm | 77 ++ code/game/objects/structures/bedsheet_bin.dm | 8 + code/game/objects/structures/displaycase.dm | 12 + code/game/objects/structures/false_walls.dm | 41 +- code/game/objects/structures/kitchen_spike.dm | 11 + code/game/objects/structures/lattice.dm | 54 +- code/game/objects/structures/mop_bucket.dm | 11 + .../structures}/morgue.dm | 66 ++ code/game/objects/structures/noticeboard.dm | 8 + .../alien_nests.dm} | 11 +- .../bed.dm} | 134 +-- .../structures/stool_bed_chair_nest/chairs.dm | 109 ++ .../structures/stool_bed_chair_nest/stools.dm | 35 + code/game/objects/structures/tables_racks.dm | 246 +++- .../mob/living/carbon/brain/brain_item.dm | 37 + tgstation.dme | 26 +- 37 files changed, 1412 insertions(+), 1458 deletions(-) create mode 100644 code/game/objects/effects/landmarks.dm create mode 100644 code/game/objects/hud.dm create mode 100644 code/game/objects/items/stacks/rods.dm rename code/game/objects/items/stacks/{ => sheets}/glass.dm (85%) create mode 100644 code/game/objects/items/stacks/sheets/light.dm rename code/game/objects/items/stacks/{minerals.dm => sheets/mineral.dm} (77%) rename code/game/objects/items/stacks/{metal.dm => sheets/sheet_types.dm} (50%) create mode 100644 code/game/objects/items/stacks/sheets/sheets.dm create mode 100644 code/game/objects/items/stacks/tiles/light.dm create mode 100644 code/game/objects/items/stacks/tiles/plasteel.dm create mode 100644 code/game/objects/items/stacks/tiles/tile_types.dm delete mode 100644 code/game/objects/items/stacks/wood.dm rename code/game/{machinery => objects/structures}/morgue.dm (85%) rename code/game/objects/structures/{aliennests.dm => stool_bed_chair_nest/alien_nests.dm} (89%) rename code/game/objects/structures/{stool_chair_bed.dm => stool_bed_chair_nest/bed.dm} (55%) create mode 100644 code/game/objects/structures/stool_bed_chair_nest/chairs.dm create mode 100644 code/game/objects/structures/stool_bed_chair_nest/stools.dm diff --git a/code/defines/obj.dm b/code/defines/obj.dm index 5001759a7b3..e973256723e 100644 --- a/code/defines/obj.dm +++ b/code/defines/obj.dm @@ -1,83 +1,3 @@ -//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31 - -/obj - //var/datum/module/mod //not used - var/m_amt = 0 // metal - var/g_amt = 0 // glass - var/w_amt = 0 // waster amounts - var/origin_tech = null //Used by R&D to determine what research bonuses it grants. - var/reliability = 100 //Used by SOME devices to determine how reliable they are. - var/crit_fail = 0 - var/unacidable = 0 //universal "unacidabliness" var, here so you can use it in any obj. - var/datum/marked_datum - animate_movement = 2 - var/throwforce = 1 - var/list/attack_verb = list() //Used in attackby() to say how something was attacked "[x] has been [z.attack_verb] by [y] with [z]" - -/obj/proc/handle_internal_lifeform(mob/lifeform_inside_me, breath_request) - //Return: (NONSTANDARD) - // null if object handles breathing logic for lifeform - // datum/air_group to tell lifeform to process using that breath return - //DEFAULT: Take air from turf to give to have mob process - if(breath_request>0) - return remove_air(breath_request) - else - return null - -/obj/proc/initialize() - return - -/obj/proc/updateUsrDialog() - var/list/nearby = viewers(1, src) - for(var/mob/M in nearby) - if ((M.client && M.machine == src)) - src.attack_hand(M) - if (istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/living/silicon/robot)) - if (!(usr in nearby)) - if (usr.client && usr.machine==src) // && M.machine == src is omitted because if we triggered this by using the dialog, it doesn't matter if our machine changed in between triggering it and this - the dialog is probably still supposed to refresh. - src.attack_ai(usr) - - // check for TK users - //AutoUpdateTK(src) - if (istype(usr, /mob/living/carbon/human)) - if(istype(usr.l_hand, /obj/item/tk_grab) || istype(usr.r_hand, /obj/item/tk_grab/)) - if(!(usr in nearby)) - if(usr.client && usr.machine==src) - src.attack_hand(usr) - -/obj/proc/updateDialog() - var/list/nearby = viewers(1, src) - for(var/mob/M in nearby) - if ((M.client && M.machine == src)) - src.attack_hand(M) - AutoUpdateAI(src) - //AutoUpdateTK(src) - -/obj/proc/update_icon() - return - -/obj/item/proc/updateSelfDialog() - var/mob/M = src.loc - if(istype(M) && M.client && M.machine == src) - src.attack_self(M) - - -/obj/proc/alter_health() - return 1 - -/obj/proc/hide(h) - return - - -/obj/proc/hear_talk(mob/M as mob, text) -/* - var/mob/mo = locate(/mob) in src - if(mo) - var/rendered = "[M.name]: [text]" - mo.show_message(rendered, 2) - */ - return - /obj/structure/signpost icon = 'icons/obj/stationobjs.dmi' icon_state = "signpost" @@ -119,13 +39,6 @@ var/def_zone pass_flags = PASSTABLE -/obj/structure/bedsheetbin - name = "linen bin" - desc = "A bin for containing bedsheets. It looks rather cosy." - icon = 'icons/obj/items.dmi' - icon_state = "bedbin" - var/amount = 23.0 - anchored = 1.0 /obj/effect/begin name = "begin" @@ -142,33 +55,6 @@ //This list tracks characters spawned in the world and cannot be modified in-game. Currently referenced by respawn_character(). var/locked[] = list() -/obj/hud - name = "hud" - unacidable = 1 - var/mob/mymob = null - var/list/adding = null - var/list/other = null - var/obj/screen/druggy = null - var/vimpaired = null - var/obj/screen/alien_view = null - var/obj/screen/g_dither = null - var/obj/screen/blurry = null - var/list/darkMask = null - var/obj/screen/r_hand_hud_object = null - var/obj/screen/l_hand_hud_object = null - var/show_intent_icons = 0 - var/list/obj/screen/hotkeybuttons = null - var/hotkey_ui_hidden = 0 //This is to hide the buttons that can be used via hotkeys. (hotkeybuttons list of buttons) - - var/list/obj/screen/item_action/item_action_list = null //Used for the item action ui buttons. - - var/h_type = /obj/screen //this is like...the most pointless thing ever. Use a god damn define! - - - -/obj/item/device - icon = 'icons/obj/device.dmi' - /obj/item/device/infra_sensor name = "Infrared Sensor" desc = "Scans for infrared beams in the vicinity." @@ -179,45 +65,6 @@ m_amt = 150 origin_tech = "magnets=2" -/obj/item/device/multitool - name = "multitool" - desc = "Used for pulsing wires to test which to cut. Not recommended by doctors." - icon_state = "multitool" - flags = FPRINT | TABLEPASS| CONDUCT - force = 5.0 - w_class = 2.0 - throwforce = 5.0 - throw_range = 15 - throw_speed = 3 - desc = "You can use this on airlocks or APCs to try to hack them without cutting wires." - m_amt = 50 - g_amt = 20 - origin_tech = "magnets=1;engineering=1" - var/obj/machinery/telecomms/buffer // simple machine buffer for device linkage - -/obj/item/blueprints - name = "station blueprints" - desc = "Blueprints of the station. There's stamp \"Classified\" and several coffee stains on it." - icon = 'icons/obj/items.dmi' - icon_state = "blueprints" - attack_verb = list("attacked", "bapped", "hit") - -/obj/item/apc_frame - name = "APC frame" - desc = "Used for repairing or building APCs" - icon = 'icons/obj/apc_repair.dmi' - icon_state = "apc_frame" - flags = FPRINT | TABLEPASS| CONDUCT - -/obj/effect/landmark - name = "landmark" - icon = 'icons/mob/screen1.dmi' - icon_state = "x2" - anchored = 1.0 - unacidable = 1 - -/obj/effect/landmark/alterations - name = "alterations" /obj/effect/laser name = "laser" @@ -226,80 +73,6 @@ var/damage = 0.0 var/range = 10.0 -/obj/structure/lattice - desc = "A lightweight support lattice." - name = "lattice" - icon = 'icons/obj/structures.dmi' - icon_state = "latticefull" - density = 0 - anchored = 1.0 - layer = 2.3 //under pipes - // flags = CONDUCT - -/obj/structure/lattice/New() - ..() - if(!(istype(src.loc, /turf/space))) - del(src) - for(var/obj/structure/lattice/LAT in src.loc) - if(LAT != src) - del(LAT) - icon = 'icons/obj/smoothlattice.dmi' - icon_state = "latticeblank" - updateOverlays() - for (var/dir in cardinal) - var/obj/structure/lattice/L - if(locate(/obj/structure/lattice, get_step(src, dir))) - L = locate(/obj/structure/lattice, get_step(src, dir)) - L.updateOverlays() - -/obj/structure/lattice/Del() - for (var/dir in cardinal) - var/obj/structure/lattice/L - if(locate(/obj/structure/lattice, get_step(src, dir))) - L = locate(/obj/structure/lattice, get_step(src, dir)) - L.updateOverlays(src.loc) - ..() - -/obj/structure/lattice/proc/updateOverlays() - //if(!(istype(src.loc, /turf/space))) - // del(src) - spawn(1) - overlays = list() - - var/dir_sum = 0 - - for (var/direction in cardinal) - if(locate(/obj/structure/lattice, get_step(src, direction))) - dir_sum += direction - else - if(!(istype(get_step(src, direction), /turf/space))) - dir_sum += direction - - icon_state = "lattice[dir_sum]" - return - - /* - overlays += icon(icon,"lattice-middlebar") //the nw-se bar in the cneter - for (var/dir in cardinal) - if(locate(/obj/structure/lattice, get_step(src, dir))) - src.overlays += icon(icon,"lattice-[dir2text(dir)]") - else - src.overlays += icon(icon,"lattice-nc-[dir2text(dir)]") //t for turf - if(!(istype(get_step(src, dir), /turf/space))) - src.overlays += icon(icon,"lattice-t-[dir2text(dir)]") //t for turf - - //if ( !( (locate(/obj/structure/lattice, get_step(src, SOUTH))) || (locate(/obj/structure/lattice, get_step(src, EAST))) )) - // src.overlays += icon(icon,"lattice-c-se") - if ( !( (locate(/obj/structure/lattice, get_step(src, NORTH))) || (locate(/obj/structure/lattice, get_step(src, WEST))) )) - src.overlays += icon(icon,"lattice-c-nw") - if ( !( (locate(/obj/structure/lattice, get_step(src, NORTH))) || (locate(/obj/structure/lattice, get_step(src, EAST))) )) - src.overlays += icon(icon,"lattice-c-ne") - if ( !( (locate(/obj/structure/lattice, get_step(src, SOUTH))) || (locate(/obj/structure/lattice, get_step(src, WEST))) )) - src.overlays += icon(icon,"lattice-c-sw") - - if(!(overlays)) - icon_state = "latticefull" - */ /obj/effect/list_container name = "list container" @@ -310,29 +83,6 @@ var/list/container = list( ) -/obj/structure/m_tray - name = "morgue tray" - desc = "Apply corpse before closing." - icon = 'icons/obj/stationobjs.dmi' - icon_state = "morguet" - density = 1 - layer = 2.0 - var/obj/structure/morgue/connected = null - anchored = 1.0 - -/obj/structure/c_tray - name = "crematorium tray" - desc = "Apply body before burning." - icon = 'icons/obj/stationobjs.dmi' - icon_state = "cremat" - density = 1 - layer = 2.0 - var/obj/structure/crematorium/connected = null - anchored = 1.0 - - - - /obj/structure/cable level = 1 @@ -382,62 +132,6 @@ icon_state = "x" unacidable = 1//Just to be sure. -/obj/structure/morgue - name = "morgue" - desc = "Used to keep bodies in untill someone fetches them." - icon = 'icons/obj/stationobjs.dmi' - icon_state = "morgue1" - density = 1 - var/obj/structure/m_tray/connected = null - anchored = 1.0 - -/obj/structure/crematorium - name = "crematorium" - desc = "A human incinerator. Works well on barbeque nights." - icon = 'icons/obj/stationobjs.dmi' - icon_state = "crema1" - density = 1 - var/obj/structure/c_tray/connected = null - anchored = 1.0 - var/cremating = 0 - var/id = 1 - var/locked = 0 - -/obj/effect/mine - name = "Mine" - desc = "I Better stay away from that thing." - density = 1 - anchored = 1 - layer = 3 - icon = 'icons/obj/weapons.dmi' - icon_state = "uglymine" - var/triggerproc = "explode" //name of the proc thats called when the mine is triggered - var/triggered = 0 - -/obj/effect/mine/dnascramble - name = "Radiation Mine" - icon_state = "uglymine" - triggerproc = "triggerrad" - -/obj/effect/mine/plasma - name = "Plasma Mine" - icon_state = "uglymine" - triggerproc = "triggerplasma" - -/obj/effect/mine/kick - name = "Kick Mine" - icon_state = "uglymine" - triggerproc = "triggerkick" - -/obj/effect/mine/n2o - name = "N2O Mine" - icon_state = "uglymine" - triggerproc = "triggern2o" - -/obj/effect/mine/stun - name = "Stun Mine" - icon_state = "uglymine" - triggerproc = "triggerstun" /obj/effect/overlay name = "overlay" @@ -453,32 +147,11 @@ ..() spawn(10) del src -/obj/effect/portal - name = "portal" - desc = "Looks unstable. Best to test it with the clown." - icon = 'icons/obj/stationobjs.dmi' - icon_state = "portal" - density = 1 - unacidable = 1//Can't destroy energy portals. - var/failchance = 5 - var/obj/item/target = null - var/creator = null - anchored = 1.0 - /obj/effect/projection name = "Projection" desc = "This looks like a projection of something." anchored = 1.0 -/obj/structure/rack - name = "rack" - desc = "Different from the Middle Ages version." - icon = 'icons/obj/objects.dmi' - icon_state = "rack" - density = 1 - flags = FPRINT - anchored = 1.0 - throwpass = 1 //You can throw objects over this, despite it's density. /obj/effect/shut_controller name = "shut controller" @@ -491,323 +164,6 @@ icon_state = "x" anchored = 1.0 -/obj/structure/stool - name = "stool" - desc = "Apply butt." - icon = 'icons/obj/objects.dmi' - icon_state = "stool" - anchored = 1.0 - flags = FPRINT - pressure_resistance = 3*ONE_ATMOSPHERE - -/obj/structure/stool/bed - name = "bed" - desc = "This is used to lie in, sleep in or strap on." - icon_state = "bed" - var/mob/living/buckled_mob - -/obj/structure/stool/bed/alien - name = "resting contraption" - desc = "This looks similar to contraptions from earth. Could aliens be stealing our technology?" - icon_state = "abed" - -/obj/structure/stool/bed/nest - name = "alien nest" - desc = "It's a gruesome pile of thick, sticky resin shaped like a nest." - icon = 'icons/mob/alien.dmi' - icon_state = "nest" - var/health = 100 - -/obj/structure/stool/bed/chair //YES, chairs are a type of bed, which are a type of stool. This works, believe me. -Pete - name = "chair" - desc = "You sit in this. Either by will or force." - icon_state = "chair" - -/obj/structure/stool/bed/chair/wood/normal - icon_state = "wooden_chair" - name = "wooden chair" - desc = "Old is never too old to not be in fashion." - -/obj/structure/stool/bed/chair/wood/wings - icon_state = "wooden_chair_wings" - name = "wooden chair" - desc = "Old is never too old to not be in fashion." - -/obj/structure/stool/bed/chair/comfy - name = "comfy chair" - desc = "It looks comfy." - -/obj/structure/stool/bed/chair/comfy/brown - icon_state = "comfychair_brown" - -/obj/structure/stool/bed/chair/comfy/beige - icon_state = "comfychair_beige" - -/obj/structure/stool/bed/chair/comfy/teal - icon_state = "comfychair_teal" - -/obj/structure/stool/bed/chair/office - anchored = 0 - -/obj/structure/stool/bed/chair/comfy/black - icon_state = "comfychair_black" - -/obj/structure/stool/bed/chair/comfy/lime - icon_state = "comfychair_lime" - -/obj/structure/stool/bed/chair/office/Move() - ..() - handle_rotation() - -/obj/structure/stool/bed/chair/office/light - icon_state = "officechair_white" - -/obj/structure/stool/bed/chair/office/dark - icon_state = "officechair_dark" - -/obj/structure/table - name = "table" - desc = "A square piece of metal standing on four metal legs. It can not move." - icon = 'icons/obj/structures.dmi' - icon_state = "table" - density = 1 - anchored = 1.0 - layer = 2.8 - throwpass = 1 //You can throw objects over this, despite it's density.") - -/obj/structure/table/New() - ..() - for(var/obj/structure/table/T in src.loc) - if(T != src) - del(T) - update_icon() - for(var/direction in list(1,2,4,8,5,6,9,10)) - if(locate(/obj/structure/table,get_step(src,direction))) - var/obj/structure/table/T = locate(/obj/structure/table,get_step(src,direction)) - T.update_icon() - -/obj/structure/table/Del() - for(var/direction in list(1,2,4,8,5,6,9,10)) - if(locate(/obj/structure/table,get_step(src,direction))) - var/obj/structure/table/T = locate(/obj/structure/table,get_step(src,direction)) - T.update_icon() - ..() - -/obj/structure/table/update_icon() - spawn(2) //So it properly updates when deleting - var/dir_sum = 0 - for(var/direction in list(1,2,4,8,5,6,9,10)) - var/skip_sum = 0 - for(var/obj/structure/window/W in src.loc) - if(W.dir == direction) //So smooth tables don't go smooth through windows - skip_sum = 1 - continue - var/inv_direction //inverse direction - switch(direction) - if(1) - inv_direction = 2 - if(2) - inv_direction = 1 - if(4) - inv_direction = 8 - if(8) - inv_direction = 4 - if(5) - inv_direction = 10 - if(6) - inv_direction = 9 - if(9) - inv_direction = 6 - if(10) - inv_direction = 5 - for(var/obj/structure/window/W in get_step(src,direction)) - if(W.dir == inv_direction) //So smooth tables don't go smooth through windows when the window is on the other table's tile - skip_sum = 1 - continue - if(!skip_sum) //means there is a window between the two tiles in this direction - if(locate(/obj/structure/table,get_step(src,direction))) - if(direction <5) - dir_sum += direction - else - if(direction == 5) //This permits the use of all table directions. (Set up so clockwise around the central table is a higher value, from north) - dir_sum += 16 - if(direction == 6) - dir_sum += 32 - if(direction == 8) //Aherp and Aderp. Jezes I am stupid. -- SkyMarshal - dir_sum += 8 - if(direction == 10) - dir_sum += 64 - if(direction == 9) - dir_sum += 128 - - var/table_type = 0 //stand_alone table - if(dir_sum%16 in cardinal) - table_type = 1 //endtable - dir_sum %= 16 - if(dir_sum%16 in list(3,12)) - table_type = 2 //1 tile thick, streight table - if(dir_sum%16 == 3) //3 doesn't exist as a dir - dir_sum = 2 - if(dir_sum%16 == 12) //12 doesn't exist as a dir. - dir_sum = 4 - if(dir_sum%16 in list(5,6,9,10)) - if(locate(/obj/structure/table,get_step(src.loc,dir_sum%16))) - table_type = 3 //full table (not the 1 tile thick one, but one of the 'tabledir' tables) - else - table_type = 2 //1 tile thick, corner table (treated the same as streight tables in code later on) - dir_sum %= 16 - if(dir_sum%16 in list(13,14,7,11)) //Three-way intersection - table_type = 5 //full table as three-way intersections are not sprited, would require 64 sprites to handle all combinations. TOO BAD -- SkyMarshal - switch(dir_sum%16) //Begin computation of the special type tables. --SkyMarshal - if(7) - if(dir_sum == 23) - table_type = 6 - dir_sum = 8 - else if(dir_sum == 39) - dir_sum = 4 - table_type = 6 - else if(dir_sum == 55 || dir_sum == 119 || dir_sum == 247 || dir_sum == 183) - dir_sum = 4 - table_type = 3 - else - dir_sum = 4 - if(11) - if(dir_sum == 75) - dir_sum = 5 - table_type = 6 - else if(dir_sum == 139) - dir_sum = 9 - table_type = 6 - else if(dir_sum == 203 || dir_sum == 219 || dir_sum == 251 || dir_sum == 235) - dir_sum = 8 - table_type = 3 - else - dir_sum = 8 - if(13) - if(dir_sum == 29) - dir_sum = 10 - table_type = 6 - else if(dir_sum == 141) - dir_sum = 6 - table_type = 6 - else if(dir_sum == 189 || dir_sum == 221 || dir_sum == 253 || dir_sum == 157) - dir_sum = 1 - table_type = 3 - else - dir_sum = 1 - if(14) - if(dir_sum == 46) - dir_sum = 1 - table_type = 6 - else if(dir_sum == 78) - dir_sum = 2 - table_type = 6 - else if(dir_sum == 110 || dir_sum == 254 || dir_sum == 238 || dir_sum == 126) - dir_sum = 2 - table_type = 3 - else - dir_sum = 2 //These translate the dir_sum to the correct dirs from the 'tabledir' icon_state. - if(dir_sum%16 == 15) - table_type = 4 //4-way intersection, the 'middle' table sprites will be used. - - if(istype(src,/obj/structure/table/reinforced)) - switch(table_type) - if(0) - icon_state = "reinf_table" - if(1) - icon_state = "reinf_1tileendtable" - if(2) - icon_state = "reinf_1tilethick" - if(3) - icon_state = "reinf_tabledir" - if(4) - icon_state = "reinf_middle" - if(5) - icon_state = "reinf_tabledir2" - if(6) - icon_state = "reinf_tabledir3" - else if(istype(src,/obj/structure/table/woodentable)) - switch(table_type) - if(0) - icon_state = "wood_table" - if(1) - icon_state = "wood_1tileendtable" - if(2) - icon_state = "wood_1tilethick" - if(3) - icon_state = "wood_tabledir" - if(4) - icon_state = "wood_middle" - if(5) - icon_state = "wood_tabledir2" - if(6) - icon_state = "wood_tabledir3" - else - switch(table_type) - if(0) - icon_state = "table" - if(1) - icon_state = "table_1tileendtable" - if(2) - icon_state = "table_1tilethick" - if(3) - icon_state = "tabledir" - if(4) - icon_state = "table_middle" - if(5) - icon_state = "tabledir2" - if(6) - icon_state = "tabledir3" - if (dir_sum in list(1,2,4,8,5,6,9,10)) - dir = dir_sum - else - dir = 2 - -/obj/structure/table/reinforced - name = "reinforced table" - desc = "A version of the four legged table. It is stronger." - icon_state = "reinf_table" - var/status = 2 - -/obj/structure/table/woodentable - name = "wooden table" - desc = "Do not apply fire to this. Rumour says it burns easily." - icon_state = "wood_table" - -/obj/structure/mopbucket - desc = "Fill it with water, but don't forget a mop!" - name = "mop bucket" - icon = 'icons/obj/janitor.dmi' - icon_state = "mopbucket" - density = 1 - flags = FPRINT - pressure_resistance = ONE_ATMOSPHERE - flags = FPRINT | TABLEPASS | OPENCONTAINER - var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite - -/obj/structure/kitchenspike - name = "a meat spike" - icon = 'icons/obj/kitchen.dmi' - icon_state = "spike" - desc = "A spike for collecting meat from animals" - density = 1 - anchored = 1 - var/meat = 0 - var/occupied = 0 - var/meattype = 0 // 0 - Nothing, 1 - Monkey, 2 - Xeno - -/obj/structure/displaycase - name = "Display Case" - icon = 'icons/obj/stationobjs.dmi' - icon_state = "glassbox1" - desc = "A display case for prized possessions. It taunts you to kick it." - density = 1 - anchored = 1 - unacidable = 1//Dissolving the case would also delete the gun. - var/health = 30 - var/occupied = 1 - var/destroyed = 0 - /obj/effect/showcase name = "Showcase" icon = 'icons/obj/stationobjs.dmi' @@ -817,47 +173,6 @@ anchored = 1 unacidable = 1//temporary until I decide whether the borg can be removed. -veyveyr -//BEGIN BRAINS===================================================== -/obj/item/brain - name = "brain" - desc = "A piece of juicy meat found in a persons head." - icon = 'icons/obj/surgery.dmi' - icon_state = "brain2" - flags = TABLEPASS - force = 1.0 - w_class = 1.0 - throwforce = 1.0 - throw_speed = 3 - throw_range = 5 - origin_tech = "biotech=3" - attack_verb = list("attacked", "slapped", "whacked") - - var/mob/living/carbon/brain/brainmob = null - - New() - ..() - //Shifting the brain "mob" over to the brain object so it's easier to keep track of. --NEO - //WASSSSSUUUPPPP /N - spawn(5) - if(brainmob && brainmob.client) - brainmob.client.screen.len = null //clear the hud - - proc - transfer_identity(var/mob/living/carbon/human/H) - name = "[H]'s brain" - brainmob = new(src) - brainmob.name = H.real_name - brainmob.real_name = H.real_name - brainmob.dna = H.dna - brainmob.timeofhostdeath = H.timeofdeath - if(H.mind) - H.mind.transfer_to(brainmob) - brainmob << "\blue You might feel slightly disoriented. That's normal when your brain gets cut out." - return - -//END BRAINS===================================================== - - // Basically this Metroid Core catalyzes reactions that normally wouldn't happen anywhere /obj/item/metroid_core @@ -896,20 +211,6 @@ reagents.clear_reagents() Flush = 30 - - - - -/obj/structure/noticeboard - name = "Notice Board" - icon = 'icons/obj/stationobjs.dmi' - icon_state = "nboard00" - flags = FPRINT - desc = "A board for pinning important notices upon." - density = 0 - anchored = 1 - var/notices = 0 - /obj/effect/deskclutter name = "desk clutter" icon = 'icons/obj/items.dmi' @@ -936,328 +237,6 @@ src.pixel_y = rand(-5, 5) -/* -/obj/item/weapon/storage/glassbox - name = "Glassware Box" - icon_state = "beakerbox" - item_state = "syringe_kit" - New() - ..() - new /obj/item/weapon/glass( src ) - new /obj/item/weapon/glass( src ) - new /obj/item/weapon/glass( src ) - new /obj/item/weapon/glass( src ) - new /obj/item/weapon/glass( src ) - new /obj/item/weapon/glass( src ) - new /obj/item/weapon/glass( src ) -*/ - - -/obj/structure/falsewall - name = "wall" - desc = "A huge chunk of metal used to seperate rooms." - icon = 'icons/turf/walls.dmi' - icon_state = "" - density = 1 - opacity = 1 - anchored = 1 - -/obj/structure/falsewall/gold - name = "gold wall" - desc = "A wall with gold plating. Swag" - icon_state = "" - -/obj/structure/falsewall/silver - name = "silver wall" - desc = "A wall with silver plating. Shiny" - icon_state = "" - -/obj/structure/falsewall/diamond - name = "diamond wall" - desc = "A wall with diamond plating. You monster" - icon_state = "" - -/obj/structure/falsewall/uranium - name = "uranium wall" - desc = "A wall with uranium plating. This is probably a bad idea" - icon_state = "" - -/obj/structure/falsewall/plasma - name = "plasma wall" - desc = "A wall with plasma plating. This is definately a bad idea" - icon_state = "" - -/obj/structure/falsewall/bananium - name = "bananium wall" - desc = "A wall with bananium plating. Honk" - icon_state = "" - -/obj/structure/falsewall/sand - name = "sandstone wall" - desc = "A wall with sandstone plating." - icon_state = "" - -/*/obj/structure/falsewall/wood - name = "wooden wall" - desc = "A wall with classy wooden paneling." - icon_state = ""*/ - -/obj/structure/falserwall - name = "r wall" - desc = "A huge chunk of reinforced metal used to seperate rooms." - icon = 'icons/turf/walls.dmi' - icon_state = "r_wall" - density = 1 - opacity = 1 - anchored = 1 - -/obj/item/stack - var/singular_name - var/amount = 1 - var/max_amount //also see stack recipes initialisation, param "max_res_amount" must be equal to this max_amount - -/obj/item/stack/rods - name = "metal rods" - desc = "Some rods. Can be used for building, or something." - singular_name = "metal rod" - icon_state = "rods" - flags = FPRINT | TABLEPASS| CONDUCT - w_class = 3.0 - force = 9.0 - throwforce = 15.0 - throw_speed = 5 - throw_range = 20 - m_amt = 1875 - max_amount = 60 - attack_verb = list("hit", "bludgeoned", "whacked") - -/obj/item/stack/sheet - name = "sheet" -// var/const/length = 2.5 //2.5*1.5*0.01*100000 == 3750 == m_amt -// var/const/width = 1.5 -// var/const/height = 0.01 - flags = FPRINT | TABLEPASS - w_class = 3.0 - force = 5 - throwforce = 5 - max_amount = 50 - throw_speed = 3 - throw_range = 3 - attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "smashed") - var/perunit = 3750 - -/obj/item/stack/sheet/attackby(obj/item/weapon/W as obj, mob/user as mob) - if (istype(W, /obj/item/weapon/sheetsnatcher)) - var/obj/item/weapon/sheetsnatcher/S = W - if(!S.mode) - S.add(src,user) - else - for (var/obj/item/stack/sheet/stack in locate(src.x,src.y,src.z)) - S.add(stack,user) - ..() - -/obj/item/stack/sheet/wood - name = "wooden planks" - desc = "One can only guess that this is a bunch of wood." - singular_name = "wood plank" - icon_state = "sheet-wood" - origin_tech = "materials=1;biotech=1" - -/obj/item/stack/sheet/sandstone - name = "sandstone bricks" - desc = "This appears to be a combination of both sand and stone." - singular_name = "sandstone brick" - icon_state = "sheet-sandstone" - throw_speed = 4 - throw_range = 5 - origin_tech = "materials=1" - -/obj/item/stack/sheet/glass - name = "glass" - desc = "HOLY HELL! That is a lot of glass." - singular_name = "glass sheet" - icon_state = "sheet-glass" - g_amt = 3750 - origin_tech = "materials=1" - - -/obj/item/stack/sheet/rglass - name = "reinforced glass" - desc = "Glass which seems to have rods or something stuck in them." - singular_name = "reinforced glass sheet" - icon_state = "sheet-rglass" - g_amt = 3750 - m_amt = 1875 - origin_tech = "materials=2" - -/obj/item/stack/sheet/rglass/cyborg - name = "reinforced glass" - desc = "Glass which seems to have rods or something stuck in them." - singular_name = "reinforced glass sheet" - icon_state = "sheet-rglass" - g_amt = 0 - m_amt = 0 - -/obj/item/stack/sheet/cloth - name = "cloth" - desc = "This roll of cloth is made from only the finest chemicals and bunny rabbits." - singular_name = "cloth roll" - icon_state = "sheet-cloth" - origin_tech = "materials=2" - - -/obj/item/stack/sheet/metal - name = "metal" - desc = "Sheets made out off metal. It has been dubbed Metal Sheets." - singular_name = "metal sheet" - icon_state = "sheet-metal" - m_amt = 3750 - throwforce = 14.0 - flags = FPRINT | TABLEPASS | CONDUCT - origin_tech = "materials=1" - -/obj/item/stack/sheet/metal/cyborg - name = "metal" - desc = "Sheets made out off metal. It has been dubbed Metal Sheets." - singular_name = "metal sheet" - icon_state = "sheet-metal" - m_amt = 0 - throwforce = 14.0 - flags = FPRINT | TABLEPASS | CONDUCT - -/obj/item/stack/sheet/plasteel - name = "plasteel" - singular_name = "plasteel sheet" - desc = "This sheet is an alloy of iron and plasma." - icon_state = "sheet-plasteel" - item_state = "sheet-metal" - m_amt = 7500 - throwforce = 15.0 - flags = FPRINT | TABLEPASS | CONDUCT - origin_tech = "materials=2" - -/obj/item/stack/tile/plasteel - name = "floor tiles" - singular_name = "floor tile" - desc = "Those could work as a pretty decent throwing weapon" - icon_state = "tile" - w_class = 3.0 - force = 6.0 - m_amt = 937.5 - throwforce = 15.0 - throw_speed = 5 - throw_range = 20 - flags = FPRINT | TABLEPASS | CONDUCT - max_amount = 60 - -/obj/item/stack/tile/grass - name = "grass tiles" - singular_name = "grass floor tile" - desc = "A patch of grass like they often use on golf courses" - icon_state = "tile_grass" - w_class = 3.0 - force = 1.0 - throwforce = 1.0 - throw_speed = 5 - throw_range = 20 - flags = FPRINT | TABLEPASS | CONDUCT - max_amount = 60 - origin_tech = "biotech=1" - -/obj/item/stack/tile/wood - name = "wood floor tiles" - singular_name = "wood floor tile" - desc = "an easy to fit wood floor tile" - icon_state = "tile-wood" - w_class = 3.0 - force = 1.0 - throwforce = 1.0 - throw_speed = 5 - throw_range = 20 - flags = FPRINT | TABLEPASS | CONDUCT - max_amount = 60 - -/obj/item/stack/light_w - name = "wired glass tiles" - singular_name = "wired glass floor tile" - desc = "A glass tile, which is wired, somehow." - icon_state = "glass_wire" - w_class = 3.0 - force = 3.0 - throwforce = 5.0 - throw_speed = 5 - throw_range = 20 - flags = FPRINT | TABLEPASS | CONDUCT - max_amount = 60 - - attackby(var/obj/item/O as obj, var/mob/user as mob) - ..() - if(istype(O,/obj/item/weapon/wirecutters)) - var/obj/item/weapon/cable_coil/CC = new/obj/item/weapon/cable_coil(user.loc) - CC.amount = 5 - amount-- - new/obj/item/stack/sheet/glass(user.loc) - if(amount <= 0) - user.drop_from_inventory(src) - del(src) - - if(istype(O,/obj/item/stack/sheet/metal)) - var/obj/item/stack/sheet/metal/M = O - M.amount-- - if(M.amount <= 0) - user.drop_from_inventory(M) - del(M) - amount-- - new/obj/item/stack/tile/light(user.loc) - if(amount <= 0) - user.drop_from_inventory(src) - del(src) - -/obj/item/stack/tile/light - name = "light tiles" - singular_name = "light floor tile" - desc = "A floor tile, made out off glass. It produces light." - icon_state = "tile_e" - w_class = 3.0 - force = 3.0 - throwforce = 5.0 - throw_speed = 5 - throw_range = 20 - flags = FPRINT | TABLEPASS | CONDUCT - max_amount = 60 - attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "smashed") - var/on = 1 - var/state //0 = fine, 1 = flickering, 2 = breaking, 3 = broken - - New() - ..() - if(prob(5)) - state = 3 //broken - else if(prob(5)) - state = 2 //breaking - else if(prob(10)) - state = 1 //flickering occasionally - else - state = 0 //fine - - attackby(var/obj/item/O as obj, var/mob/user as mob) - ..() - if(istype(O,/obj/item/weapon/crowbar)) - new/obj/item/stack/sheet/metal(user.loc) - amount-- - new/obj/item/stack/light_w(user.loc) - if(amount <= 0) - user.drop_from_inventory(src) - del(src) - -/obj/item/stack/sheet/cardboard //BubbleWrap - name = "cardboard" - desc = "Large sheets of card, like boxes folded flat." - singular_name = "cardboard sheet" - icon_state = "sheet-card" - flags = FPRINT | TABLEPASS - origin_tech = "materials=1" - /obj/item/weapon/beach_ball icon = 'icons/misc/beach.dmi' icon_state = "ball" diff --git a/code/game/objects/effects/landmarks.dm b/code/game/objects/effects/landmarks.dm new file mode 100644 index 00000000000..e69de29bb2d diff --git a/code/game/objects/effects/mines.dm b/code/game/objects/effects/mines.dm index 8fbd21a4177..2e4c65f586b 100644 --- a/code/game/objects/effects/mines.dm +++ b/code/game/objects/effects/mines.dm @@ -1,3 +1,14 @@ +/obj/effect/mine + name = "Mine" + desc = "I Better stay away from that thing." + density = 1 + anchored = 1 + layer = 3 + icon = 'icons/obj/weapons.dmi' + icon_state = "uglymine" + var/triggerproc = "explode" //name of the proc thats called when the mine is triggered + var/triggered = 0 + /obj/effect/mine/New() icon_state = "uglyminearmed" @@ -82,4 +93,32 @@ /obj/effect/mine/proc/explode(obj) explosion(loc, 0, 1, 2, 3) spawn(0) - del(src) \ No newline at end of file + del(src) + + + + +/obj/effect/mine/dnascramble + name = "Radiation Mine" + icon_state = "uglymine" + triggerproc = "triggerrad" + +/obj/effect/mine/plasma + name = "Plasma Mine" + icon_state = "uglymine" + triggerproc = "triggerplasma" + +/obj/effect/mine/kick + name = "Kick Mine" + icon_state = "uglymine" + triggerproc = "triggerkick" + +/obj/effect/mine/n2o + name = "N2O Mine" + icon_state = "uglymine" + triggerproc = "triggern2o" + +/obj/effect/mine/stun + name = "Stun Mine" + icon_state = "uglymine" + triggerproc = "triggerstun" \ No newline at end of file diff --git a/code/game/objects/effects/portals.dm b/code/game/objects/effects/portals.dm index f0e698555b6..ae174260e38 100644 --- a/code/game/objects/effects/portals.dm +++ b/code/game/objects/effects/portals.dm @@ -1,4 +1,14 @@ - +/obj/effect/portal + name = "portal" + desc = "Looks unstable. Best to test it with the clown." + icon = 'icons/obj/stationobjs.dmi' + icon_state = "portal" + density = 1 + unacidable = 1//Can't destroy energy portals. + var/failchance = 5 + var/obj/item/target = null + var/creator = null + anchored = 1.0 /obj/effect/portal/Bumped(mob/M as mob|obj) spawn(0) diff --git a/code/game/objects/hud.dm b/code/game/objects/hud.dm new file mode 100644 index 00000000000..7559f9044b5 --- /dev/null +++ b/code/game/objects/hud.dm @@ -0,0 +1,21 @@ +/obj/hud + name = "hud" + unacidable = 1 + var/mob/mymob = null + var/list/adding = null + var/list/other = null + var/obj/screen/druggy = null + var/vimpaired = null + var/obj/screen/alien_view = null + var/obj/screen/g_dither = null + var/obj/screen/blurry = null + var/list/darkMask = null + var/obj/screen/r_hand_hud_object = null + var/obj/screen/l_hand_hud_object = null + var/show_intent_icons = 0 + var/list/obj/screen/hotkeybuttons = null + var/hotkey_ui_hidden = 0 //This is to hide the buttons that can be used via hotkeys. (hotkeybuttons list of buttons) + + var/list/obj/screen/item_action/item_action_list = null //Used for the item action ui buttons. + + var/h_type = /obj/screen //this is like...the most pointless thing ever. Use a god damn define! \ No newline at end of file diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 35f871f3344..9bd96fb50ca 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -41,6 +41,8 @@ var/list/allowed = null //suit storage stuff. var/obj/item/device/uplink/hidden/hidden_uplink = null // All items can have an uplink hidden inside, just remember to add the triggers. +/obj/item/device + icon = 'icons/obj/device.dmi' /obj/item/ex_act(severity) switch(severity) diff --git a/code/game/objects/items/apc_frame.dm b/code/game/objects/items/apc_frame.dm index 10791618fbf..a65fd503de5 100644 --- a/code/game/objects/items/apc_frame.dm +++ b/code/game/objects/items/apc_frame.dm @@ -1,5 +1,12 @@ // APC HULL +/obj/item/apc_frame + name = "APC frame" + desc = "Used for repairing or building APCs" + icon = 'icons/obj/apc_repair.dmi' + icon_state = "apc_frame" + flags = FPRINT | TABLEPASS| CONDUCT + /obj/item/apc_frame/attackby(obj/item/weapon/W as obj, mob/user as mob) ..() if (istype(W, /obj/item/weapon/wrench)) diff --git a/code/game/objects/items/blueprints.dm b/code/game/objects/items/blueprints.dm index 132f46cb0da..63cedf7ea6f 100644 --- a/code/game/objects/items/blueprints.dm +++ b/code/game/objects/items/blueprints.dm @@ -1,4 +1,9 @@ /obj/item/blueprints + name = "station blueprints" + desc = "Blueprints of the station. There's stamp \"Classified\" and several coffee stains on it." + icon = 'icons/obj/items.dmi' + icon_state = "blueprints" + attack_verb = list("attacked", "bapped", "hit") var/const/AREA_ERRNONE = 0 var/const/AREA_STATION = 1 var/const/AREA_SPACE = 2 diff --git a/code/game/objects/items/devices/multitool.dm b/code/game/objects/items/devices/multitool.dm index e4024c838d7..497b5c4ef39 100644 --- a/code/game/objects/items/devices/multitool.dm +++ b/code/game/objects/items/devices/multitool.dm @@ -3,8 +3,10 @@ * TO-DO -- Using it as a power measurement tool for cables etc. Nannek. * */ + /obj/item/device/multitool name = "multitool" + desc = "Used for pulsing wires to test which to cut. Not recommended by doctors." icon_state = "multitool" flags = FPRINT | TABLEPASS| CONDUCT force = 5.0 @@ -15,4 +17,5 @@ desc = "You can use this on airlocks or APCs to try to hack them without cutting wires." m_amt = 50 g_amt = 20 - origin_tech = "magnets=1" \ No newline at end of file + origin_tech = "magnets=1;engineering=1" + var/obj/machinery/telecomms/buffer // simple machine buffer for device linkage \ No newline at end of file diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index 6922fd3a462..31882fca830 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -1,4 +1,6 @@ +//What is this even used for? + /obj/item/stack/medical/attack(mob/living/carbon/M as mob, mob/user as mob) if (M.stat == 2) var/t_him = "it" diff --git a/code/game/objects/items/stacks/rods.dm b/code/game/objects/items/stacks/rods.dm new file mode 100644 index 00000000000..b7119eba021 --- /dev/null +++ b/code/game/objects/items/stacks/rods.dm @@ -0,0 +1,66 @@ +/obj/item/stack/rods + name = "metal rods" + desc = "Some rods. Can be used for building, or something." + singular_name = "metal rod" + icon_state = "rods" + flags = FPRINT | TABLEPASS| CONDUCT + w_class = 3.0 + force = 9.0 + throwforce = 15.0 + throw_speed = 5 + throw_range = 20 + m_amt = 1875 + max_amount = 60 + attack_verb = list("hit", "bludgeoned", "whacked") + +/obj/item/stack/rods/attackby(obj/item/W as obj, mob/user as mob) + ..() + if (istype(W, /obj/item/weapon/weldingtool)) + var/obj/item/weapon/weldingtool/WT = W + + if(amount < 2) + user << "\red You need at least two rods to do this." + return + + if(WT.remove_fuel(0,user)) + var/obj/item/stack/sheet/metal/new_item = new(usr.loc) + new_item.add_to_stacks(usr) + for (var/mob/M in viewers(src)) + M.show_message("\red [src] is shaped into metal by [user.name] with the weldingtool.", 3, "\red You hear welding.", 2) + var/obj/item/stack/rods/R = src + src = null + var/replace = (user.get_inactive_hand()==R) + R.use(2) + if (!R && replace) + user.put_in_hands(new_item) + return + ..() + + +/obj/item/stack/rods/attack_self(mob/user as mob) + src.add_fingerprint(user) + + if(!istype(user.loc,/turf)) return 0 + + if (locate(/obj/structure/grille, usr.loc)) + for(var/obj/structure/grille/G in usr.loc) + if (G.destroyed) + G.health = 10 + G.density = 1 + G.destroyed = 0 + G.icon_state = "grille" + use(1) + else + return 1 + else + if(amount < 2) + user << "\blue You need at least two rods to do this." + return + usr << "\blue Assembling grille..." + if (!do_after(usr, 10)) + return + var/obj/structure/grille/F = new /obj/structure/grille/ ( usr.loc ) + usr << "\blue You assemble a grille" + F.add_fingerprint(usr) + use(2) + return \ No newline at end of file diff --git a/code/game/objects/items/stacks/glass.dm b/code/game/objects/items/stacks/sheets/glass.dm similarity index 85% rename from code/game/objects/items/stacks/glass.dm rename to code/game/objects/items/stacks/sheets/glass.dm index 37fa99b51a2..2f1242cb5d9 100644 --- a/code/game/objects/items/stacks/glass.dm +++ b/code/game/objects/items/stacks/sheets/glass.dm @@ -1,12 +1,21 @@ +/* Glass stack types + * Contains: + * Glass sheets + * Reinforced glass sheets + * Glass shards - TODO: Move this into code/game/object/item/weapons + */ + /* -CONTAINS: -GLASS SHEET -REINFORCED GLASS SHEET -SHARDS + * Glass sheets + */ +/obj/item/stack/sheet/glass + name = "glass" + desc = "HOLY HELL! That is a lot of glass." + singular_name = "glass sheet" + icon_state = "sheet-glass" + g_amt = 3750 + origin_tech = "materials=1" -*/ - -// GLASS /obj/item/stack/sheet/glass/attack_self(mob/user as mob) construct_window(user) @@ -97,7 +106,25 @@ SHARDS return 0 -// REINFORCED GLASS +/* + * Reinforced glass sheets + */ +/obj/item/stack/sheet/rglass + name = "reinforced glass" + desc = "Glass which seems to have rods or something stuck in them." + singular_name = "reinforced glass sheet" + icon_state = "sheet-rglass" + g_amt = 3750 + m_amt = 1875 + origin_tech = "materials=2" + +/obj/item/stack/sheet/rglass/cyborg + name = "reinforced glass" + desc = "Glass which seems to have rods or something stuck in them." + singular_name = "reinforced glass sheet" + icon_state = "sheet-rglass" + g_amt = 0 + m_amt = 0 /obj/item/stack/sheet/rglass/attack_self(mob/user as mob) construct_window(user) @@ -201,8 +228,9 @@ SHARDS return 0 -// SHARDS - +/* + * Glass shards - TODO: Move this into code/game/object/item/weapons + */ /obj/item/weapon/shard/Bump() spawn( 0 ) @@ -216,9 +244,6 @@ SHARDS /obj/item/weapon/shard/New() - //****RM - //world<<"New shard at [x],[y],[z]" - src.icon_state = pick("large", "medium", "small") switch(src.icon_state) if("small") diff --git a/code/game/objects/items/stacks/sheets/light.dm b/code/game/objects/items/stacks/sheets/light.dm new file mode 100644 index 00000000000..5437fdeccd5 --- /dev/null +++ b/code/game/objects/items/stacks/sheets/light.dm @@ -0,0 +1,35 @@ +/obj/item/stack/light_w + name = "wired glass tiles" + singular_name = "wired glass floor tile" + desc = "A glass tile, which is wired, somehow." + icon_state = "glass_wire" + w_class = 3.0 + force = 3.0 + throwforce = 5.0 + throw_speed = 5 + throw_range = 20 + flags = FPRINT | TABLEPASS | CONDUCT + max_amount = 60 + +/obj/item/stack/light_w/attackby(var/obj/item/O as obj, var/mob/user as mob) + ..() + if(istype(O,/obj/item/weapon/wirecutters)) + var/obj/item/weapon/cable_coil/CC = new/obj/item/weapon/cable_coil(user.loc) + CC.amount = 5 + amount-- + new/obj/item/stack/sheet/glass(user.loc) + if(amount <= 0) + user.drop_from_inventory(src) + del(src) + + if(istype(O,/obj/item/stack/sheet/metal)) + var/obj/item/stack/sheet/metal/M = O + M.amount-- + if(M.amount <= 0) + user.drop_from_inventory(M) + del(M) + amount-- + new/obj/item/stack/tile/light(user.loc) + if(amount <= 0) + user.drop_from_inventory(src) + del(src) diff --git a/code/game/objects/items/stacks/minerals.dm b/code/game/objects/items/stacks/sheets/mineral.dm similarity index 77% rename from code/game/objects/items/stacks/minerals.dm rename to code/game/objects/items/stacks/sheets/mineral.dm index cbd0d465a6d..74ba8d930de 100644 --- a/code/game/objects/items/stacks/minerals.dm +++ b/code/game/objects/items/stacks/sheets/mineral.dm @@ -1,14 +1,16 @@ -/* -CONTAINS: -SANDSTONE -DIAMOND -URANIUM -PLASMA -GOLD -SILVER -*/ +/* Mineral Sheets + * Contains: + * Sandstone + * Diamond + * Uranium + * Plasma + * Gold + * Silver + */ -//Sandstone +/* + * Sandstone + */ var/global/list/datum/stack_recipe/sandstone_recipes = list ( \ new/datum/stack_recipe("pile of dirt", /obj/machinery/hydroponics/soil, 3, time = 10, one_per_turf = 1, on_floor = 1), \ new/datum/stack_recipe("sandstone door", /obj/structure/mineral_door/sandstone, 10, one_per_turf = 1, on_floor = 1), \ @@ -16,12 +18,23 @@ var/global/list/datum/stack_recipe/sandstone_recipes = list ( \ new/datum/stack_recipe("sandstone floor", ???),\*/ ) +/obj/item/stack/sheet/sandstone + name = "sandstone bricks" + desc = "This appears to be a combination of both sand and stone." + singular_name = "sandstone brick" + icon_state = "sheet-sandstone" + throw_speed = 4 + throw_range = 5 + origin_tech = "materials=1" + /obj/item/stack/sheet/sandstone New(var/loc, var/amount=null) recipes = sandstone_recipes return ..() -//Diamond +/* + * Diamond + */ var/global/list/datum/stack_recipe/diamond_recipes = list ( \ new/datum/stack_recipe("diamond door", /obj/structure/mineral_door/transparent/diamond, 10, one_per_turf = 1, on_floor = 1), \ ) @@ -31,7 +44,9 @@ var/global/list/datum/stack_recipe/diamond_recipes = list ( \ recipes = diamond_recipes return ..() -//Uranium +/* + * Uranium + */ var/global/list/datum/stack_recipe/uranium_recipes = list ( \ new/datum/stack_recipe("uranium door", /obj/structure/mineral_door/uranium, 10, one_per_turf = 1, on_floor = 1), \ ) @@ -41,7 +56,9 @@ var/global/list/datum/stack_recipe/uranium_recipes = list ( \ recipes = uranium_recipes return ..() -//Plasma +/* + * Plasma + */ var/global/list/datum/stack_recipe/plasma_recipes = list ( \ new/datum/stack_recipe("plasma door", /obj/structure/mineral_door/transparent/plasma, 10, one_per_turf = 1, on_floor = 1), \ ) @@ -51,7 +68,9 @@ var/global/list/datum/stack_recipe/plasma_recipes = list ( \ recipes = plasma_recipes return ..() -//Gold +/* + * Gold + */ var/global/list/datum/stack_recipe/gold_recipes = list ( \ new/datum/stack_recipe("golden door", /obj/structure/mineral_door/gold, 10, one_per_turf = 1, on_floor = 1), \ ) @@ -61,7 +80,9 @@ var/global/list/datum/stack_recipe/gold_recipes = list ( \ recipes = gold_recipes return ..() -//Silver +/* + * Silver + */ var/global/list/datum/stack_recipe/silver_recipes = list ( \ new/datum/stack_recipe("silver door", /obj/structure/mineral_door/silver, 10, one_per_turf = 1, on_floor = 1), \ ) diff --git a/code/game/objects/items/stacks/metal.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm similarity index 50% rename from code/game/objects/items/stacks/metal.dm rename to code/game/objects/items/stacks/sheets/sheet_types.dm index 3a90b87e8a9..dd778303736 100644 --- a/code/game/objects/items/stacks/metal.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -1,163 +1,142 @@ -/* -CONTAINS: -RODS -METAL -REINFORCED METAL -FLOOR TILES -*/ - - - -// RODS - -/obj/item/stack/rods/attackby(obj/item/W as obj, mob/user as mob) - ..() - if (istype(W, /obj/item/weapon/weldingtool)) - var/obj/item/weapon/weldingtool/WT = W - - if(amount < 2) - user << "\red You need at least two rods to do this." - return - - if(WT.remove_fuel(0,user)) - var/obj/item/stack/sheet/metal/new_item = new(usr.loc) - new_item.add_to_stacks(usr) - for (var/mob/M in viewers(src)) - M.show_message("\red [src] is shaped into metal by [user.name] with the weldingtool.", 3, "\red You hear welding.", 2) - var/obj/item/stack/rods/R = src - src = null - var/replace = (user.get_inactive_hand()==R) - R.use(2) - if (!R && replace) - user.put_in_hands(new_item) - return - ..() - - -/obj/item/stack/rods/attack_self(mob/user as mob) - src.add_fingerprint(user) - - if(!istype(user.loc,/turf)) return 0 - - if (locate(/obj/structure/grille, usr.loc)) - for(var/obj/structure/grille/G in usr.loc) - if (G.destroyed) - G.health = 10 - G.density = 1 - G.destroyed = 0 - G.icon_state = "grille" - use(1) - else - return 1 - else - if(amount < 2) - user << "\blue You need at least two rods to do this." - return - usr << "\blue Assembling grille..." - if (!do_after(usr, 10)) - return - var/obj/structure/grille/F = new /obj/structure/grille/ ( usr.loc ) - usr << "\blue You assemble a grille" - F.add_fingerprint(usr) - use(2) - return - - - -// METAL SHEET - -// /datum/stack_recipe/New(title, result_type, req_amount, res_amount, max_res_amount, time, one_per_turf, on_floor = 0) -var/global/list/datum/stack_recipe/metal_recipes = list ( \ - new/datum/stack_recipe("stool", /obj/structure/stool, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("chair", /obj/structure/stool/bed/chair, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("bed", /obj/structure/stool/bed, 2, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("table parts", /obj/item/weapon/table_parts, 2), \ - new/datum/stack_recipe("rack parts", /obj/item/weapon/rack_parts), \ - new/datum/stack_recipe("closet", /obj/structure/closet, 2, time = 15, one_per_turf = 1, on_floor = 1), \ - null, \ - new/datum/stack_recipe("canister", /obj/machinery/portable_atmospherics/canister, 10, time = 15, one_per_turf = 1, on_floor = 1), \ - null, \ - new/datum/stack_recipe("floor tile", /obj/item/stack/tile/plasteel, 1, 4, 20), \ - new/datum/stack_recipe("metal rod", /obj/item/stack/rods, 1, 2, 60), \ - null, \ - new/datum/stack_recipe("computer frame", /obj/structure/computerframe, 5, time = 25, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("wall girders", /obj/structure/girder, 2, time = 50, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("airlock assembly", /obj/structure/door_assembly, 4, time = 50, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("machine frame", /obj/machinery/constructable_frame/machine_frame, 5, time = 25, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("turret frame", /obj/machinery/porta_turret_construct, 5, time = 25, one_per_turf = 1, on_floor = 1), \ - null, \ - new/datum/stack_recipe("apc frame", /obj/item/apc_frame, 2), \ - new/datum/stack_recipe("grenade casing", /obj/item/weapon/grenade/chem_grenade), \ - new/datum/stack_recipe("light fixture frame", /obj/item/light_fixture_frame, 2), \ - new/datum/stack_recipe("small light fixture frame", /obj/item/light_fixture_frame/small, 1), \ - null, \ - new/datum/stack_recipe("iron door", /obj/structure/mineral_door/iron, 20, one_per_turf = 1, on_floor = 1), \ -) - -/obj/item/stack/sheet/metal - New(var/loc, var/amount=null) - recipes = metal_recipes - return ..() - -// REINFORCED METAL SHEET - -// /datum/stack_recipe/New(title, result_type, req_amount, res_amount, max_res_amount, time, one_per_turf, on_floor = 0) -var/global/list/datum/stack_recipe/plasteel_recipes = list ( \ - new/datum/stack_recipe("AI core", /obj/structure/AIcore, 4, time = 50, one_per_turf = 1), \ - ) - -/obj/item/stack/sheet/plasteel - New(var/loc, var/amount=null) - recipes = plasteel_recipes - return ..() - - - -// TILES - -/obj/item/stack/tile/plasteel/New(var/loc, var/amount=null) - ..() - src.pixel_x = rand(1, 14) - src.pixel_y = rand(1, 14) - return - -/* -/obj/item/stack/tile/plasteel/attack_self(mob/user as mob) - if (usr.stat) - return - var/T = user.loc - if (!( istype(T, /turf) )) - user << "\red You must be on the ground!" - return - if (!( istype(T, /turf/space) )) - user << "\red You cannot build on or repair this turf!" - return - src.build(T) - src.add_fingerprint(user) - use(1) - return -*/ - -/obj/item/stack/tile/plasteel/proc/build(turf/S as turf) - S.ReplaceWithPlating() -// var/turf/simulated/floor/W = S.ReplaceWithFloor() -// W.make_plating() - return - -// CARDBOARD SHEET - BubbleWrap - -// /datum/stack_recipe/New(title, result_type, req_amount, res_amount, max_res_amount, time, one_per_turf, on_floor = 0) -var/global/list/datum/stack_recipe/cardboard_recipes = list ( \ - new/datum/stack_recipe("box", /obj/item/weapon/storage/box), \ - new/datum/stack_recipe("light tubes", /obj/item/weapon/storage/lightbox/tubes), \ - new/datum/stack_recipe("light bulbs", /obj/item/weapon/storage/lightbox/bulbs), \ - new/datum/stack_recipe("mouse traps", /obj/item/weapon/storage/mousetraps), \ - new/datum/stack_recipe("cardborg suit", /obj/item/clothing/suit/cardborg, 3), \ - new/datum/stack_recipe("cardborg helmet", /obj/item/clothing/head/cardborg), \ - new/datum/stack_recipe("pizza box", /obj/item/pizzabox), \ -) - -/obj/item/stack/sheet/cardboard - New(var/loc, var/amount=null) - recipes = cardboard_recipes - return ..() +/* Diffrent misc types of sheets + * Contains: + * Metal + * Plasteel + * Wood + * Cloth + * Cardboard + */ + +/* + * Metal + */ +var/global/list/datum/stack_recipe/metal_recipes = list ( \ + new/datum/stack_recipe("stool", /obj/structure/stool, one_per_turf = 1, on_floor = 1), \ + new/datum/stack_recipe("chair", /obj/structure/stool/bed/chair, one_per_turf = 1, on_floor = 1), \ + new/datum/stack_recipe("bed", /obj/structure/stool/bed, 2, one_per_turf = 1, on_floor = 1), \ + new/datum/stack_recipe("table parts", /obj/item/weapon/table_parts, 2), \ + new/datum/stack_recipe("rack parts", /obj/item/weapon/rack_parts), \ + new/datum/stack_recipe("closet", /obj/structure/closet, 2, time = 15, one_per_turf = 1, on_floor = 1), \ + null, \ + new/datum/stack_recipe("canister", /obj/machinery/portable_atmospherics/canister, 10, time = 15, one_per_turf = 1, on_floor = 1), \ + null, \ + new/datum/stack_recipe("floor tile", /obj/item/stack/tile/plasteel, 1, 4, 20), \ + new/datum/stack_recipe("metal rod", /obj/item/stack/rods, 1, 2, 60), \ + null, \ + new/datum/stack_recipe("computer frame", /obj/structure/computerframe, 5, time = 25, one_per_turf = 1, on_floor = 1), \ + new/datum/stack_recipe("wall girders", /obj/structure/girder, 2, time = 50, one_per_turf = 1, on_floor = 1), \ + new/datum/stack_recipe("airlock assembly", /obj/structure/door_assembly, 4, time = 50, one_per_turf = 1, on_floor = 1), \ + new/datum/stack_recipe("machine frame", /obj/machinery/constructable_frame/machine_frame, 5, time = 25, one_per_turf = 1, on_floor = 1), \ + new/datum/stack_recipe("turret frame", /obj/machinery/porta_turret_construct, 5, time = 25, one_per_turf = 1, on_floor = 1), \ + null, \ + new/datum/stack_recipe("apc frame", /obj/item/apc_frame, 2), \ + new/datum/stack_recipe("grenade casing", /obj/item/weapon/grenade/chem_grenade), \ + new/datum/stack_recipe("light fixture frame", /obj/item/light_fixture_frame, 2), \ + new/datum/stack_recipe("small light fixture frame", /obj/item/light_fixture_frame/small, 1), \ + null, \ + new/datum/stack_recipe("iron door", /obj/structure/mineral_door/iron, 20, one_per_turf = 1, on_floor = 1), \ +) + +/obj/item/stack/sheet/metal + name = "metal" + desc = "Sheets made out off metal. It has been dubbed Metal Sheets." + singular_name = "metal sheet" + icon_state = "sheet-metal" + m_amt = 3750 + throwforce = 14.0 + flags = FPRINT | TABLEPASS | CONDUCT + origin_tech = "materials=1" + +/obj/item/stack/sheet/metal/cyborg + name = "metal" + desc = "Sheets made out off metal. It has been dubbed Metal Sheets." + singular_name = "metal sheet" + icon_state = "sheet-metal" + m_amt = 0 + throwforce = 14.0 + flags = FPRINT | TABLEPASS | CONDUCT + +/obj/item/stack/sheet/metal/New(var/loc, var/amount=null) + recipes = metal_recipes + return ..() + + +/* + * Plasteel + */ +var/global/list/datum/stack_recipe/plasteel_recipes = list ( \ + new/datum/stack_recipe("AI core", /obj/structure/AIcore, 4, time = 50, one_per_turf = 1), \ + ) + +/obj/item/stack/sheet/plasteel + name = "plasteel" + singular_name = "plasteel sheet" + desc = "This sheet is an alloy of iron and plasma." + icon_state = "sheet-plasteel" + item_state = "sheet-metal" + m_amt = 7500 + throwforce = 15.0 + flags = FPRINT | TABLEPASS | CONDUCT + origin_tech = "materials=2" + +/obj/item/stack/sheet/plasteel/New(var/loc, var/amount=null) + recipes = plasteel_recipes + return ..() + +/* + * Wood + */ +var/global/list/datum/stack_recipe/wood_recipes = list ( \ + new/datum/stack_recipe("wooden sandals", /obj/item/clothing/shoes/sandal, 1), \ + new/datum/stack_recipe("table parts", /obj/item/weapon/table_parts/wood, 2), \ + new/datum/stack_recipe("wood floor tile", /obj/item/stack/tile/wood, 1, 4, 20), \ + new/datum/stack_recipe("wooden barricade", /obj/structure/barricade/wooden, 5, time = 50, one_per_turf = 1, on_floor = 1), \ + new/datum/stack_recipe("wooden door", /obj/structure/mineral_door/wood, 10, time = 20, one_per_turf = 1, on_floor = 1), \ + new/datum/stack_recipe("coffin", /obj/structure/closet/coffin, 5, time = 15, one_per_turf = 1, on_floor = 1), \ + ) + +/obj/item/stack/sheet/wood + name = "wooden planks" + desc = "One can only guess that this is a bunch of wood." + singular_name = "wood plank" + icon_state = "sheet-wood" + origin_tech = "materials=1;biotech=1" + +/obj/item/stack/sheet/wood/New(var/loc, var/amount=null) + recipes = wood_recipes + return ..() + +/* + * Cloth + */ +/obj/item/stack/sheet/cloth + name = "cloth" + desc = "This roll of cloth is made from only the finest chemicals and bunny rabbits." + singular_name = "cloth roll" + icon_state = "sheet-cloth" + origin_tech = "materials=2" + +/* + * Cardboard + */ +var/global/list/datum/stack_recipe/cardboard_recipes = list ( \ + new/datum/stack_recipe("box", /obj/item/weapon/storage/box), \ + new/datum/stack_recipe("light tubes", /obj/item/weapon/storage/lightbox/tubes), \ + new/datum/stack_recipe("light bulbs", /obj/item/weapon/storage/lightbox/bulbs), \ + new/datum/stack_recipe("mouse traps", /obj/item/weapon/storage/mousetraps), \ + new/datum/stack_recipe("cardborg suit", /obj/item/clothing/suit/cardborg, 3), \ + new/datum/stack_recipe("cardborg helmet", /obj/item/clothing/head/cardborg), \ + new/datum/stack_recipe("pizza box", /obj/item/pizzabox), \ +) + +/obj/item/stack/sheet/cardboard //BubbleWrap + name = "cardboard" + desc = "Large sheets of card, like boxes folded flat." + singular_name = "cardboard sheet" + icon_state = "sheet-card" + flags = FPRINT | TABLEPASS + origin_tech = "materials=1" + +/obj/item/stack/sheet/cardboard/New(var/loc, var/amount=null) + recipes = cardboard_recipes + return ..() \ No newline at end of file diff --git a/code/game/objects/items/stacks/sheets/sheets.dm b/code/game/objects/items/stacks/sheets/sheets.dm new file mode 100644 index 00000000000..138f904ae9f --- /dev/null +++ b/code/game/objects/items/stacks/sheets/sheets.dm @@ -0,0 +1,21 @@ +/obj/item/stack/sheet + name = "sheet" + flags = FPRINT | TABLEPASS + w_class = 3.0 + force = 5 + throwforce = 5 + max_amount = 50 + throw_speed = 3 + throw_range = 3 + attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "smashed") + var/perunit = 3750 + +/obj/item/stack/sheet/attackby(obj/item/weapon/W as obj, mob/user as mob) + if (istype(W, /obj/item/weapon/sheetsnatcher)) + var/obj/item/weapon/sheetsnatcher/S = W + if(!S.mode) + S.add(src,user) + else + for (var/obj/item/stack/sheet/stack in locate(src.x,src.y,src.z)) + S.add(stack,user) + ..() \ No newline at end of file diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index 0db64da3805..eecc0d18ead 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -1,116 +1,36 @@ +/* Stack type objects! + * Contains: + * Stacks + * Recipe datum + */ + /* - Base object for stackable items. - Stackable items are: - metal - rmetal - glass - rglass - wood planks - floor tiles - metal rods -*/ + * Stacks + */ +/obj/item/stack + origin_tech = "materials=1" + var/list/datum/stack_recipe/recipes + var/singular_name + var/amount = 1 + var/max_amount //also see stack recipes initialisation, param "max_res_amount" must be equal to this max_amount /obj/item/stack/New(var/loc, var/amount=null) ..() if (amount) src.amount=amount - return +/obj/item/stack/Del() + if (src && usr && usr.machine==src) + usr << browse(null, "window=stack") + ..() + /obj/item/stack/examine() set src in view(1) ..() usr << "There are [src.amount] [src.singular_name]\s in the stack." return -/obj/item/stack/proc/use(var/amount) - src.amount-=amount - if (src.amount<=0) - var/oldsrc = src - src = null //dont kill proc after del() - if(usr) - usr.before_take_item(oldsrc) - del(oldsrc) - return - -/obj/item/stack/proc/add_to_stacks(mob/usr as mob) - var/obj/item/stack/oldsrc = src - src = null - for (var/obj/item/stack/item in usr.loc) - if (item==oldsrc) - continue - if (!istype(item, oldsrc.type)) - continue - if (item.amount>=item.max_amount) - continue - oldsrc.attackby(item, usr) - usr << "You add new [item.singular_name] to the stack. It now contains [item.amount] [item.singular_name]\s." - if(!oldsrc) - break - -/obj/item/stack/attack_hand(mob/user as mob) - if (user.get_inactive_hand() == src) - var/obj/item/stack/F = new src.type( user, amount=1) - F.copy_evidences(src) - user.put_in_hands(F) - src.add_fingerprint(user) - F.add_fingerprint(user) - use(1) - if (src && usr.machine==src) - spawn(0) src.interact(usr) - else - ..() - return - -/obj/item/stack/attackby(obj/item/W as obj, mob/user as mob) - ..() - if (istype(W, src.type)) - var/obj/item/stack/S = W - if (S.amount >= max_amount) - return 1 - var/to_transfer as num - if (user.get_inactive_hand()==src) - to_transfer = 1 - else - to_transfer = min(src.amount, S.max_amount-S.amount) - S.amount+=to_transfer - if (S && usr.machine==S) - spawn(0) S.interact(usr) - src.use(to_transfer) - if (src && usr.machine==src) - spawn(0) src.interact(usr) - else return ..() - -/obj/item/stack/proc/copy_evidences(obj/item/stack/from as obj) - src.blood_DNA = from.blood_DNA - src.fingerprints = from.fingerprints - src.fingerprintshidden = from.fingerprintshidden - src.fingerprintslast = from.fingerprintslast - //TODO bloody overlay - -/datum/stack_recipe - var/title = "ERROR" - var/result_type - var/req_amount = 1 - var/res_amount = 1 - var/max_res_amount = 1 - var/time = 0 - var/one_per_turf = 0 - var/on_floor = 0 - New(title, result_type, req_amount = 1, res_amount = 1, max_res_amount = 1, time = 0, one_per_turf = 0, on_floor = 0) - src.title = title - src.result_type = result_type - src.req_amount = req_amount - src.res_amount = res_amount - src.max_res_amount = max_res_amount - src.time = time - src.one_per_turf = one_per_turf - src.on_floor = on_floor - -/obj/item/stack - var/list/datum/stack_recipe/recipes - origin_tech = "materials=1" - /obj/item/stack/attack_self(mob/user as mob) interact(user) @@ -217,7 +137,89 @@ return return -/obj/item/stack/Del() - if (src && usr && usr.machine==src) - usr << browse(null, "window=stack") +/obj/item/stack/proc/use(var/amount) + src.amount-=amount + if (src.amount<=0) + var/oldsrc = src + src = null //dont kill proc after del() + if(usr) + usr.before_take_item(oldsrc) + del(oldsrc) + return + +/obj/item/stack/proc/add_to_stacks(mob/usr as mob) + var/obj/item/stack/oldsrc = src + src = null + for (var/obj/item/stack/item in usr.loc) + if (item==oldsrc) + continue + if (!istype(item, oldsrc.type)) + continue + if (item.amount>=item.max_amount) + continue + oldsrc.attackby(item, usr) + usr << "You add new [item.singular_name] to the stack. It now contains [item.amount] [item.singular_name]\s." + if(!oldsrc) + break + +/obj/item/stack/attack_hand(mob/user as mob) + if (user.get_inactive_hand() == src) + var/obj/item/stack/F = new src.type( user, amount=1) + F.copy_evidences(src) + user.put_in_hands(F) + src.add_fingerprint(user) + F.add_fingerprint(user) + use(1) + if (src && usr.machine==src) + spawn(0) src.interact(usr) + else + ..() + return + +/obj/item/stack/attackby(obj/item/W as obj, mob/user as mob) ..() + if (istype(W, src.type)) + var/obj/item/stack/S = W + if (S.amount >= max_amount) + return 1 + var/to_transfer as num + if (user.get_inactive_hand()==src) + to_transfer = 1 + else + to_transfer = min(src.amount, S.max_amount-S.amount) + S.amount+=to_transfer + if (S && usr.machine==S) + spawn(0) S.interact(usr) + src.use(to_transfer) + if (src && usr.machine==src) + spawn(0) src.interact(usr) + else return ..() + +/obj/item/stack/proc/copy_evidences(obj/item/stack/from as obj) + src.blood_DNA = from.blood_DNA + src.fingerprints = from.fingerprints + src.fingerprintshidden = from.fingerprintshidden + src.fingerprintslast = from.fingerprintslast + //TODO bloody overlay + +/* + * Recipe datum + */ +/datum/stack_recipe + var/title = "ERROR" + var/result_type + var/req_amount = 1 + var/res_amount = 1 + var/max_res_amount = 1 + var/time = 0 + var/one_per_turf = 0 + var/on_floor = 0 + New(title, result_type, req_amount = 1, res_amount = 1, max_res_amount = 1, time = 0, one_per_turf = 0, on_floor = 0) + src.title = title + src.result_type = result_type + src.req_amount = req_amount + src.res_amount = res_amount + src.max_res_amount = max_res_amount + src.time = time + src.one_per_turf = one_per_turf + src.on_floor = on_floor \ No newline at end of file diff --git a/code/game/objects/items/stacks/tiles/light.dm b/code/game/objects/items/stacks/tiles/light.dm new file mode 100644 index 00000000000..460db9b7662 --- /dev/null +++ b/code/game/objects/items/stacks/tiles/light.dm @@ -0,0 +1,36 @@ +/obj/item/stack/tile/light + name = "light tiles" + singular_name = "light floor tile" + desc = "A floor tile, made out off glass. It produces light." + icon_state = "tile_e" + w_class = 3.0 + force = 3.0 + throwforce = 5.0 + throw_speed = 5 + throw_range = 20 + flags = FPRINT | TABLEPASS | CONDUCT + max_amount = 60 + attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "smashed") + var/on = 1 + var/state //0 = fine, 1 = flickering, 2 = breaking, 3 = broken + +/obj/item/stack/tile/light/New() + ..() + if(prob(5)) + state = 3 //broken + else if(prob(5)) + state = 2 //breaking + else if(prob(10)) + state = 1 //flickering occasionally + else + state = 0 //fine + +/obj/item/stack/tile/light/attackby(var/obj/item/O as obj, var/mob/user as mob) + ..() + if(istype(O,/obj/item/weapon/crowbar)) + new/obj/item/stack/sheet/metal(user.loc) + amount-- + new/obj/item/stack/light_w(user.loc) + if(amount <= 0) + user.drop_from_inventory(src) + del(src) \ No newline at end of file diff --git a/code/game/objects/items/stacks/tiles/plasteel.dm b/code/game/objects/items/stacks/tiles/plasteel.dm new file mode 100644 index 00000000000..05823faf341 --- /dev/null +++ b/code/game/objects/items/stacks/tiles/plasteel.dm @@ -0,0 +1,42 @@ +/obj/item/stack/tile/plasteel + name = "floor tiles" + singular_name = "floor tile" + desc = "Those could work as a pretty decent throwing weapon" + icon_state = "tile" + w_class = 3.0 + force = 6.0 + m_amt = 937.5 + throwforce = 15.0 + throw_speed = 5 + throw_range = 20 + flags = FPRINT | TABLEPASS | CONDUCT + max_amount = 60 + +/obj/item/stack/tile/plasteel/New(var/loc, var/amount=null) + ..() + src.pixel_x = rand(1, 14) + src.pixel_y = rand(1, 14) + return + +/* +/obj/item/stack/tile/plasteel/attack_self(mob/user as mob) + if (usr.stat) + return + var/T = user.loc + if (!( istype(T, /turf) )) + user << "\red You must be on the ground!" + return + if (!( istype(T, /turf/space) )) + user << "\red You cannot build on or repair this turf!" + return + src.build(T) + src.add_fingerprint(user) + use(1) + return +*/ + +/obj/item/stack/tile/plasteel/proc/build(turf/S as turf) + S.ReplaceWithPlating() +// var/turf/simulated/floor/W = S.ReplaceWithFloor() +// W.make_plating() + return \ No newline at end of file diff --git a/code/game/objects/items/stacks/tiles/tile_types.dm b/code/game/objects/items/stacks/tiles/tile_types.dm new file mode 100644 index 00000000000..16fe749e862 --- /dev/null +++ b/code/game/objects/items/stacks/tiles/tile_types.dm @@ -0,0 +1,38 @@ +/* Diffrent misc types of tiles + * Contains: + * Grass + * Wood + */ + +/* + * Grass + */ +/obj/item/stack/tile/grass + name = "grass tiles" + singular_name = "grass floor tile" + desc = "A patch of grass like they often use on golf courses" + icon_state = "tile_grass" + w_class = 3.0 + force = 1.0 + throwforce = 1.0 + throw_speed = 5 + throw_range = 20 + flags = FPRINT | TABLEPASS | CONDUCT + max_amount = 60 + origin_tech = "biotech=1" + +/* + * Wood + */ +/obj/item/stack/tile/wood + name = "wood floor tiles" + singular_name = "wood floor tile" + desc = "an easy to fit wood floor tile" + icon_state = "tile-wood" + w_class = 3.0 + force = 1.0 + throwforce = 1.0 + throw_speed = 5 + throw_range = 20 + flags = FPRINT | TABLEPASS | CONDUCT + max_amount = 60 \ No newline at end of file diff --git a/code/game/objects/items/stacks/wood.dm b/code/game/objects/items/stacks/wood.dm deleted file mode 100644 index 772c1b42d54..00000000000 --- a/code/game/objects/items/stacks/wood.dm +++ /dev/null @@ -1,17 +0,0 @@ -/* -CONTAINS: -WOOD PLANKS -*/ - -var/global/list/datum/stack_recipe/wood_recipes = list ( \ - new/datum/stack_recipe("wooden sandals", /obj/item/clothing/shoes/sandal, 1), \ - new/datum/stack_recipe("table parts", /obj/item/weapon/table_parts/wood, 2), \ - new/datum/stack_recipe("wood floor tile", /obj/item/stack/tile/wood, 1, 4, 20), \ - new/datum/stack_recipe("wooden barricade", /obj/structure/barricade/wooden, 5, time = 50, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("wooden door", /obj/structure/mineral_door/wood, 10, time = 20, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("coffin", /obj/structure/closet/coffin, 5, time = 15, one_per_turf = 1, on_floor = 1), \ - ) - -/obj/item/stack/sheet/wood/New(var/loc, var/amount=null) - recipes = wood_recipes - return ..() \ No newline at end of file diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index e69de29bb2d..11deb181af5 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -0,0 +1,77 @@ +/obj + //var/datum/module/mod //not used + var/m_amt = 0 // metal + var/g_amt = 0 // glass + var/w_amt = 0 // waster amounts + var/origin_tech = null //Used by R&D to determine what research bonuses it grants. + var/reliability = 100 //Used by SOME devices to determine how reliable they are. + var/crit_fail = 0 + var/unacidable = 0 //universal "unacidabliness" var, here so you can use it in any obj. + var/datum/marked_datum + animate_movement = 2 + var/throwforce = 1 + var/list/attack_verb = list() //Used in attackby() to say how something was attacked "[x] has been [z.attack_verb] by [y] with [z]" + +/obj/proc/handle_internal_lifeform(mob/lifeform_inside_me, breath_request) + //Return: (NONSTANDARD) + // null if object handles breathing logic for lifeform + // datum/air_group to tell lifeform to process using that breath return + //DEFAULT: Take air from turf to give to have mob process + if(breath_request>0) + return remove_air(breath_request) + else + return null + +/obj/proc/initialize() + return + +/obj/proc/updateUsrDialog() + var/list/nearby = viewers(1, src) + for(var/mob/M in nearby) + if ((M.client && M.machine == src)) + src.attack_hand(M) + if (istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/living/silicon/robot)) + if (!(usr in nearby)) + if (usr.client && usr.machine==src) // && M.machine == src is omitted because if we triggered this by using the dialog, it doesn't matter if our machine changed in between triggering it and this - the dialog is probably still supposed to refresh. + src.attack_ai(usr) + + // check for TK users + //AutoUpdateTK(src) + if (istype(usr, /mob/living/carbon/human)) + if(istype(usr.l_hand, /obj/item/tk_grab) || istype(usr.r_hand, /obj/item/tk_grab/)) + if(!(usr in nearby)) + if(usr.client && usr.machine==src) + src.attack_hand(usr) + +/obj/proc/updateDialog() + var/list/nearby = viewers(1, src) + for(var/mob/M in nearby) + if ((M.client && M.machine == src)) + src.attack_hand(M) + AutoUpdateAI(src) + //AutoUpdateTK(src) + +/obj/proc/update_icon() + return + +/obj/item/proc/updateSelfDialog() + var/mob/M = src.loc + if(istype(M) && M.client && M.machine == src) + src.attack_self(M) + + +/obj/proc/alter_health() + return 1 + +/obj/proc/hide(h) + return + + +/obj/proc/hear_talk(mob/M as mob, text) +/* + var/mob/mo = locate(/mob) in src + if(mo) + var/rendered = "[M.name]: [text]" + mo.show_message(rendered, 2) + */ + return \ No newline at end of file diff --git a/code/game/objects/structures/bedsheet_bin.dm b/code/game/objects/structures/bedsheet_bin.dm index ba1fe00fe62..d286eba22da 100644 --- a/code/game/objects/structures/bedsheet_bin.dm +++ b/code/game/objects/structures/bedsheet_bin.dm @@ -1,5 +1,13 @@ // BEDSHEET BIN +/obj/structure/bedsheetbin + name = "linen bin" + desc = "A bin for containing bedsheets. It looks rather cosy." + icon = 'icons/obj/items.dmi' + icon_state = "bedbin" + var/amount = 23.0 + anchored = 1.0 + /obj/structure/bedsheetbin/attackby(obj/item/weapon/W as obj, mob/user as mob) if (istype(W, /obj/item/weapon/bedsheet)) del(W) diff --git a/code/game/objects/structures/displaycase.dm b/code/game/objects/structures/displaycase.dm index 9fd89980da4..a9a767b84bc 100644 --- a/code/game/objects/structures/displaycase.dm +++ b/code/game/objects/structures/displaycase.dm @@ -1,3 +1,15 @@ +/obj/structure/displaycase + name = "Display Case" + icon = 'icons/obj/stationobjs.dmi' + icon_state = "glassbox1" + desc = "A display case for prized possessions. It taunts you to kick it." + density = 1 + anchored = 1 + unacidable = 1//Dissolving the case would also delete the gun. + var/health = 30 + var/occupied = 1 + var/destroyed = 0 + /obj/structure/displaycase/ex_act(severity) switch(severity) if (1) diff --git a/code/game/objects/structures/false_walls.dm b/code/game/objects/structures/false_walls.dm index 62a509c00bf..76e0240e1f0 100644 --- a/code/game/objects/structures/false_walls.dm +++ b/code/game/objects/structures/false_walls.dm @@ -1,34 +1,65 @@ /obj/structure/falsewall var/mineral = "metal" -/obj/structure/falserwall - var/mineral = "metal" - /obj/structure/falsewall/gold + name = "gold wall" + desc = "A wall with gold plating. Swag" + icon_state = "" mineral = "gold" /obj/structure/falsewall/silver + name = "silver wall" + desc = "A wall with silver plating. Shiny" + icon_state = "" mineral = "silver" /obj/structure/falsewall/diamond + name = "diamond wall" + desc = "A wall with diamond plating. You monster" + icon_state = "" mineral = "diamond" /obj/structure/falsewall/uranium + name = "uranium wall" + desc = "A wall with uranium plating. This is probably a bad idea" + icon_state = "" mineral = "uranium" var/active = null var/last_event = 0 /obj/structure/falsewall/plasma + name = "plasma wall" + desc = "A wall with plasma plating. This is definately a bad idea" + icon_state = "" mineral = "plasma" +//-----------wtf?-----------start +/obj/structure/falsewall/bananium + name = "bananium wall" + desc = "A wall with bananium plating. Honk" + icon_state = "" + /obj/structure/falsewall/clown mineral = "clown" +/obj/structure/falsewall/sand + name = "sandstone wall" + desc = "A wall with sandstone plating." + icon_state = "" + /obj/structure/falsewall/sandstone mineral = "sandstone" +//------------wtf?------------end -/*/obj/structure/falsewall/wood - mineral = "wood"*/ +/obj/structure/falserwall + name = "r wall" + desc = "A huge chunk of reinforced metal used to seperate rooms." + icon = 'icons/turf/walls.dmi' + icon_state = "r_wall" + density = 1 + opacity = 1 + anchored = 1 + var/mineral = "metal" /obj/structure/falsewall/attack_hand(mob/user as mob) if(density) diff --git a/code/game/objects/structures/kitchen_spike.dm b/code/game/objects/structures/kitchen_spike.dm index 7900e3f41f9..308103ab7c0 100644 --- a/code/game/objects/structures/kitchen_spike.dm +++ b/code/game/objects/structures/kitchen_spike.dm @@ -1,5 +1,16 @@ //////Kitchen Spike +/obj/structure/kitchenspike + name = "a meat spike" + icon = 'icons/obj/kitchen.dmi' + icon_state = "spike" + desc = "A spike for collecting meat from animals" + density = 1 + anchored = 1 + var/meat = 0 + var/occupied = 0 + var/meattype = 0 // 0 - Nothing, 1 - Monkey, 2 - Xeno + /obj/structure/kitchenspike attack_paw(mob/user as mob) return src.attack_hand(usr) diff --git a/code/game/objects/structures/lattice.dm b/code/game/objects/structures/lattice.dm index 56ce8cb1e43..12ce9e0b5ff 100644 --- a/code/game/objects/structures/lattice.dm +++ b/code/game/objects/structures/lattice.dm @@ -1,3 +1,37 @@ +/obj/structure/lattice + desc = "A lightweight support lattice." + name = "lattice" + icon = 'icons/obj/structures.dmi' + icon_state = "latticefull" + density = 0 + anchored = 1.0 + layer = 2.3 //under pipes + // flags = CONDUCT + +/obj/structure/lattice/New() + ..() + if(!(istype(src.loc, /turf/space))) + del(src) + for(var/obj/structure/lattice/LAT in src.loc) + if(LAT != src) + del(LAT) + icon = 'icons/obj/smoothlattice.dmi' + icon_state = "latticeblank" + updateOverlays() + for (var/dir in cardinal) + var/obj/structure/lattice/L + if(locate(/obj/structure/lattice, get_step(src, dir))) + L = locate(/obj/structure/lattice, get_step(src, dir)) + L.updateOverlays() + +/obj/structure/lattice/Del() + for (var/dir in cardinal) + var/obj/structure/lattice/L + if(locate(/obj/structure/lattice, get_step(src, dir))) + L = locate(/obj/structure/lattice, get_step(src, dir)) + L.updateOverlays(src.loc) + ..() + /obj/structure/lattice/blob_act() del(src) return @@ -28,4 +62,22 @@ new /obj/item/stack/rods(src.loc) del(src) - return \ No newline at end of file + return + +/obj/structure/lattice/proc/updateOverlays() + //if(!(istype(src.loc, /turf/space))) + // del(src) + spawn(1) + overlays = list() + + var/dir_sum = 0 + + for (var/direction in cardinal) + if(locate(/obj/structure/lattice, get_step(src, direction))) + dir_sum += direction + else + if(!(istype(get_step(src, direction), /turf/space))) + dir_sum += direction + + icon_state = "lattice[dir_sum]" + return \ No newline at end of file diff --git a/code/game/objects/structures/mop_bucket.dm b/code/game/objects/structures/mop_bucket.dm index 530aeddf96a..b59e3a28768 100644 --- a/code/game/objects/structures/mop_bucket.dm +++ b/code/game/objects/structures/mop_bucket.dm @@ -1,3 +1,14 @@ +/obj/structure/mopbucket + desc = "Fill it with water, but don't forget a mop!" + name = "mop bucket" + icon = 'icons/obj/janitor.dmi' + icon_state = "mopbucket" + density = 1 + flags = FPRINT + pressure_resistance = ONE_ATMOSPHERE + flags = FPRINT | TABLEPASS | OPENCONTAINER + var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite + /obj/structure/mopbucket/New() var/datum/reagents/R = new/datum/reagents(100) reagents = R diff --git a/code/game/machinery/morgue.dm b/code/game/objects/structures/morgue.dm similarity index 85% rename from code/game/machinery/morgue.dm rename to code/game/objects/structures/morgue.dm index c864eaadac4..6bb2cf69ab9 100644 --- a/code/game/machinery/morgue.dm +++ b/code/game/objects/structures/morgue.dm @@ -1,3 +1,24 @@ +/* Morgue stuff + * Contains: + * Morgue + * Morgue trays + * Creamatorium + * Creamatorium trays + */ + +/* + * Morgue + */ + +/obj/structure/morgue + name = "morgue" + desc = "Used to keep bodies in untill someone fetches them." + icon = 'icons/obj/stationobjs.dmi' + icon_state = "morgue1" + density = 1 + var/obj/structure/m_tray/connected = null + anchored = 1.0 + /obj/structure/morgue/proc/update() if (src.connected) src.icon_state = "morgue0" @@ -99,6 +120,20 @@ del(src.connected) return + +/* + * Morgue tray + */ +/obj/structure/m_tray + name = "morgue tray" + desc = "Apply corpse before closing." + icon = 'icons/obj/stationobjs.dmi' + icon_state = "morguet" + density = 1 + layer = 2.0 + var/obj/structure/morgue/connected = null + anchored = 1.0 + /obj/structure/m_tray/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) if (istype(mover, /obj/item/weapon/dummy)) return 1 @@ -134,6 +169,23 @@ B << text("\red [] stuffs [] into []!", user, O, src) return + +/* + * Crematorium + */ + +/obj/structure/crematorium + name = "crematorium" + desc = "A human incinerator. Works well on barbeque nights." + icon = 'icons/obj/stationobjs.dmi' + icon_state = "crema1" + density = 1 + var/obj/structure/c_tray/connected = null + anchored = 1.0 + var/cremating = 0 + var/id = 1 + var/locked = 0 + /obj/structure/crematorium/proc/update() if (src.connected) src.icon_state = "crema0" @@ -287,6 +339,20 @@ playsound(src.loc, 'sound/machines/ding.ogg', 50, 1) return + +/* + * Crematorium tray + */ +/obj/structure/c_tray + name = "crematorium tray" + desc = "Apply body before burning." + icon = 'icons/obj/stationobjs.dmi' + icon_state = "cremat" + density = 1 + layer = 2.0 + var/obj/structure/crematorium/connected = null + anchored = 1.0 + /obj/structure/c_tray/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) if (istype(mover, /obj/item/weapon/dummy)) return 1 diff --git a/code/game/objects/structures/noticeboard.dm b/code/game/objects/structures/noticeboard.dm index 3ae115a4850..8afcbf85235 100644 --- a/code/game/objects/structures/noticeboard.dm +++ b/code/game/objects/structures/noticeboard.dm @@ -1,4 +1,12 @@ /obj/structure/noticeboard + name = "Notice Board" + icon = 'icons/obj/stationobjs.dmi' + icon_state = "nboard00" + flags = FPRINT + desc = "A board for pinning important notices upon." + density = 0 + anchored = 1 + var/notices = 0 //attaching papers!! /obj/structure/noticeboard/attackby(var/obj/item/weapon/O as obj, var/mob/user as mob) diff --git a/code/game/objects/structures/aliennests.dm b/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm similarity index 89% rename from code/game/objects/structures/aliennests.dm rename to code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm index f79213a22f5..a45e2436b80 100644 --- a/code/game/objects/structures/aliennests.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm @@ -1,4 +1,12 @@ //Alium nests. Essentially beds with an unbuckle delay that only aliums can buckle mobs to. + +/obj/structure/stool/bed/nest + name = "alien nest" + desc = "It's a gruesome pile of thick, sticky resin shaped like a nest." + icon = 'icons/mob/alien.dmi' + icon_state = "nest" + var/health = 100 + /obj/structure/stool/bed/nest/manual_unbuckle(mob/user as mob) if(buckled_mob) if(buckled_mob.buckled == src) @@ -48,9 +56,6 @@ src.add_fingerprint(user) return -/obj/structure/stool/blob_act() - del(src) - /obj/structure/stool/bed/nest/attackby(obj/item/weapon/W as obj, mob/user as mob) var/aforce = W.force health = max(0, health - aforce) diff --git a/code/game/objects/structures/stool_chair_bed.dm b/code/game/objects/structures/stool_bed_chair_nest/bed.dm similarity index 55% rename from code/game/objects/structures/stool_chair_bed.dm rename to code/game/objects/structures/stool_bed_chair_nest/bed.dm index 9b089366db9..41d111bac6a 100644 --- a/code/game/objects/structures/stool_chair_bed.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/bed.dm @@ -1,59 +1,40 @@ -/obj/structure/stool/ex_act(severity) - switch(severity) - if(1.0) - del(src) - return - if(2.0) - if (prob(50)) - del(src) - return - if(3.0) - if (prob(5)) - del(src) - return - return +/* Beds... get your mind out of the gutter, they're for sleeping! + * Contains: + * Beds + * Roller beds + */ -/obj/structure/stool/blob_act() - if(prob(75)) - new /obj/item/stack/sheet/metal(src.loc) - del(src) +/* + * Beds + */ +/obj/structure/stool/bed + name = "bed" + desc = "This is used to lie in, sleep in or strap on." + icon_state = "bed" + var/mob/living/buckled_mob -/obj/structure/stool/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W, /obj/item/weapon/wrench)) - playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) - new /obj/item/stack/sheet/metal(src.loc) - del(src) - return - -/obj/structure/stool/bed/chair/attackby(obj/item/weapon/W as obj, mob/user as mob) - ..() - if(istype(W, /obj/item/assembly/shock_kit)) - var/obj/structure/stool/bed/chair/e_chair/E = new /obj/structure/stool/bed/chair/e_chair(src.loc) - playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) - E.dir = src.dir - E.part = W - W.loc = E - W.master = E - user.u_equip(W) - W.layer = initial(W.layer) - del(src) - return - return - - -/obj/structure/stool/bed/chair/wood/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W, /obj/item/weapon/wrench)) - playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) - new /obj/item/stack/sheet/wood(src.loc) - del(src) - else - ..() +/obj/structure/stool/bed/alien + name = "resting contraption" + desc = "This looks similar to contraptions from earth. Could aliens be stealing our technology?" + icon_state = "abed" /obj/structure/stool/bed/Del() unbuckle() ..() return +/obj/structure/stool/bed/attack_paw(mob/user as mob) + return src.attack_hand(user) + +/obj/structure/stool/bed/attack_hand(mob/user as mob) + manual_unbuckle(user) + return + +/obj/structure/stool/bed/MouseDrop_T(mob/M as mob, mob/user as mob) + if(!istype(M)) return + buckle_mob(M, user) + return + /obj/structure/stool/bed/proc/unbuckle() if(buckled_mob) if(buckled_mob.buckled == src) //this is probably unneccesary, but it doesn't hurt @@ -106,58 +87,9 @@ src.add_fingerprint(user) return -/obj/structure/stool/bed/MouseDrop_T(mob/M as mob, mob/user as mob) - if(!istype(M)) return - buckle_mob(M, user) - return - -/obj/structure/stool/bed/attack_paw(mob/user as mob) - return src.attack_hand(user) - -/obj/structure/stool/bed/attack_hand(mob/user as mob) - manual_unbuckle(user) - return - -/obj/structure/stool/bed/chair/New() - if(anchored) - src.verbs -= /atom/movable/verb/pull - handle_rotation() - ..() - return - -/obj/structure/stool/bed/chair/proc/handle_rotation() //making this into a seperate proc so office chairs can call it on Move() - if(src.dir == NORTH) - src.layer = FLY_LAYER - else - src.layer = OBJ_LAYER - - if(buckled_mob) - if(buckled_mob.loc != src.loc) - buckled_mob.buckled = null //Temporary, so Move() succeeds. - if(!buckled_mob.Move(loc)) - unbuckle() - buckled_mob = null - else - buckled_mob.buckled = src //Restoring - if(buckled_mob) - buckled_mob.dir = dir - -/obj/structure/stool/bed/chair/verb/rotate() - set name = "Rotate Chair" - set category = "Object" - set src in oview(1) - - src.dir = turn(src.dir, 90) - handle_rotation() - return - -/obj/structure/stool/bed/chair/MouseDrop_T(mob/M as mob, mob/user as mob) - if(!istype(M)) return - buckle_mob(M, user) - return - -//roller bed - +/* + * Roller beds + */ /obj/structure/stool/bed/roller name = "roller bed" icon = 'icons/obj/rollerbed.dmi' @@ -190,4 +122,4 @@ density = 0 icon_state = "down" ..() - return + return \ No newline at end of file diff --git a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm new file mode 100644 index 00000000000..a0f4d164ac2 --- /dev/null +++ b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm @@ -0,0 +1,109 @@ +/obj/structure/stool/bed/chair //YES, chairs are a type of bed, which are a type of stool. This works, believe me. -Pete + name = "chair" + desc = "You sit in this. Either by will or force." + icon_state = "chair" + +/obj/structure/stool/bed/chair/New() + if(anchored) + src.verbs -= /atom/movable/verb/pull + handle_rotation() + ..() + return + +/obj/structure/stool/bed/chair/attackby(obj/item/weapon/W as obj, mob/user as mob) + ..() + if(istype(W, /obj/item/assembly/shock_kit)) + var/obj/structure/stool/bed/chair/e_chair/E = new /obj/structure/stool/bed/chair/e_chair(src.loc) + playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) + E.dir = src.dir + E.part = W + W.loc = E + W.master = E + user.u_equip(W) + W.layer = initial(W.layer) + del(src) + return + return + + +/obj/structure/stool/bed/chair/proc/handle_rotation() //making this into a seperate proc so office chairs can call it on Move() + if(src.dir == NORTH) + src.layer = FLY_LAYER + else + src.layer = OBJ_LAYER + + if(buckled_mob) + if(buckled_mob.loc != src.loc) + buckled_mob.buckled = null //Temporary, so Move() succeeds. + if(!buckled_mob.Move(loc)) + unbuckle() + buckled_mob = null + else + buckled_mob.buckled = src //Restoring + if(buckled_mob) + buckled_mob.dir = dir + +/obj/structure/stool/bed/chair/verb/rotate() + set name = "Rotate Chair" + set category = "Object" + set src in oview(1) + + src.dir = turn(src.dir, 90) + handle_rotation() + return + +/obj/structure/stool/bed/chair/MouseDrop_T(mob/M as mob, mob/user as mob) + if(!istype(M)) return + buckle_mob(M, user) + return + +// Chair types +/obj/structure/stool/bed/chair/wood/normal + icon_state = "wooden_chair" + name = "wooden chair" + desc = "Old is never too old to not be in fashion." + +/obj/structure/stool/bed/chair/wood/wings + icon_state = "wooden_chair_wings" + name = "wooden chair" + desc = "Old is never too old to not be in fashion." + +/obj/structure/stool/bed/chair/wood/attackby(obj/item/weapon/W as obj, mob/user as mob) + if(istype(W, /obj/item/weapon/wrench)) + playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) + new /obj/item/stack/sheet/wood(src.loc) + del(src) + else + ..() + +/obj/structure/stool/bed/chair/comfy + name = "comfy chair" + desc = "It looks comfy." + +/obj/structure/stool/bed/chair/comfy/brown + icon_state = "comfychair_brown" + +/obj/structure/stool/bed/chair/comfy/beige + icon_state = "comfychair_beige" + +/obj/structure/stool/bed/chair/comfy/teal + icon_state = "comfychair_teal" + +/obj/structure/stool/bed/chair/office + anchored = 0 + +/obj/structure/stool/bed/chair/comfy/black + icon_state = "comfychair_black" + +/obj/structure/stool/bed/chair/comfy/lime + icon_state = "comfychair_lime" + +/obj/structure/stool/bed/chair/office/Move() + ..() + handle_rotation() + +/obj/structure/stool/bed/chair/office/light + icon_state = "officechair_white" + +/obj/structure/stool/bed/chair/office/dark + icon_state = "officechair_dark" \ No newline at end of file diff --git a/code/game/objects/structures/stool_bed_chair_nest/stools.dm b/code/game/objects/structures/stool_bed_chair_nest/stools.dm new file mode 100644 index 00000000000..7c40b55bdb4 --- /dev/null +++ b/code/game/objects/structures/stool_bed_chair_nest/stools.dm @@ -0,0 +1,35 @@ +/obj/structure/stool + name = "stool" + desc = "Apply butt." + icon = 'icons/obj/objects.dmi' + icon_state = "stool" + anchored = 1.0 + flags = FPRINT + pressure_resistance = 3*ONE_ATMOSPHERE + +/obj/structure/stool/ex_act(severity) + switch(severity) + if(1.0) + del(src) + return + if(2.0) + if (prob(50)) + del(src) + return + if(3.0) + if (prob(5)) + del(src) + return + return + +/obj/structure/stool/blob_act() + if(prob(75)) + new /obj/item/stack/sheet/metal(src.loc) + del(src) + +/obj/structure/stool/attackby(obj/item/weapon/W as obj, mob/user as mob) + if(istype(W, /obj/item/weapon/wrench)) + playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) + new /obj/item/stack/sheet/metal(src.loc) + del(src) + return \ No newline at end of file diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index ce79641e8c0..48fc036f0d5 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -1,10 +1,213 @@ +/* Tables and Racks + * Contains: + * Tables + * Wooden tables + * Reinforced tables + * Racks + */ + + /* -CONTAINS: -TABLE AND RACK OBJECT INTERATIONS -*/ + * Tables + */ +/obj/structure/table + name = "table" + desc = "A square piece of metal standing on four metal legs. It can not move." + icon = 'icons/obj/structures.dmi' + icon_state = "table" + density = 1 + anchored = 1.0 + layer = 2.8 + throwpass = 1 //You can throw objects over this, despite it's density.") +/obj/structure/table/New() + ..() + for(var/obj/structure/table/T in src.loc) + if(T != src) + del(T) + update_icon() + for(var/direction in list(1,2,4,8,5,6,9,10)) + if(locate(/obj/structure/table,get_step(src,direction))) + var/obj/structure/table/T = locate(/obj/structure/table,get_step(src,direction)) + T.update_icon() + +/obj/structure/table/Del() + for(var/direction in list(1,2,4,8,5,6,9,10)) + if(locate(/obj/structure/table,get_step(src,direction))) + var/obj/structure/table/T = locate(/obj/structure/table,get_step(src,direction)) + T.update_icon() + ..() + +/obj/structure/table/update_icon() + spawn(2) //So it properly updates when deleting + var/dir_sum = 0 + for(var/direction in list(1,2,4,8,5,6,9,10)) + var/skip_sum = 0 + for(var/obj/structure/window/W in src.loc) + if(W.dir == direction) //So smooth tables don't go smooth through windows + skip_sum = 1 + continue + var/inv_direction //inverse direction + switch(direction) + if(1) + inv_direction = 2 + if(2) + inv_direction = 1 + if(4) + inv_direction = 8 + if(8) + inv_direction = 4 + if(5) + inv_direction = 10 + if(6) + inv_direction = 9 + if(9) + inv_direction = 6 + if(10) + inv_direction = 5 + for(var/obj/structure/window/W in get_step(src,direction)) + if(W.dir == inv_direction) //So smooth tables don't go smooth through windows when the window is on the other table's tile + skip_sum = 1 + continue + if(!skip_sum) //means there is a window between the two tiles in this direction + if(locate(/obj/structure/table,get_step(src,direction))) + if(direction <5) + dir_sum += direction + else + if(direction == 5) //This permits the use of all table directions. (Set up so clockwise around the central table is a higher value, from north) + dir_sum += 16 + if(direction == 6) + dir_sum += 32 + if(direction == 8) //Aherp and Aderp. Jezes I am stupid. -- SkyMarshal + dir_sum += 8 + if(direction == 10) + dir_sum += 64 + if(direction == 9) + dir_sum += 128 + + var/table_type = 0 //stand_alone table + if(dir_sum%16 in cardinal) + table_type = 1 //endtable + dir_sum %= 16 + if(dir_sum%16 in list(3,12)) + table_type = 2 //1 tile thick, streight table + if(dir_sum%16 == 3) //3 doesn't exist as a dir + dir_sum = 2 + if(dir_sum%16 == 12) //12 doesn't exist as a dir. + dir_sum = 4 + if(dir_sum%16 in list(5,6,9,10)) + if(locate(/obj/structure/table,get_step(src.loc,dir_sum%16))) + table_type = 3 //full table (not the 1 tile thick one, but one of the 'tabledir' tables) + else + table_type = 2 //1 tile thick, corner table (treated the same as streight tables in code later on) + dir_sum %= 16 + if(dir_sum%16 in list(13,14,7,11)) //Three-way intersection + table_type = 5 //full table as three-way intersections are not sprited, would require 64 sprites to handle all combinations. TOO BAD -- SkyMarshal + switch(dir_sum%16) //Begin computation of the special type tables. --SkyMarshal + if(7) + if(dir_sum == 23) + table_type = 6 + dir_sum = 8 + else if(dir_sum == 39) + dir_sum = 4 + table_type = 6 + else if(dir_sum == 55 || dir_sum == 119 || dir_sum == 247 || dir_sum == 183) + dir_sum = 4 + table_type = 3 + else + dir_sum = 4 + if(11) + if(dir_sum == 75) + dir_sum = 5 + table_type = 6 + else if(dir_sum == 139) + dir_sum = 9 + table_type = 6 + else if(dir_sum == 203 || dir_sum == 219 || dir_sum == 251 || dir_sum == 235) + dir_sum = 8 + table_type = 3 + else + dir_sum = 8 + if(13) + if(dir_sum == 29) + dir_sum = 10 + table_type = 6 + else if(dir_sum == 141) + dir_sum = 6 + table_type = 6 + else if(dir_sum == 189 || dir_sum == 221 || dir_sum == 253 || dir_sum == 157) + dir_sum = 1 + table_type = 3 + else + dir_sum = 1 + if(14) + if(dir_sum == 46) + dir_sum = 1 + table_type = 6 + else if(dir_sum == 78) + dir_sum = 2 + table_type = 6 + else if(dir_sum == 110 || dir_sum == 254 || dir_sum == 238 || dir_sum == 126) + dir_sum = 2 + table_type = 3 + else + dir_sum = 2 //These translate the dir_sum to the correct dirs from the 'tabledir' icon_state. + if(dir_sum%16 == 15) + table_type = 4 //4-way intersection, the 'middle' table sprites will be used. + + if(istype(src,/obj/structure/table/reinforced)) + switch(table_type) + if(0) + icon_state = "reinf_table" + if(1) + icon_state = "reinf_1tileendtable" + if(2) + icon_state = "reinf_1tilethick" + if(3) + icon_state = "reinf_tabledir" + if(4) + icon_state = "reinf_middle" + if(5) + icon_state = "reinf_tabledir2" + if(6) + icon_state = "reinf_tabledir3" + else if(istype(src,/obj/structure/table/woodentable)) + switch(table_type) + if(0) + icon_state = "wood_table" + if(1) + icon_state = "wood_1tileendtable" + if(2) + icon_state = "wood_1tilethick" + if(3) + icon_state = "wood_tabledir" + if(4) + icon_state = "wood_middle" + if(5) + icon_state = "wood_tabledir2" + if(6) + icon_state = "wood_tabledir3" + else + switch(table_type) + if(0) + icon_state = "table" + if(1) + icon_state = "table_1tileendtable" + if(2) + icon_state = "table_1tilethick" + if(3) + icon_state = "tabledir" + if(4) + icon_state = "table_middle" + if(5) + icon_state = "tabledir2" + if(6) + icon_state = "tabledir3" + if (dir_sum in list(1,2,4,8,5,6,9,10)) + dir = dir_sum + else + dir = 2 -//TABLE /obj/structure/table/ex_act(severity) switch(severity) if(1.0) @@ -179,7 +382,15 @@ TABLE AND RACK OBJECT INTERATIONS return -//WOODEN TABLES +/* + * Wooden tables + */ +/obj/structure/table/woodentable + name = "wooden table" + desc = "Do not apply fire to this. Rumour says it burns easily." + icon_state = "wood_table" + + /obj/structure/table/woodentable/attackby(obj/item/weapon/W as obj, mob/user as mob) if (istype(W, /obj/item/weapon/grab)) @@ -221,7 +432,16 @@ TABLE AND RACK OBJECT INTERATIONS return -//REINFORCED TABLES +/* + * Reinforced tables + */ +/obj/structure/table/reinforced + name = "reinforced table" + desc = "A version of the four legged table. It is stronger." + icon_state = "reinf_table" + var/status = 2 + + /obj/structure/table/reinforced/attackby(obj/item/weapon/W as obj, mob/user as mob) if (istype(W, /obj/item/weapon/grab)) @@ -289,7 +509,19 @@ TABLE AND RACK OBJECT INTERATIONS //if(W && W.loc) W.loc = src.loc return -//RACKS + +/* + * Racks + */ +/obj/structure/rack + name = "rack" + desc = "Different from the Middle Ages version." + icon = 'icons/obj/objects.dmi' + icon_state = "rack" + density = 1 + flags = FPRINT + anchored = 1.0 + throwpass = 1 //You can throw objects over this, despite it's density. /obj/structure/rack/ex_act(severity) switch(severity) diff --git a/code/modules/mob/living/carbon/brain/brain_item.dm b/code/modules/mob/living/carbon/brain/brain_item.dm index 2482614bf47..a34205aec06 100644 --- a/code/modules/mob/living/carbon/brain/brain_item.dm +++ b/code/modules/mob/living/carbon/brain/brain_item.dm @@ -1,3 +1,40 @@ +/obj/item/brain + name = "brain" + desc = "A piece of juicy meat found in a persons head." + icon = 'icons/obj/surgery.dmi' + icon_state = "brain2" + flags = TABLEPASS + force = 1.0 + w_class = 1.0 + throwforce = 1.0 + throw_speed = 3 + throw_range = 5 + origin_tech = "biotech=3" + attack_verb = list("attacked", "slapped", "whacked") + + var/mob/living/carbon/brain/brainmob = null + + New() + ..() + //Shifting the brain "mob" over to the brain object so it's easier to keep track of. --NEO + //WASSSSSUUUPPPP /N + spawn(5) + if(brainmob && brainmob.client) + brainmob.client.screen.len = null //clear the hud + + proc + transfer_identity(var/mob/living/carbon/human/H) + name = "[H]'s brain" + brainmob = new(src) + brainmob.name = H.real_name + brainmob.real_name = H.real_name + brainmob.dna = H.dna + brainmob.timeofhostdeath = H.timeofdeath + if(H.mind) + H.mind.transfer_to(brainmob) + brainmob << "\blue You might feel slightly disoriented. That's normal when your brain gets cut out." + return + /obj/item/brain/examine() // -- TLE set src in oview(12) if (!( usr )) diff --git a/tgstation.dme b/tgstation.dme index 6217b25df52..88a8edffb13 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -69,6 +69,8 @@ #define FILE_DIR "code/game/objects/items/devices/radio" #define FILE_DIR "code/game/objects/items/robot" #define FILE_DIR "code/game/objects/items/stacks" +#define FILE_DIR "code/game/objects/items/stacks/sheets" +#define FILE_DIR "code/game/objects/items/stacks/tiles" #define FILE_DIR "code/game/objects/items/weapons" #define FILE_DIR "code/game/objects/items/weapons/grenades" #define FILE_DIR "code/game/objects/items/weapons/implants" @@ -79,6 +81,7 @@ #define FILE_DIR "code/game/objects/structures/crates_lockers" #define FILE_DIR "code/game/objects/structures/crates_lockers/closets" #define FILE_DIR "code/game/objects/structures/crates_lockers/closets/secure" +#define FILE_DIR "code/game/objects/structures/stool_bed_chair_nest" #define FILE_DIR "code/game/turfs" #define FILE_DIR "code/game/vehicles" #define FILE_DIR "code/game/vehicles/airtight" @@ -472,7 +475,6 @@ #include "code\game\machinery\machinery.dm" #include "code\game\machinery\magnet.dm" #include "code\game\machinery\mass_driver.dm" -#include "code\game\machinery\morgue.dm" #include "code\game\machinery\navbeacon.dm" #include "code\game\machinery\newscaster.dm" #include "code\game\machinery\OpTable.dm" @@ -582,6 +584,7 @@ #include "code\game\objects\empulse.dm" #include "code\game\objects\explosion.dm" #include "code\game\objects\explosion_recursive.dm" +#include "code\game\objects\hud.dm" #include "code\game\objects\items.dm" #include "code\game\objects\objs.dm" #include "code\game\objects\structures.dm" @@ -591,6 +594,7 @@ #include "code\game\objects\effects\effect_system.dm" #include "code\game\objects\effects\gibs.dm" #include "code\game\objects\effects\glowshroom.dm" +#include "code\game\objects\effects\landmarks.dm" #include "code\game\objects\effects\manifest.dm" #include "code\game\objects\effects\mines.dm" #include "code\game\objects\effects\portals.dm" @@ -636,12 +640,17 @@ #include "code\game\objects\items\robot\robot_items.dm" #include "code\game\objects\items\robot\robot_parts.dm" #include "code\game\objects\items\robot\robot_upgrades.dm" -#include "code\game\objects\items\stacks\glass.dm" #include "code\game\objects\items\stacks\medical.dm" -#include "code\game\objects\items\stacks\metal.dm" -#include "code\game\objects\items\stacks\minerals.dm" +#include "code\game\objects\items\stacks\rods.dm" #include "code\game\objects\items\stacks\stack.dm" -#include "code\game\objects\items\stacks\wood.dm" +#include "code\game\objects\items\stacks\sheets\glass.dm" +#include "code\game\objects\items\stacks\sheets\light.dm" +#include "code\game\objects\items\stacks\sheets\mineral.dm" +#include "code\game\objects\items\stacks\sheets\sheet_types.dm" +#include "code\game\objects\items\stacks\sheets\sheets.dm" +#include "code\game\objects\items\stacks\tiles\light.dm" +#include "code\game\objects\items\stacks\tiles\plasteel.dm" +#include "code\game\objects\items\stacks\tiles\tile_types.dm" #include "code\game\objects\items\weapons\AI_modules.dm" #include "code\game\objects\items\weapons\Bedsheets.dm" #include "code\game\objects\items\weapons\cards_ids.dm" @@ -706,7 +715,6 @@ #include "code\game\objects\items\weapons\tanks\jetpack.dm" #include "code\game\objects\items\weapons\tanks\tank_types.dm" #include "code\game\objects\items\weapons\tanks\tanks.dm" -#include "code\game\objects\structures\aliennests.dm" #include "code\game\objects\structures\bedsheet_bin.dm" #include "code\game\objects\structures\displaycase.dm" #include "code\game\objects\structures\door_assembly.dm" @@ -722,9 +730,9 @@ #include "code\game\objects\structures\mineral_doors.dm" #include "code\game\objects\structures\mirror.dm" #include "code\game\objects\structures\mop_bucket.dm" +#include "code\game\objects\structures\morgue.dm" #include "code\game\objects\structures\musician.dm" #include "code\game\objects\structures\noticeboard.dm" -#include "code\game\objects\structures\stool_chair_bed.dm" #include "code\game\objects\structures\tables_racks.dm" #include "code\game\objects\structures\target_stake.dm" #include "code\game\objects\structures\watercloset.dm" @@ -757,6 +765,10 @@ #include "code\game\objects\structures\crates_lockers\closets\secure\scientist.dm" #include "code\game\objects\structures\crates_lockers\closets\secure\secure_closets.dm" #include "code\game\objects\structures\crates_lockers\closets\secure\security.dm" +#include "code\game\objects\structures\stool_bed_chair_nest\alien_nests.dm" +#include "code\game\objects\structures\stool_bed_chair_nest\bed.dm" +#include "code\game\objects\structures\stool_bed_chair_nest\chairs.dm" +#include "code\game\objects\structures\stool_bed_chair_nest\stools.dm" #include "code\game\turfs\turf.dm" #include "code\game\vehicles\vehicle.dm" #include "code\game\vehicles\airtight\airtight.dm"