Merge remote-tracking branch 'upstream/master' into robotic-limbs-PT2

This commit is contained in:
DeltaFire
2020-10-11 15:39:41 +02:00
187 changed files with 2386 additions and 950 deletions
+3 -5
View File
@@ -315,7 +315,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
return
if(loc == user && current_equipped_slot && current_equipped_slot != SLOT_HANDS)
if(current_equipped_slot in user.check_obscured_slots())
to_chat(src, "<span class='warning'>You are unable to unequip that while wearing other garments over it!</span>")
to_chat(user, "<span class='warning'>You are unable to unequip that while wearing other garments over it!</span>")
return FALSE
if(resistance_flags & ON_FIRE)
@@ -383,7 +383,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
return
if(loc == user && current_equipped_slot && current_equipped_slot != SLOT_HANDS)
if(current_equipped_slot in user.check_obscured_slots())
to_chat(src, "<span class='warning'>You are unable to unequip that while wearing other garments over it!</span>")
to_chat(user, "<span class='warning'>You are unable to unequip that while wearing other garments over it!</span>")
return FALSE
@@ -565,7 +565,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
to_chat(user, "<span class='danger'>You cannot locate any organic eyes on this brain!</span>")
return
if(IS_STAMCRIT(user))//CIT CHANGE - makes eyestabbing impossible if you're in stamina softcrit
if(IS_STAMCRIT(user) || !user.UseStaminaBuffer(STAMINA_COST_ITEM_EYESTAB, warn = TRUE))//CIT CHANGE - makes eyestabbing impossible if you're in stamina softcrit
to_chat(user, "<span class='danger'>You're too exhausted for that.</span>")//CIT CHANGE - ditto
return //CIT CHANGE - ditto
@@ -575,8 +575,6 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
user.do_attack_animation(M)
user.adjustStaminaLossBuffered(10)//CIT CHANGE - makes eyestabbing cost stamina
if(M != user)
M.visible_message("<span class='danger'>[user] has stabbed [M] in the eye with [src]!</span>", \
"<span class='userdanger'>[user] stabs you in the eye with [src]!</span>")
+6 -6
View File
@@ -4,7 +4,7 @@
/obj/item/defibrillator
name = "defibrillator"
desc = "A device that delivers powerful shocks to detachable paddles that resuscitate incapacitated patients."
icon = 'icons/obj/items_and_weapons.dmi'
icon = 'icons/obj/defibrillators.dmi'
icon_state = "defibunit"
item_state = "defibunit"
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
@@ -23,8 +23,8 @@
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?
var/healdisk = FALSE // Will we shock people dragging the body?
var/pullshocksafely = FALSE //Dose the unit have the healdisk upgrade?
var/healdisk = FALSE // Does the unit have the healdisk upgrade?
var/pullshocksafely = FALSE // Will we shock people dragging the body?
var/primetime = 0 // is the defib faster
var/timedeath = 10
var/disarm_shock_time = 10
@@ -261,7 +261,7 @@
/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'
icon = 'icons/obj/defibrillators.dmi'
icon_state = "defibpaddles0"
item_state = "defibpaddles0"
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
@@ -682,7 +682,7 @@
/obj/item/shockpaddles/cyborg
name = "cyborg defibrillator paddles"
icon = 'icons/obj/items_and_weapons.dmi'
icon = 'icons/obj/defibrillators.dmi'
icon_state = "defibpaddles0"
item_state = "defibpaddles0"
req_defib = FALSE
@@ -703,7 +703,7 @@
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
icon = 'icons/obj/items_and_weapons.dmi'
icon = 'icons/obj/defibrillators.dmi'
icon_state = "defibpaddles0"
item_state = "defibpaddles0"
req_defib = FALSE
+2 -5
View File
@@ -21,12 +21,11 @@
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/stam_cost = 3.5
var/wielded = FALSE // track wielded status on item
// haha security desword time /s
@@ -171,7 +170,7 @@
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
if(IS_STAMCRIT(user) || !user.UseStaminaBuffer(stam_cost))//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))
@@ -186,13 +185,11 @@
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)
+82 -12
View File
@@ -190,12 +190,53 @@
/obj/item/melee/transforming/energy/sword/saber
possible_colors = list("red" = LIGHT_COLOR_RED, "blue" = LIGHT_COLOR_LIGHT_CYAN, "green" = LIGHT_COLOR_GREEN, "purple" = LIGHT_COLOR_LAVENDER)
unique_reskin = list("Sword" = "sword0", "saber" = "esaber0")
var/hacked = FALSE
var/saber = FALSE
/obj/item/melee/transforming/energy/sword/saber/set_sword_color()
if(LAZYLEN(possible_colors))
/obj/item/melee/transforming/energy/sword/saber/transform_weapon(mob/living/user, supress_message_text)
. = ..()
if(.)
if(active)
if(sword_color)
if(saber)
icon_state = "esaber[sword_color]"
else
icon_state = "sword[sword_color]"
else
if(saber)
icon_state = "esaber0"
else
icon_state = "sword0"
/obj/item/melee/transforming/energy/sword/saber/reskin_obj(mob/M)
. = ..()
if(icon_state == "esaber0")
saber = TRUE
if(active)
if(saber)
icon_state = "esaber[sword_color]"
else
icon_state = "sword[sword_color]"
/obj/item/melee/transforming/energy/sword/saber/set_sword_color(var/color_forced)
if(color_forced) // wow i really do not like this at fucking all holy SHIT
if(color_forced == "red")
sword_color = "red"
light_color = LIGHT_COLOR_RED
else if(color_forced == "blue")
sword_color = "blue"
light_color = LIGHT_COLOR_LIGHT_CYAN
else if(color_forced == "green")
sword_color = "green"
light_color = LIGHT_COLOR_GREEN
else if(color_forced == "purple")
sword_color = "purple"
light_color = LIGHT_COLOR_LAVENDER
else if(LAZYLEN(possible_colors))
sword_color = pick(possible_colors)
light_color = possible_colors[sword_color]
return
/obj/item/melee/transforming/energy/sword/saber/process()
. = ..()
@@ -204,30 +245,59 @@
light_color = possible_colors[set_color]
update_light()
/obj/item/melee/transforming/energy/sword/saber/red
possible_colors = list("red" = LIGHT_COLOR_RED)
/obj/item/melee/transforming/energy/sword/saber/red/Initialize(mapload)
. = ..()
set_sword_color("red")
/obj/item/melee/transforming/energy/sword/saber/blue
possible_colors = list("blue" = LIGHT_COLOR_LIGHT_CYAN)
/obj/item/melee/transforming/energy/sword/saber/blue/Initialize(mapload)
. = ..()
set_sword_color("blue")
/obj/item/melee/transforming/energy/sword/saber/green
possible_colors = list("green" = LIGHT_COLOR_GREEN)
/obj/item/melee/transforming/energy/sword/saber/green/Initialize(mapload)
. = ..()
set_sword_color("green")
/obj/item/melee/transforming/energy/sword/saber/purple
possible_colors = list("purple" = LIGHT_COLOR_LAVENDER)
/obj/item/melee/transforming/energy/sword/saber/purple/Initialize(mapload)
. = ..()
set_sword_color("purple")
/obj/item/melee/transforming/energy/sword/saber/proc/select_sword_color(mob/user) /// this is for the radial
if(!istype(user) || user.incapacitated())
return
var/static/list/options = list(
"red" = image(icon = 'icons/obj/items_and_weapons.dmi', icon_state = "swordred-blade"),
"blue" = image(icon = 'icons/obj/items_and_weapons.dmi', icon_state = "swordblue-blade"),
"green" = image(icon = 'icons/obj/items_and_weapons.dmi', icon_state = "swordgreen-blade"),
"purple" = image(icon = 'icons/obj/items_and_weapons.dmi', icon_state = "swordpurple-blade")
)
var/choice = show_radial_menu(user, src, options, custom_check = FALSE, radius = 36, require_near = TRUE)
if(src && choice && !user.incapacitated() && in_range(user,src))
set_sword_color(choice)
to_chat(user, "<span class='notice'>[src] is now [choice].</span>")
/obj/item/melee/transforming/energy/sword/saber/attackby(obj/item/W, mob/living/user, params)
if(istype(W, /obj/item/multitool))
if(user.a_intent == INTENT_DISARM)
if(!active)
to_chat(user, "<span class='warning'>COLOR_SET</span>")
hacked = FALSE
select_sword_color(user)
return
else
to_chat(user, "<span class='notice'>Turn it off first - getting that close to an active sword is not a great idea.</span>")
return
if(!hacked)
hacked = TRUE
sword_color = "rainbow"
to_chat(user, "<span class='warning'>RNBW_ENGAGE</span>")
if(active)
icon_state = "swordrainbow"
user.update_inv_hands()
else
to_chat(user, "<span class='warning'>It's already fabulous!</span>")
to_chat(user, "<span class='warning'>It's already fabulous!</span> <span class='notice'>If you wanted to reset the color, though, try a disarming intent while it's off.</span>")
else
return ..()
+2 -1
View File
@@ -352,6 +352,8 @@
return
else
if(cooldown_check < world.time)
if(!UseStaminaBufferStandard(user, STAM_COST_BATON_MOB_MULT, warn = TRUE))
return DISCARD_LAST_ACTION
if(target.mob_run_block(src, 0, "[user]'s [name]", ATTACK_TYPE_MELEE, 0, user, null, null) & BLOCK_SUCCESS)
playsound(target, 'sound/weapons/genhit.ogg', 50, 1)
return
@@ -373,7 +375,6 @@
else
target.LAssailant = WEAKREF(user)
cooldown_check = world.time + cooldown
user.adjustStaminaLossBuffered(getweight(user, STAM_COST_BATON_MOB_MULT))
else
var/wait_desc = get_wait_description()
if(wait_desc)
+2 -4
View File
@@ -56,22 +56,20 @@
return
if(T)
if(!L.UseStaminaBuffer(stamusage, warn = TRUE))
return
user.visible_message("[user] cleans \the [T] with [src].", "<span class='notice'>You clean \the [T] with [src].</span>")
clean(T)
user.DelayNextAction(CLICK_CD_MELEE)
user.do_attack_animation(T, used_item = src)
if(istype(L))
L.adjustStaminaLossBuffered(stamusage)
playsound(T, "slosh", 50, 1)
/obj/effect/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/mop) || istype(I, /obj/item/soap))
return
else
return ..()
/obj/item/mop/proc/janicart_insert(mob/user, obj/structure/janitorialcart/J)
if(insertable)
J.put_in_cart(src, user)
+4 -5
View File
@@ -6,7 +6,7 @@
lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi'
flags_1 = CONDUCT_1
item_flags = NEEDS_PERMIT | NO_COMBAT_MODE_FORCE_MODIFIER //To avoid ambushing and oneshotting healthy crewmembers on force setting 3.
item_flags = NEEDS_PERMIT
attack_verb = list("whacked", "fisted", "power-punched")
force = 20
throwforce = 10
@@ -76,6 +76,9 @@
if(!tank)
to_chat(user, "<span class='warning'>\The [src] can't operate without a source of gas!</span>")
return FALSE
var/weight = getweight(user, STAM_COST_ATTACK_MOB_MULT)
if(!user.UseStaminaBuffer(weight, warn = TRUE))
return FALSE
var/datum/gas_mixture/gasused = tank.air_contents.remove(gasperfist * fisto_setting)
var/turf/T = get_turf(src)
if(!T)
@@ -108,8 +111,4 @@
target.throw_at(throw_target, 5 * fisto_setting, 0.5 + (fisto_setting / 2))
log_combat(user, target, "power fisted", src)
var/weight = getweight(user, STAM_COST_ATTACK_MOB_MULT)
if(weight)
user.adjustStaminaLossBuffered(weight)
return TRUE
+4 -2
View File
@@ -136,15 +136,17 @@
if(!(shield_flags & SHIELD_BASH_GROUND_SLAM))
to_chat(user, "<span class='warning'>You can't ground slam with [src]!</span>")
return FALSE
if(!user.UseStaminaBuffer(shieldbash_stamcost, warn = TRUE))
return FALSE
bash_target(user, target, NONE, harmful)
user.do_attack_animation(target, used_item = src)
playsound(src, harmful? "swing_hit" : 'sound/weapons/thudswoosh.ogg', 75, 1)
last_shieldbash = world.time
user.adjustStaminaLossBuffered(shieldbash_stamcost)
return TRUE
// Directional sweep!
last_shieldbash = world.time
user.adjustStaminaLossBuffered(shieldbash_stamcost)
if(!user.UseStaminaBuffer(shieldbash_stamcost, warn = TRUE))
return FALSE
// Since we are in combat mode, we can probably safely use the user's dir instead of getting their mouse pointing cardinal dir.
var/bashdir = user.dir
do_shieldbash_effect(user, bashdir, harmful)
+1 -1
View File
@@ -234,7 +234,7 @@
STR.max_w_class = WEIGHT_CLASS_NORMAL
STR.max_combined_w_class = 100
STR.max_items = 100
STR.can_hold = typecacheof(list(/obj/item/reagent_containers/food/snacks/grown, /obj/item/seeds, /obj/item/grown, /obj/item/reagent_containers/honeycomb))
STR.can_hold = typecacheof(list(/obj/item/reagent_containers/food/snacks/grown, /obj/item/seeds, /obj/item/grown, /obj/item/reagent_containers/honeycomb, /obj/item/disk/plantgene))
////////
+25
View File
@@ -830,3 +830,28 @@
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
STR.max_items = 2
STR.max_w_class = WEIGHT_CLASS_BULKY + WEIGHT_CLASS_NORMAL //katana and waki.
/obj/item/storage/belt/plant
name = "botanical belt"
desc = "A belt used to hold most hydroponics supplies. Suprisingly, not green."
icon_state = "plantbelt"
item_state = "plantbelt"
content_overlays = TRUE
/obj/item/storage/belt/plant/ComponentInitialize()
. = ..()
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
STR.max_items = 6
STR.max_w_class = WEIGHT_CLASS_NORMAL
STR.can_hold = typecacheof(list(
/obj/item/reagent_containers/spray/plantbgone,
/obj/item/plant_analyzer,
/obj/item/seeds,
/obj/item/reagent_containers/glass/bottle,
/obj/item/reagent_containers/glass/beaker,
/obj/item/cultivator,
/obj/item/reagent_containers/spray/pestspray,
/obj/item/hatchet,
/obj/item/shovel/spade,
/obj/item/gun/energy/floragun
))
+4 -2
View File
@@ -166,13 +166,12 @@
if(turned_on)
if(baton_stun(M, user, disarming))
user.do_attack_animation(M)
user.adjustStaminaLossBuffered(getweight(user, STAM_COST_BATON_MOB_MULT))
else if(user.a_intent != INTENT_HARM) //they'll try to bash in the last proc.
M.visible_message("<span class='warning'>[user] has prodded [M] with [src]. Luckily it was off.</span>", \
"<span class='warning'>[user] has prodded you with [src]. Luckily it was off</span>")
return disarming || (user.a_intent != INTENT_HARM)
/obj/item/melee/baton/proc/baton_stun(mob/living/L, mob/user, disarming = FALSE)
/obj/item/melee/baton/proc/baton_stun(mob/living/L, mob/living/user, disarming = FALSE)
var/list/return_list = list()
if(L.mob_run_block(src, 0, "[user]'s [name]", ATTACK_TYPE_MELEE, 0, user, null, return_list) & BLOCK_SUCCESS) //No message; check_shields() handles that
playsound(L, 'sound/weapons/genhit.ogg', 50, 1)
@@ -194,6 +193,9 @@
return FALSE
stunpwr *= round(stuncharge/hitcost, 0.1)
if(!user.UseStaminaBuffer(getweight(user, STAM_COST_BATON_MOB_MULT), warn = TRUE))
return FALSE
if(!disarming)
if(knockdown)
L.DefaultCombatKnockdown(50, override_stamdmg = 0) //knockdown
+3
View File
@@ -55,6 +55,8 @@
RegisterSignal(user, COMSIG_MOVABLE_MOVED, .proc/move_react)
if(full_speed)
user.add_movespeed_modifier(/datum/movespeed_modifier/jetpack/fullspeed)
else
user.add_movespeed_modifier(/datum/movespeed_modifier/jetpack)
/obj/item/tank/jetpack/proc/turn_off(mob/user)
on = FALSE
@@ -63,6 +65,7 @@
ion_trail.stop()
UnregisterSignal(user, COMSIG_MOVABLE_MOVED)
user.remove_movespeed_modifier(/datum/movespeed_modifier/jetpack/fullspeed)
user.remove_movespeed_modifier(/datum/movespeed_modifier/jetpack)
/obj/item/tank/jetpack/proc/move_react(mob/user)
allow_thrust(0.01, user)
+1 -1
View File
@@ -161,4 +161,4 @@
item_state = "screwdriver_nuke"
usesound = 'sound/items/pshoom.ogg'
toolspeed = 0.2
random_color = FALSE
random_color = FALSE
+29 -11
View File
@@ -304,18 +304,36 @@
/obj/proc/reskin_obj(mob/M)
if(!LAZYLEN(unique_reskin))
return
var/list/skins = list()
for(var/S in unique_reskin)
skins[S] = image(icon = icon, icon_state = unique_reskin[S])
var/choice = show_radial_menu(M, src, skins, custom_check = CALLBACK(src, .proc/check_skinnable, M), radius = 40, require_near = TRUE)
if(!choice)
return FALSE
icon_state = unique_reskin[choice]
current_skin = choice
return
/obj/proc/check_skinnable(/mob/M)
if(current_skin || !always_reskinnable)
var/list/items = list()
for(var/reskin_option in unique_reskin)
var/image/item_image = image(icon = src.icon, icon_state = unique_reskin[reskin_option])
items += list("[reskin_option]" = item_image)
sortList(items)
var/pick = show_radial_menu(M, src, items, custom_check = CALLBACK(src, .proc/check_reskin_menu, M), radius = 38, require_near = TRUE)
if(!pick)
return
if(!unique_reskin[pick])
return
current_skin = pick
icon_state = unique_reskin[pick]
to_chat(M, "[src] is now skinned as '[pick].'")
/**
* Checks if we are allowed to interact with a radial menu for reskins
*
* Arguments:
* * user The mob interacting with the menu
*/
/obj/proc/check_reskin_menu(mob/user)
if(QDELETED(src))
return FALSE
if(current_skin)
return FALSE
if(!istype(user))
return FALSE
if(user.incapacitated())
return FALSE
return TRUE
+2 -2
View File
@@ -73,7 +73,7 @@
if(user.grab_state < GRAB_AGGRESSIVE)
to_chat(user, "<span class='warning'>You need a better grip to do that!</span>")
return
if(user.grab_state >= GRAB_NECK)
if(user.grab_state >= GRAB_NECK || HAS_TRAIT(user, TRAIT_MAULER))
tablelimbsmash(user, pushed_mob)
else
tablepush(user, pushed_mob)
@@ -147,7 +147,7 @@
pushed_mob.Knockdown(30)
var/obj/item/bodypart/banged_limb = pushed_mob.get_bodypart(user.zone_selected) || pushed_mob.get_bodypart(BODY_ZONE_HEAD)
var/extra_wound = 0
if(HAS_TRAIT(user, TRAIT_HULK))
if(HAS_TRAIT(user, TRAIT_HULK) || HAS_TRAIT(user, TRAIT_MAULER))
extra_wound = 20
banged_limb.receive_damage(30, wound_bonus = extra_wound)
pushed_mob.apply_damage(60, STAMINA)