- Removed support for the ONBACK and ONBELT flags.

- Replaced them with a whole range of inventory slot flags. These now govern whether an item can or can't be placed in a certain inventory slot. See setup.dm for information on the flags. These flags only affect humans tho, as humans are the only beings with an inventory to talk of.
- Standardized some gun code and some other pieces of code as I came accross them. I hate indented variable definitions!

This commit should not bring any change whatsoever to the game from a player's perspective.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3659 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
baloh.matevz@gmail.com
2012-05-25 07:38:36 +00:00
parent 82177ceceb
commit 18ccabb33a
56 changed files with 537 additions and 430 deletions

View File

@@ -316,7 +316,8 @@ A list of items and costs is stored under the datum of every game mode, alongsid
var/temp = null //Temporary storage area for a message offering the option to destroy the radio var/temp = null //Temporary storage area for a message offering the option to destroy the radio
var/selfdestruct = 0 //Set to 1 while the radio is self destructing itself. var/selfdestruct = 0 //Set to 1 while the radio is self destructing itself.
var/obj/item/device/radio/origradio = null var/obj/item/device/radio/origradio = null
flags = FPRINT | TABLEPASS | CONDUCT | ONBELT flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = SLOT_BELT
w_class = 2.0 w_class = 2.0
item_state = "radio" item_state = "radio"
throwforce = 5 throwforce = 5

View File

@@ -286,6 +286,7 @@
var/hitsound = null var/hitsound = null
var/w_class = 3.0 var/w_class = 3.0
flags = FPRINT | TABLEPASS flags = FPRINT | TABLEPASS
var/slot_flags = 0 //This is used to determine on which slots an item can fit.
pass_flags = PASSTABLE pass_flags = PASSTABLE
pressure_resistance = 50 pressure_resistance = 50
// causeerrorheresoifixthis // causeerrorheresoifixthis

View File

@@ -4,6 +4,7 @@
name = "ears" name = "ears"
w_class = 1.0 w_class = 1.0
throwforce = 2 throwforce = 2
slot_flags = SLOT_EARS
/obj/item/clothing/ears/earmuffs /obj/item/clothing/ears/earmuffs
name = "earmuffs" name = "earmuffs"

View File

@@ -12,6 +12,7 @@
var/wired = 0 var/wired = 0
var/obj/item/weapon/cell/cell = 0 var/obj/item/weapon/cell/cell = 0
body_parts_covered = HANDS body_parts_covered = HANDS
slot_flags = SLOT_GLOVES
/obj/item/clothing/gloves/boxing /obj/item/clothing/gloves/boxing

View File

@@ -4,6 +4,7 @@
icon = 'hats.dmi' icon = 'hats.dmi'
body_parts_covered = HEAD body_parts_covered = HEAD
var/list/allowed = list() var/list/allowed = list()
slot_flags = SLOT_HEAD
/obj/item/clothing/head/cakehat /obj/item/clothing/head/cakehat
name = "cake-hat" name = "cake-hat"

View File

@@ -8,6 +8,7 @@
heat_transfer_coefficient = 0.30 heat_transfer_coefficient = 0.30
permeability_coefficient = 0.90 permeability_coefficient = 0.90
flags = FPRINT | TABLEPASS | ONESIZEFITSALL flags = FPRINT | TABLEPASS | ONESIZEFITSALL
slot_flags = SLOT_ICLOTHING
var/has_sensor = 1//For the crew computer 2 = unable to change mode var/has_sensor = 1//For the crew computer 2 = unable to change mode
var/sensor_mode = 0 var/sensor_mode = 0
/* /*

View File

@@ -7,7 +7,7 @@
icon = 'masks.dmi' icon = 'masks.dmi'
body_parts_covered = HEAD body_parts_covered = HEAD
armor = list(melee = 0, bullet = 0, laser = 2,energy = 2, bomb = 0, bio = 0, rad = 0) armor = list(melee = 0, bullet = 0, laser = 2,energy = 2, bomb = 0, bio = 0, rad = 0)
slot_flags = SLOT_MASK
/obj/item/clothing/mask/breath /obj/item/clothing/mask/breath
desc = "A close-fitting mask that can be connected to an air supply." desc = "A close-fitting mask that can be connected to an air supply."

View File

@@ -5,6 +5,7 @@
gender = PLURAL //Carn: for grammarically correct text-parsing gender = PLURAL //Carn: for grammarically correct text-parsing
body_parts_covered = FEET body_parts_covered = FEET
slot_flags = SLOT_FEET
protective_temperature = 500 protective_temperature = 500
heat_transfer_coefficient = 0.10 heat_transfer_coefficient = 0.10

View File

@@ -296,7 +296,8 @@
icon = 'weapons.dmi' icon = 'weapons.dmi'
icon_state = "baton" icon_state = "baton"
item_state = "classic_baton" item_state = "classic_baton"
flags = FPRINT | ONBELT | TABLEPASS flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
force = 10 force = 10
/obj/item/clothing/under/pirate /obj/item/clothing/under/pirate

View File

@@ -1844,7 +1844,8 @@
name = "bottle of Plant-B-Gone" name = "bottle of Plant-B-Gone"
icon_state = "plantbgone" icon_state = "plantbgone"
item_state = "plantbgone" item_state = "plantbgone"
flags = ONBELT|TABLEPASS|OPENCONTAINER|FPRINT|USEDELAY flags = TABLEPASS | OPENCONTAINER | FPRINT | USEDELAY
slot_flags = SLOT_BELT
throwforce = 3 throwforce = 3
w_class = 2.0 w_class = 2.0
throw_speed = 2 throw_speed = 2
@@ -1858,7 +1859,8 @@
name = "weed-spray" name = "weed-spray"
icon_state = "weedspray" icon_state = "weedspray"
item_state = "spray" item_state = "spray"
flags = ONBELT|TABLEPASS|OPENCONTAINER|FPRINT|USEDELAY flags = TABLEPASS | OPENCONTAINER | FPRINT | USEDELAY
slot_flags = SLOT_BELT
throwforce = 4 throwforce = 4
w_class = 2.0 w_class = 2.0
throw_speed = 2 throw_speed = 2
@@ -1872,7 +1874,8 @@
name = "pest-spray" name = "pest-spray"
icon_state = "pestspray" icon_state = "pestspray"
item_state = "spray" item_state = "spray"
flags = ONBELT|TABLEPASS|OPENCONTAINER|FPRINT|USEDELAY flags = TABLEPASS | OPENCONTAINER | FPRINT | USEDELAY
slot_flags = SLOT_BELT
throwforce = 4 throwforce = 4
w_class = 2.0 w_class = 2.0
throw_speed = 2 throw_speed = 2

View File

@@ -129,7 +129,8 @@
icon = 'gun.dmi' icon = 'gun.dmi'
icon_state = "revolver" icon_state = "revolver"
item_state = "gun" item_state = "gun"
flags = FPRINT | TABLEPASS | CONDUCT | ONBELT | USEDELAY flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
slot_flags = SLOT_BELT
w_class = 3.0 w_class = 3.0
g_amt = 10 g_amt = 10
m_amt = 10 m_amt = 10

View File

@@ -10,7 +10,8 @@
desc = "A shield adept at blocking blunt objects from connecting with the torso of the shield wielder." desc = "A shield adept at blocking blunt objects from connecting with the torso of the shield wielder."
icon = 'weapons.dmi' icon = 'weapons.dmi'
icon_state = "riot" icon_state = "riot"
flags = FPRINT | TABLEPASS| CONDUCT| ONBACK flags = FPRINT | TABLEPASS| CONDUCT
slot_flags = SLOT_BACK
force = 5.0 force = 5.0
throwforce = 5.0 throwforce = 5.0
throw_speed = 1 throw_speed = 1
@@ -29,7 +30,8 @@
desc = "A rod of pure obsidian, its very presence disrupts and dampens the powers of Nar-Sie's followers." desc = "A rod of pure obsidian, its very presence disrupts and dampens the powers of Nar-Sie's followers."
icon_state = "nullrod" icon_state = "nullrod"
item_state = "nullrod" item_state = "nullrod"
flags = FPRINT | ONBELT | TABLEPASS flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
force = 15 force = 15
throw_speed = 1 throw_speed = 1
throw_range = 4 throw_range = 4
@@ -41,7 +43,8 @@
desc = "This thing is so unspeakably shitty you are having a hard time even holding it." desc = "This thing is so unspeakably shitty you are having a hard time even holding it."
icon_state = "sord" icon_state = "sord"
item_state = "sord" item_state = "sord"
flags = FPRINT | ONBELT | TABLEPASS flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
force = 2 force = 2
throwforce = 1 throwforce = 1
w_class = 3 w_class = 3
@@ -51,7 +54,8 @@
desc = "What are you standing around staring at this for? Get to killing!" desc = "What are you standing around staring at this for? Get to killing!"
icon_state = "claymore" icon_state = "claymore"
item_state = "claymore" item_state = "claymore"
flags = FPRINT | ONBELT | TABLEPASS flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
force = 40 force = 40
throwforce = 10 throwforce = 10
w_class = 3 w_class = 3
@@ -165,7 +169,8 @@
icon_state = "spectrometer" icon_state = "spectrometer"
item_state = "analyzer" item_state = "analyzer"
w_class = 2.0 w_class = 2.0
flags = FPRINT | TABLEPASS| CONDUCT | ONBELT | OPENCONTAINER flags = FPRINT | TABLEPASS| CONDUCT | OPENCONTAINER
slot_flags = SLOT_BELT
throwforce = 5 throwforce = 5
throw_speed = 4 throw_speed = 4
throw_range = 20 throw_range = 20
@@ -187,7 +192,8 @@
desc = "A stun baton for hitting people with." desc = "A stun baton for hitting people with."
icon_state = "stunbaton" icon_state = "stunbaton"
item_state = "baton" item_state = "baton"
flags = FPRINT | ONBELT | TABLEPASS flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
force = 10 force = 10
throwforce = 7 throwforce = 7
w_class = 3 w_class = 3
@@ -201,7 +207,8 @@
desc = "The Captain is first and all other heads are last." desc = "The Captain is first and all other heads are last."
icon_state = "chainofcommand" icon_state = "chainofcommand"
item_state = "chainofcommand" item_state = "chainofcommand"
flags = FPRINT | ONBELT | TABLEPASS flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
force = 10 force = 10
throwforce = 7 throwforce = 7
w_class = 3 w_class = 3
@@ -483,6 +490,7 @@
item_state = "card-id" item_state = "card-id"
var/access = list() var/access = list()
var/registered_name = null // The name registered_name on the card var/registered_name = null // The name registered_name on the card
slot_flags = SLOT_ID
var/assignment = null var/assignment = null
var/dorm = 0 // determines if this ID has claimed a dorm already var/dorm = 0 // determines if this ID has claimed a dorm already
@@ -547,7 +555,8 @@
throw_range = 5 throw_range = 5
m_amt = 50 m_amt = 50
g_amt = 20 g_amt = 20
flags = TABLEPASS|USEDELAY|FPRINT|CONDUCT | ONBELT flags = TABLEPASS | USEDELAY | FPRINT | CONDUCT
slot_flags = SLOT_BELT
item_state = "coil_red" item_state = "coil_red"
/obj/item/weapon/cable_coil/cut /obj/item/weapon/cable_coil/cut
@@ -576,7 +585,8 @@
desc = "Used to hit floors" desc = "Used to hit floors"
icon = 'items.dmi' icon = 'items.dmi'
icon_state = "crowbar" icon_state = "crowbar"
flags = FPRINT | TABLEPASS| CONDUCT | ONBELT flags = FPRINT | TABLEPASS| CONDUCT
slot_flags = SLOT_BELT
force = 5.0 force = 5.0
throwforce = 7.0 throwforce = 7.0
item_state = "wrench" item_state = "wrench"
@@ -734,7 +744,8 @@
gender = PLURAL gender = PLURAL
icon = 'items.dmi' icon = 'items.dmi'
icon_state = "handcuff" icon_state = "handcuff"
flags = FPRINT | TABLEPASS | CONDUCT | ONBELT flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = SLOT_BELT
throwforce = 5 throwforce = 5
w_class = 2.0 w_class = 2.0
throw_speed = 2 throw_speed = 2
@@ -833,7 +844,8 @@
name = "banhammer" name = "banhammer"
icon = 'items.dmi' icon = 'items.dmi'
icon_state = "toyhammer" icon_state = "toyhammer"
flags = FPRINT | ONBELT | TABLEPASS flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
throwforce = 0 throwforce = 0
w_class = 1.0 w_class = 1.0
throw_speed = 7 throw_speed = 7
@@ -841,12 +853,14 @@
/obj/item/weapon/pen/sleepypen /obj/item/weapon/pen/sleepypen
desc = "It's a normal black ink pen with a sharp point and a carefully engraved \"Waffle Co.\"" desc = "It's a normal black ink pen with a sharp point and a carefully engraved \"Waffle Co.\""
flags = FPRINT | ONBELT | TABLEPASS | OPENCONTAINER flags = FPRINT | TABLEPASS | OPENCONTAINER
slot_flags = SLOT_BELT
origin_tech = "materials=2;biotech=1;syndicate=7" origin_tech = "materials=2;biotech=1;syndicate=7"
/obj/item/weapon/pen/paralysis /obj/item/weapon/pen/paralysis
desc = "It's a normal black ink pen with a sharp point." desc = "It's a normal black ink pen with a sharp point."
flags = FPRINT | ONBELT | TABLEPASS | OPENCONTAINER flags = FPRINT | TABLEPASS | OPENCONTAINER
slot_flags = SLOT_BELT
origin_tech = "materials=2;biotech=1;syndicate=5" origin_tech = "materials=2;biotech=1;syndicate=5"
/obj/item/weapon/rack_parts /obj/item/weapon/rack_parts
@@ -870,7 +884,8 @@
desc = "You can be totally screwwy with this." desc = "You can be totally screwwy with this."
icon = 'items.dmi' icon = 'items.dmi'
icon_state = "screwdriver" icon_state = "screwdriver"
flags = FPRINT | TABLEPASS| CONDUCT | ONBELT flags = FPRINT | TABLEPASS| CONDUCT
slot_flags = SLOT_BELT
force = 5.0 force = 5.0
w_class = 1.0 w_class = 1.0
throwforce = 5.0 throwforce = 5.0
@@ -919,7 +934,8 @@
var/selfdestruct = 0.0 var/selfdestruct = 0.0
var/traitor_frequency = 0.0 var/traitor_frequency = 0.0
var/obj/item/device/radio/origradio = null var/obj/item/device/radio/origradio = null
flags = FPRINT | TABLEPASS| CONDUCT | ONBELT flags = FPRINT | TABLEPASS| CONDUCT
slot_flags = SLOT_BELT
item_state = "radio" item_state = "radio"
throwforce = 5 throwforce = 5
w_class = 2.0 w_class = 2.0

View File

@@ -2,7 +2,8 @@
name = "GPS" name = "GPS"
icon = 'device.dmi' icon = 'device.dmi'
icon_state = "pinoff" icon_state = "pinoff"
flags = FPRINT | TABLEPASS| CONDUCT | ONBELT flags = FPRINT | TABLEPASS| CONDUCT
slot_flags = SLOT_BELT
w_class = 2.0 w_class = 2.0
item_state = "electronic" item_state = "electronic"
throw_speed = 4 throw_speed = 4

View File

@@ -11,7 +11,8 @@
item_state = "flashbang" item_state = "flashbang"
throw_speed = 4 throw_speed = 4
throw_range = 20 throw_range = 20
flags = FPRINT | TABLEPASS | ONBELT | USEDELAY flags = FPRINT | TABLEPASS | USEDELAY
slot_flags = SLOT_BELT
var/datum/effect/effect/system/bad_smoke_spread/smoke var/datum/effect/effect/system/bad_smoke_spread/smoke
/obj/item/weapon/mustardbomb /obj/item/weapon/mustardbomb
@@ -25,7 +26,8 @@
item_state = "flashbang" item_state = "flashbang"
throw_speed = 4 throw_speed = 4
throw_range = 20 throw_range = 20
flags = FPRINT | TABLEPASS | CONDUCT | ONBELT flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = SLOT_BELT
var/datum/effect/effect/system/mustard_gas_spread/mustard_gas var/datum/effect/effect/system/mustard_gas_spread/mustard_gas
/obj/item/weapon/smokebomb/New() /obj/item/weapon/smokebomb/New()

View File

@@ -3,7 +3,8 @@
desc = "An arcane weapon wielded by the followers of Nar-Sie" desc = "An arcane weapon wielded by the followers of Nar-Sie"
icon_state = "cultblade" icon_state = "cultblade"
item_state = "cultblade" item_state = "cultblade"
flags = FPRINT | ONBELT | TABLEPASS flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
force = 40 force = 40
throwforce = 10 throwforce = 10

View File

@@ -2,7 +2,8 @@
name = "pinpointer" name = "pinpointer"
icon = 'device.dmi' icon = 'device.dmi'
icon_state = "pinoff" icon_state = "pinoff"
flags = FPRINT | TABLEPASS| CONDUCT | ONBELT flags = FPRINT | TABLEPASS| CONDUCT
slot_flags = SLOT_BELT
w_class = 2.0 w_class = 2.0
item_state = "electronic" item_state = "electronic"
throw_speed = 4 throw_speed = 4

View File

@@ -5,7 +5,8 @@
item_state = "electronic" item_state = "electronic"
desc = "A fragment of the legendary treasure known simply as the 'Soul Stone'. The shard still flickers with a fraction of the full artefacts power." desc = "A fragment of the legendary treasure known simply as the 'Soul Stone'. The shard still flickers with a fraction of the full artefacts power."
w_class = 1.0 w_class = 1.0
flags = FPRINT | TABLEPASS | ONBELT flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
origin_tech = "bluespace=4;materials=4" origin_tech = "bluespace=4;materials=4"
var/imprinted = "empty" var/imprinted = "empty"

View File

@@ -8,7 +8,8 @@
icon_state = "pda" icon_state = "pda"
item_state = "electronic" item_state = "electronic"
w_class = 1.0 w_class = 1.0
flags = FPRINT | TABLEPASS | ONBELT flags = FPRINT | TABLEPASS
slot_flags = SLOT_ID | SLOT_BELT
//Main variables //Main variables
var/owner = null var/owner = null

View File

@@ -4,7 +4,8 @@
icon_state = "aicard" // aicard-full icon_state = "aicard" // aicard-full
item_state = "electronic" item_state = "electronic"
w_class = 2.0 w_class = 2.0
flags = FPRINT | TABLEPASS | ONBELT flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
var/flush = null var/flush = null
origin_tech = "programming=4;materials=4" origin_tech = "programming=4;materials=4"

View File

@@ -42,7 +42,8 @@
/obj/item/device/chameleon /obj/item/device/chameleon
name = "chameleon-projector" name = "chameleon-projector"
icon_state = "shield0" icon_state = "shield0"
flags = FPRINT | TABLEPASS| CONDUCT | USEDELAY | ONBELT flags = FPRINT | TABLEPASS| CONDUCT | USEDELAY
slot_flags = SLOT_BELT
item_state = "electronic" item_state = "electronic"
throwforce = 5.0 throwforce = 5.0
throw_speed = 1 throw_speed = 1

View File

@@ -4,14 +4,14 @@
icon_state = "flight0" icon_state = "flight0"
w_class = 2 w_class = 2
item_state = "flight" item_state = "flight"
flags = FPRINT | ONBELT | TABLEPASS | CONDUCT flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = SLOT_BELT
m_amt = 50 m_amt = 50
g_amt = 20 g_amt = 20
var var/on = 0
on = 0 var/brightness_on = 4 //luminosity when on
brightness_on = 4 //luminosity when on var/icon_on = "flight1"
icon_on = "flight1" var/icon_off = "flight0"
icon_off = "flight0"
/obj/item/device/flashlight/initialize() /obj/item/device/flashlight/initialize()
..() ..()

View File

@@ -4,7 +4,8 @@
icon_state = "pai" icon_state = "pai"
item_state = "electronic" item_state = "electronic"
w_class = 2.0 w_class = 2.0
flags = FPRINT | TABLEPASS | ONBELT flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
origin_tech = "programming=2" origin_tech = "programming=2"
var/obj/item/device/radio/radio var/obj/item/device/radio/radio
var/looking_for_personality = 0 var/looking_for_personality = 0

View File

@@ -14,7 +14,8 @@ MASS SPECTROMETER
desc = "A terahertz-ray emitter and scanner used to detect underfloor objects such as cables and pipes." desc = "A terahertz-ray emitter and scanner used to detect underfloor objects such as cables and pipes."
icon_state = "t-ray0" icon_state = "t-ray0"
var/on = 0 var/on = 0
flags = FPRINT|ONBELT|TABLEPASS flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
w_class = 2 w_class = 2
item_state = "electronic" item_state = "electronic"
m_amt = 150 m_amt = 150
@@ -64,7 +65,8 @@ MASS SPECTROMETER
icon_state = "health" icon_state = "health"
item_state = "analyzer" item_state = "analyzer"
desc = "A hand-held body scanner able to distinguish vital signs of the subject." desc = "A hand-held body scanner able to distinguish vital signs of the subject."
flags = FPRINT | ONBELT | TABLEPASS | CONDUCT flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = SLOT_BELT
throwforce = 3 throwforce = 3
w_class = 1.0 w_class = 1.0
throw_speed = 5 throw_speed = 5
@@ -146,7 +148,8 @@ MASS SPECTROMETER
icon_state = "atmos" icon_state = "atmos"
item_state = "analyzer" item_state = "analyzer"
w_class = 2.0 w_class = 2.0
flags = FPRINT | TABLEPASS| CONDUCT | ONBELT flags = FPRINT | TABLEPASS| CONDUCT
slot_flags = SLOT_BELT
throwforce = 5 throwforce = 5
throw_speed = 4 throw_speed = 4
throw_range = 20 throw_range = 20

View File

@@ -94,7 +94,8 @@
w_class = 1 w_class = 1
throwforce = 2 throwforce = 2
var/candlecount = 5 var/candlecount = 5
flags = ONBELT | TABLEPASS flags = TABLEPASS
slot_flags = SLOT_BELT
/obj/item/weapon/candlepack/update_icon() /obj/item/weapon/candlepack/update_icon()

View File

@@ -3,7 +3,8 @@
icon = 'robot_parts.dmi' icon = 'robot_parts.dmi'
item_state = "buildpipe" item_state = "buildpipe"
icon_state = "blank" icon_state = "blank"
flags = FPRINT | ONBELT | TABLEPASS | CONDUCT flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = SLOT_BELT
var/construction_time = 100 var/construction_time = 100
var/list/construction_cost = list("metal"=20000,"glass"=5000) var/list/construction_cost = list("metal"=20000,"glass"=5000)

View File

@@ -58,7 +58,8 @@
desc = "A heavy-duty, no fun allowed 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/mode = 1; //0 = pick one at a time, 1 = pick all on tile
var/capacity = 25; //the number of trash it can carry. var/capacity = 25; //the number of trash it can carry.
flags = FPRINT | TABLEPASS | ONBELT flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
w_class = 2.0 w_class = 2.0
/obj/item/weapon/trashbag/update_icon() /obj/item/weapon/trashbag/update_icon()

View File

@@ -56,7 +56,8 @@ ZIPPO
icon_state = "matchbox" icon_state = "matchbox"
item_state = "zippo" item_state = "zippo"
w_class = 1 w_class = 1
flags = ONBELT | TABLEPASS flags = TABLEPASS
slot_flags = SLOT_BELT
var/matchcount = 10 var/matchcount = 10
w_class = 1.0 w_class = 1.0
@@ -328,9 +329,9 @@ ZIPPO
item_state = "cigpacket" item_state = "cigpacket"
w_class = 1 w_class = 1
throwforce = 2 throwforce = 2
flags = ONBELT | TABLEPASS flags = TABLEPASS
var slot_flags = SLOT_BELT
cigcount = 6 var/cigcount = 6
update_icon() update_icon()
@@ -377,7 +378,8 @@ ZIPPO
var/icon_off = "lighter-g" var/icon_off = "lighter-g"
w_class = 1 w_class = 1
throwforce = 4 throwforce = 4
flags = ONBELT | TABLEPASS | CONDUCT flags = TABLEPASS | CONDUCT
slot_flags = SLOT_BELT
var/lit = 0 var/lit = 0
/obj/item/weapon/lighter/zippo /obj/item/weapon/lighter/zippo

View File

@@ -14,15 +14,17 @@ FLASHBANG
item_state = "emp" item_state = "emp"
throw_speed = 4 throw_speed = 4
throw_range = 20 throw_range = 20
flags = FPRINT | TABLEPASS | CONDUCT | ONBELT flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = SLOT_BELT
origin_tech = "materials=2;magnets=3" origin_tech = "materials=2;magnets=3"
var var/active = 0
active = 0 var/det_time = 50
det_time = 50
proc
prime()
clown_check(var/mob/living/user)
proc/prime()
return
proc/clown_check(var/mob/living/user)
return
afterattack(atom/target as mob|obj|turf|area, mob/user as mob) afterattack(atom/target as mob|obj|turf|area, mob/user as mob)
if (istype(target, /obj/item/weapon/storage)) return ..() // Trying to put it in a full container if (istype(target, /obj/item/weapon/storage)) return ..() // Trying to put it in a full container
@@ -88,17 +90,21 @@ FLASHBANG
item_state = "flashbang" item_state = "flashbang"
throw_speed = 4 throw_speed = 4
throw_range = 20 throw_range = 20
flags = FPRINT | TABLEPASS | CONDUCT | ONBELT flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = SLOT_BELT
origin_tech = "materials=2;combat=1" origin_tech = "materials=2;combat=1"
var var/active = 0
active = 0 var/det_time = 30
det_time = 30 var/banglet = 0
banglet = 0
proc
bang(var/turf/T , var/mob/living/carbon/M)
prime()
clown_check(var/mob/living/user)
proc/bang(var/turf/T , var/mob/living/carbon/M)
return
proc/prime()
return
proc/clown_check(var/mob/living/user)
return
attackby(obj/item/weapon/W as obj, mob/user as mob) attackby(obj/item/weapon/W as obj, mob/user as mob)
if (isscrewdriver(W)) if (isscrewdriver(W))

View File

@@ -4,7 +4,8 @@
name = "space cleaner" name = "space cleaner"
icon_state = "cleaner" icon_state = "cleaner"
item_state = "cleaner" item_state = "cleaner"
flags = ONBELT|TABLEPASS|OPENCONTAINER|FPRINT|USEDELAY flags = TABLEPASS|OPENCONTAINER|FPRINT|USEDELAY
slot_flags = SLOT_BELT
throwforce = 3 throwforce = 3
w_class = 2.0 w_class = 2.0
throw_speed = 2 throw_speed = 2
@@ -101,7 +102,8 @@
name = "chem sprayer" name = "chem sprayer"
icon_state = "chemsprayer" icon_state = "chemsprayer"
item_state = "chemsprayer" item_state = "chemsprayer"
flags = ONBELT|TABLEPASS|OPENCONTAINER|FPRINT|USEDELAY flags = TABLEPASS|OPENCONTAINER|FPRINT|USEDELAY
slot_flags = SLOT_BELT
throwforce = 3 throwforce = 3
w_class = 3.0 w_class = 3.0
throw_speed = 2 throw_speed = 2
@@ -203,7 +205,8 @@
name = "pepperspray" name = "pepperspray"
icon_state = "pepperspray" icon_state = "pepperspray"
item_state = "pepperspray" item_state = "pepperspray"
flags = ONBELT|TABLEPASS|FPRINT|USEDELAY flags = TABLEPASS|FPRINT|USEDELAY
slot_flags = SLOT_BELT
throwforce = 3 throwforce = 3
w_class = 2.0 w_class = 2.0
throw_speed = 2 throw_speed = 2

View File

@@ -7,7 +7,8 @@
name = "Plant Bag" name = "Plant Bag"
var/mode = 1; //0 = pick one at a time, 1 = pick all on tile var/mode = 1; //0 = pick one at a time, 1 = pick all on tile
var/capacity = 50; //the number of plant pieces it can carry. var/capacity = 50; //the number of plant pieces it can carry.
flags = FPRINT | TABLEPASS | ONBELT flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
w_class = 1 w_class = 1
/obj/item/weapon/plantbag/attack_self(mob/user as mob) /obj/item/weapon/plantbag/attack_self(mob/user as mob)

View File

@@ -13,7 +13,8 @@ WELDINGTOOOL
desc = "A wrench with common uses. Can be found in your hand." desc = "A wrench with common uses. Can be found in your hand."
icon = 'items.dmi' icon = 'items.dmi'
icon_state = "wrench" icon_state = "wrench"
flags = FPRINT | TABLEPASS| CONDUCT | ONBELT flags = FPRINT | TABLEPASS| CONDUCT
slot_flags = SLOT_BELT
force = 5.0 force = 5.0
throwforce = 7.0 throwforce = 7.0
w_class = 2.0 w_class = 2.0
@@ -44,7 +45,8 @@ WELDINGTOOOL
name = "Welding Tool" name = "Welding Tool"
icon = 'items.dmi' icon = 'items.dmi'
icon_state = "welder" icon_state = "welder"
flags = FPRINT | TABLEPASS| CONDUCT | ONBELT flags = FPRINT | TABLEPASS| CONDUCT
slot_flags = SLOT_BELT
force = 3.0 force = 3.0
throwforce = 5.0 throwforce = 5.0
throw_speed = 1 throw_speed = 1
@@ -288,7 +290,8 @@ WELDINGTOOOL
desc = "This cuts wires." desc = "This cuts wires."
icon = 'items.dmi' icon = 'items.dmi'
icon_state = "cutters" icon_state = "cutters"
flags = FPRINT | TABLEPASS| CONDUCT | ONBELT flags = FPRINT | TABLEPASS| CONDUCT
slot_flags = SLOT_BELT
force = 6.0 force = 6.0
throw_speed = 2 throw_speed = 2
throw_range = 9 throw_range = 9

View File

@@ -93,7 +93,7 @@
desc = "Truly, the weapon of a madman. Who would think to fight fire with an axe?" desc = "Truly, the weapon of a madman. Who would think to fight fire with an axe?"
force = 5 force = 5
w_class = 4.0 w_class = 4.0
flags = ONBACK slot_flags = SLOT_BACK
force_unwielded = 5 force_unwielded = 5
force_wielded = 18 force_wielded = 18

View File

@@ -55,7 +55,8 @@
item_state = "flashbang" item_state = "flashbang"
throw_speed = 4 throw_speed = 4
throw_range = 20 throw_range = 20
flags = FPRINT | TABLEPASS | CONDUCT | ONBELT flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = SLOT_BELT
/obj/item/weapon/firbang/afterattack(atom/target as mob|obj|turf|area, mob/user as mob) /obj/item/weapon/firbang/afterattack(atom/target as mob|obj|turf|area, mob/user as mob)
if (user.equipped() == src) if (user.equipped() == src)

View File

@@ -8,6 +8,7 @@
subspace_transmission = 1 subspace_transmission = 1
canhear_range = 1 // can't hear headsets from very far away canhear_range = 1 // can't hear headsets from very far away
slot_flags = SLOT_EARS
var/protective_temperature = 0 var/protective_temperature = 0
var/translate_binary = 0 var/translate_binary = 0
var/translate_hive = 0 var/translate_hive = 0

View File

@@ -4,7 +4,8 @@
icon = 'belts.dmi' icon = 'belts.dmi'
icon_state = "utilitybelt" icon_state = "utilitybelt"
item_state = "utility" item_state = "utility"
flags = FPRINT | TABLEPASS | ONBELT flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
proc/can_use() proc/can_use()

View File

@@ -5,7 +5,8 @@
var/datum/gas_mixture/air_contents = null var/datum/gas_mixture/air_contents = null
var/distribute_pressure = ONE_ATMOSPHERE var/distribute_pressure = ONE_ATMOSPHERE
flags = FPRINT | TABLEPASS | CONDUCT | ONBACK flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = SLOT_BACK
pressure_resistance = ONE_ATMOSPHERE*5 pressure_resistance = ONE_ATMOSPHERE*5

View File

@@ -2,7 +2,8 @@
name = "emergency oxygen tank" name = "emergency oxygen tank"
desc = "Used for emergencies. Contains very little oxygen, so try to conserve it until you actually need it." desc = "Used for emergencies. Contains very little oxygen, so try to conserve it until you actually need it."
icon_state = "emergency" icon_state = "emergency"
flags = FPRINT | TABLEPASS | ONBELT | CONDUCT flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = SLOT_BELT
w_class = 2.0 w_class = 2.0
force = 4.0 force = 4.0
distribute_pressure = ONE_ATMOSPHERE*O2STANDARD distribute_pressure = ONE_ATMOSPHERE*O2STANDARD

View File

@@ -22,7 +22,8 @@
var/affected_area = 3 var/affected_area = 3
throw_speed = 4 throw_speed = 4
throw_range = 20 throw_range = 20
flags = FPRINT | TABLEPASS | CONDUCT | ONBELT | USEDELAY flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
slot_flags = SLOT_BELT
New() New()
var/datum/reagents/R = new/datum/reagents(1000) var/datum/reagents/R = new/datum/reagents(1000)
reagents = R reagents = R
@@ -1227,7 +1228,8 @@
amount_per_transfer_from_this = 5 amount_per_transfer_from_this = 5
volume = 30 volume = 30
possible_transfer_amounts = null possible_transfer_amounts = null
flags = FPRINT | ONBELT | TABLEPASS | OPENCONTAINER flags = FPRINT | TABLEPASS | OPENCONTAINER
slot_flags = SLOT_BELT
/obj/item/weapon/reagent_containers/hypospray/attack_paw(mob/user as mob) /obj/item/weapon/reagent_containers/hypospray/attack_paw(mob/user as mob)
return src.attack_hand(user) return src.attack_hand(user)

View File

@@ -3,10 +3,10 @@
icon = 'glasses.dmi' icon = 'glasses.dmi'
w_class = 2.0 w_class = 2.0
flags = GLASSESCOVERSEYES flags = GLASSESCOVERSEYES
var slot_flags = SLOT_EYES
vision_flags = 0 var/vision_flags = 0
darkness_view = 0//Base human is 2 var/darkness_view = 0//Base human is 2
invisa_view = 0 var/invisa_view = 0
/* /*
SEE_SELF // can see self, no matter what SEE_SELF // can see self, no matter what

View File

@@ -5,3 +5,4 @@
flags = FPRINT | TABLEPASS | ONESIZEFITSALL flags = FPRINT | TABLEPASS | ONESIZEFITSALL
var/list/allowed = list(/obj/item/weapon/tank/emergency_oxygen) var/list/allowed = list(/obj/item/weapon/tank/emergency_oxygen)
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0) armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
slot_flags = SLOT_OCLOTHING

View File

@@ -157,7 +157,8 @@ proc/move_mining_shuttle()
name = "Miner's pickaxe" name = "Miner's pickaxe"
icon = 'items.dmi' icon = 'items.dmi'
icon_state = "pickaxe" icon_state = "pickaxe"
flags = FPRINT | TABLEPASS| CONDUCT | ONBELT flags = FPRINT | TABLEPASS| CONDUCT
slot_flags = SLOT_BELT
force = 15.0 force = 15.0
throwforce = 4.0 throwforce = 4.0
item_state = "pickaxe" item_state = "pickaxe"
@@ -241,7 +242,8 @@ proc/move_mining_shuttle()
name = "Shovel" name = "Shovel"
icon = 'items.dmi' icon = 'items.dmi'
icon_state = "shovel" icon_state = "shovel"
flags = FPRINT | TABLEPASS| CONDUCT | ONBELT flags = FPRINT | TABLEPASS| CONDUCT
slot_flags = SLOT_BELT
force = 8.0 force = 8.0
throwforce = 4.0 throwforce = 4.0
item_state = "shovel" item_state = "shovel"

View File

@@ -6,7 +6,8 @@
name = "Mining Satchel" name = "Mining Satchel"
var/mode = 1; //0 = pick one at a time, 1 = pick all on tile var/mode = 1; //0 = pick one at a time, 1 = pick all on tile
var/capacity = 50; //the number of ore pieces it can carry. var/capacity = 50; //the number of ore pieces it can carry.
flags = FPRINT | TABLEPASS | ONBELT flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
w_class = 1 w_class = 1
/obj/item/weapon/satchel/attack_self(mob/user as mob) /obj/item/weapon/satchel/attack_self(mob/user as mob)

View File

@@ -454,7 +454,7 @@
return return
if (!istype(W, /obj/item)) if (!istype(W, /obj/item))
return return
if (!( W.flags & ONBACK )) if (!( W.slot_flags & SLOT_BACK ))
return return
if(istype(W,/obj/item/weapon/twohanded) && W:wielded) if(istype(W,/obj/item/weapon/twohanded) && W:wielded)
usr << "<span class='warning'>Unwield the [initial(W.name)] first!</span>" usr << "<span class='warning'>Unwield the [initial(W.name)] first!</span>"
@@ -478,7 +478,9 @@
if (emptyHand) if (emptyHand)
wear_suit.DblClick() wear_suit.DblClick()
return return
if (!( istype(W, /obj/item/clothing/suit) )) if (!istype(W, /obj/item))
return
if (!( W.slot_flags & SLOT_OCLOTHING ))
return return
if (mutations & FAT && !(W.flags & ONESIZEFITSALL)) if (mutations & FAT && !(W.flags & ONESIZEFITSALL))
src << "\red You're too fat to wear the [W.name]!" src << "\red You're too fat to wear the [W.name]!"
@@ -491,7 +493,9 @@
if (emptyHand) if (emptyHand)
gloves.DblClick() gloves.DblClick()
return return
if (!( istype(W, /obj/item/clothing/gloves) )) if (!istype(W, /obj/item))
return
if (!( W.slot_flags & SLOT_GLOVES ))
return return
u_equip(W) u_equip(W)
gloves = W gloves = W
@@ -501,7 +505,9 @@
if (emptyHand) if (emptyHand)
shoes.DblClick() shoes.DblClick()
return return
if (!( istype(W, /obj/item/clothing/shoes) )) if (!istype(W, /obj/item))
return
if (!( W.slot_flags & SLOT_FEET ))
return return
u_equip(W) u_equip(W)
shoes = W shoes = W
@@ -511,7 +517,9 @@
if (emptyHand) if (emptyHand)
belt.DblClick() belt.DblClick()
return return
if (!W || !W.flags || !( W.flags & ONBELT )) if (!istype(W, /obj/item))
return
if (!( W.slot_flags & SLOT_BELT ))
return return
u_equip(W) u_equip(W)
belt = W belt = W
@@ -521,7 +529,9 @@
if (emptyHand) if (emptyHand)
glasses.DblClick() glasses.DblClick()
return return
if (!( istype(W, /obj/item/clothing/glasses) )) if (!istype(W, /obj/item))
return
if (!( W.slot_flags & SLOT_EYES ))
return return
u_equip(W) u_equip(W)
glasses = W glasses = W
@@ -531,10 +541,9 @@
if (emptyHand) if (emptyHand)
head.DblClick() head.DblClick()
return return
if (( istype(W, /obj/item/weapon/paper) )) if (!istype(W, /obj/item))
u_equip(W) return
head = W if (!( W.slot_flags & SLOT_HEAD ))
else if (!( istype(W, /obj/item/clothing/head) ))
return return
u_equip(W) u_equip(W)
head = W head = W
@@ -550,7 +559,9 @@
if (emptyHand) if (emptyHand)
ears.DblClick() ears.DblClick()
return return
if (!( istype(W, /obj/item/clothing/ears) ) && !( istype(W, /obj/item/device/radio/headset) )) if (!istype(W, /obj/item))
return
if (!( W.slot_flags & SLOT_EARS ))
return return
u_equip(W) u_equip(W)
ears = W ears = W
@@ -560,7 +571,9 @@
if (emptyHand) if (emptyHand)
w_uniform.DblClick() w_uniform.DblClick()
return return
if (!( istype(W, /obj/item/clothing/under) )) if (!istype(W, /obj/item))
return
if (!( W.slot_flags & SLOT_ICLOTHING ))
return return
if (mutations & FAT && !(W.flags & ONESIZEFITSALL)) if (mutations & FAT && !(W.flags & ONESIZEFITSALL))
src << "\red You're too fat to wear the [W.name]!" src << "\red You're too fat to wear the [W.name]!"
@@ -575,7 +588,9 @@
return return
if (!w_uniform) if (!w_uniform)
return return
if (!istype(W, /obj/item/weapon/card/id) && !istype(W, /obj/item/device/pda) ) if (!istype(W, /obj/item))
return
if (!( W.slot_flags & SLOT_ID ))
return return
u_equip(W) u_equip(W)
wear_id = W wear_id = W
@@ -585,19 +600,25 @@
if (emptyHand) if (emptyHand)
l_store.DblClick() l_store.DblClick()
return return
if ((!( istype(W, /obj/item) ) || W.w_class > 2 || !( w_uniform ))) if (!istype(W, /obj/item))
return return
u_equip(W) if ( ( W.slot_flags & SLOT_DENYPOCKET ) )
l_store = W return
if ( W.w_class <= 2 || ( W.slot_flags & SLOT_POCKET ) )
u_equip(W)
l_store = W
if("storage2") if("storage2")
if (r_store) if (r_store)
if (emptyHand) if (emptyHand)
r_store.DblClick() r_store.DblClick()
return return
if ((!( istype(W, /obj/item) ) || W.w_class > 2 || !( w_uniform ))) if (!istype(W, /obj/item))
return return
u_equip(W) if ( ( W.slot_flags & SLOT_DENYPOCKET ) )
r_store = W return
if ( W.w_class <= 2 || ( W.slot_flags & SLOT_POCKET ) )
u_equip(W)
r_store = W
if("suit storage") if("suit storage")
if (s_store) if (s_store)
if (emptyHand) if (emptyHand)

View File

@@ -9,7 +9,8 @@
throw_range = 10 throw_range = 10
var/obj/item/weapon/pen/haspen //The stored pen. var/obj/item/weapon/pen/haspen //The stored pen.
var/obj/item/weapon/paper/toppaper //The topmost piece of paper. var/obj/item/weapon/paper/toppaper //The topmost piece of paper.
flags = FPRINT | TABLEPASS | ONBELT flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT
pressure_resistance = 10 pressure_resistance = 10
/obj/item/weapon/clipboard/New() /obj/item/weapon/clipboard/New()

View File

@@ -9,279 +9,276 @@
throw_range = 15 throw_range = 15
layer = 4 layer = 4
pressure_resistance = 1 pressure_resistance = 1
slot_flags = SLOT_HEAD
var var/info //What's actually written on the paper.
info //What's actually written on the paper. var/info_links //A different version of the paper which includes html links at fields and EOF
info_links //A different version of the paper which includes html links at fields and EOF var/stamps //The (text for the) stamps on the paper.
stamps //The (text for the) stamps on the paper. var/fields //Amount of user created fields
fields //Amount of user created fields var/list/stamped
list/stamped var/see_face = 1
see_face = 1 var/body_parts_covered = HEAD
body_parts_covered = HEAD var/protective_temperature = 0
protective_temperature = 0 var/rigged = 0
rigged = 0 var/spam_flag = 0
spam_flag = 0
const var/const/deffont = "Verdana"
deffont = "Verdana" var/const/signfont = "Times New Roman"
signfont = "Times New Roman" var/const/crayonfont = "Comic Sans MS"
crayonfont = "Comic Sans MS"
New() /obj/item/weapon/paper/New()
..() ..()
src.pixel_y = rand(-8, 8) src.pixel_y = rand(-8, 8)
src.pixel_x = rand(-9, 9) src.pixel_x = rand(-9, 9)
spawn(2) spawn(2)
if(src.info)
src.overlays += "paper_words"
updateinfolinks()
return
update_icon()
if(src.info) if(src.info)
src.overlays += "paper_words" src.overlays += "paper_words"
return
examine()
set src in oview(1)
// ..() //We don't want them to see the dumb "this is a paper" thing every time.
if(!(istype(usr, /mob/living/carbon/human) || istype(usr, /mob/dead/observer) || istype(usr, /mob/living/silicon)))
usr << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[stars(info)][stamps]</BODY></HTML>", "window=[name]")
onclose(usr, "[name]")
else
usr << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[info][stamps]</BODY></HTML>", "window=[name]")
onclose(usr, "[name]")
return
verb/rename()
set name = "Rename paper"
set category = "Object"
set src in usr
if ((usr.mutations & CLUMSY) && prob(50))
usr << "\red You cut yourself on the paper."
return
var/n_name = copytext(sanitize(input(usr, "What would you like to label the paper?", "Paper Labelling", null) as text),1,MAX_NAME_LEN)
if ((loc == usr && usr.stat == 0))
name = "paper[(n_name ? text("- '[n_name]'") : null)]"
add_fingerprint(usr)
return
attack_self(mob/living/user as mob)
examine()
if(rigged && (Holiday == "April Fool's Day"))
if(spam_flag == 0)
spam_flag = 1
playsound(src.loc, 'bikehorn.ogg', 50, 1)
spawn(20)
spam_flag = 0
return
attack_ai(var/mob/living/silicon/ai/user as mob)
var/dist
if (istype(user) && user.current) //is AI
dist = get_dist(src, user.current)
else //cyborg or AI not seeing through a camera
dist = get_dist(src, user)
if (dist < 2)
usr << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[info][stamps]</BODY></HTML>", "window=[name]")
onclose(usr, "[name]")
else
usr << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[stars(info)][stamps]</BODY></HTML>", "window=[name]")
onclose(usr, "[name]")
return
proc
addtofield(var/id, var/text, var/links = 0)
var/locid = 0
var/laststart = 1
var/textindex = 1
while(1) // I know this can cause infinite loops and fuck up the whole server, but the if(istart==0) should be safe as fuck
var/istart = 0
if(links)
istart = findtext(info_links, "<span class=\"paper_field\">", laststart)
else
istart = findtext(info, "<span class=\"paper_field\">", laststart)
if(istart==0)
return // No field found with matching id
laststart = istart+1
locid++
if(locid == id)
var/iend = 1
if(links)
iend = findtext(info_links, "</span>", istart)
else
iend = findtext(info, "</span>", istart)
//textindex = istart+26
textindex = iend
break
if(links)
var/before = copytext(info_links, 1, textindex)
var/after = copytext(info_links, textindex)
info_links = before + text + after
else
var/before = copytext(info, 1, textindex)
var/after = copytext(info, textindex)
info = before + text + after
updateinfolinks()
updateinfolinks() updateinfolinks()
info_links = info return
var/i = 0
for(i=1,i<=fields,i++)
addtofield(i, "<font face=\"[deffont]\"><A href='?src=\ref[src];write=[i]'>write</A></font>", 1)
info_links = info_links + "<font face=\"[deffont]\"><A href='?src=\ref[src];write=end'>write</A></font>"
parsepencode(var/t, var/obj/item/weapon/pen/P, mob/user as mob, var/iscrayon = 0) /obj/item/weapon/paper/update_icon()
t = copytext(sanitize(t),1,MAX_MESSAGE_LEN) if(src.info)
src.overlays += "paper_words"
return
t = dd_replacetext(t, "\[center\]", "<center>") /obj/item/weapon/paper/examine()
t = dd_replacetext(t, "\[/center\]", "</center>") set src in oview(1)
t = dd_replacetext(t, "\[br\]", "<BR>")
t = dd_replacetext(t, "\[b\]", "<B>")
t = dd_replacetext(t, "\[/b\]", "</B>")
t = dd_replacetext(t, "\[i\]", "<I>")
t = dd_replacetext(t, "\[/i\]", "</I>")
t = dd_replacetext(t, "\[u\]", "<U>")
t = dd_replacetext(t, "\[/u\]", "</U>")
t = dd_replacetext(t, "\[large\]", "<font size = \"4\">")
t = dd_replacetext(t, "\[/large\]", "</font>")
t = dd_replacetext(t, "\[sign\]", "<font face=\"[signfont]\"><i>[user.real_name]</i></font>")
t = dd_replacetext(t, "\[field\]", "<span class=\"paper_field\"></span>")
if(!iscrayon) // ..() //We don't want them to see the dumb "this is a paper" thing every time.
t = dd_replacetext(t, "\[*\]", "<li>") if(!(istype(usr, /mob/living/carbon/human) || istype(usr, /mob/dead/observer) || istype(usr, /mob/living/silicon)))
t = dd_replacetext(t, "\[hr\]", "<HR>") usr << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[stars(info)][stamps]</BODY></HTML>", "window=[name]")
t = dd_replacetext(t, "\[small\]", "<font size = \"1\">") onclose(usr, "[name]")
t = dd_replacetext(t, "\[/small\]", "</font>") else
t = dd_replacetext(t, "\[list\]", "<ul>") usr << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[info][stamps]</BODY></HTML>", "window=[name]")
t = dd_replacetext(t, "\[/list\]", "</ul>") onclose(usr, "[name]")
return
t = "<font face=\"[deffont]\" color=[P.colour]>[t]</font>" /obj/item/weapon/paper/verb/rename()
else // If it is a crayon, and he still tries to use these, make them empty! set name = "Rename paper"
t = dd_replacetext(t, "\[*\]", "") set category = "Object"
t = dd_replacetext(t, "\[hr\]", "") set src in usr
t = dd_replacetext(t, "\[small\]", "")
t = dd_replacetext(t, "\[/small\]", "")
t = dd_replacetext(t, "\[list\]", "")
t = dd_replacetext(t, "\[/list\]", "")
t = "<font face=\"[crayonfont]\" color=[P.colour]><b>[t]</b></font>" if ((usr.mutations & CLUMSY) && prob(50))usr << "\red You cut yourself on the paper."
return
var/n_name = copytext(sanitize(input(usr, "What would you like to label the paper?", "Paper Labelling", null) as text),1,MAX_NAME_LEN)
if ((loc == usr && usr.stat == 0))
name = "paper[(n_name ? text("- '[n_name]'") : null)]"
add_fingerprint(usr)
return
//Count the fields /obj/item/weapon/paper/attack_self(mob/living/user as mob)
var/laststart = 1 examine()
while(1) if(rigged && (Holiday == "April Fool's Day"))
var/i = findtext(t, "<span class=\"paper_field\">", laststart) if(spam_flag == 0)
if(i==0) spam_flag = 1
break playsound(src.loc, 'bikehorn.ogg', 50, 1)
laststart = i+1 spawn(20)
fields++ spam_flag = 0
return
return t /obj/item/weapon/paper/attack_ai(var/mob/living/silicon/ai/user as mob)
var/dist
if (istype(user) && user.current) //is AI
dist = get_dist(src, user.current)
else //cyborg or AI not seeing through a camera
dist = get_dist(src, user)
if (dist < 2)
usr << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[info][stamps]</BODY></HTML>", "window=[name]")
onclose(usr, "[name]")
else
usr << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[stars(info)][stamps]</BODY></HTML>", "window=[name]")
onclose(usr, "[name]")
return
openhelp(mob/user as mob) /obj/item/weapon/paper/proc/addtofield(var/id, var/text, var/links = 0)
user << browse({"<HTML><HEAD><TITLE>Pen Help</TITLE></HEAD> var/locid = 0
<BODY> var/laststart = 1
<b><center>Crayon&Pen commands</center></b><br> var/textindex = 1
<br> while(1) // I know this can cause infinite loops and fuck up the whole server, but the if(istart==0) should be safe as fuck
\[br\] : Creates a linebreak.<br> var/istart = 0
\[center\] - \[/center\] : Centers the text.<br> if(links)
\[b\] - \[/b\] : Makes the text <b>bold</b>.<br> istart = findtext(info_links, "<span class=\"paper_field\">", laststart)
\[i\] - \[/i\] : Makes the text <i>italic</i>.<br> else
\[u\] - \[/u\] : Makes the text <u>underlined</u>.<br> istart = findtext(info, "<span class=\"paper_field\">", laststart)
\[large\] - \[/large\] : Increases the <font size = \"4\">size</font> of the text.<br>
\[sign\] : Inserts a signature of your name in a foolproof way.<br>
\[field\] : Inserts an invisible field which lets you start type from there. Useful for forms.<br>
<br>
<b><center>Pen exclusive commands</center></b><br>
\[small\] - \[/small\] : Decreases the <font size = \"1\">size</font> of the text.<br>
\[list\] - \[/list\] : A list.<br>
\[*\] : A dot used for lists.<br>
\[hr\] : Adds a horizontal rule.
</BODY></HTML>"}, "window=paper_help")
if(istart==0)
return // No field found with matching id
Topic(href, href_list) laststart = istart+1
..() locid++
if ((usr.stat || usr.restrained())) if(locid == id)
return var/iend = 1
if(links)
if(href_list["write"]) iend = findtext(info_links, "</span>", istart)
var/id = href_list["write"]
var/t = strip_html_simple(input(usr, "What text do you wish to add to " + (id=="end" ? "the end of the paper" : "field "+id) + "?", "[name]", null),8192) as text
var/obj/item/i = usr.equipped() // Check to see if he still got that darn pen, also check if he's using a crayon or pen.
var/iscrayon = 0
if(!istype(i, /obj/item/weapon/pen))
if(!istype(i, /obj/item/toy/crayon))
return
iscrayon = 1
if ((!in_range(src, usr) && src.loc != usr && !( istype(src.loc, /obj/item/weapon/clipboard) ) && src.loc.loc != usr && usr.equipped() != i)) // Some check to see if he's allowed to write
return
t = parsepencode(t, i, usr, iscrayon) // Encode everything from pencode to html
if(id!="end")
addtofield(text2num(id), t) // He wants to edit a field, let him.
else else
info += t // Oh, he wants to edit to the end of the file, let him. iend = findtext(info, "</span>", istart)
updateinfolinks()
usr << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[info_links][stamps]</BODY></HTML>", "window=[name]") // Update the window //textindex = istart+26
textindex = iend
break
if(!overlays.Find("paper_words")) if(links)
overlays += "paper_words" var/before = copytext(info_links, 1, textindex)
var/after = copytext(info_links, textindex)
info_links = before + text + after
else
var/before = copytext(info, 1, textindex)
var/after = copytext(info, textindex)
info = before + text + after
updateinfolinks()
attackby(obj/item/weapon/P as obj, mob/user as mob) /obj/item/weapon/paper/proc/updateinfolinks()
..() info_links = info
var/clown = 0 var/i = 0
if(user.mind && (user.mind.assigned_role == "Clown")) for(i=1,i<=fields,i++)
clown = 1 addtofield(i, "<font face=\"[deffont]\"><A href='?src=\ref[src];write=[i]'>write</A></font>", 1)
info_links = info_links + "<font face=\"[deffont]\"><A href='?src=\ref[src];write=end'>write</A></font>"
if (istype(P, /obj/item/weapon/pen) || istype(P, /obj/item/toy/crayon)) /obj/item/weapon/paper/proc/parsepencode(var/t, var/obj/item/weapon/pen/P, mob/user as mob, var/iscrayon = 0)
usr << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[info_links][stamps]</BODY></HTML>", "window=[name]") t = copytext(sanitize(t),1,MAX_MESSAGE_LEN)
//openhelp(user)
return t = dd_replacetext(t, "\[center\]", "<center>")
else if(istype(P, /obj/item/weapon/stamp)) t = dd_replacetext(t, "\[/center\]", "</center>")
if ((!in_range(src, usr) && src.loc != user && !( istype(src.loc, /obj/item/weapon/clipboard) ) && src.loc.loc != user && user.equipped() != P)) t = dd_replacetext(t, "\[br\]", "<BR>")
t = dd_replacetext(t, "\[b\]", "<B>")
t = dd_replacetext(t, "\[/b\]", "</B>")
t = dd_replacetext(t, "\[i\]", "<I>")
t = dd_replacetext(t, "\[/i\]", "</I>")
t = dd_replacetext(t, "\[u\]", "<U>")
t = dd_replacetext(t, "\[/u\]", "</U>")
t = dd_replacetext(t, "\[large\]", "<font size = \"4\">")
t = dd_replacetext(t, "\[/large\]", "</font>")
t = dd_replacetext(t, "\[sign\]", "<font face=\"[signfont]\"><i>[user.real_name]</i></font>")
t = dd_replacetext(t, "\[field\]", "<span class=\"paper_field\"></span>")
if(!iscrayon)
t = dd_replacetext(t, "\[*\]", "<li>")
t = dd_replacetext(t, "\[hr\]", "<HR>")
t = dd_replacetext(t, "\[small\]", "<font size = \"1\">")
t = dd_replacetext(t, "\[/small\]", "</font>")
t = dd_replacetext(t, "\[list\]", "<ul>")
t = dd_replacetext(t, "\[/list\]", "</ul>")
t = "<font face=\"[deffont]\" color=[P.colour]>[t]</font>"
else // If it is a crayon, and he still tries to use these, make them empty!
t = dd_replacetext(t, "\[*\]", "")
t = dd_replacetext(t, "\[hr\]", "")
t = dd_replacetext(t, "\[small\]", "")
t = dd_replacetext(t, "\[/small\]", "")
t = dd_replacetext(t, "\[list\]", "")
t = dd_replacetext(t, "\[/list\]", "")
t = "<font face=\"[crayonfont]\" color=[P.colour]><b>[t]</b></font>"
//Count the fields
var/laststart = 1
while(1)
var/i = findtext(t, "<span class=\"paper_field\">", laststart)
if(i==0)
break
laststart = i+1
fields++
return t
/obj/item/weapon/paper/proc/openhelp(mob/user as mob)
user << browse({"<HTML><HEAD><TITLE>Pen Help</TITLE></HEAD>
<BODY>
<b><center>Crayon&Pen commands</center></b><br>
<br>
\[br\] : Creates a linebreak.<br>
\[center\] - \[/center\] : Centers the text.<br>
\[b\] - \[/b\] : Makes the text <b>bold</b>.<br>
\[i\] - \[/i\] : Makes the text <i>italic</i>.<br>
\[u\] - \[/u\] : Makes the text <u>underlined</u>.<br>
\[large\] - \[/large\] : Increases the <font size = \"4\">size</font> of the text.<br>
\[sign\] : Inserts a signature of your name in a foolproof way.<br>
\[field\] : Inserts an invisible field which lets you start type from there. Useful for forms.<br>
<br>
<b><center>Pen exclusive commands</center></b><br>
\[small\] - \[/small\] : Decreases the <font size = \"1\">size</font> of the text.<br>
\[list\] - \[/list\] : A list.<br>
\[*\] : A dot used for lists.<br>
\[hr\] : Adds a horizontal rule.
</BODY></HTML>"}, "window=paper_help")
/obj/item/weapon/paper/Topic(href, href_list)
..()
if ((usr.stat || usr.restrained()))
return
if(href_list["write"])
var/id = href_list["write"]
var/t = strip_html_simple(input(usr, "What text do you wish to add to " + (id=="end" ? "the end of the paper" : "field "+id) + "?", "[name]", null),8192) as text
var/obj/item/i = usr.equipped() // Check to see if he still got that darn pen, also check if he's using a crayon or pen.
var/iscrayon = 0
if(!istype(i, /obj/item/weapon/pen))
if(!istype(i, /obj/item/toy/crayon))
return return
iscrayon = 1
stamps += (stamps=="" ? "<HR>" : "<BR>") + "<i>This paper has been stamped with the [P.name].</i>"
switch(P.type) if ((!in_range(src, usr) && src.loc != usr && !( istype(src.loc, /obj/item/weapon/clipboard) ) && src.loc.loc != usr && usr.equipped() != i)) // Some check to see if he's allowed to write
if(/obj/item/weapon/stamp/captain) return
overlays += "paper_stamped_cap"
if(/obj/item/weapon/stamp/hop) t = parsepencode(t, i, usr, iscrayon) // Encode everything from pencode to html
overlays += "paper_stamped_hop"
if(/obj/item/weapon/stamp/hos) if(id!="end")
overlays += "paper_stamped_hos" addtofield(text2num(id), t) // He wants to edit a field, let him.
if(/obj/item/weapon/stamp/ce) else
overlays += "paper_stamped_ce" info += t // Oh, he wants to edit to the end of the file, let him.
if(/obj/item/weapon/stamp/rd) updateinfolinks()
overlays += "paper_stamped_rd"
if(/obj/item/weapon/stamp/cmo) usr << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[info_links][stamps]</BODY></HTML>", "window=[name]") // Update the window
overlays += "paper_stamped_cmo"
if(/obj/item/weapon/stamp/denied) if(!overlays.Find("paper_words"))
overlays += "paper_stamped_denied" overlays += "paper_words"
if(/obj/item/weapon/stamp/clown)
if (!clown) /obj/item/weapon/paper/attackby(obj/item/weapon/P as obj, mob/user as mob)
usr << "\red You are totally unable to use the stamp. HONK!" ..()
return var/clown = 0
else if(user.mind && (user.mind.assigned_role == "Clown"))
overlays += "paper_stamped_clown" clown = 1
if (istype(P, /obj/item/weapon/pen) || istype(P, /obj/item/toy/crayon))
usr << browse("<HTML><HEAD><TITLE>[name]</TITLE></HEAD><BODY>[info_links][stamps]</BODY></HTML>", "window=[name]")
//openhelp(user)
return
else if(istype(P, /obj/item/weapon/stamp))
if ((!in_range(src, usr) && src.loc != user && !( istype(src.loc, /obj/item/weapon/clipboard) ) && src.loc.loc != user && user.equipped() != P))
return
stamps += (stamps=="" ? "<HR>" : "<BR>") + "<i>This paper has been stamped with the [P.name].</i>"
switch(P.type)
if(/obj/item/weapon/stamp/captain)
overlays += "paper_stamped_cap"
if(/obj/item/weapon/stamp/hop)
overlays += "paper_stamped_hop"
if(/obj/item/weapon/stamp/hos)
overlays += "paper_stamped_hos"
if(/obj/item/weapon/stamp/ce)
overlays += "paper_stamped_ce"
if(/obj/item/weapon/stamp/rd)
overlays += "paper_stamped_rd"
if(/obj/item/weapon/stamp/cmo)
overlays += "paper_stamped_cmo"
if(/obj/item/weapon/stamp/denied)
overlays += "paper_stamped_denied"
if(/obj/item/weapon/stamp/clown)
if (!clown)
usr << "\red You are totally unable to use the stamp. HONK!"
return
else else
overlays += "paper_stamped" overlays += "paper_stamped_clown"
if(!stamped) else
stamped = new overlays += "paper_stamped"
stamped += P.type if(!stamped)
stamped = new
stamped += P.type
user << "\blue You stamp the paper with your rubber stamp." user << "\blue You stamp the paper with your rubber stamp."
add_fingerprint(user) add_fingerprint(user)
return return

View File

@@ -3,7 +3,8 @@
name = "pen" name = "pen"
icon = 'bureaucracy.dmi' icon = 'bureaucracy.dmi'
icon_state = "pen" icon_state = "pen"
flags = FPRINT | ONBELT | TABLEPASS flags = FPRINT | TABLEPASS
slot_flags = SLOT_BELT | SLOT_EARS
throwforce = 0 throwforce = 0
w_class = 1.0 w_class = 1.0
throw_speed = 7 throw_speed = 7

View File

@@ -3,13 +3,13 @@
desc = "A bullet casing." desc = "A bullet casing."
icon = 'ammo.dmi' icon = 'ammo.dmi'
icon_state = "s-casing" icon_state = "s-casing"
flags = FPRINT | TABLEPASS | CONDUCT | ONBELT flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = SLOT_BELT
throwforce = 1 throwforce = 1
w_class = 1.0 w_class = 1.0
var var/caliber = "" //Which kind of guns it can be loaded into
caliber = "" //Which kind of guns it can be loaded into var/projectile_type = ""//The bullet type to create when New() is called
projectile_type = ""//The bullet type to create when New() is called var/obj/item/projectile/BB = null //The loaded bullet
obj/item/projectile/BB = null //The loaded bullet
New() New()
@@ -28,18 +28,18 @@
desc = "A box of ammo" desc = "A box of ammo"
icon_state = "357" icon_state = "357"
icon = 'ammo.dmi' icon = 'ammo.dmi'
flags = FPRINT | TABLEPASS | CONDUCT | ONBELT flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = SLOT_BELT
item_state = "syringe_kit" item_state = "syringe_kit"
m_amt = 50000 m_amt = 50000
throwforce = 2 throwforce = 2
w_class = 1.0 w_class = 1.0
throw_speed = 4 throw_speed = 4
throw_range = 10 throw_range = 10
var var/list/stored_ammo = list()
list/stored_ammo = list() var/ammo_type = "/obj/item/ammo_casing"
ammo_type = "/obj/item/ammo_casing" var/max_ammo = 7
max_ammo = 7 var/multiple_sprites = 0
multiple_sprites = 0
New() New()

View File

@@ -4,7 +4,8 @@
icon = 'gun.dmi' icon = 'gun.dmi'
icon_state = "detective" icon_state = "detective"
item_state = "gun" item_state = "gun"
flags = FPRINT | TABLEPASS | CONDUCT | ONBELT | USEDELAY flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
slot_flags = SLOT_BELT
m_amt = 2000 m_amt = 2000
w_class = 3.0 w_class = 3.0
throwforce = 5 throwforce = 5
@@ -13,17 +14,19 @@
force = 5.0 force = 5.0
origin_tech = "combat=1" origin_tech = "combat=1"
var var/fire_sound = 'Gunshot.ogg'
fire_sound = 'Gunshot.ogg' var/obj/item/projectile/in_chamber = null
obj/item/projectile/in_chamber = null var/caliber = ""
caliber = "" var/silenced = 0
silenced = 0 var/recoil = 0
recoil = 0 var/ejectshell = 1
ejectshell = 1
proc
load_into_chamber() proc/load_into_chamber()
special_check(var/mob/M) return
proc/special_check(var/mob/M)
return
load_into_chamber() load_into_chamber()

View File

@@ -4,12 +4,11 @@
desc = "A basic energy-based gun." desc = "A basic energy-based gun."
fire_sound = 'Taser.ogg' fire_sound = 'Taser.ogg'
var var/obj/item/weapon/cell/power_supply //What type of power cell this uses
obj/item/weapon/cell/power_supply //What type of power cell this uses var/charge_cost = 100 //How much energy is needed to fire.
charge_cost = 100 //How much energy is needed to fire. var/cell_type = "/obj/item/weapon/cell"
cell_type = "/obj/item/weapon/cell" var/projectile_type = "/obj/item/projectile/energy"
projectile_type = "/obj/item/projectile/energy" var/modifystate
modifystate
emp_act(severity) emp_act(severity)
power_supply.use(round(power_supply.maxcharge / severity)) power_supply.use(round(power_supply.maxcharge / severity))

View File

@@ -9,8 +9,7 @@
origin_tech = "combat=3;magnets=2" origin_tech = "combat=3;magnets=2"
modifystate = "energystun" modifystate = "energystun"
var var/mode = 0 //0 = stun, 1 = kill
mode = 0 //0 = stun, 1 = kill
attack_self(mob/living/user as mob) attack_self(mob/living/user as mob)

View File

@@ -5,7 +5,8 @@
fire_sound = 'Laser.ogg' fire_sound = 'Laser.ogg'
origin_tech = "combat=2;magnets=4" origin_tech = "combat=2;magnets=4"
w_class = 4.0 w_class = 4.0
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY | ONBACK flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
slot_flags = SLOT_BACK
charge_cost = 100 charge_cost = 100
projectile_type = "/obj/item/projectile/ion" projectile_type = "/obj/item/projectile/ion"
@@ -27,7 +28,8 @@ obj/item/weapon/gun/energy/staff
icon_state = "staffofchange" icon_state = "staffofchange"
item_state = "staffofchange" item_state = "staffofchange"
fire_sound = 'emitter.ogg' fire_sound = 'emitter.ogg'
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY | ONBACK flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
slot_flags = SLOT_BACK
w_class = 4.0 w_class = 4.0
charge_cost = 200 charge_cost = 200
projectile_type = "/obj/item/projectile/change" projectile_type = "/obj/item/projectile/change"

View File

@@ -7,12 +7,11 @@
w_class = 3.0 w_class = 3.0
m_amt = 1000 m_amt = 1000
var var/ammo_type = "/obj/item/ammo_casing/a357"
ammo_type = "/obj/item/ammo_casing/a357" var/list/loaded = list()
list/loaded = list() var/max_shells = 7
max_shells = 7 var/load_method = 0 //0 = Single shells or quick loader, 1 = box, 2 = magazine
load_method = 0 //0 = Single shells or quick loader, 1 = box, 2 = magazine var/obj/item/ammo_magazine/empty_mag = null
obj/item/ammo_magazine/empty_mag = null
New() New()

View File

@@ -6,14 +6,14 @@
max_shells = 4 max_shells = 4
w_class = 4.0 w_class = 4.0
force = 10 force = 10
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY | ONBACK flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
slot_flags = SLOT_BACK
caliber = "shotgun" caliber = "shotgun"
origin_tech = "combat=4;materials=2" origin_tech = "combat=4;materials=2"
ammo_type = "/obj/item/ammo_casing/shotgun/beanbag" ammo_type = "/obj/item/ammo_casing/shotgun/beanbag"
var var/recentpump = 0 // to prevent spammage
recentpump = 0 // to prevent spammage var/pumped = 0
pumped = 0 var/obj/item/ammo_casing/current_shell = null
obj/item/ammo_casing/current_shell = null
load_into_chamber() load_into_chamber()
@@ -64,7 +64,8 @@
max_shells = 2 max_shells = 2
w_class = 4.0 w_class = 4.0
force = 10 force = 10
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY | ONBACK flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
slot_flags = SLOT_BACK
caliber = "shotgun" caliber = "shotgun"
origin_tech = "combat=3;materials=1" origin_tech = "combat=3;materials=1"
ammo_type = "/obj/item/ammo_casing/shotgun/beanbag" ammo_type = "/obj/item/ammo_casing/shotgun/beanbag"
@@ -119,8 +120,8 @@
icon_state = "sawnshotgun" icon_state = "sawnshotgun"
w_class = 3.0 w_class = 3.0
item_state = "gun" item_state = "gun"
flags &= ~ONBACK //you can't sling it on your back slot_flags &= ~SLOT_BACK //you can't sling it on your back
flags |= ONBELT //but you can wear it on your belt (poorly concealed under a trenchcoat, ideally) slot_flags |= SLOT_BELT //but you can wear it on your belt (poorly concealed under a trenchcoat, ideally)
name = "sawn-off shotgun" name = "sawn-off shotgun"
desc = "Omar's coming!" desc = "Omar's coming!"
user << "<span class='warning'>You shorten the barrel of \the [src]!</span>" user << "<span class='warning'>You shorten the barrel of \the [src]!</span>"

View File

@@ -19,33 +19,32 @@
flags = FPRINT | TABLEPASS flags = FPRINT | TABLEPASS
pass_flags = PASSTABLE pass_flags = PASSTABLE
mouse_opacity = 0 mouse_opacity = 0
var var/bumped = 0 //Prevents it from hitting more than one guy at once
bumped = 0 //Prevents it from hitting more than one guy at once var/def_zone = "" //Aiming at
def_zone = "" //Aiming at var/mob/firer = null//Who shot it
mob/firer = null//Who shot it var/silenced = 0 //Attack message
silenced = 0 //Attack message var/yo = null
yo = null var/xo = null
xo = null var/current = null
current = null var/turf/original = null // the original turf clicked
turf/original = null // the original turf clicked var/turf/starting = null // the projectile's starting turf
turf/starting = null // the projectile's starting turf
p_x = 16 var/p_x = 16
p_y = 16 // the pixel location of the tile that the player clicked. Default is the center var/p_y = 16 // the pixel location of the tile that the player clicked. Default is the center
damage = 10 var/damage = 10
damage_type = BRUTE //BRUTE, BURN, TOX, OXY, CLONE are the only things that should be in here var/damage_type = BRUTE //BRUTE, BURN, TOX, OXY, CLONE are the only things that should be in here
nodamage = 0 //Determines if the projectile will skip any damage inflictions var/nodamage = 0 //Determines if the projectile will skip any damage inflictions
flag = "bullet" //Defines what armor to use when it hits things. Must be set to bullet, laser, energy,or bomb var/flag = "bullet" //Defines what armor to use when it hits things. Must be set to bullet, laser, energy,or bomb
projectile_type = "/obj/item/projectile" var/projectile_type = "/obj/item/projectile"
//Effects //Effects
stun = 0 var/stun = 0
weaken = 0 var/weaken = 0
paralyze = 0 var/paralyze = 0
irradiate = 0 var/irradiate = 0
stutter = 0 var/stutter = 0
eyeblur = 0 var/eyeblur = 0
drowsy = 0 var/drowsy = 0
proc/on_hit(var/atom/target, var/blocked = 0) proc/on_hit(var/atom/target, var/blocked = 0)

View File

@@ -154,7 +154,8 @@
w_class = 1 w_class = 1
item_state = "electronic" item_state = "electronic"
flags = FPRINT | TABLEPASS | ONBELT | CONDUCT flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = SLOT_BELT
attack_self(mob/user as mob) attack_self(mob/user as mob)
var/dat = "<TT><B>TagMaster 2.2</B><BR><BR>" var/dat = "<TT><B>TagMaster 2.2</B><BR><BR>"

View File

@@ -98,8 +98,23 @@ var/MAX_EXPLOSION_RANGE = 14
#define SHOES_SLOWDOWN -1.0 // How much shoes slow you down by default. Negative values speed you up #define SHOES_SLOWDOWN -1.0 // How much shoes slow you down by default. Negative values speed you up
//ITEM INVENTORY SLOT BITMASKS: (HUMANS ONLY!)
#define SLOT_OCLOTHING 1
#define SLOT_ICLOTHING 2
#define SLOT_GLOVES 4
#define SLOT_EYES 8
#define SLOT_EARS 16
#define SLOT_MASK 32
#define SLOT_HEAD 64
#define SLOT_FEET 128
#define SLOT_ID 256
#define SLOT_BELT 512
#define SLOT_BACK 1024
#define SLOT_POCKET 2048 //this is to allow items with a w_class of 3 or 4 to fit in pockets.
#define SLOT_DENYPOCKET 4096 //this is to deny items with a w_class of 2 or 1 to fit in pockets.
//FLAGS BITMASK //FLAGS BITMASK
#define ONBACK 1 // can be put in back slot
#define TABLEPASS 2 // can pass by a table or rack #define TABLEPASS 2 // can pass by a table or rack
/******************************************************************************** /********************************************************************************
@@ -117,7 +132,6 @@ var/MAX_EXPLOSION_RANGE = 14
#define NODELAY 32768 // 1 second attackby delay skipped (Can be used once every 0.2s). Most objects have a 1s attackby delay, which doesn't require a flag. #define NODELAY 32768 // 1 second attackby delay skipped (Can be used once every 0.2s). Most objects have a 1s attackby delay, which doesn't require a flag.
#define NOSHIELD 32 // weapon not affected by shield #define NOSHIELD 32 // weapon not affected by shield
#define CONDUCT 64 // conducts electricity (metal etc.) #define CONDUCT 64 // conducts electricity (metal etc.)
#define ONBELT 128 // can be put in belt slot
#define FPRINT 256 // takes a fingerprint #define FPRINT 256 // takes a fingerprint
#define ON_BORDER 512 // item has priority to check when entering or leaving #define ON_BORDER 512 // item has priority to check when entering or leaving