Merge remote-tracking branch 'refs/remotes/origin/master' into upstream-merge-27268
This commit is contained in:
@@ -504,6 +504,113 @@
|
||||
S.change_head_color(color2)
|
||||
dropped = TRUE
|
||||
|
||||
//Peacekeeper Cyborg Projectile Dampenening Field
|
||||
/obj/item/borg/projectile_dampen
|
||||
name = "Hyperkinetic Dampening projector"
|
||||
desc = "A device that projects a dampening field that weakens kinetic energy above a certain threshold. <span class='boldnotice'>Projects a field that drains power per second \
|
||||
while active, that will weaken and slow damaging projectiles inside its field.</span> Still being a prototype, it tends to induce a charge on ungrounded metallic surfaces."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "shield"
|
||||
var/maxenergy = 1500
|
||||
var/energy = 1500
|
||||
var/energy_recharge = 7.5
|
||||
var/energy_recharge_cyborg_drain_coefficient = 0.4
|
||||
var/cyborg_cell_critical_percentage = 0.05
|
||||
var/mob/living/silicon/robot/host = null
|
||||
var/datum/proximity_monitor/advanced/dampening_field
|
||||
var/projectile_damage_coefficient = 0.5
|
||||
var/projectile_damage_tick_ecost_coefficient = 2 //Lasers get half their damage chopped off, drains 50 power/tick. Note that fields are processed 5 times per second.
|
||||
var/projectile_speed_coefficient = 1.5 //Higher the coefficient slower the projectile.
|
||||
var/projectile_tick_speed_ecost = 15
|
||||
var/current_damage_dampening = 0
|
||||
var/list/obj/item/projectile/tracked
|
||||
var/image/projectile_effect
|
||||
var/field_radius = 3
|
||||
|
||||
/obj/item/borg/projectile_dampen/debug
|
||||
maxenergy = 50000
|
||||
energy = 50000
|
||||
energy_recharge = 5000
|
||||
|
||||
/obj/item/borg/projectile_dampen/Initialize()
|
||||
. = ..()
|
||||
projectile_effect = image('icons/effects/fields.dmi', "projectile_dampen_effect")
|
||||
tracked = list()
|
||||
icon_state = "shield0"
|
||||
START_PROCESSING(SSfastprocess, src)
|
||||
|
||||
/obj/item/borg/projectile_dampen/Destroy()
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/borg/projectile_dampen/attack_self(mob/user)
|
||||
var/active = FALSE
|
||||
if(!istype(dampening_field))
|
||||
activate_field()
|
||||
active = TRUE
|
||||
else
|
||||
deactivate_field()
|
||||
active = FALSE
|
||||
to_chat(user, "<span class='boldnotice'>You [active? "activate":"deactivate"] the [src].</span>")
|
||||
icon_state = "[initial(icon_state)][active]"
|
||||
|
||||
/obj/item/borg/projectile_dampen/proc/activate_field()
|
||||
if(!istype(dampening_field))
|
||||
dampening_field = make_field(/datum/proximity_monitor/advanced/peaceborg_dampener, list("current_range" = field_radius, "host" = src, "projector" = src))
|
||||
|
||||
/obj/item/borg/projectile_dampen/proc/deactivate_field()
|
||||
QDEL_NULL(dampening_field)
|
||||
visible_message("<span class='warning'>The [src] shuts off!</span>")
|
||||
for(var/obj/item/projectile/P in tracked)
|
||||
restore_projectile(P)
|
||||
|
||||
/obj/item/borg/projectile_dampen/process()
|
||||
process_recharge()
|
||||
process_usage()
|
||||
update_location()
|
||||
|
||||
/obj/item/borg/projectile_dampen/proc/update_location()
|
||||
if(dampening_field)
|
||||
dampening_field.HandleMove()
|
||||
|
||||
/obj/item/borg/projectile_dampen/proc/process_usage()
|
||||
var/usage = 0
|
||||
for(var/I in tracked)
|
||||
if(!tracked[I]) //No damage
|
||||
continue
|
||||
usage += projectile_tick_speed_ecost
|
||||
usage += (current_damage_dampening * projectile_damage_tick_ecost_coefficient)
|
||||
energy = Clamp(energy - usage, 0, maxenergy)
|
||||
if(energy <= 0)
|
||||
deactivate_field()
|
||||
visible_message("<span class='warning'>The [src] blinks \"ENERGY DEPLETED\"</span>")
|
||||
|
||||
/obj/item/borg/projectile_dampen/proc/process_recharge()
|
||||
if(!istype(host))
|
||||
energy = Clamp(energy + energy_recharge, 0, maxenergy)
|
||||
return
|
||||
if((host.cell.charge >= (host.cell.maxcharge * cyborg_cell_critical_percentage)) && (energy < maxenergy))
|
||||
host.cell.use(energy_recharge*energy_recharge_cyborg_drain_coefficient)
|
||||
energy += energy_recharge
|
||||
|
||||
/obj/item/borg/projectile_dampen/proc/dampen_projectile(obj/item/projectile/P, track_projectile = TRUE)
|
||||
if(tracked[P])
|
||||
return
|
||||
if(track_projectile)
|
||||
tracked[P] = P.damage
|
||||
current_damage_dampening += P.damage
|
||||
P.damage *= projectile_damage_coefficient
|
||||
P.speed *= projectile_speed_coefficient
|
||||
P.add_overlay(projectile_effect)
|
||||
|
||||
/obj/item/borg/projectile_dampen/proc/restore_projectile(obj/item/projectile/P)
|
||||
tracked -= P
|
||||
P.damage *= (1/projectile_damage_coefficient)
|
||||
P.speed *= (1/projectile_speed_coefficient)
|
||||
P.cut_overlay(projectile_effect)
|
||||
current_damage_dampening -= P.damage
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
HUD/SIGHT things
|
||||
***********************************************************************/
|
||||
|
||||
@@ -279,6 +279,28 @@
|
||||
resistance_flags = FLAMMABLE
|
||||
|
||||
|
||||
/obj/item/toy/windupToolbox
|
||||
name = "windup toolbox"
|
||||
desc = "A replica toolbox that rumbles when you turn the key"
|
||||
icon_state = "his_grace"
|
||||
item_state = "artistic_toolbox"
|
||||
var/active = FALSE
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
attack_verb = list("robusted")
|
||||
|
||||
/obj/item/toy/windupToolbox/attack_self(mob/user)
|
||||
if(!active)
|
||||
icon_state = "his_grace_awakened"
|
||||
to_chat(user, "<span class='warning'>You wind up [src], it begins to rumble.</span>")
|
||||
active = TRUE
|
||||
addtimer(CALLBACK(src, .proc/stopRumble), 600)
|
||||
else
|
||||
to_chat(user, "[src] is already active.")
|
||||
|
||||
/obj/item/toy/windupToolbox/proc/stopRumble()
|
||||
icon_state = initial(icon_state)
|
||||
active = FALSE
|
||||
|
||||
/*
|
||||
* Subtype of Double-Bladed Energy Swords
|
||||
*/
|
||||
|
||||
@@ -472,8 +472,10 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
var/lit = 0
|
||||
var/fancy = TRUE
|
||||
heat = 1500
|
||||
resistance_flags = FIRE_PROOF
|
||||
light_color = LIGHT_COLOR_FIRE
|
||||
|
||||
/obj/item/weapon/lighter/update_icon()
|
||||
if(lit)
|
||||
@@ -484,37 +486,28 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
/obj/item/weapon/lighter/ignition_effect(atom/A, mob/user)
|
||||
. = "<span class='rose'>With a single flick of their wrist, [user] smoothly lights [A] with [src]. Damn [user.p_theyre()] cool.</span>"
|
||||
|
||||
/obj/item/weapon/lighter/greyscale
|
||||
name = "cheap lighter"
|
||||
desc = "A cheap-as-free lighter."
|
||||
icon_state = "lighter"
|
||||
|
||||
/obj/item/weapon/lighter/greyscale/Initialize()
|
||||
. = ..()
|
||||
add_atom_colour(color2hex(randomColor(1)), FIXED_COLOUR_PRIORITY)
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/lighter/greyscale/update_icon()
|
||||
cut_overlays()
|
||||
var/mutable_appearance/base_overlay = mutable_appearance(icon,"[initial(icon_state)]_base")
|
||||
base_overlay.appearance_flags = RESET_COLOR //the edging doesn't change color
|
||||
/obj/item/weapon/lighter/proc/set_lit(new_lit)
|
||||
lit = new_lit
|
||||
if(lit)
|
||||
base_overlay.icon_state = "[initial(icon_state)]_on"
|
||||
add_overlay(base_overlay)
|
||||
|
||||
/obj/item/weapon/lighter/greyscale/ignition_effect(atom/A, mob/user)
|
||||
. = "<span class='notice'>After some fiddling, [user] manages to light [A] with [src].</span>"
|
||||
force = 5
|
||||
damtype = "fire"
|
||||
hitsound = 'sound/items/welder.ogg'
|
||||
attack_verb = list("burnt", "singed")
|
||||
set_light(1)
|
||||
START_PROCESSING(SSobj, src)
|
||||
else
|
||||
hitsound = "swing_hit"
|
||||
force = 0
|
||||
attack_verb = null //human_defense.dm takes care of it
|
||||
set_light(0)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/lighter/attack_self(mob/living/user)
|
||||
if(user.is_holding(src))
|
||||
if(!lit)
|
||||
lit = 1
|
||||
update_icon()
|
||||
force = 5
|
||||
damtype = "fire"
|
||||
hitsound = 'sound/items/welder.ogg'
|
||||
attack_verb = list("burnt", "singed")
|
||||
if(!istype(src, /obj/item/weapon/lighter/greyscale))
|
||||
set_lit(TRUE)
|
||||
if(fancy)
|
||||
user.visible_message("Without even breaking stride, [user] flips open and lights [src] in one smooth movement.", "<span class='notice'>Without even breaking stride, you flip open and lights [src] in one smooth movement.</span>")
|
||||
else
|
||||
var/prot = FALSE
|
||||
@@ -534,20 +527,12 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
user.apply_damage(5, BURN, hitzone)
|
||||
user.visible_message("<span class='warning'>After a few attempts, [user] manages to light [src] - however, [user.p_they()] burn their finger in the process.</span>", "<span class='warning'>You burn yourself while lighting the lighter!</span>")
|
||||
|
||||
set_light(1)
|
||||
START_PROCESSING(SSobj, src)
|
||||
else
|
||||
lit = 0
|
||||
update_icon()
|
||||
hitsound = "swing_hit"
|
||||
force = 0
|
||||
attack_verb = null //human_defense.dm takes care of it
|
||||
if(!istype(src, /obj/item/weapon/lighter/greyscale))
|
||||
set_lit(FALSE)
|
||||
if(fancy)
|
||||
user.visible_message("You hear a quiet click, as [user] shuts off [src] without even looking at what [user.p_theyre()] doing. Wow.", "<span class='notice'>You quietly shut off [src] without even looking at what you're doing. Wow.</span>")
|
||||
else
|
||||
user.visible_message("[user] quietly shuts off [src].", "<span class='notice'>You quietly shut off [src].")
|
||||
set_light(0)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
else
|
||||
. = ..()
|
||||
|
||||
@@ -562,7 +547,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
if(M == user)
|
||||
cig.attackby(src, user)
|
||||
else
|
||||
if(!istype(src, /obj/item/weapon/lighter/greyscale))
|
||||
if(fancy)
|
||||
cig.light("<span class='rose'>[user] whips the [name] out and holds it for [M]. [user.p_their(TRUE)] arm is as steady as the unflickering flame they light \the [cig] with.</span>")
|
||||
else
|
||||
cig.light("<span class='notice'>[user] holds the [name] out for [M], and lights the [cig.name].</span>")
|
||||
@@ -575,6 +560,30 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
/obj/item/weapon/lighter/is_hot()
|
||||
return lit * heat
|
||||
|
||||
|
||||
/obj/item/weapon/lighter/greyscale
|
||||
name = "cheap lighter"
|
||||
desc = "A cheap-as-free lighter."
|
||||
icon_state = "lighter"
|
||||
fancy = FALSE
|
||||
|
||||
/obj/item/weapon/lighter/greyscale/Initialize()
|
||||
. = ..()
|
||||
add_atom_colour(color2hex(randomColor(1)), FIXED_COLOUR_PRIORITY)
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/lighter/greyscale/update_icon()
|
||||
cut_overlays()
|
||||
var/mutable_appearance/base_overlay = mutable_appearance(icon,"[initial(icon_state)]_base")
|
||||
base_overlay.appearance_flags = RESET_COLOR //the edging doesn't change color
|
||||
if(lit)
|
||||
base_overlay.icon_state = "[initial(icon_state)]_on"
|
||||
add_overlay(base_overlay)
|
||||
|
||||
/obj/item/weapon/lighter/greyscale/ignition_effect(atom/A, mob/user)
|
||||
. = "<span class='notice'>After some fiddling, [user] manages to light [A] with [src].</span>"
|
||||
|
||||
|
||||
///////////
|
||||
//ROLLING//
|
||||
///////////
|
||||
|
||||
@@ -50,9 +50,7 @@
|
||||
M.dna.uni_identity = merge_text(M.dna.uni_identity, fields["UI"])
|
||||
M.updateappearance(mutations_overlay_update=1)
|
||||
log_attack(log_msg)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>It appears that [M] does not have compatible DNA.</span>")
|
||||
return
|
||||
return TRUE
|
||||
|
||||
/obj/item/weapon/dnainjector/attack(mob/target, mob/user)
|
||||
if(!user.IsAdvancedToolUser())
|
||||
@@ -79,7 +77,9 @@
|
||||
|
||||
add_logs(user, target, "injected", src)
|
||||
|
||||
inject(target, user) //Now we actually do the heavy lifting.
|
||||
if(!inject(target, user)) //Now we actually do the heavy lifting.
|
||||
to_chat(user, "<span class='notice'>It appears that [target] does not have compatible DNA.</span>")
|
||||
|
||||
used = 1
|
||||
icon_state = "dnainjector0"
|
||||
desc += " This one is used up."
|
||||
|
||||
@@ -48,23 +48,27 @@
|
||||
/obj/item/weapon/grenade/attack_self(mob/user)
|
||||
if(!active)
|
||||
if(clown_check(user))
|
||||
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"
|
||||
add_fingerprint(user)
|
||||
var/turf/bombturf = get_turf(src)
|
||||
var/area/A = get_area(bombturf)
|
||||
var/message = "[ADMIN_LOOKUPFLW(user)]) has primed a [name] for detonation at [ADMIN_COORDJMP(bombturf)]"
|
||||
GLOB.bombers += message
|
||||
message_admins(message)
|
||||
log_game("[key_name(usr)] has primed a [name] for detonation at [A.name] [COORD(bombturf)].")
|
||||
preprime(user)
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
C.throw_mode_on()
|
||||
spawn(det_time)
|
||||
prime()
|
||||
|
||||
/obj/item/weapon/grenade/proc/preprime(mob/user)
|
||||
if(user)
|
||||
to_chat(user, "<span class='warning'>You prime the [name]! [det_time/10] seconds!</span>")
|
||||
playsound(loc, 'sound/weapons/armbomb.ogg', 60, 1)
|
||||
active = TRUE
|
||||
icon_state = initial(icon_state) + "_active"
|
||||
add_fingerprint(user)
|
||||
var/turf/bombturf = get_turf(src)
|
||||
var/area/A = get_area(bombturf)
|
||||
if(user)
|
||||
var/message = "[ADMIN_LOOKUPFLW(user)]) has primed a [name] for detonation at [ADMIN_COORDJMP(bombturf)]"
|
||||
GLOB.bombers += message
|
||||
message_admins(message)
|
||||
log_game("[key_name(usr)] has primed a [name] for detonation at [A.name] [COORD(bombturf)].")
|
||||
|
||||
addtimer(CALLBACK(src, .proc/prime), det_time)
|
||||
|
||||
/obj/item/weapon/grenade/proc/prime()
|
||||
|
||||
@@ -104,4 +108,4 @@
|
||||
if(damage && attack_type == PROJECTILE_ATTACK && prob(15))
|
||||
owner.visible_message("<span class='danger'>[attack_text] hits [owner]'s [src], setting it off! What a shot!</span>")
|
||||
prime()
|
||||
return 1 //It hit the grenade, not them
|
||||
return 1 //It hit the grenade, not them
|
||||
|
||||
@@ -18,6 +18,10 @@
|
||||
plastic_overlay = mutable_appearance(icon, "[item_state]2")
|
||||
..()
|
||||
|
||||
/obj/item/weapon/grenade/plastic/Initialize(mapload)
|
||||
. = ..()
|
||||
SET_SECONDARY_FLAG(src, NO_EMP_WIRES)
|
||||
|
||||
/obj/item/weapon/grenade/plastic/Destroy()
|
||||
qdel(nadeassembly)
|
||||
nadeassembly = null
|
||||
|
||||
@@ -244,7 +244,7 @@
|
||||
range_multiplier = 3
|
||||
fire_mode = PCANNON_FIFO
|
||||
throw_amount = 1
|
||||
maxWeightClass = 100 //50 pies. :^)
|
||||
maxWeightClass = 150 //50 pies. :^)
|
||||
clumsyCheck = FALSE
|
||||
|
||||
/obj/item/weapon/pneumatic_cannon/pie/can_load_item(obj/item/I, mob/user)
|
||||
@@ -252,3 +252,22 @@
|
||||
return ..()
|
||||
to_chat(user, "<span class='warning'>[src] only accepts pies!</span>")
|
||||
return FALSE
|
||||
|
||||
/obj/item/weapon/pneumatic_cannon/pie/selfcharge
|
||||
automatic = TRUE
|
||||
var/charge_amount = 1
|
||||
var/charge_ticks = 1
|
||||
var/charge_tick = 0
|
||||
maxWeightClass = 60 //20 pies.
|
||||
|
||||
/obj/item/weapon/pneumatic_cannon/pie/selfcharge/Initialize()
|
||||
. = ..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/weapon/pneumatic_cannon/pie/selfcharge/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/pneumatic_cannon/pie/selfcharge/process()
|
||||
if(++charge_tick >= charge_ticks)
|
||||
fill_with_type(/obj/item/weapon/reagent_containers/food/snacks/pie, charge_amount)
|
||||
|
||||
@@ -140,6 +140,8 @@
|
||||
item_state = "plasmaman_tank_belt"
|
||||
slot_flags = SLOT_BELT
|
||||
force = 5
|
||||
volume = 3
|
||||
w_class = WEIGHT_CLASS_SMALL //thanks i forgot this
|
||||
|
||||
/obj/item/weapon/tank/internals/plasmaman/belt/full/New()
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user