Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into Ghommie-cit226
This commit is contained in:
@@ -105,6 +105,7 @@
|
||||
#define MATRIXED 22 //if icon is color matrix'd
|
||||
#define SKINTONE 23 //uses skin tones
|
||||
#define HORNCOLOR 24
|
||||
#define WINGCOLOR 25
|
||||
|
||||
//organ slots
|
||||
#define ORGAN_SLOT_BRAIN "brain"
|
||||
@@ -130,6 +131,11 @@
|
||||
#define ORGAN_SLOT_BRAIN_ANTISTUN "brain_antistun"
|
||||
#define ORGAN_SLOT_TAIL "tail"
|
||||
#define ORGAN_SLOT_PENIS "penis"
|
||||
#define ORGAN_SLOT_WOMB "womb"
|
||||
#define ORGAN_SLOT_VAGINA "vagina"
|
||||
#define ORGAN_SLOT_TESTICLES "testicles"
|
||||
#define ORGAN_SLOT_BREASTS "breasts"
|
||||
|
||||
|
||||
////organ defines
|
||||
#define STANDARD_ORGAN_THRESHOLD 100
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
|
||||
#if DM_VERSION < 513
|
||||
|
||||
#define ismovableatom(A) (istype(A, /atom/movable))
|
||||
|
||||
#define islist(L) (istype(L, /list))
|
||||
|
||||
#define CLAMP01(x) (CLAMP(x, 0, 1))
|
||||
|
||||
#define CLAMP(CLVALUE,CLMIN,CLMAX) ( max( (CLMIN), min((CLVALUE), (CLMAX)) ) )
|
||||
|
||||
#define ATAN2(x, y) ( !(x) && !(y) ? 0 : (y) >= 0 ? arccos((x) / sqrt((x)*(x) + (y)*(y))) : -arccos((x) / sqrt((x)*(x) + (y)*(y))) )
|
||||
|
||||
#define TAN(x) (sin(x) / cos(x))
|
||||
|
||||
#define arctan(x) (arcsin(x/sqrt(1+x*x)))
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
#else
|
||||
|
||||
#define ismovableatom(A) ismovable(A)
|
||||
|
||||
#define CLAMP01(x) clamp(x, 0, 1)
|
||||
|
||||
#define CLAMP(CLVALUE, CLMIN, CLMAX) clamp(CLVALUE, CLMIN, CLMAX)
|
||||
|
||||
#define TAN(x) tan(x)
|
||||
|
||||
#define ATAN2(x, y) arctan(x, y)
|
||||
|
||||
#endif
|
||||
@@ -6,7 +6,7 @@
|
||||
#define ACCESS_MORGUE 6
|
||||
#define ACCESS_TOX 7 //R&D department, R&D console, burn chamber on some maps
|
||||
#define ACCESS_TOX_STORAGE 8 //Toxins storage, burn chamber on some maps
|
||||
#define ACCESS_GENETICS 9
|
||||
#define ACCESS_GENETICS 9
|
||||
#define ACCESS_ENGINE 10 //Engineering area, power monitor, power flow control console
|
||||
#define ACCESS_ENGINE_EQUIP 11 //APCs, EngiVend/YouTool, engineering equipment lockers
|
||||
#define ACCESS_MAINT_TUNNELS 12
|
||||
@@ -64,6 +64,8 @@
|
||||
#define ACCESS_WEAPONS 66 //Weapon authorization for secbots
|
||||
#define ACCESS_NETWORK 67 //NTnet diagnostics/monitoring software
|
||||
#define ACCESS_CLONING 68 //Cloning room and clone pod ejection
|
||||
#define ACCESS_ENTER_GENPOP 69
|
||||
#define ACCESS_LEAVE_GENPOP 70
|
||||
|
||||
//BEGIN CENTCOM ACCESS
|
||||
/*Should leave plenty of room if we need to add more access levels.
|
||||
|
||||
@@ -15,9 +15,26 @@
|
||||
#define ui_boxvore "EAST-5:22,SOUTH+1:6"
|
||||
|
||||
//Filters
|
||||
#define CIT_FILTER_STAMINACRIT filter(type="drop_shadow", x=0, y=0, size=-3, border=0, color="#04080F")
|
||||
#define CIT_FILTER_STAMINACRIT filter(type="drop_shadow", x=0, y=0, size=-3, color="#04080F")
|
||||
|
||||
//organ defines
|
||||
#define VAGINA_LAYER_INDEX 1
|
||||
#define TESTICLES_LAYER_INDEX 2
|
||||
#define GENITAL_LAYER_INDEX 3
|
||||
#define PENIS_LAYER_INDEX 4
|
||||
|
||||
#define GENITAL_LAYER_INDEX_LENGTH 4 //keep it updated with each new index added, thanks.
|
||||
|
||||
//genital flags
|
||||
#define GENITAL_BLACKLISTED (1<<0) //for genitals that shouldn't be added to GLOB.genitals_list.
|
||||
#define GENITAL_INTERNAL (1<<1)
|
||||
#define GENITAL_HIDDEN (1<<2)
|
||||
#define GENITAL_THROUGH_CLOTHES (1<<3)
|
||||
#define GENITAL_FUID_PRODUCTION (1<<4)
|
||||
#define CAN_MASTURBATE_WITH (1<<5)
|
||||
#define MASTURBATE_LINKED_ORGAN (1<<6) //used to pass our mission to the linked organ
|
||||
#define CAN_CLIMAX_WITH (1<<7)
|
||||
|
||||
#define COCK_SIZE_MIN 1
|
||||
#define COCK_SIZE_MAX 20
|
||||
|
||||
@@ -50,27 +67,6 @@
|
||||
|
||||
#define BREASTS_VOLUME_BASE 50 //base volume for the reagents in the breasts, multiplied by the size then multiplier. 50u for A cups, 850u for HH cups.
|
||||
#define BREASTS_VOLUME_MULT 1 //global multiplier for breast volume.
|
||||
#define BREASTS_SIZE_FLAT 0
|
||||
#define BREASTS_SIZE_A 1
|
||||
#define BREASTS_SIZE_AA 1.5
|
||||
#define BREASTS_SIZE_B 2
|
||||
#define BREASTS_SIZE_BB 2.5
|
||||
#define BREASTS_SIZE_C 3
|
||||
#define BREASTS_SIZE_CC 3.5
|
||||
#define BREASTS_SIZE_D 4
|
||||
#define BREASTS_SIZE_DD 4.5
|
||||
#define BREASTS_SIZE_E 5
|
||||
#define BREASTS_SIZE_EE 5.5
|
||||
#define BREASTS_SIZE_F 6
|
||||
#define BREASTS_SIZE_FF 6.5
|
||||
#define BREASTS_SIZE_G 7
|
||||
#define BREASTS_SIZE_GG 7.5//Are these even real sizes? The world may never know because cup sizes make no fucking sense.
|
||||
#define BREASTS_SIZE_H 8
|
||||
#define BREASTS_SIZE_HH 8.5//Largest size, ever. For now.
|
||||
|
||||
#define BREASTS_SIZE_MIN BREASTS_SIZE_A
|
||||
#define BREASTS_SIZE_DEF BREASTS_SIZE_C
|
||||
#define BREASTS_SIZE_MAX BREASTS_SIZE_HH
|
||||
|
||||
#define MILK_RATE 5
|
||||
#define MILK_RATE_MULT 1
|
||||
@@ -93,12 +89,6 @@
|
||||
#define isgenital(A) (istype(A, /obj/item/organ/genital))
|
||||
|
||||
#define isborer(A) (istype(A, /mob/living/simple_animal/borer))
|
||||
#define isipcperson(A) (is_species(A, /datum/species/ipc))
|
||||
#define ismammal(A) (is_species(A, /datum/species/mammal))
|
||||
#define isavian(A) (is_species(A, /datum/species/avian))
|
||||
#define isaquatic(A) (is_species(A, /datum/species/aquatic))
|
||||
#define isinsect(A) (is_species(A, /datum/species/insect))
|
||||
#define isxenoperson(A) (is_species(A, /datum/species/xeno))
|
||||
|
||||
#define CITADEL_MENTOR_OOC_COLOUR "#224724"
|
||||
|
||||
|
||||
@@ -5,8 +5,3 @@
|
||||
#define CLEAN_STRONG 4 // Industrial strength
|
||||
#define CLEAN_IMPRESSIVE 5 // Cleaning strong enough your granny would be proud
|
||||
#define CLEAN_GOD 6 // Cleans things spotless down to the atomic structure
|
||||
|
||||
//How strong things have to be to wipe forensic evidence...
|
||||
#define CLEAN_STRENGTH_FINGERPRINTS CLEAN_IMPRESSIVE
|
||||
#define CLEAN_STRENGTH_BLOOD CLEAN_WEAK
|
||||
#define CLEAN_STRENGTH_FIBERS CLEAN_IMPRESSIVE
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
GLOBAL_VAR_INIT(clockwork_construction_value, 0) //The total value of all structures built by the clockwork cult
|
||||
GLOBAL_VAR_INIT(clockwork_vitality, 0) //How much Vitality is stored, total
|
||||
GLOBAL_VAR_INIT(clockwork_power, 0) //How many watts of power are globally available to the clockwork cult
|
||||
GLOBAL_VAR_INIT(neovgre_exists, 0) //Does neovgre exist?
|
||||
|
||||
GLOBAL_LIST_EMPTY(all_clockwork_objects) //All clockwork items, structures, and effects in existence
|
||||
GLOBAL_LIST_EMPTY(all_clockwork_mobs) //All clockwork SERVANTS (not creatures) in existence
|
||||
|
||||
@@ -104,8 +104,7 @@
|
||||
#define SHOVE_KNOCKDOWN_HUMAN 30
|
||||
#define SHOVE_KNOCKDOWN_TABLE 30
|
||||
#define SHOVE_KNOCKDOWN_COLLATERAL 10
|
||||
//Shove slowdown
|
||||
#define SHOVE_SLOWDOWN_ID "shove_slowdown"
|
||||
//for the shove slowdown, see __DEFINES/movespeed_modification.dm
|
||||
#define SHOVE_SLOWDOWN_LENGTH 30
|
||||
#define SHOVE_SLOWDOWN_STRENGTH 0.85 //multiplier
|
||||
//Shove disarming item list
|
||||
|
||||
@@ -2,11 +2,8 @@
|
||||
|
||||
#define SEND_GLOBAL_SIGNAL(sigtype, arguments...) ( SEND_SIGNAL(SSdcs, sigtype, ##arguments) )
|
||||
|
||||
//shorthand
|
||||
#define GET_COMPONENT_FROM(varname, path, target) var##path/##varname = ##target.GetComponent(##path)
|
||||
#define GET_COMPONENT(varname, path) GET_COMPONENT_FROM(varname, path, src)
|
||||
|
||||
#define COMPONENT_INCOMPATIBLE 1
|
||||
#define COMPONENT_NOTRANSFER 2
|
||||
|
||||
// How multiple components of the exact same type are handled in the same datum
|
||||
|
||||
@@ -73,7 +70,7 @@
|
||||
#define COMSIG_ATOM_CANREACH "atom_can_reach" //from internal loop in atom/movable/proc/CanReach(): (list/next)
|
||||
#define COMPONENT_BLOCK_REACH 1
|
||||
#define COMSIG_ATOM_SCREWDRIVER_ACT "atom_screwdriver_act" //from base of atom/screwdriver_act(): (mob/living/user, obj/item/I)
|
||||
#define COMSIG_ATOM_INTERCEPT_TELEPORT "intercept_teleport" //called when teleporting into a protected turf: (channel, turf/origin)
|
||||
#define COMSIG_ATOM_INTERCEPT_TELEPORT "intercept_teleport" //called when teleporting into a protected turf: (channel, turf/origin, turf/destination)
|
||||
#define COMPONENT_BLOCK_TELEPORT 1
|
||||
/////////////////
|
||||
#define COMSIG_ATOM_ATTACK_GHOST "atom_attack_ghost" //from base of atom/attack_ghost(): (mob/dead/observer/ghost)
|
||||
@@ -120,6 +117,7 @@
|
||||
#define COMSIG_MOVABLE_Z_CHANGED "movable_ztransit" //from base of atom/movable/onTransitZ(): (old_z, new_z)
|
||||
#define COMSIG_MOVABLE_HEAR "movable_hear" //from base of atom/movable/Hear(): (message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, message_mode)
|
||||
#define COMSIG_MOVABLE_DISPOSING "movable_disposing" //called when the movable is added to a disposal holder object for disposal movement: (obj/structure/disposalholder/holder, obj/machinery/disposal/source)
|
||||
#define COMSIG_MOVABLE_TELEPORTED "movable_teleported" //from base of do_teleport(): (channel, turf/origin, turf/destination)
|
||||
|
||||
// /mind signals
|
||||
#define COMSIG_MIND_TRANSFER "mind_transfer" //from base of mind/transfer_to(): (new_character, old_character)
|
||||
@@ -129,7 +127,7 @@
|
||||
#define COMSIG_MOB_GHOSTIZE "mob_ghostize" //from base of mob/Ghostize() (can_reenter_corpse)
|
||||
#define COMPONENT_BLOCK_GHOSTING 1
|
||||
#define COMSIG_MOB_ALLOWED "mob_allowed" //from base of obj/allowed(mob/M): (/obj) returns bool, if TRUE the mob has id access to the obj
|
||||
#define COMSIG_MOB_RECEIVE_MAGIC "mob_receive_magic" //from base of mob/anti_magic_check(): (magic, holy, protection_sources)
|
||||
#define COMSIG_MOB_RECEIVE_MAGIC "mob_receive_magic" //from base of mob/anti_magic_check(): (mob/user, magic, holy, tinfoil, chargecost, self, protection_sources)
|
||||
#define COMPONENT_BLOCK_MAGIC 1
|
||||
#define COMSIG_MOB_HUD_CREATED "mob_hud_created" //from base of mob/create_mob_hud(): ()
|
||||
#define COMSIG_MOB_ATTACK_HAND "mob_attack_hand" //from base of
|
||||
@@ -156,10 +154,15 @@
|
||||
#define COMSIG_LIVING_EXTINGUISHED "living_extinguished" //from base of mob/living/ExtinguishMob() (/mob/living)
|
||||
#define COMSIG_LIVING_ELECTROCUTE_ACT "living_electrocute_act" //from base of mob/living/electrocute_act(): (shock_damage)
|
||||
#define COMSIG_LIVING_MINOR_SHOCK "living_minor_shock" //sent by stuff like stunbatons and tasers: ()
|
||||
#define COMSIG_LIVING_GUN_PROCESS_FIRE "living_gun_process_fire" //from base of /obj/item/gun/proc/process_fire(): (atom/target, params, zone_override)
|
||||
|
||||
// /mob/living/carbon signals
|
||||
#define COMSIG_CARBON_SOUNDBANG "carbon_soundbang" //from base of mob/living/carbon/soundbang_act(): (list(intensity))
|
||||
|
||||
// /mob/living/simple_animal/hostile signals
|
||||
#define COMSIG_HOSTILE_ATTACKINGTARGET "hostile_attackingtarget"
|
||||
#define COMPONENT_HOSTILE_NO_ATTACK 1
|
||||
|
||||
// /obj signals
|
||||
#define COMSIG_OBJ_DECONSTRUCT "obj_deconstruct" //from base of obj/deconstruct(): (disassembled)
|
||||
#define COMSIG_OBJ_BREAK "obj_break" //from base of /obj/obj_break(): (damage_flag)
|
||||
@@ -197,6 +200,7 @@
|
||||
#define COMPONENT_DELETE_OLD_IMPLANT 4
|
||||
#define COMSIG_IMPLANT_EXISTING_UPLINK "implant_uplink_exists" //called on implants being implanted into someone with an uplink implant: (datum/component/uplink)
|
||||
//This uses all return values of COMSIG_IMPLANT_OTHER
|
||||
#define COMSIG_IMPLANT_REMOVING "implant_removing" //from base of /obj/item/implant/proc/removed() (list/args)
|
||||
|
||||
// /obj/item/pda signals
|
||||
#define COMSIG_PDA_CHANGE_RINGTONE "pda_change_ringtone" //called on pda when the user changes the ringtone: (mob/living/user, new_ringtone)
|
||||
@@ -208,6 +212,9 @@
|
||||
// /obj/item/pen signals
|
||||
#define COMSIG_PEN_ROTATED "pen_rotated" //called after rotation in /obj/item/pen/attack_self(): (rotation, mob/living/carbon/user)
|
||||
|
||||
// /obj/item/projectile signals (sent to the firer)
|
||||
#define COMSIG_PROJECTILE_ON_HIT "projectile_on_hit" // from base of /obj/item/projectile/proc/on_hit(): (atom/movable/firer, atom/target, Angle)
|
||||
#define COMSIG_PROJECTILE_BEFORE_FIRE "projectile_before_fire" // from base of /obj/item/projectile/proc/fire(): (obj/item/projectile, atom/original_target)
|
||||
|
||||
// /mob/living/carbon/human signals
|
||||
#define COMSIG_HUMAN_MELEE_UNARMED_ATTACK "human_melee_unarmed_attack" //from mob/living/carbon/human/UnarmedAttack(): (atom/target)
|
||||
@@ -224,14 +231,18 @@
|
||||
#define COMSIG_TURF_MAKE_DRY "make_turf_try" //(max_strength, immediate, duration_decrease = INFINITY): Returns bool.
|
||||
#define COMSIG_COMPONENT_CLEAN_ACT "clean_act" //called on an object to clean it of cleanables. Usualy with soap: (num/strength)
|
||||
|
||||
//Blood color
|
||||
#define COMSIG_BLOOD_COLOR "blood_DNA_to_color" //RGB blood stuff
|
||||
//Food
|
||||
#define COMSIG_FOOD_EATEN "food_eaten" //from base of obj/item/reagent_containers/food/snacks/attack(): (mob/living/eater, mob/feeder)
|
||||
|
||||
//Gibs
|
||||
#define COMSIG_GIBS_STREAK "gibs_streak" // from base of /obj/effect/decal/cleanable/blood/gibs/streak(): (list/directions, list/diseases)
|
||||
|
||||
//Mood
|
||||
#define COMSIG_ADD_MOOD_EVENT "add_mood" //Called when you send a mood event from anywhere in the code.
|
||||
#define COMSIG_CLEAR_MOOD_EVENT "clear_mood" //Called when you clear a mood event from anywhere in the code.
|
||||
#define COMSIG_INCREASE_SANITY "decrease_sanity" //Called when you want to increase sanity from anywhere in the code.
|
||||
#define COMSIG_DECREASE_SANITY "increase_sanity" //Same as above but to decrease sanity instead.
|
||||
#define COMSIG_MODIFY_SANITY "modify_sanity" //Called when you want to increase or decrease sanity from anywhere in the code.
|
||||
|
||||
//NTnet
|
||||
#define COMSIG_COMPONENT_NTNET_RECEIVE "ntnet_receive" //called on an object by its NTNET connection component on receive. (sending_id(number), sending_netname(text), data(datum/netdata))
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
#define AFFIX_PREFIX (1 << 0)
|
||||
#define AFFIX_SUFFIX (1 << 1)
|
||||
|
||||
#define AFFIX_GOOD (1 << 0)
|
||||
#define AFFIX_EVIL (1 << 1)
|
||||
@@ -58,6 +58,7 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204
|
||||
#define GROUND (1<<0)
|
||||
#define FLYING (1<<1)
|
||||
#define VENTCRAWLING (1<<2)
|
||||
#define FLOATING (1<<3)
|
||||
|
||||
//Fire and Acid stuff, for resistance_flags
|
||||
#define LAVA_PROOF (1<<0)
|
||||
|
||||
@@ -15,6 +15,15 @@
|
||||
//misc footstep sounds
|
||||
#define FOOTSTEP_GENERIC_HEAVY "heavy"
|
||||
|
||||
#define FOOTPRINT_SHOE "shoe"
|
||||
#define FOOTPRINT_FOOT "foot"
|
||||
#define FOOTPRINT_PAW "paw"
|
||||
#define FOOTPRINT_CLAW "claw"
|
||||
#define FOOTPRINT_WHEEL "wheels"
|
||||
#define FOOTPRINT_TRAIL "trails_"
|
||||
#define FOOTPRINT_SNAKE "snake"
|
||||
#define FOOTPRINT_DRAG "drag"
|
||||
|
||||
/*
|
||||
|
||||
id = list(
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
#define IF_HAS_BLOOD_DNA(__thing) GET_COMPONENT_FROM(__FR##__thing, /datum/component/forensics, __thing); if(__FR##__thing && length(__FR##__thing.blood_DNA))
|
||||
#define IF_HAS_BLOOD_DNA_AND(__thing, __conditions...) GET_COMPONENT_FROM(__FR##__thing, /datum/component/forensics, __thing); if(__FR##__thing && length(__FR##__thing.blood_DNA) && (##__conditions))
|
||||
@@ -28,7 +28,9 @@
|
||||
#define ITEM_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 ITEM_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 ITEM_SLOT_NECK (1<<13)
|
||||
#define ITEM_SLOT_SUITSTORE (1<<14)
|
||||
#define ITEM_SLOT_HANDS (1<<14)
|
||||
#define ITEM_SLOT_BACKPACK (1<<15)
|
||||
#define ITEM_SLOT_SUITSTORE (1<<16)
|
||||
|
||||
//SLOTS
|
||||
#define SLOT_BACK 1
|
||||
@@ -86,6 +88,10 @@
|
||||
. = ITEM_SLOT_ICLOTHING
|
||||
if(SLOT_L_STORE, SLOT_R_STORE)
|
||||
. = ITEM_SLOT_POCKET
|
||||
if(SLOT_HANDS)
|
||||
. = ITEM_SLOT_HANDS
|
||||
if(SLOT_IN_BACKPACK)
|
||||
. = ITEM_SLOT_BACKPACK
|
||||
if(SLOT_S_STORE)
|
||||
. = ITEM_SLOT_SUITSTORE
|
||||
|
||||
@@ -237,3 +243,6 @@ GLOBAL_LIST_INIT(security_wintercoat_allowed, typecacheof(list(
|
||||
|
||||
//Internals checker
|
||||
#define GET_INTERNAL_SLOTS(C) list(C.head, C.wear_mask)
|
||||
|
||||
//Slots that won't trigger humans' update_genitals() on equip().
|
||||
GLOBAL_LIST_INIT(no_genitals_update_slots, list(SLOT_L_STORE, SLOT_R_STORE, SLOT_S_STORE, SLOT_IN_BACKPACK, SLOT_LEGCUFFED, SLOT_HANDCUFFED, SLOT_HANDS, SLOT_GENERC_DEXTROUS_STORAGE))
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
// simple is_type and similar inline helpers
|
||||
|
||||
#define islist(L) (istype(L, /list))
|
||||
|
||||
#define in_range(source, user) (get_dist(source, user) <= 1 && (get_step(source, 0)?:z) == (get_step(user, 0)?:z))
|
||||
|
||||
#define ismovableatom(A) (istype(A, /atom/movable))
|
||||
|
||||
#define isatom(A) (isloc(A))
|
||||
|
||||
#define isweakref(D) (istype(D, /datum/weakref))
|
||||
@@ -59,6 +55,16 @@
|
||||
#define ismoth(A) (is_species(A, /datum/species/insect))
|
||||
#define ishumanbasic(A) (is_species(A, /datum/species/human))
|
||||
#define iscatperson(A) (ishumanbasic(A) && istype(A.dna.species, /datum/species/human/felinid) )
|
||||
#define isdwarf(A) (is_species(A, /datum/species/dwarf))
|
||||
|
||||
// Citadel specific species
|
||||
#define isipcperson(A) (is_species(A, /datum/species/ipc))
|
||||
#define ismammal(A) (is_species(A, /datum/species/mammal))
|
||||
#define isavian(A) (is_species(A, /datum/species/avian))
|
||||
#define isaquatic(A) (is_species(A, /datum/species/aquatic))
|
||||
#define isinsect(A) (is_species(A, /datum/species/insect))
|
||||
#define isxenoperson(A) (is_species(A, /datum/species/xeno))
|
||||
#define isstartjelly(A) (is_species(A, /datum/species/jelly/roundstartslime))
|
||||
|
||||
//more carbon mobs
|
||||
#define ismonkey(A) (istype(A, /mob/living/carbon/monkey))
|
||||
@@ -175,6 +181,8 @@ GLOBAL_LIST_INIT(heavyfootmob, typecacheof(list(
|
||||
|
||||
#define iscameramob(A) (istype(A, /mob/camera))
|
||||
|
||||
#define isaicamera(A) (istype(A, /mob/camera/aiEye))
|
||||
|
||||
#define iseminence(A) (istype(A, /mob/camera/eminence))
|
||||
|
||||
//Footstep helpers
|
||||
@@ -211,6 +219,10 @@ GLOBAL_LIST_INIT(pointed_types, typecacheof(list(
|
||||
|
||||
#define isbodypart(A) (istype(A, /obj/item/bodypart))
|
||||
|
||||
#define isprojectile(A) (istype(A, /obj/item/projectile))
|
||||
|
||||
#define isgun(A) (istype(A, /obj/item/gun))
|
||||
|
||||
//Assemblies
|
||||
#define isassembly(O) (istype(O, /obj/item/assembly))
|
||||
|
||||
@@ -234,4 +246,4 @@ GLOBAL_LIST_INIT(glass_sheet_types, typecacheof(list(
|
||||
|
||||
#define isblobmonster(O) (istype(O, /mob/living/simple_animal/hostile/blob))
|
||||
|
||||
#define isshuttleturf(T) (length(T.baseturfs) && (/turf/baseturf_skipover/shuttle in T.baseturfs))
|
||||
#define isshuttleturf(T) (length(T.baseturfs) && (/turf/baseturf_skipover/shuttle in T.baseturfs))
|
||||
@@ -39,6 +39,7 @@
|
||||
#define DOOR_HELPER_LAYER 2.71 //keep this above OPEN_DOOR_LAYER
|
||||
#define PROJECTILE_HIT_THRESHHOLD_LAYER 2.75 //projectiles won't hit objects at or below this layer if possible
|
||||
#define TABLE_LAYER 2.8
|
||||
#define TRAY_LAYER 2.85
|
||||
#define BELOW_OBJ_LAYER 2.9
|
||||
#define LOW_ITEM_LAYER 2.95
|
||||
//#define OBJ_LAYER 3 //For easy recordkeeping; this is a byond define
|
||||
|
||||
@@ -92,3 +92,7 @@ require only minor tweaks.
|
||||
#define PLACE_SAME_Z "same"
|
||||
#define PLACE_SPACE_RUIN "space"
|
||||
#define PLACE_LAVA_RUIN "lavaland"
|
||||
|
||||
|
||||
//Map type stuff.
|
||||
#define MAP_TYPE_STATION "station"
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
#define TICK_USAGE_TO_MS(starting_tickusage) (TICK_DELTA_TO_MS(TICK_USAGE_REAL - starting_tickusage))
|
||||
|
||||
#define PERCENT(val) (round((val)*100, 0.1))
|
||||
#define CLAMP01(x) (CLAMP(x, 0, 1))
|
||||
|
||||
//time of day but automatically adjusts to the server going into the next day within the same round.
|
||||
//for when you need a reliable time number that doesn't depend on byond time.
|
||||
@@ -30,17 +29,12 @@
|
||||
// round() acts like floor(x, 1) by default but can't handle other values
|
||||
#define FLOOR(x, y) ( round((x) / (y)) * (y) )
|
||||
|
||||
#define CLAMP(CLVALUE,CLMIN,CLMAX) ( max( (CLMIN), min((CLVALUE), (CLMAX)) ) )
|
||||
|
||||
// Similar to clamp but the bottom rolls around to the top and vice versa. min is inclusive, max is exclusive
|
||||
#define WRAP(val, min, max) ( min == max ? min : (val) - (round(((val) - (min))/((max) - (min))) * ((max) - (min))) )
|
||||
|
||||
// Real modulus that handles decimals
|
||||
#define MODULUS(x, y) ( (x) - (y) * round((x) / (y)) )
|
||||
|
||||
// Tangent
|
||||
#define TAN(x) (sin(x) / cos(x))
|
||||
|
||||
// Cotangent
|
||||
#define COT(x) (1 / TAN(x))
|
||||
|
||||
@@ -50,8 +44,6 @@
|
||||
// Cosecant
|
||||
#define CSC(x) (1 / sin(x))
|
||||
|
||||
#define ATAN2(x, y) ( !(x) && !(y) ? 0 : (y) >= 0 ? arccos((x) / sqrt((x)*(x) + (y)*(y))) : -arccos((x) / sqrt((x)*(x) + (y)*(y))) )
|
||||
|
||||
// Greatest Common Divisor - Euclid's algorithm
|
||||
/proc/Gcd(a, b)
|
||||
return b ? Gcd(b, (a) % (b)) : a
|
||||
@@ -207,4 +199,4 @@
|
||||
#define LORENTZ_CUMULATIVE_DISTRIBUTION(x, y, s) ( (1/PI)*TORADIANS(arctan((x-y)/s)) + 1/2 )
|
||||
|
||||
#define RULE_OF_THREE(a, b, x) ((a*x)/b)
|
||||
// )
|
||||
// )
|
||||
+27
-16
@@ -51,24 +51,25 @@ Will print: "/mob/living/carbon/human/death" (you can optionally embed it in a s
|
||||
|
||||
//Human Overlays Indexes/////////
|
||||
//LOTS OF CIT CHANGES HERE. BE CAREFUL WHEN UPSTREAM ADDS MORE LAYERS
|
||||
#define MUTATIONS_LAYER 31 //mutations. Tk headglows, cold resistance glow, etc
|
||||
#define GENITALS_BEHIND_LAYER 30 //Some genitalia needs to be behind everything, such as with taurs (Taurs use body_behind_layer
|
||||
#define BODY_BEHIND_LAYER 29 //certain mutantrace features (tail when looking south) that must appear behind the body parts
|
||||
#define BODYPARTS_LAYER 28 //Initially "AUGMENTS", this was repurposed to be a catch-all bodyparts flag
|
||||
#define MARKING_LAYER 27 //Matrixed body markings because clashing with snouts?
|
||||
#define BODY_ADJ_LAYER 26 //certain mutantrace features (snout, body markings) that must appear above the body parts
|
||||
#define GENITALS_FRONT_LAYER 25 //Draws some genitalia above clothes and the TAUR body if need be.
|
||||
#define BODY_LAYER 24 //underwear, undershirts, socks, eyes, lips(makeup)
|
||||
#define FRONT_MUTATIONS_LAYER 23 //mutations that should appear above body, body_adj and bodyparts layer (e.g. laser eyes)
|
||||
#define DAMAGE_LAYER 22 //damage indicators (cuts and burns)
|
||||
#define UNIFORM_LAYER 21
|
||||
#define ID_LAYER 20
|
||||
#define MUTATIONS_LAYER 32 //mutations. Tk headglows, cold resistance glow, etc
|
||||
#define GENITALS_BEHIND_LAYER 31 //Some genitalia needs to be behind everything, such as with taurs (Taurs use body_behind_layer
|
||||
#define BODY_BEHIND_LAYER 30 //certain mutantrace features (tail when looking south) that must appear behind the body parts
|
||||
#define BODYPARTS_LAYER 29 //Initially "AUGMENTS", this was repurposed to be a catch-all bodyparts flag
|
||||
#define MARKING_LAYER 28 //Matrixed body markings because clashing with snouts?
|
||||
#define BODY_ADJ_LAYER 27 //certain mutantrace features (snout, body markings) that must appear above the body parts
|
||||
#define GENITALS_FRONT_LAYER 26 //Draws some genitalia above clothes and the TAUR body if need be.
|
||||
#define BODY_LAYER 25 //underwear, undershirts, socks, eyes, lips(makeup)
|
||||
#define FRONT_MUTATIONS_LAYER 24 //mutations that should appear above body, body_adj and bodyparts layer (e.g. laser eyes)
|
||||
#define DAMAGE_LAYER 23 //damage indicators (cuts and burns)
|
||||
#define UNIFORM_LAYER 22
|
||||
#define ID_LAYER 21
|
||||
#define HANDS_PART_LAYER 20
|
||||
#define SHOES_LAYER 19
|
||||
#define GLOVES_LAYER 18
|
||||
#define EARS_LAYER 17
|
||||
#define BODY_TAUR_LAYER 16
|
||||
#define SUIT_LAYER 15
|
||||
#define GENITALS_EXPOSED_LAYER 14
|
||||
#define GLASSES_LAYER 13
|
||||
#define BELT_LAYER 12 //Possible make this an overlay of somethign required to wear a belt?
|
||||
#define SUIT_STORE_LAYER 11
|
||||
@@ -82,7 +83,7 @@ Will print: "/mob/living/carbon/human/death" (you can optionally embed it in a s
|
||||
#define HANDS_LAYER 3
|
||||
#define BODY_FRONT_LAYER 2
|
||||
#define FIRE_LAYER 1 //If you're on fire
|
||||
#define TOTAL_LAYERS 30 //KEEP THIS UP-TO-DATE OR SHIT WILL BREAK ;_;
|
||||
#define TOTAL_LAYERS 32 //KEEP THIS UP-TO-DATE OR SHIT WILL BREAK ;_;
|
||||
|
||||
//Human Overlay Index Shortcuts for alternate_worn_layer, layers
|
||||
//Because I *KNOW* somebody will think layer+1 means "above"
|
||||
@@ -171,12 +172,22 @@ GLOBAL_LIST_EMPTY(bloody_footprints_cache)
|
||||
#define BLOOD_LOSS_IN_SPREAD 20
|
||||
|
||||
//Bloody shoe blood states
|
||||
#define BLOOD_STATE_HUMAN "blood"
|
||||
#define BLOOD_STATE_XENO "xeno"
|
||||
#define BLOOD_STATE_BLOOD "blood"
|
||||
#define BLOOD_STATE_OIL "oil"
|
||||
#define BLOOD_STATE_NOT_BLOODY "no blood whatsoever"
|
||||
#define BLOOD_AMOUNT_PER_DECAL 20
|
||||
|
||||
//Blood Decal Colors
|
||||
#define BLOOD_COLOR_HUMAN "#dc0000"
|
||||
#define BLOOD_COLOR_XENO "#94a83c"
|
||||
#define BLOOD_COLOR_OIL "#301d02"
|
||||
#define BLOOD_COLOR_SYNTHETIC "#3f48aa"
|
||||
#define BLOOD_COLOR_SLIME "#00ff90"
|
||||
#define BLOOD_COLOR_LIZARD "#db004D"
|
||||
#define BLOOD_COLOR_UNIVERSAL "#db3300"
|
||||
#define BLOOD_COLOR_BUG "#a37c0f"
|
||||
|
||||
|
||||
//suit sensors: sensor_mode defines
|
||||
|
||||
#define SENSOR_OFF 0
|
||||
@@ -479,7 +490,7 @@ GLOBAL_LIST_INIT(pda_reskins, list(PDA_SKIN_CLASSIC = 'icons/obj/pda.dmi', PDA_S
|
||||
#define PDAIMG(what) {"<span class="pda16x16 [#what]"></span>"}
|
||||
|
||||
//Filters
|
||||
#define AMBIENT_OCCLUSION list("type"="drop_shadow","x"=0,"y"=-2,"size"=4,"border"=4,"color"="#04080FAA")
|
||||
#define AMBIENT_OCCLUSION list("type"="drop_shadow","x"=0,"y"=-2,"size"=4,"color"="#04080FAA")
|
||||
#define EYE_BLUR(size) list("type"="blur", "size"=size)
|
||||
#define GRAVITY_MOTION_BLUR list("type"="motion_blur","x"=0,"y"=0)
|
||||
|
||||
|
||||
@@ -117,7 +117,6 @@
|
||||
#define BIOWARE_NERVES "nerves"
|
||||
#define BIOWARE_CIRCULATION "circulation"
|
||||
#define BIOWARE_LIGAMENTS "ligaments"
|
||||
#define BIOWARE_DISSECTION "dissected"
|
||||
|
||||
//Health hud screws for carbon mobs
|
||||
#define SCREWYHUD_NONE 0
|
||||
|
||||
@@ -1,12 +1,19 @@
|
||||
#define MOVESPEED_DATA_INDEX_PRIORITY 1
|
||||
#define MOVESPEED_DATA_INDEX_FLAGS 2
|
||||
#define MOVESPEED_DATA_INDEX_MULTIPLICATIVE_SLOWDOWN 3
|
||||
#define MOVESPEED_DATA_INDEX_MOVETYPE 4
|
||||
#define MOVESPEED_DATA_INDEX_BL_MOVETYPE 5
|
||||
#define MOVESPEED_DATA_INDEX_CONFLICT 6
|
||||
|
||||
#define MOVESPEED_DATA_INDEX_MAX 3
|
||||
#define MOVESPEED_DATA_INDEX_MAX 6
|
||||
|
||||
//flags
|
||||
#define IGNORE_NOSLOW (1 << 0)
|
||||
|
||||
//conflict types
|
||||
|
||||
#define MOVE_CONFLICT_JETPACK "JETPACK"
|
||||
|
||||
//ids
|
||||
|
||||
#define MOVESPEED_ID_MOB_WALK_RUN_CONFIG_SPEED "MOB_WALK_RUN"
|
||||
@@ -16,15 +23,29 @@
|
||||
#define MOVESPEED_ID_SLIME_HEALTHMOD "SLIME_HEALTH_MODIFIER"
|
||||
#define MOVESPEED_ID_SLIME_TEMPMOD "SLIME_TEMPERATURE_MODIFIER"
|
||||
|
||||
#define MOVESPEED_ID_SLIME_STATUS "SLIME_STATUS"
|
||||
|
||||
#define MOVESPEED_ID_TARANTULA_WEB "TARANTULA_WEB"
|
||||
|
||||
#define MOVESPEED_ID_LIVING_TURF_SPEEDMOD "LIVING_TURF_SPEEDMOD"
|
||||
|
||||
#define MOVESPEED_ID_CARBON_SOFTCRIT "CARBON_SOFTCRIT"
|
||||
#define MOVESPEED_ID_CARBON_OLDSPEED "CARBON_DEPRECATED_SPEED"
|
||||
|
||||
#define MOVESPEED_ID_DNA_VAULT "DNA_VAULT"
|
||||
|
||||
#define MOVESPEED_ID_YELLOW_ORB "YELLOW_ORB"
|
||||
|
||||
#define MOVESPEED_ID_TARFOOT "TARFOOT"
|
||||
|
||||
#define MOVESPEED_ID_SEPIA "SEPIA"
|
||||
|
||||
#define MOVESPEED_ID_MONKEY_REAGENT_SPEEDMOD "MONKEY_REAGENT_SPEEDMOD"
|
||||
#define MOVESPEED_ID_MONKEY_TEMPERATURE_SPEEDMOD "MONKEY_TEMPERATURE_SPEEDMOD"
|
||||
#define MOVESPEED_ID_MONKEY_HEALTH_SPEEDMOD "MONKEY_HEALTH_SPEEDMOD"
|
||||
|
||||
#define MOVESPEED_ID_CHANGELING_MUSCLES "CHANGELING_MUSCLES"
|
||||
|
||||
#define MOVESPEED_ID_SIMPLEMOB_VARSPEED "SIMPLEMOB_VARSPEED_MODIFIER"
|
||||
#define MOVESPEED_ID_ADMIN_VAREDIT "ADMIN_VAREDIT_MODIFIER"
|
||||
|
||||
@@ -32,5 +53,18 @@
|
||||
|
||||
#define MOVESPEED_ID_SANITY "MOOD_SANITY"
|
||||
|
||||
#define MOVESPEED_ID_SPECIES "SPECIES_SPEED_MOD"
|
||||
|
||||
#define MOVESPEED_ID_PRONE_DRAGGING "PRONE_DRAG"
|
||||
#define MOVESPEED_ID_HUMAN_CARRYING "HUMAN_CARRY"
|
||||
#define MOVESPEED_ID_HUMAN_CARRYING "HUMAN_CARRY"
|
||||
|
||||
#define MOVESPEED_ID_TASED_STATUS "TASED"
|
||||
|
||||
#define MOVESPEED_ID_SLAUGHTER "SLAUGHTER"
|
||||
|
||||
#define MOVESPEED_ID_CYBER_THRUSTER "CYBER_IMPLANT_THRUSTER"
|
||||
#define MOVESPEED_ID_JETPACK "JETPACK"
|
||||
|
||||
#define MOVESPEED_ID_SHOVE "SHOVE"
|
||||
|
||||
#define MOVESPEED_ID_MKULTRA "MKULTRA"
|
||||
+26
-24
@@ -2,43 +2,45 @@
|
||||
|
||||
|
||||
#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 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.
|
||||
#define FROZEN (1<<8)
|
||||
#define SHOVABLE_ONTO (1<<9) //called on turf.shove_act() to consider whether an object should have a niche effect (defined in their own shove_act()) when someone is pushed onto it, or do a sanity CanPass() check.
|
||||
#define SHOVABLE_ONTO (1<<9) //called on turf.shove_act() to consider whether an object should have a niche effect (defined in their own shove_act()) when someone is pushed onto it, or do a sanity CanPass() check.
|
||||
|
||||
// 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<<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.
|
||||
#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.
|
||||
#define SLOWS_WHILE_IN_HAND (1<<4)
|
||||
#define NO_MAT_REDEMPTION (1<<5) // Stops you from putting things like an RCD or other items into an ORM or protolathe for materials.
|
||||
#define DROPDEL (1<<6) // When dropped, it calls qdel on itself
|
||||
#define NOBLUDGEON (1<<7) // when an item has this it produces no "X has been hit by Y with Z" message in the default attackby()
|
||||
#define ABSTRACT (1<<8) // for all things that are technically items but used for various different stuff
|
||||
#define IMMUTABLE_SLOW (1<<9) //When players should not be able to change the slowdown of the item (Speed potions, ect)
|
||||
#define NO_MAT_REDEMPTION (1<<5) //Stops you from putting things like an RCD or other items into an ORM or protolathe for materials.
|
||||
#define DROPDEL (1<<6) //When dropped, it calls qdel on itself
|
||||
#define NOBLUDGEON (1<<7) //when an item has this it produces no "X has been hit by Y with Z" message in the default attackby()
|
||||
#define ABSTRACT (1<<8) //for all things that are technically items but used for various different stuff
|
||||
#define IMMUTABLE_SLOW (1<<9) //When players should not be able to change the slowdown of the item (Speed potions, ect)
|
||||
#define SURGICAL_TOOL (1<<10) //Tool commonly used for surgery: won't attack targets in an active surgical operation on help intent (in case of mistakes)
|
||||
#define NO_UNIFORM_REQUIRED (1<<11) // Can be worn on certain slots (currently belt and id) that would otherwise require an uniform.
|
||||
#define NO_UNIFORM_REQUIRED (1<<11) //Can be worn on certain slots (currently belt and id) that would otherwise require an uniform.
|
||||
|
||||
// Flags for the clothing_flags var on /obj/item/clothing
|
||||
|
||||
#define LAVAPROTECT (1<<0)
|
||||
#define LAVAPROTECT (1<<0)
|
||||
#define STOPSPRESSUREDAMAGE (1<<1) //SUIT and HEAD items which stop pressure damage. To stop you taking all pressure damage you must have both a suit and head item with this flag.
|
||||
#define BLOCK_GAS_SMOKE_EFFECT (1<<2) // blocks the effect that chemical clouds would have on a mob --glasses, mask and helmets ONLY!
|
||||
#define ALLOWINTERNALS (1<<3) // mask allows internals
|
||||
#define NOSLIP (1<<4) //prevents from slipping on wet floors, in space etc
|
||||
#define THICKMATERIAL (1<<5) //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 VOICEBOX_TOGGLABLE (1<<6) // The voicebox in this clothing can be toggled.
|
||||
#define VOICEBOX_DISABLED (1<<7) // The voicebox is currently turned off.
|
||||
#define BLOCK_GAS_SMOKE_EFFECT (1<<2) //blocks the effect that chemical clouds would have on a mob --glasses, mask and helmets ONLY!
|
||||
#define ALLOWINTERNALS (1<<3) //mask allows internals
|
||||
#define NOSLIP (1<<4) //prevents from slipping on wet floors, in space etc
|
||||
#define THICKMATERIAL (1<<5) //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 VOICEBOX_TOGGLABLE (1<<6) //The voicebox in this clothing can be toggled.
|
||||
#define VOICEBOX_DISABLED (1<<7) //The voicebox is currently turned off.
|
||||
#define SNUG_FIT (1<<8) //Prevents knock-off from things like hat-throwing.
|
||||
#define ANTI_TINFOIL_MANEUVER (1<<9) //Hats with negative effects when worn (i.e the tinfoil hat).
|
||||
|
||||
// Flags for the organ_flags var on /obj/item/organ
|
||||
|
||||
@@ -47,4 +49,4 @@
|
||||
#define ORGAN_FAILING (1<<2) //Failing organs perform damaging effects until replaced or fixed
|
||||
#define ORGAN_EXTERNAL (1<<3) //Was this organ implanted/inserted/etc, if true will not be removed during species change.
|
||||
#define ORGAN_VITAL (1<<4) //Currently only the brain
|
||||
#define ORGAN_NO_SPOIL (1<<5) //Do not spoil under any circumstances
|
||||
#define ORGAN_NO_SPOIL (1<<5) //Do not spoil under any circumstances
|
||||
+11
-38
@@ -27,45 +27,18 @@
|
||||
#define NOBLIUM_RESEARCH_AMOUNT 1000
|
||||
#define BZ_RESEARCH_SCALE 4
|
||||
#define BZ_RESEARCH_MAX_AMOUNT 400
|
||||
#define MIASMA_RESEARCH_AMOUNT 160
|
||||
#define MIASMA_RESEARCH_AMOUNT 6
|
||||
#define STIMULUM_RESEARCH_AMOUNT 50
|
||||
//Plasma fusion properties
|
||||
#define FUSION_ENERGY_THRESHOLD 3e9 //Amount of energy it takes to start a fusion reaction
|
||||
#define FUSION_TEMPERATURE_THRESHOLD 1000 //Temperature required to start a fusion reaction
|
||||
#define FUSION_MOLE_THRESHOLD 250 //Mole count required (tritium/plasma) to start a fusion reaction
|
||||
#define FUSION_RELEASE_ENERGY_SUPER 3e9 //Amount of energy released in the fusion process, super tier
|
||||
#define FUSION_RELEASE_ENERGY_HIGH 1e9 //Amount of energy released in the fusion process, high tier
|
||||
#define FUSION_RELEASE_ENERGY_MID 5e8 //Amount of energy released in the fusion process, mid tier
|
||||
#define FUSION_RELEASE_ENERGY_LOW 1e8 //Amount of energy released in the fusion process, low tier
|
||||
#define FUSION_MEDIATION_FACTOR 80 //Arbitrary
|
||||
#define FUSION_SUPER_TIER_THRESHOLD 50 //anything above this is super tier
|
||||
#define FUSION_HIGH_TIER_THRESHOLD 20 //anything above this and below 50 is high tier
|
||||
#define FUSION_MID_TIER_THRESHOLD 5 //anything above this and below 20 is mid tier - below this is low tier, but that doesnt need a define
|
||||
#define FUSION_ENERGY_DIVISOR_SUPER 25 //power_ratio is divided by this during energy calculations
|
||||
#define FUSION_ENERGY_DIVISOR_HIGH 20
|
||||
#define FUSION_ENERGY_DIVISOR_MID 10
|
||||
#define FUSION_ENERGY_DIVISOR_LOW 2
|
||||
#define FUSION_GAS_CREATION_FACTOR_TRITIUM 0.40 //trit - one gas rather than two, so think about that when calculating stuff - 40% in total
|
||||
#define FUSION_GAS_CREATION_FACTOR_STIM 0.05 //stim percentage creation from high tier - 5%, 60% in total with pluox
|
||||
#define FUSION_GAS_CREATION_FACTOR_PLUOX 0.55 //pluox percentage creation from high tier - 55%, 60% in total with stim
|
||||
#define FUSION_GAS_CREATION_FACTOR_NITRYL 0.20 //nitryl and N2O - 80% in total
|
||||
#define FUSION_GAS_CREATION_FACTOR_N2O 0.60 //nitryl and N2O - 80% in total
|
||||
#define FUSION_GAS_CREATION_FACTOR_BZ 0.05 //BZ - 5% - 90% in total with CO2
|
||||
#define FUSION_GAS_CREATION_FACTOR_CO2 0.85 //CO2 - 85% - 90% in total with BZ
|
||||
#define FUSION_MID_TIER_RAD_PROB_FACTOR 2 //probability of radpulse is power ratio * this for whatever tier
|
||||
#define FUSION_LOW_TIER_RAD_PROB_FACTOR 5
|
||||
#define FUSION_EFFICIENCY_BASE 60 //used in the fusion efficiency calculations
|
||||
#define FUSION_EFFICIENCY_DIVISOR 0.6 //ditto
|
||||
#define FUSION_RADIATION_FACTOR 15000 //horizontal asymptote
|
||||
#define FUSION_RADIATION_CONSTANT 30 //equation is form of (ax) / (x + b), where a = radiation factor and b = radiation constant and x = power ratio (https://www.desmos.com/calculator/4i1f296phl)
|
||||
#define FUSION_ZAP_POWER_ASYMPTOTE 50000 //maximum value - not enough to instacrit but it'll still hurt like shit
|
||||
#define FUSION_ZAP_POWER_CONSTANT 75 //equation is of from [ax / (x + b)] + c, where a = zap power asymptote, b = zap power constant, c = zap power base and x = power ratio
|
||||
#define FUSION_ZAP_POWER_BASE 1000 //(https://www.desmos.com/calculator/vvbmhf4unm)
|
||||
#define FUSION_ZAP_RANGE_SUPER 9 //range of the tesla zaps that occur from fusion
|
||||
#define FUSION_ZAP_RANGE_HIGH 7
|
||||
#define FUSION_ZAP_RANGE_MID 5
|
||||
#define FUSION_ZAP_RANGE_LOW 3
|
||||
#define FUSION_PARTICLE_FACTOR_SUPER 4 //# of particles fired out is equal to rand(3,6) * this for whatever tier
|
||||
#define FUSION_PARTICLE_FACTOR_HIGH 3
|
||||
#define FUSION_PARTICLE_FACTOR_MID 2
|
||||
#define FUSION_PARTICLE_FACTOR_LOW 1
|
||||
#define FUSION_TRITIUM_CONVERSION_COEFFICIENT (1e-10)
|
||||
#define INSTABILITY_GAS_POWER_FACTOR 0.003
|
||||
#define FUSION_TRITIUM_MOLES_USED 1
|
||||
#define PLASMA_BINDING_ENERGY 20000000
|
||||
#define TOROID_VOLUME_BREAKEVEN 1000
|
||||
#define FUSION_TEMPERATURE_THRESHOLD 10000
|
||||
#define PARTICLE_CHANCE_CONSTANT (-20000000)
|
||||
#define FUSION_RAD_MAX 2000
|
||||
#define FUSION_RAD_COEFFICIENT (-1000)
|
||||
#define FUSION_INSTABILITY_ENDOTHERMALITY 2
|
||||
|
||||
@@ -50,3 +50,7 @@
|
||||
#define ASSEMBLY_THIRD_STEP 2
|
||||
#define ASSEMBLY_FOURTH_STEP 3
|
||||
#define ASSEMBLY_FIFTH_STEP 4
|
||||
|
||||
|
||||
//Checks to determine borg availability depending on the server's config. These are defines in the interest of reducing copypasta
|
||||
#define BORG_SEC_AVAILABLE (!CONFIG_GET(flag/disable_secborg) && GLOB.security_level >= CONFIG_GET(number/minimum_secborg_alert))
|
||||
@@ -23,6 +23,8 @@
|
||||
#define MODE_WHISPER "whisper"
|
||||
#define MODE_WHISPER_CRIT "whispercrit"
|
||||
|
||||
#define MODE_CUSTOM_SAY "custom_say"
|
||||
|
||||
#define MODE_DEPARTMENT "department"
|
||||
#define MODE_KEY_DEPARTMENT "h"
|
||||
#define MODE_TOKEN_DEPARTMENT ":h"
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
#define CHANNEL_ADMIN 1023
|
||||
#define CHANNEL_VOX 1022
|
||||
#define CHANNEL_JUKEBOX 1021
|
||||
#define CHANNEL_JUKEBOX_START 1020
|
||||
#define CHANNEL_JUSTICAR_ARK 1019
|
||||
#define CHANNEL_HEARTBEAT 1018 //sound channel for heartbeats
|
||||
#define CHANNEL_AMBIENCE 1017
|
||||
#define CHANNEL_BUZZ 1016
|
||||
#define CHANNEL_BICYCLE 1015
|
||||
#define CHANNEL_JUKEBOX_START 1016 //The gap between this and CHANNEL_JUKEBOX determines the amount of free jukebox channels. This currently allows 6 jukebox channels to exist.
|
||||
#define CHANNEL_JUSTICAR_ARK 1015
|
||||
#define CHANNEL_HEARTBEAT 1014 //sound channel for heartbeats
|
||||
#define CHANNEL_AMBIENCE 1013
|
||||
#define CHANNEL_BUZZ 1012
|
||||
#define CHANNEL_BICYCLE 1011
|
||||
|
||||
//CIT CHANNELS - TRY NOT TO REGRESS
|
||||
#define CHANNEL_PRED 1010
|
||||
|
||||
@@ -44,6 +44,8 @@
|
||||
|
||||
#define STATUS_EFFECT_SLEEPING /datum/status_effect/incapacitating/sleeping //the affected is asleep
|
||||
|
||||
#define STATUS_EFFECT_TASED /datum/status_effect/electrode //the affected has been tased, preventing fine muscle control
|
||||
|
||||
#define STATUS_EFFECT_PACIFY /datum/status_effect/pacify //the affected is pacified, preventing direct hostile actions
|
||||
|
||||
#define STATUS_EFFECT_BELLIGERENT /datum/status_effect/belligerent //forces the affected to walk, doing damage if they try to run
|
||||
@@ -72,6 +74,9 @@
|
||||
|
||||
#define STATUS_EFFECT_ICHORIAL_STAIN /datum/status_effect/ichorial_stain //Prevents a servant from being revived by vitality matrices for one minute.
|
||||
|
||||
#define STATUS_EFFECT_BREASTS_ENLARGEMENT /datum/status_effect/chem/breast_enlarger //Applied slowdown due to the ominous bulk.
|
||||
|
||||
#define STATUS_EFFECT_PENIS_ENLARGEMENT /datum/status_effect/chem/penis_enlarger //More applied slowdown, just like the above.
|
||||
/////////////
|
||||
// NEUTRAL //
|
||||
/////////////
|
||||
|
||||
@@ -99,7 +99,6 @@
|
||||
#define FIRE_PRIORITY_GARBAGE 15
|
||||
#define FIRE_PRIORITY_WET_FLOORS 20
|
||||
#define FIRE_PRIORITY_AIR 20
|
||||
#define FIRE_PRIORITY_NPC 20
|
||||
#define FIRE_PRIORITY_PROCESS 25
|
||||
#define FIRE_PRIORITY_THROWING 25
|
||||
#define FIRE_PRIORITY_SPACEDRIFT 30
|
||||
@@ -112,6 +111,7 @@
|
||||
#define FIRE_PRIORITY_AIR_TURFS 40
|
||||
#define FIRE_PRIORITY_DEFAULT 50
|
||||
#define FIRE_PRIORITY_PARALLAX 65
|
||||
#define FIRE_PRIORITY_NPC 80
|
||||
#define FIRE_PRIORITY_FLIGHTPACKS 80
|
||||
#define FIRE_PRIORITY_MOBS 100
|
||||
#define FIRE_PRIORITY_TGUI 110
|
||||
|
||||
@@ -70,8 +70,6 @@
|
||||
#define TRAIT_MONKEYLIKE "monkeylike" //sets IsAdvancedToolUser to FALSE
|
||||
#define TRAIT_PACIFISM "pacifism"
|
||||
#define TRAIT_IGNORESLOWDOWN "ignoreslow"
|
||||
#define TRAIT_GOTTAGOFAST "fast"
|
||||
#define TRAIT_GOTTAGOREALLYFAST "2fast"
|
||||
#define TRAIT_DEATHCOMA "deathcoma" //Causes death-like unconsciousness
|
||||
#define TRAIT_FAKEDEATH "fakedeath" //Makes the owner appear as dead to most forms of medical examination
|
||||
#define TRAIT_DISFIGURED "disfigured"
|
||||
@@ -81,6 +79,7 @@
|
||||
#define TRAIT_PUSHIMMUNE "push_immunity"
|
||||
#define TRAIT_SHOCKIMMUNE "shock_immunity"
|
||||
#define TRAIT_STABLEHEART "stable_heart"
|
||||
#define TRAIT_STABLELIVER "stable_liver"
|
||||
#define TRAIT_RESISTHEAT "resist_heat"
|
||||
#define TRAIT_RESISTHEATHANDS "resist_heat_handsonly" //For when you want to be able to touch hot things, but still want fire to be an issue.
|
||||
#define TRAIT_RESISTCOLD "resist_cold"
|
||||
@@ -110,6 +109,7 @@
|
||||
#define TRAIT_NOHARDCRIT "nohardcrit"
|
||||
#define TRAIT_NOSOFTCRIT "nosoftcrit"
|
||||
#define TRAIT_MINDSHIELD "mindshield"
|
||||
#define TRAIT_DISSECTED "dissected"
|
||||
#define TRAIT_FEARLESS "fearless"
|
||||
#define TRAIT_UNSTABLE "unstable"
|
||||
#define TRAIT_PARALYSIS_L_ARM "para-l-arm" //These are used for brain-based paralysis, where replacing the limb won't fix it
|
||||
@@ -121,6 +121,9 @@
|
||||
#define TRAIT_STRONG_GRABBER "strong_grabber"
|
||||
#define TRAIT_CALCIUM_HEALER "calcium_healer"
|
||||
#define TRAIT_CAPTAIN_METABOLISM "captain-metabolism"
|
||||
#define TRAIT_ABDUCTOR_TRAINING "abductor-training"
|
||||
#define TRAIT_ABDUCTOR_SCIENTIST_TRAINING "abductor-scientist-training"
|
||||
#define TRAIT_SURGEON "surgeon"
|
||||
|
||||
//non-mob traits
|
||||
#define TRAIT_PARALYSIS "paralysis" //Used for limb-based paralysis, where replacing the limb will fix it
|
||||
@@ -142,13 +145,14 @@
|
||||
#define TRAIT_SKITTISH "skittish"
|
||||
#define TRAIT_POOR_AIM "poor_aim"
|
||||
#define TRAIT_PROSOPAGNOSIA "prosopagnosia"
|
||||
#define TRAIT_DRUNK_HEALING "drunk_healing"
|
||||
#define TRAIT_TAGGER "tagger"
|
||||
#define TRAIT_PHOTOGRAPHER "photographer"
|
||||
#define TRAIT_MUSICIAN "musician"
|
||||
#define TRAIT_CROCRIN_IMMUNE "crocin_immune"
|
||||
#define TRAIT_DRUNK_HEALING "drunk_healing"
|
||||
#define TRAIT_TAGGER "tagger"
|
||||
#define TRAIT_PHOTOGRAPHER "photographer"
|
||||
#define TRAIT_MUSICIAN "musician"
|
||||
#define TRAIT_CROCRIN_IMMUNE "crocin_immune"
|
||||
#define TRAIT_NYMPHO "nymphomania"
|
||||
#define TRAIT_MASO "masochism"
|
||||
#define TRAIT_EXHIBITIONIST "exhibitionist"
|
||||
#define TRAIT_HIGH_BLOOD "high_blood"
|
||||
#define TRAIT_PHARMA "hepatic_pharmacokinesis"
|
||||
#define TRAIT_PARA "paraplegic"
|
||||
@@ -179,6 +183,7 @@
|
||||
|
||||
// unique trait sources, still defines
|
||||
#define STATUE_MUTE "statue"
|
||||
#define CLONING_POD_TRAIT "cloning-pod"
|
||||
#define CHANGELING_DRAIN "drain"
|
||||
#define CHANGELING_HIVEMIND_MUTE "ling_mute"
|
||||
#define ABYSSAL_GAZE_BLIND "abyssal_gaze"
|
||||
@@ -208,3 +213,4 @@
|
||||
#define LOCKED_HELMET_TRAIT "locked-helmet"
|
||||
#define NINJA_SUIT_TRAIT "ninja-suit"
|
||||
#define ANTI_DROP_IMPLANT_TRAIT "anti-drop-implant"
|
||||
#define ABDUCTOR_ANTAGONIST "abductor-antagonist"
|
||||
@@ -20,7 +20,7 @@ GLOBAL_LIST_INIT(player_sizes_list, list("Macro" = SIZESCALE_HUGE, "Big" = SIZES
|
||||
// Edited to make the new travis check go away
|
||||
*/
|
||||
|
||||
GLOBAL_LIST_INIT(vore_sounds, list(
|
||||
GLOBAL_LIST_INIT(pred_vore_sounds, list(
|
||||
"Gulp" = 'sound/vore/pred/swallow_01.ogg',
|
||||
"Swallow" = 'sound/vore/pred/swallow_02.ogg',
|
||||
"Insertion1" = 'sound/vore/pred/insertion_01.ogg',
|
||||
@@ -40,7 +40,27 @@ GLOBAL_LIST_INIT(vore_sounds, list(
|
||||
"None" = null
|
||||
))
|
||||
|
||||
GLOBAL_LIST_INIT(release_sounds, list(
|
||||
GLOBAL_LIST_INIT(prey_vore_sounds, list(
|
||||
"Gulp" = 'sound/vore/prey/swallow_01.ogg',
|
||||
"Swallow" = 'sound/vore/prey/swallow_02.ogg',
|
||||
"Insertion1" = 'sound/vore/prey/insertion_01.ogg',
|
||||
"Insertion2" = 'sound/vore/prey/insertion_02.ogg',
|
||||
"Tauric Swallow" = 'sound/vore/prey/taurswallow.ogg',
|
||||
"Stomach Move" = 'sound/vore/prey/stomachmove.ogg',
|
||||
"Schlorp" = 'sound/vore/prey/schlorp.ogg',
|
||||
"Squish1" = 'sound/vore/prey/squish_01.ogg',
|
||||
"Squish2" = 'sound/vore/prey/squish_02.ogg',
|
||||
"Squish3" = 'sound/vore/prey/squish_03.ogg',
|
||||
"Squish4" = 'sound/vore/prey/squish_04.ogg',
|
||||
"Rustle (cloth)" = 'sound/effects/rustle5.ogg',
|
||||
"Rustle 2 (cloth)" = 'sound/effects/rustle2.ogg',
|
||||
"Rustle 3 (cloth)" = 'sound/effects/rustle3.ogg',
|
||||
"Rustle 4 (cloth)" = 'sound/effects/rustle4.ogg',
|
||||
"Rustle 5 (cloth)" = 'sound/effects/rustle5.ogg',
|
||||
"None" = null
|
||||
))
|
||||
|
||||
GLOBAL_LIST_INIT(pred_release_sounds, list(
|
||||
"Rustle (cloth)" = 'sound/effects/rustle1.ogg',
|
||||
"Rustle 2 (cloth)" = 'sound/effects/rustle2.ogg',
|
||||
"Rustle 3 (cloth)" = 'sound/effects/rustle3.ogg',
|
||||
@@ -51,3 +71,15 @@ GLOBAL_LIST_INIT(release_sounds, list(
|
||||
"Splatter" = 'sound/effects/splat.ogg',
|
||||
"None" = null
|
||||
))
|
||||
|
||||
GLOBAL_LIST_INIT(prey_release_sounds, list(
|
||||
"Rustle (cloth)" = 'sound/effects/rustle1.ogg',
|
||||
"Rustle 2 (cloth)" = 'sound/effects/rustle2.ogg',
|
||||
"Rustle 3 (cloth)" = 'sound/effects/rustle3.ogg',
|
||||
"Rustle 4 (cloth)" = 'sound/effects/rustle4.ogg',
|
||||
"Rustle 5 (cloth)" = 'sound/effects/rustle5.ogg',
|
||||
"Stomach Move" = 'sound/vore/prey/stomachmove.ogg',
|
||||
"Pred Escape" = 'sound/vore/prey/escape.ogg',
|
||||
"Splatter" = 'sound/effects/splat.ogg',
|
||||
"None" = null
|
||||
))
|
||||
|
||||
@@ -56,6 +56,7 @@ GLOBAL_LIST_EMPTY(ipc_screens_list)
|
||||
GLOBAL_LIST_EMPTY(ipc_antennas_list)
|
||||
|
||||
//Genitals and Arousal Lists
|
||||
GLOBAL_LIST_EMPTY(genitals_list)
|
||||
GLOBAL_LIST_EMPTY(cock_shapes_list)//global_lists.dm for the list initializations //Now also _DATASTRUCTURES globals.dm
|
||||
GLOBAL_LIST_EMPTY(cock_shapes_icons) //Associated list for names->icon_states for cockshapes.
|
||||
GLOBAL_LIST_EMPTY(gentlemans_organ_names)
|
||||
@@ -131,53 +132,53 @@ GLOBAL_VAR_INIT(miscreants_allowed, FALSE)
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "TLOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/mob/living/carbon/proc/has_penis()
|
||||
if(getorganslot("penis"))//slot shared with ovipositor
|
||||
if(istype(getorganslot("penis"), /obj/item/organ/genital/penis))
|
||||
return TRUE
|
||||
var/obj/item/organ/genital/G = getorganslot(ORGAN_SLOT_PENIS)
|
||||
if(G && istype(G, /obj/item/organ/genital/penis))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/mob/living/carbon/proc/has_balls()
|
||||
if(getorganslot("balls"))
|
||||
if(istype(getorganslot("balls"), /obj/item/organ/genital/testicles))
|
||||
return TRUE
|
||||
var/obj/item/organ/genital/G = getorganslot(ORGAN_SLOT_TESTICLES)
|
||||
if(G && istype(G, /obj/item/organ/genital/testicles))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/mob/living/carbon/proc/has_vagina()
|
||||
if(getorganslot("vagina"))
|
||||
if(getorganslot(ORGAN_SLOT_VAGINA))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/mob/living/carbon/proc/has_breasts()
|
||||
if(getorganslot("breasts"))
|
||||
if(getorganslot(ORGAN_SLOT_BREASTS))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/mob/living/carbon/proc/has_ovipositor()
|
||||
if(getorganslot("penis"))//shared slot
|
||||
if(istype(getorganslot("penis"), /obj/item/organ/genital/ovipositor))
|
||||
return TRUE
|
||||
var/obj/item/organ/genital/G = getorganslot(ORGAN_SLOT_PENIS)
|
||||
if(G && istype(G, /obj/item/organ/genital/ovipositor))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/mob/living/carbon/human/proc/has_eggsack()
|
||||
if(getorganslot("balls"))
|
||||
if(istype(getorganslot("balls"), /obj/item/organ/genital/eggsack))
|
||||
return TRUE
|
||||
var/obj/item/organ/genital/G = getorganslot(ORGAN_SLOT_TESTICLES)
|
||||
if(G && istype(G, /obj/item/organ/genital/eggsack))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/mob/living/carbon/human/proc/is_bodypart_exposed(bodypart)
|
||||
|
||||
/mob/living/carbon/proc/is_groin_exposed(var/list/L)
|
||||
/mob/living/carbon/proc/is_groin_exposed(list/L)
|
||||
if(!L)
|
||||
L = get_equipped_items()
|
||||
for(var/obj/item/I in L)
|
||||
for(var/A in L)
|
||||
var/obj/item/I = A
|
||||
if(I.body_parts_covered & GROIN)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/proc/is_chest_exposed(var/list/L)
|
||||
/mob/living/carbon/proc/is_chest_exposed(list/L)
|
||||
if(!L)
|
||||
L = get_equipped_items()
|
||||
for(var/obj/item/I in L)
|
||||
for(var/A in L)
|
||||
var/obj/item/I = A
|
||||
if(I.body_parts_covered & CHEST)
|
||||
return FALSE
|
||||
return TRUE
|
||||
@@ -195,9 +196,9 @@ GLOBAL_VAR_INIT(miscreants_allowed, FALSE)
|
||||
message_admins("[src] gave everyone genitals.")
|
||||
for(var/mob/living/carbon/human/H in GLOB.mob_list)
|
||||
if(H.gender == MALE)
|
||||
H.give_penis()
|
||||
H.give_balls()
|
||||
H.give_genital(/obj/item/organ/genital/penis)
|
||||
H.give_genital(/obj/item/organ/genital/testicles)
|
||||
else
|
||||
H.give_vagina()
|
||||
H.give_womb()
|
||||
H.give_breasts()
|
||||
H.give_genital(/obj/item/organ/genital/vagina)
|
||||
H.give_genital(/obj/item/organ/genital/womb)
|
||||
H.give_genital(/obj/item/organ/genital/breasts)
|
||||
|
||||
@@ -379,6 +379,12 @@
|
||||
i++
|
||||
return i
|
||||
|
||||
/proc/count_occurences_of_value(list/L, val, limit) //special thanks to salmonsnake
|
||||
. = 0
|
||||
for (var/i in 1 to limit)
|
||||
if (L[i] == val)
|
||||
.++
|
||||
|
||||
/proc/find_record(field, value, list/L)
|
||||
for(var/datum/data/record/R in L)
|
||||
if(R.fields[field] == value)
|
||||
@@ -514,7 +520,7 @@
|
||||
used_key_list[input_key] = 1
|
||||
return input_key
|
||||
|
||||
#if DM_VERSION > 512
|
||||
#if DM_VERSION > 513
|
||||
#error Remie said that lummox was adding a way to get a lists
|
||||
#error contents via list.values, if that is true remove this
|
||||
#error otherwise, update the version and bug lummox
|
||||
@@ -564,4 +570,4 @@
|
||||
if(key in L1)
|
||||
L1[key] += other_value
|
||||
else
|
||||
L1[key] = other_value
|
||||
L1[key] = other_value
|
||||
@@ -72,6 +72,10 @@
|
||||
var/datum/sprite_accessory/testicles/value = GLOB.balls_shapes_list[K]
|
||||
GLOB.balls_shapes_icons[K] = value.icon_state
|
||||
|
||||
for(var/gpath in subtypesof(/obj/item/organ/genital))
|
||||
var/obj/item/organ/genital/G = gpath
|
||||
if(!CHECK_BITFIELD(initial(G.genital_flags), GENITAL_BLACKLISTED))
|
||||
GLOB.genitals_list[initial(G.name)] = gpath
|
||||
//END OF CIT CHANGES
|
||||
|
||||
//Species
|
||||
|
||||
@@ -160,7 +160,6 @@
|
||||
"xenodorsal" = "Standard",
|
||||
"xenohead" = "Standard",
|
||||
"xenotail" = "Xenomorph Tail",
|
||||
"exhibitionist" = FALSE,
|
||||
"genitals_use_skintone" = FALSE,
|
||||
"has_cock" = FALSE,
|
||||
"cock_shape" = pick(GLOB.cock_shapes_list),
|
||||
@@ -400,6 +399,12 @@ GLOBAL_LIST_EMPTY(species_list)
|
||||
. = 0
|
||||
break
|
||||
|
||||
if(isliving(user))
|
||||
var/mob/living/L = user
|
||||
if(L.recoveringstam)
|
||||
. = 0
|
||||
break
|
||||
|
||||
if(!QDELETED(Tloc) && (QDELETED(target) || Tloc != target.loc))
|
||||
if((Uloc != Tloc || Tloc != user) && !drifting)
|
||||
. = 0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/proc/priority_announce(text, title = "", sound = 'sound/ai/attention.ogg', type , sender_override)
|
||||
/proc/priority_announce(text, title = "", sound = "attention", type , sender_override)
|
||||
if(!text)
|
||||
return
|
||||
|
||||
@@ -29,19 +29,110 @@
|
||||
announcement += "<br><span class='alert'>[html_encode(text)]</span><br>"
|
||||
announcement += "<br>"
|
||||
|
||||
var/s = sound(sound)
|
||||
var/s = sound(get_announcer_sound(sound))
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(!isnewplayer(M) && M.can_hear())
|
||||
to_chat(M, announcement)
|
||||
if(M.client.prefs.toggles & SOUND_ANNOUNCEMENTS)
|
||||
SEND_SOUND(M, s)
|
||||
|
||||
/proc/get_announcer_sound(soundid)
|
||||
if(isfile(soundid))
|
||||
return soundid
|
||||
else if(!istext(soundid))
|
||||
CRASH("Invalid type passed to get_announcer_sound()")
|
||||
switch(GLOB.announcertype) //These are all individually hardcoded to allow the announcer sounds to be included in the rsc, reducing lag from sending resources midgame.
|
||||
if("classic")
|
||||
switch(soundid)
|
||||
if("aimalf")
|
||||
. = 'sound/announcer/classic/aimalf.ogg'
|
||||
if("aliens")
|
||||
. = 'sound/announcer/classic/aliens.ogg'
|
||||
if("animes")
|
||||
. = 'sound/announcer/classic/animes.ogg'
|
||||
if("attention")
|
||||
. = 'sound/announcer/classic/attention.ogg'
|
||||
if("commandreport")
|
||||
. = 'sound/announcer/classic/commandreport.ogg'
|
||||
if("granomalies")
|
||||
. = 'sound/announcer/classic/granomalies.ogg'
|
||||
if("intercept")
|
||||
. = 'sound/announcer/classic/intercept.ogg'
|
||||
if("ionstorm")
|
||||
. = 'sound/announcer/classic/ionstorm.ogg'
|
||||
if("meteors")
|
||||
. = 'sound/announcer/classic/meteors.ogg'
|
||||
if("newAI")
|
||||
. = 'sound/announcer/classic/newAI.ogg'
|
||||
if("outbreak5")
|
||||
. = 'sound/announcer/classic/outbreak5.ogg'
|
||||
if("outbreak7")
|
||||
. = 'sound/announcer/classic/outbreak7.ogg'
|
||||
if("poweroff")
|
||||
. = 'sound/announcer/classic/poweroff.ogg'
|
||||
if("poweron")
|
||||
. = 'sound/announcer/classic/poweron.ogg'
|
||||
if("radiation")
|
||||
. = 'sound/announcer/classic/radiation.ogg'
|
||||
if("shuttlecalled")
|
||||
. = 'sound/announcer/classic/shuttlecalled.ogg'
|
||||
if("shuttledock")
|
||||
. = 'sound/announcer/classic/shuttledock.ogg'
|
||||
if("shuttlerecalled")
|
||||
. = 'sound/announcer/classic/shuttlerecalled.ogg'
|
||||
if("spanomalies")
|
||||
. = 'sound/announcer/classic/spanomalies.ogg'
|
||||
if("welcome")
|
||||
. = 'sound/announcer/classic/welcome.ogg'
|
||||
if("medibot")
|
||||
switch(soundid)
|
||||
if("aimalf")
|
||||
. = 'sound/announcer/classic/aimalf.ogg'
|
||||
if("aliens")
|
||||
. = 'sound/announcer/medibot/aliens.ogg'
|
||||
if("animes")
|
||||
. = 'sound/announcer/medibot/animes.ogg'
|
||||
if("attention")
|
||||
. = 'sound/announcer/medibot/attention.ogg'
|
||||
if("commandreport")
|
||||
. = 'sound/announcer/medibot/commandreport.ogg'
|
||||
if("granomalies")
|
||||
. = 'sound/announcer/medibot/granomalies.ogg'
|
||||
if("intercept")
|
||||
. = 'sound/announcer/medibot/intercept.ogg'
|
||||
if("ionstorm")
|
||||
. = 'sound/announcer/medibot/ionstorm.ogg'
|
||||
if("meteors")
|
||||
. = 'sound/announcer/medibot/meteors.ogg'
|
||||
if("newAI")
|
||||
. = 'sound/announcer/medibot/newAI.ogg'
|
||||
if("outbreak5")
|
||||
. = 'sound/announcer/medibot/outbreak5.ogg'
|
||||
if("outbreak7")
|
||||
. = 'sound/announcer/medibot/outbreak7.ogg'
|
||||
if("poweroff")
|
||||
. = 'sound/announcer/medibot/poweroff.ogg'
|
||||
if("poweron")
|
||||
. = 'sound/announcer/medibot/poweron.ogg'
|
||||
if("radiation")
|
||||
. = 'sound/announcer/medibot/radiation.ogg'
|
||||
if("shuttlecalled")
|
||||
. = 'sound/announcer/medibot/shuttlecalled.ogg'
|
||||
if("shuttledock")
|
||||
. = 'sound/announcer/medibot/shuttledocked.ogg'
|
||||
if("shuttlerecalled")
|
||||
. = 'sound/announcer/medibot/shuttlerecalled.ogg'
|
||||
if("spanomalies")
|
||||
. = 'sound/announcer/medibot/spanomalies.ogg'
|
||||
if("welcome")
|
||||
. = 'sound/announcer/medibot/welcome.ogg'
|
||||
|
||||
/proc/print_command_report(text = "", title = null, announce=TRUE)
|
||||
if(!title)
|
||||
title = "Classified [command_name()] Update"
|
||||
|
||||
if(announce)
|
||||
priority_announce("A report has been downloaded and printed out at all communications consoles.", "Incoming Classified Message", 'sound/ai/commandreport.ogg')
|
||||
priority_announce("A report has been downloaded and printed out at all communications consoles.", "Incoming Classified Message", "commandreport")
|
||||
|
||||
var/datum/comm_message/M = new
|
||||
M.title = title
|
||||
|
||||
@@ -534,10 +534,12 @@
|
||||
return parts.Join()
|
||||
|
||||
|
||||
/proc/printobjectives(datum/mind/ply)
|
||||
/proc/printobjectives(list/objectives)
|
||||
if(!objectives || !objectives.len)
|
||||
return
|
||||
var/list/objective_parts = list()
|
||||
var/count = 1
|
||||
for(var/datum/objective/objective in ply.objectives)
|
||||
for(var/datum/objective/objective in objectives)
|
||||
if(objective.check_completion())
|
||||
objective_parts += "<b>Objective #[count]</b>: [objective.explanation_text] <span class='greentext'>Success!</span>"
|
||||
else
|
||||
|
||||
@@ -451,10 +451,6 @@ Turf and target are separate in case you want to teleport some distance from a t
|
||||
var/y = min(world.maxy, max(1, A.y + dy))
|
||||
return locate(x,y,A.z)
|
||||
|
||||
/proc/arctan(x)
|
||||
var/y=arcsin(x/sqrt(1+x*x))
|
||||
return y
|
||||
|
||||
/*
|
||||
Gets all contents of contents and returns them all in a list.
|
||||
*/
|
||||
@@ -756,7 +752,6 @@ Turf and target are separate in case you want to teleport some distance from a t
|
||||
loc = loc.loc
|
||||
return null
|
||||
|
||||
|
||||
//For objects that should embed, but make no sense being is_sharp or is_pointed()
|
||||
//e.g: rods
|
||||
GLOBAL_LIST_INIT(can_embed_types, typecacheof(list(
|
||||
@@ -764,7 +759,7 @@ GLOBAL_LIST_INIT(can_embed_types, typecacheof(list(
|
||||
/obj/item/pipe)))
|
||||
|
||||
/proc/can_embed(obj/item/W)
|
||||
if(W.is_sharp())
|
||||
if(W.get_sharpness())
|
||||
return 1
|
||||
if(is_pointed(W))
|
||||
return 1
|
||||
@@ -1550,3 +1545,7 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new)
|
||||
for(var/i in L)
|
||||
if(condition.Invoke(i))
|
||||
. |= i
|
||||
|
||||
/proc/CallAsync(datum/source, proctype, list/arguments)
|
||||
set waitfor = FALSE
|
||||
return call(source, proctype)(arglist(arguments))
|
||||
@@ -142,6 +142,8 @@ GLOBAL_LIST_INIT(bitfields, list(
|
||||
"THICKMATERIAL" = THICKMATERIAL,
|
||||
"VOICEBOX_TOGGLABLE" = VOICEBOX_TOGGLABLE,
|
||||
"VOICEBOX_DISABLED" = VOICEBOX_DISABLED,
|
||||
"SNUG_FIT" = SNUG_FIT,
|
||||
"ANTI_TINFOIL_MANEUVER" = ANTI_TINFOIL_MANEUVER,
|
||||
),
|
||||
"tesla_flags" = list(
|
||||
"TESLA_MOB_DAMAGE" = TESLA_MOB_DAMAGE,
|
||||
@@ -200,4 +202,14 @@ GLOBAL_LIST_INIT(bitfields, list(
|
||||
"ORGAN_VITAL" = ORGAN_VITAL,
|
||||
"ORGAN_NO_SPOIL" = ORGAN_NO_SPOIL
|
||||
),
|
||||
))
|
||||
"genital_flags" = list(
|
||||
"GENITAL_BLACKLISTED" = GENITAL_BLACKLISTED,
|
||||
"GENITAL_INTERNAL" = GENITAL_INTERNAL,
|
||||
"GENITAL_HIDDEN" = GENITAL_HIDDEN,
|
||||
"GENITAL_THROUGH_CLOTHES" = GENITAL_THROUGH_CLOTHES,
|
||||
"GENITAL_FUID_PRODUCTION" = GENITAL_FUID_PRODUCTION,
|
||||
"CAN_MASTURBATE_WITH" = CAN_MASTURBATE_WITH,
|
||||
"MASTURBATE_LINKED_ORGAN" = MASTURBATE_LINKED_ORGAN,
|
||||
"CAN_CLIMAX_WITH" = CAN_CLIMAX_WITH
|
||||
)
|
||||
))
|
||||
@@ -58,3 +58,64 @@ GLOBAL_LIST_EMPTY(latejoiners) //CIT CHANGE - All latejoining people, for traito
|
||||
for(var/i in GLOB.mob_list)
|
||||
var/mob/M = i
|
||||
M.update_config_movespeed()
|
||||
|
||||
GLOBAL_LIST_INIT(noodle_taurs, list(
|
||||
"Naga",
|
||||
"Tentacle"
|
||||
))
|
||||
|
||||
GLOBAL_LIST_INIT(paw_taurs, list(
|
||||
"Fox",
|
||||
"Wolf",
|
||||
"Otie",
|
||||
"Drake",
|
||||
"Lab",
|
||||
"Shepherd",
|
||||
"Husky",
|
||||
"Eevee",
|
||||
"Panther",
|
||||
"Horse",
|
||||
"Cow",
|
||||
"Tiger"
|
||||
))
|
||||
|
||||
//blood types
|
||||
GLOBAL_LIST_INIT(regular_bloods,list(
|
||||
"O-",
|
||||
"O+",
|
||||
"A-",
|
||||
"A+",
|
||||
"B-",
|
||||
"B+",
|
||||
"AB-",
|
||||
"AB+"
|
||||
))
|
||||
|
||||
GLOBAL_LIST_INIT(all_types_bloods,list(
|
||||
"O-",
|
||||
"O+",
|
||||
"A-",
|
||||
"A+",
|
||||
"B-",
|
||||
"B+",
|
||||
"AB-",
|
||||
"AB+",
|
||||
"SY",
|
||||
"X*",
|
||||
"HF",
|
||||
"L",
|
||||
"U",
|
||||
"GEL",
|
||||
"BUG"
|
||||
))
|
||||
|
||||
GLOBAL_LIST_INIT(blood_types, list(
|
||||
"blood",
|
||||
"jellyblood"
|
||||
))
|
||||
|
||||
GLOBAL_LIST_INIT(blood_id_types, list(
|
||||
"blood" = /datum/reagent/blood,
|
||||
"jellyblood" = /datum/reagent/blood/jellyblood
|
||||
))
|
||||
|
||||
|
||||
@@ -2,6 +2,12 @@ GLOBAL_VAR_INIT(admin_notice, "") // Admin notice that all clients see when join
|
||||
|
||||
GLOBAL_VAR_INIT(timezoneOffset, 0) // The difference betwen midnight (of the host computer) and 0 world.ticks.
|
||||
|
||||
GLOBAL_VAR_INIT(year, time2text(world.realtime,"YYYY"))
|
||||
GLOBAL_VAR_INIT(year_integer, text2num(year)) // = 2013???
|
||||
|
||||
|
||||
GLOBAL_VAR_INIT(announcertype, "standard")
|
||||
|
||||
// For FTP requests. (i.e. downloading runtime logs.)
|
||||
// However it'd be ok to use for accessing attack logs and such too, which are even laggier.
|
||||
GLOBAL_VAR_INIT(fileaccess_timer, 0)
|
||||
@@ -24,4 +30,4 @@ GLOBAL_VAR(bible_name)
|
||||
GLOBAL_VAR(bible_icon_state)
|
||||
GLOBAL_VAR(bible_item_state)
|
||||
GLOBAL_VAR(holy_weapon_type)
|
||||
GLOBAL_VAR(holy_armor_type)
|
||||
GLOBAL_VAR(holy_armor_type)
|
||||
|
||||
@@ -200,7 +200,7 @@
|
||||
if (!target.loc)
|
||||
continue
|
||||
|
||||
if(!(SEND_SIGNAL(target.loc, COMSIG_ATOM_CANREACH, next) & COMPONENT_BLOCK_REACH))
|
||||
if(!(SEND_SIGNAL(target.loc, COMSIG_ATOM_CANREACH, next) & COMPONENT_BLOCK_REACH) && target.loc.canReachInto(src, ultimate_target, next, view_only, tool))
|
||||
next += target.loc
|
||||
|
||||
checking = next
|
||||
@@ -215,6 +215,10 @@
|
||||
/mob/living/DirectAccess(atom/target)
|
||||
return ..() + GetAllContents()
|
||||
|
||||
//This is called reach into but it's called on the deepest things first so uh, make sure to account for that!
|
||||
/atom/proc/canReachInto(atom/user, atom/target, list/next, view_only, obj/item/tool)
|
||||
return TRUE
|
||||
|
||||
/atom/proc/AllowClick()
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -49,9 +49,9 @@
|
||||
#define ui_storage1 "CENTER+1:18,SOUTH:5"
|
||||
#define ui_storage2 "CENTER+2:20,SOUTH:5"
|
||||
|
||||
#define ui_borg_sensor "CENTER-3:16, SOUTH:5" //borgs
|
||||
#define ui_borg_lamp "CENTER-4:16, SOUTH:5" //borgs
|
||||
#define ui_borg_thrusters "CENTER-5:16, SOUTH:5" //borgs
|
||||
#define ui_borg_sensor "CENTER-3:15, SOUTH:5" //borgs
|
||||
#define ui_borg_lamp "CENTER-4:15, SOUTH:5" //borgs
|
||||
#define ui_borg_thrusters "CENTER-5:15, SOUTH:5" //borgs
|
||||
#define ui_inv1 "CENTER-2:16,SOUTH:5" //borgs
|
||||
#define ui_inv2 "CENTER-1 :16,SOUTH:5" //borgs
|
||||
#define ui_inv3 "CENTER :16,SOUTH:5" //borgs
|
||||
@@ -59,7 +59,7 @@
|
||||
#define ui_borg_store "CENTER+2:16,SOUTH:5" //borgs
|
||||
#define ui_borg_camera "CENTER+3:21,SOUTH:5" //borgs
|
||||
#define ui_borg_album "CENTER+4:21,SOUTH:5" //borgs
|
||||
#define ui_borg_language_menu "CENTER+4:21,SOUTH+1:5" //borgs
|
||||
#define ui_borg_language_menu "EAST-1:27,SOUTH+2:8" //borgs
|
||||
|
||||
#define ui_monkey_head "CENTER-5:13,SOUTH:5" //monkey
|
||||
#define ui_monkey_mask "CENTER-4:14,SOUTH:5" //monkey
|
||||
|
||||
@@ -88,6 +88,26 @@
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
R.toggle_ionpulse()
|
||||
|
||||
/obj/screen/robot/sensors
|
||||
name = "Sensor Augmentation"
|
||||
icon_state = "cyborg_sensor"
|
||||
|
||||
/obj/screen/robot/sensors/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/S = usr
|
||||
S.toggle_sensors()
|
||||
|
||||
/obj/screen/robot/language_menu
|
||||
name = "silicon language selection"
|
||||
icon_state = "talk_wheel"
|
||||
|
||||
/obj/screen/robot/language_menu/Click()
|
||||
if(..())
|
||||
return
|
||||
var/mob/living/silicon/S = usr
|
||||
S.open_language_menu(usr)
|
||||
|
||||
/datum/hud/robot
|
||||
ui_style = 'icons/mob/screen_cyborg.dmi'
|
||||
|
||||
@@ -96,7 +116,7 @@
|
||||
var/mob/living/silicon/robot/mymobR = mymob
|
||||
var/obj/screen/using
|
||||
|
||||
using = new/obj/screen/language_menu
|
||||
using = new/obj/screen/robot/language_menu
|
||||
using.screen_loc = ui_borg_language_menu
|
||||
static_inventory += using
|
||||
|
||||
@@ -133,7 +153,7 @@
|
||||
static_inventory += using
|
||||
|
||||
//Sec/Med HUDs
|
||||
using = new /obj/screen/ai/sensors()
|
||||
using = new /obj/screen/robot/sensors()
|
||||
using.screen_loc = ui_borg_sensor
|
||||
static_inventory += using
|
||||
|
||||
|
||||
@@ -40,14 +40,14 @@
|
||||
return TRUE
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if(user.a_intent == INTENT_HARM && stat == DEAD && (butcher_results || guaranteed_butcher_results)) //can we butcher it?
|
||||
GET_COMPONENT_FROM(butchering, /datum/component/butchering, I)
|
||||
var/datum/component/butchering/butchering = I.GetComponent(/datum/component/butchering)
|
||||
if(butchering && butchering.butchering_enabled)
|
||||
to_chat(user, "<span class='notice'>You begin to butcher [src]...</span>")
|
||||
playsound(loc, butchering.butcher_sound, 50, TRUE, -1)
|
||||
if(do_mob(user, src, butchering.speed) && Adjacent(I))
|
||||
butchering.Butcher(user, src)
|
||||
return 1
|
||||
else if(I.is_sharp() && !butchering) //give sharp objects butchering functionality, for consistency
|
||||
else if(I.get_sharpness() && !butchering) //give sharp objects butchering functionality, for consistency
|
||||
I.AddComponent(/datum/component/butchering, 80 * I.toolspeed)
|
||||
attackby(I, user, params) //call the attackby again to refresh and do the butchering check again
|
||||
return
|
||||
@@ -82,7 +82,7 @@
|
||||
log_combat(user, M, "attacked", src.name, "(INTENT: [uppertext(user.a_intent)]) (DAMTYPE: [uppertext(damtype)])")
|
||||
add_fingerprint(user)
|
||||
|
||||
user.adjustStaminaLossBuffered(getweight())//CIT CHANGE - makes attacking things cause stamina loss
|
||||
user.adjustStaminaLossBuffered(getweight()*0.8)//CIT CHANGE - makes attacking things cause stamina loss
|
||||
|
||||
//the equivalent of the standard version of attack() but for object targets.
|
||||
/obj/item/proc/attack_obj(obj/O, mob/living/user)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#define VALUE_MODE_NUM 0
|
||||
#define VALUE_MODE_TEXT 1
|
||||
#define VALUE_MODE_FLAG 2
|
||||
#define VALUE_MODE_NUM_LIST 3
|
||||
|
||||
#define KEY_MODE_TEXT 0
|
||||
#define KEY_MODE_TYPE 1
|
||||
@@ -191,6 +192,18 @@
|
||||
if(VALUE_MODE_TEXT)
|
||||
new_value = key_value
|
||||
continue_check_value = new_value
|
||||
if(VALUE_MODE_NUM_LIST)
|
||||
// this is all copy+pasted from number list up there, but it's super basic so I don't see it being changed soon
|
||||
var/list/new_list = list()
|
||||
var/list/values = splittext(key_value," ")
|
||||
for(var/I in values)
|
||||
var/temp = text2num(I)
|
||||
if(isnull(temp))
|
||||
log_admin("invalid number list entry in [key_name]: [I]")
|
||||
continue_check_value = FALSE
|
||||
new_list += temp
|
||||
new_value = new_list
|
||||
continue_check_value = new_list.len
|
||||
if(continue_check_value && continue_check_key && ValidateListEntry(new_key, new_value))
|
||||
config_entry_value[new_key] = new_value
|
||||
return TRUE
|
||||
|
||||
@@ -66,10 +66,17 @@
|
||||
|
||||
/datum/config_entry/flag/disable_human_mood
|
||||
|
||||
/datum/config_entry/flag/disable_borg_flash_knockdown //Should borg flashes be capable of knocking humanoid entities down?
|
||||
|
||||
/datum/config_entry/flag/weaken_secborg //Brings secborgs and k9s back in-line with the other borg modules
|
||||
|
||||
/datum/config_entry/flag/disable_secborg // disallow secborg module to be chosen.
|
||||
|
||||
/datum/config_entry/flag/disable_peaceborg
|
||||
|
||||
/datum/config_entry/number/minimum_secborg_alert //Minimum alert level for secborgs to be chosen.
|
||||
config_entry_value = 3
|
||||
|
||||
/datum/config_entry/number/traitor_scaling_coeff //how much does the amount of players get divided by to determine traitors
|
||||
config_entry_value = 6
|
||||
min_val = 1
|
||||
@@ -372,3 +379,43 @@
|
||||
/datum/config_entry/number/auto_transfer_delay
|
||||
config_entry_value = 72000
|
||||
min_val = 0
|
||||
|
||||
/datum/config_entry/number/dynamic_high_pop_limit
|
||||
config_entry_value = 55
|
||||
min_val = 1
|
||||
|
||||
/datum/config_entry/number/dynamic_pop_per_requirement
|
||||
config_entry_value = 6
|
||||
min_val = 1
|
||||
|
||||
/datum/config_entry/number/dynamic_midround_delay_min
|
||||
config_entry_value = 15
|
||||
min_val = 1
|
||||
|
||||
/datum/config_entry/number/dynamic_midround_delay_max
|
||||
config_entry_value = 35
|
||||
min_val = 1
|
||||
|
||||
/datum/config_entry/number/dynamic_latejoin_delay_min
|
||||
config_entry_value = 5
|
||||
min_val = 1
|
||||
|
||||
/datum/config_entry/number/dynamic_latejoin_delay_max
|
||||
config_entry_value = 25
|
||||
min_val = 1
|
||||
|
||||
/datum/config_entry/keyed_list/dynamic_cost
|
||||
key_mode = KEY_MODE_TEXT
|
||||
value_mode = VALUE_MODE_NUM
|
||||
|
||||
/datum/config_entry/keyed_list/dynamic_weight
|
||||
key_mode = KEY_MODE_TEXT
|
||||
value_mode = VALUE_MODE_NUM
|
||||
|
||||
/datum/config_entry/keyed_list/dynamic_requirements
|
||||
key_mode = KEY_MODE_TEXT
|
||||
value_mode = VALUE_MODE_NUM_LIST
|
||||
|
||||
/datum/config_entry/keyed_list/dynamic_high_population_requirement
|
||||
key_mode = KEY_MODE_TEXT
|
||||
value_mode = VALUE_MODE_NUM
|
||||
|
||||
@@ -175,6 +175,9 @@
|
||||
/datum/config_entry/string/banappeals
|
||||
|
||||
/datum/config_entry/string/wikiurl
|
||||
config_entry_value = "https://katlin.dog/citadel-wiki"
|
||||
|
||||
/datum/config_entry/string/wikiurltg
|
||||
config_entry_value = "http://www.tgstation13.org/wiki"
|
||||
|
||||
/datum/config_entry/string/forumurl
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
SUBSYSTEM_DEF(chat)
|
||||
name = "Chat"
|
||||
flags = SS_TICKER|SS_NO_INIT
|
||||
flags = SS_TICKER
|
||||
wait = 1
|
||||
priority = FIRE_PRIORITY_CHAT
|
||||
init_order = INIT_ORDER_CHAT
|
||||
|
||||
@@ -4,7 +4,7 @@ SUBSYSTEM_DEF(job)
|
||||
flags = SS_NO_FIRE
|
||||
|
||||
var/list/occupations = list() //List of all jobs
|
||||
var/list/name_occupations = list() //Dict of all jobs, keys are titles
|
||||
var/list/datum/job/name_occupations = list() //Dict of all jobs, keys are titles
|
||||
var/list/type_occupations = list() //Dict of all jobs, keys are types
|
||||
var/list/unassigned = list() //Players who need jobs
|
||||
var/initial_players_to_assign = 0 //used for checking against population caps
|
||||
@@ -14,6 +14,8 @@ SUBSYSTEM_DEF(job)
|
||||
|
||||
var/overflow_role = "Assistant"
|
||||
|
||||
var/list/level_order = list(JP_HIGH,JP_MEDIUM,JP_LOW)
|
||||
|
||||
/datum/controller/subsystem/job/Initialize(timeofday)
|
||||
SSmapping.HACK_LoadMapConfig()
|
||||
if(!occupations.len)
|
||||
@@ -119,7 +121,7 @@ SUBSYSTEM_DEF(job)
|
||||
if(player.mind && job.title in player.mind.restricted_roles)
|
||||
JobDebug("FOC incompatible with antagonist role, Player: [player]")
|
||||
continue
|
||||
if(player.client.prefs.job_preferences["[job.title]"] == level)
|
||||
if(player.client.prefs.job_preferences[job.title] == level)
|
||||
JobDebug("FOC pass, Player: [player], Level:[level]")
|
||||
candidates += player
|
||||
return candidates
|
||||
@@ -181,7 +183,7 @@ SUBSYSTEM_DEF(job)
|
||||
//it locates a head or runs out of levels to check
|
||||
//This is basically to ensure that there's atleast a few heads in the round
|
||||
/datum/controller/subsystem/job/proc/FillHeadPosition()
|
||||
for(var/level = 1 to 3)
|
||||
for(var/level in level_order)
|
||||
for(var/command_position in GLOB.command_positions)
|
||||
var/datum/job/job = GetJob(command_position)
|
||||
if(!job)
|
||||
@@ -218,7 +220,7 @@ SUBSYSTEM_DEF(job)
|
||||
if(!job)
|
||||
return 0
|
||||
for(var/i = job.total_positions, i > 0, i--)
|
||||
for(var/level = 1 to 3)
|
||||
for(var/level in level_order)
|
||||
var/list/candidates = list()
|
||||
candidates = FindOccupationCandidates(job, level)
|
||||
if(candidates.len)
|
||||
@@ -304,8 +306,7 @@ SUBSYSTEM_DEF(job)
|
||||
|
||||
// Loop through all levels from high to low
|
||||
var/list/shuffledoccupations = shuffle(occupations)
|
||||
var/list/levels = list(JP_HIGH,JP_MEDIUM,JP_LOW)
|
||||
for(var/level in levels)
|
||||
for(var/level in level_order)
|
||||
//Check the head jobs first each level
|
||||
CheckHeadPositions(level)
|
||||
|
||||
@@ -334,7 +335,7 @@ SUBSYSTEM_DEF(job)
|
||||
if(job.required_playtime_remaining(player.client))
|
||||
JobDebug("DO player not enough xp, Player: [player], Job:[job.title]")
|
||||
continue
|
||||
|
||||
|
||||
if(!player.client.prefs.pref_species.qualifies_for_rank(job.title, player.client.prefs.features))
|
||||
JobDebug("DO non-human failed, Player: [player], Job:[job.title]")
|
||||
continue
|
||||
@@ -344,7 +345,7 @@ SUBSYSTEM_DEF(job)
|
||||
continue
|
||||
|
||||
// If the player wants that job on this level, then try give it to him.
|
||||
if(player.client.prefs.job_preferences["[job.title]"] == level)
|
||||
if(player.client.prefs.job_preferences[job.title] == level)
|
||||
// If the job isn't filled
|
||||
if((job.current_positions < job.spawn_positions) || job.spawn_positions == -1)
|
||||
JobDebug("DO pass, Player: [player], Level:[level], Job:[job.title]")
|
||||
@@ -475,7 +476,6 @@ SUBSYSTEM_DEF(job)
|
||||
to_chat(M, "<b>[job.custom_spawn_text]</b>")
|
||||
if(CONFIG_GET(number/minimal_access_threshold))
|
||||
to_chat(M, "<span class='notice'><B>As this station was initially staffed with a [CONFIG_GET(flag/jobs_have_minimal_access) ? "full crew, only your job's necessities" : "skeleton crew, additional access may"] have been added to your ID card.</B></span>")
|
||||
|
||||
if(job && H)
|
||||
if(job.dresscodecompliant)// CIT CHANGE - dress code compliance
|
||||
equip_loadout(N, H) // CIT CHANGE - allows players to spawn with loadout items
|
||||
@@ -551,7 +551,7 @@ SUBSYSTEM_DEF(job)
|
||||
if(job.required_playtime_remaining(player.client))
|
||||
young++
|
||||
continue
|
||||
switch(player.client.prefs.job_preferences["[job.title]"])
|
||||
switch(player.client.prefs.job_preferences[job.title])
|
||||
if(JP_HIGH)
|
||||
high++
|
||||
if(JP_MEDIUM)
|
||||
@@ -698,4 +698,4 @@ SUBSYSTEM_DEF(job)
|
||||
. |= player.mind
|
||||
|
||||
/datum/controller/subsystem/job/proc/JobDebug(message)
|
||||
log_job_debug(message)
|
||||
log_job_debug(message)
|
||||
@@ -3,6 +3,7 @@ SUBSYSTEM_DEF(jukeboxes)
|
||||
wait = 5
|
||||
var/list/songs = list()
|
||||
var/list/activejukeboxes = list()
|
||||
var/list/freejukeboxchannels = list()
|
||||
|
||||
/datum/track
|
||||
var/song_name = "generic"
|
||||
@@ -21,23 +22,39 @@ SUBSYSTEM_DEF(jukeboxes)
|
||||
/datum/controller/subsystem/jukeboxes/proc/addjukebox(obj/jukebox, datum/track/T, jukefalloff = 1)
|
||||
if(!istype(T))
|
||||
CRASH("[src] tried to play a song with a nonexistant track")
|
||||
var/channeltoreserve = CHANNEL_JUKEBOX_START + activejukeboxes.len - 1
|
||||
if(channeltoreserve > CHANNEL_JUKEBOX)
|
||||
var/channeltoreserve = pick(freejukeboxchannels)
|
||||
if(!channeltoreserve)
|
||||
return FALSE
|
||||
freejukeboxchannels -= channeltoreserve
|
||||
var/list/youvegotafreejukebox = list(T, channeltoreserve, jukebox, jukefalloff)
|
||||
activejukeboxes.len++
|
||||
activejukeboxes[activejukeboxes.len] = list(T, channeltoreserve, jukebox, jukefalloff)
|
||||
activejukeboxes[activejukeboxes.len] = youvegotafreejukebox
|
||||
|
||||
//Due to changes in later versions of 512, SOUND_UPDATE no longer properly plays audio when a file is defined in the sound datum. As such, we are now required to init the audio before we can actually do anything with it.
|
||||
//Downsides to this? This means that you can *only* hear the jukebox audio if you were present on the server when it started playing, and it means that it's now impossible to add loops to the jukebox track list.
|
||||
var/sound/song_to_init = sound(T.song_path)
|
||||
song_to_init.status = SOUND_MUTE
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(!M.client)
|
||||
continue
|
||||
if(!(M.client.prefs.toggles & SOUND_INSTRUMENTS))
|
||||
continue
|
||||
|
||||
M.playsound_local(M, null, 100, channel = youvegotafreejukebox[2], S = song_to_init)
|
||||
return activejukeboxes.len
|
||||
|
||||
/datum/controller/subsystem/jukeboxes/proc/removejukebox(IDtoremove)
|
||||
if(islist(activejukeboxes[IDtoremove]))
|
||||
var/jukechannel = activejukeboxes[IDtoremove][2]
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(!M.client)
|
||||
continue
|
||||
M.stop_sound_channel(activejukeboxes[IDtoremove][2])
|
||||
M.stop_sound_channel(jukechannel)
|
||||
freejukeboxchannels |= jukechannel
|
||||
activejukeboxes.Cut(IDtoremove, IDtoremove+1)
|
||||
return TRUE
|
||||
else
|
||||
to_chat(world, "<span class='warning'>If you see this, screenshot it and send it to a dev. Tried to remove jukebox with invalid ID</span>")
|
||||
CRASH("Tried to remove jukebox with invalid ID")
|
||||
|
||||
/datum/controller/subsystem/jukeboxes/proc/findjukeboxindex(obj/jukebox)
|
||||
if(activejukeboxes.len)
|
||||
@@ -57,6 +74,8 @@ SUBSYSTEM_DEF(jukeboxes)
|
||||
T.song_beat = text2num(L[3])
|
||||
T.song_associated_id = L[4]
|
||||
songs |= T
|
||||
for(var/i in CHANNEL_JUKEBOX_START to CHANNEL_JUKEBOX)
|
||||
freejukeboxchannels |= i
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/jukeboxes/fire()
|
||||
@@ -64,14 +83,15 @@ SUBSYSTEM_DEF(jukeboxes)
|
||||
return
|
||||
for(var/list/jukeinfo in activejukeboxes)
|
||||
if(!jukeinfo.len)
|
||||
to_chat(world, "<span class='warning'>If you see this, screenshot it and send it to a dev. Active jukebox without any associated metadata</span>")
|
||||
EXCEPTION("Active jukebox without any associated metadata.")
|
||||
continue
|
||||
var/datum/track/juketrack = jukeinfo[1]
|
||||
if(!istype(juketrack))
|
||||
to_chat(world, "<span class='warning'>If you see this, screenshot it and send it to a dev. After jukebox track grabbing</span>")
|
||||
EXCEPTION("Invalid jukebox track datum.")
|
||||
continue
|
||||
var/obj/jukebox = jukeinfo[3]
|
||||
if(!istype(jukebox))
|
||||
to_chat(world, "<span class='warning'>If you see this, screenshot it and send it to a dev. Nonexistant or invalid jukebox in active jukebox list")
|
||||
EXCEPTION("Nonexistant or invalid object associated with jukebox.")
|
||||
continue
|
||||
var/sound/song_played = sound(juketrack.song_path)
|
||||
var/area/currentarea = get_area(jukebox)
|
||||
|
||||
@@ -33,6 +33,7 @@ SUBSYSTEM_DEF(mapping)
|
||||
var/list/z_list
|
||||
var/datum/space_level/transit
|
||||
var/datum/space_level/empty_space
|
||||
var/num_of_res_levels = 1
|
||||
|
||||
//dlete dis once #39770 is resolved
|
||||
/datum/controller/subsystem/mapping/proc/HACK_LoadMapConfig()
|
||||
@@ -53,6 +54,8 @@ SUBSYSTEM_DEF(mapping)
|
||||
if(!config || config.defaulted)
|
||||
to_chat(world, "<span class='boldannounce'>Unable to load next or default map config, defaulting to Box Station</span>")
|
||||
config = old_config
|
||||
GLOB.year_integer += config.year_offset
|
||||
GLOB.announcertype = (config.announcertype == "standard" ? (prob(1) ? "medibot" : "classic") : config.announcertype)
|
||||
loadWorld()
|
||||
repopulate_sorted_areas()
|
||||
process_teleport_locs() //Sets up the wizard teleport locations
|
||||
@@ -449,6 +452,11 @@ GLOBAL_LIST_EMPTY(the_station_areas)
|
||||
for(var/i in levels_by_trait(ZTRAIT_RESERVED))
|
||||
if(reserve.Reserve(width, height, i))
|
||||
return reserve
|
||||
//If we didn't return at this point, theres a good chance we ran out of room on the exisiting reserved z levels, so lets try a new one
|
||||
num_of_res_levels += 1
|
||||
var/newReserved = add_new_zlevel("Transit/Reserved [num_of_res_levels]", list(ZTRAIT_RESERVED = TRUE))
|
||||
if(reserve.Reserve(width, height, newReserved))
|
||||
return reserve
|
||||
else
|
||||
if(!level_trait(z, ZTRAIT_RESERVED))
|
||||
qdel(reserve)
|
||||
@@ -481,6 +489,7 @@ GLOBAL_LIST_EMPTY(the_station_areas)
|
||||
LAZYINITLIST(unused_turfs["[T.z]"])
|
||||
unused_turfs["[T.z]"] |= T
|
||||
T.flags_1 |= UNUSED_RESERVATION_TURF_1
|
||||
GLOB.areas_by_type[world.area].contents += T
|
||||
CHECK_TICK
|
||||
|
||||
//DO NOT CALL THIS PROC DIRECTLY, CALL wipe_reservations().
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
SUBSYSTEM_DEF(npcpool)
|
||||
name = "NPC Pool"
|
||||
flags = SS_POST_FIRE_TIMING|SS_NO_INIT|SS_BACKGROUND
|
||||
flags = SS_KEEP_TIMING | SS_NO_INIT
|
||||
priority = FIRE_PRIORITY_NPC
|
||||
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#define FILE_ANTAG_REP "data/AntagReputation.json"
|
||||
#define MAX_RECENT_MAP_RECORD 10
|
||||
|
||||
SUBSYSTEM_DEF(persistence)
|
||||
name = "Persistence"
|
||||
@@ -11,6 +12,7 @@ SUBSYSTEM_DEF(persistence)
|
||||
var/list/obj/structure/chisel_message/chisel_messages = list()
|
||||
var/list/saved_messages = list()
|
||||
var/list/saved_modes = list(1,2,3)
|
||||
var/list/saved_maps
|
||||
var/list/saved_trophies = list()
|
||||
var/list/spawned_objects = list()
|
||||
var/list/antag_rep = list()
|
||||
@@ -25,6 +27,7 @@ SUBSYSTEM_DEF(persistence)
|
||||
LoadChiselMessages()
|
||||
LoadTrophies()
|
||||
LoadRecentModes()
|
||||
LoadRecentMaps()
|
||||
LoadPhotoPersistence()
|
||||
if(CONFIG_GET(flag/use_antag_rep))
|
||||
LoadAntagReputation()
|
||||
@@ -163,6 +166,15 @@ SUBSYSTEM_DEF(persistence)
|
||||
return
|
||||
saved_modes = json["data"]
|
||||
|
||||
/datum/controller/subsystem/persistence/proc/LoadRecentMaps()
|
||||
var/json_file = file("data/RecentMaps.json")
|
||||
if(!fexists(json_file))
|
||||
return
|
||||
var/list/json = json_decode(file2text(json_file))
|
||||
if(!json)
|
||||
return
|
||||
saved_maps = json["maps"]
|
||||
|
||||
/datum/controller/subsystem/persistence/proc/LoadAntagReputation()
|
||||
var/json = file2text(FILE_ANTAG_REP)
|
||||
if(!json)
|
||||
@@ -204,6 +216,7 @@ SUBSYSTEM_DEF(persistence)
|
||||
CollectSecretSatchels()
|
||||
CollectTrophies()
|
||||
CollectRoundtype()
|
||||
RecordMaps()
|
||||
SavePhotoPersistence() //THIS IS PERSISTENCE, NOT THE LOGGING PORTION.
|
||||
if(CONFIG_GET(flag/use_antag_rep))
|
||||
CollectAntagReputation()
|
||||
@@ -359,6 +372,15 @@ SUBSYSTEM_DEF(persistence)
|
||||
fdel(json_file)
|
||||
WRITE_FILE(json_file, json_encode(file_data))
|
||||
|
||||
/datum/controller/subsystem/persistence/proc/RecordMaps()
|
||||
saved_maps = saved_maps?.len ? list("[SSmapping.config.map_name]") | saved_maps : list("[SSmapping.config.map_name]")
|
||||
var/json_file = file("data/RecentMaps.json")
|
||||
var/list/file_data = list()
|
||||
file_data["maps"] = saved_maps
|
||||
fdel(json_file)
|
||||
WRITE_FILE(json_file, json_encode(file_data))
|
||||
|
||||
|
||||
/datum/controller/subsystem/persistence/proc/CollectAntagReputation()
|
||||
var/ANTAG_REP_MAXIMUM = CONFIG_GET(number/antag_rep_maximum)
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@ SUBSYSTEM_DEF(shuttle)
|
||||
var/points = 5000 //number of trade-points we have
|
||||
var/centcom_message = "" //Remarks from CentCom on how well you checked the last order.
|
||||
var/list/discoveredPlants = list() //Typepaths for unusual plants we've already sent CentCom, associated with their potencies
|
||||
var/passive_supply_points_per_minute = 750
|
||||
|
||||
var/list/supply_packs = list()
|
||||
var/list/shoppinglist = list()
|
||||
@@ -111,6 +112,12 @@ SUBSYSTEM_DEF(shuttle)
|
||||
qdel(T, force=TRUE)
|
||||
CheckAutoEvac()
|
||||
|
||||
//Cargo stuff start
|
||||
var/fire_time_diff = max(0, world.time - last_fire) //Don't want this to be below 0, seriously.
|
||||
var/point_gain = (fire_time_diff / 600) * passive_supply_points_per_minute
|
||||
points += point_gain
|
||||
//Cargo stuff end
|
||||
|
||||
if(!SSmapping.clearing_reserved_turfs)
|
||||
while(transit_requesters.len)
|
||||
var/requester = popleft(transit_requesters)
|
||||
@@ -373,7 +380,7 @@ SUBSYSTEM_DEF(shuttle)
|
||||
emergency.setTimer(emergencyDockTime)
|
||||
priority_announce("Hostile environment resolved. \
|
||||
You have 3 minutes to board the Emergency Shuttle.",
|
||||
null, 'sound/ai/shuttledock.ogg', "Priority")
|
||||
null, "shuttledock", "Priority")
|
||||
|
||||
//try to move/request to dockHome if possible, otherwise dockAway. Mainly used for admin buttons
|
||||
/datum/controller/subsystem/shuttle/proc/toggleShuttle(shuttleId, dockHome, dockAway, timed)
|
||||
|
||||
@@ -43,6 +43,7 @@ SUBSYSTEM_DEF(throwing)
|
||||
var/atom/movable/thrownthing
|
||||
var/atom/target
|
||||
var/turf/target_turf
|
||||
var/target_zone
|
||||
var/init_dir
|
||||
var/maxrange
|
||||
var/speed
|
||||
|
||||
@@ -303,7 +303,7 @@ SUBSYSTEM_DEF(ticker)
|
||||
SSdbcore.SetRoundStart()
|
||||
|
||||
to_chat(world, "<span class='notice'><B>Welcome to [station_name()], enjoy your stay!</B></span>")
|
||||
SEND_SOUND(world, sound('sound/ai/welcome.ogg'))
|
||||
SEND_SOUND(world, sound(get_announcer_sound("welcome")))
|
||||
|
||||
current_state = GAME_STATE_PLAYING
|
||||
Master.SetRunLevel(RUNLEVEL_GAME)
|
||||
|
||||
@@ -6,11 +6,9 @@ SUBSYSTEM_DEF(vis_overlays)
|
||||
|
||||
var/list/vis_overlay_cache
|
||||
var/list/currentrun
|
||||
var/datum/callback/rotate_cb
|
||||
|
||||
/datum/controller/subsystem/vis_overlays/Initialize()
|
||||
vis_overlay_cache = list()
|
||||
rotate_cb = CALLBACK(src, .proc/rotate_vis_overlay)
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/vis_overlays/fire(resumed = FALSE)
|
||||
@@ -52,7 +50,7 @@ SUBSYSTEM_DEF(vis_overlays)
|
||||
|
||||
if(!thing.managed_vis_overlays)
|
||||
thing.managed_vis_overlays = list(overlay)
|
||||
RegisterSignal(thing, COMSIG_ATOM_DIR_CHANGE, rotate_cb)
|
||||
RegisterSignal(thing, COMSIG_ATOM_DIR_CHANGE, .proc/rotate_vis_overlay)
|
||||
else
|
||||
thing.managed_vis_overlays += overlay
|
||||
|
||||
|
||||
@@ -208,9 +208,19 @@ SUBSYSTEM_DEF(vote)
|
||||
if("gamemode")
|
||||
choices.Add(config.votable_modes)
|
||||
if("map")
|
||||
choices.Add(config.maplist)
|
||||
for(var/i in choices)//this is necessary because otherwise we'll end up with a bunch of /datum/map_config's as the default vote value instead of 0 as intended
|
||||
choices[i] = 0
|
||||
var/players = GLOB.clients.len
|
||||
var/list/lastmaps = SSpersistence.saved_maps?.len ? list("[SSmapping.config.map_name]") | SSpersistence.saved_maps : list("[SSmapping.config.map_name]")
|
||||
for(var/M in config.maplist) //This is a typeless loop due to the finnicky nature of keyed lists in this kind of context
|
||||
var/datum/map_config/targetmap = config.maplist[M]
|
||||
if(!istype(targetmap))
|
||||
continue
|
||||
if(!targetmap.voteweight)
|
||||
continue
|
||||
if((targetmap.config_min_users && players < targetmap.config_min_users) || (targetmap.config_max_users && players > targetmap.config_max_users))
|
||||
continue
|
||||
if(targetmap.max_round_search_span && count_occurences_of_value(lastmaps, M, targetmap.max_round_search_span) >= targetmap.max_rounds_played)
|
||||
continue
|
||||
choices |= M
|
||||
if("roundtype") //CIT CHANGE - adds the roundstart secret/extended vote
|
||||
choices.Add("secret", "extended")
|
||||
if("custom")
|
||||
|
||||
@@ -245,6 +245,14 @@
|
||||
/datum/action/item_action/toggle_helmet_light
|
||||
name = "Toggle Helmet Light"
|
||||
|
||||
/datum/action/item_action/toggle_welding_screen
|
||||
name = "Toggle Welding Screen"
|
||||
|
||||
/datum/action/item_action/toggle_welding_screen/Trigger()
|
||||
var/obj/item/clothing/head/hardhat/weldhat/H = target
|
||||
if(istype(H))
|
||||
H.toggle_welding_screen(owner)
|
||||
|
||||
/datum/action/item_action/toggle_headphones
|
||||
name = "Toggle Headphones"
|
||||
desc = "UNTZ UNTZ UNTZ"
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
var/dupe_mode = COMPONENT_DUPE_HIGHLANDER
|
||||
var/dupe_type
|
||||
var/datum/parent
|
||||
//only set to true if you are able to properly transfer this component
|
||||
//At a minimum RegisterWithParent and UnregisterFromParent should be used
|
||||
//Make sure you also implement PostTransfer for any post transfer handling
|
||||
var/can_transfer = FALSE
|
||||
|
||||
/datum/component/New(datum/P, ...)
|
||||
parent = P
|
||||
@@ -83,7 +87,7 @@
|
||||
/datum/component/proc/UnregisterFromParent()
|
||||
return
|
||||
|
||||
/datum/proc/RegisterSignal(datum/target, sig_type_or_types, proc_or_callback, override = FALSE)
|
||||
/datum/proc/RegisterSignal(datum/target, sig_type_or_types, proctype, override = FALSE)
|
||||
if(QDELETED(src) || QDELETED(target))
|
||||
return
|
||||
|
||||
@@ -96,15 +100,12 @@
|
||||
if(!lookup)
|
||||
target.comp_lookup = lookup = list()
|
||||
|
||||
if(!istype(proc_or_callback, /datum/callback)) //if it wasnt a callback before, it is now
|
||||
proc_or_callback = CALLBACK(src, proc_or_callback)
|
||||
|
||||
var/list/sig_types = islist(sig_type_or_types) ? sig_type_or_types : list(sig_type_or_types)
|
||||
for(var/sig_type in sig_types)
|
||||
if(!override && procs[target][sig_type])
|
||||
stack_trace("[sig_type] overridden. Use override = TRUE to suppress this warning")
|
||||
|
||||
procs[target][sig_type] = proc_or_callback
|
||||
procs[target][sig_type] = proctype
|
||||
|
||||
if(!lookup[sig_type]) // Nothing has registered here yet
|
||||
lookup[sig_type] = src
|
||||
@@ -154,7 +155,7 @@
|
||||
return
|
||||
|
||||
/datum/component/proc/PostTransfer()
|
||||
return
|
||||
return COMPONENT_INCOMPATIBLE //Do not support transfer by default as you must properly support it
|
||||
|
||||
/datum/component/proc/_GetInverseTypeList(our_type = type)
|
||||
//we can do this one simple trick
|
||||
@@ -171,17 +172,20 @@
|
||||
var/datum/C = target
|
||||
if(!C.signal_enabled)
|
||||
return NONE
|
||||
var/datum/callback/CB = C.signal_procs[src][sigtype]
|
||||
return CB.InvokeAsync(arglist(arguments))
|
||||
var/proctype = C.signal_procs[src][sigtype]
|
||||
return NONE | CallAsync(C, proctype, arguments)
|
||||
. = NONE
|
||||
for(var/I in target)
|
||||
var/datum/C = I
|
||||
if(!C.signal_enabled)
|
||||
continue
|
||||
var/datum/callback/CB = C.signal_procs[src][sigtype]
|
||||
. |= CB.InvokeAsync(arglist(arguments))
|
||||
var/proctype = C.signal_procs[src][sigtype]
|
||||
. |= CallAsync(C, proctype, arguments)
|
||||
|
||||
/datum/proc/GetComponent(c_type)
|
||||
// The type arg is casted so initial works, you shouldn't be passing a real instance into this
|
||||
/datum/proc/GetComponent(datum/component/c_type)
|
||||
if(initial(c_type.dupe_mode) == COMPONENT_DUPE_ALLOWED)
|
||||
stack_trace("GetComponent was called to get a component of which multiple copies could be on an object. This can easily break and should be changed. Type: \[[c_type]\]")
|
||||
var/list/dc = datum_components
|
||||
if(!dc)
|
||||
return null
|
||||
@@ -220,10 +224,6 @@
|
||||
if(ispath(nt))
|
||||
if(nt == /datum/component)
|
||||
CRASH("[nt] attempted instantiation!")
|
||||
if(!isnum(dm))
|
||||
CRASH("[nt]: Invalid dupe_mode ([dm])!")
|
||||
if(dt && !ispath(dt))
|
||||
CRASH("[nt]: Invalid dupe_type ([dt])!")
|
||||
else
|
||||
new_comp = nt
|
||||
nt = new_comp.type
|
||||
@@ -285,10 +285,13 @@
|
||||
if(target.parent)
|
||||
target.RemoveComponent()
|
||||
target.parent = src
|
||||
if(target.PostTransfer() == COMPONENT_INCOMPATIBLE)
|
||||
var/c_type = target.type
|
||||
qdel(target)
|
||||
CRASH("Incompatible [c_type] transfer attempt to a [type]!")
|
||||
var/result = target.PostTransfer()
|
||||
switch(result)
|
||||
if(COMPONENT_INCOMPATIBLE)
|
||||
var/c_type = target.type
|
||||
qdel(target)
|
||||
CRASH("Incompatible [c_type] transfer attempt to a [type]!")
|
||||
|
||||
if(target == AddComponent(target))
|
||||
target._JoinParent()
|
||||
|
||||
@@ -298,10 +301,13 @@
|
||||
return
|
||||
var/comps = dc[/datum/component]
|
||||
if(islist(comps))
|
||||
for(var/I in comps)
|
||||
target.TakeComponent(I)
|
||||
for(var/datum/component/I in comps)
|
||||
if(I.can_transfer)
|
||||
target.TakeComponent(I)
|
||||
else
|
||||
target.TakeComponent(comps)
|
||||
var/datum/component/C = comps
|
||||
if(C.can_transfer)
|
||||
target.TakeComponent(comps)
|
||||
|
||||
/datum/component/ui_host()
|
||||
return parent
|
||||
|
||||
@@ -1,26 +1,48 @@
|
||||
/datum/component/anti_magic
|
||||
var/magic = FALSE
|
||||
var/holy = FALSE
|
||||
var/psychic = FALSE
|
||||
var/allowed_slots = ~ITEM_SLOT_BACKPACK
|
||||
var/charges = INFINITY
|
||||
var/blocks_self = TRUE
|
||||
var/datum/callback/reaction
|
||||
var/datum/callback/expire
|
||||
|
||||
/datum/component/anti_magic/Initialize(_magic = FALSE, _holy = FALSE)
|
||||
/datum/component/anti_magic/Initialize(_magic = FALSE, _holy = FALSE, _psychic = FALSE, _allowed_slots, _charges, _blocks_self = TRUE, datum/callback/_reaction, datum/callback/_expire)
|
||||
if(isitem(parent))
|
||||
RegisterSignal(parent, COMSIG_ITEM_EQUIPPED, .proc/on_equip)
|
||||
RegisterSignal(parent, COMSIG_ITEM_DROPPED, .proc/on_drop)
|
||||
else if(ismob(parent))
|
||||
RegisterSignal(parent, COMSIG_MOB_RECEIVE_MAGIC, .proc/can_protect)
|
||||
RegisterSignal(parent, COMSIG_MOB_RECEIVE_MAGIC, .proc/protect)
|
||||
else
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
magic = _magic
|
||||
holy = _holy
|
||||
psychic = _psychic
|
||||
if(_allowed_slots)
|
||||
allowed_slots = _allowed_slots
|
||||
if(!isnull(_charges))
|
||||
charges = _charges
|
||||
blocks_self = _blocks_self
|
||||
reaction = _reaction
|
||||
expire = _expire
|
||||
|
||||
/datum/component/anti_magic/proc/on_equip(datum/source, mob/equipper, slot)
|
||||
RegisterSignal(equipper, COMSIG_MOB_RECEIVE_MAGIC, .proc/can_protect, TRUE)
|
||||
if(!CHECK_BITFIELD(allowed_slots, slotdefine2slotbit(slot))) //Check that the slot is valid for antimagic
|
||||
UnregisterSignal(equipper, COMSIG_MOB_RECEIVE_MAGIC)
|
||||
return
|
||||
RegisterSignal(equipper, COMSIG_MOB_RECEIVE_MAGIC, .proc/protect, TRUE)
|
||||
|
||||
/datum/component/anti_magic/proc/on_drop(datum/source, mob/user)
|
||||
UnregisterSignal(user, COMSIG_MOB_RECEIVE_MAGIC)
|
||||
|
||||
/datum/component/anti_magic/proc/can_protect(datum/source, _magic, _holy, list/protection_sources)
|
||||
if((_magic && magic) || (_holy && holy))
|
||||
/datum/component/anti_magic/proc/protect(datum/source, mob/user, _magic, _holy, _psychic, chargecost = 1, self, list/protection_sources)
|
||||
if(((_magic && magic) || (_holy && holy) || (_psychic && psychic)) && (!self || blocks_self))
|
||||
protection_sources += parent
|
||||
reaction?.Invoke(user, chargecost)
|
||||
charges -= chargecost
|
||||
if(charges <= 0)
|
||||
expire?.Invoke(user)
|
||||
qdel(src)
|
||||
return COMPONENT_BLOCK_MAGIC
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
/datum/component/bane
|
||||
dupe_mode = COMPONENT_DUPE_ALLOWED
|
||||
|
||||
var/mobtype
|
||||
var/speciestype
|
||||
var/damage_multiplier
|
||||
|
||||
/datum/component/bane/Initialize(mobtype, damage_multiplier=1)
|
||||
if(!isitem(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
if(ispath(mobtype, /mob/living))
|
||||
src.mobtype = mobtype
|
||||
else if(ispath(mobtype, /datum/species))
|
||||
speciestype = mobtype
|
||||
else
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
src.damage_multiplier = damage_multiplier
|
||||
|
||||
/datum/component/bane/RegisterWithParent()
|
||||
if(speciestype)
|
||||
RegisterSignal(parent, COMSIG_ITEM_AFTERATTACK, .proc/speciesCheck)
|
||||
else
|
||||
RegisterSignal(parent, COMSIG_ITEM_AFTERATTACK, .proc/mobCheck)
|
||||
|
||||
/datum/component/bane/UnregisterFromParent()
|
||||
UnregisterSignal(parent, COMSIG_ITEM_AFTERATTACK)
|
||||
|
||||
/datum/component/bane/proc/speciesCheck(obj/item/source, atom/target, mob/user, proximity_flag, click_parameters)
|
||||
if(!is_species(target, speciestype))
|
||||
return
|
||||
activate(source, target, user)
|
||||
|
||||
/datum/component/bane/proc/mobCheck(obj/item/source, atom/target, mob/user, proximity_flag, click_parameters)
|
||||
if(!istype(target, mobtype))
|
||||
return
|
||||
activate(source, target, user)
|
||||
|
||||
/datum/component/bane/proc/activate(obj/item/source, mob/living/target, mob/attacker)
|
||||
if(attacker.a_intent != INTENT_HARM)
|
||||
return
|
||||
|
||||
var/extra_damage = max(0, source.force * damage_multiplier)
|
||||
target.apply_damage(extra_damage, source.damtype, attacker.zone_selected)
|
||||
@@ -37,9 +37,9 @@
|
||||
if(O.status == BODYPART_ROBOTIC)
|
||||
return
|
||||
|
||||
var/feetCover = (H.wear_suit && (H.wear_suit.body_parts_covered & FEET)) || (H.w_uniform && (H.w_uniform.body_parts_covered & FEET))
|
||||
var/feetCover = (H.wear_suit && (H.wear_suit.body_parts_covered & FEET)) || (H.w_uniform && (H.w_uniform.body_parts_covered & FEET) || (H.shoes && (H.shoes.body_parts_covered & FEET)))
|
||||
|
||||
if(!(flags & CALTROP_BYPASS_SHOES) && (H.shoes || feetCover))
|
||||
if(!(flags & CALTROP_BYPASS_SHOES) && feetCover)
|
||||
return
|
||||
|
||||
if((H.movement_type & FLYING) || H.buckled)
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
return FALSE
|
||||
if(!isliving(AM) && !isobj(AM))
|
||||
return FALSE
|
||||
if(is_type_in_typecache(AM, forbidden_types) || AM.throwing || AM.floating)
|
||||
if(is_type_in_typecache(AM, forbidden_types) || AM.throwing || (AM.movement_type & FLOATING))
|
||||
return FALSE
|
||||
//Flies right over the chasm
|
||||
if(ismob(AM))
|
||||
|
||||
@@ -8,32 +8,39 @@
|
||||
|
||||
/datum/component/cleaning/proc/Clean()
|
||||
var/atom/movable/AM = parent
|
||||
var/turf/tile = AM.loc
|
||||
if(!isturf(tile))
|
||||
return
|
||||
|
||||
SEND_SIGNAL(tile, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD)
|
||||
for(var/A in tile)
|
||||
var/turf/T = AM.loc
|
||||
SEND_SIGNAL(T, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
|
||||
for(var/A in T)
|
||||
if(is_cleanable(A))
|
||||
qdel(A)
|
||||
else if(istype(A, /obj/item))
|
||||
var/obj/item/I = A
|
||||
SEND_SIGNAL(I, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD)
|
||||
if(ismob(I.loc))
|
||||
var/mob/M = I.loc
|
||||
else if(isitem(A))
|
||||
var/obj/item/cleaned_item = A
|
||||
SEND_SIGNAL(cleaned_item, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
|
||||
cleaned_item.clean_blood()
|
||||
if(ismob(cleaned_item.loc))
|
||||
var/mob/M = cleaned_item.loc
|
||||
M.regenerate_icons()
|
||||
else if(ishuman(A))
|
||||
var/mob/living/carbon/human/cleaned_human = A
|
||||
if(cleaned_human.lying)
|
||||
if(cleaned_human.head)
|
||||
SEND_SIGNAL(cleaned_human.head, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD)
|
||||
SEND_SIGNAL(cleaned_human.head, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
|
||||
cleaned_human.head.clean_blood()
|
||||
cleaned_human.update_inv_head()
|
||||
if(cleaned_human.wear_suit)
|
||||
SEND_SIGNAL(cleaned_human.wear_suit, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD)
|
||||
SEND_SIGNAL(cleaned_human.wear_suit, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
|
||||
cleaned_human.wear_suit.clean_blood()
|
||||
cleaned_human.update_inv_wear_suit()
|
||||
else if(cleaned_human.w_uniform)
|
||||
SEND_SIGNAL(cleaned_human.w_uniform, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD)
|
||||
SEND_SIGNAL(cleaned_human.w_uniform, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
|
||||
cleaned_human.w_uniform.clean_blood()
|
||||
cleaned_human.update_inv_w_uniform()
|
||||
if(cleaned_human.shoes)
|
||||
SEND_SIGNAL(cleaned_human.shoes, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD)
|
||||
SEND_SIGNAL(cleaned_human, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD)
|
||||
SEND_SIGNAL(cleaned_human.shoes, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
|
||||
cleaned_human.shoes.clean_blood()
|
||||
cleaned_human.update_inv_shoes()
|
||||
SEND_SIGNAL(cleaned_human, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK)
|
||||
cleaned_human.clean_blood()
|
||||
cleaned_human.wash_cream()
|
||||
cleaned_human.regenerate_icons()
|
||||
to_chat(cleaned_human, "<span class='danger'>[AM] cleans your face!</span>")
|
||||
to_chat(cleaned_human, "<span class='danger'>[src] cleans your face!</span>")
|
||||
@@ -1,6 +1,6 @@
|
||||
/datum/component/decal
|
||||
dupe_mode = COMPONENT_DUPE_ALLOWED
|
||||
|
||||
can_transfer = TRUE
|
||||
var/cleanable
|
||||
var/description
|
||||
var/mutable_appearance/pic
|
||||
|
||||
@@ -1,39 +1,13 @@
|
||||
/datum/component/decal/blood
|
||||
dupe_mode = COMPONENT_DUPE_UNIQUE
|
||||
|
||||
/datum/component/decal/blood/Initialize(_icon, _icon_state, _dir, _cleanable=CLEAN_STRENGTH_BLOOD, _color, _layer=ABOVE_OBJ_LAYER)
|
||||
if(!isitem(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
. = ..()
|
||||
RegisterSignal(parent, COMSIG_ATOM_GET_EXAMINE_NAME, .proc/get_examine_name)
|
||||
|
||||
/datum/component/decal/blood/generate_appearance(_icon, _icon_state, _dir, _layer, _color)
|
||||
var/obj/item/I = parent
|
||||
if(!_icon)
|
||||
_icon = 'icons/effects/blood.dmi'
|
||||
if(!_icon_state)
|
||||
_icon_state = "itemblood"
|
||||
var/icon = initial(I.icon)
|
||||
var/icon_state = initial(I.icon_state)
|
||||
if(!icon || !icon_state)
|
||||
// It's something which takes on the look of other items, probably
|
||||
icon = I.icon
|
||||
icon_state = I.icon_state
|
||||
var/static/list/blood_splatter_appearances = list()
|
||||
//try to find a pre-processed blood-splatter. otherwise, make a new one
|
||||
var/index = "[REF(icon)]-[icon_state]"
|
||||
pic = blood_splatter_appearances[index]
|
||||
|
||||
if(!pic)
|
||||
var/icon/blood_splatter_icon = icon(initial(I.icon), initial(I.icon_state), , 1) //we only want to apply blood-splatters to the initial icon_state for each object
|
||||
blood_splatter_icon.Blend("#fff", ICON_ADD) //fills the icon_state with white (except where it's transparent)
|
||||
blood_splatter_icon.Blend(icon(_icon, _icon_state), ICON_MULTIPLY) //adds blood and the remaining white areas become transparant
|
||||
pic = mutable_appearance(blood_splatter_icon, initial(I.icon_state))
|
||||
blood_splatter_appearances[index] = pic
|
||||
return TRUE
|
||||
|
||||
/datum/component/decal/blood/proc/get_examine_name(datum/source, mob/user, list/override)
|
||||
var/atom/A = parent
|
||||
override[EXAMINE_POSITION_ARTICLE] = A.gender == PLURAL? "some" : "a"
|
||||
override[EXAMINE_POSITION_BEFORE] = " blood-stained "
|
||||
return COMPONENT_EXNAME_CHANGED
|
||||
/datum/component/decal/blood
|
||||
dupe_mode = COMPONENT_DUPE_UNIQUE
|
||||
|
||||
/datum/component/decal/blood/Initialize(_icon, _icon_state, _dir, _cleanable=CLEAN_STRENGTH_BLOOD, _color, _layer=ABOVE_OBJ_LAYER)
|
||||
if(!isitem(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
. = ..()
|
||||
RegisterSignal(parent, COMSIG_ATOM_GET_EXAMINE_NAME, .proc/get_examine_name)
|
||||
|
||||
/datum/component/decal/blood/proc/get_examine_name(datum/source, mob/user, list/override)
|
||||
var/atom/A = parent
|
||||
|
||||
return COMPONENT_EXNAME_CHANGED
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/datum/component/wearertargeting/earprotection
|
||||
signals = list(COMSIG_CARBON_SOUNDBANG)
|
||||
mobtype = /mob/living/carbon
|
||||
proctype = .proc/reducebang
|
||||
|
||||
/datum/component/wearertargeting/earprotection/Initialize(_valid_slots)
|
||||
. = ..()
|
||||
valid_slots = _valid_slots
|
||||
callback = CALLBACK(src, .proc/reducebang)
|
||||
|
||||
/datum/component/wearertargeting/earprotection/proc/reducebang(datum/source, list/reflist)
|
||||
reflist[1]--
|
||||
|
||||
@@ -0,0 +1,140 @@
|
||||
/datum/component/fantasy
|
||||
dupe_mode = COMPONENT_DUPE_UNIQUE_PASSARGS
|
||||
|
||||
var/quality
|
||||
|
||||
var/canFail
|
||||
var/announce
|
||||
|
||||
var/originalName
|
||||
var/list/affixes
|
||||
var/list/appliedComponents
|
||||
|
||||
var/static/list/affixListing
|
||||
|
||||
/datum/component/fantasy/Initialize(quality, list/affixes = list(), canFail=FALSE, announce=FALSE)
|
||||
if(!isitem(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
src.quality = quality || randomQuality()
|
||||
src.canFail = canFail
|
||||
src.announce = announce
|
||||
|
||||
src.affixes = affixes
|
||||
appliedComponents = list()
|
||||
randomAffixes()
|
||||
|
||||
/datum/component/fantasy/Destroy()
|
||||
unmodify()
|
||||
affixes = null
|
||||
return ..()
|
||||
|
||||
/datum/component/fantasy/RegisterWithParent()
|
||||
var/obj/item/master = parent
|
||||
originalName = master.name
|
||||
modify()
|
||||
|
||||
/datum/component/fantasy/UnregisterFromParent()
|
||||
unmodify()
|
||||
|
||||
/datum/component/fantasy/InheritComponent(datum/component/fantasy/newComp, original, list/arguments)
|
||||
unmodify()
|
||||
if(newComp)
|
||||
quality += newComp.quality
|
||||
canFail = newComp.canFail
|
||||
announce = newComp.announce
|
||||
else
|
||||
arguments.len = 5 // This is done to replicate what happens when an arglist smaller than the necessary arguments is given
|
||||
quality += arguments[1]
|
||||
canFail = arguments[4] || canFail
|
||||
announce = arguments[5] || announce
|
||||
modify()
|
||||
|
||||
/datum/component/fantasy/proc/randomQuality()
|
||||
var/quality = pick(1;15, 2;14, 2;13, 2;12, 3;11, 3;10, 3;9, 4;8, 4;7, 4;6, 5;5, 5;4, 5;3, 6;2, 6;1, 6;0)
|
||||
if(prob(50))
|
||||
quality = -quality
|
||||
return quality
|
||||
|
||||
/datum/component/fantasy/proc/randomAffixes(force)
|
||||
if(!affixListing)
|
||||
affixListing = list()
|
||||
for(var/T in subtypesof(/datum/fantasy_affix))
|
||||
var/datum/fantasy_affix/affix = new T
|
||||
affixListing[affix] = affix.weight
|
||||
|
||||
if(length(affixes))
|
||||
if(!force)
|
||||
return
|
||||
affixes = list()
|
||||
|
||||
var/alignment
|
||||
if(quality >= 0)
|
||||
alignment |= AFFIX_GOOD
|
||||
if(quality <= 0)
|
||||
alignment |= AFFIX_EVIL
|
||||
|
||||
var/usedSlots = NONE
|
||||
for(var/i in 1 to max(1, abs(quality))) // We want at least 1 affix applied
|
||||
var/datum/fantasy_affix/affix = pickweight(affixListing)
|
||||
if(affix.placement & usedSlots)
|
||||
continue
|
||||
if(!(affix.alignment & alignment))
|
||||
continue
|
||||
if(!affix.validate(src))
|
||||
continue
|
||||
affixes += affix
|
||||
usedSlots |= affix.placement
|
||||
|
||||
/datum/component/fantasy/proc/modify()
|
||||
var/obj/item/master = parent
|
||||
|
||||
master.force = max(0, master.force + quality)
|
||||
master.throwforce = max(0, master.throwforce + quality)
|
||||
master.armor = master.armor?.modifyAllRatings(quality)
|
||||
|
||||
var/newName = originalName
|
||||
for(var/i in affixes)
|
||||
var/datum/fantasy_affix/affix = i
|
||||
newName = affix.apply(src, newName)
|
||||
|
||||
if(quality != 0)
|
||||
newName = "[newName] [quality > 0 ? "+" : ""][quality]"
|
||||
|
||||
if(canFail && prob((quality - 9)*10))
|
||||
var/turf/place = get_turf(parent)
|
||||
place.visible_message("<span class='danger'>[parent] <span class='blue'>violently glows blue</span> for a while, then evaporates.</span>")
|
||||
master.burn()
|
||||
return
|
||||
else if(announce)
|
||||
announce()
|
||||
|
||||
master.name = newName
|
||||
|
||||
/datum/component/fantasy/proc/unmodify()
|
||||
var/obj/item/master = parent
|
||||
|
||||
for(var/i in affixes)
|
||||
var/datum/fantasy_affix/affix = i
|
||||
affix.remove(src)
|
||||
for(var/i in appliedComponents)
|
||||
qdel(i)
|
||||
|
||||
master.force = max(0, master.force - quality)
|
||||
master.throwforce = max(0, master.throwforce - quality)
|
||||
master.armor = master.armor?.modifyAllRatings(-quality)
|
||||
|
||||
master.name = originalName
|
||||
|
||||
/datum/component/fantasy/proc/announce()
|
||||
var/turf/location = get_turf(parent)
|
||||
var/span
|
||||
var/effect_description
|
||||
if(quality >= 0)
|
||||
span = "<span class='notice'>"
|
||||
effect_description = "<span class='heavy_brass'>shimmering golden glow</span>"
|
||||
else
|
||||
span = "<span class='danger'>"
|
||||
effect_description = "<span class='bold'>mottled black glow</span>"
|
||||
|
||||
location.visible_message("[span][originalName] is covered by a [effect_description] and then transforms into [parent]!</span>")
|
||||
@@ -0,0 +1,13 @@
|
||||
/datum/fantasy_affix
|
||||
var/placement // A bitflag of "slots" this affix takes up, for example pre/suffix
|
||||
var/alignment
|
||||
var/weight = 10
|
||||
|
||||
// For those occasional affixes which only make sense in certain circumstances
|
||||
/datum/fantasy_affix/proc/validate(datum/component/fantasy/comp)
|
||||
return TRUE
|
||||
|
||||
/datum/fantasy_affix/proc/apply(datum/component/fantasy/comp, newName)
|
||||
return newName
|
||||
|
||||
/datum/fantasy_affix/proc/remove(datum/component/fantasy/comp)
|
||||
@@ -0,0 +1,68 @@
|
||||
/datum/fantasy_affix/cosmetic_prefixes
|
||||
placement = AFFIX_PREFIX
|
||||
alignment = AFFIX_GOOD | AFFIX_EVIL
|
||||
|
||||
var/list/goodPrefixes
|
||||
var/list/badPrefixes
|
||||
|
||||
/datum/fantasy_affix/cosmetic_prefixes/New()
|
||||
goodPrefixes = list(
|
||||
"greater",
|
||||
"major",
|
||||
"blessed",
|
||||
"superior",
|
||||
"empowered",
|
||||
"honed",
|
||||
"true",
|
||||
"glorious",
|
||||
"robust",
|
||||
)
|
||||
badPrefixes = list(
|
||||
"lesser",
|
||||
"minor",
|
||||
"blighted",
|
||||
"inferior",
|
||||
"enfeebled",
|
||||
"rusted",
|
||||
"unsteady",
|
||||
"tragic",
|
||||
"gimped",
|
||||
"cursed",
|
||||
)
|
||||
|
||||
weight = (length(goodPrefixes) + length(badPrefixes)) * 10
|
||||
|
||||
/datum/fantasy_affix/cosmetic_prefixes/apply(datum/component/fantasy/comp, newName)
|
||||
if(comp.quality > 0 || (comp.quality == 0 && prob(50)))
|
||||
return "[pick(goodPrefixes)] [newName]"
|
||||
else
|
||||
return "[pick(badPrefixes)] [newName]"
|
||||
|
||||
/datum/fantasy_affix/tactical
|
||||
placement = AFFIX_PREFIX
|
||||
alignment = AFFIX_GOOD
|
||||
weight = 1 // Very powerful, no one should have such power
|
||||
|
||||
/datum/fantasy_affix/tactical/apply(datum/component/fantasy/comp, newName)
|
||||
var/obj/item/master = comp.parent
|
||||
comp.appliedComponents += master.AddComponent(/datum/component/tactical)
|
||||
return "tactical [newName]"
|
||||
|
||||
/datum/fantasy_affix/pyromantic
|
||||
placement = AFFIX_PREFIX
|
||||
alignment = AFFIX_GOOD
|
||||
|
||||
/datum/fantasy_affix/pyromantic/apply(datum/component/fantasy/comp, newName)
|
||||
var/obj/item/master = comp.parent
|
||||
comp.appliedComponents += master.AddComponent(/datum/component/igniter, CLAMP(comp.quality, 1, 10))
|
||||
return "pyromantic [newName]"
|
||||
|
||||
/datum/fantasy_affix/vampiric
|
||||
placement = AFFIX_PREFIX
|
||||
alignment = AFFIX_GOOD
|
||||
weight = 5
|
||||
|
||||
/datum/fantasy_affix/vampiric/apply(datum/component/fantasy/comp, newName)
|
||||
var/obj/item/master = comp.parent
|
||||
comp.appliedComponents += master.AddComponent(/datum/component/lifesteal, comp.quality)
|
||||
return "vampiric [newName]"
|
||||
@@ -0,0 +1,170 @@
|
||||
/datum/fantasy_affix/cosmetic_suffixes
|
||||
placement = AFFIX_SUFFIX
|
||||
alignment = AFFIX_GOOD | AFFIX_EVIL
|
||||
|
||||
var/list/goodSuffixes
|
||||
var/list/badSuffixes
|
||||
|
||||
/datum/fantasy_affix/cosmetic_suffixes/New()
|
||||
goodSuffixes = list(
|
||||
"dexterity",
|
||||
"constitution",
|
||||
"intelligence",
|
||||
"wisdom",
|
||||
"charisma",
|
||||
"the forest",
|
||||
"the hills",
|
||||
"the plains",
|
||||
"the sea",
|
||||
"the sun",
|
||||
"the moon",
|
||||
"the void",
|
||||
"the world",
|
||||
"many secrets",
|
||||
"many tales",
|
||||
"many colors",
|
||||
"rending",
|
||||
"sundering",
|
||||
"the night",
|
||||
"the day",
|
||||
)
|
||||
badSuffixes = list(
|
||||
"draining",
|
||||
"burden",
|
||||
"discomfort",
|
||||
"awkwardness",
|
||||
"poor hygiene",
|
||||
"timidity",
|
||||
)
|
||||
|
||||
weight = (length(goodSuffixes) + length(badSuffixes)) * 10
|
||||
|
||||
/datum/fantasy_affix/cosmetic_suffixes/apply(datum/component/fantasy/comp, newName)
|
||||
if(comp.quality > 0 || (comp.quality == 0 && prob(50)))
|
||||
return "[newName] of [pick(goodSuffixes)]"
|
||||
else
|
||||
return "[newName] of [pick(badSuffixes)]"
|
||||
|
||||
//////////// Good suffixes
|
||||
/datum/fantasy_affix/bane
|
||||
placement = AFFIX_SUFFIX
|
||||
alignment = AFFIX_GOOD
|
||||
weight = 20
|
||||
|
||||
/datum/fantasy_affix/bane/apply(datum/component/fantasy/comp, newName)
|
||||
. = ..()
|
||||
// This is set up to be easy to add to these lists as I expect it will need modifications
|
||||
var/static/list/possible_mobtypes
|
||||
if(!possible_mobtypes)
|
||||
// The base list of allowed mob/species types
|
||||
possible_mobtypes = typecacheof(list(
|
||||
/mob/living/simple_animal,
|
||||
/mob/living/carbon,
|
||||
/datum/species,
|
||||
))
|
||||
// Some particular types to disallow if they're too broad/abstract
|
||||
possible_mobtypes -= list(
|
||||
/mob/living/simple_animal/hostile,
|
||||
)
|
||||
// Some types to remove them and their subtypes
|
||||
possible_mobtypes -= typecacheof(list(
|
||||
/mob/living/carbon/human/species,
|
||||
))
|
||||
|
||||
var/mob/picked_mobtype = pick(possible_mobtypes)
|
||||
// This works even with the species picks since we're only accessing the name
|
||||
|
||||
var/obj/item/master = comp.parent
|
||||
comp.appliedComponents += master.AddComponent(/datum/component/bane, picked_mobtype)
|
||||
return "[newName] of [initial(picked_mobtype.name)] slaying"
|
||||
|
||||
/datum/fantasy_affix/summoning
|
||||
placement = AFFIX_SUFFIX
|
||||
alignment = AFFIX_GOOD
|
||||
weight = 5
|
||||
|
||||
/datum/fantasy_affix/summoning/apply(datum/component/fantasy/comp, newName)
|
||||
. = ..()
|
||||
// This is set up to be easy to add to these lists as I expect it will need modifications
|
||||
var/static/list/possible_mobtypes
|
||||
if(!possible_mobtypes)
|
||||
// The base list of allowed mob/species types
|
||||
possible_mobtypes = typecacheof(list(
|
||||
/mob/living/simple_animal,
|
||||
/mob/living/carbon,
|
||||
/datum/species,
|
||||
))
|
||||
// Some particular types to disallow if they're too broad/abstract
|
||||
possible_mobtypes -= list(
|
||||
/mob/living/simple_animal/hostile,
|
||||
)
|
||||
// Some types to remove them and their subtypes
|
||||
possible_mobtypes -= typecacheof(list(
|
||||
/mob/living/carbon/human/species,
|
||||
/mob/living/simple_animal/hostile/megafauna,
|
||||
))
|
||||
|
||||
var/mob/picked_mobtype = pick(possible_mobtypes)
|
||||
// This works even with the species picks since we're only accessing the name
|
||||
|
||||
var/obj/item/master = comp.parent
|
||||
var/max_mobs = max(CEILING(comp.quality/2, 1), 1)
|
||||
var/spawn_delay = 300 - 30 * comp.quality
|
||||
comp.appliedComponents += master.AddComponent(/datum/component/summoning, list(picked_mobtype), 100, max_mobs, spawn_delay)
|
||||
return "[newName] of [initial(picked_mobtype.name)] summoning"
|
||||
|
||||
/datum/fantasy_affix/shrapnel
|
||||
placement = AFFIX_SUFFIX
|
||||
alignment = AFFIX_GOOD
|
||||
|
||||
/datum/fantasy_affix/shrapnel/validate(datum/component/fantasy/comp)
|
||||
if(isgun(comp.parent))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/datum/fantasy_affix/shrapnel/apply(datum/component/fantasy/comp, newName)
|
||||
. = ..()
|
||||
// higher means more likely
|
||||
var/list/weighted_projectile_types = list(/obj/item/projectile/meteor = 1,
|
||||
/obj/item/projectile/energy/nuclear_particle = 1,
|
||||
/obj/item/projectile/beam/pulse = 1,
|
||||
/obj/item/projectile/bullet/honker = 15,
|
||||
/obj/item/projectile/temp = 15,
|
||||
/obj/item/projectile/ion = 15,
|
||||
/obj/item/projectile/magic/door = 15,
|
||||
/obj/item/projectile/magic/locker = 15,
|
||||
// /obj/item/projectile/magic/fetch = 15,
|
||||
/obj/item/projectile/beam/emitter = 15,
|
||||
// /obj/item/projectile/magic/flying = 15,
|
||||
/obj/item/projectile/energy/net = 15,
|
||||
/obj/item/projectile/bullet/incendiary/c9mm = 15,
|
||||
/obj/item/projectile/temp/hot = 15,
|
||||
/obj/item/projectile/beam/disabler = 15)
|
||||
|
||||
var/obj/item/projectile/picked_projectiletype = pickweight(weighted_projectile_types)
|
||||
|
||||
var/obj/item/master = comp.parent
|
||||
comp.appliedComponents += master.AddComponent(/datum/component/shrapnel, picked_projectiletype)
|
||||
return "[newName] of [initial(picked_projectiletype.name)] shrapnel"
|
||||
|
||||
/datum/fantasy_affix/strength
|
||||
placement = AFFIX_SUFFIX
|
||||
alignment = AFFIX_GOOD
|
||||
|
||||
/datum/fantasy_affix/strength/apply(datum/component/fantasy/comp, newName)
|
||||
. = ..()
|
||||
var/obj/item/master = comp.parent
|
||||
comp.appliedComponents += master.AddComponent(/datum/component/knockback, CEILING(comp.quality/2, 1), FLOOR(comp.quality/10, 1))
|
||||
return "[newName] of strength"
|
||||
|
||||
//////////// Bad suffixes
|
||||
|
||||
/datum/fantasy_affix/fool
|
||||
placement = AFFIX_SUFFIX
|
||||
alignment = AFFIX_EVIL
|
||||
|
||||
/datum/fantasy_affix/fool/apply(datum/component/fantasy/comp, newName)
|
||||
. = ..()
|
||||
var/obj/item/master = comp.parent
|
||||
comp.appliedComponents += master.AddComponent(/datum/component/squeak, list('sound/items/bikehorn.ogg'=1), 50)
|
||||
return "[newName] of the fool"
|
||||
@@ -89,19 +89,19 @@
|
||||
return
|
||||
if(ishuman(LM)) //for proper humans, they're special
|
||||
var/mob/living/carbon/human/H = LM
|
||||
var/feetCover = (H.wear_suit && (H.wear_suit.body_parts_covered & FEET)) || (H.w_uniform && (H.w_uniform.body_parts_covered & FEET))
|
||||
var/feetCover = (H.wear_suit && (H.wear_suit.body_parts_covered & FEET)) || (H.w_uniform && (H.w_uniform.body_parts_covered & FEET) || (H.shoes && (H.shoes.body_parts_covered & FEET)))
|
||||
|
||||
if (H.dna.features["taur"] == "Naga" || H.dna.features["taur"] == "Tentacle") //are we a naga or tentacle taur creature
|
||||
playsound(T, 'sound/effects/footstep/crawl1.ogg', 15 * v)
|
||||
return
|
||||
|
||||
if(H.shoes || feetCover) //are we wearing shoes
|
||||
if(feetCover) //are we wearing shoes
|
||||
playsound(T, pick(GLOB.footstep[T.footstep][1]),
|
||||
GLOB.footstep[T.footstep][2] * v,
|
||||
TRUE,
|
||||
GLOB.footstep[T.footstep][3] + e)
|
||||
|
||||
if((!H.shoes && !feetCover)) //are we NOT wearing shoes
|
||||
if(!feetCover) //are we NOT wearing shoes
|
||||
playsound(T, pick(GLOB.barefootstep[T.barefootstep][1]),
|
||||
GLOB.barefootstep[T.barefootstep][2] * v,
|
||||
TRUE,
|
||||
|
||||
@@ -1,159 +0,0 @@
|
||||
/datum/component/forensics
|
||||
dupe_mode = COMPONENT_DUPE_UNIQUE
|
||||
var/list/fingerprints //assoc print = print
|
||||
var/list/hiddenprints //assoc ckey = realname/gloves/ckey
|
||||
var/list/blood_DNA //assoc dna = bloodtype
|
||||
var/list/fibers //assoc print = print
|
||||
|
||||
/datum/component/forensics/InheritComponent(datum/component/forensics/F, original) //Use of | and |= being different here is INTENTIONAL.
|
||||
fingerprints = fingerprints | F.fingerprints
|
||||
hiddenprints = hiddenprints | F.hiddenprints
|
||||
blood_DNA = blood_DNA | F.blood_DNA
|
||||
fibers = fibers | F.fibers
|
||||
check_blood()
|
||||
return ..()
|
||||
|
||||
/datum/component/forensics/Initialize(new_fingerprints, new_hiddenprints, new_blood_DNA, new_fibers)
|
||||
if(!isatom(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
fingerprints = new_fingerprints
|
||||
hiddenprints = new_hiddenprints
|
||||
blood_DNA = new_blood_DNA
|
||||
fibers = new_fibers
|
||||
check_blood()
|
||||
RegisterSignal(parent, COMSIG_COMPONENT_CLEAN_ACT, .proc/clean_act)
|
||||
|
||||
/datum/component/forensics/proc/wipe_fingerprints()
|
||||
fingerprints = null
|
||||
return TRUE
|
||||
|
||||
/datum/component/forensics/proc/wipe_hiddenprints()
|
||||
return //no.
|
||||
|
||||
/datum/component/forensics/proc/wipe_blood_DNA()
|
||||
blood_DNA = null
|
||||
if(isitem(parent))
|
||||
qdel(parent.GetComponent(/datum/component/decal/blood))
|
||||
return TRUE
|
||||
|
||||
/datum/component/forensics/proc/wipe_fibers()
|
||||
fibers = null
|
||||
return TRUE
|
||||
|
||||
/datum/component/forensics/proc/clean_act(datum/source, strength)
|
||||
if(strength >= CLEAN_STRENGTH_FINGERPRINTS)
|
||||
wipe_fingerprints()
|
||||
if(strength >= CLEAN_STRENGTH_BLOOD)
|
||||
wipe_blood_DNA()
|
||||
if(strength >= CLEAN_STRENGTH_FIBERS)
|
||||
wipe_fibers()
|
||||
|
||||
/datum/component/forensics/proc/add_fingerprint_list(list/_fingerprints) //list(text)
|
||||
if(!length(_fingerprints))
|
||||
return
|
||||
LAZYINITLIST(fingerprints)
|
||||
for(var/i in _fingerprints) //We use an associative list, make sure we don't just merge a non-associative list into ours.
|
||||
fingerprints[i] = i
|
||||
return TRUE
|
||||
|
||||
/datum/component/forensics/proc/add_fingerprint(mob/living/M, ignoregloves = FALSE)
|
||||
if(!M)
|
||||
return
|
||||
add_hiddenprint(M)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
add_fibers(H)
|
||||
if(H.gloves) //Check if the gloves (if any) hide fingerprints
|
||||
var/obj/item/clothing/gloves/G = H.gloves
|
||||
if(G.transfer_prints)
|
||||
ignoregloves = TRUE
|
||||
if(!ignoregloves)
|
||||
H.gloves.add_fingerprint(H, TRUE) //ignoregloves = 1 to avoid infinite loop.
|
||||
return
|
||||
var/full_print = md5(H.dna.uni_identity)
|
||||
LAZYSET(fingerprints, full_print, full_print)
|
||||
return TRUE
|
||||
|
||||
/datum/component/forensics/proc/add_fiber_list(list/_fibertext) //list(text)
|
||||
if(!length(_fibertext))
|
||||
return
|
||||
LAZYINITLIST(fibers)
|
||||
for(var/i in _fibertext) //We use an associative list, make sure we don't just merge a non-associative list into ours.
|
||||
fibers[i] = i
|
||||
return TRUE
|
||||
|
||||
/datum/component/forensics/proc/add_fibers(mob/living/carbon/human/M)
|
||||
var/fibertext
|
||||
var/item_multiplier = isitem(src)?1.2:1
|
||||
if(M.wear_suit)
|
||||
fibertext = "Material from \a [M.wear_suit]."
|
||||
if(prob(10*item_multiplier) && !LAZYACCESS(fibers, fibertext))
|
||||
LAZYSET(fibers, fibertext, fibertext)
|
||||
if(!(M.wear_suit.body_parts_covered & CHEST))
|
||||
if(M.w_uniform)
|
||||
fibertext = "Fibers from \a [M.w_uniform]."
|
||||
if(prob(12*item_multiplier) && !LAZYACCESS(fibers, fibertext)) //Wearing a suit means less of the uniform exposed.
|
||||
LAZYSET(fibers, fibertext, fibertext)
|
||||
if(!(M.wear_suit.body_parts_covered & HANDS))
|
||||
if(M.gloves)
|
||||
fibertext = "Material from a pair of [M.gloves.name]."
|
||||
if(prob(20*item_multiplier) && !LAZYACCESS(fibers, fibertext))
|
||||
LAZYSET(fibers, fibertext, fibertext)
|
||||
else if(M.w_uniform)
|
||||
fibertext = "Fibers from \a [M.w_uniform]."
|
||||
if(prob(15*item_multiplier) && !LAZYACCESS(fibers, fibertext))
|
||||
// "Added fibertext: [fibertext]"
|
||||
LAZYSET(fibers, fibertext, fibertext)
|
||||
if(M.gloves)
|
||||
fibertext = "Material from a pair of [M.gloves.name]."
|
||||
if(prob(20*item_multiplier) && !LAZYACCESS(fibers, fibertext))
|
||||
LAZYSET(fibers, fibertext, fibertext)
|
||||
else if(M.gloves)
|
||||
fibertext = "Material from a pair of [M.gloves.name]."
|
||||
if(prob(20*item_multiplier) && !LAZYACCESS(fibers, fibertext))
|
||||
LAZYSET(fibers, fibertext, fibertext)
|
||||
return TRUE
|
||||
|
||||
/datum/component/forensics/proc/add_hiddenprint_list(list/_hiddenprints) //list(ckey = text)
|
||||
if(!length(_hiddenprints))
|
||||
return
|
||||
LAZYINITLIST(hiddenprints)
|
||||
for(var/i in _hiddenprints) //We use an associative list, make sure we don't just merge a non-associative list into ours.
|
||||
hiddenprints[i] = _hiddenprints[i]
|
||||
return TRUE
|
||||
|
||||
/datum/component/forensics/proc/add_hiddenprint(mob/living/M)
|
||||
if(!M || !M.key)
|
||||
return
|
||||
var/hasgloves = ""
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.gloves)
|
||||
hasgloves = "(gloves)"
|
||||
var/current_time = TIME_STAMP("hh:mm:ss", FALSE)
|
||||
if(!LAZYACCESS(hiddenprints, M.key))
|
||||
LAZYSET(hiddenprints, M.key, "First: [M.real_name]\[[current_time]\][hasgloves]. Ckey: [M.ckey]")
|
||||
else
|
||||
var/laststamppos = findtext(LAZYACCESS(hiddenprints, M.key), " Last: ")
|
||||
if(laststamppos)
|
||||
LAZYSET(hiddenprints, M.key, copytext(hiddenprints[M.key], 1, laststamppos))
|
||||
hiddenprints[M.key] += " Last: [M.real_name]\[[current_time]\][hasgloves]. Ckey: [M.ckey]" //made sure to be existing by if(!LAZYACCESS);else
|
||||
var/atom/A = parent
|
||||
A.fingerprintslast = M.ckey
|
||||
return TRUE
|
||||
|
||||
/datum/component/forensics/proc/add_blood_DNA(list/dna) //list(dna_enzymes = type)
|
||||
if(!length(dna))
|
||||
return
|
||||
LAZYINITLIST(blood_DNA)
|
||||
for(var/i in dna)
|
||||
blood_DNA[i] = dna[i]
|
||||
check_blood()
|
||||
return TRUE
|
||||
|
||||
/datum/component/forensics/proc/check_blood()
|
||||
if(!isitem(parent))
|
||||
return
|
||||
if(!length(blood_DNA))
|
||||
return
|
||||
parent.LoadComponent(/datum/component/decal/blood)
|
||||
@@ -0,0 +1,37 @@
|
||||
|
||||
/datum/component/igniter
|
||||
var/fire_stacks
|
||||
|
||||
/datum/component/igniter/Initialize(fire_stacks=1)
|
||||
if(!isitem(parent) && !ishostile(parent) && !isgun(parent) && !ismachinery(parent) && !isstructure(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
src.fire_stacks = fire_stacks
|
||||
|
||||
/datum/component/igniter/RegisterWithParent()
|
||||
if(ismachinery(parent) || isstructure(parent) || isgun(parent)) // turrets, etc
|
||||
RegisterSignal(parent, COMSIG_PROJECTILE_ON_HIT, .proc/projectile_hit)
|
||||
else if(isitem(parent))
|
||||
RegisterSignal(parent, COMSIG_ITEM_AFTERATTACK, .proc/item_afterattack)
|
||||
else if(ishostile(parent))
|
||||
RegisterSignal(parent, COMSIG_HOSTILE_ATTACKINGTARGET, .proc/hostile_attackingtarget)
|
||||
|
||||
/datum/component/igniter/UnregisterFromParent()
|
||||
UnregisterSignal(parent, list(COMSIG_ITEM_AFTERATTACK, COMSIG_HOSTILE_ATTACKINGTARGET, COMSIG_PROJECTILE_ON_HIT))
|
||||
|
||||
/datum/component/igniter/proc/item_afterattack(obj/item/source, atom/target, mob/user, proximity_flag, click_parameters)
|
||||
if(!proximity_flag)
|
||||
return
|
||||
do_igniter(target)
|
||||
|
||||
/datum/component/igniter/proc/hostile_attackingtarget(mob/living/simple_animal/hostile/attacker, atom/target)
|
||||
do_igniter(target)
|
||||
|
||||
/datum/component/igniter/proc/projectile_hit(atom/fired_from, atom/movable/firer, atom/target, Angle)
|
||||
do_igniter(target)
|
||||
|
||||
/datum/component/igniter/proc/do_igniter(atom/target)
|
||||
if(isliving(target))
|
||||
var/mob/living/L = target
|
||||
L.adjust_fire_stacks(fire_stacks)
|
||||
L.IgniteMob()
|
||||
@@ -6,21 +6,28 @@
|
||||
|
||||
/datum/component/infective/Initialize(list/datum/disease/_diseases, expire_in)
|
||||
if(islist(_diseases))
|
||||
diseases = diseases
|
||||
diseases = _diseases
|
||||
else
|
||||
diseases = list(_diseases)
|
||||
if(expire_in)
|
||||
expire_time = world.time + expire_in
|
||||
QDEL_IN(src, expire_in)
|
||||
|
||||
if(!ismovableatom(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
RegisterSignal(parent, COMSIG_COMPONENT_CLEAN_ACT, .proc/clean)
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_BUCKLE, .proc/try_infect_buckle)
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_BUMP, .proc/try_infect_collide)
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_CROSSED, .proc/try_infect_crossed)
|
||||
RegisterSignal(parent, COMSIG_ITEM_ATTACK_ZONE, .proc/try_infect_attack_zone)
|
||||
RegisterSignal(parent, COMSIG_ITEM_ATTACK, .proc/try_infect_attack)
|
||||
RegisterSignal(parent, COMSIG_ITEM_EQUIPPED, .proc/try_infect_equipped)
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_IMPACT_ZONE, .proc/try_infect_impact_zone)
|
||||
RegisterSignal(parent, COMSIG_FOOD_EATEN, .proc/try_infect_eat)
|
||||
RegisterSignal(parent, COMSIG_COMPONENT_CLEAN_ACT, .proc/clean)
|
||||
if(isitem(parent))
|
||||
RegisterSignal(parent, COMSIG_ITEM_ATTACK_ZONE, .proc/try_infect_attack_zone)
|
||||
RegisterSignal(parent, COMSIG_ITEM_ATTACK, .proc/try_infect_attack)
|
||||
RegisterSignal(parent, COMSIG_ITEM_EQUIPPED, .proc/try_infect_equipped)
|
||||
if(istype(parent, /obj/item/reagent_containers/food/snacks))
|
||||
RegisterSignal(parent, COMSIG_FOOD_EATEN, .proc/try_infect_eat)
|
||||
else if(istype(parent, /obj/effect/decal/cleanable/blood/gibs))
|
||||
RegisterSignal(parent, COMSIG_GIBS_STREAK, .proc/try_infect_streak)
|
||||
|
||||
/datum/component/infective/proc/try_infect_eat(datum/source, mob/living/eater, mob/living/feeder)
|
||||
for(var/V in diseases)
|
||||
@@ -73,6 +80,9 @@
|
||||
if(isliving(M))
|
||||
try_infect(M, BODY_ZONE_PRECISE_L_FOOT)
|
||||
|
||||
/datum/component/infective/proc/try_infect_streak(datum/source, list/directions, list/output_diseases)
|
||||
output_diseases |= diseases
|
||||
|
||||
/datum/component/infective/proc/try_infect(mob/living/L, target_zone)
|
||||
for(var/V in diseases)
|
||||
L.ContactContractDisease(V, target_zone)
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
var/knockdown_chance = (target_buckled? mounted_knockdown_chance_per_tile : unmounted_knockdown_chance_per_tile) * current
|
||||
var/knockdown_time = (target_buckled? mounted_knockdown_time : unmounted_knockdown_time)
|
||||
var/damage = (target_buckled? mounted_damage_boost_per_tile : unmounted_damage_boost_per_tile) * current
|
||||
var/sharp = I.is_sharp()
|
||||
var/sharp = I.get_sharpness()
|
||||
var/msg
|
||||
if(damage)
|
||||
msg += "[user] [sharp? "impales" : "slams into"] [target] [sharp? "on" : "with"] their [parent]"
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
/datum/component/knockback
|
||||
var/throw_distance
|
||||
var/throw_anchored
|
||||
|
||||
/datum/component/knockback/Initialize(throw_distance=1)
|
||||
if(!isitem(parent) && !ishostile(parent) && !isgun(parent) && !ismachinery(parent) && !isstructure(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
src.throw_distance = throw_distance
|
||||
src.throw_anchored = throw_anchored
|
||||
|
||||
/datum/component/knockback/RegisterWithParent()
|
||||
if(ismachinery(parent) || isstructure(parent) || isgun(parent)) // turrets, etc
|
||||
RegisterSignal(parent, COMSIG_PROJECTILE_ON_HIT, .proc/projectile_hit)
|
||||
else if(isitem(parent))
|
||||
RegisterSignal(parent, COMSIG_ITEM_AFTERATTACK, .proc/item_afterattack)
|
||||
else if(ishostile(parent))
|
||||
RegisterSignal(parent, COMSIG_HOSTILE_ATTACKINGTARGET, .proc/hostile_attackingtarget)
|
||||
|
||||
/datum/component/knockback/UnregisterFromParent()
|
||||
UnregisterSignal(parent, list(COMSIG_ITEM_AFTERATTACK, COMSIG_HOSTILE_ATTACKINGTARGET, COMSIG_PROJECTILE_ON_HIT))
|
||||
|
||||
/datum/component/knockback/proc/item_afterattack(obj/item/source, atom/target, mob/user, proximity_flag, click_parameters)
|
||||
if(!proximity_flag)
|
||||
return
|
||||
do_knockback(target, user, get_dir(source, target))
|
||||
|
||||
/datum/component/knockback/proc/hostile_attackingtarget(mob/living/simple_animal/hostile/attacker, atom/target)
|
||||
do_knockback(target, attacker, get_dir(attacker, target))
|
||||
|
||||
/datum/component/knockback/proc/projectile_hit(atom/fired_from, atom/movable/firer, atom/target, Angle)
|
||||
do_knockback(target, null, angle2dir(Angle))
|
||||
|
||||
/datum/component/knockback/proc/do_knockback(atom/target, mob/thrower, throw_dir)
|
||||
if(!ismovableatom(target) || throw_dir == null)
|
||||
return
|
||||
var/atom/movable/throwee = target
|
||||
if(throwee.anchored && !throw_anchored)
|
||||
return
|
||||
if(throw_distance < 0)
|
||||
throw_dir = turn(throw_dir, 180)
|
||||
throw_distance *= -1
|
||||
var/atom/throw_target = get_edge_target_turf(throwee, throw_dir)
|
||||
throwee.safe_throw_at(throw_target, throw_distance, 1, thrower)
|
||||
@@ -0,0 +1,39 @@
|
||||
|
||||
/datum/component/lifesteal
|
||||
var/flat_heal // heals a constant amount every time a hit occurs
|
||||
var/static/list/damage_heal_order = list(BRUTE, BURN, OXY)
|
||||
|
||||
/datum/component/lifesteal/Initialize(flat_heal=0)
|
||||
if(!isitem(parent) && !ishostile(parent) && !isgun(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
src.flat_heal = flat_heal
|
||||
|
||||
/datum/component/lifesteal/RegisterWithParent()
|
||||
if(isgun(parent))
|
||||
RegisterSignal(parent, COMSIG_PROJECTILE_ON_HIT, .proc/projectile_hit)
|
||||
else if(isitem(parent))
|
||||
RegisterSignal(parent, COMSIG_ITEM_AFTERATTACK, .proc/item_afterattack)
|
||||
else if(ishostile(parent))
|
||||
RegisterSignal(parent, COMSIG_HOSTILE_ATTACKINGTARGET, .proc/hostile_attackingtarget)
|
||||
|
||||
/datum/component/lifesteal/UnregisterFromParent()
|
||||
UnregisterSignal(parent, list(COMSIG_ITEM_AFTERATTACK, COMSIG_HOSTILE_ATTACKINGTARGET, COMSIG_PROJECTILE_ON_HIT))
|
||||
|
||||
/datum/component/lifesteal/proc/item_afterattack(obj/item/source, atom/target, mob/user, proximity_flag, click_parameters)
|
||||
if(!proximity_flag)
|
||||
return
|
||||
do_lifesteal(user, target)
|
||||
|
||||
/datum/component/lifesteal/proc/hostile_attackingtarget(mob/living/simple_animal/hostile/attacker, atom/target)
|
||||
do_lifesteal(attacker, target)
|
||||
|
||||
/datum/component/lifesteal/proc/projectile_hit(atom/fired_from, atom/movable/firer, atom/target, Angle)
|
||||
do_lifesteal(firer, target)
|
||||
|
||||
/datum/component/lifesteal/proc/do_lifesteal(atom/heal_target, atom/damage_target)
|
||||
if(isliving(heal_target) && isliving(damage_target))
|
||||
var/mob/living/healing = heal_target
|
||||
var/mob/living/damaging = damage_target
|
||||
if(damaging.stat != DEAD)
|
||||
healing.heal_ordered_damage(flat_heal, damage_heal_order)
|
||||
@@ -237,6 +237,3 @@
|
||||
LOCKON_RANGING_BREAK_CHECK
|
||||
cd++
|
||||
CHECK_TICK
|
||||
|
||||
/datum/component/lockon_aiming/PostTransfer(datum/new_parent)
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/datum/component/mirage_border
|
||||
can_transfer = TRUE
|
||||
var/obj/effect/abstract/mirage_holder/holder
|
||||
|
||||
/datum/component/mirage_border/Initialize(turf/target, direction, range=world.view)
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
var/mood_modifier = 1 //Modifier to allow certain mobs to be less affected by moodlets
|
||||
var/datum/mood_event/list/mood_events = list()
|
||||
var/insanity_effect = 0 //is the owner being punished for low mood? If so, how much?
|
||||
var/holdmyinsanityeffect = 0 //before we edit our sanity lets take a look
|
||||
var/obj/screen/mood/screen_obj
|
||||
|
||||
/datum/component/mood/Initialize()
|
||||
@@ -21,8 +20,7 @@
|
||||
|
||||
RegisterSignal(parent, COMSIG_ADD_MOOD_EVENT, .proc/add_event)
|
||||
RegisterSignal(parent, COMSIG_CLEAR_MOOD_EVENT, .proc/clear_event)
|
||||
RegisterSignal(parent, COMSIG_INCREASE_SANITY, .proc/IncreaseSanity)
|
||||
RegisterSignal(parent, COMSIG_DECREASE_SANITY, .proc/DecreaseSanity)
|
||||
RegisterSignal(parent, COMSIG_MODIFY_SANITY, .proc/modify_sanity)
|
||||
|
||||
RegisterSignal(parent, COMSIG_MOB_HUD_CREATED, .proc/modify_hud)
|
||||
var/mob/living/owner = parent
|
||||
@@ -131,29 +129,23 @@
|
||||
|
||||
switch(mood_level)
|
||||
if(1)
|
||||
DecreaseSanity(src, 0.2)
|
||||
setSanity(sanity-0.2)
|
||||
if(2)
|
||||
DecreaseSanity(src, 0.125, SANITY_CRAZY)
|
||||
setSanity(sanity-0.125, minimum=SANITY_CRAZY)
|
||||
if(3)
|
||||
DecreaseSanity(src, 0.075, SANITY_UNSTABLE)
|
||||
setSanity(sanity-0.075, minimum=SANITY_UNSTABLE)
|
||||
if(4)
|
||||
DecreaseSanity(src, 0.025, SANITY_DISTURBED)
|
||||
setSanity(sanity-0.025, minimum=SANITY_DISTURBED)
|
||||
if(5)
|
||||
IncreaseSanity(src, 0.1)
|
||||
setSanity(sanity+0.1)
|
||||
if(6)
|
||||
IncreaseSanity(src, 0.15)
|
||||
setSanity(sanity+0.15)
|
||||
if(7)
|
||||
IncreaseSanity(src, 0.20)
|
||||
setSanity(sanity+0.20)
|
||||
if(8)
|
||||
IncreaseSanity(src, 0.25, SANITY_GREAT)
|
||||
setSanity(sanity+0.25, maximum=SANITY_GREAT)
|
||||
if(9)
|
||||
IncreaseSanity(src, 0.4, SANITY_GREAT)
|
||||
|
||||
if(insanity_effect != holdmyinsanityeffect)
|
||||
if(insanity_effect > holdmyinsanityeffect)
|
||||
owner.crit_threshold += (insanity_effect - holdmyinsanityeffect)
|
||||
else
|
||||
owner.crit_threshold -= (holdmyinsanityeffect - insanity_effect)
|
||||
setSanity(sanity+0.4, maximum=SANITY_GREAT)
|
||||
|
||||
if(HAS_TRAIT(owner, TRAIT_DEPRESSION))
|
||||
if(prob(0.05))
|
||||
@@ -164,8 +156,6 @@
|
||||
add_event(null, "jolly", /datum/mood_event/jolly)
|
||||
clear_event(null, "depression")
|
||||
|
||||
holdmyinsanityeffect = insanity_effect
|
||||
|
||||
HandleNutrition(owner)
|
||||
|
||||
/datum/component/mood/proc/setSanity(amount, minimum=SANITY_INSANE, maximum=SANITY_NEUTRAL)//I'm sure bunging this in here will have no negative repercussions.
|
||||
@@ -187,7 +177,7 @@
|
||||
sanity = amount
|
||||
|
||||
switch(sanity)
|
||||
if(SANITY_INSANE to SANITY_CRAZY)
|
||||
if(-INFINITY to SANITY_CRAZY)
|
||||
setInsanityEffect(MAJOR_INSANITY_PEN)
|
||||
master.add_movespeed_modifier(MOVESPEED_ID_SANITY, TRUE, 100, override=TRUE, multiplicative_slowdown=1.5) //Did we change something ? movetypes is runtiming, movetypes=(~FLYING))
|
||||
sanity_level = 6
|
||||
@@ -216,35 +206,12 @@
|
||||
/datum/component/mood/proc/setInsanityEffect(newval)//More code so that the previous proc works
|
||||
if(newval == insanity_effect)
|
||||
return
|
||||
var/mob/living/master = parent
|
||||
master.crit_threshold = (master.crit_threshold - insanity_effect) + newval
|
||||
//var/mob/living/master = parent
|
||||
//master.crit_threshold = (master.crit_threshold - insanity_effect) + newval
|
||||
insanity_effect = newval
|
||||
|
||||
/datum/component/mood/proc/DecreaseSanity(datum/source, amount, minimum = SANITY_INSANE)
|
||||
if(sanity < minimum) //This might make KevinZ stop fucking pinging me.
|
||||
IncreaseSanity(src, 0.5)
|
||||
else
|
||||
sanity = max(minimum, sanity - amount)
|
||||
if(sanity < SANITY_UNSTABLE)
|
||||
if(sanity < SANITY_CRAZY)
|
||||
insanity_effect = (MAJOR_INSANITY_PEN)
|
||||
else
|
||||
insanity_effect = (MINOR_INSANITY_PEN)
|
||||
|
||||
/datum/component/mood/proc/IncreaseSanity(datum/source, amount, maximum = SANITY_NEUTRAL)
|
||||
// Disturbed stops you from getting any more sane - I'm just gonna bung this in here
|
||||
var/mob/living/owner = parent
|
||||
if(HAS_TRAIT(owner, TRAIT_UNSTABLE))
|
||||
return
|
||||
if(sanity > maximum)
|
||||
DecreaseSanity(src, 0.5) //Removes some sanity to go back to our current limit.
|
||||
else
|
||||
sanity = min(maximum, sanity + amount)
|
||||
if(sanity > SANITY_CRAZY)
|
||||
if(sanity > SANITY_UNSTABLE)
|
||||
insanity_effect = 0
|
||||
else
|
||||
insanity_effect = MINOR_INSANITY_PEN
|
||||
/datum/component/mood/proc/modify_sanity(datum/source, amount, minimum = -INFINITY, maximum = INFINITY)
|
||||
setSanity(sanity + amount, minimum, maximum)
|
||||
|
||||
/datum/component/mood/proc/add_event(datum/source, category, type, param) //Category will override any events in the same category, should be unique unless the event is based on the same thing like hunger.
|
||||
var/datum/mood_event/the_event
|
||||
@@ -264,8 +231,6 @@
|
||||
if(the_event.timeout)
|
||||
addtimer(CALLBACK(src, .proc/clear_event, null, category), the_event.timeout, TIMER_UNIQUE|TIMER_OVERRIDE)
|
||||
|
||||
return the_event
|
||||
|
||||
/datum/component/mood/proc/clear_event(datum/source, category)
|
||||
var/datum/mood_event/event = mood_events[category]
|
||||
if(!event)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
return
|
||||
|
||||
/datum/proc/ntnet_send(datum/netdata/data, netid)
|
||||
GET_COMPONENT(NIC, /datum/component/ntnet_interface)
|
||||
var/datum/component/ntnet_interface/NIC = GetComponent(/datum/component/ntnet_interface)
|
||||
if(!NIC)
|
||||
return FALSE
|
||||
return NIC.__network_send(data, netid)
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
/datum/component/orbiter
|
||||
can_transfer = TRUE
|
||||
dupe_mode = COMPONENT_DUPE_UNIQUE_PASSARGS
|
||||
var/list/orbiters
|
||||
var/datum/callback/orbiter_spy
|
||||
var/datum/callback/orbited_spy
|
||||
|
||||
//radius: range to orbit at, radius of the circle formed by orbiting (in pixels)
|
||||
//clockwise: whether you orbit clockwise or anti clockwise
|
||||
@@ -14,8 +13,6 @@
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
orbiters = list()
|
||||
orbiter_spy = CALLBACK(src, .proc/orbiter_move_react)
|
||||
orbited_spy = CALLBACK(src, .proc/move_react)
|
||||
|
||||
var/atom/master = parent
|
||||
master.orbiters = src
|
||||
@@ -25,7 +22,7 @@
|
||||
/datum/component/orbiter/RegisterWithParent()
|
||||
var/atom/target = parent
|
||||
while(ismovableatom(target))
|
||||
RegisterSignal(target, COMSIG_MOVABLE_MOVED, orbited_spy)
|
||||
RegisterSignal(target, COMSIG_MOVABLE_MOVED, .proc/move_react)
|
||||
target = target.loc
|
||||
|
||||
/datum/component/orbiter/UnregisterFromParent()
|
||||
@@ -40,8 +37,6 @@
|
||||
for(var/i in orbiters)
|
||||
end_orbit(i)
|
||||
orbiters = null
|
||||
QDEL_NULL(orbiter_spy)
|
||||
QDEL_NULL(orbited_spy)
|
||||
return ..()
|
||||
|
||||
/datum/component/orbiter/InheritComponent(datum/component/orbiter/newcomp, original, list/arguments)
|
||||
@@ -64,7 +59,7 @@
|
||||
orbiter.orbiting.end_orbit(orbiter)
|
||||
orbiters[orbiter] = TRUE
|
||||
orbiter.orbiting = src
|
||||
RegisterSignal(orbiter, COMSIG_MOVABLE_MOVED, orbiter_spy)
|
||||
RegisterSignal(orbiter, COMSIG_MOVABLE_MOVED, .proc/orbiter_move_react)
|
||||
var/matrix/initial_transform = matrix(orbiter.transform)
|
||||
|
||||
// Head first!
|
||||
@@ -120,7 +115,7 @@
|
||||
if(orbited?.loc && orbited.loc != newturf) // We want to know when anything holding us moves too
|
||||
var/atom/target = orbited.loc
|
||||
while(ismovableatom(target))
|
||||
RegisterSignal(target, COMSIG_MOVABLE_MOVED, orbited_spy, TRUE)
|
||||
RegisterSignal(target, COMSIG_MOVABLE_MOVED, .proc/move_react, TRUE)
|
||||
target = target.loc
|
||||
|
||||
var/atom/curloc = master.loc
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
//This component applies a customizable drop_shadow filter to its wearer when they toggle combat mode on or off. This can stack.
|
||||
|
||||
/datum/component/wearertargeting/phantomthief
|
||||
dupe_mode = COMPONENT_DUPE_UNIQUE_PASSARGS
|
||||
signals = list(COMSIG_COMBAT_TOGGLED)
|
||||
proctype = .proc/handlefilterstuff
|
||||
var/filter_x
|
||||
var/filter_y
|
||||
var/filter_size
|
||||
var/filter_color
|
||||
|
||||
/datum/component/wearertargeting/phantomthief/Initialize(_x = -2, _y = 0, _size = 0, _color = "#E62111", list/_valid_slots = list(SLOT_GLASSES))
|
||||
. = ..()
|
||||
if(. == COMPONENT_INCOMPATIBLE)
|
||||
return
|
||||
filter_x = _x
|
||||
filter_y = _y
|
||||
filter_size = _size
|
||||
filter_color = _color
|
||||
valid_slots = _valid_slots
|
||||
|
||||
/datum/component/wearertargeting/phantomthief/proc/handlefilterstuff(datum/source, mob/user, combatmodestate)
|
||||
if(!combatmodestate)
|
||||
user.remove_filter("phantomthief")
|
||||
else
|
||||
user.add_filter("phantomthief", 4, list(type = "drop_shadow", x = filter_x, y = filter_y, size = filter_size, color = filter_color))
|
||||
|
||||
/datum/component/wearertargeting/phantomthief/on_drop(datum/source, mob/user)
|
||||
. = ..()
|
||||
user.remove_filter("phantomthief")
|
||||
@@ -18,6 +18,7 @@
|
||||
var/ride_check_rider_incapacitated = FALSE
|
||||
var/ride_check_rider_restrained = FALSE
|
||||
var/ride_check_ridden_incapacitated = FALSE
|
||||
var/list/offhands = list() // keyed list containing all the current riding offsets associated by mob
|
||||
|
||||
/datum/component/riding/Initialize()
|
||||
if(!ismovableatom(parent))
|
||||
@@ -299,36 +300,34 @@
|
||||
M.throw_at(target, 14, 5, AM)
|
||||
M.Knockdown(60)
|
||||
|
||||
/datum/component/riding/proc/equip_buckle_inhands(mob/living/carbon/human/user, amount_required = 1, riding_target_override = null)
|
||||
var/atom/movable/AM = parent
|
||||
var/amount_equipped = 0
|
||||
/datum/component/riding/proc/equip_buckle_inhands(mob/living/carbon/human/user, amount_required = 1, mob/living/riding_target_override)
|
||||
var/list/equipped
|
||||
var/mob/living/L = riding_target_override ? riding_target_override : user
|
||||
for(var/amount_needed = amount_required, amount_needed > 0, amount_needed--)
|
||||
var/obj/item/riding_offhand/inhand = new /obj/item/riding_offhand(user)
|
||||
if(!riding_target_override)
|
||||
inhand.rider = user
|
||||
else
|
||||
inhand.rider = riding_target_override
|
||||
inhand.parent = AM
|
||||
if(user.put_in_hands(inhand, TRUE))
|
||||
amount_equipped++
|
||||
else
|
||||
var/obj/item/riding_offhand/inhand = new
|
||||
inhand.rider = L
|
||||
inhand.parent = parent
|
||||
if(!user.put_in_hands(inhand, TRUE))
|
||||
qdel(inhand) // it isn't going to be added to offhands anyway
|
||||
break
|
||||
LAZYADD(equipped, src)
|
||||
var/amount_equipped = LAZYLEN(equipped)
|
||||
if(amount_equipped)
|
||||
LAZYADD(offhands[L], amount_equipped)
|
||||
if(amount_equipped >= amount_required)
|
||||
return TRUE
|
||||
else
|
||||
unequip_buckle_inhands(user)
|
||||
return FALSE
|
||||
unequip_buckle_inhands(L)
|
||||
return FALSE
|
||||
|
||||
/datum/component/riding/proc/unequip_buckle_inhands(mob/living/carbon/user)
|
||||
var/atom/movable/AM = parent
|
||||
for(var/obj/item/riding_offhand/O in user.contents)
|
||||
if(O.parent != AM)
|
||||
CRASH("RIDING OFFHAND ON WRONG MOB")
|
||||
continue
|
||||
if(O.selfdeleting)
|
||||
continue
|
||||
else
|
||||
qdel(O)
|
||||
for(var/a in offhands[user])
|
||||
LAZYREMOVE(offhands[user], a)
|
||||
if(a) //edge cases null entries
|
||||
var/obj/item/riding_offhand/O = a
|
||||
if(O.parent != parent)
|
||||
CRASH("RIDING OFFHAND ON WRONG MOB")
|
||||
else if(!O.selfdeleting)
|
||||
qdel(O)
|
||||
return TRUE
|
||||
|
||||
/obj/item/riding_offhand
|
||||
|
||||
@@ -44,19 +44,21 @@
|
||||
if(src.rotation_flags & ROTATION_CLOCKWISE)
|
||||
default_rotation_direction = ROTATION_CLOCKWISE
|
||||
|
||||
if(src.rotation_flags & ROTATION_ALTCLICK)
|
||||
/datum/component/simple_rotation/proc/add_signals()
|
||||
if(rotation_flags & ROTATION_ALTCLICK)
|
||||
RegisterSignal(parent, COMSIG_CLICK_ALT, .proc/HandRot)
|
||||
RegisterSignal(parent, COMSIG_PARENT_EXAMINE, .proc/ExamineMessage)
|
||||
if(src.rotation_flags & ROTATION_WRENCH)
|
||||
if(rotation_flags & ROTATION_WRENCH)
|
||||
RegisterSignal(parent, COMSIG_PARENT_ATTACKBY, .proc/WrenchRot)
|
||||
|
||||
if(src.rotation_flags & ROTATION_VERBS)
|
||||
/datum/component/simple_rotation/proc/add_verbs()
|
||||
if(rotation_flags & ROTATION_VERBS)
|
||||
var/atom/movable/AM = parent
|
||||
if(src.rotation_flags & ROTATION_FLIP)
|
||||
if(rotation_flags & ROTATION_FLIP)
|
||||
AM.verbs += /atom/movable/proc/simple_rotate_flip
|
||||
if(src.rotation_flags & ROTATION_CLOCKWISE)
|
||||
if(rotation_flags & ROTATION_CLOCKWISE)
|
||||
AM.verbs += /atom/movable/proc/simple_rotate_clockwise
|
||||
if(src.rotation_flags & ROTATION_COUNTERCLOCKWISE)
|
||||
if(rotation_flags & ROTATION_COUNTERCLOCKWISE)
|
||||
AM.verbs += /atom/movable/proc/simple_rotate_counterclockwise
|
||||
|
||||
/datum/component/simple_rotation/proc/remove_verbs()
|
||||
@@ -66,11 +68,30 @@
|
||||
AM.verbs -= /atom/movable/proc/simple_rotate_clockwise
|
||||
AM.verbs -= /atom/movable/proc/simple_rotate_counterclockwise
|
||||
|
||||
/datum/component/simple_rotation/Destroy()
|
||||
/datum/component/simple_rotation/proc/remove_signals()
|
||||
UnregisterSignal(parent, list(COMSIG_CLICK_ALT, COMSIG_PARENT_EXAMINE, COMSIG_PARENT_ATTACKBY))
|
||||
|
||||
/datum/component/simple_rotation/RegisterWithParent()
|
||||
add_verbs()
|
||||
add_signals()
|
||||
. = ..()
|
||||
|
||||
/datum/component/simple_rotation/PostTransfer()
|
||||
//Because of the callbacks which we don't track cleanly we can't transfer this
|
||||
//item cleanly, better to let the new of the new item create a new rotation datum
|
||||
//instead (there's no real state worth transferring)
|
||||
return COMPONENT_NOTRANSFER
|
||||
|
||||
/datum/component/simple_rotation/UnregisterFromParent()
|
||||
remove_verbs()
|
||||
remove_signals()
|
||||
. = ..()
|
||||
|
||||
/datum/component/simple_rotation/Destroy()
|
||||
QDEL_NULL(can_user_rotate)
|
||||
QDEL_NULL(can_be_rotated)
|
||||
QDEL_NULL(after_rotation)
|
||||
//Signals + verbs removed via UnRegister
|
||||
. = ..()
|
||||
|
||||
/datum/component/simple_rotation/RemoveComponent()
|
||||
@@ -122,22 +143,22 @@
|
||||
set name = "Rotate Clockwise"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
GET_COMPONENT(rotcomp,/datum/component/simple_rotation)
|
||||
var/datum/component/simple_rotation/rotcomp = GetComponent(/datum/component/simple_rotation)
|
||||
if(rotcomp)
|
||||
rotcomp.HandRot(usr,ROTATION_CLOCKWISE)
|
||||
rotcomp.HandRot(null,usr,ROTATION_CLOCKWISE)
|
||||
|
||||
/atom/movable/proc/simple_rotate_counterclockwise()
|
||||
set name = "Rotate Counter-Clockwise"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
GET_COMPONENT(rotcomp,/datum/component/simple_rotation)
|
||||
var/datum/component/simple_rotation/rotcomp = GetComponent(/datum/component/simple_rotation)
|
||||
if(rotcomp)
|
||||
rotcomp.HandRot(usr,ROTATION_COUNTERCLOCKWISE)
|
||||
rotcomp.HandRot(null,usr,ROTATION_COUNTERCLOCKWISE)
|
||||
|
||||
/atom/movable/proc/simple_rotate_flip()
|
||||
set name = "Flip"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
GET_COMPONENT(rotcomp,/datum/component/simple_rotation)
|
||||
var/datum/component/simple_rotation/rotcomp = GetComponent(/datum/component/simple_rotation)
|
||||
if(rotcomp)
|
||||
rotcomp.HandRot(usr,ROTATION_FLIP)
|
||||
rotcomp.HandRot(null,usr,ROTATION_FLIP)
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
|
||||
/datum/component/shrapnel
|
||||
var/projectile_type
|
||||
var/radius // shoots a projectile for every turf on this radius from the hit target
|
||||
var/override_projectile_range
|
||||
|
||||
/datum/component/shrapnel/Initialize(projectile_type, radius=1, override_projectile_range)
|
||||
if(!isgun(parent) && !ismachinery(parent) && !isstructure(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
src.projectile_type = projectile_type
|
||||
src.radius = radius
|
||||
src.override_projectile_range = override_projectile_range
|
||||
|
||||
/datum/component/shrapnel/RegisterWithParent()
|
||||
if(ismachinery(parent) || isstructure(parent) || isgun(parent)) // turrets, etc
|
||||
RegisterSignal(parent, COMSIG_PROJECTILE_ON_HIT, .proc/projectile_hit)
|
||||
|
||||
/datum/component/shrapnel/UnregisterFromParent()
|
||||
UnregisterSignal(parent, list(COMSIG_PROJECTILE_ON_HIT))
|
||||
|
||||
/datum/component/shrapnel/proc/projectile_hit(atom/fired_from, atom/movable/firer, atom/target, Angle)
|
||||
do_shrapnel(firer, target)
|
||||
|
||||
/datum/component/shrapnel/proc/do_shrapnel(mob/firer, atom/target)
|
||||
if(radius < 1)
|
||||
return
|
||||
var/turf/target_turf = get_turf(target)
|
||||
for(var/turf/shootat_turf in RANGE_TURFS(radius, target) - RANGE_TURFS(radius-1, target))
|
||||
var/obj/item/projectile/P = new projectile_type(target_turf)
|
||||
|
||||
//Shooting Code:
|
||||
P.range = radius+1
|
||||
if(override_projectile_range)
|
||||
P.range = override_projectile_range
|
||||
P.preparePixelProjectile(shootat_turf, target)
|
||||
P.firer = firer // don't hit ourself that would be really annoying
|
||||
P.permutated += target // don't hit the target we hit already with the flak
|
||||
P.fire()
|
||||
@@ -1,33 +0,0 @@
|
||||
// This should only be used by non components trying to listen to a signal
|
||||
// If you use this inside a component I will replace your eyes with lemons ~ninjanomnom
|
||||
|
||||
/datum/component/redirect
|
||||
dupe_mode = COMPONENT_DUPE_ALLOWED
|
||||
var/list/signals
|
||||
var/datum/callback/turfchangeCB
|
||||
|
||||
/datum/component/redirect/Initialize(list/_signals, flags=NONE)
|
||||
//It's not our job to verify the right signals are registered here, just do it.
|
||||
if(!LAZYLEN(_signals))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
if(flags & REDIRECT_TRANSFER_WITH_TURF && isturf(parent))
|
||||
// If they also want to listen to the turf change then we need to set it up so both callbacks run
|
||||
if(_signals[COMSIG_TURF_CHANGE])
|
||||
turfchangeCB = _signals[COMSIG_TURF_CHANGE]
|
||||
if(!istype(turfchangeCB))
|
||||
. = COMPONENT_INCOMPATIBLE
|
||||
CRASH("Redirect components must be given instanced callbacks, not proc paths.")
|
||||
_signals[COMSIG_TURF_CHANGE] = CALLBACK(src, .proc/turf_change)
|
||||
|
||||
signals = _signals
|
||||
|
||||
/datum/component/redirect/RegisterWithParent()
|
||||
for(var/signal in signals)
|
||||
RegisterSignal(parent, signal, signals[signal])
|
||||
|
||||
/datum/component/redirect/UnregisterFromParent()
|
||||
UnregisterSignal(parent, signals)
|
||||
|
||||
/datum/component/redirect/proc/turf_change(datum/source, path, new_baseturfs, flags, list/transfers)
|
||||
transfers += src
|
||||
return turfchangeCB?.InvokeAsync(arglist(args))
|
||||
@@ -4,6 +4,7 @@
|
||||
// /mob/living/Move() in /modules/mob/living/living.dm - hiding storage boxes on mob movement
|
||||
|
||||
/datum/component/storage/concrete
|
||||
can_transfer = TRUE
|
||||
var/drop_all_on_deconstruct = TRUE
|
||||
var/drop_all_on_destroy = FALSE
|
||||
var/drop_all_on_break = FALSE
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
/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/firing_pin
|
||||
/obj/item/firing_pin, /obj/item/gun/ballistic/automatic/pistol
|
||||
))
|
||||
|
||||
/datum/component/storage/concrete/pockets/shoes/clown/Initialize()
|
||||
@@ -67,7 +67,7 @@
|
||||
/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/firing_pin, /obj/item/bikehorn))
|
||||
/obj/item/firing_pin, /obj/item/bikehorn, /obj/item/gun/ballistic/automatic/pistol))
|
||||
|
||||
/datum/component/storage/concrete/pockets/pocketprotector
|
||||
max_items = 3
|
||||
|
||||
@@ -57,6 +57,10 @@
|
||||
var/screen_start_x = 4 //These two are where the storage starts being rendered, screen_loc wise.
|
||||
var/screen_start_y = 2
|
||||
//End
|
||||
|
||||
var/limited_random_access = FALSE //Quick if statement in accessible_items to determine if we care at all about what people can access at once.
|
||||
var/limited_random_access_stack_position = 0 //If >0, can only access top <x> items
|
||||
var/limited_random_access_stack_bottom_up = FALSE //If TRUE, above becomes bottom <x> items
|
||||
|
||||
/datum/component/storage/Initialize(datum/component/storage/concrete/master)
|
||||
if(!isatom(parent))
|
||||
@@ -96,6 +100,7 @@
|
||||
RegisterSignal(parent, COMSIG_ITEM_PICKUP, .proc/signal_on_pickup)
|
||||
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_POST_THROW, .proc/close_all)
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_MOVED, .proc/check_views)
|
||||
|
||||
RegisterSignal(parent, COMSIG_CLICK_ALT, .proc/on_alt_click)
|
||||
RegisterSignal(parent, COMSIG_MOUSEDROP_ONTO, .proc/mousedrop_onto)
|
||||
@@ -145,6 +150,19 @@
|
||||
var/datum/component/storage/concrete/master = master()
|
||||
return master? master.real_location() : null
|
||||
|
||||
//What players can access
|
||||
//this proc can probably eat a refactor at some point.
|
||||
/datum/component/storage/proc/accessible_items(random_access = TRUE)
|
||||
var/list/contents = contents()
|
||||
if(contents)
|
||||
if(limited_random_access && random_access)
|
||||
if(limited_random_access_stack_position && (length(contents) > limited_random_access_stack_position))
|
||||
if(limited_random_access_stack_bottom_up)
|
||||
contents.Cut(1, limited_random_access_stack_position + 1)
|
||||
else
|
||||
contents.Cut(1, length(contents) - limited_random_access_stack_position + 1)
|
||||
return contents
|
||||
|
||||
/datum/component/storage/proc/canreach_react(datum/source, list/next)
|
||||
var/datum/component/storage/concrete/master = master()
|
||||
if(!master)
|
||||
@@ -283,8 +301,7 @@
|
||||
|
||||
/datum/component/storage/proc/_process_numerical_display()
|
||||
. = list()
|
||||
var/atom/real_location = real_location()
|
||||
for(var/obj/item/I in real_location.contents)
|
||||
for(var/obj/item/I in accessible_items())
|
||||
if(QDELETED(I))
|
||||
continue
|
||||
if(!.[I.type])
|
||||
@@ -295,8 +312,8 @@
|
||||
|
||||
//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(mob/user, maxcolumns)
|
||||
var/atom/real_location = real_location()
|
||||
var/adjusted_contents = real_location.contents.len
|
||||
var/list/accessible_contents = accessible_items()
|
||||
var/adjusted_contents = length(accessible_contents)
|
||||
|
||||
//Numbered contents display
|
||||
var/list/datum/numbered_display/numbered_contents
|
||||
@@ -328,8 +345,7 @@
|
||||
if(cy - screen_start_y >= rows)
|
||||
break
|
||||
else
|
||||
var/atom/real_location = real_location()
|
||||
for(var/obj/O in real_location)
|
||||
for(var/obj/O in accessible_items())
|
||||
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"
|
||||
@@ -350,9 +366,8 @@
|
||||
return FALSE
|
||||
var/list/cview = getviewsize(M.client.view)
|
||||
var/maxallowedscreensize = cview[1]-8
|
||||
var/atom/real_location = real_location()
|
||||
if(M.active_storage != src && (M.stat == CONSCIOUS))
|
||||
for(var/obj/item/I in real_location)
|
||||
for(var/obj/item/I in accessible_items())
|
||||
if(I.on_found(M))
|
||||
return FALSE
|
||||
if(M.active_storage)
|
||||
@@ -360,7 +375,7 @@
|
||||
orient2hud(M, (isliving(M) ? maxallowedscreensize : 7))
|
||||
M.client.screen |= boxes
|
||||
M.client.screen |= closer
|
||||
M.client.screen |= real_location.contents
|
||||
M.client.screen |= accessible_items()
|
||||
M.active_storage = src
|
||||
LAZYOR(is_using, M)
|
||||
return TRUE
|
||||
@@ -386,6 +401,11 @@
|
||||
close(M)
|
||||
. = TRUE //returns TRUE if any mobs actually got a close(M) call
|
||||
|
||||
/datum/component/storage/proc/check_views()
|
||||
for(var/mob/M in can_see_contents())
|
||||
if(!isobserver(M) && !M.CanReach(src, view_only = TRUE))
|
||||
close(M)
|
||||
|
||||
/datum/component/storage/proc/emp_act(datum/source, severity)
|
||||
if(emp_shielded)
|
||||
return
|
||||
@@ -587,7 +607,7 @@
|
||||
return FALSE
|
||||
if(isitem(host))
|
||||
var/obj/item/IP = host
|
||||
GET_COMPONENT_FROM(STR_I, /datum/component/storage, I)
|
||||
var/datum/component/storage/STR_I = I.GetComponent(/datum/component/storage)
|
||||
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>")
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
|
||||
/datum/component/summoning
|
||||
var/list/mob_types = list()
|
||||
var/spawn_chance // chance for the mob to spawn on hit in percent
|
||||
var/max_mobs
|
||||
var/spawn_delay // delay in spawning between mobs (deciseconds)
|
||||
var/spawn_text
|
||||
var/spawn_sound
|
||||
var/list/faction
|
||||
|
||||
var/last_spawned_time = 0
|
||||
var/list/spawned_mobs = list()
|
||||
|
||||
/datum/component/summoning/Initialize(mob_types, spawn_chance=100, max_mobs=3, spawn_delay=100, spawn_text="appears out of nowhere", spawn_sound='sound/magic/summon_magic.ogg', faction)
|
||||
if(!isitem(parent) && !ishostile(parent) && !isgun(parent) && !ismachinery(parent) && !isstructure(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
src.mob_types = mob_types
|
||||
src.spawn_chance = spawn_chance
|
||||
src.max_mobs = max_mobs
|
||||
src.spawn_delay = spawn_delay
|
||||
src.spawn_text = spawn_text
|
||||
src.spawn_sound = spawn_sound
|
||||
src.faction = faction
|
||||
|
||||
/datum/component/summoning/RegisterWithParent()
|
||||
if(ismachinery(parent) || isstructure(parent) || isgun(parent)) // turrets, etc
|
||||
RegisterSignal(parent, COMSIG_PROJECTILE_ON_HIT, .proc/projectile_hit)
|
||||
else if(isitem(parent))
|
||||
RegisterSignal(parent, COMSIG_ITEM_AFTERATTACK, .proc/item_afterattack)
|
||||
else if(ishostile(parent))
|
||||
RegisterSignal(parent, COMSIG_HOSTILE_ATTACKINGTARGET, .proc/hostile_attackingtarget)
|
||||
|
||||
/datum/component/summoning/UnregisterFromParent()
|
||||
UnregisterSignal(parent, list(COMSIG_ITEM_AFTERATTACK, COMSIG_HOSTILE_ATTACKINGTARGET, COMSIG_PROJECTILE_ON_HIT))
|
||||
|
||||
/datum/component/summoning/proc/item_afterattack(obj/item/source, atom/target, mob/user, proximity_flag, click_parameters)
|
||||
if(!proximity_flag)
|
||||
return
|
||||
do_spawn_mob(get_turf(target), user)
|
||||
|
||||
/datum/component/summoning/proc/hostile_attackingtarget(mob/living/simple_animal/hostile/attacker, atom/target)
|
||||
do_spawn_mob(get_turf(target), attacker)
|
||||
|
||||
/datum/component/summoning/proc/projectile_hit(atom/fired_from, atom/movable/firer, atom/target, Angle)
|
||||
do_spawn_mob(get_turf(target), firer)
|
||||
|
||||
/datum/component/summoning/proc/do_spawn_mob(atom/spawn_location, summoner)
|
||||
if(spawned_mobs.len >= max_mobs)
|
||||
return 0
|
||||
if(last_spawned_time > world.time)
|
||||
return 0
|
||||
if(!prob(spawn_chance))
|
||||
return 0
|
||||
last_spawned_time = world.time + spawn_delay
|
||||
var/chosen_mob_type = pick(mob_types)
|
||||
var/mob/living/simple_animal/L = new chosen_mob_type(spawn_location)
|
||||
if(ishostile(L))
|
||||
var/mob/living/simple_animal/hostile/H = L
|
||||
H.friends += summoner // do not attack our summon boy
|
||||
spawned_mobs += L
|
||||
if(faction != null)
|
||||
L.faction = faction
|
||||
RegisterSignal(L, COMSIG_MOB_DEATH, .proc/on_spawned_death) // so we can remove them from the list, etc (for mobs with corpses)
|
||||
playsound(spawn_location,spawn_sound, 50, 1)
|
||||
spawn_location.visible_message("<span class='danger'>[L] [spawn_text].</span>")
|
||||
|
||||
/datum/component/summoning/proc/on_spawned_death(mob/killed, gibbed)
|
||||
spawned_mobs -= killed
|
||||
@@ -12,7 +12,7 @@
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_UNCROSSED, .proc/leave_swarm)
|
||||
|
||||
/datum/component/swarming/proc/join_swarm(datum/source, atom/movable/AM)
|
||||
GET_COMPONENT_FROM(other_swarm, /datum/component/swarming, AM)
|
||||
var/datum/component/swarming/other_swarm = AM.GetComponent(/datum/component/swarming)
|
||||
if(!other_swarm)
|
||||
return
|
||||
swarm()
|
||||
@@ -21,7 +21,7 @@
|
||||
other_swarm.swarm_members |= src
|
||||
|
||||
/datum/component/swarming/proc/leave_swarm(datum/source, atom/movable/AM)
|
||||
GET_COMPONENT_FROM(other_swarm, /datum/component/swarming, AM)
|
||||
var/datum/component/swarming/other_swarm = AM.GetComponent(/datum/component/swarming)
|
||||
if(!other_swarm || !(other_swarm in swarm_members))
|
||||
return
|
||||
swarm_members -= other_swarm
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
|
||||
/datum/component/tactical
|
||||
var/allowed_slot
|
||||
|
||||
/datum/component/tactical/Initialize(allowed_slot)
|
||||
if(!isitem(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
src.allowed_slot = allowed_slot
|
||||
|
||||
/datum/component/tactical/RegisterWithParent()
|
||||
RegisterSignal(parent, COMSIG_ITEM_EQUIPPED, .proc/modify)
|
||||
RegisterSignal(parent, COMSIG_ITEM_DROPPED, .proc/unmodify)
|
||||
|
||||
/datum/component/tactical/UnregisterFromParent()
|
||||
UnregisterSignal(parent, list(COMSIG_ITEM_EQUIPPED, COMSIG_ITEM_DROPPED))
|
||||
unmodify()
|
||||
|
||||
/datum/component/fantasy/Destroy()
|
||||
unmodify()
|
||||
return ..()
|
||||
|
||||
/datum/component/tactical/proc/modify(obj/item/source, mob/user, slot)
|
||||
if(allowed_slot && slot != allowed_slot)
|
||||
unmodify()
|
||||
return
|
||||
|
||||
var/obj/item/master = parent
|
||||
var/image/I = image(icon = master.icon, icon_state = master.icon_state, loc = user)
|
||||
I.copy_overlays(master)
|
||||
I.override = TRUE
|
||||
source.add_alt_appearance(/datum/atom_hud/alternate_appearance/basic/everyone, "sneaking_mission", I)
|
||||
I.layer = ABOVE_MOB_LAYER
|
||||
|
||||
/datum/component/tactical/proc/unmodify(obj/item/source, mob/user)
|
||||
var/obj/item/master = source || parent
|
||||
if(!user)
|
||||
if(!ismob(master.loc))
|
||||
return
|
||||
user = master.loc
|
||||
|
||||
user.remove_alt_appearance("sneaking_mission")
|
||||
@@ -15,7 +15,7 @@
|
||||
/turf/closed/indestructible,
|
||||
/turf/open/indestructible)
|
||||
)
|
||||
|
||||
|
||||
var/static/list/resistlist = typecacheof(
|
||||
/turf/closed/wall/r_wall
|
||||
)
|
||||
@@ -77,5 +77,5 @@
|
||||
thermite_melt()
|
||||
|
||||
/datum/component/thermite/proc/attackby_react(datum/source, obj/item/thing, mob/user, params)
|
||||
if(thing.is_hot())
|
||||
if(thing.get_temperature())
|
||||
thermite_melt(user)
|
||||
@@ -1,5 +1,5 @@
|
||||
/datum/component/virtual_reality
|
||||
dupe_mode = COMPONENT_DUPE_ALLOWED //mindswap memes, shouldn't stack up otherwise.
|
||||
can_transfer = TRUE
|
||||
var/datum/mind/mastermind // where is my mind t. pixies
|
||||
var/datum/mind/current_mind
|
||||
var/obj/machinery/vr_sleeper/vr_sleeper
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/datum/component/wearertargeting
|
||||
var/list/valid_slots = list()
|
||||
var/list/signals = list()
|
||||
var/datum/callback/callback = CALLBACK(GLOBAL_PROC, .proc/pass)
|
||||
var/proctype = .proc/pass
|
||||
var/mobtype = /mob/living
|
||||
|
||||
/datum/component/wearertargeting/Initialize()
|
||||
@@ -14,13 +14,9 @@
|
||||
|
||||
/datum/component/wearertargeting/proc/on_equip(datum/source, mob/equipper, slot)
|
||||
if((slot in valid_slots) && istype(equipper, mobtype))
|
||||
RegisterSignal(equipper, signals, callback, TRUE)
|
||||
RegisterSignal(equipper, signals, proctype, TRUE)
|
||||
else
|
||||
UnregisterSignal(equipper, signals)
|
||||
|
||||
/datum/component/wearertargeting/proc/on_drop(datum/source, mob/user)
|
||||
UnregisterSignal(user, signals)
|
||||
|
||||
/datum/component/wearertargeting/Destroy()
|
||||
QDEL_NULL(callback) //is likely to ourselves.
|
||||
return ..()
|
||||
UnregisterSignal(user, signals)
|
||||
@@ -1,5 +1,6 @@
|
||||
/datum/component/wet_floor
|
||||
dupe_mode = COMPONENT_DUPE_UNIQUE_PASSARGS
|
||||
can_transfer = TRUE
|
||||
var/highest_strength = TURF_DRY
|
||||
var/lube_flags = NONE //why do we have this?
|
||||
var/list/time_left_list //In deciseconds.
|
||||
@@ -26,14 +27,19 @@
|
||||
if(!isopenturf(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
add_wet(strength, duration_minimum, duration_add, duration_maximum)
|
||||
RegisterSignal(parent, COMSIG_TURF_IS_WET, .proc/is_wet)
|
||||
RegisterSignal(parent, COMSIG_TURF_MAKE_DRY, .proc/dry)
|
||||
permanent = _permanent
|
||||
if(!permanent)
|
||||
START_PROCESSING(SSwet_floors, src)
|
||||
addtimer(CALLBACK(src, .proc/gc, TRUE), 1) //GC after initialization.
|
||||
last_process = world.time
|
||||
|
||||
/datum/component/wet_floor/RegisterWithParent()
|
||||
RegisterSignal(parent, COMSIG_TURF_IS_WET, .proc/is_wet)
|
||||
RegisterSignal(parent, COMSIG_TURF_MAKE_DRY, .proc/dry)
|
||||
|
||||
/datum/component/wet_floor/UnregisterFromParent()
|
||||
UnregisterSignal(parent, list(COMSIG_TURF_IS_WET, COMSIG_TURF_MAKE_DRY))
|
||||
|
||||
/datum/component/wet_floor/Destroy()
|
||||
STOP_PROCESSING(SSwet_floors, src)
|
||||
var/turf/T = parent
|
||||
@@ -138,12 +144,19 @@
|
||||
/datum/component/wet_floor/PreTransfer()
|
||||
var/turf/O = parent
|
||||
O.cut_overlay(current_overlay)
|
||||
//That turf is no longer slippery, we're out of here
|
||||
//Slippery components don't transfer due to callbacks
|
||||
qdel(O.GetComponent(/datum/component/slippery))
|
||||
|
||||
/datum/component/wet_floor/PostTransfer()
|
||||
if(!isopenturf(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
var/turf/T = parent
|
||||
T.add_overlay(current_overlay)
|
||||
//Make sure to add/update any slippery component on the new turf (update_flags calls LoadComponent)
|
||||
update_flags()
|
||||
|
||||
//NB it's possible we get deleted after this, due to inherit
|
||||
|
||||
/datum/component/wet_floor/proc/add_wet(type, duration_minimum = 0, duration_add = 0, duration_maximum = MAXIMUM_WET_TIME, _permanent = FALSE)
|
||||
var/static/list/allowed_types = list(TURF_WET_WATER, TURF_WET_LUBE, TURF_WET_ICE, TURF_WET_PERMAFROST)
|
||||
|
||||
@@ -34,11 +34,10 @@
|
||||
var/turf/T = get_turf(target)
|
||||
if(target in view(user.client.view, user))
|
||||
var/obj/spot1 = new phaseout(get_turf(user), user.dir)
|
||||
user.forceMove(T)
|
||||
playsound(T, dash_sound, 25, 1)
|
||||
var/obj/spot2 = new phasein(get_turf(user), user.dir)
|
||||
spot1.Beam(spot2,beam_effect,time=20)
|
||||
current_charges--
|
||||
if(do_teleport(user, T, null, TRUE, null, null, dash_sound, dash_sound, TRUE, TELEPORT_CHANNEL_FREE, TRUE))
|
||||
var/obj/spot2 = new phasein(get_turf(user), user.dir)
|
||||
spot1.Beam(spot2,beam_effect,time=20)
|
||||
current_charges--
|
||||
holder.update_action_buttons_icon()
|
||||
addtimer(CALLBACK(src, .proc/charge), charge_rate)
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
if(M.getToxLoss() && prob(5))
|
||||
to_chat(M, "<span class='notice'>Your skin tingles as the starlight seems to heal you.</span>")
|
||||
|
||||
M.adjustToxLoss(-(4 * heal_amt)) //most effective on toxins
|
||||
M.adjustToxLoss(-(4 * heal_amt), forced = TRUE) //most effective on toxins
|
||||
|
||||
var/list/parts = M.get_damaged_bodyparts(1,1)
|
||||
|
||||
@@ -368,7 +368,7 @@
|
||||
level = 8
|
||||
passive_message = "<span class='notice'>You feel an odd attraction to plasma.</span>"
|
||||
var/temp_rate = 1
|
||||
threshold_desc = "<b>Transmission 6:</b> Increases temperature adjustment rate.<br>\
|
||||
threshold_desc = "<b>Transmission 6:</b> Increases temperature adjustment rate and heals toxin lovers.<br>\
|
||||
<b>Stage Speed 7:</b> Increases healing speed."
|
||||
|
||||
/datum/symptom/heal/plasma/Start(datum/disease/advance/A)
|
||||
@@ -410,7 +410,7 @@
|
||||
if(prob(5))
|
||||
to_chat(M, "<span class='notice'>You feel warmer.</span>")
|
||||
|
||||
M.adjustToxLoss(-heal_amt)
|
||||
M.adjustToxLoss(-heal_amt, forced = (temp_rate == 4))
|
||||
|
||||
var/list/parts = M.get_damaged_bodyparts(1,1)
|
||||
if(!parts.len)
|
||||
@@ -435,7 +435,7 @@
|
||||
symptom_delay_max = 1
|
||||
passive_message = "<span class='notice'>Your skin glows faintly for a moment.</span>"
|
||||
var/cellular_damage = FALSE
|
||||
threshold_desc = "<b>Transmission 6:</b> Additionally heals cellular damage.<br>\
|
||||
threshold_desc = "<b>Transmission 6:</b> Additionally heals cellular damage and toxin lovers.<br>\
|
||||
<b>Resistance 7:</b> Increases healing speed."
|
||||
|
||||
/datum/symptom/heal/radiation/Start(datum/disease/advance/A)
|
||||
@@ -468,7 +468,7 @@
|
||||
if(cellular_damage)
|
||||
M.adjustCloneLoss(-heal_amt * 0.5)
|
||||
|
||||
M.adjustToxLoss(-(2 * heal_amt))
|
||||
M.adjustToxLoss(-(2 * heal_amt), forced = cellular_damage)
|
||||
|
||||
var/list/parts = M.get_damaged_bodyparts(1,1)
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user