diff --git a/code/defines/obj.dm b/code/defines/obj.dm index 6c5e49c3cf2..5001759a7b3 100644 --- a/code/defines/obj.dm +++ b/code/defines/obj.dm @@ -142,199 +142,6 @@ //This list tracks characters spawned in the world and cannot be modified in-game. Currently referenced by respawn_character(). var/locked[] = list() -/obj/effect/sign/map - desc = "A framed picture of the station." - name = "station map" - icon = 'icons/obj/decals.dmi' - anchored = 1.0 - opacity = 0 - density = 0 - -/obj/effect/sign/map/left - icon_state = "map-left" - -/obj/effect/sign/map/right - icon_state = "map-right" - -/obj/effect/sign/securearea - desc = "A warning sign which reads 'SECURE AREA'. This obviously applies to a nun-Clown." - name = "SECURE AREA" - icon = 'icons/obj/decals.dmi' - icon_state = "securearea" - anchored = 1.0 - opacity = 0 - density = 0 - -/obj/effect/sign/biohazard - desc = "A warning sign which reads 'BIOHAZARD'" - name = "BIOHAZARD" - icon = 'icons/obj/decals.dmi' - icon_state = "bio" - anchored = 1.0 - opacity = 0 - density = 0 - -/obj/effect/sign/electricshock - desc = "A warning sign which reads 'HIGH VOLTAGE'" - name = "HIGH VOLTAGE" - icon = 'icons/obj/decals.dmi' - icon_state = "shock" - anchored = 1.0 - opacity = 0 - density = 0 - -/obj/effect/sign/examroom - desc = "A guidance sign which reads 'EXAM ROOM'" - name = "EXAM" - icon = 'icons/obj/decals.dmi' - icon_state = "examroom" - anchored = 1.0 - opacity = 0 - density = 0 - -/obj/effect/sign/vacuum - desc = "A warning sign which reads 'HARD VACUUM AHEAD'" - name = "HARD VACUUM AHEAD" - icon = 'icons/obj/decals.dmi' - icon_state = "space" - anchored = 1.0 - opacity = 0 - density = 0 - -/obj/effect/sign/deathsposal - desc = "A warning sign which reads 'DISPOSAL LEADS TO SPACE'" - name = "DISPOSAL LEADS TO SPACE" - icon = 'icons/obj/decals.dmi' - icon_state = "deathsposal" - anchored = 1.0 - opacity = 0 - density = 0 - -/obj/effect/sign/pods - desc = "A warning sign which reads 'ESCAPE PODS'" - name = "ESCAPE PODS" - icon = 'icons/obj/decals.dmi' - icon_state = "pods" - anchored = 1.0 - opacity = 0 - density = 0 - -/obj/effect/sign/fire - desc = "A warning sign which reads 'DANGER: FIRE'" - name = "DANGER: FIRE" - icon = 'icons/obj/decals.dmi' - icon_state = "fire" - anchored = 1.0 - opacity = 0 - density = 0 - - -/obj/effect/sign/nosmoking_1 - desc = "A warning sign which reads 'NO SMOKING'" - name = "NO SMOKING" - icon = 'icons/obj/decals.dmi' - icon_state = "nosmoking" - anchored = 1.0 - opacity = 0 - density = 0 - - -/obj/effect/sign/nosmoking_2 - desc = "A warning sign which reads 'NO SMOKING'" - name = "NO SMOKING" - icon = 'icons/obj/decals.dmi' - icon_state = "nosmoking2" - anchored = 1.0 - opacity = 0 - density = 0 - -/obj/effect/sign/redcross - desc = "The Intergalactic symbol of Medical institutions. You'll probably get help here.'" - name = "Med-Bay" - icon = 'icons/obj/decals.dmi' - icon_state = "redcross" - anchored = 1.0 - opacity = 0 - density = 0 - -/obj/effect/sign/goldenplaque - desc = "To be Robust is not an action or a way of life, but a mental state. Only those with the force of Will strong enough to act during a crisis, saving friend from foe, are truly Robust. Stay Robust my friends." - name = "The Most Robust Men Award for Robustness" - icon = 'icons/obj/decals.dmi' - icon_state = "goldenplaque" - anchored = 1.0 - opacity = 0 - density = 0 - -/obj/effect/sign/atmosplaque - desc = "This plaque commemorates the fall of the Atmos FEA division. For all the charred, dizzy, and brittle men who have died in its hands." - name = "FEA Atmospherics Division" - icon = 'icons/obj/decals.dmi' - icon_state = "atmosplaque" - anchored = 1.0 - opacity = 0 - density = 0 - -/*/obj/item/weapon/plaque_assembly //commenting this out until there's a better rework - desc = "Put this on a wall and engrave an epitaph" - name = "Plaque Assembly" - icon = 'icons/obj/decals.dmi' - icon_state = "goldenplaque" - -/obj/item/weapon/plaque_assembly/afterattack(atom/A as mob|obj|turf|area, mob/user as mob) - if(istype(A,/turf/simulated/wall) || istype(A,/turf/simulated/shuttle/wall) || istype(A,/turf/unsimulated/wall)) - var/epitaph = input("What would you like to engrave", null) - if(epitaph) - var/obj/effect/sign/goldenplaque/gp = new/obj/effect/sign/goldenplaque(A) - gp.name = epitaph - gp.layer = 2.9 - del(src)*/ - -/obj/effect/sign/maltesefalcon1 //The sign is 64x32, so it needs two tiles. ;3 - desc = "The Maltese Falcon, Space Bar and Grill." - name = "The Maltese Falcon" - icon = 'icons/obj/decals.dmi' - icon_state = "maltesefalcon1" - anchored = 1.0 - opacity = 0 - density = 0 - -/obj/effect/sign/maltesefalcon2 - desc = "The Maltese Falcon, Space Bar and Grill." - name = "The Maltese Falcon" - icon = 'icons/obj/decals.dmi' - icon_state = "maltesefalcon2" - anchored = 1.0 - opacity = 0 - density = 0 - -/obj/effect/sign/science//These 3 have multiple types, just var-edit the icon_state to whatever one you want on the map - desc = "A warning sign which reads 'SCIENCE!'" - name = "SCIENCE!" - icon = 'icons/obj/decals.dmi' - icon_state = "science1" - anchored = 1.0 - opacity = 0 - density = 0 - -/obj/effect/sign/chemistry - desc = "A warning sign which reads 'CHEMISTY'" - name = "CHEMISTRY" - icon = 'icons/obj/decals.dmi' - icon_state = "chemistry1" - anchored = 1.0 - opacity = 0 - density = 0 - -/obj/effect/sign/botany - desc = "A warning sign which reads 'HYDROPONICS'" - name = "HYDROPONICS" - icon = 'icons/obj/decals.dmi' - icon_state = "hydro1" - anchored = 1.0 - opacity = 0 - density = 0 - /obj/hud name = "hud" unacidable = 1 @@ -357,263 +164,7 @@ var/h_type = /obj/screen //this is like...the most pointless thing ever. Use a god damn define! -/obj/item - name = "item" - icon = 'icons/obj/items.dmi' - var/icon/blood_overlay = null //this saves our blood splatter overlay, which will be processed not to go over the edges of the sprite - var/abstract = 0 - var/force = 0 - var/item_state = null - var/damtype = "brute" - var/r_speed = 1.0 - var/health = null - var/burn_point = null - var/burning = null - var/hitsound = null - var/w_class = 3.0 - flags = FPRINT | TABLEPASS - var/slot_flags = 0 //This is used to determine on which slots an item can fit. - pass_flags = PASSTABLE - pressure_resistance = 50 -// causeerrorheresoifixthis - var/obj/item/master = null - var/heat_protection = 0 //flags which determine which body parts are protected from heat. Use the HEAD, UPPER_TORSO, LOWER_TORSO, etc. flags. See setup.dm - var/cold_protection = 0 //flags which determine which body parts are protected from cold. Use the HEAD, UPPER_TORSO, LOWER_TORSO, etc. flags. See setup.dm - var/max_heat_protection_temperature //Set this variable to determine up to which temperature (IN KELVIN) the item protects against heat damage. Keep at null to disable protection. Only protects areas set by heat_protection flags - var/min_cold_protection_temperature //Set this variable to determine down to which temperature (IN KELVIN) the item protects against cold damage. 0 is NOT an acceptable number due to if(varname) tests!! Keep at null to disable protection. Only protects areas set by cold_protection flags - - var/icon_action_button //If this is set, The item will make an action button on the player's HUD when picked up. The button will have the icon_action_button sprite from the screen1_action.dmi file. - var/action_button_name //This is the text which gets displayed on the action button. If not set it defaults to 'Use [name]'. Note that icon_action_button needs to be set in order for the action button to appear. - - //Since any item can now be a piece of clothing, this has to be put here so all items share it. - var/flags_inv //This flag is used to determine when items in someone's inventory cover others. IE helmets making it so you can't see glasses, etc. - var/color = null - var/body_parts_covered = 0 //see setup.dm for appropriate bit flags - //var/heat_transfer_coefficient = 1 //0 prevents all transfers, 1 is invisible - var/gas_transfer_coefficient = 1 // for leaking gas from turf to mask and vice-versa (for masks right now, but at some point, i'd like to include space helmets) - var/permeability_coefficient = 1 // for chemicals/diseases - var/siemens_coefficient = 1 // for electrical admittance/conductance (electrocution checks and shit) - var/slowdown = 0 // How much clothing is slowing you down. Negative values speeds you up - var/canremove = 1 //Mostly for Ninja code at this point but basically will not allow the item to be removed if set to 0. /N - var/armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0) - 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. - -//the mob M is attempting to equip this item into the slot passed through as 'slot'. Return 1 if it can do this and 0 if it can't. -//If you are making custom procs but would like to retain partial or complete functionality of this one, include a 'return ..()' to where you want this to happen. -//Set disable_warning to 1 if you wish it to not give you outputs. - -/obj/item/proc/mob_can_equip(M as mob, slot, disable_warning = 0) - if(!slot) return 0 - if(!M) return 0 - - if(ishuman(M)) - //START HUMAN - var/mob/living/carbon/human/H = M - - if(FAT in H.mutations) - if(!(flags & ONESIZEFITSALL)) - if(!disable_warning) - H << "\red You're too fat to wear the [name]." - return 0 - - switch(slot) - if(slot_l_hand) - if(H.l_hand) - return 0 - return 1 - if(slot_r_hand) - if(H.r_hand) - return 0 - return 1 - if(slot_wear_mask) - if(H.wear_mask) - return 0 - if( !(slot_flags & SLOT_MASK) ) - return 0 - return 1 - if(slot_back) - if(H.back) - return 0 - if( !(slot_flags & SLOT_BACK) ) - return 0 - return 1 - if(slot_wear_suit) - if(H.wear_suit) - return 0 - if( !(slot_flags & SLOT_OCLOTHING) ) - return 0 - return 1 - if(slot_gloves) - if(H.gloves) - return 0 - if( !(slot_flags & SLOT_GLOVES) ) - return 0 - return 1 - if(slot_shoes) - if(H.shoes) - return 0 - if( !(slot_flags & SLOT_FEET) ) - return 0 - return 1 - if(slot_belt) - if(H.belt) - return 0 - if(!H.w_uniform) - if(!disable_warning) - H << "\red You need a jumpsuit before you can attach this [name]." - return 0 - if( !(slot_flags & SLOT_BELT) ) - return - return 1 - if(slot_glasses) - if(H.glasses) - return 0 - if( !(slot_flags & SLOT_EYES) ) - return 0 - return 1 - if(slot_head) - if(H.head) - return 0 - if( !(slot_flags & SLOT_HEAD) ) - return 0 - return 1 - if(slot_ears) - if(H.ears) - return 0 - if( !(slot_flags & SLOT_EARS) ) - return 0 - return 1 - if(slot_w_uniform) - if(H.w_uniform) - return 0 - if( !(slot_flags & SLOT_ICLOTHING) ) - return 0 - return 1 - if(slot_wear_id) - if(H.wear_id) - return 0 - if(!H.w_uniform) - if(!disable_warning) - H << "\red You need a jumpsuit before you can attach this [name]." - return 0 - if( !(slot_flags & SLOT_ID) ) - return 0 - return 1 - if(slot_l_store) - if(H.l_store) - return 0 - if(!H.w_uniform) - if(!disable_warning) - H << "\red You need a jumpsuit before you can attach this [name]." - return 0 - if(slot_flags & SLOT_DENYPOCKET) - return - if( w_class <= 2 || (slot_flags & SLOT_POCKET) ) - return 1 - if(slot_r_store) - if(H.r_store) - return 0 - if(!H.w_uniform) - if(!disable_warning) - H << "\red You need a jumpsuit before you can attach this [name]." - return 0 - if(slot_flags & SLOT_DENYPOCKET) - return 0 - if( w_class <= 2 || (slot_flags & SLOT_POCKET) ) - return 1 - return 0 - if(slot_s_store) - if(H.s_store) - return 0 - if(!H.wear_suit) - if(!disable_warning) - H << "\red You need a suit before you can attach this [name]." - return 0 - if(!H.wear_suit.allowed) - if(!disable_warning) - usr << "You somehow have a suit with no defined allowed items for suit storage, stop that." - return 0 - if( istype(src, /obj/item/device/pda) || istype(src, /obj/item/weapon/pen) || is_type_in_list(src, H.wear_suit.allowed) ) - return 1 - return 0 - if(slot_handcuffed) - if(H.handcuffed) - return 0 - if(!istype(src, /obj/item/weapon/handcuffs)) - return 0 - return 1 - if(slot_legcuffed) - if(H.legcuffed) - return 0 - if(!istype(src, /obj/item/weapon/legcuffs)) - return 0 - return 1 - if(slot_in_backpack) - if (H.back && istype(H.back, /obj/item/weapon/storage/backpack)) - var/obj/item/weapon/storage/backpack/B = H.back - if(B.contents.len < B.storage_slots && w_class <= B.max_w_class) - return 1 - return 0 - return 0 //Unsupported slot - //END HUMAN - - else if(ismonkey(M)) - //START MONKEY - var/mob/living/carbon/monkey/MO = M - switch(slot) - if(slot_l_hand) - if(MO.l_hand) - return 0 - return 1 - if(slot_r_hand) - if(MO.r_hand) - return 0 - return 1 - if(slot_wear_mask) - if(MO.wear_mask) - return 0 - if( !(slot_flags & SLOT_MASK) ) - return 0 - return 1 - if(slot_back) - if(MO.back) - return 0 - if( !(slot_flags & SLOT_BACK) ) - return 0 - return 1 - return 0 //Unsupported slot - - //END MONKEY - - -/obj/item/verb/verb_pickup() - set src in oview(1) - set category = "Object" - set name = "Pick up" - - if(!usr.canmove || usr.stat || usr.restrained() || !in_range(src, usr)) - return - - if(ishuman(usr)) - if(usr.get_active_hand() == null) - src.Click() // Let me know if this has any problems -Giacom - /* - if(usr.get_active_hand() == null) - src.attack_hand(usr) - else - usr << "\red You already have something in your hand." - */ - else - usr << "\red This mob type can't use this verb." - -//This proc is executed when someone clicks the on-screen UI button. To make the UI button show, set the 'icon_action_button' to the icon_state of the image of the button in screen1_action.dmi -//The default action is attack_self(). -//Checks before we get to here are: mob is alive, mob is not restrained, paralyzed, asleep, resting, laying, item is on the mob. -/obj/item/proc/ui_action_click() - if( src in usr ) - attack_self(usr) /obj/item/device icon = 'icons/obj/device.dmi' diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm index 01ce77fb3f0..01d0ae50f8a 100644 --- a/code/defines/obj/weapon.dm +++ b/code/defines/obj/weapon.dm @@ -664,41 +664,18 @@ item_state = "card-id" w_class = 1.0 +//TODO: Figure out wtf this is and possibly remove it -Nodrak /obj/item/weapon/dummy name = "dummy" invisibility = 101.0 anchored = 1.0 flags = TABLEPASS -/obj/item/weapon/extinguisher - name = "fire extinguisher" - desc = "A traditional red fire extinguisher." - icon = 'icons/obj/items.dmi' - icon_state = "fire_extinguisher0" - var/last_use = 1.0 - var/safety = 1 - hitsound = 'sound/weapons/smash.ogg' - flags = FPRINT | USEDELAY | TABLEPASS | CONDUCT - throwforce = 10 - w_class = 3.0 - throw_speed = 2 - throw_range = 10 - force = 10.0 - item_state = "fire_extinguisher" - m_amt = 90 - attack_verb = list("slammed", "whacked", "bashed", "thunked", "battered", "bludgeoned", "thrashed") +/obj/item/weapon/dummy/ex_act() + return -/obj/item/weapon/extinguisher/mini - name = "fire extinguisher" - desc = "A light and compact fibreglass-framed model fire extinguisher." - icon_state = "miniFE0" - hitsound = null //it is much lighter, after all. - flags = FPRINT | USEDELAY | TABLEPASS - throwforce = 2 - w_class = 2.0 - force = 3.0 - item_state = "miniFE" - m_amt = 0 +/obj/item/weapon/dummy/blob_act() + return /obj/item/weapon/f_card name = "finger print card" diff --git a/code/defines/procs/helper_list.dm b/code/defines/procs/helper_list.dm index 19f9609db1a..736605ca711 100644 --- a/code/defines/procs/helper_list.dm +++ b/code/defines/procs/helper_list.dm @@ -57,6 +57,13 @@ proc/isemptylist(list/list) return 1 return 0 +//Checks for specific types in a list +/proc/is_type_in_list(var/atom/A, var/list/L) + for(var/type in L) + if(istype(A, type)) + return 1 + return 0 + //Empties the list by setting the length to 0. Hopefully the elements get garbage collected proc/clearlist(list/list) if(istype(list)) diff --git a/code/defines/procs/helper_type2type.dm b/code/defines/procs/helper_type2type.dm index f7495976f26..b98c8c07905 100644 --- a/code/defines/procs/helper_type2type.dm +++ b/code/defines/procs/helper_type2type.dm @@ -199,6 +199,50 @@ proc/tg_list2text(list/list, glue=",") file = file(file_path) return dd_text2list(file2text(file), separator) +//Turns a direction into text +/proc/dir2text(direction) + switch(direction) + if(1.0) + return "north" + if(2.0) + return "south" + if(4.0) + return "east" + if(8.0) + return "west" + if(5.0) + return "northeast" + if(6.0) + return "southeast" + if(9.0) + return "northwest" + if(10.0) + return "southwest" + else + return + +//Turns text into proper directions +/proc/text2dir(direction) + switch(uppertext(direction)) + if("NORTH") + return 1 + if("SOUTH") + return 2 + if("EAST") + return 4 + if("WEST") + return 8 + if("NORTHEAST") + return 5 + if("NORTHWEST") + return 9 + if("SOUTHEAST") + return 6 + if("SOUTHWEST") + return 10 + else + return + //Converts an angle (degrees) into an ss13 direction /proc/angle2dir(var/degree) degree = ((degree+22.5)%365) diff --git a/code/defines/procs/helpers.dm b/code/defines/procs/helpers.dm index c6b03fb60a0..62dea3f2f04 100644 --- a/code/defines/procs/helpers.dm +++ b/code/defines/procs/helpers.dm @@ -1160,11 +1160,133 @@ proc/get_mob_with_client_list() mobs += M return mobs -/atom/proc/transfer_fingerprints_to(var/atom/A) - if(!istype(A.fingerprints,/list)) - A.fingerprints = list() - if(!istype(A.fingerprintshidden,/list)) - A.fingerprintshidden = list() - A.fingerprints |= fingerprints //detective - A.fingerprintshidden |= fingerprintshidden //admin - A.fingerprintslast = fingerprintslast \ No newline at end of file + +/proc/parse_zone(zone) + if(zone == "r_hand") return "right hand" + else if (zone == "l_hand") return "left hand" + else if (zone == "l_arm") return "left arm" + else if (zone == "r_arm") return "right arm" + else if (zone == "l_leg") return "left leg" + else if (zone == "r_leg") return "right leg" + else if (zone == "l_foot") return "left foot" + else if (zone == "r_foot") return "right foot" + else return zone + + +/proc/get_turf(turf/location) + while(location) + if(isturf(location)) + return location + location = location.loc + return null + +/proc/get_turf_or_move(turf/location) + return get_turf(location) + + +//Quick type checks for some tools +var/global/list/common_tools = list( +/obj/item/weapon/cable_coil, +/obj/item/weapon/wrench, +/obj/item/weapon/weldingtool, +/obj/item/weapon/screwdriver, +/obj/item/weapon/wirecutters, +/obj/item/device/multitool, +/obj/item/weapon/crowbar) + +/proc/istool(O) + if(O && is_type_in_list(O, common_tools)) + return 1 + return 0 + +/proc/iswrench(O) + if(istype(O, /obj/item/weapon/wrench)) + return 1 + return 0 + +/proc/iswelder(O) + if(istype(O, /obj/item/weapon/weldingtool)) + return 1 + return 0 + +/proc/iscoil(O) + if(istype(O, /obj/item/weapon/cable_coil)) + return 1 + return 0 + +/proc/iswirecutter(O) + if(istype(O, /obj/item/weapon/wirecutters)) + return 1 + return 0 + +/proc/isscrewdriver(O) + if(istype(O, /obj/item/weapon/screwdriver)) + return 1 + return 0 + +/proc/ismultitool(O) + if(istype(O, /obj/item/device/multitool)) + return 1 + return 0 + +/proc/iscrowbar(O) + if(istype(O, /obj/item/weapon/crowbar)) + return 1 + return 0 + +proc/is_hot(obj/item/W as obj) + switch(W.type) + if(/obj/item/weapon/weldingtool) + var/obj/item/weapon/weldingtool/WT = W + if(WT.isOn()) + return 3800 + else + return 0 + if(/obj/item/weapon/lighter) + if(W:lit) + return 1500 + else + return 0 + if(/obj/item/weapon/match) + if(W:lit) + return 1000 + else + return 0 + if(/obj/item/clothing/mask/cigarette) + if(W:lit) + return 1000 + else + return 0 + if(/obj/item/weapon/pickaxe/plasmacutter) + return 3800 + if(/obj/item/weapon/melee/energy) + return 3500 + else + return 0 + + return 0 + +//Is this even used for anything besides balloons? Yes I took out the W:lit stuff because : really shouldnt be used. +/proc/is_sharp(obj/item/W as obj) // For the record, WHAT THE HELL IS THIS METHOD OF DOING IT? + return ( \ + istype(W, /obj/item/weapon/screwdriver) || \ + istype(W, /obj/item/weapon/pen) || \ + istype(W, /obj/item/weapon/weldingtool) || \ + istype(W, /obj/item/weapon/lighter/zippo) || \ + istype(W, /obj/item/weapon/match) || \ + istype(W, /obj/item/clothing/mask/cigarette) || \ + istype(W, /obj/item/weapon/wirecutters) || \ + istype(W, /obj/item/weapon/circular_saw) || \ + istype(W, /obj/item/weapon/melee/energy/sword) || \ + istype(W, /obj/item/weapon/melee/energy/blade) || \ + istype(W, /obj/item/weapon/shovel) || \ + istype(W, /obj/item/weapon/kitchenknife) || \ + istype(W, /obj/item/weapon/butch) || \ + istype(W, /obj/item/weapon/scalpel) || \ + istype(W, /obj/item/weapon/kitchen/utensil/knife) || \ + istype(W, /obj/item/weapon/shard) || \ + istype(W, /obj/item/weapon/broken_bottle) || \ + istype(W, /obj/item/weapon/reagent_containers/syringe) || \ + istype(W, /obj/item/weapon/kitchen/utensil/fork) && W.icon_state != "forkloaded" || \ + istype(W, /obj/item/weapon/twohanded/fireaxe) \ + ) \ No newline at end of file diff --git a/code/defines/turf.dm b/code/defines/turf.dm index b8c360e47bb..a037e4a92a8 100644 --- a/code/defines/turf.dm +++ b/code/defines/turf.dm @@ -38,6 +38,16 @@ proc/return_siding_icon_state() //used for grass floors, which have siding. return 0 +/turf/Entered(atom/A as mob|obj) + ..() + if ((A && A.density && !( istype(A, /obj/effect/beam) ))) + for(var/obj/effect/beam/i_beam/I in src) + spawn( 0 ) + if (I) + I.hit() + return + return + /turf/space icon = 'icons/turf/space.dmi' name = "\proper space" diff --git a/code/game/atom_procs.dm b/code/game/atom_procs.dm index 3b8a6207dbb..3f89cc9e4ec 100644 --- a/code/game/atom_procs.dm +++ b/code/game/atom_procs.dm @@ -1,6 +1,41 @@ +//Movable atoms +/atom/movable + var/mob/pulledby = null + +/atom/movable/verb/pull() + set name = "Pull" + set category = "IC" + set src in oview(1) + + usr.start_pulling(src) + return + +//All atoms +/atom/verb/examine() + set name = "Examine" + set category = "IC" + set src in oview(12) //make it work from farther away + + if (!( usr )) + return + usr << "That's \a [src]." //changed to "That's" from "This is" because "This is some metal sheets" sounds dumb compared to "That's some metal sheets" ~Carn + usr << desc + // *****RM + //usr << "[name]: Dn:[density] dir:[dir] cont:[contents] icon:[icon] is:[icon_state] loc:[loc]" + return + /atom/proc/MouseDrop_T() return +/atom/proc/relaymove() + return + +/atom/proc/ex_act() + return + +/atom/proc/blob_act() + return + /atom/proc/attack_hand(mob/user as mob) return @@ -32,7 +67,6 @@ src.attack_paw(user) return - // for metroids /atom/proc/attack_metroid(mob/user as mob) return @@ -166,6 +200,17 @@ del(fingerprints) return + +/atom/proc/transfer_fingerprints_to(var/atom/A) + if(!istype(A.fingerprints,/list)) + A.fingerprints = list() + if(!istype(A.fingerprintshidden,/list)) + A.fingerprintshidden = list() + A.fingerprints |= fingerprints //detective + A.fingerprintshidden |= fingerprintshidden //admin + A.fingerprintslast = fingerprintslast + + //returns 1 if made bloody, returns 0 otherwise /atom/proc/add_blood(mob/living/carbon/human/M as mob) if (!( istype(M, /mob/living/carbon/human) )) diff --git a/code/game/objects/effects/biomass.dm b/code/game/objects/effects/biomass_rift.dm similarity index 100% rename from code/game/objects/effects/biomass.dm rename to code/game/objects/effects/biomass_rift.dm diff --git a/code/game/objects/effects/gibs.dm b/code/game/objects/effects/gibs.dm index f428716c0b9..e53ccb0d486 100644 --- a/code/game/objects/effects/gibs.dm +++ b/code/game/objects/effects/gibs.dm @@ -62,41 +62,4 @@ if(directions.len) gib.streak(directions) - del(src) - -/obj/effect/gibspawner - generic - gibtypes = list(/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs/core) - gibamounts = list(2,2,1) - - New() - gibdirections = list(list(WEST, NORTHWEST, SOUTHWEST, NORTH),list(EAST, NORTHEAST, SOUTHEAST, SOUTH), list()) - ..() - - human - gibtypes = list(/obj/effect/decal/cleanable/blood/gibs/up,/obj/effect/decal/cleanable/blood/gibs/down,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs/body,/obj/effect/decal/cleanable/blood/gibs/limb,/obj/effect/decal/cleanable/blood/gibs/core) - gibamounts = list(1,1,1,1,1,1,1) - - New() - gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs, list()) - gibamounts[6] = pick(0,1,2) - ..() - - xeno - gibtypes = list(/obj/effect/decal/cleanable/xenoblood/xgibs/up,/obj/effect/decal/cleanable/xenoblood/xgibs/down,/obj/effect/decal/cleanable/xenoblood/xgibs,/obj/effect/decal/cleanable/xenoblood/xgibs,/obj/effect/decal/cleanable/xenoblood/xgibs/body,/obj/effect/decal/cleanable/xenoblood/xgibs/limb,/obj/effect/decal/cleanable/xenoblood/xgibs/core) - gibamounts = list(1,1,1,1,1,1,1) - - New() - gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs, list()) - gibamounts[6] = pick(0,1,2) - ..() - - robot - sparks = 1 - gibtypes = list(/obj/effect/decal/cleanable/robot_debris/up,/obj/effect/decal/cleanable/robot_debris/down,/obj/effect/decal/cleanable/robot_debris,/obj/effect/decal/cleanable/robot_debris,/obj/effect/decal/cleanable/robot_debris,/obj/effect/decal/cleanable/robot_debris/limb) - gibamounts = list(1,1,1,1,1,1) - - New() - gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs) - gibamounts[6] = pick(0,1,2) - ..() \ No newline at end of file + del(src) \ No newline at end of file diff --git a/code/game/objects/effects/manifest.dm b/code/game/objects/effects/manifest.dm new file mode 100644 index 00000000000..605be9852e5 --- /dev/null +++ b/code/game/objects/effects/manifest.dm @@ -0,0 +1,17 @@ + + +/obj/effect/manifest/New() + + src.invisibility = 101 + return + +/obj/effect/manifest/proc/manifest() + var/dat = "Crew Manifest:
" + for(var/mob/living/carbon/human/M in mob_list) + dat += text(" [] - []
", M.name, M.get_assignment()) + var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( src.loc ) + P.info = dat + P.name = "paper- 'Crew Manifest'" + //SN src = null + del(src) + return \ No newline at end of file diff --git a/code/game/objects/effects/signs.dm b/code/game/objects/effects/signs.dm index 1272946ebcf..eb8f497a0e6 100644 --- a/code/game/objects/effects/signs.dm +++ b/code/game/objects/effects/signs.dm @@ -33,4 +33,183 @@ /obj/effect/sign/blob_act() del(src) - return \ No newline at end of file + return + + +/obj/effect/sign/map + desc = "A framed picture of the station." + name = "station map" + icon = 'icons/obj/decals.dmi' + anchored = 1.0 + opacity = 0 + density = 0 + +/obj/effect/sign/map/left + icon_state = "map-left" + +/obj/effect/sign/map/right + icon_state = "map-right" + +/obj/effect/sign/securearea + desc = "A warning sign which reads 'SECURE AREA'. This obviously applies to a nun-Clown." + name = "SECURE AREA" + icon = 'icons/obj/decals.dmi' + icon_state = "securearea" + anchored = 1.0 + opacity = 0 + density = 0 + +/obj/effect/sign/biohazard + desc = "A warning sign which reads 'BIOHAZARD'" + name = "BIOHAZARD" + icon = 'icons/obj/decals.dmi' + icon_state = "bio" + anchored = 1.0 + opacity = 0 + density = 0 + +/obj/effect/sign/electricshock + desc = "A warning sign which reads 'HIGH VOLTAGE'" + name = "HIGH VOLTAGE" + icon = 'icons/obj/decals.dmi' + icon_state = "shock" + anchored = 1.0 + opacity = 0 + density = 0 + +/obj/effect/sign/examroom + desc = "A guidance sign which reads 'EXAM ROOM'" + name = "EXAM" + icon = 'icons/obj/decals.dmi' + icon_state = "examroom" + anchored = 1.0 + opacity = 0 + density = 0 + +/obj/effect/sign/vacuum + desc = "A warning sign which reads 'HARD VACUUM AHEAD'" + name = "HARD VACUUM AHEAD" + icon = 'icons/obj/decals.dmi' + icon_state = "space" + anchored = 1.0 + opacity = 0 + density = 0 + +/obj/effect/sign/deathsposal + desc = "A warning sign which reads 'DISPOSAL LEADS TO SPACE'" + name = "DISPOSAL LEADS TO SPACE" + icon = 'icons/obj/decals.dmi' + icon_state = "deathsposal" + anchored = 1.0 + opacity = 0 + density = 0 + +/obj/effect/sign/pods + desc = "A warning sign which reads 'ESCAPE PODS'" + name = "ESCAPE PODS" + icon = 'icons/obj/decals.dmi' + icon_state = "pods" + anchored = 1.0 + opacity = 0 + density = 0 + +/obj/effect/sign/fire + desc = "A warning sign which reads 'DANGER: FIRE'" + name = "DANGER: FIRE" + icon = 'icons/obj/decals.dmi' + icon_state = "fire" + anchored = 1.0 + opacity = 0 + density = 0 + + +/obj/effect/sign/nosmoking_1 + desc = "A warning sign which reads 'NO SMOKING'" + name = "NO SMOKING" + icon = 'icons/obj/decals.dmi' + icon_state = "nosmoking" + anchored = 1.0 + opacity = 0 + density = 0 + + +/obj/effect/sign/nosmoking_2 + desc = "A warning sign which reads 'NO SMOKING'" + name = "NO SMOKING" + icon = 'icons/obj/decals.dmi' + icon_state = "nosmoking2" + anchored = 1.0 + opacity = 0 + density = 0 + +/obj/effect/sign/redcross + desc = "The Intergalactic symbol of Medical institutions. You'll probably get help here.'" + name = "Med-Bay" + icon = 'icons/obj/decals.dmi' + icon_state = "redcross" + anchored = 1.0 + opacity = 0 + density = 0 + +/obj/effect/sign/goldenplaque + desc = "To be Robust is not an action or a way of life, but a mental state. Only those with the force of Will strong enough to act during a crisis, saving friend from foe, are truly Robust. Stay Robust my friends." + name = "The Most Robust Men Award for Robustness" + icon = 'icons/obj/decals.dmi' + icon_state = "goldenplaque" + anchored = 1.0 + opacity = 0 + density = 0 + +/obj/effect/sign/atmosplaque + desc = "This plaque commemorates the fall of the Atmos FEA division. For all the charred, dizzy, and brittle men who have died in its hands." + name = "FEA Atmospherics Division" + icon = 'icons/obj/decals.dmi' + icon_state = "atmosplaque" + anchored = 1.0 + opacity = 0 + density = 0 + +/obj/effect/sign/maltesefalcon1 //The sign is 64x32, so it needs two tiles. ;3 + desc = "The Maltese Falcon, Space Bar and Grill." + name = "The Maltese Falcon" + icon = 'icons/obj/decals.dmi' + icon_state = "maltesefalcon1" + anchored = 1.0 + opacity = 0 + density = 0 + +/obj/effect/sign/maltesefalcon2 + desc = "The Maltese Falcon, Space Bar and Grill." + name = "The Maltese Falcon" + icon = 'icons/obj/decals.dmi' + icon_state = "maltesefalcon2" + anchored = 1.0 + opacity = 0 + density = 0 + +/obj/effect/sign/science//These 3 have multiple types, just var-edit the icon_state to whatever one you want on the map + desc = "A warning sign which reads 'SCIENCE!'" + name = "SCIENCE!" + icon = 'icons/obj/decals.dmi' + icon_state = "science1" + anchored = 1.0 + opacity = 0 + density = 0 + +/obj/effect/sign/chemistry + desc = "A warning sign which reads 'CHEMISTY'" + name = "CHEMISTRY" + icon = 'icons/obj/decals.dmi' + icon_state = "chemistry1" + anchored = 1.0 + opacity = 0 + density = 0 + +/obj/effect/sign/botany + desc = "A warning sign which reads 'HYDROPONICS'" + name = "HYDROPONICS" + icon = 'icons/obj/decals.dmi' + icon_state = "hydro1" + anchored = 1.0 + opacity = 0 + density = 0 \ No newline at end of file diff --git a/code/game/objects/effects/spawners/gibspawner.dm b/code/game/objects/effects/spawners/gibspawner.dm new file mode 100644 index 00000000000..907af3cfe1c --- /dev/null +++ b/code/game/objects/effects/spawners/gibspawner.dm @@ -0,0 +1,36 @@ +/obj/effect/gibspawner + generic + gibtypes = list(/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs/core) + gibamounts = list(2,2,1) + + New() + gibdirections = list(list(WEST, NORTHWEST, SOUTHWEST, NORTH),list(EAST, NORTHEAST, SOUTHEAST, SOUTH), list()) + ..() + + human + gibtypes = list(/obj/effect/decal/cleanable/blood/gibs/up,/obj/effect/decal/cleanable/blood/gibs/down,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs,/obj/effect/decal/cleanable/blood/gibs/body,/obj/effect/decal/cleanable/blood/gibs/limb,/obj/effect/decal/cleanable/blood/gibs/core) + gibamounts = list(1,1,1,1,1,1,1) + + New() + gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs, list()) + gibamounts[6] = pick(0,1,2) + ..() + + xeno + gibtypes = list(/obj/effect/decal/cleanable/xenoblood/xgibs/up,/obj/effect/decal/cleanable/xenoblood/xgibs/down,/obj/effect/decal/cleanable/xenoblood/xgibs,/obj/effect/decal/cleanable/xenoblood/xgibs,/obj/effect/decal/cleanable/xenoblood/xgibs/body,/obj/effect/decal/cleanable/xenoblood/xgibs/limb,/obj/effect/decal/cleanable/xenoblood/xgibs/core) + gibamounts = list(1,1,1,1,1,1,1) + + New() + gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs, list()) + gibamounts[6] = pick(0,1,2) + ..() + + robot + sparks = 1 + gibtypes = list(/obj/effect/decal/cleanable/robot_debris/up,/obj/effect/decal/cleanable/robot_debris/down,/obj/effect/decal/cleanable/robot_debris,/obj/effect/decal/cleanable/robot_debris,/obj/effect/decal/cleanable/robot_debris,/obj/effect/decal/cleanable/robot_debris/limb) + gibamounts = list(1,1,1,1,1,1) + + New() + gibdirections = list(list(NORTH, NORTHEAST, NORTHWEST),list(SOUTH, SOUTHEAST, SOUTHWEST),list(WEST, NORTHWEST, SOUTHWEST),list(EAST, NORTHEAST, SOUTHEAST), alldirs, alldirs) + gibamounts[6] = pick(0,1,2) + ..() \ No newline at end of file diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 4e1e3a17bae..93ce65a2744 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -1,567 +1,640 @@ - -/obj/item/weapon/bedsheet/ex_act(severity) - if (severity <= 2) - del(src) - return - return - -/obj/item/weapon/bedsheet/attack_self(mob/user as mob) - user.drop_item() - if(layer == initial(layer)) - layer = 5 - else - layer = initial(layer) - add_fingerprint(user) - return - - - - -/obj/item/weapon/handcuffs/attack(mob/M as mob, mob/user as mob) - if(istype(src, /obj/item/weapon/handcuffs/cyborg) && isrobot(user)) - if(!M.handcuffed) - var/turf/p_loc = user.loc - var/turf/p_loc_m = M.loc - playsound(src.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -2) - for(var/mob/O in viewers(user, null)) - O.show_message("\red [user] is trying to put handcuffs on [M]!", 1) - spawn(30) - if(!M) return - if(p_loc == user.loc && p_loc_m == M.loc) - M.handcuffed = new /obj/item/weapon/handcuffs(M) - M.update_inv_handcuffed() - - else - if ((CLUMSY in usr.mutations) && prob(50)) - usr << "\red Uh ... how do those things work?!" - if (istype(M, /mob/living/carbon/human)) - if(!M.handcuffed) - var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( ) - O.source = user - O.target = user - O.item = user.get_active_hand() - O.s_loc = user.loc - O.t_loc = user.loc - O.place = "handcuff" - M.requests += O - spawn( 0 ) - O.process() - return - return - if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey") - usr << "\red You don't have the dexterity to do this!" - return - if (istype(M, /mob/living/carbon/human)) - if(!M.handcuffed) - M.attack_log += text("\[[time_stamp()]\] Has been handcuffed (attempt) by [user.name] ([user.ckey])") - user.attack_log += text("\[[time_stamp()]\] Attempted to handcuff [M.name] ([M.ckey])") - - log_attack("[user.name] ([user.ckey]) Attempted to handcuff [M.name] ([M.ckey])") - - var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( ) - O.source = user - O.target = M - O.item = user.get_active_hand() - O.s_loc = user.loc - O.t_loc = M.loc - O.place = "handcuff" - M.requests += O - spawn( 0 ) - if(istype(src, /obj/item/weapon/handcuffs/cable)) - feedback_add_details("handcuffs","C") - playsound(src.loc, 'sound/weapons/cablecuff.ogg', 30, 1, -2) - else - feedback_add_details("handcuffs","H") - playsound(src.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -2) - O.process() - return - else - if(!M.handcuffed) - var/obj/effect/equip_e/monkey/O = new /obj/effect/equip_e/monkey( ) - O.source = user - O.target = M - O.item = user.get_active_hand() - O.s_loc = user.loc - O.t_loc = M.loc - O.place = "handcuff" - M.requests += O - spawn( 0 ) - if(istype(src, /obj/item/weapon/handcuffs/cable)) - playsound(src.loc, 'sound/weapons/cablecuff.ogg', 30, 1, -2) - else - playsound(src.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -2) - O.process() - return - return - - - - - -/obj/item/weapon/extinguisher/New() - var/datum/reagents/R = new/datum/reagents(50) - reagents = R - R.my_atom = src - R.add_reagent("water", 50) - -/obj/item/weapon/extinguisher/mini/New() - var/datum/reagents/R = new/datum/reagents(30) - reagents = R - R.my_atom = src - R.add_reagent("water", 30) - -/obj/item/weapon/extinguisher/examine() - set src in usr - - usr << text("\icon[] [] contains [] units of water left!", src, src.name, src.reagents.total_volume) - ..() - return - -/obj/item/weapon/extinguisher/afterattack(atom/target, mob/user , flag) - //TODO; Add support for reagents in water. - - if( istype(target, /obj/structure/reagent_dispensers/watertank) && get_dist(src,target) <= 1) - var/obj/o = target - o.reagents.trans_to(src, 50) - user << "\blue \The [src] is now refilled" - playsound(src.loc, 'sound/effects/refill.ogg', 50, 1, -6) - return - - if (!safety) - if (src.reagents.total_volume < 1) - usr << "\red \The [src] is empty." - return - - if (world.time < src.last_use + 20) - return - - src.last_use = world.time - - playsound(src.loc, 'sound/effects/extinguish.ogg', 75, 1, -3) - - var/direction = get_dir(src,target) - - if(usr.buckled && isobj(usr.buckled) && !usr.buckled.anchored ) - spawn(0) - var/obj/B = usr.buckled - var/movementdirection = turn(direction,180) - B.Move(get_step(usr,movementdirection), movementdirection) - sleep(1) - B.Move(get_step(usr,movementdirection), movementdirection) - sleep(1) - B.Move(get_step(usr,movementdirection), movementdirection) - sleep(1) - B.Move(get_step(usr,movementdirection), movementdirection) - sleep(2) - B.Move(get_step(usr,movementdirection), movementdirection) - sleep(2) - B.Move(get_step(usr,movementdirection), movementdirection) - sleep(3) - B.Move(get_step(usr,movementdirection), movementdirection) - sleep(3) - B.Move(get_step(usr,movementdirection), movementdirection) - sleep(3) - B.Move(get_step(usr,movementdirection), movementdirection) - - var/turf/T = get_turf(target) - var/turf/T1 = get_step(T,turn(direction, 90)) - var/turf/T2 = get_step(T,turn(direction, -90)) - - var/list/the_targets = list(T,T1,T2) - - for(var/a=0, a<5, a++) - spawn(0) - var/obj/effect/effect/water/W = new /obj/effect/effect/water( get_turf(src) ) - var/turf/my_target = pick(the_targets) - var/datum/reagents/R = new/datum/reagents(5) - if(!W) return - W.reagents = R - R.my_atom = W - if(!W || !src) return - src.reagents.trans_to(W,1) - for(var/b=0, b<5, b++) - step_towards(W,my_target) - if(!W) return - W.reagents.reaction(get_turf(W)) - for(var/atom/atm in get_turf(W)) - if(!W) return - W.reagents.reaction(atm) - if(W.loc == my_target) break - sleep(2) - - if((istype(usr.loc, /turf/space)) || (usr.lastarea.has_gravity == 0)) - user.inertia_dir = get_dir(target, user) - step(user, user.inertia_dir) - - /* - if(istype(usr.loc, /turf/space)|| (user.flags & NOGRAV)) - user.inertia_dir = get_dir(target, user) - step(user, user.inertia_dir) - */ - else - return ..() - return - -/obj/item/weapon/extinguisher/attack_self(mob/user as mob) - if (safety) - src.icon_state = "fire_extinguisher1" - src.desc = "The safety is off." - user << "The safety is off." - safety = 0 - else - src.icon_state = "fire_extinguisher0" - src.desc = "The safety is on." - user << "The safety is on." - safety = 1 - return - -/obj/item/weapon/extinguisher/mini/attack_self(mob/user as mob) - if (safety) - src.icon_state = "miniFE1" - src.desc = "The safety is off." - user << "The safety is off." - safety = 0 - else - src.icon_state = "miniFE0" - src.desc = "The safety is on." - user << "The safety is on." - safety = 1 - return - -/obj/item/weapon/pen/attack(mob/M as mob, mob/user as mob) - if(!ismob(M)) - return - user << "\red You stab [M] with the pen." - M << "\red You feel a tiny prick!" - M.attack_log += text("\[[time_stamp()]\] Has been stabbed with [src.name] by [user.name] ([user.ckey])") - user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to stab [M.name] ([M.ckey])") - - log_attack("[user.name] ([user.ckey]) Used the [src.name] to stab [M.name] ([M.ckey])") - - - return - -/obj/item/weapon/pen/sleepypen - origin_tech = "syndicate=5" - -/obj/item/weapon/pen/sleepypen/attack_paw(mob/user as mob) - return src.attack_hand(user) - return - -/obj/item/weapon/pen/sleepypen/New() - var/datum/reagents/R = new/datum/reagents(30) //Used to be 300 - reagents = R - R.my_atom = src - R.add_reagent("chloralhydrate", 22) //Used to be 100 sleep toxin//30 Chloral seems to be fatal, reducing it to 22./N -// R.add_reagent("impedrezene", 100) -// R.add_reagent("cryptobiolin", 100) - ..() - return - -/obj/item/weapon/pen/sleepypen/attack(mob/M as mob, mob/user as mob) - if(!(istype(M,/mob))) - return - ..() - if(reagents.total_volume) - if(M.reagents) reagents.trans_to(M, 50) //used to be 150 - return - -//NEW STYLE PARAPEN -/obj/item/weapon/pen/paralysis/attack_paw(mob/user as mob) - return src.attack_hand(user) - return - -/obj/item/weapon/pen/paralysis/attack(mob/M as mob, mob/user as mob) - if(!(istype(M,/mob))) - return - ..() - if(reagents.total_volume) - if(M.reagents) reagents.trans_to(M, 50) - return - -/obj/item/weapon/pen/paralysis/New() - var/datum/reagents/R = new/datum/reagents(50) - reagents = R - R.my_atom = src - R.add_reagent("zombiepowder", 10) - R.add_reagent("impedrezene", 25) - R.add_reagent("cryptobiolin", 15) - ..() - return - -/obj/item/weapon/Bump(mob/M as mob) - spawn(0) - ..() - return - -/obj/effect/manifest/New() - - src.invisibility = 101 - return - -/obj/effect/manifest/proc/manifest() - var/dat = "Crew Manifest:
" - for(var/mob/living/carbon/human/M in mob_list) - dat += text(" [] - []
", M.name, M.get_assignment()) - var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( src.loc ) - P.info = dat - P.name = "paper- 'Crew Manifest'" - //SN src = null - del(src) - return - - -//What the fuck is this code -/mob/attackby(obj/item/weapon/W as obj, mob/user as mob) - if (user.intent != "harm") - if (istype(src.l_hand,/obj/item/latexballon) && src.l_hand:air_contents && is_sharp(W)) - return src.l_hand.attackby(W) - if (istype(src.r_hand,/obj/item/latexballon) && src.r_hand:air_contents && is_sharp(W)) - return src.r_hand.attackby(W) - var/shielded = 0 - if (locate(/obj/item/weapon/grab, src)) - var/mob/safe = null - if (istype(src.l_hand, /obj/item/weapon/grab)) - var/obj/item/weapon/grab/G = src.l_hand - if ((G.state == 3 && get_dir(src, user) == src.dir)) - safe = G.affecting - if (istype(src.r_hand, /obj/item/weapon/grab)) - var/obj/item/weapon/grab/G = src.r_hand - if ((G.state == 3 && get_dir(src, user) == src.dir)) - safe = G.affecting - if (safe) - return safe.attackby(W, user) - if ((!( shielded ) || !( W.flags ) & 32)) - spawn( 0 ) - if (W) - W.attack(src, user) - return - return - - - -/obj/item/weapon/teleportation_scroll/attack_self(mob/user as mob) - user.machine = src - var/dat = "Teleportation Scroll:
" - dat += "Number of uses: [src.uses]
" - dat += "
" - dat += "Four uses use them wisely:
" - dat += "Teleport
" - dat += "Kind regards,
Wizards Federation

P.S. Don't forget to bring your gear, you'll need it to cast most spells.
" - user << browse(dat, "window=scroll") - onclose(user, "scroll") - return - -/obj/item/weapon/teleportation_scroll/Topic(href, href_list) - ..() - if (usr.stat || usr.restrained()) - return - var/mob/living/carbon/human/H = usr - if (!( istype(H, /mob/living/carbon/human))) - return 1 - if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf)))) - usr.machine = src - if (href_list["spell_teleport"]) - if (src.uses >= 1) - src.uses -= 1 - usr.teleportscroll() - if (istype(src.loc, /mob)) - attack_self(src.loc) - else - for(var/mob/M in viewers(1, src)) - if (M.client) - src.attack_self(M) - return - -/obj/item/brain/examine() // -- TLE - set src in oview(12) - if (!( usr )) - return - usr << "This is \icon[src] \an [name]." - - if(brainmob)//if thar be a brain inside... the brain. - usr << "You can feel the small spark of life still left in this one." - else - usr << "This one seems particularly lifeless. Perhaps it will regain some of its luster later. Probably not." - -/obj/item/brain/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob) - if(!istype(M, /mob)) - return - - add_fingerprint(user) - - if(!(user.zone_sel.selecting == ("head")) || !istype(M, /mob/living/carbon/human)) - return ..() - - if( !(locate(/obj/machinery/optable, M.loc) && M.resting) && ( !(locate(/obj/structure/table/, M.loc) && M.lying) && prob(50) ) ) - return ..() - - var/mob/living/carbon/human/H = M - if(istype(M, /mob/living/carbon/human) && ((H.head && H.head.flags & HEADCOVERSEYES) || (H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || (H.glasses && H.glasses.flags & GLASSESCOVERSEYES))) - // you can't stab someone in the eyes wearing a mask! - user << "\blue You're going to need to remove their head cover first." - return - -//since these people will be dead M != usr - - if(M:brain_op_stage == 4.0) - for(var/mob/O in viewers(M, null)) - if(O == (user || M)) - continue - if(M == user) - O.show_message(text("\red [user] inserts [src] into his head!"), 1) - else - O.show_message(text("\red [M] has [src] inserted into his head by [user]."), 1) - - if(M != user) - M << "\red [user] inserts [src] into your head!" - user << "\red You insert [src] into [M]'s head!" - else - user << "\red You insert [src] into your head!" - - //this might actually be outdated since barring badminnery, a debrain'd body will have any client sucked out to the brain's internal mob. Leaving it anyway to be safe. --NEO - if(M.key)//Revised. /N - M.ghostize() - - if(brainmob.mind) - brainmob.mind.transfer_to(M) - else - M.key = brainmob.key - - M:brain_op_stage = 3.0 - - del(src) - else - ..() - return - -/obj/item/weapon/stamp/attack_paw(mob/user as mob) - - return src.attack_hand(user) - -/obj/item/weapon/dice/attack_self(mob/user as mob) // Roll the dice -- TLE - var/temp_sides - if(src.sides < 1) - temp_sides = 2 - else - temp_sides = src.sides - var/result = rand(1,temp_sides) - var/comment = "" - if(temp_sides == 20 && result == 20) - comment = "Nat 20!" - else if(temp_sides == 20 && result == 1) - comment = "Ouch, bad luck." - user << text("\red You throw a [src]. It lands on a [result]. [comment]") - icon_state = "[name][result]" - for(var/mob/O in viewers(user, null)) - if(O == (user)) - continue - else - O.show_message(text("\red [user] has thrown a [src]. It lands on [result]. [comment]"), 1) - -/obj/item/latexballon - name = "Latex glove" - desc = "" //todo - icon_state = "latexballon" - item_state = "lgloves" - force = 0 - throwforce = 0 - w_class = 1.0 - throw_speed = 1 - throw_range = 15 - var/state - var/datum/gas_mixture/air_contents = null - -/obj/item/latexballon/proc/blow(obj/item/weapon/tank/tank) - if (icon_state == "latexballon_bursted") - return - src.air_contents = tank.remove_air_volume(3) - icon_state = "latexballon_blow" - item_state = "latexballon" - -/obj/item/latexballon/proc/burst() - if (!air_contents) - return - playsound(src, 'sound/weapons/Gunshot.ogg', 100, 1) - icon_state = "latexballon_bursted" - item_state = "lgloves" - loc.assume_air(air_contents) - -/obj/item/latexballon/ex_act(severity) - burst() +/obj/item + name = "item" + icon = 'icons/obj/items.dmi' + var/icon/blood_overlay = null //this saves our blood splatter overlay, which will be processed not to go over the edges of the sprite + var/abstract = 0 + var/force = 0 + var/item_state = null + var/damtype = "brute" + var/r_speed = 1.0 + var/health = null + var/burn_point = null + var/burning = null + var/hitsound = null + var/w_class = 3.0 + flags = FPRINT | TABLEPASS + var/slot_flags = 0 //This is used to determine on which slots an item can fit. + pass_flags = PASSTABLE + pressure_resistance = 50 +// causeerrorheresoifixthis + var/obj/item/master = null + + var/heat_protection = 0 //flags which determine which body parts are protected from heat. Use the HEAD, UPPER_TORSO, LOWER_TORSO, etc. flags. See setup.dm + var/cold_protection = 0 //flags which determine which body parts are protected from cold. Use the HEAD, UPPER_TORSO, LOWER_TORSO, etc. flags. See setup.dm + var/max_heat_protection_temperature //Set this variable to determine up to which temperature (IN KELVIN) the item protects against heat damage. Keep at null to disable protection. Only protects areas set by heat_protection flags + var/min_cold_protection_temperature //Set this variable to determine down to which temperature (IN KELVIN) the item protects against cold damage. 0 is NOT an acceptable number due to if(varname) tests!! Keep at null to disable protection. Only protects areas set by cold_protection flags + + var/icon_action_button //If this is set, The item will make an action button on the player's HUD when picked up. The button will have the icon_action_button sprite from the screen1_action.dmi file. + var/action_button_name //This is the text which gets displayed on the action button. If not set it defaults to 'Use [name]'. Note that icon_action_button needs to be set in order for the action button to appear. + + //Since any item can now be a piece of clothing, this has to be put here so all items share it. + var/flags_inv //This flag is used to determine when items in someone's inventory cover others. IE helmets making it so you can't see glasses, etc. + var/color = null + var/body_parts_covered = 0 //see setup.dm for appropriate bit flags + //var/heat_transfer_coefficient = 1 //0 prevents all transfers, 1 is invisible + var/gas_transfer_coefficient = 1 // for leaking gas from turf to mask and vice-versa (for masks right now, but at some point, i'd like to include space helmets) + var/permeability_coefficient = 1 // for chemicals/diseases + var/siemens_coefficient = 1 // for electrical admittance/conductance (electrocution checks and shit) + var/slowdown = 0 // How much clothing is slowing you down. Negative values speeds you up + var/canremove = 1 //Mostly for Ninja code at this point but basically will not allow the item to be removed if set to 0. /N + var/armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0) + 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/ex_act(severity) switch(severity) - if (1) + if(1.0) del(src) - if (2) + return + if(2.0) if (prob(50)) del(src) - -/obj/item/latexballon/bullet_act() - burst() - -/obj/item/latexballon/temperature_expose(datum/gas_mixture/air, temperature, volume) - if(temperature > T0C+100) - burst() + return + if(3.0) + if (prob(5)) + del(src) + return + else return -/obj/item/latexballon/attackby(obj/item/W as obj, mob/user as mob) - if (is_sharp(W)) - burst() +/obj/item/blob_act() + return -//Is this even used for anything besides balloons? Yes I took out the W:lit stuff because : really shouldnt be used. -/proc/is_sharp(obj/item/W as obj) // For the record, WHAT THE HELL IS THIS METHOD OF DOING IT? - return ( \ - istype(W, /obj/item/weapon/screwdriver) || \ - istype(W, /obj/item/weapon/pen) || \ - istype(W, /obj/item/weapon/weldingtool) || \ - istype(W, /obj/item/weapon/lighter/zippo) || \ - istype(W, /obj/item/weapon/match) || \ - istype(W, /obj/item/clothing/mask/cigarette) || \ - istype(W, /obj/item/weapon/wirecutters) || \ - istype(W, /obj/item/weapon/circular_saw) || \ - istype(W, /obj/item/weapon/melee/energy/sword) || \ - istype(W, /obj/item/weapon/melee/energy/blade) || \ - istype(W, /obj/item/weapon/shovel) || \ - istype(W, /obj/item/weapon/kitchenknife) || \ - istype(W, /obj/item/weapon/butch) || \ - istype(W, /obj/item/weapon/scalpel) || \ - istype(W, /obj/item/weapon/kitchen/utensil/knife) || \ - istype(W, /obj/item/weapon/shard) || \ - istype(W, /obj/item/weapon/broken_bottle) || \ - istype(W, /obj/item/weapon/reagent_containers/syringe) || \ - istype(W, /obj/item/weapon/kitchen/utensil/fork) && W.icon_state != "forkloaded" || \ - istype(W, /obj/item/weapon/twohanded/fireaxe) \ - ) +/obj/item/verb/move_to_top() + set name = "Move To Top" + set category = "Object" + set src in oview(1) -proc/is_hot(obj/item/W as obj) - switch(W.type) - if(/obj/item/weapon/weldingtool) - var/obj/item/weapon/weldingtool/WT = W - if(WT.isOn()) - return 3800 - else - return 0 - if(/obj/item/weapon/lighter) - if(W:lit) - return 1500 - else - return 0 - if(/obj/item/weapon/match) - if(W:lit) - return 1000 - else - return 0 - if(/obj/item/clothing/mask/cigarette) - if(W:lit) - return 1000 - else - return 0 - if(/obj/item/weapon/pickaxe/plasmacutter) - return 3800 - if(/obj/item/weapon/melee/energy) - return 3500 + if(!istype(src.loc, /turf) || usr.stat || usr.restrained() ) + return + + var/turf/T = src.loc + + src.loc = null + + src.loc = T + +/obj/item/examine() + set src in view() + + var/t + switch(src.w_class) + if(1.0) + t = "tiny" + if(2.0) + t = "small" + if(3.0) + t = "normal-sized" + if(4.0) + t = "bulky" + if(5.0) + t = "huge" else - return 0 + if ((CLUMSY in usr.mutations) && prob(50)) t = "funny-looking" + usr << text("This is a []\icon[][]. It is a [] item.", !src.blood_DNA ? "" : "bloody ",src, src.name, t) + if(src.desc) + usr << src.desc + return +/obj/item/attack_hand(mob/user as mob) + if (!user) return + if (istype(src.loc, /obj/item/weapon/storage)) + var/obj/item/weapon/storage/S = src.loc + S.remove_from_storage(src) + + src.throwing = 0 + if (src.loc == user) + //canremove==0 means that object may not be removed. You can still wear it. This only applies to clothing. /N + if(!src.canremove) + return + else + user.u_equip(src) + else + if(isliving(src.loc)) + return + src.pickup(user) + user.lastDblClick = world.time + 2 + user.next_move = world.time + 2 + add_fingerprint(user) + user.put_in_active_hand(src) + return + + +/obj/item/attack_paw(mob/user as mob) + + if(isalien(user)) // -- TLE + var/mob/living/carbon/alien/A = user + + if(!A.has_fine_manipulation || w_class >= 4) + if(src in A.contents) // To stop Aliens having items stuck in their pockets + A.drop_from_inventory(src) + user << "Your claws aren't capable of such fine manipulation." + return + + if (istype(src.loc, /obj/item/weapon/storage)) + for(var/mob/M in range(1, src.loc)) + if (M.s_active == src.loc) + if (M.client) + M.client.screen -= src + src.throwing = 0 + if (src.loc == user) + //canremove==0 means that object may not be removed. You can still wear it. This only applies to clothing. /N + if(istype(src, /obj/item/clothing) && !src:canremove) + return + else + user.u_equip(src) + else + if(istype(src.loc, /mob/living)) + return + src.pickup(user) + user.lastDblClick = world.time + 2 + user.next_move = world.time + 2 + + user.put_in_active_hand(src) + return + +/obj/item/attackby(obj/item/weapon/W as obj, mob/user as mob) + + if(istype(W,/obj/item/weapon/storage)) + var/obj/item/weapon/storage/S = W + if(S.use_to_pickup) + if(!S.can_be_inserted(src)) + return + if(S.collection_mode) //Mode is set to collect all items on a tile and we clicked on a valid one. + if(isturf(src.loc)) + for(var/obj/item/I in src.loc) + if(I != src) //We'll do the one we clicked on last. + if(!S.can_be_inserted(src)) + continue + S.handle_item_insertion(I, 1) //The 1 stops the "You put the [src] into [S]" insertion message from being displayed. + S.handle_item_insertion(src) + + + return + +/obj/item/proc/attack(mob/living/M as mob, mob/living/user as mob, def_zone) + + if (!istype(M)) // not sure if this is the right thing... + return + var/messagesource = M + + if (istype(M,/mob/living/carbon/brain)) + messagesource = M:container + if (src.hitsound) + playsound(src.loc, hitsound, 50, 1, -1) + ///////////////////////// + user.lastattacked = M + M.lastattacker = user + + user.attack_log += "\[[time_stamp()]\] Attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(src.damtype)])" + M.attack_log += "\[[time_stamp()]\] Attacked by [user.name] ([user.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(src.damtype)])" + log_attack("[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(src.damtype)])" ) + + //spawn(1800) // this wont work right + // M.lastattacker = null + ///////////////////////// + + var/power = src.force + if((HULK in user.mutations) || (SUPRSTR in user.augmentations)) + power *= 2 + + if(!istype(M, /mob/living/carbon/human)) + if(istype(M, /mob/living/carbon/metroid)) + var/mob/living/carbon/metroid/Metroid = M + if(prob(25)) + user << "\red [src] passes right through [M]!" + return + + if(power > 0) + Metroid.attacked += 10 + + if(Metroid.Discipline && prob(50)) // wow, buddy, why am I getting attacked?? + Metroid.Discipline = 0 + + if(power >= 3) + if(istype(Metroid, /mob/living/carbon/metroid/adult)) + if(prob(5 + round(power/2))) + + if(Metroid.Victim) + if(prob(80) && !Metroid.client) + Metroid.Discipline++ + Metroid.Victim = null + Metroid.anchored = 0 + + spawn() + if(Metroid) + Metroid.SStun = 1 + sleep(rand(5,20)) + if(Metroid) + Metroid.SStun = 0 + + spawn(0) + if(Metroid) + Metroid.canmove = 0 + step_away(Metroid, user) + if(prob(25 + power)) + sleep(2) + if(Metroid && user) + step_away(Metroid, user) + Metroid.canmove = 1 + + else + if(prob(10 + power*2)) + if(Metroid) + if(Metroid.Victim) + if(prob(80) && !Metroid.client) + Metroid.Discipline++ + + if(Metroid.Discipline == 1) + Metroid.attacked = 0 + + spawn() + if(Metroid) + Metroid.SStun = 1 + sleep(rand(5,20)) + if(Metroid) + Metroid.SStun = 0 + + Metroid.Victim = null + Metroid.anchored = 0 + + + spawn(0) + if(Metroid && user) + step_away(Metroid, user) + Metroid.canmove = 0 + if(prob(25 + power*4)) + sleep(2) + if(Metroid && user) + step_away(Metroid, user) + Metroid.canmove = 1 + + + var/showname = "." + if(user) + showname = " by [user]." + if(!(user in viewers(M, null))) + showname = "." + + for(var/mob/O in viewers(messagesource, null)) + if(src.attack_verb.len) + O.show_message("\red [M] has been [pick(src.attack_verb)] with [src][showname] ", 1) + else + O.show_message("\red [M] has been attacked with [src][showname] ", 1) + + if(!showname && user) + if(user.client) + user << "\red You attack [M] with [src]. " + + + + if(istype(M, /mob/living/carbon/human)) + M:attacked_by(src, user, def_zone) + else + switch(src.damtype) + if("brute") + if(istype(src, /mob/living/carbon/metroid)) + M.adjustBrainLoss(power) + + else + + M.take_organ_damage(power) + if (prob(33)) // Added blood for whacking non-humans too + var/turf/location = M.loc + if (istype(location, /turf/simulated)) + location.add_blood_floor(M) + if("fire") + if (!(COLD_RESISTANCE in M.mutations)) + M.take_organ_damage(0, power) + M << "Aargh it burns!" + M.updatehealth() + src.add_fingerprint(user) + return 1 + +/obj/item/proc/attack_self() + return + +/obj/item/proc/afterattack() + return + +/obj/item/proc/talk_into(mob/M as mob, text) + return + +/obj/item/proc/moved(mob/user as mob, old_loc as turf) + return + +/obj/item/proc/dropped(mob/user as mob) + ..() + +// called just as an item is picked up (loc is not yet changed) +/obj/item/proc/pickup(mob/user) + return + +// called when this item is removed from a storage item, which is passed on as S. The loc variable is already set to the new destination before this is called. +/obj/item/proc/on_exit_storage(obj/item/weapon/storage/S as obj) + return + +// called when this item is added into a storage item, which is passed on as S. The loc variable is already set to the storage item. +/obj/item/proc/on_enter_storage(obj/item/weapon/storage/S as obj) + return + +// called after an item is placed in an equipment slot +// user is mob that equipped it +// slot uses the slot_X defines found in setup.dm +// for items that can be placed in multiple slots +// note this isn't called during the initial dressing of a player +/obj/item/proc/equipped(var/mob/user, var/slot) + return + +//the mob M is attempting to equip this item into the slot passed through as 'slot'. Return 1 if it can do this and 0 if it can't. +//If you are making custom procs but would like to retain partial or complete functionality of this one, include a 'return ..()' to where you want this to happen. +//Set disable_warning to 1 if you wish it to not give you outputs. +/obj/item/proc/mob_can_equip(M as mob, slot, disable_warning = 0) + if(!slot) return 0 + if(!M) return 0 + + if(ishuman(M)) + //START HUMAN + var/mob/living/carbon/human/H = M + + if(FAT in H.mutations) + if(!(flags & ONESIZEFITSALL)) + if(!disable_warning) + H << "\red You're too fat to wear the [name]." + return 0 + + switch(slot) + if(slot_l_hand) + if(H.l_hand) + return 0 + return 1 + if(slot_r_hand) + if(H.r_hand) + return 0 + return 1 + if(slot_wear_mask) + if(H.wear_mask) + return 0 + if( !(slot_flags & SLOT_MASK) ) + return 0 + return 1 + if(slot_back) + if(H.back) + return 0 + if( !(slot_flags & SLOT_BACK) ) + return 0 + return 1 + if(slot_wear_suit) + if(H.wear_suit) + return 0 + if( !(slot_flags & SLOT_OCLOTHING) ) + return 0 + return 1 + if(slot_gloves) + if(H.gloves) + return 0 + if( !(slot_flags & SLOT_GLOVES) ) + return 0 + return 1 + if(slot_shoes) + if(H.shoes) + return 0 + if( !(slot_flags & SLOT_FEET) ) + return 0 + return 1 + if(slot_belt) + if(H.belt) + return 0 + if(!H.w_uniform) + if(!disable_warning) + H << "\red You need a jumpsuit before you can attach this [name]." + return 0 + if( !(slot_flags & SLOT_BELT) ) + return + return 1 + if(slot_glasses) + if(H.glasses) + return 0 + if( !(slot_flags & SLOT_EYES) ) + return 0 + return 1 + if(slot_head) + if(H.head) + return 0 + if( !(slot_flags & SLOT_HEAD) ) + return 0 + return 1 + if(slot_ears) + if(H.ears) + return 0 + if( !(slot_flags & SLOT_EARS) ) + return 0 + return 1 + if(slot_w_uniform) + if(H.w_uniform) + return 0 + if( !(slot_flags & SLOT_ICLOTHING) ) + return 0 + return 1 + if(slot_wear_id) + if(H.wear_id) + return 0 + if(!H.w_uniform) + if(!disable_warning) + H << "\red You need a jumpsuit before you can attach this [name]." + return 0 + if( !(slot_flags & SLOT_ID) ) + return 0 + return 1 + if(slot_l_store) + if(H.l_store) + return 0 + if(!H.w_uniform) + if(!disable_warning) + H << "\red You need a jumpsuit before you can attach this [name]." + return 0 + if(slot_flags & SLOT_DENYPOCKET) + return + if( w_class <= 2 || (slot_flags & SLOT_POCKET) ) + return 1 + if(slot_r_store) + if(H.r_store) + return 0 + if(!H.w_uniform) + if(!disable_warning) + H << "\red You need a jumpsuit before you can attach this [name]." + return 0 + if(slot_flags & SLOT_DENYPOCKET) + return 0 + if( w_class <= 2 || (slot_flags & SLOT_POCKET) ) + return 1 + return 0 + if(slot_s_store) + if(H.s_store) + return 0 + if(!H.wear_suit) + if(!disable_warning) + H << "\red You need a suit before you can attach this [name]." + return 0 + if(!H.wear_suit.allowed) + if(!disable_warning) + usr << "You somehow have a suit with no defined allowed items for suit storage, stop that." + return 0 + if( istype(src, /obj/item/device/pda) || istype(src, /obj/item/weapon/pen) || is_type_in_list(src, H.wear_suit.allowed) ) + return 1 + return 0 + if(slot_handcuffed) + if(H.handcuffed) + return 0 + if(!istype(src, /obj/item/weapon/handcuffs)) + return 0 + return 1 + if(slot_legcuffed) + if(H.legcuffed) + return 0 + if(!istype(src, /obj/item/weapon/legcuffs)) + return 0 + return 1 + if(slot_in_backpack) + if (H.back && istype(H.back, /obj/item/weapon/storage/backpack)) + var/obj/item/weapon/storage/backpack/B = H.back + if(B.contents.len < B.storage_slots && w_class <= B.max_w_class) + return 1 + return 0 + return 0 //Unsupported slot + //END HUMAN + + else if(ismonkey(M)) + //START MONKEY + var/mob/living/carbon/monkey/MO = M + switch(slot) + if(slot_l_hand) + if(MO.l_hand) + return 0 + return 1 + if(slot_r_hand) + if(MO.r_hand) + return 0 + return 1 + if(slot_wear_mask) + if(MO.wear_mask) + return 0 + if( !(slot_flags & SLOT_MASK) ) + return 0 + return 1 + if(slot_back) + if(MO.back) + return 0 + if( !(slot_flags & SLOT_BACK) ) + return 0 + return 1 + return 0 //Unsupported slot + + //END MONKEY + + +/obj/item/verb/verb_pickup() + set src in oview(1) + set category = "Object" + set name = "Pick up" + + if(!usr.canmove || usr.stat || usr.restrained() || !in_range(src, usr)) + return + + if(ishuman(usr)) + if(usr.get_active_hand() == null) + src.Click() // Let me know if this has any problems -Giacom + /* + if(usr.get_active_hand() == null) + src.attack_hand(usr) + else + usr << "\red You already have something in your hand." + */ + else + usr << "\red This mob type can't use this verb." + +//This proc is executed when someone clicks the on-screen UI button. To make the UI button show, set the 'icon_action_button' to the icon_state of the image of the button in screen1_action.dmi +//The default action is attack_self(). +//Checks before we get to here are: mob is alive, mob is not restrained, paralyzed, asleep, resting, laying, item is on the mob. +/obj/item/proc/ui_action_click() + if( src in usr ) + attack_self(usr) + + +/obj/item/proc/IsShield() return 0 +/obj/item/proc/eyestab(mob/living/carbon/M as mob, mob/living/carbon/user as mob) + + var/mob/living/carbon/human/H = M + if(istype(H) && ( \ + (H.head && H.head.flags & HEADCOVERSEYES) || \ + (H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || \ + (H.glasses && H.glasses.flags & GLASSESCOVERSEYES) \ + )) + // you can't stab someone in the eyes wearing a mask! + user << "\red You're going to need to remove that mask/helmet/glasses first." + return + + var/mob/living/carbon/monkey/Mo = M + if(istype(Mo) && ( \ + (Mo.wear_mask && Mo.wear_mask.flags & MASKCOVERSEYES) \ + )) + // you can't stab someone in the eyes wearing a mask! + user << "\red You're going to need to remove that mask/helmet/glasses first." + return + + if(istype(M, /mob/living/carbon/alien) || istype(M, /mob/living/carbon/metroid))//Aliens don't have eyes./N Metroids also don't have eyes! + user << "\red You cannot locate any eyes on this creature!" + return + + user.attack_log += "\[[time_stamp()]\] Attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])" + M.attack_log += "\[[time_stamp()]\] Attacked by [user.name] ([user.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])" + + log_attack(" [user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])") + + src.add_fingerprint(user) + //if((CLUMSY in user.mutations) && prob(50)) + // M = user + /* + M << "\red You stab yourself in the eye." + M.sdisabilities |= BLIND + M.weakened += 4 + M.adjustBruteLoss(10) + */ + if(M != user) + for(var/mob/O in (viewers(M) - user - M)) + O.show_message("\red [M] has been stabbed in the eye with [src] by [user].", 1) + M << "\red [user] stabs you in the eye with [src]!" + user << "\red You stab [M] in the eye with [src]!" + else + user.visible_message( \ + "\red [user] has stabbed themself with [src]!", \ + "\red You stab yourself in the eyes with [src]!" \ + ) + if(istype(M, /mob/living/carbon/human)) + var/datum/organ/external/affecting = M:get_organ("head") + if(affecting.take_damage(7)) + M:UpdateDamageIcon() + else + M.take_organ_damage(7) + M.eye_blurry += rand(3,4) + M.eye_stat += rand(2,4) + if (M.eye_stat >= 10) + M.eye_blurry += 15+(0.1*M.eye_blurry) + M.disabilities |= NEARSIGHTED + if(M.stat != 2) + M << "\red Your eyes start to bleed profusely!" + if(prob(50)) + if(M.stat != 2) + M << "\red You drop what you're holding and clutch at your eyes!" + M.drop_item() + M.eye_blurry += 10 + M.Paralyse(1) + M.Weaken(4) + if (prob(M.eye_stat - 10 + 1)) + if(M.stat != 2) + M << "\red You go blind!" + M.sdisabilities |= BLIND + return \ No newline at end of file diff --git a/code/game/objects/items/blueprints.dm b/code/game/objects/items/blueprints.dm index 24d886ca76c..132f46cb0da 100644 --- a/code/game/objects/items/blueprints.dm +++ b/code/game/objects/items/blueprints.dm @@ -235,33 +235,4 @@ move an amendment to the drawing.

if(BORDER_SPACE) return ROOM_ERR_SPACE found+=T - return found - -/* -/proc/check_apc(var/area/A) - for(var/area/RA in A.related) - for(var/obj/machinery/power/apc/FINDME in RA) - return 1 - return 0 - -/proc/fuckingfreemachinery() - for(var/obj/machinery/machine in machines) - if (istype(machine,/obj/machinery/power/solar)) - continue - var/area/A = machine.loc.loc // make sure it's in an area - if (istype(A,/area/tdome)) - continue - if (istype(A,/area/shuttle)) - continue - if(!A || !isarea(A)) - world << "DEBUG: @[machine.x],[machine.y],[machine.z] ([A.name]) machine \"[machine.name]\" ([machine.type]) hasnt area!" - continue - A = A.master - if (A.name=="Space") - world << "DEBUG: @[machine.x],[machine.y],[machine.z] ([A.name]) machine \"[machine.name]\" ([machine.type]) work in space!" - continue - if (!check_apc(A)) - world << "DEBUG: @[machine.x],[machine.y],[machine.z] ([A.name]) machine \"[machine.name]\" ([machine.type]) work without APC!" - world << "\red END =====" - -*/ \ No newline at end of file + return found \ No newline at end of file diff --git a/code/game/objects/items/bodybag.dm b/code/game/objects/items/bodybag.dm index 6860d3ddeea..4cf441e2be1 100644 --- a/code/game/objects/items/bodybag.dm +++ b/code/game/objects/items/bodybag.dm @@ -1,3 +1,5 @@ +//Also contains /obj/structure/closet/body_bag because I doubt anyone would think to look for bodybags in /object/structures + /obj/item/bodybag name = "body bag" desc = "A folded bag designed to contain dead things." diff --git a/code/game/objects/items/candle.dm b/code/game/objects/items/candle.dm index ec0677a063c..b47a2a30684 100644 --- a/code/game/objects/items/candle.dm +++ b/code/game/objects/items/candle.dm @@ -1,7 +1,3 @@ -//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32 - -#define CANDLE_LUM 3 - /obj/item/candle name = "red candle" desc = "a candle" diff --git a/code/game/objects/items/devices/chameleonproj.dm b/code/game/objects/items/devices/chameleonproj.dm index 90f4949261e..4a8ce4887c9 100644 --- a/code/game/objects/items/devices/chameleonproj.dm +++ b/code/game/objects/items/devices/chameleonproj.dm @@ -1,46 +1,3 @@ -/obj/effect/dummy/chameleon - name = "" - desc = "" - density = 0 - anchored = 1 - var/can_move = 1 - var/obj/item/device/chameleon/master = null - attackby() - for(var/mob/M in src) - M << "\red Your chameleon-projector deactivates." - master.disrupt() - attack_hand() - for(var/mob/M in src) - M << "\red Your chameleon-projector deactivates." - master.disrupt() - ex_act() - for(var/mob/M in src) - M << "\red Your chameleon-projector deactivates." - master.disrupt() - bullet_act() - for(var/mob/M in src) - M << "\red Your chameleon-projector deactivates." - ..() - master.disrupt() - relaymove(var/mob/user, direction) - if(istype(loc, /turf/space)) return //No magical space movement! - - if(can_move) - can_move = 0 - switch(usr.bodytemperature) - if(300 to INFINITY) - spawn(10) can_move = 1 - if(295 to 300) - spawn(13) can_move = 1 - if(280 to 295) - spawn(16) can_move = 1 - if(260 to 280) - spawn(20) can_move = 1 - else - spawn(25) can_move = 1 - step(src,direction) - return - /obj/item/device/chameleon name = "chameleon-projector" icon_state = "shield0" @@ -119,3 +76,47 @@ active_dummy = null can_use = 0 spawn(100) can_use = 1 + + +/obj/effect/dummy/chameleon + name = "" + desc = "" + density = 0 + anchored = 1 + var/can_move = 1 + var/obj/item/device/chameleon/master = null + attackby() + for(var/mob/M in src) + M << "\red Your chameleon-projector deactivates." + master.disrupt() + attack_hand() + for(var/mob/M in src) + M << "\red Your chameleon-projector deactivates." + master.disrupt() + ex_act() + for(var/mob/M in src) + M << "\red Your chameleon-projector deactivates." + master.disrupt() + bullet_act() + for(var/mob/M in src) + M << "\red Your chameleon-projector deactivates." + ..() + master.disrupt() + relaymove(var/mob/user, direction) + if(istype(loc, /turf/space)) return //No magical space movement! + + if(can_move) + can_move = 0 + switch(usr.bodytemperature) + if(300 to INFINITY) + spawn(10) can_move = 1 + if(295 to 300) + spawn(13) can_move = 1 + if(280 to 295) + spawn(16) can_move = 1 + if(260 to 280) + spawn(20) can_move = 1 + else + spawn(25) can_move = 1 + step(src,direction) + return \ No newline at end of file diff --git a/code/game/objects/items/devices/shields.dm b/code/game/objects/items/devices/shields.dm index daec59c9013..665c79e0d90 100644 --- a/code/game/objects/items/devices/shields.dm +++ b/code/game/objects/items/devices/shields.dm @@ -1,29 +1,3 @@ -/*/obj/item/device/shield I have not see this thing used in quite some time and it just clutters up some of the mob code, also I am fairly sure it makes you invis with the newer cloaking icons - name = "shield" - desc = "This is an item which is specially crafted to shield you. It is much like a visible version of the outdated cloaking device." - icon_state = "shield0" - var/active = 0.0 - flags = FPRINT | TABLEPASS| CONDUCT - item_state = "electronic" - throwforce = 5.0 - throw_speed = 1 - throw_range = 5 - w_class = 2.0 - - -/obj/item/device/shield/attack_self(mob/user as mob) - src.active = !( src.active ) - if (src.active) - user << "\blue The shield is now active." - src.icon_state = "shield1" - else - user << "\blue The shield is now inactive." - src.icon_state = "shield0" - src.add_fingerprint(user) - return -*/ - - /obj/item/weapon/cloaking_device name = "cloaking device" desc = "Use this to become invisible to the human eyesocket." diff --git a/code/game/objects/items/helper_procs.dm b/code/game/objects/items/helper_procs.dm deleted file mode 100644 index 16d5bd2db6d..00000000000 --- a/code/game/objects/items/helper_procs.dm +++ /dev/null @@ -1,120 +0,0 @@ -/proc/parse_zone(zone) - if(zone == "r_hand") return "right hand" - else if (zone == "l_hand") return "left hand" - else if (zone == "l_arm") return "left arm" - else if (zone == "r_arm") return "right arm" - else if (zone == "l_leg") return "left leg" - else if (zone == "r_leg") return "right leg" - else if (zone == "l_foot") return "left foot" - else if (zone == "r_foot") return "right foot" - else return zone - -/proc/text2dir(direction) - switch(uppertext(direction)) - if("NORTH") - return 1 - if("SOUTH") - return 2 - if("EAST") - return 4 - if("WEST") - return 8 - if("NORTHEAST") - return 5 - if("NORTHWEST") - return 9 - if("SOUTHEAST") - return 6 - if("SOUTHWEST") - return 10 - else - return - -/proc/get_turf(turf/location) - while(location) - if(isturf(location)) - return location - location = location.loc - return null - -/proc/get_turf_or_move(turf/location) - return get_turf(location) - - - -/proc/dir2text(direction) - switch(direction) - if(1.0) - return "north" - if(2.0) - return "south" - if(4.0) - return "east" - if(8.0) - return "west" - if(5.0) - return "northeast" - if(6.0) - return "southeast" - if(9.0) - return "northwest" - if(10.0) - return "southwest" - else - return - -/proc/is_type_in_list(var/atom/A, var/list/L) - for(var/type in L) - if(istype(A, type)) - return 1 - return 0 - -//Quick type checks for some tools -var/global/list/common_tools = list( -/obj/item/weapon/cable_coil, -/obj/item/weapon/wrench, -/obj/item/weapon/weldingtool, -/obj/item/weapon/screwdriver, -/obj/item/weapon/wirecutters, -/obj/item/device/multitool, -/obj/item/weapon/crowbar) - -/proc/istool(O) - if(O && is_type_in_list(O, common_tools)) - return 1 - return 0 - -/proc/iswrench(O) - if(istype(O, /obj/item/weapon/wrench)) - return 1 - return 0 - -/proc/iswelder(O) - if(istype(O, /obj/item/weapon/weldingtool)) - return 1 - return 0 - -/proc/iscoil(O) - if(istype(O, /obj/item/weapon/cable_coil)) - return 1 - return 0 - -/proc/iswirecutter(O) - if(istype(O, /obj/item/weapon/wirecutters)) - return 1 - return 0 - -/proc/isscrewdriver(O) - if(istype(O, /obj/item/weapon/screwdriver)) - return 1 - return 0 - -/proc/ismultitool(O) - if(istype(O, /obj/item/device/multitool)) - return 1 - return 0 - -/proc/iscrowbar(O) - if(istype(O, /obj/item/weapon/crowbar)) - return 1 - return 0 diff --git a/code/game/objects/items/item.dm b/code/game/objects/items/item.dm deleted file mode 100644 index 280148e7d58..00000000000 --- a/code/game/objects/items/item.dm +++ /dev/null @@ -1,392 +0,0 @@ - -/obj/item/proc/attack_self() - return - -/obj/item/proc/talk_into(mob/M as mob, text) - return - -/obj/item/proc/moved(mob/user as mob, old_loc as turf) - return - -/obj/item/proc/dropped(mob/user as mob) - ..() - -// called just as an item is picked up (loc is not yet changed) -/obj/item/proc/pickup(mob/user) - return - -// called when this item is removed from a storage item, which is passed on as S. The loc variable is already set to the new destination before this is called. -/obj/item/proc/on_exit_storage(obj/item/weapon/storage/S as obj) - return - -// called when this item is added into a storage item, which is passed on as S. The loc variable is already set to the storage item. -/obj/item/proc/on_enter_storage(obj/item/weapon/storage/S as obj) - return - -// called after an item is placed in an equipment slot -// user is mob that equipped it -// slot uses the slot_X defines found in setup.dm -// for items that can be placed in multiple slots -// note this isn't called during the initial dressing of a player -/obj/item/proc/equipped(var/mob/user, var/slot) - return - -/obj/item/proc/afterattack() - - return - -/obj/item/weapon/dummy/ex_act() - return - -/obj/item/weapon/dummy/blob_act() - return - -/obj/item/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 - else - return - -/obj/item/blob_act() - return - -/obj/item/verb/move_to_top() - set name = "Move To Top" - set category = "Object" - set src in oview(1) - - if(!istype(src.loc, /turf) || usr.stat || usr.restrained() ) - return - - var/turf/T = src.loc - - src.loc = null - - src.loc = T - -/obj/item/examine() - set src in view() - - var/t - switch(src.w_class) - if(1.0) - t = "tiny" - if(2.0) - t = "small" - if(3.0) - t = "normal-sized" - if(4.0) - t = "bulky" - if(5.0) - t = "huge" - else - if ((CLUMSY in usr.mutations) && prob(50)) t = "funny-looking" - usr << text("This is a []\icon[][]. It is a [] item.", !src.blood_DNA ? "" : "bloody ",src, src.name, t) - if(src.desc) - usr << src.desc - return - -/obj/item/attack_hand(mob/user as mob) - if (!user) return - if (istype(src.loc, /obj/item/weapon/storage)) - var/obj/item/weapon/storage/S = src.loc - S.remove_from_storage(src) - - src.throwing = 0 - if (src.loc == user) - //canremove==0 means that object may not be removed. You can still wear it. This only applies to clothing. /N - if(!src.canremove) - return - else - user.u_equip(src) - else - if(isliving(src.loc)) - return - src.pickup(user) - user.lastDblClick = world.time + 2 - user.next_move = world.time + 2 - add_fingerprint(user) - user.put_in_active_hand(src) - return - - -/obj/item/attack_paw(mob/user as mob) - - if(isalien(user)) // -- TLE - var/mob/living/carbon/alien/A = user - - if(!A.has_fine_manipulation || w_class >= 4) - if(src in A.contents) // To stop Aliens having items stuck in their pockets - A.drop_from_inventory(src) - user << "Your claws aren't capable of such fine manipulation." - return - - if (istype(src.loc, /obj/item/weapon/storage)) - for(var/mob/M in range(1, src.loc)) - if (M.s_active == src.loc) - if (M.client) - M.client.screen -= src - src.throwing = 0 - if (src.loc == user) - //canremove==0 means that object may not be removed. You can still wear it. This only applies to clothing. /N - if(istype(src, /obj/item/clothing) && !src:canremove) - return - else - user.u_equip(src) - else - if(istype(src.loc, /mob/living)) - return - src.pickup(user) - user.lastDblClick = world.time + 2 - user.next_move = world.time + 2 - - user.put_in_active_hand(src) - return - -/obj/item/attackby(obj/item/weapon/W as obj, mob/user as mob) - - if(istype(W,/obj/item/weapon/storage)) - var/obj/item/weapon/storage/S = W - if(S.use_to_pickup) - if(!S.can_be_inserted(src)) - return - if(S.collection_mode) //Mode is set to collect all items on a tile and we clicked on a valid one. - if(isturf(src.loc)) - for(var/obj/item/I in src.loc) - if(I != src) //We'll do the one we clicked on last. - if(!S.can_be_inserted(src)) - continue - S.handle_item_insertion(I, 1) //The 1 stops the "You put the [src] into [S]" insertion message from being displayed. - S.handle_item_insertion(src) - - - return - -/obj/item/proc/attack(mob/living/M as mob, mob/living/user as mob, def_zone) - - if (!istype(M)) // not sure if this is the right thing... - return - var/messagesource = M - - if (istype(M,/mob/living/carbon/brain)) - messagesource = M:container - if (src.hitsound) - playsound(src.loc, hitsound, 50, 1, -1) - ///////////////////////// - user.lastattacked = M - M.lastattacker = user - - user.attack_log += "\[[time_stamp()]\] Attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(src.damtype)])" - M.attack_log += "\[[time_stamp()]\] Attacked by [user.name] ([user.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(src.damtype)])" - log_attack("[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(src.damtype)])" ) - - //spawn(1800) // this wont work right - // M.lastattacker = null - ///////////////////////// - - var/power = src.force - if((HULK in user.mutations) || (SUPRSTR in user.augmentations)) - power *= 2 - - if(!istype(M, /mob/living/carbon/human)) - if(istype(M, /mob/living/carbon/metroid)) - var/mob/living/carbon/metroid/Metroid = M - if(prob(25)) - user << "\red [src] passes right through [M]!" - return - - if(power > 0) - Metroid.attacked += 10 - - if(Metroid.Discipline && prob(50)) // wow, buddy, why am I getting attacked?? - Metroid.Discipline = 0 - - if(power >= 3) - if(istype(Metroid, /mob/living/carbon/metroid/adult)) - if(prob(5 + round(power/2))) - - if(Metroid.Victim) - if(prob(80) && !Metroid.client) - Metroid.Discipline++ - Metroid.Victim = null - Metroid.anchored = 0 - - spawn() - if(Metroid) - Metroid.SStun = 1 - sleep(rand(5,20)) - if(Metroid) - Metroid.SStun = 0 - - spawn(0) - if(Metroid) - Metroid.canmove = 0 - step_away(Metroid, user) - if(prob(25 + power)) - sleep(2) - if(Metroid && user) - step_away(Metroid, user) - Metroid.canmove = 1 - - else - if(prob(10 + power*2)) - if(Metroid) - if(Metroid.Victim) - if(prob(80) && !Metroid.client) - Metroid.Discipline++ - - if(Metroid.Discipline == 1) - Metroid.attacked = 0 - - spawn() - if(Metroid) - Metroid.SStun = 1 - sleep(rand(5,20)) - if(Metroid) - Metroid.SStun = 0 - - Metroid.Victim = null - Metroid.anchored = 0 - - - spawn(0) - if(Metroid && user) - step_away(Metroid, user) - Metroid.canmove = 0 - if(prob(25 + power*4)) - sleep(2) - if(Metroid && user) - step_away(Metroid, user) - Metroid.canmove = 1 - - - var/showname = "." - if(user) - showname = " by [user]." - if(!(user in viewers(M, null))) - showname = "." - - for(var/mob/O in viewers(messagesource, null)) - if(src.attack_verb.len) - O.show_message("\red [M] has been [pick(src.attack_verb)] with [src][showname] ", 1) - else - O.show_message("\red [M] has been attacked with [src][showname] ", 1) - - if(!showname && user) - if(user.client) - user << "\red You attack [M] with [src]. " - - - - if(istype(M, /mob/living/carbon/human)) - M:attacked_by(src, user, def_zone) - else - switch(src.damtype) - if("brute") - if(istype(src, /mob/living/carbon/metroid)) - M.adjustBrainLoss(power) - - else - - M.take_organ_damage(power) - if (prob(33)) // Added blood for whacking non-humans too - var/turf/location = M.loc - if (istype(location, /turf/simulated)) - location.add_blood_floor(M) - if("fire") - if (!(COLD_RESISTANCE in M.mutations)) - M.take_organ_damage(0, power) - M << "Aargh it burns!" - M.updatehealth() - src.add_fingerprint(user) - return 1 - - -/obj/item/proc/IsShield() - return 0 - -/obj/item/proc/eyestab(mob/living/carbon/M as mob, mob/living/carbon/user as mob) - - var/mob/living/carbon/human/H = M - if(istype(H) && ( \ - (H.head && H.head.flags & HEADCOVERSEYES) || \ - (H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || \ - (H.glasses && H.glasses.flags & GLASSESCOVERSEYES) \ - )) - // you can't stab someone in the eyes wearing a mask! - user << "\red You're going to need to remove that mask/helmet/glasses first." - return - - var/mob/living/carbon/monkey/Mo = M - if(istype(Mo) && ( \ - (Mo.wear_mask && Mo.wear_mask.flags & MASKCOVERSEYES) \ - )) - // you can't stab someone in the eyes wearing a mask! - user << "\red You're going to need to remove that mask/helmet/glasses first." - return - - if(istype(M, /mob/living/carbon/alien) || istype(M, /mob/living/carbon/metroid))//Aliens don't have eyes./N Metroids also don't have eyes! - user << "\red You cannot locate any eyes on this creature!" - return - - user.attack_log += "\[[time_stamp()]\] Attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])" - M.attack_log += "\[[time_stamp()]\] Attacked by [user.name] ([user.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])" - - log_attack(" [user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])") - - src.add_fingerprint(user) - //if((CLUMSY in user.mutations) && prob(50)) - // M = user - /* - M << "\red You stab yourself in the eye." - M.sdisabilities |= BLIND - M.weakened += 4 - M.adjustBruteLoss(10) - */ - if(M != user) - for(var/mob/O in (viewers(M) - user - M)) - O.show_message("\red [M] has been stabbed in the eye with [src] by [user].", 1) - M << "\red [user] stabs you in the eye with [src]!" - user << "\red You stab [M] in the eye with [src]!" - else - user.visible_message( \ - "\red [user] has stabbed themself with [src]!", \ - "\red You stab yourself in the eyes with [src]!" \ - ) - if(istype(M, /mob/living/carbon/human)) - var/datum/organ/external/affecting = M:get_organ("head") - if(affecting.take_damage(7)) - M:UpdateDamageIcon() - else - M.take_organ_damage(7) - M.eye_blurry += rand(3,4) - M.eye_stat += rand(2,4) - if (M.eye_stat >= 10) - M.eye_blurry += 15+(0.1*M.eye_blurry) - M.disabilities |= NEARSIGHTED - if(M.stat != 2) - M << "\red Your eyes start to bleed profusely!" - if(prob(50)) - if(M.stat != 2) - M << "\red You drop what you're holding and clutch at your eyes!" - M.drop_item() - M.eye_blurry += 10 - M.Paralyse(1) - M.Weaken(4) - if (prob(M.eye_stat - 10 + 1)) - if(M.stat != 2) - M << "\red You go blind!" - M.sdisabilities |= BLIND - return - - diff --git a/code/game/objects/items/latexballoon.dm b/code/game/objects/items/latexballoon.dm new file mode 100644 index 00000000000..6e1c608cb2f --- /dev/null +++ b/code/game/objects/items/latexballoon.dm @@ -0,0 +1,48 @@ +/obj/item/latexballon + name = "Latex glove" + desc = "" //todo + icon_state = "latexballon" + item_state = "lgloves" + force = 0 + throwforce = 0 + w_class = 1.0 + throw_speed = 1 + throw_range = 15 + var/state + var/datum/gas_mixture/air_contents = null + +/obj/item/latexballon/proc/blow(obj/item/weapon/tank/tank) + if (icon_state == "latexballon_bursted") + return + src.air_contents = tank.remove_air_volume(3) + icon_state = "latexballon_blow" + item_state = "latexballon" + +/obj/item/latexballon/proc/burst() + if (!air_contents) + return + playsound(src, 'sound/weapons/Gunshot.ogg', 100, 1) + icon_state = "latexballon_bursted" + item_state = "lgloves" + loc.assume_air(air_contents) + +/obj/item/latexballon/ex_act(severity) + burst() + switch(severity) + if (1) + del(src) + if (2) + if (prob(50)) + del(src) + +/obj/item/latexballon/bullet_act() + burst() + +/obj/item/latexballon/temperature_expose(datum/gas_mixture/air, temperature, volume) + if(temperature > T0C+100) + burst() + return + +/obj/item/latexballon/attackby(obj/item/W as obj, mob/user as mob) + if (is_sharp(W)) + burst() \ No newline at end of file diff --git a/code/game/objects/items/robot_items.dm b/code/game/objects/items/robot/robot_items.dm similarity index 100% rename from code/game/objects/items/robot_items.dm rename to code/game/objects/items/robot/robot_items.dm diff --git a/code/game/objects/items/robot_parts.dm b/code/game/objects/items/robot/robot_parts.dm similarity index 100% rename from code/game/objects/items/robot_parts.dm rename to code/game/objects/items/robot/robot_parts.dm diff --git a/code/game/objects/items/robot_upgrades.dm b/code/game/objects/items/robot/robot_upgrades.dm similarity index 100% rename from code/game/objects/items/robot_upgrades.dm rename to code/game/objects/items/robot/robot_upgrades.dm diff --git a/code/game/objects/items/trash.dm b/code/game/objects/items/trash.dm index 9179c57ed7f..7dd5e855411 100644 --- a/code/game/objects/items/trash.dm +++ b/code/game/objects/items/trash.dm @@ -1,3 +1,6 @@ +//Items labled as 'trash' for the trash bag. +//TODO: Make this an item var or something... + //Added by Jack Rost /obj/item/trash icon = 'icons/obj/trash.dmi' @@ -48,80 +51,4 @@ icon_state = "candle4" /obj/item/trash/attack(mob/M as mob, mob/living/user as mob) - return - -/obj/item/weapon/trashbag - icon = 'icons/obj/trash.dmi' - icon_state = "trashbag0" - item_state = "trashbag" - name = "Trash bag" - desc = "A heavy-duty, no fun allowed trash bag." - var/mode = 1; //0 = pick one at a time, 1 = pick all on tile - var/capacity = 25; //the number of trash it can carry. - flags = FPRINT | TABLEPASS - slot_flags = SLOT_BELT - w_class = 2.0 - -/obj/item/weapon/trashbag/update_icon() - if(contents.len == 0) - icon_state = "trashbag0" - else if(contents.len < 12) - icon_state = "trashbag1" - else if(contents.len < 25) - icon_state = "trashbag2" - else icon_state = "trashbag3" - -/obj/item/weapon/trashbag/attackby(obj/item/W as obj, mob/living/user as mob) - ..() - if (contents.len < capacity) - if (istype(W, /obj/item)) - if (W.w_class <= 2) - var/obj/item/O = W - src.contents += O - else - user << "\blue The bag is full!" - -/obj/item/weapon/trashbag/attack_self(mob/living/user as mob) - - if(contents.len > 0) - for(var/obj/item/I in src.contents) - I.loc = user.loc - update_icon() - user << "\blue You drop all the trash onto the floor." - -/obj/item/weapon/trashbag/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag) - if(istype(target, /obj/item)) - var/obj/item/W = target - if(W.w_class <= 2) - if(mode == 1) - if(contents.len < capacity) //slightly redundant, but it makes it prettier in the chatbox. -Pete - user << "\blue You pick up all the trash." - for(var/obj/item/O in get_turf(W)) - if(istype(O, /obj/item/weapon/disk/nuclear)) continue //No nuke disks - Nodrak - if(contents.len < capacity) - if(O.w_class <= 2) - contents += O; - else - user << "\blue The bag is full!" - break - else - user << "\blue The bag is full!" - else - if(istype(W, /obj/item/weapon/disk/nuclear)) return //No nuke disks - Nodrak - if(contents.len < capacity) - contents += W; - else - user << "\blue The bag is full!" - update_icon() - return - -/obj/item/weapon/trashbag/verb/toggle_mode() - set name = "Switch Bag Method" - set category = "Object" - - mode = !mode - switch (mode) - if(1) - usr << "The bag now picks up all trash in a tile at once." - else - usr << "The bag now picks up one piece of trash at a time." \ No newline at end of file + return \ No newline at end of file diff --git a/code/game/objects/items/weapons/Bedsheets.dm b/code/game/objects/items/weapons/Bedsheets.dm new file mode 100644 index 00000000000..440a6c08f58 --- /dev/null +++ b/code/game/objects/items/weapons/Bedsheets.dm @@ -0,0 +1,14 @@ +/obj/item/weapon/bedsheet/ex_act(severity) + if (severity <= 2) + del(src) + return + return + +/obj/item/weapon/bedsheet/attack_self(mob/user as mob) + user.drop_item() + if(layer == initial(layer)) + layer = 5 + else + layer = initial(layer) + add_fingerprint(user) + return \ No newline at end of file diff --git a/code/game/objects/items/weapons/dice.dm b/code/game/objects/items/weapons/dice.dm new file mode 100644 index 00000000000..19fc3967484 --- /dev/null +++ b/code/game/objects/items/weapons/dice.dm @@ -0,0 +1,22 @@ + + + +/obj/item/weapon/dice/attack_self(mob/user as mob) // Roll the dice -- TLE + var/temp_sides + if(src.sides < 1) + temp_sides = 2 + else + temp_sides = src.sides + var/result = rand(1,temp_sides) + var/comment = "" + if(temp_sides == 20 && result == 20) + comment = "Nat 20!" + else if(temp_sides == 20 && result == 1) + comment = "Ouch, bad luck." + user << text("\red You throw a [src]. It lands on a [result]. [comment]") + icon_state = "[name][result]" + for(var/mob/O in viewers(user, null)) + if(O == (user)) + continue + else + O.show_message(text("\red [user] has thrown a [src]. It lands on [result]. [comment]"), 1) \ No newline at end of file diff --git a/code/game/objects/items/weapons/extinguisher.dm b/code/game/objects/items/weapons/extinguisher.dm new file mode 100644 index 00000000000..4eab83ba6e2 --- /dev/null +++ b/code/game/objects/items/weapons/extinguisher.dm @@ -0,0 +1,132 @@ +/obj/item/weapon/extinguisher + name = "fire extinguisher" + desc = "A traditional red fire extinguisher." + icon = 'icons/obj/items.dmi' + icon_state = "fire_extinguisher0" + item_state = "fire_extinguisher" + hitsound = 'sound/weapons/smash.ogg' + flags = FPRINT | USEDELAY | TABLEPASS | CONDUCT + throwforce = 10 + w_class = 3.0 + throw_speed = 2 + throw_range = 10 + force = 10.0 + m_amt = 90 + attack_verb = list("slammed", "whacked", "bashed", "thunked", "battered", "bludgeoned", "thrashed") + var/max_water = 50 + var/last_use = 1.0 + var/safety = 1 + var/sprite_name = "fire_extinguisher" + +/obj/item/weapon/extinguisher/mini + name = "fire extinguisher" + desc = "A light and compact fibreglass-framed model fire extinguisher." + icon_state = "miniFE0" + item_state = "miniFE" + hitsound = null //it is much lighter, after all. + flags = FPRINT | USEDELAY | TABLEPASS + throwforce = 2 + w_class = 2.0 + force = 3.0 + m_amt = 0 + max_water = 30 + sprite_name = "mini_FE" + +/obj/item/weapon/extinguisher/New() + var/datum/reagents/R = new/datum/reagents(max_water) + reagents = R + R.my_atom = src + R.add_reagent("water", max_water) + +/obj/item/weapon/extinguisher/examine() + set src in usr + + usr << text("\icon[] [] contains [] units of water left!", src, src.name, src.reagents.total_volume) + ..() + return + +/obj/item/weapon/extinguisher/attack_self(mob/user as mob) + safety = !safety + src.icon_state = "[sprite_name][safety]" + src.desc = "The safety is [safety ? "on" : "off"]." + user << "The safety is [safety ? "on" : "off"]." + return + +/obj/item/weapon/extinguisher/afterattack(atom/target, mob/user , flag) + //TODO; Add support for reagents in water. + + if( istype(target, /obj/structure/reagent_dispensers/watertank) && get_dist(src,target) <= 1) + var/obj/o = target + o.reagents.trans_to(src, 50) + user << "\blue \The [src] is now refilled" + playsound(src.loc, 'sound/effects/refill.ogg', 50, 1, -6) + return + + if (!safety) + if (src.reagents.total_volume < 1) + usr << "\red \The [src] is empty." + return + + if (world.time < src.last_use + 20) + return + + src.last_use = world.time + + playsound(src.loc, 'sound/effects/extinguish.ogg', 75, 1, -3) + + var/direction = get_dir(src,target) + + if(usr.buckled && isobj(usr.buckled) && !usr.buckled.anchored ) + spawn(0) + var/obj/B = usr.buckled + var/movementdirection = turn(direction,180) + B.Move(get_step(usr,movementdirection), movementdirection) + sleep(1) + B.Move(get_step(usr,movementdirection), movementdirection) + sleep(1) + B.Move(get_step(usr,movementdirection), movementdirection) + sleep(1) + B.Move(get_step(usr,movementdirection), movementdirection) + sleep(2) + B.Move(get_step(usr,movementdirection), movementdirection) + sleep(2) + B.Move(get_step(usr,movementdirection), movementdirection) + sleep(3) + B.Move(get_step(usr,movementdirection), movementdirection) + sleep(3) + B.Move(get_step(usr,movementdirection), movementdirection) + sleep(3) + B.Move(get_step(usr,movementdirection), movementdirection) + + var/turf/T = get_turf(target) + var/turf/T1 = get_step(T,turn(direction, 90)) + var/turf/T2 = get_step(T,turn(direction, -90)) + + var/list/the_targets = list(T,T1,T2) + + for(var/a=0, a<5, a++) + spawn(0) + var/obj/effect/effect/water/W = new /obj/effect/effect/water( get_turf(src) ) + var/turf/my_target = pick(the_targets) + var/datum/reagents/R = new/datum/reagents(5) + if(!W) return + W.reagents = R + R.my_atom = W + if(!W || !src) return + src.reagents.trans_to(W,1) + for(var/b=0, b<5, b++) + step_towards(W,my_target) + if(!W) return + W.reagents.reaction(get_turf(W)) + for(var/atom/atm in get_turf(W)) + if(!W) return + W.reagents.reaction(atm) + if(W.loc == my_target) break + sleep(2) + + if((istype(usr.loc, /turf/space)) || (usr.lastarea.has_gravity == 0)) + user.inertia_dir = get_dir(target, user) + step(user, user.inertia_dir) + else + return ..() + return \ No newline at end of file diff --git a/code/game/objects/items/weapons/handcuffs.dm b/code/game/objects/items/weapons/handcuffs.dm new file mode 100644 index 00000000000..2527ec086aa --- /dev/null +++ b/code/game/objects/items/weapons/handcuffs.dm @@ -0,0 +1,76 @@ +/obj/item/weapon/handcuffs/attack(mob/M as mob, mob/user as mob) + if(istype(src, /obj/item/weapon/handcuffs/cyborg) && isrobot(user)) + if(!M.handcuffed) + var/turf/p_loc = user.loc + var/turf/p_loc_m = M.loc + playsound(src.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -2) + for(var/mob/O in viewers(user, null)) + O.show_message("\red [user] is trying to put handcuffs on [M]!", 1) + spawn(30) + if(!M) return + if(p_loc == user.loc && p_loc_m == M.loc) + M.handcuffed = new /obj/item/weapon/handcuffs(M) + M.update_inv_handcuffed() + + else + if ((CLUMSY in usr.mutations) && prob(50)) + usr << "\red Uh ... how do those things work?!" + if (istype(M, /mob/living/carbon/human)) + if(!M.handcuffed) + var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( ) + O.source = user + O.target = user + O.item = user.get_active_hand() + O.s_loc = user.loc + O.t_loc = user.loc + O.place = "handcuff" + M.requests += O + spawn( 0 ) + O.process() + return + return + if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey") + usr << "\red You don't have the dexterity to do this!" + return + if (istype(M, /mob/living/carbon/human)) + if(!M.handcuffed) + M.attack_log += text("\[[time_stamp()]\] Has been handcuffed (attempt) by [user.name] ([user.ckey])") + user.attack_log += text("\[[time_stamp()]\] Attempted to handcuff [M.name] ([M.ckey])") + + log_attack("[user.name] ([user.ckey]) Attempted to handcuff [M.name] ([M.ckey])") + + var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( ) + O.source = user + O.target = M + O.item = user.get_active_hand() + O.s_loc = user.loc + O.t_loc = M.loc + O.place = "handcuff" + M.requests += O + spawn( 0 ) + if(istype(src, /obj/item/weapon/handcuffs/cable)) + feedback_add_details("handcuffs","C") + playsound(src.loc, 'sound/weapons/cablecuff.ogg', 30, 1, -2) + else + feedback_add_details("handcuffs","H") + playsound(src.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -2) + O.process() + return + else + if(!M.handcuffed) + var/obj/effect/equip_e/monkey/O = new /obj/effect/equip_e/monkey( ) + O.source = user + O.target = M + O.item = user.get_active_hand() + O.s_loc = user.loc + O.t_loc = M.loc + O.place = "handcuff" + M.requests += O + spawn( 0 ) + if(istype(src, /obj/item/weapon/handcuffs/cable)) + playsound(src.loc, 'sound/weapons/cablecuff.ogg', 30, 1, -2) + else + playsound(src.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -2) + O.process() + return + return \ No newline at end of file diff --git a/code/game/objects/items/weapons/scrolls.dm b/code/game/objects/items/weapons/scrolls.dm new file mode 100644 index 00000000000..b3818449055 --- /dev/null +++ b/code/game/objects/items/weapons/scrolls.dm @@ -0,0 +1,32 @@ +/obj/item/weapon/teleportation_scroll/attack_self(mob/user as mob) + user.machine = src + var/dat = "Teleportation Scroll:
" + dat += "Number of uses: [src.uses]
" + dat += "
" + dat += "Four uses use them wisely:
" + dat += "Teleport
" + dat += "Kind regards,
Wizards Federation

P.S. Don't forget to bring your gear, you'll need it to cast most spells.
" + user << browse(dat, "window=scroll") + onclose(user, "scroll") + return + +/obj/item/weapon/teleportation_scroll/Topic(href, href_list) + ..() + if (usr.stat || usr.restrained()) + return + var/mob/living/carbon/human/H = usr + if (!( istype(H, /mob/living/carbon/human))) + return 1 + if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf)))) + usr.machine = src + if (href_list["spell_teleport"]) + if (src.uses >= 1) + src.uses -= 1 + usr.teleportscroll() + if (istype(src.loc, /mob)) + attack_self(src.loc) + else + for(var/mob/M in viewers(1, src)) + if (M.client) + src.attack_self(M) + return \ No newline at end of file diff --git a/code/game/objects/items/weapons/trashbag.dm b/code/game/objects/items/weapons/trashbag.dm new file mode 100644 index 00000000000..e9471f60f17 --- /dev/null +++ b/code/game/objects/items/weapons/trashbag.dm @@ -0,0 +1,75 @@ +/obj/item/weapon/trashbag + icon = 'icons/obj/trash.dmi' + icon_state = "trashbag0" + item_state = "trashbag" + name = "Trash bag" + desc = "A heavy-duty, no fun allowed trash bag." + var/mode = 1; //0 = pick one at a time, 1 = pick all on tile + var/capacity = 25; //the number of trash it can carry. + flags = FPRINT | TABLEPASS + slot_flags = SLOT_BELT + w_class = 2.0 + +/obj/item/weapon/trashbag/update_icon() + if(contents.len == 0) + icon_state = "trashbag0" + else if(contents.len < 12) + icon_state = "trashbag1" + else if(contents.len < 25) + icon_state = "trashbag2" + else icon_state = "trashbag3" + +/obj/item/weapon/trashbag/attackby(obj/item/W as obj, mob/living/user as mob) + ..() + if (contents.len < capacity) + if (istype(W, /obj/item)) + if (W.w_class <= 2) + var/obj/item/O = W + src.contents += O + else + user << "\blue The bag is full!" + +/obj/item/weapon/trashbag/attack_self(mob/living/user as mob) + + if(contents.len > 0) + for(var/obj/item/I in src.contents) + I.loc = user.loc + update_icon() + user << "\blue You drop all the trash onto the floor." + +/obj/item/weapon/trashbag/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag) + if(istype(target, /obj/item)) + var/obj/item/W = target + if(W.w_class <= 2) + if(mode == 1) + if(contents.len < capacity) //slightly redundant, but it makes it prettier in the chatbox. -Pete + user << "\blue You pick up all the trash." + for(var/obj/item/O in get_turf(W)) + if(istype(O, /obj/item/weapon/disk/nuclear)) continue //No nuke disks - Nodrak + if(contents.len < capacity) + if(O.w_class <= 2) + contents += O; + else + user << "\blue The bag is full!" + break + else + user << "\blue The bag is full!" + else + if(istype(W, /obj/item/weapon/disk/nuclear)) return //No nuke disks - Nodrak + if(contents.len < capacity) + contents += W; + else + user << "\blue The bag is full!" + update_icon() + return + +/obj/item/weapon/trashbag/verb/toggle_mode() + set name = "Switch Bag Method" + set category = "Object" + + mode = !mode + switch (mode) + if(1) + usr << "The bag now picks up all trash in a tile at once." + else + usr << "The bag now picks up one piece of trash at a time." \ No newline at end of file diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm new file mode 100644 index 00000000000..e69de29bb2d diff --git a/code/game/objects/weapons.dm b/code/game/objects/weapons.dm index c5c738c9c84..9d9b8a6bd61 100644 --- a/code/game/objects/weapons.dm +++ b/code/game/objects/weapons.dm @@ -1,26 +1,4 @@ -//TODO: Move these into atom_procs.dm after carn's finished with it, otherwise it'll conflict - Nodrak - -/atom/proc/ex_act() - return - -/atom/proc/blob_act() - return - -// bullet_act called when anything is hit buy a projectile (bullet, tazer shot, laser, etc.) -// flag is projectile type, can be: -//PROJECTILE_TASER = 1 taser gun -//PROJECTILE_LASER = 2 laser gun -//PROJECTILE_BULLET = 3 traitor pistol -//PROJECTILE_PULSE = 4 pulse rifle -//PROJECTILE_BOLT = 5 crossbow -//PROJECTILE_WEAKBULLET = 6 detective's revolver - -/turf/Entered(atom/A as mob|obj) - ..() - if ((A && A.density && !( istype(A, /obj/effect/beam) ))) - for(var/obj/effect/beam/i_beam/I in src) - spawn( 0 ) - if (I) - I.hit() - return +/obj/item/weapon/Bump(mob/M as mob) + spawn(0) + ..() return \ No newline at end of file diff --git a/code/game/objects/items/shock_kit.dm b/code/modules/assembly/shock_kit.dm similarity index 100% rename from code/game/objects/items/shock_kit.dm rename to code/modules/assembly/shock_kit.dm diff --git a/code/game/objects/facehugger.dm b/code/modules/mob/living/carbon/alien/special/facehugger.dm similarity index 94% rename from code/game/objects/facehugger.dm rename to code/modules/mob/living/carbon/alien/special/facehugger.dm index 9093ecba401..e8cbd28500d 100644 --- a/code/game/objects/facehugger.dm +++ b/code/modules/mob/living/carbon/alien/special/facehugger.dm @@ -1,6 +1,6 @@ //This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32 -//Moving this here for now.. it might end up in modules/mob/ later +//TODO: Make these simple_animals var/const/MIN_IMPREGNATION_TIME = 100 //time it takes to impregnate someone var/const/MAX_IMPREGNATION_TIME = 150 diff --git a/code/modules/mob/living/carbon/brain/brain_item.dm b/code/modules/mob/living/carbon/brain/brain_item.dm new file mode 100644 index 00000000000..2482614bf47 --- /dev/null +++ b/code/modules/mob/living/carbon/brain/brain_item.dm @@ -0,0 +1,61 @@ +/obj/item/brain/examine() // -- TLE + set src in oview(12) + if (!( usr )) + return + usr << "This is \icon[src] \an [name]." + + if(brainmob)//if thar be a brain inside... the brain. + usr << "You can feel the small spark of life still left in this one." + else + usr << "This one seems particularly lifeless. Perhaps it will regain some of its luster later. Probably not." + +/obj/item/brain/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob) + if(!istype(M, /mob)) + return + + add_fingerprint(user) + + if(!(user.zone_sel.selecting == ("head")) || !istype(M, /mob/living/carbon/human)) + return ..() + + if( !(locate(/obj/machinery/optable, M.loc) && M.resting) && ( !(locate(/obj/structure/table/, M.loc) && M.lying) && prob(50) ) ) + return ..() + + var/mob/living/carbon/human/H = M + if(istype(M, /mob/living/carbon/human) && ((H.head && H.head.flags & HEADCOVERSEYES) || (H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || (H.glasses && H.glasses.flags & GLASSESCOVERSEYES))) + // you can't stab someone in the eyes wearing a mask! + user << "\blue You're going to need to remove their head cover first." + return + +//since these people will be dead M != usr + + if(M:brain_op_stage == 4.0) + for(var/mob/O in viewers(M, null)) + if(O == (user || M)) + continue + if(M == user) + O.show_message(text("\red [user] inserts [src] into his head!"), 1) + else + O.show_message(text("\red [M] has [src] inserted into his head by [user]."), 1) + + if(M != user) + M << "\red [user] inserts [src] into your head!" + user << "\red You insert [src] into [M]'s head!" + else + user << "\red You insert [src] into your head!" + + //this might actually be outdated since barring badminnery, a debrain'd body will have any client sucked out to the brain's internal mob. Leaving it anyway to be safe. --NEO + if(M.key)//Revised. /N + M.ghostize() + + if(brainmob.mind) + brainmob.mind.transfer_to(M) + else + M.key = brainmob.key + + M:brain_op_stage = 3.0 + + del(src) + else + ..() + return \ No newline at end of file diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 8147ea42800..eb22b05656d 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -26,9 +26,6 @@ usr.show_message(t, 1) -/atom/proc/relaymove() - return - /mob/proc/show_message(msg, type, alt, alt_type)//Message, type of message (1 or 2), alternative message, alt message type (1 or 2) if(!client) return if (type) @@ -75,6 +72,33 @@ M.show_message( message, 1, blind_message, 2) +//What the fuck is this code +/mob/attackby(obj/item/weapon/W as obj, mob/user as mob) + if (user.intent != "harm") + if (istype(src.l_hand,/obj/item/latexballon) && src.l_hand:air_contents && is_sharp(W)) + return src.l_hand.attackby(W) + if (istype(src.r_hand,/obj/item/latexballon) && src.r_hand:air_contents && is_sharp(W)) + return src.r_hand.attackby(W) + var/shielded = 0 + if (locate(/obj/item/weapon/grab, src)) + var/mob/safe = null + if (istype(src.l_hand, /obj/item/weapon/grab)) + var/obj/item/weapon/grab/G = src.l_hand + if ((G.state == 3 && get_dir(src, user) == src.dir)) + safe = G.affecting + if (istype(src.r_hand, /obj/item/weapon/grab)) + var/obj/item/weapon/grab/G = src.r_hand + if ((G.state == 3 && get_dir(src, user) == src.dir)) + safe = G.affecting + if (safe) + return safe.attackby(W, user) + if ((!( shielded ) || !( W.flags ) & 32)) + spawn( 0 ) + if (W) + W.attack(src, user) + return + return + /mob/proc/findname(msg) for(var/mob/M in mob_list) if (M.real_name == text("[]", msg)) @@ -515,16 +539,6 @@ var/list/slot_equipment_priority = list( \ if(LinkBlocked(usr.loc,loc)) return show_inv(usr) -/atom/movable - var/mob/pulledby = null - -/atom/movable/verb/pull() - set name = "Pull" - set category = "IC" - set src in oview(1) - - usr.start_pulling(src) - return /mob/proc/stop_pulling() if(pulling) @@ -548,18 +562,6 @@ var/list/slot_equipment_priority = list( \ else M.LAssailant = usr -/atom/verb/examine() - set name = "Examine" - set category = "IC" - set src in oview(12) //make it work from farther away - - if (!( usr )) - return - usr << "That's \a [src]." //changed to "That's" from "This is" because "This is some metal sheets" sounds dumb compared to "That's some metal sheets" ~Carn - usr << desc - // *****RM - //usr << "[name]: Dn:[density] dir:[dir] cont:[contents] icon:[icon] is:[icon_state] loc:[loc]" - return /mob/proc/can_use_hands() if(handcuffed) diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm index c97e55fcf1d..4bc970cd00a 100644 --- a/code/modules/paperwork/pen.dm +++ b/code/modules/paperwork/pen.dm @@ -1,3 +1,14 @@ +/* Pens! + * Contains: + * Pens + * Sleepy Pens + * Parapens + */ + + +/* + * Pens + */ /obj/item/weapon/pen desc = "It's a normal black ink pen." name = "pen" @@ -32,4 +43,69 @@ /obj/item/weapon/pen/invisble desc = "It's an invisble pen marker." icon_state = "pen" - colour = "white" \ No newline at end of file + colour = "white" + + +/obj/item/weapon/pen/attack(mob/M as mob, mob/user as mob) + if(!ismob(M)) + return + user << "\red You stab [M] with the pen." + M << "\red You feel a tiny prick!" + M.attack_log += text("\[[time_stamp()]\] Has been stabbed with [src.name] by [user.name] ([user.ckey])") + user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to stab [M.name] ([M.ckey])") + + log_attack("[user.name] ([user.ckey]) Used the [src.name] to stab [M.name] ([M.ckey])") + return + +/* + * Sleepy Pens + */ +/obj/item/weapon/pen/sleepypen + origin_tech = "syndicate=5" + +/obj/item/weapon/pen/sleepypen/attack_paw(mob/user as mob) + return src.attack_hand(user) + return + +/obj/item/weapon/pen/sleepypen/New() + var/datum/reagents/R = new/datum/reagents(30) //Used to be 300 + reagents = R + R.my_atom = src + R.add_reagent("chloralhydrate", 22) //Used to be 100 sleep toxin//30 Chloral seems to be fatal, reducing it to 22./N + ..() + return + +/obj/item/weapon/pen/sleepypen/attack(mob/M as mob, mob/user as mob) + if(!(istype(M,/mob))) + return + ..() + if(reagents.total_volume) + if(M.reagents) reagents.trans_to(M, 50) //used to be 150 + return + + +/* + * Parapens + */ + +/obj/item/weapon/pen/paralysis/attack_paw(mob/user as mob) + return src.attack_hand(user) + return + +/obj/item/weapon/pen/paralysis/attack(mob/M as mob, mob/user as mob) + if(!(istype(M,/mob))) + return + ..() + if(reagents.total_volume) + if(M.reagents) reagents.trans_to(M, 50) + return + +/obj/item/weapon/pen/paralysis/New() + var/datum/reagents/R = new/datum/reagents(50) + reagents = R + R.my_atom = src + R.add_reagent("zombiepowder", 10) + R.add_reagent("impedrezene", 25) + R.add_reagent("cryptobiolin", 15) + ..() + return \ No newline at end of file diff --git a/code/modules/paperwork/stamps.dm b/code/modules/paperwork/stamps.dm index 4cd63355be1..4156813d8f7 100644 --- a/code/modules/paperwork/stamps.dm +++ b/code/modules/paperwork/stamps.dm @@ -52,4 +52,8 @@ /obj/item/weapon/stamp/clown name = "clown's rubber stamp" icon_state = "stamp-clown" - color = "clown" \ No newline at end of file + color = "clown" + + +/obj/item/weapon/stamp/attack_paw(mob/user as mob) + return src.attack_hand(user) \ No newline at end of file diff --git a/code/setup.dm b/code/setup.dm index 5ff4efb87ad..295f66fadf7 100644 --- a/code/setup.dm +++ b/code/setup.dm @@ -485,6 +485,10 @@ var/list/liftable_structures = list(\ #define INVISIBILITY_MAXIMUM 100 +//Object specific defines +#define CANDLE_LUM 3 //For how bright candles are + + //Some mob defines below #define AI_CAMERA_LUMINOSITY 6 diff --git a/tgstation.dme b/tgstation.dme index 497d00938a6..2b8298fc560 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -67,6 +67,7 @@ #define FILE_DIR "code/game/objects/items/devices" #define FILE_DIR "code/game/objects/items/devices/PDA" #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/weapons" #define FILE_DIR "code/game/objects/items/weapons/grenades" @@ -117,6 +118,7 @@ #define FILE_DIR "code/modules/mob/living/carbon/alien/humanoid" #define FILE_DIR "code/modules/mob/living/carbon/alien/humanoid/caste" #define FILE_DIR "code/modules/mob/living/carbon/alien/larva" +#define FILE_DIR "code/modules/mob/living/carbon/alien/special" #define FILE_DIR "code/modules/mob/living/carbon/brain" #define FILE_DIR "code/modules/mob/living/carbon/human" #define FILE_DIR "code/modules/mob/living/carbon/metroid" @@ -579,15 +581,16 @@ #include "code\game\objects\empulse.dm" #include "code\game\objects\explosion.dm" #include "code\game\objects\explosion_recursive.dm" -#include "code\game\objects\facehugger.dm" #include "code\game\objects\items.dm" +#include "code\game\objects\objs.dm" #include "code\game\objects\structures.dm" #include "code\game\objects\weapons.dm" #include "code\game\objects\effects\aliens.dm" -#include "code\game\objects\effects\biomass.dm" +#include "code\game\objects\effects\biomass_rift.dm" #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\manifest.dm" #include "code\game\objects\effects\mines.dm" #include "code\game\objects\effects\portals.dm" #include "code\game\objects\effects\signs.dm" @@ -595,17 +598,13 @@ #include "code\game\objects\effects\decals\contraband.dm" #include "code\game\objects\effects\decals\crayon.dm" #include "code\game\objects\effects\spawners\bombspawner.dm" +#include "code\game\objects\effects\spawners\gibspawner.dm" #include "code\game\objects\items\apc_frame.dm" #include "code\game\objects\items\blueprints.dm" #include "code\game\objects\items\bodybag.dm" #include "code\game\objects\items\candle.dm" #include "code\game\objects\items\crayons.dm" -#include "code\game\objects\items\helper_procs.dm" -#include "code\game\objects\items\item.dm" -#include "code\game\objects\items\robot_items.dm" -#include "code\game\objects\items\robot_parts.dm" -#include "code\game\objects\items\robot_upgrades.dm" -#include "code\game\objects\items\shock_kit.dm" +#include "code\game\objects\items\latexballoon.dm" #include "code\game\objects\items\shooting_range.dm" #include "code\game\objects\items\tk_grab.dm" #include "code\game\objects\items\trash.dm" @@ -634,19 +633,26 @@ #include "code\game\objects\items\devices\radio\headset.dm" #include "code\game\objects\items\devices\radio\intercom.dm" #include "code\game\objects\items\devices\radio\radio.dm" +#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\metal.dm" #include "code\game\objects\items\stacks\minerals.dm" #include "code\game\objects\items\stacks\stack.dm" #include "code\game\objects\items\stacks\wood.dm" #include "code\game\objects\items\weapons\AI_modules.dm" +#include "code\game\objects\items\weapons\Bedsheets.dm" #include "code\game\objects\items\weapons\cameras.dm" #include "code\game\objects\items\weapons\cards_ids.dm" #include "code\game\objects\items\weapons\cigs_lighters.dm" #include "code\game\objects\items\weapons\clown_items.dm" +#include "code\game\objects\items\weapons\dice.dm" #include "code\game\objects\items\weapons\dna_injector.dm" #include "code\game\objects\items\weapons\explosives.dm" +#include "code\game\objects\items\weapons\extinguisher.dm" #include "code\game\objects\items\weapons\flamethrower.dm" +#include "code\game\objects\items\weapons\handcuffs.dm" #include "code\game\objects\items\weapons\hydroponics.dm" #include "code\game\objects\items\weapons\kitchen.dm" #include "code\game\objects\items\weapons\manuals.dm" @@ -658,6 +664,8 @@ #include "code\game\objects\items\weapons\plant_bag.dm" #include "code\game\objects\items\weapons\RCD.dm" #include "code\game\objects\items\weapons\RSF.dm" +#include "code\game\objects\items\weapons\scrolls.dm" +#include "code\game\objects\items\weapons\spray.dm" #include "code\game\objects\items\weapons\stunbaton.dm" #include "code\game\objects\items\weapons\stungloves.dm" #include "code\game\objects\items\weapons\surgery_tools.dm" @@ -667,6 +675,7 @@ #include "code\game\objects\items\weapons\tiles_wires.dm" #include "code\game\objects\items\weapons\toilets.dm" #include "code\game\objects\items\weapons\tools.dm" +#include "code\game\objects\items\weapons\trashbag.dm" #include "code\game\objects\items\weapons\twohanded.dm" #include "code\game\objects\items\weapons\wrappingpaper.dm" #include "code\game\objects\items\weapons\grenades\chem_grenade.dm" @@ -806,6 +815,7 @@ #include "code\modules\assembly\igniter.dm" #include "code\modules\assembly\infrared.dm" #include "code\modules\assembly\proximity.dm" +#include "code\modules\assembly\shock_kit.dm" #include "code\modules\assembly\signaler.dm" #include "code\modules\assembly\timer.dm" #include "code\modules\client\client defines.dm" @@ -937,7 +947,9 @@ #include "code\modules\mob\living\carbon\alien\larva\life.dm" #include "code\modules\mob\living\carbon\alien\larva\powers.dm" #include "code\modules\mob\living\carbon\alien\larva\update_icons.dm" +#include "code\modules\mob\living\carbon\alien\special\facehugger.dm" #include "code\modules\mob\living\carbon\brain\brain.dm" +#include "code\modules\mob\living\carbon\brain\brain_item.dm" #include "code\modules\mob\living\carbon\brain\death.dm" #include "code\modules\mob\living\carbon\brain\emote.dm" #include "code\modules\mob\living\carbon\brain\hud.dm"