mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
TG: Window doors are now breakable
- Window doors currently have 200 health, this can and will change if break ins become too common. - They still do not have wires, so you can not 'hack' them that way. - As always, emags still hack open window doors Changes to the hidden mining room treasures. - Added quality pickaxes, jackhammers and drills as a possible treasure. - - Higher quality tools are rarer of course - - Plasma cutter is possible but rare - Added a ripley (equipped with a drill and hydrolic clamp) as a possible treasure. - - There is a chance for the ripley to have a diamond drill instead of a regular drill. Modified the resource crate. - - It no longer always gives you multiple stacks of every mineral. - - It now gives you a chance to get each mineral based on rarity. - - The size of the mineral stack is also partly based on rarity. - - There is a very small chance to recieve nothing in this crate. - - There is a very small chance to recieve a jetpack in this crate ontop of the metal. Updated the changelog Revision: r3696 Author: johnsonmt88
This commit is contained in:
+47
-25
@@ -603,39 +603,61 @@
|
||||
|
||||
|
||||
/obj/structure/closet/syndicate/resources/
|
||||
desc = "It's an emergency storage closet for repairs."
|
||||
desc = "An old, dusty locker."
|
||||
|
||||
/obj/structure/closet/syndicate/resources/New()
|
||||
..()
|
||||
var/common_min = 30 //Minimum amount of minerals in the stack for common minerals
|
||||
var/common_max = 50 //Maximum amount of HONK in the stack for HONK common minerals
|
||||
var/rare_min = 5 //Minimum HONK of HONK in the stack HONK HONK rare minerals
|
||||
var/rare_max = 20 //Maximum HONK HONK HONK in the HONK for HONK rare HONK
|
||||
|
||||
var/list/resources_common = list(
|
||||
|
||||
/obj/item/stack/sheet/metal,
|
||||
/obj/item/stack/sheet/glass,
|
||||
/obj/item/stack/sheet/plasteel,
|
||||
/obj/item/stack/rods
|
||||
)
|
||||
|
||||
var/list/resources_rare = list(
|
||||
|
||||
/obj/item/stack/sheet/gold,
|
||||
/obj/item/stack/sheet/silver,
|
||||
/obj/item/stack/sheet/plasma,
|
||||
/obj/item/stack/sheet/uranium,
|
||||
/obj/item/stack/sheet/diamond
|
||||
|
||||
)
|
||||
|
||||
sleep(2)
|
||||
|
||||
for(var/i = 0, i<2, i++)
|
||||
for(var/res in resources_common)
|
||||
var/obj/item/stack/R = new res(src)
|
||||
R.amount = rand(40,R.max_amount)
|
||||
var/pickednum = rand(1, 50)
|
||||
|
||||
for(var/res in resources_rare)
|
||||
var/obj/item/stack/R = new res(src)
|
||||
R.amount = rand(10,25)
|
||||
//Sad trombone
|
||||
if(pickednum == 1)
|
||||
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(src)
|
||||
P.name = "IOU"
|
||||
P.info = "Sorry man, we needed the money so we sold your stash. It's ok, we'll double our money for sure this time!"
|
||||
|
||||
//Metal (common ore)
|
||||
if(pickednum >= 2)
|
||||
new /obj/item/stack/sheet/metal(src, rand(common_min, common_max))
|
||||
|
||||
//Glass (common ore)
|
||||
if(pickednum >= 5)
|
||||
new /obj/item/stack/sheet/glass(src, rand(common_min, common_max))
|
||||
|
||||
//Plasteel (common ore) Because it has a million more uses then plasma
|
||||
if(pickednum >= 10)
|
||||
new /obj/item/stack/sheet/plasteel(src, rand(common_min, common_max))
|
||||
|
||||
//Plasma (rare ore)
|
||||
if(pickednum >= 15)
|
||||
new /obj/item/stack/sheet/plasma(src, rand(rare_min, rare_max))
|
||||
|
||||
//Silver (rare ore)
|
||||
if(pickednum >= 20)
|
||||
new /obj/item/stack/sheet/silver(src, rand(rare_min, rare_max))
|
||||
|
||||
//Gold (rare ore)
|
||||
if(pickednum >= 30)
|
||||
new /obj/item/stack/sheet/gold(src, rand(rare_min, rare_max))
|
||||
|
||||
//Uranium (rare ore)
|
||||
if(pickednum >= 40)
|
||||
new /obj/item/stack/sheet/uranium(src, rand(rare_min, rare_max))
|
||||
|
||||
//Diamond (rare HONK)
|
||||
if(pickednum >= 45)
|
||||
new /obj/item/stack/sheet/diamond(src, rand(rare_min, rare_max))
|
||||
|
||||
//Jetpack (You hit the jackpot!)
|
||||
if(pickednum == 50)
|
||||
new /obj/item/weapon/tank/jetpack/carbondioxide(src)
|
||||
|
||||
return
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ var/global/list/space_surprises = list( /obj/item/clothing/mask/facehugger/angr
|
||||
/obj/item/weapon/pickaxe/plasmacutter =2,
|
||||
/obj/structure/closet/syndicate/resources =2,
|
||||
/obj/item/weapon/melee/energy/sword/pirate =1,
|
||||
// /obj/mecha/working/ripley/mining =1
|
||||
/obj/mecha/working/ripley/mining =1
|
||||
|
||||
// /obj/creature =0,
|
||||
// /obj/item/weapon/rcd =0,
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
/obj/machinery/door/window
|
||||
name = "interior door"
|
||||
desc = "A door made from a window, yet it can not break nor be depowered."
|
||||
desc = "A strong door."
|
||||
icon = 'windoor.dmi'
|
||||
icon_state = "left"
|
||||
var/base_state = "left"
|
||||
var/health = 200.0 //If you change this, consiter changing ../door/window/brigdoor/ health at the bottom of this .dm file
|
||||
visible = 0.0
|
||||
flags = ON_BORDER
|
||||
opacity = 0
|
||||
@@ -28,6 +29,11 @@
|
||||
src.base_state = src.icon_state
|
||||
return
|
||||
|
||||
/obj/machinery/door/window/Del()
|
||||
density = 0
|
||||
playsound(src, "shatter", 70, 1)
|
||||
..()
|
||||
|
||||
/obj/machinery/door/window/Bumped(atom/movable/AM as mob|obj)
|
||||
if (!( ismob(AM) ))
|
||||
var/obj/machinery/bot/bot = AM
|
||||
@@ -112,13 +118,49 @@
|
||||
src.operating = 0
|
||||
return 1
|
||||
|
||||
/obj/machinery/door/window/attackby(obj/item/I as obj, mob/user as mob)
|
||||
//When an object is thrown at the window
|
||||
/obj/machinery/door/window/hitby(AM as mob|obj)
|
||||
|
||||
..()
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>The glass door was hit by [AM].</B>", 1)
|
||||
var/tforce = 0
|
||||
if(ismob(AM))
|
||||
tforce = 40
|
||||
else
|
||||
tforce = AM:throwforce
|
||||
playsound(src.loc, 'Glasshit.ogg', 100, 1)
|
||||
src.health = max(0, src.health - tforce)
|
||||
if (src.health <= 0)
|
||||
new /obj/item/weapon/shard(src.loc)
|
||||
var/obj/item/weapon/cable_coil/CC = new /obj/item/weapon/cable_coil(src.loc)
|
||||
CC.amount = 2
|
||||
src.density = 0
|
||||
del(src)
|
||||
return
|
||||
//..() //Does this really need to be here twice? The parent proc doesn't even do anything yet. - Nodrak
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/door/window/attack_ai(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
/obj/machinery/door/window/attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
/obj/machinery/door/window/attack_hand(mob/user as mob)
|
||||
return src.attackby(user, user)
|
||||
|
||||
|
||||
/obj/machinery/door/window/attackby(obj/item/weapon/I as obj, mob/user as mob)
|
||||
|
||||
//If it's in the process of opening/closing, ignore the click
|
||||
if (src.operating)
|
||||
return
|
||||
src.add_fingerprint(user)
|
||||
if (!src.requiresID())
|
||||
//don't care who they are or what they have, act as if they're NOTHING
|
||||
user = null
|
||||
|
||||
//Emags and ninja swords? You may pass.
|
||||
if (src.density && (istype(I, /obj/item/weapon/card/emag)||istype(I, /obj/item/weapon/melee/energy/blade)))
|
||||
if(istype(I, /obj/item/weapon/card/emag))
|
||||
var/obj/item/weapon/card/emag/E = I
|
||||
@@ -139,24 +181,50 @@
|
||||
sleep(6)
|
||||
open()
|
||||
return 1
|
||||
|
||||
//If it's a weapon, smash windoor. Unless it's an id card, agent card, ect.. then ignore it (Cards really shouldnt damage a door anyway)
|
||||
if(src.density && istype(I, /obj/item/weapon) && !istype(I, /obj/item/weapon/card))
|
||||
var/aforce = I.force
|
||||
if(I.damtype == BRUTE || I.damtype == BURN)
|
||||
src.health = max(0, src.health - aforce)
|
||||
playsound(src.loc, 'Glasshit.ogg', 75, 1)
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("\red <B>[src] was hit by [I].</B>", 1)
|
||||
if (src.health <= 0)
|
||||
new /obj/item/weapon/shard(src.loc)
|
||||
var/obj/item/weapon/cable_coil/CC = new /obj/item/weapon/cable_coil(src.loc)
|
||||
CC.amount = 2
|
||||
src.density = 0
|
||||
del(src)
|
||||
return
|
||||
|
||||
|
||||
src.add_fingerprint(user)
|
||||
if (!src.requiresID())
|
||||
//don't care who they are or what they have, act as if they're NOTHING
|
||||
user = null
|
||||
|
||||
if (src.allowed(user) || istype(I, /obj/item/device/hacktool))
|
||||
if (src.density)
|
||||
open()
|
||||
else
|
||||
close()
|
||||
|
||||
else if (src.density)
|
||||
flick(text("[]deny", src.base_state), src)
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/machinery/door/window/brigdoor
|
||||
name = "Brig Door"
|
||||
name = "Secure Door"
|
||||
icon = 'windoor.dmi'
|
||||
icon_state = "leftsecure"
|
||||
base_state = "leftsecure"
|
||||
req_access = list(access_security)
|
||||
var/id = null
|
||||
health = 500.0 //Stronger doors for prison (regular window door health is 200)
|
||||
|
||||
|
||||
/obj/machinery/door/window/northleft
|
||||
@@ -191,7 +259,6 @@
|
||||
icon_state = "right"
|
||||
base_state = "right"
|
||||
|
||||
|
||||
/obj/machinery/door/window/brigdoor/northleft
|
||||
dir = NORTH
|
||||
|
||||
|
||||
@@ -41,6 +41,24 @@
|
||||
ME.attach(src)
|
||||
return
|
||||
|
||||
/obj/mecha/working/ripley/mining
|
||||
desc = "An old, dusty mining ripley."
|
||||
name = "APLU \"Miner\""
|
||||
|
||||
/obj/mecha/working/ripley/mining/New()
|
||||
..()
|
||||
//Attach drill
|
||||
if(prob(25)) //Possible diamond drill... Feeling lucky?
|
||||
var/obj/item/mecha_parts/mecha_equipment/tool/drill/diamonddrill/D = new /obj/item/mecha_parts/mecha_equipment/tool/drill/diamonddrill
|
||||
D.attach(src)
|
||||
else
|
||||
var/obj/item/mecha_parts/mecha_equipment/tool/drill/D = new /obj/item/mecha_parts/mecha_equipment/tool/drill
|
||||
D.attach(src)
|
||||
|
||||
//Attach hydrolic clamp
|
||||
var/obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp/HC = new /obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp
|
||||
HC.attach(src)
|
||||
|
||||
/obj/mecha/working/ripley/Exit(atom/movable/O)
|
||||
if(O in cargo)
|
||||
return 0
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
src.density = 0
|
||||
del(src)
|
||||
return
|
||||
..()
|
||||
//..() //Does this really need to be here twice? The parent proc doesn't even do anything yet. - Nodrak
|
||||
return
|
||||
|
||||
//These all need to be rewritten to use visiblemessage()
|
||||
|
||||
@@ -1502,9 +1502,9 @@
|
||||
face_standing = new /image()
|
||||
face_lying = new /image()
|
||||
face_standing.icon = eyes_s
|
||||
face_standing.layer = FACE_LAYER
|
||||
face_standing.layer = MOB_LAYER
|
||||
face_lying.icon = eyes_l
|
||||
face_lying.layer = FACE_LAYER
|
||||
face_lying.layer = MOB_LAYER
|
||||
|
||||
del(mouth_l)
|
||||
del(mouth_s)
|
||||
|
||||
Reference in New Issue
Block a user