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
@@ -10,6 +10,9 @@
var/image_overlay = null
var/obj/item/device/assembly_holder/nadeassembly = null
var/assemblyattacher
var/directional = FALSE
var/aim_dir = NORTH
var/boom_sizes = list(0, 0, 3)
/obj/item/weapon/grenade/plastic/New()
image_overlay = image('icons/obj/grenade.dmi', "[item_state]2")
@@ -29,7 +32,7 @@
nadeassembly = A
A.master = src
assemblyattacher = user.ckey
user << "<span class='notice'>You add [A] to the [name].</span>"
to_chat(user, "<span class='notice'>You add [A] to the [name].</span>")
playsound(src, 'sound/weapons/tap.ogg', 20, 1)
update_icon()
return
@@ -42,6 +45,26 @@
return
..()
/obj/item/weapon/grenade/plastic/prime()
var/turf/location
if(target)
if(!QDELETED(target))
location = get_turf(target)
target.cut_overlay(image_overlay, TRUE)
else
location = get_turf(src)
if(location)
if(directional && target && target.density)
var/turf/T = get_step(location, aim_dir)
explosion(get_step(T, aim_dir), boom_sizes[1], boom_sizes[2], boom_sizes[3])
else
explosion(location, boom_sizes[1], boom_sizes[2], boom_sizes[3])
location.ex_act(2, target)
if(istype(target, /mob))
var/mob/M = target
M.gib()
qdel(src)
//assembly stuff
/obj/item/weapon/grenade/plastic/receive_signal()
prime()
@@ -62,15 +85,16 @@
if(user.get_active_held_item() == src)
newtime = Clamp(newtime, 10, 60000)
det_time = newtime
user << "Timer set for [det_time] seconds."
to_chat(user, "Timer set for [det_time] seconds.")
/obj/item/weapon/grenade/plastic/afterattack(atom/movable/AM, mob/user, flag)
if (!flag)
aim_dir = get_dir(user,AM)
if(!flag)
return
if (ismob(AM))
if(ismob(AM))
return
user << "<span class='notice'>You start planting the [src]. The timer is set to [det_time]...</span>"
to_chat(user, "<span class='notice'>You start planting the [src]. The timer is set to [det_time]...</span>")
if(do_after(user, 50, target = AM))
if(!user.temporarilyRemoveItemFromInventory(src))
@@ -78,12 +102,18 @@
src.target = AM
forceMove(null) //Yep
if(istype(AM, /obj/item)) //your crappy throwing star can't fly so good with a giant brick of c4 on it.
var/obj/item/I = AM
I.throw_speed = max(1, (I.throw_speed - 3))
I.throw_range = max(1, (I.throw_range - 3))
I.embed_chance = 0
message_admins("[ADMIN_LOOKUPFLW(user)] planted [name] on [target.name] at [ADMIN_COORDJMP(target)] with [det_time] second fuse",0,1)
log_game("[key_name(user)] planted [name] on [target.name] at [COORD(src)] with [det_time] second fuse")
target.add_overlay(image_overlay, 1)
if(!nadeassembly)
user << "<span class='notice'>You plant the bomb. Timer counting down from [det_time].</span>"
to_chat(user, "<span class='notice'>You plant the bomb. Timer counting down from [det_time].</span>")
addtimer(CALLBACK(src, .proc/prime), det_time*10)
else
qdel(src) //How?
@@ -125,22 +155,6 @@
name = "C4"
desc = "Used to put holes in specific areas without too much extra hole. A saboteur's favorite."
/obj/item/weapon/grenade/plastic/c4/prime()
var/turf/location
if(target)
if(!QDELETED(target))
location = get_turf(target)
target.cut_overlay(image_overlay, TRUE)
else
location = get_turf(src)
if(location)
location.ex_act(2, target)
explosion(location,0,0,3)
if(istype(target, /mob))
var/mob/M = target
M.gib()
qdel(src)
// X4 is an upgraded directional variant of c4 which is relatively safe to be standing next to. And much less safe to be standing on the other side of.
// C4 is intended to be used for infiltration, and destroying tech. X4 is intended to be used for heavy breaching and tight spaces.
// Intended to replace C4 for nukeops, and to be a randomdrop in surplus/random traitor purchases.
@@ -148,34 +162,7 @@
/obj/item/weapon/grenade/plastic/x4
name = "X4"
desc = "A shaped high-explosive breaching charge. Designed to ensure user safety and wall nonsafety."
var/aim_dir = NORTH
icon_state = "plasticx40"
item_state = "plasticx4"
/obj/item/weapon/grenade/plastic/x4/prime()
var/turf/location
if(target)
if(!QDELETED(target))
location = get_turf(target)
target.cut_overlay(image_overlay, TRUE)
else
location = get_turf(src)
if(location)
if(istype(loc, /obj/item/weapon/twohanded/spear) || !target)
explosion(location, 0, 2, 3)
else if(target && target.density)
var/turf/T = get_step(location, aim_dir)
explosion(get_step(T, aim_dir),0,0,3)
explosion(T,0,2,0)
location.ex_act(2, target)
else
explosion(location, 0, 2, 3)
location.ex_act(2, target)
if(istype(target, /mob))
var/mob/M = target
M.gib()
qdel(src)
/obj/item/weapon/grenade/plastic/x4/afterattack(atom/movable/AM, mob/user, flag)
aim_dir = get_dir(user,AM)
..()
directional = TRUE
boom_sizes = list(0, 2, 5)