Merge branch 'master' into Yote

This commit is contained in:
BlackMajor
2019-11-14 17:37:57 +13:00
1448 changed files with 10222 additions and 10132 deletions
+5
View File
@@ -131,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
+32
View File
@@ -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
+18 -22
View File
@@ -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
+1 -2
View File
@@ -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
+12 -4
View File
@@ -70,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)
@@ -117,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)
@@ -126,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
@@ -153,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)
@@ -206,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)
@@ -233,8 +242,7 @@
//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))
+5
View File
@@ -0,0 +1,5 @@
#define AFFIX_PREFIX (1 << 0)
#define AFFIX_SUFFIX (1 << 1)
#define AFFIX_GOOD (1 << 0)
#define AFFIX_EVIL (1 << 1)
+1
View File
@@ -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)
+10 -1
View File
@@ -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))
+5 -5
View File
@@ -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))
@@ -223,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))
@@ -246,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))
+4
View File
@@ -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"
+1 -9
View File
@@ -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)
// )
// )
+18 -15
View File
@@ -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"
@@ -280,9 +281,11 @@ GLOBAL_LIST_INIT(pda_styles, list(MONO, VT, ORBITRON, SHARE))
#define PDA_SKIN_ALT "Holographic"
#define PDA_SKIN_RUGGED "Rugged"
#define PDA_SKIN_MODERN "Modern"
#define PDA_SKIN_MINIMAL "Minimal"
GLOBAL_LIST_INIT(pda_reskins, list(PDA_SKIN_CLASSIC = 'icons/obj/pda.dmi', PDA_SKIN_ALT = 'icons/obj/pda_alt.dmi',
PDA_SKIN_RUGGED = 'icons/obj/pda_rugged.dmi', PDA_SKIN_MODERN = 'icons/obj/pda_modern.dmi'))
PDA_SKIN_RUGGED = 'icons/obj/pda_rugged.dmi', PDA_SKIN_MODERN = 'icons/obj/pda_modern.dmi',
PDA_SKIN_MINIMAL = 'icons/obj/pda_minimal.dmi'))
/////////////////////////////////////
// atom.appearence_flags shortcuts //
@@ -489,7 +492,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)
+34 -2
View File
@@ -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,7 +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_TASED_STATUS "TASED"
#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"
+1 -1
View File
@@ -27,7 +27,7 @@
#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
+6 -6
View File
@@ -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
+3
View File
@@ -74,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 //
/////////////
+1 -1
View File
@@ -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
+6 -7
View File
@@ -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"
@@ -147,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"
+1 -1
View File
@@ -2,7 +2,7 @@
#define TYPEID_NULL "0"
#define TYPEID_NORMAL_LIST "f"
//helper macros
#define GET_TYPEID(ref) ( ( (lentext(ref) <= 10) ? "TYPEID_NULL" : copytext(ref, 4, lentext(ref)-6) ) )
#define GET_TYPEID(ref) ( ( (length(ref) <= 10) ? "TYPEID_NULL" : copytext(ref, 4, length(ref)-6) ) )
#define IS_NORMAL_LIST(L) (GET_TYPEID("\ref[L]") == TYPEID_NORMAL_LIST)
+26 -25
View File
@@ -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)
+8 -2
View File
@@ -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
+4
View File
@@ -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
-1
View File
@@ -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),
+94 -3
View File
@@ -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
+4 -2
View File
@@ -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
+11 -11
View File
@@ -304,9 +304,9 @@
//is in the other string at the same spot (assuming it is not a replace char).
//This is used for fingerprints
var/newtext = text
if(lentext(text) != lentext(compare))
if(length(text) != length(compare))
return 0
for(var/i = 1, i < lentext(text), i++)
for(var/i = 1, i < length(text), i++)
var/a = copytext(text,i,i+1)
var/b = copytext(compare,i,i+1)
//if it isn't both the same letter, or if they are both the replacement character
@@ -326,7 +326,7 @@
if(!text || !character)
return 0
var/count = 0
for(var/i = 1, i <= lentext(text), i++)
for(var/i = 1, i <= length(text), i++)
var/a = copytext(text,i,i+1)
if(a == character)
count++
@@ -607,8 +607,8 @@ GLOBAL_LIST_INIT(binary, list("0","1"))
continue
var/buffer = ""
var/early_culling = TRUE
for(var/pos = 1, pos <= lentext(string), pos++)
var/let = copytext(string, pos, (pos + 1) % lentext(string))
for(var/pos = 1, pos <= length(string), pos++)
var/let = copytext(string, pos, (pos + 1) % length(string))
if(early_culling && !findtext(let,GLOB.is_alphanumeric))
continue
early_culling = FALSE
@@ -616,9 +616,9 @@ GLOBAL_LIST_INIT(binary, list("0","1"))
if(!findtext(buffer,GLOB.is_alphanumeric))
continue
var/punctbuffer = ""
var/cutoff = lentext(buffer)
for(var/pos = lentext(buffer), pos >= 0, pos--)
var/let = copytext(buffer, pos, (pos + 1) % lentext(buffer))
var/cutoff = length(buffer)
for(var/pos = length(buffer), pos >= 0, pos--)
var/let = copytext(buffer, pos, (pos + 1) % length(buffer))
if(findtext(let,GLOB.is_alphanumeric))
break
if(findtext(let,GLOB.is_punctuation))
@@ -628,8 +628,8 @@ GLOBAL_LIST_INIT(binary, list("0","1"))
var/exclaim = FALSE
var/question = FALSE
var/periods = 0
for(var/pos = lentext(punctbuffer), pos >= 0, pos--)
var/punct = copytext(punctbuffer, pos, (pos + 1) % lentext(punctbuffer))
for(var/pos = length(punctbuffer), pos >= 0, pos--)
var/punct = copytext(punctbuffer, pos, (pos + 1) % length(punctbuffer))
if(!exclaim && findtext(punct,"!"))
exclaim = TRUE
if(!question && findtext(punct,"?"))
@@ -651,7 +651,7 @@ GLOBAL_LIST_INIT(binary, list("0","1"))
buffer = copytext(buffer, 1, cutoff) + punctbuffer
if(!findtext(buffer,GLOB.is_alphanumeric))
continue
if(!buffer || lentext(buffer) > 280 || lentext(buffer) <= cullshort || buffer in accepted)
if(!buffer || length(buffer) > 280 || length(buffer) <= cullshort || buffer in accepted)
continue
accepted += buffer
+2 -2
View File
@@ -9,8 +9,8 @@
return t
proc/TextPreview(var/string,var/len=40)
if(lentext(string) <= len)
if(!lentext(string))
if(length(string) <= len)
if(!length(string))
return "\[...\]"
else
return string
+1 -5
View File
@@ -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.
*/
@@ -763,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
+11 -1
View File
@@ -202,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
)
))
+7 -1
View File
@@ -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)
+4 -4
View File
@@ -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
+22 -2
View File
@@ -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
+2 -2
View File
@@ -47,7 +47,7 @@
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)
@@ -66,6 +66,10 @@
/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
@@ -376,6 +380,22 @@
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
+1 -1
View File
@@ -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
+11 -11
View File
@@ -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)
+28 -8
View File
@@ -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)
+2
View File
@@ -54,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
+1 -1
View File
@@ -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
+22
View File
@@ -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)
+8 -1
View File
@@ -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)
+1 -1
View File
@@ -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)
+13 -3
View File
@@ -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")
+8
View File
@@ -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"
+27 -5
View File
@@ -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
+45
View File
@@ -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)
+1 -1
View File
@@ -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))
+140
View File
@@ -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>")
+13
View File
@@ -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]"
+170
View File
@@ -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"
+37
View File
@@ -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()
+1 -1
View File
@@ -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]"
+44
View File
@@ -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)
+39
View File
@@ -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)
+13 -48
View File
@@ -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,31 +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))
@@ -166,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.
@@ -189,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
@@ -222,31 +210,8 @@
//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
+6 -15
View File
@@ -7,33 +7,24 @@
var/filter_x
var/filter_y
var/filter_size
var/filter_border
var/filter_color
/datum/component/wearertargeting/phantomthief/Initialize(_x = -2, _y = 0, _size = 0, _border = 0, _color = "#E62111", list/_valid_slots = list(SLOT_GLASSES))
/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_border = _border
filter_color = _color
valid_slots = _valid_slots
/datum/component/wearertargeting/phantomthief/proc/handlefilterstuff(datum/source, mob/user, combatmodestate)
if(istype(user))
var/thefilter = filter(type = "drop_shadow", x = filter_x, y = filter_y, size = filter_size, border = filter_border, color = filter_color)
if(!combatmodestate)
user.filters -= thefilter
else
user.filters += thefilter
/datum/component/wearertargeting/phantomthief/proc/stripdesiredfilter(mob/user)
if(istype(user))
var/thefilter = filter(type = "drop_shadow", x = filter_x, y = filter_y, size = filter_size, border = filter_border, color = filter_color)
user.filters -= thefilter
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)
. = ..()
stripdesiredfilter(user)
user.remove_filter("phantomthief")
+23 -24
View File
@@ -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
+3 -3
View File
@@ -145,7 +145,7 @@
set src in oview(1)
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"
@@ -153,7 +153,7 @@
set src in oview(1)
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"
@@ -161,4 +161,4 @@
set src in oview(1)
var/datum/component/simple_rotation/rotcomp = GetComponent(/datum/component/simple_rotation)
if(rotcomp)
rotcomp.HandRot(usr,ROTATION_FLIP)
rotcomp.HandRot(null,usr,ROTATION_FLIP)
+39
View File
@@ -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()
+23 -9
View File
@@ -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))
@@ -146,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)
@@ -284,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])
@@ -296,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
@@ -329,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"
@@ -351,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)
@@ -361,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
+69
View File
@@ -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
+42
View File
@@ -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")
+2 -2
View File
@@ -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)
+4 -5
View File
@@ -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)
+1
View File
@@ -79,6 +79,7 @@
tele_play_specials(teleatom, destturf, effectout, asoundout)
if(ismegafauna(teleatom))
message_admins("[teleatom] [ADMIN_FLW(teleatom)] has teleported from [ADMIN_VERBOSEJMP(curturf)] to [ADMIN_VERBOSEJMP(destturf)].")
SEND_SIGNAL(teleatom, COMSIG_MOVABLE_TELEPORTED, channel, curturf, destturf)
if(ismob(teleatom))
var/mob/M = teleatom
+21
View File
@@ -11,6 +11,8 @@
var/config_max_users = 0
var/config_min_users = 0
var/voteweight = 1
var/max_round_search_span = 0 //If this is nonzero, then if the map has been played more than max_rounds_played within the search span (max determined by define in persistence.dm), this map won't be available.
var/max_rounds_played = 0
// Config actually from the JSON - should default to Box
var/map_name = "Box Station"
@@ -23,6 +25,10 @@
var/minetype = "lavaland"
var/maptype = MAP_TYPE_STATION //This should be used to adjust ingame behavior depending on the specific type of map being played. For instance, if an overmap were added, it'd be appropriate for it to only generate with a MAP_TYPE_SHIP
var/announcertype = "standard" //Determines the announcer the map uses. standard uses the default announcer, classic, but has a random chance to use other similarly-themed announcers, like medibot
var/allow_custom_shuttles = TRUE
var/shuttles = list(
"cargo" = "cargo_box",
@@ -30,6 +36,8 @@
"whiteship" = "whiteship_box",
"emergency" = "emergency_box")
var/year_offset = 540 //The offset of ingame year from the actual IRL year. You know you want to make a map that takes place in the 90's. Don't lie.
/proc/load_map_config(filename = "data/next_map.json", default_to_box, delete_after, error_if_missing = TRUE)
var/datum/map_config/config = new
if (default_to_box)
@@ -122,8 +130,21 @@
log_world("map_config space_empty_levels is not a number!")
return
temp = json["year_offset"]
if (isnum(temp))
year_offset = temp
else if (!isnull(temp))
log_world("map_config year_offset is not a number!")
return
if ("minetype" in json)
minetype = json["minetype"]
if ("maptype" in json)
maptype = json["maptype"]
if ("announcertype" in json)
announcertype = json["announcertype"]
allow_custom_shuttles = json["allow_custom_shuttles"] != FALSE
+93 -158
View File
@@ -41,8 +41,6 @@
var/special_role
var/list/restricted_roles = list()
var/list/datum/objective/objectives = list()
var/list/spell_list = list() // Wizard mode & "Give Spell" badmin button.
var/linglink
@@ -360,13 +358,15 @@
output += memory
var/list/all_objectives = list()
for(var/datum/antagonist/A in antag_datums)
output += A.antag_memory
all_objectives |= A.objectives
if(objectives.len)
if(all_objectives.len)
output += "<B>Objectives:</B>"
var/obj_count = 1
for(var/datum/objective/objective in objectives)
for(var/datum/objective/objective in all_objectives)
output += "<br><B>Objective #[obj_count++]</B>: [objective.explanation_text]"
var/list/datum/mind/other_owners = objective.get_owners() - src
if(other_owners.len)
@@ -377,7 +377,7 @@
if(window)
recipient << browse(output,"window=memory")
else if(objectives.len || memory)
else if(all_objectives.len || memory)
to_chat(recipient, "<i>[output]</i>")
/datum/mind/Topic(href, href_list)
@@ -408,34 +408,24 @@
memory = new_memo
else if (href_list["obj_edit"] || href_list["obj_add"])
var/datum/objective/objective
var/objective_pos
var/objective_pos //Edited objectives need to keep same order in antag objective list
var/def_value
var/datum/antagonist/target_antag
var/datum/objective/old_objective //The old objective we're replacing/editing
var/datum/objective/new_objective //New objective we're be adding
if (href_list["obj_edit"])
objective = locate(href_list["obj_edit"])
if (!objective)
if(href_list["obj_edit"])
for(var/datum/antagonist/A in antag_datums)
old_objective = locate(href_list["obj_edit"]) in A.objectives
if(old_objective)
target_antag = A
objective_pos = A.objectives.Find(old_objective)
break
if(!old_objective)
to_chat(usr,"Invalid objective.")
return
for(var/datum/antagonist/A in antag_datums)
if(objective in A.objectives)
target_antag = A
objective_pos = A.objectives.Find(objective)
break
if(!target_antag) //Shouldn't happen anymore
stack_trace("objective without antagonist found")
objective_pos = objectives.Find(objective)
//Text strings are easy to manipulate. Revised for simplicity.
var/temp_obj_type = "[objective.type]"//Convert path into a text string.
def_value = copytext(temp_obj_type, 19)//Convert last part of path into an objective keyword.
if(!def_value)//If it's a custom objective, it will be an empty string.
def_value = "custom"
else
//We're adding this objective
if(href_list["target_antag"])
var/datum/antagonist/X = locate(href_list["target_antag"]) in antag_datums
if(X)
@@ -447,7 +437,7 @@
if(1)
target_antag = antag_datums[1]
else
var/datum/antagonist/target = input("Which antagonist gets the objective:", "Antagonist", def_value) as null|anything in antag_datums + "(new custom antag)"
var/datum/antagonist/target = input("Which antagonist gets the objective:", "Antagonist", "(new custom antag)") as null|anything in antag_datums + "(new custom antag)"
if (QDELETED(target))
return
else if(target == "(new custom antag)")
@@ -455,149 +445,88 @@
else
target_antag = target
var/new_obj_type = input("Select objective type:", "Objective type", def_value) as null|anything in list("assassinate", "maroon", "debrain", "protect", "destroy", "prevent", "hijack", "escape", "survive", "martyr", "steal", "download", "nuclear", "capture", "absorb", "custom")
if (!new_obj_type)
var/static/list/choices
if(!choices)
choices = list()
var/list/allowed_types = list(
/datum/objective/assassinate,
/datum/objective/maroon,
/datum/objective/debrain,
/datum/objective/protect,
/datum/objective/destroy,
/datum/objective/hijack,
/datum/objective/escape,
/datum/objective/survive,
/datum/objective/martyr,
/datum/objective/steal,
/datum/objective/download,
/datum/objective/nuclear,
/datum/objective/capture,
/datum/objective/absorb,
/datum/objective/custom
)
for(var/T in allowed_types)
var/datum/objective/X = T
choices[initial(X.name)] = T
if(old_objective)
if(old_objective.name in choices)
def_value = old_objective.name
var/selected_type = input("Select objective type:", "Objective type", def_value) as null|anything in choices
selected_type = choices[selected_type]
if (!selected_type)
return
var/datum/objective/new_objective = null
if(!old_objective)
//Add new one
new_objective = new selected_type
new_objective.owner = src
new_objective.admin_edit(usr)
target_antag.objectives += new_objective
switch (new_obj_type)
if ("assassinate","protect","debrain","maroon")
var/list/possible_targets = list("Free objective")
for(var/datum/mind/possible_target in SSticker.minds)
if ((possible_target != src) && ishuman(possible_target.current))
possible_targets += possible_target.current
var/mob/def_target = null
var/list/objective_list = typecacheof(list(/datum/objective/assassinate, /datum/objective/protect, /datum/objective/debrain, /datum/objective/maroon))
if (is_type_in_typecache(objective, objective_list) && objective.target)
def_target = objective.target.current
var/mob/new_target = input("Select target:", "Objective target", def_target) as null|anything in possible_targets
if (!new_target)
return
var/objective_path = text2path("/datum/objective/[new_obj_type]")
if (new_target == "Free objective")
new_objective = new objective_path
new_objective.owner = src
new_objective.target = null
new_objective.explanation_text = "Free objective"
else
new_objective = new objective_path
new_objective.owner = src
new_objective.target = new_target.mind
//Will display as special role if the target is set as MODE. Ninjas/commandos/nuke ops.
new_objective.update_explanation_text()
if ("destroy")
var/list/possible_targets = active_ais(1)
if(possible_targets.len)
var/mob/new_target = input("Select target:", "Objective target") as null|anything in possible_targets
new_objective = new /datum/objective/destroy
new_objective.target = new_target.mind
new_objective.owner = src
new_objective.update_explanation_text()
else
to_chat(usr, "No active AIs with minds")
if ("prevent")
new_objective = new /datum/objective/block
new_objective.owner = src
if ("hijack")
new_objective = new /datum/objective/hijack
new_objective.owner = src
if ("escape")
new_objective = new /datum/objective/escape
new_objective.owner = src
if ("survive")
new_objective = new /datum/objective/survive
new_objective.owner = src
if("martyr")
new_objective = new /datum/objective/martyr
new_objective.owner = src
if ("nuclear")
new_objective = new /datum/objective/nuclear
new_objective.owner = src
if ("steal")
if (!istype(objective, /datum/objective/steal))
new_objective = new /datum/objective/steal
new_objective.owner = src
else
new_objective = objective
var/datum/objective/steal/steal = new_objective
if (!steal.select_target())
return
if("download","capture","absorb")
var/def_num
if(objective&&objective.type==text2path("/datum/objective/[new_obj_type]"))
def_num = objective.target_amount
var/target_number = input("Input target number:", "Objective", def_num) as num | null
if (isnull(target_number))//Ordinarily, you wouldn't need isnull. In this case, the value may already exist.
return
switch(new_obj_type)
if("download")
new_objective = new /datum/objective/download
new_objective.explanation_text = "Download [target_number] research node\s."
if("capture")
new_objective = new /datum/objective/capture
new_objective.explanation_text = "Capture [target_number] lifeforms with an energy net. Live, rare specimens are worth more."
if("absorb")
new_objective = new /datum/objective/absorb
new_objective.explanation_text = "Absorb [target_number] compatible genomes."
new_objective.owner = src
new_objective.target_amount = target_number
if ("custom")
var/expl = stripped_input(usr, "Custom objective:", "Objective", objective ? objective.explanation_text : "")
if (!expl)
return
new_objective = new /datum/objective
new_objective.owner = src
new_objective.explanation_text = expl
if (!new_objective)
return
if (objective)
if(target_antag)
target_antag.objectives -= objective
objectives -= objective
target_antag.objectives.Insert(objective_pos, new_objective)
message_admins("[key_name_admin(usr)] edited [current]'s objective to [new_objective.explanation_text]")
log_admin("[key_name(usr)] edited [current]'s objective to [new_objective.explanation_text]")
else
if(target_antag)
target_antag.objectives += new_objective
objectives += new_objective
message_admins("[key_name_admin(usr)] added a new objective for [current]: [new_objective.explanation_text]")
log_admin("[key_name(usr)] added a new objective for [current]: [new_objective.explanation_text]")
else
if(old_objective.type == selected_type)
//Edit the old
old_objective.admin_edit(usr)
new_objective = old_objective
else
//Replace the old
new_objective = new selected_type
new_objective.owner = src
new_objective.admin_edit(usr)
target_antag.objectives -= old_objective
target_antag.objectives.Insert(objective_pos, new_objective)
message_admins("[key_name_admin(usr)] edited [current]'s objective to [new_objective.explanation_text]")
log_admin("[key_name(usr)] edited [current]'s objective to [new_objective.explanation_text]")
else if (href_list["obj_delete"])
var/datum/objective/objective = locate(href_list["obj_delete"])
if(!istype(objective))
return
var/datum/objective/objective
for(var/datum/antagonist/A in antag_datums)
if(objective in A.objectives)
A.objectives -= objective
objective = locate(href_list["obj_delete"]) in A.objectives
if(istype(objective))
break
objectives -= objective
if(!objective)
to_chat(usr,"Invalid objective.")
return
//qdel(objective) Needs cleaning objective destroys
message_admins("[key_name_admin(usr)] removed an objective for [current]: [objective.explanation_text]")
log_admin("[key_name(usr)] removed an objective for [current]: [objective.explanation_text]")
else if(href_list["obj_completed"])
var/datum/objective/objective = locate(href_list["obj_completed"])
if(!istype(objective))
var/datum/objective/objective
for(var/datum/antagonist/A in antag_datums)
objective = locate(href_list["obj_completed"]) in A.objectives
if(istype(objective))
objective = objective
break
if(!objective)
to_chat(usr,"Invalid objective.")
return
objective.completed = !objective.completed
log_admin("[key_name(usr)] toggled the win state for [current]'s objective: [objective.explanation_text]")
@@ -652,10 +581,16 @@
usr = current
traitor_panel()
/datum/mind/proc/get_all_objectives()
var/list/all_objectives = list()
for(var/datum/antagonist/A in antag_datums)
all_objectives |= A.objectives
return all_objectives
/datum/mind/proc/announce_objectives()
var/obj_count = 1
to_chat(current, "<span class='notice'>Your current objectives:</span>")
for(var/objective in objectives)
for(var/objective in get_all_objectives())
var/datum/objective/O = objective
to_chat(current, "<B>Objective #[obj_count]</B>: [O.explanation_text]")
obj_count++
+2 -2
View File
@@ -30,7 +30,7 @@ GLOBAL_LIST_EMPTY(mutations_list)
. = on_losing(owner)
/datum/mutation/human/proc/set_se(se_string, on = 1)
if(!se_string || lentext(se_string) < DNA_STRUC_ENZYMES_BLOCKS * DNA_BLOCK_SIZE)
if(!se_string || length(se_string) < DNA_STRUC_ENZYMES_BLOCKS * DNA_BLOCK_SIZE)
return
var/before = copytext(se_string, 1, ((dna_block - 1) * DNA_BLOCK_SIZE) + 1)
var/injection = num2hex(on ? rand(lowest_value, (256 * 16) - 1) : rand(0, lowest_value - 1), DNA_BLOCK_SIZE)
@@ -42,7 +42,7 @@ GLOBAL_LIST_EMPTY(mutations_list)
owner.dna.struc_enzymes = set_se(owner.dna.struc_enzymes, on)
/datum/mutation/human/proc/check_block_string(se_string)
if(!se_string || lentext(se_string) < DNA_STRUC_ENZYMES_BLOCKS * DNA_BLOCK_SIZE)
if(!se_string || length(se_string) < DNA_STRUC_ENZYMES_BLOCKS * DNA_BLOCK_SIZE)
return 0
if(hex2num(getblock(se_string, dna_block)) >= lowest_value)
return 1
+3 -1
View File
@@ -66,6 +66,8 @@
place = cmaster_turf
for(var/i in 1 to distance)
place = get_step(place, dir)
if(!place)
break
atoms += get_rad_contents(place)
return atoms
@@ -108,7 +110,7 @@
if(!can_contaminate || blacklisted[thing.type])
continue
if(prob(contamination_chance)) // Only stronk rads get to have little baby rads
if(SEND_SIGNAL(thing, COMSIG_ATOM_RAD_CONTAMINATING, strength) & COMPONENT_BLOCK_CONTAMINATION)
if(CHECK_BITFIELD(thing.rad_flags, RAD_NO_CONTAMINATE) || SEND_SIGNAL(thing, COMSIG_ATOM_RAD_CONTAMINATING, strength) & COMPONENT_BLOCK_CONTAMINATION)
continue
var/rad_strength = (strength-RAD_MINIMUM_CONTAMINATION) * RAD_CONTAMINATION_STR_COEFFICIENT
thing.AddComponent(/datum/component/radioactive, rad_strength, source)
+2 -2
View File
@@ -155,7 +155,7 @@
/datum/status_effect/belligerent/proc/do_movement_toggle(force_damage)
var/number_legs = owner.get_num_legs(FALSE)
if(iscarbon(owner) && !is_servant_of_ratvar(owner) && !owner.anti_magic_check() && number_legs)
if(iscarbon(owner) && !is_servant_of_ratvar(owner) && !owner.anti_magic_check(chargecost = 0) && number_legs)
if(force_damage || owner.m_intent != MOVE_INTENT_WALK)
if(GLOB.ratvar_awakens)
owner.Knockdown(20)
@@ -248,7 +248,7 @@
if(owner.confused)
owner.confused = 0
severity = 0
else if(!owner.anti_magic_check() && owner.stat != DEAD && severity)
else if(!owner.anti_magic_check(chargecost = 0) && owner.stat != DEAD && severity)
var/static/hum = get_sfx('sound/effects/screech.ogg') //same sound for every proc call
if(owner.getToxLoss() > MANIA_DAMAGE_TO_CONVERT)
if(is_eligible_servant(owner))
+44
View File
@@ -94,6 +94,50 @@
lose_text = "<span class='notice'>You don't feel as prudish as before.</span>"
medical_record_text = "Patient exhibits a special gene that makes them immune to Crocin and Hexacrocin."
/datum/quirk/libido
name = "Nymphomania"
desc = "You're always feeling a bit in heat. Also, you get aroused faster than usual."
value = 0
mob_trait = TRAIT_NYMPHO
gain_text = "<span class='notice'>You are feeling extra wild.</span>"
lose_text = "<span class='notice'>You don't feel that burning sensation anymore.</span>"
/datum/quirk/libido/add()
quirk_holder.min_arousal = 16
quirk_holder.arousal_rate = 3
/datum/quirk/libido/remove()
if(quirk_holder)
quirk_holder.min_arousal = initial(quirk_holder.min_arousal)
quirk_holder.arousal_rate = initial(quirk_holder.arousal_rate)
/datum/quirk/maso
name = "Masochism"
desc = "You are aroused by pain."
value = 0
mob_trait = TRAIT_MASO
gain_text = "<span class='notice'>You desire to be hurt.</span>"
lose_text = "<span class='notice'>Pain has become less exciting for you.</span>"
/datum/quirk/exhibitionism
name = "Exhibitionism"
desc = "You don't mind showing off your bare body to strangers, in fact you find it quite satistying."
value = 0
medical_record_text = "Patient has been diagnosed with exhibitionistic disorder."
mob_trait = TRAIT_EXHIBITIONIST
gain_text = "<span class='notice'>You feel like exposing yourself to the world.</span>"
lose_text = "<span class='notice'>Indecent exposure doesn't sound as charming to you anymore.</span>"
/datum/quirk/pharmacokinesis //Prevents unwanted organ additions.
name = "Acute hepatic pharmacokinesis"
desc = "You've a rare genetic disorder that causes Incubus draft and Sucubus milk to be absorbed by your liver instead."
value = 0
mob_trait = TRAIT_PHARMA
lose_text = "<span class='notice'>Your liver feels different.</span>"
var/active = FALSE
var/power = 0
var/cachedmoveCalc = 1
/datum/quirk/assblastusa
name = "Buns of Steel"
desc = "You've never skipped ass day. With this trait, you are completely immune to all forms of ass slapping and anyone who tries to slap your rock hard ass usually gets a broken hand."
+1 -1
View File
@@ -829,7 +829,7 @@ Proc for attack log creation, because really why not
return filters[filter_data.Find(name)]
/atom/movable/proc/remove_filter(name)
if(filter_data[name])
if(filter_data && filter_data[name])
filter_data -= name
update_filters()
return TRUE
+7 -5
View File
@@ -27,7 +27,6 @@
glide_size = 8
appearance_flags = TILE_BOUND|PIXEL_SCALE
var/datum/forced_movement/force_moving = null //handled soley by forced_movement.dm
var/floating = FALSE
var/movement_type = GROUND //Incase you have multiple types, you automatically use the most useful one. IE: Skating on ice, flippers on water, flying over chasm/space, etc.
var/atom/movable/pulling
var/grab_state = 0
@@ -422,6 +421,9 @@
var/atom/movable/AM = item
AM.onTransitZ(old_z,new_z)
/atom/movable/proc/setMovetype(newval)
movement_type = newval
//Called whenever an object moves and by mobs when they attempt to move themselves through space
//And when an object or action applies a force on src, see newtonian_move() below
//Return 0 to have src start/keep drifting in a no-grav area and 1 to stop/not start drifting
@@ -686,14 +688,14 @@
/atom/movable/proc/float(on)
if(throwing)
return
if(on && !floating)
if(on && !(movement_type & FLOATING))
animate(src, pixel_y = pixel_y + 2, time = 10, loop = -1)
sleep(10)
animate(src, pixel_y = pixel_y - 2, time = 10, loop = -1)
floating = TRUE
else if (!on && floating)
setMovetype(movement_type | FLOATING)
else if (!on && (movement_type & FLOATING))
animate(src, pixel_y = initial(pixel_y), time = 10)
floating = FALSE
setMovetype(movement_type & ~FLOATING)
/* Language procs */
/atom/movable/proc/get_language_holder(shadow=TRUE)
@@ -167,6 +167,7 @@ Credit where due:
number_players -= 30
starter_servants += round(number_players / 10)
starter_servants = min(starter_servants, 8) //max 8 servants (that sould only happen with a ton of players)
GLOB.clockwork_vitality += 50 * starter_servants //some starter Vitality to help recover from initial fuck ups
while(starter_servants)
var/datum/mind/servant = antag_pick(antag_candidates)
servants_to_serve += servant
@@ -267,6 +267,7 @@
operation_req_access = list(ACCESS_SYNDICATE)
wreckage = /obj/structure/mecha_wreckage/honker/dark
max_equip = 3
spawn_tracked = FALSE
/obj/mecha/combat/honker/dark/GrantActions(mob/living/user, human_occupant = 0)
..()
@@ -34,11 +34,12 @@
//If you override this method, have it return the number of objectives added.
if(devil_target_list.len && devil_target_list[devil]) // Is a double agent
var/datum/mind/target_mind = devil_target_list[devil]
var/datum/antagonist/devil/D = target_mind.has_antag_datum(/datum/antagonist/devil)
var/datum/objective/devil/outsell/outsellobjective = new
outsellobjective.owner = devil
outsellobjective.target = target_mind
outsellobjective.update_explanation_text()
devil.objectives += outsellobjective
D.objectives += outsellobjective
return 1
return 0
+2 -1
View File
@@ -4,11 +4,12 @@
/datum/game_mode/proc/add_devil_objectives(datum/mind/devil_mind, quantity)
var/list/validtypes = list(/datum/objective/devil/soulquantity, /datum/objective/devil/soulquality, /datum/objective/devil/sintouch, /datum/objective/devil/buy_target)
var/datum/antagonist/devil/D = devil_mind.has_antag_datum(/datum/antagonist/devil)
for(var/i = 1 to quantity)
var/type = pick(validtypes)
var/datum/objective/devil/objective = new type(null)
objective.owner = devil_mind
devil_mind.objectives += objective
D.objectives += objective
if(!istype(objective, /datum/objective/devil/buy_target))
validtypes -= type //prevent duplicate objectives, EXCEPT for buy_target.
else
+5 -1
View File
@@ -111,6 +111,10 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
..()
pop_per_requirement = CONFIG_GET(number/dynamic_pop_per_requirement)
GLOB.dynamic_high_pop_limit = CONFIG_GET(number/dynamic_high_pop_limit)
GLOB.dynamic_latejoin_delay_min = CONFIG_GET(number/dynamic_latejoin_delay_min)*600
GLOB.dynamic_latejoin_delay_max = CONFIG_GET(number/dynamic_latejoin_delay_max)*600
GLOB.dynamic_midround_delay_min = CONFIG_GET(number/dynamic_midround_delay_min)*600
GLOB.dynamic_midround_delay_max = CONFIG_GET(number/dynamic_midround_delay_max)*600
/datum/game_mode/dynamic/admin_panel()
var/list/dat = list("<html><head><title>Game Mode Panel</title></head><body><h1><B>Game Mode Panel</B></h1>")
@@ -221,7 +225,7 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
. += G.get_report()
print_command_report(., "Central Command Status Summary", announce=FALSE)
priority_announce("A summary has been copied and printed to all communications consoles.", "Security level elevated.", 'sound/ai/intercept.ogg')
priority_announce("A summary has been copied and printed to all communications consoles.", "Security level elevated.", "intercept")
if(GLOB.security_level < SEC_LEVEL_BLUE)
set_security_level(SEC_LEVEL_BLUE)
@@ -263,7 +263,7 @@
M.mind.special_role = antag_flag
M.mind.add_antag_datum(AI)
if(prob(ion_announce))
priority_announce("Ion storm detected near the station. Please check all AI-controlled equipment for errors.", "Anomaly Alert", 'sound/ai/ionstorm.ogg')
priority_announce("Ion storm detected near the station. Please check all AI-controlled equipment for errors.", "Anomaly Alert", "ionstorm")
if(prob(removeDontImproveChance))
M.replace_random_law(generate_ion_law(), list(LAW_INHERENT, LAW_SUPPLIED, LAW_ION))
else
@@ -126,7 +126,7 @@
/datum/dynamic_ruleset/roundstart/changeling/execute()
var/team_mode = FALSE
if(prob(team_mode_probability))
if(prob(team_mode_probability))
team_mode = TRUE
var/list/team_objectives = subtypesof(/datum/objective/changeling_team_objective)
var/list/possible_team_objectives = list()
@@ -174,14 +174,14 @@
/datum/dynamic_ruleset/roundstart/wizard/pre_execute()
if(GLOB.wizardstart.len == 0)
return FALSE
var/mob/M = pick(candidates)
if (M)
candidates -= M
assigned += M.mind
M.mind.assigned_role = ROLE_WIZARD
M.mind.special_role = ROLE_WIZARD
return TRUE
/datum/dynamic_ruleset/roundstart/wizard/execute()
@@ -189,7 +189,7 @@
M.current.forceMove(pick(GLOB.wizardstart))
M.add_antag_datum(new antag_datum())
return TRUE
//////////////////////////////////////////////
// //
// BLOOD CULT //
@@ -238,7 +238,7 @@
var/datum/antagonist/cult/new_cultist = new antag_datum()
new_cultist.cult_team = main_cult
new_cultist.give_equipment = TRUE
M.add_antag_datum(new_cultist)
M.add_antag_datum(new_cultist)
main_cult.setup_objectives()
return TRUE
@@ -390,7 +390,7 @@
SSshuttle.registerHostileEnvironment(src)
return TRUE
/datum/dynamic_ruleset/roundstart/delayed/revs/rule_process()
if(check_rev_victory())
finished = 1
@@ -492,6 +492,7 @@
number_players -= 30
starter_servants += round(number_players / 10)
starter_servants = min(starter_servants, 8)
GLOB.clockwork_vitality += 50 * starter_servants //some starter Vitality to help recover from initial fuck ups
for (var/i in 1 to starter_servants)
var/mob/servant = pick(candidates)
candidates -= servant
@@ -605,7 +606,7 @@
high_population_requirement = 101
var/devil_limit = 4 // Hard limit on devils if scaling is turned off
/datum/dynamic_ruleset/roundstart/devil/pre_execute()
/datum/dynamic_ruleset/roundstart/devil/pre_execute()
var/tsc = CONFIG_GET(number/traitor_scaling_coeff)
var/num_devils = 1
+3 -3
View File
@@ -1,5 +1,5 @@
/proc/power_failure()
priority_announce("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Critical Power Failure", 'sound/ai/poweroff.ogg')
priority_announce("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Critical Power Failure", "poweroff")
for(var/obj/machinery/power/smes/S in GLOB.machines)
if(istype(get_area(S), /area/ai_monitored/turret_protected) || !is_station_level(S.z))
continue
@@ -48,7 +48,7 @@
/proc/power_restore()
priority_announce("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal", 'sound/ai/poweron.ogg')
priority_announce("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal", "poweron")
for(var/obj/machinery/power/apc/C in GLOB.machines)
if(C.cell && is_station_level(C.z))
C.cell.charge = C.cell.maxcharge
@@ -70,7 +70,7 @@
/proc/power_restore_quick()
priority_announce("All SMESs on [station_name()] have been recharged. We apologize for the inconvenience.", "Power Systems Nominal", 'sound/ai/poweron.ogg')
priority_announce("All SMESs on [station_name()] have been recharged. We apologize for the inconvenience.", "Power Systems Nominal", "poweron")
for(var/obj/machinery/power/smes/S in GLOB.machines)
if(!is_station_level(S.z))
continue
+1 -1
View File
@@ -29,4 +29,4 @@
/datum/game_mode/extended/announced/send_intercept(report = 0)
if(flipseclevel) //CIT CHANGE - allows the sec level to be flipped roundstart
return ..()
priority_announce("Thanks to the tireless efforts of our security and intelligence divisions, there are currently no credible threats to [station_name()]. All station construction projects have been authorized. Have a secure shift!", "Security Report", 'sound/ai/commandreport.ogg')
priority_announce("Thanks to the tireless efforts of our security and intelligence divisions, there are currently no credible threats to [station_name()]. All station construction projects have been authorized. Have a secure shift!", "Security Report", "commandreport")
+2 -2
View File
@@ -258,7 +258,7 @@
/datum/game_mode/proc/send_intercept()
if(flipseclevel && !(config_tag == "extended"))//CIT CHANGE - lets the security level be flipped roundstart
priority_announce("Thanks to the tireless efforts of our security and intelligence divisions, there are currently no credible threats to [station_name()]. All station construction projects have been authorized. Have a secure shift!", "Security Report", 'sound/ai/commandreport.ogg')
priority_announce("Thanks to the tireless efforts of our security and intelligence divisions, there are currently no credible threats to [station_name()]. All station construction projects have been authorized. Have a secure shift!", "Security Report", "commandreport")
return
var/intercepttext = "<b><i>Central Command Status Summary</i></b><hr>"
intercepttext += "<b>Central Command has intercepted and partially decoded a Syndicate transmission with vital information regarding their movements. The following report outlines the most \
@@ -288,7 +288,7 @@
intercepttext += G.get_report()
print_command_report(intercepttext, "Central Command Status Summary", announce=FALSE)
priority_announce("A summary has been copied and printed to all communications consoles.", "Enemy communication intercepted. Security level elevated.", 'sound/ai/intercept.ogg')
priority_announce("A summary has been copied and printed to all communications consoles.", "Enemy communication intercepted. Security level elevated.", "intercept")
if(GLOB.security_level < SEC_LEVEL_BLUE)
set_security_level(SEC_LEVEL_BLUE)
+133 -13
View File
@@ -4,7 +4,8 @@ GLOBAL_LIST_EMPTY(objectives)
/datum/objective
var/datum/mind/owner //The primary owner of the objective. !!SOMEWHAT DEPRECATED!! Prefer using 'team' for new code.
var/datum/team/team //An alternative to 'owner': a team. Use this when writing new code.
var/datum/team/team //An alternative to 'owner': a team. Use this when writing new code.
var/name = "generic objective" //Name for admin prompts
var/explanation_text = "Nothing" //What that person is supposed to do.
var/team_explanation_text //For when there are multiple owners.
var/datum/mind/target = null //If they are focused on a particular person.
@@ -22,6 +23,32 @@ GLOBAL_LIST_EMPTY(objectives)
if(owner)
. += owner
/datum/objective/proc/admin_edit(mob/admin)
return
//Shared by few objective types
/datum/objective/proc/admin_simple_target_pick(mob/admin)
var/list/possible_targets = list("Free objective")
var/def_value
for(var/datum/mind/possible_target in SSticker.minds)
if ((possible_target != src) && ishuman(possible_target.current))
possible_targets += possible_target.current
if(target && target.current)
def_value = target.current
var/mob/new_target = input(admin,"Select target:", "Objective target", def_value) as null|anything in possible_targets
if (!new_target)
return
if (new_target == "Free objective")
target = null
else
target = new_target.mind
update_explanation_text()
/datum/objective/proc/considered_escaped(datum/mind/M)
if(!considered_alive(M))
return FALSE
@@ -42,7 +69,7 @@ GLOBAL_LIST_EMPTY(objectives)
/datum/objective/proc/is_unique_objective(possible_target)
var/list/datum/mind/owners = get_owners()
for(var/datum/mind/M in owners)
for(var/datum/objective/O in M.objectives)
for(var/datum/objective/O in M.get_all_objectives()) //This scope is debatable, probably should be passed in by caller.
if(istype(O, type) && O.get_target() == possible_target)
return FALSE
return TRUE
@@ -122,6 +149,7 @@ GLOBAL_LIST_EMPTY(objectives)
H.equip_in_one_of_slots(O, slots)
/datum/objective/assassinate
name = "assasinate"
var/target_role_type=0
martyr_compatible = 1
@@ -141,6 +169,9 @@ GLOBAL_LIST_EMPTY(objectives)
else
explanation_text = "Free Objective"
/datum/objective/assassinate/admin_edit(mob/admin)
admin_simple_target_pick(admin)
/datum/objective/assassinate/internal
var/stolen = 0 //Have we already eliminated this target?
@@ -150,6 +181,7 @@ GLOBAL_LIST_EMPTY(objectives)
explanation_text = "Assassinate [target.name], who was obliterated"
/datum/objective/mutiny
name = "mutiny"
var/target_role_type=0
martyr_compatible = 1
@@ -173,6 +205,7 @@ GLOBAL_LIST_EMPTY(objectives)
explanation_text = "Free Objective"
/datum/objective/maroon
name = "maroon"
var/target_role_type=0
martyr_compatible = 1
@@ -191,7 +224,11 @@ GLOBAL_LIST_EMPTY(objectives)
else
explanation_text = "Free Objective"
/datum/objective/maroon/admin_edit(mob/admin)
admin_simple_target_pick(admin)
/datum/objective/debrain
name = "debrain"
var/target_role_type=0
/datum/objective/debrain/find_target_by_role(role, role_type=0, invert=0)
@@ -222,7 +259,11 @@ GLOBAL_LIST_EMPTY(objectives)
else
explanation_text = "Free Objective"
/datum/objective/debrain/admin_edit(mob/admin)
admin_simple_target_pick(admin)
/datum/objective/protect//The opposite of killing a dude.
name = "protect"
martyr_compatible = 1
var/target_role_type = 0
var/human_check = TRUE
@@ -243,10 +284,15 @@ GLOBAL_LIST_EMPTY(objectives)
else
explanation_text = "Free Objective"
/datum/objective/protect/admin_edit(mob/admin)
admin_simple_target_pick(admin)
/datum/objective/protect/nonhuman
name = "protect nonhuman"
human_check = FALSE
/datum/objective/hijack
name = "hijack"
explanation_text = "Hijack the shuttle to ensure no loyalist Nanotrasen crew escape alive and out of custody."
team_explanation_text = "Hijack the shuttle to ensure no loyalist Nanotrasen crew escape alive and out of custody. Leave no team member behind."
martyr_compatible = 0 //Technically you won't get both anyway.
@@ -261,6 +307,7 @@ GLOBAL_LIST_EMPTY(objectives)
return SSshuttle.emergency.is_hijacked()
/datum/objective/block
name = "no organics on shuttle"
explanation_text = "Do not allow any organic lifeforms to escape on the shuttle alive."
martyr_compatible = 1
@@ -274,6 +321,7 @@ GLOBAL_LIST_EMPTY(objectives)
return TRUE
/datum/objective/purge
name = "no mutants on shuttle"
explanation_text = "Ensure no mutant humanoid species are present aboard the escape shuttle."
martyr_compatible = 1
@@ -288,6 +336,7 @@ GLOBAL_LIST_EMPTY(objectives)
return TRUE
/datum/objective/robot_army
name = "robot army"
explanation_text = "Have at least eight active cyborgs synced to you."
martyr_compatible = 0
@@ -304,6 +353,7 @@ GLOBAL_LIST_EMPTY(objectives)
return counter >= 8
/datum/objective/escape
name = "escape"
explanation_text = "Escape on the shuttle or an escape pod alive and without being in custody."
team_explanation_text = "Have all members of your team escape on a shuttle or pod alive, without being in custody."
@@ -316,6 +366,7 @@ GLOBAL_LIST_EMPTY(objectives)
return TRUE
/datum/objective/escape/escape_with_identity
name = "escape with identity"
var/target_real_name // Has to be stored because the target's real_name can change over the course of the round
var/target_missing_id
@@ -351,7 +402,11 @@ GLOBAL_LIST_EMPTY(objectives)
return TRUE
return FALSE
/datum/objective/escape/escape_with_identity/admin_edit(mob/admin)
admin_simple_target_pick(admin)
/datum/objective/survive
name = "survive"
explanation_text = "Stay alive until the end."
/datum/objective/survive/check_completion()
@@ -362,6 +417,7 @@ GLOBAL_LIST_EMPTY(objectives)
return TRUE
/datum/objective/survive/exist //Like survive, but works for silicons and zombies and such.
name = "survive nonhuman"
/datum/objective/survive/exist/check_completion()
var/list/datum/mind/owners = get_owners()
@@ -371,6 +427,7 @@ GLOBAL_LIST_EMPTY(objectives)
return TRUE
/datum/objective/martyr
name = "martyr"
explanation_text = "Die a glorious death."
/datum/objective/martyr/check_completion()
@@ -383,6 +440,7 @@ GLOBAL_LIST_EMPTY(objectives)
return TRUE
/datum/objective/nuclear
name = "nuclear"
explanation_text = "Destroy the station with a nuclear device."
martyr_compatible = 1
@@ -393,6 +451,7 @@ GLOBAL_LIST_EMPTY(objectives)
GLOBAL_LIST_EMPTY(possible_items)
/datum/objective/steal
name = "steal"
var/datum/objective_item/targetinfo = null //Save the chosen item datum so we can access it later.
var/obj/item/steal_target = null //Needed for custom objectives (they're just items, not datums).
martyr_compatible = 0
@@ -430,18 +489,19 @@ GLOBAL_LIST_EMPTY(possible_items)
explanation_text = "Free objective"
return
/datum/objective/steal/proc/select_target() //For admins setting objectives manually.
/datum/objective/steal/admin_edit(mob/admin)
var/list/possible_items_all = GLOB.possible_items+"custom"
var/new_target = input("Select target:", "Objective target", steal_target) as null|anything in possible_items_all
var/new_target = input(admin,"Select target:", "Objective target", steal_target) as null|anything in possible_items_all
if (!new_target)
return
if (new_target == "custom") //Can set custom items.
var/obj/item/custom_target = input("Select type:","Type") as null|anything in typesof(/obj/item)
if (!custom_target)
var/custom_path = input(admin,"Search for target item type:","Type") as null|text
if (!custom_path)
return
var/obj/item/custom_target = pick_closest_path(custom_path, make_types_fancy(subtypesof(/obj/item)))
var/custom_name = initial(custom_target.name)
custom_name = stripped_input("Enter target name:", "Objective target", custom_name)
custom_name = stripped_input(admin,"Enter target name:", "Objective target", custom_name)
if (!custom_name)
return
steal_target = custom_target
@@ -449,7 +509,6 @@ GLOBAL_LIST_EMPTY(possible_items)
else
set_target(new_target)
return steal_target
/datum/objective/steal/check_completion()
var/list/datum/mind/owners = get_owners()
@@ -476,6 +535,7 @@ GLOBAL_LIST_EMPTY(possible_items)
GLOBAL_LIST_EMPTY(possible_items_special)
/datum/objective/steal/special //ninjas are so special they get their own subtype good for them
name = "steal special"
/datum/objective/steal/special/New()
..()
@@ -487,8 +547,12 @@ GLOBAL_LIST_EMPTY(possible_items_special)
return set_target(pick(GLOB.possible_items_special))
/datum/objective/steal/exchange
name = "exchange"
martyr_compatible = 0
/datum/objective/steal/exchange/admin_edit(mob/admin)
return
/datum/objective/steal/exchange/proc/set_faction(faction,otheragent)
target = otheragent
if(faction == "red")
@@ -508,6 +572,7 @@ GLOBAL_LIST_EMPTY(possible_items_special)
/datum/objective/steal/exchange/backstab
name = "prevent exchange"
/datum/objective/steal/exchange/backstab/set_faction(faction)
if(faction == "red")
@@ -519,12 +584,17 @@ GLOBAL_LIST_EMPTY(possible_items_special)
/datum/objective/download
name = "download"
/datum/objective/download/proc/gen_amount_goal()
target_amount = rand(20,40)
explanation_text = "Download [target_amount] research node\s."
update_explanation_text()
return target_amount
/datum/objective/download/update_explanation_text()
..()
explanation_text = "Download [target_amount] research node\s."
/datum/objective/download/check_completion()
var/datum/techweb/checking = new
var/list/datum/mind/owners = get_owners()
@@ -541,13 +611,24 @@ GLOBAL_LIST_EMPTY(possible_items_special)
TD.stored_research.copy_research_to(checking)
return checking.researched_nodes.len >= target_amount
/datum/objective/download/admin_edit(mob/admin)
var/count = input(admin,"How many nodes ?","Nodes",target_amount) as num|null
if(count)
target_amount = count
update_explanation_text()
/datum/objective/capture
name = "capture"
var/captured_amount = 0
/datum/objective/capture/proc/gen_amount_goal()
target_amount = rand(5,10)
explanation_text = "Capture [target_amount] lifeform\s with an energy net. Live, rare specimens are worth more."
return target_amount
target_amount = rand(5,10)
explanation_text = "Capture [target_amount] lifeform\s with an energy net. Live, rare specimens are worth more."
return target_amount
/datum/objective/capture/update_explanation_text()
. = ..()
explanation_text = "Capture [target_amount] lifeform\s with an energy net. Live, rare specimens are worth more."
/datum/objective/capture/check_completion()//Basically runs through all the mobs in the area to determine how much they are worth.
/*var/area/centcom/holding/A = GLOB.areas_by_type[/area/centcom/holding]
@@ -576,10 +657,16 @@ GLOBAL_LIST_EMPTY(possible_items_special)
captured_amount+=2*/ //Removed in favour of adding points on capture, in energy_net_nets.dm
return captured_amount >= target_amount
/datum/objective/capture/admin_edit(mob/admin)
var/count = input(admin,"How many mobs to capture ?","capture",target_amount) as num|null
if(count)
target_amount = count
update_explanation_text()
//Changeling Objectives
/datum/objective/absorb
name = "absorb"
/datum/objective/absorb/proc/gen_amount_goal(lowbound = 4, highbound = 6)
target_amount = rand (lowbound,highbound)
@@ -595,9 +682,19 @@ GLOBAL_LIST_EMPTY(possible_items_special)
n_p ++
target_amount = min(target_amount, n_p)
explanation_text = "Extract [target_amount] compatible genome\s."
update_explanation_text()
return target_amount
/datum/objective/absorb/update_explanation_text()
. = ..()
explanation_text = "Extract [target_amount] compatible genome\s."
/datum/objective/absorb/admin_edit(mob/admin)
var/count = input(admin,"How many people to absorb?","absorb",target_amount) as num|null
if(count)
target_amount = count
update_explanation_text()
/datum/objective/absorb/check_completion()
var/list/datum/mind/owners = get_owners()
var/absorbedcount = 0
@@ -611,6 +708,7 @@ GLOBAL_LIST_EMPTY(possible_items_special)
return absorbedcount >= target_amount
/datum/objective/absorb_most
name = "absorb most"
explanation_text = "Extract more compatible genomes than any other Changeling."
/datum/objective/absorb_most/check_completion()
@@ -631,6 +729,7 @@ GLOBAL_LIST_EMPTY(possible_items_special)
return TRUE
/datum/objective/absorb_changeling
name = "absorb changeling"
explanation_text = "Absorb another Changeling."
/datum/objective/absorb_changeling/check_completion()
@@ -653,6 +752,7 @@ GLOBAL_LIST_EMPTY(possible_items_special)
//End Changeling Objectives
/datum/objective/destroy
name = "destroy AI"
martyr_compatible = 1
/datum/objective/destroy/find_target()
@@ -674,10 +774,20 @@ GLOBAL_LIST_EMPTY(possible_items_special)
else
explanation_text = "Free Objective"
/datum/objective/destroy/admin_edit(mob/admin)
var/list/possible_targets = active_ais(1)
if(possible_targets.len)
var/mob/new_target = input(admin,"Select target:", "Objective target") as null|anything in possible_targets
target = new_target.mind
else
to_chat(admin, "No active AIs with minds")
update_explanation_text()
/datum/objective/destroy/internal
var/stolen = FALSE //Have we already eliminated this target?
/datum/objective/steal_five_of_type
name = "steal five of"
explanation_text = "Steal at least five items!"
var/list/wanted_items = list(/obj/item)
@@ -686,10 +796,12 @@ GLOBAL_LIST_EMPTY(possible_items_special)
wanted_items = typecacheof(wanted_items)
/datum/objective/steal_five_of_type/summon_guns
name = "steal guns"
explanation_text = "Steal at least five guns!"
wanted_items = list(/obj/item/gun)
/datum/objective/steal_five_of_type/summon_magic
name = "steal magic"
explanation_text = "Steal at least five magical artefacts!"
wanted_items = list(/obj/item/spellbook, /obj/item/gun/magic, /obj/item/clothing/suit/space/hardsuit/wizard, /obj/item/scrying, /obj/item/antag_spawner/contract, /obj/item/necromantic_stone)
@@ -705,6 +817,14 @@ GLOBAL_LIST_EMPTY(possible_items_special)
stolen_count++
return stolen_count >= 5
//Created by admin tools
/datum/objective/custom
name = "custom"
/datum/objective/custom/admin_edit(mob/admin)
var/expl = stripped_input(admin, "Custom objective:", "Objective", explanation_text)
if(expl)
explanation_text = expl
////////////////////////////////
// Changeling team objectives //
+6 -83
View File
@@ -113,11 +113,6 @@ Class Procs:
var/atom/movable/occupant = null
var/speed_process = FALSE // Process as fast as possible?
var/obj/item/circuitboard/circuit // Circuit to be created and inserted when the machinery is created
var/obj/item/card/id/inserted_scan_id
var/obj/item/card/id/inserted_modify_id
var/list/region_access = null // For the identification console (card.dm)
var/list/head_subordinates = null // For the identification console (card.dm)
var/authenticated = 0 // For the identification console (card.dm)
var/interaction_flags_machine = INTERACT_MACHINE_WIRES_IF_OPEN | INTERACT_MACHINE_ALLOW_SILICON | INTERACT_MACHINE_OPEN_SILICON | INTERACT_MACHINE_SET_MACHINE
@@ -459,22 +454,20 @@ Class Procs:
/obj/machinery/examine(mob/user)
. = ..()
if(stat & BROKEN)
. += "<span class='notice'>It looks broken and non-functional.</span>"
to_chat(user, "<span class='notice'>It looks broken and non-functional.</span>")
if(!(resistance_flags & INDESTRUCTIBLE))
if(resistance_flags & ON_FIRE)
. += "<span class='warning'>It's on fire!</span>"
to_chat(user, "<span class='warning'>It's on fire!</span>")
var/healthpercent = (obj_integrity/max_integrity) * 100
switch(healthpercent)
if(50 to 99)
. += "It looks slightly damaged."
to_chat(user, "It looks slightly damaged.")
if(25 to 50)
. += "It appears heavily damaged."
to_chat(user, "It appears heavily damaged.")
if(0 to 25)
. += "<span class='warning'>It's falling apart!</span>"
to_chat(user, "<span class='warning'>It's falling apart!</span>")
if(user.research_scanner && component_parts)
. += display_parts(user, TRUE)
if(inserted_scan_id || inserted_modify_id)
. += "<span class='notice'>Alt-click to eject the ID card.</span>"
to_chat(user, display_parts(user, TRUE))
//called on machinery construction (i.e from frame to machinery) but not on initialization
/obj/machinery/proc/on_construction()
@@ -509,73 +502,3 @@ Class Procs:
. = . % 9
AM.pixel_x = -8 + ((.%3)*8)
AM.pixel_y = -8 + (round( . / 3)*8)
/obj/machinery/proc/id_insert_scan(mob/user, obj/item/card/id/I)
I = user.get_active_held_item()
if(istype(I))
if(inserted_scan_id)
to_chat(user, "<span class='warning'>There's already an ID card in the console!</span>")
return
if(!user.transferItemToLoc(I, src))
return
inserted_scan_id = I
user.visible_message("<span class='notice'>[user] inserts an ID card into the console.</span>", \
"<span class='notice'>You insert the ID card into the console.</span>")
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE)
updateUsrDialog()
/obj/machinery/proc/id_eject_scan(mob/user)
if(!inserted_scan_id)
to_chat(user, "<span class='warning'>There's no ID card in the console!</span>")
return
if(inserted_scan_id)
inserted_scan_id.forceMove(drop_location())
if(!issilicon(user) && Adjacent(user))
user.put_in_hands(inserted_scan_id)
inserted_scan_id = null
user.visible_message("<span class='notice'>[user] gets an ID card from the console.</span>", \
"<span class='notice'>You get the ID card from the console.</span>")
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE)
updateUsrDialog()
/obj/machinery/proc/id_eject_modify(mob/user)
if(inserted_modify_id)
GLOB.data_core.manifest_modify(inserted_modify_id.registered_name, inserted_modify_id.assignment)
inserted_modify_id.update_label()
inserted_modify_id.forceMove(drop_location())
if(!issilicon(user) && Adjacent(user))
user.put_in_hands(inserted_modify_id)
user.visible_message("<span class='notice'>[user] gets an ID card from the console.</span>", \
"<span class='notice'>You get the ID card from the console.</span>")
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE)
inserted_modify_id = null
region_access = null
head_subordinates = null
updateUsrDialog()
/obj/machinery/proc/id_insert_modify(mob/user)
var/obj/item/card/id/I = user.get_active_held_item()
if(istype(I))
if(inserted_modify_id)
to_chat(user, "<span class='warning'>There's already an ID card in the console!</span>")
return
if(!user.transferItemToLoc(I, src))
return
inserted_modify_id = I
user.visible_message("<span class='notice'>[user] inserts an ID card into the console.</span>", \
"<span class='notice'>You insert the ID card into the console.</span>")
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE)
updateUsrDialog()
/obj/machinery/AltClick(mob/user)
. = ..()
if(!user.canUseTopic(src, !issilicon(user)) || !is_operational())
return
if(inserted_modify_id)
id_eject_modify(user)
authenticated = FALSE
return
if(inserted_scan_id)
id_eject_scan(user)
authenticated = FALSE
return
+4 -3
View File
@@ -13,6 +13,7 @@
var/icon_keyboard = "generic_key"
var/icon_screen = "generic"
var/clockwork = FALSE
var/authenticated = FALSE
/obj/machinery/computer/Initialize(mapload, obj/item/circuitboard/C)
. = ..()
@@ -34,9 +35,9 @@
/obj/machinery/computer/ratvar_act()
if(!clockwork)
clockwork = TRUE
icon_screen = "ratvar[rand(1, 4)]"
icon_keyboard = "ratvar_key[rand(1, 6)]"
icon_state = "ratvarcomputer[rand(1, 4)]"
icon_screen = "ratvar[rand(1, 3)]"
icon_keyboard = "ratvar_key[rand(1, 2)]"
icon_state = "ratvarcomputer"
update_icon()
/obj/machinery/computer/narsie_act()
+6 -4
View File
@@ -1,8 +1,7 @@
#define ARCADE_WEIGHT_TRICK 4
#define ARCADE_WEIGHT_USELESS 2
#define ARCADE_WEIGHT_RARE 1
#define ARCADE_WEIGHT_PLUSH 65
#define ARCADE_RATIO_PLUSH 0.20 // average 1 out of 6 wins is a plush.
/obj/machinery/computer/arcade
name = "random arcade"
@@ -27,7 +26,6 @@
/obj/item/toy/katana = ARCADE_WEIGHT_TRICK,
/obj/item/toy/minimeteor = ARCADE_WEIGHT_TRICK,
/obj/item/toy/nuke = ARCADE_WEIGHT_TRICK,
/obj/item/toy/plush/random = ARCADE_WEIGHT_PLUSH,
/obj/item/toy/redbutton = ARCADE_WEIGHT_TRICK,
/obj/item/toy/spinningtoy = ARCADE_WEIGHT_TRICK,
/obj/item/toy/sword = ARCADE_WEIGHT_TRICK,
@@ -88,8 +86,12 @@
/obj/item/circuitboard/computer/arcade/amputation = 2)
var/thegame = pickweight(gameodds)
var/obj/item/circuitboard/CB = new thegame()
new CB.build_path(loc, CB)
var/obj/machinery/computer/arcade/A = new CB.build_path(loc, CB)
A.setDir(dir)
return INITIALIZE_HINT_QDEL
//The below object acts as a spawner with a wide array of possible picks, most being uninspired references to past/current player characters.
//Nevertheless, this keeps its ratio constant with the sum of all the others prizes.
prizes[/obj/item/toy/plush/random] = counterlist_sum(prizes) * ARCADE_RATIO_PLUSH
Reset()
/obj/machinery/computer/arcade/proc/prizevend(mob/user, list/rarity_classes)
+155 -152
View File
@@ -11,8 +11,6 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
icon_keyboard = "id_key"
req_one_access = list(ACCESS_HEADS, ACCESS_CHANGE_IDS)
circuit = /obj/item/circuitboard/computer/card
var/obj/item/card/id/scan = null
var/obj/item/card/id/modify = null
var/mode = 0
var/printing = null
var/target_dept = 0 //Which department this computer has access to. 0=all departments
@@ -38,68 +36,68 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
//This is used to keep track of opened positions for jobs to allow instant closing
//Assoc array: "JobName" = (int)<Opened Positions>
var/list/opened_positions = list();
var/list/opened_positions = list()
var/obj/item/card/id/inserted_scan_id
var/obj/item/card/id/inserted_modify_id
var/list/region_access = null
var/list/head_subordinates = null
light_color = LIGHT_COLOR_BLUE
/obj/machinery/computer/card/examine(mob/user)
..()
if(scan || modify)
if(inserted_scan_id || inserted_modify_id)
to_chat(user, "<span class='notice'>Alt-click to eject the ID card.</span>")
/obj/machinery/computer/card/Initialize()
. = ..()
change_position_cooldown = CONFIG_GET(number/id_console_jobslot_delay)
/obj/machinery/computer/card/attackby(obj/O, mob/user, params)//TODO:SANITY
if(istype(O, /obj/item/card/id))
var/obj/item/card/id/idcard = O
if(check_access(idcard))
if(!scan)
if (!user.transferItemToLoc(idcard,src))
return
scan = idcard
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0)
else if(!modify)
if (!user.transferItemToLoc(idcard,src))
return
modify = idcard
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0)
/obj/machinery/computer/card/examine(mob/user)
. = ..()
if(inserted_scan_id || inserted_modify_id)
to_chat(user, "<span class='notice'>Alt-click to eject the ID card.</span>")
/obj/machinery/computer/card/attackby(obj/I, mob/user, params)
if(istype(I, /obj/item/card/id))
if(!inserted_scan_id)
if(id_insert(user, I, inserted_scan_id))
inserted_scan_id = I
return
if(!inserted_modify_id)
if(id_insert(user, I, inserted_modify_id))
inserted_modify_id = I
return
else
if(!modify)
if (!user.transferItemToLoc(idcard,src))
return
modify = idcard
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0)
updateUsrDialog()
to_chat(user, "<span class='warning'>There's already an ID card in the console!</span>")
else
return ..()
/obj/machinery/computer/card/Destroy()
if(scan)
qdel(scan)
scan = null
if(modify)
qdel(modify)
modify = null
if(inserted_scan_id)
qdel(inserted_scan_id)
inserted_scan_id = null
if(inserted_modify_id)
qdel(inserted_modify_id)
inserted_modify_id = null
return ..()
/obj/machinery/computer/card/handle_atom_del(atom/A)
..()
if(A == scan)
scan = null
if(A == inserted_scan_id)
inserted_scan_id = null
updateUsrDialog()
if(A == modify)
modify = null
if(A == inserted_modify_id)
inserted_modify_id = null
updateUsrDialog()
/obj/machinery/computer/card/on_deconstruction()
if(scan)
scan.forceMove(drop_location())
scan = null
if(modify)
modify.forceMove(drop_location())
modify = null
if(inserted_scan_id)
inserted_scan_id.forceMove(drop_location())
inserted_scan_id = null
if(inserted_modify_id)
inserted_modify_id.forceMove(drop_location())
inserted_modify_id = null
//Check if you can't open a new position for a certain job
/obj/machinery/computer/card/proc/job_blacklisted(jobtitle)
@@ -130,9 +128,50 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
return -1
return 0
/obj/machinery/computer/card/proc/id_insert(mob/user, obj/item/card/id/I, target)
if(istype(I))
if(target)
to_chat(user, "<span class='warning'>There's already an ID card in the console!</span>")
return FALSE
if(!user.transferItemToLoc(I, src))
return FALSE
user.visible_message("<span class='notice'>[user] inserts an ID card into the console.</span>", \
"<span class='notice'>You insert the ID card into the console.</span>")
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE)
updateUsrDialog()
return TRUE
/obj/machinery/computer/card/proc/id_eject(mob/user, obj/target)
if(!target)
to_chat(user, "<span class='warning'>There's no ID card in the console!</span>")
return FALSE
else
target.forceMove(drop_location())
if(!issilicon(user) && Adjacent(user))
user.put_in_hands(target)
user.visible_message("<span class='notice'>[user] gets an ID card from the console.</span>", \
"<span class='notice'>You get the ID card from the console.</span>")
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE)
updateUsrDialog()
return TRUE
/obj/machinery/computer/card/AltClick(mob/user)
..()
if(!user.canUseTopic(src, !issilicon(user)) || !is_operational())
return
if(inserted_modify_id)
if(id_eject(user, inserted_modify_id))
inserted_modify_id = null
authenticated = FALSE
return
if(inserted_scan_id)
if(id_eject(user, inserted_scan_id))
inserted_scan_id = null
authenticated = FALSE
return
/obj/machinery/computer/card/ui_interact(mob/user)
. = ..()
var/dat
if(!SSticker)
return
@@ -147,15 +186,15 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
dat = "<a href='?src=[REF(src)];choice=return'>Return</a>"
dat += " || Confirm Identity: "
var/S
if(scan)
S = html_encode(scan.name)
if(inserted_scan_id)
S = html_encode(inserted_scan_id.name)
else
S = "--------"
dat += "<a href='?src=[REF(src)];choice=scan'>[S]</a>"
dat += "<a href='?src=[REF(src)];choice=inserted_scan_id'>[S]</a>"
dat += "<table>"
dat += "<tr><td style='width:25%'><b>Job</b></td><td style='width:25%'><b>Slots</b></td><td style='width:25%'><b>Open job</b></td><td style='width:25%'><b>Close job</b><td style='width:25%'><b>Prioritize</b></td></td></tr>"
var/ID
if(scan && (ACCESS_CHANGE_IDS in scan.access) && !target_dept)
if(inserted_scan_id && (ACCESS_CHANGE_IDS in inserted_scan_id.access) && !target_dept)
ID = 1
else
ID = 0
@@ -221,33 +260,33 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
var/target_name
var/target_owner
var/target_rank
if(modify)
target_name = html_encode(modify.name)
if(inserted_modify_id)
target_name = html_encode(inserted_modify_id.name)
else
target_name = "--------"
if(modify && modify.registered_name)
target_owner = html_encode(modify.registered_name)
if(inserted_modify_id && inserted_modify_id.registered_name)
target_owner = html_encode(inserted_modify_id.registered_name)
else
target_owner = "--------"
if(modify && modify.assignment)
target_rank = html_encode(modify.assignment)
if(inserted_modify_id && inserted_modify_id.assignment)
target_rank = html_encode(inserted_modify_id.assignment)
else
target_rank = "Unassigned"
var/scan_name
if(scan)
scan_name = html_encode(scan.name)
if(inserted_scan_id)
scan_name = html_encode(inserted_scan_id.name)
else
scan_name = "--------"
if(!authenticated)
header += "<br><i>Please insert the cards into the slots</i><br>"
header += "Target: <a href='?src=[REF(src)];choice=modify'>[target_name]</a><br>"
header += "Confirm Identity: <a href='?src=[REF(src)];choice=scan'>[scan_name]</a><br>"
header += "Target: <a href='?src=[REF(src)];choice=inserted_modify_id'>[target_name]</a><br>"
header += "Confirm Identity: <a href='?src=[REF(src)];choice=inserted_scan_id'>[scan_name]</a><br>"
else
header += "<div align='center'><br>"
header += "<a href='?src=[REF(src)];choice=modify'>Remove [target_name]</a> || "
header += "<a href='?src=[REF(src)];choice=scan'>Remove [scan_name]</a> <br> "
header += "<a href='?src=[REF(src)];choice=inserted_modify_id'>Remove [target_name]</a> || "
header += "<a href='?src=[REF(src)];choice=inserted_scan_id'>Remove [scan_name]</a> <br> "
header += "<a href='?src=[REF(src)];choice=mode;mode_target=1'>Access Crew Manifest</a> <br> "
header += "<a href='?src=[REF(src)];choice=logout'>Log Out</a></div>"
@@ -262,7 +301,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
var/body
if (authenticated && modify)
if (authenticated && inserted_modify_id)
var/carddesc = text("")
var/jobs = text("")
@@ -303,7 +342,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
if(istype(src, /obj/machinery/computer/card/centcom))
accesses += "<h5>Central Command:</h5>"
for(var/A in get_all_centcom_access())
if(A in modify.access)
if(A in inserted_modify_id.access)
accesses += "<a href='?src=[REF(src)];choice=access;access_target=[A];allowed=0'><font color=\"red\">[replacetext(get_centcom_access_desc(A), " ", "&nbsp")]</font></a> "
else
accesses += "<a href='?src=[REF(src)];choice=access;access_target=[A];allowed=1'>[replacetext(get_centcom_access_desc(A), " ", "&nbsp")]</a> "
@@ -321,7 +360,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
continue
accesses += "<td style='width:14%' valign='top'>"
for(var/A in get_region_accesses(i))
if(A in modify.access)
if(A in inserted_modify_id.access)
accesses += "<a href='?src=[REF(src)];choice=access;access_target=[A];allowed=0'><font color=\"red\">[replacetext(get_access_desc(A), " ", "&nbsp")]</font></a> "
else
accesses += "<a href='?src=[REF(src)];choice=access;access_target=[A];allowed=1'>[replacetext(get_access_desc(A), " ", "&nbsp")]</a> "
@@ -353,52 +392,66 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
usr.set_machine(src)
switch(href_list["choice"])
if ("modify")
eject_id_modify(usr)
if ("scan")
eject_id_scan(usr)
if ("inserted_modify_id")
if (inserted_modify_id)
if(id_eject(usr, inserted_modify_id))
inserted_modify_id = null
else
var/mob/M = usr
var/obj/item/card/id/I = M.get_idcard(TRUE)
if(id_insert(usr, I, inserted_modify_id))
inserted_modify_id = I
if ("inserted_scan_id")
if (inserted_scan_id)
if(id_eject(usr, inserted_scan_id))
inserted_scan_id = null
else
var/mob/M = usr
var/obj/item/card/id/I = M.get_idcard(TRUE)
if(id_insert(usr, I, inserted_scan_id))
inserted_scan_id = I
if ("auth")
if ((!( authenticated ) && (scan || issilicon(usr)) && (modify || mode)))
if (check_access(scan))
if ((!( authenticated ) && (inserted_scan_id || issilicon(usr)) && (inserted_modify_id || mode)))
if (check_access(inserted_scan_id))
region_access = list()
head_subordinates = list()
if(ACCESS_CHANGE_IDS in scan.access)
if(ACCESS_CHANGE_IDS in inserted_scan_id.access)
if(target_dept)
head_subordinates = get_all_jobs()
region_access |= target_dept
authenticated = 1
else
authenticated = 2
playsound(src, 'sound/machines/terminal_on.ogg', 50, 0)
playsound(src, 'sound/machines/terminal_on.ogg', 50, FALSE)
else
if((ACCESS_HOP in scan.access) && ((target_dept==1) || !target_dept))
if((ACCESS_HOP in inserted_scan_id.access) && ((target_dept==1) || !target_dept))
region_access |= 1
get_subordinates("Head of Personnel")
if((ACCESS_HOS in scan.access) && ((target_dept==2) || !target_dept))
if((ACCESS_HOS in inserted_scan_id.access) && ((target_dept==2) || !target_dept))
region_access |= 2
get_subordinates("Head of Security")
if((ACCESS_CMO in scan.access) && ((target_dept==3) || !target_dept))
if((ACCESS_CMO in inserted_scan_id.access) && ((target_dept==3) || !target_dept))
region_access |= 3
get_subordinates("Chief Medical Officer")
if((ACCESS_RD in scan.access) && ((target_dept==4) || !target_dept))
if((ACCESS_RD in inserted_scan_id.access) && ((target_dept==4) || !target_dept))
region_access |= 4
get_subordinates("Research Director")
if((ACCESS_CE in scan.access) && ((target_dept==5) || !target_dept))
if((ACCESS_CE in inserted_scan_id.access) && ((target_dept==5) || !target_dept))
region_access |= 5
get_subordinates("Chief Engineer")
if((ACCESS_QM in scan.access) && ((target_dept==6) || !target_dept))
if((ACCESS_QM in inserted_scan_id.access) && ((target_dept==6) || !target_dept))
region_access |= 6
get_subordinates("Quartermaster")
if(region_access)
authenticated = 1
else if ((!( authenticated ) && issilicon(usr)) && (!modify))
else if ((!( authenticated ) && issilicon(usr)) && (!inserted_modify_id))
to_chat(usr, "<span class='warning'>You can't modify an ID without an ID inserted to modify! Once one is in the modify slot on the computer, you can log in.</span>")
if ("logout")
region_access = null
head_subordinates = null
authenticated = 0
playsound(src, 'sound/machines/terminal_off.ogg', 50, 0)
playsound(src, 'sound/machines/terminal_off.ogg', 50, FALSE)
if("access")
if(href_list["allowed"])
@@ -406,20 +459,20 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
var/access_type = text2num(href_list["access_target"])
var/access_allowed = text2num(href_list["allowed"])
if(access_type in (istype(src, /obj/machinery/computer/card/centcom)?get_all_centcom_access() : get_all_accesses()))
modify.access -= access_type
inserted_modify_id.access -= access_type
if(access_allowed == 1)
modify.access += access_type
playsound(src, "terminal_type", 50, 0)
inserted_modify_id.access += access_type
playsound(src, "terminal_type", 50, FALSE)
if ("assign")
if (authenticated == 2)
var/t1 = href_list["assign_target"]
if(t1 == "Custom")
var/newJob = reject_bad_text(input("Enter a custom job assignment.", "Assignment", modify ? modify.assignment : "Unassigned"), MAX_NAME_LEN)
var/newJob = reject_bad_text(input("Enter a custom job assignment.", "Assignment", inserted_modify_id ? inserted_modify_id.assignment : "Unassigned"), MAX_NAME_LEN)
if(newJob)
t1 = newJob
else if(t1 == "Unassigned")
modify.access -= get_all_accesses()
inserted_modify_id.access -= get_all_accesses()
else
var/datum/job/jobdatum
@@ -434,24 +487,24 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
updateUsrDialog()
return
modify.access = ( istype(src, /obj/machinery/computer/card/centcom) ? get_centcom_access(t1) : jobdatum.get_access() )
if (modify)
modify.assignment = t1
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
inserted_modify_id.access = ( istype(src, /obj/machinery/computer/card/centcom) ? get_centcom_access(t1) : jobdatum.get_access() )
if (inserted_modify_id)
inserted_modify_id.assignment = t1
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE)
if ("demote")
if(modify.assignment in head_subordinates || modify.assignment == "Assistant")
modify.assignment = "Unassigned"
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
if(inserted_modify_id.assignment in head_subordinates || inserted_modify_id.assignment == "Assistant")
inserted_modify_id.assignment = "Unassigned"
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE)
else
to_chat(usr, "<span class='error'>You are not authorized to demote this position.</span>")
if ("reg")
if (authenticated)
var/t2 = modify
if ((authenticated && modify == t2 && (in_range(src, usr) || issilicon(usr)) && isturf(loc)))
var/t2 = inserted_modify_id
if ((authenticated && inserted_modify_id == t2 && (in_range(src, usr) || issilicon(usr)) && isturf(loc)))
var/newName = reject_bad_name(href_list["reg"])
if(newName)
modify.registered_name = newName
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
inserted_modify_id.registered_name = newName
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE)
else
to_chat(usr, "<span class='error'>Invalid name entered.</span>")
updateUsrDialog()
@@ -462,11 +515,11 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
if("return")
//DISPLAY MAIN MENU
mode = 3;
playsound(src, "terminal_type", 25, 0)
playsound(src, "terminal_type", 25, FALSE)
if("make_job_available")
// MAKE ANOTHER JOB POSITION AVAILABLE FOR LATE JOINERS
if(scan && (ACCESS_CHANGE_IDS in scan.access) && !target_dept)
if(inserted_scan_id && (ACCESS_CHANGE_IDS in inserted_scan_id.access) && !target_dept)
var/edit_job_target = href_list["job"]
var/datum/job/j = SSjob.GetJob(edit_job_target)
if(!j)
@@ -479,11 +532,11 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
GLOB.time_last_changed_position = world.time / 10
j.total_positions++
opened_positions[edit_job_target]++
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE)
if("make_job_unavailable")
// MAKE JOB POSITION UNAVAILABLE FOR LATE JOINERS
if(scan && (ACCESS_CHANGE_IDS in scan.access) && !target_dept)
if(inserted_scan_id && (ACCESS_CHANGE_IDS in inserted_scan_id.access) && !target_dept)
var/edit_job_target = href_list["job"]
var/datum/job/j = SSjob.GetJob(edit_job_target)
if(!j)
@@ -497,11 +550,11 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
GLOB.time_last_changed_position = world.time / 10
j.total_positions--
opened_positions[edit_job_target]--
playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0)
playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, FALSE)
if ("prioritize_job")
// TOGGLE WHETHER JOB APPEARS AS PRIORITIZED IN THE LOBBY
if(scan && (ACCESS_CHANGE_IDS in scan.access) && !target_dept)
if(inserted_scan_id && (ACCESS_CHANGE_IDS in inserted_scan_id.access) && !target_dept)
var/priority_target = href_list["job"]
var/datum/job/j = SSjob.GetJob(priority_target)
if(!j)
@@ -518,7 +571,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
else
SSjob.prioritized_jobs += j
to_chat(usr, "<span class='notice'>[j.title] has been successfully [priority ? "prioritized" : "unprioritized"]. Potential employees will notice your request.</span>")
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE)
if ("print")
if (!( printing ))
@@ -531,59 +584,9 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
P.info = t1
P.name = "paper- 'Crew Manifest'"
printing = null
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0)
if (modify)
modify.update_label()
updateUsrDialog()
/obj/machinery/computer/card/AltClick(mob/user)
if(!user.canUseTopic(src, !issilicon(user)) || !is_operational())
return
if(scan)
eject_id_scan(user)
if(modify)
eject_id_modify(user)
/obj/machinery/computer/card/proc/eject_id_scan(mob/user)
if(scan)
scan.forceMove(drop_location())
if(!issilicon(user) && Adjacent(user))
user.put_in_hands(scan)
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0)
scan = null
else //switching the ID with the one you're holding
if(issilicon(user) || !Adjacent(user))
return
var/obj/item/I = user.get_active_held_item()
if(istype(I, /obj/item/card/id))
if(!user.transferItemToLoc(I,src))
return
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0)
scan = I
authenticated = FALSE
updateUsrDialog()
/obj/machinery/computer/card/proc/eject_id_modify(mob/user)
if(modify)
GLOB.data_core.manifest_modify(modify.registered_name, modify.assignment)
modify.update_label()
modify.forceMove(drop_location())
if(!issilicon(user) && Adjacent(user))
user.put_in_hands(modify)
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0)
modify = null
region_access = null
head_subordinates = null
else //switching the ID with the one you're holding
if(issilicon(user) || !Adjacent(user))
return
var/obj/item/I = user.get_active_held_item()
if(istype(I, /obj/item/card/id))
if (!user.transferItemToLoc(I,src))
return
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0)
modify = I
authenticated = FALSE
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, FALSE)
if (inserted_modify_id)
inserted_modify_id.update_label()
updateUsrDialog()
/obj/machinery/computer/card/proc/get_subordinates(rank)
+3 -1
View File
@@ -298,13 +298,15 @@
src.updateUsrDialog()
playsound(src, 'sound/machines/terminal_prompt.ogg', 50, 0)
say("Initiating scan...")
var/prev_locked = scanner.locked
scanner.locked = TRUE
spawn(20)
src.scan_occupant(scanner.occupant)
loading = 0
src.updateUsrDialog()
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
scanner.locked = prev_locked
//No locking an open scanner.
@@ -335,7 +335,7 @@
Nuke_request(input, usr)
to_chat(usr, "<span class='notice'>Request sent.</span>")
usr.log_message("has requested the nuclear codes from CentCom", LOG_SAY)
priority_announce("The codes for the on-station nuclear self-destruct have been requested by [usr]. Confirmation or denial of this request will be sent shortly.", "Nuclear Self Destruct Codes Requested",'sound/ai/commandreport.ogg')
priority_announce("The codes for the on-station nuclear self-destruct have been requested by [usr]. Confirmation or denial of this request will be sent shortly.", "Nuclear Self Destruct Codes Requested","commandreport")
CM.lastTimeUsed = world.time
@@ -1,163 +0,0 @@
//computer that handle the points and teleports the prisoner
/obj/machinery/computer/gulag_teleporter_computer
name = "labor camp teleporter console"
desc = "Used to send criminals to the Labor Camp."
icon_screen = "explosive"
icon_keyboard = "security_key"
req_access = list(ACCESS_ARMORY)
circuit = /obj/item/circuitboard/computer/gulag_teleporter_console
var/default_goal = 200
var/obj/item/card/id/prisoner/id = null
var/obj/machinery/gulag_teleporter/teleporter = null
var/obj/structure/gulag_beacon/beacon = null
var/mob/living/carbon/human/prisoner = null
var/datum/data/record/temporary_record = null
light_color = LIGHT_COLOR_RED
/obj/machinery/computer/gulag_teleporter_computer/Initialize()
. = ..()
scan_machinery()
/obj/machinery/computer/gulag_teleporter_computer/Destroy()
if(id)
id.forceMove(get_turf(src))
return ..()
/obj/machinery/computer/gulag_teleporter_computer/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/card/id/prisoner))
if(!id)
if (!user.transferItemToLoc(W,src))
return
id = W
to_chat(user, "<span class='notice'>You insert [W].</span>")
return
else
to_chat(user, "<span class='notice'>There's an ID inserted already.</span>")
return ..()
/obj/machinery/computer/gulag_teleporter_computer/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "gulag_console", name, 455, 440, master_ui, state)
ui.open()
/obj/machinery/computer/gulag_teleporter_computer/ui_data(mob/user)
var/list/data = list()
var/list/prisoner_list = list()
var/can_teleport = FALSE
if(teleporter && (teleporter.occupant && ishuman(teleporter.occupant)))
prisoner = teleporter.occupant
prisoner_list["name"] = prisoner.real_name
if(id)
can_teleport = TRUE
if(!isnull(GLOB.data_core.general))
for(var/r in GLOB.data_core.security)
var/datum/data/record/R = r
if(R.fields["name"] == prisoner_list["name"])
temporary_record = R
prisoner_list["crimstat"] = temporary_record.fields["criminal"]
data["prisoner"] = prisoner_list
if(teleporter)
data["teleporter"] = teleporter
data["teleporter_location"] = "([teleporter.x], [teleporter.y], [teleporter.z])"
data["teleporter_lock"] = teleporter.locked
data["teleporter_state_open"] = teleporter.state_open
if(beacon)
data["beacon"] = beacon
data["beacon_location"] = "([beacon.x], [beacon.y], [beacon.z])"
if(id)
data["id"] = id
data["id_name"] = id.registered_name
data["goal"] = id.goal
data["can_teleport"] = can_teleport
return data
/obj/machinery/computer/gulag_teleporter_computer/ui_act(action, list/params)
if(..())
return
if(!allowed(usr))
to_chat(usr, "<span class='warning'>Access denied.</span>")
return
switch(action)
if("scan_teleporter")
teleporter = findteleporter()
if("scan_beacon")
beacon = findbeacon()
if("handle_id")
if(id)
usr.put_in_hands(id)
id = null
else
var/obj/item/I = usr.is_holding_item_of_type(/obj/item/card/id/prisoner)
if(I)
if(!usr.transferItemToLoc(I, src))
return
id = I
if("set_goal")
var/new_goal = input("Set the amount of points:", "Points", id.goal) as num|null
if(!isnum(new_goal))
return
if(!new_goal)
new_goal = default_goal
if (new_goal > 1000)
to_chat(usr, "The entered amount of points is too large. Points have instead been set to the maximum allowed amount.")
id.goal = CLAMP(new_goal, 0, 1000) //maximum 1000 points
if("toggle_open")
if(teleporter.locked)
to_chat(usr, "The teleporter is locked")
return
teleporter.toggle_open()
if("teleporter_lock")
if(teleporter.state_open)
to_chat(usr, "Close the teleporter before locking!")
return
teleporter.locked = !teleporter.locked
if("teleport")
if(!teleporter || !beacon)
return
addtimer(CALLBACK(src, .proc/teleport, usr), 5)
/obj/machinery/computer/gulag_teleporter_computer/proc/scan_machinery()
teleporter = findteleporter()
beacon = findbeacon()
/obj/machinery/computer/gulag_teleporter_computer/proc/findteleporter()
var/obj/machinery/gulag_teleporter/teleporterf = null
for(var/direction in GLOB.cardinals)
teleporterf = locate(/obj/machinery/gulag_teleporter, get_step(src, direction))
if(teleporterf && teleporterf.is_operational())
return teleporterf
/obj/machinery/computer/gulag_teleporter_computer/proc/findbeacon()
return locate(/obj/structure/gulag_beacon)
/obj/machinery/computer/gulag_teleporter_computer/proc/teleport(mob/user)
if(!id) //incase the ID was removed after the transfer timer was set.
say("Warning: Unable to transfer prisoner without a valid Prisoner ID inserted!")
return
var/id_goal_not_set
if(!id.goal)
id_goal_not_set = TRUE
id.goal = default_goal
say("[id]'s ID card goal defaulting to [id.goal] points.")
log_game("[key_name(user)] teleported [key_name(prisoner)] to the Labor Camp [COORD(beacon)] for [id_goal_not_set ? "default goal of ":""][id.goal] points.")
teleporter.handle_prisoner(id, temporary_record)
playsound(src, 'sound/weapons/emitter.ogg', 50, 1)
prisoner.forceMove(get_turf(beacon))
prisoner.Knockdown(40) // small travel dizziness
to_chat(prisoner, "<span class='warning'>The teleportation makes you a little dizzy.</span>")
new /obj/effect/particle_effect/sparks(get_turf(prisoner))
playsound(src, "sparks", 50, 1)
if(teleporter.locked)
teleporter.locked = FALSE
teleporter.toggle_open()
id = null
temporary_record = null
+1 -7
View File
@@ -22,12 +22,6 @@
/obj/machinery/computer/med_data/syndie
icon_keyboard = "syndie_key"
/obj/machinery/computer/med_data/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/card/id))
id_insert_scan(user)
else
return ..()
/obj/machinery/computer/med_data/ui_interact(mob/user)
. = ..()
if(isliving(user))
@@ -484,7 +478,7 @@
var/counter = 1
while(active2.fields[text("com_[]", counter)])
counter++
active2.fields[text("com_[]", counter)] = text("Made by [] ([]) on [] [], []<BR>[]", authenticated, rank, STATION_TIME_TIMESTAMP("hh:mm:ss"), time2text(world.realtime, "MMM DD"), GLOB.year_integer+540, t1)
active2.fields[text("com_[]", counter)] = text("Made by [] ([]) on [] [], []<BR>[]", authenticated, rank, STATION_TIME_TIMESTAMP("hh:mm:ss"), time2text(world.realtime, "MMM DD"), GLOB.year_integer, t1)
else if(href_list["del_c"])
if((istype(active2, /datum/data/record) && active2.fields[text("com_[]", href_list["del_c"])]))
+3 -2
View File
@@ -35,7 +35,8 @@
//Someone needs to break down the dat += into chunks instead of long ass lines.
/obj/machinery/computer/secure_data/ui_interact(mob/user)
. = ..()
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE)
if(isliving(user))
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE)
if(src.z > 6)
to_chat(user, "<span class='boldannounce'>Unable to establish a connection</span>: \black You're too far away from the station!")
return
@@ -455,7 +456,7 @@ What a mess.*/
var/counter = 1
while(active2.fields[text("com_[]", counter)])
counter++
active2.fields[text("com_[]", counter)] = text("Made by [] ([]) on [] [], []<BR>[]", src.authenticated, src.rank, STATION_TIME_TIMESTAMP("hh:mm:ss"), time2text(world.realtime, "MMM DD"), GLOB.year_integer+540, t1)
active2.fields[text("com_[]", counter)] = text("Made by [] ([]) on [] [], []<BR>[]", src.authenticated, src.rank, STATION_TIME_TIMESTAMP("hh:mm:ss"), time2text(world.realtime, "MMM DD"), GLOB.year_integer, t1)
if("Delete Record (ALL)")
if(active1)
+5 -7
View File
@@ -370,16 +370,14 @@
O.find_target()
O.update_explanation_text()
if(!(O.target))
O.owner.objectives -= O
qdel(O)
if(mob_occupant.mind && mob_occupant.mind.assigned_role)
if(mob_occupant.mind)
//Handle job slot/tater cleanup.
var/job = mob_occupant.mind.assigned_role
SSjob.FreeRole(job)
if(mob_occupant.mind.objectives.len)
mob_occupant.mind.objectives.Cut()
mob_occupant.mind.special_role = null
if(mob_occupant.mind.assigned_role)
var/job = mob_occupant.mind.assigned_role
SSjob.FreeRole(job)
mob_occupant.mind.special_role = null
// Delete them from datacore.
+3 -3
View File
@@ -249,10 +249,10 @@
return 0
/obj/machinery/door/airlock/plasma/attackby(obj/item/C, mob/user, params)
if(C.is_hot() > 300)//If the temperature of the object is over 300, then ignite
if(C.get_temperature() > 300)//If the temperature of the object is over 300, then ignite
message_admins("Plasma airlock ignited by [ADMIN_LOOKUPFLW(user)] in [ADMIN_VERBOSEJMP(src)]")
log_game("Plasma airlock ignited by [key_name(user)] in [AREACOORD(src)]")
ignite(C.is_hot())
ignite(C.get_temperature())
else
return ..()
@@ -499,7 +499,7 @@
SEND_SOUND(L, sound(pick('sound/hallucinations/turn_around1.ogg','sound/hallucinations/turn_around2.ogg'),0,1,50))
flash_color(L, flash_color="#960000", flash_time=20)
L.Knockdown(40)
L.throw_at(throwtarget, 5, 1,src)
L.throw_at(throwtarget, 5, 1)
return 0
/obj/machinery/door/airlock/cult/proc/conceal()
+6 -5
View File
@@ -24,6 +24,8 @@ Possible to do for anyone motivated enough:
* Holopad
*/
GLOBAL_LIST_EMPTY(network_holopads)
#define HOLOPAD_PASSIVE_POWER_USAGE 1
#define HOLOGRAM_POWER_USAGE 2
@@ -55,7 +57,6 @@ Possible to do for anyone motivated enough:
var/record_user //user that inititiated the recording
var/obj/effect/overlay/holo_pad_hologram/replay_holo //replay hologram
var/static/force_answer_call = FALSE //Calls will be automatically answered after a couple rings, here for debugging
var/static/list/holopads = list()
var/obj/effect/overlay/holoray/ray
var/ringing = FALSE
var/offset = FALSE
@@ -96,7 +97,7 @@ Possible to do for anyone motivated enough:
/obj/machinery/holopad/Initialize()
. = ..()
if(on_network)
holopads += src
GLOB.network_holopads += src
/obj/machinery/holopad/Destroy()
if(outgoing_call)
@@ -116,7 +117,7 @@ Possible to do for anyone motivated enough:
QDEL_NULL(disk)
holopads -= src
GLOB.network_holopads -= src
return ..()
/obj/machinery/holopad/power_change()
@@ -260,7 +261,7 @@ Possible to do for anyone motivated enough:
temp += "<A href='?src=[REF(src)];mainmenu=1'>Main Menu</A>"
if(usr.loc == loc)
var/list/callnames = list()
for(var/I in holopads)
for(var/I in GLOB.network_holopads)
var/area/A = get_area(I)
if(A)
LAZYADD(callnames[A], I)
@@ -474,7 +475,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
var/obj/effect/overlay/holo_pad_hologram/h = masters[holo_owner]
if(!h || h.HC) //Holocalls can't change source.
return FALSE
for(var/pad in holopads)
for(var/pad in GLOB.network_holopads)
var/obj/machinery/holopad/another = pad
if(another == src)
continue
+1 -1
View File
@@ -515,7 +515,7 @@ GLOBAL_LIST_EMPTY(allCasters)
if(href_list["set_channel_name"])
channel_name = stripped_input(usr, "Provide a Feed Channel Name", "Network Channel Handler", "", MAX_NAME_LEN)
while (findtext(channel_name," ") == 1)
channel_name = copytext(channel_name,2,lentext(channel_name)+1)
channel_name = copytext(channel_name,2,length(channel_name)+1)
updateUsrDialog()
else if(href_list["set_channel_lock"])
c_locked = !c_locked
@@ -562,6 +562,7 @@
//Shooting Code:
A.preparePixelProjectile(target, T)
A.firer = src
A.fired_from = src
A.fire()
return A
@@ -646,6 +647,7 @@
has_cover = 0
scan_range = 9
req_access = list(ACCESS_SYNDICATE)
mode = TURRET_LETHAL
stun_projectile = /obj/item/projectile/bullet
lethal_projectile = /obj/item/projectile/bullet
lethal_projectile_sound = 'sound/weapons/gunshot.ogg'
@@ -694,6 +696,24 @@
stun_projectile = /obj/item/projectile/bullet/syndicate_turret
lethal_projectile = /obj/item/projectile/bullet/syndicate_turret
/obj/machinery/porta_turret/syndicate/shuttle
scan_range = 9
shot_delay = 3
stun_projectile = /obj/item/projectile/bullet/p50/penetrator/shuttle
lethal_projectile = /obj/item/projectile/bullet/p50/penetrator/shuttle
lethal_projectile_sound = 'sound/weapons/gunshot_smg.ogg'
stun_projectile_sound = 'sound/weapons/gunshot_smg.ogg'
armor = list("melee" = 50, "bullet" = 30, "laser" = 30, "energy" = 30, "bomb" = 80, "bio" = 0, "rad" = 0, "fire" = 90, "acid" = 90)
/obj/machinery/porta_turret/syndicate/shuttle/target(atom/movable/target)
if(target)
setDir(get_dir(base, target))//even if you can't shoot, follow the target
shootAt(target)
addtimer(CALLBACK(src, .proc/shootAt, target), 5)
addtimer(CALLBACK(src, .proc/shootAt, target), 10)
addtimer(CALLBACK(src, .proc/shootAt, target), 15)
return TRUE
/obj/machinery/porta_turret/ai
faction = list("silicon")
nonlethal_projectile = /obj/item/projectile/beam/disabler

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