mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 10:33:30 +01:00
Renamed the prisoner computer's file to prisoner and added a sanity check.
The singularity is now able to eat things like signs and chameleon projectors' projections. A few other misc runtime fixes. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2916 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -466,6 +466,7 @@
|
||||
return
|
||||
|
||||
var/obj/item/device/pda/P = locate(href_list["target"])
|
||||
if(!istype(P)) return
|
||||
|
||||
if(istype(P, /obj/item/device/pda))
|
||||
if (isnull(P)||P.toff || toff)
|
||||
|
||||
@@ -1,18 +1,28 @@
|
||||
/*
|
||||
CONTAINS:
|
||||
SPACE CLEANER
|
||||
MOP
|
||||
|
||||
*/
|
||||
/obj/item/weapon/cleaner
|
||||
desc = "Space Cleaner!"
|
||||
icon = 'janitor.dmi'
|
||||
name = "space cleaner"
|
||||
icon_state = "cleaner"
|
||||
item_state = "cleaner"
|
||||
flags = ONBELT|TABLEPASS|OPENCONTAINER|FPRINT|USEDELAY
|
||||
throwforce = 3
|
||||
w_class = 2.0
|
||||
throw_speed = 2
|
||||
throw_range = 10
|
||||
|
||||
|
||||
/obj/item/weapon/cleaner/New()
|
||||
var/datum/reagents/R = new/datum/reagents(250)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
R.add_reagent("cleaner", 250)
|
||||
|
||||
|
||||
/obj/item/weapon/cleaner/attack(mob/living/carbon/human/M as mob, mob/user as mob)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/cleaner/afterattack(atom/A as mob|obj, mob/user as mob)
|
||||
if (istype(A, /obj/item/weapon/storage ))
|
||||
return
|
||||
@@ -71,15 +81,15 @@ MOP
|
||||
spawn(600)
|
||||
src.reagents.add_reagent(refill, 10)
|
||||
|
||||
|
||||
if((src.reagents.has_reagent("pacid")) || (src.reagents.has_reagent("lube"))) // Messages admins if someone sprays polyacid or space lube from a Cleaner bottle.
|
||||
message_admins("[key_name_admin(user)] fired Polyacid/Space lube from a Cleaner bottle.") // Polymorph
|
||||
log_game("[key_name(user)] fired Polyacid/Space lube from a Cleaner bottle.")
|
||||
|
||||
|
||||
|
||||
if(src.reagents.has_reagent("pacid"))
|
||||
message_admins("[key_name_admin(user)] fired Polyacid from a Cleaner bottle.")
|
||||
log_game("[key_name(user)] fired Polyacid from a Cleaner bottle.")
|
||||
if(src.reagents.has_reagent("lube"))
|
||||
message_admins("[key_name_admin(user)] fired Space lube from a Cleaner bottle.")
|
||||
log_game("[key_name(user)] fired Space lube from a Cleaner bottle.")
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/cleaner/examine()
|
||||
set src in usr
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
@@ -88,15 +98,33 @@ MOP
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/chemsprayer//Another copy paste with a tiny change it seems
|
||||
desc = "A utility used to spray large amounts of reagent in a given area."
|
||||
icon = 'gun.dmi'
|
||||
name = "chem sprayer"
|
||||
icon_state = "chemsprayer"
|
||||
item_state = "chemsprayer"
|
||||
flags = ONBELT|TABLEPASS|OPENCONTAINER|FPRINT|USEDELAY
|
||||
throwforce = 3
|
||||
w_class = 3.0
|
||||
throw_speed = 2
|
||||
throw_range = 10
|
||||
origin_tech = "combat=3;materials=3;engineering=3"
|
||||
|
||||
|
||||
/obj/item/weapon/chemsprayer/New()
|
||||
var/datum/reagents/R = new/datum/reagents(1000)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
R.add_reagent("cleaner", 10)
|
||||
|
||||
|
||||
/obj/item/weapon/chemsprayer/attack(mob/living/carbon/human/M as mob, mob/user as mob)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/chemsprayer/afterattack(atom/A as mob|obj, mob/user as mob)
|
||||
if (istype(A, /obj/item/weapon/storage ))
|
||||
return
|
||||
@@ -170,23 +198,38 @@ MOP
|
||||
spawn(600)
|
||||
src.reagents.add_reagent(refill, 10)
|
||||
|
||||
|
||||
if((src.reagents.has_reagent("pacid")) || (src.reagents.has_reagent("lube"))) // Messages admins if someone sprays polyacid or space lube from a Chem Sprayer.
|
||||
message_admins("[key_name_admin(user)] fired Polyacid/Space lube from a Chem Sprayer.") // Polymorph
|
||||
log_game("[key_name(user)] fired Polyacid/Space lube from a Chem Sprayer.")
|
||||
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
||||
//A direct copy paste of the cleaner, fantastic.
|
||||
/obj/item/weapon/pepperspray
|
||||
desc = "Manufactred by UhangInc., used to blind and down an opponent quickly."
|
||||
icon = 'weapons.dmi'
|
||||
name = "pepperspray"
|
||||
icon_state = "pepperspray"
|
||||
item_state = "pepperspray"
|
||||
flags = ONBELT|TABLEPASS|OPENCONTAINER|FPRINT|USEDELAY
|
||||
throwforce = 3
|
||||
w_class = 2.0
|
||||
throw_speed = 2
|
||||
throw_range = 10
|
||||
|
||||
|
||||
/obj/item/weapon/pepperspray/New()
|
||||
var/datum/reagents/R = new/datum/reagents(45)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
R.add_reagent("condensedcapsaicin", 45)
|
||||
|
||||
|
||||
/obj/item/weapon/pepperspray/attack(mob/living/carbon/human/M as mob, mob/user as mob)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/pepperspray/afterattack(atom/A as mob|obj, mob/user as mob)
|
||||
if (istype(A, /obj/item/weapon/storage ))
|
||||
return
|
||||
@@ -263,22 +306,39 @@ MOP
|
||||
var/refill = src.reagents.get_master_reagent_id()
|
||||
spawn(600)
|
||||
src.reagents.add_reagent(refill, 10)
|
||||
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/pepperspray/examine()
|
||||
set src in usr
|
||||
usr << text("\icon[] [] units of spray left!", src, src.reagents.total_volume)
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
|
||||
// MOP
|
||||
/obj/item/weapon/mop
|
||||
desc = "The world of janitalia wouldn't be complete without a mop."
|
||||
name = "mop"
|
||||
icon = 'janitor.dmi'
|
||||
icon_state = "mop"
|
||||
var/mopping = 0
|
||||
var/mopcount = 0
|
||||
force = 3.0
|
||||
throwforce = 10.0
|
||||
throw_speed = 5
|
||||
throw_range = 10
|
||||
w_class = 3.0
|
||||
flags = FPRINT | TABLEPASS
|
||||
|
||||
|
||||
/obj/item/weapon/mop/New()
|
||||
var/datum/reagents/R = new/datum/reagents(5)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
|
||||
|
||||
obj/item/weapon/mop/proc/clean(turf/simulated/A as turf)
|
||||
src.reagents.reaction(A,1,10)
|
||||
A.clean_blood()
|
||||
@@ -289,11 +349,13 @@ obj/item/weapon/mop/proc/clean(turf/simulated/A as turf)
|
||||
for(var/obj/effect/overlay/R in A)
|
||||
del(R)
|
||||
|
||||
|
||||
/obj/effect/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/mop))
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/weapon/mop/afterattack(atom/A, mob/user as mob)
|
||||
if (src.reagents.total_volume < 1 || mopcount >= 5)
|
||||
user << "\blue Your mop is dry!"
|
||||
@@ -318,7 +380,6 @@ obj/item/weapon/mop/proc/clean(turf/simulated/A as turf)
|
||||
spawn(5)
|
||||
src.reagents.clear_reagents()
|
||||
mopcount = 0
|
||||
|
||||
return
|
||||
|
||||
|
||||
@@ -327,18 +388,18 @@ obj/item/weapon/mop/proc/clean(turf/simulated/A as turf)
|
||||
* Hope it's okay to stick this shit here: it basically just turns a hexadecimal color into rgb
|
||||
*/
|
||||
|
||||
proc/GetColors(hex)
|
||||
hex = uppertext(hex)
|
||||
var
|
||||
hi1 = text2ascii(hex, 2)
|
||||
lo1 = text2ascii(hex, 3)
|
||||
hi2 = text2ascii(hex, 4)
|
||||
lo2 = text2ascii(hex, 5)
|
||||
hi3 = text2ascii(hex, 6)
|
||||
lo3 = text2ascii(hex, 7)
|
||||
return list(((hi1>= 65 ? hi1-55 : hi1-48)<<4) | (lo1 >= 65 ? lo1-55 : lo1-48),
|
||||
((hi2 >= 65 ? hi2-55 : hi2-48)<<4) | (lo2 >= 65 ? lo2-55 : lo2-48),
|
||||
((hi3 >= 65 ? hi3-55 : hi3-48)<<4) | (lo3 >= 65 ? lo3-55 : lo3-48))
|
||||
/proc/GetColors(hex)
|
||||
hex = uppertext(hex)
|
||||
var
|
||||
hi1 = text2ascii(hex, 2)
|
||||
lo1 = text2ascii(hex, 3)
|
||||
hi2 = text2ascii(hex, 4)
|
||||
lo2 = text2ascii(hex, 5)
|
||||
hi3 = text2ascii(hex, 6)
|
||||
lo3 = text2ascii(hex, 7)
|
||||
return list(((hi1>= 65 ? hi1-55 : hi1-48)<<4) | (lo1 >= 65 ? lo1-55 : lo1-48),
|
||||
((hi2 >= 65 ? hi2-55 : hi2-48)<<4) | (lo2 >= 65 ? lo2-55 : lo2-48),
|
||||
((hi3 >= 65 ? hi3-55 : hi3-48)<<4) | (lo3 >= 65 ? lo3-55 : lo3-48))
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -6,79 +6,69 @@ SHARDS
|
||||
|
||||
*/
|
||||
|
||||
/proc/construct_window(mob/usr as mob, obj/item/stack/sheet/src as obj)
|
||||
if (!( istype(usr.loc, /turf/simulated) ))
|
||||
return
|
||||
if ( ! (istype(usr, /mob/living/carbon/human) || \
|
||||
istype(usr, /mob/living/silicon) || \
|
||||
istype(usr, /mob/living/carbon/monkey) && ticker && ticker.mode.name == "monkey") )
|
||||
usr << "\red You don't have the dexterity to do this!"
|
||||
return 1
|
||||
/proc/construct_window(mob/user as mob, obj/item/stack/sheet/src as obj)//Why is this a general proc and not on the glass sheet?
|
||||
if(!user || !src) return 0
|
||||
if(!user.IsAdvancedToolUser())
|
||||
user << "\red You don't have the dexterity to do this!"
|
||||
return 0
|
||||
var/reinf = istype(src, /obj/item/stack/sheet/rglass)
|
||||
var/title = reinf?"Sheet Reinf. Glass":"Sheet-Glass"
|
||||
title += " ([src.amount] sheet\s left)"
|
||||
switch(alert(title, "Would you like full tile glass or one direction?", "one direct", "full (2 sheets)", "cancel", null))
|
||||
if("one direct")
|
||||
if (src.loc != usr)
|
||||
return 1
|
||||
if (src.amount < 1)
|
||||
return 1
|
||||
if(!src) return 1
|
||||
if(src.loc != user || !src.use(1)) return 1
|
||||
var/list/directions = new/list(cardinal)
|
||||
for (var/obj/structure/window/win in usr.loc)
|
||||
for (var/obj/structure/window/win in user.loc)
|
||||
directions-=win.dir
|
||||
if(!(win.ini_dir in cardinal))
|
||||
usr << "\red Can't let you do that."
|
||||
user << "\red Can't let you do that."
|
||||
return 1
|
||||
var/dir_to_set = 2
|
||||
//yes, this could probably be done better but hey... it works...
|
||||
for(var/obj/structure/window/WT in usr.loc)
|
||||
for(var/obj/structure/window/WT in user.loc)
|
||||
if (WT.dir == dir_to_set)
|
||||
dir_to_set = 4
|
||||
for(var/obj/structure/window/WT in usr.loc)
|
||||
for(var/obj/structure/window/WT in user.loc)
|
||||
if (WT.dir == dir_to_set)
|
||||
dir_to_set = 1
|
||||
for(var/obj/structure/window/WT in usr.loc)
|
||||
for(var/obj/structure/window/WT in user.loc)
|
||||
if (WT.dir == dir_to_set)
|
||||
dir_to_set = 8
|
||||
for(var/obj/structure/window/WT in usr.loc)
|
||||
for(var/obj/structure/window/WT in user.loc)
|
||||
if (WT.dir == dir_to_set)
|
||||
dir_to_set = 2
|
||||
var/obj/structure/window/W
|
||||
if(reinf)
|
||||
W = new /obj/structure/window/reinforced( usr.loc, reinf )
|
||||
W = new /obj/structure/window/reinforced( user.loc, reinf )
|
||||
W.state = 0
|
||||
else
|
||||
W = new /obj/structure/window/basic( usr.loc, reinf )
|
||||
W = new /obj/structure/window/basic( user.loc, reinf )
|
||||
W.dir = dir_to_set
|
||||
W.ini_dir = W.dir
|
||||
W.anchored = 0
|
||||
src.use(1)
|
||||
if("full (2 sheets)")
|
||||
if (src.loc != usr)
|
||||
return 1
|
||||
if (src.amount < 2)
|
||||
return 1
|
||||
if (locate(/obj/structure/window) in usr.loc)
|
||||
usr << "\red Can't let you do that."
|
||||
if(!src) return 1
|
||||
if(src.loc != user || !src.use(2)) return 1
|
||||
if(locate(/obj/structure/window) in user.loc)
|
||||
user << "\red There is a window in the way."
|
||||
return 1
|
||||
var/obj/structure/window/W
|
||||
if(reinf)
|
||||
W = new /obj/structure/window/reinforced( usr.loc, reinf )
|
||||
W = new /obj/structure/window/reinforced( user.loc, reinf )
|
||||
W.state = 0
|
||||
else
|
||||
W = new /obj/structure/window/basic( usr.loc, reinf )
|
||||
W = new /obj/structure/window/basic( user.loc, reinf )
|
||||
W.dir = SOUTHWEST
|
||||
W.ini_dir = SOUTHWEST
|
||||
W.anchored = 0
|
||||
src.use(2)
|
||||
else
|
||||
//do nothing
|
||||
return
|
||||
return 0
|
||||
|
||||
// GLASS
|
||||
|
||||
/obj/item/stack/sheet/glass/attack_self(mob/user as mob)
|
||||
construct_window(usr, src)
|
||||
construct_window(user, src)
|
||||
|
||||
/obj/item/stack/sheet/glass/attackby(obj/item/W, mob/user)
|
||||
..()
|
||||
@@ -115,7 +105,7 @@ SHARDS
|
||||
// REINFORCED GLASS
|
||||
|
||||
/obj/item/stack/sheet/rglass/attack_self(mob/user as mob)
|
||||
construct_window(usr, src)
|
||||
construct_window(user, src)
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user