Merge branch 'master' into gc_debugging

This commit is contained in:
kevinz000
2020-03-06 10:14:19 -07:00
committed by GitHub
62 changed files with 1390 additions and 120 deletions
+129 -23
View File
@@ -181,13 +181,60 @@
slot_flags = ITEM_SLOT_BELT
force = 12 //9 hit crit
w_class = WEIGHT_CLASS_NORMAL
var/cooldown = 13
var/on = TRUE
var/last_hit = 0
var/stun_stam_cost_coeff = 1.25
var/hardstun_ds = 1
var/hardstun_ds = TRUE
var/softstun_ds = 0
var/stam_dmg = 30
var/cooldown_check = 0 // Used internally, you don't want to modify
var/cooldown = 13 // Default wait time until can stun again.
var/stun_time_silicon = 60 // How long it stuns silicons for - 6 seconds.
var/affect_silicon = FALSE // Does it stun silicons.
var/on_sound // "On" sound, played when switching between able to stun or not.
var/on_stun_sound = "sound/effects/woodhit.ogg" // Default path to sound for when we stun.
var/stun_animation = TRUE // Do we animate the "hit" when stunning.
var/on = TRUE // Are we on or off
var/on_icon_state // What is our sprite when turned on
var/off_icon_state // What is our sprite when turned off
var/on_item_state // What is our in-hand sprite when turned on
var/force_on // Damage when on - not stunning
var/force_off // Damage when off - not stunning
var/weight_class_on // What is the new size class when turned on
/obj/item/melee/classic_baton/Initialize()
. = ..()
// Description for trying to stun when still on cooldown.
/obj/item/melee/classic_baton/proc/get_wait_description()
return
// Description for when turning their baton "on"
/obj/item/melee/classic_baton/proc/get_on_description()
. = list()
.["local_on"] = "<span class ='warning'>You extend the baton.</span>"
.["local_off"] = "<span class ='notice'>You collapse the baton.</span>"
return .
// Default message for stunning mob.
/obj/item/melee/classic_baton/proc/get_stun_description(mob/living/target, mob/living/user)
. = list()
.["visible"] = "<span class ='danger'>[user] has knocked down [target] with [src]!</span>"
.["local"] = "<span class ='danger'>[user] has knocked down [target] with [src]!</span>"
return .
// Default message for stunning a silicon.
/obj/item/melee/classic_baton/proc/get_silicon_stun_description(mob/living/target, mob/living/user)
. = list()
.["visible"] = "<span class='danger'>[user] pulses [target]'s sensors with the baton!</span>"
.["local"] = "<span class='danger'>You pulse [target]'s sensors with the baton!</span>"
return .
// Are we applying any special effects when we stun to carbon
/obj/item/melee/classic_baton/proc/additional_effects_carbon(mob/living/target, mob/living/user)
return
// Are we applying any special effects when we stun to silicon
/obj/item/melee/classic_baton/proc/additional_effects_silicon(mob/living/target, mob/living/user)
return
/obj/item/melee/classic_baton/attack(mob/living/target, mob/living/user)
if(!on)
@@ -208,15 +255,28 @@
user.take_bodypart_damage(2*force)
return
if(iscyborg(target))
..()
if(user.a_intent != INTENT_HARM) // We don't stun if we're on harm.
if(affect_silicon)
var/list/desc = get_silicon_stun_description(target, user)
target.flash_act(affect_silicon = TRUE)
target.Stun(stun_time_silicon)
additional_effects_silicon(target, user)
user.visible_message(desc["visible"], desc["local"])
playsound(get_turf(src), on_stun_sound, 100, TRUE, -1)
if(stun_animation)
user.do_attack_animation(target)
else
..()
else
..()
return
if(!isliving(target))
return
if (user.a_intent == INTENT_HARM)
if(user.a_intent == INTENT_HARM)
if(!..() || !iscyborg(target))
return
else
if(last_hit < world.time)
if(cooldown_check < world.time)
if(target.check_shields(src, 0, "[user]'s [name]", MELEE_ATTACK))
playsound(target, 'sound/weapons/genhit.ogg', 50, 1)
return
@@ -224,18 +284,25 @@
var/mob/living/carbon/human/H = target
if(check_martial_counter(H, user))
return
playsound(get_turf(src), 'sound/effects/woodhit.ogg', 75, 1, -1)
var/list/desc = get_stun_description(target, user)
if(stun_animation)
user.do_attack_animation(target)
playsound(get_turf(src), on_stun_sound, 75, 1, -1)
target.DefaultCombatKnockdown(softstun_ds, TRUE, FALSE, hardstun_ds, stam_dmg)
additional_effects_carbon(target, user)
log_combat(user, target, "stunned", src)
src.add_fingerprint(user)
target.visible_message("<span class ='danger'>[user] has knocked down [target] with [src]!</span>", \
"<span class ='userdanger'>[user] has knocked down [target] with [src]!</span>")
add_fingerprint(user)
target.visible_message(desc["visible"], desc["local"])
if(!iscarbon(user))
target.LAssailant = null
else
target.LAssailant = WEAKREF(user)
last_hit = world.time + cooldown
cooldown_check = world.time + cooldown
user.adjustStaminaLossBuffered(getweight())//CIT CHANGE - makes swinging batons cost stamina
else
var/wait_desc = get_wait_description()
if(wait_desc)
to_chat(user, wait_desc)
/obj/item/melee/classic_baton/telescopic
name = "telescopic baton"
@@ -250,6 +317,13 @@
item_flags = NONE
force = 0
on = FALSE
on_sound = 'sound/weapons/batonextend.ogg'
on_icon_state = "telebaton_1"
off_icon_state = "telebaton_0"
on_item_state = "nullrod"
force_on = 10
force_off = 0
weight_class_on = WEIGHT_CLASS_BULKY
total_mass = TOTAL_MASS_NORMAL_ITEM
/obj/item/melee/classic_baton/telescopic/suicide_act(mob/user)
@@ -260,7 +334,7 @@
if(!on)
src.attack_self(user)
else
playsound(loc, 'sound/weapons/batonextend.ogg', 50, 1)
playsound(loc, on_sound, 50, 1)
add_fingerprint(user)
sleep(3)
if (H && !QDELETED(H))
@@ -272,25 +346,57 @@
/obj/item/melee/classic_baton/telescopic/attack_self(mob/user)
on = !on
var/list/desc = get_on_description()
if(on)
to_chat(user, "<span class ='warning'>You extend the baton.</span>")
icon_state = "telebaton_1"
item_state = "nullrod"
w_class = WEIGHT_CLASS_BULKY //doesnt fit in backpack when its on for balance
force = 10 //stunbaton damage
to_chat(user, desc["local_on"])
icon_state = on_icon_state
item_state = on_item_state
w_class = weight_class_on
force = force_on
attack_verb = list("smacked", "struck", "cracked", "beaten")
else
to_chat(user, "<span class ='notice'>You collapse the baton.</span>")
icon_state = "telebaton_0"
to_chat(user, desc["local_off"])
icon_state = off_icon_state
item_state = null //no sprite for concealment even when in hand
slot_flags = ITEM_SLOT_BELT
w_class = WEIGHT_CLASS_SMALL
force = 0 //not so robust now
force = force_off
attack_verb = list("hit", "poked")
playsound(src.loc, 'sound/weapons/batonextend.ogg', 50, 1)
playsound(src.loc, on_sound, 50, 1)
add_fingerprint(user)
/obj/item/melee/classic_baton/telescopic/contractor_baton
name = "contractor baton"
desc = "A compact, specialised baton assigned to Syndicate contractors. Applies light electrical shocks to targets."
icon = 'icons/obj/items_and_weapons.dmi'
icon_state = "contractor_baton_0"
lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi'
item_state = null
slot_flags = ITEM_SLOT_BELT
w_class = WEIGHT_CLASS_SMALL
item_flags = NONE
force = 5
cooldown = 20
stam_dmg = 45 //3 hit stamcrit
affect_silicon = TRUE
on_sound = 'sound/weapons/contractorbatonextend.ogg'
on_stun_sound = 'sound/effects/contractorbatonhit.ogg'
on_icon_state = "contractor_baton_1"
off_icon_state = "contractor_baton_0"
on_item_state = "contractor_baton"
force_on = 16
force_off = 5
weight_class_on = WEIGHT_CLASS_NORMAL
/obj/item/melee/classic_baton/telescopic/contractor_baton/get_wait_description()
return "<span class='danger'>The baton is still charging!</span>"
/obj/item/melee/classic_baton/telescopic/contractor_baton/additional_effects_carbon(mob/living/target, mob/living/user)
target.Jitter(20)
target.apply_effect(EFFECT_STUTTER, 20)
target.apply_status_effect(/datum/status_effect/electrostaff, 30) //knockdown, disarm, and slowdown, the unholy triumvirate of stam combat
/obj/item/melee/supermatter_sword
name = "supermatter sword"
desc = "In a station full of bad ideas, this might just be the worst."
+9 -2
View File
@@ -17,6 +17,7 @@
var/active = FALSE
var/atom/movable/target //The thing we're searching for
var/minimum_range = 0 //at what range the pinpointer declares you to be at your destination
var/ignore_suit_sensor_level = FALSE // Do we find people even if their suit sensors are turned off
var/alert = FALSE // TRUE to display things more seriously
/obj/item/pinpointer/Initialize()
@@ -77,6 +78,8 @@
name = "crew pinpointer"
desc = "A handheld tracking device that points to crew suit sensors."
icon_state = "pinpointer_crew"
var/has_owner = FALSE
var/pinpointer_owner = null
/obj/item/pinpointer/crew/proc/trackable(mob/living/carbon/human/H)
var/turf/here = get_turf(src)
@@ -84,7 +87,7 @@
var/obj/item/clothing/under/U = H.w_uniform
// Suit sensors must be on maximum.
if(!U.has_sensor || U.sensor_mode < SENSOR_COORDS)
if(!U.has_sensor || U.sensor_mode < SENSOR_COORDS && !ignore_suit_sensor_level)
return FALSE
var/turf/there = get_turf(H)
@@ -101,7 +104,11 @@
STOP_PROCESSING(SSfastprocess, src)
update_icon()
return
if (has_owner && !pinpointer_owner)
pinpointer_owner = user
if (pinpointer_owner && pinpointer_owner != user)
to_chat(user, "<span class='notice'>The pinpointer doesn't respond. It seems to only recognise its owner.</span>")
return
var/list/name_counts = list()
var/list/names = list()
@@ -229,6 +229,7 @@ GLOBAL_LIST_INIT(wood_recipes, list ( \
null, \
new/datum/stack_recipe("rifle stock", /obj/item/weaponcrafting/stock, 10, time = 40), \
new/datum/stack_recipe("rolling pin", /obj/item/kitchen/rollingpin, 2, time = 30), \
new/datum/stack_recipe("wooden bucket", /obj/item/reagent_containers/glass/bucket/wood, 2, time = 30), \
new/datum/stack_recipe("wooden buckler", /obj/item/shield/riot/buckler, 20, time = 40), \
new/datum/stack_recipe("baseball bat", /obj/item/melee/baseball_bat, 5, time = 15),\
null, \
@@ -397,3 +397,97 @@
/obj/item/storage/box/syndie_kit/revolver/PopulateContents()
new /obj/item/gun/ballistic/revolver(src)
new /obj/item/ammo_box/a357(src)
/obj/item/storage/box/syndie_kit/contract_kit
name = "contractor kit"
desc = "Supplied to Syndicate contractors in active mission areas."
/obj/item/storage/box/syndicate/contractor_loadout
name = "standard loadout"
desc = "Supplied to Syndicate contractors, providing their specialised space suit and chameleon uniform."
icon_state = "syndiebox"
illustration = "writing_syndie"
/obj/item/paper/contractor_guide
name = "Contractor Guide"
/obj/item/paper/contractor_guide/Initialize()
info = {"<p>Welcome agent, congratulations on your new position as contractor. On top of your already assigned objectives,
this kit will provide you contracts to take on for TC payments.</p>
<p>Provided within, we give your specialist contractor space suit. It's even more compact, being able to fit into a pocket, and faster than the
Syndicate space suit available to you on the uplink. We also provide your chameleon jumpsuit and mask, both of which can be changed
to any form you need for the moment. The cigarettes are a special blend - it'll heal your injuries slowly overtime.</p>
<p>The three additional items, apart from the tablet and loadout box, have been randomly selected from what we had available. We hope
they're useful to you for you mission.</p>
<p>The contractor hub, available at the top right of the uplink, will provide you unique items and abilities. These are bought using Contractor Rep,
with two Rep being provided each time you complete a contract.</p>
<h3>Using the tablet</h3>
<ol>
<li>Open the Syndicate Contract Uplink program.</li>
<li>Assign yourself.</li>
<li>Here, you can accept a contract, and redeem your TC payments from completed contracts.</li>
<li>The payment number shown in brackets is the bonus you'll recieve when bringing your target <b>alive</b>. You recieve the
other number regardless of if they were alive or dead.</li>
<li>Contracts are completed by bringing the target to designated dropoff, calling for extraction, and putting them
inside the pod.</li>
</ol>
<p>Be careful when accepting a contract. While you'll be able to see the location of the dropoff point, cancelling will make it
unavailable to take on again.</p>
<p>The tablet can also be recharged at any cell charger.</p>
<h3>Extracting</h3>
<ol>
<li>Make sure both yourself and your target are at the dropoff.</li>
<li>Call the extraction, and stand back from the drop point</li>
<li>If it fails, make sure your target is inside, and there's a free space for the pod to land.</li>
<li>Grab your target, and drag them into the pod.</li>
</ol>
<h3>Ransoms</h3>
<p>We need your target for our own reasons, but we ransom them back to your mission area once their use is served. They will return back
from where you sent them off from in several minutes time. You will be paid in TC for your services.</p>
<p>Good luck agent. You can burn this document with the supplied lighter.</p>"}
return ..()
/obj/item/storage/box/syndicate/contractor_loadout/PopulateContents()
new /obj/item/clothing/head/helmet/space/syndicate/contract(src)
new /obj/item/clothing/suit/space/syndicate/contract(src)
new /obj/item/clothing/under/chameleon(src)
new /obj/item/clothing/mask/chameleon(src)
new /obj/item/card/id/syndicate(src)
new /obj/item/storage/fancy/cigarettes/cigpack_syndicate(src)
new /obj/item/lighter(src)
/obj/item/storage/box/syndie_kit/contract_kit/PopulateContents()
new /obj/item/modular_computer/tablet/syndicate_contract_uplink/preset/uplink(src)
new /obj/item/storage/box/syndicate/contractor_loadout(src)
new /obj/item/melee/classic_baton/telescopic/contractor_baton(src)
var/list/item_list = list( // All 4 TC or less - some nukeops only items, but fit nicely to the theme.
/obj/item/storage/backpack/duffelbag/syndie/x4,
/obj/item/storage/box/syndie_kit/throwing_weapons,
/obj/item/gun/syringe/syndicate,
/obj/item/pen/edagger,
/obj/item/pen/sleepy,
/obj/item/flashlight/emp,
/obj/item/reagent_containers/syringe/mulligan,
/obj/item/clothing/shoes/chameleon/noslip,
/obj/item/storage/firstaid/tactical,
/obj/item/storage/backpack/duffelbag/syndie/surgery,
/obj/item/encryptionkey/syndicate,
/obj/item/clothing/glasses/thermal/syndi,
/obj/item/slimepotion/slime/sentience/nuclear,
/obj/item/storage/box/syndie_kit/imp_radio,
/obj/item/storage/box/syndie_kit/imp_uplink,
/obj/item/clothing/gloves/krav_maga/combatglovesplus,
/obj/item/gun/ballistic/automatic/c20r/toy/unrestricted/riot,
/obj/item/reagent_containers/syringe/stimulants,
/obj/item/storage/box/syndie_kit/imp_freedom,
/obj/item/toy/eightball/haunted
)
var/obj/item1 = pick_n_take(item_list)
var/obj/item2 = pick_n_take(item_list)
var/obj/item3 = pick_n_take(item_list)
new item1(src) // Create three, non repeat items from the list.
new item2(src)
new item3(src)
new /obj/item/paper/contractor_guide(src) //Paper guide
+72 -8
View File
@@ -444,9 +444,6 @@
C.adjustFireLoss(5)
to_chat(C, "<span class='danger'>The water is searing!</span>")
/obj/item/bikehorn/rubberducky
name = "rubber ducky"
desc = "Rubber ducky you're so fine, you make bathtime lots of fuuun. Rubber ducky I'm awfully fooooond of yooooouuuu~" //thanks doohl
@@ -454,8 +451,6 @@
icon_state = "rubberducky"
item_state = "rubberducky"
/obj/structure/sink
name = "sink"
icon = 'icons/obj/watercloset.dmi'
@@ -465,7 +460,6 @@
var/busy = FALSE //Something's being washed at the moment
var/dispensedreagent = /datum/reagent/water // for whenever plumbing happens
/obj/structure/sink/attack_hand(mob/living/user)
. = ..()
if(.)
@@ -578,12 +572,82 @@
new /obj/item/stack/sheet/metal (loc, 3)
qdel(src)
/obj/structure/sink/kitchen
name = "kitchen sink"
icon_state = "sink_alt"
/obj/structure/sink/well
name = "well"
desc = "A well, used to get water from an underground reservoir."
icon_state = "well"
//The making of the well
/obj/structure/well_foundation
name = "well foundation"
desc = "A small patch of dirt, ready for a well to be made over it. Just use a shovel!"
icon = 'icons/obj/watercloset.dmi'
icon_state = "well_1"
density = FALSE
anchored = TRUE
max_integrity = 1000
var/steps = 0
/obj/structure/well_foundation/attackby(obj/item/S, mob/user, params)
if(steps == 0 && S.tool_behaviour == TOOL_SHOVEL)
S.use_tool(src, user, 80, volume=100)
steps = 1
desc = "A deep patch of dirt, ready for a well to be made over it. Just add some sandstone!"
icon_state = "well_1"
return TRUE
if(steps == 1 && istype(S, /obj/item/stack/sheet/mineral/sandstone))
if(S.use(15))
steps = 2
desc = "A patch of dirt and bricks. Just add some more sandstone!"
icon_state = "well_2"
return TRUE
else
to_chat(user, "<span class='warning'>You need at least fifteen pieces of sandstone!</span>")
return
if(steps == 2 && istype(S, /obj/item/stack/sheet/mineral/sandstone))
if(S.use(25))
steps = 3
desc = "A large well foundation ready to be dug out. Just use a shovel!"
icon_state = "well_3"
return TRUE
else
to_chat(user, "<span class='warning'>You need at least tweenty-five pieces of sandstone!</span>")
return
if(steps == 3 && S.tool_behaviour == TOOL_SHOVEL)
S.use_tool(src, user, 80, volume=100)
steps = 4
desc = "A deep patch of dirt, needs something to hold a bucket and rope. Just add some wood planks!"
icon_state = "well_3"
return TRUE
if(steps == 4 && istype(S, /obj/item/stack/sheet/mineral/wood))
if(S.use(3))
steps = 5
desc = "A dug out well, A dug out well with out rope. Just add some cloth!"
icon_state = "well_4"
return TRUE
else
to_chat(user, "<span class='warning'>You need at least three planks!</span>")
return
if(steps == 5 && istype(S, /obj/item/stack/sheet/cloth))
if(S.use(2))
steps = 6
desc = "A dug out well with a rope. Just add a wooden bucket!"
icon_state = "well_5"
return TRUE
else
to_chat(user, "<span class='warning'>You need at least two pieces of cloth!</span>")
return
if(steps == 6 && istype(S, /obj/item/reagent_containers/glass/bucket/wood))
new /obj/structure/sink/well(loc)
qdel(S)
qdel(src)
return
else
return ..()
/obj/structure/sink/puddle //splishy splashy ^_^
name = "puddle"