Merge branch 'tray-and-jar' of https://github.com/timothyteakettle/Citadel-Station-13 into tray-and-jar
This commit is contained in:
@@ -145,4 +145,19 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204
|
||||
/// If the thing can reflect light (lasers/energy)
|
||||
#define RICOCHET_SHINY (1<<0)
|
||||
/// If the thing can reflect matter (bullets/bomb shrapnel)
|
||||
#define RICOCHET_HARD (1<<1)
|
||||
#define RICOCHET_HARD (1<<1)
|
||||
|
||||
#define KEEP_TOGETHER_ORIGINAL "keep_together_original"
|
||||
|
||||
//setter for KEEP_TOGETHER to allow for multiple sources to set and unset it
|
||||
#define ADD_KEEP_TOGETHER(x, source)\
|
||||
if ((x.appearance_flags & KEEP_TOGETHER) && !HAS_TRAIT(x, TRAIT_KEEP_TOGETHER)) ADD_TRAIT(x, TRAIT_KEEP_TOGETHER, KEEP_TOGETHER_ORIGINAL); \
|
||||
ADD_TRAIT(x, TRAIT_KEEP_TOGETHER, source);\
|
||||
x.appearance_flags |= KEEP_TOGETHER
|
||||
|
||||
#define REMOVE_KEEP_TOGETHER(x, source)\
|
||||
REMOVE_TRAIT(x, TRAIT_KEEP_TOGETHER, source);\
|
||||
if(HAS_TRAIT_FROM_ONLY(x, TRAIT_KEEP_TOGETHER, KEEP_TOGETHER_ORIGINAL))\
|
||||
REMOVE_TRAIT(x, TRAIT_KEEP_TOGETHER, KEEP_TOGETHER_ORIGINAL);\
|
||||
else if(!HAS_TRAIT(x, TRAIT_KEEP_TOGETHER))\
|
||||
x.appearance_flags &= ~KEEP_TOGETHER
|
||||
|
||||
@@ -52,3 +52,4 @@
|
||||
#define ORGAN_VITAL (1<<4) //Currently only the brain
|
||||
#define ORGAN_NO_SPOIL (1<<5) //Do not spoil under any circumstances
|
||||
#define ORGAN_NO_DISMEMBERMENT (1<<6) //Immune to disembowelment.
|
||||
#define ORGAN_EDIBLE (1<<5) //is a snack? :D
|
||||
@@ -35,6 +35,7 @@
|
||||
#define COMSIG_PARENT_ATTACKBY "atom_attackby" //from base of atom/attackby(): (/obj/item, /mob/living, params)
|
||||
#define COMPONENT_NO_AFTERATTACK 1 //Return this in response if you don't want afterattack to be called
|
||||
#define COMSIG_ATOM_HULK_ATTACK "hulk_attack" //from base of atom/attack_hulk(): (/mob/living/carbon/human)
|
||||
#define COMSIG_ATOM_ATTACK_ANIMAL "attack_animal" //from base of atom/animal_attack(): (/mob/user)
|
||||
#define COMSIG_PARENT_EXAMINE "atom_examine" //from base of atom/examine(): (/mob, list/examine_return_text)
|
||||
#define COMSIG_ATOM_GET_EXAMINE_NAME "atom_examine_name" //from base of atom/get_examine_name(): (/mob, list/overrides)
|
||||
//Positions for overrides list
|
||||
@@ -140,10 +141,10 @@
|
||||
#define HEARING_SPEAKER 2
|
||||
// #define HEARING_LANGUAGE 3
|
||||
#define HEARING_RAW_MESSAGE 4
|
||||
/* #define HEARING_RADIO_FREQ 5
|
||||
#define HEARING_SPANS 6
|
||||
// #define HEARING_RADIO_FREQ 5
|
||||
// #define HEARING_SPANS 6
|
||||
#define HEARING_MESSAGE_MODE 7
|
||||
#define HEARING_SOURCE 8*/
|
||||
// #define HEARING_SOURCE 8
|
||||
#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)
|
||||
|
||||
@@ -197,6 +198,8 @@
|
||||
#define COMSIG_MOB_ANTAG_ON_GAIN "mob_antag_on_gain" //from base of /datum/antagonist/on_gain(): (antag_datum)
|
||||
|
||||
#define COMSIG_MOB_SPELL_CAN_CAST "mob_spell_can_cast" //from base of /obj/effect/proc_holder/spell/can_cast(): (spell)
|
||||
#define COMSIG_MOB_SWAP_HANDS "mob_swap_hands" //from base of mob/swap_hand(): (obj/item)
|
||||
#define COMPONENT_BLOCK_SWAP 1
|
||||
|
||||
// /client signals
|
||||
#define COMSIG_MOB_CLIENT_LOGIN "mob_client_login" //sent when a mob/login() finishes: (client)
|
||||
@@ -282,7 +285,13 @@
|
||||
#define COMSIG_ITEM_ATTACK_ZONE "item_attack_zone" //from base of mob/living/carbon/attacked_by(): (mob/living/carbon/target, mob/living/user, hit_zone)
|
||||
#define COMSIG_ITEM_IMBUE_SOUL "item_imbue_soul" //return a truthy value to prevent ensouling, checked in /obj/effect/proc_holder/spell/targeted/lichdom/cast(): (mob/user)
|
||||
#define COMSIG_ITEM_HIT_REACT "item_hit_react" //from base of obj/item/hit_reaction(): (list/args)
|
||||
#define COMSIG_ITEM_WEARERCROSSED "wearer_crossed" //called on item when crossed by something (): (/atom/movable)
|
||||
#define COMSIG_ITEM_WEARERCROSSED "wearer_crossed" //called on item when crossed by something (): (/atom/movable)
|
||||
#define COMSIG_ITEM_SHARPEN_ACT "sharpen_act" //from base of item/sharpener/attackby(): (amount, max)
|
||||
#define COMPONENT_BLOCK_SHARPEN_APPLIED 1
|
||||
#define COMPONENT_BLOCK_SHARPEN_BLOCKED 2
|
||||
#define COMPONENT_BLOCK_SHARPEN_ALREADY 4
|
||||
#define COMPONENT_BLOCK_SHARPEN_MAXED 8
|
||||
#define COMSIG_ITEM_MICROWAVE_ACT "microwave_act" //called on item when microwaved (): (obj/machinery/microwave/M)
|
||||
#define COMSIG_ITEM_WORN_OVERLAYS "item_worn_overlays" //from base of obj/item/worn_overlays(): (isinhands, icon_file, used_state, style_flags, list/overlays)
|
||||
// THE FOLLOWING TWO BLOCKS SHOULD RETURN BLOCK FLAGS AS DEFINED IN __DEFINES/combat.dm!
|
||||
#define COMSIG_ITEM_CHECK_BLOCK "check_block" //from base of obj/item/check_block(): (mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
|
||||
@@ -417,6 +426,11 @@
|
||||
#define COMSIG_TRY_STORAGE_RETURN_INVENTORY "storage_return_inventory" //(list/list_to_inject_results_into, recursively_search_inside_storages = TRUE)
|
||||
#define COMSIG_TRY_STORAGE_CAN_INSERT "storage_can_equip" //(obj/item/insertion_candidate, mob/user, silent) - returns bool
|
||||
|
||||
// /datum/component/two_handed signals
|
||||
#define COMSIG_TWOHANDED_WIELD "twohanded_wield" //from base of datum/component/two_handed/proc/wield(mob/living/carbon/user): (/mob/user)
|
||||
#define COMPONENT_TWOHANDED_BLOCK_WIELD 1
|
||||
#define COMSIG_TWOHANDED_UNWIELD "twohanded_unwield" //from base of datum/component/two_handed/proc/unwield(mob/living/carbon/user): (/mob/user)
|
||||
|
||||
// /datum/action signals
|
||||
#define COMSIG_ACTION_TRIGGER "action_trigger" //from base of datum/action/proc/Trigger(): (datum/action)
|
||||
#define COMPONENT_ACTION_BLOCK_TRIGGER 1
|
||||
|
||||
@@ -18,4 +18,8 @@
|
||||
#define DRINK_VERYGOOD 3
|
||||
#define DRINK_FANTASTIC 4
|
||||
#define FOOD_AMAZING 5
|
||||
#define RACE_DRINK 6
|
||||
#define RACE_DRINK 6
|
||||
|
||||
#define FOOD_IN_CONTAINER (1<<0)
|
||||
|
||||
#define STOP_SERVING_BREAKFAST (15 MINUTES)
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#define FOOTSTEP_GRASS "grass"
|
||||
#define FOOTSTEP_WATER "water"
|
||||
#define FOOTSTEP_LAVA "lava"
|
||||
#define FOOTSTEP_MEAT "meat"
|
||||
//barefoot sounds
|
||||
#define FOOTSTEP_WOOD_BAREFOOT "woodbarefoot"
|
||||
#define FOOTSTEP_WOOD_CLAW "woodclaw"
|
||||
@@ -89,6 +90,8 @@ GLOBAL_LIST_INIT(footstep, list(
|
||||
'sound/effects/footstep/lava1.ogg',
|
||||
'sound/effects/footstep/lava2.ogg',
|
||||
'sound/effects/footstep/lava3.ogg'), 100, 0),
|
||||
FOOTSTEP_MEAT = list(list(
|
||||
'sound/effects/meatslap.ogg'), 100, 0)
|
||||
))
|
||||
|
||||
//bare footsteps lists
|
||||
@@ -131,6 +134,8 @@ GLOBAL_LIST_INIT(barefootstep, list(
|
||||
'sound/effects/footstep/lava1.ogg',
|
||||
'sound/effects/footstep/lava2.ogg',
|
||||
'sound/effects/footstep/lava3.ogg'), 100, 0),
|
||||
FOOTSTEP_MEAT = list(list(
|
||||
'sound/effects/meatslap.ogg'), 100, 0)
|
||||
))
|
||||
|
||||
//claw footsteps lists
|
||||
@@ -173,6 +178,8 @@ GLOBAL_LIST_INIT(clawfootstep, list(
|
||||
'sound/effects/footstep/lava1.ogg',
|
||||
'sound/effects/footstep/lava2.ogg',
|
||||
'sound/effects/footstep/lava3.ogg'), 100, 0),
|
||||
FOOTSTEP_MEAT = list(list(
|
||||
'sound/effects/meatslap.ogg'), 100, 0)
|
||||
))
|
||||
|
||||
//heavy footsteps list
|
||||
@@ -189,4 +196,6 @@ GLOBAL_LIST_INIT(heavyfootstep, list(
|
||||
'sound/effects/footstep/lava1.ogg',
|
||||
'sound/effects/footstep/lava2.ogg',
|
||||
'sound/effects/footstep/lava3.ogg'), 100, 0),
|
||||
FOOTSTEP_MEAT = list(list(
|
||||
'sound/effects/meatslap.ogg'), 100, 0)
|
||||
))
|
||||
|
||||
@@ -135,6 +135,8 @@ GLOBAL_LIST_INIT(turfs_without_ground, typecacheof(list(
|
||||
|
||||
#define iscat(A) (istype(A, /mob/living/simple_animal/pet/cat))
|
||||
|
||||
#define isdog(A) (istype(A, /mob/living/simple_animal/pet/dog))
|
||||
|
||||
#define iscorgi(A) (istype(A, /mob/living/simple_animal/pet/dog/corgi))
|
||||
|
||||
#define ishostile(A) (istype(A, /mob/living/simple_animal/hostile))
|
||||
|
||||
@@ -4,8 +4,12 @@
|
||||
/// Hard materials, such as iron or metal
|
||||
#define MAT_CATEGORY_RIGID "rigid material"
|
||||
|
||||
///Use this flag on TRUE if you want the basic recipes
|
||||
#define MAT_CATEGORY_BASE_RECIPES "basic recipes"
|
||||
|
||||
/// Flag for atoms, this flag ensures it isn't re-colored by materials. Useful for snowflake icons such as default toolboxes.
|
||||
#define MATERIAL_COLOR (1<<0)
|
||||
#define MATERIAL_ADD_PREFIX (1<<1)
|
||||
#define MATERIAL_EFFECTS (1<<2)
|
||||
#define MATERIAL_AFFECT_STATISTICS (1<<3)
|
||||
#define MATERIAL_AFFECT_STATISTICS (1<<2)
|
||||
|
||||
#define MATERIAL_SOURCE(mat) "[mat.name]_material"
|
||||
@@ -432,6 +432,7 @@ GLOBAL_LIST_INIT(pda_reskins, list(PDA_SKIN_CLASSIC = 'icons/obj/pda.dmi', PDA_S
|
||||
//text files
|
||||
#define BRAIN_DAMAGE_FILE "traumas.json"
|
||||
#define ION_FILE "ion_laws.json"
|
||||
#define REDPILL_FILE "redpill.json"
|
||||
#define PIRATE_NAMES_FILE "pirates.json"
|
||||
|
||||
|
||||
@@ -461,7 +462,7 @@ GLOBAL_LIST_INIT(pda_reskins, list(PDA_SKIN_CLASSIC = 'icons/obj/pda.dmi', PDA_S
|
||||
#define EGG_LAYING_MESSAGES list("lays an egg.","squats down and croons.","begins making a huge racket.","begins clucking raucously.")
|
||||
|
||||
// list of all null rod weapons
|
||||
#define HOLY_WEAPONS /obj/item/nullrod, /obj/item/twohanded/dualsaber/hypereutactic/chaplain, /obj/item/gun/energy/laser/redtag/hitscan/chaplain, /obj/item/multitool/chaplain, /obj/item/clothing/gloves/fingerless/pugilist/chaplain, /obj/item/melee/baseball_bat/chaplain
|
||||
#define HOLY_WEAPONS /obj/item/nullrod, /obj/item/dualsaber/hypereutactic/chaplain, /obj/item/gun/energy/laser/redtag/hitscan/chaplain, /obj/item/multitool/chaplain, /obj/item/clothing/gloves/fingerless/pugilist/chaplain, /obj/item/melee/baseball_bat/chaplain
|
||||
|
||||
// Used by PDA and cartridge code to reduce repetitiveness of spritesheets
|
||||
#define PDAIMG(what) {"<span class="pda16x16 [#what]"></span>"}
|
||||
|
||||
@@ -98,6 +98,7 @@
|
||||
#define BRAIN_TRAUMA_MILD /datum/brain_trauma/mild
|
||||
#define BRAIN_TRAUMA_SEVERE /datum/brain_trauma/severe
|
||||
#define BRAIN_TRAUMA_SPECIAL /datum/brain_trauma/special
|
||||
#define BRAIN_TRAUMA_MAGIC /datum/brain_trauma/magic
|
||||
|
||||
#define TRAUMA_RESILIENCE_BASIC 1 //Curable with chems
|
||||
#define TRAUMA_RESILIENCE_SURGERY 2 //Curable with brain surgery
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/// How much someone is slowed from fireman carrying a human
|
||||
#define FIREMAN_CARRY_SLOWDOWN 0
|
||||
/// How much someone is slowed by piggybacking a human
|
||||
#define PIGGYBACK_CARRY_SLOWDOWN 1
|
||||
#define PIGGYBACK_CARRY_SLOWDOWN 0
|
||||
/// slowdown when in softcrit. Note that crawling slowdown will also apply at the same time!
|
||||
#define SOFTCRIT_ADD_SLOWDOWN 2
|
||||
/// slowdown when crawling
|
||||
|
||||
@@ -100,4 +100,10 @@
|
||||
///Ascending priority defines.
|
||||
#define MODIFIER_SKILL_PRIORITY_LOW 100
|
||||
#define MODIFIER_SKILL_PRIORITY_DEF 50
|
||||
#define MODIFIER_SKILL_PRIORITY_MAX 1 //max priority, meant for job/antag modifiers so they don't null out other (de)buffs
|
||||
#define MODIFIER_SKILL_PRIORITY_MAX 1 //max priority, meant for job/antag modifiers so they don't null out other (de)buffs
|
||||
|
||||
// UI Defines
|
||||
///Categories of skills, these will be displayed alphabetically.
|
||||
#define SKILL_UI_CAT_ENG "Engineering"
|
||||
#define SKILL_UI_CAT_MED "Medical"
|
||||
#define SKILL_UI_CAT_MISC "Misc"
|
||||
|
||||
@@ -61,6 +61,12 @@
|
||||
} while (0)
|
||||
#define HAS_TRAIT(target, trait) (target.status_traits ? (target.status_traits[trait] ? TRUE : FALSE) : FALSE)
|
||||
#define HAS_TRAIT_FROM(target, trait, source) (target.status_traits ? (target.status_traits[trait] ? (source in target.status_traits[trait]) : FALSE) : FALSE)
|
||||
#define HAS_TRAIT_FROM_ONLY(target, trait, source) (\
|
||||
target.status_traits ?\
|
||||
(target.status_traits[trait] ?\
|
||||
((source in target.status_traits[trait]) && (length(target.status_traits) == 1))\
|
||||
: FALSE)\
|
||||
: FALSE)
|
||||
#define HAS_TRAIT_NOT_FROM(target, trait, source) (target.status_traits ? (target.status_traits[trait] ? (length(target.status_traits[trait] - source) > 0) : FALSE) : FALSE)
|
||||
|
||||
//mob traits
|
||||
@@ -226,6 +232,8 @@
|
||||
#define VEHICLE_TRAIT "vehicle" // inherited from riding vehicles
|
||||
#define INNATE_TRAIT "innate"
|
||||
|
||||
///Used for managing KEEP_TOGETHER in [appearance_flags]
|
||||
#define TRAIT_KEEP_TOGETHER "keep-together"
|
||||
|
||||
// item traits
|
||||
#define TRAIT_NODROP "nodrop"
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
/proc/english_list(list/input, nothing_text = "nothing", and_text = " and ", comma_text = ", ", final_comma_text = "" )
|
||||
var/total = input.len
|
||||
if (!total)
|
||||
return "[nothing_text]"
|
||||
return nothing_text
|
||||
else if (total == 1)
|
||||
return "[input[1]]"
|
||||
else if (total == 2)
|
||||
|
||||
@@ -120,3 +120,8 @@ GLOBAL_VAR_INIT(cmp_field, "name")
|
||||
|
||||
/proc/cmp_item_block_priority_asc(obj/item/A, obj/item/B)
|
||||
return A.block_priority - B.block_priority
|
||||
|
||||
/proc/cmp_skill_categories(datum/skill/A, datum/skill/B)
|
||||
if(A.ui_category == B.ui_category)
|
||||
return sorttext(A.name, B.name)
|
||||
return sorttext(A.ui_category, B.ui_category)
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
|
||||
to_chat(world, "<BR><BR><BR><span class='big bold'>The round has ended.</span>")
|
||||
if(LAZYLEN(GLOB.round_end_notifiees))
|
||||
send2irc("Notice", "[GLOB.round_end_notifiees.Join(", ")] the round has ended.")
|
||||
world.TgsTargetedChatBroadcast("[GLOB.round_end_notifiees.Join(", ")] the round has ended.", FALSE)
|
||||
|
||||
for(var/I in round_end_events)
|
||||
var/datum/callback/cb = I
|
||||
|
||||
@@ -224,5 +224,10 @@ GLOBAL_LIST_INIT(admiral_messages, list("Do you know how expensive these station
|
||||
|
||||
GLOBAL_LIST_INIT(redacted_strings, list("\[REDACTED\]", "\[CLASSIFIED\]", "\[ARCHIVED\]", "\[EXPLETIVE DELETED\]", "\[EXPUNGED\]", "\[INFORMATION ABOVE YOUR SECURITY CLEARANCE\]", "\[MOVE ALONG CITIZEN\]", "\[NOTHING TO SEE HERE\]", "\[ACCESS DENIED\]"))
|
||||
|
||||
|
||||
GLOBAL_LIST_INIT(wisdoms, world.file2list("strings/wisdoms.txt"))
|
||||
|
||||
GLOBAL_LIST_INIT(speech_verbs, list("default","says","gibbers", "states", "chitters", "declares", "bellows", "buzzes" ,"beeps", "chirps" ,"hisses" ,"poofs" ,"rattles", "mewls" ,"barks", "blorbles", "squeaks", "squawks", "flutters"))
|
||||
|
||||
GLOBAL_LIST_INIT(roundstart_tongues, list("default","human tongue" = /obj/item/organ/tongue, "lizard tongue" = /obj/item/organ/tongue/lizard, "skeleton tongue" = /obj/item/organ/tongue/bone, "fly tongue" = /obj/item/organ/tongue/fly, "ipc tongue" = /obj/item/organ/tongue/robot/ipc))
|
||||
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
A.attack_animal(src)
|
||||
|
||||
/atom/proc/attack_animal(mob/user)
|
||||
return
|
||||
SEND_SIGNAL(src, COMSIG_ATOM_ATTACK_ANIMAL, user)
|
||||
|
||||
/mob/living/RestrainedClickOn(atom/A)
|
||||
return
|
||||
|
||||
@@ -104,7 +104,9 @@
|
||||
var/list/lines = world.file2list("[directory]/[filename]")
|
||||
var/list/_entries = entries
|
||||
var/list/postload_required = list()
|
||||
var/linenumber = 0
|
||||
for(var/L in lines)
|
||||
linenumber++
|
||||
L = trim(L)
|
||||
if(!L)
|
||||
continue
|
||||
@@ -132,7 +134,7 @@
|
||||
|
||||
if(entry == "$include")
|
||||
if(!value)
|
||||
log_config("Warning: Invalid $include directive: [value]")
|
||||
log_config("LINE [linenumber]: Invalid $include directive: [value]")
|
||||
else
|
||||
LoadEntries(value, stack)
|
||||
++.
|
||||
@@ -140,7 +142,7 @@
|
||||
|
||||
var/datum/config_entry/E = _entries[entry]
|
||||
if(!E)
|
||||
log_config("Unknown setting in configuration: '[entry]'")
|
||||
log_config("LINE [linenumber]: Unknown setting: '[entry]'")
|
||||
continue
|
||||
|
||||
if(lockthis)
|
||||
@@ -150,7 +152,7 @@
|
||||
var/datum/config_entry/new_ver = entries_by_type[E.deprecated_by]
|
||||
var/new_value = E.DeprecationUpdate(value)
|
||||
var/good_update = istext(new_value)
|
||||
log_config("Entry [entry] is deprecated and will be removed soon. Migrate to [new_ver.name]![good_update ? " Suggested new value is: [new_value]" : ""]")
|
||||
log_config("LINE [linenumber]: [entry] is deprecated and will be removed soon. Migrate to [new_ver.name]![good_update ? " Suggested new value is: [new_value]" : ""]")
|
||||
if(!warned_deprecated_configs)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, /proc/message_admins, "This server is using deprecated configuration settings. Please check the logs and update accordingly."), 0)
|
||||
warned_deprecated_configs = TRUE
|
||||
@@ -162,10 +164,10 @@
|
||||
|
||||
var/validated = E.ValidateAndSet(value, TRUE)
|
||||
if(!validated)
|
||||
log_config("Failed to validate setting \"[value]\" for [entry]")
|
||||
log_config("LINE [linenumber]: Failed to validate setting \"[value]\" for [entry]")
|
||||
else
|
||||
if(E.modified && !E.dupes_allowed)
|
||||
log_config("Duplicate setting for [entry] ([value], [E.resident_file]) detected! Using latest.")
|
||||
log_config("LINE [linenumber]: Duplicate setting for [entry] ([value], [E.resident_file]) detected! Using latest.")
|
||||
if(E.postload_required)
|
||||
postload_required[E] = TRUE
|
||||
|
||||
|
||||
@@ -168,12 +168,14 @@
|
||||
|
||||
/datum/config_entry/flag/join_with_mutant_humans //players can pick mutant bodyparts for humans before joining the game
|
||||
|
||||
/datum/config_entry/flag/no_summon_guns //No
|
||||
/datum/config_entry/flag/no_summon_guns //No
|
||||
|
||||
/datum/config_entry/flag/no_summon_magic //Fun
|
||||
|
||||
/datum/config_entry/flag/no_summon_events //Allowed
|
||||
|
||||
/datum/config_entry/flag/no_summon_traumas //!
|
||||
|
||||
/datum/config_entry/flag/no_intercept_report //Whether or not to send a communications intercept report roundstart. This may be overridden by gamemodes.
|
||||
|
||||
/datum/config_entry/number/arrivals_shuttle_dock_window //Time from when a player late joins on the arrivals shuttle to when the shuttle docks on the station
|
||||
|
||||
@@ -12,7 +12,7 @@ SUBSYSTEM_DEF(events)
|
||||
var/frequency_upper = 6000 //10 minutes upper bound. Basically an event will happen every 3 to 10 minutes.
|
||||
|
||||
var/list/holidays //List of all holidays occuring today or null if no holidays
|
||||
var/wizardmode = 0
|
||||
var/wizardmode = FALSE
|
||||
|
||||
/datum/controller/subsystem/events/Initialize(time, zlevel)
|
||||
for(var/type in typesof(/datum/round_event_control))
|
||||
@@ -91,6 +91,7 @@ SUBSYSTEM_DEF(events)
|
||||
if(. == EVENT_CANT_RUN)//we couldn't run this event for some reason, set its max_occurrences to 0
|
||||
E.max_occurrences = 0
|
||||
else if(. == EVENT_READY)
|
||||
E.random = TRUE
|
||||
E.runEvent(TRUE)
|
||||
|
||||
//allows a client to trigger an event
|
||||
|
||||
@@ -64,19 +64,33 @@ SUBSYSTEM_DEF(input)
|
||||
// Misc
|
||||
macroset_classic_input["Tab"] = "\".winset \\\"mainwindow.macro=[SKIN_MACROSET_CLASSIC_HOTKEYS] map.focus=true input.background-color=[COLOR_INPUT_DISABLED]\\\"\""
|
||||
macroset_classic_input["Escape"] = "\".winset \\\"input.text=\\\"\\\"\\\"\""
|
||||
|
||||
|
||||
// FINALLY, WE CAN DO SOMETHING MORE NORMAL FOR THE SNOWFLAKE-BUT-LESS KEYSET.
|
||||
|
||||
// HAHA - SIKE. Because of BYOND weirdness (tl;dr not specifically binding this way results in potentially duplicate chatboxes when
|
||||
// conflicts occur with something like say indicator vs say), we're going to snowflake this anyways
|
||||
var/list/hard_binds = list(
|
||||
"O" = "ooc",
|
||||
"T" = "say",
|
||||
"L" = "looc",
|
||||
"M" = "me"
|
||||
)
|
||||
var/list/hard_bind_anti_collision = list()
|
||||
var/list/anti_collision_modifiers = list("Ctrl", "Alt", "Shift", "Ctrl+Alt", "Ctrl+Shift", "Alt+Shift", "Ctrl+Alt+Shift")
|
||||
for(var/key in hard_binds)
|
||||
for(var/modifier in anti_collision_modifiers)
|
||||
hard_bind_anti_collision["[modifier]+[key]"] = ".NONSENSICAL_VERB_THAT_DOES_NOTHING"
|
||||
|
||||
macroset_classic_hotkey = list(
|
||||
"Any" = "\"KeyDown \[\[*\]\]\"",
|
||||
"Any+UP" = "\"KeyUp \[\[*\]\]\"",
|
||||
"Tab" = "\".winset \\\"mainwindow.macro=[SKIN_MACROSET_CLASSIC_INPUT] input.focus=true input.background-color=[COLOR_INPUT_ENABLED]\\\"\"",
|
||||
"Escape" = "\".winset \\\"input.text=\\\"\\\"\\\"\"",
|
||||
"Back" = "\".winset \\\"input.text=\\\"\\\"\\\"\"",
|
||||
"O" = "ooc",
|
||||
"T" = "say",
|
||||
"L" = "looc",
|
||||
"M" = "me"
|
||||
)
|
||||
|
||||
macroset_classic_hotkey |= hard_binds
|
||||
macroset_classic_hotkey |= hard_bind_anti_collision
|
||||
|
||||
// And finally, the modern set.
|
||||
macroset_hotkey = list(
|
||||
@@ -85,11 +99,10 @@ SUBSYSTEM_DEF(input)
|
||||
"Tab" = "\".winset \\\"input.focus=true?map.focus=true input.background-color=[COLOR_INPUT_DISABLED]:input.focus=true input.background-color=[COLOR_INPUT_ENABLED]\\\"\"",
|
||||
"Escape" = "\".winset \\\"input.text=\\\"\\\"\\\"\"",
|
||||
"Back" = "\".winset \\\"input.text=\\\"\\\"\\\"\"",
|
||||
"O" = "ooc",
|
||||
"T" = "say",
|
||||
"L" = "looc",
|
||||
"M" = "me"
|
||||
)
|
||||
|
||||
macroset_hotkey |= hard_binds
|
||||
macroset_hotkey |= hard_bind_anti_collision
|
||||
|
||||
// Badmins just wanna have fun ♪
|
||||
/datum/controller/subsystem/input/proc/refresh_client_macro_sets()
|
||||
@@ -104,3 +117,8 @@ SUBSYSTEM_DEF(input)
|
||||
for(var/i in 1 to clients.len)
|
||||
var/client/C = clients[i]
|
||||
C.keyLoop()
|
||||
|
||||
/// *sigh
|
||||
/client/verb/NONSENSICAL_VERB_THAT_DOES_NOTHING()
|
||||
set name = ".NONSENSICAL_VERB_THAT_DOES_NOTHING"
|
||||
set hidden = TRUE
|
||||
|
||||
@@ -10,24 +10,52 @@ SUBSYSTEM_DEF(materials)
|
||||
var/list/materials
|
||||
///Dictionary of category || list of material refs
|
||||
var/list/materials_by_category
|
||||
///Dictionary of category || list of material types, mostly used by rnd machines like autolathes.
|
||||
var/list/materialtypes_by_category
|
||||
///A cache of all material combinations that have been used
|
||||
var/list/list/material_combos
|
||||
///List of stackcrafting recipes for materials using rigid materials
|
||||
var/list/rigid_stack_recipes = list(
|
||||
new /datum/stack_recipe("chair", /obj/structure/chair/greyscale, one_per_turf = TRUE, on_floor = TRUE, applies_mats = TRUE),
|
||||
new /datum/stack_recipe("toilet", /obj/structure/toilet/greyscale, one_per_turf = TRUE, on_floor = TRUE, applies_mats = TRUE),
|
||||
new /datum/stack_recipe("sink", /obj/structure/sink/greyscale, one_per_turf = TRUE, on_floor = TRUE, applies_mats = TRUE),
|
||||
new /datum/stack_recipe("Floor tile", /obj/item/stack/tile/material, 1, 4, 20, applies_mats = TRUE)
|
||||
)
|
||||
|
||||
///Ran on initialize, populated the materials and materials_by_category dictionaries with their appropiate vars (See these variables for more info)
|
||||
/datum/controller/subsystem/materials/proc/InitializeMaterials()
|
||||
materials = list()
|
||||
materials_by_category = list()
|
||||
materialtypes_by_category = list()
|
||||
material_combos = list()
|
||||
for(var/type in subtypesof(/datum/material))
|
||||
var/datum/material/ref = new type
|
||||
materials[type] = ref
|
||||
for(var/c in ref.categories)
|
||||
materials_by_category[c] += list(ref)
|
||||
materialtypes_by_category[c] += list(type)
|
||||
|
||||
/datum/controller/subsystem/materials/proc/GetMaterialRef(datum/material/fakemat)
|
||||
if(!materials)
|
||||
InitializeMaterials()
|
||||
return materials[fakemat] || fakemat
|
||||
return materials[fakemat] || fakemat
|
||||
|
||||
|
||||
///Returns a list to be used as an object's custom_materials. Lists will be cached and re-used based on the parameters.
|
||||
/datum/controller/subsystem/materials/proc/FindOrCreateMaterialCombo(list/materials_declaration, multiplier)
|
||||
if(!material_combos)
|
||||
InitializeMaterials()
|
||||
var/list/combo_params = list()
|
||||
for(var/x in materials_declaration)
|
||||
var/datum/material/mat = x
|
||||
var/path_name = ispath(mat) ? "[mat]" : "[mat.type]"
|
||||
combo_params += "[path_name]=[materials_declaration[mat] * multiplier]"
|
||||
sortTim(combo_params, /proc/cmp_text_asc) // We have to sort now in case the declaration was not in order
|
||||
var/combo_index = combo_params.Join("-")
|
||||
var/list/combo = material_combos[combo_index]
|
||||
if(!combo)
|
||||
combo = list()
|
||||
for(var/mat in materials_declaration)
|
||||
combo[GetMaterialRef(mat)] = materials_declaration[mat] * multiplier
|
||||
material_combos[combo_index] = combo
|
||||
return combo
|
||||
|
||||
@@ -79,7 +79,7 @@ SUBSYSTEM_DEF(traumas)
|
||||
/obj/item/pda/clown, /obj/item/grown/bananapeel)),
|
||||
|
||||
"greytide" = typecacheof(list(/obj/item/clothing/under/color/grey, /obj/item/melee/baton/cattleprod,
|
||||
/obj/item/twohanded/spear, /obj/item/clothing/mask/gas)),
|
||||
/obj/item/spear, /obj/item/clothing/mask/gas)),
|
||||
|
||||
"lizards" = typecacheof(list(/obj/item/toy/plush/lizardplushie, /obj/item/reagent_containers/food/snacks/kebab/tail,
|
||||
/obj/item/organ/tail/lizard, /obj/item/reagent_containers/food/drinks/bottle/lizardwine)),
|
||||
@@ -120,7 +120,7 @@ SUBSYSTEM_DEF(traumas)
|
||||
/obj/item/card/id/captains_spare, /obj/item/card/id/centcom, /obj/machinery/door/airlock/command)),
|
||||
|
||||
"the supernatural" = typecacheof(list(/obj/structure/destructible/cult, /obj/item/tome,
|
||||
/obj/item/melee/cultblade, /obj/item/twohanded/required/cult_bastard, /obj/item/restraints/legcuffs/bola/cult,
|
||||
/obj/item/melee/cultblade, /obj/item/cult_bastard, /obj/item/restraints/legcuffs/bola/cult,
|
||||
/obj/item/clothing/suit/cultrobes, /obj/item/clothing/suit/space/hardsuit/cult,
|
||||
/obj/item/clothing/suit/hooded/cultrobes, /obj/item/clothing/head/hooded/cult_hoodie, /obj/effect/rune,
|
||||
/obj/item/stack/sheet/runed_metal, /obj/machinery/door/airlock/cult, /obj/singularity/narsie,
|
||||
@@ -151,7 +151,7 @@ SUBSYSTEM_DEF(traumas)
|
||||
|
||||
"anime" = typecacheof(list(/obj/item/clothing/under/costume/schoolgirl, /obj/item/katana, /obj/item/reagent_containers/food/snacks/sashimi, /obj/item/reagent_containers/food/snacks/chawanmushi,
|
||||
/obj/item/reagent_containers/food/drinks/bottle/sake, /obj/item/throwing_star, /obj/item/clothing/head/kitty/genuine, /obj/item/clothing/suit/space/space_ninja,
|
||||
/obj/item/clothing/mask/gas/space_ninja, /obj/item/clothing/shoes/space_ninja, /obj/item/clothing/gloves/space_ninja, /obj/item/twohanded/vibro_weapon,
|
||||
/obj/item/clothing/mask/gas/space_ninja, /obj/item/clothing/shoes/space_ninja, /obj/item/clothing/gloves/space_ninja, /obj/item/vibro_weapon,
|
||||
/obj/item/nullrod/scythe/vibro, /obj/item/energy_katana, /obj/item/toy/katana, /obj/item/nullrod/claymore/katana, /obj/structure/window/paperframe, /obj/structure/mineral_door/paperframe)),
|
||||
|
||||
"mimes" = typecacheof(list(/obj/item/pda/mime, /obj/item/clothing/under/rank/civilian/mime, /obj/item/clothing/mask/gas/mime,
|
||||
@@ -168,7 +168,7 @@ SUBSYSTEM_DEF(traumas)
|
||||
/obj/machinery/porta_turret/syndicate, /obj/structure/closet/syndicate, /obj/machinery/suit_storage_unit/syndicate, /obj/item/clothing/under/syndicate, /obj/item/folder/syndicate, /obj/item/documents/syndicate, /obj/item/clothing/glasses/phantomthief/syndicate, /obj/item/antag_spawner/nuke_ops, /obj/item/storage/box/syndicate,
|
||||
/obj/structure/fluff/empty_sleeper/syndicate, /obj/item/implant/radio/syndicate, /obj/item/clothing/head/helmet/space/syndicate, /obj/machinery/nuclearbomb/syndicate, /obj/item/grenade/syndieminibomb, /obj/item/storage/backpack/duffelbag/syndie, /obj/item/gun/ballistic/automatic/pistol, /obj/item/gun/ballistic/revolver,
|
||||
/obj/item/gun/ballistic/automatic/shotgun/bulldog, /obj/item/gun/ballistic/automatic/c20r, /obj/item/gun/ballistic/automatic/m90, /obj/item/gun/ballistic/automatic/l6_saw, /obj/item/storage/belt/grenade/full, /obj/item/gun/ballistic/automatic/sniper_rifle/syndicate, /obj/item/gun/energy/kinetic_accelerator/crossbow,
|
||||
/obj/item/melee/transforming/energy/sword/saber, /obj/item/twohanded/dualsaber, /obj/item/melee/powerfist, /obj/item/storage/box/syndie_kit, /obj/item/grenade/spawnergrenade/manhacks, /obj/item/grenade/chem_grenade/bioterrorfoam, /obj/item/reagent_containers/spray/chemsprayer/bioterror, /obj/item/ammo_box/magazine/m10mm,
|
||||
/obj/item/melee/transforming/energy/sword/saber, /obj/item/dualsaber, /obj/item/melee/powerfist, /obj/item/storage/box/syndie_kit, /obj/item/grenade/spawnergrenade/manhacks, /obj/item/grenade/chem_grenade/bioterrorfoam, /obj/item/reagent_containers/spray/chemsprayer/bioterror, /obj/item/ammo_box/magazine/m10mm,
|
||||
/obj/item/ammo_box/magazine/pistolm9mm, /obj/item/ammo_box/a357, /obj/item/ammo_box/magazine/m12g, /obj/item/ammo_box/magazine/mm195x129, /obj/item/antag_spawner/nuke_ops, /obj/mecha/combat/gygax/dark, /obj/mecha/combat/marauder/mauler, /obj/item/soap/syndie, /obj/item/gun/syringe/syndicate, /obj/item/cartridge/virus/syndicate,
|
||||
/obj/item/cartridge/virus/frame, /obj/item/chameleon, /obj/item/storage/box/syndie_kit/cutouts, /obj/item/clothing/suit/space/hardsuit/syndi, /obj/item/card/emag, /obj/item/storage/toolbox/syndicate, /obj/item/storage/book/bible/syndicate, /obj/item/encryptionkey/binary, /obj/item/encryptionkey/syndicate, /obj/item/aiModule/syndicate,
|
||||
/obj/item/clothing/shoes/magboots/syndie, /obj/item/powersink, /obj/item/sbeacondrop, /obj/item/sbeacondrop/bomb, /obj/item/syndicatedetonator, /obj/item/shield/energy, /obj/item/assault_pod, /obj/item/slimepotion/slime/sentience/nuclear, /obj/item/stack/telecrystal, /obj/item/jammer, /obj/item/codespeak_manual/unlimited,
|
||||
@@ -176,7 +176,7 @@ SUBSYSTEM_DEF(traumas)
|
||||
/obj/machinery/computer/pod/old/syndicate, /obj/machinery/vending/medical/syndicate_access, /obj/item/mmi/syndie, /obj/item/target/syndicate, /obj/machinery/vending/cigarette/syndicate, /obj/item/robot_module/syndicate, /obj/item/clothing/mask/gas/syndicate, /obj/machinery/power/singularity_beacon/syndicate, /obj/item/clothing/head/syndicatefake,
|
||||
/obj/item/radio/headset/syndicate, /obj/item/gun/ballistic/automatic/pistol/antitank/syndicate, /obj/item/pda/syndicate, /obj/item/clothing/suit/armor/vest/capcarapace/syndicate, /obj/item/gun/ballistic/automatic/flechette, /obj/item/ammo_box/magazine/flechette, /obj/item/clothing/suit/toggle/lawyer/black/syndie, /obj/item/melee/transforming/energy/sword/cx/traitor,
|
||||
/obj/structure/sign/poster/contraband/syndicate_pistol, /obj/structure/sign/poster/contraband/syndicate_recruitment, /obj/item/bedsheet/syndie, /obj/item/borg/upgrade/syndicate, /obj/item/tank/jetpack/oxygen/harness, /obj/item/firing_pin/implant/pindicate, /obj/item/reagent_containers/glass/bottle/traitor, /obj/item/storage/belt/military,
|
||||
/obj/item/twohanded/shockpaddles/syndicate, /obj/item/clothing/mask/cigarette/syndicate, /obj/item/toy/plush/nukeplushie)),
|
||||
/obj/item/shockpaddles/syndicate, /obj/item/clothing/mask/cigarette/syndicate, /obj/item/toy/plush/nukeplushie)),
|
||||
|
||||
"eye" = typecacheof(list(/obj/item/organ/eyes, /obj/item/reagent_containers/syringe))
|
||||
)
|
||||
|
||||
@@ -5,6 +5,61 @@
|
||||
/datum/brain_trauma/magic
|
||||
resilience = TRAUMA_RESILIENCE_LOBOTOMY
|
||||
|
||||
/datum/brain_trauma/magic/lumiphobia
|
||||
name = "Lumiphobia"
|
||||
desc = "Patient has an inexplicable adverse reaction to light."
|
||||
scan_desc = "light hypersensitivity"
|
||||
gain_text = "<span class='warning'>You feel a craving for darkness.</span>"
|
||||
lose_text = "<span class='notice'>Light no longer bothers you.</span>"
|
||||
var/next_damage_warning = 0
|
||||
|
||||
/datum/brain_trauma/magic/lumiphobia/on_life()
|
||||
..()
|
||||
var/turf/T = owner.loc
|
||||
if(istype(T))
|
||||
var/light_amount = T.get_lumcount()
|
||||
if(light_amount > SHADOW_SPECIES_LIGHT_THRESHOLD) //if there's enough light, start dying
|
||||
if(world.time > next_damage_warning)
|
||||
to_chat(owner, "<span class='warning'><b>The light burns you!</b></span>")
|
||||
next_damage_warning = world.time + 100 //Avoid spamming
|
||||
owner.take_overall_damage(0,3)
|
||||
|
||||
/datum/brain_trauma/magic/poltergeist
|
||||
name = "Poltergeist"
|
||||
desc = "Patient appears to be targeted by a violent invisible entity."
|
||||
scan_desc = "paranormal activity"
|
||||
gain_text = "<span class='warning'>You feel a hateful presence close to you.</span>"
|
||||
lose_text = "<span class='notice'>You feel the hateful presence fade away.</span>"
|
||||
|
||||
/datum/brain_trauma/magic/poltergeist/on_life()
|
||||
..()
|
||||
if(prob(4))
|
||||
var/most_violent = -1 //So it can pick up items with 0 throwforce if there's nothing else
|
||||
var/obj/item/throwing
|
||||
for(var/obj/item/I in view(5, get_turf(owner)))
|
||||
if(I.anchored)
|
||||
continue
|
||||
if(I.throwforce > most_violent)
|
||||
most_violent = I.throwforce
|
||||
throwing = I
|
||||
if(throwing)
|
||||
throwing.throw_at(owner, 8, 2)
|
||||
|
||||
/datum/brain_trauma/magic/antimagic
|
||||
name = "Athaumasia"
|
||||
desc = "Patient is completely inert to magical forces."
|
||||
scan_desc = "thaumic blank"
|
||||
gain_text = "<span class='notice'>You realize that magic cannot be real.</span>"
|
||||
lose_text = "<span class='notice'>You realize that magic might be real.</span>"
|
||||
|
||||
/datum/brain_trauma/magic/antimagic/on_gain()
|
||||
ADD_TRAIT(owner, TRAIT_ANTIMAGIC, TRAUMA_TRAIT)
|
||||
..()
|
||||
|
||||
/datum/brain_trauma/magic/antimagic/on_lose()
|
||||
REMOVE_TRAIT(owner, TRAIT_ANTIMAGIC, TRAUMA_TRAIT)
|
||||
..()
|
||||
|
||||
/datum/brain_trauma/magic/stalker
|
||||
name = "Stalking Phantom"
|
||||
desc = "Patient is stalked by a phantom only they can see."
|
||||
|
||||
@@ -119,8 +119,9 @@
|
||||
|
||||
/datum/brain_trauma/severe/paralysis/spinesnapped
|
||||
random_gain = FALSE
|
||||
clonable = FALSE
|
||||
paralysis_type = "legs"
|
||||
resilience = TRAUMA_RESILIENCE_LOBOTOMY
|
||||
resilience = TRAUMA_RESILIENCE_LOBOTOMY // It shouldn't fix severed spinal cords really, but there is no specific surgery for that yet.
|
||||
|
||||
/datum/brain_trauma/severe/narcolepsy
|
||||
name = "Narcolepsy"
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/item/glasswork/glasses
|
||||
name = "Hand Made Glasses"
|
||||
desc = "Hande made glasses that have not been polished at all making them useless. Selling them could still be worth a bit of credits."
|
||||
name = "Handmade Glasses"
|
||||
desc = "Handmade glasses that have not been polished at all making them useless. Selling them could still be worth a few credits."
|
||||
icon = 'icons/obj/glass_ware.dmi'
|
||||
icon_state = "frames_2"
|
||||
@@ -92,7 +92,7 @@
|
||||
time = 150
|
||||
subcategory = CAT_MISCELLANEOUS
|
||||
category = CAT_MISC
|
||||
always_availible = FALSE // Disabled til learned
|
||||
always_availible = FALSE // Disabled until learned
|
||||
|
||||
|
||||
/datum/crafting_recipe/bloodsucker/candelabrum
|
||||
@@ -244,7 +244,7 @@
|
||||
|
||||
/datum/crafting_recipe/rcl
|
||||
name = "Makeshift Rapid Cable Layer"
|
||||
result = /obj/item/twohanded/rcl/ghetto
|
||||
result = /obj/item/rcl/ghetto
|
||||
time = 40
|
||||
tools = list(TOOL_WELDER, TOOL_SCREWDRIVER, TOOL_WRENCH)
|
||||
reqs = list(/obj/item/stack/sheet/metal = 15)
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
/datum/crafting_recipe/bonespear
|
||||
name = "Bone Spear"
|
||||
result = /obj/item/twohanded/bonespear
|
||||
result = /obj/item/spear/bonespear
|
||||
time = 30
|
||||
reqs = list(/obj/item/stack/sheet/bone = 4,
|
||||
/obj/item/stack/sheet/sinew = 1)
|
||||
@@ -58,7 +58,7 @@
|
||||
|
||||
/datum/crafting_recipe/boneaxe
|
||||
name = "Bone Axe"
|
||||
result = /obj/item/twohanded/fireaxe/boneaxe
|
||||
result = /obj/item/fireaxe/boneaxe
|
||||
time = 50
|
||||
reqs = list(/obj/item/stack/sheet/bone = 6,
|
||||
/obj/item/stack/sheet/sinew = 3)
|
||||
@@ -74,20 +74,20 @@
|
||||
/datum/crafting_recipe/headpike
|
||||
name = "Spike Head (Glass Spear)"
|
||||
time = 65
|
||||
reqs = list(/obj/item/twohanded/spear = 1,
|
||||
reqs = list(/obj/item/spear = 1,
|
||||
/obj/item/bodypart/head = 1)
|
||||
parts = list(/obj/item/bodypart/head = 1,
|
||||
/obj/item/twohanded/spear = 1)
|
||||
/obj/item/spear = 1)
|
||||
result = /obj/structure/headpike
|
||||
category = CAT_PRIMAL
|
||||
|
||||
/datum/crafting_recipe/headpikebone
|
||||
name = "Spike Head (Bone Spear)"
|
||||
time = 65
|
||||
reqs = list(/obj/item/twohanded/bonespear = 1,
|
||||
reqs = list(/obj/item/spear/bonespear = 1,
|
||||
/obj/item/bodypart/head = 1)
|
||||
parts = list(/obj/item/bodypart/head = 1,
|
||||
/obj/item/twohanded/bonespear = 1)
|
||||
/obj/item/spear/bonespear = 1)
|
||||
result = /obj/structure/headpike/bone
|
||||
category = CAT_PRIMAL
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
/datum/crafting_recipe/spear
|
||||
name = "Spear"
|
||||
result = /obj/item/twohanded/spear
|
||||
result = /obj/item/spear
|
||||
reqs = list(/obj/item/restraints/handcuffs/cable = 1,
|
||||
/obj/item/shard = 1,
|
||||
/obj/item/stack/rods = 1)
|
||||
@@ -110,7 +110,7 @@
|
||||
|
||||
/datum/crafting_recipe/chainsaw
|
||||
name = "Chainsaw"
|
||||
result = /obj/item/twohanded/required/chainsaw
|
||||
result = /obj/item/chainsaw
|
||||
reqs = list(/obj/item/circular_saw = 1,
|
||||
/obj/item/stack/cable_coil = 3,
|
||||
/obj/item/stack/sheet/plasteel = 5)
|
||||
@@ -141,7 +141,7 @@
|
||||
result = /obj/item/bombcore/chemical
|
||||
reqs = list(
|
||||
/obj/item/stock_parts/matter_bin = 1,
|
||||
/obj/item/twohanded/required/gibtonite = 1,
|
||||
/obj/item/gibtonite = 1,
|
||||
/obj/item/grenade/chem_grenade = 2
|
||||
)
|
||||
parts = list(/obj/item/stock_parts/matter_bin = 1, /obj/item/grenade/chem_grenade = 2)
|
||||
@@ -173,10 +173,10 @@
|
||||
|
||||
/datum/crafting_recipe/lance
|
||||
name = "Explosive Lance (Grenade)"
|
||||
result = /obj/item/twohanded/spear
|
||||
reqs = list(/obj/item/twohanded/spear = 1,
|
||||
result = /obj/item/spear
|
||||
reqs = list(/obj/item/spear = 1,
|
||||
/obj/item/grenade = 1)
|
||||
parts = list(/obj/item/twohanded/spear = 1,
|
||||
parts = list(/obj/item/spear = 1,
|
||||
/obj/item/grenade = 1)
|
||||
time = 15
|
||||
category = CAT_WEAPONRY
|
||||
|
||||
@@ -0,0 +1,244 @@
|
||||
/*!
|
||||
This component makes it possible to make things edible. What this means is that you can take a bite or force someone to take a bite (in the case of items).
|
||||
These items take a specific time to eat, and can do most of the things our original food items could.
|
||||
Behavior that's still missing from this component that original food items had that should either be put into seperate components or somewhere else:
|
||||
Components:
|
||||
Drying component (jerky etc)
|
||||
Customizable component (custom pizzas etc)
|
||||
Processable component (Slicing and cooking behavior essentialy, making it go from item A to B when conditions are met.)
|
||||
Dunkable component (Dunking things into reagent containers to absorb a specific amount of reagents)
|
||||
Misc:
|
||||
Something for cakes (You can store things inside)
|
||||
*/
|
||||
/datum/component/edible
|
||||
///Amount of reagents taken per bite
|
||||
var/bite_consumption = 2
|
||||
///Amount of bites taken so far
|
||||
var/bitecount = 0
|
||||
///Flags for food
|
||||
var/food_flags = NONE
|
||||
///Bitfield of the types of this food
|
||||
var/foodtypes = NONE
|
||||
///Amount of seconds it takes to eat this food
|
||||
var/eat_time = 30
|
||||
///Defines how much it lowers someones satiety (Need to eat, essentialy)
|
||||
var/junkiness = 0
|
||||
///Message to send when eating
|
||||
var/list/eatverbs
|
||||
///Callback to be ran for when you take a bite of something
|
||||
var/datum/callback/after_eat
|
||||
///Last time we checked for food likes
|
||||
var/last_check_time
|
||||
|
||||
/datum/component/edible/Initialize(list/initial_reagents, food_flags = NONE, foodtypes = NONE, volume = 50, eat_time = 30, list/tastes, list/eatverbs = list("bite","chew","nibble","gnaw","gobble","chomp"), bite_consumption = 2, datum/callback/after_eat)
|
||||
if(!isatom(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
RegisterSignal(parent, COMSIG_PARENT_EXAMINE, .proc/examine)
|
||||
RegisterSignal(parent, COMSIG_ATOM_ATTACK_ANIMAL, .proc/UseByAnimal)
|
||||
if(isitem(parent))
|
||||
RegisterSignal(parent, COMSIG_ITEM_ATTACK, .proc/UseFromHand)
|
||||
else if(isturf(parent))
|
||||
RegisterSignal(parent, COMSIG_ATOM_ATTACK_HAND, .proc/TryToEatTurf)
|
||||
|
||||
src.bite_consumption = bite_consumption
|
||||
src.food_flags = food_flags
|
||||
src.foodtypes = foodtypes
|
||||
src.eat_time = eat_time
|
||||
src.eatverbs = eatverbs
|
||||
src.junkiness = junkiness
|
||||
src.after_eat = after_eat
|
||||
|
||||
var/atom/owner = parent
|
||||
|
||||
owner.create_reagents(volume, INJECTABLE)
|
||||
|
||||
if(initial_reagents)
|
||||
for(var/rid in initial_reagents)
|
||||
var/amount = initial_reagents[rid]
|
||||
if(tastes && tastes.len && (rid == /datum/reagent/consumable/nutriment || rid == /datum/reagent/consumable/nutriment/vitamin))
|
||||
owner.reagents.add_reagent(rid, amount, tastes.Copy())
|
||||
else
|
||||
owner.reagents.add_reagent(rid, amount)
|
||||
|
||||
/datum/component/edible/proc/examine(datum/source, mob/user, list/examine_list)
|
||||
if(!(food_flags & FOOD_IN_CONTAINER))
|
||||
switch (bitecount)
|
||||
if (0)
|
||||
return
|
||||
if(1)
|
||||
examine_list += "[parent] was bitten by someone!"
|
||||
if(2,3)
|
||||
examine_list += "[parent] was bitten [bitecount] times!"
|
||||
else
|
||||
examine_list += "[parent] was bitten multiple times!"
|
||||
|
||||
/datum/component/edible/proc/UseFromHand(obj/item/source, mob/living/M, mob/living/user)
|
||||
return TryToEat(M, user)
|
||||
|
||||
/datum/component/edible/proc/TryToEatTurf(datum/source, mob/user)
|
||||
return TryToEat(user, user)
|
||||
|
||||
///All the checks for the act of eating itself and
|
||||
/datum/component/edible/proc/TryToEat(mob/living/eater, mob/living/feeder)
|
||||
|
||||
set waitfor = FALSE
|
||||
|
||||
var/atom/owner = parent
|
||||
|
||||
if(feeder.a_intent == INTENT_HARM)
|
||||
return
|
||||
if(!owner.reagents.total_volume)//Shouldn't be needed but it checks to see if it has anything left in it.
|
||||
to_chat(feeder, "<span class='warning'>None of [owner] left, oh no!</span>")
|
||||
if(isturf(parent))
|
||||
var/turf/T = parent
|
||||
T.ScrapeAway(1, CHANGETURF_INHERIT_AIR)
|
||||
else
|
||||
qdel(parent)
|
||||
return
|
||||
if(!CanConsume(eater, feeder))
|
||||
return
|
||||
var/fullness = eater.nutrition + 10 //The theoretical fullness of the person eating if they were to eat this
|
||||
for(var/datum/reagent/consumable/C in eater.reagents.reagent_list) //we add the nutrition value of what we're currently digesting
|
||||
fullness += C.nutriment_factor * C.volume / C.metabolization_rate
|
||||
|
||||
. = COMPONENT_ITEM_NO_ATTACK //Point of no return I suppose
|
||||
|
||||
if(eater == feeder)//If you're eating it yourself.
|
||||
if(!do_mob(feeder, eater, eat_time)) //Gotta pass the minimal eat time
|
||||
return
|
||||
var/eatverb = pick(eatverbs)
|
||||
if(junkiness && eater.satiety < -150 && eater.nutrition > NUTRITION_LEVEL_STARVING + 50 && !HAS_TRAIT(eater, TRAIT_VORACIOUS))
|
||||
to_chat(eater, "<span class='warning'>You don't feel like eating any more junk food at the moment!</span>")
|
||||
return
|
||||
else if(fullness <= 50)
|
||||
eater.visible_message("<span class='notice'>[eater] hungrily [eatverb]s \the [parent], gobbling it down!</span>", "<span class='notice'>You hungrily [eatverb] \the [parent], gobbling it down!</span>")
|
||||
else if(fullness > 50 && fullness < 150)
|
||||
eater.visible_message("<span class='notice'>[eater] hungrily [eatverb]s \the [parent].</span>", "<span class='notice'>You hungrily [eatverb] \the [parent].</span>")
|
||||
else if(fullness > 150 && fullness < 500)
|
||||
eater.visible_message("<span class='notice'>[eater] [eatverb]s \the [parent].</span>", "<span class='notice'>You [eatverb] \the [parent].</span>")
|
||||
else if(fullness > 500 && fullness < 600)
|
||||
eater.visible_message("<span class='notice'>[eater] unwillingly [eatverb]s a bit of \the [parent].</span>", "<span class='notice'>You unwillingly [eatverb] a bit of \the [parent].</span>")
|
||||
else if(fullness > (600 * (1 + eater.overeatduration / 2000))) // The more you eat - the more you can eat
|
||||
eater.visible_message("<span class='warning'>[eater] cannot force any more of \the [parent] to go down [eater.p_their()] throat!</span>", "<span class='warning'>You cannot force any more of \the [parent] to go down your throat!</span>")
|
||||
return
|
||||
else //If you're feeding it to someone else.
|
||||
if(isbrain(eater))
|
||||
to_chat(feeder, "<span class='warning'>[eater] doesn't seem to have a mouth!</span>")
|
||||
return
|
||||
if(fullness <= (600 * (1 + eater.overeatduration / 1000)))
|
||||
eater.visible_message("<span class='danger'>[feeder] attempts to feed [eater] [parent].</span>", \
|
||||
"<span class='userdanger'>[feeder] attempts to feed you [parent].</span>")
|
||||
else
|
||||
eater.visible_message("<span class='warning'>[feeder] cannot force any more of [parent] down [eater]'s throat!</span>", \
|
||||
"<span class='warning'>[feeder] cannot force any more of [parent] down your throat!</span>")
|
||||
return
|
||||
if(!do_mob(feeder, eater)) //Wait 3 seconds before you can feed
|
||||
return
|
||||
|
||||
log_combat(feeder, eater, "fed", owner.reagents.log_list())
|
||||
eater.visible_message("<span class='danger'>[feeder] forces [eater] to eat [parent]!</span>", \
|
||||
"<span class='userdanger'>[feeder] forces you to eat [parent]!</span>")
|
||||
|
||||
TakeBite(eater, feeder)
|
||||
|
||||
///This function lets the eater take a bite and transfers the reagents to the eater.
|
||||
/datum/component/edible/proc/TakeBite(mob/living/eater, mob/living/feeder)
|
||||
|
||||
var/atom/owner = parent
|
||||
|
||||
if(!owner?.reagents)
|
||||
return FALSE
|
||||
if(eater.satiety > -200)
|
||||
eater.satiety -= junkiness
|
||||
playsound(eater.loc,'sound/items/eatfood.ogg', rand(10,50), TRUE)
|
||||
if(owner.reagents.total_volume)
|
||||
SEND_SIGNAL(parent, COMSIG_FOOD_EATEN, eater, feeder)
|
||||
var/fraction = min(bite_consumption / owner.reagents.total_volume, 1)
|
||||
owner.reagents.reaction(eater, INGEST, fraction)
|
||||
owner.reagents.trans_to(eater, bite_consumption)
|
||||
bitecount++
|
||||
On_Consume(eater)
|
||||
checkLiked(fraction, eater)
|
||||
|
||||
//Invoke our after eat callback if it is valid
|
||||
if(after_eat)
|
||||
after_eat.Invoke(eater, feeder)
|
||||
|
||||
return TRUE
|
||||
|
||||
///Checks whether or not the eater can actually consume the food
|
||||
/datum/component/edible/proc/CanConsume(mob/living/eater, mob/living/feeder)
|
||||
if(!iscarbon(eater))
|
||||
return FALSE
|
||||
var/mob/living/carbon/C = eater
|
||||
var/covered = ""
|
||||
if(C.is_mouth_covered(head_only = 1))
|
||||
covered = "headgear"
|
||||
else if(C.is_mouth_covered(mask_only = 1))
|
||||
covered = "mask"
|
||||
if(covered)
|
||||
var/who = (isnull(feeder) || eater == feeder) ? "your" : "[eater.p_their()]"
|
||||
to_chat(feeder, "<span class='warning'>You have to remove [who] [covered] first!</span>")
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
///Check foodtypes to see if we should send a moodlet
|
||||
/datum/component/edible/proc/checkLiked(var/fraction, mob/M)
|
||||
if(last_check_time + 50 > world.time)
|
||||
return FALSE
|
||||
if(!ishuman(M))
|
||||
return FALSE
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(HAS_TRAIT(H, TRAIT_AGEUSIA) && foodtypes & H.dna.species.toxic_food)
|
||||
to_chat(H, "<span class='warning'>You don't feel so good...</span>")
|
||||
H.adjust_disgust(25 + 30 * fraction)
|
||||
else
|
||||
if(foodtypes & H.dna.species.toxic_food)
|
||||
to_chat(H,"<span class='warning'>What the hell was that thing?!</span>")
|
||||
H.adjust_disgust(25 + 30 * fraction)
|
||||
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "toxic_food", /datum/mood_event/disgusting_food)
|
||||
else if(foodtypes & H.dna.species.disliked_food)
|
||||
to_chat(H,"<span class='notice'>That didn't taste very good...</span>")
|
||||
H.adjust_disgust(11 + 15 * fraction)
|
||||
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "gross_food", /datum/mood_event/gross_food)
|
||||
else if(foodtypes & H.dna.species.liked_food)
|
||||
to_chat(H,"<span class='notice'>I love this taste!</span>")
|
||||
H.adjust_disgust(-5 + -2.5 * fraction)
|
||||
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "fav_food", /datum/mood_event/favorite_food)
|
||||
if((foodtypes & BREAKFAST) && world.time - SSticker.round_start_time < STOP_SERVING_BREAKFAST)
|
||||
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "breakfast", /datum/mood_event/breakfast)
|
||||
last_check_time = world.time
|
||||
|
||||
///Delete the item when it is fully eaten
|
||||
/datum/component/edible/proc/On_Consume(mob/living/eater)
|
||||
|
||||
var/atom/owner = parent
|
||||
|
||||
if(!eater)
|
||||
return
|
||||
if(!owner.reagents.total_volume)
|
||||
if(isturf(parent))
|
||||
var/turf/T = parent
|
||||
T.ScrapeAway(1, CHANGETURF_INHERIT_AIR)
|
||||
else
|
||||
qdel(parent)
|
||||
|
||||
///Ability to feed food to puppers
|
||||
/datum/component/edible/proc/UseByAnimal(datum/source, mob/user)
|
||||
|
||||
var/atom/owner = parent
|
||||
|
||||
if(!isdog(user))
|
||||
return
|
||||
var/mob/living/L = user
|
||||
if(bitecount == 0 || prob(50))
|
||||
L.emote("me", 1, "nibbles away at \the [parent]")
|
||||
bitecount++
|
||||
. = COMPONENT_ITEM_NO_ATTACK
|
||||
L.taste(owner.reagents) // why should carbons get all the fun?
|
||||
if(bitecount >= 5)
|
||||
var/sattisfaction_text = pick("burps from enjoyment", "yaps for more", "woofs twice", "looks at the area where \the [parent] was")
|
||||
if(sattisfaction_text)
|
||||
L.emote("me", 1, "[sattisfaction_text]")
|
||||
qdel(parent)
|
||||
@@ -69,8 +69,9 @@
|
||||
out += "[out ? " and it " : "[master] "]seems to be glowing a bit."
|
||||
if(RAD_AMOUNT_HIGH to INFINITY) //At this level the object can contaminate other objects
|
||||
out += "[out ? " and it " : "[master] "]hurts to look at."
|
||||
else
|
||||
out += "."
|
||||
if(!LAZYLEN(out))
|
||||
return
|
||||
out += "."
|
||||
examine_list += out.Join()
|
||||
|
||||
/datum/component/radioactive/proc/rad_attack(datum/source, atom/movable/target, mob/living/user)
|
||||
|
||||
@@ -34,3 +34,8 @@
|
||||
qdel(A)
|
||||
return
|
||||
. = ..()
|
||||
|
||||
/datum/component/storage/concrete/bluespace/bag_of_holding/can_be_inserted(obj/item/I, stop_messages = FALSE, mob/M)
|
||||
if(I.GetComponent(/datum/component/storage/concrete/bluespace/bag_of_holding))
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
@@ -0,0 +1,311 @@
|
||||
/**
|
||||
* Two Handed Component
|
||||
*
|
||||
* When applied to an item it will make it two handed
|
||||
*
|
||||
*/
|
||||
/datum/component/two_handed
|
||||
dupe_mode = COMPONENT_DUPE_UNIQUE_PASSARGS // Only one of the component can exist on an item
|
||||
var/wielded = FALSE /// Are we holding the two handed item properly
|
||||
var/force_multiplier = 0 /// The multiplier applied to force when wielded, does not work with force_wielded, and force_unwielded
|
||||
var/force_wielded = 0 /// The force of the item when weilded
|
||||
var/force_unwielded = 0 /// The force of the item when unweilded
|
||||
var/wieldsound = FALSE /// Play sound when wielded
|
||||
var/unwieldsound = FALSE /// Play sound when unwielded
|
||||
var/attacksound = FALSE /// Play sound on attack when wielded
|
||||
var/require_twohands = FALSE /// Does it have to be held in both hands
|
||||
var/icon_wielded = FALSE /// The icon that will be used when wielded
|
||||
var/obj/item/offhand/offhand_item = null /// Reference to the offhand created for the item
|
||||
var/sharpened_increase = 0 /// The amount of increase recived from sharpening the item
|
||||
|
||||
/**
|
||||
* Two Handed component
|
||||
*
|
||||
* vars:
|
||||
* * require_twohands (optional) Does the item need both hands to be carried
|
||||
* * wieldsound (optional) The sound to play when wielded
|
||||
* * unwieldsound (optional) The sound to play when unwielded
|
||||
* * attacksound (optional) The sound to play when wielded and attacking
|
||||
* * force_multiplier (optional) The force multiplier when wielded, do not use with force_wielded, and force_unwielded
|
||||
* * force_wielded (optional) The force setting when the item is wielded, do not use with force_multiplier
|
||||
* * force_unwielded (optional) The force setting when the item is unwielded, do not use with force_multiplier
|
||||
* * icon_wielded (optional) The icon to be used when wielded
|
||||
*/
|
||||
/datum/component/two_handed/Initialize(require_twohands=FALSE, wieldsound=FALSE, unwieldsound=FALSE, attacksound=FALSE, \
|
||||
force_multiplier=0, force_wielded=0, force_unwielded=0, icon_wielded=FALSE)
|
||||
if(!isitem(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
src.require_twohands = require_twohands
|
||||
src.wieldsound = wieldsound
|
||||
src.unwieldsound = unwieldsound
|
||||
src.attacksound = attacksound
|
||||
src.force_multiplier = force_multiplier
|
||||
src.force_wielded = force_wielded
|
||||
src.force_unwielded = force_unwielded
|
||||
src.icon_wielded = icon_wielded
|
||||
|
||||
// Inherit the new values passed to the component
|
||||
/datum/component/two_handed/InheritComponent(datum/component/two_handed/new_comp, original, require_twohands, wieldsound, unwieldsound, \
|
||||
force_multiplier, force_wielded, force_unwielded, icon_wielded)
|
||||
if(!original)
|
||||
return
|
||||
if(require_twohands)
|
||||
src.require_twohands = require_twohands
|
||||
if(wieldsound)
|
||||
src.wieldsound = wieldsound
|
||||
if(unwieldsound)
|
||||
src.unwieldsound = unwieldsound
|
||||
if(attacksound)
|
||||
src.attacksound = attacksound
|
||||
if(force_multiplier)
|
||||
src.force_multiplier = force_multiplier
|
||||
if(force_wielded)
|
||||
src.force_wielded = force_wielded
|
||||
if(force_unwielded)
|
||||
src.force_unwielded = force_unwielded
|
||||
if(icon_wielded)
|
||||
src.icon_wielded = icon_wielded
|
||||
|
||||
// register signals withthe parent item
|
||||
/datum/component/two_handed/RegisterWithParent()
|
||||
RegisterSignal(parent, COMSIG_ITEM_EQUIPPED, .proc/on_equip)
|
||||
RegisterSignal(parent, COMSIG_ITEM_DROPPED, .proc/on_drop)
|
||||
RegisterSignal(parent, COMSIG_ITEM_ATTACK_SELF, .proc/on_attack_self)
|
||||
RegisterSignal(parent, COMSIG_ITEM_ATTACK, .proc/on_attack)
|
||||
RegisterSignal(parent, COMSIG_ATOM_UPDATE_ICON, .proc/on_update_icon)
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_MOVED, .proc/on_moved)
|
||||
RegisterSignal(parent, COMSIG_ITEM_SHARPEN_ACT, .proc/on_sharpen)
|
||||
|
||||
// Remove all siginals registered to the parent item
|
||||
/datum/component/two_handed/UnregisterFromParent()
|
||||
UnregisterSignal(parent, list(COMSIG_ITEM_EQUIPPED,
|
||||
COMSIG_ITEM_DROPPED,
|
||||
COMSIG_ITEM_ATTACK_SELF,
|
||||
COMSIG_ITEM_ATTACK,
|
||||
COMSIG_ATOM_UPDATE_ICON,
|
||||
COMSIG_MOVABLE_MOVED,
|
||||
COMSIG_ITEM_SHARPEN_ACT))
|
||||
|
||||
/// Triggered on equip of the item containing the component
|
||||
/datum/component/two_handed/proc/on_equip(datum/source, mob/user, slot)
|
||||
if(require_twohands && slot == SLOT_HANDS) // force equip the item
|
||||
wield(user)
|
||||
if(!user.is_holding(parent) && wielded && !require_twohands)
|
||||
unwield(user)
|
||||
|
||||
/// Triggered on drop of item containing the component
|
||||
/datum/component/two_handed/proc/on_drop(datum/source, mob/user)
|
||||
if(require_twohands)
|
||||
unwield(user, show_message=TRUE)
|
||||
if(wielded)
|
||||
unwield(user)
|
||||
if(source == offhand_item && !QDELETED(src))
|
||||
qdel(src)
|
||||
|
||||
/// Triggered on attack self of the item containing the component
|
||||
/datum/component/two_handed/proc/on_attack_self(datum/source, mob/user)
|
||||
if(wielded)
|
||||
unwield(user)
|
||||
else
|
||||
wield(user)
|
||||
|
||||
/**
|
||||
* Wield the two handed item in both hands
|
||||
*
|
||||
* vars:
|
||||
* * user The mob/living/carbon that is wielding the item
|
||||
*/
|
||||
/datum/component/two_handed/proc/wield(mob/living/carbon/user)
|
||||
if(wielded)
|
||||
return
|
||||
if(ismonkey(user))
|
||||
to_chat(user, "<span class='warning'>It's too heavy for you to wield fully.</span>")
|
||||
return
|
||||
if(user.get_inactive_held_item())
|
||||
if(require_twohands)
|
||||
to_chat(user, "<span class='notice'>[parent] is too cumbersome to carry in one hand!</span>")
|
||||
user.dropItemToGround(parent, force=TRUE)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need your other hand to be empty!</span>")
|
||||
return
|
||||
if(user.get_num_arms() < 2)
|
||||
if(require_twohands)
|
||||
user.dropItemToGround(parent, force=TRUE)
|
||||
to_chat(user, "<span class='warning'>You don't have enough intact hands.</span>")
|
||||
return
|
||||
|
||||
// wield update status
|
||||
if(SEND_SIGNAL(parent, COMSIG_TWOHANDED_WIELD, user) & COMPONENT_TWOHANDED_BLOCK_WIELD)
|
||||
return // blocked wield from item
|
||||
wielded = TRUE
|
||||
RegisterSignal(user, COMSIG_MOB_SWAP_HANDS, .proc/on_swap_hands)
|
||||
|
||||
// update item stats and name
|
||||
var/obj/item/parent_item = parent
|
||||
if(force_multiplier)
|
||||
parent_item.force *= force_multiplier
|
||||
else if(force_wielded)
|
||||
parent_item.force = force_wielded
|
||||
if(sharpened_increase)
|
||||
parent_item.force += sharpened_increase
|
||||
parent_item.name = "[parent_item.name] (Wielded)"
|
||||
parent_item.update_icon()
|
||||
|
||||
if(iscyborg(user))
|
||||
to_chat(user, "<span class='notice'>You dedicate your module to [parent].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You grab [parent] with both hands.</span>")
|
||||
|
||||
// Play sound if one is set
|
||||
if(wieldsound)
|
||||
playsound(parent_item.loc, wieldsound, 50, TRUE)
|
||||
|
||||
// Let's reserve the other hand
|
||||
offhand_item = new(user)
|
||||
offhand_item.name = "[parent_item.name] - offhand"
|
||||
offhand_item.desc = "Your second grip on [parent_item]."
|
||||
offhand_item.wielded = TRUE
|
||||
RegisterSignal(offhand_item, COMSIG_ITEM_DROPPED, .proc/on_drop)
|
||||
user.put_in_inactive_hand(offhand_item)
|
||||
|
||||
/**
|
||||
* Unwield the two handed item
|
||||
*
|
||||
* vars:
|
||||
* * user The mob/living/carbon that is unwielding the item
|
||||
* * show_message (option) show a message to chat on unwield
|
||||
*/
|
||||
/datum/component/two_handed/proc/unwield(mob/living/carbon/user, show_message=TRUE)
|
||||
if(!wielded || !user)
|
||||
return
|
||||
|
||||
// wield update status
|
||||
wielded = FALSE
|
||||
UnregisterSignal(user, COMSIG_MOB_SWAP_HANDS)
|
||||
SEND_SIGNAL(parent, COMSIG_TWOHANDED_UNWIELD, user)
|
||||
|
||||
// update item stats
|
||||
var/obj/item/parent_item = parent
|
||||
if(sharpened_increase)
|
||||
parent_item.force -= sharpened_increase
|
||||
if(force_multiplier)
|
||||
parent_item.force /= force_multiplier
|
||||
else if(force_unwielded)
|
||||
parent_item.force = force_unwielded
|
||||
|
||||
// update the items name to remove the wielded status
|
||||
var/sf = findtext(parent_item.name, " (Wielded)", -10) // 10 == length(" (Wielded)")
|
||||
if(sf)
|
||||
parent_item.name = copytext(parent_item.name, 1, sf)
|
||||
else
|
||||
parent_item.name = "[initial(parent_item.name)]"
|
||||
|
||||
// Update icons
|
||||
parent_item.update_icon()
|
||||
if(user.get_item_by_slot(ITEM_SLOT_BACK) == parent)
|
||||
user.update_inv_back()
|
||||
else
|
||||
user.update_inv_hands()
|
||||
|
||||
// if the item requires two handed drop the item on unwield
|
||||
if(require_twohands)
|
||||
user.dropItemToGround(parent, force=TRUE)
|
||||
|
||||
// Show message if requested
|
||||
if(show_message)
|
||||
if(iscyborg(user))
|
||||
to_chat(user, "<span class='notice'>You free up your module.</span>")
|
||||
else if(require_twohands)
|
||||
to_chat(user, "<span class='notice'>You drop [parent].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You are now carrying [parent] with one hand.</span>")
|
||||
|
||||
// Play sound if set
|
||||
if(unwieldsound)
|
||||
playsound(parent_item.loc, unwieldsound, 50, TRUE)
|
||||
|
||||
// Remove the object in the offhand
|
||||
if(offhand_item)
|
||||
UnregisterSignal(offhand_item, COMSIG_ITEM_DROPPED)
|
||||
qdel(offhand_item)
|
||||
// Clear any old refrence to an item that should be gone now
|
||||
offhand_item = null
|
||||
|
||||
/**
|
||||
* on_attack triggers on attack with the parent item
|
||||
*/
|
||||
/datum/component/two_handed/proc/on_attack(obj/item/source, mob/living/target, mob/living/user)
|
||||
if(wielded && attacksound)
|
||||
var/obj/item/parent_item = parent
|
||||
playsound(parent_item.loc, attacksound, 50, TRUE)
|
||||
|
||||
/**
|
||||
* on_update_icon triggers on call to update parent items icon
|
||||
*
|
||||
* Updates the icon using icon_wielded if set
|
||||
*/
|
||||
/datum/component/two_handed/proc/on_update_icon(datum/source)
|
||||
if(icon_wielded && wielded)
|
||||
var/obj/item/parent_item = parent
|
||||
if(parent_item)
|
||||
parent_item.icon_state = icon_wielded
|
||||
return COMSIG_ATOM_NO_UPDATE_ICON_STATE
|
||||
|
||||
/**
|
||||
* on_moved Triggers on item moved
|
||||
*/
|
||||
/datum/component/two_handed/proc/on_moved(datum/source, mob/user, dir)
|
||||
unwield(user)
|
||||
|
||||
/**
|
||||
* on_swap_hands Triggers on swapping hands, blocks swap if the other hand is busy
|
||||
*/
|
||||
/datum/component/two_handed/proc/on_swap_hands(mob/user, obj/item/held_item)
|
||||
if(!held_item)
|
||||
return
|
||||
if(held_item == parent)
|
||||
return COMPONENT_BLOCK_SWAP
|
||||
|
||||
/**
|
||||
* on_sharpen Triggers on usage of a sharpening stone on the item
|
||||
*/
|
||||
/datum/component/two_handed/proc/on_sharpen(obj/item/item, amount, max_amount)
|
||||
if(!item)
|
||||
return COMPONENT_BLOCK_SHARPEN_BLOCKED
|
||||
if(sharpened_increase)
|
||||
return COMPONENT_BLOCK_SHARPEN_ALREADY
|
||||
var/wielded_val = 0
|
||||
if(force_multiplier)
|
||||
var/obj/item/parent_item = parent
|
||||
if(wielded)
|
||||
wielded_val = parent_item.force
|
||||
else
|
||||
wielded_val = parent_item.force * force_multiplier
|
||||
else
|
||||
wielded_val = force_wielded
|
||||
if(wielded_val > max_amount)
|
||||
return COMPONENT_BLOCK_SHARPEN_MAXED
|
||||
sharpened_increase = min(amount, (max_amount - wielded_val))
|
||||
return COMPONENT_BLOCK_SHARPEN_APPLIED
|
||||
|
||||
/**
|
||||
* The offhand dummy item for two handed items
|
||||
*
|
||||
*/
|
||||
/obj/item/offhand
|
||||
name = "offhand"
|
||||
icon_state = "offhand"
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
item_flags = ABSTRACT
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
|
||||
var/wielded = FALSE // Off Hand tracking of wielded status
|
||||
|
||||
/obj/item/offhand/Destroy()
|
||||
wielded = FALSE
|
||||
return ..()
|
||||
|
||||
/obj/item/offhand/equipped(mob/user, slot)
|
||||
. = ..()
|
||||
if(wielded && !user.is_holding(src) && !QDELETED(src))
|
||||
qdel(src)
|
||||
@@ -20,11 +20,11 @@
|
||||
|
||||
/datum/disease/transformation/Copy()
|
||||
var/datum/disease/transformation/D = ..()
|
||||
D.stage1 = stage1.Copy()
|
||||
D.stage2 = stage2.Copy()
|
||||
D.stage3 = stage3.Copy()
|
||||
D.stage4 = stage4.Copy()
|
||||
D.stage5 = stage5.Copy()
|
||||
D.stage1 = stage1?.Copy()
|
||||
D.stage2 = stage2?.Copy()
|
||||
D.stage3 = stage3?.Copy()
|
||||
D.stage4 = stage4?.Copy()
|
||||
D.stage5 = stage5?.Copy()
|
||||
D.new_form = D.new_form
|
||||
return D
|
||||
|
||||
|
||||
@@ -8,8 +8,11 @@
|
||||
if(. == ELEMENT_INCOMPATIBLE || !isatom(target) || isarea(target))
|
||||
return ELEMENT_INCOMPATIBLE
|
||||
beauty = beautyamount
|
||||
RegisterSignal(target, COMSIG_ENTER_AREA, .proc/enter_area)
|
||||
RegisterSignal(target, COMSIG_EXIT_AREA, .proc/exit_area)
|
||||
|
||||
if(ismovable(target))
|
||||
RegisterSignal(target, COMSIG_ENTER_AREA, .proc/enter_area)
|
||||
RegisterSignal(target, COMSIG_EXIT_AREA, .proc/exit_area)
|
||||
|
||||
var/area/A = get_area(target)
|
||||
if(A)
|
||||
enter_area(null, A)
|
||||
|
||||
@@ -23,10 +23,14 @@
|
||||
var/end_sound
|
||||
var/chance
|
||||
var/volume = 100
|
||||
var/vary = FALSE
|
||||
var/max_loops
|
||||
var/direct
|
||||
var/extra_range = 0
|
||||
var/falloff
|
||||
|
||||
var/timerid
|
||||
var/init_timerid
|
||||
|
||||
/datum/looping_sound/New(list/_output_atoms=list(), start_immediately=FALSE, _direct=FALSE)
|
||||
if(!mid_sounds)
|
||||
@@ -47,13 +51,15 @@
|
||||
/datum/looping_sound/proc/start(atom/add_thing)
|
||||
if(add_thing)
|
||||
output_atoms |= add_thing
|
||||
if(timerid)
|
||||
if(timerid || init_timerid)
|
||||
return
|
||||
on_start()
|
||||
|
||||
/datum/looping_sound/proc/stop(atom/remove_thing)
|
||||
if(remove_thing)
|
||||
output_atoms -= remove_thing
|
||||
if(init_timerid)
|
||||
deltimer(init_timerid)
|
||||
if(!timerid)
|
||||
return
|
||||
on_stop()
|
||||
@@ -80,7 +86,7 @@
|
||||
if(direct)
|
||||
SEND_SOUND(thing, S)
|
||||
else
|
||||
playsound(thing, S, volume)
|
||||
playsound(thing, S, volume, vary, extra_range, falloff)
|
||||
|
||||
/datum/looping_sound/proc/get_sound(starttime, _mid_sounds)
|
||||
. = _mid_sounds || mid_sounds
|
||||
@@ -92,7 +98,7 @@
|
||||
if(start_sound)
|
||||
play(start_sound)
|
||||
start_wait = start_length
|
||||
addtimer(CALLBACK(src, .proc/sound_loop), start_wait, TIMER_CLIENT_TIME)
|
||||
init_timerid = addtimer(CALLBACK(src, .proc/sound_loop), start_wait, TIMER_CLIENT_TIME | TIMER_STOPPABLE)
|
||||
|
||||
/datum/looping_sound/proc/on_stop()
|
||||
if(end_sound)
|
||||
|
||||
@@ -180,14 +180,12 @@
|
||||
to_chat(usr, "<span class='notice'>Keelhaul</span>: Harm Grab. Kick opponents to the floor. Against prone targets, deal additional stamina damage and disarm them.")
|
||||
to_chat(usr, "<span class='notice'>In addition, your body has become incredibly resilient to most forms of attack. Weapons cannot readily pierce your hardened skin, and you are highly resistant to stuns and knockdowns, and can block all projectiles in Throw Mode. However, you are not invincible, and sustained damage will take it's toll. Avoid heat at all costs!</span>")
|
||||
|
||||
/obj/item/twohanded/bostaff
|
||||
/obj/item/staff/bostaff
|
||||
name = "bo staff"
|
||||
desc = "A long, tall staff made of polished wood. Traditionally used in ancient old-Earth martial arts. Can be wielded to both kill and incapacitate."
|
||||
force = 10
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
force_unwielded = 10
|
||||
force_wielded = 24
|
||||
throwforce = 20
|
||||
throw_speed = 2
|
||||
attack_verb = list("smashed", "slammed", "whacked", "thwacked")
|
||||
@@ -196,11 +194,29 @@
|
||||
lefthand_file = 'icons/mob/inhands/weapons/staves_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/staves_righthand.dmi'
|
||||
block_chance = 50
|
||||
var/wielded = FALSE // track wielded status on item
|
||||
|
||||
/obj/item/twohanded/bostaff/update_icon_state()
|
||||
icon_state = "bostaff[wielded]"
|
||||
/obj/item/staff/bostaff/Initialize()
|
||||
. = ..()
|
||||
RegisterSignal(src, COMSIG_TWOHANDED_WIELD, .proc/on_wield)
|
||||
RegisterSignal(src, COMSIG_TWOHANDED_UNWIELD, .proc/on_unwield)
|
||||
|
||||
/obj/item/twohanded/bostaff/attack(mob/target, mob/living/user)
|
||||
/obj/item/staff/bostaff/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/two_handed, force_unwielded=10, force_wielded=24, icon_wielded="bostaff1")
|
||||
|
||||
/// triggered on wield of two handed item
|
||||
/obj/item/staff/bostaff/proc/on_wield(obj/item/source, mob/user)
|
||||
wielded = TRUE
|
||||
|
||||
/// triggered on unwield of two handed item
|
||||
/obj/item/staff/bostaff/proc/on_unwield(obj/item/source, mob/user)
|
||||
wielded = FALSE
|
||||
|
||||
/obj/item/staff/bostaff/update_icon_state()
|
||||
icon_state = "bostaff0"
|
||||
|
||||
/obj/item/staff/bostaff/attack(mob/target, mob/living/user)
|
||||
add_fingerprint(user)
|
||||
if((HAS_TRAIT(user, TRAIT_CLUMSY)) && prob(50))
|
||||
to_chat(user, "<span class ='warning'>You club yourself over the head with [src].</span>")
|
||||
@@ -249,7 +265,7 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/twohanded/bostaff/run_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
|
||||
/obj/item/staff/bostaff/run_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
|
||||
if(!wielded)
|
||||
return BLOCK_NONE
|
||||
return ..()
|
||||
|
||||
@@ -6,8 +6,6 @@ Simple datum which is instanced once per type and is used for every object of sa
|
||||
/datum/material
|
||||
var/name = "material"
|
||||
var/desc = "its..stuff."
|
||||
///Var that's mostly used by science machines to identify specific materials, should most likely be phased out at some point
|
||||
var/id = "mat"
|
||||
///Base color of the material, is used for greyscale. Item isn't changed in color if this is null.
|
||||
var/color
|
||||
///Base alpha of the material, is used for greyscale icons.
|
||||
@@ -26,6 +24,20 @@ Simple datum which is instanced once per type and is used for every object of sa
|
||||
var/armor_modifiers = list("melee" = 1, "bullet" = 1, "laser" = 1, "energy" = 1, "bomb" = 1, "bio" = 1, "rad" = 1, "fire" = 1, "acid" = 1)
|
||||
///How beautiful is this material per unit?
|
||||
var/beauty_modifier = 0
|
||||
///Can be used to override the sound items make, lets add some SLOSHing.
|
||||
var/item_sound_override
|
||||
///Can be used to override the stepsound a turf makes. MORE SLOOOSH
|
||||
var/turf_sound_override
|
||||
///what texture icon state to overlay
|
||||
var/texture_layer_icon_state
|
||||
///a cached filter for the texture icon
|
||||
var/cached_texture_filter
|
||||
|
||||
/datum/material/New()
|
||||
. = ..()
|
||||
if(texture_layer_icon_state)
|
||||
var/texture_icon = icon('icons/materials/composite.dmi', texture_layer_icon_state)
|
||||
cached_texture_filter = filter(type="layer", icon=texture_icon, blend_mode = BLEND_INSET_OVERLAY)
|
||||
|
||||
///This proc is called when the material is added to an object.
|
||||
/datum/material/proc/on_applied(atom/source, amount, material_flags)
|
||||
@@ -34,16 +46,27 @@ Simple datum which is instanced once per type and is used for every object of sa
|
||||
source.add_atom_colour(color, FIXED_COLOUR_PRIORITY)
|
||||
if(alpha)
|
||||
source.alpha = alpha
|
||||
if(texture_layer_icon_state)
|
||||
ADD_KEEP_TOGETHER(source, MATERIAL_SOURCE(src))
|
||||
source.filters += cached_texture_filter
|
||||
|
||||
if(material_flags & MATERIAL_ADD_PREFIX)
|
||||
source.name = "[name] [source.name]"
|
||||
|
||||
if(istype(source, /obj)) //objs
|
||||
on_applied_obj(source, amount, material_flags)
|
||||
|
||||
if(beauty_modifier)
|
||||
addtimer(CALLBACK(source, /datum.proc/_AddElement, list(/datum/element/beauty, beauty_modifier * amount)), 0)
|
||||
|
||||
if(istype(source, /obj)) //objs
|
||||
on_applied_obj(source, amount, material_flags)
|
||||
|
||||
else if(isturf(source, /turf)) //turfs
|
||||
on_applied_turf(source, amount, material_flags)
|
||||
|
||||
source.mat_update_desc(src)
|
||||
|
||||
///This proc is called when a material updates an object's description
|
||||
/atom/proc/mat_update_desc(/datum/material/mat)
|
||||
return
|
||||
///This proc is called when the material is added to an object specifically.
|
||||
/datum/material/proc/on_applied_obj(var/obj/o, amount, material_flags)
|
||||
if(material_flags & MATERIAL_AFFECT_STATISTICS)
|
||||
@@ -61,6 +84,24 @@ Simple datum which is instanced once per type and is used for every object of sa
|
||||
for(var/i in current_armor)
|
||||
temp_armor_list[i] = current_armor[i] * armor_modifiers[i]
|
||||
o.armor = getArmor(arglist(temp_armor_list))
|
||||
if(!isitem(o))
|
||||
return
|
||||
var/obj/item/I = o
|
||||
if(!item_sound_override)
|
||||
return
|
||||
I.hitsound = item_sound_override
|
||||
I.usesound = item_sound_override
|
||||
I.throwhitsound = item_sound_override
|
||||
|
||||
/datum/material/proc/on_applied_turf(var/turf/T, amount, material_flags)
|
||||
if(isopenturf(T))
|
||||
if(!turf_sound_override)
|
||||
return
|
||||
var/turf/open/O = T
|
||||
O.footstep = turf_sound_override
|
||||
O.barefootstep = turf_sound_override
|
||||
O.clawfootstep = turf_sound_override
|
||||
O.heavyfootstep = turf_sound_override
|
||||
|
||||
///This proc is called when the material is removed from an object.
|
||||
/datum/material/proc/on_removed(atom/source, material_flags)
|
||||
@@ -68,6 +109,9 @@ Simple datum which is instanced once per type and is used for every object of sa
|
||||
if(color)
|
||||
source.remove_atom_colour(FIXED_COLOUR_PRIORITY, color)
|
||||
source.alpha = initial(source.alpha)
|
||||
if(texture_layer_icon_state)
|
||||
source.filters -= cached_texture_filter
|
||||
REMOVE_KEEP_TOGETHER(source, MATERIAL_SOURCE(src))
|
||||
|
||||
if(material_flags & MATERIAL_ADD_PREFIX)
|
||||
source.name = initial(source.name)
|
||||
@@ -75,10 +119,16 @@ Simple datum which is instanced once per type and is used for every object of sa
|
||||
if(istype(source, /obj)) //objs
|
||||
on_removed_obj(source, material_flags)
|
||||
|
||||
else if(istype(source, /turf)) //turfs
|
||||
on_removed_turf(source, material_flags)
|
||||
|
||||
///This proc is called when the material is removed from an object specifically.
|
||||
/datum/material/proc/on_removed_obj(var/obj/o, amount, material_flags)
|
||||
/datum/material/proc/on_removed_obj(obj/o, material_flags)
|
||||
if(material_flags & MATERIAL_AFFECT_STATISTICS)
|
||||
var/new_max_integrity = initial(o.max_integrity)
|
||||
o.modify_max_integrity(new_max_integrity)
|
||||
o.force = initial(o.force)
|
||||
o.throwforce = initial(o.throwforce)
|
||||
|
||||
/datum/material/proc/on_removed_turf(turf/T, material_flags)
|
||||
return
|
||||
|
||||
@@ -1,21 +1,19 @@
|
||||
///Has no special properties.
|
||||
/datum/material/iron
|
||||
name = "iron"
|
||||
id = "iron"
|
||||
desc = "Common iron ore often found in sedimentary and igneous layers of the crust."
|
||||
color = "#878687"
|
||||
categories = list(MAT_CATEGORY_ORE = TRUE, MAT_CATEGORY_RIGID = TRUE)
|
||||
categories = list(MAT_CATEGORY_ORE = TRUE, MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE)
|
||||
sheet_type = /obj/item/stack/sheet/metal
|
||||
value_per_unit = 0.0025
|
||||
|
||||
///Breaks extremely easily but is transparent.
|
||||
/datum/material/glass
|
||||
name = "glass"
|
||||
id = "glass"
|
||||
desc = "Glass forged by melting sand."
|
||||
color = "#88cdf1"
|
||||
alpha = 150
|
||||
categories = list(MAT_CATEGORY_RIGID = TRUE)
|
||||
categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE)
|
||||
integrity_modifier = 0.1
|
||||
sheet_type = /obj/item/stack/sheet/glass
|
||||
value_per_unit = 0.0025
|
||||
@@ -30,10 +28,9 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
///Has no special properties. Could be good against vampires in the future perhaps.
|
||||
/datum/material/silver
|
||||
name = "silver"
|
||||
id = "silver"
|
||||
desc = "Silver"
|
||||
color = list(255/255, 284/255, 302/255,0, 0,0,0,0, 0,0,0,0, 0,0,0,1, 0,0,0,0)
|
||||
categories = list(MAT_CATEGORY_ORE = TRUE, MAT_CATEGORY_RIGID = TRUE)
|
||||
categories = list(MAT_CATEGORY_ORE = TRUE, MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE)
|
||||
sheet_type = /obj/item/stack/sheet/mineral/silver
|
||||
value_per_unit = 0.025
|
||||
beauty_modifier = 0.075
|
||||
@@ -41,11 +38,10 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
///Slight force increase
|
||||
/datum/material/gold
|
||||
name = "gold"
|
||||
id = "gold"
|
||||
desc = "Gold"
|
||||
color = list(340/255, 240/255, 50/255,0, 0,0,0,0, 0,0,0,0, 0,0,0,1, 0,0,0,0) //gold is shiny, but not as bright as bananium
|
||||
strength_modifier = 1.2
|
||||
categories = list(MAT_CATEGORY_ORE = TRUE, MAT_CATEGORY_RIGID = TRUE)
|
||||
categories = list(MAT_CATEGORY_ORE = TRUE, MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE)
|
||||
sheet_type = /obj/item/stack/sheet/mineral/gold
|
||||
value_per_unit = 0.0625
|
||||
beauty_modifier = 0.15
|
||||
@@ -54,11 +50,10 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
///Has no special properties
|
||||
/datum/material/diamond
|
||||
name = "diamond"
|
||||
id = "diamond"
|
||||
desc = "Highly pressurized carbon"
|
||||
color = list(48/255, 272/255, 301/255,0, 0,0,0,0, 0,0,0,0, 0,0,0,1, 0,0,0,0)
|
||||
alpha = 132
|
||||
categories = list(MAT_CATEGORY_ORE = TRUE, MAT_CATEGORY_RIGID = TRUE)
|
||||
categories = list(MAT_CATEGORY_ORE = TRUE, MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE)
|
||||
sheet_type = /obj/item/stack/sheet/mineral/diamond
|
||||
value_per_unit = 0.25
|
||||
beauty_modifier = 0.3
|
||||
@@ -67,10 +62,9 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
///Is slightly radioactive
|
||||
/datum/material/uranium
|
||||
name = "uranium"
|
||||
id = "uranium"
|
||||
desc = "Uranium"
|
||||
color = rgb(48, 237, 26)
|
||||
categories = list(MAT_CATEGORY_ORE = TRUE, MAT_CATEGORY_RIGID = TRUE)
|
||||
categories = list(MAT_CATEGORY_ORE = TRUE, MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE)
|
||||
sheet_type = /obj/item/stack/sheet/mineral/uranium
|
||||
value_per_unit = 0.05
|
||||
beauty_modifier = 0.3 //It shines so beautiful
|
||||
@@ -88,10 +82,9 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
///Adds firestacks on hit (Still needs support to turn into gas on destruction)
|
||||
/datum/material/plasma
|
||||
name = "plasma"
|
||||
id = "plasma"
|
||||
desc = "Isn't plasma a state of matter? Oh whatever."
|
||||
color = list(298/255, 46/255, 352/255,0, 0,0,0,0, 0,0,0,0, 0,0,0,1, 0,0,0,0)
|
||||
categories = list(MAT_CATEGORY_ORE = TRUE, MAT_CATEGORY_RIGID = TRUE)
|
||||
categories = list(MAT_CATEGORY_ORE = TRUE, MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE)
|
||||
sheet_type = /obj/item/stack/sheet/mineral/plasma
|
||||
value_per_unit = 0.1
|
||||
beauty_modifier = 0.15
|
||||
@@ -111,7 +104,6 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
///Can cause bluespace effects on use. (Teleportation) (Not yet implemented)
|
||||
/datum/material/bluespace
|
||||
name = "bluespace crystal"
|
||||
id = "bluespace_crystal"
|
||||
desc = "Crystals with bluespace properties"
|
||||
color = list(119/255, 217/255, 396/255,0, 0,0,0,0, 0,0,0,0, 0,0,0,1, 0,0,0,0)
|
||||
alpha = 200
|
||||
@@ -123,10 +115,9 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
///Honks and slips
|
||||
/datum/material/bananium
|
||||
name = "bananium"
|
||||
id = "bananium"
|
||||
desc = "Material with hilarious properties"
|
||||
color = list(460/255, 464/255, 0, 0, 0,0,0,0, 0,0,0,0, 0,0,0,1, 0,0,0,0) //obnoxiously bright yellow
|
||||
categories = list(MAT_CATEGORY_ORE = TRUE, MAT_CATEGORY_RIGID = TRUE)
|
||||
categories = list(MAT_CATEGORY_ORE = TRUE, MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE)
|
||||
sheet_type = /obj/item/stack/sheet/mineral/bananium
|
||||
value_per_unit = 0.5
|
||||
beauty_modifier = 0.5
|
||||
@@ -146,11 +137,10 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
///Mediocre force increase
|
||||
/datum/material/titanium
|
||||
name = "titanium"
|
||||
id = "titanium"
|
||||
desc = "Titanium"
|
||||
color = "#b3c0c7"
|
||||
strength_modifier = 1.3
|
||||
categories = list(MAT_CATEGORY_ORE = TRUE, MAT_CATEGORY_RIGID = TRUE)
|
||||
categories = list(MAT_CATEGORY_ORE = TRUE, MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE)
|
||||
sheet_type = /obj/item/stack/sheet/mineral/titanium
|
||||
value_per_unit = 0.0625
|
||||
beauty_modifier = 0.05
|
||||
@@ -158,11 +148,10 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
|
||||
/datum/material/runite
|
||||
name = "runite"
|
||||
id = "runite"
|
||||
desc = "Runite"
|
||||
color = "#3F9995"
|
||||
strength_modifier = 1.3
|
||||
categories = list(MAT_CATEGORY_RIGID = TRUE)
|
||||
categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE)
|
||||
sheet_type = /obj/item/stack/sheet/mineral/runite
|
||||
beauty_modifier = 0.5
|
||||
armor_modifiers = list("melee" = 1.35, "bullet" = 2, "laser" = 0.5, "energy" = 1.25, "bomb" = 1.25, "bio" = 1, "rad" = 1, "fire" = 1.4, "acid" = 1) //rune is weak against magic lasers but strong against bullets. This is the combat triangle.
|
||||
@@ -170,7 +159,6 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
///Force decrease
|
||||
/datum/material/plastic
|
||||
name = "plastic"
|
||||
id = "plastic"
|
||||
desc = "Plastic"
|
||||
color = "#caccd9"
|
||||
strength_modifier = 0.85
|
||||
@@ -182,7 +170,6 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
///Force decrease and mushy sound effect. (Not yet implemented)
|
||||
/datum/material/biomass
|
||||
name = "biomass"
|
||||
id = "biomass"
|
||||
desc = "Organic matter"
|
||||
color = "#735b4d"
|
||||
strength_modifier = 0.8
|
||||
@@ -190,12 +177,11 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
|
||||
/datum/material/wood
|
||||
name = "wood"
|
||||
id = "wood"
|
||||
desc = "Flexible, durable, but flamable. Hard to come across in space."
|
||||
color = "#bb8e53"
|
||||
strength_modifier = 0.5
|
||||
sheet_type = /obj/item/stack/sheet/mineral/wood
|
||||
categories = list(MAT_CATEGORY_RIGID = TRUE)
|
||||
categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE)
|
||||
value_per_unit = 0.06
|
||||
beauty_modifier = 0.1
|
||||
armor_modifiers = list("melee" = 1.1, "bullet" = 1.1, "laser" = 0.4, "energy" = 0.4, "bomb" = 1, "bio" = 0.2, "rad" = 0, "fire" = 0, "acid" = 0.3)
|
||||
@@ -215,11 +201,10 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
///Stronk force increase
|
||||
/datum/material/adamantine
|
||||
name = "adamantine"
|
||||
id = "adamantine"
|
||||
desc = "A powerful material made out of magic, I mean science!"
|
||||
color = "#6d7e8e"
|
||||
strength_modifier = 1.5
|
||||
categories = list(MAT_CATEGORY_RIGID = TRUE)
|
||||
categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE)
|
||||
sheet_type = /obj/item/stack/sheet/mineral/adamantine
|
||||
value_per_unit = 0.25
|
||||
beauty_modifier = 0.4
|
||||
@@ -228,10 +213,9 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
///RPG Magic. (Admin only)
|
||||
/datum/material/mythril
|
||||
name = "mythril"
|
||||
id = "mythril"
|
||||
desc = "How this even exists is byond me"
|
||||
color = "#f2d5d7"
|
||||
categories = list(MAT_CATEGORY_RIGID = TRUE)
|
||||
categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE)
|
||||
sheet_type = /obj/item/stack/sheet/mineral/mythril
|
||||
value_per_unit = 0.75
|
||||
beauty_modifier = 0.5
|
||||
@@ -246,3 +230,134 @@ Unless you know what you're doing, only use the first three numbers. They're in
|
||||
. = ..()
|
||||
if(istype(source, /obj/item))
|
||||
qdel(source.GetComponent(/datum/component/fantasy))
|
||||
|
||||
//I don't like sand. It's coarse, and rough, and irritating, and it gets everywhere.
|
||||
/datum/material/sand
|
||||
name = "sand"
|
||||
desc = "You know, it's amazing just how structurally sound sand can be."
|
||||
color = "#EDC9AF"
|
||||
categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE)
|
||||
sheet_type = /obj/item/stack/sheet/sandblock
|
||||
value_per_unit = 0.001
|
||||
strength_modifier = 0.5
|
||||
integrity_modifier = 0.1
|
||||
armor_modifiers = list("melee" = 0.25, "bullet" = 0.25, "laser" = 1.25, "energy" = 0.25, "bomb" = 0.25, "bio" = 0.25, "rad" = 1.5, "fire" = 1.5, "acid" = 1.5)
|
||||
beauty_modifier = 0.25
|
||||
turf_sound_override = FOOTSTEP_SAND
|
||||
texture_layer_icon_state = "sand"
|
||||
|
||||
//And now for our lavaland dwelling friends, sand, but in stone form! Truly revolutionary.
|
||||
/datum/material/sandstone
|
||||
name = "sandstone"
|
||||
desc = "Bialtaakid 'ant taerif ma hdha."
|
||||
color = "#B77D31"
|
||||
categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE)
|
||||
sheet_type = /obj/item/stack/sheet/mineral/sandstone
|
||||
value_per_unit = 0.0025
|
||||
armor_modifiers = list("melee" = 0.5, "bullet" = 0.5, "laser" = 1.25, "energy" = 0.5, "bomb" = 0.5, "bio" = 0.25, "rad" = 1.5, "fire" = 1.5, "acid" = 1.5)
|
||||
beauty_modifier = 0.3
|
||||
turf_sound_override = FOOTSTEP_WOOD
|
||||
texture_layer_icon_state = "brick"
|
||||
|
||||
/datum/material/snow
|
||||
name = "snow"
|
||||
desc = "There's no business like snow business."
|
||||
color = "#FFFFFF"
|
||||
categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE)
|
||||
sheet_type = /obj/item/stack/sheet/mineral/snow
|
||||
value_per_unit = 0.0025
|
||||
armor_modifiers = list("melee" = 0.25, "bullet" = 0.25, "laser" = 0.25, "energy" = 0.25, "bomb" = 0.25, "bio" = 0.25, "rad" = 1.5, "fire" = 0.25, "acid" = 1.5)
|
||||
beauty_modifier = 0.3
|
||||
turf_sound_override = FOOTSTEP_SAND
|
||||
texture_layer_icon_state = "sand"
|
||||
|
||||
/datum/material/runedmetal
|
||||
name = "runed metal"
|
||||
desc = "Mir'ntrath barhah Nar'sie."
|
||||
color = "#3C3434"
|
||||
categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE)
|
||||
sheet_type = /obj/item/stack/sheet/runed_metal
|
||||
value_per_unit = 0.75
|
||||
armor_modifiers = list("melee" = 1.2, "bullet" = 1.2, "laser" = 1, "energy" = 1, "bomb" = 1.2, "bio" = 1.2, "rad" = 1.5, "fire" = 1.5, "acid" = 1.5)
|
||||
beauty_modifier = -0.15
|
||||
texture_layer_icon_state = "runed"
|
||||
|
||||
/datum/material/bronze
|
||||
name = "bronze"
|
||||
desc = "Clock Cult? Never heard of it."
|
||||
color = "#92661A"
|
||||
categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE)
|
||||
sheet_type = /obj/item/stack/tile/bronze
|
||||
value_per_unit = 0.025
|
||||
armor_modifiers = list("melee" = 1, "bullet" = 1, "laser" = 1, "energy" = 1, "bomb" = 1, "bio" = 1, "rad" = 1.5, "fire" = 1.5, "acid" = 1.5)
|
||||
beauty_modifier = 0.2
|
||||
|
||||
/datum/material/paper
|
||||
name = "paper"
|
||||
desc = "Ten thousand folds of pure starchy power."
|
||||
color = "#E5DCD5"
|
||||
categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE)
|
||||
sheet_type = /obj/item/stack/sheet/paperframes
|
||||
value_per_unit = 0.0025
|
||||
armor_modifiers = list("melee" = 0.1, "bullet" = 0.1, "laser" = 0.1, "energy" = 0.1, "bomb" = 0.1, "bio" = 0.1, "rad" = 1.5, "fire" = 0, "acid" = 1.5)
|
||||
beauty_modifier = 0.3
|
||||
turf_sound_override = FOOTSTEP_SAND
|
||||
texture_layer_icon_state = "paper"
|
||||
|
||||
/datum/material/paper/on_applied_obj(obj/source, amount, material_flags)
|
||||
. = ..()
|
||||
if(material_flags & MATERIAL_AFFECT_STATISTICS)
|
||||
var/obj/paper = source
|
||||
paper.resistance_flags |= FLAMMABLE
|
||||
paper.obj_flags |= UNIQUE_RENAME
|
||||
|
||||
/datum/material/paper/on_removed_obj(obj/source, material_flags)
|
||||
if(material_flags & MATERIAL_AFFECT_STATISTICS)
|
||||
var/obj/paper = source
|
||||
paper.resistance_flags &= ~FLAMMABLE
|
||||
return ..()
|
||||
|
||||
/datum/material/cardboard
|
||||
name = "cardboard"
|
||||
desc = "They say cardboard is used by hobos to make incredible things."
|
||||
color = "#5F625C"
|
||||
categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE)
|
||||
sheet_type = /obj/item/stack/sheet/cardboard
|
||||
value_per_unit = 0.003
|
||||
armor_modifiers = list("melee" = 0.25, "bullet" = 0.25, "laser" = 0.25, "energy" = 0.25, "bomb" = 0.25, "bio" = 0.25, "rad" = 1.5, "fire" = 0, "acid" = 1.5)
|
||||
beauty_modifier = -0.1
|
||||
|
||||
/datum/material/cardboard/on_applied_obj(obj/source, amount, material_flags)
|
||||
. = ..()
|
||||
if(material_flags & MATERIAL_AFFECT_STATISTICS)
|
||||
var/obj/cardboard = source
|
||||
cardboard.resistance_flags |= FLAMMABLE
|
||||
cardboard.obj_flags |= UNIQUE_RENAME
|
||||
|
||||
/datum/material/cardboard/on_removed_obj(obj/source, material_flags)
|
||||
if(material_flags & MATERIAL_AFFECT_STATISTICS)
|
||||
var/obj/cardboard = source
|
||||
cardboard.resistance_flags &= ~FLAMMABLE
|
||||
return ..()
|
||||
|
||||
/datum/material/bone
|
||||
name = "bone"
|
||||
desc = "Man, building with this will make you the coolest caveman on the block."
|
||||
color = "#e3dac9"
|
||||
categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE)
|
||||
sheet_type = /obj/item/stack/sheet/bone
|
||||
value_per_unit = 0.05
|
||||
armor_modifiers = list("melee" = 1.2, "bullet" = 0.75, "laser" = 0.75, "energy" = 1.2, "bomb" = 1, "bio" = 1, "rad" = 1.5, "fire" = 1.5, "acid" = 1.5)
|
||||
beauty_modifier = -0.2
|
||||
|
||||
/datum/material/bamboo
|
||||
name = "bamboo"
|
||||
desc = "If it's good enough for pandas, it's good enough for you."
|
||||
color = "#339933"
|
||||
categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE)
|
||||
sheet_type = /obj/item/stack/sheet/mineral/bamboo
|
||||
value_per_unit = 0.0025
|
||||
armor_modifiers = list("melee" = 0.5, "bullet" = 0.5, "laser" = 0.5, "energy" = 0.5, "bomb" = 0.5, "bio" = 0.51, "rad" = 1.5, "fire" = 0.5, "acid" = 1.5)
|
||||
beauty_modifier = 0.2
|
||||
turf_sound_override = FOOTSTEP_WOOD
|
||||
texture_layer_icon_state = "bamboo"
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
///It's gross, gets the name of it's owner, and is all kinds of fucked up
|
||||
/datum/material/meat
|
||||
name = "meat"
|
||||
desc = "Meat"
|
||||
color = rgb(214, 67, 67)
|
||||
categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE)
|
||||
sheet_type = /obj/item/stack/sheet/meat
|
||||
value_per_unit = 0.05
|
||||
beauty_modifier = -0.3
|
||||
strength_modifier = 0.7
|
||||
armor_modifiers = list("melee" = 0.3, "bullet" = 0.3, "laser" = 1.2, "energy" = 1.2, "bomb" = 0.3, "bio" = 0, "rad" = 0.7, "fire" = 1, "acid" = 1)
|
||||
item_sound_override = 'sound/effects/meatslap.ogg'
|
||||
turf_sound_override = FOOTSTEP_MEAT
|
||||
texture_layer_icon_state = "meat"
|
||||
|
||||
/datum/material/meat/on_removed(atom/source, material_flags)
|
||||
. = ..()
|
||||
qdel(source.GetComponent(/datum/component/edible))
|
||||
|
||||
/datum/material/meat/on_applied_obj(obj/O, amount, material_flags)
|
||||
. = ..()
|
||||
O.obj_flags |= UNIQUE_RENAME //So you can name it after the person its made from, a depressing comprimise.
|
||||
make_edible(O, amount, material_flags)
|
||||
|
||||
/datum/material/meat/on_applied_turf(turf/T, amount, material_flags)
|
||||
. = ..()
|
||||
make_edible(T, amount, material_flags)
|
||||
|
||||
/datum/material/meat/proc/make_edible(atom/source, amount, material_flags)
|
||||
var/nutriment_count = 3 * (amount / MINERAL_MATERIAL_AMOUNT)
|
||||
var/oil_count = 2 * (amount / MINERAL_MATERIAL_AMOUNT)
|
||||
source.AddComponent(/datum/component/edible, list(/datum/reagent/consumable/nutriment = nutriment_count, /datum/reagent/consumable/cooking_oil = oil_count), null, RAW | MEAT | GROSS, null, 30, list("Fleshy"))
|
||||
@@ -0,0 +1,30 @@
|
||||
/datum/material/pizza
|
||||
name = "pizza"
|
||||
desc = "~Jamme, jamme, n'coppa, jamme ja! Jamme, jamme, n'coppa jamme ja, funi-culi funi-cala funi-culi funi-cala!! Jamme jamme ja funiculi funicula!~"
|
||||
color = "#FF9F23"
|
||||
categories = list(MAT_CATEGORY_RIGID = TRUE, MAT_CATEGORY_BASE_RECIPES = TRUE)
|
||||
sheet_type = /obj/item/stack/sheet/pizza
|
||||
value_per_unit = 0.05
|
||||
beauty_modifier = 0.1
|
||||
strength_modifier = 0.7
|
||||
armor_modifiers = list("melee" = 0.3, "bullet" = 0.3, "laser" = 1.2, "energy" = 1.2, "bomb" = 0.3, "bio" = 0, "rad" = 0.7, "fire" = 1, "acid" = 1)
|
||||
item_sound_override = 'sound/effects/meatslap.ogg'
|
||||
turf_sound_override = FOOTSTEP_MEAT
|
||||
texture_layer_icon_state = "pizza"
|
||||
|
||||
/datum/material/pizza/on_removed(atom/source, material_flags)
|
||||
. = ..()
|
||||
qdel(source.GetComponent(/datum/component/edible))
|
||||
|
||||
/datum/material/pizza/on_applied_obj(obj/O, amount, material_flags)
|
||||
. = ..()
|
||||
make_edible(O, amount, material_flags)
|
||||
|
||||
/datum/material/pizza/on_applied_turf(turf/T, amount, material_flags)
|
||||
. = ..()
|
||||
make_edible(T, amount, material_flags)
|
||||
|
||||
/datum/material/pizza/proc/make_edible(atom/source, amount, material_flags)
|
||||
var/nutriment_count = 3 * (amount / MINERAL_MATERIAL_AMOUNT)
|
||||
var/oil_count = 2 * (amount / MINERAL_MATERIAL_AMOUNT)
|
||||
source.AddComponent(/datum/component/edible, list(/datum/reagent/consumable/nutriment = nutriment_count, /datum/reagent/consumable/cooking_oil = oil_count), null, GRAIN | MEAT | DAIRY | VEGETABLES, null, 30, list("crust", "tomato", "cheese", "meat"))
|
||||
+1
-1
@@ -67,7 +67,7 @@
|
||||
var/datum/skill_holder/skill_holder
|
||||
|
||||
/datum/mind/New(var/key)
|
||||
skill_holder = new()
|
||||
skill_holder = new(src)
|
||||
src.key = key
|
||||
soulOwner = src
|
||||
martial_art = default_martial_art
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
school = "evocation"
|
||||
charge_max = 600
|
||||
clothes_req = NONE
|
||||
antimagic_allowed = TRUE
|
||||
range = 20
|
||||
base_icon_state = "fireball"
|
||||
action_icon_state = "fireball0"
|
||||
@@ -122,6 +123,7 @@
|
||||
desc = "A rare genome that attracts odd forces not usually observed. May sometimes pull you in randomly."
|
||||
school = "evocation"
|
||||
clothes_req = NONE
|
||||
antimagic_allowed = TRUE
|
||||
charge_max = 600
|
||||
invocation = "DOOOOOOOOOOOOOOOOOOOOM!!!"
|
||||
invocation_type = "shout"
|
||||
@@ -155,6 +157,7 @@
|
||||
dropmessage = "You let the electricity from your hand dissipate."
|
||||
hand_path = /obj/item/melee/touch_attack/shock
|
||||
charge_max = 400
|
||||
antimagic_allowed = TRUE
|
||||
clothes_req = NONE
|
||||
action_icon_state = "zap"
|
||||
|
||||
@@ -212,6 +215,7 @@
|
||||
desc = "Get a scent off of the item you're currently holding to track it. With an empty hand, you'll track the scent you've remembered."
|
||||
charge_max = 100
|
||||
clothes_req = NONE
|
||||
antimagic_allowed = TRUE
|
||||
range = -1
|
||||
include_user = TRUE
|
||||
action_icon_state = "nose"
|
||||
@@ -290,6 +294,7 @@
|
||||
name = "Drop a limb"
|
||||
desc = "Concentrate to make a random limb pop right off your body."
|
||||
clothes_req = NONE
|
||||
antimagic_allowed = TRUE
|
||||
charge_max = 100
|
||||
action_icon_state = "autotomy"
|
||||
|
||||
@@ -327,6 +332,7 @@
|
||||
name = "Lay Web"
|
||||
desc = "Drops a web. Only you will be able to traverse your web easily, making it pretty good for keeping you safe."
|
||||
clothes_req = NONE
|
||||
antimagic_allowed = TRUE
|
||||
charge_max = 4 SECONDS //the same time to lay a web
|
||||
action_icon = 'icons/mob/actions/actions_genetic.dmi'
|
||||
action_icon_state = "lay_web"
|
||||
@@ -368,6 +374,7 @@
|
||||
name = "Launch spike"
|
||||
desc = "Shoot your tongue out in the direction you're facing, embedding it and dealing damage until they remove it."
|
||||
clothes_req = NONE
|
||||
antimagic_allowed = TRUE
|
||||
charge_max = 100
|
||||
action_icon = 'icons/mob/actions/actions_genetic.dmi'
|
||||
action_icon_state = "spike"
|
||||
|
||||
@@ -462,6 +462,10 @@
|
||||
suffix = "whiteship_pod"
|
||||
name = "Salvage Pod"
|
||||
|
||||
/datum/map_template/shuttle/whiteship/cog
|
||||
suffix = "cog"
|
||||
name = "NT Prisoner Transport"
|
||||
|
||||
/datum/map_template/shuttle/cargo/box
|
||||
suffix = "box"
|
||||
name = "supply shuttle (Box)"
|
||||
@@ -628,4 +632,4 @@
|
||||
|
||||
/datum/map_template/shuttle/hunter/bounty
|
||||
suffix = "bounty"
|
||||
name = "Bounty Hunter Ship"
|
||||
name = "Bounty Hunter Ship"
|
||||
|
||||
@@ -11,6 +11,66 @@
|
||||
if(!mind.skill_holder)
|
||||
to_chat(usr, "<span class='warning'>How do you check the skills of [(usr == src)? "yourself when you are" : "something"] without the capability for skills? (PROBABLY A BUG, PRESS F1.)</span>")
|
||||
return
|
||||
var/datum/browser/B = new(usr, "skilldisplay_[REF(src)]", "Skills of [src]")
|
||||
B.set_content(mind.skill_html_readout())
|
||||
B.open()
|
||||
|
||||
mind.skill_holder.ui_interact(src)
|
||||
|
||||
/datum/skill_holder/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.always_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "skillpanel", "[owner.name]'s Skills", 620, 580, master_ui, state)
|
||||
ui.set_autoupdate(FALSE) // This UI is only ever opened by one person, and never is updated outside of user input.
|
||||
ui.open()
|
||||
else if(need_static_data_update)
|
||||
update_static_data(user)
|
||||
need_static_data_update = FALSE
|
||||
|
||||
/datum/skill_holder/ui_static_data(mob/user)
|
||||
. = list()
|
||||
.["skills"] = list()
|
||||
for(var/path in GLOB.skill_datums)
|
||||
var/datum/skill/S = GLOB.skill_datums[path]
|
||||
var/list/dat = S.get_skill_data(src)
|
||||
if(islist(dat["modifiers"]))
|
||||
dat["modifiers"] = jointext(dat["modifiers"], ", ")
|
||||
dat["percent_base"] = (dat["value_base"] / dat["max_value"])
|
||||
dat["percent_mod"] = (dat["value_mod"] / dat["max_value"])
|
||||
.["skills"] += list(dat)
|
||||
|
||||
/datum/skill_holder/ui_data(mob/user)
|
||||
. = list()
|
||||
.["playername"] = owner.name
|
||||
.["see_skill_mods"] = see_skill_mods
|
||||
.["admin"] = check_rights(R_DEBUG)
|
||||
|
||||
/datum/skill_holder/ui_act(action, params)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
switch(action)
|
||||
if("toggle_mods")
|
||||
see_skill_mods = !see_skill_mods
|
||||
return TRUE
|
||||
if ("adj_exp")
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
var/skill = text2path(params["skill"])
|
||||
var/number = input("Please insert the amount of experience/progress you'd like to add/subtract:") as num|null
|
||||
if (number)
|
||||
owner.set_skill_value(skill, owner.get_skill_value(skill, FALSE) + number)
|
||||
return TRUE
|
||||
if ("set_exp")
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
var/skill = text2path(params["skill"])
|
||||
var/number = input("Please insert the number you want to set the player's exp/progress to:") as num|null
|
||||
if (!isnull(number))
|
||||
owner.set_skill_value(skill, number)
|
||||
return TRUE
|
||||
if ("set_lvl")
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
var/datum/skill/level/S = GLOB.skill_datums[text2path(params["skill"])]
|
||||
var/number = input("Please insert a whole number between 0[S.associative ? " ([S.unskilled_tier])" : ""] and [S.max_levels][S.associative ? " ([S.levels[S.max_levels]])" : ""] corresponding to the level you'd like to set the player to.") as num|null
|
||||
if (number >= 0 && number <= S.max_levels)
|
||||
owner.set_skill_value(S.type, S.get_skill_level_value(number))
|
||||
return TRUE
|
||||
|
||||
@@ -8,6 +8,7 @@ GLOBAL_LIST_INIT_TYPED(skill_datums, /datum/skill, init_skill_datums())
|
||||
continue
|
||||
S = new path
|
||||
.[S.type] = S
|
||||
. = sortTim(., /proc/cmp_skill_categories, TRUE)
|
||||
|
||||
/**
|
||||
* Skill datums
|
||||
@@ -34,6 +35,8 @@ GLOBAL_LIST_INIT_TYPED(skill_datums, /datum/skill, init_skill_datums())
|
||||
var/competency_multiplier = 1
|
||||
/// A list of ways this skill can affect or be affected through actions and skill modifiers.
|
||||
var/list/skill_traits = list(SKILL_SANITY, SKILL_INTELLIGENCE)
|
||||
/// Index of this skill in the UI
|
||||
var/ui_category = SKILL_UI_CAT_MISC
|
||||
|
||||
/**
|
||||
* Ensures what someone's setting as a value for this skill is valid.
|
||||
@@ -57,10 +60,28 @@ GLOBAL_LIST_INIT_TYPED(skill_datums, /datum/skill, init_skill_datums())
|
||||
return new_value > existing
|
||||
|
||||
/**
|
||||
* Standard value "render"
|
||||
* Get a list of data used in the skill panel menu.
|
||||
*/
|
||||
/datum/skill/proc/standard_render_value(value, level)
|
||||
return value
|
||||
/datum/skill/proc/get_skill_data(datum/skill_holder/H)
|
||||
var/skill_value = H.owner.get_skill_value(type, FALSE)
|
||||
. = list(
|
||||
"name" = name,
|
||||
"desc" = desc,
|
||||
"path" = type,
|
||||
"value_base" = skill_value,
|
||||
"value_mod" = skill_value,
|
||||
"modifiers" = "None",
|
||||
"max_value" = 1 //To avoid division by zero later on.
|
||||
)
|
||||
var/list/mods = LAZYACCESS(H.skill_value_mods, type)
|
||||
if(mods)
|
||||
var/list/mod_names = list()
|
||||
for(var/k in mods)
|
||||
var/datum/skill_modifier/M = GLOB.skill_modifiers[k]
|
||||
mod_names |= M.name
|
||||
skill_value = M.apply_modifier(skill_value, type, H, MODIFIER_TARGET_VALUE)
|
||||
.["value_mod"] = skill_value
|
||||
.["modifiers"] = mod_names //Will be jointext()'d later.
|
||||
|
||||
// Just saying, the choice to use different sub-parent-types is to force coders to resolve issues as I won't be implementing custom procs to grab skill levels in a certain context.
|
||||
// Aka: So people don't forget to change checks if they change a skill's progression type.
|
||||
@@ -71,10 +92,12 @@ GLOBAL_LIST_INIT_TYPED(skill_datums, /datum/skill, init_skill_datums())
|
||||
competency_thresholds = list(THRESHOLD_COMPETENT = FALSE, THRESHOLD_EXPERT = TRUE, THRESHOLD_MASTER = TRUE)
|
||||
|
||||
/datum/skill/binary/sanitize_value(new_value)
|
||||
return new_value? TRUE : FALSE
|
||||
return new_value >= 1 ? TRUE : FALSE
|
||||
|
||||
/datum/skill/binary/standard_render_value(value, level)
|
||||
return value? "Yes" : "No"
|
||||
/datum/skill/binary/get_skill_data(datum/skill_holder/H)
|
||||
. = ..()
|
||||
.["base_readout"] = .["value_base"] ? "Learned: Yes" : "Learned: No"
|
||||
.["mod_readout"] = .["value_mod"] ? "Learned: Yes" : "Learned: No"
|
||||
|
||||
/datum/skill/numerical
|
||||
abstract_type = /datum/skill/numerical
|
||||
@@ -84,14 +107,15 @@ GLOBAL_LIST_INIT_TYPED(skill_datums, /datum/skill, init_skill_datums())
|
||||
var/max_value = 100
|
||||
/// Min value of this skill
|
||||
var/min_value = 0
|
||||
/// Display as a percent in standard_render_value?
|
||||
var/display_as_percent = FALSE
|
||||
|
||||
/datum/skill/numerical/sanitize_value(new_value)
|
||||
return clamp(new_value, min_value, max_value)
|
||||
|
||||
/datum/skill/numerical/standard_render_value(value, level)
|
||||
return display_as_percent? "[round(value/max_value/100, 0.01)]%" : "[value] / [max_value]"
|
||||
/datum/skill/numerical/get_skill_data(datum/skill_holder/H)
|
||||
. = ..()
|
||||
.["base_readout"] = "Skill Progress: \[[.["value_base"]] / [max_value]\]"
|
||||
.["mod_readout"] = "Skill Progress: \[[.["value_mod"]] / [max_value]\]"
|
||||
.["max_value"] = max_value
|
||||
|
||||
/datum/skill/enum
|
||||
abstract_type = /datum/skill/enum
|
||||
@@ -123,13 +147,7 @@ GLOBAL_LIST_INIT_TYPED(skill_datums, /datum/skill, init_skill_datums())
|
||||
var/max_assoc = ""
|
||||
var/max_assoc_start = 1
|
||||
for(var/lvl in 1 to max_levels)
|
||||
var/value
|
||||
switch(level_up_method)
|
||||
if(STANDARD_LEVEL_UP)
|
||||
value = XP_LEVEL(standard_xp_lvl_up, xp_lvl_multiplier, lvl)
|
||||
if(DWARFY_LEVEL_UP)
|
||||
value = DORF_XP_LEVEL(standard_xp_lvl_up, xp_lvl_multiplier, lvl)
|
||||
value = round(value, 1)
|
||||
var/value = round(get_skill_level_value(lvl), 1)
|
||||
if(!associative)
|
||||
levels += value
|
||||
continue
|
||||
@@ -167,8 +185,13 @@ GLOBAL_LIST_INIT_TYPED(skill_datums, /datum/skill, init_skill_datums())
|
||||
else if(. < 0)
|
||||
to_chat(M.current, "<span class='warning'>I feel like I've become worse at [name]!</span>")
|
||||
|
||||
/datum/skill/level/standard_render_value(value, level)
|
||||
var/current_lvl = associative ? (!level ? unskilled_tier : levels[level]) : level
|
||||
/datum/skill/level/get_skill_data(datum/skill_holder/H)
|
||||
. = ..()
|
||||
var/skill_value_base = .["value_base"]
|
||||
var/skill_value_mod = .["value_mod"]
|
||||
.["level_based"] = TRUE
|
||||
|
||||
var/level = LAZYACCESS(H.skill_levels, type) || 0
|
||||
var/current_lvl_xp_sum = 0
|
||||
if(level)
|
||||
current_lvl_xp_sum = associative ? levels[levels[level]] : levels[level]
|
||||
@@ -176,8 +199,50 @@ GLOBAL_LIST_INIT_TYPED(skill_datums, /datum/skill, init_skill_datums())
|
||||
var/next_lvl_xp = associative ? levels[levels[next_index]] : levels[next_index]
|
||||
if(next_lvl_xp > current_lvl_xp_sum)
|
||||
next_lvl_xp -= current_lvl_xp_sum
|
||||
.["lvl_base_num"] = .["lvl_mod_num"] = level
|
||||
.["lvl_base"] = .["lvl_mod"] = associative ? (!level ? unskilled_tier : levels[level]) : level
|
||||
.["base_style"] = .["mod_style"] = "font-weight:bold; color:hsl([(level+1)*(350/max_levels+1)], 50%, 50%)"
|
||||
.["xp_next_lvl_base"] = .["xp_next_lvl_mod"] = "\[[skill_value_base - current_lvl_xp_sum]/[next_lvl_xp]\]"
|
||||
|
||||
return "[associative ? current_lvl : "Lvl. [current_lvl]"] ([value - current_lvl_xp_sum]/[next_lvl_xp])[level == max_levels ? " \[MAX!\]" : ""]"
|
||||
.["max_lvl"] = max_levels
|
||||
var/max_value = associative ? levels[levels[max_levels]] : levels[max_levels]
|
||||
.["max_value"] = max_value
|
||||
|
||||
.["base_readout"] = "Overall Skill Progress: \[[skill_value_base]/[max_value]\]"
|
||||
.["mod_readout"] = "Overall Skill Progress: \[[skill_value_mod]/[max_value]\]"
|
||||
|
||||
var/list/mods = LAZYACCESS(H.skill_level_mods, type)
|
||||
if(mods) //I'm not proud of doing the same-ish process twice a row but here we go.
|
||||
var/list/mod_names = .["modifiers"]
|
||||
if(!mod_names)
|
||||
.["modifiers"] = mod_names = list()
|
||||
for(var/k in mods)
|
||||
var/datum/skill_modifier/M = GLOB.skill_modifiers[k]
|
||||
mod_names |= M.name
|
||||
level = M.apply_modifier(level, type, H, MODIFIER_TARGET_LEVEL)
|
||||
|
||||
if(level)
|
||||
current_lvl_xp_sum = associative ? levels[levels[level]] : levels[level]
|
||||
else
|
||||
current_lvl_xp_sum = 0
|
||||
next_index = min(max_levels, level+1)
|
||||
next_lvl_xp = associative ? levels[levels[next_index]] : levels[next_index]
|
||||
if(next_lvl_xp > current_lvl_xp_sum)
|
||||
next_lvl_xp -= current_lvl_xp_sum
|
||||
.["lvl_mod_num"] = level
|
||||
.["lvl_mod"] = associative ? (!level ? unskilled_tier : levels[level]) : level
|
||||
.["mod_style"] = "font-weight:bold; color:hsl([(level+1)*(300/(max_levels+1))], 50%, 50%)"
|
||||
.["xp_next_lvl_mod"] = "\[[skill_value_mod - current_lvl_xp_sum]/[next_lvl_xp]\]"
|
||||
|
||||
/**
|
||||
* Gets the base value required to reach a level specified by the 'num' arg.
|
||||
*/
|
||||
/datum/skill/level/proc/get_skill_level_value(num)
|
||||
switch(level_up_method)
|
||||
if(STANDARD_LEVEL_UP)
|
||||
. = XP_LEVEL(standard_xp_lvl_up, xp_lvl_multiplier, num)
|
||||
if(DWARFY_LEVEL_UP)
|
||||
. = DORF_XP_LEVEL(standard_xp_lvl_up, xp_lvl_multiplier, num)
|
||||
|
||||
/datum/skill/level/job
|
||||
abstract_type = /datum/skill/level/job
|
||||
|
||||
@@ -20,6 +20,18 @@
|
||||
var/list/original_values
|
||||
var/list/original_affinities
|
||||
var/list/original_levels
|
||||
/// The mind datum this skill is associated with, only used for the check_skills UI
|
||||
var/datum/mind/owner
|
||||
/// For UI updates.
|
||||
var/need_static_data_update = TRUE
|
||||
/// Whether modifiers and final skill values or only base values are displayed.
|
||||
var/see_skill_mods = TRUE
|
||||
/// The current selected skill category.
|
||||
var/selected_category
|
||||
|
||||
/datum/skill_holder/New(owner)
|
||||
..()
|
||||
src.owner = owner
|
||||
|
||||
/**
|
||||
* Grabs the value of a skill.
|
||||
@@ -79,6 +91,7 @@
|
||||
CRASH("Invalid set_skill_value call. Use skill typepaths.") //until a time when we somehow need text ids for dynamic skills, I'm enforcing this.
|
||||
var/datum/skill/S = GLOB.skill_datums[skill]
|
||||
value = S.sanitize_value(value)
|
||||
skill_holder.need_static_data_update = TRUE
|
||||
if(!isnull(value))
|
||||
LAZYINITLIST(skill_holder.skills)
|
||||
S.set_skill_value(skill_holder, value, src, silent)
|
||||
@@ -183,18 +196,3 @@
|
||||
divisor++
|
||||
if(divisor)
|
||||
. = modifier_is_multiplier ? value*(sum/divisor) : value/(sum/divisor)
|
||||
|
||||
/**
|
||||
* Generates a HTML readout of our skills.
|
||||
* Port to tgui-next when?
|
||||
*/
|
||||
/datum/mind/proc/skill_html_readout()
|
||||
var/list/out = list("<center><h1>Skills</h1></center><hr>")
|
||||
out += "<table style=\"width:100%\"><tr><th><b>Skill</b><th><b>Value</b></tr>"
|
||||
for(var/path in GLOB.skill_datums)
|
||||
var/datum/skill/S = GLOB.skill_datums[path]
|
||||
var/skill_value = get_skill_value(path)
|
||||
var/skill_level = get_skill_level(path, round = TRUE)
|
||||
out += "<tr><td><font color='[S.name_color]'>[S.name]</font></td><td>[S.standard_render_value(skill_value, skill_level)]</td></tr>"
|
||||
out += "</table>"
|
||||
return out.Join("")
|
||||
|
||||
@@ -7,6 +7,8 @@ GLOBAL_LIST_EMPTY(potential_mods_per_skill)
|
||||
* and cause lots of edge cases. These are fairly simple overall... make a subtype though, don't use this one.
|
||||
*/
|
||||
/datum/skill_modifier
|
||||
/// Name and description of the skill modifier, used in the UI
|
||||
var/name = "???"
|
||||
/// flags for this skill modifier.
|
||||
var/modifier_flags = NONE
|
||||
/// target skills, can be a specific skill typepath or a list of skill traits.
|
||||
@@ -110,6 +112,7 @@ GLOBAL_LIST_EMPTY(potential_mods_per_skill)
|
||||
if(M.modifier_flags & MODIFIER_SKILL_LEVEL)
|
||||
ADD_MOD_STEP(skill_holder.skill_level_mods, path, skill_holder.original_levels, get_skill_level(path, FALSE))
|
||||
LAZYSET(skill_holder.all_current_skill_modifiers, id, TRUE)
|
||||
skill_holder.need_static_data_update = TRUE
|
||||
|
||||
if(M.modifier_flags & MODIFIER_SKILL_BODYBOUND)
|
||||
M.RegisterSignal(src, COMSIG_MIND_TRANSFER, /datum/skill_modifier.proc/on_mind_transfer)
|
||||
@@ -141,6 +144,7 @@ GLOBAL_LIST_EMPTY(potential_mods_per_skill)
|
||||
if(M.modifier_flags & MODIFIER_SKILL_LEVEL && skill_holder.skill_level_mods)
|
||||
REMOVE_MOD_STEP(skill_holder.skill_level_mods, path, skill_holder.original_levels)
|
||||
LAZYREMOVE(skill_holder.all_current_skill_modifiers, id)
|
||||
skill_holder.need_static_data_update = TRUE
|
||||
|
||||
if(!mind_transfer && M.modifier_flags & MODIFIER_SKILL_BODYBOUND)
|
||||
M.UnregisterSignal(src, COMSIG_MIND_TRANSFER)
|
||||
@@ -165,11 +169,7 @@ GLOBAL_LIST_EMPTY(potential_mods_per_skill)
|
||||
var/datum/skill/S = GLOB.skill_datums[skillpath]
|
||||
if(method == MODIFIER_TARGET_VALUE && S.progression_type == SKILL_PROGRESSION_LEVEL)
|
||||
var/datum/skill/level/L = S
|
||||
switch(L.level_up_method)
|
||||
if(STANDARD_LEVEL_UP)
|
||||
mod = XP_LEVEL(L.standard_xp_lvl_up, L.xp_lvl_multiplier, S.competency_thresholds[mod])
|
||||
if(DWARFY_LEVEL_UP)
|
||||
mod = DORF_XP_LEVEL(L.standard_xp_lvl_up, L.xp_lvl_multiplier, S.competency_thresholds[mod])
|
||||
mod = L.get_skill_level_value(L.competency_thresholds[mod])
|
||||
else
|
||||
mod = S.competency_thresholds[mod]
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/datum/skill/level/job/wiring
|
||||
name = "Wiring"
|
||||
desc = "How proficient and knowledged you are at wiring beyond laying cables on the floor."
|
||||
desc = "How proficient and knowledged you are at wiring beyond making post-futuristic wire art."
|
||||
name_color = COLOR_PALE_ORANGE
|
||||
skill_traits = list(SKILL_SANITY, SKILL_INTELLIGENCE, SKILL_USE_TOOL, SKILL_TRAINING_TOOL)
|
||||
ui_category = SKILL_UI_CAT_ENG
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/datum/skill/numerical/surgery
|
||||
name = "Surgery"
|
||||
desc = "How proficient you are at doing surgery."
|
||||
desc = "How proficient you are at performing surgical procedures."
|
||||
name_color = COLOR_PALE_BLUE_GRAY
|
||||
competency_multiplier = 1.5 // 60% surgery speed up at max value of 100, considering the base multiplier.
|
||||
ui_category = SKILL_UI_CAT_MED
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/// Jobbie skill modifiers.
|
||||
|
||||
/datum/skill_modifier/job
|
||||
name = "Job Training"
|
||||
modifier_flags = MODIFIER_SKILL_VALUE|MODIFIER_SKILL_VIRTUE|MODIFIER_SKILL_ORIGIN_DIFF
|
||||
priority = MODIFIER_SKILL_PRIORITY_MAX
|
||||
|
||||
@@ -23,7 +24,7 @@
|
||||
modifier_flags = MODIFIER_SKILL_VALUE|MODIFIER_SKILL_LEVEL|MODIFIER_SKILL_VIRTUE|MODIFIER_SKILL_ORIGIN_DIFF
|
||||
level_mod = JOB_SKILL_TRAINED
|
||||
|
||||
/datum/skill_modifier/job/level/New(id)
|
||||
/datum/skill_modifier/job/level/New(id, register = FALSE)
|
||||
if(level_mod)
|
||||
value_mod = GET_STANDARD_LVL(level_mod)
|
||||
..()
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
/datum/skill_modifier/bad_mood
|
||||
name = "Mood (Dejected)"
|
||||
modifier_flags = MODIFIER_SKILL_VALUE|MODIFIER_SKILL_LEVEL|MODIFIER_SKILL_MULT|MODIFIER_SKILL_BODYBOUND
|
||||
target_skills = list(SKILL_SANITY)
|
||||
|
||||
/datum/skill_modifier/great_mood
|
||||
name = "Mood (Elated)"
|
||||
modifier_flags = MODIFIER_SKILL_AFFINITY|MODIFIER_SKILL_MULT|MODIFIER_SKILL_BODYBOUND
|
||||
target_skills = list(SKILL_SANITY)
|
||||
affinity_mod = 1.2
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/datum/skill_modifier/brain_damage
|
||||
name = "Brain Damage"
|
||||
target_skills = list(SKILL_INTELLIGENCE)
|
||||
modifier_flags = MODIFIER_SKILL_VALUE|MODIFIER_SKILL_AFFINITY|MODIFIER_SKILL_LEVEL|MODIFIER_SKILL_MULT|MODIFIER_SKILL_BODYBOUND
|
||||
value_mod = 0.85
|
||||
@@ -6,6 +7,7 @@
|
||||
affinity_mod = 0.85
|
||||
|
||||
/datum/skill_modifier/heavy_brain_damage
|
||||
name = "Brain Damage (Severe)"
|
||||
target_skills = list(SKILL_INTELLIGENCE)
|
||||
modifier_flags = MODIFIER_SKILL_VALUE|MODIFIER_SKILL_AFFINITY|MODIFIER_SKILL_LEVEL|MODIFIER_SKILL_BODYBOUND|MODIFIER_SKILL_HANDICAP|MODIFIER_USE_THRESHOLDS
|
||||
priority = MODIFIER_SKILL_PRIORITY_LOW
|
||||
|
||||
@@ -365,9 +365,9 @@
|
||||
status_type = STATUS_EFFECT_REPLACE
|
||||
alert_type = null
|
||||
var/mutable_appearance/marked_underlay
|
||||
var/obj/item/twohanded/kinetic_crusher/hammer_synced
|
||||
var/obj/item/kinetic_crusher/hammer_synced
|
||||
|
||||
/datum/status_effect/crusher_mark/on_creation(mob/living/new_owner, obj/item/twohanded/kinetic_crusher/new_hammer_synced)
|
||||
/datum/status_effect/crusher_mark/on_creation(mob/living/new_owner, obj/item/kinetic_crusher/new_hammer_synced)
|
||||
. = ..()
|
||||
if(.)
|
||||
hammer_synced = new_hammer_synced
|
||||
@@ -711,8 +711,9 @@ datum/status_effect/pacify
|
||||
if(hearing_args[HEARING_SPEAKER] == owner)
|
||||
return
|
||||
var/mob/living/carbon/C = owner
|
||||
var/hypnomsg = uncostumize_say(hearing_args[HEARING_RAW_MESSAGE], hearing_args[HEARING_MESSAGE_MODE])
|
||||
C.cure_trauma_type(/datum/brain_trauma/hypnosis, TRAUMA_RESILIENCE_SURGERY) //clear previous hypnosis
|
||||
addtimer(CALLBACK(C, /mob/living/carbon.proc/gain_trauma, /datum/brain_trauma/hypnosis, TRAUMA_RESILIENCE_SURGERY, hearing_args[HEARING_RAW_MESSAGE]), 10)
|
||||
addtimer(CALLBACK(C, /mob/living/carbon.proc/gain_trauma, /datum/brain_trauma/hypnosis, TRAUMA_RESILIENCE_SURGERY, hypnomsg), 10)
|
||||
addtimer(CALLBACK(C, /mob/living.proc/Stun, 60, TRUE, TRUE), 15) //Take some time to think about it
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -75,8 +75,8 @@
|
||||
|
||||
|
||||
/datum/wires/explosive/gibtonite
|
||||
holder_type = /obj/item/twohanded/required/gibtonite
|
||||
holder_type = /obj/item/gibtonite
|
||||
|
||||
/datum/wires/explosive/gibtonite/explode()
|
||||
var/obj/item/twohanded/required/gibtonite/P = holder
|
||||
var/obj/item/gibtonite/P = holder
|
||||
P.GibtoniteReaction(null, 2)
|
||||
+24
-25
@@ -48,6 +48,7 @@
|
||||
var/rad_insulation = RAD_NO_INSULATION
|
||||
|
||||
///The custom materials this atom is made of, used by a lot of things like furniture, walls, and floors (if I finish the functionality, that is.)
|
||||
///The list referenced by this var can be shared by multiple objects and should not be directly modified. Instead, use [set_custom_materials][/atom/proc/set_custom_materials].
|
||||
var/list/custom_materials
|
||||
///Bitfield for how the atom handles materials.
|
||||
var/material_flags = NONE
|
||||
@@ -114,11 +115,8 @@
|
||||
if (canSmoothWith)
|
||||
canSmoothWith = typelist("canSmoothWith", canSmoothWith)
|
||||
|
||||
var/temp_list = list()
|
||||
for(var/i in custom_materials)
|
||||
temp_list[SSmaterials.GetMaterialRef(i)] = custom_materials[i] //Get the proper instanced version
|
||||
custom_materials = null //Null the list to prepare for applying the materials properly
|
||||
set_custom_materials(temp_list)
|
||||
// apply materials properly from the default custom_materials value
|
||||
set_custom_materials(custom_materials)
|
||||
|
||||
ComponentInitialize()
|
||||
|
||||
@@ -438,7 +436,7 @@
|
||||
var/blood_id = get_blood_id()
|
||||
if(!(blood_id in GLOB.blood_reagent_types))
|
||||
return
|
||||
return list("ANIMAL DNA" = "Y-")
|
||||
return list("color" = list(BLOOD_COLOR_HUMAN), "ANIMAL DNA" = "Y-")
|
||||
|
||||
/mob/living/carbon/get_blood_dna_list()
|
||||
var/blood_id = get_blood_id()
|
||||
@@ -446,13 +444,15 @@
|
||||
return
|
||||
var/list/blood_dna = list()
|
||||
if(dna)
|
||||
blood_dna["color"] = list(dna.species.exotic_blood_color) //so when combined, the list grows with the number of colors
|
||||
blood_dna[dna.unique_enzymes] = dna.blood_type
|
||||
else
|
||||
blood_dna["color"] = list(BLOOD_COLOR_HUMAN)
|
||||
blood_dna["UNKNOWN DNA"] = "X*"
|
||||
return blood_dna
|
||||
|
||||
/mob/living/carbon/alien/get_blood_dna_list()
|
||||
return list("UNKNOWN DNA" = "X*")
|
||||
return list("color" = list(BLOOD_COLOR_XENO), "UNKNOWN DNA" = "X*")
|
||||
|
||||
//to add a mob's dna info into an object's blood_DNA list.
|
||||
/atom/proc/transfer_mob_blood_dna(mob/living/L)
|
||||
@@ -461,8 +461,10 @@
|
||||
if(!new_blood_dna)
|
||||
return FALSE
|
||||
LAZYINITLIST(blood_DNA) //if our list of DNA doesn't exist yet, initialise it.
|
||||
LAZYINITLIST(blood_DNA["color"])
|
||||
var/old_length = blood_DNA.len
|
||||
blood_DNA |= new_blood_dna
|
||||
blood_DNA["color"] += new_blood_dna["color"]
|
||||
if(blood_DNA.len == old_length)
|
||||
return FALSE
|
||||
return TRUE
|
||||
@@ -470,9 +472,12 @@
|
||||
//to add blood dna info to the object's blood_DNA list
|
||||
/atom/proc/transfer_blood_dna(list/blood_dna, list/datum/disease/diseases)
|
||||
LAZYINITLIST(blood_DNA)
|
||||
LAZYINITLIST(blood_dna["color"])
|
||||
|
||||
var/old_length = blood_DNA.len
|
||||
blood_DNA |= blood_dna
|
||||
if(blood_DNA.len > old_length)
|
||||
blood_DNA["color"] += blood_dna["color"]
|
||||
return TRUE
|
||||
//some new blood DNA was added
|
||||
|
||||
@@ -544,23 +549,22 @@
|
||||
|
||||
/atom/proc/blood_DNA_to_color()
|
||||
var/list/colors = list()//first we make a list of all bloodtypes present
|
||||
for(var/bloop in blood_DNA)
|
||||
if(colors[blood_DNA[bloop]])
|
||||
colors[blood_DNA[bloop]]++
|
||||
for(var/blood_color in blood_DNA["color"])
|
||||
if(colors[blood_color])
|
||||
colors[blood_color]++
|
||||
else
|
||||
colors[blood_DNA[bloop]] = 1
|
||||
colors[blood_color] = 1
|
||||
|
||||
var/final_rgb = BLOOD_COLOR_HUMAN //a default so we don't have white blood graphics if something messed up
|
||||
|
||||
if(colors.len)
|
||||
var/sum = 0 //this is all shitcode, but it works; trust me
|
||||
final_rgb = bloodtype_to_color(colors[1])
|
||||
final_rgb = colors[1]
|
||||
sum = colors[colors[1]]
|
||||
if(colors.len > 1)
|
||||
var/i = 2
|
||||
while(i <= colors.len)
|
||||
var/tmp = colors[colors[i]]
|
||||
final_rgb = BlendRGB(final_rgb, bloodtype_to_color(colors[i]), tmp/(tmp+sum))
|
||||
final_rgb = BlendRGB(final_rgb, colors[i], tmp/(tmp+sum))
|
||||
sum += tmp
|
||||
i++
|
||||
|
||||
@@ -1006,26 +1010,21 @@ Proc for attack log creation, because really why not
|
||||
|
||||
///Sets the custom materials for an item.
|
||||
/atom/proc/set_custom_materials(var/list/materials, multiplier = 1)
|
||||
|
||||
if(!materials)
|
||||
materials = custom_materials
|
||||
|
||||
if(custom_materials) //Only runs if custom materials existed at first. Should usually be the case but check anyways
|
||||
for(var/i in custom_materials)
|
||||
var/datum/material/custom_material = SSmaterials.GetMaterialRef(i)
|
||||
custom_material.on_removed(src, material_flags) //Remove the current materials
|
||||
|
||||
if(!length(materials))
|
||||
custom_materials = null
|
||||
return
|
||||
|
||||
custom_materials = list() //Reset the list
|
||||
if(material_flags)
|
||||
for(var/x in materials)
|
||||
var/datum/material/custom_material = SSmaterials.GetMaterialRef(x)
|
||||
custom_material.on_applied(src, materials[x] * multiplier * material_modifier, material_flags)
|
||||
|
||||
for(var/x in materials)
|
||||
var/datum/material/custom_material = SSmaterials.GetMaterialRef(x)
|
||||
|
||||
if(material_flags & MATERIAL_EFFECTS)
|
||||
custom_material.on_applied(src, materials[custom_material] * multiplier * material_modifier, material_flags)
|
||||
custom_materials[custom_material] += materials[x] * multiplier
|
||||
custom_materials = SSmaterials.FindOrCreateMaterialCombo(materials, multiplier)
|
||||
|
||||
/**
|
||||
* Returns true if this atom has gravity for the passed in turf
|
||||
|
||||
@@ -51,4 +51,4 @@
|
||||
|
||||
H.dna.add_mutation(CLOWNMUT)
|
||||
H.dna.add_mutation(SMILE)
|
||||
H.gain_trauma(/datum/brain_trauma/mild/phobia, TRAUMA_RESILIENCE_LOBOTOMY, "clowns") //MWA HA HA
|
||||
H.gain_trauma(/datum/brain_trauma/mild/phobia/clowns, TRAUMA_RESILIENCE_LOBOTOMY) //MWA HA HA
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
targetitem = /obj/item/gun/energy/e_gun/hos
|
||||
difficulty = 10
|
||||
excludefromjob = list("Head Of Security")
|
||||
altitems = list(/obj/item/gun/ballistic/revolver/mws, /obj/item/choice_beacon/hosgun) //We now look for eather the alt verson of the hos gun or the beacon picker.
|
||||
altitems = list(/obj/item/gun/ballistic/revolver/mws, /obj/item/choice_beacon/hosgun) //We now look for either the alt verson of the hos gun or the beacon picker.
|
||||
|
||||
/datum/objective_item/steal/handtele
|
||||
name = "a hand teleporter."
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
|
||||
/datum/game_mode/wizard/are_special_antags_dead()
|
||||
for(var/datum/mind/wizard in wizards)
|
||||
for(var/datum/mind/wizard in wizards | apprentices)
|
||||
if(isliving(wizard.current) && wizard.current.stat!=DEAD)
|
||||
return FALSE
|
||||
|
||||
@@ -58,6 +58,14 @@
|
||||
|
||||
return TRUE
|
||||
|
||||
/datum/game_mode/wizard/check_finished()
|
||||
. = ..()
|
||||
if(.)
|
||||
finished = TRUE
|
||||
else if(gamemode_ready && are_special_antags_dead() && !CONFIG_GET(keyed_list/continuous)[config_tag])
|
||||
finished = TRUE
|
||||
. = TRUE
|
||||
|
||||
/datum/game_mode/wizard/set_round_result()
|
||||
..()
|
||||
if(finished)
|
||||
|
||||
@@ -46,29 +46,16 @@
|
||||
"Dinnerware",
|
||||
"Imported"
|
||||
)
|
||||
var/list/allowed_materials = list(
|
||||
/datum/material/iron,
|
||||
/datum/material/glass,
|
||||
/datum/material/gold,
|
||||
/datum/material/silver,
|
||||
/datum/material/diamond,
|
||||
/datum/material/uranium,
|
||||
/datum/material/plasma,
|
||||
/datum/material/bluespace,
|
||||
/datum/material/bananium,
|
||||
/datum/material/titanium,
|
||||
/datum/material/runite,
|
||||
/datum/material/plastic,
|
||||
/datum/material/adamantine,
|
||||
/datum/material/mythril,
|
||||
/datum/material/wood
|
||||
)
|
||||
var/list/allowed_materials
|
||||
|
||||
/// Base print speed
|
||||
var/base_print_speed = 10
|
||||
|
||||
/obj/machinery/autolathe/Initialize()
|
||||
AddComponent(/datum/component/material_container, allowed_materials, _show_on_examine=TRUE, _after_insert=CALLBACK(src, .proc/AfterMaterialInsert))
|
||||
var/list/mats = allowed_materials
|
||||
if(!mats)
|
||||
mats = SSmaterials.materialtypes_by_category[MAT_CATEGORY_RIGID]
|
||||
AddComponent(/datum/component/material_container, mats, _show_on_examine=TRUE, _after_insert=CALLBACK(src, .proc/AfterMaterialInsert))
|
||||
. = ..()
|
||||
wires = new /datum/wires/autolathe(src)
|
||||
stored_research = new stored_research
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
return examine(user)
|
||||
|
||||
//Start growing a human clone in the pod!
|
||||
/obj/machinery/clonepod/proc/growclone(ckey, clonename, ui, mutation_index, mindref, datum/species/mrace, list/features, factions, list/quirks, datum/bank_account/insurance)
|
||||
/obj/machinery/clonepod/proc/growclone(ckey, clonename, ui, mutation_index, mindref, datum/species/mrace, list/features, factions, list/quirks, datum/bank_account/insurance, list/traumas)
|
||||
if(panel_open)
|
||||
return FALSE
|
||||
if(mess || attempting)
|
||||
@@ -209,6 +209,12 @@
|
||||
var/datum/quirk/Q = new V(H)
|
||||
Q.on_clone(quirks[V])
|
||||
|
||||
for(var/t in traumas)
|
||||
var/datum/brain_trauma/BT = t
|
||||
var/datum/brain_trauma/cloned_trauma = BT.on_clone()
|
||||
if(cloned_trauma)
|
||||
H.gain_trauma(cloned_trauma, BT.resilience)
|
||||
|
||||
H.set_cloned_appearance()
|
||||
H.give_genitals(TRUE)
|
||||
|
||||
@@ -271,9 +277,6 @@
|
||||
var/obj/item/bodypart/BP = I
|
||||
BP.attach_limb(mob_occupant)
|
||||
|
||||
//Premature clones may have brain damage.
|
||||
mob_occupant.adjustOrganLoss(ORGAN_SLOT_BRAIN, -((speed_coeff / 2) * dmg_mult))
|
||||
|
||||
use_power(7500) //This might need tweaking.
|
||||
|
||||
else if((mob_occupant && mob_occupant.cloneloss <= (100 - heal_level)))
|
||||
@@ -399,6 +402,8 @@
|
||||
to_chat(occupant, "<span class='notice'><b>There is a bright flash!</b><br><i>You feel like a new being.</i></span>")
|
||||
mob_occupant.flash_act()
|
||||
|
||||
mob_occupant.adjustOrganLoss(ORGAN_SLOT_BRAIN, mob_occupant.getCloneLoss())
|
||||
|
||||
occupant.forceMove(T)
|
||||
update_icon()
|
||||
mob_occupant.domutcheck(1) //Waiting until they're out before possible monkeyizing. The 1 argument forces powers to manifest.
|
||||
@@ -474,10 +479,9 @@
|
||||
unattached_flesh.Cut()
|
||||
|
||||
H.setCloneLoss(CLONE_INITIAL_DAMAGE) //Yeah, clones start with very low health, not with random, because why would they start with random health
|
||||
//H.setOrganLoss(ORGAN_SLOT_BRAIN, CLONE_INITIAL_DAMAGE)
|
||||
// In addition to being cellularly damaged and having barely any
|
||||
|
||||
// brain function, they also have no limbs or internal organs.
|
||||
// In addition to being cellularly damaged, they also have no limbs or internal organs.
|
||||
// Applying brainloss is done when the clone leaves the pod, so application of traumas can happen.
|
||||
// based on the level of damage sustained.
|
||||
|
||||
if(!HAS_TRAIT(H, TRAIT_NODISMEMBER))
|
||||
var/static/list/zones = list(BODY_ZONE_R_ARM, BODY_ZONE_L_ARM, BODY_ZONE_R_LEG, BODY_ZONE_L_LEG)
|
||||
|
||||
@@ -42,9 +42,9 @@
|
||||
/obj/item/clothing/mask/facehugger/toy = ARCADE_WEIGHT_RARE,
|
||||
/obj/item/gun/ballistic/automatic/toy/pistol/unrestricted = ARCADE_WEIGHT_TRICK,
|
||||
/obj/item/hot_potato/harmless/toy = ARCADE_WEIGHT_RARE,
|
||||
/obj/item/twohanded/dualsaber/toy = ARCADE_WEIGHT_RARE,
|
||||
/obj/item/twohanded/dualsaber/hypereutactic/toy = ARCADE_WEIGHT_RARE,
|
||||
/obj/item/twohanded/dualsaber/hypereutactic/toy/rainbow = ARCADE_WEIGHT_RARE,
|
||||
/obj/item/dualsaber/toy = ARCADE_WEIGHT_RARE,
|
||||
/obj/item/dualsaber/hypereutactic/toy = ARCADE_WEIGHT_RARE,
|
||||
/obj/item/dualsaber/hypereutactic/toy/rainbow = ARCADE_WEIGHT_RARE,
|
||||
|
||||
/obj/item/storage/box/snappops = ARCADE_WEIGHT_TRICK,
|
||||
/obj/item/clothing/under/syndicate/tacticool = ARCADE_WEIGHT_TRICK,
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
if(pod.occupant)
|
||||
continue //how though?
|
||||
|
||||
if(pod.growclone(R.fields["ckey"], R.fields["name"], R.fields["UI"], R.fields["SE"], R.fields["mind"], R.fields["mrace"], R.fields["features"], R.fields["factions"], R.fields["quirks"], R.fields["bank_account"]))
|
||||
if(pod.growclone(R.fields["ckey"], R.fields["name"], R.fields["UI"], R.fields["SE"], R.fields["mind"], R.fields["mrace"], R.fields["features"], R.fields["factions"], R.fields["quirks"], R.fields["bank_account"], R.fields["traumas"]))
|
||||
temp = "[R.fields["name"]] => <font class='good'>Cloning cycle in progress...</font>"
|
||||
records -= R
|
||||
|
||||
@@ -442,14 +442,17 @@
|
||||
var/mob/living/mob_occupant = get_mob_or_brainmob(occupant)
|
||||
var/datum/dna/dna
|
||||
var/datum/bank_account/has_bank_account
|
||||
|
||||
// Do not use unless you know what they are.
|
||||
var/mob/living/carbon/C = mob_occupant
|
||||
var/mob/living/brain/B = mob_occupant
|
||||
|
||||
if(ishuman(mob_occupant))
|
||||
var/mob/living/carbon/C = mob_occupant
|
||||
dna = C.has_dna()
|
||||
var/obj/item/card/id/I = C.get_idcard()
|
||||
if(I)
|
||||
has_bank_account = I.registered_account
|
||||
if(isbrain(mob_occupant))
|
||||
var/mob/living/brain/B = mob_occupant
|
||||
dna = B.stored_dna
|
||||
|
||||
if(!istype(dna))
|
||||
@@ -497,11 +500,17 @@
|
||||
R.fields["features"] = dna.features
|
||||
R.fields["factions"] = mob_occupant.faction
|
||||
R.fields["quirks"] = list()
|
||||
R.fields["bank_account"] = has_bank_account
|
||||
for(var/V in mob_occupant.roundstart_quirks)
|
||||
var/datum/quirk/T = V
|
||||
R.fields["quirks"][T.type] = T.clone_data()
|
||||
|
||||
R.fields["traumas"] = list()
|
||||
if(ishuman(mob_occupant))
|
||||
R.fields["traumas"] = C.get_traumas()
|
||||
if(isbrain(mob_occupant))
|
||||
R.fields["traumas"] = B.get_traumas()
|
||||
|
||||
R.fields["bank_account"] = has_bank_account
|
||||
if (!isnull(mob_occupant.mind)) //Save that mind so traitors can continue traitoring after cloning.
|
||||
R.fields["mind"] = "[REF(mob_occupant.mind)]"
|
||||
|
||||
|
||||
@@ -1058,11 +1058,11 @@
|
||||
to_chat(user, "<span class='warning'>The airlock's bolts prevent it from being forced!</span>")
|
||||
else if( !welded && !operating)
|
||||
if(!beingcrowbarred) //being fireaxe'd
|
||||
var/obj/item/twohanded/fireaxe/F = I
|
||||
if(F.wielded)
|
||||
INVOKE_ASYNC(src, (density ? .proc/open : .proc/close), 2)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need to be wielding the fire axe to do that!</span>")
|
||||
var/obj/item/fireaxe/axe = I
|
||||
if(!axe.wielded)
|
||||
to_chat(user, "<span class='warning'>You need to be wielding \the [axe] to do that!</span>")
|
||||
return
|
||||
INVOKE_ASYNC(src, (density ? .proc/open : .proc/close), 2)
|
||||
else
|
||||
INVOKE_ASYNC(src, (density ? .proc/open : .proc/close), 2)
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
var/secondsElectrified = 0
|
||||
var/shockedby
|
||||
var/visible = TRUE
|
||||
var/visible = TRUE // To explain: Whether the door can block line of sight when closed or not.
|
||||
var/operating = FALSE
|
||||
var/glass = FALSE
|
||||
var/welded = FALSE
|
||||
@@ -182,7 +182,7 @@
|
||||
return
|
||||
|
||||
/obj/machinery/door/attackby(obj/item/I, mob/user, params)
|
||||
if(user.a_intent != INTENT_HARM && (istype(I, /obj/item/crowbar) || istype(I, /obj/item/twohanded/fireaxe)))
|
||||
if(user.a_intent != INTENT_HARM && (istype(I, /obj/item/crowbar) || istype(I, /obj/item/fireaxe)))
|
||||
try_to_crowbar(I, user)
|
||||
return 1
|
||||
else if(istype(I, /obj/item/weldingtool))
|
||||
|
||||
@@ -54,6 +54,15 @@
|
||||
else
|
||||
icon_state = "[src.base_state]open"
|
||||
|
||||
/obj/machinery/door/window/update_atom_colour()
|
||||
if((color && (color_hex2num(color) < 255)))
|
||||
visible = TRUE
|
||||
if(density)
|
||||
set_opacity(TRUE)
|
||||
else
|
||||
visible = FALSE
|
||||
set_opacity(density && visible)
|
||||
|
||||
/obj/machinery/door/window/proc/open_and_close()
|
||||
open()
|
||||
if(src.check_access(null))
|
||||
@@ -143,16 +152,18 @@
|
||||
do_animate("opening")
|
||||
playsound(src.loc, 'sound/machines/windowdoor.ogg', 100, 1)
|
||||
src.icon_state ="[src.base_state]open"
|
||||
sleep(10)
|
||||
addtimer(CALLBACK(src, .proc/finish_opening), 10)
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/door/window/proc/finish_opening()
|
||||
operating = FALSE
|
||||
density = FALSE
|
||||
// src.sd_set_opacity(0) //TODO: why is this here? Opaque windoors? ~Carn
|
||||
if(visible)
|
||||
set_opacity(FALSE)
|
||||
air_update_turf(1)
|
||||
update_freelook_sight()
|
||||
|
||||
if(operating == 1) //emag again
|
||||
operating = FALSE
|
||||
return 1
|
||||
|
||||
/obj/machinery/door/window/close(forced=0)
|
||||
if (src.operating)
|
||||
@@ -171,10 +182,13 @@
|
||||
density = TRUE
|
||||
air_update_turf(1)
|
||||
update_freelook_sight()
|
||||
sleep(10)
|
||||
addtimer(CALLBACK(src, .proc/finish_closing), 10)
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/door/window/proc/finish_closing()
|
||||
if(visible)
|
||||
set_opacity(TRUE)
|
||||
operating = FALSE
|
||||
return 1
|
||||
|
||||
/obj/machinery/door/window/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
switch(damage_type)
|
||||
|
||||
Regular → Executable
+1
-1
@@ -19,7 +19,7 @@
|
||||
/obj/item/modular_computer,
|
||||
/obj/item/ammo_casing/mws_batt,
|
||||
/obj/item/ammo_box/magazine/mws_mag,
|
||||
/obj/item/twohanded/electrostaff,
|
||||
/obj/item/electrostaff,
|
||||
/obj/item/gun/ballistic/automatic/magrifle))
|
||||
|
||||
/obj/machinery/recharger/RefreshParts()
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
/obj/machinery/sheetifier
|
||||
name = "Sheet-meister 2000"
|
||||
desc = "A very sheety machine"
|
||||
icon = 'icons/obj/machines/sheetifier.dmi'
|
||||
icon_state = "base_machine"
|
||||
density = TRUE
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 10
|
||||
active_power_usage = 100
|
||||
circuit = /obj/item/circuitboard/machine/sheetifier
|
||||
layer = BELOW_OBJ_LAYER
|
||||
var/busy_processing = FALSE
|
||||
|
||||
/obj/machinery/sheetifier/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/material_container, list(/datum/material/meat), MINERAL_MATERIAL_AMOUNT * MAX_STACK_SIZE * 2, TRUE, /obj/item/reagent_containers/food/snacks/meat/slab, CALLBACK(src, .proc/CanInsertMaterials), CALLBACK(src, .proc/AfterInsertMaterials))
|
||||
|
||||
/obj/machinery/sheetifier/update_overlays()
|
||||
. = ..()
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
var/mutable_appearance/on_overlay = mutable_appearance(icon, "buttons_on")
|
||||
. += on_overlay
|
||||
|
||||
/obj/machinery/sheetifier/update_icon_state()
|
||||
icon_state = "base_machine[busy_processing ? "_processing" : ""]"
|
||||
|
||||
/obj/machinery/sheetifier/proc/CanInsertMaterials()
|
||||
return !busy_processing
|
||||
|
||||
/obj/machinery/sheetifier/proc/AfterInsertMaterials(item_inserted, id_inserted, amount_inserted)
|
||||
busy_processing = TRUE
|
||||
update_icon()
|
||||
var/datum/material/last_inserted_material = id_inserted
|
||||
var/mutable_appearance/processing_overlay = mutable_appearance(icon, "processing")
|
||||
processing_overlay.color = last_inserted_material.color
|
||||
flick_overlay_static(processing_overlay, src, 64)
|
||||
addtimer(CALLBACK(src, .proc/finish_processing), 64)
|
||||
|
||||
/obj/machinery/sheetifier/proc/finish_processing()
|
||||
busy_processing = FALSE
|
||||
update_icon()
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
materials.retrieve_all() //Returns all as sheets
|
||||
@@ -108,7 +108,7 @@
|
||||
killwish.health = killwish.maxHealth
|
||||
killwish.vine_grab_distance = 6
|
||||
killwish.melee_damage_upper = 30
|
||||
killwish.loot = list(/obj/item/twohanded/dualsaber/hypereutactic)
|
||||
killwish.loot = list(/obj/item/dualsaber/hypereutactic)
|
||||
charges--
|
||||
insisting = FALSE
|
||||
if(!charges)
|
||||
|
||||
@@ -388,7 +388,7 @@
|
||||
/obj/item/mecha_parts/mecha_equipment/generator/get_equip_info()
|
||||
var/output = ..()
|
||||
if(output)
|
||||
return "[output] \[[fuel]: [round(fuel.amount*fuel.mats_per_stack,0.1)] cm<sup>3</sup>\] - <a href='?src=[REF(src)];toggle=1'>[equip_ready?"A":"Dea"]ctivate</a>"
|
||||
return "[output] \[[fuel]: [round(fuel.amount*MINERAL_MATERIAL_AMOUNT,0.1)] cm<sup>3</sup>\] - <a href='?src=[REF(src)];toggle=1'>[equip_ready?"A":"Dea"]ctivate</a>"
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/generator/action(target)
|
||||
if(chassis)
|
||||
@@ -398,9 +398,9 @@
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/generator/proc/load_fuel(var/obj/item/stack/sheet/P)
|
||||
if(P.type == fuel.type && P.amount > 0)
|
||||
var/to_load = max(max_fuel - fuel.amount*fuel.mats_per_stack,0)
|
||||
var/to_load = max(max_fuel - fuel.amount*MINERAL_MATERIAL_AMOUNT,0)
|
||||
if(to_load)
|
||||
var/units = min(max(round(to_load / P.mats_per_stack),1),P.amount)
|
||||
var/units = min(max(round(to_load / MINERAL_MATERIAL_AMOUNT),1),P.amount)
|
||||
fuel.amount += units
|
||||
P.use(units)
|
||||
occupant_message("[units] unit\s of [fuel] successfully loaded.")
|
||||
@@ -454,7 +454,7 @@
|
||||
if(cur_charge < chassis.cell.maxcharge)
|
||||
use_fuel = fuel_per_cycle_active
|
||||
chassis.give_power(power_per_cycle)
|
||||
fuel.amount -= min(use_fuel/fuel.mats_per_stack,fuel.amount)
|
||||
fuel.amount -= min(use_fuel/MINERAL_MATERIAL_AMOUNT,fuel.amount)
|
||||
update_equip_info()
|
||||
return 1
|
||||
|
||||
|
||||
@@ -256,7 +256,7 @@
|
||||
output_access_dialog(id_card, usr)
|
||||
|
||||
if(href_list["del_req_access"] && add_req_access)
|
||||
operation_req_access -= text2num(href_list["add_req_access"])
|
||||
operation_req_access -= text2num(href_list["del_req_access"])
|
||||
output_access_dialog(id_card, usr)
|
||||
|
||||
if(href_list["finish_req_access"])
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
var/mob/living/carbon/human/H = O
|
||||
var/obj/item/clothing/shoes/S = H.shoes
|
||||
if(S && S.bloody_shoes[blood_state])
|
||||
if(color != bloodtype_to_color(S.last_bloodtype))
|
||||
if(color != S.last_blood_color)
|
||||
return
|
||||
S.bloody_shoes[blood_state] = max(S.bloody_shoes[blood_state] - BLOOD_LOSS_PER_STEP, 0)
|
||||
shoe_types |= S.type
|
||||
@@ -104,7 +104,7 @@
|
||||
var/mob/living/carbon/human/H = O
|
||||
var/obj/item/clothing/shoes/S = H.shoes
|
||||
if(S && S.bloody_shoes[blood_state])
|
||||
if(color != bloodtype_to_color(S.last_bloodtype))//last entry - we check its color
|
||||
if(color != S.last_blood_color)//last entry - we check its color
|
||||
return
|
||||
S.bloody_shoes[blood_state] = max(S.bloody_shoes[blood_state] - BLOOD_LOSS_PER_STEP, 0)
|
||||
shoe_types |= S.type
|
||||
|
||||
@@ -146,14 +146,13 @@
|
||||
spawn(0)
|
||||
new /datum/hallucination/delusion(victim, TRUE, "demon",duration,0)
|
||||
|
||||
var/obj/item/twohanded/required/chainsaw/doomslayer/chainsaw = new(victim.loc)
|
||||
var/obj/item/chainsaw/doomslayer/chainsaw = new(victim.loc)
|
||||
victim.log_message("entered a blood frenzy", LOG_ATTACK)
|
||||
|
||||
ADD_TRAIT(chainsaw, TRAIT_NODROP, CHAINSAW_FRENZY_TRAIT)
|
||||
victim.drop_all_held_items()
|
||||
victim.put_in_hands(chainsaw, forced = TRUE)
|
||||
chainsaw.attack_self(victim)
|
||||
chainsaw.wield(victim)
|
||||
victim.reagents.add_reagent(/datum/reagent/medicine/adminordrazine,25)
|
||||
to_chat(victim, "<span class='warning'>KILL, KILL, KILL! YOU HAVE NO ALLIES ANYMORE, KILL THEM ALL!</span>")
|
||||
|
||||
|
||||
@@ -451,7 +451,7 @@
|
||||
lootcount = 1
|
||||
spawn_on_turf = FALSE
|
||||
//Note this is out of a 100 - Meaning the number you see is also the percent its going to pick that
|
||||
//This is ment for "low" loot that anyone could fine in a toilet, for better gear use high loot toilet
|
||||
//This is meant for "low" loot that anyone could find in a toilet, for better gear use high loot toilet
|
||||
loot = list("" = 30,
|
||||
/obj/item/lighter = 2,
|
||||
/obj/item/tape/random = 1,
|
||||
@@ -476,7 +476,7 @@
|
||||
lootcount = 1
|
||||
spawn_on_turf = FALSE
|
||||
//Note this is out of a 100 - Meaning the number you see is also the percent its going to pick that
|
||||
//This is ment for "prison" loot that is rather rare and ment for "prisoners if they get a crowbar to fine, or sec.
|
||||
//This is meant for "prison" loot that is rather rare and meant for "prisoners if they get a crowbar to fine, or sec.
|
||||
loot = list("" = 10,
|
||||
/obj/item/lighter = 5,
|
||||
/obj/item/poster/random_contraband = 5,
|
||||
|
||||
@@ -778,6 +778,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
..()
|
||||
|
||||
/obj/item/proc/microwave_act(obj/machinery/microwave/M)
|
||||
SEND_SIGNAL(src, COMSIG_ITEM_MICROWAVE_ACT, M)
|
||||
if(istype(M) && M.dirty < 100)
|
||||
M.dirty++
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/item/twohanded/rcl
|
||||
/obj/item/rcl
|
||||
name = "rapid cable layer"
|
||||
desc = "A device used to rapidly deploy cables. It has screws on the side which can be removed to slide off the cables. Do not use without insulation!"
|
||||
icon = 'icons/obj/tools.dmi'
|
||||
@@ -23,15 +23,26 @@
|
||||
var/datum/radial_menu/persistent/wiring_gui_menu
|
||||
var/mob/listeningTo
|
||||
|
||||
/obj/item/twohanded/rcl/Initialize()
|
||||
/obj/item/rcl/Initialize()
|
||||
. = ..()
|
||||
RegisterSignal(src, COMSIG_TWOHANDED_WIELD, .proc/on_wield)
|
||||
RegisterSignal(src, COMSIG_TWOHANDED_UNWIELD, .proc/on_unwield)
|
||||
update_icon()
|
||||
|
||||
/obj/item/twohanded/rcl/ComponentInitialize()
|
||||
/obj/item/rcl/ComponentInitialize()
|
||||
. = ..()
|
||||
AddElement(/datum/element/update_icon_updates_onmob)
|
||||
AddComponent(/datum/component/two_handed)
|
||||
|
||||
/obj/item/twohanded/rcl/attackby(obj/item/W, mob/user)
|
||||
/// triggered on wield of two handed item
|
||||
/obj/item/rcl/proc/on_wield(obj/item/source, mob/user)
|
||||
active = TRUE
|
||||
|
||||
/// triggered on unwield of two handed item
|
||||
/obj/item/rcl/proc/on_unwield(obj/item/source, mob/user)
|
||||
active = FALSE
|
||||
|
||||
/obj/item/rcl/attackby(obj/item/W, mob/user)
|
||||
if(istype(W, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/C = W
|
||||
|
||||
@@ -86,26 +97,26 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/twohanded/rcl/examine(mob/user)
|
||||
/obj/item/rcl/examine(mob/user)
|
||||
. = ..()
|
||||
if(loaded)
|
||||
. += "<span class='info'>It contains [loaded.amount]/[max_amount] cables.</span>"
|
||||
|
||||
/obj/item/twohanded/rcl/Destroy()
|
||||
/obj/item/rcl/Destroy()
|
||||
QDEL_NULL(loaded)
|
||||
last = null
|
||||
listeningTo = null
|
||||
QDEL_NULL(wiring_gui_menu)
|
||||
return ..()
|
||||
|
||||
/obj/item/twohanded/rcl/update_icon_state()
|
||||
/obj/item/rcl/update_icon_state()
|
||||
icon_state = initial(icon_state)
|
||||
item_state = initial(item_state)
|
||||
if(!loaded || !loaded.amount)
|
||||
icon_state += "-empty"
|
||||
item_state += "-0"
|
||||
|
||||
/obj/item/twohanded/rcl/update_overlays()
|
||||
/obj/item/rcl/update_overlays()
|
||||
. = ..()
|
||||
if(!loaded || !loaded.amount)
|
||||
return
|
||||
@@ -113,7 +124,7 @@
|
||||
cable_overlay.color = GLOB.cable_colors[colors[current_color_index]]
|
||||
. += cable_overlay
|
||||
|
||||
/obj/item/twohanded/rcl/worn_overlays(isinhands, icon_file, used_state, style_flags = NONE)
|
||||
/obj/item/rcl/worn_overlays(isinhands, icon_file, used_state, style_flags = NONE)
|
||||
. = ..()
|
||||
if(!isinhands || !(loaded?.amount))
|
||||
return
|
||||
@@ -121,7 +132,7 @@
|
||||
cable_overlay.color = GLOB.cable_colors[colors[current_color_index]]
|
||||
. += cable_overlay
|
||||
|
||||
/obj/item/twohanded/rcl/proc/is_empty(mob/user, loud = 1)
|
||||
/obj/item/rcl/proc/is_empty(mob/user, loud = 1)
|
||||
update_icon()
|
||||
if(!loaded || !loaded.amount)
|
||||
if(loud)
|
||||
@@ -130,26 +141,23 @@
|
||||
QDEL_NULL(loaded)
|
||||
loaded = null
|
||||
QDEL_NULL(wiring_gui_menu)
|
||||
unwield(user)
|
||||
active = wielded
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/twohanded/rcl/pickup(mob/user)
|
||||
/obj/item/rcl/pickup(mob/user)
|
||||
..()
|
||||
getMobhook(user)
|
||||
|
||||
|
||||
|
||||
/obj/item/twohanded/rcl/dropped(mob/wearer)
|
||||
/obj/item/rcl/dropped(mob/wearer)
|
||||
..()
|
||||
UnregisterSignal(wearer, COMSIG_MOVABLE_MOVED)
|
||||
listeningTo = null
|
||||
last = null
|
||||
|
||||
/obj/item/twohanded/rcl/attack_self(mob/user)
|
||||
/obj/item/rcl/attack_self(mob/user)
|
||||
..()
|
||||
active = wielded
|
||||
if(!active)
|
||||
last = null
|
||||
else if(!last)
|
||||
@@ -158,7 +166,7 @@
|
||||
last = C
|
||||
break
|
||||
|
||||
obj/item/twohanded/rcl/proc/getMobhook(mob/to_hook)
|
||||
obj/item/rcl/proc/getMobhook(mob/to_hook)
|
||||
if(listeningTo == to_hook)
|
||||
return
|
||||
if(listeningTo)
|
||||
@@ -166,7 +174,7 @@ obj/item/twohanded/rcl/proc/getMobhook(mob/to_hook)
|
||||
RegisterSignal(to_hook, COMSIG_MOVABLE_MOVED, .proc/trigger)
|
||||
listeningTo = to_hook
|
||||
|
||||
/obj/item/twohanded/rcl/proc/trigger(mob/user)
|
||||
/obj/item/rcl/proc/trigger(mob/user)
|
||||
if(active)
|
||||
layCable(user)
|
||||
if(wiring_gui_menu) //update the wire options as you move
|
||||
@@ -174,7 +182,7 @@ obj/item/twohanded/rcl/proc/getMobhook(mob/to_hook)
|
||||
|
||||
|
||||
//previous contents of trigger(), lays cable each time the player moves
|
||||
/obj/item/twohanded/rcl/proc/layCable(mob/user)
|
||||
/obj/item/rcl/proc/layCable(mob/user)
|
||||
if(!isturf(user.loc))
|
||||
return
|
||||
if(is_empty(user, 0))
|
||||
@@ -207,7 +215,7 @@ obj/item/twohanded/rcl/proc/getMobhook(mob/to_hook)
|
||||
update_icon()
|
||||
|
||||
//searches the current tile for a stub cable of the same colour
|
||||
/obj/item/twohanded/rcl/proc/findLinkingCable(mob/user)
|
||||
/obj/item/rcl/proc/findLinkingCable(mob/user)
|
||||
var/turf/T
|
||||
if(!isturf(user.loc))
|
||||
return
|
||||
@@ -223,10 +231,8 @@ obj/item/twohanded/rcl/proc/getMobhook(mob/to_hook)
|
||||
continue
|
||||
if(C.d1 == 0)
|
||||
return C
|
||||
return
|
||||
|
||||
|
||||
/obj/item/twohanded/rcl/proc/wiringGuiGenerateChoices(mob/user)
|
||||
/obj/item/rcl/proc/wiringGuiGenerateChoices(mob/user)
|
||||
var/fromdir = 0
|
||||
var/obj/structure/cable/linkingCable = findLinkingCable(user)
|
||||
if(linkingCable)
|
||||
@@ -243,12 +249,12 @@ obj/item/twohanded/rcl/proc/getMobhook(mob/to_hook)
|
||||
wiredirs[icondir] = img
|
||||
return wiredirs
|
||||
|
||||
/obj/item/twohanded/rcl/proc/showWiringGui(mob/user)
|
||||
/obj/item/rcl/proc/showWiringGui(mob/user)
|
||||
var/list/choices = wiringGuiGenerateChoices(user)
|
||||
|
||||
wiring_gui_menu = show_radial_menu_persistent(user, src , choices, select_proc = CALLBACK(src, .proc/wiringGuiReact, user), radius = 42)
|
||||
|
||||
/obj/item/twohanded/rcl/proc/wiringGuiUpdate(mob/user)
|
||||
/obj/item/rcl/proc/wiringGuiUpdate(mob/user)
|
||||
if(!wiring_gui_menu)
|
||||
return
|
||||
|
||||
@@ -259,7 +265,7 @@ obj/item/twohanded/rcl/proc/getMobhook(mob/to_hook)
|
||||
|
||||
|
||||
//Callback used to respond to interactions with the wiring menu
|
||||
/obj/item/twohanded/rcl/proc/wiringGuiReact(mob/living/user,choice)
|
||||
/obj/item/rcl/proc/wiringGuiReact(mob/living/user,choice)
|
||||
if(!choice) //close on a null choice (the center button)
|
||||
QDEL_NULL(wiring_gui_menu)
|
||||
return
|
||||
@@ -290,7 +296,7 @@ obj/item/twohanded/rcl/proc/getMobhook(mob/to_hook)
|
||||
|
||||
wiringGuiUpdate(user)
|
||||
|
||||
/obj/item/twohanded/rcl/ui_action_click(mob/user, action)
|
||||
/obj/item/rcl/ui_action_click(mob/user, action)
|
||||
if(istype(action, /datum/action/item_action/rcl_col))
|
||||
current_color_index++;
|
||||
if (current_color_index > colors.len)
|
||||
@@ -308,13 +314,13 @@ obj/item/twohanded/rcl/proc/getMobhook(mob/to_hook)
|
||||
else //open the menu
|
||||
showWiringGui(user)
|
||||
|
||||
/obj/item/twohanded/rcl/pre_loaded/Initialize() //Comes preloaded with cable, for testing stuff
|
||||
/obj/item/rcl/pre_loaded/Initialize() //Comes preloaded with cable, for testing stuff
|
||||
loaded = new()
|
||||
loaded.max_amount = max_amount
|
||||
loaded.amount = max_amount
|
||||
return ..()
|
||||
|
||||
/obj/item/twohanded/rcl/ghetto
|
||||
/obj/item/rcl/ghetto
|
||||
actions_types = list()
|
||||
max_amount = 30
|
||||
name = "makeshift rapid cable layer"
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
/obj/item/binoculars
|
||||
name = "binoculars"
|
||||
desc = "Used for long-distance surveillance."
|
||||
item_state = "binoculars"
|
||||
icon_state = "binoculars"
|
||||
lefthand_file = 'icons/mob/inhands/items_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/items_righthand.dmi'
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
var/mob/listeningTo
|
||||
var/zoom_out_amt = 6
|
||||
var/zoom_amt = 10
|
||||
|
||||
/obj/item/binoculars/Initialize()
|
||||
. = ..()
|
||||
RegisterSignal(src, COMSIG_TWOHANDED_WIELD, .proc/on_wield)
|
||||
RegisterSignal(src, COMSIG_TWOHANDED_UNWIELD, .proc/on_unwield)
|
||||
|
||||
/obj/item/binoculars/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/two_handed, force_unwielded=8, force_wielded=12)
|
||||
|
||||
/obj/item/binoculars/Destroy()
|
||||
listeningTo = null
|
||||
return ..()
|
||||
|
||||
/obj/item/binoculars/proc/on_wield(obj/item/source, mob/user)
|
||||
RegisterSignal(user, COMSIG_MOVABLE_MOVED, .proc/unwield)
|
||||
listeningTo = user
|
||||
user.visible_message("<span class='notice'>[user] holds [src] up to [user.p_their()] eyes.</span>", "<span class='notice'>You hold [src] up to your eyes.</span>")
|
||||
item_state = "binoculars_wielded"
|
||||
user.regenerate_icons()
|
||||
if(!user?.client)
|
||||
return
|
||||
var/client/C = user.client
|
||||
var/_x = 0
|
||||
var/_y = 0
|
||||
switch(user.dir)
|
||||
if(NORTH)
|
||||
_y = zoom_amt
|
||||
if(EAST)
|
||||
_x = zoom_amt
|
||||
if(SOUTH)
|
||||
_y = -zoom_amt
|
||||
if(WEST)
|
||||
_x = -zoom_amt
|
||||
C.change_view(world.view + zoom_out_amt)
|
||||
C.pixel_x = world.icon_size*_x
|
||||
C.pixel_y = world.icon_size*_y
|
||||
/obj/item/binoculars/proc/on_unwield(obj/item/source, mob/user)
|
||||
unwield(user)
|
||||
|
||||
/obj/item/binoculars/proc/unwield(mob/user)
|
||||
if(listeningTo)
|
||||
UnregisterSignal(listeningTo, COMSIG_MOVABLE_MOVED)
|
||||
listeningTo = null
|
||||
user.visible_message("<span class='notice'>[user] lowers [src].</span>", "<span class='notice'>You lower [src].</span>")
|
||||
item_state = "binoculars"
|
||||
user.regenerate_icons()
|
||||
if(user && user.client)
|
||||
user.regenerate_icons()
|
||||
var/client/C = user.client
|
||||
C.change_view(CONFIG_GET(string/default_view))
|
||||
user.client.pixel_x = 0
|
||||
user.client.pixel_y = 0
|
||||
@@ -0,0 +1,69 @@
|
||||
/obj/item/broom
|
||||
name = "broom"
|
||||
desc = "This is my BROOMSTICK! It can be used manually or braced with two hands to sweep items as you move. It has a telescopic handle for compact storage."
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "broom0"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/custodial_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/custodial_righthand.dmi'
|
||||
force = 8
|
||||
throwforce = 10
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
attack_verb = list("swept", "brushed off", "bludgeoned", "whacked")
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
/obj/item/broom/Initialize()
|
||||
. = ..()
|
||||
RegisterSignal(src, COMSIG_TWOHANDED_WIELD, .proc/on_wield)
|
||||
RegisterSignal(src, COMSIG_TWOHANDED_UNWIELD, .proc/on_unwield)
|
||||
|
||||
/obj/item/broom/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/two_handed, force_unwielded=8, force_wielded=12, icon_wielded="broom1")
|
||||
|
||||
/obj/item/broom/update_icon_state()
|
||||
icon_state = "broom0"
|
||||
|
||||
/// triggered on wield of two handed item
|
||||
/obj/item/broom/proc/on_wield(obj/item/source, mob/user)
|
||||
to_chat(user, "<span class='notice'>You brace the [src] against the ground in a firm sweeping stance.</span>")
|
||||
RegisterSignal(user, COMSIG_MOVABLE_MOVED, .proc/sweep)
|
||||
|
||||
/// triggered on unwield of two handed item
|
||||
/obj/item/broom/proc/on_unwield(obj/item/source, mob/user)
|
||||
UnregisterSignal(user, COMSIG_MOVABLE_MOVED)
|
||||
|
||||
/obj/item/broom/afterattack(atom/A, mob/user, proximity)
|
||||
. = ..()
|
||||
if(!proximity)
|
||||
return
|
||||
sweep(user, A, FALSE)
|
||||
|
||||
/obj/item/broom/proc/sweep(mob/user, atom/A, moving = TRUE)
|
||||
var/turf/target
|
||||
if (!moving)
|
||||
if (isturf(A))
|
||||
target = A
|
||||
else
|
||||
target = A.loc
|
||||
else
|
||||
target = user.loc
|
||||
if (!isturf(target))
|
||||
return
|
||||
if (locate(/obj/structure/table) in target.contents)
|
||||
return
|
||||
var/i = 0
|
||||
for(var/obj/item/garbage in target.contents)
|
||||
if(!garbage.anchored)
|
||||
garbage.Move(get_step(target, user.dir), user.dir)
|
||||
i++
|
||||
if(i >= 20)
|
||||
break
|
||||
if(i >= 1)
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 30, TRUE, -1)
|
||||
|
||||
/obj/item/broom/proc/janicart_insert(mob/user, obj/structure/janitorialcart/J) //bless you whoever fixes this copypasta
|
||||
J.put_in_cart(src, user)
|
||||
J.mybroom=src
|
||||
J.update_icon()
|
||||
@@ -0,0 +1,93 @@
|
||||
|
||||
// CHAINSAW
|
||||
/obj/item/chainsaw
|
||||
name = "chainsaw"
|
||||
desc = "A versatile power tool. Useful for limbing trees and delimbing humans."
|
||||
icon_state = "chainsaw_off"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/chainsaw_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/chainsaw_righthand.dmi'
|
||||
flags_1 = CONDUCT_1
|
||||
force = 13
|
||||
var/force_on = 24
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
throwforce = 13
|
||||
throw_speed = 2
|
||||
throw_range = 4
|
||||
custom_materials = list(/datum/material/iron=13000)
|
||||
attack_verb = list("sawed", "torn", "cut", "chopped", "diced")
|
||||
hitsound = "swing_hit"
|
||||
sharpness = IS_SHARP
|
||||
actions_types = list(/datum/action/item_action/startchainsaw)
|
||||
tool_behaviour = TOOL_SAW
|
||||
toolspeed = 0.5
|
||||
var/on = FALSE
|
||||
var/wielded = FALSE // track wielded status on item
|
||||
|
||||
/obj/item/chainsaw/Initialize()
|
||||
. = ..()
|
||||
RegisterSignal(src, COMSIG_TWOHANDED_WIELD, .proc/on_wield)
|
||||
RegisterSignal(src, COMSIG_TWOHANDED_UNWIELD, .proc/on_unwield)
|
||||
|
||||
/obj/item/chainsaw/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/butchering, 30, 100, 0, 'sound/weapons/chainsawhit.ogg', TRUE)
|
||||
AddComponent(/datum/component/two_handed, require_twohands=TRUE)
|
||||
AddElement(/datum/element/update_icon_updates_onmob)
|
||||
|
||||
/// triggered on wield of two handed item
|
||||
/obj/item/chainsaw/proc/on_wield(obj/item/source, mob/user)
|
||||
wielded = TRUE
|
||||
|
||||
/// triggered on unwield of two handed item
|
||||
/obj/item/chainsaw/proc/on_unwield(obj/item/source, mob/user)
|
||||
wielded = FALSE
|
||||
|
||||
/obj/item/chainsaw/suicide_act(mob/living/carbon/user)
|
||||
if(on)
|
||||
user.visible_message("<span class='suicide'>[user] begins to tear [user.p_their()] head off with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
playsound(src, 'sound/weapons/chainsawhit.ogg', 100, 1)
|
||||
var/obj/item/bodypart/head/myhead = user.get_bodypart(BODY_ZONE_HEAD)
|
||||
if(myhead)
|
||||
myhead.dismember()
|
||||
else
|
||||
user.visible_message("<span class='suicide'>[user] smashes [src] into [user.p_their()] neck, destroying [user.p_their()] esophagus! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
playsound(src, 'sound/weapons/genhit1.ogg', 100, 1)
|
||||
return(BRUTELOSS)
|
||||
|
||||
/obj/item/chainsaw/attack_self(mob/user)
|
||||
on = !on
|
||||
to_chat(user, "As you pull the starting cord dangling from [src], [on ? "it begins to whirr." : "the chain stops moving."]")
|
||||
force = on ? force_on : initial(force)
|
||||
throwforce = on ? force_on : force
|
||||
update_icon()
|
||||
var/datum/component/butchering/butchering = src.GetComponent(/datum/component/butchering)
|
||||
butchering.butchering_enabled = on
|
||||
|
||||
if(on)
|
||||
hitsound = 'sound/weapons/chainsawhit.ogg'
|
||||
else
|
||||
hitsound = "swing_hit"
|
||||
|
||||
/obj/item/chainsaw/update_icon_state()
|
||||
icon_state = "chainsaw_[on ? "on" : "off"]"
|
||||
|
||||
/obj/item/chainsaw/get_dismemberment_chance()
|
||||
if(wielded)
|
||||
. = ..()
|
||||
|
||||
/obj/item/chainsaw/doomslayer
|
||||
name = "THE GREAT COMMUNICATOR"
|
||||
desc = "<span class='warning'>VRRRRRRR!!!</span>"
|
||||
armour_penetration = 100
|
||||
force_on = 30
|
||||
|
||||
/obj/item/chainsaw/doomslayer/check_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
|
||||
block_return[BLOCK_RETURN_REFLECT_PROJECTILE_CHANCE] = 100
|
||||
return ..()
|
||||
|
||||
/obj/item/chainsaw/doomslayer/run_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
|
||||
if(attack_type & ATTACK_TYPE_PROJECTILE)
|
||||
owner.visible_message("<span class='danger'>Ranged attacks just make [owner] angrier!</span>")
|
||||
playsound(src, pick('sound/weapons/bulletflyby.ogg', 'sound/weapons/bulletflyby2.ogg', 'sound/weapons/bulletflyby3.ogg'), 75, 1)
|
||||
return BLOCK_SUCCESS | BLOCK_PHYSICAL_EXTERNAL
|
||||
return ..()
|
||||
@@ -61,6 +61,14 @@
|
||||
name = "Experimental Clone Pod (Machine Board)"
|
||||
build_path = /obj/machinery/clonepod/experimental
|
||||
|
||||
/obj/item/circuitboard/machine/sheetifier
|
||||
name = "Sheet-meister 2000 (Machine Board)"
|
||||
icon_state = "supply"
|
||||
build_path = /obj/machinery/sheetifier
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/manipulator = 2,
|
||||
/obj/item/stock_parts/matter_bin = 2)
|
||||
|
||||
/obj/item/circuitboard/machine/abductor
|
||||
name = "alien board (Report This)"
|
||||
icon_state = "abductor_mod"
|
||||
|
||||
@@ -737,12 +737,7 @@
|
||||
to_chat(usr, "<span class='warning'>A color that dark on an object like this? Surely not...</span>")
|
||||
return FALSE
|
||||
|
||||
|
||||
if(istype(target, /obj/structure/window))
|
||||
var/obj/structure/window/W = target
|
||||
W.spraycan_paint(paint_color)
|
||||
else
|
||||
target.add_atom_colour(paint_color, WASHABLE_COLOUR_PRIORITY)
|
||||
target.add_atom_colour(paint_color, WASHABLE_COLOUR_PRIORITY)
|
||||
|
||||
. = use_charges(user, 2)
|
||||
var/fraction = min(1, . / reagents.maximum_volume)
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
var/on = FALSE //if the paddles are equipped (1) or on the defib (0)
|
||||
var/safety = TRUE //if you can zap people with the defibs on harm mode
|
||||
var/powered = FALSE //if there's a cell in the defib with enough power for a revive, blocks paddles from reviving otherwise
|
||||
var/obj/item/twohanded/shockpaddles/paddles
|
||||
var/obj/item/shockpaddles/paddles
|
||||
var/obj/item/stock_parts/cell/cell
|
||||
var/combat = FALSE //can we revive through space suits?
|
||||
var/grab_ghost = FALSE // Do we pull the ghost back into their body?
|
||||
@@ -106,7 +106,6 @@
|
||||
|
||||
/obj/item/defibrillator/attackby(obj/item/W, mob/user, params)
|
||||
if(W == paddles)
|
||||
paddles.unwield()
|
||||
toggle_paddles()
|
||||
else if(istype(W, /obj/item/stock_parts/cell))
|
||||
var/obj/item/stock_parts/cell/C = W
|
||||
@@ -170,7 +169,6 @@
|
||||
return
|
||||
else
|
||||
//Remove from their hands and back onto the defib unit
|
||||
paddles.unwield()
|
||||
remove_paddles(user)
|
||||
|
||||
update_power()
|
||||
@@ -179,7 +177,7 @@
|
||||
A.UpdateButtonIcon()
|
||||
|
||||
/obj/item/defibrillator/proc/make_paddles()
|
||||
return new /obj/item/twohanded/shockpaddles(src)
|
||||
return new /obj/item/shockpaddles(src)
|
||||
|
||||
/obj/item/defibrillator/equipped(mob/user, slot)
|
||||
..()
|
||||
@@ -256,13 +254,12 @@
|
||||
|
||||
/obj/item/defibrillator/compact/combat/loaded/attackby(obj/item/W, mob/user, params)
|
||||
if(W == paddles)
|
||||
paddles.unwield()
|
||||
toggle_paddles()
|
||||
return
|
||||
|
||||
//paddles
|
||||
|
||||
/obj/item/twohanded/shockpaddles
|
||||
/obj/item/shockpaddles
|
||||
name = "defibrillator paddles"
|
||||
desc = "A pair of plastic-gripped paddles with flat metal surfaces that are used to deliver powerful electric shocks."
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
@@ -284,24 +281,48 @@
|
||||
var/grab_ghost = FALSE
|
||||
var/tlimit = DEFIB_TIME_LIMIT * 10
|
||||
var/disarm_shock_time = 10
|
||||
var/wielded = FALSE // track wielded status on item
|
||||
|
||||
var/mob/listeningTo
|
||||
/obj/item/shockpaddles/Initialize()
|
||||
. = ..()
|
||||
RegisterSignal(src, COMSIG_TWOHANDED_WIELD, .proc/on_wield)
|
||||
RegisterSignal(src, COMSIG_TWOHANDED_UNWIELD, .proc/on_unwield)
|
||||
if(!req_defib)
|
||||
return //If it doesn't need a defib, just say it exists
|
||||
if (!loc || !istype(loc, /obj/item/defibrillator)) //To avoid weird issues from admin spawns
|
||||
return INITIALIZE_HINT_QDEL
|
||||
defib = loc
|
||||
busy = FALSE
|
||||
update_icon()
|
||||
|
||||
/obj/item/twohanded/shockpaddles/ComponentInitialize()
|
||||
/obj/item/shockpaddles/ComponentInitialize()
|
||||
. = ..()
|
||||
AddElement(/datum/element/update_icon_updates_onmob)
|
||||
AddComponent(/datum/component/two_handed, force_unwielded=8, force_wielded=12)
|
||||
|
||||
/obj/item/twohanded/shockpaddles/equipped(mob/user, slot)
|
||||
/// triggered on wield of two handed item
|
||||
/obj/item/shockpaddles/proc/on_wield(obj/item/source, mob/user)
|
||||
wielded = TRUE
|
||||
|
||||
/// triggered on unwield of two handed item
|
||||
/obj/item/shockpaddles/proc/on_unwield(obj/item/source, mob/user)
|
||||
wielded = FALSE
|
||||
|
||||
/obj/item/shockpaddles/Destroy()
|
||||
defib = null
|
||||
return ..()
|
||||
|
||||
/obj/item/shockpaddles/equipped(mob/user, slot)
|
||||
. = ..()
|
||||
if(!req_defib)
|
||||
return
|
||||
RegisterSignal(user, COMSIG_MOVABLE_MOVED, .proc/check_range)
|
||||
|
||||
/obj/item/twohanded/shockpaddles/Moved()
|
||||
/obj/item/shockpaddles/Moved()
|
||||
. = ..()
|
||||
check_range()
|
||||
|
||||
/obj/item/twohanded/shockpaddles/proc/check_range()
|
||||
/obj/item/shockpaddles/proc/check_range()
|
||||
if(!req_defib || !defib)
|
||||
return
|
||||
if(!in_range(src,defib))
|
||||
@@ -312,7 +333,7 @@
|
||||
visible_message("<span class='notice'>[src] snap back into [defib].</span>")
|
||||
snap_back()
|
||||
|
||||
/obj/item/twohanded/shockpaddles/proc/recharge(var/time)
|
||||
/obj/item/shockpaddles/proc/recharge(var/time)
|
||||
if(req_defib || !time)
|
||||
return
|
||||
cooldown = TRUE
|
||||
@@ -324,57 +345,36 @@
|
||||
cooldown = FALSE
|
||||
update_icon()
|
||||
|
||||
/obj/item/twohanded/shockpaddles/New(mainunit)
|
||||
..()
|
||||
if(check_defib_exists(mainunit, src) && req_defib)
|
||||
defib = mainunit
|
||||
forceMove(defib)
|
||||
busy = FALSE
|
||||
update_icon()
|
||||
|
||||
/obj/item/twohanded/shockpaddles/update_icon_state()
|
||||
icon_state = "defibpaddles[wielded]"
|
||||
item_state = "defibpaddles[wielded]"
|
||||
if(cooldown)
|
||||
icon_state = "defibpaddles[wielded]_cooldown"
|
||||
|
||||
/obj/item/twohanded/shockpaddles/suicide_act(mob/user)
|
||||
/obj/item/shockpaddles/suicide_act(mob/user)
|
||||
user.visible_message("<span class='danger'>[user] is putting the live paddles on [user.p_their()] chest! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
if(req_defib)
|
||||
defib.deductcharge(revivecost)
|
||||
playsound(src, 'sound/machines/defib_zap.ogg', 50, 1, -1)
|
||||
return (OXYLOSS)
|
||||
|
||||
/obj/item/twohanded/shockpaddles/dropped(mob/user)
|
||||
/obj/item/shockpaddles/update_icon_state()
|
||||
icon_state = "defibpaddles[wielded]"
|
||||
item_state = "defibpaddles[wielded]"
|
||||
if(cooldown)
|
||||
icon_state = "defibpaddles[wielded]_cooldown"
|
||||
|
||||
/obj/item/shockpaddles/dropped(mob/user)
|
||||
if(!req_defib)
|
||||
return ..()
|
||||
if(user)
|
||||
UnregisterSignal(user, COMSIG_MOVABLE_MOVED)
|
||||
var/obj/item/twohanded/offhand/O = user.get_inactive_held_item()
|
||||
if(istype(O))
|
||||
O.unwield()
|
||||
if(user != loc)
|
||||
to_chat(user, "<span class='notice'>The paddles snap back into the main unit.</span>")
|
||||
snap_back()
|
||||
return unwield(user)
|
||||
|
||||
/obj/item/twohanded/shockpaddles/proc/snap_back()
|
||||
/obj/item/shockpaddles/proc/snap_back()
|
||||
if(!defib)
|
||||
return
|
||||
defib.on = FALSE
|
||||
forceMove(defib)
|
||||
defib.update_power()
|
||||
|
||||
/obj/item/twohanded/shockpaddles/proc/check_defib_exists(mainunit, mob/living/carbon/M, obj/O)
|
||||
if(!req_defib)
|
||||
return TRUE //If it doesn't need a defib, just say it exists
|
||||
if (!mainunit || !istype(mainunit, /obj/item/defibrillator)) //To avoid weird issues from admin spawns
|
||||
qdel(O)
|
||||
return FALSE
|
||||
else
|
||||
return TRUE
|
||||
|
||||
/obj/item/twohanded/shockpaddles/attack(mob/M, mob/user)
|
||||
/obj/item/shockpaddles/attack(mob/M, mob/user)
|
||||
|
||||
if(busy)
|
||||
return
|
||||
@@ -426,7 +426,7 @@
|
||||
|
||||
do_help(H, user)
|
||||
|
||||
/obj/item/twohanded/shockpaddles/proc/shock_touching(dmg, mob/H)
|
||||
/obj/item/shockpaddles/proc/shock_touching(dmg, mob/H)
|
||||
if(!H.pulledby || !isliving(H.pulledby))
|
||||
return
|
||||
if(req_defib && defib.pullshocksafely)
|
||||
@@ -437,7 +437,7 @@
|
||||
M.visible_message("<span class='danger'>[M] is electrocuted by [M.p_their()] contact with [H]!</span>")
|
||||
M.emote("scream")
|
||||
|
||||
/obj/item/twohanded/shockpaddles/proc/do_disarm(mob/living/M, mob/living/user)
|
||||
/obj/item/shockpaddles/proc/do_disarm(mob/living/M, mob/living/user)
|
||||
if(req_defib && defib.safety)
|
||||
return
|
||||
if(!req_defib && !combat)
|
||||
@@ -465,7 +465,7 @@
|
||||
else
|
||||
recharge(60)
|
||||
|
||||
/obj/item/twohanded/shockpaddles/proc/do_harm(mob/living/carbon/H, mob/living/user)
|
||||
/obj/item/shockpaddles/proc/do_harm(mob/living/carbon/H, mob/living/user)
|
||||
if(req_defib && defib.safety)
|
||||
return
|
||||
if(!req_defib && !combat)
|
||||
@@ -520,7 +520,7 @@
|
||||
busy = FALSE
|
||||
update_icon()
|
||||
|
||||
/obj/item/twohanded/shockpaddles/proc/do_help(mob/living/carbon/H, mob/living/user)
|
||||
/obj/item/shockpaddles/proc/do_help(mob/living/carbon/H, mob/living/user)
|
||||
user.visible_message("<span class='warning'>[user] begins to place [src] on [H]'s chest.</span>", "<span class='warning'>You begin to place [src] on [H]'s chest...</span>")
|
||||
busy = TRUE
|
||||
update_icon()
|
||||
@@ -677,14 +677,14 @@
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
/obj/item/twohanded/shockpaddles/cyborg
|
||||
/obj/item/shockpaddles/cyborg
|
||||
name = "cyborg defibrillator paddles"
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "defibpaddles0"
|
||||
item_state = "defibpaddles0"
|
||||
req_defib = FALSE
|
||||
|
||||
/obj/item/twohanded/shockpaddles/cyborg/attack(mob/M, mob/user)
|
||||
/obj/item/shockpaddles/cyborg/attack(mob/M, mob/user)
|
||||
if(iscyborg(user))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
if(R.emagged)
|
||||
@@ -696,7 +696,7 @@
|
||||
|
||||
. = ..()
|
||||
|
||||
/obj/item/twohanded/shockpaddles/syndicate
|
||||
/obj/item/shockpaddles/syndicate
|
||||
name = "syndicate defibrillator paddles"
|
||||
desc = "A pair of paddles used to revive deceased operatives. It possesses both the ability to penetrate armor and to deliver powerful shocks offensively."
|
||||
combat = TRUE
|
||||
|
||||
@@ -258,6 +258,9 @@ GLOBAL_LIST_INIT(channel_tokens, list(
|
||||
name = "\proper mini Integrated Subspace Transceiver "
|
||||
subspace_transmission = FALSE
|
||||
|
||||
/obj/item/radio/headset/silicon/pai/ComponentInitialize()
|
||||
. = ..()
|
||||
AddElement(/datum/element/empprotection, EMP_PROTECT_WIRES)
|
||||
|
||||
/obj/item/radio/headset/silicon/ai
|
||||
name = "\proper Integrated Subspace Transceiver "
|
||||
|
||||
@@ -0,0 +1,353 @@
|
||||
/*
|
||||
* Double-Bladed Energy Swords - Cheridan
|
||||
*/
|
||||
/obj/item/dualsaber
|
||||
icon_state = "dualsaber0"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi'
|
||||
name = "double-bladed energy sword"
|
||||
desc = "Handle with care."
|
||||
force = 3
|
||||
throwforce = 5
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
item_flags = SLOWS_WHILE_IN_HAND
|
||||
var/w_class_on = WEIGHT_CLASS_BULKY
|
||||
hitsound = "swing_hit"
|
||||
var/hitsound_on = 'sound/weapons/blade1.ogg'
|
||||
armour_penetration = 35
|
||||
var/saber_color = "green"
|
||||
light_color = "#00ff00"//green
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
max_integrity = 200
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 70)
|
||||
resistance_flags = FIRE_PROOF
|
||||
block_parry_data = /datum/block_parry_data/dual_esword
|
||||
var/hacked = FALSE
|
||||
/// Can this reflect all energy projectiles?
|
||||
var/can_reflect = TRUE
|
||||
var/brightness_on = 6 //TWICE AS BRIGHT AS A REGULAR ESWORD
|
||||
var/list/possible_colors = list("red", "blue", "green", "purple")
|
||||
var/list/rainbow_colors = list(LIGHT_COLOR_RED, LIGHT_COLOR_GREEN, LIGHT_COLOR_LIGHT_CYAN, LIGHT_COLOR_LAVENDER)
|
||||
var/spinnable = TRUE
|
||||
total_mass = 0.4 //Survival flashlights typically weigh around 5 ounces.
|
||||
var/total_mass_on = 3.4
|
||||
var/wielded = FALSE // track wielded status on item
|
||||
var/slowdown_wielded = 0
|
||||
|
||||
/datum/block_parry_data/dual_esword
|
||||
block_damage_absorption = 2
|
||||
block_damage_multiplier = 0.15
|
||||
block_damage_multiplier_override = list(
|
||||
ATTACK_TYPE_MELEE = 0.25
|
||||
)
|
||||
block_start_delay = 0 // instantaneous block
|
||||
block_stamina_cost_per_second = 2.5
|
||||
block_stamina_efficiency = 3
|
||||
block_lock_sprinting = TRUE
|
||||
// no attacking while blocking
|
||||
block_lock_attacking = TRUE
|
||||
block_projectile_mitigation = 75
|
||||
|
||||
parry_time_windup = 0
|
||||
parry_time_active = 8
|
||||
parry_time_spindown = 0
|
||||
// we want to signal to players the most dangerous phase, the time when automatic counterattack is a thing.
|
||||
parry_time_windup_visual_override = 1
|
||||
parry_time_active_visual_override = 3
|
||||
parry_time_spindown_visual_override = 4
|
||||
parry_flags = PARRY_DEFAULT_HANDLE_FEEDBACK // esword users can attack while parrying.
|
||||
parry_time_perfect = 2 // first ds isn't perfect
|
||||
parry_time_perfect_leeway = 1
|
||||
parry_imperfect_falloff_percent = 10
|
||||
parry_efficiency_to_counterattack = 100
|
||||
parry_efficiency_considered_successful = 25 // VERY generous
|
||||
parry_efficiency_perfect = 90
|
||||
parry_failed_stagger_duration = 3 SECONDS
|
||||
parry_failed_clickcd_duration = CLICK_CD_MELEE
|
||||
|
||||
// more efficient vs projectiles
|
||||
block_stamina_efficiency_override = list(
|
||||
TEXT_ATTACK_TYPE_PROJECTILE = 4
|
||||
)
|
||||
|
||||
/obj/item/dualsaber/Initialize()
|
||||
. = ..()
|
||||
RegisterSignal(src, COMSIG_TWOHANDED_WIELD, .proc/on_wield)
|
||||
RegisterSignal(src, COMSIG_TWOHANDED_UNWIELD, .proc/on_unwield)
|
||||
|
||||
/obj/item/dualsaber/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/two_handed, force_unwielded=3, force_wielded=34, \
|
||||
wieldsound='sound/weapons/saberon.ogg', unwieldsound='sound/weapons/saberoff.ogg')
|
||||
|
||||
/obj/item/dualsaber/Initialize()
|
||||
. = ..()
|
||||
if(LAZYLEN(possible_colors))
|
||||
saber_color = pick(possible_colors)
|
||||
switch(saber_color)
|
||||
if("red")
|
||||
light_color = LIGHT_COLOR_RED
|
||||
if("green")
|
||||
light_color = LIGHT_COLOR_GREEN
|
||||
if("blue")
|
||||
light_color = LIGHT_COLOR_LIGHT_CYAN
|
||||
if("purple")
|
||||
light_color = LIGHT_COLOR_LAVENDER
|
||||
|
||||
/// Triggered on wield of two handed item
|
||||
/// Specific hulk checks due to reflection chance for balance issues and switches hitsounds.
|
||||
/obj/item/dualsaber/proc/on_wield(obj/item/source, mob/living/carbon/user)
|
||||
if(user.has_dna() && user.dna.check_mutation(HULK))
|
||||
to_chat(user, "<span class='warning'>You lack the grace to wield this!</span>")
|
||||
return COMPONENT_TWOHANDED_BLOCK_WIELD
|
||||
wielded = TRUE
|
||||
sharpness = IS_SHARP
|
||||
w_class = w_class_on
|
||||
total_mass = total_mass_on
|
||||
hitsound = 'sound/weapons/blade1.ogg'
|
||||
slowdown += slowdown_wielded
|
||||
START_PROCESSING(SSobj, src)
|
||||
set_light(brightness_on)
|
||||
AddElement(/datum/element/sword_point)
|
||||
item_flags |= (ITEM_CAN_BLOCK|ITEM_CAN_PARRY)
|
||||
|
||||
/// Triggered on unwield of two handed item
|
||||
/// switch hitsounds
|
||||
/obj/item/dualsaber/proc/on_unwield(obj/item/source, mob/living/carbon/user)
|
||||
sharpness = initial(sharpness)
|
||||
w_class = initial(w_class)
|
||||
total_mass = initial(total_mass)
|
||||
wielded = FALSE
|
||||
hitsound = "swing_hit"
|
||||
slowdown_wielded -= slowdown_wielded
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
set_light(0)
|
||||
RemoveElement(/datum/element/sword_point)
|
||||
item_flags &= ~(ITEM_CAN_BLOCK|ITEM_CAN_PARRY)
|
||||
|
||||
/obj/item/dualsaber/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
. = ..()
|
||||
|
||||
/obj/item/dualsaber/update_icon_state()
|
||||
if(wielded)
|
||||
icon_state = "dualsaber[saber_color][wielded]"
|
||||
else
|
||||
icon_state = "dualsaber0"
|
||||
clean_blood()
|
||||
|
||||
/obj/item/dualsaber/suicide_act(mob/living/carbon/user)
|
||||
if(wielded)
|
||||
user.visible_message("<span class='suicide'>[user] begins spinning way too fast! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
var/obj/item/bodypart/head/myhead = user.get_bodypart(BODY_ZONE_HEAD)//stole from chainsaw code
|
||||
var/obj/item/organ/brain/B = user.getorganslot(ORGAN_SLOT_BRAIN)
|
||||
B.organ_flags &= ~ORGAN_VITAL //this cant possibly be a good idea
|
||||
var/randdir
|
||||
for(var/i in 1 to 24)//like a headless chicken!
|
||||
if(user.is_holding(src))
|
||||
randdir = pick(GLOB.alldirs)
|
||||
user.Move(get_step(user, randdir),randdir)
|
||||
user.emote("spin")
|
||||
if (i == 3 && myhead)
|
||||
myhead.drop_limb()
|
||||
sleep(3)
|
||||
else
|
||||
user.visible_message("<span class='suicide'>[user] panics and starts choking to death!</span>")
|
||||
return OXYLOSS
|
||||
else
|
||||
user.visible_message("<span class='suicide'>[user] begins beating [user.p_them()]self to death with \the [src]'s handle! It probably would've been cooler if [user.p_they()] turned it on first!</span>")
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/dualsaber/attack(mob/target, mob/living/carbon/human/user)
|
||||
if(user.has_dna() && user.dna.check_mutation(HULK))
|
||||
to_chat(user, "<span class='warning'>You grip the blade too hard and accidentally drop it!</span>")
|
||||
user.dropItemToGround(src)
|
||||
return
|
||||
..()
|
||||
if(HAS_TRAIT(user, TRAIT_CLUMSY) && (wielded) && prob(40))
|
||||
impale(user)
|
||||
return
|
||||
if(spinnable && (wielded) && prob(50))
|
||||
INVOKE_ASYNC(src, .proc/jedi_spin, user)
|
||||
|
||||
/obj/item/dualsaber/proc/jedi_spin(mob/living/user)
|
||||
for(var/i in list(NORTH,SOUTH,EAST,WEST,EAST,SOUTH,NORTH,SOUTH,EAST,WEST,EAST,SOUTH))
|
||||
user.setDir(i)
|
||||
if(i == WEST)
|
||||
user.emote("flip")
|
||||
sleep(1)
|
||||
|
||||
/obj/item/dualsaber/proc/impale(mob/living/user)
|
||||
to_chat(user, "<span class='warning'>You twirl around a bit before losing your balance and impaling yourself on [src].</span>")
|
||||
if (force)
|
||||
user.take_bodypart_damage(20,25)
|
||||
else
|
||||
user.adjustStaminaLoss(25)
|
||||
|
||||
/obj/item/dualsaber/run_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
|
||||
if(!wielded)
|
||||
return NONE
|
||||
if(can_reflect && is_energy_reflectable_projectile(object) && (attack_type & ATTACK_TYPE_PROJECTILE))
|
||||
block_return[BLOCK_RETURN_REDIRECT_METHOD] = REDIRECT_METHOD_RETURN_TO_SENDER //no you
|
||||
return BLOCK_SHOULD_REDIRECT | BLOCK_SUCCESS | BLOCK_REDIRECTED
|
||||
return ..()
|
||||
|
||||
/obj/item/dualsaber/attack_hulk(mob/living/carbon/human/user, does_attack_animation = 0) //In case thats just so happens that it is still activated on the groud, prevents hulk from picking it up
|
||||
if(wielded)
|
||||
to_chat(user, "<span class='warning'>You can't pick up such dangerous item with your meaty hands without losing fingers, better not to!</span>")
|
||||
return 1
|
||||
|
||||
/obj/item/dualsaber/process()
|
||||
if(wielded)
|
||||
if(hacked)
|
||||
rainbow_process()
|
||||
open_flame()
|
||||
else
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/dualsaber/proc/rainbow_process()
|
||||
light_color = pick(rainbow_colors)
|
||||
|
||||
/obj/item/dualsaber/ignition_effect(atom/A, mob/user)
|
||||
// same as /obj/item/melee/transforming/energy, mostly
|
||||
if(!wielded)
|
||||
return ""
|
||||
var/in_mouth = ""
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
if(C.wear_mask)
|
||||
in_mouth = ", barely missing [user.p_their()] nose"
|
||||
. = "<span class='warning'>[user] swings [user.p_their()] [name][in_mouth]. [user.p_they(TRUE)] light[user.p_s()] [user.p_their()] [A.name] in the process.</span>"
|
||||
playsound(loc, hitsound, get_clamped_volume(), 1, -1)
|
||||
add_fingerprint(user)
|
||||
// Light your candles while spinning around the room
|
||||
if(spinnable)
|
||||
INVOKE_ASYNC(src, .proc/jedi_spin, user)
|
||||
|
||||
/obj/item/dualsaber/green
|
||||
possible_colors = list("green")
|
||||
|
||||
/obj/item/dualsaber/red
|
||||
possible_colors = list("red")
|
||||
|
||||
/obj/item/dualsaber/blue
|
||||
possible_colors = list("blue")
|
||||
|
||||
/obj/item/dualsaber/purple
|
||||
possible_colors = list("purple")
|
||||
|
||||
/obj/item/dualsaber/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/multitool))
|
||||
if(!hacked)
|
||||
hacked = TRUE
|
||||
to_chat(user, "<span class='warning'>2XRNBW_ENGAGE</span>")
|
||||
saber_color = "rainbow"
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>It's starting to look like a triple rainbow - no, nevermind.</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
// HYPEREUTACTIC Blades /////////////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
/obj/item/dualsaber/hypereutactic
|
||||
icon = 'icons/obj/1x2.dmi'
|
||||
icon_state = "hypereutactic"
|
||||
lefthand_file = 'icons/mob/inhands/64x64_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/64x64_righthand.dmi'
|
||||
item_state = "hypereutactic"
|
||||
inhand_x_dimension = 64
|
||||
inhand_y_dimension = 64
|
||||
name = "hypereutactic blade"
|
||||
desc = "A supermassive weapon envisioned to cleave the very fabric of space and time itself in twain, the hypereutactic blade dynamically flash-forges a hypereutactic crystaline nanostructure capable of passing through most known forms of matter like a hot knife through butter."
|
||||
force = 7
|
||||
hitsound_on = 'sound/weapons/nebhit.ogg'
|
||||
armour_penetration = 60
|
||||
light_color = "#37FFF7"
|
||||
rainbow_colors = list("#FF0000", "#FFFF00", "#00FF00", "#00FFFF", "#0000FF","#FF00FF", "#3399ff", "#ff9900", "#fb008b", "#9800ff", "#00ffa3", "#ccff00")
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "destroyed", "ripped", "devastated", "shredded")
|
||||
spinnable = FALSE
|
||||
total_mass_on = 4
|
||||
slowdown_wielded = 1
|
||||
|
||||
/obj/item/dualsaber/hypereutactic/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/two_handed, force_unwielded=7, force_wielded=40, \
|
||||
wieldsound='sound/weapons/nebon.ogg', unwieldsound='sound/weapons/nebhit.ogg')
|
||||
AddElement(/datum/element/update_icon_updates_onmob)
|
||||
|
||||
/obj/item/dualsaber/hypereutactic/update_icon_state()
|
||||
return
|
||||
|
||||
/obj/item/dualsaber/hypereutactic/update_overlays()
|
||||
. = ..()
|
||||
var/mutable_appearance/blade_overlay = mutable_appearance(icon, "hypereutactic_blade")
|
||||
var/mutable_appearance/gem_overlay = mutable_appearance(icon, "hypereutactic_gem")
|
||||
|
||||
if(light_color)
|
||||
blade_overlay.color = light_color
|
||||
gem_overlay.color = light_color
|
||||
|
||||
. += gem_overlay
|
||||
|
||||
if(wielded)
|
||||
. += blade_overlay
|
||||
|
||||
clean_blood()
|
||||
|
||||
/obj/item/dualsaber/hypereutactic/AltClick(mob/living/user)
|
||||
. = ..()
|
||||
if(!user.canUseTopic(src, BE_CLOSE, FALSE) || hacked)
|
||||
return
|
||||
if(user.incapacitated() || !istype(user))
|
||||
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
|
||||
return
|
||||
if(alert("Are you sure you want to recolor your blade?", "Confirm Repaint", "Yes", "No") == "Yes")
|
||||
var/energy_color_input = input(usr,"","Choose Energy Color",light_color) as color|null
|
||||
if(!energy_color_input || !user.canUseTopic(src, BE_CLOSE, FALSE) || hacked)
|
||||
return
|
||||
light_color = sanitize_hexcolor(energy_color_input, desired_format=6, include_crunch=1)
|
||||
update_icon()
|
||||
update_light()
|
||||
return TRUE
|
||||
|
||||
/obj/item/dualsaber/hypereutactic/worn_overlays(isinhands, icon_file, used_state, style_flags = NONE)
|
||||
. = ..()
|
||||
if(isinhands)
|
||||
var/mutable_appearance/gem_inhand = mutable_appearance(icon_file, "hypereutactic_gem")
|
||||
gem_inhand.color = light_color
|
||||
. += gem_inhand
|
||||
if(wielded)
|
||||
var/mutable_appearance/blade_inhand = mutable_appearance(icon_file, "hypereutactic_blade")
|
||||
blade_inhand.color = light_color
|
||||
. += blade_inhand
|
||||
|
||||
/obj/item/dualsaber/hypereutactic/examine(mob/user)
|
||||
. = ..()
|
||||
if(!hacked)
|
||||
. += "<span class='notice'>Alt-click to recolor it.</span>"
|
||||
|
||||
/obj/item/dualsaber/hypereutactic/rainbow_process()
|
||||
. = ..()
|
||||
update_icon()
|
||||
update_light()
|
||||
|
||||
/obj/item/dualsaber/hypereutactic/chaplain
|
||||
name = "divine lightblade"
|
||||
desc = "A giant blade of bright and holy light, said to cut down the wicked with ease."
|
||||
force = 5
|
||||
block_chance = 50
|
||||
armour_penetration = 0
|
||||
var/chaplain_spawnable = TRUE
|
||||
can_reflect = FALSE
|
||||
obj_flags = UNIQUE_RENAME
|
||||
|
||||
/obj/item/dualsaber/hypereutactic/chaplain/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/two_handed, force_unwielded=5, force_wielded=20, \
|
||||
wieldsound='sound/weapons/nebon.ogg', unwieldsound='sound/weapons/nebhit.ogg')
|
||||
AddComponent(/datum/component/anti_magic, TRUE, TRUE, FALSE, null, null, FALSE)
|
||||
@@ -0,0 +1,263 @@
|
||||
|
||||
/obj/item/electrostaff
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "electrostaff"
|
||||
item_state = "electrostaff"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/staves_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/staves_righthand.dmi'
|
||||
name = "riot suppression electrostaff"
|
||||
desc = "A large quarterstaff, with massive silver electrodes mounted at the end."
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
slot_flags = ITEM_SLOT_BACK | ITEM_SLOT_OCLOTHING
|
||||
throwforce = 15 //if you are a madman and finish someone off with this, power to you.
|
||||
throw_speed = 1
|
||||
item_flags = NO_MAT_REDEMPTION
|
||||
attack_verb = list("struck", "beaten", "thwacked", "pulped")
|
||||
total_mass = 5 //yeah this is a heavy thing, beating people with it while it's off is not going to do you any favors. (to curb stun-kill rampaging without it being on)
|
||||
block_parry_data = /datum/block_parry_data/electrostaff
|
||||
var/obj/item/stock_parts/cell/cell = /obj/item/stock_parts/cell/high
|
||||
var/on = FALSE
|
||||
var/can_block_projectiles = FALSE //can't block guns
|
||||
var/lethal_cost = 400 //10000/400*20 = 500. decent enough?
|
||||
var/lethal_damage = 20
|
||||
var/lethal_stam_cost = 4
|
||||
var/stun_cost = 333 //10000/333*25 = 750. stunbatons are at time of writing 10000/1000*49 = 490.
|
||||
var/stun_status_effect = STATUS_EFFECT_ELECTROSTAFF //a small slowdown effect
|
||||
var/stun_stamdmg = 40
|
||||
var/stun_status_duration = 25
|
||||
var/stun_stam_cost = 3.5
|
||||
var/wielded = FALSE // track wielded status on item
|
||||
|
||||
// haha security desword time /s
|
||||
/datum/block_parry_data/electrostaff
|
||||
block_damage_absorption = 0
|
||||
block_damage_multiplier = 1
|
||||
can_block_attack_types = ~ATTACK_TYPE_PROJECTILE // only able to parry non projectiles
|
||||
block_damage_multiplier_override = list(
|
||||
TEXT_ATTACK_TYPE_MELEE = 0.5, // only useful on melee and unarmed
|
||||
TEXT_ATTACK_TYPE_UNARMED = 0.3
|
||||
)
|
||||
block_start_delay = 0.5 // near instantaneous block
|
||||
block_stamina_cost_per_second = 3
|
||||
block_stamina_efficiency = 2 // haha this is a horrible idea
|
||||
// more slowdown that deswords because security
|
||||
block_slowdown = 2
|
||||
// no attacking while blocking
|
||||
block_lock_attacking = TRUE
|
||||
|
||||
parry_time_windup = 1
|
||||
parry_time_active = 5
|
||||
parry_time_spindown = 0
|
||||
parry_time_spindown_visual_override = 1
|
||||
parry_flags = PARRY_DEFAULT_HANDLE_FEEDBACK | PARRY_LOCK_ATTACKING // no attacking while parrying
|
||||
parry_time_perfect = 0
|
||||
parry_time_perfect_leeway = 0.5
|
||||
parry_efficiency_perfect = 100
|
||||
parry_imperfect_falloff_percent = 1
|
||||
parry_imperfect_falloff_percent_override = list(
|
||||
TEXT_ATTACK_TYPE_PROJECTILE = 45 // really crappy vs projectiles
|
||||
)
|
||||
parry_time_perfect_leeway_override = list(
|
||||
TEXT_ATTACK_TYPE_PROJECTILE = 1 // extremely harsh window for projectiles
|
||||
)
|
||||
// not extremely punishing to fail, but no spamming the parry.
|
||||
parry_cooldown = 2.5 SECONDS
|
||||
parry_failed_stagger_duration = 1.5 SECONDS
|
||||
parry_failed_clickcd_duration = 1 SECONDS
|
||||
|
||||
/obj/item/electrostaff/Initialize(mapload)
|
||||
. = ..()
|
||||
if(ispath(cell))
|
||||
cell = new cell
|
||||
RegisterSignal(src, COMSIG_TWOHANDED_WIELD, .proc/turn_on)
|
||||
RegisterSignal(src, COMSIG_TWOHANDED_UNWIELD, .proc/turn_off)
|
||||
|
||||
/obj/item/electrostaff/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/two_handed, force_multiplier=2, wieldsound="sparks", unwieldsound="sparks")
|
||||
|
||||
/obj/item/electrostaff/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
QDEL_NULL(cell)
|
||||
return ..()
|
||||
|
||||
/obj/item/electrostaff/get_cell()
|
||||
. = cell
|
||||
if(iscyborg(loc))
|
||||
var/mob/living/silicon/robot/R = loc
|
||||
. = R.get_cell()
|
||||
|
||||
/obj/item/electrostaff/proc/min_hitcost()
|
||||
return min(stun_cost, lethal_cost)
|
||||
|
||||
/obj/item/electrostaff/proc/turn_on(obj/item/source, mob/user)
|
||||
wielded = TRUE
|
||||
item_flags |= (ITEM_CAN_BLOCK|ITEM_CAN_PARRY)
|
||||
if(!cell)
|
||||
if(user)
|
||||
to_chat(user, "<span class='warning'>[src] has no cell.</span>")
|
||||
return
|
||||
if(cell.charge < min_hitcost())
|
||||
if(user)
|
||||
to_chat(user, "<span class='warning'>[src] is out of charge.</span>")
|
||||
return
|
||||
on = TRUE
|
||||
START_PROCESSING(SSobj, src)
|
||||
if(user)
|
||||
to_chat(user, "<span class='warning'>You turn [src] on.</span>")
|
||||
|
||||
/obj/item/electrostaff/proc/turn_off(obj/item/source, mob/user)
|
||||
wielded = FALSE
|
||||
item_flags &= ~(ITEM_CAN_BLOCK|ITEM_CAN_PARRY)
|
||||
if(user)
|
||||
to_chat(user, "<span class='warning'>You turn [src] off.</span>")
|
||||
on = FALSE
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/electrostaff/update_icon_state()
|
||||
if(!wielded)
|
||||
icon_state = item_state = "electrostaff"
|
||||
else
|
||||
icon_state = item_state = (on? "electrostaff_1" : "electrostaff_0")
|
||||
set_light(7, on? 1 : 0, LIGHT_COLOR_CYAN)
|
||||
|
||||
/obj/item/electrostaff/examine(mob/living/user)
|
||||
. = ..()
|
||||
if(cell)
|
||||
. += "<span class='notice'>The cell charge is [round(cell.percent())]%.</span>"
|
||||
else
|
||||
. += "<span class='warning'>There is no cell installed!</span>"
|
||||
|
||||
/obj/item/electrostaff/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/stock_parts/cell))
|
||||
var/obj/item/stock_parts/cell/C = W
|
||||
if(cell)
|
||||
to_chat(user, "<span class='warning'>[src] already has a cell!</span>")
|
||||
else
|
||||
if(C.maxcharge < min_hit_cost())
|
||||
to_chat(user, "<span class='notice'>[src] requires a higher capacity cell.</span>")
|
||||
return
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
return
|
||||
cell = C
|
||||
to_chat(user, "<span class='notice'>You install a cell in [src].</span>")
|
||||
|
||||
else if(W.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(cell)
|
||||
cell.update_icon()
|
||||
cell.forceMove(get_turf(src))
|
||||
cell = null
|
||||
to_chat(user, "<span class='notice'>You remove the cell from [src].</span>")
|
||||
turn_off(user, TRUE)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/electrostaff/process()
|
||||
deductcharge(50) //Wasteful!
|
||||
|
||||
/obj/item/electrostaff/proc/min_hit_cost()
|
||||
return min(lethal_cost, stun_cost)
|
||||
|
||||
/obj/item/electrostaff/proc/deductcharge(amount)
|
||||
var/obj/item/stock_parts/cell/C = get_cell()
|
||||
if(!C)
|
||||
turn_off()
|
||||
return FALSE
|
||||
C.use(min(amount, C.charge))
|
||||
if(QDELETED(src))
|
||||
return FALSE
|
||||
if(C.charge < min_hit_cost())
|
||||
turn_off()
|
||||
|
||||
/obj/item/electrostaff/attack(mob/living/target, mob/living/user)
|
||||
if(IS_STAMCRIT(user))//CIT CHANGE - makes it impossible to baton in stamina softcrit
|
||||
to_chat(user, "<span class='danger'>You're too exhausted to use [src] properly.</span>")//CIT CHANGE - ditto
|
||||
return //CIT CHANGE - ditto
|
||||
if(on && HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50))
|
||||
clowning_around(user) //ouch!
|
||||
return
|
||||
if(iscyborg(target))
|
||||
return ..()
|
||||
var/list/return_list = list()
|
||||
if(target.mob_run_block(src, 0, "[user]'s [name]", ATTACK_TYPE_MELEE, 0, user, null, return_list) & BLOCK_SUCCESS) //No message; run_block() handles that
|
||||
playsound(target, 'sound/weapons/genhit.ogg', 50, 1)
|
||||
return FALSE
|
||||
if(user.a_intent != INTENT_HARM)
|
||||
if(stun_act(target, user, null, return_list))
|
||||
user.do_attack_animation(target)
|
||||
user.adjustStaminaLossBuffered(stun_stam_cost)
|
||||
return
|
||||
else if(!harm_act(target, user, null, return_list))
|
||||
return ..() //if you can't fry them just beat them with it
|
||||
else //we did harm act them
|
||||
user.do_attack_animation(target)
|
||||
user.adjustStaminaLossBuffered(lethal_stam_cost)
|
||||
|
||||
/obj/item/electrostaff/proc/stun_act(mob/living/target, mob/living/user, no_charge_and_force = FALSE, list/block_return = list())
|
||||
var/stunforce = block_calculate_resultant_damage(stun_stamdmg, block_return)
|
||||
if(!no_charge_and_force)
|
||||
if(!on)
|
||||
target.visible_message("<span class='warning'>[user] has bapped [target] with [src]. Luckily it was off.</span>", \
|
||||
"<span class='warning'>[user] has bapped you with [src]. Luckily it was off</span>")
|
||||
turn_off() //if it wasn't already off
|
||||
return FALSE
|
||||
var/obj/item/stock_parts/cell/C = get_cell()
|
||||
var/chargeleft = C.charge
|
||||
deductcharge(stun_cost)
|
||||
if(QDELETED(src) || QDELETED(C)) //boom
|
||||
return FALSE
|
||||
if(chargeleft < stun_cost)
|
||||
stunforce *= round(chargeleft/stun_cost, 0.1)
|
||||
target.adjustStaminaLoss(stunforce)
|
||||
target.apply_effect(EFFECT_STUTTER, stunforce)
|
||||
SEND_SIGNAL(target, COMSIG_LIVING_MINOR_SHOCK)
|
||||
if(user)
|
||||
target.lastattacker = user.real_name
|
||||
target.lastattackerckey = user.ckey
|
||||
target.visible_message("<span class='danger'>[user] has shocked [target] with [src]!</span>", \
|
||||
"<span class='userdanger'>[user] has shocked you with [src]!</span>")
|
||||
log_combat(user, target, "stunned with an electrostaff")
|
||||
playsound(src, 'sound/weapons/staff.ogg', 50, 1, -1)
|
||||
target.apply_status_effect(stun_status_effect, stun_status_duration)
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
H.forcesay(GLOB.hit_appends)
|
||||
return TRUE
|
||||
|
||||
/obj/item/electrostaff/proc/harm_act(mob/living/target, mob/living/user, no_charge_and_force = FALSE, list/block_return = list())
|
||||
var/lethal_force = block_calculate_resultant_damage(lethal_damage, block_return)
|
||||
if(!no_charge_and_force)
|
||||
if(!on)
|
||||
return FALSE //standard item attack
|
||||
var/obj/item/stock_parts/cell/C = get_cell()
|
||||
var/chargeleft = C.charge
|
||||
deductcharge(lethal_cost)
|
||||
if(QDELETED(src) || QDELETED(C)) //boom
|
||||
return FALSE
|
||||
if(chargeleft < stun_cost)
|
||||
lethal_force *= round(chargeleft/lethal_cost, 0.1)
|
||||
target.adjustFireLoss(lethal_force) //good against ointment spam
|
||||
SEND_SIGNAL(target, COMSIG_LIVING_MINOR_SHOCK)
|
||||
if(user)
|
||||
target.lastattacker = user.real_name
|
||||
target.lastattackerckey = user.ckey
|
||||
target.visible_message("<span class='danger'>[user] has seared [target] with [src]!</span>", \
|
||||
"<span class='userdanger'>[user] has seared you with [src]!</span>")
|
||||
log_combat(user, target, "burned with an electrostaff")
|
||||
playsound(src, 'sound/weapons/sear.ogg', 50, 1, -1)
|
||||
return TRUE
|
||||
|
||||
/obj/item/electrostaff/proc/clowning_around(mob/living/user)
|
||||
user.visible_message("<span class='danger'>[user] accidentally hits [user.p_them()]self with [src]!</span>", \
|
||||
"<span class='userdanger'>You accidentally hit yourself with [src]!</span>")
|
||||
SEND_SIGNAL(user, COMSIG_LIVING_MINOR_SHOCK)
|
||||
harm_act(user, user, TRUE)
|
||||
stun_act(user, user, TRUE)
|
||||
deductcharge(lethal_cost)
|
||||
|
||||
/obj/item/electrostaff/emp_act(severity)
|
||||
. = ..()
|
||||
if (!(. & EMP_PROTECT_SELF))
|
||||
turn_off()
|
||||
if(!iscyborg(loc))
|
||||
deductcharge(1000 / severity, TRUE, FALSE)
|
||||
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* Fireaxe
|
||||
*/
|
||||
/obj/item/fireaxe // DEM AXES MAN, marker -Agouri
|
||||
icon_state = "fireaxe0"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/axes_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/axes_righthand.dmi'
|
||||
name = "fire axe"
|
||||
desc = "Truly, the weapon of a madman. Who would think to fight fire with an axe?"
|
||||
force = 5
|
||||
throwforce = 15
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut")
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
sharpness = IS_SHARP
|
||||
max_integrity = 200
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 30)
|
||||
resistance_flags = FIRE_PROOF
|
||||
var/wielded = FALSE // track wielded status on item
|
||||
|
||||
/obj/item/fireaxe/Initialize()
|
||||
. = ..()
|
||||
RegisterSignal(src, COMSIG_TWOHANDED_WIELD, .proc/on_wield)
|
||||
RegisterSignal(src, COMSIG_TWOHANDED_UNWIELD, .proc/on_unwield)
|
||||
|
||||
/obj/item/fireaxe/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/butchering, 100, 80, 0 , hitsound) //axes are not known for being precision butchering tools
|
||||
AddComponent(/datum/component/two_handed, force_unwielded=5, force_wielded=24, icon_wielded="fireaxe1")
|
||||
|
||||
/// triggered on wield of two handed item
|
||||
/obj/item/fireaxe/proc/on_wield(obj/item/source, mob/user)
|
||||
wielded = TRUE
|
||||
|
||||
/// triggered on unwield of two handed item
|
||||
/obj/item/fireaxe/proc/on_unwield(obj/item/source, mob/user)
|
||||
wielded = FALSE
|
||||
|
||||
/obj/item/fireaxe/update_icon_state()
|
||||
icon_state = "fireaxe0"
|
||||
|
||||
/obj/item/fireaxe/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] axes [user.p_them()]self from head to toe! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/fireaxe/afterattack(atom/A, mob/living/user, proximity)
|
||||
. = ..()
|
||||
if(!proximity || !wielded || IS_STAMCRIT(user))
|
||||
return
|
||||
if(istype(A, /obj/structure/window)) //destroys windows and grilles in one hit (or more if it has a ton of health like plasmaglass)
|
||||
var/obj/structure/window/W = A
|
||||
W.take_damage(200, BRUTE, "melee", 0)
|
||||
else if(istype(A, /obj/structure/grille))
|
||||
var/obj/structure/grille/G = A
|
||||
G.take_damage(40, BRUTE, "melee", 0)
|
||||
|
||||
/*
|
||||
* Bone Axe
|
||||
*/
|
||||
/obj/item/fireaxe/boneaxe // Blatant imitation of the fireaxe, but made out of bone.
|
||||
icon_state = "bone_axe0"
|
||||
name = "bone axe"
|
||||
desc = "A large, vicious axe crafted out of several sharpened bone plates and crudely tied together. Made of monsters, by killing monsters, for killing monsters."
|
||||
|
||||
/obj/item/fireaxe/boneaxe/update_icon_state()
|
||||
icon_state = "bone_axe0"
|
||||
|
||||
/obj/item/fireaxe/boneaxe/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/two_handed, force_unwielded=5, force_wielded=23, icon_wielded="bone_axe1")
|
||||
@@ -510,7 +510,7 @@
|
||||
oneuse = FALSE
|
||||
remarks = list("So that is how icing is made!", "Placing fruit on top? How simple...", "Huh layering cake seems harder then this...", "This book smells like candy", "A clown must have made this page, or they forgot to spell check it before printing...", "Wait, a way to cook slime to be safe?")
|
||||
|
||||
/obj/item/book/granter/crafting_recipe/coldcooking //IceCream
|
||||
/obj/item/book/granter/crafting_recipe/coldcooking //Icecream
|
||||
name = "Cooking with Ice"
|
||||
desc = "A cook book that teaches you many old icecream treats."
|
||||
crafting_recipe_types = list(/datum/crafting_recipe/food/banana_split, /datum/crafting_recipe/food/root_float, /datum/crafting_recipe/food/bluecharrie_float, /datum/crafting_recipe/food/charrie_float)
|
||||
|
||||
@@ -369,7 +369,7 @@
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You combine the two light swords, making a single supermassive blade! You're cool.</span>")
|
||||
new /obj/item/twohanded/dualsaber/hypereutactic(user.drop_location())
|
||||
new /obj/item/dualsaber/hypereutactic(user.drop_location())
|
||||
qdel(W)
|
||||
qdel(src)
|
||||
else
|
||||
|
||||
@@ -689,7 +689,7 @@
|
||||
item_state = "mace_greyscale"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi'
|
||||
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS | MATERIAL_EFFECTS //Material type changes the prefix as well as the color.
|
||||
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS //Material type changes the prefix as well as the color.
|
||||
custom_materials = list(/datum/material/iron = 12000) //Defaults to an Iron Mace.
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
force = 14
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
/obj/item/pitchfork
|
||||
icon_state = "pitchfork0"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/polearms_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/polearms_righthand.dmi'
|
||||
name = "pitchfork"
|
||||
desc = "A simple tool used for moving hay."
|
||||
force = 7
|
||||
throwforce = 15
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
attack_verb = list("attacked", "impaled", "pierced")
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
sharpness = IS_SHARP
|
||||
max_integrity = 200
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 30)
|
||||
resistance_flags = FIRE_PROOF
|
||||
var/wielded = FALSE // track wielded status on item
|
||||
|
||||
/obj/item/pitchfork/Initialize()
|
||||
. = ..()
|
||||
RegisterSignal(src, COMSIG_TWOHANDED_WIELD, .proc/on_wield)
|
||||
RegisterSignal(src, COMSIG_TWOHANDED_UNWIELD, .proc/on_unwield)
|
||||
|
||||
/obj/item/pitchfork/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/two_handed, force_unwielded=7, force_wielded=15, icon_wielded="pitchfork1")
|
||||
AddElement(/datum/element/sword_point)
|
||||
|
||||
/// triggered on wield of two handed item
|
||||
/obj/item/pitchfork/proc/on_wield(obj/item/source, mob/user)
|
||||
wielded = TRUE
|
||||
|
||||
/// triggered on unwield of two handed item
|
||||
/obj/item/pitchfork/proc/on_unwield(obj/item/source, mob/user)
|
||||
wielded = FALSE
|
||||
|
||||
/obj/item/pitchfork/update_icon_state()
|
||||
icon_state = "pitchfork0"
|
||||
|
||||
/obj/item/pitchfork/demonic
|
||||
name = "demonic pitchfork"
|
||||
desc = "A red pitchfork, it looks like the work of the devil."
|
||||
force = 19
|
||||
throwforce = 24
|
||||
|
||||
/obj/item/pitchfork/demonic/Initialize()
|
||||
. = ..()
|
||||
set_light(3,6,LIGHT_COLOR_RED)
|
||||
|
||||
/obj/item/pitchfork/demonic/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/two_handed, force_unwielded=19, force_wielded=25)
|
||||
|
||||
/obj/item/pitchfork/demonic/greater
|
||||
force = 24
|
||||
throwforce = 50
|
||||
|
||||
/obj/item/pitchfork/demonic/greater/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/two_handed, force_unwielded=24, force_wielded=34)
|
||||
|
||||
/obj/item/pitchfork/demonic/ascended
|
||||
force = 100
|
||||
throwforce = 100
|
||||
|
||||
/obj/item/pitchfork/demonic/ascended/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/two_handed, force_unwielded=100, force_wielded=500000) // Kills you DEAD
|
||||
|
||||
/obj/item/pitchfork/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] impales [user.p_them()]self in [user.p_their()] abdomen with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/pitchfork/demonic/pickup(mob/living/user)
|
||||
. = ..()
|
||||
if(isliving(user) && user.mind && user.owns_soul() && !is_devil(user))
|
||||
var/mob/living/U = user
|
||||
U.visible_message("<span class='warning'>As [U] picks [src] up, [U]'s arms briefly catch fire.</span>", \
|
||||
"<span class='warning'>\"As you pick up [src] your arms ignite, reminding you of all your past sins.\"</span>")
|
||||
if(ishuman(U))
|
||||
var/mob/living/carbon/human/H = U
|
||||
H.apply_damage(rand(force/2, force), BURN, pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM))
|
||||
else
|
||||
U.adjustFireLoss(rand(force/2,force))
|
||||
|
||||
/obj/item/pitchfork/demonic/attack(mob/target, mob/living/carbon/human/user)
|
||||
if(user.mind && user.owns_soul() && !is_devil(user))
|
||||
to_chat(user, "<span class='warning'>[src] burns in your hands.</span>")
|
||||
user.apply_damage(rand(force/2, force), BURN, pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM))
|
||||
..()
|
||||
|
||||
/obj/item/pitchfork/demonic/ascended/afterattack(atom/target, mob/user, proximity)
|
||||
. = ..()
|
||||
if(!proximity || !wielded)
|
||||
return
|
||||
if(iswallturf(target))
|
||||
var/turf/closed/wall/W = target
|
||||
user.visible_message("<span class='danger'>[user] blasts \the [target] with \the [src]!</span>")
|
||||
playsound(target, 'sound/magic/disintegrate.ogg', 100, TRUE)
|
||||
W.break_wall()
|
||||
W.ScrapeAway(flags = CHANGETURF_INHERIT_AIR)
|
||||
return
|
||||
@@ -459,7 +459,7 @@
|
||||
/obj/item/borg/upgrade/defib/deactivate(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
if (.)
|
||||
var/obj/item/twohanded/shockpaddles/cyborg/S = locate() in R.module
|
||||
var/obj/item/shockpaddles/cyborg/S = locate() in R.module
|
||||
R.module.remove_module(S, TRUE)
|
||||
|
||||
/obj/item/borg/upgrade/processor
|
||||
|
||||
@@ -24,24 +24,22 @@
|
||||
if(istype(I, /obj/item/melee/transforming/energy))
|
||||
to_chat(user, "<span class='warning'>You don't think \the [I] will be the thing getting modified if you use it on \the [src]!</span>")
|
||||
return
|
||||
if(istype(I, /obj/item/twohanded))//some twohanded items should still be sharpenable, but handle force differently. therefore i need this stuff
|
||||
var/obj/item/twohanded/TH = I
|
||||
if(TH.force_wielded >= max)
|
||||
to_chat(user, "<span class='warning'>[TH] is much too powerful to sharpen further!</span>")
|
||||
return
|
||||
if(TH.wielded)
|
||||
to_chat(user, "<span class='warning'>[TH] must be unwielded before it can be sharpened!</span>")
|
||||
return
|
||||
if(TH.force_wielded > initial(TH.force_wielded))
|
||||
to_chat(user, "<span class='warning'>[TH] has already been refined before. It cannot be sharpened further!</span>")
|
||||
return
|
||||
TH.force_wielded = clamp(TH.force_wielded + increment, 0, max)//wieldforce is increased since normal force wont stay
|
||||
if(I.force > initial(I.force))
|
||||
|
||||
var/signal_out = SEND_SIGNAL(I, COMSIG_ITEM_SHARPEN_ACT, increment, max)
|
||||
if(signal_out & COMPONENT_BLOCK_SHARPEN_MAXED)
|
||||
to_chat(user, "<span class='warning'>[I] is much too powerful to sharpen further!</span>")
|
||||
return
|
||||
if(signal_out & COMPONENT_BLOCK_SHARPEN_BLOCKED)
|
||||
to_chat(user, "<span class='warning'>[I] is not able to be sharpened right now!</span>")
|
||||
return
|
||||
if((signal_out & COMPONENT_BLOCK_SHARPEN_ALREADY) || (I.force > initial(I.force) && !signal_out))
|
||||
to_chat(user, "<span class='warning'>[I] has already been refined before. It cannot be sharpened further!</span>")
|
||||
return
|
||||
if(!(signal_out & COMPONENT_BLOCK_SHARPEN_APPLIED))
|
||||
I.force = clamp(I.force + increment, 0, max)
|
||||
|
||||
user.visible_message("<span class='notice'>[user] sharpens [I] with [src]!</span>", "<span class='notice'>You sharpen [I], making it much more deadly than before.</span>")
|
||||
I.sharpness = IS_SHARP_ACCURATE
|
||||
I.force = clamp(I.force + increment, 0, max)
|
||||
I.throwforce = clamp(I.throwforce + increment, 0, max)
|
||||
I.name = "[prefix] [I.name]"
|
||||
name = "worn out [name]"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/item/twohanded/singularityhammer
|
||||
/obj/item/singularityhammer
|
||||
name = "singularity hammer"
|
||||
desc = "The pinnacle of close combat technology, the hammer harnesses the power of a miniaturized singularity to deal crushing blows."
|
||||
icon_state = "mjollnir0"
|
||||
@@ -7,35 +7,47 @@
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
force = 5
|
||||
force_unwielded = 5
|
||||
force_wielded = 20
|
||||
throwforce = 15
|
||||
throw_range = 1
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
var/charged = 5
|
||||
armor = list("melee" = 50, "bullet" = 50, "laser" = 50, "energy" = 0, "bomb" = 50, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
force_string = "LORD SINGULOTH HIMSELF"
|
||||
total_mass = TOTAL_MASS_MEDIEVAL_WEAPON
|
||||
var/charged = 5
|
||||
var/wielded = FALSE // track wielded status on item
|
||||
|
||||
/obj/item/twohanded/singularityhammer/New()
|
||||
/obj/item/singularityhammer/New()
|
||||
..()
|
||||
RegisterSignal(src, COMSIG_TWOHANDED_WIELD, .proc/on_wield)
|
||||
RegisterSignal(src, COMSIG_TWOHANDED_UNWIELD, .proc/on_unwield)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/twohanded/singularityhammer/Destroy()
|
||||
/obj/item/singularityhammer/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/two_handed, force_multiplier=4, icon_wielded="mjollnir1")
|
||||
|
||||
/// triggered on wield of two handed item
|
||||
/obj/item/singularityhammer/proc/on_wield(obj/item/source, mob/user)
|
||||
wielded = TRUE
|
||||
|
||||
/// triggered on unwield of two handed item
|
||||
/obj/item/singularityhammer/proc/on_unwield(obj/item/source, mob/user)
|
||||
wielded = FALSE
|
||||
|
||||
/obj/item/singularityhammer/update_icon_state()
|
||||
icon_state = "mjollnir0"
|
||||
|
||||
/obj/item/singularityhammer/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/twohanded/singularityhammer/process()
|
||||
/obj/item/singularityhammer/process()
|
||||
if(charged < 5)
|
||||
charged++
|
||||
return
|
||||
|
||||
/obj/item/twohanded/singularityhammer/update_icon_state() //Currently only here to fuck with the on-mob icons.
|
||||
icon_state = "mjollnir[wielded]"
|
||||
return
|
||||
|
||||
/obj/item/twohanded/singularityhammer/proc/vortex(turf/pull, mob/wielder)
|
||||
/obj/item/singularityhammer/proc/vortex(turf/pull, mob/wielder)
|
||||
for(var/atom/X in orange(5,pull))
|
||||
if(ismovable(X))
|
||||
var/atom/movable/A = X
|
||||
@@ -55,9 +67,8 @@
|
||||
step_towards(H,pull)
|
||||
step_towards(H,pull)
|
||||
step_towards(H,pull)
|
||||
return
|
||||
|
||||
/obj/item/twohanded/singularityhammer/afterattack(atom/A as mob|obj|turf|area, mob/user, proximity)
|
||||
/obj/item/singularityhammer/afterattack(atom/A as mob|obj|turf|area, mob/user, proximity)
|
||||
. = ..()
|
||||
if(!proximity)
|
||||
return
|
||||
@@ -71,7 +82,7 @@
|
||||
var/turf/target = get_turf(A)
|
||||
vortex(target,user)
|
||||
|
||||
/obj/item/twohanded/mjollnir
|
||||
/obj/item/mjollnir
|
||||
name = "Mjolnir"
|
||||
desc = "A weapon worthy of a god, able to strike with the force of a lightning bolt. It crackles with barely contained energy."
|
||||
icon_state = "mjollnir0"
|
||||
@@ -80,14 +91,33 @@
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
force = 5
|
||||
force_unwielded = 5
|
||||
force_wielded = 25
|
||||
throwforce = 30
|
||||
throw_range = 7
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
total_mass = TOTAL_MASS_MEDIEVAL_WEAPON
|
||||
var/wielded = FALSE // track wielded status on item
|
||||
|
||||
/obj/item/twohanded/mjollnir/proc/shock(mob/living/target)
|
||||
/obj/item/mjollnir/Initialize()
|
||||
. = ..()
|
||||
RegisterSignal(src, COMSIG_TWOHANDED_WIELD, .proc/on_wield)
|
||||
RegisterSignal(src, COMSIG_TWOHANDED_UNWIELD, .proc/on_unwield)
|
||||
|
||||
/obj/item/mjollnir/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/two_handed, force_multiplier=5, icon_wielded="mjollnir1", attacksound="sparks")
|
||||
|
||||
/// triggered on wield of two handed item
|
||||
/obj/item/mjollnir/proc/on_wield(obj/item/source, mob/user)
|
||||
wielded = TRUE
|
||||
|
||||
/// triggered on unwield of two handed item
|
||||
/obj/item/mjollnir/proc/on_unwield(obj/item/source, mob/user)
|
||||
wielded = FALSE
|
||||
|
||||
/obj/item/mjollnir/update_icon_state()
|
||||
icon_state = "mjollnir0"
|
||||
|
||||
/obj/item/mjollnir/proc/shock(mob/living/target)
|
||||
target.Stun(60)
|
||||
var/datum/effect_system/lightning_spread/s = new /datum/effect_system/lightning_spread
|
||||
s.set_up(5, 1, target.loc)
|
||||
@@ -99,17 +129,12 @@
|
||||
target.throw_at(throw_target, 200, 4)
|
||||
return
|
||||
|
||||
/obj/item/twohanded/mjollnir/attack(mob/living/M, mob/user)
|
||||
/obj/item/mjollnir/attack(mob/living/M, mob/user)
|
||||
..()
|
||||
if(wielded)
|
||||
playsound(src.loc, "sparks", 50, 1)
|
||||
shock(M)
|
||||
|
||||
/obj/item/twohanded/mjollnir/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
|
||||
/obj/item/mjollnir/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
|
||||
. = ..()
|
||||
if(isliving(hit_atom))
|
||||
shock(hit_atom)
|
||||
|
||||
/obj/item/twohanded/mjollnir/update_icon_state() //Currently only here to fuck with the on-mob icons.
|
||||
icon_state = "mjollnir[wielded]"
|
||||
return
|
||||
|
||||
@@ -0,0 +1,185 @@
|
||||
//spears
|
||||
/obj/item/spear
|
||||
icon_state = "spearglass0"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/polearms_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/polearms_righthand.dmi'
|
||||
name = "spear"
|
||||
desc = "A haphazardly-constructed yet still deadly weapon of ancient design."
|
||||
force = 10
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
throwforce = 20
|
||||
throw_speed = 4
|
||||
embedding = list("impact_pain_mult" = 3)
|
||||
armour_penetration = 10
|
||||
custom_materials = list(/datum/material/iron=1150, /datum/material/glass=2075)
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
attack_verb = list("attacked", "poked", "jabbed", "torn", "gored")
|
||||
sharpness = IS_SHARP
|
||||
max_integrity = 200
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30)
|
||||
var/obj/item/grenade/explosive = null
|
||||
var/war_cry = "AAAAARGH!!!"
|
||||
var/icon_prefix = "spearglass"
|
||||
var/wielded = FALSE // track wielded status on item
|
||||
|
||||
/obj/item/spear/Initialize()
|
||||
. = ..()
|
||||
RegisterSignal(src, COMSIG_TWOHANDED_WIELD, .proc/on_wield)
|
||||
RegisterSignal(src, COMSIG_TWOHANDED_UNWIELD, .proc/on_unwield)
|
||||
|
||||
/obj/item/spear/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/butchering, 100, 70) //decent in a pinch, but pretty bad.
|
||||
AddComponent(/datum/component/jousting)
|
||||
AddElement(/datum/element/sword_point)
|
||||
AddComponent(/datum/component/two_handed, force_unwielded=10, force_wielded=18, icon_wielded="[icon_prefix]1")
|
||||
|
||||
/// triggered on wield of two handed item
|
||||
/obj/item/spear/proc/on_wield(obj/item/source, mob/user)
|
||||
wielded = TRUE
|
||||
|
||||
/// triggered on unwield of two handed item
|
||||
/obj/item/spear/proc/on_unwield(obj/item/source, mob/user)
|
||||
wielded = FALSE
|
||||
|
||||
/obj/item/spear/rightclick_attack_self(mob/user)
|
||||
if(explosive)
|
||||
explosive.attack_self(user)
|
||||
return
|
||||
. = ..()
|
||||
|
||||
/obj/item/spear/update_icon_state()
|
||||
icon_state = "[icon_prefix]0"
|
||||
|
||||
/obj/item/spear/update_overlays()
|
||||
. = ..()
|
||||
if(explosive)
|
||||
. += "spearbomb_overlay"
|
||||
|
||||
/obj/item/spear/suicide_act(mob/living/carbon/user)
|
||||
user.visible_message("<span class='suicide'>[user] begins to sword-swallow \the [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
if(explosive) //Citadel Edit removes qdel and explosive.forcemove(AM)
|
||||
user.say("[war_cry]", forced="spear warcry")
|
||||
explosive.prime()
|
||||
user.gib()
|
||||
return BRUTELOSS
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/spear/examine(mob/user)
|
||||
. = ..()
|
||||
if(explosive)
|
||||
. += "<span class='notice'>Alt-click to set your war cry.</span>"
|
||||
. += "<span class='notice'>Right-click in combat mode to activate the attached explosive.</span>"
|
||||
|
||||
/obj/item/spear/afterattack(atom/movable/AM, mob/user, proximity)
|
||||
. = ..()
|
||||
if(!proximity)
|
||||
return
|
||||
if(isopenturf(AM)) //So you can actually melee with it
|
||||
return
|
||||
if(explosive && wielded) //Citadel edit removes qdel and explosive.forcemove(AM)
|
||||
user.say("[war_cry]", forced="spear warcry")
|
||||
explosive.prime()
|
||||
|
||||
/obj/item/spear/grenade_prime_react(obj/item/grenade/nade) //Citadel edit, removes throw_impact because memes
|
||||
nade.forceMove(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/item/spear/AltClick(mob/user)
|
||||
. = ..()
|
||||
if(user.canUseTopic(src, BE_CLOSE))
|
||||
..()
|
||||
if(!explosive)
|
||||
return
|
||||
if(istype(user) && loc == user)
|
||||
var/input = stripped_input(user,"What do you want your war cry to be? You will shout it when you hit someone in melee.", ,"", 50)
|
||||
if(input)
|
||||
src.war_cry = input
|
||||
return TRUE
|
||||
|
||||
/obj/item/spear/CheckParts(list/parts_list)
|
||||
var/obj/item/shard/tip = locate() in parts_list
|
||||
if (istype(tip, /obj/item/shard/plasma))
|
||||
throwforce = 21
|
||||
embedding = list(embed_chance = 75, pain_mult = 1.5) //plasmaglass spears are sharper
|
||||
updateEmbedding()
|
||||
icon_prefix = "spearplasma"
|
||||
AddComponent(/datum/component/two_handed, force_unwielded=11, force_wielded=19, icon_wielded="[icon_prefix]1")
|
||||
qdel(tip)
|
||||
var/obj/item/spear/S = locate() in parts_list
|
||||
if(S)
|
||||
if(S.explosive)
|
||||
S.explosive.forceMove(get_turf(src))
|
||||
S.explosive = null
|
||||
parts_list -= S
|
||||
qdel(S)
|
||||
..()
|
||||
var/obj/item/grenade/G = locate() in contents
|
||||
if(G)
|
||||
explosive = G
|
||||
name = "explosive lance"
|
||||
embedding = list(embed_chance = 0, pain_mult = 1)//elances should not be embeddable
|
||||
updateEmbedding()
|
||||
desc = "A makeshift spear with \a [G] attached to it."
|
||||
update_icon()
|
||||
|
||||
//GREY TIDE
|
||||
/obj/item/spear/grey_tide
|
||||
icon_state = "spearglass0"
|
||||
name = "\improper Grey Tide"
|
||||
desc = "Recovered from the aftermath of a revolt aboard Defense Outpost Theta Aegis, in which a seemingly endless tide of Assistants caused heavy casualities among Nanotrasen military forces."
|
||||
throwforce = 20
|
||||
throw_speed = 4
|
||||
attack_verb = list("gored")
|
||||
var/clonechance = 50
|
||||
var/clonedamage = 12
|
||||
var/clonespeed = 0
|
||||
var/clone_replication_chance = 30
|
||||
var/clone_lifespan = 100
|
||||
|
||||
/obj/item/spear/grey_tide/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/two_handed, force_unwielded=15, force_wielded=25, icon_wielded="[icon_prefix]1")
|
||||
|
||||
/obj/item/spear/grey_tide/afterattack(atom/movable/AM, mob/living/user, proximity)
|
||||
. = ..()
|
||||
if(!proximity)
|
||||
return
|
||||
user.faction |= "greytide([REF(user)])"
|
||||
if(isliving(AM))
|
||||
var/mob/living/L = AM
|
||||
if(istype (L, /mob/living/simple_animal/hostile/illusion))
|
||||
return
|
||||
if(!L.stat && prob(clonechance))
|
||||
var/mob/living/simple_animal/hostile/illusion/M = new(user.loc)
|
||||
M.faction = user.faction.Copy()
|
||||
M.set_varspeed(clonespeed)
|
||||
M.Copy_Parent(user, clone_lifespan, user.health/2.5, clonedamage, clone_replication_chance)
|
||||
M.GiveTarget(L)
|
||||
|
||||
/*
|
||||
* Bone Spear
|
||||
*/
|
||||
/obj/item/spear/bonespear //Blatant imitation of spear, but made out of bone. Not valid for explosive modification.
|
||||
icon_state = "bone_spear0"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/polearms_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/polearms_righthand.dmi'
|
||||
name = "bone spear"
|
||||
desc = "A haphazardly-constructed yet still deadly weapon. The pinnacle of modern technology."
|
||||
force = 11
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
reach = 2
|
||||
throwforce = 22
|
||||
embedding = list("embedded_impact_pain_multiplier" = 3)
|
||||
armour_penetration = 15 //Enhanced armor piercing
|
||||
custom_materials = null
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
attack_verb = list("attacked", "poked", "jabbed", "torn", "gored")
|
||||
sharpness = IS_SHARP
|
||||
icon_prefix = "bone_spear"
|
||||
|
||||
/obj/item/spear/bonespear/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/two_handed, force_unwielded=11, force_wielded=20, icon_wielded="[icon_prefix]1")
|
||||
@@ -17,7 +17,6 @@ GLOBAL_LIST_INIT(rod_recipes, list ( \
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
custom_materials = list(/datum/material/iron=1000)
|
||||
mats_per_stack = 1000
|
||||
max_amount = 50
|
||||
attack_verb = list("hit", "bludgeoned", "whacked")
|
||||
hitsound = 'sound/weapons/grenadelaunch.ogg'
|
||||
|
||||
@@ -39,9 +39,11 @@ GLOBAL_LIST_INIT(sandstone_recipes, list ( \
|
||||
item_state = "sheet-sandstone"
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
custom_materials = list(/datum/material/glass=MINERAL_MATERIAL_AMOUNT)
|
||||
custom_materials = list(/datum/material/sandstone=MINERAL_MATERIAL_AMOUNT)
|
||||
sheettype = "sandstone"
|
||||
merge_type = /obj/item/stack/sheet/mineral/sandstone
|
||||
walltype = /turf/closed/wall/mineral/sandstone
|
||||
material_type = /datum/material/sandstone
|
||||
|
||||
/obj/item/stack/sheet/mineral/sandstone/get_main_recipes()
|
||||
. = ..()
|
||||
@@ -107,6 +109,7 @@ GLOBAL_LIST_INIT(sandbag_recipes, list ( \
|
||||
point_value = 25
|
||||
merge_type = /obj/item/stack/sheet/mineral/diamond
|
||||
material_type = /datum/material/diamond
|
||||
walltype = /turf/closed/wall/mineral/diamond
|
||||
|
||||
GLOBAL_LIST_INIT(diamond_recipes, list ( \
|
||||
new/datum/stack_recipe("diamond door", /obj/structure/mineral_door/transparent/diamond, 10, one_per_turf = 1, on_floor = 1), \
|
||||
@@ -135,6 +138,7 @@ GLOBAL_LIST_INIT(diamond_recipes, list ( \
|
||||
point_value = 20
|
||||
merge_type = /obj/item/stack/sheet/mineral/uranium
|
||||
material_type = /datum/material/uranium
|
||||
walltype = /turf/closed/wall/mineral/uranium
|
||||
|
||||
GLOBAL_LIST_INIT(uranium_recipes, list ( \
|
||||
new/datum/stack_recipe("uranium door", /obj/structure/mineral_door/uranium, 10, one_per_turf = 1, on_floor = 1), \
|
||||
@@ -163,6 +167,7 @@ GLOBAL_LIST_INIT(uranium_recipes, list ( \
|
||||
point_value = 20
|
||||
merge_type = /obj/item/stack/sheet/mineral/plasma
|
||||
material_type = /datum/material/plasma
|
||||
walltype = /turf/closed/wall/mineral/plasma
|
||||
|
||||
/obj/item/stack/sheet/mineral/plasma/suicide_act(mob/living/carbon/user)
|
||||
user.visible_message("<span class='suicide'>[user] begins licking \the [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
@@ -205,6 +210,7 @@ GLOBAL_LIST_INIT(plasma_recipes, list ( \
|
||||
point_value = 20
|
||||
merge_type = /obj/item/stack/sheet/mineral/gold
|
||||
material_type = /datum/material/gold
|
||||
walltype = /turf/closed/wall/mineral/gold
|
||||
|
||||
GLOBAL_LIST_INIT(gold_recipes, list ( \
|
||||
new/datum/stack_recipe("golden door", /obj/structure/mineral_door/gold, 10, one_per_turf = 1, on_floor = 1), \
|
||||
@@ -236,6 +242,7 @@ GLOBAL_LIST_INIT(gold_recipes, list ( \
|
||||
merge_type = /obj/item/stack/sheet/mineral/silver
|
||||
material_type = /datum/material/silver
|
||||
tableVariant = /obj/structure/table/optable
|
||||
walltype = /turf/closed/wall/mineral/silver
|
||||
|
||||
GLOBAL_LIST_INIT(silver_recipes, list ( \
|
||||
new/datum/stack_recipe("silver door", /obj/structure/mineral_door/silver, 10, one_per_turf = 1, on_floor = 1), \
|
||||
@@ -266,6 +273,7 @@ GLOBAL_LIST_INIT(silver_recipes, list ( \
|
||||
point_value = 50
|
||||
merge_type = /obj/item/stack/sheet/mineral/bananium
|
||||
material_type = /datum/material/bananium
|
||||
walltype = /turf/closed/wall/mineral/bananium
|
||||
|
||||
GLOBAL_LIST_INIT(bananium_recipes, list ( \
|
||||
new/datum/stack_recipe("bananium tile", /obj/item/stack/tile/mineral/bananium, 1, 4, 20), \
|
||||
@@ -294,6 +302,7 @@ GLOBAL_LIST_INIT(bananium_recipes, list ( \
|
||||
point_value = 20
|
||||
merge_type = /obj/item/stack/sheet/mineral/titanium
|
||||
material_type = /datum/material/titanium
|
||||
walltype = /turf/closed/wall/mineral/titanium
|
||||
|
||||
GLOBAL_LIST_INIT(titanium_recipes, list ( \
|
||||
new/datum/stack_recipe("titanium tile", /obj/item/stack/tile/mineral/titanium, 1, 4, 20), \
|
||||
@@ -324,6 +333,7 @@ GLOBAL_LIST_INIT(titanium_recipes, list ( \
|
||||
custom_materials = list(/datum/material/titanium=MINERAL_MATERIAL_AMOUNT, /datum/material/plasma=MINERAL_MATERIAL_AMOUNT)
|
||||
point_value = 45
|
||||
merge_type = /obj/item/stack/sheet/mineral/plastitanium
|
||||
walltype = /turf/closed/wall/mineral/plastitanium
|
||||
|
||||
/obj/item/stack/sheet/mineral/plastitanium/fifty
|
||||
amount = 50
|
||||
@@ -390,11 +400,14 @@ GLOBAL_LIST_INIT(adamantine_recipes, list(
|
||||
name = "snow"
|
||||
icon_state = "sheet-snow"
|
||||
item_state = "sheet-snow"
|
||||
custom_materials = list(/datum/material/snow = MINERAL_MATERIAL_AMOUNT)
|
||||
singular_name = "snow block"
|
||||
force = 1
|
||||
throwforce = 2
|
||||
grind_results = list(/datum/reagent/consumable/ice = 20)
|
||||
merge_type = /obj/item/stack/sheet/mineral/snow
|
||||
walltype = /turf/closed/wall/mineral/snow
|
||||
material_type = /datum/material/snow
|
||||
|
||||
GLOBAL_LIST_INIT(snow_recipes, list ( \
|
||||
new/datum/stack_recipe("Snow Wall", /turf/closed/wall/mineral/snow, 5, one_per_turf = 1, on_floor = 1), \
|
||||
@@ -417,6 +430,7 @@ GLOBAL_LIST_INIT(snow_recipes, list ( \
|
||||
singular_name = "alien alloy sheet"
|
||||
sheettype = "abductor"
|
||||
merge_type = /obj/item/stack/sheet/mineral/abductor
|
||||
walltype = /turf/closed/wall/mineral/abductor
|
||||
|
||||
GLOBAL_LIST_INIT(abductor_recipes, list ( \
|
||||
new/datum/stack_recipe("alien bed", /obj/structure/bed/abductor, 2, one_per_turf = 1, on_floor = 1), \
|
||||
|
||||
@@ -205,7 +205,7 @@ GLOBAL_LIST_INIT(plasteel_recipes, list ( \
|
||||
desc = "This sheet is an alloy of iron and plasma."
|
||||
icon_state = "sheet-plasteel"
|
||||
item_state = "sheet-metal"
|
||||
custom_materials = list(/datum/material/iron=2000, /datum/material/plasma=2000)
|
||||
custom_materials = list(/datum/material/iron=MINERAL_MATERIAL_AMOUNT, /datum/material/plasma=MINERAL_MATERIAL_AMOUNT)
|
||||
throwforce = 10
|
||||
flags_1 = CONDUCT_1
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 80)
|
||||
@@ -289,6 +289,7 @@ GLOBAL_LIST_INIT(wood_recipes, list ( \
|
||||
novariants = TRUE
|
||||
material_type = /datum/material/wood
|
||||
grind_results = list(/datum/reagent/carbon = 20)
|
||||
walltype = /turf/closed/wall/mineral/wood
|
||||
|
||||
/obj/item/stack/sheet/mineral/wood/attackby(obj/item/W, mob/user, params) // NOTE: sheet_types.dm is where the WOOD stack lives. Maybe move this over there.
|
||||
// Taken from /obj/item/stack/rods/attackby in [rods.dm]
|
||||
@@ -344,11 +345,13 @@ GLOBAL_LIST_INIT(bamboo_recipes, list ( \
|
||||
icon_state = "sheet-bamboo"
|
||||
item_state = "sheet-bamboo"
|
||||
icon = 'icons/obj/stack_objects.dmi'
|
||||
custom_materials = list(/datum/material/bamboo = MINERAL_MATERIAL_AMOUNT)
|
||||
throwforce = 15
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 0)
|
||||
resistance_flags = FLAMMABLE
|
||||
merge_type = /obj/item/stack/sheet/mineral/bamboo
|
||||
grind_results = list(/datum/reagent/carbon = 5)
|
||||
material_type = /datum/material/bamboo
|
||||
|
||||
/obj/item/stack/sheet/mineral/bamboo/get_main_recipes()
|
||||
. = ..()
|
||||
@@ -513,12 +516,14 @@ GLOBAL_LIST_INIT(cardboard_recipes, list ( \
|
||||
desc = "Large sheets of card, like boxes folded flat."
|
||||
singular_name = "cardboard sheet"
|
||||
icon_state = "sheet-card"
|
||||
custom_materials = list(/datum/material/cardboard = MINERAL_MATERIAL_AMOUNT)
|
||||
item_state = "sheet-card"
|
||||
resistance_flags = FLAMMABLE
|
||||
force = 0
|
||||
throwforce = 0
|
||||
merge_type = /obj/item/stack/sheet/cardboard
|
||||
novariants = TRUE
|
||||
material_type = /datum/material/cardboard
|
||||
|
||||
/obj/item/stack/sheet/cardboard/get_main_recipes()
|
||||
. = ..()
|
||||
@@ -558,10 +563,12 @@ GLOBAL_LIST_INIT(runed_metal_recipes, list ( \
|
||||
icon_state = "sheet-runed"
|
||||
item_state = "sheet-runed"
|
||||
icon = 'icons/obj/stack_objects.dmi'
|
||||
custom_materials = list(/datum/material/runedmetal = MINERAL_MATERIAL_AMOUNT)
|
||||
sheettype = "runed"
|
||||
merge_type = /obj/item/stack/sheet/runed_metal
|
||||
novariants = TRUE
|
||||
grind_results = list(/datum/reagent/iron = 5, /datum/reagent/blood = 15)
|
||||
material_type = /datum/material/runedmetal
|
||||
|
||||
/obj/item/stack/sheet/runed_metal/ratvar_act()
|
||||
new /obj/item/stack/tile/brass(loc, amount)
|
||||
@@ -680,6 +687,7 @@ GLOBAL_LIST_INIT(bronze_recipes, list ( \
|
||||
icon_state = "sheet-brass"
|
||||
item_state = "sheet-brass"
|
||||
icon = 'icons/obj/stack_objects.dmi'
|
||||
custom_materials = list(/datum/material/bronze = MINERAL_MATERIAL_AMOUNT)
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
throwforce = 10
|
||||
max_amount = 50
|
||||
@@ -690,6 +698,7 @@ GLOBAL_LIST_INIT(bronze_recipes, list ( \
|
||||
grind_results = list(/datum/reagent/iron = 5, /datum/reagent/copper = 3) //we have no "tin" reagent so this is the closest thing
|
||||
merge_type = /obj/item/stack/tile/bronze
|
||||
tableVariant = /obj/structure/table/bronze
|
||||
material_type = /datum/material/bronze
|
||||
|
||||
/obj/item/stack/tile/bronze/attack_self(mob/living/user)
|
||||
if(is_servant_of_ratvar(user)) //still lets them build with it, just gives a message
|
||||
@@ -737,6 +746,7 @@ GLOBAL_LIST_INIT(bone_recipes, list(
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "bone"
|
||||
item_state = "sheet-bone"
|
||||
custom_materials = list(/datum/material/bone = MINERAL_MATERIAL_AMOUNT)
|
||||
singular_name = "bone"
|
||||
desc = "Someone's been drinking their milk."
|
||||
force = 7
|
||||
@@ -747,6 +757,7 @@ GLOBAL_LIST_INIT(bone_recipes, list(
|
||||
throw_range = 3
|
||||
grind_results = list(/datum/reagent/carbon = 10)
|
||||
merge_type = /obj/item/stack/sheet/bone
|
||||
material_type = /datum/material/bone
|
||||
|
||||
/obj/item/stack/sheet/bone/get_main_recipes()
|
||||
. = ..()
|
||||
@@ -774,6 +785,7 @@ GLOBAL_LIST_INIT(plastic_recipes, list(
|
||||
custom_materials = list(/datum/material/plastic=MINERAL_MATERIAL_AMOUNT)
|
||||
throwforce = 7
|
||||
grind_results = list(/datum/reagent/glitter/white = 60)
|
||||
material_type = /datum/material/plastic
|
||||
merge_type = /obj/item/stack/sheet/plastic
|
||||
|
||||
/obj/item/stack/sheet/plastic/fifty
|
||||
@@ -799,9 +811,11 @@ new /datum/stack_recipe("paper frame door", /obj/structure/mineral_door/paperfra
|
||||
singular_name = "paper frame"
|
||||
icon_state = "sheet-paper"
|
||||
item_state = "sheet-paper"
|
||||
custom_materials = list(/datum/material/paper = MINERAL_MATERIAL_AMOUNT)
|
||||
merge_type = /obj/item/stack/sheet/paperframes
|
||||
resistance_flags = FLAMMABLE
|
||||
merge_type = /obj/item/stack/sheet/paperframes
|
||||
material_type = /datum/material/paper
|
||||
|
||||
/obj/item/stack/sheet/paperframes/get_main_recipes()
|
||||
. = ..()
|
||||
@@ -842,3 +856,55 @@ new /datum/stack_recipe("paper frame door", /obj/structure/mineral_door/paperfra
|
||||
merge_type = /obj/item/stack/sheet/cotton/durathread
|
||||
pull_effort = 70
|
||||
loom_result = /obj/item/stack/sheet/durathread
|
||||
|
||||
/obj/item/stack/sheet/meat
|
||||
name = "meat sheets"
|
||||
desc = "Something's bloody meat compressed into a nice solid sheet"
|
||||
singular_name = "meat sheet"
|
||||
icon_state = "sheet-meat"
|
||||
material_flags = MATERIAL_COLOR
|
||||
custom_materials = list(/datum/material/meat = MINERAL_MATERIAL_AMOUNT)
|
||||
merge_type = /obj/item/stack/sheet/meat
|
||||
material_type = /datum/material/meat
|
||||
material_modifier = 1 //None of that wussy stuff
|
||||
|
||||
/obj/item/stack/sheet/meat/fifty
|
||||
amount = 50
|
||||
/obj/item/stack/sheet/meat/twenty
|
||||
amount = 20
|
||||
/obj/item/stack/sheet/meat/five
|
||||
amount = 5
|
||||
|
||||
/obj/item/stack/sheet/pizza
|
||||
name = "pepperoni sheetzzas"
|
||||
desc = "It's a delicious pepperoni sheetzza!"
|
||||
singular_name = "pepperoni sheetzza"
|
||||
icon_state = "sheet-pizza"
|
||||
custom_materials = list(/datum/material/pizza = MINERAL_MATERIAL_AMOUNT)
|
||||
merge_type = /obj/item/stack/sheet/pizza
|
||||
material_type = /datum/material/pizza
|
||||
material_modifier = 1
|
||||
|
||||
/obj/item/stack/sheet/pizza/fifty
|
||||
amount = 50
|
||||
/obj/item/stack/sheet/pizza/twenty
|
||||
amount = 20
|
||||
/obj/item/stack/sheet/pizza/five
|
||||
amount = 5
|
||||
|
||||
/obj/item/stack/sheet/sandblock
|
||||
name = "blocks of sand"
|
||||
desc = "You're too old to be playing with sandcastles. Now you build... sandstations."
|
||||
singular_name = "block of sand"
|
||||
icon_state = "sheet-sandstone"
|
||||
custom_materials = list(/datum/material/sand = MINERAL_MATERIAL_AMOUNT)
|
||||
merge_type = /obj/item/stack/sheet/sandblock
|
||||
material_type = /datum/material/sand
|
||||
material_modifier = 1
|
||||
|
||||
/obj/item/stack/sheet/sandblock/fifty
|
||||
amount = 50
|
||||
/obj/item/stack/sheet/sandblock/twenty
|
||||
amount = 20
|
||||
/obj/item/stack/sheet/sandblock/five
|
||||
amount = 5
|
||||
|
||||
@@ -10,10 +10,14 @@
|
||||
throw_range = 3
|
||||
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "smashed")
|
||||
novariants = FALSE
|
||||
mats_per_stack = MINERAL_MATERIAL_AMOUNT
|
||||
var/sheettype = null //this is used for girders in the creation of walls/false walls
|
||||
var/point_value = 0 //turn-in value for the gulag stacker - loosely relative to its rarity
|
||||
var/shard_type // the shard debris typepath left over by solar panels and windows etc.
|
||||
///this is used for girders in the creation of walls/false walls
|
||||
var/sheettype = null
|
||||
///turn-in value for the gulag stacker - loosely relative to its rarity
|
||||
var/point_value = 0
|
||||
/// the shard debris typepath left over by solar panels and windows etc.
|
||||
var/shard_type
|
||||
///What type of wall does this sheet spawn
|
||||
var/walltype
|
||||
|
||||
/obj/item/stack/sheet/Initialize(mapload, new_amount, merge)
|
||||
. = ..()
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
var/merge_type = null // This path and its children should merge with this stack, defaults to src.type
|
||||
var/full_w_class = WEIGHT_CLASS_NORMAL //The weight class the stack should have at amount > 2/3rds max_amount
|
||||
var/novariants = TRUE //Determines whether the item should update it's sprites based on amount.
|
||||
var/mats_per_stack = 0
|
||||
var/list/mats_per_unit //list that tells you how much is in a single unit.
|
||||
///Datum material type that this stack is made of
|
||||
var/material_type
|
||||
//NOTE: When adding grind_results, the amounts should be for an INDIVIDUAL ITEM - these amounts will be multiplied by the stack size in on_grind()
|
||||
@@ -47,8 +47,11 @@
|
||||
if(!merge_type)
|
||||
merge_type = type
|
||||
if(custom_materials && custom_materials.len)
|
||||
mats_per_unit = list()
|
||||
var/in_process_mat_list = custom_materials.Copy()
|
||||
for(var/i in custom_materials)
|
||||
custom_materials[SSmaterials.GetMaterialRef(i)] = mats_per_stack * amount
|
||||
mats_per_unit[SSmaterials.GetMaterialRef(i)] = in_process_mat_list[i]
|
||||
custom_materials[i] *= amount
|
||||
. = ..()
|
||||
if(merge)
|
||||
for(var/obj/item/stack/S in loc)
|
||||
@@ -60,7 +63,7 @@
|
||||
var/datum/material/M = SSmaterials.GetMaterialRef(material_type) //First/main material
|
||||
for(var/i in M.categories)
|
||||
switch(i)
|
||||
if(MAT_CATEGORY_RIGID)
|
||||
if(MAT_CATEGORY_BASE_RECIPES)
|
||||
var/list/temp = SSmaterials.rigid_stack_recipes.Copy()
|
||||
recipes += temp
|
||||
update_weight()
|
||||
@@ -315,10 +318,13 @@
|
||||
if (amount < used)
|
||||
return FALSE
|
||||
amount -= used
|
||||
if(check)
|
||||
zero_amount()
|
||||
for(var/i in custom_materials)
|
||||
custom_materials[i] = amount * mats_per_stack
|
||||
if(check && zero_amount())
|
||||
return TRUE
|
||||
if(length(mats_per_unit))
|
||||
var/temp_materials = custom_materials.Copy()
|
||||
for(var/i in mats_per_unit)
|
||||
temp_materials[i] = mats_per_unit[i] * src.amount
|
||||
set_custom_materials(temp_materials)
|
||||
update_icon()
|
||||
update_weight()
|
||||
return TRUE
|
||||
@@ -350,10 +356,11 @@
|
||||
source.add_charge(amount * cost)
|
||||
else
|
||||
src.amount += amount
|
||||
if(custom_materials && custom_materials.len)
|
||||
for(var/i in custom_materials)
|
||||
custom_materials[SSmaterials.GetMaterialRef(i)] = MINERAL_MATERIAL_AMOUNT * src.amount
|
||||
set_custom_materials() //Refresh
|
||||
if(length(mats_per_unit))
|
||||
var/temp_materials = custom_materials.Copy()
|
||||
for(var/i in mats_per_unit)
|
||||
temp_materials[i] = mats_per_unit[i] * src.amount
|
||||
set_custom_materials(temp_materials)
|
||||
update_icon()
|
||||
update_weight()
|
||||
|
||||
|
||||
@@ -9,16 +9,35 @@
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
max_amount = 60
|
||||
mats_per_stack = 500
|
||||
var/turf_type = null
|
||||
var/mineralType = null
|
||||
novariants = TRUE
|
||||
var/human_maxHealth = 100
|
||||
|
||||
/obj/item/stack/tile/Initialize(mapload, amount)
|
||||
. = ..()
|
||||
pixel_x = rand(-3, 3)
|
||||
pixel_y = rand(-3, 3) //randomize a little
|
||||
|
||||
/obj/item/stack/tile/examine(mob/user)
|
||||
. = ..()
|
||||
if(throwforce && !is_cyborg) //do not want to divide by zero or show the message to borgs who can't throw
|
||||
var/verb
|
||||
switch(CEILING(human_maxHealth / throwforce, 1)) //throws to crit a human
|
||||
if(1 to 3)
|
||||
verb = "superb"
|
||||
if(4 to 6)
|
||||
verb = "great"
|
||||
if(7 to 9)
|
||||
verb = "good"
|
||||
if(10 to 12)
|
||||
verb = "fairly decent"
|
||||
if(13 to 15)
|
||||
verb = "mediocre"
|
||||
if(!verb)
|
||||
return
|
||||
. += "<span class='notice'>Those could work as a [verb] throwing weapon.</span>"
|
||||
|
||||
/obj/item/stack/tile/attackby(obj/item/W, mob/user, params)
|
||||
|
||||
if (istype(W, /obj/item/weldingtool))
|
||||
@@ -470,7 +489,7 @@
|
||||
/obj/item/stack/tile/plasteel
|
||||
name = "floor tile"
|
||||
singular_name = "floor tile"
|
||||
desc = "Those could work as a pretty decent throwing weapon."
|
||||
desc = "The ground you walk on."
|
||||
icon_state = "tile"
|
||||
force = 6
|
||||
custom_materials = list(/datum/material/iron=500)
|
||||
@@ -482,7 +501,15 @@
|
||||
resistance_flags = FIRE_PROOF
|
||||
|
||||
/obj/item/stack/tile/plasteel/cyborg
|
||||
desc = "The ground you walk on." //Not the usual floor tile desc as that refers to throwing, Cyborgs can't do that - RR
|
||||
custom_materials = null // All other Borg versions of items have no Metal or Glass - RR
|
||||
is_cyborg = 1
|
||||
cost = 125
|
||||
|
||||
/obj/item/stack/tile/material
|
||||
name = "floor tile"
|
||||
singular_name = "floor tile"
|
||||
desc = "The ground you walk on."
|
||||
throwforce = 10
|
||||
icon_state = "material_tile"
|
||||
turf_type = /turf/open/floor/material
|
||||
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user