Merge pull request #6486 from Poojawa/4-22-sync

Hard TG Sync 4/22
This commit is contained in:
LetterJay
2018-04-27 00:08:38 -05:00
committed by GitHub
395 changed files with 90949 additions and 23433 deletions
+9 -13
View File
@@ -60,14 +60,14 @@
#define DNA_UNIQUE_ENZYMES_LEN 32
//Transformation proc stuff
#define TR_KEEPITEMS 1
#define TR_KEEPVIRUS 2
#define TR_KEEPDAMAGE 4
#define TR_HASHNAME 8 // hashing names (e.g. monkey(e34f)) (only in monkeyize)
#define TR_KEEPIMPLANTS 16
#define TR_KEEPSE 32 // changelings shouldn't edit the DNA's SE when turning into a monkey
#define TR_DEFAULTMSG 64
#define TR_KEEPORGANS 256
#define TR_KEEPITEMS (1<<0)
#define TR_KEEPVIRUS (1<<1)
#define TR_KEEPDAMAGE (1<<2)
#define TR_HASHNAME (1<<3) // hashing names (e.g. monkey(e34f)) (only in monkeyize)
#define TR_KEEPIMPLANTS (1<<4)
#define TR_KEEPSE (1<<5) // changelings shouldn't edit the DNA's SE when turning into a monkey
#define TR_DEFAULTMSG (1<<6)
#define TR_KEEPORGANS (1<<8)
#define CLONER_FRESH_CLONE "fresh"
@@ -89,11 +89,7 @@
#define NOSTOMACH 13
#define NO_DNA_COPY 14
#define DRINKSBLOOD 15
#define SPECIES_ORGANIC 16
#define SPECIES_INORGANIC 17
#define SPECIES_UNDEAD 18
#define SPECIES_ROBOTIC 19
#define NOEYES 20
#define NOEYES 16
#define ORGAN_SLOT_BRAIN "brain"
#define ORGAN_SLOT_APPENDIX "appendix"
+21 -21
View File
@@ -1,12 +1,12 @@
//A set of constants used to determine which type of mute an admin wishes to apply:
//Please read and understand the muting/automuting stuff before changing these. MUTE_IC_AUTO etc = (MUTE_IC << 1)
//Therefore there needs to be a gap between the flags for the automute flags
#define MUTE_IC 1
#define MUTE_OOC 2
#define MUTE_PRAY 4
#define MUTE_ADMINHELP 8
#define MUTE_DEADCHAT 16
#define MUTE_ALL 31
#define MUTE_IC (1<<0)
#define MUTE_OOC (1<<1)
#define MUTE_PRAY (1<<2)
#define MUTE_ADMINHELP (1<<3)
#define MUTE_DEADCHAT (1<<4)
#define MUTE_ALL (~0)
//Some constants for DB_Ban
#define BANTYPE_PERMA 1
@@ -20,21 +20,21 @@
#define BANTYPE_ANY_JOB 9 //used to remove jobbans
//Admin Permissions
#define R_BUILDMODE 0x1
#define R_ADMIN 0x2
#define R_BAN 0x4
#define R_FUN 0x8
#define R_SERVER 0x10
#define R_DEBUG 0x20
#define R_POSSESS 0x40
#define R_PERMISSIONS 0x80
#define R_STEALTH 0x100
#define R_POLL 0x200
#define R_VAREDIT 0x400
#define R_SOUNDS 0x800
#define R_SPAWN 0x1000
#define R_AUTOLOGIN 0x2000
#define R_DBRANKS 0x4000
#define R_BUILDMODE (1<<0)
#define R_ADMIN (1<<1)
#define R_BAN (1<<2)
#define R_FUN (1<<3)
#define R_SERVER (1<<4)
#define R_DEBUG (1<<5)
#define R_POSSESS (1<<6)
#define R_PERMISSIONS (1<<7)
#define R_STEALTH (1<<8)
#define R_POLL (1<<9)
#define R_VAREDIT (1<<10)
#define R_SOUNDS (1<<11)
#define R_SPAWN (1<<12)
#define R_AUTOLOGIN (1<<13)
#define R_DBRANKS (1<<14)
#define R_DEFAULT R_AUTOLOGIN
+4 -4
View File
@@ -201,10 +201,10 @@
#define PIPING_LAYER_P_Y 5
#define PIPING_LAYER_LCHANGE 0.05
#define PIPING_ALL_LAYER 1 //intended to connect with all layers, check for all instead of just one.
#define PIPING_ONE_PER_TURF 2 //can only be built if nothing else with this flag is on the tile already.
#define PIPING_DEFAULT_LAYER_ONLY 4 //can only exist at PIPING_LAYER_DEFAULT
#define PIPING_CARDINAL_AUTONORMALIZE 8 //north/south east/west doesn't matter, auto normalize on build.
#define PIPING_ALL_LAYER (1<<0) //intended to connect with all layers, check for all instead of just one.
#define PIPING_ONE_PER_TURF (1<<1) //can only be built if nothing else with this flag is on the tile already.
#define PIPING_DEFAULT_LAYER_ONLY (1<<2) //can only exist at PIPING_LAYER_DEFAULT
#define PIPING_CARDINAL_AUTONORMALIZE (1<<3) //north/south east/west doesn't matter, auto normalize on build.
//HELPERS
#define THERMAL_ENERGY(gas) (gas.temperature * gas.heat_capacity())
+11 -11
View File
@@ -12,12 +12,12 @@
#define BRAIN "brain"
//bitflag damage defines used for suicide_act
#define BRUTELOSS 1
#define FIRELOSS 2
#define TOXLOSS 4
#define OXYLOSS 8
#define SHAME 16
#define MANUAL_SUICIDE 32 //suicide_act will do the actual killing.
#define BRUTELOSS (1<<0)
#define FIRELOSS (1<<1)
#define TOXLOSS (1<<2)
#define OXYLOSS (1<<3)
#define SHAME (1<<4)
#define MANUAL_SUICIDE (1<<5) //suicide_act will do the actual killing.
#define EFFECT_STUN "stun"
#define EFFECT_KNOCKDOWN "knockdown"
@@ -30,11 +30,11 @@
#define EFFECT_JITTER "jitter"
//Bitflags defining which status effects could be or are inflicted on a mob
#define CANSTUN 1
#define CANKNOCKDOWN 2
#define CANUNCONSCIOUS 4
#define CANPUSH 8
#define GODMODE 16
#define CANSTUN (1<<0)
#define CANKNOCKDOWN (1<<1)
#define CANUNCONSCIOUS (1<<2)
#define CANPUSH (1<<3)
#define GODMODE (1<<4)
//Health Defines
#define HEALTH_THRESHOLD_CRIT 0
+21 -9
View File
@@ -6,10 +6,10 @@
// How multiple components of the exact same type are handled in the same datum
#define COMPONENT_DUPE_HIGHLANDER 0 //old component is deleted (default)
#define COMPONENT_DUPE_ALLOWED 1 //duplicates allowed
#define COMPONENT_DUPE_UNIQUE 2 //new component is deleted
#define COMPONENT_DUPE_UNIQUE_PASSARGS 4 //old component is given the initialization args of the new
#define COMPONENT_DUPE_HIGHLANDER 0 //old component is deleted (default)
#define COMPONENT_DUPE_ALLOWED 1 //duplicates allowed
#define COMPONENT_DUPE_UNIQUE 2 //new component is deleted
#define COMPONENT_DUPE_UNIQUE_PASSARGS 4 //old component is given the initialization args of the new
// All signals. Format:
// When the signal is called: (signal arguments)
@@ -47,10 +47,6 @@
#define COMSIG_ATOM_SET_LIGHT "atom_set_light" //from base of atom/set_light(): (l_range, l_power, l_color)
#define COMSIG_ATOM_ROTATE "atom_rotate" //from base of atom/shuttleRotate(): (rotation, params)
#define COMSIG_ATOM_DIR_CHANGE "atom_dir_change" //from base of atom/setDir(): (old_dir, new_dir)
#define COMSIG_ENTER_AREA "enter_area" //from base of area/Entered(): (/area)
#define COMSIG_EXIT_AREA "exit_area" //from base of area/Exited(): (/area)
#define COMSIG_ATOM_CONTENTS_DEL "atom_contents_del" //from base of atom/handle_atom_del(): (atom/deleted)
/////////////////
#define COMSIG_ATOM_ATTACK_GHOST "atom_attack_ghost" //from base of atom/attack_ghost(): (mob/dead/observer/ghost)
@@ -59,6 +55,9 @@
#define COMPONENT_NO_ATTACK_HAND 1 //works on all 3.
/////////////////
#define COMSIG_ENTER_AREA "enter_area" //from base of area/Entered(): (/area)
#define COMSIG_EXIT_AREA "exit_area" //from base of area/Exited(): (/area)
#define COMSIG_CLICK "atom_click" //from base of atom/Click(): (location, control, params)
#define COMSIG_CLICK_SHIFT "shift_click" //from base of atom/ShiftClick(): (/mob)
#define COMSIG_CLICK_CTRL "ctrl_click" //from base of atom/CtrlClickOn(): (/mob)
@@ -72,7 +71,6 @@
#define COMSIG_AREA_ENTERED "area_entered" //from base of area/Entered(): (atom/movable/M)
#define COMSIG_AREA_EXITED "area_exited" //from base of area/Exited(): (atom/movable/M)
// /atom/movable signals
#define COMSIG_MOVABLE_MOVED "movable_moved" //from base of atom/movable/Moved(): (/atom, dir)
#define COMSIG_MOVABLE_CROSSED "movable_crossed" //from base of atom/movable/Crossed(): (/atom/movable)
@@ -127,6 +125,20 @@
//NTnet
#define COMSIG_COMPONENT_NTNET_RECIEVE "ntnet_recieve" //called on an object by its NTNET connection component on recieve. (sending_id(number), sending_netname(text), data(datum/netdata))
// /datum/component/storage signals
#define COMSIG_CONTAINS_STORAGE "is_storage" //() - returns bool.
#define COMSIG_TRY_STORAGE_INSERT "storage_try_insert" //(obj/item/inserting, mob/user, silent, force) - returns bool
#define COMSIG_TRY_STORAGE_SHOW "storage_show_to" //(mob/show_to, force) - returns bool.
#define COMSIG_TRY_STORAGE_HIDE_FROM "storage_hide_from" //(mob/hide_from) - returns bool
#define COMSIG_TRY_STORAGE_HIDE_ALL "storage_hide_all" //returns bool
#define COMSIG_TRY_STORAGE_SET_LOCKSTATE "storage_lock_set_state" //(newstate)
#define COMSIG_IS_STORAGE_LOCKED "storage_get_lockstate" //() - returns bool. MUST CHECK IF STORAGE IS THERE FIRST!
#define COMSIG_TRY_STORAGE_TAKE_TYPE "storage_take_type" //(type, atom/destination, amount = INFINITY, check_adjacent, force, mob/user, list/inserted) - returns bool - type can be a list of types.
#define COMSIG_TRY_STORAGE_FILL_TYPE "storage_fill_type" //(type, amount = INFINITY, force = FALSE) //don't fuck this up. Force will ignore max_items, and amount is normally clamped to max_items.
#define COMSIG_TRY_STORAGE_TAKE "storage_take_obj" //(obj, new_loc, force = FALSE) - returns bool
#define COMSIG_TRY_STORAGE_QUICK_EMPTY "storage_quick_empty" //(loc) - returns bool - if loc is null it will dump at parent location.
#define COMSIG_TRY_STORAGE_RETURN_INVENTORY "storage_return_inventory" //(list/list_to_inject_results_into)
#define COMSIG_TRY_STORAGE_CAN_INSERT "storage_can_equip" //(obj/item/insertion_candidate, mob/user, silent) - returns bool
/*******Non-Signal Component Related Defines*******/
+1 -1
View File
@@ -14,7 +14,7 @@
#define SUPPORT_LINES 1
#define COVER 2
#define CUT_COVER 3
#define BOLTS 4
#define ANCHOR_BOLTS 4
#define SUPPORT_RODS 5
#define SHEATH 6
+11 -11
View File
@@ -3,21 +3,21 @@
#define VIRUS_SYMPTOM_LIMIT 6
//Visibility Flags
#define HIDDEN_SCANNER 1
#define HIDDEN_PANDEMIC 2
#define HIDDEN_SCANNER (1<<0)
#define HIDDEN_PANDEMIC (1<<1)
//Disease Flags
#define CURABLE 1
#define CAN_CARRY 2
#define CAN_RESIST 4
#define CURABLE (1<<0)
#define CAN_CARRY (1<<1)
#define CAN_RESIST (1<<2)
//Spread Flags
#define DISEASE_SPREAD_SPECIAL 1
#define DISEASE_SPREAD_NON_CONTAGIOUS 2
#define DISEASE_SPREAD_BLOOD 4
#define DISEASE_SPREAD_CONTACT_FLUIDS 8
#define DISEASE_SPREAD_CONTACT_SKIN 16
#define DISEASE_SPREAD_AIRBORNE 32
#define DISEASE_SPREAD_SPECIAL (1<<0)
#define DISEASE_SPREAD_NON_CONTAGIOUS (1<<1)
#define DISEASE_SPREAD_BLOOD (1<<2)
#define DISEASE_SPREAD_CONTACT_FLUIDS (1<<3)
#define DISEASE_SPREAD_CONTACT_SKIN (1<<4)
#define DISEASE_SPREAD_AIRBORNE (1<<5)
//Severity Defines
#define DISEASE_SEVERITY_POSITIVE "Positive" //Diseases that buff, heal, or at least do nothing at all
+56 -56
View File
@@ -1,103 +1,103 @@
/*
These defines are specific to the atom/flags_1 bitmask
*/
#define ALL ~0 //For convenience.
#define ALL (~0) //For convenience.
#define NONE 0
GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768))
// for /datum/var/datum_flags
#define DF_USE_TAG 1
#define DF_VAR_EDITED 2
#define DF_USE_TAG (1<<0)
#define DF_VAR_EDITED (1<<1)
//FLAGS BITMASK
#define STOPSPRESSUREDMAGE_1 1 //This flag is used on the flags_1 variable for SUIT and HEAD items which stop pressure damage. Note that the flag 1 was previous used as ONBACK, so it is possible for some code to use (flags & 1) when checking if something can be put on your back. Replace this code with (inv_flags & SLOT_BACK) if you see it anywhere
#define STOPSPRESSUREDMAGE_1 (1<<0) //This flag is used on the flags_1 variable for SUIT and HEAD items which stop pressure damage. Note that the flag 1 was previous used as ONBACK, so it is possible for some code to use (flags & 1) when checking if something can be put on your back. Replace this code with (inv_flags & SLOT_BACK) if you see it anywhere
//To successfully stop you taking all pressure damage you must have both a suit and head item with this flag.
#define NODROP_1 2 // This flag makes it so that an item literally cannot be removed at all, or at least that's how it should be. Only deleted.
#define NOBLUDGEON_1 4 // when an item has this it produces no "X has been hit by Y with Z" message in the default attackby()
#define MASKINTERNALS_1 8 // mask allows internals
#define HEAR_1 16 // This flag is what recursive_hear_check() uses to determine wether to add an item to the hearer list or not.
#define CHECK_RICOCHET_1 32 // Projectiels will check ricochet on things impacted that have this.
#define CONDUCT_1 64 // conducts electricity (metal etc.)
#define ABSTRACT_1 128 // for all things that are technically items but used for various different stuff, made it 128 because it could conflict with other flags other way
#define NODECONSTRUCT_1 128 // For machines and structures that should not break into parts, eg, holodeck stuff
#define OVERLAY_QUEUED_1 256 // atom queued to SSoverlay
#define ON_BORDER_1 512 // item has priority to check when entering or leaving
#define NODROP_1 (1<<1) // This flag makes it so that an item literally cannot be removed at all, or at least that's how it should be. Only deleted.
#define NOBLUDGEON_1 (1<<2) // when an item has this it produces no "X has been hit by Y with Z" message in the default attackby()
#define MASKINTERNALS_1 (1<<3) // mask allows internals
#define HEAR_1 (1<<4) // This flag is what recursive_hear_check() uses to determine wether to add an item to the hearer list or not.
#define CHECK_RICOCHET_1 (1<<5) // Projectiels will check ricochet on things impacted that have this.
#define CONDUCT_1 (1<<6) // conducts electricity (metal etc.)
#define ABSTRACT_1 (1<<7) // for all things that are technically items but used for various different stuff, made it 128 because it could conflict with other flags other way
#define NODECONSTRUCT_1 (1<<7) // For machines and structures that should not break into parts, eg, holodeck stuff
#define OVERLAY_QUEUED_1 (1<<8) // atom queued to SSoverlay
#define ON_BORDER_1 (1<<9) // item has priority to check when entering or leaving
#define NOSLIP_1 1024 //prevents from slipping on wet floors, in space etc
#define NOSLIP_1 (1<<10) //prevents from slipping on wet floors, in space etc
// BLOCK_GAS_SMOKE_EFFECT_1 only used in masks at the moment.
#define BLOCK_GAS_SMOKE_EFFECT_1 4096 // blocks the effect that chemical clouds would have on a mob --glasses, mask and helmets ONLY!
#define THICKMATERIAL_1 8192 //prevents syringes, parapens and hypos if the external suit or helmet (if targeting head) has this flag. Example: space suits, biosuit, bombsuits, thick suits that cover your body.
#define DROPDEL_1 16384 // When dropped, it calls qdel on itself
#define PREVENT_CLICK_UNDER_1 32768 //Prevent clicking things below it on the same turf eg. doors/ fulltile windows
#define BLOCK_GAS_SMOKE_EFFECT_1 (1<<12) // blocks the effect that chemical clouds would have on a mob --glasses, mask and helmets ONLY!
#define THICKMATERIAL_1 (1<<13) //prevents syringes, parapens and hypos if the external suit or helmet (if targeting head) has this flag. Example: space suits, biosuit, bombsuits, thick suits that cover your body.
#define DROPDEL_1 (1<<14) // When dropped, it calls qdel on itself
#define PREVENT_CLICK_UNDER_1 (1<<15) //Prevent clicking things below it on the same turf eg. doors/ fulltile windows
/* Secondary atom flags, for the flags_2 var, denoted with a _2 */
#define SLOWS_WHILE_IN_HAND_2 1
#define NO_EMP_WIRES_2 2
#define HOLOGRAM_2 4
#define FROZEN_2 8
#define STATIONLOVING_2 16
#define INFORM_ADMINS_ON_RELOCATE_2 32
#define BANG_PROTECT_2 64
#define SLOWS_WHILE_IN_HAND_2 (1<<0)
#define NO_EMP_WIRES_2 (1<<1)
#define HOLOGRAM_2 (1<<2)
#define FROZEN_2 (1<<3)
#define STATIONLOVING_2 (1<<4)
#define INFORM_ADMINS_ON_RELOCATE_2 (1<<5)
#define BANG_PROTECT_2 (1<<6)
// An item worn in the ear slot with HEALS_EARS will heal your ears each
// Life() tick, even if normally your ears would be too damaged to heal.
#define HEALS_EARS_2 128
#define HEALS_EARS_2 (1<<7)
// A mob with OMNITONGUE has no restriction in the ability to speak
// languages that they know. So even if they wouldn't normally be able to
// through mob or tongue restrictions, this flag allows them to ignore
// those restrictions.
#define OMNITONGUE_2 256
#define OMNITONGUE_2 (1<<8)
// TESLA_IGNORE grants immunity from being targeted by tesla-style electricity
#define TESLA_IGNORE_2 512
#define TESLA_IGNORE_2 (1<<9)
// Stops you from putting things like an RCD or other items into an ORM or protolathe for materials.
#define NO_MAT_REDEMPTION_2 1024
#define NO_MAT_REDEMPTION_2 (1<<10)
// LAVA_PROTECT used on the flags_2 variable for both SUIT and HEAD items, and stops lava damage. Must be present in both to stop lava damage.
#define LAVA_PROTECT_2 2048
#define LAVA_PROTECT_2 (1<<11)
//turf-only flags
#define NOJAUNT_1 1
#define UNUSED_TRANSIT_TURF_1 2
#define CAN_BE_DIRTY_1 4 // If a turf can be made dirty at roundstart. This is also used in areas.
#define NO_DEATHRATTLE_1 16 // Do not notify deadchat about any deaths that occur on this turf.
#define NO_RUINS_1 32 //Blocks ruins spawning on the turf
#define NO_LAVA_GEN_1 64 //Blocks lava rivers being generated on the turf
//#define CHECK_RICOCHET_1 32 //Same thing as atom flag.
#define NOJAUNT_1 (1<<0)
#define UNUSED_TRANSIT_TURF_1 (1<<1)
#define CAN_BE_DIRTY_1 (1<<2) // If a turf can be made dirty at roundstart. This is also used in areas.
#define NO_DEATHRATTLE_1 (1<<4) // Do not notify deadchat about any deaths that occur on this turf.
#define NO_RUINS_1 (1<<5) //Blocks ruins spawning on the turf
#define NO_LAVA_GEN_1 (1<<6) //Blocks lava rivers being generated on the turf
//#define CHECK_RICOCHET_1 32 //Same thing as atom flag.
/*
These defines are used specifically with the atom/pass_flags bitmask
the atom/checkpass() proc uses them (tables will call movable atom checkpass(PASSTABLE) for example)
*/
//flags for pass_flags
#define PASSTABLE 1
#define PASSGLASS 2
#define PASSGRILLE 4
#define PASSBLOB 8
#define PASSMOB 16
#define PASSCLOSEDTURF 32
#define LETPASSTHROW 64
#define PASSTABLE (1<<0)
#define PASSGLASS (1<<1)
#define PASSGRILLE (1<<2)
#define PASSBLOB (1<<3)
#define PASSMOB (1<<4)
#define PASSCLOSEDTURF (1<<5)
#define LETPASSTHROW (1<<6)
//Movement Types
#define GROUND 1
#define FLYING 2
#define GROUND (1<<0)
#define FLYING (1<<1)
// Flags for reagents
#define REAGENT_NOREACT 1
#define REAGENT_NOREACT (1<<0)
//Fire and Acid stuff, for resistance_flags
#define LAVA_PROOF 1
#define FIRE_PROOF 2 //100% immune to fire damage (but not necessarily to lava or heat)
#define FLAMMABLE 4
#define ON_FIRE 8
#define UNACIDABLE 16 //acid can't even appear on it, let alone melt it.
#define ACID_PROOF 32 //acid stuck on it doesn't melt it.
#define INDESTRUCTIBLE 64 //doesn't take damage
#define FREEZE_PROOF 128 //can't be frozen
#define LAVA_PROOF (1<<0)
#define FIRE_PROOF (1<<1) //100% immune to fire damage (but not necessarily to lava or heat)
#define FLAMMABLE (1<<2)
#define ON_FIRE (1<<3)
#define UNACIDABLE (1<<4) //acid can't even appear on it, let alone melt it.
#define ACID_PROOF (1<<5) //acid stuck on it doesn't melt it.
#define INDESTRUCTIBLE (1<<6) //doesn't take damage
#define FREEZE_PROOF (1<<7) //can't be frozen
+12 -12
View File
@@ -1,12 +1,12 @@
#define MEAT 1
#define VEGETABLES 2
#define RAW 4
#define JUNKFOOD 8
#define GRAIN 16
#define FRUIT 32
#define DAIRY 64
#define FRIED 128
#define ALCOHOL 256
#define SUGAR 512
#define GROSS 1024
#define TOXIC 2048
#define MEAT (1<<0)
#define VEGETABLES (1<<1)
#define RAW (1<<2)
#define JUNKFOOD (1<<3)
#define GRAIN (1<<4)
#define FRUIT (1<<5)
#define DAIRY (1<<6)
#define FRIED (1<<7)
#define ALCOHOL (1<<8)
#define SUGAR (1<<9)
#define GROSS (1<<10)
#define TOXIC (1<<11)
+3 -3
View File
@@ -11,9 +11,9 @@
#define IC_SPAWN_RESEARCH 2 // If the circuit design will be available in the IC printer after upgrading it.
// Categories that help differentiate circuits that can do different tipes of actions
#define IC_ACTION_MOVEMENT 1 // If the circuit can move the assembly
#define IC_ACTION_COMBAT 2 // If the circuit can cause harm
#define IC_ACTION_LONG_RANGE 4 // If the circuit communicate with something outside of the assembly
#define IC_ACTION_MOVEMENT (1<<0) // If the circuit can move the assembly
#define IC_ACTION_COMBAT (1<<1) // If the circuit can cause harm
#define IC_ACTION_LONG_RANGE (1<<2) // If the circuit communicate with something outside of the assembly
// Displayed along with the pin name to show what type of pin it is.
#define IC_FORMAT_ANY "\<ANY\>"
+17 -17
View File
@@ -1,22 +1,22 @@
#define INTERACT_ATOM_REQUIRES_ANCHORED 1 //whether can_interact() checks for anchored. only works on movables.
#define INTERACT_ATOM_ATTACK_HAND 2 //calls try_interact() on attack_hand() and returns that.
#define INTERACT_ATOM_UI_INTERACT 4 //automatically calls and returns ui_interact() on interact().
#define INTERACT_ATOM_REQUIRES_DEXTERITY 8 //user must be dextrous
#define INTERACT_ATOM_IGNORE_INCAPACITATED 16 //ignores incapacitated check
#define INTERACT_ATOM_IGNORE_RESTRAINED 32 //incapacitated check ignores restrained
#define INTERACT_ATOM_CHECK_GRAB 64 //incapacitated check checks grab
#define INTERACT_ATOM_NO_FINGERPRINT_ATTACK_HAND 128//prevents leaving fingerprints automatically on attack_hand
#define INTERACT_ATOM_NO_FINGERPRINT_INTERACT 256 //adds hiddenprints instead of fingerprints on interact
#define INTERACT_ATOM_REQUIRES_ANCHORED (1<<0) //whether can_interact() checks for anchored. only works on movables.
#define INTERACT_ATOM_ATTACK_HAND (1<<1) //calls try_interact() on attack_hand() and returns that.
#define INTERACT_ATOM_UI_INTERACT (1<<2) //automatically calls and returns ui_interact() on interact().
#define INTERACT_ATOM_REQUIRES_DEXTERITY (1<<3) //user must be dextrous
#define INTERACT_ATOM_IGNORE_INCAPACITATED (1<<4) //ignores incapacitated check
#define INTERACT_ATOM_IGNORE_RESTRAINED (1<<5) //incapacitated check ignores restrained
#define INTERACT_ATOM_CHECK_GRAB (1<<6) //incapacitated check checks grab
#define INTERACT_ATOM_NO_FINGERPRINT_ATTACK_HAND (1<<7) //prevents leaving fingerprints automatically on attack_hand
#define INTERACT_ATOM_NO_FINGERPRINT_INTERACT (1<<8) //adds hiddenprints instead of fingerprints on interact
#define INTERACT_ITEM_ATTACK_HAND_PICKUP 1 //attempt pickup on attack_hand for items
#define INTERACT_ITEM_ATTACK_HAND_PICKUP (1<<0) //attempt pickup on attack_hand for items
#define INTERACT_MACHINE_OPEN 1 //can_interact() while open
#define INTERACT_MACHINE_OFFLINE 2 //can_interact() while offline
#define INTERACT_MACHINE_WIRES_IF_OPEN 4 //try to interact with wires if open
#define INTERACT_MACHINE_ALLOW_SILICON 8 //let silicons interact
#define INTERACT_MACHINE_OPEN_SILICON 16 //let silicons interact while open
#define INTERACT_MACHINE_REQUIRES_SILICON 32 //must be silicon to interact
#define INTERACT_MACHINE_SET_MACHINE 64 //MACHINES HAVE THIS BY DEFAULT, SOMEONE SHOULD RUN THROUGH MACHINES AND REMOVE IT FROM THINGS LIKE LIGHT SWITCHES WHEN POSSIBLE!!--------------------------
#define INTERACT_MACHINE_OPEN (1<<0) //can_interact() while open
#define INTERACT_MACHINE_OFFLINE (1<<1) //can_interact() while offline
#define INTERACT_MACHINE_WIRES_IF_OPEN (1<<2) //try to interact with wires if open
#define INTERACT_MACHINE_ALLOW_SILICON (1<<3) //let silicons interact
#define INTERACT_MACHINE_OPEN_SILICON (1<<4) //let silicons interact while open
#define INTERACT_MACHINE_REQUIRES_SILICON (1<<5) //must be silicon to interact
#define INTERACT_MACHINE_SET_MACHINE (1<<6) //MACHINES HAVE THIS BY DEFAULT, SOMEONE SHOULD RUN THROUGH MACHINES AND REMOVE IT FROM THINGS LIKE LIGHT SWITCHES WHEN POSSIBLE!!--------------------------
//This flag determines if a machine set_machine's the user when the user uses it, making updateUsrDialog make the user re-call interact() on it.
//THIS FLAG IS ON ALL MACHINES BY DEFAULT, NEEDS TO BE RE-EVALUATED LATER!!
+47 -47
View File
@@ -14,20 +14,20 @@
#define STORAGE_VIEW_DEPTH 2
//ITEM INVENTORY SLOT BITMASKS
#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 WEIGHT_CLASS_NORMAL or WEIGHT_CLASS_BULKY to fit in pockets.
#define SLOT_DENYPOCKET 4096 // this is to deny items with a w_class of WEIGHT_CLASS_SMALL or WEIGHT_CLASS_TINY to fit in pockets.
#define SLOT_NECK 8192
#define SLOT_OCLOTHING (1<<0)
#define SLOT_ICLOTHING (1<<1)
#define SLOT_GLOVES (1<<2)
#define SLOT_EYES (1<<3)
#define SLOT_EARS (1<<4)
#define SLOT_MASK (1<<5)
#define SLOT_HEAD (1<<6)
#define SLOT_FEET (1<<7)
#define SLOT_ID (1<<8)
#define SLOT_BELT (1<<9)
#define SLOT_BACK (1<<10)
#define SLOT_POCKET (1<<11) // this is to allow items with a w_class of WEIGHT_CLASS_NORMAL or WEIGHT_CLASS_BULKY to fit in pockets.
#define SLOT_DENYPOCKET (1<<12) // this is to deny items with a w_class of WEIGHT_CLASS_SMALL or WEIGHT_CLASS_TINY to fit in pockets.
#define SLOT_NECK (1<<13)
//SLOTS
#define slot_back 1
@@ -87,36 +87,36 @@
//Bit flags for the flags_inv variable, which determine when a piece of clothing hides another. IE a helmet hiding glasses.
#define HIDEGLOVES 1
#define HIDESUITSTORAGE 2
#define HIDEJUMPSUIT 4 //these first four are only used in exterior suits
#define HIDESHOES 8
#define HIDEMASK 16 //these last six are only used in masks and headgear.
#define HIDEEARS 32 // (ears means headsets and such)
#define HIDEEYES 64 // Whether eyes and glasses are hidden
#define HIDEFACE 128 // Whether we appear as unknown.
#define HIDEHAIR 256
#define HIDEFACIALHAIR 512
#define HIDENECK 1024
#define HIDEGLOVES (1<<0)
#define HIDESUITSTORAGE (1<<1)
#define HIDEJUMPSUIT (1<<2) //these first four are only used in exterior suits
#define HIDESHOES (1<<3)
#define HIDEMASK (1<<4) //these last six are only used in masks and headgear.
#define HIDEEARS (1<<5) // (ears means headsets and such)
#define HIDEEYES (1<<6) // Whether eyes and glasses are hidden
#define HIDEFACE (1<<7) // Whether we appear as unknown.
#define HIDEHAIR (1<<8)
#define HIDEFACIALHAIR (1<<9)
#define HIDENECK (1<<10)
//bitflags for clothing coverage - also used for limbs
#define HEAD 1
#define CHEST 2
#define GROIN 4
#define LEG_LEFT 8
#define LEG_RIGHT 16
#define LEGS 24
#define FOOT_LEFT 32
#define FOOT_RIGHT 64
#define FEET 96
#define ARM_LEFT 128
#define ARM_RIGHT 256
#define ARMS 384
#define HAND_LEFT 512
#define HAND_RIGHT 1024
#define HANDS 1536
#define NECK 2048
#define FULL_BODY 4095
#define HEAD (1<<0)
#define CHEST (1<<1)
#define GROIN (1<<2)
#define LEG_LEFT (1<<3)
#define LEG_RIGHT (1<<4)
#define LEGS (LEG_LEFT | LEG_RIGHT)
#define FOOT_LEFT (1<<5)
#define FOOT_RIGHT (1<<6)
#define FEET (FOOT_LEFT | FOOT_RIGHT)
#define ARM_LEFT (1<<7)
#define ARM_RIGHT (1<<8)
#define ARMS (ARM_LEFT | ARM_RIGHT)
#define HAND_LEFT (1<<9)
#define HAND_RIGHT (1<<10)
#define HANDS (HAND_LEFT | HAND_RIGHT)
#define NECK (1<<11)
#define FULL_BODY (~0)
//flags for female outfits: How much the game can safely "take off" the uniform without it looking weird
#define NO_FEMALE_UNIFORM 0
@@ -137,11 +137,11 @@
#define SQUISHED_DIGITIGRADE 2
//flags for covering body parts
#define GLASSESCOVERSEYES 1
#define MASKCOVERSEYES 2 // get rid of some of the other retardation in these flags
#define HEADCOVERSEYES 4 // feel free to realloc these numbers for other purposes
#define MASKCOVERSMOUTH 8 // on other items, these are just for mask/head
#define HEADCOVERSMOUTH 16
#define GLASSESCOVERSEYES (1<<0)
#define MASKCOVERSEYES (1<<1) // get rid of some of the other retardation in these flags
#define HEADCOVERSEYES (1<<2) // feel free to realloc these numbers for other purposes
#define MASKCOVERSMOUTH (1<<3) // on other items, these are just for mask/head
#define HEADCOVERSMOUTH (1<<4)
#define TINT_DARKENED 2 //Threshold of tint level to apply weld mask overlay
#define TINT_BLIND 3 //Threshold of tint level to obscure vision fully
+2
View File
@@ -182,3 +182,5 @@ GLOBAL_LIST_INIT(glass_sheet_types, typecacheof(list(
#define is_glass_sheet(O) (is_type_in_typecache(O, GLOB.glass_sheet_types))
#define isblobmonster(O) (istype(O, /mob/living/simple_animal/hostile/blob))
#define isshuttleturf(T) (length(T.baseturfs) && (/turf/baseturf_skipover/shuttle in T.baseturfs))
+19 -19
View File
@@ -4,43 +4,43 @@
#define CAPTAIN (1<<0)
#define HOS (1<<1)
#define WARDEN (1<<2)
#define DETECTIVE (1<<3)
#define DETECTIVE (1<<3)
#define OFFICER (1<<4)
#define CHIEF (1<<5)
#define ENGINEER (1<<6)
#define ATMOSTECH (1<<7)
#define CHIEF (1<<5)
#define ENGINEER (1<<6)
#define ATMOSTECH (1<<7)
#define ROBOTICIST (1<<8)
#define AI_JF (1<<9)
#define AI_JF (1<<9)
#define CYBORG (1<<10)
#define MEDSCI (1<<1)
#define RD_JF (1<<0)
#define SCIENTIST (1<<1)
#define RD_JF (1<<0)
#define SCIENTIST (1<<1)
#define CHEMIST (1<<2)
#define CMO_JF (1<<3)
#define CMO_JF (1<<3)
#define DOCTOR (1<<4)
#define GENETICIST (1<<5)
#define VIROLOGIST (1<<6)
#define CIVILIAN (1<<2)
#define CIVILIAN (1<<2)
#define HOP (1<<0)
#define BARTENDER (1<<1)
#define BOTANIST (1<<2)
#define COOK (1<<3)
#define BARTENDER (1<<1)
#define BOTANIST (1<<2)
#define COOK (1<<3)
#define JANITOR (1<<4)
#define CURATOR (1<<5)
#define QUARTERMASTER (1<<6)
#define CARGOTECH (1<<7)
#define MINER (1<<8)
#define QUARTERMASTER (1<<6)
#define CARGOTECH (1<<7)
#define MINER (1<<8)
#define LAWYER (1<<9)
#define CHAPLAIN (1<<10)
#define CLOWN (1<<11)
#define MIME (1<<12)
#define ASSISTANT (1<<13)
#define CHAPLAIN (1<<10)
#define CLOWN (1<<11)
#define MIME (1<<12)
#define ASSISTANT (1<<13)
#define JOB_AVAILABLE 0
#define JOB_UNAVAILABLE_GENERIC 1
+18 -18
View File
@@ -14,22 +14,22 @@
//bitflags for door switches.
#define OPEN 1
#define IDSCAN 2
#define BOLTS 4
#define SHOCK 8
#define SAFE 16
#define OPEN (1<<0)
#define IDSCAN (1<<1)
#define BOLTS (1<<2)
#define SHOCK (1<<3)
#define SAFE (1<<4)
//used in design to specify which machine can build it
#define IMPRINTER 1 //For circuits. Uses glass/chemicals.
#define PROTOLATHE 2 //New stuff. Uses glass/metal/chemicals
#define AUTOLATHE 4 //Uses glass/metal only.
#define CRAFTLATHE 8 //Uses fuck if I know. For use eventually.
#define MECHFAB 16 //Remember, objects utilising this flag should have construction_time and construction_cost vars.
#define BIOGENERATOR 32 //Uses biomass
#define LIMBGROWER 64 //Uses synthetic flesh
#define SMELTER 128 //uses various minerals
#define AUTOYLATHE 256 //CITADEL ADDITION Uses glass/metal/Plastic CID
#define IMPRINTER (1<<0) //For circuits. Uses glass/chemicals.
#define PROTOLATHE (1<<1) //New stuff. Uses glass/metal/chemicals
#define AUTOLATHE (1<<2) //Uses glass/metal only.
#define CRAFTLATHE (1<<3) //Uses fuck if I know. For use eventually.
#define MECHFAB (1<<4) //Remember, objects utilising this flag should have construction_time and construction_cost vars.
#define BIOGENERATOR (1<<5) //Uses biomass
#define LIMBGROWER (1<<6) //Uses synthetic flesh
#define SMELTER (1<<7) //uses various minerals
#define AUTOYLATHE (1<<8) // CITADEL ADD
//Note: More then one of these can be added to a design but imprinter and lathe designs are incompatable.
//Modular computer/NTNet defines
@@ -62,10 +62,10 @@
#define MIN_NTNET_LOGS 10
//Program bitflags
#define PROGRAM_ALL 7
#define PROGRAM_CONSOLE 1
#define PROGRAM_LAPTOP 2
#define PROGRAM_TABLET 4
#define PROGRAM_ALL (~0)
#define PROGRAM_CONSOLE (1<<0)
#define PROGRAM_LAPTOP (1<<1)
#define PROGRAM_TABLET (1<<2)
//Program states
#define PROGRAM_STATE_KILLED 0
#define PROGRAM_STATE_BACKGROUND 1
+1
View File
@@ -11,6 +11,7 @@
#define BOSS_MEDAL_HIEROPHANT "Hierophant"
#define BOSS_MEDAL_LEGION "Legion"
#define BOSS_MEDAL_TENDRIL "Tendril"
#define BOSS_MEDAL_SWARMERS "Swarmer Beacon"
// Score names
#define HIEROPHANT_SCORE "Hierophants Killed"
+47 -14
View File
@@ -35,6 +35,18 @@
#define BLOODCRAWL 1
#define BLOODCRAWL_EAT 2
//Mob bio-types
#define MOB_ORGANIC "organic"
#define MOB_INORGANIC "inorganic"
#define MOB_ROBOTIC "robotic"
#define MOB_UNDEAD "undead"
#define MOB_HUMANOID "humanoid"
#define MOB_BUG "bug"
#define MOB_BEAST "beast"
#define MOB_EPIC "epic" //megafauna
#define MOB_REPTILE "reptile"
#define MOB_SPIRIT "spirit"
//Organ defines for carbon mobs
#define ORGAN_ORGANIC 1
#define ORGAN_ROBOTIC 2
@@ -51,6 +63,27 @@
#define DEVIL_BODYPART "devil"
/*see __DEFINES/inventory.dm for bodypart bitflag defines*/
// Health/damage defines for carbon mobs
#define HUMAN_MAX_OXYLOSS 3
#define HUMAN_CRIT_MAX_OXYLOSS (SSmobs.wait/30)
#define HEAT_DAMAGE_LEVEL_1 2 //Amount of damage applied when your body temperature just passes the 360.15k safety point
#define HEAT_DAMAGE_LEVEL_2 3 //Amount of damage applied when your body temperature passes the 400K point
#define HEAT_DAMAGE_LEVEL_3 8 //Amount of damage applied when your body temperature passes the 460K point and you are on fire
#define COLD_DAMAGE_LEVEL_1 0.5 //Amount of damage applied when your body temperature just passes the 260.15k safety point
#define COLD_DAMAGE_LEVEL_2 1.5 //Amount of damage applied when your body temperature passes the 200K point
#define COLD_DAMAGE_LEVEL_3 3 //Amount of damage applied when your body temperature passes the 120K point
//Note that gas heat damage is only applied once every FOUR ticks.
#define HEAT_GAS_DAMAGE_LEVEL_1 2 //Amount of damage applied when the current breath's temperature just passes the 360.15k safety point
#define HEAT_GAS_DAMAGE_LEVEL_2 4 //Amount of damage applied when the current breath's temperature passes the 400K point
#define HEAT_GAS_DAMAGE_LEVEL_3 8 //Amount of damage applied when the current breath's temperature passes the 1000K point
#define COLD_GAS_DAMAGE_LEVEL_1 0.5 //Amount of damage applied when the current breath's temperature just passes the 260.15k safety point
#define COLD_GAS_DAMAGE_LEVEL_2 1.5 //Amount of damage applied when the current breath's temperature passes the 200K point
#define COLD_GAS_DAMAGE_LEVEL_3 3 //Amount of damage applied when the current breath's temperature passes the 120K point
//Brain Damage defines
#define BRAIN_DAMAGE_MILD 20
#define BRAIN_DAMAGE_SEVERE 100
@@ -162,15 +195,15 @@
#define AI_Z_OFF 4
//determines if a mob can smash through it
#define ENVIRONMENT_SMASH_NONE 0
#define ENVIRONMENT_SMASH_STRUCTURES 1 //crates, lockers, ect
#define ENVIRONMENT_SMASH_WALLS 2 //walls
#define ENVIRONMENT_SMASH_RWALLS 4 //rwalls
#define ENVIRONMENT_SMASH_NONE 0
#define ENVIRONMENT_SMASH_STRUCTURES (1<<0) //crates, lockers, ect
#define ENVIRONMENT_SMASH_WALLS (1<<1) //walls
#define ENVIRONMENT_SMASH_RWALLS (1<<2) //rwalls
#define NO_SLIP_WHEN_WALKING 1
#define SLIDE 2
#define GALOSHES_DONT_HELP 4
#define SLIDE_ICE 8
#define NO_SLIP_WHEN_WALKING (1<<0)
#define SLIDE (1<<1)
#define GALOSHES_DONT_HELP (1<<2)
#define SLIDE_ICE (1<<3)
#define MAX_CHICKENS 50
@@ -182,12 +215,12 @@
#define INCORPOREAL_MOVE_JAUNT 3 // is blocked by holy water/salt
//Secbot and ED209 judgement criteria bitflag values
#define JUDGE_EMAGGED 1
#define JUDGE_IDCHECK 2
#define JUDGE_WEAPONCHECK 4
#define JUDGE_RECORDCHECK 8
#define JUDGE_EMAGGED (1<<0)
#define JUDGE_IDCHECK (1<<1)
#define JUDGE_WEAPONCHECK (1<<2)
#define JUDGE_RECORDCHECK (1<<3)
//ED209's ignore monkeys
#define JUDGE_IGNOREMONKEYS 16
#define JUDGE_IGNOREMONKEYS (1<<4)
#define MEGAFAUNA_DEFAULT_RECOVERY_TIME 5
@@ -211,7 +244,7 @@
#define OFFSET_NECK "neck"
//MINOR TWEAKS/MISC
#define AGE_MIN 18 //youngest a character can be
#define AGE_MIN 17 //youngest a character can be
#define AGE_MAX 85 //oldest a character can be
#define WIZARD_AGE_MIN 30 //youngest a wizard can be
#define APPRENTICE_AGE_MIN 29 //youngest an apprentice can be
+12 -12
View File
@@ -1,20 +1,20 @@
// Flags for the obj_flags var on /obj
#define EMAGGED 1
#define IN_USE 2 // If we have a user using us, this will be set on. We will check if the user has stopped using us, and thus stop updating and LAGGING EVERYTHING!
#define CAN_BE_HIT 4 //can this be bludgeoned by items?
#define BEING_SHOCKED 8 // Whether this thing is currently (already) being shocked by a tesla
#define DANGEROUS_POSSESSION 16 //Admin possession yes/no
#define ON_BLUEPRINTS 32 //Are we visible on the station blueprints at roundstart?
#define UNIQUE_RENAME 64 // can you customize the description/name of the thing?
#define USES_TGUI 128 //put on things that use tgui on ui_interact instead of custom/old UI.
#define EMAGGED (1<<0)
#define IN_USE (1<<1) // If we have a user using us, this will be set on. We will check if the user has stopped using us, and thus stop updating and LAGGING EVERYTHING!
#define CAN_BE_HIT (1<<2) //can this be bludgeoned by items?
#define BEING_SHOCKED (1<<3) // Whether this thing is currently (already) being shocked by a tesla
#define DANGEROUS_POSSESSION (1<<4) //Admin possession yes/no
#define ON_BLUEPRINTS (1<<5) //Are we visible on the station blueprints at roundstart?
#define UNIQUE_RENAME (1<<6) // can you customize the description/name of the thing?
#define USES_TGUI (1<<7) //put on things that use tgui on ui_interact instead of custom/old UI.
// If you add new ones, be sure to add them to /obj/Initialize as well for complete mapping support
// Flags for the item_flags var on /obj/item
#define BEING_REMOVED 1
#define IN_INVENTORY 2 //is this item equipped into an inventory slot or hand of a mob? used for tooltips
#define FORCE_STRING_OVERRIDE 4 // used for tooltips
#define NEEDS_PERMIT 8 //Used by security bots to determine if this item is safe for public use.
#define BEING_REMOVED (1<<0)
#define IN_INVENTORY (1<<1) //is this item equipped into an inventory slot or hand of a mob? used for tooltips
#define FORCE_STRING_OVERRIDE (1<<2) // used for tooltips
#define NEEDS_PERMIT (1<<3) //Used by security bots to determine if this item is safe for public use.
+26 -26
View File
@@ -1,35 +1,35 @@
//Preference toggles
#define SOUND_ADMINHELP 1
#define SOUND_MIDI 2
#define SOUND_AMBIENCE 4
#define SOUND_LOBBY 8
#define MEMBER_PUBLIC 16
#define INTENT_STYLE 32
#define MIDROUND_ANTAG 64
#define SOUND_INSTRUMENTS 128
#define SOUND_SHIP_AMBIENCE 256
#define SOUND_PRAYERS 512
#define ANNOUNCE_LOGIN 1024
#define SOUND_ANNOUNCEMENTS 2048
#define DISABLE_DEATHRATTLE 4096
#define DISABLE_ARRIVALRATTLE 8192
#define COMBOHUD_LIGHTING 16384
#define SOUND_ADMINHELP (1<<0)
#define SOUND_MIDI (1<<1)
#define SOUND_AMBIENCE (1<<2)
#define SOUND_LOBBY (1<<3)
#define MEMBER_PUBLIC (1<<4)
#define INTENT_STYLE (1<<5)
#define MIDROUND_ANTAG (1<<6)
#define SOUND_INSTRUMENTS (1<<7)
#define SOUND_SHIP_AMBIENCE (1<<8)
#define SOUND_PRAYERS (1<<9)
#define ANNOUNCE_LOGIN (1<<10)
#define SOUND_ANNOUNCEMENTS (1<<11)
#define DISABLE_DEATHRATTLE (1<<12)
#define DISABLE_ARRIVALRATTLE (1<<13)
#define COMBOHUD_LIGHTING (1<<14)
#define TOGGLES_DEFAULT (SOUND_ADMINHELP|SOUND_MIDI|SOUND_AMBIENCE|SOUND_LOBBY|MEMBER_PUBLIC|INTENT_STYLE|MIDROUND_ANTAG|SOUND_INSTRUMENTS|SOUND_SHIP_AMBIENCE|SOUND_PRAYERS|SOUND_ANNOUNCEMENTS)
//Chat toggles
#define CHAT_OOC 1
#define CHAT_DEAD 2
#define CHAT_GHOSTEARS 4
#define CHAT_GHOSTSIGHT 8
#define CHAT_PRAYER 16
#define CHAT_RADIO 32
#define CHAT_PULLR 64
#define CHAT_GHOSTWHISPER 128
#define CHAT_GHOSTPDA 256
#define CHAT_GHOSTRADIO 512
#define CHAT_LOOC 1024
#define CHAT_OOC (1<<0)
#define CHAT_DEAD (1<<1)
#define CHAT_GHOSTEARS (1<<2)
#define CHAT_GHOSTSIGHT (1<<3)
#define CHAT_PRAYER (1<<4)
#define CHAT_RADIO (1<<5)
#define CHAT_PULLR (1<<6)
#define CHAT_GHOSTWHISPER (1<<7)
#define CHAT_GHOSTPDA (1<<8)
#define CHAT_GHOSTRADIO (1<<9)
#define CHAT_LOOC (1<<10)
#define TOGGLES_DEFAULT_CHAT (CHAT_OOC|CHAT_DEAD|CHAT_GHOSTEARS|CHAT_GHOSTSIGHT|CHAT_PRAYER|CHAT_RADIO|CHAT_PULLR|CHAT_GHOSTWHISPER|CHAT_GHOSTPDA|CHAT_GHOSTRADIO|CHAT_LOOC)
+6 -6
View File
@@ -4,14 +4,14 @@
// container_type defines
#define INJECTABLE 1 // Makes it possible to add reagents through droppers and syringes.
#define DRAWABLE 2 // Makes it possible to remove reagents through syringes.
#define INJECTABLE (1<<0) // Makes it possible to add reagents through droppers and syringes.
#define DRAWABLE (1<<1) // Makes it possible to remove reagents through syringes.
#define REFILLABLE 4 // Makes it possible to add reagents through any reagent container.
#define DRAINABLE 8 // Makes it possible to remove reagents through any reagent container.
#define REFILLABLE (1<<2) // Makes it possible to add reagents through any reagent container.
#define DRAINABLE (1<<3) // Makes it possible to remove reagents through any reagent container.
#define TRANSPARENT 16 // Used on containers which you want to be able to see the reagents off.
#define AMOUNT_VISIBLE 32 // For non-transparent containers that still have the general amount of reagents in them visible.
#define TRANSPARENT (1<<4) // Used on containers which you want to be able to see the reagents off.
#define AMOUNT_VISIBLE (1<<5) // For non-transparent containers that still have the general amount of reagents in them visible.
// Is an open container for all intents and purposes.
#define OPENCONTAINER (REFILLABLE | DRAINABLE | TRANSPARENT)
+8 -8
View File
@@ -49,14 +49,14 @@
#define RESEARCH_FABRICATOR_SCREEN_SEARCH 4
#define RESEARCH_FABRICATOR_SCREEN_CATEGORYVIEW 5
#define DEPARTMENTAL_FLAG_SECURITY 1
#define DEPARTMENTAL_FLAG_MEDICAL 2
#define DEPARTMENTAL_FLAG_CARGO 4
#define DEPARTMENTAL_FLAG_SCIENCE 8
#define DEPARTMENTAL_FLAG_ENGINEERING 16
#define DEPARTMENTAL_FLAG_SERVICE 32
#define DEPARTMENTAL_FLAG_ALL 64 //NO THIS DOESN'T ALLOW YOU TO PRINT EVERYTHING, IT'S FOR ALL DEPARTMENTS!
//#define DEPARTMENTAL_FLAG_MINING 128
#define DEPARTMENTAL_FLAG_SECURITY (1<<0)
#define DEPARTMENTAL_FLAG_MEDICAL (1<<1)
#define DEPARTMENTAL_FLAG_CARGO (1<<2)
#define DEPARTMENTAL_FLAG_SCIENCE (1<<3)
#define DEPARTMENTAL_FLAG_ENGINEERING (1<<4)
#define DEPARTMENTAL_FLAG_SERVICE (1<<5)
#define DEPARTMENTAL_FLAG_ALL (1<<6) //NO THIS DOESN'T ALLOW YOU TO PRINT EVERYTHING, IT'S FOR ALL DEPARTMENTS!
//#define DEPARTMENTAL_FLAG_MINING (1<<7)
#define DESIGN_ID_IGNORE "IGNORE_THIS_DESIGN"
+6 -6
View File
@@ -29,12 +29,12 @@
#define BOT_NO_ROUTE 17 // no destination beacon found (or no route)
//Bot types
#define SEC_BOT 1 // Secutritrons (Beepsky) and ED-209s
#define MULE_BOT 2 // MULEbots
#define FLOOR_BOT 4 // Floorbots
#define CLEAN_BOT 8 // Cleanbots
#define MED_BOT 16 // Medibots
#define HONK_BOT 32 // Honkbots & ED-Honks
#define SEC_BOT (1<<0) // Secutritrons (Beepsky) and ED-209s
#define MULE_BOT (1<<1) // MULEbots
#define FLOOR_BOT (1<<2) // Floorbots
#define CLEAN_BOT (1<<3) // Cleanbots
#define MED_BOT (1<<4) // Medibots
#define HONK_BOT (1<<5) // Honkbots & ED-Honks
//AI notification defines
#define NEW_BORG 1
-2
View File
@@ -24,7 +24,6 @@
#define ROLE_REVENANT "revenant"
#define ROLE_DEVIL "devil"
#define ROLE_SERVANT_OF_RATVAR "servant of Ratvar"
#define ROLE_BORER "borer"
#define ROLE_BROTHER "blood brother"
#define ROLE_BRAINWASHED "brainwashed victim"
#define ROLE_MISCREANT "miscreant"
@@ -49,7 +48,6 @@ GLOBAL_LIST_INIT(special_roles, list(
ROLE_REVENANT,
ROLE_ABDUCTOR,
ROLE_DEVIL = /datum/game_mode/devil,
ROLE_BORER,
ROLE_SERVANT_OF_RATVAR = /datum/game_mode/clockwork_cult,
ROLE_MISCREANT
))
+6 -8
View File
@@ -52,12 +52,12 @@
#define ENGINE_DEFAULT_MAXSPEED_ENGINES 5
//Docking error flags
#define DOCKING_SUCCESS 0
#define DOCKING_BLOCKED 1
#define DOCKING_IMMOBILIZED 2
#define DOCKING_AREA_EMPTY 4
#define DOCKING_NULL_DESTINATION 8
#define DOCKING_NULL_SOURCE 16
#define DOCKING_SUCCESS 0
#define DOCKING_BLOCKED (1<<0)
#define DOCKING_IMMOBILIZED (1<<1)
#define DOCKING_AREA_EMPTY (1<<2)
#define DOCKING_NULL_DESTINATION (1<<3)
#define DOCKING_NULL_SOURCE (1<<4)
//Docking turf movements
#define MOVE_TURF 1
@@ -74,7 +74,5 @@
#define SHUTTLE_DOCKER_BLOCKED 3
//Shuttle defaults
#define SHUTTLE_DEFAULT_TURF_TYPE /turf/open/space
#define SHUTTLE_DEFAULT_BASETURF_TYPE /turf/open/space
#define SHUTTLE_DEFAULT_SHUTTLE_AREA_TYPE /area/shuttle
#define SHUTTLE_DEFAULT_UNDERLYING_AREA /area/space
+9 -9
View File
@@ -17,14 +17,14 @@
#define INVISIBILITY_ABSTRACT 101 //only used for abstract objects (e.g. spacevine_controller), things that are not really there.
#define BORGMESON 1
#define BORGTHERM 2
#define BORGXRAY 4
#define BORGMATERIAL 8
#define BORGMESON (1<<0)
#define BORGTHERM (1<<1)
#define BORGXRAY (1<<2)
#define BORGMATERIAL (1<<3)
//for clothing visor toggles, these determine which vars to toggle
#define VISOR_FLASHPROTECT 1
#define VISOR_TINT 2
#define VISOR_VISIONFLAGS 4 //all following flags only matter for glasses
#define VISOR_DARKNESSVIEW 8
#define VISOR_INVISVIEW 16
#define VISOR_FLASHPROTECT (1<<0)
#define VISOR_TINT (1<<1)
#define VISOR_VISIONFLAGS (1<<2) //all following flags only matter for glasses
#define VISOR_DARKNESSVIEW (1<<3)
#define VISOR_INVISVIEW (1<<4)
+4 -4
View File
@@ -9,10 +9,10 @@
#define DEAD 3
// bitflags for machine stat variable
#define BROKEN 1
#define NOPOWER 2
#define MAINT 4 // under maintaince
#define EMPED 8 // temporary broken by EMP pulse
#define BROKEN (1<<0)
#define NOPOWER (1<<1)
#define MAINT (1<<2) // under maintaince
#define EMPED (1<<3) // temporary broken by EMP pulse
//ai power requirement defines
#define POWER_REQ_ALL 1
+5 -5
View File
@@ -6,18 +6,18 @@
//Timing subsystem
//Don't run if there is an identical unique timer active
//if the arguments to addtimer are the same as an existing timer, it doesn't create a new timer, and returns the id of the existing timer
#define TIMER_UNIQUE 0x1
#define TIMER_UNIQUE (1<<0)
//For unique timers: Replace the old timer rather then not start this one
#define TIMER_OVERRIDE 0x2
#define TIMER_OVERRIDE (1<<1)
//Timing should be based on how timing progresses on clients, not the sever.
// tracking this is more expensive,
// should only be used in conjuction with things that have to progress client side, such as animate() or sound()
#define TIMER_CLIENT_TIME 0x4
#define TIMER_CLIENT_TIME (1<<2)
//Timer can be stopped using deltimer()
#define TIMER_STOPPABLE 0x8
#define TIMER_STOPPABLE (1<<3)
//To be used with TIMER_UNIQUE
//prevents distinguishing identical timers with the wait variable
#define TIMER_NO_HASH_WAIT 0x10
#define TIMER_NO_HASH_WAIT (1<<4)
#define TIMER_NO_INVOKE_WARNING 600 //number of byond ticks that are allowed to pass before the timer subsystem thinks it hung on something
+4 -9
View File
@@ -83,15 +83,10 @@
newA.contents += thing
thing.change_area(old_area, newA)
var/list/related_areas = oldA.related
for(var/i in 1 to related_areas.len)
var/area/place = related_areas[i]
var/list/firedoors = place.firedoors
if(!LAZYLEN(firedoors))
continue
for(var/k in 1 to firedoors.len)
var/obj/machinery/door/firedoor/FD = firedoors[k]
FD.CalculateAffectingAreas()
var/list/firedoors = oldA.firedoors
for(var/door in firedoors)
var/obj/machinery/door/firedoor/FD = door
FD.CalculateAffectingAreas()
to_chat(creator, "<span class='notice'>You have created a new area, named [newA.name]. It is now weather proof, and constructing an APC will allow it to be powered.</span>")
return TRUE
+14 -14
View File
@@ -24,21 +24,21 @@
*/
//Redefinitions of the diagonal directions so they can be stored in one var without conflicts
#define N_NORTH 2
#define N_SOUTH 4
#define N_EAST 16
#define N_WEST 256
#define N_NORTHEAST 32
#define N_NORTHWEST 512
#define N_SOUTHEAST 64
#define N_SOUTHWEST 1024
#define N_NORTH (1<<1)
#define N_SOUTH (1<<2)
#define N_EAST (1<<4)
#define N_WEST (1<<8)
#define N_NORTHEAST (1<<5)
#define N_NORTHWEST (1<<9)
#define N_SOUTHEAST (1<<6)
#define N_SOUTHWEST (1<<10)
#define SMOOTH_FALSE 0 //not smooth
#define SMOOTH_TRUE 1 //smooths with exact specified types or just itself
#define SMOOTH_MORE 2 //smooths with all subtypes of specified types or just itself (this value can replace SMOOTH_TRUE)
#define SMOOTH_DIAGONAL 4 //if atom should smooth diagonally, this should be present in 'smooth' var
#define SMOOTH_BORDER 8 //atom will smooth with the borders of the map
#define SMOOTH_QUEUED 16 //atom is currently queued to smooth.
#define SMOOTH_FALSE 0 //not smooth
#define SMOOTH_TRUE (1<<0) //smooths with exact specified types or just itself
#define SMOOTH_MORE (1<<1) //smooths with all subtypes of specified types or just itself (this value can replace SMOOTH_TRUE)
#define SMOOTH_DIAGONAL (1<<2) //if atom should smooth diagonally, this should be present in 'smooth' var
#define SMOOTH_BORDER (1<<3) //atom will smooth with the borders of the map
#define SMOOTH_QUEUED (1<<4) //atom is currently queued to smooth.
#define NULLTURF_BORDER 123456789
-5
View File
@@ -310,8 +310,3 @@
/obj/screen/parallax_layer/planet/update_o()
return //Shit wont move
#undef LOOP_NONE
#undef LOOP_NORMAL
#undef LOOP_REVERSE
#undef LOOP_TIME
+22 -9
View File
@@ -180,13 +180,18 @@
/obj/screen/close
name = "close"
layer = ABOVE_HUD_LAYER
plane = ABOVE_HUD_PLANE
icon_state = "backpack_close"
/obj/screen/close/Initialize(mapload, new_master)
. = ..()
master = new_master
/obj/screen/close/Click()
if(istype(master, /obj/item/storage))
var/obj/item/storage/S = master
S.close(usr)
return 1
var/datum/component/storage/S = master
S.hide_from(usr)
return TRUE
/obj/screen/drop
name = "drop"
@@ -346,19 +351,27 @@
/obj/screen/storage
name = "storage"
icon_state = "block"
screen_loc = "7,7 to 10,8"
layer = HUD_LAYER
plane = HUD_PLANE
/obj/screen/storage/Initialize(mapload, new_master)
. = ..()
master = new_master
/obj/screen/storage/Click(location, control, params)
if(world.time <= usr.next_move)
return 1
return TRUE
if(usr.stat || usr.IsUnconscious() || usr.IsKnockdown() || usr.IsStun())
return 1
return TRUE
if (ismecha(usr.loc)) // stops inventory actions in a mech
return 1
return TRUE
if(master)
var/obj/item/I = usr.get_active_held_item()
if(I)
master.attackby(I, usr, params)
return 1
return TRUE
/obj/screen/throw_catch
name = "throw/catch"
@@ -1,5 +1,3 @@
#undef CURRENT_RESIDENT_FILE
#define LIST_MODE_NUM 0
#define LIST_MODE_TEXT 1
#define LIST_MODE_FLAG 2
@@ -8,7 +6,7 @@
var/name //read-only, this is determined by the last portion of the derived entry type
var/config_entry_value
var/default //read-only, just set value directly
var/resident_file //the file which this was loaded from, if any
var/modified = FALSE //set to TRUE if the default has been overridden by a config entry
@@ -19,7 +17,7 @@
/datum/config_entry/New()
if(type == abstract_type)
CRASH("Abstract config entry [type] instatiated!")
CRASH("Abstract config entry [type] instatiated!")
name = lowertext(type2top(type))
if(islist(config_entry_value))
var/list/L = config_entry_value
+1 -1
View File
@@ -393,5 +393,5 @@ SUBSYSTEM_DEF(air)
#undef SSAIR_ACTIVETURFS
#undef SSAIR_EXCITEDGROUPS
#undef SSAIR_HIGHPRESSURE
#undef SSAIR_HOTSPOT
#undef SSAIR_HOTSPOTS
#undef SSAIR_SUPERCONDUCTIVITY
+4 -4
View File
@@ -367,14 +367,14 @@ GLOBAL_LIST_EMPTY(the_station_areas)
away_level = template.load_new_z()
else
return
message_admins("Admin [key_name_admin(usr)] has loaded [away_name] away mission.")
log_admin("Admin [key_name(usr)] has loaded [away_name] away mission.")
if(!away_level)
message_admins("Loading [away_name] failed!")
return
if(GLOB.the_gateway)
//Link any found away gate with station gate
var/obj/machinery/gateway/centeraway/new_gate
@@ -384,4 +384,4 @@ GLOBAL_LIST_EMPTY(the_station_areas)
break
//Link station gate with away gate and remove wait time.
GLOB.the_gateway.awaygate = new_gate
GLOB.the_gateway.wait = world.time
GLOB.the_gateway.wait = world.time
+3 -4
View File
@@ -55,8 +55,8 @@ SUBSYSTEM_DEF(shuttle)
var/list/shuttle_purchase_requirements_met = list() //For keeping track of ingame events that would unlock new shuttles, such as defeating a boss or discovering a secret item
var/lockdown = FALSE //disallow transit after nuke goes off
var/auto_call = 72000 //CIT CHANGE - time before in deciseconds in which the shuttle is auto called. Default is 2½ hours plus 15 for the shuttle. So total is 3.
var/auto_call = 72000 //CIT CHANGE - time before in deciseconds in which the shuttle is auto called. Default is 2½ hours plus 15 for the shuttle. So total is 3.
/datum/controller/subsystem/shuttle/Initialize(timeofday)
ordernum = rand(1, 9000)
@@ -554,7 +554,6 @@ SUBSYSTEM_DEF(shuttle)
var/obj/docking_port/stationary/transit/new_transit_dock = new(midpoint)
new_transit_dock.assigned_turfs = proposed_zone
new_transit_dock.name = "Transit for [M.id]/[M.name]"
new_transit_dock.turf_type = transit_path
new_transit_dock.owner = M
new_transit_dock.assigned_area = A
@@ -700,4 +699,4 @@ SUBSYSTEM_DEF(shuttle)
var/obj/machinery/computer/camera_advanced/shuttle_docker/C = V
C.update_hidden_docking_ports(remove_images, add_images)
QDEL_LIST(remove_images)
QDEL_LIST(remove_images)
+4 -4
View File
@@ -128,14 +128,14 @@ SUBSYSTEM_DEF(ticker)
login_music = pick(music)
else
login_music = "[global.config.directory]/title_music/sounds/[pick(music)]"
/*
crewobjlist = typesof(/datum/objective/crew)
miscreantobjlist = (typesof(/datum/objective/miscreant) - /datum/objective/miscreant)
for(var/hoorayhackyshit in crewobjlist) //taken from old Hippie's "job2obj" proc with adjustments.
var/datum/objective/crew/obj = hoorayhackyshit //dm is not a sane language in any way, shape, or form.
var/list/availableto = splittext(initial(obj.jobs),",")
for(var/job in availableto)
crewobjjobs["[job]"] += list(obj)
crewobjjobs["[job]"] += list(obj) */
if(!GLOB.syndicate_code_phrase)
GLOB.syndicate_code_phrase = generate_code_phrase()
@@ -324,12 +324,12 @@ SUBSYSTEM_DEF(ticker)
GLOB.start_state = new /datum/station_state()
GLOB.start_state.count()
//assign crew objectives and generate miscreants
/* //assign crew objectives and generate miscreants
if(CONFIG_GET(flag/allow_extended_miscreants) && GLOB.master_mode == "extended")
GLOB.miscreants_allowed = TRUE
if(CONFIG_GET(flag/allow_miscreants) && GLOB.master_mode != "extended")
GLOB.miscreants_allowed = TRUE
generate_crew_objectives()
generate_crew_objectives() */
var/list/adm = get_admin_counts()
var/list/allmins = adm["present"]
+26 -1
View File
@@ -21,7 +21,7 @@
var/mob/owner
/datum/action/New(Target)
target = Target
link_to(Target)
button = new
button.linked_action = src
button.name = name
@@ -29,6 +29,9 @@
if(desc)
button.desc = desc
/datum/action/proc/link_to(Target)
target = Target
/datum/action/Destroy()
if(owner)
Remove(owner)
@@ -689,3 +692,25 @@
else
owner.remove_alt_appearance("smallsprite")
small = FALSE
/datum/action/item_action/storage_gather_mode
name = "Switch gathering mode"
desc = "Switches the gathering mode of a storage object."
icon_icon = 'icons/mob/actions/actions_items.dmi'
button_icon_state = "storage_gather_switch"
/datum/action/item_action/storage_gather_mode/ApplyIcon(obj/screen/movable/action_button/current_button)
. = ..()
var/old_layer = target.layer
var/old_plane = target.plane
target.layer = FLOAT_LAYER //AAAH
target.plane = FLOAT_PLANE //^ what that guy said
current_button.cut_overlays()
current_button.add_overlay(target)
target.layer = old_layer
target.plane = old_plane
current_button.appearance_cache = target.appearance
/datum/action/item_action/storage_gather_mode/Trigger()
GET_COMPONENT_FROM(STR, /datum/component/storage, target)
STR.gather_mode_switch(owner)
+6 -6
View File
@@ -50,7 +50,7 @@
owner.derpspeech = min(owner.derpspeech + 5, 25)
if(prob(3))
owner.emote("drool")
else if(owner && owner.stat == CONSCIOUS && prob(3))
else if(owner.stat == CONSCIOUS && prob(3))
owner.say(pick_list_replacements(BRAIN_DAMAGE_FILE, "brain_damage"))
..()
@@ -138,13 +138,13 @@
/datum/brain_trauma/mild/muscle_weakness/on_life()
var/fall_chance = 1
if(owner && owner.m_intent == MOVE_INTENT_RUN)
if(owner.m_intent == MOVE_INTENT_RUN)
fall_chance += 2
if(prob(fall_chance) && !owner.lying && !owner.buckled)
to_chat(owner, "<span class='warning'>Your leg gives out!</span>")
owner.Knockdown(35)
else if(owner && owner.get_active_held_item())
else if(owner.get_active_held_item())
var/drop_chance = 1
var/obj/item/I = owner.get_active_held_item()
drop_chance += I.w_class
@@ -167,11 +167,11 @@
if(prob(7))
switch(rand(1,5))
if(1)
if(owner && owner.canmove && !isspaceturf(owner.loc))
if(owner.canmove && !isspaceturf(owner.loc))
to_chat(owner, "<span class='warning'>Your leg spasms!</span>")
step(owner, pick(GLOB.cardinals))
if(2)
if(owner && owner.incapacitated())
if(owner.incapacitated())
return
var/obj/item/I = owner.get_active_held_item()
if(I)
@@ -203,7 +203,7 @@
owner.ClickOn(owner)
owner.a_intent = prev_intent
if(5)
if(owner && owner.incapacitated())
if(owner.incapacitated())
return
var/obj/item/I = owner.get_active_held_item()
var/list/turf/targets = list()
+7 -7
View File
@@ -1,15 +1,15 @@
#define ROTATION_ALTCLICK 1
#define ROTATION_WRENCH 2
#define ROTATION_VERBS 4
#define ROTATION_COUNTERCLOCKWISE 8
#define ROTATION_CLOCKWISE 16
#define ROTATION_FLIP 32
#define ROTATION_ALTCLICK (1<<0)
#define ROTATION_WRENCH (1<<1)
#define ROTATION_VERBS (1<<2)
#define ROTATION_COUNTERCLOCKWISE (1<<3)
#define ROTATION_CLOCKWISE (1<<4)
#define ROTATION_FLIP (1<<5)
/datum/component/simple_rotation
var/datum/callback/can_user_rotate //Checks if user can rotate
var/datum/callback/can_be_rotated //Check if object can be rotated at all
var/datum/callback/after_rotation //Additional stuff to do after rotation
var/rotation_flags = NONE
var/default_rotation_direction = ROTATION_CLOCKWISE
@@ -0,0 +1,185 @@
// External storage-related logic:
// /mob/proc/ClickOn() in /_onclick/click.dm - clicking items in storages
// /mob/living/Move() in /modules/mob/living/living.dm - hiding storage boxes on mob movement
/datum/component/storage/concrete
var/drop_all_on_deconstruct = TRUE
var/drop_all_on_destroy = FALSE
var/transfer_contents_on_component_transfer = FALSE
var/list/datum/component/storage/slaves = list()
/datum/component/storage/concrete/Initialize()
. = ..()
RegisterSignal(COMSIG_ATOM_CONTENTS_DEL, .proc/on_contents_del)
RegisterSignal(COMSIG_OBJ_DECONSTRUCT, .proc/on_deconstruct)
/datum/component/storage/concrete/Destroy()
var/atom/real_location = real_location()
for(var/atom/_A in real_location)
_A.mouse_opacity = initial(_A.mouse_opacity)
if(drop_all_on_destroy)
do_quick_empty()
for(var/i in slaves)
var/datum/component/storage/slave = i
slave.change_master(null)
return ..()
/datum/component/storage/concrete/master()
return src
/datum/component/storage/concrete/real_location()
return parent
/datum/component/storage/concrete/OnTransfer(datum/new_parent)
if(!isatom(new_parent))
return COMPONENT_INCOMPATIBLE
var/list/mob/_is_using
if(is_using)
_is_using = is_using.Copy()
close_all()
if(transfer_contents_on_component_transfer)
var/atom/old = parent
for(var/i in old)
var/atom/movable/AM = i
AM.forceMove(new_parent)
if(_is_using)
for(var/i in _is_using)
var/mob/M = i
show_to(M)
/datum/component/storage/concrete/_insert_physical_item(obj/item/I, override = FALSE)
. = TRUE
var/atom/real_location = real_location()
if(I.loc != real_location)
I.forceMove(real_location)
refresh_mob_views()
/datum/component/storage/concrete/refresh_mob_views()
. = ..()
for(var/i in slaves)
var/datum/component/storage/slave = i
slave.refresh_mob_views()
/datum/component/storage/concrete/emp_act(severity)
var/atom/real_location = real_location()
for(var/i in real_location)
var/atom/A = i
A.emp_act(severity)
/datum/component/storage/concrete/proc/on_slave_link(datum/component/storage/S)
if(S == src)
return FALSE
slaves += S
return TRUE
/datum/component/storage/concrete/proc/on_slave_unlink(datum/component/storage/S)
slaves -= S
return FALSE
/datum/component/storage/concrete/proc/on_contents_del(atom/A)
var/atom/real_location = parent
if(A in real_location)
usr = null
remove_from_storage(A, null)
/datum/component/storage/concrete/proc/on_deconstruct(disassembled)
if(drop_all_on_deconstruct)
do_quick_empty()
/datum/component/storage/concrete/can_see_contents()
. = ..()
for(var/i in slaves)
var/datum/component/storage/slave = i
. |= slave.can_see_contents()
//Resets screen loc and other vars of something being removed from storage.
/datum/component/storage/concrete/_removal_reset(atom/movable/thing)
thing.layer = initial(thing.layer)
thing.plane = initial(thing.plane)
thing.mouse_opacity = initial(thing.mouse_opacity)
if(thing.maptext)
thing.maptext = ""
/datum/component/storage/concrete/remove_from_storage(atom/movable/AM, atom/new_location)
//Cache this as it should be reusable down the bottom, will not apply if anyone adds a sleep to dropped
//or moving objects, things that should never happen
var/atom/parent = src.parent
var/list/seeing_mobs = can_see_contents()
for(var/mob/M in seeing_mobs)
M.client.screen -= AM
if(ismob(parent.loc) && isitem(AM))
var/obj/item/I = AM
var/mob/M = parent.loc
I.dropped(M)
if(new_location)
//Reset the items values
_removal_reset(AM)
AM.forceMove(new_location)
//We don't want to call this if the item is being destroyed
AM.on_exit_storage(src)
else
//Being destroyed, just move to nullspace now (so it's not in contents for the icon update)
AM.moveToNullspace()
refresh_mob_views()
if(isobj(parent))
var/obj/O = parent
O.update_icon()
return TRUE
/datum/component/storage/concrete/proc/slave_can_insert_object(datum/component/storage/slave, obj/item/I, stop_messages = FALSE, mob/M)
return TRUE
/datum/component/storage/concrete/proc/handle_item_insertion_from_slave(datum/component/storage/slave, obj/item/I, prevent_warning = FALSE, M)
. = handle_item_insertion(I, prevent_warning, M, slave)
if(. && !prevent_warning)
slave.mob_item_insertion_feedback(usr, M, I)
/datum/component/storage/concrete/handle_item_insertion(obj/item/I, prevent_warning = FALSE, mob/M, datum/component/storage/remote) //Remote is null or the slave datum
var/datum/component/storage/concrete/master = master()
var/atom/parent = src.parent
var/moved = FALSE
if(!istype(I))
return FALSE
if(M)
if(!M.temporarilyRemoveItemFromInventory(I))
return FALSE
else
moved = TRUE //At this point if the proc fails we need to manually move the object back to the turf/mob/whatever.
if(I.pulledby)
I.pulledby.stop_pulling()
if(silent)
prevent_warning = TRUE
if(!_insert_physical_item(I))
if(moved)
if(M)
if(!M.put_in_active_hand(I))
I.forceMove(parent.drop_location())
else
I.forceMove(parent.drop_location())
return FALSE
I.on_enter_storage(master)
refresh_mob_views()
I.mouse_opacity = MOUSE_OPACITY_OPAQUE //So you can click on the area around the item to equip it, instead of having to pixel hunt
if(M)
if(M.client && M.active_storage != src)
M.client.screen -= I
if(M.observers && M.observers.len)
for(var/i in M.observers)
var/mob/dead/observe = i
if(observe.client && observe.active_storage != src)
observe.client.screen -= I
if(!remote)
parent.add_fingerprint(M)
if(!prevent_warning)
mob_item_insertion_feedback(usr, M, I)
update_icon()
return TRUE
/datum/component/storage/concrete/update_icon()
if(isobj(parent))
var/obj/O = parent
O.update_icon()
for(var/i in slaves)
var/datum/component/storage/slave = i
slave.update_icon()
@@ -0,0 +1,22 @@
/datum/component/storage/concrete/bluespace/bag_of_holding/handle_item_insertion(obj/item/W, prevent_warning = FALSE, mob/living/user)
var/atom/A = parent
if((istype(W, /obj/item/storage/backpack/holding) || count_by_type(W.GetAllContents(), /obj/item/storage/backpack/holding)))
var/turf/loccheck = get_turf(A)
if(is_reebe(loccheck.z))
user.visible_message("<span class='warning'>An unseen force knocks [user] to the ground!</span>", "<span class='big_brass'>\"I think not!\"</span>")
user.Knockdown(60)
return
var/safety = alert(user, "Doing this will have extremely dire consequences for the station and its crew. Be sure you know what you're doing.", "Put in [A.name]?", "Proceed", "Abort")
if(safety == "Abort" || !in_range(A, user) || !A || !W || user.incapacitated())
return
A.investigate_log("has become a singularity. Caused by [user.key]", INVESTIGATE_SINGULO)
to_chat(user, "<span class='danger'>The Bluespace interfaces of the two devices catastrophically malfunction!</span>")
qdel(W)
var/obj/singularity/singulo = new /obj/singularity (get_turf(A))
singulo.energy = 300 //should make it a bit bigger~
message_admins("[key_name_admin(user)] detonated a bag of holding")
log_game("[key_name(user)] detonated a bag of holding")
qdel(A)
singulo.process()
return
. = ..()
@@ -0,0 +1,21 @@
/datum/component/storage/concrete/bluespace
var/dumping_range = 8
var/dumping_sound = 'sound/items/pshoom.ogg'
var/alt_sound = 'sound/items/pshoom_2.ogg'
/datum/component/storage/concrete/bluespace/dump_content_at(atom/dest, mob/M)
var/atom/A = parent
if(A.Adjacent(M))
var/atom/dumping_location = dest.get_dumping_location()
if(get_dist(M, dumping_location) < dumping_range)
if(dumping_location.storage_contents_dump_act(src, M))
if(alt_sound && prob(1))
playsound(src, alt_sound, 40, 1)
else
playsound(src, dumping_sound, 40, 1)
M.Beam(dumping_location, icon_state="rped_upgrade", time=5)
return TRUE
to_chat(M, "The [A.name] buzzes.")
playsound(src, 'sound/machines/buzz-sigh.ogg', 50, 0)
return FALSE
@@ -0,0 +1,17 @@
/datum/component/storage/concrete/implant
max_w_class = WEIGHT_CLASS_NORMAL
max_combined_w_class = 6
max_items = 2
drop_all_on_destroy = TRUE
drop_all_on_deconstruct = TRUE
silent = TRUE
/datum/component/storage/concrete/implant/Initialize()
. = ..()
cant_hold = typecacheof(list(/obj/item/disk/nuclear))
/datum/component/storage/concrete/implant/InheritComponent(datum/component/storage/concrete/implant/I, original)
if(!istype(I))
return ..()
max_combined_w_class += I.max_combined_w_class
max_items += I.max_items
@@ -0,0 +1,65 @@
/datum/component/storage/concrete/pockets
max_items = 2
max_w_class = WEIGHT_CLASS_SMALL
max_combined_w_class = 50
rustle_sound = FALSE
/datum/component/storage/concrete/pockets/handle_item_insertion(obj/item/I, prevent_warning, mob/user)
. = ..()
if(. && silent && !prevent_warning)
if(quickdraw)
to_chat(user, "<span class='notice'>You discreetly slip [I] into [parent]. Alt-click [parent] to remove it.</span>")
else
to_chat(user, "<span class='notice'>You discreetly slip [I] into [parent].</span>")
/datum/component/storage/concrete/pockets
max_w_class = WEIGHT_CLASS_NORMAL
/datum/component/storage/concrete/pockets/small
max_items = 1
attack_hand_interact = FALSE
/datum/component/storage/concrete/pockets/tiny
max_items = 1
max_w_class = WEIGHT_CLASS_TINY
attack_hand_interact = FALSE
/datum/component/storage/concrete/pockets/small/detective
attack_hand_interact = TRUE // so the detectives would discover pockets in their hats
/datum/component/storage/concrete/pockets/shoes
attack_hand_interact = FALSE
quickdraw = TRUE
silent = TRUE
/datum/component/storage/concrete/pockets/shoes/Initialize()
. = ..()
can_hold = typecacheof(list(
/obj/item/kitchen/knife, /obj/item/switchblade, /obj/item/pen,
/obj/item/scalpel, /obj/item/reagent_containers/syringe, /obj/item/dnainjector,
/obj/item/reagent_containers/hypospray/medipen, /obj/item/reagent_containers/dropper,
/obj/item/implanter, /obj/item/screwdriver, /obj/item/weldingtool/mini,
/obj/item/device/firing_pin
))
/datum/component/storage/concrete/pockets/shoes/clown/Initialize()
. = ..()
can_hold = typecacheof(list(
/obj/item/kitchen/knife, /obj/item/switchblade, /obj/item/pen,
/obj/item/scalpel, /obj/item/reagent_containers/syringe, /obj/item/dnainjector,
/obj/item/reagent_containers/hypospray/medipen, /obj/item/reagent_containers/dropper,
/obj/item/implanter, /obj/item/screwdriver, /obj/item/weldingtool/mini,
/obj/item/device/firing_pin, /obj/item/bikehorn))
/datum/component/storage/concrete/pockets/pocketprotector
max_items = 3
max_w_class = WEIGHT_CLASS_TINY
/datum/component/storage/concrete/pockets/pocketprotector/Initialize()
. = ..()
can_hold = typecacheof(list( //Same items as a PDA
/obj/item/pen,
/obj/item/toy/crayon,
/obj/item/lipstick,
/obj/item/device/flashlight/pen,
/obj/item/clothing/mask/cigarette))
@@ -0,0 +1,31 @@
/datum/component/storage/concrete/rped
collection_mode = COLLECT_EVERYTHING
allow_quick_gather = TRUE
allow_quick_empty = TRUE
click_gather = TRUE
max_w_class = WEIGHT_CLASS_NORMAL
max_combined_w_class = 100
max_items = 50
display_numerical_stacking = TRUE
/datum/component/storage/concrete/rped/can_be_inserted(obj/item/I, stop_messages, mob/M)
. = ..()
if(!I.get_part_rating() && !stop_messages)
to_chat(M, "<span class='warning'>[parent] only accepts machine parts!</span>")
return FALSE
/datum/component/storage/concrete/bluespace/rped
collection_mode = COLLECT_EVERYTHING
allow_quick_gather = TRUE
allow_quick_empty = TRUE
click_gather = TRUE
max_w_class = WEIGHT_CLASS_NORMAL
max_combined_w_class = 800
max_items = 400
display_numerical_stacking = TRUE
/datum/component/storage/concrete/bluespace/rped/can_be_inserted(obj/item/I, stop_messages, mob/M)
. = ..()
if(!I.get_part_rating() && !stop_messages)
to_chat(M, "<span class='warning'>[parent] only accepts machine parts!</span>")
return FALSE
@@ -0,0 +1,5 @@
/datum/component/storage/concrete/secret_satchel/can_be_inserted(I,msg,user)
if(SSpersistence.spawned_objects[I])
to_chat(user, "<span class='warning'>[I] is unstable after its journey through space and time, it wouldn't survive another trip.</span>")
return FALSE
return ..()
@@ -0,0 +1,67 @@
//Stack-only storage.
/datum/component/storage/concrete/stack
display_numerical_stacking = TRUE
var/max_combined_stack_amount = 300
max_w_class = WEIGHT_CLASS_NORMAL
max_combined_w_class = WEIGHT_CLASS_NORMAL * 14
/datum/component/storage/concrete/stack/proc/total_stack_amount()
. = 0
var/atom/real_location = real_location()
for(var/i in real_location)
var/obj/item/stack/S = i
if(!istype(S))
continue
. += S.amount
/datum/component/storage/concrete/stack/proc/remaining_space()
return max(0, max_combined_stack_amount - total_stack_amount())
//emptying procs do not need modification as stacks automatically merge.
/datum/component/storage/concrete/stack/_insert_physical_item(obj/item/I, override = FALSE)
if(!istype(I, /obj/item/stack))
if(override)
return ..()
return FALSE
var/atom/real_location = real_location()
var/obj/item/stack/S = I
var/can_insert = min(S.amount, remaining_space())
if(!can_insert)
return FALSE
for(var/i in real_location) //combine.
if(QDELETED(I))
return
var/obj/item/stack/_S = i
if(!istype(_S))
continue
if(_S.merge_type == S.merge_type)
_S.add(can_insert)
S.use(can_insert, TRUE)
return TRUE
return ..(S.change_stack(null, can_insert), override)
/datum/component/storage/concrete/stack/remove_from_storage(obj/item/I, atom/new_location)
var/atom/real_location = real_location()
var/obj/item/stack/S = I
if(!istype(S))
return ..()
if(S.amount > S.max_amount)
var/overrun = S.amount - S.max_amount
S.amount = S.max_amount
var/obj/item/stack/temp = new S.type(real_location, overrun)
handle_item_insertion(temp)
return ..(S, new_location)
/datum/component/storage/concrete/stack/_process_numerical_display()
var/atom/real_location = real_location()
. = list()
for(var/i in real_location)
var/obj/item/stack/I = i
if(!istype(I) || QDELETED(I)) //We're specialized stack storage, just ignore non stacks.
continue
if(!.[I.merge_type])
.[I.merge_type] = new /datum/numbered_display(I, I.amount)
else
var/datum/numbered_display/ND = .[I.merge_type]
ND.number += I.amount
+730
View File
@@ -0,0 +1,730 @@
#define COLLECT_ONE 0
#define COLLECT_EVERYTHING 1
#define COLLECT_SAME 2
#define DROP_NOTHING 0
#define DROP_AT_PARENT 1
#define DROP_AT_LOCATION 2
// External storage-related logic:
// /mob/proc/ClickOn() in /_onclick/click.dm - clicking items in storages
// /mob/living/Move() in /modules/mob/living/living.dm - hiding storage boxes on mob movement
/datum/component/storage
dupe_mode = COMPONENT_DUPE_UNIQUE
var/datum/component/storage/concrete/master //If not null, all actions act on master and this is just an access point.
var/list/can_hold //if this is set, only things in this typecache will fit.
var/list/cant_hold //if this is set, anything in this typecache will not be able to fit.
var/list/mob/is_using //lazy list of mobs looking at the contents of this storage.
var/locked = FALSE //when locked nothing can see inside or use it.
var/max_w_class = WEIGHT_CLASS_SMALL //max size of objects that will fit.
var/max_combined_w_class = 14 //max combined sizes of objects that will fit.
var/max_items = 7 //max number of objects that will fit.
var/emp_shielded = FALSE
var/silent = FALSE //whether this makes a message when things are put in.
var/click_gather = FALSE //whether this can be clicked on items to pick it up rather than the other way around.
var/rustle_sound = TRUE //play rustle sound on interact.
var/allow_quick_empty = FALSE //allow empty verb which allows dumping on the floor of everything inside quickly.
var/allow_quick_gather = FALSE //allow toggle mob verb which toggles collecting all items from a tile.
var/collection_mode = COLLECT_EVERYTHING
var/insert_preposition = "in" //you put things "in" a bag, but "on" a tray.
var/display_numerical_stacking = FALSE //stack things of the same type and show as a single object with a number.
var/obj/screen/storage/boxes //storage display object
var/obj/screen/close/closer //close button object
var/allow_big_nesting = FALSE //allow storage objects of the same or greater size.
var/attack_hand_interact = TRUE //interact on attack hand.
var/quickdraw = FALSE //altclick interact
var/datum/action/item_action/storage_gather_mode/modeswitch_action
//Screen variables: Do not mess with these vars unless you know what you're doing. They're not defines so storage that isn't in the same location can be supported in the future.
var/screen_max_columns = 7 //These two determine maximum screen sizes.
var/screen_max_rows = INFINITY
var/screen_pixel_x = 16 //These two are pixel values for screen loc of boxes and closer
var/screen_pixel_y = 16
var/screen_start_x = 4 //These two are where the storage starts being rendered, screen_loc wise.
var/screen_start_y = 2
//End
/datum/component/storage/Initialize(datum/component/storage/concrete/master)
if(!isatom(parent))
. = COMPONENT_INCOMPATIBLE
if(master)
change_master(master)
boxes = new(null, src)
closer = new(null, src)
orient2hud()
RegisterSignal(COMSIG_CONTAINS_STORAGE, .proc/on_check)
RegisterSignal(COMSIG_IS_STORAGE_LOCKED, .proc/check_locked)
RegisterSignal(COMSIG_TRY_STORAGE_SHOW, .proc/signal_show_attempt)
RegisterSignal(COMSIG_TRY_STORAGE_INSERT, .proc/signal_insertion_attempt)
RegisterSignal(COMSIG_TRY_STORAGE_CAN_INSERT, .proc/signal_can_insert)
RegisterSignal(COMSIG_TRY_STORAGE_TAKE_TYPE, .proc/signal_take_type)
RegisterSignal(COMSIG_TRY_STORAGE_FILL_TYPE, .proc/signal_fill_type)
RegisterSignal(COMSIG_TRY_STORAGE_SET_LOCKSTATE, .proc/set_locked)
RegisterSignal(COMSIG_TRY_STORAGE_TAKE, .proc/signal_take_obj)
RegisterSignal(COMSIG_TRY_STORAGE_QUICK_EMPTY, .proc/signal_quick_empty)
RegisterSignal(COMSIG_TRY_STORAGE_HIDE_FROM, .proc/signal_hide_attempt)
RegisterSignal(COMSIG_TRY_STORAGE_HIDE_ALL, .proc/close_all)
RegisterSignal(COMSIG_TRY_STORAGE_RETURN_INVENTORY, .proc/signal_return_inv)
RegisterSignal(COMSIG_PARENT_ATTACKBY, .proc/attackby)
RegisterSignal(COMSIG_ATOM_ATTACK_HAND, .proc/on_attack_hand)
RegisterSignal(COMSIG_ATOM_ATTACK_PAW, .proc/on_attack_hand)
RegisterSignal(COMSIG_ATOM_EMP_ACT, .proc/emp_act)
RegisterSignal(COMSIG_ATOM_ATTACK_GHOST, .proc/show_to_ghost)
RegisterSignal(COMSIG_ATOM_EXITED, .proc/_removal_reset)
RegisterSignal(COMSIG_ITEM_PRE_ATTACK, .proc/preattack_intercept)
RegisterSignal(COMSIG_ITEM_ATTACK_SELF, .proc/attack_self)
RegisterSignal(COMSIG_ITEM_PICKUP, .proc/signal_on_pickup)
RegisterSignal(COMSIG_MOVABLE_THROW, .proc/close_all)
RegisterSignal(COMSIG_CLICK_ALT, .proc/on_alt_click)
RegisterSignal(COMSIG_MOUSEDROP_ONTO, .proc/mousedrop_onto)
RegisterSignal(COMSIG_MOUSEDROPPED_ONTO, .proc/mousedrop_recieve)
update_actions()
/datum/component/storage/Destroy()
close_all()
QDEL_NULL(boxes)
QDEL_NULL(closer)
LAZYCLEARLIST(is_using)
return ..()
/datum/component/storage/OnTransfer(datum/new_parent)
update_actions()
/datum/component/storage/proc/update_actions()
QDEL_NULL(modeswitch_action)
if(!isitem(parent) || !allow_quick_gather)
return
var/obj/item/I = parent
modeswitch_action = new(I)
if(I.obj_flags & IN_INVENTORY)
var/mob/M = I.loc
if(!istype(M))
return
modeswitch_action.Grant(M)
/datum/component/storage/proc/change_master(datum/component/storage/concrete/new_master)
if(!istype(new_master))
return FALSE
master.on_slave_unlink(src)
master = new_master
master.on_slave_link(src)
return TRUE
/datum/component/storage/proc/master()
if(master == src)
return //infinite loops yo.
return master
/datum/component/storage/proc/real_location()
var/datum/component/storage/concrete/master = master()
return master? master.real_location() : null
/datum/component/storage/proc/attack_self(mob/M)
if(locked)
to_chat(M, "<span class='warning'>[parent] seems to be locked!</span>")
return FALSE
if((M.get_active_held_item() == parent) && allow_quick_empty)
quick_empty(M)
/datum/component/storage/proc/preattack_intercept(obj/O, mob/M, params)
if(!isitem(O) || !click_gather || O.SendSignal(COMSIG_CONTAINS_STORAGE))
return FALSE
. = COMPONENT_NO_ATTACK
if(locked)
to_chat(M, "<span class='warning'>[parent] seems to be locked!</span>")
return FALSE
var/obj/item/I = O
if(collection_mode == COLLECT_ONE)
if(can_be_inserted(I, null, M))
handle_item_insertion(I, null, M)
return
if(!isturf(I.loc))
return
var/list/things = I.loc.contents.Copy()
if(collection_mode == COLLECT_SAME)
things = typecache_filter_list(things, typecacheof(I.type))
var/len = length(things)
if(!len)
to_chat(M, "<span class='notice'>You failed to pick up anything with [parent].</span>")
return
var/datum/progressbar/progress = new(M, len, I.loc)
var/list/rejections = list()
while(do_after(M, 10, TRUE, parent, FALSE, CALLBACK(src, .proc/handle_mass_pickup, things, I.loc, rejections, progress)))
stoplag(1)
qdel(progress)
to_chat(M, "<span class='notice'>You put everything you could [insert_preposition] [parent].</span>")
/datum/component/storage/proc/handle_mass_item_insertion(list/things, datum/component/storage/src_object, mob/user, datum/progressbar/progress)
var/atom/source_real_location = src_object.real_location()
for(var/obj/item/I in things)
things -= I
if(I.loc != source_real_location)
continue
if(user.active_storage != src_object)
if(I.on_found(user))
break
if(can_be_inserted(I,FALSE,user))
handle_item_insertion(I, TRUE, user)
if (TICK_CHECK)
progress.update(progress.goal - things.len)
return TRUE
progress.update(progress.goal - things.len)
return FALSE
/datum/component/storage/proc/handle_mass_pickup(list/things, atom/thing_loc, list/rejections, datum/progressbar/progress)
var/atom/real_location = real_location()
for(var/obj/item/I in things)
things -= I
if(I.loc != thing_loc)
continue
if(I.type in rejections) // To limit bag spamming: any given type only complains once
continue
if(!can_be_inserted(I, stop_messages = TRUE)) // Note can_be_inserted still makes noise when the answer is no
if(real_location.contents.len >= max_items)
break
rejections += I.type // therefore full bags are still a little spammy
continue
handle_item_insertion(I, TRUE) //The TRUE stops the "You put the [parent] into [S]" insertion message from being displayed.
if (TICK_CHECK)
progress.update(progress.goal - things.len)
return TRUE
progress.update(progress.goal - things.len)
return FALSE
/datum/component/storage/proc/quick_empty(mob/M)
var/atom/A = parent
if((!ishuman(M) && (A.loc != M)) || (M.stat != CONSCIOUS) || M.restrained() || !M.canmove)
return
if(locked)
to_chat(M, "<span class='warning'>[parent] seems to be locked!</span>")
return FALSE
A.add_fingerprint(M)
to_chat(M, "<span class='notice'>You start dumping out [parent].</span>")
var/turf/T = get_turf(A)
var/list/things = contents()
var/datum/progressbar/progress = new(M, length(things), T)
while (do_after(M, 10, TRUE, T, FALSE, CALLBACK(src, .proc/mass_remove_from_storage, T, things, progress)))
stoplag(1)
qdel(progress)
/datum/component/storage/proc/mass_remove_from_storage(atom/target, list/things, datum/progressbar/progress)
var/atom/real_location = real_location()
for(var/obj/item/I in things)
things -= I
if(I.loc != real_location)
continue
remove_from_storage(I, target)
if(TICK_CHECK)
progress.update(progress.goal - length(things))
return TRUE
progress.update(progress.goal - length(things))
return FALSE
/datum/component/storage/proc/do_quick_empty(atom/_target)
if(!_target)
_target = get_turf(parent)
if(usr)
hide_from(usr)
var/list/contents = contents()
var/atom/real_location = real_location()
for(var/obj/item/I in contents)
if(I.loc != real_location)
continue
remove_from_storage(I, _target)
return TRUE
/datum/component/storage/proc/set_locked(new_state)
locked = new_state
if(locked)
close_all()
/datum/component/storage/proc/_process_numerical_display()
. = list()
var/atom/real_location = real_location()
for(var/obj/item/I in real_location.contents)
if(QDELETED(I))
continue
if(!.[I.type])
.[I.type] = new /datum/numbered_display(I, 1)
else
var/datum/numbered_display/ND = .[I.type]
ND.number++
//This proc determines the size of the inventory to be displayed. Please touch it only if you know what you're doing.
/datum/component/storage/proc/orient2hud()
var/atom/real_location = real_location()
var/adjusted_contents = real_location.contents.len
//Numbered contents display
var/list/datum/numbered_display/numbered_contents
if(display_numerical_stacking)
numbered_contents = _process_numerical_display()
adjusted_contents = numbered_contents.len
var/columns = CLAMP(max_items, 1, screen_max_columns)
var/rows = CLAMP(CEILING(adjusted_contents / columns, 1), 1, screen_max_rows)
standard_orient_objs(rows, columns, numbered_contents)
//This proc draws out the inventory and places the items on it. It uses the standard position.
/datum/component/storage/proc/standard_orient_objs(rows, cols, list/obj/item/numerical_display_contents)
boxes.screen_loc = "[screen_start_x]:[screen_pixel_x],[screen_start_y]:[screen_pixel_y] to [screen_start_x+cols-1]:[screen_pixel_x],[screen_start_y+rows-1]:[screen_pixel_y]"
var/cx = screen_start_x
var/cy = screen_start_y
if(islist(numerical_display_contents))
for(var/type in numerical_display_contents)
var/datum/numbered_display/ND = numerical_display_contents[type]
ND.sample_object.mouse_opacity = MOUSE_OPACITY_OPAQUE
ND.sample_object.screen_loc = "[cx]:[screen_pixel_x],[cy]:[screen_pixel_y]"
ND.sample_object.maptext = "<font color='white'>[(ND.number > 1)? "[ND.number]" : ""]</font>"
ND.sample_object.layer = ABOVE_HUD_LAYER
ND.sample_object.plane = ABOVE_HUD_PLANE
cx++
if(cx - screen_start_x >= cols)
cx = screen_start_x
cy++
if(cy - screen_start_y >= rows)
break
else
var/atom/real_location = real_location()
for(var/obj/O in real_location)
if(QDELETED(O))
continue
O.mouse_opacity = MOUSE_OPACITY_OPAQUE //This is here so storage items that spawn with contents correctly have the "click around item to equip"
O.screen_loc = "[cx]:[screen_pixel_x],[cy]:[screen_pixel_y]"
O.maptext = ""
O.layer = ABOVE_HUD_LAYER
O.plane = ABOVE_HUD_PLANE
cx++
if(cx - screen_start_x >= cols)
cx = screen_start_x
cy++
if(cy - screen_start_y >= rows)
break
closer.screen_loc = "[screen_start_x + cols]:[screen_pixel_x],[screen_start_y]:[screen_pixel_y]"
/datum/component/storage/proc/show_to(mob/M)
if(!M.client)
return FALSE
var/atom/real_location = real_location()
if(M.active_storage != src && (M.stat == CONSCIOUS))
for(var/obj/item/I in real_location)
if(I.on_found(M))
return FALSE
if(M.active_storage)
M.active_storage.hide_from(M)
orient2hud()
M.client.screen |= boxes
M.client.screen |= closer
M.client.screen |= real_location.contents
M.active_storage = src
LAZYOR(is_using, M)
return TRUE
/datum/component/storage/proc/hide_from(mob/M)
if(!M.client)
return TRUE
var/atom/real_location = real_location()
M.client.screen -= boxes
M.client.screen -= closer
M.client.screen -= real_location.contents
if(M.active_storage == src)
M.active_storage = null
LAZYREMOVE(is_using, M)
return TRUE
/datum/component/storage/proc/close(mob/M)
hide_from(M)
/datum/component/storage/proc/close_all()
. = FALSE
for(var/mob/M in can_see_contents())
close(M)
. = TRUE //returns TRUE if any mobs actually got a close(M) call
/datum/component/storage/proc/emp_act(severity)
var/atom/A = parent
if(!isliving(A.loc) && !emp_shielded)
var/datum/component/storage/concrete/master = master()
master.emp_act(severity)
//This proc draws out the inventory and places the items on it. tx and ty are the upper left tile and mx, my are the bottm right.
//The numbers are calculated from the bottom-left The bottom-left slot being 1,1.
/datum/component/storage/proc/orient_objs(tx, ty, mx, my)
var/atom/real_location = real_location()
var/cx = tx
var/cy = ty
boxes.screen_loc = "[tx]:,[ty] to [mx],[my]"
for(var/obj/O in real_location)
if(QDELETED(O))
continue
O.screen_loc = "[cx],[cy]"
O.layer = ABOVE_HUD_LAYER
O.plane = ABOVE_HUD_PLANE
cx++
if(cx > mx)
cx = tx
cy--
closer.screen_loc = "[mx+1],[my]"
//Resets something that is being removed from storage.
/datum/component/storage/proc/_removal_reset(atom/movable/thing)
if(!istype(thing))
return FALSE
var/datum/component/storage/concrete/master = master()
if(!istype(master))
return FALSE
return master._removal_reset(thing)
//Call this proc to handle the removal of an item from the storage item. The item will be moved to the new_location target, if that is null it's being deleted
/datum/component/storage/proc/remove_from_storage(atom/movable/AM, atom/new_location)
if(!istype(AM))
return FALSE
var/datum/component/storage/concrete/master = master()
if(!istype(master))
return FALSE
return master.remove_from_storage(AM, new_location)
/datum/component/storage/proc/refresh_mob_views()
var/list/seeing = can_see_contents()
for(var/i in seeing)
show_to(i)
return TRUE
/datum/component/storage/proc/can_see_contents()
var/list/cansee = list()
for(var/mob/M in is_using)
if(M.active_storage == src && M.client)
cansee |= M
else
LAZYREMOVE(is_using, M)
return cansee
//Tries to dump content
/datum/component/storage/proc/dump_content_at(atom/dest_object, mob/M)
var/atom/A = parent
var/atom/dump_destination = dest_object.get_dumping_location()
if(A.Adjacent(M) && dump_destination && M.Adjacent(dump_destination))
if(locked)
to_chat(M, "<span class='warning'>[parent] seems to be locked!</span>")
return FALSE
if(dump_destination.storage_contents_dump_act(src, M))
playsound(A, "rustle", 50, 1, -5)
return TRUE
return FALSE
//This proc is called when you want to place an item into the storage item.
/datum/component/storage/proc/attackby(obj/item/I, mob/M, params)
if(istype(I, /obj/item/hand_labeler))
var/obj/item/hand_labeler/labeler = I
if(labeler.mode)
return FALSE
. = TRUE //no afterattack
if(iscyborg(M))
return
if(!can_be_inserted(I, FALSE, M))
var/atom/real_location = real_location()
if(real_location.contents.len >= max_items) //don't use items on the backpack if they don't fit
return TRUE
return FALSE
handle_item_insertion(I, FALSE, M)
/datum/component/storage/proc/return_inv()
. = list()
. += contents()
for(var/i in contents())
var/atom/a = i
GET_COMPONENT_FROM(STR, /datum/component/storage, a)
if(STR)
. += STR.return_inv()
/datum/component/storage/proc/contents() //ONLY USE IF YOU NEED TO COPY CONTENTS OF REAL LOCATION, COPYING IS NOT AS FAST AS DIRECT ACCESS!
var/atom/real_location = real_location()
return real_location.contents.Copy()
/datum/component/storage/proc/signal_return_inv(list/interface)
if(!islist(interface))
return FALSE
interface |= return_inv()
return TRUE
/datum/component/storage/proc/mousedrop_onto(atom/over_object, mob/M)
set waitfor = FALSE
. = COMPONENT_NO_MOUSEDROP
var/atom/A = parent
if(ismob(M)) //all the check for item manipulation are in other places, you can safely open any storages as anything and its not buggy, i checked
A.add_fingerprint(M)
if(!over_object)
return FALSE
if(ismecha(M.loc)) // stops inventory actions in a mech
return FALSE
// this must come before the screen objects only block, dunno why it wasn't before
if(over_object == M)
user_show_to_mob(M)
if(!M.incapacitated())
if(!istype(over_object, /obj/screen))
dump_content_at(over_object, M)
return
if(A.loc != M)
return
playsound(A, "rustle", 50, 1, -5)
if(istype(over_object, /obj/screen/inventory/hand))
var/obj/screen/inventory/hand/H = over_object
M.putItemFromInventoryInHandIfPossible(A, H.held_index)
return
A.add_fingerprint(M)
/datum/component/storage/proc/user_show_to_mob(mob/M, force = FALSE)
var/atom/A = parent
if(!istype(M))
return FALSE
A.add_fingerprint(M)
if(locked)
to_chat(M, "<span class='warning'>[parent] seems to be locked!</span>")
return FALSE
if(M.CanReach(parent, view_only = TRUE))
show_to(M)
/datum/component/storage/proc/mousedrop_recieve(atom/movable/O, mob/M)
if(isitem(O))
var/obj/item/I = O
if(iscarbon(M) || isdrone(M))
var/mob/living/L = M
if(!L.incapacitated() && I == L.get_active_held_item())
if(!I.SendSignal(COMSIG_CONTAINS_STORAGE) && can_be_inserted(I, FALSE)) //If it has storage it should be trying to dump, not insert.
handle_item_insertion(I, FALSE, L)
//This proc return 1 if the item can be picked up and 0 if it can't.
//Set the stop_messages to stop it from printing messages
/datum/component/storage/proc/can_be_inserted(obj/item/I, stop_messages = FALSE, mob/M)
if(!istype(I) || (I.flags_1 & ABSTRACT_1))
return FALSE //Not an item
var/atom/real_location = real_location()
var/atom/parent = src.parent
if(real_location == I.loc)
return FALSE //Means the item is already in the storage item
if(locked)
if(M)
parent.add_fingerprint(M)
to_chat(M, "<span class='warning'>[parent] seems to be locked!</span>")
return FALSE
if(real_location.contents.len >= max_items)
if(!stop_messages)
to_chat(M, "<span class='warning'>[parent] is full, make some space!</span>")
return FALSE //Storage item is full
if(length(can_hold))
if(!is_type_in_typecache(I, can_hold))
if(!stop_messages)
to_chat(M, "<span class='warning'>[parent] cannot hold [I]!</span>")
return FALSE
if(is_type_in_typecache(I, cant_hold)) //Check for specific items which this container can't hold.
if(!stop_messages)
to_chat(M, "<span class='warning'>[parent] cannot hold [I]!</span>")
return FALSE
if(I.w_class > max_w_class)
if(!stop_messages)
to_chat(M, "<span class='warning'>[I] is too big for [parent]!</span>")
return FALSE
var/sum_w_class = I.w_class
for(var/obj/item/_I in real_location)
sum_w_class += _I.w_class //Adds up the combined w_classes which will be in the storage item if the item is added to it.
if(sum_w_class > max_combined_w_class)
if(!stop_messages)
to_chat(M, "<span class='warning'>[I] won't fit in [parent], make some space!</span>")
return FALSE
if(isitem(parent))
var/obj/item/IP = parent
GET_COMPONENT_FROM(STR_I, /datum/component/storage, I)
if((I.w_class >= IP.w_class) && STR_I && !allow_big_nesting)
if(!stop_messages)
to_chat(M, "<span class='warning'>[IP] cannot hold [I] as it's a storage item of the same size!</span>")
return FALSE //To prevent the stacking of same sized storage items.
if(I.flags_1 & NODROP_1) //SHOULD be handled in unEquip, but better safe than sorry.
to_chat(M, "<span class='warning'>\the [I] is stuck to your hand, you can't put it in \the [parent]!</span>")
return FALSE
var/datum/component/storage/concrete/master = master()
if(!istype(master))
return FALSE
return master.slave_can_insert_object(src, I, stop_messages, M)
/datum/component/storage/proc/_insert_physical_item(obj/item/I, override = FALSE)
return FALSE
//This proc handles items being inserted. It does not perform any checks of whether an item can or can't be inserted. That's done by can_be_inserted()
//The stop_warning parameter will stop the insertion message from being displayed. It is intended for cases where you are inserting multiple items at once,
//such as when picking up all the items on a tile with one click.
/datum/component/storage/proc/handle_item_insertion(obj/item/I, prevent_warning = FALSE, mob/M, datum/component/storage/remote)
var/atom/parent = src.parent
var/datum/component/storage/concrete/master = master()
if(!istype(master))
return FALSE
if(silent)
prevent_warning = TRUE
if(M)
parent.add_fingerprint(M)
. = master.handle_item_insertion_from_slave(src, I, prevent_warning, M)
/datum/component/storage/proc/mob_item_insertion_feedback(mob/user, mob/M, obj/item/I, override = FALSE)
if(silent && !override)
return
if(rustle_sound)
playsound(parent, "rustle", 50, 1, -5)
for(var/mob/viewing in viewers(user, null))
if(M == viewing)
to_chat(usr, "<span class='notice'>You put [I] [insert_preposition]to [parent].</span>")
else if(in_range(M, viewing)) //If someone is standing close enough, they can tell what it is...
viewing.show_message("<span class='notice'>[M] puts [I] [insert_preposition]to [parent].</span>", 1)
else if(I && I.w_class >= 3) //Otherwise they can only see large or normal items from a distance...
viewing.show_message("<span class='notice'>[M] puts [I] [insert_preposition]to [parent].</span>", 1)
/datum/component/storage/proc/update_icon()
if(isobj(parent))
var/obj/O = parent
O.update_icon()
/datum/component/storage/proc/signal_insertion_attempt(obj/item/I, mob/M, silent = FALSE, force = FALSE)
if(!force && !can_be_inserted(I, TRUE, M))
return FALSE
return handle_item_insertion(I, silent, M)
/datum/component/storage/proc/signal_can_insert(obj/item/I, mob/M, silent = FALSE)
return can_be_inserted(I, silent, M)
/datum/component/storage/proc/show_to_ghost(mob/dead/observer/M)
return user_show_to_mob(M, TRUE)
/datum/component/storage/proc/signal_show_attempt(mob/showto, force = FALSE)
return user_show_to_mob(showto, force)
/datum/component/storage/proc/on_check()
return TRUE
/datum/component/storage/proc/check_locked()
return locked
/datum/component/storage/proc/signal_take_type(type, atom/destination, amount = INFINITY, check_adjacent = FALSE, force = FALSE, mob/user, list/inserted)
if(!force)
if(check_adjacent)
if(user)
if(!user.CanReach(destination) || !user.CanReach(parent))
return FALSE
else if(!destination.CanReachStorage(parent))
return FALSE
var/list/taking = typecache_filter_list(contents(), typecacheof(type))
if(length(taking) > amount)
taking.Cut(amount)
if(inserted) //duplicated code for performance, don't bother checking retval/checking for list every item.
for(var/i in taking)
if(remove_from_storage(i, destination))
inserted |= i
else
for(var/i in taking)
remove_from_storage(i, destination)
return TRUE
/datum/component/storage/proc/remaining_space_items()
var/atom/real_location = real_location()
return max(0, max_items - real_location.contents.len)
/datum/component/storage/proc/signal_fill_type(type, amount = 20, force = FALSE)
var/atom/real_location = real_location()
if(!force)
amount = min(remaining_space_items(), amount)
for(var/i in 1 to amount)
handle_item_insertion(new type(real_location), TRUE)
CHECK_TICK
return TRUE
/datum/component/storage/proc/on_attack_hand(mob/user)
var/atom/A = parent
if(!attack_hand_interact)
return
if(user.active_storage == src && A.loc == user) //if you're already looking inside the storage item
user.active_storage.close(user)
close(user)
. = COMPONENT_NO_ATTACK_HAND
return
if(rustle_sound)
playsound(A, "rustle", 50, 1, -5)
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(H.l_store == A && !H.get_active_held_item()) //Prevents opening if it's in a pocket.
. = COMPONENT_NO_ATTACK_HAND
H.put_in_hands(A)
H.l_store = null
return
if(H.r_store == A && !H.get_active_held_item())
. = COMPONENT_NO_ATTACK_HAND
H.put_in_hands(A)
H.r_store = null
return
if(A.loc == user)
. = COMPONENT_NO_ATTACK_HAND
show_to(user)
/datum/component/storage/proc/signal_on_pickup(mob/user)
var/atom/A = parent
update_actions()
for(var/mob/M in range(1, A))
if(M.active_storage == src)
close(M)
/datum/component/storage/proc/signal_take_obj(atom/movable/AM, new_loc, force = FALSE)
if(!(AM in real_location()))
return FALSE
return remove_from_storage(AM, new_loc)
/datum/component/storage/proc/signal_quick_empty(atom/loctarget)
return do_quick_empty(loctarget)
/datum/component/storage/proc/signal_hide_attempt(mob/target)
return hide_from(target)
/datum/component/storage/proc/on_alt_click(mob/user)
if(!isliving(user) || user.incapacitated() || !quickdraw || !user.CanReach(parent))
return
var/obj/item/I = locate() in real_location()
if(!I)
return
remove_from_storage(I, get_turf(user))
if(!user.put_in_hands(I))
to_chat(user, "<span class='notice'>You fumble for [I] and it falls on the floor.</span>")
return
user.visible_message("<span class='warning'>[user] draws [I] from [parent]!</span>", "<span class='notice'>You draw [I] from [parent].</span>")
/datum/component/storage/proc/gather_mode_switch(mob/user)
collection_mode = (collection_mode+1)%3
switch(collection_mode)
if(COLLECT_SAME)
to_chat(user, "[parent] now picks up all items of a single type at once.")
if(COLLECT_EVERYTHING)
to_chat(user, "[parent] now picks up all items in a tile at once.")
if(COLLECT_ONE)
to_chat(user, "[parent] now picks up one item at a time.")
+8 -8
View File
@@ -17,6 +17,14 @@
if(HasDisease(D))
return FALSE
var/can_infect = FALSE
for(var/host_type in D.infectable_biotypes)
if(host_type in mob_biotypes)
can_infect = TRUE
break
if(!can_infect)
return FALSE
if(!(type in D.viable_mobtypes))
return FALSE
@@ -132,14 +140,6 @@
if(has_trait(TRAIT_VIRUSIMMUNE) && !D.bypasses_immunity)
return FALSE
var/can_infect = FALSE
for(var/host_type in D.infectable_hosts)
if(host_type in dna.species.species_traits)
can_infect = TRUE
break
if(!can_infect)
return FALSE
for(var/thing in D.required_organs)
if(!((locate(thing) in bodyparts) || (locate(thing) in internal_organs)))
return FALSE
+2 -2
View File
@@ -30,7 +30,7 @@
var/list/required_organs = list()
var/needs_all_cures = TRUE
var/list/strain_data = list() //dna_spread special bullshit
var/list/infectable_hosts = list(SPECIES_ORGANIC) //if the disease can spread on organics, synthetics, or undead
var/list/infectable_biotypes = list(MOB_ORGANIC) //if the disease can spread on organics, synthetics, or undead
var/process_dead = FALSE //if this ticks while the host is dead
/datum/disease/Destroy()
@@ -139,7 +139,7 @@
var/static/list/copy_vars = list("name", "visibility_flags", "disease_flags", "spread_flags", "form", "desc", "agent", "spread_text",
"cure_text", "max_stages", "stage_prob", "viable_mobtypes", "cures", "infectivity", "cure_chance",
"bypasses_immunity", "permeability_mod", "severity", "required_organs", "needs_all_cures", "strain_data",
"infectable_hosts", "process_dead")
"infectable_biotypes", "process_dead")
var/datum/disease/D = new type()
for(var/V in copy_vars)
@@ -12,7 +12,7 @@
if(!..())
return
A.process_dead = TRUE
A.infectable_hosts |= SPECIES_UNDEAD
A.infectable_biotypes |= MOB_UNDEAD
/datum/symptom/inorganic_adaptation
name = "Inorganic Biology"
@@ -27,4 +27,4 @@
/datum/symptom/inorganic_adaptation/Start(datum/disease/advance/A)
if(!..())
return
A.infectable_hosts |= SPECIES_INORGANIC
A.infectable_biotypes |= MOB_INORGANIC
@@ -1,44 +0,0 @@
/*
//////////////////////////////////////
Weakness
Slightly noticeable.
Lowers resistance slightly.
Decreases stage speed moderately.
Decreases transmittablity moderately.
Moderate Level.
Bonus
Deals stamina damage to the host
//////////////////////////////////////
*/
/datum/symptom/weakness
name = "Weakness"
stealth = -1
resistance = -1
stage_speed = -2
transmittable = -2
level = 3
severity = 3
/datum/symptom/weakness/Activate(datum/disease/advance/A)
..()
if(prob(SYMPTOM_ACTIVATION_PROB))
var/mob/living/M = A.affected_mob
switch(A.stage)
if(1, 2)
to_chat(M, "<span class='warning'>[pick("You feel weak.", "You feel lazy.")]</span>")
if(3, 4)
to_chat(M, "<span class='warning'><b>[pick("You feel very frail.", "You think you might faint.")]</span>")
M.adjustStaminaLoss(15)
else
to_chat(M, "<span class='userdanger'>[pick("You feel tremendously weak!", "Your body trembles as exhaustion creeps over you.")]</span>")
M.adjustStaminaLoss(30)
if(M.getStaminaLoss() > 60 && !M.stat)
M.visible_message("<span class='warning'>[M] faints!</span>", "<span class='userdanger'>You swoon and faint...</span>")
M.AdjustSleeping(100)
return
+1 -1
View File
@@ -10,7 +10,7 @@
viable_mobtypes = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
desc = "If left untreated subject will regurgitate bees."
severity = DISEASE_SEVERITY_MEDIUM
infectable_hosts = list(SPECIES_ORGANIC, SPECIES_UNDEAD) //bees nesting in corpses
infectable_biotypes = list(MOB_ORGANIC, MOB_UNDEAD) //bees nesting in corpses
/datum/disease/beesease/stage_act()
..()
+1 -1
View File
@@ -10,7 +10,7 @@
permeability_mod = 0.75
desc = "This disease disrupts the magnetic field of your body, making it act as if a powerful magnet. Injections of iron help stabilize the field."
severity = DISEASE_SEVERITY_MEDIUM
infectable_hosts = list(SPECIES_ORGANIC, SPECIES_ROBOTIC)
infectable_biotypes = list(MOB_ORGANIC, MOB_ROBOTIC)
process_dead = TRUE
/datum/disease/magnitis/stage_act()
+1 -1
View File
@@ -11,7 +11,7 @@
viable_mobtypes = list(/mob/living/carbon/human)
desc = "Subject is possesed by the vengeful spirit of a parrot. Call the priest."
severity = DISEASE_SEVERITY_MEDIUM
infectable_hosts = list(SPECIES_ORGANIC, SPECIES_UNDEAD, SPECIES_INORGANIC, SPECIES_ROBOTIC)
infectable_biotypes = list(MOB_ORGANIC, MOB_UNDEAD, MOB_INORGANIC, MOB_ROBOTIC)
bypasses_immunity = TRUE //2spook
var/mob/living/simple_animal/parrot/Poly/ghost/parrot
+2 -2
View File
@@ -149,7 +149,7 @@
stage4 = list("<span class='danger'>Your skin feels very loose.</span>", "<span class='danger'>You can feel... something...inside you.</span>")
stage5 = list("<span class='danger'>Your skin feels as if it's about to burst off!</span>")
new_form = /mob/living/silicon/robot
infectable_hosts = list(SPECIES_ORGANIC, SPECIES_UNDEAD, SPECIES_ROBOTIC)
infectable_biotypes = list(MOB_ORGANIC, MOB_UNDEAD, MOB_ROBOTIC)
/datum/disease/transformation/robot/stage_act()
..()
@@ -263,4 +263,4 @@
stage4 = list("<span class='danger'>You're ravenous.</span>")
stage5 = list("<span class='danger'>You have become a morph.</span>")
new_form = /mob/living/simple_animal/hostile/morph
infectable_hosts = list(SPECIES_ORGANIC, SPECIES_INORGANIC, SPECIES_UNDEAD) //magic!
infectable_biotypes = list(MOB_ORGANIC, MOB_INORGANIC, MOB_UNDEAD) //magic!
+1
View File
@@ -11,6 +11,7 @@
/datum/mood_event/Destroy()
remove_effects()
return ..()
/datum/mood_event/proc/add_effects(param)
return
+4 -4
View File
@@ -56,13 +56,13 @@ GLOBAL_LIST_EMPTY(mutations_list)
/datum/mutation/human/proc/on_acquiring(mob/living/carbon/human/owner)
if(!owner || !istype(owner) || owner.stat == DEAD || (src in owner.dna.mutations))
return 1
return TRUE
if(species_allowed.len && !species_allowed.Find(owner.dna.species.id))
return 1
return TRUE
if(health_req && owner.health < health_req)
return 1
return TRUE
if(limb_req && !owner.get_bodypart(limb_req))
return 1
return TRUE
owner.dna.mutations.Add(src)
if(text_gain_indication)
to_chat(owner, text_gain_indication)
+10
View File
@@ -0,0 +1,10 @@
//Used in storage.
/datum/numbered_display
var/obj/item/sample_object
var/number
/datum/numbered_display/New(obj/item/sample, _number = 1)
if(!istype(sample))
qdel(src)
sample_object = sample
number = _number
+52
View File
@@ -21,6 +21,20 @@
mappath = "[prefix][shuttle_id].dmm"
. = ..()
/datum/map_template/shuttle/load(turf/T, centered)
. = ..()
if(!.)
return
var/list/turfs = block( locate(.[MAP_MINX], .[MAP_MINY], .[MAP_MINZ]),
locate(.[MAP_MAXX], .[MAP_MAXY], .[MAP_MAXZ]))
for(var/i in 1 to turfs.len)
var/turf/place = turfs[i]
if(istype(place, /turf/open/space)) // This assumes all shuttles are loaded in a single spot then moved to their real destination.
continue
if(length(place.baseturfs) < 2) // Some snowflake shuttle shit
continue
place.baseturfs.Insert(3, /turf/baseturf_skipover/shuttle)
//Whatever special stuff you want
/datum/map_template/shuttle/proc/on_bought()
return
@@ -60,7 +74,21 @@
port_id = "infiltrator"
can_be_bought = FALSE
/datum/map_template/shuttle/aux_base
port_id = "aux_base"
can_be_bought = FALSE
/datum/map_template/shuttle/escape_pod
port_id = "escape_pod"
can_be_bought = FALSE
/datum/map_template/shuttle/assault_pod
port_id = "assault_pod"
can_be_bought = FALSE
/datum/map_template/shuttle/pirate
port_id = "pirate"
can_be_bought = FALSE
// Shuttles start here:
@@ -355,3 +383,27 @@
/datum/map_template/shuttle/arrival/pubby
suffix = "pubby"
name = "arrival shuttle (Pubby)"
/datum/map_template/shuttle/arrival/omega
suffix = "omega"
name = "arrival shuttle (Omega)"
/datum/map_template/shuttle/aux_base/default
suffix = "default"
name = "auxilliary base (Default)"
/datum/map_template/shuttle/escape_pod/default
suffix = "default"
name = "escape pod (Default)"
/datum/map_template/shuttle/escape_pod/large
suffix = "large"
name = "escape pod (Large)"
/datum/map_template/shuttle/assault_pod/default
suffix = "default"
name = "assault pod (Default)"
/datum/map_template/shuttle/pirate/default
suffix = "default"
name = "pirate ship (Default)"
+1 -3
View File
@@ -53,9 +53,7 @@
if(!where)
where = "at your feet"
if(where == "in your backpack")
var/obj/item/storage/B = H.back
B.orient2hud(trait_holder)
B.show_to(trait_holder)
H.back.SendSignal(COMSIG_TRY_STORAGE_SHOW, H)
where_text = "<span class='boldnotice'>There is a precious family [heirloom.name] [where], passed down from generation to generation. Keep it safe!</span>"
/datum/trait/family_heirloom/post_add()
+27 -61
View File
@@ -52,7 +52,6 @@
var/safe = FALSE //Is the area teleport-safe: no space / radiation / aggresive mobs / other dangers
var/no_air = null
var/list/related // the other areas of the same type as this
var/parallax_movedir = 0
@@ -88,27 +87,10 @@ GLOBAL_LIST_EMPTY(teleportlocs)
// ===
// Added to fix mech fabs 05/2013 ~Sayu
// This is necessary due to lighting subareas. If you were to go in assuming that things in
// the same logical /area have the parent /area object... well, you would be mistaken. If you
// want to find machines, mobs, etc, in the same logical area, you will need to check all the
// related areas. This returns a master contents list to assist in that.
/proc/area_contents(area/A)
if(!istype(A))
return null
var/list/contents = list()
for(var/area/LSA in A.related)
contents += LSA.contents
return contents
/area/Initialize()
icon_state = ""
layer = AREA_LAYER
uid = ++global_uid
related = list(src)
map_name = name // Save the initial (the name set in the map) name of the area.
canSmoothWithAreas = typecacheof(canSmoothWithAreas)
@@ -195,11 +177,6 @@ GLOBAL_LIST_EMPTY(teleportlocs)
/area/proc/atmosalert(danger_level, obj/source)
if(danger_level != atmosalm)
if (danger_level==2)
var/list/cameras = list()
for(var/area/RA in related)
for (var/item in RA.cameras)
var/obj/machinery/camera/C = item
cameras += C
for (var/item in GLOB.silicon_mobs)
var/mob/living/silicon/aiPlayer = item
@@ -254,18 +231,12 @@ GLOBAL_LIST_EMPTY(teleportlocs)
if(always_unpowered == 1) //no fire alarms in space/asteroid
return
var/list/cameras = list()
for(var/area/RA in related)
if (!( RA.fire ))
RA.set_fire_alarm_effect()
RA.ModifyFiredoors(FALSE)
for(var/item in RA.firealarms)
var/obj/machinery/firealarm/F = item
F.update_icon()
for (var/item in RA.cameras)
var/obj/machinery/camera/C = item
cameras += C
if (!fire)
set_fire_alarm_effect()
ModifyFiredoors(FALSE)
for(var/item in firealarms)
var/obj/machinery/firealarm/F = item
F.update_icon()
for (var/item in GLOB.alert_consoles)
var/obj/machinery/computer/station_alert/a = item
@@ -283,15 +254,14 @@ GLOBAL_LIST_EMPTY(teleportlocs)
START_PROCESSING(SSobj, src)
/area/proc/firereset(obj/source)
for(var/area/RA in related)
if (RA.fire)
RA.fire = 0
RA.mouse_opacity = MOUSE_OPACITY_TRANSPARENT
RA.updateicon()
RA.ModifyFiredoors(TRUE)
for(var/item in RA.firealarms)
var/obj/machinery/firealarm/F = item
F.update_icon()
if (fire)
fire = 0
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
updateicon()
ModifyFiredoors(TRUE)
for(var/item in firealarms)
var/obj/machinery/firealarm/F = item
F.update_icon()
for (var/item in GLOB.silicon_mobs)
var/mob/living/silicon/aiPlayer = item
@@ -310,8 +280,7 @@ GLOBAL_LIST_EMPTY(teleportlocs)
/area/process()
if(firedoors_last_closed_on + 100 < world.time) //every 10 seconds
for(var/area/RA in related)
RA.ModifyFiredoors(FALSE)
ModifyFiredoors(FALSE)
/area/proc/close_and_lock_door(obj/machinery/door/DOOR)
set waitfor = FALSE
@@ -323,17 +292,11 @@ GLOBAL_LIST_EMPTY(teleportlocs)
if(always_unpowered == 1) //no burglar alarms in space/asteroid
return
var/list/cameras = list()
for(var/area/RA in related)
//Trigger alarm effect
RA.set_fire_alarm_effect()
//Lockdown airlocks
for(var/obj/machinery/door/DOOR in RA)
close_and_lock_door(DOOR)
for (var/item in RA.cameras)
var/obj/machinery/camera/C = item
cameras += C
//Trigger alarm effect
set_fire_alarm_effect()
//Lockdown airlocks
for(var/obj/machinery/door/DOOR in src)
close_and_lock_door(DOOR)
for (var/i in GLOB.silicon_mobs)
var/mob/living/silicon/SILICON = i
@@ -429,10 +392,9 @@ GLOBAL_LIST_EMPTY(teleportlocs)
// called when power status changes
/area/proc/power_change()
for(var/area/RA in related)
for(var/obj/machinery/M in RA) // for each machine in the area
M.power_change() // reverify power status (to update icons etc.)
RA.updateicon()
for(var/obj/machinery/M in src) // for each machine in the area
M.power_change() // reverify power status (to update icons etc.)
updateicon()
/area/proc/usage(chan)
var/used = 0
@@ -553,3 +515,7 @@ GLOBAL_LIST_EMPTY(teleportlocs)
/area/drop_location()
CRASH("Bad op: area/drop_location() called")
// A hook so areas can modify the incoming args
/area/proc/PlaceOnTopReact(list/new_baseturfs, turf/fake_turf_type, flags)
return flags
+7
View File
@@ -16,6 +16,13 @@
canSmoothWithAreas = type
. = ..()
/area/shuttle/PlaceOnTopReact(list/new_baseturfs, turf/fake_turf_type, flags)
. = ..()
if(length(new_baseturfs) > 1 || fake_turf_type)
return // More complicated larger changes indicate this isn't a player
if(ispath(new_baseturfs[1], /turf/open/floor/plating))
new_baseturfs.Insert(1, /turf/baseturf_skipover/shuttle)
////////////////////////////Multi-area shuttles////////////////////////////
////////////////////////////Syndicate infiltrator////////////////////////////
+21 -3
View File
@@ -387,13 +387,31 @@
return FALSE
/atom/proc/storage_contents_dump_act(obj/item/storage/src_object, mob/user)
return 0
if(GetComponent(/datum/component/storage))
return component_storage_contents_dump_act(src_object, user)
return FALSE
/atom/proc/component_storage_contents_dump_act(datum/component/storage/src_object, mob/user)
var/list/things = src_object.contents()
var/datum/progressbar/progress = new(user, things.len, src)
GET_COMPONENT(STR, /datum/component/storage)
while (do_after(user, 10, TRUE, src, FALSE, CALLBACK(STR, /datum/component/storage.proc/handle_mass_item_insertion, things, src_object, user, progress)))
stoplag(1)
qdel(progress)
to_chat(user, "<span class='notice'>You dump as much of [src_object.parent]'s contents into [STR.insert_preposition]to [src] as you can.</span>")
STR.orient2hud(user)
src_object.orient2hud(user)
if(user.active_storage) //refresh the HUD to show the transfered contents
user.active_storage.close(user)
user.active_storage.show_to(user)
return TRUE
/atom/proc/get_dumping_location(obj/item/storage/source,mob/user)
return null
//This proc is called on the location of an atom when the atom is Destroy()'d
/atom/proc/handle_atom_del(atom/A)
SendSignal(COMSIG_ATOM_CONTENTS_DEL, A)
//called when the turf the atom resides on is ChangeTurfed
/atom/proc/HandleTurfChange(turf/T)
@@ -526,8 +544,8 @@
/atom/Entered(atom/movable/AM, atom/oldLoc)
SendSignal(COMSIG_ATOM_ENTERED, AM, oldLoc)
/atom/Exited(atom/movable/AM)
SendSignal(COMSIG_ATOM_EXITED, AM)
/atom/Exited(atom/movable/AM, atom/newLoc)
SendSignal(COMSIG_ATOM_EXITED, AM, newLoc)
/atom/proc/return_temperature()
return
+11 -6
View File
@@ -492,12 +492,12 @@
if(spin)
SpinAnimation(5, 1)
SendSignal(COMSIG_MOVABLE_THROW, TT, spin)
SSthrowing.processing[src] = TT
if (SSthrowing.state == SS_PAUSED && length(SSthrowing.currentrun))
SSthrowing.currentrun[src] = TT
TT.tick()
/atom/movable/proc/handle_buckled_mob_movement(newloc,direct)
for(var/m in buckled_mobs)
var/mob/living/buckled_mob = m
@@ -514,6 +514,13 @@
return 1
return ..()
// called when this atom 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.
/atom/movable/proc/on_exit_storage(datum/component/storage/concrete/S)
return
// called when this atom is added into a storage item, which is passed on as S. The loc variable is already set to the storage item.
/atom/movable/proc/on_enter_storage(datum/component/storage/concrete/S)
return
/atom/movable/proc/get_spacemove_backup()
var/atom/movable/dense_object_backup
@@ -538,7 +545,7 @@
/atom/movable/proc/relay_container_resist(mob/living/user, obj/O)
return
// CITADEL CHANGE - adds final_pixel_y and final_pixel_x to do_attack_animation args // maybe not needed anymore we'll try it
/atom/movable/proc/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect)
if(!no_effect && (visual_effect_icon || used_item))
do_item_attack_animation(A, visual_effect_icon, used_item)
@@ -675,9 +682,8 @@
if(ismob(loc))
var/mob/M = loc
M.transferItemToLoc(src, targetturf, TRUE) //nodrops disks when?
else if(istype(loc, /obj/item/storage))
var/obj/item/storage/S = loc
S.remove_from_storage(src, targetturf)
else if(loc.SendSignal(COMSIG_CONTAINS_STORAGE))
loc.SendSignal(COMSIG_TRY_STORAGE_TAKE, src, targetturf, TRUE)
else
forceMove(targetturf)
// move the disc, so ghosts remain orbiting it even if it's "destroyed"
@@ -708,7 +714,6 @@
return FALSE
/* Language procs */
/atom/movable/proc/get_language_holder(shadow=TRUE)
if(language_holder)
@@ -21,7 +21,7 @@
strip_delay = 70
resistance_flags = NONE
permeability_coefficient = 0.05
pockets = /obj/item/storage/internal/pocket/shoes
pocket_storage_component_path = /datum/component/storage/concrete/pockets/shoes
//The super annoying version
/obj/item/clothing/shoes/clown_shoes/banana_shoes/combat
@@ -32,7 +32,7 @@
strip_delay = 70
resistance_flags = NONE
permeability_coefficient = 0.05
pockets = /obj/item/storage/internal/pocket/shoes
pocket_storage_component_path = /datum/component/storage/concrete/pockets/shoes
always_noslip = TRUE
var/max_recharge = 3000 //30 peels worth
var/recharge_rate = 34 //about 1/3 of a peel per tick
+45
View File
@@ -573,6 +573,8 @@ GLOBAL_LIST_EMPTY(possible_items_special)
return captured_amount >= target_amount
//Changeling Objectives
/datum/objective/absorb
/datum/objective/absorb/proc/gen_amount_goal(lowbound = 4, highbound = 6)
@@ -604,7 +606,47 @@ GLOBAL_LIST_EMPTY(possible_items_special)
absorbedcount += changeling.absorbedcount
return absorbedcount >= target_amount
/datum/objective/absorb_most
explanation_text = "Extract more compatible genomes than any other Changeling."
/datum/objective/absorb_most/check_completion()
var/list/datum/mind/owners = get_owners()
var/absorbedcount = 0
for(var/datum/mind/M in owners)
if(!M)
continue
var/datum/antagonist/changeling/changeling = M.has_antag_datum(/datum/antagonist/changeling)
if(!changeling || !changeling.stored_profiles)
continue
absorbedcount += changeling.absorbedcount
for(var/datum/antagonist/changeling/changeling2 in GLOB.antagonists)
if(!changeling2.owner || !changeling2.stored_profiles || changeling2.absorbedcount < absorbedcount)
continue
return FALSE
return TRUE
/datum/objective/absorb_changeling
explanation_text = "Absorb another Changeling."
/datum/objective/absorb_changeling/check_completion()
var/list/datum/mind/owners = get_owners()
for(var/datum/mind/M in owners)
if(!M)
continue
var/datum/antagonist/changeling/changeling = M.has_antag_datum(/datum/antagonist/changeling)
if(!changeling)
continue
var/total_genetic_points = changeling.geneticpoints
for(var/obj/effect/proc_holder/changeling/p in changeling.purchasedpowers)
total_genetic_points += p.dna_cost
if(total_genetic_points > initial(changeling.geneticpoints))
return TRUE
return FALSE
//End Changeling Objectives
/datum/objective/destroy
martyr_compatible = 1
@@ -829,3 +871,6 @@ GLOBAL_LIST_EMPTY(possible_items_special)
/datum/objective/changeling_team_objective/impersonate_department/impersonate_heads
explanation_text = "Have X or more heads of staff escape on the shuttle disguised as heads, while the real heads are dead"
command_staff_only = TRUE
+4 -4
View File
@@ -413,10 +413,10 @@ Class Procs:
var/obj/item/stack/SN = new SB.merge_type(null,used_amt)
component_parts += SN
else
W.remove_from_storage(B, src)
component_parts += B
B.moveToNullspace()
W.handle_item_insertion(A, 1)
if(W.SendSignal(COMSIG_TRY_STORAGE_TAKE, B, src))
component_parts += B
B.moveToNullspace()
W.SendSignal(COMSIG_TRY_STORAGE_INSERT, A, null, null, TRUE)
component_parts -= A
to_chat(user, "<span class='notice'>[A.name] replaced with [B.name].</span>")
shouldplaysound = 1 //Only play the sound when parts are actually replaced!
@@ -10,7 +10,6 @@
max_integrity = 200
integrity_failure = 100
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 40, "acid" = 20)
var/processing = FALSE
var/brightness_on = 2
var/icon_keyboard = "generic_key"
var/icon_screen = "generic"
+1 -1
View File
@@ -536,7 +536,7 @@
playsound(loc, 'sound/weapons/genhit.ogg', 100, 1)
var/turf/open/space/T
for(T in orange(1, src))
T.ChangeTurf(/turf/open/floor/plating/)
T.PlaceOnTop(/turf/open/floor/plating)
else
say("Something slams into the floor around [src] - luckily, it didn't get through!")
playsound(loc, 'sound/effects/bang.ogg', 50, 1)
+4 -1
View File
@@ -173,11 +173,14 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new)
results[++results.len] = list("name" = name, "assignment" = assignment, "ijob" = ijob, "life_status" = life_status, "oxydam" = oxydam, "toxdam" = toxdam, "burndam" = burndam, "brutedam" = brutedam, "area" = area, "pos_x" = pos_x, "pos_y" = pos_y, "can_track" = H.can_track(null))
data_by_z["[z]"] = results
data_by_z["[z]"] = sortTim(results,/proc/sensor_compare)
last_update["[z]"] = world.time
return results
/proc/sensor_compare(list/a,list/b)
return a["ijob"] - b["ijob"]
/datum/crewmonitor/ui_act(action,params)
var/mob/living/silicon/ai/AI = usr
if(!istype(AI))
+2 -2
View File
@@ -212,8 +212,8 @@
req_components[path] -= used_amt
else
added_components[part] = path
replacer.remove_from_storage(part, src)
req_components[path]--
if(replacer.SendSignal(COMSIG_TRY_STORAGE_TAKE, part, src))
req_components[path]--
for(var/obj/item/part in added_components)
if(istype(part,/obj/item/stack))
@@ -88,6 +88,9 @@
opacity = 0
glass = TRUE
/obj/machinery/door/airlock/engineering/glass/critical
critical_machine = TRUE //stops greytide virus from opening & bolting doors in critical positions, such as the SM chamber.
/obj/machinery/door/airlock/security/glass
opacity = 0
glass = TRUE
@@ -112,6 +115,9 @@
opacity = 0
glass = TRUE
/obj/machinery/door/airlock/atmos/glass/critical
critical_machine = TRUE //stops greytide virus from opening & bolting doors in critical positions, such as the SM chamber.
/obj/machinery/door/airlock/science/glass
opacity = 0
glass = TRUE
+2 -6
View File
@@ -287,9 +287,7 @@
A = A.loc
if (!( istype(A, /area) ))
return
for(var/area/RA in A.related)
RA.partyreset()
return
A.partyreset()
/obj/machinery/firealarm/partyalarm/alarm()
if (stat & (NOPOWER|BROKEN))
@@ -298,9 +296,7 @@
A = A.loc
if (!( istype(A, /area) ))
return
for(var/area/RA in A.related)
RA.partyalert()
return
A.partyalert()
/obj/machinery/firealarm/partyalarm/ui_data(mob/user)
. = ..()
+42 -23
View File
@@ -349,21 +349,8 @@ Possible to do for anyone motivated enough:
if(!istype(AI))
AI = null
if(!QDELETED(master) && !master.incapacitated() && master.client && (!AI || AI.eyeobj))//If there is an AI attached, it's not incapacitated, it has a client, and the client eye is centered on the projector.
if(is_operational())//If the machine has power.
if(AI) //ais are range based
if(get_dist(AI.eyeobj, src) <= holo_range)
continue
else
var/obj/machinery/holopad/pad_close = get_closest_atom(/obj/machinery/holopad, holopads, AI.eyeobj)
if(get_dist(pad_close, AI.eyeobj) <= holo_range)
var/obj/effect/overlay/holo_pad_hologram/h = masters[master]
unset_holo(master)
pad_close.set_holo(master, h)
continue
else
continue
clear_holo(master)//If not, we want to get rid of the hologram.
if(!is_operational() || !validate_user(master))
clear_holo(master)
if(outgoing_call)
outgoing_call.Check()
@@ -484,16 +471,48 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
SetLightsAndPower()
return TRUE
//Try to transfer hologram to another pad that can project on T
/obj/machinery/holopad/proc/transfer_to_nearby_pad(turf/T,mob/holo_owner)
var/obj/effect/overlay/holo_pad_hologram/h = masters[holo_owner]
if(!h || h.HC) //Holocalls can't change source.
return FALSE
for(var/pad in holopads)
var/obj/machinery/holopad/another = pad
if(another == src)
continue
if(another.validate_location(T))
unset_holo(holo_owner)
another.set_holo(holo_owner, h)
return TRUE
return FALSE
/obj/machinery/holopad/proc/validate_user(mob/living/user)
if(QDELETED(user) || user.incapacitated() || !user.client)
return FALSE
return TRUE
//Can we display holos there
//Area check instead of line of sight check because this is a called a lot if AI wants to move around.
/obj/machinery/holopad/proc/validate_location(turf/T,check_los = FALSE)
if(T.z == z && get_dist(T, src) <= holo_range && T.loc == get_area(src))
return TRUE
else
return FALSE
/obj/machinery/holopad/proc/move_hologram(mob/living/user, turf/new_turf)
if(LAZYLEN(masters) && masters[user])
var/area/holo_area = get_area(src)
if(new_turf.loc in holo_area.related)
var/obj/effect/overlay/holo_pad_hologram/holo = masters[user]
step_to(holo, new_turf)
holo.forceMove(new_turf)
update_holoray(user, new_turf)
else
clear_holo(user)
var/obj/effect/overlay/holo_pad_hologram/holo = masters[user]
var/transfered = FALSE
if(!validate_location(new_turf))
if(!transfer_to_nearby_pad(new_turf,user))
clear_holo(user)
return FALSE
else
transfered = TRUE
//All is good.
holo.forceMove(new_turf)
if(!transfered)
update_holoray(user,new_turf)
return TRUE
+5 -6
View File
@@ -41,13 +41,12 @@
. = ..()
on = !on
for(var/area/A in area.related)
A.lightswitch = on
A.updateicon()
area.lightswitch = on
area.updateicon()
for(var/obj/machinery/light_switch/L in A)
L.on = on
L.updateicon()
for(var/obj/machinery/light_switch/L in area)
L.on = on
L.updateicon()
area.power_change()
+1 -1
View File
@@ -317,7 +317,7 @@
add_overlay(picture_state)
#undef CHARS_PER_LINE
#undef FOND_SIZE
#undef FONT_SIZE
#undef FONT_COLOR
#undef FONT_STYLE
#undef SCROLL_SPEED
File diff suppressed because it is too large Load Diff
+5 -5
View File
@@ -1,8 +1,8 @@
#define MECHA_INT_FIRE 1
#define MECHA_INT_TEMP_CONTROL 2
#define MECHA_INT_SHORT_CIRCUIT 4
#define MECHA_INT_TANK_BREACH 8
#define MECHA_INT_CONTROL_LOST 16
#define MECHA_INT_FIRE (1<<0)
#define MECHA_INT_TEMP_CONTROL (1<<1)
#define MECHA_INT_SHORT_CIRCUIT (1<<2)
#define MECHA_INT_TANK_BREACH (1<<3)
#define MECHA_INT_CONTROL_LOST (1<<4)
#define MELEE 1
#define RANGED 2
+1 -1
View File
@@ -116,7 +116,7 @@
color = "#00ff80"
/obj/effect/countdown/supermatter/get_value()
var/obj/machinery/power/supermatter_shard/S = attached_to
var/obj/machinery/power/supermatter_crystal/S = attached_to
if(!istype(S))
return
return "<div align='center' valign='middle' style='position:relative; top:0px; left:0px'>[round(S.get_integrity(), 1)]%</div>"
+14 -85
View File
@@ -100,7 +100,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
var/force_string //string form of an item's force. Edit this var only to set a custom force string
var/last_force_string_check = 0
var/tip_timer
var/icon_override //CIT CHANGE - adds icon_override var. Will be removed with #4322
var/trigger_guard = TRIGGER_GUARD_NONE
@@ -281,10 +281,8 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
if(!(interaction_flags_item & INTERACT_ITEM_ATTACK_HAND_PICKUP)) //See if we're supposed to auto pickup.
return
if(istype(loc, /obj/item/storage))
//If the item is in a storage item, take it out
var/obj/item/storage/S = loc
S.remove_from_storage(src, user.loc)
//If the item is in a storage item, take it out
loc.SendSignal(COMSIG_TRY_STORAGE_TAKE, src, user.loc, TRUE)
if(throwing)
throwing.finalize(FALSE)
@@ -297,15 +295,16 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
if(!user.put_in_active_hand(src))
dropped(user)
/obj/item/proc/allow_attack_hand_drop(mob/user)
return TRUE
/obj/item/attack_paw(mob/user)
if(!user)
return
if(anchored)
return
if(istype(loc, /obj/item/storage))
var/obj/item/storage/S = loc
S.remove_from_storage(src, user.loc)
loc.SendSignal(COMSIG_TRY_STORAGE_TAKE, src, user.loc, TRUE)
if(throwing)
throwing.finalize(FALSE)
@@ -338,63 +337,6 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
R.activate_module(src)
R.hud_used.update_robot_modules_display()
// Due to storage type consolidation this should get used more now.
// I have cleaned it up a little, but it could probably use more. -Sayu
// The lack of ..() is intentional, do not add one
// added one, fuck the police
/obj/item/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/storage))
var/obj/item/storage/S = W
if(S.use_to_pickup)
if(S.collection_mode) //Mode is set to collect multiple items on a tile and we clicked on a valid one.
if(isturf(loc))
var/list/rejections = list()
var/list/things = loc.contents.Copy()
if (S.collection_mode == 2)
things = typecache_filter_list(things, typecacheof(type))
var/len = things.len
if(!len)
to_chat(user, "<span class='notice'>You failed to pick up anything with [S].</span>")
return
var/datum/progressbar/progress = new(user, len, loc)
while (do_after(user, 10, TRUE, S, FALSE, CALLBACK(src, .proc/handle_mass_pickup, S, things, loc, rejections, progress)))
stoplag(1)
qdel(progress)
to_chat(user, "<span class='notice'>You put everything you could [S.preposition] [S].</span>")
return
else if(S.can_be_inserted(src))
S.handle_item_insertion(src)
return
return ..()
/obj/item/proc/handle_mass_pickup(obj/item/storage/S, list/things, atom/thing_loc, list/rejections, datum/progressbar/progress)
for(var/obj/item/I in things)
things -= I
if(I.loc != thing_loc)
continue
if(I.type in rejections) // To limit bag spamming: any given type only complains once
continue
if(!S.can_be_inserted(I, stop_messages = TRUE)) // Note can_be_inserted still makes noise when the answer is no
if(S.contents.len >= S.storage_slots)
break
rejections += I.type // therefore full bags are still a little spammy
continue
S.handle_item_insertion(I, TRUE) //The 1 stops the "You put the [src] into [S]" insertion message from being displayed.
if (TICK_CHECK)
progress.update(progress.goal - things.len)
return TRUE
progress.update(progress.goal - things.len)
return FALSE
/obj/item/proc/GetDeconstructableContents()
return GetAllContents() - src
@@ -424,17 +366,6 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
SendSignal(COMSIG_ITEM_PICKUP, user)
item_flags |= IN_INVENTORY
/obj/item/proc/allow_attack_hand_drop(mob/user)
return TRUE
// 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/storage/S)
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/storage/S)
return
// called when "found" in pockets and storage items. Returns 1 if the search should end.
/obj/item/proc/on_found(mob/finder)
return
@@ -518,17 +449,17 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
if(isbrain(M))
to_chat(user, "<span class='danger'>You cannot locate any organic eyes on this brain!</span>")
return
if(user.getStaminaLoss() >= STAMINA_SOFTCRIT)//CIT CHANGE - makes eyestabbing impossible if you're in stamina softcrit
to_chat(user, "<span class='danger'>You're too exhausted for that.</span>")//CIT CHANGE - ditto
return //CIT CHANGE - ditto
src.add_fingerprint(user)
playsound(loc, src.hitsound, 30, 1, -1)
user.do_attack_animation(M)
user.adjustStaminaLossBuffered(10)//CIT CHANGE - makes eyestabbing cost stamina
if(M != user)
@@ -605,12 +536,10 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
/obj/item/proc/remove_item_from_storage(atom/newLoc) //please use this if you're going to snowflake an item out of a obj/item/storage
if(!newLoc)
return 0
if(istype(loc, /obj/item/storage))
var/obj/item/storage/S = loc
S.remove_from_storage(src,newLoc)
return 1
return 0
return FALSE
if(loc.SendSignal(COMSIG_CONTAINS_STORAGE))
return loc.SendSignal(COMSIG_TRY_STORAGE_TAKE, src, newLoc, TRUE)
return FALSE
/obj/item/proc/get_belt_overlay() //Returns the icon used for overlaying the object on a belt
return mutable_appearance('icons/obj/clothing/belt_overlays.dmi', icon_state)
+15 -17
View File
@@ -193,12 +193,11 @@
to_chat(usr, "<span class='warning'>The given name is too long. The area's name is unchanged.</span>")
return
set_area_machinery_title(A,str,prevname)
for(var/area/RA in A.related)
RA.name = str
if(RA.firedoors)
for(var/D in RA.firedoors)
var/obj/machinery/door/firedoor/FD = D
FD.CalculateAffectingAreas()
A.name = str
if(A.firedoors)
for(var/D in A.firedoors)
var/obj/machinery/door/firedoor/FD = D
FD.CalculateAffectingAreas()
to_chat(usr, "<span class='notice'>You rename the '[prevname]' to '[str]'.</span>")
log_game("[key_name(usr)] has renamed [prevname] to [str]")
A.update_areasize()
@@ -209,17 +208,16 @@
/obj/item/areaeditor/proc/set_area_machinery_title(area/A,title,oldtitle)
if(!oldtitle) // or replacetext goes to infinite loop
return
for(var/area/RA in A.related)
for(var/obj/machinery/airalarm/M in RA)
M.name = replacetext(M.name,oldtitle,title)
for(var/obj/machinery/power/apc/M in RA)
M.name = replacetext(M.name,oldtitle,title)
for(var/obj/machinery/atmospherics/components/unary/vent_scrubber/M in RA)
M.name = replacetext(M.name,oldtitle,title)
for(var/obj/machinery/atmospherics/components/unary/vent_pump/M in RA)
M.name = replacetext(M.name,oldtitle,title)
for(var/obj/machinery/door/M in RA)
M.name = replacetext(M.name,oldtitle,title)
for(var/obj/machinery/airalarm/M in A)
M.name = replacetext(M.name,oldtitle,title)
for(var/obj/machinery/power/apc/M in A)
M.name = replacetext(M.name,oldtitle,title)
for(var/obj/machinery/atmospherics/components/unary/vent_scrubber/M in A)
M.name = replacetext(M.name,oldtitle,title)
for(var/obj/machinery/atmospherics/components/unary/vent_pump/M in A)
M.name = replacetext(M.name,oldtitle,title)
for(var/obj/machinery/door/M in A)
M.name = replacetext(M.name,oldtitle,title)
//TODO: much much more. Unnamed airlocks, cameras, etc.
//Blueprint Subtypes
-46
View File
@@ -1,46 +0,0 @@
/obj/item/pie_cannon
name = "pie cannon"
desc = "Load cream pie for optimal results"
force = 10
icon_state = "piecannon"
item_state = "powerfist"
var/obj/item/reagent_containers/food/snacks/pie/loaded = null
/obj/item/pie_cannon/attackby(obj/item/I, mob/living/L)
if(istype(I, /obj/item/reagent_containers/food/snacks/pie))
if(!loaded)
L.transferItemToLoc(I, src)
loaded = I
to_chat(L, "<span class='notice'>You load the [I] into the [src]!</span>")
return
return ..()
/obj/item/pie_cannon/afterattack(atom/target, mob/living/user, flag, params)
if(!loaded)
return ..()
var/obj/item/projectile/pie/launched = new /obj/item/projectile/pie(src)
launched.P = loaded
loaded.forceMove(launched)
launched.appearance = loaded.appearance
loaded = null
launched.preparePixelProjectile(target, get_turf(target), user, params, 0)
launched.forceMove(get_turf(src))
launched.fire()
user.visible_message("<span class='danger'>[user] fires the [src] at [target]!</span>")
/obj/item/projectile/pie
name = "pie"
desc = "Think fast!"
var/obj/item/reagent_containers/food/snacks/pie/P = null
/obj/item/projectile/pie/on_hit(atom/A)
. = ..()
if(P)
A.visible_message("<span class='danger'>[P] smashes into [A] at high velocity!</span>")
P.forceMove(get_turf(A))
P.throw_impact(A)
if(ismovableatom(A))
var/atom/movable/AM = A
if(!AM.anchored)
AM.throw_at(get_edge_target_turf(get_dir(src, AM), 3, 2))
+7 -6
View File
@@ -458,13 +458,14 @@
icon = 'icons/obj/crayons.dmi'
icon_state = "crayonbox"
w_class = WEIGHT_CLASS_SMALL
storage_slots = 7
can_hold = list(
/obj/item/toy/crayon
)
/obj/item/storage/crayons/New()
..()
/obj/item/storage/crayons/Initialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
STR.max_items = 7
STR.can_hold = typecacheof(list(/obj/item/toy/crayon))
/obj/item/storage/crayons/PopulateContents()
new /obj/item/toy/crayon/red(src)
new /obj/item/toy/crayon/orange(src)
new /obj/item/toy/crayon/yellow(src)
+14 -14
View File
@@ -1,18 +1,18 @@
#define CART_SECURITY (1<<0)
#define CART_ENGINE (1<<1)
#define CART_ATMOS (1<<2)
#define CART_MEDICAL (1<<3)
#define CART_MANIFEST (1<<4)
#define CART_CLOWN (1<<5)
#define CART_MIME (1<<6)
#define CART_JANITOR (1<<7)
#define CART_SECURITY (1<<0)
#define CART_ENGINE (1<<1)
#define CART_ATMOS (1<<2)
#define CART_MEDICAL (1<<3)
#define CART_MANIFEST (1<<4)
#define CART_CLOWN (1<<5)
#define CART_MIME (1<<6)
#define CART_JANITOR (1<<7)
#define CART_REAGENT_SCANNER (1<<8)
#define CART_NEWSCASTER (1<<9)
#define CART_REMOTE_DOOR (1<<10)
#define CART_STATUS_DISPLAY (1<<11)
#define CART_QUARTERMASTER (1<<12)
#define CART_HYDROPONICS (1<<13)
#define CART_DRONEPHONE (1<<14)
#define CART_NEWSCASTER (1<<9)
#define CART_REMOTE_DOOR (1<<10)
#define CART_STATUS_DISPLAY (1<<11)
#define CART_QUARTERMASTER (1<<12)
#define CART_HYDROPONICS (1<<13)
#define CART_DRONEPHONE (1<<14)
/obj/item/cartridge
@@ -372,7 +372,10 @@
injection_chems = null //So they don't have all the same chems as the medihound!
/obj/item/storage/attackby(obj/item/device/dogborg/sleeper/K9, mob/user, proximity)
K9.afterattack(src, user ,1)
if(istype(K9))
K9.afterattack(src, user ,1)
else
. = ..()
/obj/item/device/dogborg/sleeper/K9/afterattack(var/atom/movable/target, mob/living/silicon/user, proximity)
hound = loc
@@ -421,7 +424,10 @@
var/max_item_count = 30
/obj/item/storage/attackby(obj/item/device/dogborg/sleeper/compactor, mob/user, proximity) //GIT CIRCUMVENTED YO!
compactor.afterattack(src, user ,1)
if(istype(compactor))
compactor.afterattack(src, user ,1)
else
. = ..()
/obj/item/device/dogborg/sleeper/compactor/afterattack(var/atom/movable/target, mob/living/silicon/user, proximity)//GARBO NOMS
hound = loc
+3 -3
View File
@@ -59,8 +59,8 @@
return
if(do_after(user,50, user))
to_chat(user, "<span class='notice'>You feel like you've got a good handle on [actionname]!</span>")
reading = FALSE
G.Grant(user)
reading = FALSE
/obj/item/book/granter/action/drink_fling
granted_action = /datum/action/innate/drink_fling
@@ -121,10 +121,10 @@
return
if(do_after(user,50, user))
to_chat(user, "<span class='notice'>You feel like you've experienced enough to cast [spellname]!</span>")
reading = FALSE
user.mind.AddSpell(S)
user.log_message("<font color='orange'>learned the spell [spellname] ([S]).</font>", INDIVIDUAL_ATTACK_LOG)
onlearned(user)
reading = FALSE
/obj/item/book/granter/spell/recoil(mob/user)
user.visible_message("<span class='warning'>[src] glows in a black light!</span>")
@@ -328,10 +328,10 @@
return
if(do_after(user,50, user))
to_chat(user, "[greet]")
reading = FALSE
MA.teach(user)
user.log_message("<font color='orange'>learned the martial art [martialname] ([MA]).</font>", INDIVIDUAL_ATTACK_LOG)
onlearned(user)
reading = FALSE
/obj/item/book/granter/martial/cqc
martial = /datum/martial_art/cqc
@@ -579,3 +579,7 @@
beakers += B1
beakers += B2
#undef READY
#undef WIRED
#undef EMPTY
+1 -5
View File
@@ -214,12 +214,8 @@
return
if(loc == AM)
return
if((istype(AM, /obj/item/storage/)) && !((istype(AM, /obj/item/storage/secure)) || (istype(AM, /obj/item/storage/lockbox)))) //If its storage but not secure storage OR a lockbox, then place it inside.
if(AM.SendSignal(COMSIG_CONTAINS_STORAGE) && !AM.SendSignal(COMSIG_IS_STORAGE_LOCKED))
return
if((istype(AM, /obj/item/storage/secure)) || (istype(AM, /obj/item/storage/lockbox)))
var/obj/item/storage/secure/S = AM
if(!S.locked) //Literal hacks, this works for lockboxes despite incorrect type casting, because they both share the locked var. But if its unlocked, place it inside, otherwise PLANTING C4!
return
to_chat(user, "<span class='notice'>You start planting the bomb...</span>")
@@ -1,46 +1,30 @@
/obj/item/storage/internal/implant
name = "bluespace pocket"
max_w_class = WEIGHT_CLASS_NORMAL
max_combined_w_class = 6
cant_hold = list(/obj/item/disk/nuclear)
silent = TRUE
/obj/item/implant/storage
name = "storage implant"
desc = "Stores up to two big items in a bluespace pocket."
icon_state = "storage"
item_color = "r"
var/obj/item/storage/internal/implant/storage
/obj/item/implant/storage/New()
..()
storage = new /obj/item/storage/internal/implant(src)
var/max_slot_stacking = 4
/obj/item/implant/storage/activate()
storage.MouseDrop(imp_in)
SendSignal(COMSIG_TRY_STORAGE_SHOW, imp_in, TRUE)
/obj/item/implant/storage/removed(source, silent = FALSE, special = 0)
if(..())
. = ..()
if(.)
if(!special)
storage.close_all()
for(var/obj/item/I in storage)
storage.remove_from_storage(I, get_turf(source))
return 1
qdel(GetComponent(/datum/component/storage/concrete/implant))
/obj/item/implant/storage/implant(mob/living/target, mob/user, silent = FALSE)
for(var/X in target.implants)
if(istype(X, type))
var/obj/item/implant/storage/imp_e = X
imp_e.storage.storage_slots += storage.storage_slots
imp_e.storage.max_combined_w_class += storage.max_combined_w_class
imp_e.storage.contents += storage.contents
storage.close_all()
storage.show_to(target)
qdel(src)
return 1
GET_COMPONENT_FROM(STR, /datum/component/storage, imp_e)
if(!STR || (STR && STR.max_items < max_slot_stacking))
imp_e.AddComponent(/datum/component/storage/concrete/implant)
qdel(src)
return TRUE
return FALSE
AddComponent(/datum/component/storage/concrete/implant)
return ..()
+3 -3
View File
@@ -216,13 +216,13 @@
w_class = WEIGHT_CLASS_BULKY
force = 0.001
armour_penetration = 1000
var/obj/machinery/power/supermatter_shard/shard
var/obj/machinery/power/supermatter_crystal/shard
var/balanced = 1
force_string = "INFINITE"
/obj/item/melee/supermatter_sword/Initialize()
. = ..()
shard = new /obj/machinery/power/supermatter_shard(src)
shard = new /obj/machinery/power/supermatter_crystal(src)
qdel(shard.countdown)
shard.countdown = null
START_PROCESSING(SSobj, src)
@@ -339,7 +339,7 @@
/obj/item/melee/roastingstick/Initialize()
. = ..()
if (!ovens)
ovens = typecacheof(list(/obj/singularity, /obj/machinery/power/supermatter_shard/crystal, /obj/structure/bonfire, /obj/structure/destructible/clockwork/massive/ratvar))
ovens = typecacheof(list(/obj/singularity, /obj/machinery/power/supermatter_crystal, /obj/structure/bonfire, /obj/structure/destructible/clockwork/massive/ratvar))
/obj/item/melee/roastingstick/attack_self(mob/user)
on = !on
+5 -1
View File
@@ -212,9 +212,13 @@
/obj/item/storage/backpack/bannerpack
name = "nanotrasen banner backpack"
desc = "It's a backpack with lots of extra room. A banner with Nanotrasen's logo is attached, that can't be removed."
max_combined_w_class = 27 //6 more then normal, for the tradeoff of declaring yourself an antag at all times.
icon_state = "bannerpack"
/obj/item/storage/backpack/bannerpack/Initialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
STR.max_combined_w_class = 27 //6 more then normal, for the tradeoff of declaring yourself an antag at all times.
/obj/item/storage/backpack/bannerpack/red
name = "red banner backpack"
desc = "It's a backpack with lots of extra room. A red banner is attached, that can't be removed."
+265 -186
View File
@@ -14,14 +14,20 @@
// if module is reset
var/one_use = FALSE
/obj/item/borg/upgrade/proc/action(mob/living/silicon/robot/R)
/obj/item/borg/upgrade/proc/action(mob/living/silicon/robot/R, user = usr)
if(R.stat == DEAD)
to_chat(usr, "<span class='notice'>[src] will not function on a deceased cyborg.</span>")
return 1
to_chat(user, "<span class='notice'>[src] will not function on a deceased cyborg.</span>")
return FALSE
if(module_type && !istype(R.module, module_type))
to_chat(R, "Upgrade mounting error! No suitable hardpoint detected!")
to_chat(usr, "There's no mounting point for the module!")
return 1
to_chat(user, "There's no mounting point for the module!")
return FALSE
return TRUE
/obj/item/borg/upgrade/proc/deactivate(mob/living/silicon/robot/R, user = usr)
if (!(src in R.upgrades))
return FALSE
return TRUE
/obj/item/borg/upgrade/rename
name = "cyborg reclassification board"
@@ -34,18 +40,13 @@
heldname = stripped_input(user, "Enter new robot name", "Cyborg Reclassification", heldname, MAX_NAME_LEN)
/obj/item/borg/upgrade/rename/action(mob/living/silicon/robot/R)
if(..())
return
var/oldname = R.real_name
R.custom_name = heldname
R.updatename()
if(oldname == R.real_name)
R.notify_ai(RENAME, oldname, R.real_name)
return 1
. = ..()
if(.)
var/oldname = R.real_name
R.custom_name = heldname
R.updatename()
if(oldname == R.real_name)
R.notify_ai(RENAME, oldname, R.real_name)
/obj/item/borg/upgrade/restart
name = "cyborg emergency reboot module"
@@ -53,10 +54,10 @@
icon_state = "cyborg_upgrade1"
one_use = TRUE
/obj/item/borg/upgrade/restart/action(mob/living/silicon/robot/R)
/obj/item/borg/upgrade/restart/action(mob/living/silicon/robot/R, user = usr)
if(R.health < 0)
to_chat(usr, "<span class='warning'>You have to repair the cyborg before using this module!</span>")
return 0
to_chat(user, "<span class='warning'>You have to repair the cyborg before using this module!</span>")
return FALSE
if(R.mind)
R.mind.grab_ghost()
@@ -64,25 +65,26 @@
R.revive()
return 1
/obj/item/borg/upgrade/vtec
name = "cyborg VTEC module"
desc = "Used to kick in a cyborg's VTEC systems, increasing their speed."
icon_state = "cyborg_upgrade2"
require_module = 1
/obj/item/borg/upgrade/vtec/action(mob/living/silicon/robot/R)
if(..())
return
if(R.speed < 0)
to_chat(R, "<span class='notice'>A VTEC unit is already installed!</span>")
to_chat(usr, "<span class='notice'>There's no room for another VTEC unit!</span>")
return
/obj/item/borg/upgrade/vtec/action(mob/living/silicon/robot/R, user = usr)
. = ..()
if(.)
if(R.speed < 0)
to_chat(R, "<span class='notice'>A VTEC unit is already installed!</span>")
to_chat(user, "<span class='notice'>There's no room for another VTEC unit!</span>")
return FALSE
R.speed = -2 // Gotta go fast.
R.speed = -2 // Gotta go fast.
return 1
/obj/item/borg/upgrade/vtec/deactivate(mob/living/silicon/robot/R, user = usr)
. = ..()
if (.)
R.speed = initial(R.speed)
/obj/item/borg/upgrade/disablercooler
name = "cyborg rapid disabler cooling module"
@@ -91,38 +93,46 @@
require_module = 1
module_type = /obj/item/robot_module/security
/obj/item/borg/upgrade/disablercooler/action(mob/living/silicon/robot/R)
if(..())
return
/obj/item/borg/upgrade/disablercooler/action(mob/living/silicon/robot/R, user = usr)
. = ..()
if(.)
var/obj/item/gun/energy/disabler/cyborg/T = locate() in R.module.modules
if(!T)
to_chat(user, "<span class='notice'>There's no disabler in this unit!</span>")
return FALSE
if(T.charge_delay <= 2)
to_chat(R, "<span class='notice'>A cooling unit is already installed!</span>")
to_chat(user, "<span class='notice'>There's no room for another cooling unit!</span>")
return FALSE
var/obj/item/gun/energy/disabler/cyborg/T = locate() in R.module.modules
if(!T)
to_chat(usr, "<span class='notice'>There's no disabler in this unit!</span>")
return
if(T.charge_delay <= 2)
to_chat(R, "<span class='notice'>A cooling unit is already installed!</span>")
to_chat(usr, "<span class='notice'>There's no room for another cooling unit!</span>")
return
T.charge_delay = max(2 , T.charge_delay - 4)
T.charge_delay = max(2 , T.charge_delay - 4)
return 1
/obj/item/borg/upgrade/disablercooler/deactivate(mob/living/silicon/robot/R, user = usr)
. = ..()
if (.)
var/obj/item/gun/energy/disabler/cyborg/T = locate() in R.module.modules
if(!T)
return FALSE
T.charge_delay = initial(T.charge_delay)
/obj/item/borg/upgrade/thrusters
name = "ion thruster upgrade"
desc = "An energy-operated thruster system for cyborgs."
icon_state = "cyborg_upgrade3"
/obj/item/borg/upgrade/thrusters/action(mob/living/silicon/robot/R)
if(..())
return
/obj/item/borg/upgrade/thrusters/action(mob/living/silicon/robot/R, user = usr)
. = ..()
if(.)
if(R.ionpulse)
to_chat(user, "<span class='notice'>This unit already has ion thrusters installed!</span>")
return FALSE
if(R.ionpulse)
to_chat(usr, "<span class='notice'>This unit already has ion thrusters installed!</span>")
return
R.ionpulse = TRUE
R.ionpulse = TRUE
return 1
/obj/item/borg/upgrade/thrusters/deactivate(mob/living/silicon/robot/R, user = usr)
. = ..()
if (.)
R.ionpulse = FALSE
/obj/item/borg/upgrade/ddrill
name = "mining cyborg diamond drill"
@@ -131,19 +141,30 @@
require_module = 1
module_type = /obj/item/robot_module/miner
/obj/item/borg/upgrade/ddrill/action(mob/living/silicon/robot/R)
if(..())
return
/obj/item/borg/upgrade/ddrill/action(mob/living/silicon/robot/R, user = usr)
. = ..()
if(.)
for(var/obj/item/pickaxe/drill/cyborg/D in R.module)
R.module.remove_module(D, TRUE)
for(var/obj/item/shovel/S in R.module)
R.module.remove_module(S, TRUE)
for(var/obj/item/pickaxe/drill/cyborg/D in R.module)
R.module.remove_module(D, TRUE)
for(var/obj/item/shovel/S in R.module)
R.module.remove_module(S, TRUE)
var/obj/item/pickaxe/drill/cyborg/diamond/DD = new /obj/item/pickaxe/drill/cyborg/diamond(R.module)
R.module.basic_modules += DD
R.module.add_module(DD, FALSE, TRUE)
var/obj/item/pickaxe/drill/cyborg/diamond/DD = new /obj/item/pickaxe/drill/cyborg/diamond(R.module)
R.module.basic_modules += DD
R.module.add_module(DD, FALSE, TRUE)
return 1
/obj/item/borg/upgrade/ddrill/deactivate(mob/living/silicon/robot/R, user = usr)
. = ..()
if (.)
for(var/obj/item/pickaxe/drill/cyborg/diamond/DD in R.module)
R.module.remove_module(DD, TRUE)
var/obj/item/pickaxe/drill/cyborg/D = new (R.module)
R.module.basic_modules += D
R.module.add_module(D, FALSE, TRUE)
var/obj/item/shovel/S = new (R.module)
R.module.basic_modules += S
R.module.add_module(S, FALSE, TRUE)
/obj/item/borg/upgrade/soh
name = "mining cyborg satchel of holding"
@@ -153,16 +174,24 @@
module_type = /obj/item/robot_module/miner
/obj/item/borg/upgrade/soh/action(mob/living/silicon/robot/R)
if(..())
return
. = ..()
if(.)
for(var/obj/item/storage/bag/ore/cyborg/S in R.module)
R.module.remove_module(S, TRUE)
for(var/obj/item/storage/bag/ore/cyborg/S in R.module)
R.module.remove_module(S, TRUE)
var/obj/item/storage/bag/ore/holding/H = new /obj/item/storage/bag/ore/holding(R.module)
R.module.basic_modules += H
R.module.add_module(H, FALSE, TRUE)
var/obj/item/storage/bag/ore/holding/H = new /obj/item/storage/bag/ore/holding(R.module)
R.module.basic_modules += H
R.module.add_module(H, FALSE, TRUE)
return 1
/obj/item/borg/upgrade/soh/deactivate(mob/living/silicon/robot/R, user = usr)
. = ..()
if (.)
for(var/obj/item/storage/bag/ore/holding/H in R.module)
R.module.remove_module(H, TRUE)
var/obj/item/storage/bag/ore/cyborg/S = new (R.module)
R.module.basic_modules += S
R.module.add_module(S, FALSE, TRUE)
/obj/item/borg/upgrade/syndicate
name = "illegal equipment module"
@@ -170,16 +199,20 @@
icon_state = "cyborg_upgrade3"
require_module = 1
/obj/item/borg/upgrade/syndicate/action(mob/living/silicon/robot/R)
if(..())
return
/obj/item/borg/upgrade/syndicate/action(mob/living/silicon/robot/R, user = usr)
. = ..()
if(.)
if(R.emagged)
return FALSE
if(R.emagged)
return
R.SetEmagged(1)
R.SetEmagged(1)
return TRUE
return 1
/obj/item/borg/upgrade/syndicate/deactivate(mob/living/silicon/robot/R, user = usr)
. = ..()
if (.)
R.SetEmagged(FALSE)
/obj/item/borg/upgrade/lavaproof
name = "mining cyborg lavaproof tracks"
@@ -189,11 +222,15 @@
require_module = 1
module_type = /obj/item/robot_module/miner
/obj/item/borg/upgrade/lavaproof/action(mob/living/silicon/robot/R)
if(..())
return
R.weather_immunities += "lava"
return 1
/obj/item/borg/upgrade/lavaproof/action(mob/living/silicon/robot/R, user = usr)
. = ..()
if(.)
R.weather_immunities += "lava"
/obj/item/borg/upgrade/lavaproof/deactivate(mob/living/silicon/robot/R, user = usr)
. = ..()
if (.)
R.weather_immunities -= "lava"
/obj/item/borg/upgrade/selfrepair
name = "self-repair module"
@@ -208,20 +245,26 @@
var/mob/living/silicon/robot/cyborg
var/datum/action/toggle_action
/obj/item/borg/upgrade/selfrepair/action(mob/living/silicon/robot/R)
if(..())
return
/obj/item/borg/upgrade/selfrepair/action(mob/living/silicon/robot/R, user = usr)
. = ..()
if(.)
var/obj/item/borg/upgrade/selfrepair/U = locate() in R
if(U)
to_chat(user, "<span class='warning'>This unit is already equipped with a self-repair module.</span>")
return FALSE
var/obj/item/borg/upgrade/selfrepair/U = locate() in R
if(U)
to_chat(usr, "<span class='warning'>This unit is already equipped with a self-repair module.</span>")
return 0
cyborg = R
icon_state = "selfrepair_off"
toggle_action = new /datum/action/item_action/toggle(src)
toggle_action.Grant(R)
cyborg = R
icon_state = "selfrepair_off"
toggle_action = new /datum/action/item_action/toggle(src)
toggle_action.Grant(R)
return 1
/obj/item/borg/upgrade/selfrepair/deactivate(mob/living/silicon/robot/R, user = usr)
. = ..()
if (.)
toggle_action.Remove(cyborg)
QDEL_NULL(toggle_action)
cyborg = null
deactivate_sr()
/obj/item/borg/upgrade/selfrepair/dropped()
addtimer(CALLBACK(src, .proc/check_dropped), 1)
@@ -231,7 +274,7 @@
toggle_action.Remove(cyborg)
QDEL_NULL(toggle_action)
cyborg = null
deactivate()
deactivate_sr()
/obj/item/borg/upgrade/selfrepair/ui_action_click()
on = !on
@@ -252,7 +295,7 @@
else
icon_state = "cyborg_upgrade5"
/obj/item/borg/upgrade/selfrepair/proc/deactivate()
/obj/item/borg/upgrade/selfrepair/proc/deactivate_sr()
STOP_PROCESSING(SSobj, src)
on = FALSE
update_icon()
@@ -265,12 +308,12 @@
if(cyborg && (cyborg.stat != DEAD) && on)
if(!cyborg.cell)
to_chat(cyborg, "<span class='warning'>Self-repair module deactivated. Please, insert the power cell.</span>")
deactivate()
deactivate_sr()
return
if(cyborg.cell.charge < powercost * 2)
to_chat(cyborg, "<span class='warning'>Self-repair module deactivated. Please recharge.</span>")
deactivate()
deactivate_sr()
return
if(cyborg.health < cyborg.maxHealth)
@@ -297,7 +340,7 @@
to_chat(cyborg, "<span class='notice'>Self-repair is active in <span class='boldnotice'>[msgmode]</span> mode.</span>")
msg_cooldown = world.time
else
deactivate()
deactivate_sr()
/obj/item/borg/upgrade/hypospray
name = "medical cyborg hypospray advanced synthesiser"
@@ -308,15 +351,21 @@
module_type = /obj/item/robot_module/medical
var/list/additional_reagents = list()
/obj/item/borg/upgrade/hypospray/action(mob/living/silicon/robot/R)
if(..())
return
for(var/obj/item/reagent_containers/borghypo/H in R.module.modules)
if(H.accepts_reagent_upgrades)
for(var/re in additional_reagents)
H.add_reagent(re)
/obj/item/borg/upgrade/hypospray/action(mob/living/silicon/robot/R, user = usr)
. = ..()
if(.)
for(var/obj/item/reagent_containers/borghypo/H in R.module.modules)
if(H.accepts_reagent_upgrades)
for(var/re in additional_reagents)
H.add_reagent(re)
return 1
/obj/item/borg/upgrade/hypospray/deactivate(mob/living/silicon/robot/R, user = usr)
. = ..()
if (.)
for(var/obj/item/reagent_containers/borghypo/H in R.module.modules)
if(H.accepts_reagent_upgrades)
for(var/re in additional_reagents)
H.del_reagent(re)
/obj/item/borg/upgrade/hypospray/expanded
name = "medical cyborg expanded hypospray"
@@ -338,19 +387,22 @@
pierce armor and thick material."
icon_state = "cyborg_upgrade3"
/obj/item/borg/upgrade/piercing_hypospray/action(mob/living/silicon/robot/R)
if(..())
return
/obj/item/borg/upgrade/piercing_hypospray/action(mob/living/silicon/robot/R, user = usr)
. = ..()
if(.)
var/found_hypo = FALSE
for(var/obj/item/reagent_containers/borghypo/H in R.module.modules)
H.bypass_protection = TRUE
found_hypo = TRUE
var/found_hypo = FALSE
for(var/obj/item/reagent_containers/borghypo/H in R.module.modules)
H.bypass_protection = TRUE
found_hypo = TRUE
if(!found_hypo)
return FALSE
if(!found_hypo)
return
return 1
/obj/item/borg/upgrade/piercing_hypospray/deactivate(mob/living/silicon/robot/R, user = usr)
. = ..()
if (.)
for(var/obj/item/reagent_containers/borghypo/H in R.module.modules)
H.bypass_protection = initial(H.bypass_protection)
/obj/item/borg/upgrade/defib
name = "medical cyborg defibrillator"
@@ -360,66 +412,81 @@
require_module = 1
module_type = /obj/item/robot_module/medical
/obj/item/borg/upgrade/defib/action(mob/living/silicon/robot/R)
if(..())
return
/obj/item/borg/upgrade/defib/action(mob/living/silicon/robot/R, user = usr)
. = ..()
if(.)
var/obj/item/twohanded/shockpaddles/cyborg/S = new(R.module)
R.module.basic_modules += S
R.module.add_module(S, FALSE, TRUE)
var/obj/item/twohanded/shockpaddles/cyborg/S = new(R.module)
R.module.basic_modules += S
R.module.add_module(S, FALSE, TRUE)
return 1
/obj/item/borg/upgrade/defib/deactivate(mob/living/silicon/robot/R, user = usr)
. = ..()
if (.)
var/obj/item/twohanded/shockpaddles/cyborg/S = locate() in R.module
R.module.remove_module(S, TRUE)
/obj/item/borg/upgrade/ai
name = "B.O.R.I.S. module"
desc = "Bluespace Optimized Remote Intelligence Synchronization. An uplink device which takes the place of an MMI in cyborg endoskeletons, creating a robotic shell controlled by an AI."
icon_state = "boris"
/obj/item/borg/upgrade/ai/action(mob/living/silicon/robot/R)
if(..())
return
if(R.shell)
to_chat(usr, "<span class='warning'>This unit is already an AI shell!</span>")
return
if(R.key) //You cannot replace a player unless the key is completely removed.
to_chat(usr, "<span class='warning'>Intelligence patterns detected in this [R.braintype]. Aborting.</span>")
return
/obj/item/borg/upgrade/ai/action(mob/living/silicon/robot/R, user = usr)
. = ..()
if(.)
if(R.shell)
to_chat(user, "<span class='warning'>This unit is already an AI shell!</span>")
return FALSE
if(R.key) //You cannot replace a player unless the key is completely removed.
to_chat(user, "<span class='warning'>Intelligence patterns detected in this [R.braintype]. Aborting.</span>")
return FALSE
R.make_shell(src)
return TRUE
R.make_shell(src)
/obj/item/borg/upgrade/ai/deactivate(mob/living/silicon/robot/R, user = usr)
. = ..()
if (.)
if(R.shell)
R.undeploy()
R.notify_ai(AI_SHELL)
/obj/item/borg/upgrade/expand
name = "borg expander"
desc = "A cyborg resizer, it makes a cyborg huge."
icon_state = "cyborg_upgrade3"
/obj/item/borg/upgrade/expand/action(mob/living/silicon/robot/R)
if(..())
return
/obj/item/borg/upgrade/expand/action(mob/living/silicon/robot/R, user = usr)
. = ..()
if(.)
if(R.hasExpanded)
to_chat(usr, "<span class='notice'>This unit already has an expand module installed!</span>")
return
if(R.hasExpanded)
to_chat(usr, "<span class='notice'>This unit already has an expand module installed!</span>")
return FALSE
R.notransform = TRUE
var/prev_lockcharge = R.lockcharge
R.SetLockdown(1)
R.anchored = TRUE
var/datum/effect_system/smoke_spread/smoke = new
smoke.set_up(1, R.loc)
smoke.start()
sleep(2)
for(var/i in 1 to 4)
playsound(R, pick('sound/items/drill_use.ogg', 'sound/items/jaws_cut.ogg', 'sound/items/jaws_pry.ogg', 'sound/items/welder.ogg', 'sound/items/ratchet.ogg'), 80, 1, -1)
sleep(12)
if(!prev_lockcharge)
R.SetLockdown(0)
R.anchored = FALSE
R.notransform = FALSE
R.resize = 2
R.hasExpanded = TRUE
R.update_transform()
return TRUE
R.notransform = TRUE
var/prev_lockcharge = R.lockcharge
R.SetLockdown(1)
R.anchored = TRUE
var/datum/effect_system/smoke_spread/smoke = new
smoke.set_up(1, R.loc)
smoke.start()
sleep(2)
for(var/i in 1 to 4)
playsound(R, pick('sound/items/drill_use.ogg', 'sound/items/jaws_cut.ogg', 'sound/items/jaws_pry.ogg', 'sound/items/welder.ogg', 'sound/items/ratchet.ogg'), 80, 1, -1)
sleep(12)
if(!prev_lockcharge)
R.SetLockdown(0)
R.anchored = FALSE
R.notransform = FALSE
R.resize = 2
R.hasExpanded = TRUE
R.update_transform()
/obj/item/borg/upgrade/expand/deactivate(mob/living/silicon/robot/R, user = usr)
. = ..()
if (.)
R.resize = 0.5
R.hasExpanded = FALSE
R.update_transform()
/obj/item/borg/upgrade/rped
name = "engineering cyborg RPED"
@@ -429,19 +496,25 @@
require_module = TRUE
module_type = /obj/item/robot_module/engineering
/obj/item/borg/upgrade/rped/action(mob/living/silicon/robot/R)
if(..())
return
/obj/item/borg/upgrade/rped/action(mob/living/silicon/robot/R, user = usr)
. = ..()
if(.)
var/obj/item/storage/part_replacer/cyborg/RPED = locate() in R
if(RPED)
to_chat(usr, "<span class='warning'>This unit is already equipped with a RPED module.</span>")
return FALSE
var/obj/item/storage/part_replacer/cyborg/RPED = locate() in R
if(RPED)
to_chat(user, "<span class='warning'>This unit is already equipped with a RPED module.</span>")
return FALSE
RPED = new(R.module)
R.module.basic_modules += RPED
R.module.add_module(RPED, FALSE, TRUE)
return TRUE
RPED = new(R.module)
R.module.basic_modules += RPED
R.module.add_module(RPED, FALSE, TRUE)
/obj/item/borg/upgrade/rped/deactivate(mob/living/silicon/robot/R, user = usr)
. = ..()
if (.)
var/obj/item/storage/part_replacer/cyborg/RPED = locate() in R.module
if (RPED)
R.module.remove_module(RPED, TRUE)
/obj/item/borg/upgrade/pinpointer
name = "medical cyborg crew pinpointer"
@@ -451,16 +524,22 @@
require_module = TRUE
module_type = /obj/item/robot_module/medical
/obj/item/borg/upgrade/pinpointer/action(mob/living/silicon/robot/R)
if(..())
return
/obj/item/borg/upgrade/pinpointer/action(mob/living/silicon/robot/R, user = usr)
. = ..()
if(.)
var/obj/item/pinpointer/crew/PP = locate() in R
if(PP)
to_chat(usr, "<span class='warning'>This unit is already equipped with a pinpointer module.</span>")
return FALSE
var/obj/item/pinpointer/crew/PP = locate() in R
if(PP)
to_chat(user, "<span class='warning'>This unit is already equipped with a pinpointer module.</span>")
return FALSE
PP = new(R.module)
R.module.basic_modules += PP
R.module.add_module(PP, FALSE, TRUE)
return TRUE
PP = new(R.module)
R.module.basic_modules += PP
R.module.add_module(PP, FALSE, TRUE)
/obj/item/borg/upgrade/pinpointer/deactivate(mob/living/silicon/robot/R, user = usr)
. = ..()
if (.)
var/obj/item/pinpointer/crew/PP = locate() in R.module
if (PP)
R.module.remove_module(PP, TRUE)
+1 -1
View File
@@ -415,4 +415,4 @@
/datum/stack_recipe_list/New(title, recipes)
src.title = title
src.recipes = recipes
src.recipes = recipes
+53 -77
View File
@@ -18,32 +18,42 @@
righthand_file = 'icons/mob/inhands/equipment/backpack_righthand.dmi'
w_class = WEIGHT_CLASS_BULKY
slot_flags = SLOT_BACK //ERROOOOO
max_w_class = WEIGHT_CLASS_NORMAL
max_combined_w_class = 21
storage_slots = 21
resistance_flags = NONE
max_integrity = 300
/obj/item/storage/backpack/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
STR.max_combined_w_class = 21
STR.max_w_class = WEIGHT_CLASS_NORMAL
STR.max_items = 21
/*
* Backpack Types
*/
/obj/item/storage/backpack/old
max_combined_w_class = 12
/obj/item/storage/backpack/old/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
STR.max_combined_w_class = 12
/obj/item/storage/backpack/holding
name = "bag of holding"
desc = "A backpack that opens into a localized pocket of Blue Space."
icon_state = "holdingpack"
item_state = "holdingpack"
max_w_class = WEIGHT_CLASS_GIGANTIC
max_combined_w_class = 35
resistance_flags = FIRE_PROOF
flags_2 = NO_MAT_REDEMPTION_2
var/pshoom = 'sound/items/pshoom.ogg'
var/alt_sound = 'sound/items/pshoom_2.ogg'
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 60, "acid" = 50)
component_type = /datum/component/storage/concrete/bluespace/bag_of_holding
/obj/item/storage/backpack/holding/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
STR.allow_big_nesting = TRUE
STR.max_w_class = WEIGHT_CLASS_GIGANTIC
STR.max_combined_w_class = 35
/obj/item/storage/backpack/holding/suicide_act(mob/living/user)
user.visible_message("<span class='suicide'>[user] is jumping into [src]! It looks like [user.p_theyre()] trying to commit suicide.</span>")
@@ -54,57 +64,23 @@
qdel(user)
return
/obj/item/storage/backpack/holding/dump_content_at(atom/dest_object, mob/user)
if(Adjacent(user))
var/atom/dumping_location = dest_object.get_dumping_location()
if(get_dist(user, dumping_location) < 8)
if(dumping_location.storage_contents_dump_act(src, user))
if(alt_sound && prob(1))
playsound(src, alt_sound, 40, 1)
else
playsound(src, pshoom, 40, 1)
user.Beam(dumping_location,icon_state="rped_upgrade",time=5)
return 1
to_chat(user, "The [src.name] buzzes.")
playsound(src, 'sound/machines/buzz-sigh.ogg', 50, 0)
return 0
/obj/item/storage/backpack/holding/handle_item_insertion(obj/item/W, prevent_warning = 0, mob/living/user)
if((istype(W, /obj/item/storage/backpack/holding) || count_by_type(W.GetAllContents(), /obj/item/storage/backpack/holding)))
var/turf/loccheck = get_turf(src)
if(is_reebe(loccheck.z))
user.visible_message("<span class='warning'>An unseen force knocks [user] to the ground!</span>", "<span class='big_brass'>\"I think not!\"</span>")
user.Knockdown(60)
return
var/safety = alert(user, "Doing this will have extremely dire consequences for the station and its crew. Be sure you know what you're doing.", "Put in [name]?", "Proceed", "Abort")
if(safety == "Abort" || !in_range(src, user) || !src || !W || user.incapacitated())
return
investigate_log("has become a singularity. Caused by [user.key]", INVESTIGATE_SINGULO)
to_chat(user, "<span class='danger'>The Bluespace interfaces of the two devices catastrophically malfunction!</span>")
qdel(W)
var/obj/singularity/singulo = new /obj/singularity (get_turf(src))
singulo.energy = 300 //should make it a bit bigger~
message_admins("[key_name_admin(user)] detonated a bag of holding")
log_game("[key_name(user)] detonated a bag of holding")
qdel(src)
singulo.process()
return
. = ..()
/obj/item/storage/backpack/holding/singularity_act(current_size)
var/dist = max((current_size - 2),1)
explosion(src.loc,(dist),(dist*2),(dist*4))
return
/obj/item/storage/backpack/santabag
name = "Santa's Gift Bag"
desc = "Space Santa uses this to deliver toys to all the nice children in space in Christmas! Wow, it's pretty big!"
icon_state = "giftbag0"
item_state = "giftbag"
w_class = WEIGHT_CLASS_BULKY
max_w_class = WEIGHT_CLASS_NORMAL
max_combined_w_class = 60
/obj/item/storage/backpack/santabag/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
STR.max_w_class = WEIGHT_CLASS_NORMAL
STR.max_combined_w_class = 60
/obj/item/storage/backpack/santabag/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] places [src] over their head and pulls it tight! It looks like they aren't in the Christmas spirit...</span>")
@@ -151,7 +127,6 @@
desc = "It's a special backpack made exclusively for Nanotrasen officers."
icon_state = "captainpack"
item_state = "captainpack"
resistance_flags = NONE
/obj/item/storage/backpack/industrial
name = "industrial backpack"
@@ -183,7 +158,6 @@
desc = "A specially designed backpack. It's fire resistant and smells vaguely of plasma."
icon_state = "toxpack"
item_state = "toxpack"
resistance_flags = NONE
/obj/item/storage/backpack/virology
name = "virology backpack"
@@ -191,7 +165,6 @@
icon_state = "viropack"
item_state = "viropack"
/*
* Satchel Types
*/
@@ -206,7 +179,6 @@
name = "leather satchel"
desc = "It's a very fancy satchel made with fine leather."
icon_state = "satchel"
resistance_flags = NONE
/obj/item/storage/backpack/satchel/leather/withwallet/PopulateContents()
new /obj/item/storage/wallet/random(src)
@@ -216,7 +188,6 @@
desc = "A tough satchel with extra pockets."
icon_state = "satchel-eng"
item_state = "engiepack"
resistance_flags = NONE
/obj/item/storage/backpack/satchel/med
name = "medical satchel"
@@ -247,7 +218,6 @@
desc = "Useful for holding research materials."
icon_state = "satchel-tox"
item_state = "satchel-tox"
resistance_flags = NONE
/obj/item/storage/backpack/satchel/hyd
name = "botanist satchel"
@@ -272,18 +242,26 @@
desc = "An exclusive satchel for Nanotrasen officers."
icon_state = "satchel-cap"
item_state = "captainpack"
resistance_flags = NONE
/obj/item/storage/backpack/satchel/flat
name = "smuggler's satchel"
desc = "A very slim satchel that can easily fit into tight spaces."
icon_state = "satchel-flat"
w_class = WEIGHT_CLASS_NORMAL //Can fit in backpacks itself.
max_combined_w_class = 15
level = 1
cant_hold = list(/obj/item/storage/backpack/satchel/flat) //muh recursive backpacks
component_type = /datum/component/storage/concrete/secret_satchel
/obj/item/storage/backpack/satchel/flat/hide(var/intact)
/obj/item/storage/backpack/stachel/flat/Initialize()
. = ..()
SSpersistence.new_secret_satchels += src
/obj/item/storage/backpack/satchel/flat/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
STR.max_combined_w_class = 15
STR.cant_hold = typecacheof(list(/obj/item/storage/backpack/satchel/flat)) //muh recursive backpacks
/obj/item/storage/backpack/satchel/flat/hide(intact)
if(intact)
invisibility = INVISIBILITY_MAXIMUM
anchored = TRUE //otherwise you can start pulling, cover it, and drag around an invisible backpack.
@@ -293,10 +271,6 @@
anchored = FALSE
icon_state = initial(icon_state)
/obj/item/storage/backpack/satchel/flat/Initialize(mapload)
. = ..()
SSpersistence.new_secret_satchels += src
/obj/item/storage/backpack/satchel/flat/PopulateContents()
new /obj/item/stack/tile/plasteel(src)
new /obj/item/crowbar(src)
@@ -308,7 +282,7 @@
/obj/item/storage/backpack/satchel/flat/secret
var/list/reward_one_of_these = list() //Intended for map editing
var/list/reward_all_of_these = list() //use paths!
var/revealed = 0
var/revealed = FALSE
/obj/item/storage/backpack/satchel/flat/secret/Initialize()
. = ..()
@@ -324,13 +298,7 @@
new reward(src)
for(var/R in reward_all_of_these)
new R(src)
revealed = 1
/obj/item/storage/backpack/satchel/flat/can_be_inserted(obj/item/W, stop_messages = 0, mob/user)
if(SSpersistence.spawned_objects[W])
to_chat(user, "<span class='warning'>[W] is unstable after its journey through space and time, it wouldn't survive another trip.</span>")
return FALSE
return ..()
revealed = TRUE
/obj/item/storage/backpack/duffelbag
name = "duffel bag"
@@ -338,14 +306,17 @@
icon_state = "duffel"
item_state = "duffel"
slowdown = 1
max_combined_w_class = 30
/obj/item/storage/backpack/duffelbag/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
STR.max_combined_w_class = 30
/obj/item/storage/backpack/duffelbag/captain
name = "captain's duffel bag"
desc = "A large duffel bag for holding extra captainly goods."
icon_state = "duffel-captain"
item_state = "duffel-captain"
resistance_flags = NONE
/obj/item/storage/backpack/duffelbag/med
name = "medical duffel bag"
@@ -393,7 +364,6 @@
desc = "A large duffel bag for holding extra tools and supplies."
icon_state = "duffel-eng"
item_state = "duffel-eng"
resistance_flags = NONE
/obj/item/storage/backpack/duffelbag/drone
name = "drone duffel bag"
@@ -426,9 +396,13 @@
desc = "A large duffel bag for holding extra tactical supplies."
icon_state = "duffel-syndie"
item_state = "duffel-syndieammo"
silent = 1
slowdown = 0
/obj/item/storage/backpack/duffelbag/syndie/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
STR.silent = TRUE
/obj/item/storage/backpack/duffelbag/syndie/hitman
desc = "A large duffel bag for holding extra things. There is a Nanotrasen logo on the back."
icon_state = "duffel-syndieammo"
@@ -561,9 +535,11 @@
new /obj/item/grenade/syndieminibomb(src)
// For ClownOps.
/obj/item/storage/backpack/duffelbag/clown/syndie
/obj/item/storage/backpack/duffelbag/clown/syndie/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
slowdown = 0
silent = TRUE
STR.silent = TRUE
/obj/item/storage/backpack/duffelbag/clown/syndie/PopulateContents()
new /obj/item/device/pda/clown(src)
+112 -174
View File
@@ -17,12 +17,16 @@
// Generic non-item
/obj/item/storage/bag
allow_quick_gather = 1
allow_quick_empty = 1
display_contents_with_number = 1 // should work fine now
use_to_pickup = 1
slot_flags = SLOT_BELT
/obj/item/storage/bag/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
STR.allow_quick_gather = TRUE
STR.allow_quick_empty = TRUE
STR.display_numerical_stacking = TRUE
STR.click_gather = TRUE
// -----------------------------
// Trash bag
// -----------------------------
@@ -36,11 +40,14 @@
righthand_file = 'icons/mob/inhands/equipment/custodial_righthand.dmi'
w_class = WEIGHT_CLASS_BULKY
max_w_class = WEIGHT_CLASS_SMALL
max_combined_w_class = 30
storage_slots = 30
can_hold = list() // any
cant_hold = list(/obj/item/disk/nuclear)
/obj/item/storage/bag/trash/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
STR.max_w_class = WEIGHT_CLASS_SMALL
STR.max_combined_w_class = 30
STR.max_items = 30
STR.cant_hold = typecacheof(list(/obj/item/disk/nuclear))
/obj/item/storage/bag/trash/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] puts [src] over [user.p_their()] head and starts chomping at the insides! Disgusting!</span>")
@@ -70,10 +77,14 @@
name = "trash bag of holding"
desc = "The latest and greatest in custodial convenience, a trashbag that is capable of holding vast quantities of garbage."
icon_state = "bluetrashbag"
max_combined_w_class = 60
storage_slots = 60
flags_2 = NO_MAT_REDEMPTION_2
/obj/item/storage/bag/trash/bluespace/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
STR.max_combined_w_class = 60
STR.max_items = 60
// -----------------------------
// Mining Satchel
// -----------------------------
@@ -85,13 +96,18 @@
icon_state = "satchel"
slot_flags = SLOT_BELT | SLOT_POCKET
w_class = WEIGHT_CLASS_NORMAL
storage_slots = 8
max_combined_w_class = 16 //Doesn't matter what this is, so long as it's more or equal to storage_slots * ore.w_class
max_w_class = WEIGHT_CLASS_HUGE
can_hold = list(/obj/item/stack/ore)
component_type = /datum/component/storage/concrete/stack
var/spam_protection = FALSE //If this is TRUE, the holder won't receive any messages when they fail to pick up ore through crossing it
var/datum/component/mobhook
/obj/item/storage/bag/ore/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage/concrete/stack)
STR.allow_quick_empty = TRUE
STR.can_hold = typecacheof(list(/obj/item/stack/ore))
STR.max_w_class = WEIGHT_CLASS_HUGE
STR.max_combined_stack_amount = 50
/obj/item/storage/bag/ore/equipped(mob/user)
. = ..()
if (mobhook && mobhook.parent != user)
@@ -112,20 +128,21 @@
return
if (istype(user.pulling, /obj/structure/ore_box))
box = user.pulling
for(var/A in tile)
if (!is_type_in_typecache(A, can_hold))
continue
if (box)
user.transferItemToLoc(A, box)
show_message = TRUE
else if(can_be_inserted(A, TRUE, user))
handle_item_insertion(A, TRUE, user)
show_message = TRUE
else
if(!spam_protection)
to_chat(user, "<span class='warning'>Your [name] is full and can't hold any more!</span>")
spam_protection = TRUE
GET_COMPONENT(STR, /datum/component/storage)
if(STR)
for(var/A in tile)
if (!is_type_in_typecache(A, STR.can_hold))
continue
if (box)
user.transferItemToLoc(A, box)
show_message = TRUE
else if(SendSignal(COMSIG_TRY_STORAGE_INSERT, A, user, TRUE))
show_message = TRUE
else
if(!spam_protection)
to_chat(user, "<span class='warning'>Your [name] is full and can't hold any more!</span>")
spam_protection = TRUE
continue
if(show_message)
playsound(user, "rustle", 50, TRUE)
if (box)
@@ -142,10 +159,15 @@
/obj/item/storage/bag/ore/holding //miners, your messiah has arrived
name = "mining satchel of holding"
desc = "A revolution in convenience, this satchel allows for huge amounts of ore storage. It's been outfitted with anti-malfunction safety measures."
storage_slots = INFINITY
max_combined_w_class = INFINITY
icon_state = "satchel_bspace"
/obj/item/storage/bag/ore/holding/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage/concrete/stack)
STR.max_items = INFINITY
STR.max_combined_w_class = INFINITY
STR.max_combined_stack_amount = INFINITY
// -----------------------------
// Plant bag
// -----------------------------
@@ -154,13 +176,17 @@
name = "plant bag"
icon = 'icons/obj/hydroponics/equipment.dmi'
icon_state = "plantbag"
storage_slots = 100; //the number of plant pieces it can carry.
max_combined_w_class = 100 //Doesn't matter what this is, so long as it's more or equal to storage_slots * plants.w_class
max_w_class = WEIGHT_CLASS_NORMAL
w_class = WEIGHT_CLASS_TINY
can_hold = list(/obj/item/reagent_containers/food/snacks/grown, /obj/item/seeds, /obj/item/grown, /obj/item/reagent_containers/honeycomb)
resistance_flags = FLAMMABLE
/obj/item/storage/bag/plants/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
STR.max_w_class = WEIGHT_CLASS_NORMAL
STR.max_combined_w_class = 100
STR.max_items = 100
STR.can_hold = typecacheof(list(/obj/item/reagent_containers/food/snacks/grown, /obj/item/seeds, /obj/item/grown, /obj/item/reagent_containers/honeycomb))
////////
/obj/item/storage/bag/plants/portaseeder
@@ -176,8 +202,6 @@
return
for(var/obj/item/O in contents)
seedify(O, 1)
close_all()
// -----------------------------
// Sheet Snatcher
@@ -193,123 +217,15 @@
var/capacity = 300; //the number of sheets it can carry.
w_class = WEIGHT_CLASS_NORMAL
component_type = /datum/component/storage/concrete/stack
allow_quick_empty = 1 // this function is superceded
/obj/item/storage/bag/sheetsnatcher/can_be_inserted(obj/item/W, stop_messages = 0)
if(!istype(W, /obj/item/stack/sheet) || istype(W, /obj/item/stack/sheet/mineral/sandstone) || istype(W, /obj/item/stack/sheet/mineral/wood))
if(!stop_messages)
to_chat(usr, "The snatcher does not accept [W].")
return 0 //I don't care, but the existing code rejects them for not being "sheets" *shrug* -Sayu
var/current = 0
for(var/obj/item/stack/sheet/S in contents)
current += S.amount
if(capacity == current)//If it's full, you're done
if(!stop_messages)
to_chat(usr, "<span class='danger'>The snatcher is full.</span>")
return 0
return 1
// Modified handle_item_insertion. Would prefer not to, but...
/obj/item/storage/bag/sheetsnatcher/handle_item_insertion(obj/item/W, prevent_warning = 0)
var/obj/item/stack/sheet/S = W
if(!istype(S))
return 0
var/amount
var/inserted = 0
var/current = 0
for(var/obj/item/stack/sheet/S2 in contents)
current += S2.amount
if(capacity < current + S.amount)//If the stack will fill it up
amount = capacity - current
else
amount = S.amount
for(var/obj/item/stack/sheet/sheet in contents)
if(S.type == sheet.type) // we are violating the amount limitation because these are not sane objects
sheet.amount += amount // they should only be removed through procs in this file, which split them up.
S.amount -= amount
inserted = 1
break
if(!inserted || !S.amount)
usr.dropItemToGround(S)
if (usr.client && usr.s_active != src)
usr.client.screen -= S
S.dropped(usr)
if(!S.amount)
qdel(S)
else
if(S.pulledby)
S.pulledby.stop_pulling()
S.forceMove(src)
orient2hud(usr)
if(usr.s_active)
usr.s_active.show_to(usr)
update_icon()
return 1
// Sets up numbered display to show the stack size of each stored mineral
// NOTE: numbered display is turned off currently because it's broken
/obj/item/storage/bag/sheetsnatcher/orient2hud(mob/user)
var/adjusted_contents = contents.len
//Numbered contents display
var/list/datum/numbered_display/numbered_contents
if(display_contents_with_number)
numbered_contents = list()
adjusted_contents = 0
for(var/obj/item/stack/sheet/I in contents)
adjusted_contents++
var/datum/numbered_display/D = new/datum/numbered_display(I)
D.number = I.amount
numbered_contents.Add( D )
var/row_num = 0
var/col_count = min(7,storage_slots) -1
if (adjusted_contents > 7)
row_num = round((adjusted_contents-1) / 7) // 7 is the maximum allowed width.
standard_orient_objs(row_num, col_count, numbered_contents)
return
// Modified quick_empty verb drops appropriate sized stacks
/obj/item/storage/bag/sheetsnatcher/quick_empty()
var/location = get_turf(src)
for(var/obj/item/stack/sheet/S in contents)
while(S.amount)
var/obj/item/stack/sheet/N = new S.type(location)
var/stacksize = min(S.amount,N.max_amount)
N.amount = stacksize
S.amount -= stacksize
if(!S.amount)
qdel(S)// todo: there's probably something missing here
orient2hud(usr)
if(usr.s_active)
usr.s_active.show_to(usr)
update_icon()
// Instead of removing
/obj/item/storage/bag/sheetsnatcher/remove_from_storage(obj/item/W, atom/new_location)
var/obj/item/stack/sheet/S = W
if(!istype(S))
return 0
//I would prefer to drop a new stack, but the item/attack_hand code
// that calls this can't recieve a different object than you clicked on.
//Therefore, make a new stack internally that has the remainder.
// -Sayu
if(S.amount > S.max_amount)
var/obj/item/stack/sheet/temp = new S.type(src)
temp.amount = S.amount - S.max_amount
S.amount = S.max_amount
return ..(S,new_location)
/obj/item/storage/bag/sheetsnatcher/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage/concrete/stack)
STR.allow_quick_empty = TRUE
STR.can_hold = typecacheof(list(/obj/item/stack/sheet))
STR.cant_hold = typecacheof(list(/obj/item/stack/sheet/mineral/sandstone, /obj/item/stack/sheet/mineral/wood))
STR.max_combined_stack_amount = 300
// -----------------------------
// Sheet Snatcher (Cyborg)
@@ -320,6 +236,10 @@
desc = ""
capacity = 500//Borgs get more because >specialization
/obj/item/storage/bag/sheetsnatcher/borg/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage/concrete/stack)
STR.max_combined_stack_amount = 500
// -----------------------------
// Book bag
@@ -330,14 +250,18 @@
desc = "A bag for books."
icon = 'icons/obj/library.dmi'
icon_state = "bookbag"
display_contents_with_number = 0 //This would look really stupid otherwise
storage_slots = 7
max_combined_w_class = 21
max_w_class = WEIGHT_CLASS_NORMAL
w_class = WEIGHT_CLASS_BULKY //Bigger than a book because physics
can_hold = list(/obj/item/book, /obj/item/storage/book, /obj/item/spellbook)
resistance_flags = FLAMMABLE
/obj/item/storage/bag/books/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
STR.max_w_class = WEIGHT_CLASS_NORMAL
STR.max_combined_w_class = 21
STR.max_items = 7
STR.display_numerical_stacking = FALSE
STR.can_hold = typecacheof(list(/obj/item/book, /obj/item/storage/book, /obj/item/spellbook))
/*
* Trays - Agouri
*/
@@ -353,14 +277,18 @@
w_class = WEIGHT_CLASS_BULKY
flags_1 = CONDUCT_1
materials = list(MAT_METAL=3000)
preposition = "on"
/obj/item/storage/bag/tray/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
STR.insert_preposition = "on"
/obj/item/storage/bag/tray/attack(mob/living/M, mob/living/user)
..()
. = ..()
// Drop all the things. All of them.
var/list/obj/item/oldContents = contents.Copy()
quick_empty()
GET_COMPONENT(STR, /datum/component/storage)
STR.quick_empty()
// Make each item scatter a bit
for(var/obj/item/I in oldContents)
spawn()
@@ -377,20 +305,20 @@
if(ishuman(M) || ismonkey(M))
if(prob(10))
M.Knockdown(40)
update_icon()
/obj/item/storage/bag/tray/proc/rebuild_overlays()
/obj/item/storage/bag/tray/update_icon()
cut_overlays()
for(var/obj/item/I in contents)
add_overlay(mutable_appearance(I.icon, I.icon_state))
/obj/item/storage/bag/tray/remove_from_storage(obj/item/W as obj, atom/new_location)
..()
rebuild_overlays()
/obj/item/storage/bag/tray/handle_item_insertion(obj/item/I, prevent_warning = 0)
add_overlay(mutable_appearance(I.icon, I.icon_state))
/obj/item/storage/bag/tray/Entered()
. = ..()
update_icon()
/obj/item/storage/bag/tray/Exited()
. = ..()
update_icon()
/*
* Chemistry bag
@@ -401,12 +329,17 @@
icon = 'icons/obj/chemical.dmi'
icon_state = "bag"
desc = "A bag for storing pills, patches, and bottles."
storage_slots = 50
max_combined_w_class = 200
w_class = WEIGHT_CLASS_TINY
can_hold = list(/obj/item/reagent_containers/pill, /obj/item/reagent_containers/glass/beaker, /obj/item/reagent_containers/glass/bottle)
resistance_flags = FLAMMABLE
/obj/item/storage/bag/chemistry/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
STR.max_combined_w_class = 200
STR.max_items = 50
STR.insert_preposition = "in"
STR.can_hold = typecacheof(list(/obj/item/reagent_containers/pill, /obj/item/reagent_containers/glass/beaker, /obj/item/reagent_containers/glass/bottle))
/*
* Biowaste bag (mostly for xenobiologists)
*/
@@ -416,8 +349,13 @@
icon = 'icons/obj/chemical.dmi'
icon_state = "biobag"
desc = "A bag for the safe transportation and disposal of biowaste and other biological materials."
storage_slots = 25
max_combined_w_class = 200
w_class = WEIGHT_CLASS_TINY
can_hold = list(/obj/item/slime_extract, /obj/item/reagent_containers/syringe, /obj/item/reagent_containers/glass/beaker, /obj/item/reagent_containers/glass/bottle, /obj/item/reagent_containers/blood, /obj/item/reagent_containers/hypospray/medipen, /obj/item/reagent_containers/food/snacks/deadmouse, /obj/item/reagent_containers/food/snacks/monkeycube)
resistance_flags = FLAMMABLE
/obj/item/storage/bag/bio/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
STR.max_combined_w_class = 200
STR.max_items = 25
STR.insert_preposition = "in"
STR.can_hold = typecacheof(list(/obj/item/slime_extract, /obj/item/reagent_containers/syringe, /obj/item/reagent_containers/glass/beaker, /obj/item/reagent_containers/glass/bottle, /obj/item/reagent_containers/blood, /obj/item/reagent_containers/hypospray/medipen, /obj/item/reagent_containers/food/snacks/deadmouse, /obj/item/reagent_containers/food/snacks/monkeycube))
+123 -69
View File
@@ -32,7 +32,12 @@
desc = "Holds tools."
icon_state = "utilitybelt"
item_state = "utility"
can_hold = list(
content_overlays = TRUE
/obj/item/storage/belt/ulility/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
STR.can_hold = typecacheof(list(
/obj/item/crowbar,
/obj/item/screwdriver,
/obj/item/weldingtool,
@@ -49,8 +54,7 @@
/obj/item/clothing/gloves,
/obj/item/holosign_creator,
/obj/item/device/assembly/signaler
)
content_overlays = TRUE
))
/obj/item/storage/belt/utility/chief
name = "\improper Chief Engineer's toolbelt" //"the Chief Engineer's toolbelt", because "Chief Engineer's toolbelt" is not a proper noun
@@ -68,7 +72,6 @@
new /obj/item/device/analyzer(src)
//much roomier now that we've managed to remove two tools
/obj/item/storage/belt/utility/full/PopulateContents()
new /obj/item/screwdriver(src)
new /obj/item/wrench(src)
@@ -106,16 +109,17 @@
new /obj/item/device/multitool(src)
new /obj/item/stack/cable_coil(src, 30, "yellow")
/obj/item/storage/belt/medical
name = "medical belt"
desc = "Can hold various medical equipment."
icon_state = "medicalbelt"
item_state = "medical"
max_w_class = WEIGHT_CLASS_BULKY
can_hold = list(
/obj/item/storage/belt/medical/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
STR.max_w_class = WEIGHT_CLASS_BULKY
STR.can_hold = typecacheof(list(
/obj/item/device/healthanalyzer,
/obj/item/dnainjector,
/obj/item/reagent_containers/dropper,
@@ -156,23 +160,26 @@
/obj/item/storage/bag/bio,
/obj/item/reagent_containers/blood,
/obj/item/tank/internals/emergency_oxygen,
/obj/item/pinpointer/crew,
/obj/item/gun/syringe/syndicate,
/obj/item/implantcase,
/obj/item/implant,
/obj/item/implanter,
/obj/item/hypospray
)
// CIT CHANGE added hypospray mk IIs to belt /obj/item/hypospray
/obj/item/pinpointer/crew
))
/obj/item/storage/belt/security
name = "security belt"
desc = "Can hold security gear like handcuffs and flashes."
icon_state = "securitybelt"
item_state = "security"//Could likely use a better one.
storage_slots = 5
max_w_class = WEIGHT_CLASS_NORMAL //Because the baton wouldn't fit otherwise. - Neerti
can_hold = list(
content_overlays = TRUE
/obj/item/storage/belt/security/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
STR.max_items = 5
STR.max_w_class = WEIGHT_CLASS_NORMAL
STR.can_hold = typecacheof(list(
/obj/item/melee/baton,
/obj/item/melee/classic_baton,
/obj/item/grenade,
@@ -188,10 +195,8 @@
/obj/item/melee/classic_baton/telescopic,
/obj/item/device/radio,
/obj/item/clothing/gloves,
/obj/item/restraints/legcuffs/bola,
/obj/item/holosign_creator/security
)
content_overlays = TRUE
/obj/item/restraints/legcuffs/bola
))
/obj/item/storage/belt/security/full/PopulateContents()
new /obj/item/reagent_containers/spray/pepper(src)
@@ -201,17 +206,20 @@
new /obj/item/melee/baton/loaded(src)
update_icon()
/obj/item/storage/belt/mining
name = "explorer's webbing"
desc = "A versatile chest rig, cherished by miners and hunters alike."
icon_state = "explorer1"
item_state = "explorer1"
storage_slots = 6
w_class = WEIGHT_CLASS_BULKY
max_w_class = WEIGHT_CLASS_BULKY //Pickaxes are big.
max_combined_w_class = 20 //Not an issue with this whitelist, probably.
can_hold = list(
/obj/item/storage/belt/mining/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
STR.max_items = 6
STR.max_w_class = WEIGHT_CLASS_BULKY
STR.max_combined_w_class = 20
STR.can_hold = typecacheof(list(
/obj/item/crowbar,
/obj/item/screwdriver,
/obj/item/weldingtool,
@@ -248,7 +256,7 @@
/obj/item/device/wormhole_jaunter,
/obj/item/storage/bag/plants,
/obj/item/stack/marker_beacon
)
))
/obj/item/storage/belt/mining/vendor
@@ -261,19 +269,27 @@
/obj/item/storage/belt/mining/primitive
name = "hunter's belt"
desc = "A versatile belt, woven from sinew."
storage_slots = 5
icon_state = "ebelt"
item_state = "ebelt"
/obj/item/storage/belt/mining/primitive/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
STR.max_items = 5
/obj/item/storage/belt/soulstone
name = "soul stone belt"
desc = "Designed for ease of access to the shards during a fight, as to not let a single enemy spirit slip away."
icon_state = "soulstonebelt"
item_state = "soulstonebelt"
storage_slots = 6
can_hold = list(
/obj/item/storage/belt/soulstone/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
STR.max_items = 6
STR.can_hold = typecacheof(list(
/obj/item/device/soulstone
)
))
/obj/item/storage/belt/soulstone/full/PopulateContents()
for(var/i in 1 to 6)
@@ -289,8 +305,12 @@
icon_state = "championbelt"
item_state = "champion"
materials = list(MAT_GOLD=400)
storage_slots = 1
can_hold = list(
/obj/item/storage/belt/champion/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
STR.max_items = 1
STR.can_hold = list(
/obj/item/clothing/mask/luchador
)
@@ -299,7 +319,11 @@
desc = "A set of tactical webbing worn by Syndicate boarding parties."
icon_state = "militarywebbing"
item_state = "militarywebbing"
max_w_class = WEIGHT_CLASS_SMALL
/obj/item/storage/belt/military/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
STR.max_w_class = WEIGHT_CLASS_SMALL
/obj/item/storage/belt/military/abductor
name = "agent belt"
@@ -317,7 +341,6 @@
new /obj/item/device/multitool/abductor(src)
new /obj/item/stack/cable_coil(src,30,"white")
/obj/item/storage/belt/military/army
name = "army belt"
desc = "A belt used by military forces."
@@ -329,25 +352,34 @@
desc = "A tactical assault belt."
icon_state = "assaultbelt"
item_state = "security"
storage_slots = 6
/obj/item/storage/belt/military/assault/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
STR.max_items = 6
/obj/item/storage/belt/grenade
name = "grenadier belt"
desc = "A belt for holding grenades."
icon_state = "grenadebeltnew"
item_state = "security"
max_w_class = WEIGHT_CLASS_BULKY
display_contents_with_number = TRUE
storage_slots = 30
max_combined_w_class = 60 //needs to be this high
can_hold = list(
/obj/item/storage/belt/grenade/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
STR.max_items = 30
STR.display_numerical_stacking = TRUE
STR.max_combined_w_class = 60
STR.max_w_class = WEIGHT_CLASS_BULKY
STR.can_hold = typecacheof(list(
/obj/item/grenade,
/obj/item/screwdriver,
/obj/item/lighter,
/obj/item/device/multitool,
/obj/item/reagent_containers/food/drinks/bottle/molotov,
/obj/item/grenade/plastic/c4,
)
))
/obj/item/storage/belt/grenade/full/PopulateContents()
new /obj/item/grenade/flashbang(src)
new /obj/item/grenade/smokebomb(src)
@@ -383,10 +415,14 @@
desc = "A belt designed to hold various rods of power. A veritable fanny pack of exotic magic."
icon_state = "soulstonebelt"
item_state = "soulstonebelt"
storage_slots = 6
can_hold = list(
/obj/item/storage/belt/wands/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
STR.max_items = 6
STR.can_hold = typecacheof(list(
/obj/item/gun/magic/wand
)
))
/obj/item/storage/belt/wands/full/PopulateContents()
new /obj/item/gun/magic/wand/death(src)
@@ -405,9 +441,13 @@
desc = "A belt used to hold most janitorial supplies."
icon_state = "janibelt"
item_state = "janibelt"
storage_slots = 6
max_w_class = WEIGHT_CLASS_BULKY // Set to this so the light replacer can fit.
can_hold = list(
/obj/item/storage/belt/janitor/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
STR.max_items = 6
STR.max_w_class = WEIGHT_CLASS_BULKY // Set to this so the light replacer can fit.
STR.can_hold = typecacheof(list(
/obj/item/grenade/chem_grenade,
/obj/item/device/lightreplacer,
/obj/item/device/flashlight,
@@ -418,32 +458,40 @@
/obj/item/clothing/gloves,
/obj/item/melee/flyswatter,
/obj/item/device/assembly/mousetrap
)
))
/obj/item/storage/belt/bandolier
name = "bandolier"
desc = "A bandolier for holding shotgun ammunition."
icon_state = "bandolier"
item_state = "bandolier"
storage_slots = 18
display_contents_with_number = TRUE
can_hold = list(
/obj/item/storage/belt/bandolier/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
STR.max_items = 18
STR.display_numerical_stacking = TRUE
STR.can_hold = typecacheof(list(
/obj/item/ammo_casing/shotgun
)
))
/obj/item/storage/belt/holster
name = "shoulder holster"
desc = "A holster to carry a handgun and ammo. WARNING: Badasses only."
icon_state = "holster"
item_state = "holster"
storage_slots = 3
max_w_class = WEIGHT_CLASS_NORMAL
can_hold = list(
alternate_worn_layer = UNDER_SUIT_LAYER
/obj/item/storage/belt/holster/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
STR.max_items = 3
STR.max_w_class = WEIGHT_CLASS_NORMAL
STR.can_hold = typecacheof(list(
/obj/item/gun/ballistic/automatic/pistol,
/obj/item/gun/ballistic/revolver,
/obj/item/ammo_box,
)
alternate_worn_layer = UNDER_SUIT_LAYER
))
/obj/item/storage/belt/holster/full/PopulateContents()
new /obj/item/gun/ballistic/revolver/detective(src)
@@ -455,8 +503,12 @@
desc = "A dorky fannypack for keeping small items in."
icon_state = "fannypack_leather"
item_state = "fannypack_leather"
storage_slots = 3
max_w_class = WEIGHT_CLASS_SMALL
/obj/item/storage/belt/fannypack/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
STR.max_items = 3
STR.max_w_class = WEIGHT_CLASS_SMALL
/obj/item/storage/belt/fannypack/black
name = "black fannypack"
@@ -513,26 +565,29 @@
desc = "An ornate sheath designed to hold an officer's blade."
icon_state = "sheath"
item_state = "sheath"
storage_slots = 1
rustle_jimmies = FALSE
w_class = WEIGHT_CLASS_BULKY
max_w_class = WEIGHT_CLASS_BULKY
can_hold = list(
/obj/item/storage/belt/sabre/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
STR.max_items = 1
STR.rustle_sound = FALSE
STR.max_w_class = WEIGHT_CLASS_BULKY
STR.can_hold = typecacheof(list(
/obj/item/melee/sabre
)
))
/obj/item/storage/belt/sabre/examine(mob/user)
..()
if(contents.len)
if(length(contents))
to_chat(user, "<span class='notice'>Alt-click it to quickly draw the blade.</span>")
/obj/item/storage/belt/sabre/AltClick(mob/user)
if(!iscarbon(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
return
if(contents.len)
if(length(contents))
var/obj/item/I = contents[1]
user.visible_message("[user] takes [I] out of [src].", "<span class='notice'>You take [I] out of [src].</span>",\
)
user.visible_message("[user] takes [I] out of [src].", "<span class='notice'>You take [I] out of [src].</span>")
user.put_in_hands(I)
update_icon()
else
@@ -549,7 +604,6 @@
L.regenerate_icons()
..()
/obj/item/storage/belt/sabre/PopulateContents()
new /obj/item/melee/sabre(src)
update_icon()
+5 -3
View File
@@ -5,11 +5,15 @@
icon_state ="book"
throw_speed = 2
throw_range = 5
storage_slots = 1
w_class = WEIGHT_CLASS_NORMAL
resistance_flags = FLAMMABLE
var/title = "book"
/obj/item/storage/book/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
STR.max_items = 1
/obj/item/storage/book/attack_self(mob/user)
to_chat(user, "<span class='notice'>The pages of [title] have been cut out!</span>")
@@ -205,8 +209,6 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "bible",
attack_verb = list("attacked", "burned", "blessed", "damned", "scorched")
var/uses = 1
/obj/item/storage/book/bible/syndicate/attack_self(mob/living/carbon/human/H)
if (uses)
H.mind.isholy = TRUE
+33 -18
View File
@@ -64,9 +64,6 @@
if(!ispath(foldable))
return
//Close any open UI windows first
close_all()
to_chat(user, "<span class='notice'>You fold [src] flat.</span>")
var/obj/item/I = new foldable
qdel(src)
@@ -360,7 +357,11 @@
desc = "<B>Instructions:</B> <I>Heat in microwave. Product will cool if not eaten within seven minutes.</I>"
icon_state = "donkpocketbox"
illustration=null
can_hold = list(/obj/item/reagent_containers/food/snacks/donkpocket)
/obj/item/storage/box/donkpockets/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
STR.can_hold = typecacheof(list(/obj/item/reagent_containers/food/snacks/donkpocket))
/obj/item/storage/box/donkpockets/PopulateContents()
for(var/i in 1 to 6)
@@ -370,10 +371,14 @@
name = "monkey cube box"
desc = "Drymate brand monkey cubes. Just add water!"
icon_state = "monkeycubebox"
storage_slots = 7
can_hold = list(/obj/item/reagent_containers/food/snacks/monkeycube)
illustration = null
/obj/item/storage/box/monkeycubes/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
STR.max_items = 7
STR.can_hold = typecacheof(list(/obj/item/reagent_containers/food/snacks/monkeycube))
/obj/item/storage/box/monkeycubes/PopulateContents()
for(var/i in 1 to 5)
new /obj/item/reagent_containers/food/snacks/monkeycube(src)
@@ -522,12 +527,15 @@
desc = "Eight wrappers of fun! Ages 8 and up. Not suitable for children."
icon = 'icons/obj/toy.dmi'
icon_state = "spbox"
storage_slots = 8
can_hold = list(/obj/item/toy/snappop)
/obj/item/storage/box/snappops/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
STR.can_hold = typecacheof(list(/obj/item/toy/snappop))
STR.max_items = 8
/obj/item/storage/box/snappops/PopulateContents()
for(var/i in 1 to storage_slots)
new /obj/item/toy/snappop(src)
SendSignal(COMSIG_TRY_STORAGE_FILL_TYPE, /obj/item/toy/snappop)
/obj/item/storage/box/matches
name = "matchbox"
@@ -535,14 +543,17 @@
icon = 'icons/obj/cigarettes.dmi'
icon_state = "matchbox"
item_state = "zippo"
storage_slots = 10
w_class = WEIGHT_CLASS_TINY
slot_flags = SLOT_BELT
can_hold = list(/obj/item/match)
/obj/item/storage/box/matches/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
STR.max_items = 10
STR.can_hold = typecacheof(list(/obj/item/match))
/obj/item/storage/box/matches/PopulateContents()
for(var/i in 1 to storage_slots)
new /obj/item/match(src)
SendSignal(COMSIG_TRY_STORAGE_FILL_TYPE, /obj/item/match)
/obj/item/storage/box/matches/attackby(obj/item/match/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/match))
@@ -557,10 +568,14 @@
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
storage_slots=21
can_hold = list(/obj/item/light/tube, /obj/item/light/bulb)
max_combined_w_class = 21
use_to_pickup = 1 // for picking up broken bulbs, not that most people will try
/obj/item/storage/box/lights/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
STR.max_items = 21
STR.can_hold = typecacheof(list(/obj/item/light/tube, /obj/item/light/bulb))
STR.max_combined_w_class = 21
STR.click_gather = TRUE
/obj/item/storage/box/lights/bulbs/PopulateContents()
for(var/i in 1 to 21)
+6 -14
View File
@@ -10,13 +10,17 @@
throw_speed = 2
throw_range = 4
w_class = WEIGHT_CLASS_BULKY
max_w_class = WEIGHT_CLASS_NORMAL
max_combined_w_class = 21
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked")
resistance_flags = FLAMMABLE
max_integrity = 150
var/folder_path = /obj/item/folder //this is the path of the folder that gets spawned in New()
/obj/item/storage/briefcase/ComponentInitialize()
. = ..()
GET_COMPONENT(STR, /datum/component/storage)
STR.max_w_class = WEIGHT_CLASS_NORMAL
STR.max_combined_w_class = 21
/obj/item/storage/briefcase/PopulateContents()
new /obj/item/pen(src)
var/obj/item/folder/folder = new folder_path(src)
@@ -31,20 +35,8 @@
..()
/obj/item/storage/briefcase/sniperbundle
name = "briefcase"
desc = "It's label reads genuine hardened Captain leather, but suspiciously has no other tags or branding. Smells like L'Air du Temps."
icon_state = "briefcase"
flags_1 = CONDUCT_1
force = 10
hitsound = "swing_hit"
throw_speed = 2
throw_range = 4
w_class = WEIGHT_CLASS_BULKY
max_w_class = WEIGHT_CLASS_NORMAL
max_combined_w_class = 21
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked")
resistance_flags = FLAMMABLE
max_integrity = 150
/obj/item/storage/briefcase/sniperbundle/PopulateContents()
..() // in case you need any paperwork done after your rampage

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