Merge pull request #2321 from Fox-McCloud/another-del-pass

Another del->qdel pass
This commit is contained in:
TheDZD
2015-10-09 18:05:00 -04:00
69 changed files with 201 additions and 761 deletions
+2 -2
View File
@@ -16,7 +16,7 @@ var/list/admin_datums = list()
/datum/admins/New(initial_rank = "Temporary Admin", initial_rights = 0, ckey)
if(!ckey)
error("Admin datum created without a ckey argument. Datum has been deleted")
del(src)
qdel(src)
return
admincaster_signature = "Nanotrasen Officer #[rand(0,9)][rand(0,9)][rand(0,9)]"
rank = initial_rank
@@ -86,7 +86,7 @@ you will have to do something like if(client.holder.rights & R_ADMIN) yourself.
holder.disassociate()
del(holder)
return 1
//This proc checks whether subject has at least ONE of the rights specified in rights_required.
/proc/check_rights_for(client/subject, rights_required)
if(subject && subject.holder)
+5 -5
View File
@@ -25,7 +25,7 @@
message_admins("[key_name_admin(usr)] rejected [key_name_admin(C.mob)]'s admin help")
log_admin("[key_name(usr)] rejected [key_name(C.mob)]'s admin help")
if(href_list["stickyban"])
stickyban(href_list["stickyban"],href_list)
@@ -1062,7 +1062,7 @@
message_admins("\blue [key_name_admin(usr)] has banned [M.ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.")
del(M.client)
//del(M) // See no reason why to delete mob. Important stuff can be lost. And ban can be lifted before round ends.
//qdel(M) // See no reason why to delete mob. Important stuff can be lost. And ban can be lifted before round ends.
if("No")
var/reason = input(usr,"Please state the reason","Reason") as message|null
if(!reason)
@@ -1086,7 +1086,7 @@
DB_ban_record(BANTYPE_PERMA, M, -1, reason)
del(M.client)
//del(M)
//qdel(M)
if("Cancel")
return
@@ -2173,7 +2173,7 @@
log_admin("[key_name(usr)] has kicked [afkonly ? "all AFK" : "all"] clients from the lobby. [length(listkicked)] clients kicked: [strkicked ? strkicked : "--"]")
else
usr << "You may only use this when the game is running."
else if(href_list["memoeditlist"])
if(!check_rights(R_SERVER)) return
var/sql_key = sanitizeSQL("[href_list["memoeditlist"]]")
@@ -2216,7 +2216,7 @@
if (M.client)
M.client.perspective = MOB_PERSPECTIVE
M.client.eye = M
del(O)
qdel(O)
ok = 1*/
if("monkey")
feedback_inc("admin_secrets_fun_used",1)
+2 -3
View File
@@ -17,7 +17,7 @@
/client/proc/SDQL2_query(query_text as message)
set category = "Debug"
if(!check_rights(R_PROCCALL)) //Shouldn't happen... but just to be safe.
message_admins("<span class='danger'>ERROR: Non-admin [key_name_admin(usr)] attempted to execute a SDQL query!</span>")
log_admin("Non-admin [key_name(usr)] attempted to execute a SDQL query!")
@@ -95,7 +95,7 @@
if("delete")
for(var/datum/d in objs)
del d
del(d)
if("select")
var/text = ""
@@ -474,4 +474,3 @@
if(word != "")
query_list += word
return query_list
+19 -19
View File
@@ -40,8 +40,8 @@ var/intercom_range_display_status = 0
/client/proc/camera_view()
set category = "Mapping"
set name = "Camera Range Display"
if(!check_rights(R_DEBUG))
if(!check_rights(R_DEBUG))
return
if(camera_range_display_status)
@@ -50,7 +50,7 @@ var/intercom_range_display_status = 0
camera_range_display_status = 1
for(var/obj/effect/debugging/camera_range/C in world)
del(C)
qdel(C)
if(camera_range_display_status)
for(var/obj/machinery/camera/C in cameranet.cameras)
@@ -60,8 +60,8 @@ var/intercom_range_display_status = 0
/client/proc/sec_camera_report()
set category = "Mapping"
set name = "Camera Report"
if(!check_rights(R_DEBUG))
if(!check_rights(R_DEBUG))
return
var/list/obj/machinery/camera/CL = list()
@@ -99,8 +99,8 @@ var/intercom_range_display_status = 0
/client/proc/intercom_view()
set category = "Mapping"
set name = "Intercom Range Display"
if(!check_rights(R_DEBUG))
if(!check_rights(R_DEBUG))
return
if(intercom_range_display_status)
@@ -109,17 +109,17 @@ var/intercom_range_display_status = 0
intercom_range_display_status = 1
for(var/obj/effect/debugging/marker/M in world)
del(M)
qdel(M)
if(intercom_range_display_status)
for(var/obj/item/device/radio/intercom/I in world)
for(var/turf/T in orange(7,I))
var/obj/effect/debugging/marker/F = new/obj/effect/debugging/marker(T)
if (!(F in view(7,I.loc)))
del(F)
qdel(F)
feedback_add_details("admin_verb","mIRD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
var/list/admin_verbs_show_debug_verbs = list(
var/list/admin_verbs_show_debug_verbs = list(
/client/proc/camera_view,
/client/proc/sec_camera_report,
/client/proc/intercom_view,
@@ -128,7 +128,7 @@ var/list/admin_verbs_show_debug_verbs = list(
/client/proc/powerdebug, //check power
/client/proc/count_objects_on_z_level,
/client/proc/count_objects_all,
/client/proc/cmd_assume_direct_control,
/client/proc/cmd_assume_direct_control,
/client/proc/startSinglo,
/client/proc/ticklag,
/client/proc/cmd_admin_grantfullaccess,
@@ -140,12 +140,12 @@ var/list/admin_verbs_show_debug_verbs = list(
/client/proc/forceEvent,
/client/proc/nanomapgen_DumpImage
)
/client/proc/enable_debug_verbs()
set category = "Debug"
set name = "Debug verbs"
if(!check_rights(R_DEBUG))
if(!check_rights(R_DEBUG))
return
verbs += admin_verbs_show_debug_verbs
@@ -155,10 +155,10 @@ var/list/admin_verbs_show_debug_verbs = list(
/client/proc/count_objects_on_z_level()
set category = "Mapping"
set name = "Count Objects On Level"
if(!check_rights(R_DEBUG))
return
if(!check_rights(R_DEBUG))
return
var/level = input("Which z-level?","Level?") as text
if(!level) return
var/num_level = text2num(level)
@@ -193,8 +193,8 @@ var/list/admin_verbs_show_debug_verbs = list(
/client/proc/count_objects_all()
set category = "Mapping"
set name = "Count Objects All"
if(!check_rights(R_DEBUG))
if(!check_rights(R_DEBUG))
return
var/type_text = input("Which type path?","") as text
+2 -2
View File
@@ -279,12 +279,12 @@ client/proc/one_click_antag()
for (var/obj/effect/landmark/A in /area/syndicate_station/start)//Because that's the only place it can BE -Sieve
if (A.name == "Syndicate-Gear-Closet")
new /obj/structure/closet/syndicate/personal(A.loc)
del(A)
qdel(A)
continue
if (A.name == "Syndicate-Bomb")
new /obj/effect/spawner/newbomb/timer/syndicate(A.loc)
del(A)
qdel(A)
continue
for(var/datum/mind/synd_mind in ticker.mode.syndicates)
+2 -2
View File
@@ -84,7 +84,7 @@ var/global/sent_strike_team = 0
var/obj/item/weapon/paper/P = new(L.loc)
P.info = "<p><b>Good morning soldier!</b>. This compact guide will familiarize you with standard operating procedure. There are three basic rules to follow:<br>#1 Work as a team.<br>#2 Accomplish your objective at all costs.<br>#3 Leave no witnesses.<br>You are fully equipped and stocked for your mission--before departing on the Spec. Ops. Shuttle due South, make sure that all operatives are ready. Actual mission objective will be relayed to you by Central Command through your headsets.<br>If deemed appropriate, Central Command will also allow members of your team to equip assault power-armor for the mission. You will find the armor storage due West of your position. Once you are ready to leave, utilize the Special Operations shuttle console and toggle the hull doors via the other console.</p><p>In the event that the team does not accomplish their assigned objective in a timely manner, or finds no other way to do so, attached below are instructions on how to operate a Nanotrasen Nuclear Device. Your operations <b>LEADER</b> is provided with a nuclear authentication disk and a pin-pointer for this reason. You may easily recognize them by their rank: Lieutenant, Captain, or Major. The nuclear device itself will be present somewhere on your destination.</p><p>Hello and thank you for choosing Nanotrasen for your nuclear information needs. Today's crash course will deal with the operation of a Fission Class Nanotrasen made Nuclear Device.<br>First and foremost, <b>DO NOT TOUCH ANYTHING UNTIL THE BOMB IS IN PLACE.</b> Pressing any button on the compacted bomb will cause it to extend and bolt itself into place. If this is done to unbolt it one must completely log in which at this time may not be possible.<br>To make the device functional:<br>#1 Place bomb in designated detonation zone<br> #2 Extend and anchor bomb (attack with hand).<br>#3 Insert Nuclear Auth. Disk into slot.<br>#4 Type numeric code into keypad ([nuke_code]).<br>Note: If you make a mistake press R to reset the device.<br>#5 Press the E button to log onto the device.<br>You now have activated the device. To deactivate the buttons at anytime, for example when you have already prepped the bomb for detonation, remove the authentication disk OR press the R on the keypad. Now the bomb CAN ONLY be detonated using the timer. A manual detonation is not an option.<br>Note: Toggle off the <b>SAFETY</b>.<br>Use the - - and + + to set a detonation time between 5 seconds and 10 minutes. Then press the timer toggle button to start the countdown. Now remove the authentication disk so that the buttons deactivate.<br>Note: <b>THE BOMB IS STILL SET AND WILL DETONATE</b><br>Now before you remove the disk if you need to move the bomb you can: Toggle off the anchor, move it, and re-anchor.</p><p>The nuclear authorization code is: <b>[nuke_code ? nuke_code : "None provided"]</b></p><p><b>Good luck, soldier!</b></p>"
P.name = "Spec. Ops Manual"
P.icon = "pamphlet-ds"
P.icon = "pamphlet-ds"
var/obj/item/weapon/stamp/centcom/stamp = new
P.stamp(stamp)
qdel(stamp)
@@ -92,7 +92,7 @@ var/global/sent_strike_team = 0
for (var/obj/effect/landmark/L in landmarks_list)
if (L.name == "Commando-Bomb")
new /obj/effect/spawner/newbomb/timer/syndicate(L.loc)
del(L)
qdel(L)
message_admins("\blue [key_name_admin(usr)] has spawned a CentCom strike squad.", 1)
log_admin("[key_name(usr)] used Spawn Death Squad.")
@@ -93,7 +93,7 @@ var/global/sent_syndicate_strike_team = 0
for (var/obj/effect/landmark/L in landmarks_list)
if (L.name == "Syndicate-Commando-Bomb")
new /obj/effect/spawner/newbomb/timer/syndicate(L.loc)
del(L)
qdel(L)
message_admins("\blue [key_name_admin(usr)] has spawned a Syndicate strike squad.", 1)
log_admin("[key_name(usr)] used Spawn Syndicate Squad.")
@@ -121,7 +121,7 @@ var/global/sent_syndicate_strike_team = 0
new_syndicate_commando.mind.special_role = "Syndicate Commando"
ticker.mode.traitors |= new_syndicate_commando.mind //Adds them to current traitor list. Which is really the extra antagonist list.
new_syndicate_commando.equip_syndicate_commando(syndicate_leader_selected)
del(spawn_location)
qdel(spawn_location)
return new_syndicate_commando
/mob/living/carbon/human/proc/equip_syndicate_commando(syndicate_leader_selected = 0)
+1 -1
View File
@@ -84,7 +84,7 @@
if(src.coffin == 1)
var/obj/structure/closet/coffin/sarcophagus/sarc = locate(/obj/structure/closet/coffin/sarcophagus) in loc
if(sarc) M.loc = sarc
del(src)
qdel(src)
+1 -1
View File
@@ -21,4 +21,4 @@
continue
new loot_path(get_turf(src))
del(src)
qdel(src)
@@ -321,7 +321,7 @@ var/global/dmm_suite/preloader/_preloader = null
/dmm_suite/preloader/New(var/list/the_attributes, var/path)
.=..()
if(!the_attributes.len)
Del()
del(src)
return
attributes = the_attributes
target_path = path
@@ -329,4 +329,4 @@ var/global/dmm_suite/preloader/_preloader = null
/dmm_suite/preloader/proc/load(atom/what)
for(var/attribute in attributes)
what.vars[attribute] = attributes[attribute]
Del()
del(src)
+1 -1
View File
@@ -366,7 +366,7 @@
else //We are deconstructing, make glass sheets instead of shards
var/sheets = shard_count + 1 //Deconstructing it salvages all the glass used to build the tank
new /obj/item/stack/sheet/glass(get_turf(src), sheets) //Produce the appropriate number of glass sheets, in a single stack
qdel(src) //QDel the tank and it's contents
qdel(src) //qdel the tank and it's contents
T.air_update_turf(1) //Update the air for the turf, to avoid permanent atmos sealing with wall tanks
/obj/machinery/fishtank/proc/spill_water()
+5 -5
View File
@@ -442,18 +442,18 @@ Gunshots/explosions/opening doors/less rare audio (done)
/obj/effect/fake_attacker/proc/updateimage()
// del src.currentimage
// qdel(src.currentimage)
if(src.dir == NORTH)
del(src.currentimage)
qdel(src.currentimage)
src.currentimage = new /image(up,src)
else if(src.dir == SOUTH)
del(src.currentimage)
qdel(src.currentimage)
src.currentimage = new /image(down,src)
else if(src.dir == EAST)
del(src.currentimage)
qdel(src.currentimage)
src.currentimage = new /image(right,src)
else if(src.dir == WEST)
del(src.currentimage)
qdel(src.currentimage)
src.currentimage = new /image(left,src)
my_target << currentimage
+1 -1
View File
@@ -125,7 +125,7 @@
setCooked(I, newfood)
newfood.cooktype[thiscooktype] = 1
turnoff(I)
//del(I)
//qdel(I)
// MAKE SURE TO OVERRIDE THESE ON THE MACHINE IF IT HAS SPECIAL FOOD INTERACTIONS!
// FAILURE TO OVERRIDE WILL RESULT IN FAILURE TO PROPERLY HANDLE SPECIAL INTERACTIONS! --FalseIncarnate
+2 -2
View File
@@ -395,13 +395,13 @@
var/obj/item/stack/medical/bruise_pack/tajaran/poultice = new /obj/item/stack/medical/bruise_pack/tajaran(user.loc)
poultice.heal_brute = potency
user << "<span class='notice'>You mash the leaves into a poultice.</span>"
del(src)
qdel(src)
return
if("mtear")
var/obj/item/stack/medical/ointment/tajaran/poultice = new /obj/item/stack/medical/ointment/tajaran(user.loc)
poultice.heal_burn = potency
user << "<span class='notice'>You mash the petals into a poultice.</span>"
del(src)
qdel(src)
return
*/
+2 -2
View File
@@ -93,7 +93,7 @@
//world << "falsewall_spawner found in wall"
var/obj/structure/temple_falsewall/fwall = new(F.loc)
fwall.mineral = mineral
del(F)
qdel(F)
for(var/obj/effect/landmark/door_spawner/D in T.contents)
//world << "door_spawner found in wall"
@@ -101,7 +101,7 @@
T.icon_state = "dark"
var/spawn_type = text2path("/obj/machinery/door/airlock/[door_mineral]")
new spawn_type(T)
del(D)*/
qdel(D)*/
//a shuttle has crashed somewhere on the map, it should have a power cell to let the adventurers get home
/area/jungle/crash_ship_source
+2 -2
View File
@@ -49,7 +49,7 @@
New()
if(prob(10))
new /obj/effect/glowshroom(src.loc)
del(src)
qdel(src)
/obj/effect/landmark/loot_spawn
name = "loot spawner"
@@ -267,7 +267,7 @@
for(var/i=0,i<num,i++)
new /mob/living/simple_animal/hostile/viscerator(C)
del(src)
qdel(src)
/obj/effect/landmark/loot_spawn/low
name = "low prob loot spawner"
@@ -40,7 +40,7 @@ proc/move_labor_shuttle() //TODO: Security Access only; add moving the shuttle t
*/
if(istype(T, /turf/simulated))
del(T)
qdel(T)
for(var/mob/living/carbon/bug in toArea) // If someone somehow is still in the shuttle's docking area...
bug.gib()
@@ -86,6 +86,6 @@
else
new_xeno.key = key
new_xeno.mind.name = new_xeno.name
del(src)
qdel(src)
return
*/
@@ -117,7 +117,7 @@
else
new_xeno.key = key
new_xeno.mind.name = new_xeno.name
del(src)
qdel(src)
else
src << "<span class='notice'>We already have an alive empress.</span>"
return
@@ -255,4 +255,4 @@
else
var/mob/living/carbon/alien/humanoid/A = new(loc)
A.key = key
del(src) */
qdel(src) */
@@ -462,7 +462,7 @@
if(D.client)
D.loc = H.loc
else
del(D)
qdel(D)
H.visible_message("<span class='danger">[H] splits apart with a wet slithering noise!"</span>) */
@@ -78,7 +78,7 @@
W.assignment = corpseidjob
W.registered_name = M.real_name
M.equip_to_slot_or_del(W, slot_wear_id)
del(src)
qdel(src)
@@ -63,7 +63,7 @@
health = min(maxHealth, health + MED.heal_brute)
MED.amount -= 1
if(MED.amount <= 0)
del(MED)
qdel(MED)
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("\blue [user] applies the [MED] on [src]")
+5 -5
View File
@@ -30,7 +30,7 @@
client.images = null //remove the images such as AIs being unable to see runes
client.screen = list() //remove hud items just in case
if(hud_used) del(hud_used) //remove the hud objects
if(hud_used) qdel(hud_used) //remove the hud objects
hud_used = new /datum/hud(src)
next_move = 1
@@ -46,7 +46,7 @@
if(ckey in deadmins)
verbs += /client/proc/readmin
verbs += /client/proc/readmin
//Clear ability list and update from mob.
client.verbs -= ability_verbs
@@ -58,12 +58,12 @@
var/mob/living/carbon/human/H = src
if(H.species && H.species.abilities)
client.verbs |= H.species.abilities
client.screen += client.void
CallHook("Login", list("client" = src.client, "mob" = src))
// Calling update_interface() in /mob/Login() causes the Cyborg to immediately be ghosted; because of winget().
// Calling it in the overriden Login, such as /mob/living/Login() doesn't cause this.
/mob/proc/update_interface()
@@ -189,9 +189,9 @@ datum/preferences
return clothes_s
proc/update_preview_icon(var/for_observer=0) //seriously. This is horrendous.
del(preview_icon_front)
del(preview_icon_side)
del(preview_icon)
qdel(preview_icon_front)
qdel(preview_icon_side)
qdel(preview_icon)
var/g = "m"
if(gender == FEMALE) g = "f"
@@ -806,8 +806,8 @@ datum/preferences
preview_icon_front = new(preview_icon, dir = SOUTH)
preview_icon_side = new(preview_icon, dir = WEST)
del(eyes_s)
del(underwear_s)
del(undershirt_s)
del(socks_s)
del(clothes_s)
qdel(eyes_s)
qdel(underwear_s)
qdel(undershirt_s)
qdel(socks_s)
qdel(clothes_s)
+1 -1
View File
@@ -1046,7 +1046,7 @@
src.occupier.mind.transfer_to(src.occupier.parent)
src.occupier.parent.adjustOxyLoss(src.occupier.getOxyLoss())
src.occupier.parent.cancel_camera()
del(src.occupier) // qdel
qdel(src.occupier) // qdel
if (seclevel2num(get_security_level()) == SEC_LEVEL_DELTA)
for(var/obj/item/weapon/pinpointer/point in world)
for(var/datum/mind/AI_mind in ticker.mode.malf_ai)
+1 -1
View File
@@ -610,7 +610,7 @@ obj/structure/cable/proc/cableColor(var/colorC)
if(ismob(loc)) //handle mob icon update
var/mob/M = loc
M.unEquip(src)
qqdel(src)
qdel(src)
return 1
else
amount -= used
+1 -1
View File
@@ -80,5 +80,5 @@
else
icon_state = icon_state_off
for(var/obj/structure/cable/C in src.loc)
del(C)
qdel(C)
*/
+3 -400
View File
@@ -229,12 +229,12 @@
f.hotspot_expose(1000,CELL_VOLUME)
if((x == 1 || x == world.maxx || y == 1 || y == world.maxy))
//world << "deleting"
//del(src) //Delete if it passes the world edge
//qdel(src) //Delete if it passes the world edge
broken = 1
return
if(kill_count < 1)
//world << "deleting"
//del(src)
//qdel(src)
broken = 1
kill_count--
//world << "[x] [y]"
@@ -271,401 +271,4 @@
if(istype(target, /mob/living))
var/mob/living/M = target
M.playsound_local(src, "explosion", 50, 1)
..()
/*
/*
* Use: Caches beam state images and holds turfs that had these images overlaid.
* Structure:
* beam_master
* icon_states/dirs of beams
* image for that beam
* references for fired beams
* icon_states/dirs for each placed beam image
* turfs that have that icon_state/dir
*/
var/list/beam_master = list()
// Special laser the captains gun uses
/obj/item/projectile/beam/captain
name = "captain laser"
damage = 40
/obj/item/projectile/beam/lightning
invisibility = 101
name = "lightning"
damage = 0
icon = 'icons/obj/lightning.dmi'
icon_state = "lightning"
stun = 10
weaken = 10
stutter = 50
eyeblur = 50
var/tang = 0
layer = 3
var/turf/last = null
kill_count = 6
proc/adjustAngle(angle)
angle = round(angle) + 45
if(angle > 180)
angle -= 180
else
angle += 180
if(!angle)
angle = 1
/*if(angle < 0)
//angle = (round(abs(get_angle(A, user))) + 45) - 90
angle = round(angle) + 45 + 180
else
angle = round(angle) + 45*/
return angle
process()
var/first = 1 //So we don't make the overlay in the same tile as the firer
var/broke = 0
var/broken
var/atom/curr = current
var/Angle=round(Get_Angle(firer,curr))
var/icon/I=new('icons/obj/zap.dmi',"lightning")
I.Turn(Angle)
var/DX=(32*curr.x+curr.pixel_x)-(32*firer.x+firer.pixel_x)
var/DY=(32*curr.y+curr.pixel_y)-(32*firer.y+firer.pixel_y)
var/N=0
var/length=round(sqrt((DX)**2+(DY)**2))
var/count = 0
for(N,N<length,N+=32)
if(count >= kill_count)
break
count++
var/obj/effect/overlay/beam/X=new(loc)
X.BeamSource=src
if(N+32>length)
var/icon/II=new(icon,icon_state)
II.DrawBox(null,1,(length-N),32,32)
II.Turn(Angle)
X.icon=II
else X.icon=I
var/Pixel_x=round(sin(Angle)+32*sin(Angle)*(N+16)/32)
var/Pixel_y=round(cos(Angle)+32*cos(Angle)*(N+16)/32)
if(DX==0) Pixel_x=0
if(DY==0) Pixel_y=0
if(Pixel_x>32)
for(var/a=0, a<=Pixel_x,a+=32)
X.x++
Pixel_x-=32
if(Pixel_x<-32)
for(var/a=0, a>=Pixel_x,a-=32)
X.x--
Pixel_x+=32
if(Pixel_y>32)
for(var/a=0, a<=Pixel_y,a+=32)
X.y++
Pixel_y-=32
if(Pixel_y<-32)
for(var/a=0, a>=Pixel_y,a-=32)
X.y--
Pixel_y+=32
X.pixel_x=Pixel_x
X.pixel_y=Pixel_y
var/turf/TT = get_turf(X.loc)
if(TT == firer.loc)
continue
if(TT.density)
del(X)
break
for(var/atom/O in TT)
if(!O.CanPass(src))
del(X)
broke = 1
break
for(var/mob/living/O in TT.contents)
if(istype(O, /mob/living))
if(O.density)
del(X)
broke = 1
break
if(broke)
if(X)
del(X)
break
spawn
while(src) //Move until we hit something
if(first)
icon = midicon
if((!( current ) || loc == current)) //If we pass our target
broken = 1
icon = endicon
tang = adjustAngle(get_angle(original,current))
if(tang > 180)
tang -= 180
else
tang += 180
icon_state = "[tang]"
var/turf/simulated/floor/f = current
if(f && istype(f))
f.break_tile()
f.hotspot_expose(1000,CELL_VOLUME)
if((x == 1 || x == world.maxx || y == 1 || y == world.maxy))
//world << "deleting"
//del(src) //Delete if it passes the world edge
broken = 1
return
if(kill_count < 1)
//world << "deleting"
//del(src)
broken = 1
kill_count--
//world << "[x] [y]"
if(!bumped && !isturf(original))
if(loc == get_turf(original))
if(!(original in permutated))
icon = endicon
if(!broken)
tang = adjustAngle(get_angle(original,current))
if(tang > 180)
tang -= 180
else
tang += 180
icon_state = "[tang]"
Bump(original)
first = 0
if(broken)
//world << "breaking"
break
else
last = get_turf(src.loc)
step_towards(src, current) //Move~
if(src.loc != current)
tang = adjustAngle(get_angle(src.loc,current))
icon_state = "[tang]"
del(src)
return
/*cleanup(reference) //Waits .3 seconds then removes the overlay.
//world << "setting invisibility"
sleep(50)
src.invisibility = 101
return*/
on_hit(atom/target, blocked = 0)
if(istype(target, /mob/living))
var/mob/living/M = target
M.playsound_local(src, "explosion", 50, 1)
..()
/obj/item/projectile/beam
name = "laser"
icon_state = "laser"
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
damage = 40
damage_type = BURN
hitsound = 'sound/weapons/sear.ogg'
flag = "laser"
eyeblur = 4
var/frequency = 1
process()
var/reference = "\ref[src]" //So we do not have to recalculate it a ton
var/first = 1 //So we don't make the overlay in the same tile as the firer
spawn while(src) //Move until we hit something
if((!( current ) || loc == current)) //If we pass our target
current = locate(min(max(x + xo, 1), world.maxx), min(max(y + yo, 1), world.maxy), z)
if((x == 1 || x == world.maxx || y == 1 || y == world.maxy))
del(src) //Delete if it passes the world edge
return
step_towards(src, current) //Move~
if(kill_count < 1)
del(src)
return
kill_count--
if(!bumped && !isturf(original))
if(loc == get_turf(original))
if(!(original in permutated))
Bump(original)
if(!first) //Add the overlay as we pass over tiles
var/target_dir = get_dir(src, current) //So we don't call this too much
//If the icon has not been added yet
if( !("[icon_state][target_dir]" in beam_master) )
var/image/I = image(icon,icon_state,10,target_dir) //Generate it.
beam_master["[icon_state][target_dir]"] = I //And cache it!
//Finally add the overlay
src.loc.overlays += beam_master["[icon_state][target_dir]"]
//Add the turf to a list in the beam master so they can be cleaned up easily.
if(reference in beam_master)
var/list/turf_master = beam_master[reference]
if("[icon_state][target_dir]" in turf_master)
var/list/turfs = turf_master["[icon_state][target_dir]"]
turfs += loc
else
turf_master["[icon_state][target_dir]"] = list(loc)
else
var/list/turfs = list()
turfs["[icon_state][target_dir]"] = list(loc)
beam_master[reference] = turfs
else
first = 0
cleanup(reference)
return
dumbfire(var/dir)
var/reference = "\ref[src]" //So we do not have to recalculate it a ton
var/first = 1 //So we don't make the overlay in the same tile as the firer
if(!dir)
del(src)
spawn while(src) //Move until we hit something
if((x == 1 || x == world.maxx || y == 1 || y == world.maxy))
del(src) //Delete if it passes the world edge
return
var/turf/T = get_step(src, dir)
step_towards(src, T) //Move~
if(kill_count < 1)
del(src)
kill_count--
if(!bumped && !isturf(original))
if(loc == get_turf(original))
if(!(original in permutated))
Bump(original)
if(!first) //Add the overlay as we pass over tiles
var/target_dir = dir //So we don't call this too much
//If the icon has not been added yet
if( !("[icon_state][target_dir]" in beam_master) )
var/image/I = image(icon,icon_state,10,target_dir) //Generate it.
beam_master["[icon_state][target_dir]"] = I //And cache it!
//Finally add the overlay
src.loc.overlays += beam_master["[icon_state][target_dir]"]
//Add the turf to a list in the beam master so they can be cleaned up easily.
if(reference in beam_master)
var/list/turf_master = beam_master[reference]
if("[icon_state][target_dir]" in turf_master)
var/list/turfs = turf_master["[icon_state][target_dir]"]
turfs += loc
else
turf_master["[icon_state][target_dir]"] = list(loc)
else
var/list/turfs = list()
turfs["[icon_state][target_dir]"] = list(loc)
beam_master[reference] = turfs
else
first = 0
cleanup(reference)
return
proc/cleanup(reference) //Waits .3 seconds then removes the overlay.
src = null // Redundant.
spawn(3)
var/list/turf_master = beam_master[reference]
for(var/laser_state in turf_master)
var/list/turfs = turf_master[laser_state]
for(var/turf/T in turfs)
T.overlays -= beam_master[laser_state]
return
/obj/item/projectile/beam/practice
name = "laser"
icon_state = "laser"
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
damage = 0
damage_type = BURN
flag = "laser"
eyeblur = 2
//Heavy lasers now deal slightly more damage, but have a slower firing rate; overall DPS still identical to lasers.
/obj/item/projectile/beam/heavylaser
name = "heavy laser"
icon_state = "heavylaser"
damage = 50
/obj/item/projectile/beam/xray
name = "xray beam"
icon_state = "xray"
damage = 15
irradiate = 30
kill_count = 50
/obj/item/projectile/beam/pulse
name = "pulse"
icon_state = "u_laser"
damage = 50
on_hit(var/atom/target, var/blocked = 0)
if(istype(target,/turf/)||istype(target,/obj/structure/))
target.ex_act(2)
..()
/obj/item/projectile/beam/deathlaser
name = "death laser"
icon_state = "heavylaser"
damage = 60
/obj/item/projectile/beam/emitter
name = "emitter beam"
icon_state = "emitter"
damage = 30
/obj/item/projectile/beam/lastertag/blue
name = "lasertag beam"
icon_state = "bluelaser"
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
damage = 0
damage_type = BURN
flag = "laser"
on_hit(var/atom/target, var/blocked = 0)
if(istype(target, /mob/living/carbon/human))
var/mob/living/carbon/human/M = target
if(istype(M.wear_suit, /obj/item/clothing/suit/redtag))
M.Weaken(5)
return 1
/obj/item/projectile/beam/lastertag/red
name = "lasertag beam"
icon_state = "laser"
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
damage = 0
damage_type = BURN
flag = "laser"
on_hit(var/atom/target, var/blocked = 0)
if(istype(target, /mob/living/carbon/human))
var/mob/living/carbon/human/M = target
if(istype(M.wear_suit, /obj/item/clothing/suit/bluetag))
M.Weaken(5)
return 1
/obj/item/projectile/beam/lastertag/omni//A laser tag bolt that stuns EVERYONE
name = "lasertag beam"
icon_state = "omnilaser"
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
damage = 0
damage_type = BURN
flag = "laser"
on_hit(var/atom/target, var/blocked = 0)
if(istype(target, /mob/living/carbon/human))
var/mob/living/carbon/human/M = target
if((istype(M.wear_suit, /obj/item/clothing/suit/bluetag))||(istype(M.wear_suit, /obj/item/clothing/suit/redtag)))
M.Weaken(5)
return 1
/obj/item/projectile/beam/stun
name = "stun beam"
icon_state = "stun"
nodamage = 1
damage = 0
agony = 40
damage_type = HALLOSS
*/
..()
+1 -1
View File
@@ -288,7 +288,7 @@ client/verb/ToggleGunMode()
else
usr << "Target may no longer move."
target_can_run = 0
del(usr.gun_run_icon) //no need for icon for running permission
qdel(usr.gun_run_icon) //no need for icon for running permission
//Updating walking permission button
if(usr.gun_move_icon)
@@ -5,7 +5,7 @@
if(istype(W,/obj/item/weapon/shard) || istype(W,/obj/item/weapon/reagent_containers/food/snacks))
var/obj/item/weapon/reagent_containers/food/snacks/csandwich/S = new(get_turf(src))
S.attackby(W,user, params)
del(src)
qdel(src)
..()
/obj/item/weapon/reagent_containers/food/snacks/csandwich
@@ -77,7 +77,7 @@
/obj/item/weapon/reagent_containers/food/snacks/csandwich/Destroy()
for(var/obj/item/O in ingredients)
del(O)
qdel(O)
return ..()
/obj/item/weapon/reagent_containers/food/snacks/csandwich/examine(mob/user)
@@ -1686,7 +1686,7 @@
surprise.icon_state = ook.icon_state
surprise.name = "malformed [ook.name]"
surprise.desc = "Looks like \a very deformed [ook.name], a little small for its kind. It shows no signs of life."
del(ook) //rip nullspace monkey
qdel(ook) //rip nullspace monkey
surprise.transform *= 0.6
surprise.add_blood(M)
var/mob/living/carbon/human/H = M
@@ -99,7 +99,7 @@
//failure
user.visible_message("<font color='red'><b>[src] suddenly crumbles away.</b></font>",\
"\red [src] has disintegrated under your onslaught, any secrets it was holding are long gone.")
del(src)
qdel(src)
return
if(prob(excavation_level))
@@ -115,4 +115,4 @@
else
user.visible_message("<font color='red'><b>[src] suddenly crumbles away.</b></font>",\
"\blue [src] has been whittled away under your careful excavation, but there was nothing of interest inside.")
del(src)
qdel(src)
@@ -13,7 +13,7 @@
if(created_field.len)
for(var/obj/effect/energy_field/F in created_field)
created_field.Remove(F)
del F
qdel(F)
else if(holder)
var/turf/T = get_turf(holder)
while(created_field.len < 16)
@@ -57,7 +57,7 @@
else
for(var/mob/M in viewers(world.view, user))
M.show_message("<span class='info'>[src] burns away into nothing.</span>",1)
del(src)
qdel(src)
w.remove_fuel(4)
else
for(var/mob/M in viewers(world.view, user))
@@ -73,7 +73,7 @@
..()
if(prob(33))
src.visible_message("<span class='warning'>[src] crumbles away, leaving some dust and gravel behind.</span>")
del(src)
qdel(src)
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Archaeological finds
@@ -547,7 +547,7 @@
talking_atom.holder_atom = new_item
talking_atom.init()
del(src)
qdel(src)
else if(talkative)
src.talking_atom = new()
@@ -17,7 +17,7 @@
var/turf/T = get_turf(src)
if(istype(T, /turf/simulated/mineral))
T:last_find = W
del src
qdel(src)
/obj/item/weapon/fossil/bone
name = "Fossilised bone"
@@ -40,8 +40,8 @@
var/b = new src.type
o.contents.Add(a)
o.contents.Add(b)
del W
del src
qdel(W)
qdel(src)
/obj/skeleton
name = "Incomplete skeleton"
@@ -62,7 +62,7 @@
if(!bstate)
bnum++
src.contents.Add(new/obj/item/weapon/fossil/bone)
del W
qdel(W)
if(bnum==breq)
usr = user
icon_state = "skel"
@@ -108,7 +108,7 @@ datum/controller/game_controller/proc/SetupXenoarch()
if(!genome_prefixes)
genome_prefixes = alphabet_uppercase.Copy()
if(!genome_prefixes.len)
del genome_prefixes
qdel(genome_prefixes)
genome_prefixes = alphabet_uppercase.Copy()
//create animal gene sequences
+1 -1
View File
@@ -46,7 +46,7 @@ var/const/Represents a special statement in the code triggered by a keyword.
nS_Keyword
New(inline=0)
if(inline)
del src
del(src)
kwReturn
Parse(n_Parser/nS_Parser/parser)