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

This commit is contained in:
silicons
2021-01-08 00:33:57 -08:00
231 changed files with 8727 additions and 6166 deletions
@@ -72,6 +72,52 @@
category = CAT_WEAPONRY
subcategory = CAT_MELEE
/datum/crafting_recipe/bokken
name = "Training Bokken"
result = /obj/item/melee/bokken
tools = list(TOOL_SCREWDRIVER)
reqs = list(/obj/item/bokken_blade = 1,
/obj/item/bokken_hilt = 1,
/obj/item/stack/sheet/cloth = 2,
/obj/item/stack/sheet/leather = 1)
time = 60
category = CAT_WEAPONRY
subcategory = CAT_MELEE
/datum/crafting_recipe/bokken_steelwood
name = "Training Bokken"
result = /obj/item/melee/bokken/steelwood
tools = list(TOOL_SCREWDRIVER)
reqs = list(/obj/item/bokken_steelblade = 1,
/obj/item/bokken_hilt = 1,
/obj/item/stack/sheet/cloth = 2,
/obj/item/stack/sheet/leather = 1)
time = 60
category = CAT_WEAPONRY
subcategory = CAT_MELEE
/datum/crafting_recipe/wakibokken
name = "Training Wakizashi Bokken"
result = /obj/item/melee/bokken/waki
tools = list(TOOL_SCREWDRIVER)
reqs = list(/obj/item/wakibokken_blade = 1,
/obj/item/bokken_hilt = 1,
/obj/item/stack/sheet/cloth = 1)
time = 40
category = CAT_WEAPONRY
subcategory = CAT_MELEE
/datum/crafting_recipe/wakibokken_steelwood
name = "Training Wakizashi Steelwood Bokken"
result = /obj/item/melee/bokken/waki/steelwood
tools = list(TOOL_SCREWDRIVER)
reqs = list(/obj/item/wakibokken_steelblade = 1,
/obj/item/bokken_hilt = 1,
/obj/item/stack/sheet/cloth = 1)
time = 40
category = CAT_WEAPONRY
subcategory = CAT_MELEE
/datum/crafting_recipe/bola
name = "Bola"
result = /obj/item/restraints/legcuffs/bola
@@ -434,3 +480,51 @@
time = 20
category = CAT_WEAPONRY
subcategory = CAT_PARTS
// BOKKEN CRAFTING
/datum/crafting_recipe/bokken_blade
name = "Training Bokken Blade"
result = /obj/item/bokken_blade
tools = list(/obj/item/hatchet)
reqs = list(/obj/item/stack/sheet/mineral/wood = 5)
time = 20
category = CAT_WEAPONRY
subcategory = CAT_PARTS
/datum/crafting_recipe/wakibokken_blade
name = "Training Wakizashi Bokken Blade"
result = /obj/item/wakibokken_blade
tools = list(/obj/item/hatchet)
reqs = list(/obj/item/stack/sheet/mineral/wood = 2)
time = 20
category = CAT_WEAPONRY
subcategory = CAT_PARTS
/datum/crafting_recipe/bokken_steelblade
name = "Training Ironwood Bokken Blade"
result = /obj/item/bokken_steelblade
tools = list(/obj/item/hatchet, TOOL_WELDER)
reqs = list(/obj/item/grown/log/steel = 2)
time = 20
category = CAT_WEAPONRY
subcategory = CAT_PARTS
/datum/crafting_recipe/wakibokken_blade
name = "Training Wakizashi Ironwood Bokken Blade"
result = /obj/item/wakibokken_steelblade
tools = list(/obj/item/hatchet, TOOL_WELDER)
reqs = list(/obj/item/grown/log/steel = 1)
time = 20
category = CAT_WEAPONRY
subcategory = CAT_PARTS
/datum/crafting_recipe/bokken_hilt
name = "Training Bokken hilt"
result = /obj/item/bokken_hilt
tools = list(/obj/item/hatchet)
reqs = list(/obj/item/stack/sheet/mineral/wood = 5,
/obj/item/stack/sheet/cloth = 2)
time = 20
category = CAT_WEAPONRY
subcategory = CAT_PARTS
+2
View File
@@ -54,6 +54,7 @@
move_react()
/datum/component/orbiter/proc/begin_orbit(atom/movable/orbiter, radius, clockwise, rotation_speed, rotation_segments, pre_rotation)
SEND_SIGNAL(parent, COMSIG_ATOM_ORBIT_BEGIN, orbiter, radius, clockwise, rotation_speed, rotation_segments, pre_rotation)
if(orbiter.orbiting)
if(orbiter.orbiting == src)
orbiter.orbiting.end_orbit(orbiter, TRUE)
@@ -87,6 +88,7 @@
/datum/component/orbiter/proc/end_orbit(atom/movable/orbiter, refreshing=FALSE)
if(!orbiters[orbiter])
return
SEND_SIGNAL(parent, COMSIG_ATOM_ORBIT_END, orbiter, refreshing)
UnregisterSignal(orbiter, COMSIG_MOVABLE_MOVED)
orbiter.SpinAnimation(0, 0)
if(istype(orbiters[orbiter],/matrix)) //This is ugly.
+2 -2
View File
@@ -133,7 +133,7 @@
//KEYS
/datum/component/riding/proc/keycheck(mob/user)
return !keytype || user.is_holding_item_of_type(keytype)
return !keytype || user?.is_holding_item_of_type(keytype)
//BUCKLE HOOKS
/datum/component/riding/proc/restore_position(mob/living/buckled_mob)
@@ -153,7 +153,7 @@
/datum/component/riding/proc/handle_ride(mob/user, direction)
var/atom/movable/AM = parent
if(user.incapacitated())
if(user && user.incapacitated())
Unbuckle(user)
return
if(world.time < last_vehicle_move + ((last_move_diagonal? 2 : 1) * vehicle_move_delay))
+104
View File
@@ -0,0 +1,104 @@
/**
* Observers voting on things through orbiting
*/
/datum/component/twitch_plays
/// Observers
var/list/mob/players = list()
/datum/component/twitch_plays/Initialize(...)
. = ..()
if(!isatom(parent))
return COMPONENT_INCOMPATIBLE
RegisterSignal(parent, COMSIG_ATOM_ORBIT_BEGIN, .proc/on_start_orbit)
RegisterSignal(parent, COMSIG_ATOM_ORBIT_END, .proc/on_end_orbit)
/datum/component/twitch_plays/Destroy(force, silent)
for(var/i in players)
DetachPlayer(i)
return ..()
/datum/component/twitch_plays/proc/on_start_orbit(datum/source, atom/movable/orbiter)
if(!isobserver(orbiter))
return
AttachPlayer(orbiter)
/datum/component/twitch_plays/proc/on_end_orbit(datum/source, atom/movable/orbiter)
if(!(orbiter in players))
return
DetachPlayer(orbiter)
/datum/component/twitch_plays/proc/AttachPlayer(mob/dead/observer)
players |= observer
RegisterSignal(observer, COMSIG_PARENT_QDELETING, .proc/on_end_orbit)
/datum/component/twitch_plays/proc/DetachPlayer(mob/dead/observer)
players -= observer
UnregisterSignal(observer, COMSIG_PARENT_QDELETING)
/// Simple movement one
/datum/component/twitch_plays/simple_movement
/// Movement votes by observer
var/list/votes = list()
/// Allow diagonals
var/allow_diagonal = FALSE
/datum/component/twitch_plays/simple_movement/Initialize(...)
. = ..()
if(. & COMPONENT_INCOMPATIBLE)
return
RegisterSignal(parent, COMSIG_TWITCH_PLAYS_MOVEMENT_DATA, .proc/fetch_data)
/datum/component/twitch_plays/simple_movement/AttachPlayer(mob/dead/observer)
. = ..()
RegisterSignal(observer, COMSIG_MOVABLE_PRE_MOVE, .proc/pre_move)
/datum/component/twitch_plays/simple_movement/DetachPlayer(mob/dead/observer)
. = ..()
UnregisterSignal(observer, COMSIG_MOVABLE_PRE_MOVE)
/datum/component/twitch_plays/simple_movement/proc/pre_move(datum/source, turf/newLoc)
if(get_dist(newLoc, parent) > 1) // they're trying to escape orbit
return
. = COMPONENT_MOVABLE_BLOCK_PRE_MOVE
var/dir = get_dir(parent, newLoc)
if(!dir)
return
if(allow_diagonal || !((dir - 1) & dir))
votes[source] = dir
else // pick one or the other
votes[source] = prob(50)? (dir & ~(dir - 1)) : (dir & (dir - 1))
/datum/component/twitch_plays/simple_movement/proc/fetch_data(datum/source, wipe_votes)
if(!votes.len)
return
var/list/total = list(TEXT_NORTH, TEXT_SOUTH, TEXT_EAST, TEXT_WEST)
for(var/i in votes)
total[num2text(votes[i])] += 1
. = text2num(pickweight(total, 0))
if(wipe_votes)
votes.len = 0
/datum/component/twitch_plays/simple_movement/auto
var/move_delay = 2
var/last_move = 0
/datum/component/twitch_plays/simple_movement/auto/Initialize(...)
if(!ismovable(parent))
return COMPONENT_INCOMPATIBLE
. = ..()
if(. & COMPONENT_INCOMPATIBLE)
return
START_PROCESSING(SSfastprocess, src)
/datum/component/twitch_plays/simple_movement/auto/Destroy(force, silent)
STOP_PROCESSING(SSfastprocess, src)
return ..()
/datum/component/twitch_plays/simple_movement/auto/process()
var/dir = fetch_data(null, TRUE)
if(!dir)
return
if(world.time < (last_move + move_delay))
return
last_move = world.time
step(parent, dir)