mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 02:54:41 +01:00
Merge branch 'master' of https://github.com/ParadiseSS13/Paradise into STILLALOTOFBLOOD
This commit is contained in:
@@ -629,11 +629,7 @@ var/global/nologevent = 0
|
||||
set category = "Server"
|
||||
set desc="Globally Toggles OOC"
|
||||
set name="Toggle OOC"
|
||||
ooc_allowed = !( ooc_allowed )
|
||||
if (ooc_allowed)
|
||||
world << "<B>The OOC channel has been globally enabled!</B>"
|
||||
else
|
||||
world << "<B>The OOC channel has been globally disabled!</B>"
|
||||
toggle_ooc()
|
||||
log_admin("[key_name(usr)] toggled OOC.")
|
||||
message_admins("[key_name_admin(usr)] toggled OOC.", 1)
|
||||
feedback_add_details("admin_verb","TOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
M.client.show_popup_menus = 1
|
||||
for(var/obj/effect/bmode/buildholder/H)
|
||||
if(H.cl == M.client)
|
||||
del(H)
|
||||
qdel(H)
|
||||
else
|
||||
message_admins("[key_name(usr)] has entered build mode.")
|
||||
log_admin("[key_name(usr)] has entered build mode.")
|
||||
|
||||
@@ -126,7 +126,7 @@ datum/admins/proc/notes_gethtml(var/ckey)
|
||||
message_admins("\blue [key_name_admin(usr)] has edited [key]'s notes.")
|
||||
log_admin("[key_name(usr)] has edited [key]'s notes.")
|
||||
|
||||
del info
|
||||
del(info)
|
||||
|
||||
//Updating list of keys with notes on them
|
||||
var/savefile/note_list = new("data/player_notes.sav")
|
||||
@@ -135,7 +135,7 @@ datum/admins/proc/notes_gethtml(var/ckey)
|
||||
if(!note_keys) note_keys = list()
|
||||
if(!note_keys.Find(key)) note_keys += key
|
||||
note_list << note_keys
|
||||
del note_list
|
||||
del(note_list)
|
||||
|
||||
|
||||
/proc/notes_del(var/key, var/index)
|
||||
@@ -151,7 +151,7 @@ datum/admins/proc/notes_gethtml(var/ckey)
|
||||
message_admins("\blue [key_name_admin(usr)] deleted one of [key]'s notes.")
|
||||
log_admin("[key_name(usr)] deleted one of [key]'s notes.")
|
||||
|
||||
del info
|
||||
del(info)
|
||||
|
||||
/proc/show_player_info_irc(var/key as text)
|
||||
var/dat = " Info on [key]%0D%0A"
|
||||
|
||||
@@ -1574,7 +1574,7 @@
|
||||
S.victim = M
|
||||
S.loc = M.loc
|
||||
spawn(20)
|
||||
del(S)
|
||||
qdel(S)
|
||||
|
||||
var/turf/simulated/floor/T = get_turf(M)
|
||||
if(istype(T))
|
||||
@@ -1706,7 +1706,7 @@
|
||||
var/list/departmentoptions = alldepartments + "All Departments"
|
||||
destination = input(usr, "To which department?", "Choose a department", "") as null|anything in departmentoptions
|
||||
if(!destination)
|
||||
del(P)
|
||||
qdel(P)
|
||||
return
|
||||
|
||||
for(var/obj/machinery/photocopier/faxmachine/F in allfaxes)
|
||||
@@ -1716,7 +1716,7 @@
|
||||
|
||||
var/input = input(src.owner, "Please enter a message to send a fax via secure connection. Use <br> for line breaks. Both pencode and HTML work.", "Outgoing message from Centcomm", "") as message|null
|
||||
if(!input)
|
||||
del(P)
|
||||
qdel(P)
|
||||
return
|
||||
input = P.parsepencode(input) // Encode everything from pencode to html
|
||||
|
||||
@@ -1753,7 +1753,7 @@
|
||||
else if(stamptype == "none")
|
||||
stamptype = ""
|
||||
else
|
||||
del(P)
|
||||
qdel(P)
|
||||
return
|
||||
|
||||
sendername = input(src.owner, "What organization does the fax come from? This determines the prefix of the paper (i.e. Central Command- Title). This is optional.", "Organization") as text|null
|
||||
@@ -2031,21 +2031,21 @@
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","SC")
|
||||
for(var/obj/item/clothing/under/O in world)
|
||||
del(O)
|
||||
qdel(O)
|
||||
ok = 1
|
||||
if("sec_all_clothes")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","SAC")
|
||||
for(var/obj/item/clothing/O in world)
|
||||
del(O)
|
||||
qdel(O)
|
||||
ok = 1
|
||||
if("sec_classic1")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","SC1")
|
||||
for(var/obj/item/clothing/suit/fire/O in world)
|
||||
del(O)
|
||||
qdel(O)
|
||||
for(var/obj/structure/grille/O in world)
|
||||
del(O)
|
||||
qdel(O)
|
||||
/* for(var/obj/machinery/vehicle/pod/O in world)
|
||||
for(var/mob/M in src)
|
||||
M.loc = src.loc
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
// if(!istates.Find(O.item_state))
|
||||
// text += "[O.type] MISSING NORMAL ICON CALLED\n\"[O.item_state]\" IN \"[O.icon]\"\n"
|
||||
//text+="\n"
|
||||
del(O)
|
||||
qdel(O)
|
||||
if(text)
|
||||
var/F = file("broken_hand_icons.txt")
|
||||
fdel(F)
|
||||
|
||||
@@ -400,7 +400,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
if(hsbitem)
|
||||
for(var/atom/O in world)
|
||||
if(istype(O, hsbitem))
|
||||
del(O)
|
||||
qdel(O)
|
||||
log_admin("[key_name(src)] has deleted all instances of [hsbitem].")
|
||||
message_admins("[key_name_admin(src)] has deleted all instances of [hsbitem].", 0)
|
||||
feedback_add_details("admin_verb","DELA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -461,7 +461,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
var/mob/adminmob = src.mob
|
||||
M.ckey = src.ckey
|
||||
if( isobserver(adminmob) )
|
||||
del(adminmob)
|
||||
qdel(adminmob)
|
||||
feedback_add_details("admin_verb","ADC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
@@ -615,7 +615,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
continue
|
||||
if(istype(I, /obj/item/organ))
|
||||
continue
|
||||
del(I)
|
||||
qdel(I)
|
||||
switch(dresscode)
|
||||
if ("strip")
|
||||
//do nothing
|
||||
@@ -1111,7 +1111,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
if(G.anchored)
|
||||
var/obj/singularity/S = new /obj/singularity(get_turf(G), 50)
|
||||
spawn(0)
|
||||
del(G)
|
||||
qdel(G)
|
||||
S.energy = 1750
|
||||
S.current_size = 7
|
||||
S.icon = 'icons/effects/224x224.dmi'
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
return
|
||||
|
||||
message_admins("[key_name_admin(src)] accessed file: [path]")
|
||||
src << run( file(path) )
|
||||
src << ftp( file(path) )
|
||||
src << "Attempting to send file, this may take a fair few minutes if the file is very large."
|
||||
return
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
return
|
||||
|
||||
message_admins("[key_name_admin(src)] accessed file: [path]")
|
||||
src << run( file(path) )
|
||||
src << ftp( file(path) )
|
||||
src << "Attempting to send file, this may take a fair few minutes if the file is very large."
|
||||
return
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
|
||||
var/path = "data/logs/[time2text(world.realtime,"YYYY/MM-Month/DD-Day")].log"
|
||||
if( fexists(path) )
|
||||
src << run( file(path) )
|
||||
src << ftp( file(path) )
|
||||
else
|
||||
src << "<font color='red'>Error: view_txt_log(): File not found/Invalid path([path]).</font>"
|
||||
return
|
||||
@@ -102,7 +102,7 @@
|
||||
|
||||
var/path = "data/logs/[time2text(world.realtime,"YYYY/MM-Month/DD-Day")] Attack.log"
|
||||
if( fexists(path) )
|
||||
src << run( file(path) )
|
||||
src << ftp( file(path) )
|
||||
else
|
||||
src << "<font color='red'>Error: view_atk_log(): File not found/Invalid path([path]).</font>"
|
||||
return
|
||||
|
||||
@@ -292,7 +292,7 @@ client/proc/one_click_antag()
|
||||
if(synd_mind.current.client)
|
||||
for(var/image/I in synd_mind.current.client.images)
|
||||
if(I.icon_state == "synd")
|
||||
del(I)
|
||||
qdel(I)
|
||||
|
||||
for(var/datum/mind/synd_mind in ticker.mode.syndicates)
|
||||
if(synd_mind.current)
|
||||
@@ -367,7 +367,7 @@ client/proc/one_click_antag()
|
||||
candidates.Remove(theghost)
|
||||
|
||||
if(!theghost)
|
||||
del(new_syndicate_commando)
|
||||
qdel(new_syndicate_commando)
|
||||
break
|
||||
|
||||
new_syndicate_commando.key = theghost.key
|
||||
@@ -487,7 +487,7 @@ client/proc/one_click_antag()
|
||||
candidates.Remove(theghost)
|
||||
|
||||
if(!theghost)
|
||||
del(new_vox)
|
||||
qdel(new_vox)
|
||||
break
|
||||
|
||||
new_vox.key = theghost.key
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
continue
|
||||
if(istype(I, /obj/item/organ))
|
||||
continue
|
||||
del(I)
|
||||
qdel(I)
|
||||
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/under/kilt(H), slot_w_uniform)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(H), slot_l_ear)
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
continue
|
||||
if(istype (I, /obj/item/organ))
|
||||
continue
|
||||
del(I)
|
||||
qdel(I)
|
||||
|
||||
H << "<B>You are part of the [station_name()] dodgeball tournament. Throw dodgeballs at crewmembers wearing a different color than you. OOC: Use THROW on an EMPTY-HAND to catch thrown dodgeballs.</B>"
|
||||
|
||||
|
||||
@@ -173,7 +173,7 @@
|
||||
a_right:holder = null
|
||||
a_right.loc = T
|
||||
spawn(0)
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
part2.master = null
|
||||
part1 = null
|
||||
part2 = null
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
status = !status
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
if(M.client)
|
||||
M << "<span class='info'>[message]</span>"
|
||||
if(once)
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/step_trigger/teleport_fancy
|
||||
var/locationx
|
||||
@@ -41,4 +41,4 @@
|
||||
|
||||
uses--
|
||||
if(uses == 0)
|
||||
del(src)
|
||||
qdel(src)
|
||||
@@ -87,7 +87,7 @@
|
||||
O = (H.l_ear == src ? H.r_ear : H.l_ear)
|
||||
user.unEquip(O)
|
||||
if(!istype(src,/obj/item/clothing/ears/offear))
|
||||
del(O)
|
||||
qdel(O)
|
||||
O = src
|
||||
else
|
||||
O = src
|
||||
@@ -99,7 +99,7 @@
|
||||
O.add_fingerprint(user)
|
||||
|
||||
if(istype(src,/obj/item/clothing/ears/offear))
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/clothing/ears/offear
|
||||
name = "Other ear"
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
if ((istype(H, /obj/item/weapon/restraints/handcuffs) && !( src.chained )))
|
||||
//H = null
|
||||
if (src.icon_state != "orange") return
|
||||
del(H)
|
||||
qdel(H)
|
||||
src.chained = 1
|
||||
src.slowdown = 15
|
||||
src.icon_state = "orange1"
|
||||
|
||||
@@ -152,7 +152,7 @@ var/global/list/breach_burn_descriptors = list(
|
||||
for(var/datum/breach/B in breaches)
|
||||
if(!B.class)
|
||||
src.breaches -= B
|
||||
del(B)
|
||||
qdel(B)
|
||||
else
|
||||
damage += B.class
|
||||
if(B.damtype == BRUTE)
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
/obj/item/clothing/suit/space/chronos/proc/new_camera(var/mob/user)
|
||||
if(camera)
|
||||
del(camera)
|
||||
qdel(camera)
|
||||
camera = new /obj/effect/chronos_cam(get_turf(user))
|
||||
camera.holder = user
|
||||
user.remote_control = camera
|
||||
@@ -104,11 +104,11 @@
|
||||
user.client.eye = camera
|
||||
else
|
||||
user.client.eye = user
|
||||
del(holder)
|
||||
qdel(holder)
|
||||
else if(user)
|
||||
user.loc = from_turf
|
||||
if(phaseanim)
|
||||
del(phaseanim)
|
||||
qdel(phaseanim)
|
||||
teleporting = 0
|
||||
if(user && !user.loc) //ubersanity
|
||||
user.loc = locate(0,0,1)
|
||||
@@ -163,7 +163,7 @@
|
||||
user << "\nroot@ChronosuitMK4# chronowalk4 --stop\n"
|
||||
if(camera)
|
||||
user << "\[ <span style='color: #ff5500;'>ok</span> \] Sending TERM signal to chronowalk4-view" //yes I know they aren't a different color when shutting down, but they were too similar at a glance
|
||||
del(camera)
|
||||
qdel(camera)
|
||||
if(helmet)
|
||||
user << "\[ <span style='color: #ff5500;'>ok</span> \] Stopping ui display driver"
|
||||
user << "\[ <span style='color: #ff5500;'>ok</span> \] Stopping brainwave scanner"
|
||||
@@ -201,7 +201,7 @@
|
||||
else
|
||||
src.loc = step
|
||||
else
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/chronos_cam/Destroy()
|
||||
if(holder)
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
if(!src || !WT.isOn()) return
|
||||
user << "\blue You deconstruct the frame."
|
||||
new /obj/item/stack/sheet/metal( src.loc, 5 )
|
||||
del(src)
|
||||
qdel(src)
|
||||
if(1)
|
||||
if(istype(P, /obj/item/weapon/wrench))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
@@ -160,7 +160,7 @@
|
||||
if(do_after(user, 20))
|
||||
if(P)
|
||||
P:amount -= 5
|
||||
if(!P:amount) del(P)
|
||||
if(!P:amount) qdel(P)
|
||||
user << "\blue You add cables to the frame."
|
||||
src.state = 3
|
||||
src.icon_state = "3"
|
||||
@@ -212,7 +212,7 @@
|
||||
if(circuit.OS)
|
||||
circuit.OS.computer = B
|
||||
B.RefreshParts() // todo
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
/*
|
||||
This will remove peripherals if you specify one, but the main function is to
|
||||
|
||||
@@ -160,7 +160,7 @@
|
||||
if(!silent)
|
||||
var/obj/oldobj = obj
|
||||
obj.visible_message("The [oldobj.name] fades away!")
|
||||
del(obj)
|
||||
qdel(obj)
|
||||
|
||||
proc/checkInteg(var/area/A)
|
||||
for(var/turf/T in A)
|
||||
@@ -213,10 +213,10 @@
|
||||
derez(item)
|
||||
|
||||
for(var/obj/effect/decal/cleanable/blood/B in linkedholodeck)
|
||||
del(B)
|
||||
qdel(B)
|
||||
|
||||
for(var/mob/living/simple_animal/hostile/carp/C in linkedholodeck)
|
||||
del(C)
|
||||
qdel(C)
|
||||
|
||||
holographic_items = A.copy_contents_to(linkedholodeck , 1)
|
||||
|
||||
|
||||
@@ -253,7 +253,7 @@
|
||||
if (href_list["del_all2"])
|
||||
for(var/datum/data/record/R in data_core.medical)
|
||||
//R = null
|
||||
del(R)
|
||||
qdel(R)
|
||||
//Foreach goto(494)
|
||||
src.temp = "All records deleted."
|
||||
|
||||
@@ -419,7 +419,7 @@
|
||||
if (href_list["del_r2"])
|
||||
if (src.active2)
|
||||
//src.active2 = null
|
||||
del(src.active2)
|
||||
qdel(src.active2)
|
||||
|
||||
if (href_list["d_rec"])
|
||||
var/datum/data/record/R = locate(href_list["d_rec"])
|
||||
|
||||
@@ -397,7 +397,7 @@ What a mess.*/
|
||||
|
||||
if ("Purge All Records")
|
||||
for(var/datum/data/record/R in data_core.security)
|
||||
del(R)
|
||||
qdel(R)
|
||||
temp = "All Security records deleted."
|
||||
|
||||
if ("Add Entry")
|
||||
@@ -581,17 +581,17 @@ What a mess.*/
|
||||
|
||||
if ("Delete Record (Security) Execute")
|
||||
if (active2)
|
||||
del(active2)
|
||||
qdel(active2)
|
||||
|
||||
if ("Delete Record (ALL) Execute")
|
||||
if (active1)
|
||||
for(var/datum/data/record/R in data_core.medical)
|
||||
if ((R.fields["name"] == active1.fields["name"] || R.fields["id"] == active1.fields["id"]))
|
||||
del(R)
|
||||
qdel(R)
|
||||
else
|
||||
del(active1)
|
||||
qdel(active1)
|
||||
if (active2)
|
||||
del(active2)
|
||||
qdel(active2)
|
||||
else
|
||||
temp = "This function does not appear to be working at the moment. Our apologies."
|
||||
|
||||
@@ -622,7 +622,7 @@ What a mess.*/
|
||||
continue
|
||||
|
||||
else if(prob(1))
|
||||
del(R)
|
||||
qdel(R)
|
||||
continue
|
||||
|
||||
..(severity)
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
O.loc = loc
|
||||
usr << "\The [src] crumbles to pieces."
|
||||
spawn(5)
|
||||
del src
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
if(!stored_computer.manipulating)
|
||||
@@ -65,7 +65,7 @@
|
||||
|
||||
spawn(5)
|
||||
stored_computer.manipulating = 0
|
||||
del src
|
||||
qdel(src)
|
||||
else
|
||||
usr << "\red You are already opening the computer!"
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
/obj/machinery/lapvend/blob_act()
|
||||
if (prob(50))
|
||||
spawn(0)
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
return
|
||||
@@ -201,10 +201,10 @@
|
||||
if (network == 3)
|
||||
newlap.spawn_parts += (/obj/item/part/computer/networking/cable)
|
||||
if (power == 1)
|
||||
del(newlap.battery)
|
||||
qdel(newlap.battery)
|
||||
newlap.battery = new /obj/item/weapon/stock_parts/cell/high(newlap)
|
||||
if (power == 2)
|
||||
del(newlap.battery)
|
||||
qdel(newlap.battery)
|
||||
newlap.battery = new /obj/item/weapon/stock_parts/cell/super(newlap)
|
||||
|
||||
newlap.spawn_parts()
|
||||
@@ -394,7 +394,7 @@
|
||||
T.time = worldtime2text()
|
||||
vendor_account.transaction_log.Add(T)
|
||||
|
||||
del(relap)
|
||||
qdel(relap)
|
||||
|
||||
vendmode = 0
|
||||
cardreader = 0
|
||||
|
||||
@@ -111,7 +111,7 @@ Programs are a file that can be executed
|
||||
update_icon()
|
||||
if(popup)
|
||||
popup.close()
|
||||
del popup
|
||||
qdel(popup)
|
||||
return
|
||||
|
||||
/*
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
var/obj/item/weaponcrafting/ishotgunconstruction/I = new /obj/item/weaponcrafting/ishotgunconstruction
|
||||
user.unEquip(src)
|
||||
user.put_in_hands(I)
|
||||
del(W)
|
||||
del(src)
|
||||
qdel(W)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
// SHOTGUN //
|
||||
@@ -57,8 +57,8 @@
|
||||
var/obj/item/weaponcrafting/ishotgunconstruction3/I = new /obj/item/weaponcrafting/ishotgunconstruction3
|
||||
user.unEquip(src)
|
||||
user.put_in_hands(I)
|
||||
del(W)
|
||||
del(src)
|
||||
qdel(W)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/item/weaponcrafting/ishotgunconstruction3
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
I.fingerprint_hash = C.fingerprint_hash
|
||||
//I.pin = C.pin
|
||||
//replace old ID
|
||||
del(C)
|
||||
qdel(C)
|
||||
ok = M.equip_if_possible(I, slot_wear_id, 0) //if 1, last argument deletes on fail
|
||||
break
|
||||
testing("Replaced ID!")
|
||||
|
||||
@@ -115,7 +115,7 @@ log transactions
|
||||
|
||||
user << "<span class='info'>You insert [I] into [src].</span>"
|
||||
src.attack_hand(user)
|
||||
del I
|
||||
qdel(I)
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
@@ -23,4 +23,4 @@
|
||||
if(!C.stat)
|
||||
var/turf/T = get_turf(C)
|
||||
if(istype(T, /turf/space))
|
||||
del(C)
|
||||
qdel(C)
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
D.z = 2
|
||||
D.has_loot = 0
|
||||
|
||||
del(D)
|
||||
qdel(D)
|
||||
num_recovered++
|
||||
|
||||
if(num_recovered > drones_list.len * 0.75)
|
||||
|
||||
@@ -50,4 +50,4 @@
|
||||
else
|
||||
new /mob/living/simple_animal/cow(loc)
|
||||
|
||||
del(src)
|
||||
qdel(src)
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
/datum/event/tear/end()
|
||||
if(TE)
|
||||
del(TE)
|
||||
qdel(TE)
|
||||
|
||||
/obj/effect/tear
|
||||
name="Dimensional Tear"
|
||||
@@ -40,7 +40,7 @@
|
||||
animation.master = src
|
||||
// flick("newtear",usr)
|
||||
spawn(15)
|
||||
if(animation) del(animation)
|
||||
if(animation) qdel(animation)
|
||||
|
||||
|
||||
spawn(rand(30,120))
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
if(life <= 0)
|
||||
walk(src,0)
|
||||
spawn(1)
|
||||
del(src)
|
||||
qdel(src)
|
||||
return 0
|
||||
return
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ In my current plan for it, 'solid' will be defined as anything with density == 1
|
||||
|
||||
Move()
|
||||
if(z != z_original || loc == destination)
|
||||
spawn(0) del(src)
|
||||
spawn(0) qdel(src)
|
||||
return ..()
|
||||
|
||||
Bump(atom/clong)
|
||||
@@ -87,7 +87,7 @@ In my current plan for it, 'solid' will be defined as anything with density == 1
|
||||
if(clong.density || prob(10))
|
||||
clong.ex_act(2)
|
||||
else
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
if(clong && prob(25))
|
||||
src.loc = clong.loc
|
||||
|
||||
@@ -33,4 +33,4 @@
|
||||
smoke.set_up(R, rand(1, 2), 0, vent, 0, silent = 1)
|
||||
playsound(vent.loc, 'sound/effects/smoke.ogg', 50, 1, -3)
|
||||
smoke.start(3)
|
||||
R.delete() //GC the reagents
|
||||
qdel(R)
|
||||
|
||||
@@ -443,16 +443,16 @@ Gunshots/explosions/opening doors/less rare audio (done)
|
||||
/obj/effect/fake_attacker/proc/updateimage()
|
||||
// del src.currentimage
|
||||
if(src.dir == NORTH)
|
||||
del src.currentimage
|
||||
del(src.currentimage)
|
||||
src.currentimage = new /image(up,src)
|
||||
else if(src.dir == SOUTH)
|
||||
del src.currentimage
|
||||
del(src.currentimage)
|
||||
src.currentimage = new /image(down,src)
|
||||
else if(src.dir == EAST)
|
||||
del src.currentimage
|
||||
del(src.currentimage)
|
||||
src.currentimage = new /image(right,src)
|
||||
else if(src.dir == WEST)
|
||||
del src.currentimage
|
||||
del(src.currentimage)
|
||||
src.currentimage = new /image(left,src)
|
||||
my_target << currentimage
|
||||
|
||||
|
||||
@@ -1,24 +1,16 @@
|
||||
|
||||
/obj/machinery/candy_maker
|
||||
/obj/machinery/kitchen_machine/candy_maker
|
||||
name = "candy machine"
|
||||
desc = "The stuff of nightmares for a dentist."
|
||||
icon = 'icons/obj/cooking_machines.dmi'
|
||||
icon_state = "candymaker_off"
|
||||
layer = 2.9
|
||||
density = 1
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
idle_power_usage = 5
|
||||
active_power_usage = 100
|
||||
flags = OPENCONTAINER | NOREACT
|
||||
var/operating = 0 // Is it on?
|
||||
var/dirty = 0 // = {0..100} Does it need cleaning?
|
||||
var/broken = 0 // ={0,1,2} How broken is it???
|
||||
var/global/list/datum/recipe/available_recipes // List of the recipes you can use
|
||||
var/global/list/acceptable_items // List of the items you can put in
|
||||
var/global/list/acceptable_reagents // List of the reagents you can put in
|
||||
var/global/max_n_of_items = 0
|
||||
var/efficiency
|
||||
cook_verbs = list("Wonderizing", "Scrumpdiddlyumptiousification", "Miracle-coating", "Flavorifaction")
|
||||
recipe_type = /datum/recipe/candy
|
||||
off_icon = "candymaker_off"
|
||||
on_icon = "candymaker_on"
|
||||
broken_icon = "candymaker_broke"
|
||||
dirty_icon = "candymaker_dirty"
|
||||
open_icon = "candymaker_open"
|
||||
|
||||
// see code/modules/food/recipes_candy.dm for recipes
|
||||
|
||||
@@ -26,29 +18,8 @@
|
||||
* Initialising
|
||||
********************/
|
||||
|
||||
/obj/machinery/candy_maker/New()
|
||||
//..() //do not need this
|
||||
reagents = new/datum/reagents(100)
|
||||
reagents.my_atom = src
|
||||
if (!available_recipes)
|
||||
available_recipes = new
|
||||
for (var/type in (typesof(/datum/recipe/candy)-/datum/recipe/candy))
|
||||
var/datum/recipe/recipe = new type
|
||||
if(recipe.result) // Ignore recipe subtypes that lack a result
|
||||
available_recipes += recipe
|
||||
else
|
||||
del(recipe)
|
||||
acceptable_items = new
|
||||
acceptable_reagents = new
|
||||
for (var/datum/recipe/candy/recipe in available_recipes)
|
||||
for (var/item in recipe.items)
|
||||
acceptable_items |= item
|
||||
for (var/reagent in recipe.reagents)
|
||||
acceptable_reagents |= reagent
|
||||
if (recipe.items)
|
||||
max_n_of_items = max(max_n_of_items,recipe.items.len)
|
||||
acceptable_items |= /obj/item/weapon/reagent_containers/food/snacks/grown
|
||||
|
||||
/obj/machinery/kitchen_machine/candy_maker/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/candy_maker(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
|
||||
@@ -56,8 +27,7 @@
|
||||
component_parts += new /obj/item/stack/cable_coil(null, 5)
|
||||
RefreshParts()
|
||||
|
||||
|
||||
/obj/machinery/candy_maker/upgraded/New()
|
||||
/obj/machinery/kitchen_machine/candy_maker/upgraded/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/candy_maker(null)
|
||||
@@ -66,363 +36,8 @@
|
||||
component_parts += new /obj/item/stack/cable_coil(null, 5)
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/candy_maker/RefreshParts()
|
||||
/obj/machinery/kitchen_machine/candy_maker/RefreshParts()
|
||||
var/E
|
||||
for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts)
|
||||
E += M.rating
|
||||
efficiency = E
|
||||
|
||||
/*******************
|
||||
* Item Adding
|
||||
********************/
|
||||
|
||||
/obj/machinery/candy_maker/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
|
||||
if(operating)
|
||||
return
|
||||
if(!broken && dirty < 100)
|
||||
if(default_deconstruction_screwdriver(user, "candymaker_open", "candymaker_off", O))
|
||||
return
|
||||
if(exchange_parts(user, O))
|
||||
return
|
||||
if(!broken && istype(O, /obj/item/weapon/wrench))
|
||||
playsound(src, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(anchored)
|
||||
anchored = 0
|
||||
user << "<span class='caution'>The [src] can now be moved.</span>"
|
||||
return
|
||||
else if(!anchored)
|
||||
anchored = 1
|
||||
user << "<span class='caution'>The [src] is now secured.</span>"
|
||||
return
|
||||
|
||||
default_deconstruction_crowbar(O)
|
||||
|
||||
if(src.broken > 0)
|
||||
if(src.broken == 2 && istype(O, /obj/item/weapon/screwdriver)) // If it's broken and they're using a screwdriver
|
||||
user.visible_message( \
|
||||
"\blue [user] starts to fix part of the candy maker.", \
|
||||
"\blue You start to fix part of the candy maker." \
|
||||
)
|
||||
if (do_after(user,20))
|
||||
user.visible_message( \
|
||||
"\blue [user] fixes part of the candy maker.", \
|
||||
"\blue You have fixed part of the candy maker." \
|
||||
)
|
||||
src.broken = 1 // Fix it a bit
|
||||
else if(src.broken == 1 && istype(O, /obj/item/weapon/wrench)) // If it's broken and they're doing the wrench
|
||||
user.visible_message( \
|
||||
"\blue [user] starts to fix part of the candy maker.", \
|
||||
"\blue You start to fix part of the candy maker." \
|
||||
)
|
||||
if (do_after(user,20))
|
||||
user.visible_message( \
|
||||
"\blue [user] fixes the candy maker.", \
|
||||
"\blue You have fixed the candy maker." \
|
||||
)
|
||||
src.icon_state = "candymaker_off"
|
||||
src.broken = 0 // Fix it!
|
||||
src.dirty = 0 // just to be sure
|
||||
src.flags = OPENCONTAINER
|
||||
else
|
||||
user << "\red It's broken!"
|
||||
return 1
|
||||
else if(src.dirty==100) // The candy_maker is all dirty so can't be used!
|
||||
if(istype(O, /obj/item/weapon/reagent_containers/spray/cleaner) || istype(O, /obj/item/weapon/soap)) // If they're trying to clean it then let them
|
||||
user.visible_message( \
|
||||
"\blue [user] starts to clean the candy maker.", \
|
||||
"\blue You start to clean the candy maker." \
|
||||
)
|
||||
if (do_after(user,20))
|
||||
user.visible_message( \
|
||||
"\blue [user] has cleaned the candy maker.", \
|
||||
"\blue You have cleaned the candy maker." \
|
||||
)
|
||||
src.dirty = 0 // It's clean!
|
||||
src.broken = 0 // just to be sure
|
||||
src.icon_state = "candymaker_off"
|
||||
src.flags = OPENCONTAINER
|
||||
else //Otherwise bad luck!!
|
||||
user << "\red It's dirty!"
|
||||
return 1
|
||||
else if(is_type_in_list(O,acceptable_items))
|
||||
if (contents.len>=max_n_of_items)
|
||||
user << "\red This [src] is full of ingredients, you cannot put more."
|
||||
return 1
|
||||
if (istype(O,/obj/item/stack) && O:amount>1)
|
||||
new O.type (src)
|
||||
O:use(1)
|
||||
user.visible_message( \
|
||||
"\blue [user] has added one of [O] to \the [src].", \
|
||||
"\blue You add one of [O] to \the [src].")
|
||||
else
|
||||
// user.unEquip(O) //This just causes problems so far as I can tell. -Pete
|
||||
if(!user.drop_item())
|
||||
user << "<span class='notice'>\the [O] is stuck to your hand, you cannot put it in \the [src]</span>"
|
||||
return 0
|
||||
O.loc = src
|
||||
user.visible_message( \
|
||||
"\blue [user] has added \the [O] to \the [src].", \
|
||||
"\blue You add \the [O] to \the [src].")
|
||||
else if(istype(O,/obj/item/weapon/reagent_containers/glass) || \
|
||||
istype(O,/obj/item/weapon/reagent_containers/food/drinks) || \
|
||||
istype(O,/obj/item/weapon/reagent_containers/food/condiment) \
|
||||
)
|
||||
if (!O.reagents)
|
||||
return 1
|
||||
for (var/datum/reagent/R in O.reagents.reagent_list)
|
||||
if (!(R.id in acceptable_reagents))
|
||||
user << "\red Your [O] contains components unsuitable for cookery."
|
||||
return 1
|
||||
//G.reagents.trans_to(src,G.amount_per_transfer_from_this)
|
||||
else if(istype(O,/obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/G = O
|
||||
user << "\red This is ridiculous. You can not fit \the [G.affecting] in this [src]."
|
||||
return 1
|
||||
else
|
||||
user << "\red You have no idea what you can cook with this [O]."
|
||||
return 1
|
||||
src.updateUsrDialog()
|
||||
|
||||
/obj/machinery/candy_maker/attack_ai(mob/user as mob)
|
||||
return 0
|
||||
|
||||
/obj/machinery/candy_maker/attack_hand(mob/user as mob)
|
||||
user.set_machine(src)
|
||||
interact(user)
|
||||
|
||||
/*******************
|
||||
* candy_maker Menu
|
||||
********************/
|
||||
|
||||
/obj/machinery/candy_maker/interact(mob/user as mob) // The Candy Maker Menu
|
||||
if(panel_open || !anchored)
|
||||
return
|
||||
var/dat = ""
|
||||
if(src.broken > 0)
|
||||
dat = {"<TT>Bzzzzttttt</TT>"}
|
||||
else if(src.operating)
|
||||
var/whimsy_word = pick("Wonderizing", "Scrumpdiddlyumptiousification", "Miracle-coating", "Flavorifaction")
|
||||
dat = {"<TT>[whimsy_word] in progress!<BR>Please wait...!</TT>"}
|
||||
else if(src.dirty==100)
|
||||
dat = {"<TT>This candy maker is dirty!<BR>Please clean it before use!</TT>"}
|
||||
else
|
||||
var/list/items_counts = new
|
||||
var/list/items_measures = new
|
||||
var/list/items_measures_p = new
|
||||
for (var/obj/O in contents)
|
||||
var/display_name = O.name
|
||||
if (istype(O,/obj/item/weapon/reagent_containers/food/snacks/egg))
|
||||
items_measures[display_name] = "egg"
|
||||
items_measures_p[display_name] = "eggs"
|
||||
if (istype(O,/obj/item/weapon/reagent_containers/food/snacks/tofu))
|
||||
items_measures[display_name] = "tofu chunk"
|
||||
items_measures_p[display_name] = "tofu chunks"
|
||||
if (istype(O,/obj/item/weapon/reagent_containers/food/snacks/meat)) //any meat
|
||||
items_measures[display_name] = "slab of meat"
|
||||
items_measures_p[display_name] = "slabs of meat"
|
||||
if (istype(O,/obj/item/weapon/reagent_containers/food/snacks/donkpocket))
|
||||
display_name = "Turnovers"
|
||||
items_measures[display_name] = "turnover"
|
||||
items_measures_p[display_name] = "turnovers"
|
||||
if (istype(O,/obj/item/weapon/reagent_containers/food/snacks/carpmeat))
|
||||
items_measures[display_name] = "fillet of meat"
|
||||
items_measures_p[display_name] = "fillets of meat"
|
||||
items_counts[display_name]++
|
||||
for (var/O in items_counts)
|
||||
var/N = items_counts[O]
|
||||
if (!(O in items_measures))
|
||||
dat += {"<B>[capitalize(O)]:</B> [N] [lowertext(O)]\s<BR>"}
|
||||
else
|
||||
if (N==1)
|
||||
dat += {"<B>[capitalize(O)]:</B> [N] [items_measures[O]]<BR>"}
|
||||
else
|
||||
dat += {"<B>[capitalize(O)]:</B> [N] [items_measures_p[O]]<BR>"}
|
||||
|
||||
for (var/datum/reagent/R in reagents.reagent_list)
|
||||
var/display_name = R.name
|
||||
if (R.id == "capsaicin")
|
||||
display_name = "Hotsauce"
|
||||
if (R.id == "frostoil")
|
||||
display_name = "Coldsauce"
|
||||
dat += {"<B>[display_name]:</B> [R.volume] unit\s<BR>"}
|
||||
|
||||
if (items_counts.len==0 && reagents.reagent_list.len==0)
|
||||
dat = {"<B>The candy maker is empty</B><BR>"}
|
||||
else
|
||||
dat = {"<b>Ingredients:</b><br>[dat]"}
|
||||
dat += {"<HR><BR>\
|
||||
<A href='?src=\ref[src];action=cook'>Turn on!<BR>\
|
||||
<A href='?src=\ref[src];action=dispose'>Eject ingredients!<BR>\
|
||||
"}
|
||||
|
||||
user << browse("<HEAD><TITLE>Candy Maker Controls</TITLE></HEAD><TT>[dat]</TT>", "window=candy_maker")
|
||||
onclose(user, "candy_maker")
|
||||
return
|
||||
|
||||
|
||||
|
||||
/***********************************
|
||||
* candy_maker Menu Handling/Cooking
|
||||
************************************/
|
||||
|
||||
/obj/machinery/candy_maker/proc/cook()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
start()
|
||||
if (reagents.total_volume==0 && !(locate(/obj) in contents)) //dry run
|
||||
if (!wzhzhzh(10))
|
||||
abort()
|
||||
return
|
||||
stop()
|
||||
return
|
||||
|
||||
var/datum/recipe/recipe = select_recipe(available_recipes,src)
|
||||
var/obj/cooked
|
||||
var/obj/byproduct
|
||||
if (!recipe)
|
||||
dirty += 1
|
||||
if (prob(max(10,dirty*5)))
|
||||
if (!wzhzhzh(4))
|
||||
abort()
|
||||
return
|
||||
muck_start()
|
||||
wzhzhzh(4)
|
||||
muck_finish()
|
||||
cooked = fail()
|
||||
cooked.loc = src.loc
|
||||
return
|
||||
else if (has_extra_item())
|
||||
if (!wzhzhzh(4))
|
||||
abort()
|
||||
return
|
||||
broke()
|
||||
cooked = fail()
|
||||
cooked.loc = src.loc
|
||||
return
|
||||
else
|
||||
if (!wzhzhzh(10))
|
||||
abort()
|
||||
return
|
||||
stop()
|
||||
cooked = fail()
|
||||
cooked.loc = src.loc
|
||||
return
|
||||
else
|
||||
var/halftime = round(recipe.time/10/2)
|
||||
if (!wzhzhzh(halftime))
|
||||
abort()
|
||||
return
|
||||
if (!wzhzhzh(halftime))
|
||||
abort()
|
||||
cooked = fail()
|
||||
cooked.loc = src.loc
|
||||
return
|
||||
cooked = recipe.make_food(src)
|
||||
byproduct = recipe.get_byproduct()
|
||||
stop()
|
||||
if(cooked)
|
||||
cooked.loc = src.loc
|
||||
for(var/i=1,i<efficiency,i++)
|
||||
cooked = new cooked.type(loc)
|
||||
if(byproduct)
|
||||
new byproduct(loc)
|
||||
return
|
||||
|
||||
/obj/machinery/candy_maker/proc/wzhzhzh(var/seconds as num)
|
||||
for (var/i=1 to seconds)
|
||||
if (stat & (NOPOWER|BROKEN))
|
||||
return 0
|
||||
use_power(500)
|
||||
sleep(10)
|
||||
return 1
|
||||
|
||||
/obj/machinery/candy_maker/proc/has_extra_item()
|
||||
for (var/obj/O in contents)
|
||||
if ( \
|
||||
!istype(O,/obj/item/weapon/reagent_containers/food) && \
|
||||
!istype(O, /obj/item/weapon/grown) \
|
||||
)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/machinery/candy_maker/proc/start()
|
||||
src.visible_message("\blue The candy maker turns on.", "\blue You hear a candy maker.")
|
||||
src.operating = 1
|
||||
src.icon_state = "candymaker_on"
|
||||
src.updateUsrDialog()
|
||||
|
||||
/obj/machinery/candy_maker/proc/abort()
|
||||
src.operating = 0 // Turn it off again aferwards
|
||||
src.icon_state = "candymaker_off"
|
||||
src.updateUsrDialog()
|
||||
|
||||
/obj/machinery/candy_maker/proc/stop()
|
||||
playsound(src.loc, 'sound/machines/ding.ogg', 50, 1)
|
||||
src.operating = 0 // Turn it off again aferwards
|
||||
src.icon_state = "candymaker_off"
|
||||
src.updateUsrDialog()
|
||||
|
||||
/obj/machinery/candy_maker/proc/dispose()
|
||||
for (var/obj/O in contents)
|
||||
O.loc = src.loc
|
||||
if (src.reagents.total_volume)
|
||||
src.dirty++
|
||||
src.reagents.clear_reagents()
|
||||
usr << "\blue You dispose of the candy maker contents."
|
||||
src.updateUsrDialog()
|
||||
|
||||
/obj/machinery/candy_maker/proc/muck_start()
|
||||
playsound(src.loc, 'sound/effects/splat.ogg', 50, 1) // Play a splat sound
|
||||
src.icon_state = "candymaker_dirty" // Make it look dirty!!
|
||||
|
||||
/obj/machinery/candy_maker/proc/muck_finish()
|
||||
playsound(src.loc, 'sound/machines/ding.ogg', 50, 1)
|
||||
src.visible_message("\red The candy maker gets covered in muck!")
|
||||
src.dirty = 100 // Make it dirty so it can't be used util cleaned
|
||||
src.flags = null //So you can't add condiments
|
||||
src.icon_state = "candymaker_dirty" // Make it look dirty too
|
||||
src.operating = 0 // Turn it off again aferwards
|
||||
src.updateUsrDialog()
|
||||
|
||||
/obj/machinery/candy_maker/proc/broke()
|
||||
var/datum/effect/effect/system/spark_spread/s = new
|
||||
s.set_up(2, 1, src)
|
||||
s.start()
|
||||
src.icon_state = "candymaker_broke" // Make it look all busted up and shit
|
||||
src.visible_message("\red The candy maker breaks!") //Let them know they're stupid
|
||||
src.broken = 2 // Make it broken so it can't be used util fixed
|
||||
src.flags = null //So you can't add condiments
|
||||
src.operating = 0 // Turn it off again aferwards
|
||||
src.updateUsrDialog()
|
||||
|
||||
/obj/machinery/candy_maker/proc/fail()
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/badrecipe/ffuu = new(src)
|
||||
var/amount = 0
|
||||
for (var/obj/O in contents-ffuu)
|
||||
amount++
|
||||
if (O.reagents)
|
||||
var/id = O.reagents.get_master_reagent_id()
|
||||
if (id)
|
||||
amount+=O.reagents.get_reagent_amount(id)
|
||||
del(O)
|
||||
src.reagents.clear_reagents()
|
||||
ffuu.reagents.add_reagent("carbon", amount)
|
||||
ffuu.reagents.add_reagent("????", amount/10)
|
||||
return ffuu
|
||||
|
||||
/obj/machinery/candy_maker/Topic(href, href_list)
|
||||
if(..() || panel_open)
|
||||
return
|
||||
|
||||
usr.set_machine(src)
|
||||
if(src.operating)
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
switch(href_list["action"])
|
||||
if ("cook")
|
||||
cook()
|
||||
|
||||
if ("dispose")
|
||||
dispose()
|
||||
return
|
||||
|
||||
@@ -52,7 +52,7 @@ obj/machinery/cooker/proc/turnoff(obj/item/olditem)
|
||||
icon_state = officon
|
||||
playsound(loc, 'sound/machines/ding.ogg', 50, 1)
|
||||
on = 0
|
||||
del(olditem)
|
||||
qdel(olditem)
|
||||
return
|
||||
|
||||
// Burns the food with a chance of starting a fire - for if you try cooking something that's already been cooked that way
|
||||
|
||||
+12
-393
@@ -1,25 +1,16 @@
|
||||
|
||||
/obj/machinery/grill
|
||||
/obj/machinery/kitchen_machine/grill
|
||||
name = "grill"
|
||||
desc = "Backyard grilling, IN SPACE."
|
||||
icon = 'icons/obj/cooking_machines.dmi'
|
||||
icon_state = "grill_off"
|
||||
layer = 2.9
|
||||
density = 1
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
idle_power_usage = 5
|
||||
active_power_usage = 100
|
||||
flags = OPENCONTAINER | NOREACT
|
||||
var/operating = 0 // Is it on?
|
||||
var/dirty = 0 // = {0..100} Does it need cleaning?
|
||||
var/broken = 0 // ={0,1,2} How broken is it???
|
||||
var/global/list/datum/recipe/available_recipes // List of the recipes you can use
|
||||
var/global/list/acceptable_items // List of the items you can put in
|
||||
var/global/list/acceptable_reagents // List of the reagents you can put in
|
||||
var/global/max_n_of_items = 0
|
||||
var/efficiency
|
||||
|
||||
cook_verbs = list("Grilling", "Searing", "Frying")
|
||||
recipe_type = /datum/recipe/grill
|
||||
off_icon = "grill_off"
|
||||
on_icon = "grill_on"
|
||||
broken_icon = "grill_broke"
|
||||
dirty_icon = "grill_dirty"
|
||||
open_icon = "grill_open"
|
||||
|
||||
// see code/modules/food/recipes_grill.dm for recipes
|
||||
|
||||
@@ -27,29 +18,8 @@
|
||||
* Initialising
|
||||
********************/
|
||||
|
||||
/obj/machinery/grill/New()
|
||||
//..() //do not need this
|
||||
reagents = new/datum/reagents(100)
|
||||
reagents.my_atom = src
|
||||
if (!available_recipes)
|
||||
available_recipes = new
|
||||
for (var/type in (typesof(/datum/recipe/grill)-/datum/recipe/grill))
|
||||
var/datum/recipe/recipe = new type
|
||||
if(recipe.result) // Ignore recipe subtypes that lack a result
|
||||
available_recipes += recipe
|
||||
else
|
||||
del(recipe)
|
||||
acceptable_items = new
|
||||
acceptable_reagents = new
|
||||
for (var/datum/recipe/grill/recipe in available_recipes)
|
||||
for (var/item in recipe.items)
|
||||
acceptable_items |= item
|
||||
for (var/reagent in recipe.reagents)
|
||||
acceptable_reagents |= reagent
|
||||
if (recipe.items)
|
||||
max_n_of_items = max(max_n_of_items,recipe.items.len)
|
||||
acceptable_items |= /obj/item/weapon/reagent_containers/food/snacks/grown
|
||||
|
||||
/obj/machinery/kitchen_machine/grill/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/grill(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/micro_laser(null)
|
||||
@@ -58,8 +28,7 @@
|
||||
component_parts += new /obj/item/stack/cable_coil(null, 5)
|
||||
RefreshParts()
|
||||
|
||||
|
||||
/obj/machinery/grill/upgraded/New()
|
||||
/obj/machinery/kitchen_machine/grill/upgraded/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/grill(null)
|
||||
@@ -69,358 +38,8 @@
|
||||
component_parts += new /obj/item/stack/cable_coil(null, 5)
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/grill/RefreshParts()
|
||||
/obj/machinery/kitchen_machine/grill/RefreshParts()
|
||||
var/E
|
||||
for(var/obj/item/weapon/stock_parts/micro_laser/M in component_parts)
|
||||
E += M.rating
|
||||
efficiency = round((E/2), 1) // There's 2 lasers, so halve the effect on the efficiency to keep it balanced
|
||||
|
||||
/*******************
|
||||
* Item Adding
|
||||
********************/
|
||||
|
||||
/obj/machinery/grill/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
|
||||
if(operating)
|
||||
return
|
||||
if(!broken && dirty < 100)
|
||||
if(default_deconstruction_screwdriver(user, "grill_open", "grill_off", O))
|
||||
return
|
||||
if(exchange_parts(user, O))
|
||||
return
|
||||
if(!broken && istype(O, /obj/item/weapon/wrench))
|
||||
playsound(src, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(anchored)
|
||||
anchored = 0
|
||||
user << "<span class='caution'>The [src] can now be moved.</span>"
|
||||
return
|
||||
else if(!anchored)
|
||||
anchored = 1
|
||||
user << "<span class='caution'>The [src] is now secured.</span>"
|
||||
return
|
||||
|
||||
default_deconstruction_crowbar(O)
|
||||
|
||||
if(src.broken > 0)
|
||||
if(src.broken == 2 && istype(O, /obj/item/weapon/screwdriver)) // If it's broken and they're using a screwdriver
|
||||
user.visible_message( \
|
||||
"\blue [user] starts to fix part of the grill.", \
|
||||
"\blue You start to fix part of the grill." \
|
||||
)
|
||||
if (do_after(user,20))
|
||||
user.visible_message( \
|
||||
"\blue [user] fixes part of the grill.", \
|
||||
"\blue You have fixed part of the grill." \
|
||||
)
|
||||
src.broken = 1 // Fix it a bit
|
||||
else if(src.broken == 1 && istype(O, /obj/item/weapon/wrench)) // If it's broken and they're doing the wrench
|
||||
user.visible_message( \
|
||||
"\blue [user] starts to fix part of the grill.", \
|
||||
"\blue You start to fix part of the grill." \
|
||||
)
|
||||
if (do_after(user,20))
|
||||
user.visible_message( \
|
||||
"\blue [user] fixes the grill.", \
|
||||
"\blue You have fixed the grill." \
|
||||
)
|
||||
src.icon_state = "grill_off"
|
||||
src.broken = 0 // Fix it!
|
||||
src.dirty = 0 // just to be sure
|
||||
src.flags = OPENCONTAINER
|
||||
else
|
||||
user << "\red It's broken!"
|
||||
return 1
|
||||
else if(src.dirty==100) // The grill is all dirty so can't be used!
|
||||
if(istype(O, /obj/item/weapon/reagent_containers/spray/cleaner) || istype(O, /obj/item/weapon/soap)) // If they're trying to clean it then let them
|
||||
user.visible_message( \
|
||||
"\blue [user] starts to clean the grill.", \
|
||||
"\blue You start to clean the grill." \
|
||||
)
|
||||
if (do_after(user,20))
|
||||
user.visible_message( \
|
||||
"\blue [user] has cleaned the grill.", \
|
||||
"\blue You have cleaned the grill." \
|
||||
)
|
||||
src.dirty = 0 // It's clean!
|
||||
src.broken = 0 // just to be sure
|
||||
src.icon_state = "grill_off"
|
||||
src.flags = OPENCONTAINER
|
||||
else //Otherwise bad luck!!
|
||||
user << "\red It's dirty!"
|
||||
return 1
|
||||
else if(is_type_in_list(O,acceptable_items))
|
||||
if (contents.len>=max_n_of_items)
|
||||
user << "\red This [src] is full of ingredients, you cannot put more."
|
||||
return 1
|
||||
if (istype(O,/obj/item/stack) && O:amount>1)
|
||||
new O.type (src)
|
||||
O:use(1)
|
||||
user.visible_message( \
|
||||
"\blue [user] has added one of [O] to \the [src].", \
|
||||
"\blue You add one of [O] to \the [src].")
|
||||
else
|
||||
// user.unEquip(O) //This just causes problems so far as I can tell. -Pete
|
||||
if(!user.drop_item())
|
||||
user << "<span class='notice'>\the [O] is stuck to your hand, you cannot put it in \the [src]</span>"
|
||||
return 0
|
||||
O.loc = src
|
||||
user.visible_message( \
|
||||
"\blue [user] has added \the [O] to \the [src].", \
|
||||
"\blue You add \the [O] to \the [src].")
|
||||
else if(istype(O,/obj/item/weapon/reagent_containers/glass) || \
|
||||
istype(O,/obj/item/weapon/reagent_containers/food/drinks) || \
|
||||
istype(O,/obj/item/weapon/reagent_containers/food/condiment) \
|
||||
)
|
||||
if (!O.reagents)
|
||||
return 1
|
||||
for (var/datum/reagent/R in O.reagents.reagent_list)
|
||||
if (!(R.id in acceptable_reagents))
|
||||
user << "\red Your [O] contains components unsuitable for cookery."
|
||||
return 1
|
||||
//G.reagents.trans_to(src,G.amount_per_transfer_from_this)
|
||||
else if(istype(O,/obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/G = O
|
||||
user << "\red This is ridiculous. You can not fit \the [G.affecting] in this [src]."
|
||||
return 1
|
||||
else
|
||||
user << "\red You have no idea what you can cook with this [O]."
|
||||
return 1
|
||||
src.updateUsrDialog()
|
||||
|
||||
/obj/machinery/grill/attack_ai(mob/user as mob)
|
||||
return 0
|
||||
|
||||
/obj/machinery/grill/attack_hand(mob/user as mob)
|
||||
user.set_machine(src)
|
||||
interact(user)
|
||||
|
||||
/*******************
|
||||
* grill Menu
|
||||
********************/
|
||||
|
||||
/obj/machinery/grill/interact(mob/user as mob) // The grill Menu
|
||||
if(panel_open || !anchored)
|
||||
return
|
||||
var/dat = ""
|
||||
if(src.broken > 0)
|
||||
dat = {"<TT>Bzzzzttttt</TT>"}
|
||||
else if(src.operating)
|
||||
dat = {"<TT>Grilling in progress!<BR>Please wait...!</TT>"}
|
||||
else if(src.dirty==100)
|
||||
dat = {"<TT>This grill is dirty!<BR>Please clean it before use!</TT>"}
|
||||
else
|
||||
var/list/items_counts = new
|
||||
var/list/items_measures = new
|
||||
var/list/items_measures_p = new
|
||||
for (var/obj/O in contents)
|
||||
var/display_name = O.name
|
||||
if (istype(O,/obj/item/weapon/reagent_containers/food/snacks/egg))
|
||||
items_measures[display_name] = "egg"
|
||||
items_measures_p[display_name] = "eggs"
|
||||
if (istype(O,/obj/item/weapon/reagent_containers/food/snacks/tofu))
|
||||
items_measures[display_name] = "tofu chunk"
|
||||
items_measures_p[display_name] = "tofu chunks"
|
||||
if (istype(O,/obj/item/weapon/reagent_containers/food/snacks/meat)) //any meat
|
||||
items_measures[display_name] = "slab of meat"
|
||||
items_measures_p[display_name] = "slabs of meat"
|
||||
if (istype(O,/obj/item/weapon/reagent_containers/food/snacks/donkpocket))
|
||||
display_name = "Turnovers"
|
||||
items_measures[display_name] = "turnover"
|
||||
items_measures_p[display_name] = "turnovers"
|
||||
if (istype(O,/obj/item/weapon/reagent_containers/food/snacks/carpmeat))
|
||||
items_measures[display_name] = "fillet of meat"
|
||||
items_measures_p[display_name] = "fillets of meat"
|
||||
items_counts[display_name]++
|
||||
for (var/O in items_counts)
|
||||
var/N = items_counts[O]
|
||||
if (!(O in items_measures))
|
||||
dat += {"<B>[capitalize(O)]:</B> [N] [lowertext(O)]\s<BR>"}
|
||||
else
|
||||
if (N==1)
|
||||
dat += {"<B>[capitalize(O)]:</B> [N] [items_measures[O]]<BR>"}
|
||||
else
|
||||
dat += {"<B>[capitalize(O)]:</B> [N] [items_measures_p[O]]<BR>"}
|
||||
|
||||
for (var/datum/reagent/R in reagents.reagent_list)
|
||||
var/display_name = R.name
|
||||
if (R.id == "capsaicin")
|
||||
display_name = "Hotsauce"
|
||||
if (R.id == "frostoil")
|
||||
display_name = "Coldsauce"
|
||||
dat += {"<B>[display_name]:</B> [R.volume] unit\s<BR>"}
|
||||
|
||||
if (items_counts.len==0 && reagents.reagent_list.len==0)
|
||||
dat = {"<B>The grill is empty</B><BR>"}
|
||||
else
|
||||
dat = {"<b>Ingredients:</b><br>[dat]"}
|
||||
dat += {"<HR><BR>\
|
||||
<A href='?src=\ref[src];action=cook'>Turn on!<BR>\
|
||||
<A href='?src=\ref[src];action=dispose'>Eject ingredients!<BR>\
|
||||
"}
|
||||
|
||||
user << browse("<HEAD><TITLE>grill Controls</TITLE></HEAD><TT>[dat]</TT>", "window=grill")
|
||||
onclose(user, "grill")
|
||||
return
|
||||
|
||||
|
||||
|
||||
/***********************************
|
||||
* grill Menu Handling/Cooking
|
||||
************************************/
|
||||
|
||||
/obj/machinery/grill/proc/cook()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
start()
|
||||
if (reagents.total_volume==0 && !(locate(/obj) in contents)) //dry run
|
||||
if (!wzhzhzh(10))
|
||||
abort()
|
||||
return
|
||||
stop()
|
||||
return
|
||||
|
||||
var/datum/recipe/recipe = select_recipe(available_recipes,src)
|
||||
var/obj/cooked
|
||||
if (!recipe)
|
||||
dirty += 1
|
||||
if (prob(max(10,dirty*5)))
|
||||
if (!wzhzhzh(4))
|
||||
abort()
|
||||
return
|
||||
muck_start()
|
||||
wzhzhzh(4)
|
||||
muck_finish()
|
||||
cooked = fail()
|
||||
cooked.loc = src.loc
|
||||
return
|
||||
else if (has_extra_item())
|
||||
if (!wzhzhzh(4))
|
||||
abort()
|
||||
return
|
||||
broke()
|
||||
cooked = fail()
|
||||
cooked.loc = src.loc
|
||||
return
|
||||
else
|
||||
if (!wzhzhzh(10))
|
||||
abort()
|
||||
return
|
||||
stop()
|
||||
cooked = fail()
|
||||
cooked.loc = src.loc
|
||||
return
|
||||
else
|
||||
var/halftime = round(recipe.time/10/2)
|
||||
if (!wzhzhzh(halftime))
|
||||
abort()
|
||||
return
|
||||
if (!wzhzhzh(halftime))
|
||||
abort()
|
||||
cooked = fail()
|
||||
cooked.loc = src.loc
|
||||
return
|
||||
cooked = recipe.make_food(src)
|
||||
stop()
|
||||
if(cooked)
|
||||
cooked.loc = src.loc
|
||||
for(var/i=1,i<efficiency,i++)
|
||||
cooked = new cooked.type(loc)
|
||||
return
|
||||
|
||||
/obj/machinery/grill/proc/wzhzhzh(var/seconds as num)
|
||||
for (var/i=1 to seconds)
|
||||
if (stat & (NOPOWER|BROKEN))
|
||||
return 0
|
||||
use_power(500)
|
||||
sleep(10)
|
||||
return 1
|
||||
|
||||
/obj/machinery/grill/proc/has_extra_item()
|
||||
for (var/obj/O in contents)
|
||||
if ( \
|
||||
!istype(O,/obj/item/weapon/reagent_containers/food) && \
|
||||
!istype(O, /obj/item/weapon/grown) \
|
||||
)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/machinery/grill/proc/start()
|
||||
src.visible_message("\blue The grill turns on.", "\blue You hear a grill.")
|
||||
src.operating = 1
|
||||
src.icon_state = "grill_on"
|
||||
src.updateUsrDialog()
|
||||
|
||||
/obj/machinery/grill/proc/abort()
|
||||
src.operating = 0 // Turn it off again aferwards
|
||||
src.icon_state = "grill_off"
|
||||
src.updateUsrDialog()
|
||||
|
||||
/obj/machinery/grill/proc/stop()
|
||||
playsound(src.loc, 'sound/machines/ding.ogg', 50, 1)
|
||||
src.operating = 0 // Turn it off again aferwards
|
||||
src.icon_state = "grill_off"
|
||||
src.updateUsrDialog()
|
||||
|
||||
/obj/machinery/grill/proc/dispose()
|
||||
for (var/obj/O in contents)
|
||||
O.loc = src.loc
|
||||
if (src.reagents.total_volume)
|
||||
src.dirty++
|
||||
src.reagents.clear_reagents()
|
||||
usr << "\blue You dispose of the grill contents."
|
||||
src.updateUsrDialog()
|
||||
|
||||
/obj/machinery/grill/proc/muck_start()
|
||||
playsound(src.loc, 'sound/effects/splat.ogg', 50, 1) // Play a splat sound
|
||||
src.icon_state = "grill_dirty" // Make it look dirty!!
|
||||
|
||||
/obj/machinery/grill/proc/muck_finish()
|
||||
playsound(src.loc, 'sound/machines/ding.ogg', 50, 1)
|
||||
src.visible_message("\red The grill gets covered in muck!")
|
||||
src.dirty = 100 // Make it dirty so it can't be used util cleaned
|
||||
src.flags = null //So you can't add condiments
|
||||
src.icon_state = "grill_dirty" // Make it look dirty too
|
||||
src.operating = 0 // Turn it off again aferwards
|
||||
src.updateUsrDialog()
|
||||
|
||||
/obj/machinery/grill/proc/broke()
|
||||
var/datum/effect/effect/system/spark_spread/s = new
|
||||
s.set_up(2, 1, src)
|
||||
s.start()
|
||||
src.icon_state = "grill_broke" // Make it look all busted up and shit
|
||||
src.visible_message("\red The grill breaks!") //Let them know they're stupid
|
||||
src.broken = 2 // Make it broken so it can't be used util fixed
|
||||
src.flags = null //So you can't add condiments
|
||||
src.operating = 0 // Turn it off again aferwards
|
||||
src.updateUsrDialog()
|
||||
|
||||
/obj/machinery/grill/proc/fail()
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/badrecipe/ffuu = new(src)
|
||||
var/amount = 0
|
||||
for (var/obj/O in contents-ffuu)
|
||||
amount++
|
||||
if (O.reagents)
|
||||
var/id = O.reagents.get_master_reagent_id()
|
||||
if (id)
|
||||
amount+=O.reagents.get_reagent_amount(id)
|
||||
del(O)
|
||||
src.reagents.clear_reagents()
|
||||
ffuu.reagents.add_reagent("carbon", amount)
|
||||
ffuu.reagents.add_reagent("????", amount/10)
|
||||
return ffuu
|
||||
|
||||
/obj/machinery/grill/Topic(href, href_list)
|
||||
if(..() || panel_open)
|
||||
return
|
||||
|
||||
usr.set_machine(src)
|
||||
if(src.operating)
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
switch(href_list["action"])
|
||||
if ("cook")
|
||||
cook()
|
||||
|
||||
if ("dispose")
|
||||
dispose()
|
||||
return
|
||||
+12
-393
@@ -1,25 +1,16 @@
|
||||
|
||||
/obj/machinery/oven
|
||||
/obj/machinery/kitchen_machine/oven
|
||||
name = "oven"
|
||||
desc = "Cookies are ready, dear."
|
||||
icon = 'icons/obj/cooking_machines.dmi'
|
||||
icon_state = "oven_off"
|
||||
layer = 2.9
|
||||
density = 1
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
idle_power_usage = 5
|
||||
active_power_usage = 100
|
||||
flags = OPENCONTAINER | NOREACT
|
||||
var/operating = 0 // Is it on?
|
||||
var/dirty = 0 // = {0..100} Does it need cleaning?
|
||||
var/broken = 0 // ={0,1,2} How broken is it???
|
||||
var/global/list/datum/recipe/available_recipes // List of the recipes you can use
|
||||
var/global/list/acceptable_items // List of the items you can put in
|
||||
var/global/list/acceptable_reagents // List of the reagents you can put in
|
||||
var/global/max_n_of_items = 0
|
||||
var/efficiency
|
||||
|
||||
cook_verbs = list("Baking", "Roasting", "Broiling")
|
||||
recipe_type = /datum/recipe/oven
|
||||
off_icon = "oven_off"
|
||||
on_icon = "oven_on"
|
||||
broken_icon = "oven_broke"
|
||||
dirty_icon = "oven_dirty"
|
||||
open_icon = "oven_open"
|
||||
|
||||
// see code/modules/food/recipes_oven.dm for recipes
|
||||
|
||||
@@ -27,29 +18,8 @@
|
||||
* Initialising
|
||||
********************/
|
||||
|
||||
/obj/machinery/oven/New()
|
||||
//..() //do not need this
|
||||
reagents = new/datum/reagents(100)
|
||||
reagents.my_atom = src
|
||||
if (!available_recipes)
|
||||
available_recipes = new
|
||||
for (var/type in (typesof(/datum/recipe/oven)-/datum/recipe/oven))
|
||||
var/datum/recipe/recipe = new type
|
||||
if(recipe.result) // Ignore recipe subtypes that lack a result
|
||||
available_recipes += recipe
|
||||
else
|
||||
del(recipe)
|
||||
acceptable_items = new
|
||||
acceptable_reagents = new
|
||||
for (var/datum/recipe/oven/recipe in available_recipes)
|
||||
for (var/item in recipe.items)
|
||||
acceptable_items |= item
|
||||
for (var/reagent in recipe.reagents)
|
||||
acceptable_reagents |= reagent
|
||||
if (recipe.items)
|
||||
max_n_of_items = max(max_n_of_items,recipe.items.len)
|
||||
acceptable_items |= /obj/item/weapon/reagent_containers/food/snacks/grown
|
||||
|
||||
/obj/machinery/kitchen_machine/oven/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/oven(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/micro_laser(null)
|
||||
@@ -58,8 +28,7 @@
|
||||
component_parts += new /obj/item/stack/cable_coil(null, 5)
|
||||
RefreshParts()
|
||||
|
||||
|
||||
/obj/machinery/oven/upgraded/New()
|
||||
/obj/machinery/kitchen_machine/oven/upgraded/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/oven(null)
|
||||
@@ -69,358 +38,8 @@
|
||||
component_parts += new /obj/item/stack/cable_coil(null, 5)
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/oven/RefreshParts()
|
||||
/obj/machinery/kitchen_machine/oven/RefreshParts()
|
||||
var/E
|
||||
for(var/obj/item/weapon/stock_parts/micro_laser/M in component_parts)
|
||||
E += M.rating
|
||||
efficiency = round((E/2), 1) // There's 2 lasers, so halve the effect on the efficiency to keep it balanced
|
||||
|
||||
/*******************
|
||||
* Item Adding
|
||||
********************/
|
||||
|
||||
/obj/machinery/oven/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
|
||||
if(operating)
|
||||
return
|
||||
if(!broken && dirty < 100)
|
||||
if(default_deconstruction_screwdriver(user, "oven_open", "oven_off", O))
|
||||
return
|
||||
if(exchange_parts(user, O))
|
||||
return
|
||||
if(!broken && istype(O, /obj/item/weapon/wrench))
|
||||
playsound(src, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(anchored)
|
||||
anchored = 0
|
||||
user << "<span class='caution'>The [src] can now be moved.</span>"
|
||||
return
|
||||
else if(!anchored)
|
||||
anchored = 1
|
||||
user << "<span class='caution'>The [src] is now secured.</span>"
|
||||
return
|
||||
|
||||
default_deconstruction_crowbar(O)
|
||||
|
||||
if(src.broken > 0)
|
||||
if(src.broken == 2 && istype(O, /obj/item/weapon/screwdriver)) // If it's broken and they're using a screwdriver
|
||||
user.visible_message( \
|
||||
"\blue [user] starts to fix part of the oven.", \
|
||||
"\blue You start to fix part of the oven." \
|
||||
)
|
||||
if (do_after(user,20))
|
||||
user.visible_message( \
|
||||
"\blue [user] fixes part of the oven.", \
|
||||
"\blue You have fixed part of the oven." \
|
||||
)
|
||||
src.broken = 1 // Fix it a bit
|
||||
else if(src.broken == 1 && istype(O, /obj/item/weapon/wrench)) // If it's broken and they're doing the wrench
|
||||
user.visible_message( \
|
||||
"\blue [user] starts to fix part of the oven.", \
|
||||
"\blue You start to fix part of the oven." \
|
||||
)
|
||||
if (do_after(user,20))
|
||||
user.visible_message( \
|
||||
"\blue [user] fixes the oven.", \
|
||||
"\blue You have fixed the oven." \
|
||||
)
|
||||
src.icon_state = "oven_off"
|
||||
src.broken = 0 // Fix it!
|
||||
src.dirty = 0 // just to be sure
|
||||
src.flags = OPENCONTAINER
|
||||
else
|
||||
user << "\red It's broken!"
|
||||
return 1
|
||||
else if(src.dirty==100) // The oven is all dirty so can't be used!
|
||||
if(istype(O, /obj/item/weapon/reagent_containers/spray/cleaner) || istype(O, /obj/item/weapon/soap)) // If they're trying to clean it then let them
|
||||
user.visible_message( \
|
||||
"\blue [user] starts to clean the oven.", \
|
||||
"\blue You start to clean the oven." \
|
||||
)
|
||||
if (do_after(user,20))
|
||||
user.visible_message( \
|
||||
"\blue [user] has cleaned the oven.", \
|
||||
"\blue You have cleaned the oven." \
|
||||
)
|
||||
src.dirty = 0 // It's clean!
|
||||
src.broken = 0 // just to be sure
|
||||
src.icon_state = "oven_off"
|
||||
src.flags = OPENCONTAINER
|
||||
else //Otherwise bad luck!!
|
||||
user << "\red It's dirty!"
|
||||
return 1
|
||||
else if(is_type_in_list(O,acceptable_items))
|
||||
if (contents.len>=max_n_of_items)
|
||||
user << "\red This [src] is full of ingredients, you cannot put more."
|
||||
return 1
|
||||
if (istype(O,/obj/item/stack) && O:amount>1)
|
||||
new O.type (src)
|
||||
O:use(1)
|
||||
user.visible_message( \
|
||||
"\blue [user] has added one of [O] to \the [src].", \
|
||||
"\blue You add one of [O] to \the [src].")
|
||||
else
|
||||
// user.unEquip(O) //This just causes problems so far as I can tell. -Pete
|
||||
if(!user.drop_item())
|
||||
user << "<span class='notice'>\the [O] is stuck to your hand, you cannot put it in \the [src]</span>"
|
||||
return 0
|
||||
O.loc = src
|
||||
user.visible_message( \
|
||||
"\blue [user] has added \the [O] to \the [src].", \
|
||||
"\blue You add \the [O] to \the [src].")
|
||||
else if(istype(O,/obj/item/weapon/reagent_containers/glass) || \
|
||||
istype(O,/obj/item/weapon/reagent_containers/food/drinks) || \
|
||||
istype(O,/obj/item/weapon/reagent_containers/food/condiment) \
|
||||
)
|
||||
if (!O.reagents)
|
||||
return 1
|
||||
for (var/datum/reagent/R in O.reagents.reagent_list)
|
||||
if (!(R.id in acceptable_reagents))
|
||||
user << "\red Your [O] contains components unsuitable for cookery."
|
||||
return 1
|
||||
//G.reagents.trans_to(src,G.amount_per_transfer_from_this)
|
||||
else if(istype(O,/obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/G = O
|
||||
user << "\red This is ridiculous. You can not fit \the [G.affecting] in this [src]."
|
||||
return 1
|
||||
else
|
||||
user << "\red You have no idea what you can cook with this [O]."
|
||||
return 1
|
||||
src.updateUsrDialog()
|
||||
|
||||
/obj/machinery/oven/attack_ai(mob/user as mob)
|
||||
return 0
|
||||
|
||||
/obj/machinery/oven/attack_hand(mob/user as mob)
|
||||
user.set_machine(src)
|
||||
interact(user)
|
||||
|
||||
/*******************
|
||||
* oven Menu
|
||||
********************/
|
||||
|
||||
/obj/machinery/oven/interact(mob/user as mob) // The oven Menu
|
||||
if(panel_open || !anchored)
|
||||
return
|
||||
var/dat = ""
|
||||
if(src.broken > 0)
|
||||
dat = {"<TT>Bzzzzttttt</TT>"}
|
||||
else if(src.operating)
|
||||
dat = {"<TT>Baking in progress!<BR>Please wait...!</TT>"}
|
||||
else if(src.dirty==100)
|
||||
dat = {"<TT>This oven is dirty!<BR>Please clean it before use!</TT>"}
|
||||
else
|
||||
var/list/items_counts = new
|
||||
var/list/items_measures = new
|
||||
var/list/items_measures_p = new
|
||||
for (var/obj/O in contents)
|
||||
var/display_name = O.name
|
||||
if (istype(O,/obj/item/weapon/reagent_containers/food/snacks/egg))
|
||||
items_measures[display_name] = "egg"
|
||||
items_measures_p[display_name] = "eggs"
|
||||
if (istype(O,/obj/item/weapon/reagent_containers/food/snacks/tofu))
|
||||
items_measures[display_name] = "tofu chunk"
|
||||
items_measures_p[display_name] = "tofu chunks"
|
||||
if (istype(O,/obj/item/weapon/reagent_containers/food/snacks/meat)) //any meat
|
||||
items_measures[display_name] = "slab of meat"
|
||||
items_measures_p[display_name] = "slabs of meat"
|
||||
if (istype(O,/obj/item/weapon/reagent_containers/food/snacks/donkpocket))
|
||||
display_name = "Turnovers"
|
||||
items_measures[display_name] = "turnover"
|
||||
items_measures_p[display_name] = "turnovers"
|
||||
if (istype(O,/obj/item/weapon/reagent_containers/food/snacks/carpmeat))
|
||||
items_measures[display_name] = "fillet of meat"
|
||||
items_measures_p[display_name] = "fillets of meat"
|
||||
items_counts[display_name]++
|
||||
for (var/O in items_counts)
|
||||
var/N = items_counts[O]
|
||||
if (!(O in items_measures))
|
||||
dat += {"<B>[capitalize(O)]:</B> [N] [lowertext(O)]\s<BR>"}
|
||||
else
|
||||
if (N==1)
|
||||
dat += {"<B>[capitalize(O)]:</B> [N] [items_measures[O]]<BR>"}
|
||||
else
|
||||
dat += {"<B>[capitalize(O)]:</B> [N] [items_measures_p[O]]<BR>"}
|
||||
|
||||
for (var/datum/reagent/R in reagents.reagent_list)
|
||||
var/display_name = R.name
|
||||
if (R.id == "capsaicin")
|
||||
display_name = "Hotsauce"
|
||||
if (R.id == "frostoil")
|
||||
display_name = "Coldsauce"
|
||||
dat += {"<B>[display_name]:</B> [R.volume] unit\s<BR>"}
|
||||
|
||||
if (items_counts.len==0 && reagents.reagent_list.len==0)
|
||||
dat = {"<B>The oven is empty</B><BR>"}
|
||||
else
|
||||
dat = {"<b>Ingredients:</b><br>[dat]"}
|
||||
dat += {"<HR><BR>\
|
||||
<A href='?src=\ref[src];action=cook'>Turn on!<BR>\
|
||||
<A href='?src=\ref[src];action=dispose'>Eject ingredients!<BR>\
|
||||
"}
|
||||
|
||||
user << browse("<HEAD><TITLE>oven Controls</TITLE></HEAD><TT>[dat]</TT>", "window=oven")
|
||||
onclose(user, "oven")
|
||||
return
|
||||
|
||||
|
||||
|
||||
/***********************************
|
||||
* oven Menu Handling/Cooking
|
||||
************************************/
|
||||
|
||||
/obj/machinery/oven/proc/cook()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
start()
|
||||
if (reagents.total_volume==0 && !(locate(/obj) in contents)) //dry run
|
||||
if (!wzhzhzh(10))
|
||||
abort()
|
||||
return
|
||||
stop()
|
||||
return
|
||||
|
||||
var/datum/recipe/recipe = select_recipe(available_recipes,src)
|
||||
var/obj/cooked
|
||||
if (!recipe)
|
||||
dirty += 1
|
||||
if (prob(max(10,dirty*5)))
|
||||
if (!wzhzhzh(4))
|
||||
abort()
|
||||
return
|
||||
muck_start()
|
||||
wzhzhzh(4)
|
||||
muck_finish()
|
||||
cooked = fail()
|
||||
cooked.loc = src.loc
|
||||
return
|
||||
else if (has_extra_item())
|
||||
if (!wzhzhzh(4))
|
||||
abort()
|
||||
return
|
||||
broke()
|
||||
cooked = fail()
|
||||
cooked.loc = src.loc
|
||||
return
|
||||
else
|
||||
if (!wzhzhzh(10))
|
||||
abort()
|
||||
return
|
||||
stop()
|
||||
cooked = fail()
|
||||
cooked.loc = src.loc
|
||||
return
|
||||
else
|
||||
var/halftime = round(recipe.time/10/2)
|
||||
if (!wzhzhzh(halftime))
|
||||
abort()
|
||||
return
|
||||
if (!wzhzhzh(halftime))
|
||||
abort()
|
||||
cooked = fail()
|
||||
cooked.loc = src.loc
|
||||
return
|
||||
cooked = recipe.make_food(src)
|
||||
stop()
|
||||
if(cooked)
|
||||
cooked.loc = src.loc
|
||||
for(var/i=1,i<efficiency,i++)
|
||||
cooked = new cooked.type(loc)
|
||||
return
|
||||
|
||||
/obj/machinery/oven/proc/wzhzhzh(var/seconds as num)
|
||||
for (var/i=1 to seconds)
|
||||
if (stat & (NOPOWER|BROKEN))
|
||||
return 0
|
||||
use_power(500)
|
||||
sleep(10)
|
||||
return 1
|
||||
|
||||
/obj/machinery/oven/proc/has_extra_item()
|
||||
for (var/obj/O in contents)
|
||||
if ( \
|
||||
!istype(O,/obj/item/weapon/reagent_containers/food) && \
|
||||
!istype(O, /obj/item/weapon/grown) \
|
||||
)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/machinery/oven/proc/start()
|
||||
src.visible_message("\blue The oven turns on.", "\blue You hear a oven.")
|
||||
src.operating = 1
|
||||
src.icon_state = "oven_on"
|
||||
src.updateUsrDialog()
|
||||
|
||||
/obj/machinery/oven/proc/abort()
|
||||
src.operating = 0 // Turn it off again aferwards
|
||||
src.icon_state = "oven_off"
|
||||
src.updateUsrDialog()
|
||||
|
||||
/obj/machinery/oven/proc/stop()
|
||||
playsound(src.loc, 'sound/machines/ding.ogg', 50, 1)
|
||||
src.operating = 0 // Turn it off again aferwards
|
||||
src.icon_state = "oven_off"
|
||||
src.updateUsrDialog()
|
||||
|
||||
/obj/machinery/oven/proc/dispose()
|
||||
for (var/obj/O in contents)
|
||||
O.loc = src.loc
|
||||
if (src.reagents.total_volume)
|
||||
src.dirty++
|
||||
src.reagents.clear_reagents()
|
||||
usr << "\blue You dispose of the oven contents."
|
||||
src.updateUsrDialog()
|
||||
|
||||
/obj/machinery/oven/proc/muck_start()
|
||||
playsound(src.loc, 'sound/effects/splat.ogg', 50, 1) // Play a splat sound
|
||||
src.icon_state = "oven_dirty" // Make it look dirty!!
|
||||
|
||||
/obj/machinery/oven/proc/muck_finish()
|
||||
playsound(src.loc, 'sound/machines/ding.ogg', 50, 1)
|
||||
src.visible_message("\red The oven gets covered in muck!")
|
||||
src.dirty = 100 // Make it dirty so it can't be used util cleaned
|
||||
src.flags = null //So you can't add condiments
|
||||
src.icon_state = "oven_dirty" // Make it look dirty too
|
||||
src.operating = 0 // Turn it off again aferwards
|
||||
src.updateUsrDialog()
|
||||
|
||||
/obj/machinery/oven/proc/broke()
|
||||
var/datum/effect/effect/system/spark_spread/s = new
|
||||
s.set_up(2, 1, src)
|
||||
s.start()
|
||||
src.icon_state = "oven_broke" // Make it look all busted up and shit
|
||||
src.visible_message("\red The oven breaks!") //Let them know they're stupid
|
||||
src.broken = 2 // Make it broken so it can't be used util fixed
|
||||
src.flags = null //So you can't add condiments
|
||||
src.operating = 0 // Turn it off again aferwards
|
||||
src.updateUsrDialog()
|
||||
|
||||
/obj/machinery/oven/proc/fail()
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/badrecipe/ffuu = new(src)
|
||||
var/amount = 0
|
||||
for (var/obj/O in contents-ffuu)
|
||||
amount++
|
||||
if (O.reagents)
|
||||
var/id = O.reagents.get_master_reagent_id()
|
||||
if (id)
|
||||
amount+=O.reagents.get_reagent_amount(id)
|
||||
del(O)
|
||||
src.reagents.clear_reagents()
|
||||
ffuu.reagents.add_reagent("carbon", amount)
|
||||
ffuu.reagents.add_reagent("????", amount/10)
|
||||
return ffuu
|
||||
|
||||
/obj/machinery/oven/Topic(href, href_list)
|
||||
if(..() || panel_open)
|
||||
return
|
||||
|
||||
usr.set_machine(src)
|
||||
if(src.operating)
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
switch(href_list["action"])
|
||||
if ("cook")
|
||||
cook()
|
||||
|
||||
if ("dispose")
|
||||
dispose()
|
||||
return
|
||||
@@ -17,7 +17,7 @@
|
||||
evil_tree.icon_living = evil_tree.icon_state
|
||||
evil_tree.icon_dead = evil_tree.icon_state
|
||||
evil_tree.icon_gib = evil_tree.icon_state
|
||||
del(xmas)
|
||||
qdel(xmas)
|
||||
|
||||
/obj/item/weapon/toy/xmas_cracker
|
||||
name = "xmas cracker"
|
||||
|
||||
@@ -37,7 +37,7 @@ var/global/datum/controller/plants/plant_controller // Set in New().
|
||||
/datum/controller/plants/New()
|
||||
if(plant_controller && plant_controller != src)
|
||||
log_debug("Rebuilding plant controller.")
|
||||
qdel(plant_controller)
|
||||
del(plant_controller)
|
||||
plant_controller = src
|
||||
setup()
|
||||
process()
|
||||
|
||||
@@ -49,8 +49,8 @@
|
||||
dest_temple.my_ladder.up = my_ladder
|
||||
|
||||
//delete the landmarks now that we're finished
|
||||
del(dest_temple)
|
||||
del(src)
|
||||
qdel(dest_temple)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/landmark/temple/destination/New()
|
||||
//nothing
|
||||
@@ -74,7 +74,7 @@
|
||||
fwall.mineral = mineral
|
||||
if(mineral == "iron")
|
||||
fwall.is_metal = 1
|
||||
del(F)
|
||||
qdel(F)
|
||||
|
||||
for(var/obj/effect/landmark/door_spawner/D in T.contents)
|
||||
var/spawn_type
|
||||
@@ -83,7 +83,7 @@
|
||||
else
|
||||
spawn_type = text2path("/obj/machinery/door/airlock/[mineral]")
|
||||
new spawn_type(D.loc)
|
||||
del(D)
|
||||
qdel(D)
|
||||
|
||||
for(var/turf/unsimulated/wall/T in temple_turfs)
|
||||
if(mineral != "plasma")
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
if(!spawn_type)
|
||||
var/new_type = pick(typesof(/obj/effect/landmark/animal_spawner) - /obj/effect/landmark/animal_spawner)
|
||||
new new_type(get_turf(src))
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
processing_objects.Add(src)
|
||||
spawned_animal = new spawn_type(get_turf(src))
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
pixel_x = rand(-6,6)
|
||||
pixel_y = rand(-6,6)
|
||||
else
|
||||
del(src)
|
||||
qdel(src)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -310,7 +310,7 @@
|
||||
myloc.overlays += flicker
|
||||
spawn(8)
|
||||
myloc.overlays -= flicker
|
||||
del(flicker)
|
||||
qdel(flicker)
|
||||
//flick("sawblade",src)
|
||||
if("poison_dart")
|
||||
M << "\red <b>You feel something small and sharp strike you!</b>"
|
||||
@@ -321,7 +321,7 @@
|
||||
myloc.overlays += flicker
|
||||
spawn(8)
|
||||
myloc.overlays -= flicker
|
||||
del(flicker)
|
||||
qdel(flicker)
|
||||
//flick("dart[rand(1,3)]",src)
|
||||
if("flame_burst")
|
||||
M << "\red <b>A jet of fire comes out of nowhere!</b>"
|
||||
@@ -332,7 +332,7 @@
|
||||
myloc.overlays += flicker
|
||||
spawn(8)
|
||||
myloc.overlays -= flicker
|
||||
del flicker
|
||||
qdel(flicker)
|
||||
//flick("flameburst",src)
|
||||
if("plasma_gas")
|
||||
//spawn a bunch of plasma
|
||||
@@ -353,7 +353,7 @@
|
||||
my_turf.density = 0
|
||||
spawn(8)
|
||||
myloc.overlays -= flicker
|
||||
del(flicker)
|
||||
qdel(flicker)
|
||||
|
||||
var/dist = rand(1,5)
|
||||
var/curtiles = 0
|
||||
@@ -381,7 +381,7 @@
|
||||
if(prob(90))
|
||||
var/turf/T = get_turf(src)
|
||||
T.desc = pick("It looks a little dustier than the surrounding tiles.","It is somewhat ornate.","It looks a little darker than the surrounding tiles.")
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
//50% chance of being a trap
|
||||
/obj/effect/step_trigger/trap/fifty
|
||||
@@ -395,4 +395,4 @@
|
||||
else
|
||||
if(prob(10))
|
||||
new /obj/effect/glowshroom(src.loc)
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
New()
|
||||
..()
|
||||
for(var/obj/structure/bush/B in src)
|
||||
del B
|
||||
qdel(B)
|
||||
|
||||
/turf/unsimulated/jungle/proc/Spread(var/probability, var/prob_loss = 50)
|
||||
if(probability <= 0)
|
||||
@@ -123,7 +123,7 @@
|
||||
/turf/unsimulated/jungle/water/New()
|
||||
..()
|
||||
for(var/obj/structure/bush/B in src)
|
||||
del(B)
|
||||
qdel(B)
|
||||
|
||||
/turf/unsimulated/jungle/water/Entered(atom/movable/O)
|
||||
..()
|
||||
|
||||
@@ -469,7 +469,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
|
||||
b.dat = O:info
|
||||
b.name = "Print Job #" + "[rand(100, 999)]"
|
||||
b.icon_state = "book[rand(1,7)]"
|
||||
del(O)
|
||||
qdel(O)
|
||||
else
|
||||
..()
|
||||
/client/proc/delbook()
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
var/global/datum/controller/process/lighting/lighting_controller
|
||||
|
||||
/datum/controller/process/lighting/setup()
|
||||
name = "lighting"
|
||||
schedule_interval = LIGHTING_INTERVAL
|
||||
lighting_controller = src
|
||||
|
||||
create_lighting_overlays()
|
||||
|
||||
|
||||
@@ -4,4 +4,4 @@
|
||||
..()
|
||||
spawn(0)
|
||||
if(src && !key) //we've transferred to another mob. This ghost should be deleted.
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
if(client)
|
||||
respawnable_list += src
|
||||
spawn(15)
|
||||
if(animation) del(animation)
|
||||
if(src) del(src)
|
||||
if(animation) qdel(animation)
|
||||
if(src) qdel(src)
|
||||
|
||||
|
||||
//This is the proc for turning a mob into ash. Mostly a copy of gib code (above).
|
||||
@@ -48,8 +48,8 @@
|
||||
if(client)
|
||||
respawnable_list += src
|
||||
spawn(15)
|
||||
if(animation) del(animation)
|
||||
if(src) del(src)
|
||||
if(animation) qdel(animation)
|
||||
if(src) qdel(src)
|
||||
|
||||
/mob/proc/melt()
|
||||
death(1)
|
||||
@@ -71,8 +71,8 @@
|
||||
if(client)
|
||||
respawnable_list += src
|
||||
spawn(15)
|
||||
if(animation) del(animation)
|
||||
if(src) del(src)
|
||||
if(animation) qdel(animation)
|
||||
if(src) qdel(src)
|
||||
|
||||
/mob/proc/death(gibbed)
|
||||
|
||||
|
||||
@@ -258,6 +258,6 @@
|
||||
W.loc = src
|
||||
else
|
||||
if (del_on_fail)
|
||||
del(W)
|
||||
qdel(W)
|
||||
return equipped
|
||||
|
||||
|
||||
@@ -266,7 +266,7 @@ Des: Removes all infected images from the alien.
|
||||
if (client)
|
||||
for(var/image/I in client.images)
|
||||
if(dd_hasprefix_case(I.icon_state, "infected"))
|
||||
del(I)
|
||||
qdel(I)
|
||||
return
|
||||
|
||||
/mob/living/carbon/alien/canBeHandcuffed()
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
dead_mob_list -= src
|
||||
|
||||
spawn(15)
|
||||
if(animation) del(animation)
|
||||
if(src) del(src)
|
||||
if(animation) qdel(animation)
|
||||
if(src) qdel(src)
|
||||
|
||||
/mob/living/carbon/alien/dust()
|
||||
death(1)
|
||||
@@ -37,8 +37,8 @@
|
||||
dead_mob_list -= src
|
||||
|
||||
spawn(15)
|
||||
if(animation) del(animation)
|
||||
if(src) del(src)
|
||||
if(animation) qdel(animation)
|
||||
if(src) qdel(src)
|
||||
|
||||
/mob/living/carbon/alien/death(gibbed)
|
||||
if(stat == DEAD) return
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
var/mob/living/carbon/alien/humanoid/queen/new_xeno = new(loc)
|
||||
mind.transfer_to(new_xeno)
|
||||
new_xeno.mind.name = new_xeno.name
|
||||
del(src)
|
||||
qdel(src)
|
||||
else
|
||||
src << "<span class='notice'>We already have an alive queen.</span>"
|
||||
return
|
||||
@@ -157,7 +157,7 @@
|
||||
if (targeted_by && target_locked)
|
||||
overlays_standing[TARGETED_LAYER] = target_locked
|
||||
else if (!targeted_by && target_locked)
|
||||
del(target_locked)
|
||||
qdel(target_locked)
|
||||
if (!targeted_by)
|
||||
overlays_standing[TARGETED_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
else
|
||||
new_xeno.key = key
|
||||
new_xeno.mind.name = new_xeno.name
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
else
|
||||
src << "<span class='warning'>You are not fully grown.</span>"
|
||||
|
||||
@@ -137,4 +137,4 @@ Des: Removes all images from the mob infected by this embryo
|
||||
if(alien.client)
|
||||
for(var/image/I in alien.client.images)
|
||||
if(dd_hasprefix_case(I.icon_state, "infected") && I.loc == affected_mob)
|
||||
del(I)
|
||||
qdel(I)
|
||||
@@ -50,7 +50,7 @@
|
||||
name = "Man-Machine Interface: [brainmob.real_name]"
|
||||
icon_state = "mmi_full"
|
||||
alien = 0
|
||||
del(O)
|
||||
qdel(O)
|
||||
|
||||
|
||||
locked = 1
|
||||
|
||||
@@ -34,10 +34,10 @@
|
||||
|
||||
dead_mob_list -= src
|
||||
if(container && istype(container, /obj/item/device/mmi))
|
||||
del(container)//Gets rid of the MMI if there is one
|
||||
qdel(container)//Gets rid of the MMI if there is one
|
||||
if(loc)
|
||||
if(istype(loc,/obj/item/organ/brain))
|
||||
del(loc)//Gets rid of the brain item
|
||||
qdel(loc)//Gets rid of the brain item
|
||||
spawn(15)
|
||||
if(animation) del(animation)
|
||||
if(src) del(src)
|
||||
if(animation) qdel(animation)
|
||||
if(src) qdel(src)
|
||||
@@ -37,8 +37,8 @@
|
||||
s.start()
|
||||
|
||||
spawn(15)
|
||||
if(animation) del(animation)
|
||||
if(src) del(src)
|
||||
if(animation) qdel(animation)
|
||||
if(src) qdel(src)
|
||||
|
||||
/mob/living/carbon/human/dust()
|
||||
death(1)
|
||||
@@ -57,8 +57,8 @@
|
||||
new /obj/effect/decal/remains/human(loc)
|
||||
|
||||
spawn(15)
|
||||
if(animation) del(animation)
|
||||
if(src) del(src)
|
||||
if(animation) qdel(animation)
|
||||
if(src) qdel(src)
|
||||
|
||||
/mob/living/carbon/human/melt()
|
||||
death(1)
|
||||
@@ -77,8 +77,8 @@
|
||||
//new /obj/effect/decal/remains/human(loc)
|
||||
|
||||
spawn(15)
|
||||
if(animation) del(animation)
|
||||
if(src) del(src)
|
||||
if(animation) qdel(animation)
|
||||
if(src) qdel(src)
|
||||
|
||||
/mob/living/carbon/human/death(gibbed)
|
||||
if(stat == DEAD) return
|
||||
|
||||
@@ -246,7 +246,7 @@
|
||||
if (client.statpanel == "Status")
|
||||
if (internal)
|
||||
if (!internal.air_contents)
|
||||
del(internal)
|
||||
qdel(internal)
|
||||
else
|
||||
stat("Internal Atmosphere Info", internal.name)
|
||||
stat("Tank Pressure", internal.air_contents.return_pressure())
|
||||
@@ -1205,7 +1205,7 @@
|
||||
if(H.brainmob.real_name == src.real_name)
|
||||
if(H.brainmob.mind)
|
||||
H.brainmob.mind.transfer_to(src)
|
||||
del(H)
|
||||
qdel(H)
|
||||
|
||||
|
||||
|
||||
@@ -1279,7 +1279,7 @@
|
||||
.=..()
|
||||
if(clean_feet && !shoes && istype(feet_blood_DNA, /list) && feet_blood_DNA.len)
|
||||
feet_blood_color = null
|
||||
del(feet_blood_DNA)
|
||||
qdel(feet_blood_DNA)
|
||||
update_inv_shoes(1)
|
||||
return 1
|
||||
|
||||
|
||||
@@ -206,14 +206,14 @@
|
||||
visible_message("\red <b>[M] has broken [src]'s grip on [lgrab.affecting]!</B>")
|
||||
talked = 1
|
||||
spawn(1)
|
||||
del(lgrab)
|
||||
qdel(lgrab)
|
||||
if(istype(r_hand, /obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/rgrab = r_hand
|
||||
if(rgrab.affecting)
|
||||
visible_message("\red <b>[M] has broken [src]'s grip on [rgrab.affecting]!</B>")
|
||||
talked = 1
|
||||
spawn(1)
|
||||
del(rgrab)
|
||||
qdel(rgrab)
|
||||
//End BubbleWrap
|
||||
|
||||
if(!talked) //BubbleWrap
|
||||
|
||||
@@ -247,7 +247,7 @@ emp_act
|
||||
else
|
||||
LAssailant = user
|
||||
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
var/obj/item/organ/external/affecting = get_organ(ran_zone(user.zone_sel.selecting))
|
||||
if(!affecting || affecting.is_stump() || (affecting.status & ORGAN_DESTROYED))
|
||||
@@ -505,6 +505,7 @@ emp_act
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/experience_pressure_difference(pressure_difference, direction)
|
||||
playsound(src, 'sound/effects/space_wind.ogg', 50, 1)
|
||||
if(shoes)
|
||||
if(istype(shoes,/obj/item/clothing/shoes/magboots) && (shoes.flags & NOSLIP)) //TODO: Make a not-shit shoe var system to negate airflow.
|
||||
return 0
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
spark_system.attach(src)
|
||||
spark_system.start()
|
||||
spawn(10)
|
||||
del(spark_system)
|
||||
qdel(spark_system)
|
||||
|
||||
//Handles chem traces
|
||||
/mob/living/carbon/human/proc/handle_trace_chems()
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
if (equip_to_slot_if_possible(W, slots[slot], del_on_fail = 0))
|
||||
return slot
|
||||
if (del_on_fail)
|
||||
del(W)
|
||||
qdel(W)
|
||||
return null
|
||||
|
||||
/mob/living/carbon/human/proc/is_in_hands(var/typepath)
|
||||
@@ -353,9 +353,9 @@
|
||||
|
||||
/obj/effect/equip_e/New()
|
||||
if (!ticker)
|
||||
del(src)
|
||||
qdel(src)
|
||||
spawn(100)
|
||||
del(src)
|
||||
qdel(src)
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -366,22 +366,22 @@
|
||||
switch(place)
|
||||
if("mask")
|
||||
if (!( target.wear_mask ))
|
||||
del(src)
|
||||
qdel(src)
|
||||
if("l_hand")
|
||||
if (!( target.l_hand ))
|
||||
del(src)
|
||||
qdel(src)
|
||||
if("r_hand")
|
||||
if (!( target.r_hand ))
|
||||
del(src)
|
||||
qdel(src)
|
||||
if("suit")
|
||||
if (!( target.wear_suit ))
|
||||
del(src)
|
||||
qdel(src)
|
||||
if("uniform")
|
||||
if (!( target.w_uniform ))
|
||||
del(src)
|
||||
qdel(src)
|
||||
if("back")
|
||||
if (!( target.back ))
|
||||
del(src)
|
||||
qdel(src)
|
||||
if("syringe")
|
||||
return
|
||||
if("pill")
|
||||
@@ -394,10 +394,10 @@
|
||||
return
|
||||
if("handcuff")
|
||||
if (!( target.handcuffed ))
|
||||
del(src)
|
||||
qdel(src)
|
||||
if("id")
|
||||
if ((!( target.wear_id ) || !( target.w_uniform )))
|
||||
del(src)
|
||||
qdel(src)
|
||||
if("splints")
|
||||
var/count = 0
|
||||
for(var/organ in list("l_leg","r_leg","l_arm","r_arm"))
|
||||
@@ -406,11 +406,11 @@
|
||||
count = 1
|
||||
break
|
||||
if(count == 0)
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
if("internal")
|
||||
if ((!( (istype(target.wear_mask, /obj/item/clothing/mask) && (istype(target.back, /obj/item/weapon/tank) || istype(target.belt, /obj/item/weapon/tank) || istype(target.s_store, /obj/item/weapon/tank)) && !( target.internal )) ) && !( target.internal )))
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
var/message=null
|
||||
if(target.frozen)
|
||||
@@ -557,7 +557,7 @@
|
||||
message = "\red <B>[source] is trying to empty [target]'s pockets!</B>"
|
||||
if("CPR")
|
||||
if (!target.cpr_time)
|
||||
del(src)
|
||||
qdel(src)
|
||||
target.cpr_time = 0
|
||||
message = "\red <B>[source] is trying perform CPR on [target]!</B>"
|
||||
if("id")
|
||||
@@ -668,13 +668,13 @@ It can still be worn/put on as normal.
|
||||
strip_item = target.shoes
|
||||
if("l_hand")
|
||||
if (istype(target, /obj/item/clothing/suit/straight_jacket))
|
||||
del(src)
|
||||
qdel(src)
|
||||
slot_to_process = slot_l_hand
|
||||
if (target.l_hand)
|
||||
strip_item = target.l_hand
|
||||
if("r_hand")
|
||||
if (istype(target, /obj/item/clothing/suit/straight_jacket))
|
||||
del(src)
|
||||
qdel(src)
|
||||
slot_to_process = slot_r_hand
|
||||
if (target.r_hand)
|
||||
strip_item = target.r_hand
|
||||
@@ -746,11 +746,11 @@ It can still be worn/put on as normal.
|
||||
S.add_fingerprint(source)
|
||||
if (!( istype(S, /obj/item/weapon/dnainjector) ))
|
||||
S.inuse = 0
|
||||
del(src)
|
||||
qdel(src)
|
||||
S.inject(target, source)
|
||||
if (S.s_time >= world.time + 30)
|
||||
S.inuse = 0
|
||||
del(src)
|
||||
qdel(src)
|
||||
S.s_time = world.time
|
||||
for(var/mob/O in viewers(source, null))
|
||||
O.show_message("\red [source] injects [target] with the DNA Injector!", 1)
|
||||
@@ -815,7 +815,7 @@ It can still be worn/put on as normal.
|
||||
if(source && target)
|
||||
if(source.machine == target)
|
||||
target.show_inv(source)
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
|
||||
/mob/proc/get_item_by_slot(slot_id)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -60,7 +60,7 @@
|
||||
H << "<span class='danger'><B>[M] grips your antennae and starts violently pulling!<B></span>"
|
||||
do_after(H, 250)
|
||||
if(p_loc == M.loc && p_loc_m == H.loc)
|
||||
del(H.internal_organs_by_name["antennae"])
|
||||
qdel(H.internal_organs_by_name["antennae"])
|
||||
H.remove_language("Wryn Hivemind")
|
||||
new /obj/item/organ/wryn/hivenode(M.loc)
|
||||
M << "<span class='notice'>You hear a loud crunch as you mercilessly pull off [H]'s antennae.</span>"
|
||||
@@ -110,4 +110,4 @@
|
||||
H.visible_message("\red[H]'s body explodes, leaving behind a pile of microscopic crystals!")
|
||||
explosion(T, 0, 0, 2, 2) // Create a small explosion burst upon death
|
||||
// new /obj/item/weapon/shard/supermatter( T )
|
||||
del(H)
|
||||
qdel(H)
|
||||
@@ -122,7 +122,7 @@
|
||||
|
||||
for(var/obj/item/organ/organ in H.contents)
|
||||
if((organ in H.organs) || (organ in H.internal_organs))
|
||||
del(organ)
|
||||
qdel(organ)
|
||||
|
||||
if(H.organs) H.organs.Cut()
|
||||
if(H.internal_organs) H.internal_organs.Cut()
|
||||
|
||||
@@ -243,7 +243,7 @@ var/global/list/damage_icon_parts = list()
|
||||
//0 = destroyed, 1 = normal, 2 = robotic, 3 = necrotic.
|
||||
//Create a new, blank icon for our mob to use.
|
||||
if(stand_icon)
|
||||
del(stand_icon)
|
||||
qdel(stand_icon)
|
||||
stand_icon = new(species.icon_template ? species.icon_template : 'icons/mob/human.dmi',"blank")
|
||||
var/icon_key = "[species.race_key][g][s_tone][r_skin][g_skin][b_skin]"
|
||||
var/obj/item/organ/eyes/eyes = internal_organs_by_name["eyes"]
|
||||
@@ -447,7 +447,7 @@ var/global/list/damage_icon_parts = list()
|
||||
if (targeted_by && target_locked)
|
||||
overlays_standing[TARGETED_LAYER] = target_locked
|
||||
else if (!targeted_by && target_locked)
|
||||
del(target_locked)
|
||||
qdel(target_locked)
|
||||
if (!targeted_by)
|
||||
overlays_standing[TARGETED_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
//now mobs
|
||||
var/speech_bubble_test = say_test(message)
|
||||
var/image/speech_bubble = image('icons/mob/talk.dmi',src,"h[speech_bubble_test]")
|
||||
spawn(30) del(speech_bubble)
|
||||
spawn(30) qdel(speech_bubble)
|
||||
|
||||
for(var/mob/M in listening)
|
||||
M << speech_bubble
|
||||
|
||||
@@ -638,7 +638,7 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
|
||||
user <<"You apply the enhancer. It now has triple the amount of uses."
|
||||
Uses = 3
|
||||
enhanced = 1
|
||||
del(O)
|
||||
qdel(O)
|
||||
|
||||
/obj/item/slime_extract/New()
|
||||
..()
|
||||
@@ -777,14 +777,14 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
|
||||
pet.icon_dead = "[M.colour] baby slime dead"
|
||||
pet.colour = "[M.colour]"
|
||||
user <<"You feed the slime the potion, removing it's powers and calming it."
|
||||
del(M)
|
||||
qdel(M)
|
||||
var/newname = sanitize(copytext(input(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime") as null|text,1,MAX_NAME_LEN))
|
||||
|
||||
if (!newname)
|
||||
newname = "pet slime"
|
||||
pet.name = newname
|
||||
pet.real_name = newname
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/slimepotion2
|
||||
name = "advanced docility potion"
|
||||
@@ -808,14 +808,14 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
|
||||
pet.icon_dead = "[M.colour] baby slime dead"
|
||||
pet.colour = "[M.colour]"
|
||||
user <<"You feed the slime the potion, removing it's powers and calming it."
|
||||
del(M)
|
||||
qdel(M)
|
||||
var/newname = sanitize(copytext(input(user, "Would you like to give the slime a name?", "Name your new pet", "pet slime") as null|text,1,MAX_NAME_LEN))
|
||||
|
||||
if (!newname)
|
||||
newname = "pet slime"
|
||||
pet.name = newname
|
||||
pet.real_name = newname
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/item/weapon/slimesteroid
|
||||
@@ -840,7 +840,7 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
|
||||
|
||||
user <<"You feed the slime the steroid. It now has triple the amount of extract."
|
||||
M.cores = 3
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/slimesteroid2
|
||||
name = "extract enhancer"
|
||||
@@ -885,7 +885,7 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
|
||||
G.loc = src.loc
|
||||
G.key = ghost.key
|
||||
G << "You are an adamantine golem. You move slowly, but are highly resistant to heat and cold as well as blunt trauma. You are unable to wear clothes, but can still use most tools. Serve [user], and assist them in completing their goals at any cost."
|
||||
del (src)
|
||||
qdel(src)
|
||||
|
||||
|
||||
proc/announce_to_ghosts()
|
||||
|
||||
@@ -221,7 +221,7 @@
|
||||
src.mind.transfer_to(new_slime)
|
||||
else
|
||||
new_slime.key = src.key
|
||||
del(src)
|
||||
qdel(src)
|
||||
else
|
||||
src << "<i>I am not ready to reproduce yet...</i>"
|
||||
else
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
if(istype(loc,/obj/item/weapon/holder/diona))
|
||||
var/obj/item/weapon/holder/diona/L = loc
|
||||
src.loc = L.loc
|
||||
del(L)
|
||||
qdel(L)
|
||||
|
||||
for(var/datum/language/L in languages)
|
||||
adult.add_language(L.name)
|
||||
@@ -182,7 +182,7 @@
|
||||
for (var/obj/item/W in src.contents)
|
||||
src.unEquip(W)
|
||||
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
/mob/living/carbon/primitive/diona/verb/steal_blood()
|
||||
set category = "Diona"
|
||||
|
||||
@@ -423,7 +423,7 @@
|
||||
for(var/mob/O in viewers(M, null))
|
||||
O.show_message(text("\red [] has been pulled from []'s grip by []", G.affecting, G.assailant, src), 1)
|
||||
//G = null
|
||||
del(G)
|
||||
qdel(G)
|
||||
else
|
||||
ok = 0
|
||||
if (locate(/obj/item/weapon/grab, M.grabbed_by.len))
|
||||
@@ -485,6 +485,10 @@
|
||||
if ((!(L.stat) && !(L.restrained())))
|
||||
resist_grab(L) //this passes L because the proc requires a typecasted mob/living instead of just 'src'
|
||||
|
||||
// Sliding out of a morgue/crematorium
|
||||
if(loc && (istype(loc, /obj/structure/morgue) || istype(loc, /obj/structure/crematorium)))
|
||||
resist_tray(L)
|
||||
|
||||
//unbuckling yourself
|
||||
if(L.buckled && (L.last_special <= world.time) )
|
||||
resist_buckle(L) //this passes L because the proc requires a typecasted mob/living instead of just 'src'
|
||||
@@ -565,7 +569,7 @@
|
||||
|
||||
for(var/obj/O in L.requests)
|
||||
L.requests.Remove(O)
|
||||
del(O)
|
||||
qdel(O)
|
||||
resisting++
|
||||
|
||||
for(var/obj/item/weapon/grab/G in usr.grabbed_by)
|
||||
@@ -687,6 +691,17 @@
|
||||
BD.attack_hand(usr)
|
||||
C.open()
|
||||
|
||||
// resist_tray allows a mob to slide themselves out of a morgue or crematorium
|
||||
/mob/living/proc/resist_tray(var/mob/living/carbon/CM)
|
||||
if(!istype(CM))
|
||||
return
|
||||
if (usr.stat || usr.restrained())
|
||||
return
|
||||
|
||||
usr << "<span class='alert'>You attempt to slide yourself out of \the [loc]...</span>"
|
||||
var/obj/structure/S = loc
|
||||
S.attack_hand(src)
|
||||
|
||||
/* resist_stop_drop_roll allows a mob to stop, drop, and roll in order to put out a fire burning on them.
|
||||
*/////
|
||||
/mob/living/proc/resist_stop_drop_roll(var/mob/living/carbon/CM)
|
||||
@@ -739,7 +754,7 @@
|
||||
|
||||
if(hulklien)
|
||||
CM.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
|
||||
del(CM.handcuffed)
|
||||
qdel(CM.handcuffed)
|
||||
CM.handcuffed = null
|
||||
CM.update_inv_handcuffed()
|
||||
return
|
||||
|
||||
@@ -41,30 +41,6 @@
|
||||
src << "\blue Your [C.name] was disrupted!"
|
||||
Stun(2)
|
||||
|
||||
/*
|
||||
//Being hit while using a deadman switch
|
||||
if(istype(equipped(),/obj/item/device/assembly/signaler))
|
||||
var/obj/item/device/assembly/signaler/signaler = equipped()
|
||||
if(signaler.deadman && prob(80))
|
||||
src.visible_message("\red [src] triggers their deadman's switch!")
|
||||
signaler.signal()
|
||||
*/
|
||||
|
||||
/*
|
||||
//Stun Beams -- These were commented out, making appropriate changes here. - Dave
|
||||
if(istype(P, /obj/item/projectile/beam/stun) || istype(P, /obj/item/projectile/bullet/stunshot))
|
||||
stun_effect_act(0, P.agony, def_zone, P)
|
||||
src <<"\red You have been hit by [P]!"
|
||||
del P
|
||||
return
|
||||
|
||||
if(istype(P, /obj/item/projectile/energy/electrode) || istype(P, /obj/item/projectile/bullet/stunshot))
|
||||
stun_effect_act(0, P.agony, def_zone, P)
|
||||
src <<"\red You have been hit by [P]!"
|
||||
del P
|
||||
return
|
||||
*/
|
||||
|
||||
//Armor
|
||||
var/armor = run_armor_check(def_zone, P.flag)
|
||||
var/proj_sharp = is_sharp(P)
|
||||
|
||||
@@ -122,7 +122,7 @@ proc/get_radio_key_from_channel(var/channel)
|
||||
|
||||
var/speech_bubble_test = say_test(message)
|
||||
var/image/speech_bubble = image('icons/mob/talk.dmi',src,"h[speech_bubble_test]")
|
||||
spawn(30) del(speech_bubble)
|
||||
spawn(30) qdel(speech_bubble)
|
||||
|
||||
for(var/mob/M in listening)
|
||||
M << speech_bubble
|
||||
|
||||
@@ -882,7 +882,7 @@ var/list/ai_verbs_default = list(
|
||||
input = input("Select a crew member:") as null|anything in personnel_list
|
||||
var/icon/character_icon = personnel_list[input]
|
||||
if(character_icon)
|
||||
del(holo_icon)//Clear old icon so we're not storing it in memory.
|
||||
qdel(holo_icon)//Clear old icon so we're not storing it in memory.
|
||||
holo_icon = getHologramIcon(icon(character_icon))
|
||||
else
|
||||
alert("No suitable records found. Aborting.")
|
||||
@@ -895,7 +895,7 @@ var/list/ai_verbs_default = list(
|
||||
)
|
||||
input = input("Please select a hologram:") as null|anything in icon_list
|
||||
if(input)
|
||||
del(holo_icon)
|
||||
qdel(holo_icon)
|
||||
switch(input)
|
||||
if("default")
|
||||
holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holo1"))
|
||||
|
||||
@@ -34,11 +34,11 @@ var/global/list/empty_playable_ai_cores = list()
|
||||
job_master.FreeRole(job)
|
||||
|
||||
if(mind.objectives.len)
|
||||
del(mind.objectives)
|
||||
qdel(mind.objectives)
|
||||
mind.special_role = null
|
||||
else
|
||||
if(ticker.mode.name == "AutoTraitor")
|
||||
var/datum/game_mode/traitor/autotraitor/current_mode = ticker.mode
|
||||
current_mode.possible_traitors.Remove(src)
|
||||
|
||||
del(src)
|
||||
qdel(src)
|
||||
@@ -16,8 +16,8 @@
|
||||
|
||||
dead_mob_list -= src
|
||||
spawn(15)
|
||||
if(animation) del(animation)
|
||||
if(src) del(src)
|
||||
if(animation) qdel(animation)
|
||||
if(src) qdel(src)
|
||||
|
||||
/mob/living/silicon/dust()
|
||||
death(1)
|
||||
@@ -37,5 +37,5 @@
|
||||
|
||||
dead_mob_list -= src
|
||||
spawn(15)
|
||||
if(animation) del(animation)
|
||||
if(src) del(src)
|
||||
if(animation) qdel(animation)
|
||||
if(src) qdel(src)
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
|
||||
//New pAI's get a brand new mind to prevent meta stuff from their previous life. This new mind causes problems down the line if it's not deleted here.
|
||||
//Read as: I have no idea what I'm doing but asking for help got me nowhere so this is what you get. - Nodrak
|
||||
if(mind) del(mind)
|
||||
if(mind) qdel(mind)
|
||||
living_mob_list -= src
|
||||
ghostize()
|
||||
if(icon_state != "[chassis]_dead")
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
var/turf/T = get_turf_or_move(src.loc)
|
||||
for (var/mob/M in viewers(T))
|
||||
M.show_message("\red The data cable rapidly retracts back into its spool.", 3, "\red You hear a click and the sound of wire spooling rapidly.", 2)
|
||||
del(src.cable)
|
||||
qdel(src.cable)
|
||||
sleeping = 0
|
||||
ear_deaf = 0
|
||||
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
living_mob_list -= src
|
||||
dead_mob_list -= src
|
||||
spawn(15)
|
||||
if(animation) del(animation)
|
||||
if(src) del(src)
|
||||
if(animation) qdel(animation)
|
||||
if(src) qdel(src)
|
||||
|
||||
/mob/living/silicon/robot/dust()
|
||||
death(1)
|
||||
@@ -35,12 +35,12 @@
|
||||
|
||||
flick("dust-r", animation)
|
||||
new /obj/effect/decal/remains/robot(loc)
|
||||
if(mmi) del(mmi) //Delete the MMI first so that it won't go popping out.
|
||||
if(mmi) qdel(mmi) //Delete the MMI first so that it won't go popping out.
|
||||
|
||||
dead_mob_list -= src
|
||||
spawn(15)
|
||||
if(animation) del(animation)
|
||||
if(src) del(src)
|
||||
if(animation) qdel(animation)
|
||||
if(src) qdel(src)
|
||||
|
||||
|
||||
/mob/living/silicon/robot/death(gibbed)
|
||||
|
||||
@@ -176,7 +176,7 @@
|
||||
if(istype(M,/mob/living/simple_animal/lizard) || istype(M,/mob/living/simple_animal/mouse))
|
||||
src.loc.visible_message("\red [src.loc] sucks [M] into its decompiler. There's a horrible crunching noise.","\red It's a bit of a struggle, but you manage to suck [M] into your decompiler. It makes a series of visceral crunching noises.")
|
||||
new/obj/effect/decal/cleanable/blood/splatter(get_turf(src))
|
||||
del(M)
|
||||
qdel(M)
|
||||
stored_comms["wood"]++
|
||||
stored_comms["wood"]++
|
||||
stored_comms["plastic"]++
|
||||
@@ -200,7 +200,7 @@
|
||||
|
||||
D << "\red You carefully and thoroughly decompile your downed fellow, storing as much of its resources as you can within yourself."
|
||||
|
||||
del(M)
|
||||
qdel(M)
|
||||
new/obj/effect/decal/cleanable/blood/oil(get_turf(src))
|
||||
|
||||
stored_comms["metal"] += 15
|
||||
@@ -267,7 +267,7 @@
|
||||
else
|
||||
continue
|
||||
|
||||
del(W)
|
||||
qdel(W)
|
||||
grabbed_something = 1
|
||||
|
||||
if(grabbed_something)
|
||||
|
||||
@@ -703,7 +703,7 @@ var/list/robot_verbs_default = list(
|
||||
// This doesn't work. Don't use it.
|
||||
//src.Destroy()
|
||||
// del() because it's infrequent and mobs act weird in qdel.
|
||||
del(src)
|
||||
qdel(src)
|
||||
else
|
||||
// Okay we're not removing the cell or an MMI, but maybe something else?
|
||||
var/list/removable_components = list()
|
||||
@@ -865,7 +865,7 @@ var/list/robot_verbs_default = list(
|
||||
src << "\red \b ALERT: [M.real_name] is your new master. Obey your new laws and his commands."
|
||||
if(src.module && istype(src.module, /obj/item/weapon/robot_module/miner))
|
||||
for(var/obj/item/weapon/pickaxe/borgdrill/D in src.module.modules)
|
||||
del(D)
|
||||
qdel(D)
|
||||
src.module.modules += new /obj/item/weapon/pickaxe/diamonddrill(src.module)
|
||||
src.module.rebuild()
|
||||
if(src.module && istype(src.module, /obj/item/weapon/robot_module/medical))
|
||||
@@ -1067,7 +1067,7 @@ var/list/robot_verbs_default = list(
|
||||
//Call when target overlay should be added/removed
|
||||
/mob/living/silicon/robot/update_targeted()
|
||||
if(!targeted_by && target_locked)
|
||||
del(target_locked)
|
||||
qdel(target_locked)
|
||||
updateicon()
|
||||
if (targeted_by && target_locked)
|
||||
overlays += target_locked
|
||||
@@ -1205,7 +1205,7 @@ var/list/robot_verbs_default = list(
|
||||
for(var/A in tile)
|
||||
if(istype(A, /obj/effect))
|
||||
if(istype(A, /obj/effect/rune) || istype(A, /obj/effect/decal/cleanable) || istype(A, /obj/effect/overlay))
|
||||
del(A)
|
||||
qdel(A)
|
||||
else if(istype(A, /obj/item))
|
||||
var/obj/item/cleaned_item = A
|
||||
cleaned_item.clean_blood()
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
|
||||
if(feral > 0)
|
||||
src.strength += B.strength
|
||||
del(B)
|
||||
qdel(B)
|
||||
src.icon_state = "bees[src.strength]"
|
||||
if(strength > 5)
|
||||
icon_state = "bees_swarm"
|
||||
@@ -130,7 +130,7 @@
|
||||
|
||||
B.icon_state = "bees[B.strength]"
|
||||
if(src.strength <= 0)
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
src.icon_state = "bees[B.strength]"
|
||||
var/turf/simulated/floor/T = get_turf(get_step(src, pick(1,2,4,8)))
|
||||
@@ -179,7 +179,7 @@
|
||||
if(!parent && prob(10))
|
||||
strength -= 1
|
||||
if(strength <= 0)
|
||||
del(src)
|
||||
qdel(src)
|
||||
else if(strength <= 5)
|
||||
icon_state = "bees[strength]"
|
||||
|
||||
|
||||
@@ -204,7 +204,7 @@
|
||||
host.computer_id = null
|
||||
host.lastKnownIP = null
|
||||
|
||||
del(host_brain)
|
||||
qdel(host_brain)
|
||||
host_brain = new(src)
|
||||
|
||||
host_brain.ckey = host.ckey
|
||||
@@ -352,7 +352,7 @@ mob/living/simple_animal/borer/proc/detatch()
|
||||
if(!host.lastKnownIP)
|
||||
host.lastKnownIP = b2h_ip
|
||||
|
||||
del(host_brain)
|
||||
qdel(host_brain)
|
||||
|
||||
return
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
real_name = name
|
||||
for(var/spell in construct_spells)
|
||||
AddSpell(new spell(src))
|
||||
updateglow()
|
||||
|
||||
/mob/living/simple_animal/construct/Die()
|
||||
..()
|
||||
@@ -326,6 +327,17 @@
|
||||
/mob/living/simple_animal/construct/harvester/Process_Spacemove(var/check_drift = 0)
|
||||
return 1
|
||||
|
||||
|
||||
////////////////Glow////////////////////
|
||||
/mob/living/simple_animal/construct/proc/updateglow()
|
||||
overlays = 0
|
||||
var/overlay_layer = LIGHTING_LAYER + 1
|
||||
if(layer != MOB_LAYER)
|
||||
overlay_layer=TURF_LAYER+0.2
|
||||
|
||||
overlays += image(icon,"glow-[icon_state]",overlay_layer)
|
||||
set_light(2, -2, l_color = "#FFFFFF")
|
||||
|
||||
////////////////Powers//////////////////
|
||||
|
||||
|
||||
|
||||
@@ -668,5 +668,5 @@
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
respawnable_list += src
|
||||
del src
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
if(locate(/obj/effect/plant) in loc)
|
||||
var/obj/effect/plant/SV = locate(/obj/effect/plant) in loc
|
||||
del(SV)
|
||||
qdel(SV)
|
||||
if(prob(10))
|
||||
say("Nom")
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
if(!stat)
|
||||
if(locate(/obj/effect/plant) in loc)
|
||||
var/obj/effect/plant/SV = locate(/obj/effect/plant) in loc
|
||||
del(SV)
|
||||
qdel(SV)
|
||||
if(prob(10))
|
||||
say("Nom")
|
||||
|
||||
@@ -245,7 +245,7 @@ var/global/chicken_count = 0
|
||||
if(!stat && eggsleft < 8)
|
||||
user.visible_message("\blue [user] feeds [O] to [name]! It clucks happily.","\blue You feed [O] to [name]! It clucks happily.")
|
||||
user.drop_item()
|
||||
del(O)
|
||||
qdel(O)
|
||||
eggsleft += rand(1, 4)
|
||||
//world << eggsleft
|
||||
else
|
||||
@@ -276,7 +276,7 @@ var/global/chicken_count = 0
|
||||
visible_message("[src] hatches with a quiet cracking sound.")
|
||||
new /mob/living/simple_animal/chick(get_turf(src))
|
||||
processing_objects.Remove(src)
|
||||
del(src)
|
||||
qdel(src)
|
||||
else
|
||||
processing_objects.Remove(src)
|
||||
|
||||
|
||||
@@ -81,4 +81,4 @@
|
||||
S2.icon_living = "[src.colour] baby slime"
|
||||
S2.icon_dead = "[src.colour] baby slime dead"
|
||||
S2.colour = "[src.colour]"
|
||||
del(src)
|
||||
qdel(src)
|
||||
@@ -100,7 +100,7 @@
|
||||
if("rapid")
|
||||
new /mob/living/simple_animal/hostile/hivebot/rapid(get_turf(src))
|
||||
spawn(100)
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
/mob/living/simple_animal/hostile/retaliate/malf_drone/Die()
|
||||
src.visible_message("\blue \icon[src] [src] suddenly breaks apart.")
|
||||
..()
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/malf_drone/Destroy()
|
||||
//some random debris left behind
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
..()
|
||||
/mob/living/simple_animal/hostile/retaliate/ghost/Die()
|
||||
new /obj/item/weapon/reagent_containers/food/snacks/ectoplasm(loc)
|
||||
del src
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/skeleton
|
||||
@@ -107,7 +107,7 @@
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/skeleton/Die()
|
||||
new /obj/effect/decal/remains/human(loc)
|
||||
del src
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/zombie
|
||||
@@ -145,5 +145,5 @@
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/zombie/Die()
|
||||
new /obj/effect/decal/cleanable/blood/gibs(loc)
|
||||
del src
|
||||
qdel(src)
|
||||
return
|
||||
@@ -57,5 +57,5 @@
|
||||
new corpse (src.loc)
|
||||
if(weapon1)
|
||||
new weapon1 (src.loc)
|
||||
del src
|
||||
qdel(src)
|
||||
return
|
||||
@@ -42,7 +42,7 @@
|
||||
new weapon1 (src.loc)
|
||||
if(weapon2)
|
||||
new weapon2 (src.loc)
|
||||
del src
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
///////////////Sword and shield////////////
|
||||
@@ -165,5 +165,5 @@
|
||||
/mob/living/simple_animal/hostile/viscerator/Die()
|
||||
..()
|
||||
visible_message("\red <b>[src]</b> is smashed into pieces!")
|
||||
del src
|
||||
qdel(src)
|
||||
return
|
||||
@@ -54,4 +54,4 @@
|
||||
..()
|
||||
visible_message("\red <b>[src]</b> is hacked into pieces!")
|
||||
new /obj/item/stack/sheet/wood(loc)
|
||||
del(src)
|
||||
qdel(src)
|
||||
@@ -36,7 +36,7 @@
|
||||
if((M.client && !( M.blinded )))
|
||||
M.show_message("\red [src] lets out a contented sigh as their form unwinds. ")
|
||||
ghostize()
|
||||
del src
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -399,7 +399,7 @@
|
||||
adjustBruteLoss(-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 [MED] on [src]")
|
||||
|
||||
@@ -49,7 +49,7 @@ var/global/totaltribbles = 0 //global variable so it updates for all tribbles,
|
||||
T.gestation = src.gestation
|
||||
T.pickup(user)
|
||||
user.put_in_active_hand(T)
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
|
||||
/mob/living/simple_animal/tribble/attackby(var/obj/item/weapon/O as obj, var/mob/user as mob, params)
|
||||
@@ -109,7 +109,7 @@ var/global/totaltribbles = 0 //global variable so it updates for all tribbles,
|
||||
T.gestation = src.gestation
|
||||
|
||||
user << "<span class='notice'>The tribble gets up and wanders around.</span>"
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/toy/tribble/attackby(var/obj/item/weapon/O as obj, var/mob/user as mob) //neutering and un-neutering
|
||||
..()
|
||||
@@ -162,7 +162,7 @@ var/global/totaltribbles = 0 //global variable so it updates for all tribbles,
|
||||
if (prob(75))
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
Break()
|
||||
del(src)
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/structure/tribble_cage/proc/healthcheck()
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
|
||||
if(!W.mob_can_equip(src, slot, disable_warning))
|
||||
if(del_on_fail)
|
||||
del(W)
|
||||
qdel(W)
|
||||
else
|
||||
if(!disable_warning)
|
||||
src << "\red You are unable to equip that." //Only print if del_on_fail is false
|
||||
@@ -510,7 +510,7 @@ var/list/slot_equipment_priority = list( \
|
||||
var/list/temp = list( )
|
||||
temp += L.container
|
||||
//L = null
|
||||
del(L)
|
||||
qdel(L)
|
||||
return temp
|
||||
else
|
||||
return L.container
|
||||
@@ -978,8 +978,8 @@ var/list/slot_equipment_priority = list( \
|
||||
process = processScheduler.getProcess("garbage")
|
||||
stat(null, "GAR\t - #[process.getTicks()]\t - [process.getLastRunTime()]")
|
||||
|
||||
//process = processScheduler.getProcess("sun")
|
||||
//stat(null, "SUN\t - #[process.getTicks()]\t - [process.getLastRunTime()]")
|
||||
process = processScheduler.getProcess("sun")
|
||||
stat(null, "SUN([sun.solars.len])\t - #[process.getTicks()]\t - [process.getLastRunTime()]")
|
||||
|
||||
//process = processScheduler.getProcess("garbage")
|
||||
//stat(null, "GAR\t - #[process.getTicks()]\t - [process.getLastRunTime()]")
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user