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:
@@ -38,7 +38,7 @@
|
||||
var/area/A = get_area(bombturf)
|
||||
message_admins("[key_name_admin(usr)]<A HREF='?_src_=holder;adminmoreinfo=\ref[usr]'>?</A> (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[usr]'>FLW</A>) has primed a [name] for detonation at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>.")
|
||||
log_game("[key_name(usr)] has primed a [name] for detonation at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]).")
|
||||
user << "<span class='warning'>You prime the [name]! [det_time / 10] second\s!</span>"
|
||||
to_chat(user, "<span class='warning'>You prime the [name]! [det_time / 10] second\s!</span>")
|
||||
playsound(user.loc, 'sound/weapons/armbomb.ogg', 60, 1)
|
||||
active = 1
|
||||
icon_state = initial(icon_state) + "_active"
|
||||
@@ -54,29 +54,29 @@
|
||||
if(stage == WIRED)
|
||||
if(beakers.len)
|
||||
stage_change(READY)
|
||||
user << "<span class='notice'>You lock the [initial(name)] assembly.</span>"
|
||||
to_chat(user, "<span class='notice'>You lock the [initial(name)] assembly.</span>")
|
||||
playsound(loc, I.usesound, 25, -3)
|
||||
else
|
||||
user << "<span class='warning'>You need to add at least one beaker before locking the [initial(name)] assembly!</span>"
|
||||
to_chat(user, "<span class='warning'>You need to add at least one beaker before locking the [initial(name)] assembly!</span>")
|
||||
else if(stage == READY && !nadeassembly)
|
||||
det_time = det_time == 50 ? 30 : 50 //toggle between 30 and 50
|
||||
user << "<span class='notice'>You modify the time delay. It's set for [det_time / 10] second\s.</span>"
|
||||
to_chat(user, "<span class='notice'>You modify the time delay. It's set for [det_time / 10] second\s.</span>")
|
||||
else if(stage == EMPTY)
|
||||
user << "<span class='warning'>You need to add an activation mechanism!</span>"
|
||||
to_chat(user, "<span class='warning'>You need to add an activation mechanism!</span>")
|
||||
|
||||
else if(stage == WIRED && is_type_in_list(I, allowed_containers))
|
||||
. = 1 //no afterattack
|
||||
if(beakers.len == 2)
|
||||
user << "<span class='warning'>[src] can not hold more containers!</span>"
|
||||
to_chat(user, "<span class='warning'>[src] can not hold more containers!</span>")
|
||||
return
|
||||
else
|
||||
if(I.reagents.total_volume)
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return
|
||||
user << "<span class='notice'>You add [I] to the [initial(name)] assembly.</span>"
|
||||
to_chat(user, "<span class='notice'>You add [I] to the [initial(name)] assembly.</span>")
|
||||
beakers += I
|
||||
else
|
||||
user << "<span class='warning'>[I] is empty!</span>"
|
||||
to_chat(user, "<span class='warning'>[I] is empty!</span>")
|
||||
|
||||
else if(stage == EMPTY && istype(I, /obj/item/device/assembly_holder))
|
||||
. = 1 // no afterattack
|
||||
@@ -91,28 +91,28 @@
|
||||
assemblyattacher = user.ckey
|
||||
|
||||
stage_change(WIRED)
|
||||
user << "<span class='notice'>You add [A] to the [initial(name)] assembly.</span>"
|
||||
to_chat(user, "<span class='notice'>You add [A] to the [initial(name)] assembly.</span>")
|
||||
|
||||
else if(stage == EMPTY && istype(I, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/C = I
|
||||
if (C.use(1))
|
||||
det_time = 50 // In case the cable_coil was removed and readded.
|
||||
stage_change(WIRED)
|
||||
user << "<span class='notice'>You rig the [initial(name)] assembly.</span>"
|
||||
to_chat(user, "<span class='notice'>You rig the [initial(name)] assembly.</span>")
|
||||
else
|
||||
user << "<span class='warning'>You need one length of coil to wire the assembly!</span>"
|
||||
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))
|
||||
stage_change(WIRED)
|
||||
user << "<span class='notice'>You unlock the [initial(name)] assembly.</span>"
|
||||
to_chat(user, "<span class='notice'>You unlock the [initial(name)] assembly.</span>")
|
||||
|
||||
else if(stage == WIRED && istype(I, /obj/item/weapon/wrench))
|
||||
if(beakers.len)
|
||||
for(var/obj/O in beakers)
|
||||
O.loc = get_turf(src)
|
||||
beakers = list()
|
||||
user << "<span class='notice'>You open the [initial(name)] assembly and remove the payload.</span>"
|
||||
to_chat(user, "<span class='notice'>You open the [initial(name)] assembly and remove the payload.</span>")
|
||||
return // First use of the wrench remove beakers, then use the wrench to remove the activation mechanism.
|
||||
if(nadeassembly)
|
||||
nadeassembly.loc = get_turf(src)
|
||||
@@ -121,7 +121,7 @@
|
||||
else // If "nadeassembly = null && stage == WIRED", then it most have been cable_coil that was used.
|
||||
new /obj/item/stack/cable_coil(get_turf(src),1)
|
||||
stage_change(EMPTY)
|
||||
user << "<span class='notice'>You remove the activation mechanism from the [initial(name)] assembly.</span>"
|
||||
to_chat(user, "<span class='notice'>You remove the activation mechanism from the [initial(name)] assembly.</span>")
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -229,7 +229,7 @@
|
||||
if(istype(I, /obj/item/slime_extract) && stage == WIRED)
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return
|
||||
user << "<span class='notice'>You add [I] to the [initial(name)] assembly.</span>"
|
||||
to_chat(user, "<span class='notice'>You add [I] to the [initial(name)] assembly.</span>")
|
||||
beakers += I
|
||||
else
|
||||
return ..()
|
||||
@@ -265,7 +265,7 @@
|
||||
unit_spread += 25
|
||||
else
|
||||
unit_spread = 5
|
||||
user << "<span class='notice'> You set the time release to [unit_spread] units per detonation.</span>"
|
||||
to_chat(user, "<span class='notice'> You set the time release to [unit_spread] units per detonation.</span>")
|
||||
return
|
||||
..()
|
||||
|
||||
@@ -457,6 +457,39 @@
|
||||
beakers += B1
|
||||
beakers += B2
|
||||
|
||||
/obj/item/weapon/grenade/chem_grenade/glitter
|
||||
name = "generic glitter grenade"
|
||||
desc = "You shouldn't see this description."
|
||||
stage = READY
|
||||
var/glitter_type = "glitter"
|
||||
|
||||
/obj/item/weapon/grenade/chem_grenade/glitter/New()
|
||||
..()
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/B1 = new(src)
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/B2 = new(src)
|
||||
|
||||
B1.reagents.add_reagent(glitter_type, 25)
|
||||
B1.reagents.add_reagent("potassium", 25)
|
||||
B2.reagents.add_reagent("phosphorus", 25)
|
||||
B2.reagents.add_reagent("sugar", 25)
|
||||
|
||||
beakers += B1
|
||||
beakers += B2
|
||||
|
||||
/obj/item/weapon/grenade/chem_grenade/glitter/pink
|
||||
name = "pink glitter bomb"
|
||||
desc = "For that HOT glittery look."
|
||||
glitter_type = "pink_glitter"
|
||||
|
||||
/obj/item/weapon/grenade/chem_grenade/glitter/blue
|
||||
name = "blue glitter bomb"
|
||||
desc = "For that COOL glittery look."
|
||||
glitter_type = "blue_glitter"
|
||||
|
||||
/obj/item/weapon/grenade/chem_grenade/glitter/white
|
||||
name = "white glitter bomb"
|
||||
desc = "For that somnolent glittery look."
|
||||
glitter_type = "white_glitter"
|
||||
|
||||
/obj/item/weapon/grenade/chem_grenade/clf3
|
||||
name = "clf3 grenade"
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
/obj/item/weapon/grenade/iedcasing/attack_self(mob/user) //
|
||||
if(!active)
|
||||
if(clown_check(user))
|
||||
user << "<span class='warning'>You light the [name]!</span>"
|
||||
to_chat(user, "<span class='warning'>You light the [name]!</span>")
|
||||
active = 1
|
||||
cut_overlay(image('icons/obj/grenade.dmi', icon_state = "improvised_grenade_filled"), TRUE) //this line make no sense
|
||||
icon_state = initial(icon_state) + "_active"
|
||||
@@ -67,4 +67,4 @@
|
||||
|
||||
/obj/item/weapon/grenade/iedcasing/examine(mob/user)
|
||||
..()
|
||||
user << "You can't tell when it will explode!"
|
||||
to_chat(user, "You can't tell when it will explode!")
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
/obj/item/weapon/grenade/proc/clown_check(mob/living/carbon/human/user)
|
||||
if(user.disabilities & CLUMSY && prob(50))
|
||||
user << "<span class='warning'>Huh? How does this thing work?</span>"
|
||||
to_chat(user, "<span class='warning'>Huh? How does this thing work?</span>")
|
||||
active = 1
|
||||
icon_state = initial(icon_state) + "_active"
|
||||
playsound(loc, 'sound/weapons/armbomb.ogg', 75, 1, -3)
|
||||
@@ -40,15 +40,15 @@
|
||||
..()
|
||||
if(display_timer)
|
||||
if(det_time > 1)
|
||||
user << "The timer is set to [det_time/10] second\s."
|
||||
to_chat(user, "The timer is set to [det_time/10] second\s.")
|
||||
else
|
||||
user << "\The [src] is set for instant detonation."
|
||||
to_chat(user, "\The [src] is set for instant detonation.")
|
||||
|
||||
|
||||
/obj/item/weapon/grenade/attack_self(mob/user)
|
||||
if(!active)
|
||||
if(clown_check(user))
|
||||
user << "<span class='warning'>You prime the [name]! [det_time/10] seconds!</span>"
|
||||
to_chat(user, "<span class='warning'>You prime the [name]! [det_time/10] seconds!</span>")
|
||||
playsound(user.loc, 'sound/weapons/armbomb.ogg', 60, 1)
|
||||
active = 1
|
||||
icon_state = initial(icon_state) + "_active"
|
||||
@@ -79,16 +79,16 @@
|
||||
switch(det_time)
|
||||
if ("1")
|
||||
det_time = 10
|
||||
user << "<span class='notice'>You set the [name] for 1 second detonation time.</span>"
|
||||
to_chat(user, "<span class='notice'>You set the [name] for 1 second detonation time.</span>")
|
||||
if ("10")
|
||||
det_time = 30
|
||||
user << "<span class='notice'>You set the [name] for 3 second detonation time.</span>"
|
||||
to_chat(user, "<span class='notice'>You set the [name] for 3 second detonation time.</span>")
|
||||
if ("30")
|
||||
det_time = 50
|
||||
user << "<span class='notice'>You set the [name] for 5 second detonation time.</span>"
|
||||
to_chat(user, "<span class='notice'>You set the [name] for 5 second detonation time.</span>")
|
||||
if ("50")
|
||||
det_time = 1
|
||||
user << "<span class='notice'>You set the [name] for instant detonation.</span>"
|
||||
to_chat(user, "<span class='notice'>You set the [name] for instant detonation.</span>")
|
||||
add_fingerprint(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -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)
|
||||
Reference in New Issue
Block a user