mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +01:00
Mass replace
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
desc = "[initial(desc)][BB ? "" : " This one is spent"]"
|
||||
|
||||
/obj/item/ammo_casing/proc/newshot(params) //For energy weapons, shotgun shells and wands (!).
|
||||
if (!BB)
|
||||
if(!BB)
|
||||
BB = new projectile_type(src, params)
|
||||
return
|
||||
|
||||
@@ -42,14 +42,14 @@
|
||||
if(isturf(loc))
|
||||
var/boolets = 0
|
||||
for(var/obj/item/ammo_casing/bullet in loc)
|
||||
if (box.stored_ammo.len >= box.max_ammo)
|
||||
if(box.stored_ammo.len >= box.max_ammo)
|
||||
break
|
||||
if (bullet.BB)
|
||||
if (box.give_round(bullet, 0))
|
||||
if(bullet.BB)
|
||||
if(box.give_round(bullet, 0))
|
||||
boolets++
|
||||
else
|
||||
continue
|
||||
if (boolets > 0)
|
||||
if(boolets > 0)
|
||||
box.update_icon()
|
||||
to_chat(user, "<span class='notice'>You collect [boolets] shell\s. [box] now contains [box.stored_ammo.len] shell\s.</span>")
|
||||
else
|
||||
@@ -109,12 +109,12 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/ammo_box/proc/get_round(keep = 0)
|
||||
if (!stored_ammo.len)
|
||||
if(!stored_ammo.len)
|
||||
return null
|
||||
else
|
||||
var/b = stored_ammo[stored_ammo.len]
|
||||
stored_ammo -= b
|
||||
if (keep)
|
||||
if(keep)
|
||||
stored_ammo.Insert(1,b)
|
||||
return b
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
if(!R || (caliber && R.caliber != caliber) || (!caliber && R.type != ammo_type))
|
||||
return 0
|
||||
|
||||
if (stored_ammo.len < max_ammo)
|
||||
if(stored_ammo.len < max_ammo)
|
||||
stored_ammo += R
|
||||
R.loc = src
|
||||
return 1
|
||||
|
||||
@@ -269,7 +269,7 @@
|
||||
desc = "A caseless bullet casing."
|
||||
|
||||
/obj/item/ammo_casing/caseless/fire(atom/target as mob|obj|turf, mob/living/user as mob|obj, params, distro, quiet)
|
||||
if (..())
|
||||
if(..())
|
||||
loc = null
|
||||
return 1
|
||||
else
|
||||
@@ -298,7 +298,7 @@
|
||||
|
||||
/obj/item/ammo_casing/caseless/foam_dart/update_icon()
|
||||
..()
|
||||
if (modified)
|
||||
if(modified)
|
||||
icon_state = "foamdart_empty"
|
||||
desc = "Its nerf or nothing! ... Although, this one doesn't look too safe."
|
||||
if(BB)
|
||||
@@ -312,11 +312,11 @@
|
||||
/obj/item/ammo_casing/caseless/foam_dart/attackby(obj/item/A, mob/user, params)
|
||||
..()
|
||||
var/obj/item/projectile/bullet/reusable/foam_dart/FD = BB
|
||||
if (istype(A, /obj/item/weapon/screwdriver) && !modified)
|
||||
if(istype(A, /obj/item/weapon/screwdriver) && !modified)
|
||||
modified = 1
|
||||
FD.damage_type = BRUTE
|
||||
update_icon()
|
||||
else if ((istype(A, /obj/item/weapon/pen)) && modified && !FD.pen)
|
||||
else if((istype(A, /obj/item/weapon/pen)) && modified && !FD.pen)
|
||||
if(!user.unEquip(A))
|
||||
return
|
||||
A.loc = FD
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
multiload = 0
|
||||
|
||||
/obj/item/ammo_box/magazine/internal/shot/ammo_count(countempties = 1)
|
||||
if (!countempties)
|
||||
if(!countempties)
|
||||
var/boolets = 0
|
||||
for(var/obj/item/ammo_casing/bullet in stored_ammo)
|
||||
if(bullet.BB)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/obj/item/ammo_casing/proc/fire(atom/target as mob|obj|turf, mob/living/user as mob|obj, params, distro, quiet, zone_override = "", spread)
|
||||
distro += variance
|
||||
for (var/i = max(1, pellets), i > 0, i--)
|
||||
for(var/i = max(1, pellets), i > 0, i--)
|
||||
var/targloc = get_turf(target)
|
||||
ready_proj(target, user, quiet, zone_override)
|
||||
if(distro) //We have to spread a pixel-precision bullet. throw_proj was called before so angles should exist by now...
|
||||
@@ -21,11 +21,11 @@
|
||||
return 1
|
||||
|
||||
/obj/item/ammo_casing/proc/ready_proj(atom/target, mob/living/user, quiet, zone_override = "")
|
||||
if (!BB)
|
||||
if(!BB)
|
||||
return
|
||||
BB.original = target
|
||||
BB.firer = user
|
||||
if (zone_override)
|
||||
if(zone_override)
|
||||
BB.def_zone = zone_override
|
||||
else
|
||||
BB.def_zone = user.zone_sel.selecting
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
/obj/item/ammo_casing/proc/throw_proj(atom/target, turf/targloc, mob/living/user, params, spread)
|
||||
var/turf/curloc = get_turf(user)
|
||||
if (!istype(targloc) || !istype(curloc) || !BB)
|
||||
if(!istype(targloc) || !istype(curloc) || !BB)
|
||||
return 0
|
||||
BB.ammo_casing = src
|
||||
if(targloc == curloc)
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
src.update_icon()
|
||||
|
||||
/obj/item/weapon/gun/dartgun/proc/get_mixed_syringe()
|
||||
if (!cartridge)
|
||||
if(!cartridge)
|
||||
return 0
|
||||
if(!cartridge.darts)
|
||||
return 0
|
||||
@@ -136,7 +136,7 @@
|
||||
return dart
|
||||
|
||||
/obj/item/weapon/gun/dartgun/proc/fire_dart(atom/target, mob/user)
|
||||
if (locate (/obj/structure/table, src.loc))
|
||||
if(locate (/obj/structure/table, src.loc))
|
||||
return
|
||||
else
|
||||
var/turf/trg = get_turf(target)
|
||||
@@ -172,7 +172,7 @@
|
||||
for(var/datum/reagent/A in D.reagents.reagent_list)
|
||||
R += A.id + " ("
|
||||
R += num2text(A.volume) + "),"
|
||||
if (istype(M, /mob))
|
||||
if(istype(M, /mob))
|
||||
M.attack_log += "\[[time_stamp()]\] <b>[user]/[user.ckey]</b> shot <b>[M]/[M.ckey]</b> with a <b>dartgun</b> ([R])"
|
||||
user.attack_log += "\[[time_stamp()]\] <b>[user]/[user.ckey]</b> shot <b>[M]/[M.ckey]</b> with a <b>dartgun</b> ([R])"
|
||||
if(M.ckey)
|
||||
@@ -199,7 +199,7 @@
|
||||
|
||||
sleep(1)
|
||||
|
||||
if (D) spawn(10) qdel(D)
|
||||
if(D) spawn(10) qdel(D)
|
||||
|
||||
return
|
||||
|
||||
@@ -212,14 +212,14 @@
|
||||
user.set_machine(src)
|
||||
var/dat = "<b>[src] mixing control:</b><br><br>"
|
||||
|
||||
if (beakers.len)
|
||||
if(beakers.len)
|
||||
var/i = 1
|
||||
for(var/obj/item/weapon/reagent_containers/glass/beaker/B in beakers)
|
||||
dat += "Beaker [i] contains: "
|
||||
if(B.reagents && B.reagents.reagent_list.len)
|
||||
for(var/datum/reagent/R in B.reagents.reagent_list)
|
||||
dat += "<br> [R.volume] units of [R.name], "
|
||||
if (check_beaker_mixing(B))
|
||||
if(check_beaker_mixing(B))
|
||||
dat += text("<A href='?src=\ref[src];stop_mix=[i]'><font color='green'>Mixing</font></A> ")
|
||||
else
|
||||
dat += text("<A href='?src=\ref[src];mix=[i]'><font color='red'>Not mixing</font></A> ")
|
||||
@@ -257,11 +257,11 @@
|
||||
if(M == beakers[index])
|
||||
mixing -= M
|
||||
break
|
||||
else if (href_list["mix"])
|
||||
else if(href_list["mix"])
|
||||
var/index = text2num(href_list["mix"])
|
||||
if(index <= beakers.len)
|
||||
mixing += beakers[index]
|
||||
else if (href_list["eject"])
|
||||
else if(href_list["eject"])
|
||||
var/index = text2num(href_list["eject"])
|
||||
if(index <= beakers.len)
|
||||
if(beakers[index])
|
||||
@@ -270,7 +270,7 @@
|
||||
mixing -= B
|
||||
beakers -= B
|
||||
B.forceMove(get_turf(src))
|
||||
else if (href_list["eject_cart"])
|
||||
else if(href_list["eject_cart"])
|
||||
remove_cartridge()
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
power_supply = new(src)
|
||||
power_supply.give(power_supply.maxcharge)
|
||||
var/obj/item/ammo_casing/energy/shot
|
||||
for (var/i = 1, i <= ammo_type.len, i++)
|
||||
for(var/i = 1, i <= ammo_type.len, i++)
|
||||
var/shottype = ammo_type[i]
|
||||
shot = new shottype(src)
|
||||
ammo_type[i] = shot
|
||||
@@ -81,7 +81,7 @@
|
||||
return power_supply.charge >= shot.e_cost
|
||||
|
||||
/obj/item/weapon/gun/energy/newshot(params)
|
||||
if (!ammo_type || !power_supply)
|
||||
if(!ammo_type || !power_supply)
|
||||
return
|
||||
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
|
||||
if(power_supply.charge >= shot.e_cost) //if there's enough power in the power_supply cell...
|
||||
@@ -98,12 +98,12 @@
|
||||
|
||||
/obj/item/weapon/gun/energy/proc/select_fire(mob/living/user)
|
||||
select++
|
||||
if (select > ammo_type.len)
|
||||
if(select > ammo_type.len)
|
||||
select = 1
|
||||
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
|
||||
fire_sound = shot.fire_sound
|
||||
fire_delay = shot.delay
|
||||
if (shot.select_name)
|
||||
if(shot.select_name)
|
||||
to_chat(user, "<span class='notice'>[src] is now set to [shot.select_name].</span>")
|
||||
update_icon()
|
||||
return
|
||||
@@ -116,7 +116,7 @@
|
||||
var/itemState = null
|
||||
if(!initial(item_state))
|
||||
itemState = icon_state
|
||||
if (modifystate)
|
||||
if(modifystate)
|
||||
overlays += "[icon_state]_[shot.select_name]"
|
||||
iconState += "_[shot.select_name]"
|
||||
if(itemState)
|
||||
@@ -142,7 +142,7 @@
|
||||
toggle_gunlight()
|
||||
|
||||
/obj/item/weapon/gun/energy/suicide_act(mob/user)
|
||||
if (can_shoot())
|
||||
if(can_shoot())
|
||||
user.visible_message("<span class='suicide'>[user] is putting the barrel of the [name] in \his mouth. It looks like \he's trying to commit suicide.</span>")
|
||||
sleep(25)
|
||||
if(user.l_hand == src || user.r_hand == src)
|
||||
|
||||
@@ -443,7 +443,7 @@
|
||||
desc = "A gun that changes the body temperature of its targets. Its temperature cap has been hacked."
|
||||
|
||||
/obj/item/weapon/gun/energy/temperature/Topic(href, href_list)
|
||||
if (..())
|
||||
if(..())
|
||||
return
|
||||
usr.set_machine(src)
|
||||
add_fingerprint(usr)
|
||||
@@ -454,7 +454,7 @@
|
||||
target_temperature = min((500 + 500*emagged), target_temperature+amount)
|
||||
else
|
||||
target_temperature = max(0, target_temperature+amount)
|
||||
if (istype(loc, /mob))
|
||||
if(istype(loc, /mob))
|
||||
attack_self(loc)
|
||||
add_fingerprint(usr)
|
||||
return
|
||||
@@ -491,9 +491,9 @@
|
||||
temperature = target_temperature
|
||||
update_icon()
|
||||
|
||||
if (istype(loc, /mob/living/carbon))
|
||||
if(istype(loc, /mob/living/carbon))
|
||||
var /mob/living/carbon/M = loc
|
||||
if (src == M.machine)
|
||||
if(src == M.machine)
|
||||
update_dat()
|
||||
M << browse("<TITLE>Temperature Gun Configuration</TITLE><HR>[dat]", "window=tempgun;size=510x102")
|
||||
return
|
||||
@@ -552,7 +552,7 @@
|
||||
update_charge()
|
||||
|
||||
/obj/item/weapon/gun/energy/temperature/proc/update_user()
|
||||
if (istype(loc,/mob/living/carbon))
|
||||
if(istype(loc,/mob/living/carbon))
|
||||
var/mob/living/carbon/M = loc
|
||||
M.update_inv_back()
|
||||
M.update_inv_l_hand()
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
for(var/obj/item/device/radio/beacon/R in beacons)
|
||||
var/turf/T = get_turf(R)
|
||||
if (!T)
|
||||
if(!T)
|
||||
continue
|
||||
if((T.z in config.admin_levels) || T.z > 7)
|
||||
continue
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
return charges
|
||||
|
||||
/obj/item/weapon/gun/magic/newshot(params)
|
||||
if (charges && chambered)
|
||||
if(charges && chambered)
|
||||
chambered.newshot(params)
|
||||
return
|
||||
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
return boolets
|
||||
|
||||
/obj/item/weapon/gun/projectile/suicide_act(mob/user)
|
||||
if (chambered && chambered.BB && !chambered.BB.nodamage)
|
||||
if(chambered && chambered.BB && !chambered.BB.nodamage)
|
||||
user.visible_message("<span class='suicide'>[user] is putting the barrel of the [name] in \his mouth. It looks like \he's trying to commit suicide.</span>")
|
||||
sleep(25)
|
||||
if(user.l_hand == src || user.r_hand == src)
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
/obj/item/weapon/gun/projectile/revolver/attack_self(mob/living/user)
|
||||
var/num_unloaded = 0
|
||||
chambered = null
|
||||
while (get_ammo() > 0)
|
||||
while(get_ammo() > 0)
|
||||
var/obj/item/ammo_casing/CB
|
||||
CB = magazine.get_round(0)
|
||||
if(CB)
|
||||
@@ -49,7 +49,7 @@
|
||||
CB.SpinAnimation(10, 1)
|
||||
CB.update_icon()
|
||||
num_unloaded++
|
||||
if (num_unloaded)
|
||||
if(num_unloaded)
|
||||
to_chat(user, "<span class='notice'>You unload [num_unloaded] shell\s from [src].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] is empty!</span>")
|
||||
@@ -77,9 +77,9 @@
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/get_ammo(countchambered = 0, countempties = 1)
|
||||
var/boolets = 0 //mature var names for mature people
|
||||
if (chambered && countchambered)
|
||||
if(chambered && countchambered)
|
||||
boolets++
|
||||
if (magazine)
|
||||
if(magazine)
|
||||
boolets += magazine.ammo_count(countempties)
|
||||
return boolets
|
||||
|
||||
@@ -207,14 +207,14 @@
|
||||
Spin()
|
||||
else
|
||||
var/num_unloaded = 0
|
||||
while (get_ammo() > 0)
|
||||
while(get_ammo() > 0)
|
||||
var/obj/item/ammo_casing/CB
|
||||
CB = magazine.get_round()
|
||||
chambered = null
|
||||
CB.loc = get_turf(loc)
|
||||
CB.update_icon()
|
||||
num_unloaded++
|
||||
if (num_unloaded)
|
||||
if(num_unloaded)
|
||||
to_chat(user, "<span class='notice'>You unload [num_unloaded] shell\s from [src].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] is empty.</span>")
|
||||
@@ -306,14 +306,14 @@
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/doublebarrel/attack_self(mob/living/user)
|
||||
var/num_unloaded = 0
|
||||
while (get_ammo() > 0)
|
||||
while(get_ammo() > 0)
|
||||
var/obj/item/ammo_casing/CB
|
||||
CB = magazine.get_round(0)
|
||||
chambered = null
|
||||
CB.loc = get_turf(loc)
|
||||
CB.update_icon()
|
||||
num_unloaded++
|
||||
if (num_unloaded)
|
||||
if(num_unloaded)
|
||||
to_chat(user, "<span class = 'notice'>You break open \the [src] and unload [num_unloaded] shell\s.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] is empty.</span>")
|
||||
@@ -354,7 +354,7 @@
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/doublebarrel/improvised/update_icon()
|
||||
..()
|
||||
if (slung && (slot_flags & SLOT_BELT) )
|
||||
if(slung && (slot_flags & SLOT_BELT) )
|
||||
slung = 0
|
||||
icon_state = "ishotgun-sawn"
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/examine(mob/user)
|
||||
..()
|
||||
if (chambered)
|
||||
if(chambered)
|
||||
to_chat(user, "A [chambered.BB ? "live" : "spent"] one is in the chamber.")
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/isHandgun() //You cannot, in fact, holster a shotgun.
|
||||
@@ -189,7 +189,7 @@
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/automatic/dual_tube/New()
|
||||
..()
|
||||
if (!alternate_magazine)
|
||||
if(!alternate_magazine)
|
||||
alternate_magazine = new mag_type(src)
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/automatic/dual_tube/attack_self(mob/living/user)
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
var/atom/T = target.loc
|
||||
if(isturf(target) && target.density)
|
||||
CreateDoor(target)
|
||||
else if (isturf(T) && T.density)
|
||||
else if(isturf(T) && T.density)
|
||||
CreateDoor(T)
|
||||
else if(istype(target, /obj/machinery/door))
|
||||
OpenDoor(target)
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
if(prob(15))
|
||||
M.apply_effect((rand(30,80)),IRRADIATE)
|
||||
M.Weaken(5)
|
||||
for (var/mob/V in viewers(src))
|
||||
for(var/mob/V in viewers(src))
|
||||
V.show_message("<span class='warning'>[M] writhes in pain as \his vacuoles boil.</span>", 3, "<span class='warning'>You hear the crunching of leaves.</span>", 2)
|
||||
if(prob(35))
|
||||
if(prob(80))
|
||||
@@ -172,7 +172,7 @@
|
||||
var/mob/living/carbon/human/H = M
|
||||
if((H.species.flags & IS_PLANT) && (M.nutrition < 500))
|
||||
M.nutrition += 30
|
||||
else if (istype(target, /mob/living/carbon/))
|
||||
else if(istype(target, /mob/living/carbon/))
|
||||
M.show_message("<span class='notice'>The radiation beam dissipates harmlessly through your body.</span>")
|
||||
else
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user