Bleeding edgy refresh (#303)

* not code stuff

* other things

* global vars, defines, helpers

* onclick hud stuff, orphans, world.dm

* controllers and datums

* game folder

* everything not client/mobs in modules

* client folder

* stage 1 mob stuff

* simple animal things

* silicons

* carbon things

* ayylmaos and monkeys

* hyoomahn

* icons n shit

* sprite fixes

* compile fixes

* some fixes I cherrypicked.

* qdel fixes

* forgot brain refractors
This commit is contained in:
Poojawa
2017-03-21 11:44:10 -05:00
committed by GitHub
parent 099a6c8764
commit f67e9f6d87
1476 changed files with 344416 additions and 40694 deletions
@@ -38,18 +38,18 @@
if(user.transferItemToLoc(AM, src))
magazine = AM
if(oldmag)
user << "<span class='notice'>You perform a tactical reload on \the [src], replacing the magazine.</span>"
to_chat(user, "<span class='notice'>You perform a tactical reload on \the [src], replacing the magazine.</span>")
oldmag.dropped()
oldmag.forceMove(get_turf(src.loc))
oldmag.update_icon()
else
user << "<span class='notice'>You insert the magazine into \the [src].</span>"
to_chat(user, "<span class='notice'>You insert the magazine into \the [src].</span>")
chamber_round()
A.update_icon()
update_icon()
return 1
else
user << "<span class='warning'>You cannot seem to get \the [src] out of your hands!</span>"
to_chat(user, "<span class='warning'>You cannot seem to get \the [src] out of your hands!</span>")
/obj/item/weapon/gun/ballistic/automatic/ui_action_click()
burst_select()
@@ -60,11 +60,11 @@
if(!select)
burst_size = 1
fire_delay = 0
user << "<span class='notice'>You switch to semi-automatic.</span>"
to_chat(user, "<span class='notice'>You switch to semi-automatic.</span>")
else
burst_size = initial(burst_size)
fire_delay = initial(fire_delay)
user << "<span class='notice'>You switch to [burst_size]-rnd burst.</span>"
to_chat(user, "<span class='notice'>You switch to [burst_size]-rnd burst.</span>")
playsound(user, 'sound/weapons/empty.ogg', 100, 1)
update_icon()
@@ -195,15 +195,15 @@
select = 1
burst_size = initial(burst_size)
fire_delay = initial(fire_delay)
user << "<span class='notice'>You switch to [burst_size]-rnd burst.</span>"
to_chat(user, "<span class='notice'>You switch to [burst_size]-rnd burst.</span>")
if(1)
select = 2
user << "<span class='notice'>You switch to grenades.</span>"
to_chat(user, "<span class='notice'>You switch to grenades.</span>")
if(2)
select = 0
burst_size = 1
fire_delay = 0
user << "<span class='notice'>You switch to semi-auto.</span>"
to_chat(user, "<span class='notice'>You switch to semi-auto.</span>")
playsound(user, 'sound/weapons/empty.ogg', 100, 1)
update_icon()
return
@@ -299,7 +299,7 @@
/obj/item/weapon/gun/ballistic/automatic/l6_saw/attack_self(mob/user)
cover_open = !cover_open
user << "<span class='notice'>You [cover_open ? "open" : "close"] [src]'s cover.</span>"
to_chat(user, "<span class='notice'>You [cover_open ? "open" : "close"] [src]'s cover.</span>")
update_icon()
@@ -310,7 +310,7 @@
/obj/item/weapon/gun/ballistic/automatic/l6_saw/afterattack(atom/target as mob|obj|turf, mob/living/user as mob|obj, flag, params) //what I tried to do here is just add a check to see if the cover is open or not and add an icon_state change because I can't figure out how c-20rs do it with overlays
if(cover_open)
user << "<span class='warning'>[src]'s cover is open! Close it before firing!</span>"
to_chat(user, "<span class='warning'>[src]'s cover is open! Close it before firing!</span>")
else
..()
update_icon()
@@ -329,7 +329,7 @@
user.put_in_hands(magazine)
magazine = null
update_icon()
user << "<span class='notice'>You remove the magazine from [src].</span>"
to_chat(user, "<span class='notice'>You remove the magazine from [src].</span>")
/obj/item/weapon/gun/ballistic/automatic/l6_saw/attackby(obj/item/A, mob/user, params)
@@ -337,7 +337,7 @@
if(.)
return
if(!cover_open)
user << "<span class='warning'>[src]'s cover is closed! You can't insert a new mag.</span>"
to_chat(user, "<span class='warning'>[src]'s cover is closed! You can't insert a new mag.</span>")
return
..()
@@ -9,12 +9,15 @@
var/item_state_firing = "bow"
fire_sound = 'sound/weapons/grenadelaunch.ogg'
mag_type = /obj/item/ammo_box/magazine/internal/bow
flags = HANDSLOW
weapon_weight = WEAPON_HEAVY
var/draw_sound = 'sound/weapons/draw_bow.ogg'
var/ready_to_fire = 0
var/slowdown_when_ready = 2
/obj/item/weapon/gun/ballistic/bow/Initialize(mapload)
..()
SET_SECONDARY_FLAG(src, SLOWS_WHILE_IN_HAND)
/obj/item/weapon/gun/ballistic/bow/update_icon()
if(ready_to_fire)
icon_state = icon_state_firing
@@ -47,7 +50,7 @@
/obj/item/weapon/gun/ballistic/bow/attackby(obj/item/A, mob/user, params)
var/num_loaded = magazine.attackby(A, user, params, 1)
if(num_loaded)
user << "<span class='notice'>You ready \the [A] into \the [src].</span>"
to_chat(user, "<span class='notice'>You ready \the [A] into \the [src].</span>")
update_icon()
chamber_round()
@@ -22,7 +22,7 @@
/obj/item/weapon/minigunpack/Destroy()
STOP_PROCESSING(SSobj, src)
..()
return ..()
/obj/item/weapon/minigunpack/process()
overheat = max(0, overheat - heat_diffusion)
@@ -34,13 +34,13 @@
armed = 1
if(!user.put_in_hands(gun))
armed = 0
user << "<span class='warning'>You need a free hand to hold the gun!</span>"
to_chat(user, "<span class='warning'>You need a free hand to hold the gun!</span>")
return
update_icon()
gun.forceMove(user)
user.update_inv_back()
else
user << "<span class='warning'>You are already holding the gun!</span>"
to_chat(user, "<span class='warning'>You are already holding the gun!</span>")
else
..()
@@ -82,7 +82,7 @@
gun.forceMove(src)
armed = 0
if(user)
user << "<span class='notice'>You attach the [gun.name] to the [name].</span>"
to_chat(user, "<span class='notice'>You attach the [gun.name] to the [name].</span>")
else
src.visible_message("<span class='warning'>The [gun.name] snaps back onto the [name]!</span>")
update_icon()
@@ -96,7 +96,7 @@
icon_state = "minigun_spin"
item_state = "minigun"
origin_tech = "combat=6;powerstorage=5;magnets=4"
flags = CONDUCT | HANDSLOW
flags = CONDUCT
slowdown = 1
slot_flags = null
w_class = WEIGHT_CLASS_HUGE
@@ -110,6 +110,17 @@
casing_ejector = 0
var/obj/item/weapon/minigunpack/ammo_pack
/obj/item/weapon/gun/ballistic/minigun/Initialize(mapload)
..()
SET_SECONDARY_FLAG(src, SLOWS_WHILE_IN_HAND)
if(!ammo_pack)
if(istype(loc,/obj/item/weapon/minigunpack)) //We should spawn inside a ammo pack so let's use that one.
ammo_pack = loc
..()
else
qdel(src)//No pack, no gun
/obj/item/weapon/gun/ballistic/minigun/attack_self(mob/living/user)
return
@@ -125,21 +136,13 @@
ammo_pack.overheat += burst_size
..()
else
user << "The gun's heat sensor locked the trigger to prevent lens damage."
to_chat(user, "The gun's heat sensor locked the trigger to prevent lens damage.")
/obj/item/weapon/gun/ballistic/minigun/afterattack(atom/target, mob/living/user, flag, params)
if(!ammo_pack || ammo_pack.loc != user)
user << "You need the backpack power source to fire the gun!"
to_chat(user, "You need the backpack power source to fire the gun!")
..()
/obj/item/weapon/gun/ballistic/minigun/New()
if(!ammo_pack)
if(istype(loc,/obj/item/weapon/minigunpack)) //We should spawn inside a ammo pack so let's use that one.
ammo_pack = loc
..()
else
qdel(src)//No pack, no gun
/obj/item/weapon/gun/ballistic/minigun/dropped(mob/living/user)
ammo_pack.attach_gun(user)
@@ -72,7 +72,7 @@
/obj/item/weapon/gun/ballistic/automatic/speargun/attackby(obj/item/A, mob/user, params)
var/num_loaded = magazine.attackby(A, user, params, 1)
if(num_loaded)
user << "<span class='notice'>You load [num_loaded] spear\s into \the [src].</span>"
to_chat(user, "<span class='notice'>You load [num_loaded] spear\s into \the [src].</span>")
update_icon()
chamber_round()
@@ -33,7 +33,12 @@
/obj/item/weapon/gun/ballistic/automatic/pistol/deagle/update_icon()
..()
icon_state = "[initial(icon_state)][magazine ? "" : "-e"]"
if(magazine)
cut_overlays()
add_overlay("deagle_magazine")
else
cut_overlays()
icon_state = "[initial(icon_state)][chambered ? "" : "-e"]"
/obj/item/weapon/gun/ballistic/automatic/pistol/deagle/gold
desc = "A gold plated desert eagle folded over a million times by superior martian gunsmiths. Uses .50 AE ammo."
@@ -64,12 +69,12 @@
origin_tech = "combat=3;materials=2;abductor=3"
/obj/item/weapon/gun/ballistic/automatic/pistol/stickman/pickup(mob/living/user)
user << "<span class='notice'>As you try to pick up [src], it slips out of your grip..</span>"
to_chat(user, "<span class='notice'>As you try to pick up [src], it slips out of your grip..</span>")
if(prob(50))
user << "<span class='notice'>..and vanishes from your vision! Where the hell did it go?</span>"
to_chat(user, "<span class='notice'>..and vanishes from your vision! Where the hell did it go?</span>")
qdel(src)
user.update_icons()
else
user << "<span class='notice'>..and falls into view. Whew, that was a close one.</span>"
to_chat(user, "<span class='notice'>..and falls into view. Whew, that was a close one.</span>")
user.dropItemToGround(src)
@@ -27,7 +27,7 @@
return
var/num_loaded = magazine.attackby(A, user, params, 1)
if(num_loaded)
user << "<span class='notice'>You load [num_loaded] shell\s into \the [src].</span>"
to_chat(user, "<span class='notice'>You load [num_loaded] shell\s into \the [src].</span>")
A.update_icon()
update_icon()
chamber_round(0)
@@ -44,9 +44,9 @@
CB.update_icon()
num_unloaded++
if (num_unloaded)
user << "<span class='notice'>You unload [num_unloaded] shell\s from [src].</span>"
to_chat(user, "<span class='notice'>You unload [num_unloaded] shell\s from [src].</span>")
else
user << "<span class='warning'>[src] is empty!</span>"
to_chat(user, "<span class='warning'>[src] is empty!</span>")
/obj/item/weapon/gun/ballistic/revolver/verb/spin()
set name = "Spin Chamber"
@@ -83,7 +83,7 @@
/obj/item/weapon/gun/ballistic/revolver/examine(mob/user)
..()
user << "[get_ammo(0,0)] of those are live rounds."
to_chat(user, "[get_ammo(0,0)] of those are live rounds.")
/obj/item/weapon/gun/ballistic/revolver/detective
name = "\improper .38 Mars Special"
@@ -100,14 +100,13 @@
options["Black Panther"] = "detective_panther"
options["Gold Trim"] = "detective_gold"
options["The Peacemaker"] = "detective_peacemaker"
options["The Spacemaker"] = "detective_future"
options["Cancel"] = null
/obj/item/weapon/gun/ballistic/revolver/detective/process_fire(atom/target as mob|obj|turf, mob/living/user as mob|obj, message = 1, params, zone_override = "")
if(magazine.caliber != initial(magazine.caliber))
if(prob(70 - (magazine.ammo_count() * 10))) //minimum probability of 10, maximum of 60
playsound(user, fire_sound, 50, 1)
user << "<span class='userdanger'>[src] blows up in your face!</span>"
to_chat(user, "<span class='userdanger'>[src] blows up in your face!</span>")
user.take_bodypart_damage(0,20)
user.dropItemToGround(src)
return 0
@@ -117,31 +116,31 @@
..()
if(istype(A, /obj/item/weapon/screwdriver))
if(magazine.caliber == "38")
user << "<span class='notice'>You begin to reinforce the barrel of [src]...</span>"
to_chat(user, "<span class='notice'>You begin to reinforce the barrel of [src]...</span>")
if(magazine.ammo_count())
afterattack(user, user) //you know the drill
user.visible_message("<span class='danger'>[src] goes off!</span>", "<span class='userdanger'>[src] goes off in your face!</span>")
return
if(do_after(user, 30*A.toolspeed, target = src))
if(magazine.ammo_count())
user << "<span class='warning'>You can't modify it!</span>"
to_chat(user, "<span class='warning'>You can't modify it!</span>")
return
magazine.caliber = "357"
desc = "The barrel and chamber assembly seems to have been modified."
user << "<span class='notice'>You reinforce the barrel of [src]. Now it will fire .357 rounds.</span>"
to_chat(user, "<span class='notice'>You reinforce the barrel of [src]. Now it will fire .357 rounds.</span>")
else
user << "<span class='notice'>You begin to revert the modifications to [src]...</span>"
to_chat(user, "<span class='notice'>You begin to revert the modifications to [src]...</span>")
if(magazine.ammo_count())
afterattack(user, user) //and again
user.visible_message("<span class='danger'>[src] goes off!</span>", "<span class='userdanger'>[src] goes off in your face!</span>")
return
if(do_after(user, 30*A.toolspeed, target = src))
if(magazine.ammo_count())
user << "<span class='warning'>You can't modify it!</span>"
to_chat(user, "<span class='warning'>You can't modify it!</span>")
return
magazine.caliber = "38"
desc = initial(desc)
user << "<span class='notice'>You remove the modifications on [src]. Now it will fire .38 rounds.</span>"
to_chat(user, "<span class='notice'>You remove the modifications on [src]. Now it will fire .38 rounds.</span>")
/obj/item/weapon/gun/ballistic/revolver/mateba
@@ -209,13 +208,13 @@
return
if(target != user)
if(ismob(target))
user << "<span class='warning'>A mechanism prevents you from shooting anyone but yourself!</span>"
to_chat(user, "<span class='warning'>A mechanism prevents you from shooting anyone but yourself!</span>")
return
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(!spun)
user << "<span class='warning'>You need to spin the revolver's chamber first!</span>"
to_chat(user, "<span class='warning'>You need to spin the revolver's chamber first!</span>")
return
spun = FALSE
@@ -301,9 +300,9 @@
CB.update_icon()
num_unloaded++
if (num_unloaded)
user << "<span class='notice'>You break open \the [src] and unload [num_unloaded] shell\s.</span>"
to_chat(user, "<span class='notice'>You break open \the [src] and unload [num_unloaded] shell\s.</span>")
else
user << "<span class='warning'>[src] is empty!</span>"
to_chat(user, "<span class='warning'>[src] is empty!</span>")
// IMPROVISED SHOTGUN //
@@ -327,11 +326,11 @@
var/obj/item/stack/cable_coil/C = A
if(C.use(10))
slot_flags = SLOT_BACK
user << "<span class='notice'>You tie the lengths of cable to the shotgun, making a sling.</span>"
to_chat(user, "<span class='notice'>You tie the lengths of cable to the shotgun, making a sling.</span>")
slung = 1
update_icon()
else
user << "<span class='warning'>You need at least ten lengths of cable if you want to make a sling!</span>"
to_chat(user, "<span class='warning'>You need at least ten lengths of cable if you want to make a sling!</span>")
/obj/item/weapon/gun/ballistic/revolver/doublebarrel/improvised/update_icon()
..()
@@ -19,7 +19,7 @@
return
var/num_loaded = magazine.attackby(A, user, params, 1)
if(num_loaded)
user << "<span class='notice'>You load [num_loaded] shell\s into \the [src]!</span>"
to_chat(user, "<span class='notice'>You load [num_loaded] shell\s into \the [src]!</span>")
A.update_icon()
update_icon()
@@ -72,7 +72,7 @@
/obj/item/weapon/gun/ballistic/shotgun/examine(mob/user)
..()
if (chambered)
user << "A [chambered.BB ? "live" : "spent"] one is in the chamber."
to_chat(user, "A [chambered.BB ? "live" : "spent"] one is in the chamber.")
/obj/item/weapon/gun/ballistic/shotgun/lethal
mag_type = /obj/item/ammo_box/magazine/internal/shot/lethal
@@ -120,13 +120,13 @@
/obj/item/weapon/gun/ballistic/shotgun/boltaction/attackby(obj/item/A, mob/user, params)
if(!bolt_open)
user << "<span class='notice'>The bolt is closed!</span>"
to_chat(user, "<span class='notice'>The bolt is closed!</span>")
return
. = ..()
/obj/item/weapon/gun/ballistic/shotgun/boltaction/examine(mob/user)
..()
user << "The bolt is [bolt_open ? "open" : "closed"]."
to_chat(user, "The bolt is [bolt_open ? "open" : "closed"].")
/obj/item/weapon/gun/ballistic/shotgun/boltaction/enchanted
@@ -224,9 +224,9 @@
alternate_magazine = current_mag
toggled = !toggled
if(toggled)
user << "You switch to tube B."
to_chat(user, "You switch to tube B.")
else
user << "You switch to tube A."
to_chat(user, "You switch to tube A.")
/obj/item/weapon/gun/ballistic/shotgun/automatic/dual_tube/AltClick(mob/living/user)
if(user.incapacitated() || !Adjacent(user) || !istype(user))