mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-29 15:08:02 +01:00
Mass replace
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user