Merge remote-tracking branch 'citadel/master' into unarmed_parry

This commit is contained in:
silicons
2020-07-07 21:07:58 -07:00
99 changed files with 2195 additions and 1778 deletions
+11 -51
View File
@@ -1,4 +1,4 @@
k// PARTS //
// PARTS //
/obj/item/weaponcrafting
icon = 'icons/obj/improvised.dmi'
@@ -8,61 +8,33 @@ k// PARTS //
custom_materials = list(/datum/material/wood = MINERAL_MATERIAL_AMOUNT * 6)
icon_state = "riflestock"
/obj/item/weaponcrafting/durathread_string
name = "durathread string"
desc = "A long piece of durathread with some resemblance to cable coil."
/obj/item/weaponcrafting/string
name = "wound thread"
desc = "A long piece of thread with some resemblance to cable coil."
icon_state = "durastring"
////////////////////////////////
// KAT IMPROVISED WEAPON PARTS//
// IMPROVISED WEAPON PARTS//
////////////////////////////////
/obj/item/weaponcrafting/improvised_parts
name = "Eerie bunch of coloured dots."
desc = "You feel the urge to report to Central that the parent type of guncrafting, which should never appear in this reality, has appeared. Whatever that means."
name = "Debug Improvised Gun Part"
desc = "A badly coded gun part. You should report coders if you see this."
icon = 'icons/obj/guns/gun_parts.dmi'
icon_state = "palette"
// BARRELS
/obj/item/weaponcrafting/improvised_parts/barrel_rifle
name = "rifle barrel"
desc = "A pipe with a diameter just the right size to fire 7.62 rounds out of."
icon_state = "barrel_rifle"
/obj/item/weaponcrafting/improvised_parts/barrel_shotgun
name = "shotgun barrel"
desc = "A twenty bore shotgun barrel."
icon_state = "barrel_shotgun"
/obj/item/weaponcrafting/improvised_parts/barrel_pistol
name = "pistol barrel"
desc = "A pipe with a small diameter and some holes finely cut into it. It fits .32 ACP bullets. Probably."
icon_state = "barrel_pistol"
w_class = WEIGHT_CLASS_SMALL
// RECEIVERS
/obj/item/weaponcrafting/improvised_parts/rifle_receiver
name = "bolt action receiver"
desc = "A crudely constructed receiver to create an improvised bolt-action breechloaded rifle. It's generic enough to modify to create other rifles, potentially."
name = "rifle receiver"
desc = "A crudely constructed receiver to create an improvised bolt-action breechloaded rifle." // removed some text implying that the item had more uses than it does
icon_state = "receiver_rifle"
w_class = WEIGHT_CLASS_SMALL
/obj/item/weaponcrafting/improvised_parts/pistol_receiver
name = "pistol receiver"
desc = "A receiver to connect house and connects all the parts to make an improvised pistol."
icon_state = "receiver_pistol"
w_class = WEIGHT_CLASS_SMALL
/obj/item/weaponcrafting/improvised_parts/laser_receiver
name = "energy emitter assembly"
desc = "A mixture of components haphazardly wired together to form an energy emitter."
icon_state = "laser_assembly"
/obj/item/weaponcrafting/improvised_parts/shotgun_receiver
name = "break-action assembly"
desc = "An improvised receiver to create a break-action breechloaded shotgun. Parts of this are still useful if you want to make another type of shotgun, however."
name = "shotgun reciever"
desc = "An improvised receiver to create a break-action breechloaded shotgun." // removed some text implying that the item had more uses than it does
icon_state = "receiver_shotgun"
w_class = WEIGHT_CLASS_SMALL
@@ -78,15 +50,3 @@ k// PARTS //
name = "wooden firearm body"
desc = "A crudely fashioned wooden body to help keep higher calibre improvised weapons from blowing themselves apart."
icon_state = "wooden_body"
/obj/item/weaponcrafting/improvised_parts/wooden_grip
name = "wooden pistol grip"
desc = "A nice wooden grip hollowed out for pistol magazines."
icon_state = "wooden_pistolgrip"
w_class = WEIGHT_CLASS_SMALL
/obj/item/weaponcrafting/improvised_parts/makeshift_lens
name = "makeshift focusing lens"
desc = "A properly made lens made with actual glassworking tools would perform much better, but this will have to do."
icon_state = "focusing_lens"
w_class = WEIGHT_CLASS_TINY
@@ -103,7 +103,7 @@
/datum/crafting_recipe/bone_bow
name = "Bone Bow"
result = /obj/item/gun/ballistic/bow/ashen
time = 200
time = 120 // 80+120 = 200
always_availible = FALSE
reqs = list(/obj/item/stack/sheet/bone = 8,
/obj/item/stack/sheet/sinew = 4)
@@ -112,7 +112,7 @@
/datum/crafting_recipe/bow_tablet
name = "Sandstone Bow Making Manual"
result = /obj/item/book/granter/crafting_recipe/bone_bow
time = 600 //Scribing
time = 200 //Scribing // don't care
always_availible = FALSE
reqs = list(/obj/item/stack/rods = 1,
/obj/item/stack/sheet/mineral/sandstone = 4)
@@ -192,8 +192,8 @@
result = /obj/item/gun/ballistic/bow/pipe
reqs = list(/obj/item/pipe = 5,
/obj/item/stack/sheet/plastic = 15,
/obj/item/weaponcrafting/durathread_string = 5)
time = 450
/obj/item/weaponcrafting/string = 5)
time = 150
category = CAT_WEAPONRY
subcategory = CAT_WEAPON
@@ -248,10 +248,10 @@
category = CAT_WEAPONRY
subcategory = CAT_WEAPON
/datum/crafting_recipe/ishotgun
/datum/crafting_recipe/ishotgun // smaller and more versatile gun requires some better materials
name = "Improvised Shotgun"
result = /obj/item/gun/ballistic/revolver/doublebarrel/improvised
reqs = list(/obj/item/weaponcrafting/improvised_parts/barrel_shotgun = 1,
reqs = list(/obj/item/pipe = 2, // putting a large amount of meaningless timegates by forcing people to turn base resources into upgraded resources kinda sucks
/obj/item/weaponcrafting/improvised_parts/shotgun_receiver = 1,
/obj/item/weaponcrafting/improvised_parts/trigger_assembly = 1,
/obj/item/weaponcrafting/improvised_parts/wooden_body = 1,
@@ -262,10 +262,10 @@
category = CAT_WEAPONRY
subcategory = CAT_WEAPON
/datum/crafting_recipe/irifle
/datum/crafting_recipe/irifle // larger and less versatile gun, but a bit easier to make
name = "Improvised Rifle (7.62mm)"
result = /obj/item/gun/ballistic/shotgun/boltaction/improvised
reqs = list(/obj/item/weaponcrafting/improvised_parts/barrel_rifle = 1,
reqs = list(/obj/item/pipe = 2, // above
/obj/item/weaponcrafting/improvised_parts/rifle_receiver = 1,
/obj/item/weaponcrafting/improvised_parts/trigger_assembly = 1,
/obj/item/weaponcrafting/improvised_parts/wooden_body = 1,
@@ -276,49 +276,6 @@
category = CAT_WEAPONRY
subcategory = CAT_WEAPON
/datum/crafting_recipe/ipistol
name = "Improvised Pistol (.32)"
result = /obj/item/gun/ballistic/automatic/pistol/improvised/nomag
reqs = list(/obj/item/weaponcrafting/improvised_parts/barrel_pistol = 1,
/obj/item/weaponcrafting/improvised_parts/pistol_receiver = 1,
/obj/item/weaponcrafting/improvised_parts/trigger_assembly = 1,
/obj/item/weaponcrafting/improvised_parts/wooden_grip = 1,
/obj/item/stack/sheet/plastic = 15,
/obj/item/stack/sheet/plasteel = 1)
tools = list(TOOL_SCREWDRIVER, TOOL_WELDER, TOOL_WIRECUTTER)
time = 100
category = CAT_WEAPONRY
subcategory = CAT_WEAPON
/datum/crafting_recipe/ilaser
name = "Improvised Energy Gun"
result = /obj/item/gun/energy/e_gun/old/improvised
reqs = list(/obj/item/weaponcrafting/improvised_parts/laser_receiver = 1,
/obj/item/weaponcrafting/improvised_parts/trigger_assembly = 1,
/obj/item/weaponcrafting/improvised_parts/makeshift_lens = 1,
/obj/item/stock_parts/cell = 1,
/obj/item/stack/sheet/metal = 10,
/obj/item/stack/sheet/plasteel = 5,
/obj/item/stack/cable_coil = 10)
tools = list(TOOL_SCREWDRIVER)
time = 100
category = CAT_WEAPONRY
subcategory = CAT_WEAPON
/datum/crafting_recipe/ilaser/upgraded
name = "Improvised Energy Gun Upgrade"
result = /obj/item/gun/energy/e_gun/old/improvised/upgraded
reqs = list(/obj/item/gun/energy/e_gun/old/improvised = 1,
/obj/item/glasswork/glass_base/lens = 1,
/obj/item/stock_parts/capacitor/quadratic = 2,
/obj/item/stock_parts/micro_laser/ultra = 1,
/obj/item/stock_parts/cell/bluespace = 1,
/obj/item/stack/cable_coil = 5)
tools = list(TOOL_SCREWDRIVER, TOOL_MULTITOOL)
time = 100
category = CAT_WEAPONRY
subcategory = CAT_WEAPON
//////////////////
///AMMO CRAFTING//
//////////////////
@@ -326,9 +283,9 @@
/datum/crafting_recipe/arrow
name = "Arrow"
result = /obj/item/ammo_casing/caseless/arrow/wood
time = 30
time = 5 // these only do 15 damage
reqs = list(/obj/item/stack/sheet/mineral/wood = 1,
/obj/item/stack/sheet/durathread = 1,
/obj/item/stack/sheet/cloth = 1,
/obj/item/stack/rods = 1) // 1 metal sheet = 2 rods = 2 arrows
category = CAT_WEAPONRY
subcategory = CAT_AMMO
@@ -336,7 +293,7 @@
/datum/crafting_recipe/bone_arrow
name = "Bone Arrow"
result = /obj/item/ammo_casing/caseless/arrow/bone
time = 30
time = 5
always_availible = FALSE
reqs = list(/obj/item/stack/sheet/bone = 1,
/obj/item/stack/sheet/sinew = 1,
@@ -348,7 +305,7 @@
name = "Ashen Arrow"
result = /obj/item/ammo_casing/caseless/arrow/ash
tools = list(TOOL_WELDER)
time = 30
time = 10 // 1.5 seconds minimum per actually worthwhile arrow excluding interface lag
always_availible = FALSE
reqs = list(/obj/item/ammo_casing/caseless/arrow/wood = 1)
category = CAT_WEAPONRY
@@ -442,92 +399,28 @@
category = CAT_WEAPONRY
subcategory = CAT_AMMO
/datum/crafting_recipe/m32acp
name = ".32ACP Empty Magazine"
result = /obj/item/ammo_box/magazine/m32acp/empty
reqs = list(/obj/item/stack/sheet/metal = 3,
/obj/item/stack/sheet/plasteel = 1,
/obj/item/stack/packageWrap = 1)
tools = list(TOOL_WELDER,TOOL_SCREWDRIVER)
time = 5
category = CAT_WEAPONRY
subcategory = CAT_AMMO
////////////////////
// PARTS CRAFTING //
////////////////////
// BARRELS
/datum/crafting_recipe/rifle_barrel
name = "Improvised Rifle Barrel"
result = /obj/item/weaponcrafting/improvised_parts/barrel_rifle
reqs = list(/obj/item/pipe = 2)
tools = list(TOOL_WELDER,TOOL_SAW)
time = 150
category = CAT_WEAPONRY
subcategory = CAT_PARTS
/datum/crafting_recipe/shotgun_barrel
name = "Improvised Shotgun Barrel"
result = /obj/item/weaponcrafting/improvised_parts/barrel_shotgun
reqs = list(/obj/item/pipe = 2)
tools = list(TOOL_WELDER,TOOL_SAW)
time = 150
category = CAT_WEAPONRY
subcategory = CAT_PARTS
/datum/crafting_recipe/pistol_barrel
name = "Improvised Pistol Barrel"
result = /obj/item/weaponcrafting/improvised_parts/barrel_pistol
reqs = list(/obj/item/pipe = 1,
/obj/item/stack/sheet/plasteel = 1)
tools = list(TOOL_WELDER,TOOL_SAW)
time = 150
category = CAT_WEAPONRY
subcategory = CAT_PARTS
// RECEIVERS
/datum/crafting_recipe/rifle_receiver
name = "Improvised Rifle Receiver"
result = /obj/item/weaponcrafting/improvised_parts/rifle_receiver
reqs = list(/obj/item/stack/sheet/metal = 10,
/obj/item/stack/sheet/plasteel = 1)
reqs = list(/obj/item/stack/sheet/metal = 15) // you can carry multiple shotguns
tools = list(TOOL_SCREWDRIVER, TOOL_WELDER)
time = 50
time = 25
category = CAT_WEAPONRY
subcategory = CAT_PARTS
/datum/crafting_recipe/shotgun_receiver
name = "Improvised Shotgun Receiver"
result = /obj/item/weaponcrafting/improvised_parts/shotgun_receiver
reqs = list(/obj/item/stack/sheet/metal = 10,
/obj/item/stack/sheet/plasteel = 1)
tools = list(TOOL_SCREWDRIVER, TOOL_WELDER) // Dual wielding has been removed, plasteel is a soft timesink to obtain for most to make mass production harder.
time = 50
category = CAT_WEAPONRY
subcategory = CAT_PARTS
/datum/crafting_recipe/pistol_receiver
name = "Improvised Pistol Receiver"
result = /obj/item/weaponcrafting/improvised_parts/pistol_receiver
reqs = list(/obj/item/stack/sheet/metal = 5,
/obj/item/stack/sheet/plasteel = 1)
tools = list(TOOL_SCREWDRIVER, TOOL_WELDER, TOOL_SAW)
time = 50
category = CAT_WEAPONRY
subcategory = CAT_PARTS
/datum/crafting_recipe/laser_receiver
name = "Energy Weapon Assembly"
result = /obj/item/weaponcrafting/improvised_parts/laser_receiver
reqs = list(/obj/item/stack/sheet/metal = 10,
/obj/item/stock_parts/capacitor = 2,
/obj/item/stock_parts/micro_laser = 1,
/obj/item/assembly/prox_sensor = 1)
tools = list(TOOL_SCREWDRIVER, TOOL_MULTITOOL, TOOL_WELDER) // Prox sensor and multitool for the circuit board, welder for extremely ghetto soldering.
time = 150
reqs = list(/obj/item/stack/sheet/metal = 15,
/obj/item/stack/sheet/plasteel = 1) // requires access or hacking since shotgun is better
tools = list(TOOL_SCREWDRIVER, TOOL_WELDER)
time = 25
category = CAT_WEAPONRY
subcategory = CAT_PARTS
@@ -539,16 +432,6 @@
reqs = list(/obj/item/stack/sheet/metal = 3,
/obj/item/assembly/igniter = 1)
tools = list(TOOL_SCREWDRIVER, TOOL_WELDER)
time = 150
category = CAT_WEAPONRY
subcategory = CAT_PARTS
/datum/crafting_recipe/makeshift_lens
name = "Makeshift Lens"
result = /obj/item/weaponcrafting/improvised_parts/makeshift_lens
reqs = list(/obj/item/stack/sheet/metal = 1,
/obj/item/stack/sheet/glass = 2)
tools = list(TOOL_WELDER) // Glassmaking lets you make non-makeshift lenses.
time = 50
time = 25
category = CAT_WEAPONRY
subcategory = CAT_PARTS
+34
View File
@@ -39,6 +39,9 @@
/// A weak reference to another datum
var/datum/weakref/weak_reference
///Lazy associative list of currently active cooldowns.
var/list/cooldowns
#ifdef TESTING
var/running_find_references
var/last_find_references = 0
@@ -201,3 +204,34 @@
qdel(D)
else
return returned
/**
* Callback called by a timer to end an associative-list-indexed cooldown.
*
* Arguments:
* * source - datum storing the cooldown
* * index - string index storing the cooldown on the cooldowns associative list
*
* This sends a signal reporting the cooldown end.
*/
/proc/end_cooldown(datum/source, index)
if(QDELETED(source))
return
SEND_SIGNAL(source, COMSIG_CD_STOP(index))
TIMER_COOLDOWN_END(source, index)
/**
* Proc used by stoppable timers to end a cooldown before the time has ran out.
*
* Arguments:
* * source - datum storing the cooldown
* * index - string index storing the cooldown on the cooldowns associative list
*
* This sends a signal reporting the cooldown end, passing the time left as an argument.
*/
/proc/reset_cooldown(datum/source, index)
if(QDELETED(source))
return
SEND_SIGNAL(source, COMSIG_CD_RESET(index), S_TIMER_COOLDOWN_TIMELEFT(source, index))
TIMER_COOLDOWN_END(source, index)
+1 -1
View File
@@ -678,7 +678,7 @@
holder.update_transform()
var/danger = CONFIG_GET(number/threshold_body_size_slowdown)
if(features["body_size"] < danger)
var/slowdown = 1 + round(danger/features["body_size"], 0.1) * CONFIG_GET(number/body_size_slowdown_multiplier)
var/slowdown = (1 - round(features["body_size"] / danger, 0.1)) * CONFIG_GET(number/body_size_slowdown_multiplier)
holder.add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/small_stride, TRUE, slowdown)
else if(old_size < danger)
holder.remove_movespeed_modifier(/datum/movespeed_modifier/small_stride)
+2 -4
View File
@@ -58,12 +58,10 @@
var/datum/martial_art/boxing/style = new
/obj/item/clothing/gloves/boxing/equipped(mob/user, slot)
if(!ishuman(user))
return
if(slot == SLOT_GLOVES)
. = ..()
if(ishuman(user) && slot == SLOT_GLOVES)
var/mob/living/carbon/human/H = user
style.teach(H,TRUE)
return
/obj/item/clothing/gloves/boxing/dropped(mob/user)
. = ..()
+2 -3
View File
@@ -196,9 +196,8 @@
var/datum/martial_art/krav_maga/style = new
/obj/item/clothing/gloves/krav_maga/equipped(mob/user, slot)
if(!ishuman(user))
return
if(slot == SLOT_GLOVES)
. = ..()
if(ishuman(user) && slot == SLOT_GLOVES)
var/mob/living/carbon/human/H = user
style.teach(H,1)
+3 -5
View File
@@ -377,7 +377,7 @@
var/turf/ST = null
var/falling = 0
var/damage = damage_roll(A,D)
for (var/obj/O in oview(1, A))
if (O.density == 1)
if (O == A)
@@ -472,12 +472,10 @@
var/datum/martial_art/wrestling/style = new
/obj/item/storage/belt/champion/wrestling/equipped(mob/user, slot)
if(!ishuman(user))
return
if(slot == SLOT_BELT)
. = ..()
if(ishuman(user) && slot == SLOT_BELT)
var/mob/living/carbon/human/H = user
style.teach(H,1)
return
/obj/item/storage/belt/champion/wrestling/dropped(mob/user)
. = ..()
+1 -1
View File
@@ -40,7 +40,7 @@
. = list()
.["playername"] = owner.name
.["see_skill_mods"] = see_skill_mods
.["admin"] = check_rights(R_DEBUG)
.["admin"] = check_rights(R_DEBUG, FALSE)
/datum/skill_holder/ui_act(action, params)
. = ..()
+8
View File
@@ -33,6 +33,10 @@ GLOBAL_LIST_INIT_TYPED(skill_datums, /datum/skill, init_skill_datums())
var/base_multiplier = 1
/// Value added to the base multiplier depending on overall competency compared to maximum value/level.
var/competency_multiplier = 1
/// Experience gain multiplier gained from using items.
var/item_skill_gain_multi = 1
/// Skill gain quantisation
var/skill_gain_quantisation = 0.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
@@ -108,6 +112,10 @@ GLOBAL_LIST_INIT_TYPED(skill_datums, /datum/skill, init_skill_datums())
/// Min value of this skill
var/min_value = 0
/datum/skill/numerical/New()
..()
skill_gain_quantisation = item_skill_gain_multi = item_skill_gain_multi * (max_value - min_value) * STD_NUM_SKILL_ITEM_GAIN_MULTI
/datum/skill/numerical/sanitize_value(new_value)
return clamp(new_value, min_value, max_value)
+4 -6
View File
@@ -91,10 +91,10 @@
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)
skill_holder.need_static_data_update = TRUE
return TRUE
return FALSE
@@ -120,11 +120,9 @@
CRASH("You cannot auto increment a non numerical(experience skill!")
var/current = get_skill_value(skill, FALSE)
var/affinity = get_skill_affinity(skill)
var/target_value = current + (value * affinity)
if(maximum)
target_value = min(target_value, maximum)
if(target_value == maximum) //no more experience to gain, early return.
return
var/target_value = round(current + (value * affinity), S.skill_gain_quantisation)
if(maximum && target_value >= maximum) //no more experience to gain, early return.
return
boost_skill_value_to(skill, target_value, silent, current)
/**
+19
View File
@@ -74,6 +74,25 @@
for(var/client/C in GLOB.clients)
C.AnnouncePR(final_composed)
/datum/world_topic/auto_bunker_passthrough
keyword = "auto_bunker_override"
require_comms_key = TRUE
/datum/world_topic/auto_bunker_passthrough/Run(list/input)
if(!CONFIG_GET(flag/allow_cross_server_bunker_override))
return "Function Disabled"
var/ckeytobypass = input["ckey"]
var/is_new_ckey = !(ckey(ckeytobypass) in GLOB.bunker_passthrough)
var/sender = input["source"] || "UNKNOWN"
GLOB.bunker_passthrough |= ckey(ckeytobypass)
GLOB.bunker_passthrough[ckey(ckeytobypass)] = world.realtime
SSpersistence.SavePanicBunker() //we can do this every time, it's okay
if(!is_new_ckey)
log_admin("AUTO BUNKER: [ckeytobypass] given access (incoming comms from [sender]).")
message_admins("AUTO BUNKER: [ckeytobypass] given access (incoming comms from [sender]).")
send2irc("Panic Bunker", "AUTO BUNKER: [ckeytobypass] given access (incoming comms from [sender]).")
return "Success"
/datum/world_topic/ahelp_relay
keyword = "Ahelp"
require_comms_key = TRUE