module things, jfc

This commit is contained in:
Poojawa
2018-09-11 07:51:01 -05:00
parent 8b9ef1e400
commit 284e9d0325
695 changed files with 11343 additions and 5661 deletions
@@ -21,6 +21,9 @@
var/heavy_metal = TRUE
var/harmful = TRUE //pacifism check for boolet, set to FALSE if bullet is non-lethal
/obj/item/ammo_casing/spent
name = "spent bullet casing"
BB = null
/obj/item/ammo_casing/Initialize()
. = ..()
@@ -34,7 +37,7 @@
/obj/item/ammo_casing/update_icon()
..()
icon_state = "[initial(icon_state)][BB ? "-live" : ""]"
desc = "[initial(desc)][BB ? "" : " This one is spent"]"
desc = "[initial(desc)][BB ? "" : " This one is spent."]"
//proc to magically refill a casing with a new projectile
/obj/item/ammo_casing/proc/newshot() //For energy weapons, syringe gun, shotgun shells and wands (!).
@@ -92,10 +92,12 @@
variance = 35
/obj/item/ammo_casing/shotgun/laserslug
name = "laser slug"
desc = "An advanced shotgun shell that uses a micro laser to replicate the effects of a laser weapon in a ballistic package."
name = "scatter laser shell"
desc = "An advanced shotgun shell that uses a micro laser to replicate the effects of a scatter laser weapon in a ballistic package."
icon_state = "lshell"
projectile_type = /obj/item/projectile/beam/laser
projectile_type = /obj/item/projectile/beam/weak
pellets = 6
variance = 35
/obj/item/ammo_casing/shotgun/techshell
name = "unloaded technological shell"
@@ -8,15 +8,15 @@
throw_speed = 3
/obj/item/ammo_casing/caseless/laser
name = "laser casing"
desc = "You shouldn't be seeing this."
caliber = "laser"
icon_state = "s-casing-live"
projectile_type = /obj/item/projectile/beam
fire_sound = 'sound/weapons/laser.ogg'
firing_effect_type = /obj/effect/temp_visual/dir_setting/firing_effect/energy
name = "laser casing"
desc = "You shouldn't be seeing this."
caliber = "laser"
icon_state = "s-casing-live"
projectile_type = /obj/item/projectile/beam
fire_sound = 'sound/weapons/laser.ogg'
firing_effect_type = /obj/effect/temp_visual/dir_setting/firing_effect/energy
/obj/item/ammo_casing/caseless/laser/gatling
projectile_type = /obj/item/projectile/beam/weak
projectile_type = /obj/item/projectile/beam/weak/penetrator
variance = 0.8
click_cooldown_override = 1
@@ -1,36 +1,29 @@
/obj/item/ammo_casing/energy/gravityrepulse
/obj/item/ammo_casing/energy/gravity
e_cost = 0
fire_sound = 'sound/weapons/wave.ogg'
select_name = "gravity"
delay = 50
var/obj/item/gun/energy/gravity_gun/gun
/obj/item/ammo_casing/energy/gravity/Initialize(mapload)
if(istype(loc,/obj/item/gun/energy/gravity_gun))
gun = loc
. = ..()
/obj/item/ammo_casing/energy/gravity/Destroy()
gun = null
. = ..()
/obj/item/ammo_casing/energy/gravity/repulse
projectile_type = /obj/item/projectile/gravityrepulse
e_cost = 0
fire_sound = 'sound/weapons/wave.ogg'
select_name = "repulse"
delay = 50
var/obj/item/gun/energy/gravity_gun/gun
/obj/item/ammo_casing/energy/gravityrepulse/Initialize(mapload, obj/item/gun/energy/gravity_gun/G)
gun = G
. = ..()
/obj/item/ammo_casing/energy/gravityattract
/obj/item/ammo_casing/energy/gravity/attract
projectile_type = /obj/item/projectile/gravityattract
e_cost = 0
fire_sound = 'sound/weapons/wave.ogg'
select_name = "attract"
delay = 50
var/obj/item/gun/energy/gravity_gun/gun
/obj/item/ammo_casing/energy/gravityattract/Initialize(mapload, obj/item/gun/energy/gravity_gun/G)
gun = G
. = ..()
/obj/item/ammo_casing/energy/gravitychaos
/obj/item/ammo_casing/energy/gravity/chaos
projectile_type = /obj/item/projectile/gravitychaos
e_cost = 0
fire_sound = 'sound/weapons/wave.ogg'
select_name = "chaos"
delay = 50
var/obj/item/gun/energy/gravity_gun/gun
/obj/item/ammo_casing/energy/gravitychaos/Initialize(mapload, obj/item/gun/energy/gravity_gun/G)
gun = G
. = ..()
@@ -38,8 +38,8 @@
/obj/item/ammo_casing/magic/arcane_barrage
projectile_type = /obj/item/projectile/magic/arcane_barrage
/obj/item/ammo_casing/magic/chaos/newshot()
..()
/obj/item/ammo_casing/magic/honk
projectile_type = /obj/item/projectile/bullet/honker
/obj/item/ammo_casing/magic/locker
projectile_type = /obj/item/projectile/magic/locker
@@ -1,14 +1,14 @@
/obj/item/ammo_box/magazine/recharge
name = "power pack"
desc = "A rechargeable, detachable battery that serves as a magazine for laser rifles."
icon_state = "oldrifle-20"
ammo_type = /obj/item/ammo_casing/caseless/laser
caliber = "laser"
max_ammo = 20
name = "power pack"
desc = "A rechargeable, detachable battery that serves as a magazine for laser rifles."
icon_state = "oldrifle-20"
ammo_type = /obj/item/ammo_casing/caseless/laser
caliber = "laser"
max_ammo = 20
/obj/item/ammo_box/magazine/recharge/update_icon()
desc = "[initial(desc)] It has [stored_ammo.len] shot\s left."
icon_state = "oldrifle-[round(ammo_count(),4)]"
/obj/item/ammo_box/magazine/recharge/attack_self() //No popping out the "bullets"
return
return
+17 -18
View File
@@ -49,8 +49,6 @@
var/datum/action/item_action/toggle_gunlight/alight
var/mutable_appearance/flashlight_overlay
var/list/upgrades = list()
var/ammo_x_offset = 0 //used for positioning ammo count overlay on sprite
var/ammo_y_offset = 0
var/flight_x_offset = 0
@@ -133,6 +131,9 @@
O.emp_act(severity)
/obj/item/gun/afterattack(atom/target, mob/living/user, flag, params)
. = ..()
if(!target)
return
if(firing_burst)
return
if(flag) //It's adjacent, is the user, or is on the user's person
@@ -177,7 +178,6 @@
var/loop_counter = 0
bonus_spread += getinaccuracy(user) //CIT CHANGE - adds bonus spread while not aiming
if(ishuman(user) && user.a_intent == INTENT_HARM)
var/mob/living/carbon/human/H = user
for(var/obj/item/gun/G in H.held_items)
@@ -337,22 +337,21 @@
if(loc == user)
alight.Grant(user)
else if(istype(I, /obj/item/kitchen/knife))
if(!can_bayonet)
return ..()
var/obj/item/kitchen/knife/K = I
if(!bayonet)
if(!user.transferItemToLoc(I, src))
return
to_chat(user, "<span class='notice'>You attach \the [K] to the front of \the [src].</span>")
bayonet = K
var/state = "bayonet" //Generic state.
if(bayonet.icon_state in icon_states('icons/obj/guns/bayonets.dmi')) //Snowflake state?
state = bayonet.icon_state
var/icon/bayonet_icons = 'icons/obj/guns/bayonets.dmi'
knife_overlay = mutable_appearance(bayonet_icons, state)
knife_overlay.pixel_x = knife_x_offset
knife_overlay.pixel_y = knife_y_offset
add_overlay(knife_overlay, TRUE)
if(!can_bayonet || !K.bayonet || bayonet) //ensure the gun has an attachment point available, and that the knife is compatible with it.
return ..()
if(!user.transferItemToLoc(I, src))
return
to_chat(user, "<span class='notice'>You attach \the [K] to the front of \the [src].</span>")
bayonet = K
var/state = "bayonet" //Generic state.
if(bayonet.icon_state in icon_states('icons/obj/guns/bayonets.dmi')) //Snowflake state?
state = bayonet.icon_state
var/icon/bayonet_icons = 'icons/obj/guns/bayonets.dmi'
knife_overlay = mutable_appearance(bayonet_icons, state)
knife_overlay.pixel_x = knife_x_offset
knife_overlay.pixel_y = knife_y_offset
add_overlay(knife_overlay, TRUE)
else if(istype(I, /obj/item/screwdriver))
if(gun_light)
var/obj/item/flashlight/seclite/S = gun_light
+1 -1
View File
@@ -121,7 +121,7 @@
user.put_in_hands(magazine)
magazine.update_icon()
if(magazine.ammo_count())
playsound(src, "sound/weapons/gun_magazine_remove_full.ogg", 70, 1)
playsound(src, 'sound/weapons/gun_magazine_remove_full.ogg', 70, 1)
else
playsound(src, "gun_remove_empty_magazine", 70, 1)
magazine = null
@@ -104,7 +104,7 @@
update_icon()
/obj/item/gun/ballistic/automatic/c20r/afterattack()
..()
. = ..()
empty_alarm()
return
@@ -167,7 +167,7 @@
if(select == 2)
underbarrel.afterattack(target, user, flag, params)
else
..()
. = ..()
return
/obj/item/gun/ballistic/automatic/m90/attackby(obj/item/A, mob/user, params)
if(istype(A, /obj/item/ammo_casing))
@@ -264,7 +264,7 @@
icon_state = "bulldog[chambered ? "" : "-e"]"
/obj/item/gun/ballistic/automatic/shotgun/bulldog/afterattack()
..()
. = ..()
empty_alarm()
return
@@ -286,6 +286,7 @@
can_suppress = FALSE
burst_size = 3
fire_delay = 1
spread = 7
pin = /obj/item/firing_pin/implant/pindicate
/obj/item/gun/ballistic/automatic/l6_saw/unrestricted
@@ -317,7 +318,7 @@
if(cover_open)
to_chat(user, "<span class='warning'>[src]'s cover is open! Close it before firing!</span>")
else
..()
. = ..()
update_icon()
//ATTACK HAND IGNORING PARENT RETURN VALUE
@@ -141,7 +141,7 @@
/obj/item/gun/ballistic/minigun/afterattack(atom/target, mob/living/user, flag, params)
if(!ammo_pack || ammo_pack.loc != user)
to_chat(user, "You need the backpack power source to fire the gun!")
..()
. = ..()
/obj/item/gun/ballistic/minigun/dropped(mob/living/user)
ammo_pack.attach_gun(user)
@@ -9,6 +9,9 @@
fire_delay = 0
actions_types = list()
/obj/item/gun/ballistic/automatic/pistol/no_mag
spawnwithmagazine = FALSE
/obj/item/gun/ballistic/automatic/pistol/update_icon()
..()
icon_state = "[initial(icon_state)][chambered ? "" : "-e"][suppressed ? "-suppressed" : ""]"
@@ -26,6 +29,9 @@
mag_type = /obj/item/ammo_box/magazine/m45
can_suppress = FALSE
/obj/item/gun/ballistic/automatic/pistol/m1911/no_mag
spawnwithmagazine = FALSE
/obj/item/gun/ballistic/automatic/pistol/m1911/kitchengun
name = "\improper Kitchen Gun (TM)"
desc = "Say goodbye to dirt with Kitchen Gun (TM)! Laser sight and night vision accessories sold separately."
@@ -84,3 +90,4 @@
else
to_chat(user, "<span class='notice'>..and falls into view. Whew, that was a close one.</span>")
user.dropItemToGround(src)
@@ -108,6 +108,8 @@
..()
/obj/item/gun/ballistic/revolver/detective/screwdriver_act(mob/living/user, obj/item/I)
if(..())
return TRUE
if(magazine.caliber == "38")
to_chat(user, "<span class='notice'>You begin to reinforce the barrel of [src]...</span>")
if(magazine.ammo_count())
@@ -191,6 +193,8 @@
..()
/obj/item/gun/ballistic/revolver/russian/afterattack(atom/target, mob/living/user, flag, params)
. = ..(null, user, flag, params)
if(flag)
if(!(target in user.contents) && ismob(target))
if(user.a_intent == INTENT_HARM) // Flogging action
@@ -25,7 +25,7 @@
/obj/item/gun/energy/laser/retro/old
name ="laser gun"
icon_state = "retro"
desc = "First generation lasergun, developed by Nanotrasen. Suffers from ammo issues but its unique ability to recharge its ammo without the need of a magazine helps compensate. You really hope someone has developed a better lasergun while you were in cyro."
desc = "First generation lasergun, developed by Nanotrasen. Suffers from ammo issues but its unique ability to recharge its ammo without the need of a magazine helps compensate. You really hope someone has developed a better lasergun while you were in cryo."
ammo_type = list(/obj/item/ammo_casing/energy/lasergun/old)
ammo_x_offset = 3
@@ -295,7 +295,7 @@
/obj/item/gun/energy/gravity_gun
name = "one-point bluespace-gravitational manipulator"
desc = "An experimental, multi-mode device that fires bolts of Zero-Point Energy, causing local distortions in gravity."
ammo_type = list(/obj/item/ammo_casing/energy/gravityrepulse, /obj/item/ammo_casing/energy/gravityattract, /obj/item/ammo_casing/energy/gravitychaos)
ammo_type = list(/obj/item/ammo_casing/energy/gravity/repulse, /obj/item/ammo_casing/energy/gravity/attract, /obj/item/ammo_casing/energy/gravity/chaos)
item_state = "gravity_gun"
icon_state = "gravity_gun"
var/power = 4
+1 -1
View File
@@ -31,7 +31,7 @@
return
else
no_den_usage = 0
..()
. = ..()
/obj/item/gun/magic/can_shoot()
return charges
+13 -1
View File
@@ -43,7 +43,7 @@
no_den_usage = 1
var/allowed_projectile_types = list(/obj/item/projectile/magic/change, /obj/item/projectile/magic/animate, /obj/item/projectile/magic/resurrection,
/obj/item/projectile/magic/death, /obj/item/projectile/magic/teleport, /obj/item/projectile/magic/door, /obj/item/projectile/magic/aoe/fireball,
/obj/item/projectile/magic/spellblade, /obj/item/projectile/magic/arcane_barrage)
/obj/item/projectile/magic/spellblade, /obj/item/projectile/magic/arcane_barrage, /obj/item/projectile/magic/locker)
/obj/item/gun/magic/staff/chaos/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0)
chambered.projectile_type = pick(allowed_projectile_types)
@@ -94,3 +94,15 @@
if(attack_type == PROJECTILE_ATTACK)
final_block_chance = 0
return ..()
/obj/item/gun/magic/staff/locker
name = "staff of the locker"
desc = "An artefact that expells encapsulating bolts, for incapacitating thy enemy."
fire_sound = 'sound/magic/staff_change.ogg'
ammo_type = /obj/item/ammo_casing/magic/locker
icon_state = "locker"
item_state = "locker"
max_charges = 6
recharge_rate = 4
+2 -2
View File
@@ -43,14 +43,14 @@
no_den_usage = 0
zap_self(user)
else
..()
. = ..()
update_icon()
/obj/item/gun/magic/wand/proc/zap_self(mob/living/user)
user.visible_message("<span class='danger'>[user] zaps [user.p_them()]self with [src].</span>")
playsound(user, fire_sound, 50, 1)
user.log_message("zapped [user.p_them()]self with a <b>[src]</b>", INDIVIDUAL_ATTACK_LOG)
user.log_message("zapped [user.p_them()]self with a <b>[src]</b>", LOG_ATTACK)
/////////////////////////////////////
@@ -184,7 +184,7 @@
. = ..()
fire_delay = delay
current_tracers = list()
START_PROCESSING(SSprojectiles, src)
START_PROCESSING(SSfastprocess, src)
zoom_lock_action = new(src)
/obj/item/gun/energy/beam_rifle/Destroy()
@@ -247,17 +247,7 @@
/obj/item/gun/energy/beam_rifle/proc/process_aim()
if(istype(current_user) && current_user.client && current_user.client.mouseParams)
var/angle = mouse_angle_from_client(current_user.client)
switch(angle)
if(316 to 360)
current_user.setDir(NORTH)
if(0 to 45)
current_user.setDir(NORTH)
if(46 to 135)
current_user.setDir(EAST)
if(136 to 225)
current_user.setDir(SOUTH)
if(226 to 315)
current_user.setDir(WEST)
current_user.setDir(angle2dir_cardinal(angle))
var/difference = abs(closer_angle_difference(lastangle, angle))
delay_penalty(difference * aiming_time_increase_angle_multiplier)
lastangle = angle
@@ -295,7 +285,7 @@
if(istype(user))
current_user = user
LAZYOR(current_user.mousemove_intercept_objects, src)
mobhook = user.AddComponent(/datum/component/redirect, list(COMSIG_MOVABLE_MOVED), CALLBACK(src, .proc/on_mob_move))
mobhook = user.AddComponent(/datum/component/redirect, list(COMSIG_MOVABLE_MOVED = CALLBACK(src, .proc/on_mob_move)))
/obj/item/gun/energy/beam_rifle/onMouseDrag(src_object, over_object, src_location, over_location, params, mob)
if(aiming)
@@ -535,7 +525,7 @@
if(!QDELETED(target))
handle_impact(target)
/obj/item/projectile/beam/beam_rifle/Collide(atom/target)
/obj/item/projectile/beam/beam_rifle/Bump(atom/target)
if(check_pierce(target))
permutated += target
trajectory_ignore_forcemove = TRUE
@@ -28,16 +28,10 @@
else
to_chat(usr, "<span class='danger'>The grenade launcher cannot hold more grenades.</span>")
/obj/item/gun/grenadelauncher/afterattack(obj/target, mob/user , flag)
if(target == user)
return
/obj/item/gun/grenadelauncher/can_shoot()
return grenades.len
if(grenades.len)
fire_grenade(target,user)
else
to_chat(user, "<span class='danger'>The grenade launcher is empty.</span>")
/obj/item/gun/grenadelauncher/proc/fire_grenade(atom/target, mob/user)
/obj/item/gun/grenadelauncher/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0)
user.visible_message("<span class='danger'>[user] fired a grenade!</span>", \
"<span class='danger'>You fire the grenade launcher!</span>")
var/obj/item/grenade/F = grenades[1] //Now with less copypasta!
+6 -2
View File
@@ -19,6 +19,7 @@
gun = newloc
/obj/item/firing_pin/afterattack(atom/target, mob/user, proximity_flag)
. = ..()
if(proximity_flag)
if(istype(target, /obj/item/gun))
var/obj/item/gun/G = target
@@ -56,7 +57,8 @@
return TRUE
/obj/item/firing_pin/proc/auth_fail(mob/living/user)
user.show_message(fail_message, 1)
if(user)
user.show_message(fail_message, 1)
if(selfdestruct)
user.show_message("<span class='danger'>SELF-DESTRUCTING...</span><br>", 1)
to_chat(user, "<span class='userdanger'>[gun] explodes!</span>")
@@ -79,6 +81,8 @@
pin_removeable = TRUE
/obj/item/firing_pin/test_range/pin_auth(mob/living/user)
if(!istype(user))
return FALSE
for(var/obj/machinery/magnetic_controller/M in range(user, 3))
return TRUE
return FALSE
@@ -156,7 +160,7 @@
var/unique_enzymes = null
/obj/item/firing_pin/dna/afterattack(atom/target, mob/user, proximity_flag)
..()
. = ..()
if(proximity_flag && iscarbon(target))
var/mob/living/carbon/M = target
if(M.dna && M.dna.unique_enzymes)
+11 -14
View File
@@ -16,7 +16,7 @@
resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
var/def_zone = "" //Aiming at
var/mob/firer = null//Who shot it
var/atom/movable/firer = null//Who shot it
var/suppressed = FALSE //Attack message
var/yo = null
var/xo = null
@@ -191,7 +191,11 @@
reagent_note += R.id + " ("
reagent_note += num2text(R.volume) + ") "
add_logs(firer, L, "shot", src, reagent_note)
if(ismob(firer))
log_combat(firer, L, "shot", src, reagent_note)
else
L.log_message("has been shot by [firer] with [src]", LOG_ATTACK, color="orange")
return L.apply_effects(stun, knockdown, unconscious, irradiate, slur, stutter, eyeblur, drowsy, blocked, stamina, jitter)
/obj/item/projectile/proc/vol_by_damage()
@@ -208,7 +212,7 @@
beam_index = pcache
beam_segments[beam_index] = null
/obj/item/projectile/Collide(atom/A)
/obj/item/projectile/Bump(atom/A)
var/datum/point/pcache = trajectory.copy_to()
if(check_ricochet(A) && check_ricochet_flag(A) && ricochets < ricochets_max)
ricochets++
@@ -335,7 +339,7 @@
/obj/item/projectile/proc/fire(angle, atom/direct_target)
//If no angle needs to resolve it from xo/yo!
if(!log_override && firer && original)
add_logs(firer, original, "fired at", src, "from [get_area_name(src, TRUE)]")
log_combat(firer, original, "fired at", src, "from [get_area_name(src, TRUE)]")
if(direct_target)
if(prehit(direct_target))
direct_target.bullet_act(src, def_zone)
@@ -430,7 +434,7 @@
continue
if(safety-- <= 0)
if(loc)
Collide(loc)
Bump(loc)
if(!QDELETED(src))
qdel(src)
return //Kill!
@@ -471,7 +475,7 @@
step_towards(src, T)
hitscan_last = loc
if(can_hit_target(original, permutated))
Collide(original)
Bump(original)
if(!hitscanning && !forcemoved)
pixel_x = trajectory.return_px() - trajectory.mpx * trajectory_multiplier * SSprojectiles.global_iterations_per_move
pixel_y = trajectory.return_py() - trajectory.mpy * trajectory_multiplier * SSprojectiles.global_iterations_per_move
@@ -517,13 +521,6 @@
xo = targloc.x - curloc.x
setAngle(Get_Angle(src, targloc) + spread)
//CIT CHANGES START HERE - makes it so laying down makes you unable to shoot through most objects
if(iscarbon(source))
var/mob/living/carbon/checklad = source
if(istype(checklad) && checklad.resting)
pass_flags = 0
//END OF CIT CHANGES
if(isliving(source) && params)
var/list/calculated = calculate_projectile_angle_and_pixel_offsets(source, params)
p_x = calculated[2]
@@ -572,7 +569,7 @@
/obj/item/projectile/Crossed(atom/movable/AM) //A mob moving on a tile with a projectile is hit by it.
..()
if(isliving(AM) && (AM.density || AM == original) && !(src.pass_flags & PASSMOB))
Collide(AM)
Bump(AM)
/obj/item/projectile/Destroy()
if(hitscan)
+4 -2
View File
@@ -38,6 +38,8 @@
/obj/item/projectile/beam/weak
damage = 15
/obj/item/projectile/beam/weak/penetrator
armour_penetration = 50
/obj/item/projectile/beam/practice
@@ -54,7 +56,7 @@
name = "\improper X-ray beam"
icon_state = "xray"
damage = 15
irradiate = 30
irradiate = 300
range = 15
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE | PASSCLOSEDTURF
@@ -67,7 +69,7 @@
/obj/item/projectile/beam/disabler
name = "disabler beam"
icon_state = "omnilaser"
damage = 24
damage = 36
damage_type = STAMINA
flag = "energy"
hitsound = 'sound/weapons/tap.ogg'
@@ -40,5 +40,5 @@
/obj/item/projectile/bullet/incendiary/mm195x129
name = "1.95x129mm incendiary bullet"
damage = 15
damage = 20
fire_stacks = 3
@@ -14,9 +14,7 @@
/obj/item/projectile/bullet/c38
name = ".38 bullet"
damage = 15
knockdown = 60
stamina = 50
damage = 25
// .357 (Syndie Revolver)
@@ -3,7 +3,7 @@
icon_state = "declone"
damage = 20
damage_type = CLONE
irradiate = 10
irradiate = 100
impact_effect_type = /obj/effect/temp_visual/impact_effect/green_laser
/obj/item/projectile/energy/dart //ninja throwing dart
@@ -21,7 +21,7 @@
SEND_SIGNAL(C, COMSIG_ADD_MOOD_EVENT, "tased", /datum/mood_event/tased)
SEND_SIGNAL(C, COMSIG_LIVING_MINOR_SHOCK)
if(C.dna && C.dna.check_mutation(HULK))
C.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
C.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ), forced = "hulk")
else if((C.status_flags & CANKNOCKDOWN) && !C.has_trait(TRAIT_STUNIMMUNE))
addtimer(CALLBACK(C, /mob/living/carbon.proc/do_jitter_animation, jitter), 5)
+92 -3
View File
@@ -34,6 +34,7 @@
return
if(target.anti_magic_check())
target.visible_message("<span class='warning'>[src] vanishes on contact with [target]!</span>")
return
if(iscarbon(target))
var/mob/living/carbon/C = target
C.regenerate_limbs()
@@ -236,7 +237,7 @@
for(var/obj/item/W in contents)
new_mob.equip_to_appropriate_slot(W)
M.log_message("<font color='orange'>became [new_mob.real_name].</font>", INDIVIDUAL_ATTACK_LOG)
M.log_message("became [new_mob.real_name]", LOG_ATTACK, color="orange")
new_mob.a_intent = INTENT_HARM
@@ -244,7 +245,7 @@
to_chat(new_mob, "<span class='warning'>Your form morphs into that of a [randomize].</span>")
var/poly_msg = CONFIG_GET(keyed_string_list/policy)["polymorph"]
var/poly_msg = CONFIG_GET(keyed_list/policy)["polymorph"]
if(poly_msg)
to_chat(new_mob, poly_msg)
@@ -335,6 +336,91 @@
return
. = ..()
/obj/item/projectile/magic/locker
name = "locker bolt"
icon_state = "locker"
nodamage = TRUE
flag = "magic"
var/weld = TRUE
var/created = FALSE //prevents creation of more then one locker if it has multiple hits
/obj/item/projectile/magic/locker/prehit(atom/A)
if(ismob(A))
var/mob/M = A
if(M.anti_magic_check())
M.visible_message("<span class='warning'>[src] vanishes on contact with [A]!</span>")
qdel(src)
return
if(M.anchored)
return ..()
M.forceMove(src)
return FALSE
return ..()
/obj/item/projectile/magic/locker/on_hit(target)
if(created)
return ..()
var/obj/structure/closet/decay/C = new(get_turf(src))
if(LAZYLEN(contents))
for(var/atom/movable/AM in contents)
C.insert(AM)
C.welded = weld
C.update_icon()
created = TRUE
return ..()
/obj/item/projectile/magic/locker/Destroy()
for(var/atom/movable/AM in contents)
AM.forceMove(get_turf(src))
. = ..()
/obj/structure/closet/decay
breakout_time = 600
icon_welded = null
var/magic_icon = "cursed"
var/weakened_icon = "decursed"
var/auto_destroy = TRUE
/obj/structure/closet/decay/Initialize()
. = ..()
if(auto_destroy)
addtimer(CALLBACK(src, .proc/bust_open), 5 MINUTES)
addtimer(CALLBACK(src, .proc/magicly_lock), 5)
/obj/structure/closet/decay/proc/magicly_lock()
if(!welded)
return
icon_state = magic_icon
update_icon()
/obj/structure/closet/decay/after_weld(weld_state)
if(weld_state)
unmagify()
/obj/structure/closet/decay/proc/decay()
animate(src, alpha = 0, time = 30)
addtimer(CALLBACK(GLOBAL_PROC, .proc/qdel, src), 30)
/obj/structure/closet/decay/open(mob/living/user)
. = ..()
if(.)
if(icon_state == magic_icon) //check if we used the magic icon at all before giving it the lesser magic icon
unmagify()
else
addtimer(CALLBACK(src, .proc/decay), 15 SECONDS)
/obj/structure/closet/decay/contents_explosion(severity, target)
for(var/atom/A in contents)
A.ex_act(severity/2, target) //Difference is it does half the damage to contents from explosion, to make fireball not completely instakill
CHECK_TICK
/obj/structure/closet/decay/proc/unmagify()
icon_state = weakened_icon
update_icon()
addtimer(CALLBACK(src, .proc/decay), 15 SECONDS)
icon_welded = "welded"
/obj/item/projectile/magic/aoe
name = "Area Bolt"
desc = "What the fuck does this do?!"
@@ -345,9 +431,10 @@
if(proxdet)
for(var/mob/living/L in range(1, get_turf(src)))
if(L.stat != DEAD && L != firer && !L.anti_magic_check())
return Collide(L)
return Bump(L)
..()
/obj/item/projectile/magic/aoe/lightning
name = "lightning bolt"
icon_state = "tesla_projectile" //Better sprites are REALLY needed and appreciated!~
@@ -423,3 +510,5 @@
var/turf/T = get_turf(target)
for(var/i=0, i<50, i+=10)
addtimer(CALLBACK(GLOBAL_PROC, .proc/explosion, T, -1, exp_heavy, exp_light, exp_flash, FALSE, FALSE, exp_fire), i)
@@ -13,7 +13,7 @@
/obj/item/projectile/gravityrepulse/Initialize()
. = ..()
var/obj/item/ammo_casing/energy/gravityrepulse/C = loc
var/obj/item/ammo_casing/energy/gravity/repulse/C = loc
if(istype(C)) //Hard-coded maximum power so servers can't be crashed by trying to throw the entire Z level's items
power = min(C.gun.power, 15)
@@ -44,7 +44,7 @@
/obj/item/projectile/gravityattract/Initialize()
. = ..()
var/obj/item/ammo_casing/energy/gravityattract/C = loc
var/obj/item/ammo_casing/energy/gravity/attract/C = loc
if(istype(C)) //Hard-coded maximum power so servers can't be crashed by trying to throw the entire Z level's items
power = min(C.gun.power, 15)
@@ -74,7 +74,7 @@
/obj/item/projectile/gravitychaos/Initialize()
. = ..()
var/obj/item/ammo_casing/energy/gravitychaos/C = loc
var/obj/item/ammo_casing/energy/gravity/chaos/C = loc
if(istype(C)) //Hard-coded maximum power so servers can't be crashed by trying to throw the entire Z level's items
power = min(C.gun.power, 15)
@@ -33,7 +33,7 @@
QDEL_NULL(fake_icon)
return ..()
/obj/item/projectile/hallucination/Collide(atom/A)
/obj/item/projectile/hallucination/Bump(atom/A)
if(!ismob(A))
if(hal_hitsound_wall)
hal_target.playsound_local(loc, hal_hitsound_wall, 40, 1)
@@ -169,7 +169,7 @@
hal_target.Knockdown(100)
hal_target.stuttering += 20
if(hal_target.dna && hal_target.dna.check_mutation(HULK))
hal_target.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
hal_target.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ), forced = "hulk")
else if((hal_target.status_flags & CANKNOCKDOWN) && !hal_target.has_trait(TRAIT_STUNIMMUNE))
addtimer(CALLBACK(hal_target, /mob/living/carbon.proc/do_jitter_animation, 20), 5)
@@ -7,7 +7,7 @@
nodamage = 1
flag = "bullet"
/obj/item/projectile/meteor/Collide(atom/A)
/obj/item/projectile/meteor/Bump(atom/A)
if(A == firer)
forceMove(A.loc)
return
@@ -4,13 +4,13 @@
hitsound = "sparks"
damage = 0
nodamage = TRUE
hitscan = TRUE
pass_flags = PASSGLASS | PASSTABLE | PASSGRILLE | PASSMOB
var/obj/item/gun/energy/wormhole_projector/gun
color = "#33CCFF"
tracer_type = /obj/effect/projectile/tracer/wormhole
impact_type = /obj/effect/projectile/impact/wormhole
muzzle_type = /obj/effect/projectile/muzzle/wormhole
hitscan = TRUE
/obj/item/projectile/beam/wormhole/orange
name = "orange bluespace beam"
@@ -21,7 +21,9 @@
if(casing)
gun = casing.gun
/obj/item/projectile/beam/wormhole/on_hit(atom/target)
if(!gun)
qdel(src)
return
gun.create_portal(src, get_turf(src))