Merge branch 'master' into upstream-merge-27773

This commit is contained in:
LetterJay
2017-06-06 09:05:26 -05:00
committed by GitHub
359 changed files with 404750 additions and 231336 deletions
+66 -72
View File
@@ -14,14 +14,16 @@
origin_tech = "combat=1;plasmatech=2;engineering=2"
resistance_flags = FIRE_PROOF
var/status = 0
var/throw_amount = 100
var/lit = 0 //on or off
var/operating = 0//cooldown
var/obj/item/weapon/weldingtool/weldtool = null
var/obj/item/device/assembly/igniter/igniter = null
var/obj/item/weapon/tank/internals/plasma/ptank = null
var/warned_admins = 0 //for the message_admins() when lit
//variables for prebuilt flamethrowers
var/create_full = FALSE
var/create_with_tank = FALSE
var/igniter_type = /obj/item/device/assembly/igniter
/obj/item/weapon/flamethrower/Destroy()
if(weldtool)
@@ -32,9 +34,8 @@
qdel(ptank)
return ..()
/obj/item/weapon/flamethrower/process()
if(!lit)
if(!lit || !igniter)
STOP_PROCESSING(SSobj, src)
return null
var/turf/location = loc
@@ -43,8 +44,7 @@
if(M.is_holding(src))
location = M.loc
if(isturf(location)) //start a fire if possible
location.hotspot_expose(700, 2)
return
igniter.flamethrower_process(location)
/obj/item/weapon/flamethrower/update_icon()
@@ -58,6 +58,9 @@
item_state = "flamethrower_1"
else
item_state = "flamethrower_0"
if(ismob(loc))
var/mob/M = loc
M.update_inv_hands()
return
/obj/item/weapon/flamethrower/afterattack(atom/target, mob/user, flag)
@@ -82,13 +85,13 @@
if(istype(W, /obj/item/weapon/wrench) && !status)//Taking this apart
var/turf/T = get_turf(src)
if(weldtool)
weldtool.loc = T
weldtool.forceMove(T)
weldtool = null
if(igniter)
igniter.loc = T
igniter.forceMove(T)
igniter = null
if(ptank)
ptank.loc = T
ptank.forceMove(T)
ptank = null
new /obj/item/stack/rods(T)
qdel(src)
@@ -114,7 +117,10 @@
else if(istype(W,/obj/item/weapon/tank/internals/plasma))
if(ptank)
to_chat(user, "<span class='notice'>There is already a plasma tank loaded in [src]!</span>")
if(user.transferItemToLoc(W,src))
ptank.forceMove(get_turf(src))
ptank = W
to_chat(user, "<span class='notice'>You swap the plasma tank in [src]!</span>")
return
if(!user.transferItemToLoc(W, src))
return
@@ -129,53 +135,26 @@
/obj/item/weapon/flamethrower/attack_self(mob/user)
if(user.stat || user.restrained() || user.lying)
return
user.set_machine(src)
toggle_igniter(user)
/obj/item/weapon/flamethrower/proc/toggle_igniter(mob/user)
if(!ptank)
to_chat(user, "<span class='notice'>Attach a plasma tank first!</span>")
return
var/dat = text("<TT><B>Flamethrower (<A HREF='?src=\ref[src];light=1'>[lit ? "<font color='red'>Lit</font>" : "Unlit"]</a>)</B><BR>\n Tank Pressure: [ptank.air_contents.return_pressure()]<BR>\nAmount to throw: <A HREF='?src=\ref[src];amount=-100'>-</A> <A HREF='?src=\ref[src];amount=-10'>-</A> <A HREF='?src=\ref[src];amount=-1'>-</A> [throw_amount] <A HREF='?src=\ref[src];amount=1'>+</A> <A HREF='?src=\ref[src];amount=10'>+</A> <A HREF='?src=\ref[src];amount=100'>+</A><BR>\n<A HREF='?src=\ref[src];remove=1'>Remove plasmatank</A> - <A HREF='?src=\ref[src];close=1'>Close</A></TT>")
user << browse(dat, "window=flamethrower;size=600x300")
onclose(user, "flamethrower")
return
/obj/item/weapon/flamethrower/Topic(href,href_list[])
if(href_list["close"])
usr.unset_machine()
usr << browse(null, "window=flamethrower")
if(!status)
to_chat(user, "<span class='notice'>Secure the igniter first!</span>")
return
if(usr.stat || usr.restrained() || usr.lying)
return
usr.set_machine(src)
if(href_list["light"])
if(!ptank)
return
if(!status)
return
lit = !lit
if(lit)
START_PROCESSING(SSobj, src)
if(!warned_admins)
message_admins("[ADMIN_LOOKUPFLW(usr)] has lit a flamethrower.")
warned_admins = 1
if(href_list["amount"])
throw_amount = throw_amount + text2num(href_list["amount"])
throw_amount = max(50, min(5000, throw_amount))
if(href_list["remove"])
if(!ptank)
return
usr.put_in_hands(ptank)
ptank = null
lit = 0
usr.unset_machine()
usr << browse(null, "window=flamethrower")
for(var/mob/M in viewers(1, loc))
if((M.client && M.machine == src))
attack_self(M)
to_chat(user, "<span class='notice'>You ignite [src]!</span>")
lit = !lit
if(lit)
START_PROCESSING(SSobj, src)
if(!warned_admins)
message_admins("[ADMIN_LOOKUPFLW(user)] has lit a flamethrower.")
warned_admins = 1
else
STOP_PROCESSING(SSobj,src)
update_icon()
return
/obj/item/weapon/flamethrower/CheckParts(list/parts_list)
..()
@@ -195,19 +174,22 @@
for(var/turf/T in turflist)
if(T == previousturf)
continue //so we don't burn the tile we be standin on
if(!T.atmos_adjacent_turfs || !T.atmos_adjacent_turfs[previousturf])
var/list/turfs_sharing_with_prev = previousturf.GetAtmosAdjacentTurfs(alldir=1)
if(!(T in turfs_sharing_with_prev))
break
ignite_turf(T)
if(igniter)
igniter.ignite_turf(src,T)
else
default_ignite(T)
sleep(1)
previousturf = T
operating = 0
for(var/mob/M in viewers(1, loc))
if((M.client && M.machine == src))
attack_self(M)
return
/obj/item/weapon/flamethrower/proc/ignite_turf(turf/target, release_amount = 0.05)
/obj/item/weapon/flamethrower/proc/default_ignite(turf/target, release_amount = 0.05)
//TODO: DEFERRED Consider checking to make sure tank pressure is high enough before doing this...
//Transfer 5% of current tank air contents to turf
var/datum/gas_mixture/air_transfer = ptank.air_contents.remove_ratio(release_amount)
@@ -218,30 +200,42 @@
target.hotspot_expose((ptank.air_contents.temperature*2) + 380,500)
//location.hotspot_expose(1000,500,1)
SSair.add_to_active(target, 0)
return
/obj/item/weapon/flamethrower/full/New(var/loc)
..()
if(!weldtool)
weldtool = new /obj/item/weapon/weldingtool(src)
weldtool.status = 0
if(!igniter)
igniter = new /obj/item/device/assembly/igniter(src)
igniter.secured = 0
status = 1
update_icon()
/obj/item/weapon/flamethrower/Initialize(mapload)
. = ..()
if(create_full)
if(!weldtool)
weldtool = new /obj/item/weapon/weldingtool(src)
weldtool.status = 0
if(!igniter)
igniter = new igniter_type(src)
igniter.secured = 0
status = 1
if(create_with_tank)
ptank = new /obj/item/weapon/tank/internals/plasma/full(src)
update_icon()
/obj/item/weapon/flamethrower/full/tank/New(var/loc)
..()
ptank = new /obj/item/weapon/tank/internals/plasma/full(src)
update_icon()
/obj/item/weapon/flamethrower/full/tank
create_full = TRUE
/obj/item/weapon/flamethrower/full/tank
create_with_tank = TRUE
/obj/item/weapon/flamethrower/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance, damage, attack_type)
if(ptank && damage && attack_type == PROJECTILE_ATTACK && prob(15))
owner.visible_message("<span class='danger'>[attack_text] hits the fueltank on [owner]'s [src], rupturing it! What a shot!</span>")
var/target_turf = get_turf(owner)
ignite_turf(target_turf, 100)
igniter.ignite_turf(src,target_turf, release_amount = 100)
qdel(ptank)
return 1 //It hit the flamethrower, not them
/obj/item/device/assembly/igniter/proc/flamethrower_process(turf/open/location)
location.hotspot_expose(700,2)
/obj/item/device/assembly/igniter/cold/flamethrower_process(turf/open/location)
return
/obj/item/device/assembly/igniter/proc/ignite_turf(obj/item/weapon/flamethrower/F,turf/open/location,release_amount = 0.05)
F.default_ignite(location,release_amount)
@@ -103,7 +103,7 @@
to_chat(user, "<span class='warning'>You need one length of coil to wire the assembly!</span>")
return
else if(stage == READY && istype(I, /obj/item/weapon/wirecutters))
else if(stage == READY && istype(I, /obj/item/weapon/wirecutters) && !active)
stage_change(WIRED)
to_chat(user, "<span class='notice'>You unlock the [initial(name)] assembly.</span>")
@@ -59,7 +59,7 @@
/obj/item/weapon/grenade/iedcasing/prime() //Blowing that can up
update_mob()
explosion(src.loc,-1,-1,2, flame_range = 4) // small explosion, plus a very large fireball.
explosion(src.loc,-1,-1,2, flame_range = 4) // small explosion, plus a very large fireball.
qdel(src)
/obj/item/weapon/grenade/iedcasing/examine(mob/user)
@@ -9,7 +9,7 @@
/obj/item/weapon/grenade/syndieminibomb/prime()
update_mob()
explosion(src.loc,1,2,4,flame_range = 2)
explosion(src.loc,1,2,4,flame_range = 2)
qdel(src)
/obj/item/weapon/grenade/syndieminibomb/concussion
@@ -20,7 +20,7 @@
/obj/item/weapon/grenade/syndieminibomb/concussion/prime()
update_mob()
explosion(src.loc,0,2,3,flame_range = 3)
explosion(src.loc,0,2,3,flame_range = 3)
qdel(src)
/obj/item/weapon/grenade/syndieminibomb/concussion/frag
@@ -185,17 +185,6 @@
maxWeightClass = 7
gasPerThrow = 5
/datum/crafting_recipe/improvised_pneumatic_cannon //Pretty easy to obtain but
name = "Pneumatic Cannon"
result = /obj/item/weapon/pneumatic_cannon/ghetto
tools = list(/obj/item/weapon/weldingtool,
/obj/item/weapon/wrench)
reqs = list(/obj/item/stack/sheet/metal = 4,
/obj/item/stack/packageWrap = 8,
/obj/item/pipe = 2)
time = 300
category = CAT_WEAPON
/obj/item/weapon/pneumatic_cannon/proc/updateTank(obj/item/weapon/tank/internals/thetank, removing = 0, mob/living/carbon/human/user)
if(removing)
if(!src.tank)
@@ -83,7 +83,7 @@
/obj/item/weapon/storage/backpack/holding/singularity_act(current_size)
var/dist = max((current_size - 2),1)
explosion(src.loc,(dist),(dist*2),(dist*4))
explosion(src.loc,(dist),(dist*2),(dist*4))
return
@@ -203,7 +203,7 @@
/obj/item/organ/regenerative_core,
/obj/item/device/wormhole_jaunter,
/obj/item/weapon/storage/bag/plants,
/obj/item/stack/marker_beacon
)
@@ -249,8 +249,8 @@
/obj/item/weapon/storage/belt/military
name = "chest rig"
desc = "A set of tactical webbing worn by Syndicate boarding parties."
icon_state = "explorer1"
item_state = "explorer1"
icon_state = "militarywebbing"
item_state = "militarywebbing"
max_w_class = WEIGHT_CLASS_SMALL
/obj/item/weapon/storage/belt/military/abductor
@@ -405,10 +405,9 @@
if(iscyborg(user))
return //Robots can't interact with storage items.
if(contents.len >= storage_slots) //don't use items on the backpack if they don't fit
return 1
if(!can_be_inserted(W, 0 , user))
if(contents.len >= storage_slots) //don't use items on the backpack if they don't fit
return 1
return 0
handle_item_insertion(W, 0 , user)
@@ -140,7 +140,7 @@
item_state = "plasmaman_tank_belt"
slot_flags = SLOT_BELT
force = 5
volume = 3
volume = 6
w_class = WEIGHT_CLASS_SMALL //thanks i forgot this
/obj/item/weapon/tank/internals/plasmaman/belt/full/New()
+1 -53
View File
@@ -698,56 +698,4 @@
sharpness = IS_SHARP
/obj/item/weapon/twohanded/bonespear/update_icon()
icon_state = "bone_spear[wielded]"
/*
* Sky Bulge (Gae Bolg, tradtional dragoon lance from many FF games.)
*/
/obj/item/weapon/twohanded/skybulge //Copy+paste job from bonespear because no explosions.
icon_state = "sky_bulge0"
name = "Sky Bulge"
desc = "A legendary stick with a very pointy tip. Looks to be used for throwing. And jumping. Can be stubborn if you throw too much." //TODO: Be funnier.
force = 10 //This thing aint for robusting.
w_class = WEIGHT_CLASS_BULKY
slot_flags = SLOT_BACK
force_unwielded = 10
force_wielded = 18 //Same as regular spear. This is a utility weapon.
throwforce = 24 //And that utility is throwing. 24 so it takes 5 hits instead of 4.
throw_speed = 4
embedded_impact_pain_multiplier = 0 //If you somehow embed this, it's not going to hurt.
armour_penetration = 15 //Same as Bone Spear
embed_chance = 0 //Would ruin the whole theme of the thing.
hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb = list("attacked", "poked", "jabbed", "torn", "gored", "lanced") //Added lanced for flavour.
sharpness = IS_SHARP
var/maxdist = 16
var/throw_cooldown = 0 //Should equate to half a second. Not supposed to be varedited.
/obj/item/weapon/twohanded/skybulge/update_icon()
icon_state = "sky_bulge[wielded]"
/obj/item/weapon/twohanded/skybulge/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0, datum/callback/callback) //Throw cooldown and offhand-proofing.
if(throw_cooldown > world.time)
var/mob/user = thrownby
user.put_in_hands(src)
return
unwield(src)
..()
/obj/item/weapon/twohanded/skybulge/throw_impact(atom/target) //Praise be the ratvar spear for showing me how to use this proc.
var/turf/turfhit = get_turf(target)
var/mob/user = thrownby
var/turf/source = get_turf(thrownby)
if(source.z == ZLEVEL_STATION && get_dist(turfhit, source) < maxdist || source.z != ZLEVEL_STATION)
..()
if(do_after_mob(user, src, 5, uninterruptible = 1, progress = 0))
if(QDELETED(src))
return
var/turf/landing = get_turf(src)
if (loc != landing)
return
user.forceMove(landing)
throw_cooldown = world.time + 5 //Half a second between throws.
user.put_in_hands(src)
playsound(src, 'sound/weapons/laser2.ogg', 20, 1)
icon_state = "bone_spear[wielded]"