mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-08-30 15:36:21 +01:00
Merge branch 'master' of https://github.com/Baystation12/Baystation12 into dev
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
density = 1
|
||||
opacity = 0
|
||||
anchored = 1
|
||||
health = 100
|
||||
health = 60
|
||||
brute_resist = 1
|
||||
fire_resist = 2
|
||||
|
||||
|
||||
@@ -7,8 +7,10 @@ A list of items and costs is stored under the datum of every game mode, alongsid
|
||||
*/
|
||||
|
||||
/obj/item/device/uplink
|
||||
|
||||
var/welcome // Welcoming menu message
|
||||
var/items // List of items
|
||||
var/valid_items = list()
|
||||
var/item_data // raw item text
|
||||
var/list/ItemList // Parsed list of items
|
||||
var/uses // Numbers of crystals
|
||||
@@ -58,6 +60,12 @@ A list of items and costs is stored under the datum of every game mode, alongsid
|
||||
|
||||
|
||||
|
||||
//Halfassed fix for href exploit ~Z
|
||||
for(var/D in ItemList)
|
||||
var/list/O = stringsplit(D, ":")
|
||||
if(O.len>0)
|
||||
valid_items += O[1]
|
||||
|
||||
//Let's build a menu!
|
||||
/obj/item/device/uplink/proc/generate_menu()
|
||||
|
||||
@@ -87,7 +95,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid
|
||||
continue
|
||||
|
||||
path_text = O[1]
|
||||
cost = text2num(O[2])
|
||||
cost = Clamp(text2num(O[2]),1,20) //Another halfassed fix for href exploit ~Z
|
||||
|
||||
if(cost>uses)
|
||||
continue
|
||||
@@ -378,7 +386,12 @@ A list of items and costs is stored under the datum of every game mode, alongsid
|
||||
return 1
|
||||
|
||||
if(..(href, href_list) == 1)
|
||||
|
||||
if(!(href_list["buy_item"] in valid_items))
|
||||
return
|
||||
|
||||
var/path_obj = text2path(href_list["buy_item"])
|
||||
|
||||
var/obj/I = new path_obj(get_turf(usr))
|
||||
if(ishuman(usr))
|
||||
var/mob/living/carbon/human/A = usr
|
||||
@@ -427,6 +440,3 @@ A list of items and costs is stored under the datum of every game mode, alongsid
|
||||
..()
|
||||
hidden_uplink = new(src)
|
||||
hidden_uplink.uses = 10
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
var/filled = 0
|
||||
|
||||
afterattack(obj/target, mob/user , flag)
|
||||
if(!target.reagents) return
|
||||
if(!target.reagents || !flag) return
|
||||
|
||||
if(filled)
|
||||
|
||||
@@ -105,4 +105,4 @@
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Droppers. END
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user